Skip to content

Commit 001d38c

Browse files
author
Merge Resolver
committed
fix(chat): add Missing Required Parameter title mapping for tool arg errors and tests
- Map "Roo tried to use ... without value for required parameter" to 'Missing Required Parameter' - Keep existing 'Invalid Tool Arguments' mapping - Add unit test covering the exact screenshot string - No backend changes; only ChatView title extraction
1 parent a3b3446 commit 001d38c

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

webview-ui/src/utils/__tests__/errorTitleExtractor.spec.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -226,6 +226,11 @@ describe("extractErrorTitle", () => {
226226
expect(extractErrorTitle(error, mockT)).toBe("Invalid Tool Arguments")
227227
})
228228

229+
it("should handle missing required parameter tool error", () => {
230+
const error = "Roo tried to use apply_diff without value for required parameter 'path'. Retrying..."
231+
expect(extractErrorTitle(error, mockT)).toBe("Missing Required Parameter")
232+
})
233+
229234
it("should handle file not found error from actual code", () => {
230235
const error =
231236
"File does not exist at path: /Users/test/project/src/app.ts\n\n<error_details>\nThe specified file could not be found. Please verify the file path and try again.\n</error_details>"

webview-ui/src/utils/errorTitleExtractor.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,17 @@ export function extractErrorTitle(errorContent: string, t: TFunction): string {
103103
pattern: /^Failed to apply diff:/i,
104104
title: "Diff Application Failed",
105105
},
106+
// Roo chat errors generated when tool args are missing/invalid
107+
{
108+
// Example: Roo tried to use apply_diff without value for required parameter 'path'. Retrying...
109+
pattern: /^Roo tried to use .+ without value for required parameter ['"][^'"]+['"]/i,
110+
title: "Missing Required Parameter",
111+
},
112+
{
113+
// Fallback without quoting the param
114+
pattern: /^Roo tried to use .+ without value for required parameter/i,
115+
title: "Missing Required Parameter",
116+
},
106117
]
107118

108119
// API and service error patterns

0 commit comments

Comments
 (0)