@@ -8,7 +8,7 @@ import * as nls from '../../../../nls.js';
88import { IConfigurationService } from '../../../../platform/configuration/common/configuration.js' ;
99import { IContextMenuService } from '../../../../platform/contextview/browser/contextView.js' ;
1010import { SyncDescriptor } from '../../../../platform/instantiation/common/descriptors.js' ;
11- import { IInstantiationService , ServicesAccessor } from '../../../../platform/instantiation/common/instantiation.js' ;
11+ import { IInstantiationService } from '../../../../platform/instantiation/common/instantiation.js' ;
1212import { ILogService } from '../../../../platform/log/common/log.js' ;
1313import { Registry } from '../../../../platform/registry/common/platform.js' ;
1414import { IStorageService } from '../../../../platform/storage/common/storage.js' ;
@@ -43,7 +43,7 @@ import { Codicon } from '../../../../base/common/codicons.js';
4343import { IEditorService } from '../../../services/editor/common/editorService.js' ;
4444import { EditorInput } from '../../../common/editor/editorInput.js' ;
4545import { ChatEditorInput } from './chatEditorInput.js' ;
46- import { IMenuService , MenuId , registerAction2 , Action2 } from '../../../../platform/actions/common/actions.js' ;
46+ import { IMenuService , MenuId , MenuRegistry } from '../../../../platform/actions/common/actions.js' ;
4747import { getContextMenuActions } from '../../../../platform/actions/browser/menuEntryActionViewItem.js' ;
4848import { ICommandService } from '../../../../platform/commands/common/commands.js' ;
4949import { registerIcon } from '../../../../platform/theme/common/iconRegistry.js' ;
@@ -575,25 +575,14 @@ class SessionsViewPane extends ViewPane {
575575 }
576576}
577577
578- // Register action for "Open in Editor" command in Local Chat Sessions view
579- registerAction2 ( class OpenChatInEditorAction extends Action2 {
580- constructor ( ) {
581- super ( {
582- id : 'workbench.action.chatSessions.openInEditor' ,
583- title : nls . localize2 ( 'chatSessions.openInEditor' , "Open in Editor" ) ,
584- icon : Codicon . plus ,
585- menu : {
586- id : MenuId . ViewTitle ,
587- when : ContextKeyExpr . equals ( 'view' , `${ VIEWLET_ID } .local` ) ,
588- group : 'navigation' ,
589- order : 1
590- }
591- } ) ;
592- }
593-
594- async run ( accessor : ServicesAccessor ) : Promise < void > {
595- const commandService = accessor . get ( ICommandService ) ;
596- await commandService . executeCommand ( 'workbench.action.chat.openInEditor' ) ;
597- }
578+ MenuRegistry . appendMenuItem ( MenuId . ViewTitle , {
579+ command : {
580+ id : 'workbench.action.openChat' ,
581+ title : nls . localize2 ( 'interactiveSession.open' , "New Chat Editor" ) ,
582+ icon : Codicon . plus
583+ } ,
584+ group : 'navigation' ,
585+ order : 1 ,
586+ when : ContextKeyExpr . equals ( 'view' , `${ VIEWLET_ID } .local` ) ,
598587} ) ;
599588
0 commit comments