Skip to content

Commit 7d8b338

Browse files
authored
only show "Configure Tool Sets" when chat and tools are enabled (microsoft#250725)
fyi @bpasero
1 parent b399f06 commit 7d8b338

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/vs/workbench/contrib/chat/browser/tools/toolSetsContribution.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ import * as JSONContributionRegistry from '../../../../../platform/jsonschemas/c
3636
import { Registry } from '../../../../../platform/registry/common/platform.js';
3737
import { ContextKeyExpr } from '../../../../../platform/contextkey/common/contextkey.js';
3838
import { ChatViewId } from '../chat.js';
39+
import { ChatContextKeys } from '../../common/chatContextKeys.js';
3940

4041

4142
const toolEnumValues: string[] = [];
@@ -322,6 +323,7 @@ export class ConfigureToolSets extends Action2 {
322323
title: localize2('chat.configureToolSets', 'Configure Tool Sets'),
323324
category: CHAT_CATEGORY,
324325
f1: true,
326+
precondition: ContextKeyExpr.and(ChatContextKeys.enabled, ChatContextKeys.Tools.toolsCount.greater(0)),
325327
menu: {
326328
id: MenuId.ViewTitle,
327329
when: ContextKeyExpr.equals('view', ChatViewId),

0 commit comments

Comments
 (0)