diff --git a/src/core/task/index.ts b/src/core/task/index.ts index 16c2c12542..aaaf8e9c71 100644 --- a/src/core/task/index.ts +++ b/src/core/task/index.ts @@ -1916,7 +1916,7 @@ export class Task { : "other_diff_error" // Add telemetry for diff edit failure - telemetryService.captureDiffEditFailure(this.taskId, errorType) + telemetryService.captureDiffEditFailure(this.taskId, this.api.getModel().id, errorType) pushToolResult( formatResponse.toolError( diff --git a/src/services/posthog/telemetry/TelemetryService.ts b/src/services/posthog/telemetry/TelemetryService.ts index 3477d567b3..d0a87e2789 100644 --- a/src/services/posthog/telemetry/TelemetryService.ts +++ b/src/services/posthog/telemetry/TelemetryService.ts @@ -512,13 +512,14 @@ class PostHogClient { * @param taskId Unique identifier for the task * @param errorType Type of error that occurred (e.g., "search_not_found", "invalid_format") */ - public captureDiffEditFailure(taskId: string, errorType?: string, collect: boolean = false) { + public captureDiffEditFailure(taskId: string, modelId: string, errorType?: string, collect: boolean = false) { this.capture( { event: PostHogClient.EVENTS.TASK.DIFF_EDIT_FAILED, properties: { taskId, errorType, + modelId, }, }, collect,