mirror of
https://github.com/microsoft/vscode.git
synced 2026-05-24 01:11:34 +01:00
Add command to open chat editor to the side (#295427)
This commit is contained in:
@@ -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({
|
||||
|
||||
Reference in New Issue
Block a user