@@ -21,7 +21,7 @@ import { IContextKeyService, IContextKey, ContextKeyExpr, RawContextKey } from '
21
21
import { ICommandService } from '../../../../platform/commands/common/commands.js' ;
22
22
import { IKeybindingService } from '../../../../platform/keybinding/common/keybinding.js' ;
23
23
import { MenuItemAction , IMenuService , registerAction2 , MenuId , IAction2Options , MenuRegistry , Action2 , IMenu } from '../../../../platform/actions/common/actions.js' ;
24
- import { IAction , ActionRunner , Action , Separator , IActionRunner } from '../../../../base/common/actions.js' ;
24
+ import { IAction , ActionRunner , Action , Separator , IActionRunner , toAction } from '../../../../base/common/actions.js' ;
25
25
import { ActionBar , IActionViewItemProvider } from '../../../../base/browser/ui/actionbar/actionbar.js' ;
26
26
import { IThemeService , IFileIconTheme } from '../../../../platform/theme/common/themeService.js' ;
27
27
import { isSCMResource , isSCMResourceGroup , isSCMRepository , isSCMInput , collectContextMenuActions , getActionViewItemProvider , isSCMActionButton , isSCMViewService , isSCMResourceNode , connectPrimaryMenu } from './util.js' ;
@@ -2988,7 +2988,14 @@ export class SCMActionButton implements IDisposable {
2988
2988
for ( let index = 0 ; index < button . secondaryCommands . length ; index ++ ) {
2989
2989
const commands = button . secondaryCommands [ index ] ;
2990
2990
for ( const command of commands ) {
2991
- actions . push ( new Action ( command . id , command . title , undefined , true , async ( ) => await this . executeCommand ( command . id , ...( command . arguments || [ ] ) ) ) ) ;
2991
+ actions . push ( toAction ( {
2992
+ id : command . id ,
2993
+ label : command . title ,
2994
+ enabled : true ,
2995
+ run : async ( ) => {
2996
+ await this . executeCommand ( command . id , ...( command . arguments || [ ] ) ) ;
2997
+ }
2998
+ } ) ) ;
2992
2999
}
2993
3000
if ( commands . length ) {
2994
3001
actions . push ( new Separator ( ) ) ;
0 commit comments