diff --git a/src/core/tools/__tests__/readFileTool.spec.ts b/src/core/tools/__tests__/readFileTool.spec.ts index 37d9f3cafb..747e954f85 100644 --- a/src/core/tools/__tests__/readFileTool.spec.ts +++ b/src/core/tools/__tests__/readFileTool.spec.ts @@ -246,7 +246,7 @@ describe("read_file tool with maxReadFileLine setting", () => { expect(result).toContain(``) // Verify XML structure - expect(result).toContain("tools.readFile.showingOnlyLines") + expect(result).toContain("tools:readFile.showingOnlyLines") expect(result).toContain("") expect(result).toContain(sourceCodeDef.trim()) expect(result).toContain("") @@ -272,7 +272,7 @@ describe("read_file tool with maxReadFileLine setting", () => { expect(result).toContain(`${testFilePath}`) expect(result).toContain(``) expect(result).toContain(``) - expect(result).toContain("tools.readFile.showingOnlyLines") + expect(result).toContain("tools:readFile.showingOnlyLines") }) }) @@ -568,7 +568,7 @@ describe("read_file tool XML output structure", () => { // Verify the result contains the inline instructions expect(result).toContain("") expect(result).toContain("File exceeds available context space") - expect(result).toContain("tools.readFile.contextLimitInstructions") + expect(result).toContain("tools:readFile.contextLimitInstructions") }) it("should not show any special notice when file fits in context", async () => { diff --git a/src/core/tools/readFileTool.ts b/src/core/tools/readFileTool.ts index 88b44929cf..f1bbcb9149 100644 --- a/src/core/tools/readFileTool.ts +++ b/src/core/tools/readFileTool.ts @@ -488,7 +488,7 @@ export async function readFileTool( try { const defResult = await parseSourceCodeDefinitionsForFile(fullPath, cline.rooIgnoreController) if (defResult) { - let xmlInfo = `${t("tools.readFile.showingOnlyLines", { shown: effectiveMaxReadFileLine, total: totalLines })}\n` + let xmlInfo = `${t("tools:readFile.showingOnlyLines", { shown: effectiveMaxReadFileLine, total: totalLines })}\n` updateFileResult(relPath, { xmlContent: `${relPath}\n${defResult}\n${xmlInfo}`, }) @@ -520,10 +520,10 @@ export async function readFileTool( // Add appropriate notice based on whether this was a preemptive limit or user setting if (validationNotice) { // When shouldLimit is true, always provide inline instructions - const instructions = t("tools.readFile.contextLimitInstructions", { path: relPath }) + const instructions = t("tools:readFile.contextLimitInstructions", { path: relPath }) xmlInfo += `${validationNotice}\n\n${instructions}\n` } else { - xmlInfo += `${t("tools.readFile.showingOnlyLines", { shown: effectiveMaxReadFileLine, total: totalLines })}\n` + xmlInfo += `${t("tools:readFile.showingOnlyLines", { shown: effectiveMaxReadFileLine, total: totalLines })}\n` } updateFileResult(relPath, {