You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Added new error message keys to English locale files (tools.json and common.json)
- Replaced hardcoded 'Roo tried to use' messages with i18n calls
- Replaced other hardcoded error messages in say('error') calls
- Updated test mocks to handle new i18n keys
- Affected files:
- Task.ts: Lines 1058, 2140
- writeToFileTool.ts: Line 148
- askFollowupQuestionTool.ts: Line 51
- applyDiffTool.ts: Line 86
- searchAndReplaceTool.ts: Lines 140, 159
- insertContentTool.ts: Line 90
- presentAssistantMessage.ts: Line 318
- useMcpToolTool.spec.ts: Test mock update
This change ensures all error messages can be properly translated to the 17+ languages supported by Roo Code.
@@ -82,7 +83,7 @@ export async function applyDiffToolLegacy(
82
83
if(!fileExists){
83
84
cline.consecutiveMistakeCount++
84
85
cline.recordToolError("apply_diff")
85
-
constformattedError=`File does not exist at path: ${absolutePath}\n\n<error_details>\nThe specified file could not be found. Please verify the file path and try again.\n</error_details>`
@@ -86,7 +87,7 @@ export async function insertContentTool(
86
87
if(lineNumber>1){
87
88
cline.consecutiveMistakeCount++
88
89
cline.recordToolError("insert_content")
89
-
constformattedError=`Cannot insert content at line ${lineNumber} into a non-existent file. For new files, 'line' must be 0 (to append) or 1 (to insert at the beginning).`
Copy file name to clipboardExpand all lines: src/i18n/locales/en/common.json
+2-1Lines changed: 2 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -103,7 +103,8 @@
103
103
},
104
104
"roo": {
105
105
"authenticationRequired": "Roo provider requires cloud authentication. Please sign in to Roo Code Cloud."
106
-
}
106
+
},
107
+
"unexpectedApiResponse": "Unexpected API Response: The language model did not provide any assistant messages. This may indicate an issue with the API or the model's output."
107
108
},
108
109
"warnings": {
109
110
"no_terminal_content": "No terminal content selected",
Copy file name to clipboardExpand all lines: src/i18n/locales/en/tools.json
+13Lines changed: 13 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -14,5 +14,18 @@
14
14
"errors": {
15
15
"policy_restriction": "Failed to create new task due to policy restrictions."
16
16
}
17
+
},
18
+
"errors": {
19
+
"missingRequiredParameter": {
20
+
"withPath": "Roo tried to use {{toolName}} for '{{relPath}}' without value for required parameter '{{paramName}}'. Retrying...",
21
+
"withoutPath": "Roo tried to use {{toolName}} without value for required parameter '{{paramName}}'. Retrying..."
22
+
},
23
+
"lineCountMissing": "Roo tried to use write_to_file{{relPath}} but the required parameter 'line_count' was missing or truncated after {{actualLineCount}} lines of content were written. Retrying...",
24
+
"parseOperationsFailed": "Failed to parse operations: {{error}}",
25
+
"fileNotFound": "File does not exist at path: {{path}}\n\n<error_details>\nThe specified file could not be found. Please verify the file path and try again.\n</error_details>",
26
+
"fileNotFoundSimple": "File does not exist at path: {{path}}\nThe specified file could not be found. Please verify the file path and try again.",
27
+
"fileReadError": "Error reading file: {{path}}\nFailed to read the file content: {{error}}\nPlease verify file permissions and try again.",
28
+
"insertContentNewFile": "Cannot insert content at line {{lineNumber}} into a non-existent file. For new files, 'line' must be 0 (to append) or 1 (to insert at the beginning).",
0 commit comments