Skip to content

Commit d597731

Browse files
authored
add chat settings option (microsoft#262200)
1 parent 9f0d013 commit d597731

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

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

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ import { ACTIVE_GROUP, AUX_WINDOW_GROUP, IEditorService } from '../../../../serv
4949
import { IHostService } from '../../../../services/host/browser/host.js';
5050
import { IWorkbenchLayoutService, Parts } from '../../../../services/layout/browser/layoutService.js';
5151
import { IViewsService } from '../../../../services/views/common/viewsService.js';
52+
import { IPreferencesService } from '../../../../services/preferences/common/preferences.js';
5253
import { EXTENSIONS_CATEGORY, IExtensionsWorkbenchService } from '../../../extensions/common/extensions.js';
5354
import { IChatAgentService } from '../../common/chatAgents.js';
5455
import { ChatContextKeys } from '../../common/chatContextKeys.js';
@@ -1366,6 +1367,30 @@ Update \`.github/copilot-instructions.md\` for the user, then ask for feedback o
13661367
}
13671368
});
13681369

1370+
registerAction2(class OpenChatFeatureSettingsAction extends Action2 {
1371+
constructor() {
1372+
super({
1373+
id: 'workbench.action.chat.openFeatureSettings',
1374+
title: localize2('openChatFeatureSettings', "Chat Settings"),
1375+
shortTitle: localize('openChatFeatureSettings.short', "Chat Settings"),
1376+
category: CHAT_CATEGORY,
1377+
f1: true,
1378+
precondition: ChatContextKeys.enabled,
1379+
menu: {
1380+
id: CHAT_CONFIG_MENU_ID,
1381+
when: ContextKeyExpr.and(ChatContextKeys.enabled, ContextKeyExpr.equals('view', ChatViewId)),
1382+
order: 15,
1383+
group: '2_configure'
1384+
}
1385+
});
1386+
}
1387+
1388+
override async run(accessor: ServicesAccessor): Promise<void> {
1389+
const preferencesService = accessor.get(IPreferencesService);
1390+
preferencesService.openSettings({ query: '@feature:chat' });
1391+
}
1392+
});
1393+
13691394
MenuRegistry.appendMenuItem(MenuId.ViewTitle, {
13701395
submenu: CHAT_CONFIG_MENU_ID,
13711396
title: localize2('config.label', "Configure Chat..."),

0 commit comments

Comments
 (0)