@@ -3,8 +3,6 @@ import { z } from 'zod';
33// TODO: I'll add these types to our @roo-code/types NPM package so we
44// don't need to manually copy them.
55
6- // Copied from `src/schemas/index.ts`
7-
86export const providerNames = [
97 'anthropic' ,
108 'glama' ,
@@ -29,8 +27,6 @@ export const providerNames = [
2927 'litellm' ,
3028] as const ;
3129
32- // Copied from `src/services/telemetry/types.ts`
33-
3430export const appPropertiesSchema = z . object ( {
3531 appVersion : z . string ( ) ,
3632 vscodeVersion : z . string ( ) ,
@@ -56,23 +52,42 @@ export const completionPropertiesSchema = z.object({
5652 cost : z . number ( ) . optional ( ) ,
5753} ) ;
5854
59- // Copied from `src/services/cloud/types.ts`.
55+ export enum TelemetryEventName {
56+ TASK_CREATED = 'Task Created' ,
57+ TASK_RESTARTED = 'Task Reopened' ,
58+ TASK_COMPLETED = 'Task Completed' ,
59+ TASK_CONVERSATION_MESSAGE = 'Conversation Message' ,
60+ LLM_COMPLETION = 'LLM Completion' ,
61+ MODE_SWITCH = 'Mode Switched' ,
62+ TOOL_USED = 'Tool Used' ,
63+
64+ CHECKPOINT_CREATED = 'Checkpoint Created' ,
65+ CHECKPOINT_RESTORED = 'Checkpoint Restored' ,
66+ CHECKPOINT_DIFFED = 'Checkpoint Diffed' ,
67+
68+ CODE_ACTION_USED = 'Code Action Used' ,
69+ PROMPT_ENHANCED = 'Prompt Enhanced' ,
70+
71+ TITLE_BUTTON_CLICKED = 'Title Button Clicked' ,
72+
73+ AUTHENTICATION_INITIATED = 'Authentication Initiated' ,
6074
61- export enum CloudEventType {
62- TaskCreated = 'task_created' ,
63- Completion = 'completion' ,
75+ SCHEMA_VALIDATION_ERROR = 'Schema Validation Error' ,
76+ DIFF_APPLICATION_ERROR = 'Diff Application Error' ,
77+ SHELL_INTEGRATION_ERROR = 'Shell Integration Error' ,
78+ CONSECUTIVE_MISTAKE_ERROR = 'Consecutive Mistake Error' ,
6479}
6580
6681export const cloudEventSchema = z . discriminatedUnion ( 'type' , [
6782 z . object ( {
68- type : z . literal ( CloudEventType . TaskCreated ) ,
83+ type : z . literal ( TelemetryEventName . TASK_CREATED ) ,
6984 properties : z . object ( {
7085 ...appPropertiesSchema . shape ,
7186 ...taskPropertiesSchema . shape ,
7287 } ) ,
7388 } ) ,
7489 z . object ( {
75- type : z . literal ( CloudEventType . Completion ) ,
90+ type : z . literal ( TelemetryEventName . LLM_COMPLETION ) ,
7691 properties : z . object ( {
7792 ...appPropertiesSchema . shape ,
7893 ...taskPropertiesSchema . shape ,
0 commit comments