88 type ExtensionBridgeCommand ,
99 type TaskBridgeCommand ,
1010 type StaticAppProperties ,
11+ type GitProperties ,
1112 ConnectionState ,
1213 ExtensionSocketEvents ,
1314 TaskSocketEvents ,
@@ -42,6 +43,7 @@ export class BridgeOrchestrator {
4243 private readonly provider : TaskProviderLike
4344 private readonly instanceId : string
4445 private readonly appProperties : StaticAppProperties
46+ private readonly gitProperties ?: GitProperties
4547
4648 // Components
4749 private socketTransport : SocketTransport
@@ -79,6 +81,9 @@ export class BridgeOrchestrator {
7981 if ( ! instance ) {
8082 try {
8183 console . log ( `[BridgeOrchestrator#connectOrDisconnect] Connecting...` )
84+ // Populate telemetry properties before registering the instance.
85+ await options . provider . getTelemetryProperties ( )
86+
8287 BridgeOrchestrator . instance = new BridgeOrchestrator ( options )
8388 await BridgeOrchestrator . instance . connect ( )
8489 } catch ( error ) {
@@ -153,6 +158,7 @@ export class BridgeOrchestrator {
153158 this . provider = options . provider
154159 this . instanceId = options . sessionId || crypto . randomUUID ( )
155160 this . appProperties = { ...options . provider . appProperties , hostname : os . hostname ( ) }
161+ this . gitProperties = options . provider . gitProperties
156162
157163 this . socketTransport = new SocketTransport ( {
158164 url : this . socketBridgeUrl ,
@@ -176,13 +182,15 @@ export class BridgeOrchestrator {
176182 this . extensionChannel = new ExtensionChannel ( {
177183 instanceId : this . instanceId ,
178184 appProperties : this . appProperties ,
185+ gitProperties : this . gitProperties ,
179186 userId : this . userId ,
180187 provider : this . provider ,
181188 } )
182189
183190 this . taskChannel = new TaskChannel ( {
184191 instanceId : this . instanceId ,
185192 appProperties : this . appProperties ,
193+ gitProperties : this . gitProperties ,
186194 } )
187195 }
188196
@@ -304,9 +312,6 @@ export class BridgeOrchestrator {
304312 }
305313
306314 private async connect ( ) : Promise < void > {
307- // Populate the app and git properties before registering the instance.
308- await this . provider . getTelemetryProperties ( )
309-
310315 await this . socketTransport . connect ( )
311316 this . setupSocketListeners ( )
312317 }
0 commit comments