mirror of
https://github.com/RooVetGit/Roo-Code.git
synced 2026-08-28 05:27:24 +00:00
Add telemetry for prompt enhancement (#2651)
This commit is contained in:
parent
31fd6e1470
commit
5f19ea4a06
2 changed files with 11 additions and 0 deletions
|
|
@ -1020,6 +1020,10 @@ export const webviewMessageHandler = async (provider: ClineProvider, message: We
|
|||
),
|
||||
)
|
||||
|
||||
// Capture telemetry for prompt enhancement
|
||||
const currentCline = provider.getCurrentCline()
|
||||
telemetryService.capturePromptEnhanced(currentCline?.taskId)
|
||||
|
||||
await provider.postMessageToWebview({
|
||||
type: "enhancedPrompt",
|
||||
text: enhancedPrompt,
|
||||
|
|
|
|||
|
|
@ -28,6 +28,7 @@ class PostHogClient {
|
|||
CHECKPOINT_RESTORED: "Checkpoint Restored",
|
||||
CHECKPOINT_DIFFED: "Checkpoint Diffed",
|
||||
CODE_ACTION_USED: "Code Action Used",
|
||||
PROMPT_ENHANCED: "Prompt Enhanced",
|
||||
},
|
||||
ERRORS: {
|
||||
SCHEMA_VALIDATION_ERROR: "Schema Validation Error",
|
||||
|
|
@ -275,6 +276,12 @@ class TelemetryService {
|
|||
})
|
||||
}
|
||||
|
||||
public capturePromptEnhanced(taskId?: string): void {
|
||||
this.captureEvent(PostHogClient.EVENTS.TASK.PROMPT_ENHANCED, {
|
||||
...(taskId && { taskId }),
|
||||
})
|
||||
}
|
||||
|
||||
public captureSchemaValidationError({ schemaName, error }: { schemaName: string; error: ZodError }): void {
|
||||
this.captureEvent(PostHogClient.EVENTS.ERRORS.SCHEMA_VALIDATION_ERROR, {
|
||||
schemaName,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue