File tree Expand file tree Collapse file tree 2 files changed +11
-0
lines changed
Expand file tree Collapse file tree 2 files changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ import { addLineNumbers } from "../../integrations/misc/extract-text"
1010import path from "path"
1111import fs from "fs/promises"
1212import { RecordSource } from "../context-tracking/FileContextTrackerTypes"
13+ import { telemetryService } from "../../services/telemetry/TelemetryService"
1314
1415export async function applyDiffTool (
1516 cline : Cline ,
@@ -88,6 +89,9 @@ export async function applyDiffTool(
8889 const currentCount = ( cline . consecutiveMistakeCountForApplyDiff . get ( relPath ) || 0 ) + 1
8990 cline . consecutiveMistakeCountForApplyDiff . set ( relPath , currentCount )
9091 let formattedError = ""
92+
93+ telemetryService . captureDiffApplicationError ( cline . taskId )
94+
9195 if ( diffResult . failParts && diffResult . failParts . length > 0 ) {
9296 for ( const failPart of diffResult . failParts ) {
9397 if ( failPart . success ) {
Original file line number Diff line number Diff line change @@ -30,6 +30,7 @@ class PostHogClient {
3030 } ,
3131 ERRORS : {
3232 SCHEMA_VALIDATION_ERROR : "Schema Validation Error" ,
33+ DIFF_APPLICATION_ERROR : "Diff Application Error" ,
3334 } ,
3435 }
3536
@@ -274,6 +275,12 @@ class TelemetryService {
274275 } )
275276 }
276277
278+ public captureDiffApplicationError ( taskId : string ) : void {
279+ this . captureEvent ( PostHogClient . EVENTS . ERRORS . DIFF_APPLICATION_ERROR , {
280+ taskId,
281+ } )
282+ }
283+
277284 /**
278285 * Checks if telemetry is currently enabled
279286 * @returns Whether telemetry is enabled
You can’t perform that action at this time.
0 commit comments