(
eventSessionId: string,
resumed: boolean,
sessionScoped?: TelemetryProperties,
)
| 256 | } |
| 257 | |
| 258 | private trackSessionStarted( |
| 259 | eventSessionId: string, |
| 260 | resumed: boolean, |
| 261 | sessionScoped?: TelemetryProperties, |
| 262 | ): void { |
| 263 | withTelemetryContext(this.telemetry, { sessionId: eventSessionId }).track('session_started', { |
| 264 | ...this.sessionStartedProperties, |
| 265 | ...sessionScoped, |
| 266 | // Canonical fields are owned by the harness and must win over any |
| 267 | // caller-supplied sessionStartedProperties that happen to share a key. |
| 268 | // `client_id` is always null here: a single-process host has no |
| 269 | // per-connection client id (that concept only exists for daemon clients, |
| 270 | // see core-impl.ts). Kept as an explicit key so both producers share the |
| 271 | // same session_started schema. |
| 272 | client_id: null, |
| 273 | client_name: this.identity?.userAgentProduct ?? null, |
| 274 | client_version: this.identity?.version ?? null, |
| 275 | ui_mode: this.uiMode, |
| 276 | resumed, |
| 277 | }); |
| 278 | } |
| 279 | } |
| 280 | |
| 281 | const DEFAULT_SESSION_STARTED_UI_MODE = 'shell'; |
no test coverage detected