Skip to content

Commit afbf174

Browse files
authored
Add telemetry for consecutive mistake error (#2649)
1 parent 84c574c commit afbf174

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

src/core/Cline.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1758,6 +1758,9 @@ export class Cline extends EventEmitter<ClineEvents> {
17581758
...formatResponse.imageBlocks(images),
17591759
],
17601760
)
1761+
1762+
// Track consecutive mistake errors in telemetry
1763+
telemetryService.captureConsecutiveMistakeError(this.taskId)
17611764
}
17621765
this.consecutiveMistakeCount = 0
17631766
}

src/services/telemetry/TelemetryService.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ class PostHogClient {
3131
ERRORS: {
3232
SCHEMA_VALIDATION_ERROR: "Schema Validation Error",
3333
DIFF_APPLICATION_ERROR: "Diff Application Error",
34+
CONSECUTIVE_MISTAKE_ERROR: "Consecutive Mistake Error",
3435
},
3536
}
3637

@@ -281,6 +282,12 @@ class TelemetryService {
281282
})
282283
}
283284

285+
public captureConsecutiveMistakeError(taskId: string): void {
286+
this.captureEvent(PostHogClient.EVENTS.ERRORS.CONSECUTIVE_MISTAKE_ERROR, {
287+
taskId,
288+
})
289+
}
290+
284291
/**
285292
* Checks if telemetry is currently enabled
286293
* @returns Whether telemetry is enabled

0 commit comments

Comments
 (0)