From 4624d02df9d492ebcd7ffa2db6cd3bf2ac2207ec Mon Sep 17 00:00:00 2001 From: Rob Lourens Date: Sun, 15 Feb 2026 07:31:52 +0000 Subject: [PATCH] Add command to open chat editor to the side (#295427) --- .../chat/browser/actions/chatActions.ts | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/src/vs/workbench/contrib/chat/browser/actions/chatActions.ts b/src/vs/workbench/contrib/chat/browser/actions/chatActions.ts index 18c34c4bf65..e020ad9808c 100644 --- a/src/vs/workbench/contrib/chat/browser/actions/chatActions.ts +++ b/src/vs/workbench/contrib/chat/browser/actions/chatActions.ts @@ -38,7 +38,7 @@ import { ITelemetryService } from '../../../../../platform/telemetry/common/tele import { ActiveEditorContext } from '../../../../common/contextkeys.js'; import { IViewDescriptorService, ViewContainerLocation } from '../../../../common/views.js'; import { ChatEntitlement, IChatEntitlementService } from '../../../../services/chat/common/chatEntitlementService.js'; -import { ACTIVE_GROUP, AUX_WINDOW_GROUP } from '../../../../services/editor/common/editorService.js'; +import { ACTIVE_GROUP, AUX_WINDOW_GROUP, SIDE_GROUP } from '../../../../services/editor/common/editorService.js'; import { IHostService } from '../../../../services/host/browser/host.js'; import { IWorkbenchLayoutService, Parts } from '../../../../services/layout/browser/layoutService.js'; import { IPreferencesService } from '../../../../services/preferences/common/preferences.js'; @@ -695,6 +695,23 @@ export function registerChatActions() { } }); + registerAction2(class NewChatEditorToSideAction extends Action2 { + constructor() { + super({ + id: 'workbench.action.openChatToSide', + title: localize2('interactiveSession.openToSide', "New Chat Editor to the Side"), + f1: true, + category: CHAT_CATEGORY, + precondition: ChatContextKeys.enabled, + }); + } + + async run(accessor: ServicesAccessor) { + const widgetService = accessor.get(IChatWidgetService); + await widgetService.openSession(LocalChatSessionUri.getNewSessionUri(), SIDE_GROUP, { pinned: true } satisfies IChatEditorOptions); + } + }); + registerAction2(class NewChatWindowAction extends Action2 { constructor() { super({