Skip to content

Commit 9eecafa

Browse files
committed
Move actions
1 parent 8ba63e8 commit 9eecafa

File tree

2 files changed

+22
-34
lines changed

2 files changed

+22
-34
lines changed

src/vs/workbench/contrib/chat/browser/actions/chatActions.ts

Lines changed: 22 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ import { ILanguageModelToolsService } from '../../common/languageModelToolsServi
6767
import { ChatViewId, IChatWidget, IChatWidgetService, showChatView, showCopilotView } from '../chat.js';
6868
import { IChatEditorOptions } from '../chatEditor.js';
6969
import { ChatEditorInput, shouldShowClearEditingSessionConfirmation, showClearEditingSessionConfirmation } from '../chatEditorInput.js';
70+
import { VIEWLET_ID } from '../chatSessions.js';
7071
import { ChatViewPane } from '../chatViewPane.js';
7172
import { convertBufferToScreenshotVariable } from '../contrib/screenshot.js';
7273
import { clearChatEditor } from './chatClear.js';
@@ -910,7 +911,13 @@ export function registerChatActions() {
910911
title: localize2('chatSessions.openNewChatInNewWindow', 'Open New Chat in New Window'),
911912
f1: true,
912913
category: CHAT_CATEGORY,
913-
precondition: ChatContextKeys.enabled
914+
precondition: ChatContextKeys.enabled,
915+
menu: {
916+
id: MenuId.ViewTitle,
917+
group: 'submenu',
918+
order: 1,
919+
when: ContextKeyExpr.equals('view', `${VIEWLET_ID}.local`),
920+
}
914921
});
915922
}
916923

@@ -933,7 +940,13 @@ export function registerChatActions() {
933940
title: localize2('chatSessions.openNewChatInNewMaximizedWindow', 'Open New Chat in Maximized Window'),
934941
f1: true,
935942
category: CHAT_CATEGORY,
936-
precondition: ChatContextKeys.enabled
943+
precondition: ChatContextKeys.enabled,
944+
menu: {
945+
id: MenuId.ViewTitle,
946+
group: 'submenu',
947+
order: 1,
948+
when: ContextKeyExpr.equals('view', `${VIEWLET_ID}.local`),
949+
}
937950
});
938951
}
939952

@@ -956,7 +969,13 @@ export function registerChatActions() {
956969
title: localize2('chatSessions.openNewChatInSideBar', 'Open New Chat in Side Bar'),
957970
f1: true,
958971
category: CHAT_CATEGORY,
959-
precondition: ChatContextKeys.enabled
972+
precondition: ChatContextKeys.enabled,
973+
menu: {
974+
id: MenuId.ViewTitle,
975+
group: 'submenu',
976+
order: 1,
977+
when: ContextKeyExpr.equals('view', `${VIEWLET_ID}.local`),
978+
}
960979
});
961980
}
962981

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

Lines changed: 0 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -962,37 +962,6 @@ MenuRegistry.appendMenuItem(MenuId.ViewTitle, {
962962
when: ContextKeyExpr.equals('view', `${VIEWLET_ID}.local`),
963963
});
964964

965-
MenuRegistry.appendMenuItem(MenuId.ViewTitle, {
966-
command: {
967-
id: 'workbench.action.chat.newChatInNewWindow',
968-
title: nls.localize2('chatSessions.openNewChatInNewWindow', 'Open New Chat in New Window')
969-
},
970-
group: 'submenu',
971-
order: 1,
972-
when: ContextKeyExpr.equals('view', `${VIEWLET_ID}.local`),
973-
});
974-
975-
MenuRegistry.appendMenuItem(MenuId.ViewTitle, {
976-
command: {
977-
id: 'workbench.action.chat.newChatInSideBar',
978-
title: nls.localize2('chatSessions.openNewChatInSideBar', 'Open New Chat in Side Bar'),
979-
},
980-
group: 'submenu',
981-
order: 1,
982-
when: ContextKeyExpr.equals('view', `${VIEWLET_ID}.local`),
983-
});
984-
985-
986-
MenuRegistry.appendMenuItem(MenuId.ViewTitle, {
987-
command: {
988-
id: 'workbench.action.chat.newChatInNewMaximizedWindow',
989-
title: nls.localize2('chatSessions.openNewChatInNewMaximizedWindow', 'Open New Chat in Maximized Window')
990-
},
991-
group: 'submenu',
992-
order: 1,
993-
when: ContextKeyExpr.equals('view', `${VIEWLET_ID}.local`),
994-
});
995-
996965
MenuRegistry.appendMenuItem(MenuId.ViewTitle, {
997966
command: {
998967
id: 'workbench.action.chat.openInNewEditorGroup',

0 commit comments

Comments
 (0)