Add command to open chat editor to the side (#295427)

This commit is contained in:
Rob Lourens
2026-02-15 07:31:52 +00:00
committed by GitHub
parent 17a4867151
commit 4624d02df9
@@ -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({