Skip to content

Commit 9d761e2

Browse files
authored
Add consecutive mistake count to diff error telemetry (RooCodeInc#2687)
1 parent 1d029ed commit 9d761e2

File tree

3 files changed

+8
-2
lines changed

3 files changed

+8
-2
lines changed

.changeset/fair-donuts-wash.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"roo-cline": patch
3+
---
4+
5+
Add consecutive mistake count to diff error telemetry

src/core/tools/applyDiffTool.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ export async function applyDiffTool(
9090
cline.consecutiveMistakeCountForApplyDiff.set(relPath, currentCount)
9191
let formattedError = ""
9292

93-
telemetryService.captureDiffApplicationError(cline.taskId)
93+
telemetryService.captureDiffApplicationError(cline.taskId, currentCount)
9494

9595
if (diffResult.failParts && diffResult.failParts.length > 0) {
9696
for (const failPart of diffResult.failParts) {

src/services/telemetry/TelemetryService.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -290,9 +290,10 @@ class TelemetryService {
290290
})
291291
}
292292

293-
public captureDiffApplicationError(taskId: string): void {
293+
public captureDiffApplicationError(taskId: string, consecutiveMistakeCount: number): void {
294294
this.captureEvent(PostHogClient.EVENTS.ERRORS.DIFF_APPLICATION_ERROR, {
295295
taskId,
296+
consecutiveMistakeCount,
296297
})
297298
}
298299

0 commit comments

Comments
 (0)