* Per-session skill/plugin telemetry. Called from both the interactive path * and the headless -p path (before runHeadless) — both go through * main.tsx but branch before the interactive startup path, so it needs two * call sites here rather than one here + one in QueryEngine.
()
| 331 | * call sites here rather than one here + one in QueryEngine. |
| 332 | */ |
| 333 | function logSessionTelemetry(): void { |
| 334 | const model = parseUserSpecifiedModel(getInitialMainLoopModel() ?? getDefaultMainLoopModel()); |
| 335 | void logSkillsLoaded(getCwd(), getContextWindowForModel(model, getSdkBetas())); |
| 336 | if (isDeferredHeadlessPluginStartupSurfacesEnabled()) { |
| 337 | logForDebugging('[STARTUP] Skipping eager plugin session telemetry during deferred headless startup'); |
| 338 | return; |
| 339 | } |
| 340 | void loadAllPluginsCacheOnly().then(({ |
| 341 | enabled, |
| 342 | errors |
| 343 | }) => { |
| 344 | const managedNames = getManagedPluginNames(); |
| 345 | logPluginsEnabledForSession(enabled, managedNames, getPluginSeedDirs()); |
| 346 | logPluginLoadErrors(errors, managedNames); |
| 347 | }).catch(err => logError(err)); |
| 348 | } |
| 349 | function getCertEnvVarTelemetry(): Record<string, boolean> { |
| 350 | const result: Record<string, boolean> = {}; |
| 351 | if (process.env.NODE_EXTRA_CA_CERTS) { |
no test coverage detected