@@ -78,12 +78,25 @@ export const taskPropertiesSchema = z.object({
7878 isSubtask : z . boolean ( ) . optional ( ) ,
7979} )
8080
81+ export const gitPropertiesSchema = z . object ( {
82+ repositoryUrl : z . string ( ) . optional ( ) ,
83+ repositoryName : z . string ( ) . optional ( ) ,
84+ defaultBranch : z . string ( ) . optional ( ) ,
85+ } )
86+
8187export const telemetryPropertiesSchema = z . object ( {
8288 ...appPropertiesSchema . shape ,
8389 ...taskPropertiesSchema . shape ,
90+ ...gitPropertiesSchema . shape ,
91+ } )
92+
93+ export const cloudTelemetryPropertiesSchema = z . object ( {
94+ ...telemetryPropertiesSchema . shape ,
8495} )
8596
8697export type TelemetryProperties = z . infer < typeof telemetryPropertiesSchema >
98+ export type CloudTelemetryProperties = z . infer < typeof cloudTelemetryPropertiesSchema >
99+ export type GitProperties = z . infer < typeof gitPropertiesSchema >
87100
88101/**
89102 * TelemetryEvent
@@ -127,20 +140,20 @@ export const rooCodeTelemetryEventSchema = z.discriminatedUnion("type", [
127140 TelemetryEventName . MODE_SETTINGS_CHANGED ,
128141 TelemetryEventName . CUSTOM_MODE_CREATED ,
129142 ] ) ,
130- properties : telemetryPropertiesSchema ,
143+ properties : cloudTelemetryPropertiesSchema ,
131144 } ) ,
132145 z . object ( {
133146 type : z . literal ( TelemetryEventName . TASK_MESSAGE ) ,
134147 properties : z . object ( {
135- ...telemetryPropertiesSchema . shape ,
148+ ...cloudTelemetryPropertiesSchema . shape ,
136149 taskId : z . string ( ) ,
137150 message : clineMessageSchema ,
138151 } ) ,
139152 } ) ,
140153 z . object ( {
141154 type : z . literal ( TelemetryEventName . LLM_COMPLETION ) ,
142155 properties : z . object ( {
143- ...telemetryPropertiesSchema . shape ,
156+ ...cloudTelemetryPropertiesSchema . shape ,
144157 inputTokens : z . number ( ) ,
145158 outputTokens : z . number ( ) ,
146159 cacheReadTokens : z . number ( ) . optional ( ) ,
@@ -166,6 +179,7 @@ export type TelemetryEventSubscription =
166179
167180export interface TelemetryPropertiesProvider {
168181 getTelemetryProperties ( ) : Promise < TelemetryProperties >
182+ getCloudTelemetryProperties ?( ) : Promise < CloudTelemetryProperties >
169183}
170184
171185/**
0 commit comments