From e6b5718846c6f15c6f49aa823b131f39e89f8bcc Mon Sep 17 00:00:00 2001 From: Chung Nguyen <15166543+ChuKhaLi@users.noreply.github.com> Date: Thu, 29 May 2025 03:22:04 +0700 Subject: [PATCH 1/2] Update codebase search description to emphasize English query requirement --- src/core/prompts/tools/codebase-search.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/prompts/tools/codebase-search.ts b/src/core/prompts/tools/codebase-search.ts index 81eaacae85..19d3397872 100644 --- a/src/core/prompts/tools/codebase-search.ts +++ b/src/core/prompts/tools/codebase-search.ts @@ -1,6 +1,6 @@ export function getCodebaseSearchDescription(): string { return `## codebase_search -Description: Find files most relevant to the search query.\nThis is a semantic search tool, so the query should ask for something semantically matching what is needed.\nIf it makes sense to only search in a particular directory, please specify it in the path parameter.\nUnless there is a clear reason to use your own search query, please just reuse the user's exact query with their wording.\nTheir exact wording/phrasing can often be helpful for the semantic search query. Keeping the same exact question format can also be helpful. +Description: Find files most relevant to the search query.\nThis is a semantic search tool, so the query should ask for something semantically matching what is needed.\nIf it makes sense to only search in a particular directory, please specify it in the path parameter.\nUnless there is a clear reason to use your own search query, please just reuse the user's exact query with their wording.\nTheir exact wording/phrasing can often be helpful for the semantic search query. Keeping the same exact question format can also be helpful.\nIMPORTANT: The search query MUST be in English to ensure accurate semantic matching with the codebase, which is in English. If the user's query is in a different language, translate it to English before performing the search. Parameters: - query: (required) The search query to find relevant code. You should reuse the user's exact query/most recent message with their wording unless there is a clear reason not to. - path: (optional) The path to the directory to search in relative to the current working directory. This parameter should only be a directory path, file paths are not supported. Defaults to the current working directory. From 024e7fffde910b680125cad2bacd1e34d154867c Mon Sep 17 00:00:00 2001 From: Daniel <57051444+daniel-lxs@users.noreply.github.com> Date: Wed, 28 May 2025 16:50:49 -0500 Subject: [PATCH 2/2] refactor: improve the wording --- src/core/prompts/tools/codebase-search.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/prompts/tools/codebase-search.ts b/src/core/prompts/tools/codebase-search.ts index 19d3397872..0fc8f68f8e 100644 --- a/src/core/prompts/tools/codebase-search.ts +++ b/src/core/prompts/tools/codebase-search.ts @@ -1,6 +1,6 @@ export function getCodebaseSearchDescription(): string { return `## codebase_search -Description: Find files most relevant to the search query.\nThis is a semantic search tool, so the query should ask for something semantically matching what is needed.\nIf it makes sense to only search in a particular directory, please specify it in the path parameter.\nUnless there is a clear reason to use your own search query, please just reuse the user's exact query with their wording.\nTheir exact wording/phrasing can often be helpful for the semantic search query. Keeping the same exact question format can also be helpful.\nIMPORTANT: The search query MUST be in English to ensure accurate semantic matching with the codebase, which is in English. If the user's query is in a different language, translate it to English before performing the search. +Description: Find files most relevant to the search query.\nThis is a semantic search tool, so the query should ask for something semantically matching what is needed.\nIf it makes sense to only search in a particular directory, please specify it in the path parameter.\nUnless there is a clear reason to use your own search query, please just reuse the user's exact query with their wording.\nTheir exact wording/phrasing can often be helpful for the semantic search query. Keeping the same exact question format can also be helpful.\nIMPORTANT: Queries MUST be in English. Translate non-English queries before searching. Parameters: - query: (required) The search query to find relevant code. You should reuse the user's exact query/most recent message with their wording unless there is a clear reason not to. - path: (optional) The path to the directory to search in relative to the current working directory. This parameter should only be a directory path, file paths are not supported. Defaults to the current working directory.