Skip to content

Commit b2b35e4

Browse files
committed
use main action
1 parent f3e85b5 commit b2b35e4

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

src/vs/workbench/contrib/chat/browser/chatSessions.ts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ import { ICommandService } from '../../../../platform/commands/common/commands.j
4848
import { registerIcon } from '../../../../platform/theme/common/iconRegistry.js';
4949
import { IWorkbenchContribution } from '../../../common/contributions.js';
5050
import { ChatConfiguration } from '../common/constants.js';
51+
import { MarshalledId } from '../../../../base/common/marshallingIds.js';
5152

5253
export 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

Comments
 (0)