Skip to content

Commit b120817

Browse files
authored
Use tags to find code search tool (#6643)
Part of #6632
1 parent bc00326 commit b120817

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/lm/tools/suggestFixTool.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,12 @@ export class SuggestFixTool extends RepoToolBase<IssueToolParameters> {
5858
messages.push(vscode.LanguageModelChatMessage.User(`Comment ${index}: ${comment.body}`));
5959
});
6060

61-
const copilotCodebaseResult = await vscode.lm.invokeTool('copilot_searchCodebase', {
61+
const codeSearchTool = vscode.lm.tools.find(value => value.tags.includes('vscode_codesearch'));
62+
if (!codeSearchTool) {
63+
throw new Error('Could not find the code search tool');
64+
}
65+
66+
const copilotCodebaseResult = await vscode.lm.invokeTool(codeSearchTool.name, {
6267
toolInvocationToken: undefined,
6368
input: {
6469
query: result.title

0 commit comments

Comments
 (0)