Skip to content

Commit cd8617e

Browse files
authored
Remove "Open model picker" from command palette (microsoft#249693)
We just don't have a good generic way to find where a chat widget is hosted and reveal it. So only use this command via the keybinding and dropdown for now. Fix microsoft/vscode-copilot-release#10080
1 parent f922dd2 commit cd8617e

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

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

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,13 @@ import { ContextKeyExpr } from '../../../../../platform/contextkey/common/contex
1616
import { IDialogService } from '../../../../../platform/dialogs/common/dialogs.js';
1717
import { IInstantiationService } from '../../../../../platform/instantiation/common/instantiation.js';
1818
import { KeybindingWeight } from '../../../../../platform/keybinding/common/keybindingsRegistry.js';
19-
import { IViewsService } from '../../../../services/views/common/viewsService.js';
2019
import { ChatContextKeys } from '../../common/chatContextKeys.js';
2120
import { chatVariableLeader } from '../../common/chatParserTypes.js';
2221
import { IChatService } from '../../common/chatService.js';
2322
import { ChatAgentLocation, ChatConfiguration, ChatMode, validateChatMode } from '../../common/constants.js';
2423
import { ILanguageModelChatMetadata } from '../../common/languageModels.js';
2524
import { ILanguageModelToolsService } from '../../common/languageModelToolsService.js';
26-
import { IChatWidget, IChatWidgetService, showChatView } from '../chat.js';
25+
import { IChatWidget, IChatWidgetService } from '../chat.js';
2726
import { getEditingSessionContext } from '../chatEditing/chatEditingActions.js';
2827
import { ACTION_ID_NEW_CHAT, CHAT_CATEGORY, handleCurrentEditingSession, handleModeSwitch } from './chatActions.js';
2928

@@ -243,7 +242,7 @@ class OpenModelPickerAction extends Action2 {
243242
id: OpenModelPickerAction.ID,
244243
title: localize2('interactive.openModelPicker.label', "Open Model Picker"),
245244
category: CHAT_CATEGORY,
246-
f1: true,
245+
f1: false,
247246
keybinding: {
248247
primary: KeyMod.CtrlCmd | KeyMod.Alt | KeyCode.Period,
249248
weight: KeybindingWeight.WorkbenchContrib,
@@ -269,10 +268,7 @@ class OpenModelPickerAction extends Action2 {
269268

270269
override async run(accessor: ServicesAccessor, ...args: any[]): Promise<void> {
271270
const widgetService = accessor.get(IChatWidgetService);
272-
let widget = widgetService.lastFocusedWidget;
273-
if (!widget || widget.location === ChatAgentLocation.Panel) {
274-
widget = await showChatView(accessor.get(IViewsService));
275-
}
271+
const widget = widgetService.lastFocusedWidget;
276272
if (widget) {
277273
widget.input.openModelPicker();
278274
}

0 commit comments

Comments
 (0)