mirror of
https://github.com/RooVetGit/Roo-Code.git
synced 2026-09-07 08:26:51 +00:00
fix(tools): Resolve intermittent hangs and lack of clear error feedback in apply_diff tool (#5391)
* fix(tools): Resolve intermittent hangs and lack of clear error feedback in apply_diff tool (#5390) * fix: show user-friendly error message for XML parsing failures - Keep detailed XML structure instructions only for LLM via pushToolResult - Show simple error message to user via cline.say - Aligns with established error handling pattern in codebase * feat: add telemetry for XML parsing errors - Track XML parsing errors using captureDiffApplicationError - Include consecutive mistake count for better error analysis - Helps monitor and debug XML parsing issues in production --------- Co-authored-by: Example User <user@example.com> Co-authored-by: Daniel Riccio <ricciodaniel98@gmail.com>
This commit is contained in:
parent
7ae74404f4
commit
8e7d9e092d
1 changed files with 6 additions and 1 deletions
|
|
@ -159,7 +159,12 @@ Expected structure:
|
|||
</args>
|
||||
|
||||
Original error: ${errorMessage}`
|
||||
throw new Error(detailedError)
|
||||
cline.consecutiveMistakeCount++
|
||||
cline.recordToolError("apply_diff")
|
||||
TelemetryService.instance.captureDiffApplicationError(cline.taskId, cline.consecutiveMistakeCount)
|
||||
await cline.say("diff_error", `Failed to parse apply_diff XML: ${errorMessage}`)
|
||||
pushToolResult(detailedError)
|
||||
return
|
||||
}
|
||||
} else if (legacyPath && typeof legacyDiffContent === "string") {
|
||||
// Handle legacy parameters (old way)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue