@@ -89,12 +89,25 @@ export const taskPropertiesSchema = z.object({
8989 isSubtask : z . boolean ( ) . optional ( ) ,
9090} )
9191
92+ export const gitPropertiesSchema = z . object ( {
93+ repositoryUrl : z . string ( ) . optional ( ) ,
94+ repositoryName : z . string ( ) . optional ( ) ,
95+ defaultBranch : z . string ( ) . optional ( ) ,
96+ } )
97+
9298export const telemetryPropertiesSchema = z . object ( {
9399 ...appPropertiesSchema . shape ,
94100 ...taskPropertiesSchema . shape ,
101+ ...gitPropertiesSchema . shape ,
102+ } )
103+
104+ export const cloudTelemetryPropertiesSchema = z . object ( {
105+ ...telemetryPropertiesSchema . shape ,
95106} )
96107
97108export type TelemetryProperties = z . infer < typeof telemetryPropertiesSchema >
109+ export type CloudTelemetryProperties = z . infer < typeof cloudTelemetryPropertiesSchema >
110+ export type GitProperties = z . infer < typeof gitPropertiesSchema >
98111
99112/**
100113 * TelemetryEvent
@@ -148,20 +161,20 @@ export const rooCodeTelemetryEventSchema = z.discriminatedUnion("type", [
148161 TelemetryEventName . MODE_SETTINGS_CHANGED ,
149162 TelemetryEventName . CUSTOM_MODE_CREATED ,
150163 ] ) ,
151- properties : telemetryPropertiesSchema ,
164+ properties : cloudTelemetryPropertiesSchema ,
152165 } ) ,
153166 z . object ( {
154167 type : z . literal ( TelemetryEventName . TASK_MESSAGE ) ,
155168 properties : z . object ( {
156- ...telemetryPropertiesSchema . shape ,
169+ ...cloudTelemetryPropertiesSchema . shape ,
157170 taskId : z . string ( ) ,
158171 message : clineMessageSchema ,
159172 } ) ,
160173 } ) ,
161174 z . object ( {
162175 type : z . literal ( TelemetryEventName . LLM_COMPLETION ) ,
163176 properties : z . object ( {
164- ...telemetryPropertiesSchema . shape ,
177+ ...cloudTelemetryPropertiesSchema . shape ,
165178 inputTokens : z . number ( ) ,
166179 outputTokens : z . number ( ) ,
167180 cacheReadTokens : z . number ( ) . optional ( ) ,
@@ -187,6 +200,7 @@ export type TelemetryEventSubscription =
187200
188201export interface TelemetryPropertiesProvider {
189202 getTelemetryProperties ( ) : Promise < TelemetryProperties >
203+ getCloudTelemetryProperties ?( ) : Promise < CloudTelemetryProperties >
190204}
191205
192206/**
0 commit comments