File tree Expand file tree Collapse file tree 2 files changed +42
-2
lines changed Expand file tree Collapse file tree 2 files changed +42
-2
lines changed Original file line number Diff line number Diff line change 6060 "command" : " codingPlugin.switchRepo" ,
6161 "title" : " Switch repo" ,
6262 "category" : " Coding plugin"
63+ },
64+ {
65+ "command" : " codingPlugin.diff.createComment" ,
66+ "title" : " Post comment" ,
67+ "enablement" : " !commentIsEmpty"
68+ },
69+ {
70+ "command" : " codingPlugin.diff.replyComment" ,
71+ "title" : " Reply" ,
72+ "enablement" : " !commentIsEmpty"
6373 }
6474 ],
6575 "menus" : {
76+ "commandPalette" : [
77+ {
78+ "command" : " codingPlugin.diff.createComment" ,
79+ "when" : " false"
80+ },
81+ {
82+ "command" : " codingPlugin.diff.replyComment" ,
83+ "when" : " false"
84+ }
85+ ],
6686 "view/title" : [
6787 {
6888 "command" : " codingPlugin.newMrDesc" ,
7494 "when" : " view == mrTreeView" ,
7595 "group" : " navigation"
7696 }
97+ ],
98+ "comments/commentThread/context" : [
99+ {
100+ "command" : " codingPlugin.diff.createComment" ,
101+ "group" : " inline" ,
102+ "when" : " commentController == mrDiffComment && commentThreadIsEmpty"
103+ },
104+ {
105+ "command" : " codingPlugin.diff.replyComment" ,
106+ "group" : " inline" ,
107+ "when" : " commentController == mrDiffComment && !commentThreadIsEmpty"
108+ }
77109 ]
78110 },
79111 "viewsWelcome" : [
Original file line number Diff line number Diff line change @@ -48,7 +48,7 @@ export async function activate(context: vscode.ExtensionContext) {
4848
4949 const tdService = new TurndownService ( ) ;
5050 const commentController = vscode . comments . createCommentController (
51- 'mr-comment ' ,
51+ 'mrDiffComment ' ,
5252 'Merge request diff comments' ,
5353 ) ;
5454 context . subscriptions . push ( commentController ) ;
@@ -267,7 +267,15 @@ export async function activate(context: vscode.ExtensionContext) {
267267 context . subscriptions . push (
268268 vscode . commands . registerCommand (
269269 `codingPlugin.diff.createComment` ,
270- async ( reply : vscode . CommentReply ) => {
270+ ( reply : vscode . CommentReply ) => {
271+ replyNote ( reply ) ;
272+ } ,
273+ ) ,
274+ ) ;
275+ context . subscriptions . push (
276+ vscode . commands . registerCommand (
277+ `codingPlugin.diff.replyComment` ,
278+ ( reply : vscode . CommentReply ) => {
271279 replyNote ( reply ) ;
272280 } ,
273281 ) ,
You can’t perform that action at this time.
0 commit comments