Skip to content

Commit 91b48e2

Browse files
authored
Enable toolsets with tools that aren't canBeReferencedInPrompt (microsoft#249834)
1 parent 5b91a21 commit 91b48e2

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

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

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -176,9 +176,6 @@ export class ChatSelectedTools extends Disposable {
176176
const result = new Map<IToolData, boolean>();
177177

178178
const _set = (tool: IToolData, enabled: boolean) => {
179-
if (!tool.canBeReferencedInPrompt) {
180-
return;
181-
}
182179
// ONLY disable a tool that isn't enabled yet
183180
const enabledNow = result.get(tool);
184181
if (enabled || !enabledNow) {
@@ -192,7 +189,9 @@ export class ChatSelectedTools extends Disposable {
192189
_set(tool, enabled);
193190
}
194191
} else {
195-
_set(item, enabled);
192+
if (item.canBeReferencedInPrompt) {
193+
_set(item, enabled);
194+
}
196195
}
197196
}
198197
return result;

0 commit comments

Comments
 (0)