Skip to content

Commit

Permalink
Use tags to find code search tool (#6643)
Browse files Browse the repository at this point in the history
Part of #6632
  • Loading branch information
alexr00 authored Feb 21, 2025
1 parent bc00326 commit b120817
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/lm/tools/suggestFixTool.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,12 @@ export class SuggestFixTool extends RepoToolBase<IssueToolParameters> {
messages.push(vscode.LanguageModelChatMessage.User(`Comment ${index}: ${comment.body}`));
});

const copilotCodebaseResult = await vscode.lm.invokeTool('copilot_searchCodebase', {
const codeSearchTool = vscode.lm.tools.find(value => value.tags.includes('vscode_codesearch'));
if (!codeSearchTool) {
throw new Error('Could not find the code search tool');
}

const copilotCodebaseResult = await vscode.lm.invokeTool(codeSearchTool.name, {
toolInvocationToken: undefined,
input: {
query: result.title
Expand Down

0 comments on commit b120817

Please sign in to comment.