Skip to content

Commit 55be84c

Browse files
author
Example User
committed
fix(tools): Resolve intermittent hangs and lack of clear error feedback in apply_diff tool (#5390)
1 parent 7ae7440 commit 55be84c

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/core/tools/multiApplyDiffTool.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,11 @@ Expected structure:
159159
</args>
160160
161161
Original error: ${errorMessage}`
162-
throw new Error(detailedError)
162+
cline.consecutiveMistakeCount++
163+
cline.recordToolError("apply_diff")
164+
await cline.say("diff_error", detailedError)
165+
pushToolResult(detailedError)
166+
return
163167
}
164168
} else if (legacyPath && typeof legacyDiffContent === "string") {
165169
// Handle legacy parameters (old way)

0 commit comments

Comments
 (0)