Skip to content

Commit 94d0534

Browse files
authored
Make GH completions menu discoverable from the 🤖 menu (fix microsoft/vscode-copilot#13039) (#240221)
1 parent 4b3bf5a commit 94d0534

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

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

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ import { ChatEditorInput } from '../chatEditorInput.js';
4949
import { ChatViewPane } from '../chatViewPane.js';
5050
import { convertBufferToScreenshotVariable } from '../contrib/screenshot.js';
5151
import { clearChatEditor } from './chatClear.js';
52+
import { ICommandService } from '../../../../../platform/commands/common/commands.js';
5253

5354
export const CHAT_CATEGORY = localize2('chat.category', 'Chat');
5455
export const CHAT_OPEN_ACTION_ID = 'workbench.action.chat.open';
@@ -506,6 +507,27 @@ export function registerChatActions() {
506507
extensionsWorkbenchService.openSearch(`@feature:${CopilotUsageExtensionFeatureId}`);
507508
}
508509
});
510+
511+
registerAction2(class ConfigureCopilotCompletions extends Action2 {
512+
513+
constructor() {
514+
super({
515+
id: 'workbench.action.chat.configureCodeCompletions',
516+
title: localize2('configureCompletions', "Configure Code Completions..."),
517+
precondition: ChatContextKeys.enabled,
518+
menu: {
519+
id: MenuId.ChatCommandCenter,
520+
group: 'f_completions',
521+
order: 10,
522+
}
523+
});
524+
}
525+
526+
override async run(accessor: ServicesAccessor): Promise<void> {
527+
const commandService = accessor.get(ICommandService);
528+
commandService.executeCommand('github.copilot.toggleStatusMenu');
529+
}
530+
});
509531
}
510532

511533
export function stringifyItem(item: IChatRequestViewModel | IChatResponseViewModel, includeName = true): string {

0 commit comments

Comments
 (0)