Add consecutive mistake count to diff error telemetry (#2687)

This commit is contained in:
Matt Rubens 2025-04-16 12:02:49 -04:00 committed by GitHub
parent 1d029ed0cb
commit 9d761e23e2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 8 additions and 2 deletions

View file

@ -0,0 +1,5 @@
---
"roo-cline": patch
---
Add consecutive mistake count to diff error telemetry

View file

@ -90,7 +90,7 @@ export async function applyDiffTool(
cline.consecutiveMistakeCountForApplyDiff.set(relPath, currentCount)
let formattedError = ""
telemetryService.captureDiffApplicationError(cline.taskId)
telemetryService.captureDiffApplicationError(cline.taskId, currentCount)
if (diffResult.failParts && diffResult.failParts.length > 0) {
for (const failPart of diffResult.failParts) {

View file

@ -290,9 +290,10 @@ class TelemetryService {
})
}
public captureDiffApplicationError(taskId: string): void {
public captureDiffApplicationError(taskId: string, consecutiveMistakeCount: number): void {
this.captureEvent(PostHogClient.EVENTS.ERRORS.DIFF_APPLICATION_ERROR, {
taskId,
consecutiveMistakeCount,
})
}