Skip to content

Commit 9923b7c

Browse files
committed
stupid translation fix
1 parent e2b13a6 commit 9923b7c

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

src/core/tools/__tests__/readFileTool.spec.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,7 @@ describe("read_file tool with maxReadFileLine setting", () => {
246246
expect(result).toContain(`<list_code_definition_names>`)
247247

248248
// Verify XML structure
249-
expect(result).toContain("<notice>tools.readFile.showingOnlyLines</notice>")
249+
expect(result).toContain("<notice>tools:readFile.showingOnlyLines</notice>")
250250
expect(result).toContain("<list_code_definition_names>")
251251
expect(result).toContain(sourceCodeDef.trim())
252252
expect(result).toContain("</list_code_definition_names>")
@@ -272,7 +272,7 @@ describe("read_file tool with maxReadFileLine setting", () => {
272272
expect(result).toContain(`<file><path>${testFilePath}</path>`)
273273
expect(result).toContain(`<content lines="1-3">`)
274274
expect(result).toContain(`<list_code_definition_names>`)
275-
expect(result).toContain("<notice>tools.readFile.showingOnlyLines</notice>")
275+
expect(result).toContain("<notice>tools:readFile.showingOnlyLines</notice>")
276276
})
277277
})
278278

@@ -568,7 +568,7 @@ describe("read_file tool XML output structure", () => {
568568
// Verify the result contains the inline instructions
569569
expect(result).toContain("<notice>")
570570
expect(result).toContain("File exceeds available context space")
571-
expect(result).toContain("tools.readFile.contextLimitInstructions</notice>")
571+
expect(result).toContain("tools:readFile.contextLimitInstructions</notice>")
572572
})
573573

574574
it("should not show any special notice when file fits in context", async () => {

src/core/tools/readFileTool.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -488,7 +488,7 @@ export async function readFileTool(
488488
try {
489489
const defResult = await parseSourceCodeDefinitionsForFile(fullPath, cline.rooIgnoreController)
490490
if (defResult) {
491-
let xmlInfo = `<notice>${t("tools.readFile.showingOnlyLines", { shown: effectiveMaxReadFileLine, total: totalLines })}</notice>\n`
491+
let xmlInfo = `<notice>${t("tools:readFile.showingOnlyLines", { shown: effectiveMaxReadFileLine, total: totalLines })}</notice>\n`
492492
updateFileResult(relPath, {
493493
xmlContent: `<file><path>${relPath}</path>\n<list_code_definition_names>${defResult}</list_code_definition_names>\n${xmlInfo}</file>`,
494494
})
@@ -520,10 +520,10 @@ export async function readFileTool(
520520
// Add appropriate notice based on whether this was a preemptive limit or user setting
521521
if (validationNotice) {
522522
// When shouldLimit is true, always provide inline instructions
523-
const instructions = t("tools.readFile.contextLimitInstructions", { path: relPath })
523+
const instructions = t("tools:readFile.contextLimitInstructions", { path: relPath })
524524
xmlInfo += `<notice>${validationNotice}\n\n${instructions}</notice>\n`
525525
} else {
526-
xmlInfo += `<notice>${t("tools.readFile.showingOnlyLines", { shown: effectiveMaxReadFileLine, total: totalLines })}</notice>\n`
526+
xmlInfo += `<notice>${t("tools:readFile.showingOnlyLines", { shown: effectiveMaxReadFileLine, total: totalLines })}</notice>\n`
527527
}
528528

529529
updateFileResult(relPath, {

0 commit comments

Comments
 (0)