File tree 2 files changed +42
-2
lines changed
2 files changed +42
-2
lines changed Original file line number Diff line number Diff line change 60
60
"command" : " codingPlugin.switchRepo" ,
61
61
"title" : " Switch repo" ,
62
62
"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"
63
73
}
64
74
],
65
75
"menus" : {
76
+ "commandPalette" : [
77
+ {
78
+ "command" : " codingPlugin.diff.createComment" ,
79
+ "when" : " false"
80
+ },
81
+ {
82
+ "command" : " codingPlugin.diff.replyComment" ,
83
+ "when" : " false"
84
+ }
85
+ ],
66
86
"view/title" : [
67
87
{
68
88
"command" : " codingPlugin.newMrDesc" ,
74
94
"when" : " view == mrTreeView" ,
75
95
"group" : " navigation"
76
96
}
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
+ }
77
109
]
78
110
},
79
111
"viewsWelcome" : [
Original file line number Diff line number Diff line change @@ -48,7 +48,7 @@ export async function activate(context: vscode.ExtensionContext) {
48
48
49
49
const tdService = new TurndownService ( ) ;
50
50
const commentController = vscode . comments . createCommentController (
51
- 'mr-comment ' ,
51
+ 'mrDiffComment ' ,
52
52
'Merge request diff comments' ,
53
53
) ;
54
54
context . subscriptions . push ( commentController ) ;
@@ -267,7 +267,15 @@ export async function activate(context: vscode.ExtensionContext) {
267
267
context . subscriptions . push (
268
268
vscode . commands . registerCommand (
269
269
`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 ) => {
271
279
replyNote ( reply ) ;
272
280
} ,
273
281
) ,
You can’t perform that action at this time.
0 commit comments