@@ -48,6 +48,7 @@ import { ICommandService } from '../../../../platform/commands/common/commands.j
4848import { registerIcon } from '../../../../platform/theme/common/iconRegistry.js' ;
4949import { IWorkbenchContribution } from '../../../common/contributions.js' ;
5050import { ChatConfiguration } from '../common/constants.js' ;
51+ import { MarshalledId } from '../../../../base/common/marshallingIds.js' ;
5152
5253export const VIEWLET_ID = 'workbench.view.chat.sessions' ;
5354
@@ -461,6 +462,7 @@ class SessionsViewPane extends ViewPane {
461462 @IOpenerService openerService : IOpenerService ,
462463 @IThemeService themeService : IThemeService ,
463464 @IHoverService hoverService : IHoverService ,
465+ @ICommandService private readonly commandService : ICommandService ,
464466 @IEditorService private readonly editorService : IEditorService ,
465467 @IMenuService private readonly menuService : IMenuService ,
466468 ) {
@@ -531,8 +533,12 @@ class SessionsViewPane extends ViewPane {
531533 ckey . reset ( ) ;
532534
533535 const allActions = [ ...menuActions . primary , ...menuActions . secondary ] ;
534- if ( allActions . length === 0 ) {
535- // TODO: This doesn't work
536+ const mainAction = allActions [ 0 ] ;
537+ if ( mainAction ) {
538+ this . commandService . executeCommand ( mainAction . id , {
539+ id : element . id ,
540+ $mid : MarshalledId . ChatSessionContext
541+ } ) ;
536542 }
537543 }
538544 } ) ) ;
0 commit comments