@@ -47,6 +47,12 @@ import { DomEmitter } from 'vs/base/browser/event';
47
47
import { CommentContextKeys } from 'vs/workbench/contrib/comments/common/commentContextKeys' ;
48
48
import { FileAccess } from 'vs/base/common/network' ;
49
49
50
+ class CommentsActionRunner extends ActionRunner {
51
+ protected override async runAction ( action : IAction , context : any [ ] ) : Promise < void > {
52
+ await action . run ( ...context ) ;
53
+ }
54
+ }
55
+
50
56
export class CommentNode < T extends IRange | ICellRange > extends Disposable {
51
57
private _domNode : HTMLElement ;
52
58
private _body : HTMLElement ;
@@ -249,11 +255,16 @@ export class CommentNode<T extends IRange | ICellRange> extends Disposable {
249
255
}
250
256
251
257
private get commentNodeContext ( ) {
252
- return {
258
+ return [ {
253
259
thread : this . commentThread ,
254
260
commentUniqueId : this . comment . uniqueIdInThread ,
255
261
$mid : MarshalledId . CommentNode
256
- } ;
262
+ } ,
263
+ {
264
+ commentControlHandle : this . commentThread . controllerHandle ,
265
+ commentThreadHandle : this . commentThread . commentThreadHandle ,
266
+ $mid : MarshalledId . CommentThread
267
+ } ] ;
257
268
}
258
269
259
270
private createToolbar ( ) {
@@ -278,6 +289,7 @@ export class CommentNode<T extends IRange | ICellRange> extends Disposable {
278
289
} ) ;
279
290
280
291
this . toolbar . context = this . commentNodeContext ;
292
+ this . toolbar . actionRunner = new CommentsActionRunner ( ) ;
281
293
282
294
this . registerActionBarListeners ( this . _actionsToolbarContainer ) ;
283
295
this . _register ( this . toolbar ) ;
@@ -679,7 +691,7 @@ export class CommentNode<T extends IRange | ICellRange> extends Disposable {
679
691
menuId : MenuId . CommentThreadCommentContext ,
680
692
menuActionOptions : { shouldForwardArgs : true } ,
681
693
contextKeyService : this . _contextKeyService ,
682
- actionRunner : new ActionRunner ( ) ,
694
+ actionRunner : new CommentsActionRunner ( ) ,
683
695
getActionsContext : ( ) => {
684
696
return this . commentNodeContext ;
685
697
} ,
0 commit comments