diff --git a/src/core/tools/codebaseSearchTool.ts b/src/core/tools/codebaseSearchTool.ts index c6012f9f0f..236b066306 100644 --- a/src/core/tools/codebaseSearchTool.ts +++ b/src/core/tools/codebaseSearchTool.ts @@ -29,11 +29,6 @@ export async function codebaseSearchTool( let query: string | undefined = block.params.query let directoryPrefix: string | undefined = block.params.path - if (!query) { - cline.consecutiveMistakeCount++ - pushToolResult(await cline.sayAndCreateMissingParamError(toolName, "query")) - return - } query = removeClosingTag("query", query) if (directoryPrefix) { @@ -41,16 +36,25 @@ export async function codebaseSearchTool( directoryPrefix = path.normalize(directoryPrefix) } - // Extract optional sendResultsToUI parameter - - const approvalPayload = { + const sharedMessageProps = { tool: "codebaseSearch", query: query, path: directoryPrefix, isOutsideWorkspace: false, } - const didApprove = await askApproval("tool", JSON.stringify(approvalPayload)) + if (block.partial) { + await cline.ask("tool", JSON.stringify(sharedMessageProps), block.partial).catch(() => {}) + return + } + + if (!query) { + cline.consecutiveMistakeCount++ + pushToolResult(await cline.sayAndCreateMissingParamError(toolName, "query")) + return + } + + const didApprove = await askApproval("tool", JSON.stringify(sharedMessageProps)) if (!didApprove) { pushToolResult(formatResponse.toolDenied()) return diff --git a/webview-ui/src/components/chat/ChatRow.tsx b/webview-ui/src/components/chat/ChatRow.tsx index 5c697a5a57..f9522901b7 100644 --- a/webview-ui/src/components/chat/ChatRow.tsx +++ b/webview-ui/src/components/chat/ChatRow.tsx @@ -357,12 +357,19 @@ export const ChatRowContent = ({
{toolIcon("search")} - {tool.path - ? t("chat:codebaseSearch.wantsToSearchWithPath", { - query: tool.query, - path: tool.path, - }) - : t("chat:codebaseSearch.wantsToSearch", { query: tool.query })} + {tool.path ? ( + }} + values={{ query: tool.query, path: tool.path }} + /> + ) : ( + }} + values={{ query: tool.query }} + /> + )}
) diff --git a/webview-ui/src/i18n/locales/ca/chat.json b/webview-ui/src/i18n/locales/ca/chat.json index 5ce0559106..4810bd674f 100644 --- a/webview-ui/src/i18n/locales/ca/chat.json +++ b/webview-ui/src/i18n/locales/ca/chat.json @@ -262,8 +262,8 @@ } }, "codebaseSearch": { - "wantsToSearch": "Roo vol cercar a la base de codi '{{query}}':", - "wantsToSearchWithPath": "Roo vol cercar a la base de codi '{{query}}' a '{{path}}':", - "didSearch": "S'han trobat {{count}} resultat(s) per a '{{query}}':" + "wantsToSearch": "Roo vol cercar a la base de codi {{query}}:", + "wantsToSearchWithPath": "Roo vol cercar a la base de codi {{query}} a {{path}}:", + "didSearch": "S'han trobat {{count}} resultat(s) per a {{query}}:" } } diff --git a/webview-ui/src/i18n/locales/de/chat.json b/webview-ui/src/i18n/locales/de/chat.json index 2d291a6324..497d51824a 100644 --- a/webview-ui/src/i18n/locales/de/chat.json +++ b/webview-ui/src/i18n/locales/de/chat.json @@ -262,8 +262,8 @@ } }, "codebaseSearch": { - "wantsToSearch": "Roo möchte den Codebase nach '{{query}}' durchsuchen:", - "wantsToSearchWithPath": "Roo möchte den Codebase nach '{{query}}' in '{{path}}' durchsuchen:", - "didSearch": "{{count}} Ergebnis(se) für '{{query}}' gefunden:" + "wantsToSearch": "Roo möchte den Codebase nach {{query}} durchsuchen:", + "wantsToSearchWithPath": "Roo möchte den Codebase nach {{query}} in {{path}} durchsuchen:", + "didSearch": "{{count}} Ergebnis(se) für {{query}} gefunden:" } } diff --git a/webview-ui/src/i18n/locales/en/chat.json b/webview-ui/src/i18n/locales/en/chat.json index 7f8516fa0f..3c133c40e8 100644 --- a/webview-ui/src/i18n/locales/en/chat.json +++ b/webview-ui/src/i18n/locales/en/chat.json @@ -162,9 +162,9 @@ "didSearch": "Roo searched this directory for {{regex}}:" }, "codebaseSearch": { - "wantsToSearch": "Roo wants to search the codebase for '{{query}}':", - "wantsToSearchWithPath": "Roo wants to search the codebase for '{{query}}' in '{{path}}':", - "didSearch": "Found {{count}} result(s) for '{{query}}':" + "wantsToSearch": "Roo wants to search the codebase for {{query}}:", + "wantsToSearchWithPath": "Roo wants to search the codebase for {{query}} in {{path}}:", + "didSearch": "Found {{count}} result(s) for {{query}}:" }, "commandOutput": "Command Output", "response": "Response", diff --git a/webview-ui/src/i18n/locales/es/chat.json b/webview-ui/src/i18n/locales/es/chat.json index 491a7fbeb9..d0b3115466 100644 --- a/webview-ui/src/i18n/locales/es/chat.json +++ b/webview-ui/src/i18n/locales/es/chat.json @@ -262,8 +262,8 @@ } }, "codebaseSearch": { - "wantsToSearch": "Roo quiere buscar en la base de código '{{query}}':", - "wantsToSearchWithPath": "Roo quiere buscar en la base de código '{{query}}' en '{{path}}':", - "didSearch": "Se encontraron {{count}} resultado(s) para '{{query}}':" + "wantsToSearch": "Roo quiere buscar en la base de código {{query}}:", + "wantsToSearchWithPath": "Roo quiere buscar en la base de código {{query}} en {{path}}:", + "didSearch": "Se encontraron {{count}} resultado(s) para {{query}}:" } } diff --git a/webview-ui/src/i18n/locales/fr/chat.json b/webview-ui/src/i18n/locales/fr/chat.json index d2e585f034..ce03487272 100644 --- a/webview-ui/src/i18n/locales/fr/chat.json +++ b/webview-ui/src/i18n/locales/fr/chat.json @@ -262,8 +262,8 @@ } }, "codebaseSearch": { - "wantsToSearch": "Roo veut rechercher dans la base de code '{{query}}' :", - "wantsToSearchWithPath": "Roo veut rechercher dans la base de code '{{query}}' dans '{{path}}' :", - "didSearch": "{{count}} résultat(s) trouvé(s) pour '{{query}}' :" + "wantsToSearch": "Roo veut rechercher dans la base de code {{query}} :", + "wantsToSearchWithPath": "Roo veut rechercher dans la base de code {{query}} dans {{path}} :", + "didSearch": "{{count}} résultat(s) trouvé(s) pour {{query}} :" } } diff --git a/webview-ui/src/i18n/locales/hi/chat.json b/webview-ui/src/i18n/locales/hi/chat.json index 15b0f3f306..26c94b8574 100644 --- a/webview-ui/src/i18n/locales/hi/chat.json +++ b/webview-ui/src/i18n/locales/hi/chat.json @@ -262,8 +262,8 @@ } }, "codebaseSearch": { - "wantsToSearch": "Roo कोडबेस में '{{query}}' खोजना चाहता है:", - "wantsToSearchWithPath": "Roo '{{path}}' में कोडबेस में '{{query}}' खोजना चाहता है:", - "didSearch": "'{{query}}' के लिए {{count}} परिणाम मिले:" + "wantsToSearch": "Roo कोडबेस में {{query}} खोजना चाहता है:", + "wantsToSearchWithPath": "Roo {{path}} में कोडबेस में {{query}} खोजना चाहता है:", + "didSearch": "{{query}} के लिए {{count}} परिणाम मिले:" } } diff --git a/webview-ui/src/i18n/locales/it/chat.json b/webview-ui/src/i18n/locales/it/chat.json index 6472ccf7df..c334bd3359 100644 --- a/webview-ui/src/i18n/locales/it/chat.json +++ b/webview-ui/src/i18n/locales/it/chat.json @@ -262,8 +262,8 @@ } }, "codebaseSearch": { - "wantsToSearch": "Roo vuole cercare nella base di codice '{{query}}':", - "wantsToSearchWithPath": "Roo vuole cercare nella base di codice '{{query}}' in '{{path}}':", - "didSearch": "Trovato {{count}} risultato/i per '{{query}}':" + "wantsToSearch": "Roo vuole cercare nella base di codice {{query}}:", + "wantsToSearchWithPath": "Roo vuole cercare nella base di codice {{query}} in {{path}}:", + "didSearch": "Trovato {{count}} risultato/i per {{query}}:" } } diff --git a/webview-ui/src/i18n/locales/ja/chat.json b/webview-ui/src/i18n/locales/ja/chat.json index e5e35cf115..c09ed2bc99 100644 --- a/webview-ui/src/i18n/locales/ja/chat.json +++ b/webview-ui/src/i18n/locales/ja/chat.json @@ -262,8 +262,8 @@ } }, "codebaseSearch": { - "wantsToSearch": "Rooはコードベースで '{{query}}' を検索したい:", - "wantsToSearchWithPath": "Rooは '{{path}}' 内のコードベースで '{{query}}' を検索したい:", - "didSearch": "'{{query}}' の検索結果: {{count}} 件" + "wantsToSearch": "Rooはコードベースで {{query}} を検索したい:", + "wantsToSearchWithPath": "Rooは {{path}} 内のコードベースで {{query}} を検索したい:", + "didSearch": "{{query}} の検索結果: {{count}} 件" } } diff --git a/webview-ui/src/i18n/locales/ko/chat.json b/webview-ui/src/i18n/locales/ko/chat.json index 6fd1b96ed3..6c2a6de5c7 100644 --- a/webview-ui/src/i18n/locales/ko/chat.json +++ b/webview-ui/src/i18n/locales/ko/chat.json @@ -262,8 +262,8 @@ } }, "codebaseSearch": { - "wantsToSearch": "Roo가 코드베이스에서 '{{query}}'을(를) 검색하고 싶어합니다:", - "wantsToSearchWithPath": "Roo가 '{{path}}'에서 '{{query}}'을(를) 검색하고 싶어합니다:", - "didSearch": "'{{query}}'에 대한 검색 결과 {{count}}개 찾음:" + "wantsToSearch": "Roo가 코드베이스에서 {{query}}을(를) 검색하고 싶어합니다:", + "wantsToSearchWithPath": "Roo가 {{path}}에서 {{query}}을(를) 검색하고 싶어합니다:", + "didSearch": "{{query}}에 대한 검색 결과 {{count}}개 찾음:" } } diff --git a/webview-ui/src/i18n/locales/nl/chat.json b/webview-ui/src/i18n/locales/nl/chat.json index 10c92a3971..ac49525769 100644 --- a/webview-ui/src/i18n/locales/nl/chat.json +++ b/webview-ui/src/i18n/locales/nl/chat.json @@ -262,8 +262,8 @@ } }, "codebaseSearch": { - "wantsToSearch": "Roo wil de codebase doorzoeken op '{{query}}':", - "wantsToSearchWithPath": "Roo wil de codebase doorzoeken op '{{query}}' in '{{path}}':", - "didSearch": "{{count}} resultaat/resultaten gevonden voor '{{query}}':" + "wantsToSearch": "Roo wil de codebase doorzoeken op {{query}}:", + "wantsToSearchWithPath": "Roo wil de codebase doorzoeken op {{query}} in {{path}}:", + "didSearch": "{{count}} resultaat/resultaten gevonden voor {{query}}:" } } diff --git a/webview-ui/src/i18n/locales/pl/chat.json b/webview-ui/src/i18n/locales/pl/chat.json index ed44bb6bf6..f6e666ad48 100644 --- a/webview-ui/src/i18n/locales/pl/chat.json +++ b/webview-ui/src/i18n/locales/pl/chat.json @@ -262,8 +262,8 @@ } }, "codebaseSearch": { - "wantsToSearch": "Roo chce przeszukać bazę kodu w poszukiwaniu '{{query}}':", - "wantsToSearchWithPath": "Roo chce przeszukać bazę kodu w poszukiwaniu '{{query}}' w '{{path}}':", - "didSearch": "Znaleziono {{count}} wynik(ów) dla '{{query}}':" + "wantsToSearch": "Roo chce przeszukać bazę kodu w poszukiwaniu {{query}}:", + "wantsToSearchWithPath": "Roo chce przeszukać bazę kodu w poszukiwaniu {{query}} w {{path}}:", + "didSearch": "Znaleziono {{count}} wynik(ów) dla {{query}}:" } } diff --git a/webview-ui/src/i18n/locales/pt-BR/chat.json b/webview-ui/src/i18n/locales/pt-BR/chat.json index 23efad9a4a..6e9dd94326 100644 --- a/webview-ui/src/i18n/locales/pt-BR/chat.json +++ b/webview-ui/src/i18n/locales/pt-BR/chat.json @@ -262,8 +262,8 @@ } }, "codebaseSearch": { - "wantsToSearch": "Roo quer pesquisar na base de código por '{{query}}':", - "wantsToSearchWithPath": "Roo quer pesquisar na base de código por '{{query}}' em '{{path}}':", - "didSearch": "Encontrado {{count}} resultado(s) para '{{query}}':" + "wantsToSearch": "Roo quer pesquisar na base de código por {{query}}:", + "wantsToSearchWithPath": "Roo quer pesquisar na base de código por {{query}} em {{path}}:", + "didSearch": "Encontrado {{count}} resultado(s) para {{query}}:" } } diff --git a/webview-ui/src/i18n/locales/ru/chat.json b/webview-ui/src/i18n/locales/ru/chat.json index 1e44aa5fe6..8046374211 100644 --- a/webview-ui/src/i18n/locales/ru/chat.json +++ b/webview-ui/src/i18n/locales/ru/chat.json @@ -262,8 +262,8 @@ } }, "codebaseSearch": { - "wantsToSearch": "Roo хочет выполнить поиск в кодовой базе по '{{query}}':", - "wantsToSearchWithPath": "Roo хочет выполнить поиск в кодовой базе по '{{query}}' в '{{path}}':", - "didSearch": "Найдено {{count}} результат(ов) для '{{query}}':" + "wantsToSearch": "Roo хочет выполнить поиск в кодовой базе по {{query}}:", + "wantsToSearchWithPath": "Roo хочет выполнить поиск в кодовой базе по {{query}} в {{path}}:", + "didSearch": "Найдено {{count}} результат(ов) для {{query}}:" } } diff --git a/webview-ui/src/i18n/locales/tr/chat.json b/webview-ui/src/i18n/locales/tr/chat.json index 91cd0794f9..c7542d1973 100644 --- a/webview-ui/src/i18n/locales/tr/chat.json +++ b/webview-ui/src/i18n/locales/tr/chat.json @@ -262,8 +262,8 @@ } }, "codebaseSearch": { - "wantsToSearch": "Roo kod tabanında '{{query}}' aramak istiyor:", - "wantsToSearchWithPath": "Roo '{{path}}' içinde kod tabanında '{{query}}' aramak istiyor:", - "didSearch": "'{{query}}' için {{count}} sonuç bulundu:" + "wantsToSearch": "Roo kod tabanında {{query}} aramak istiyor:", + "wantsToSearchWithPath": "Roo {{path}} içinde kod tabanında {{query}} aramak istiyor:", + "didSearch": "{{query}} için {{count}} sonuç bulundu:" } } diff --git a/webview-ui/src/i18n/locales/vi/chat.json b/webview-ui/src/i18n/locales/vi/chat.json index c410bc85a3..bb3eecb98b 100644 --- a/webview-ui/src/i18n/locales/vi/chat.json +++ b/webview-ui/src/i18n/locales/vi/chat.json @@ -262,8 +262,8 @@ } }, "codebaseSearch": { - "wantsToSearch": "Roo muốn tìm kiếm trong cơ sở mã cho '{{query}}':", - "wantsToSearchWithPath": "Roo muốn tìm kiếm trong cơ sở mã cho '{{query}}' trong '{{path}}':", - "didSearch": "Đã tìm thấy {{count}} kết quả cho '{{query}}':" + "wantsToSearch": "Roo muốn tìm kiếm trong cơ sở mã cho {{query}}:", + "wantsToSearchWithPath": "Roo muốn tìm kiếm trong cơ sở mã cho {{query}} trong {{path}}:", + "didSearch": "Đã tìm thấy {{count}} kết quả cho {{query}}:" } } diff --git a/webview-ui/src/i18n/locales/zh-CN/chat.json b/webview-ui/src/i18n/locales/zh-CN/chat.json index 795c395935..a0adbadd87 100644 --- a/webview-ui/src/i18n/locales/zh-CN/chat.json +++ b/webview-ui/src/i18n/locales/zh-CN/chat.json @@ -262,8 +262,8 @@ } }, "codebaseSearch": { - "wantsToSearch": "Roo 需要搜索代码库: '{{query}}'", - "wantsToSearchWithPath": "Roo 需要在 '{{path}}' 中搜索: '{{query}}'", - "didSearch": "找到 {{count}} 个结果: '{{query}}'" + "wantsToSearch": "Roo 需要搜索代码库: {{query}}", + "wantsToSearchWithPath": "Roo 需要在 {{path}} 中搜索: {{query}}", + "didSearch": "找到 {{count}} 个结果: {{query}}" } } diff --git a/webview-ui/src/i18n/locales/zh-TW/chat.json b/webview-ui/src/i18n/locales/zh-TW/chat.json index 8b0e3dbd1e..be00f7674f 100644 --- a/webview-ui/src/i18n/locales/zh-TW/chat.json +++ b/webview-ui/src/i18n/locales/zh-TW/chat.json @@ -262,8 +262,8 @@ } }, "codebaseSearch": { - "wantsToSearch": "Roo 想要搜尋程式碼庫:「{{query}}」", - "wantsToSearchWithPath": "Roo 想要在「{{path}}」中搜尋:「{{query}}」", - "didSearch": "找到 {{count}} 個結果:「{{query}}」" + "wantsToSearch": "Roo 想要搜尋程式碼庫:{{query}}", + "wantsToSearchWithPath": "Roo 想要在 {{path}} 中搜尋:{{query}}", + "didSearch": "找到 {{count}} 個結果:{{query}}" } }