Compare commits

...

2 Commits

Author SHA1 Message Date
Christian Gunderman 3361e3e006 fix(test): update regression test to handle TS error correctly 2026-01-23 11:02:07 -08:00
Christian Gunderman 46a577cc80 fix(core): prevent crash in logStartSessionEvent when event is undefined 2026-01-23 10:54:59 -08:00
2 changed files with 12 additions and 0 deletions
@@ -1281,4 +1281,13 @@ describe('ClearcutLogger', () => {
]);
});
});
describe('logStartSessionEvent', () => {
it('should not throw if event is undefined', async () => {
const { logger } = setup();
await expect(
logger?.logStartSessionEvent(undefined as unknown as StartSessionEvent),
).resolves.not.toThrow();
});
});
});
@@ -511,6 +511,9 @@ export class ClearcutLogger {
}
async logStartSessionEvent(event: StartSessionEvent): Promise<void> {
if (!event) {
return;
}
const data: EventValue[] = [
{
gemini_cli_key: EventMetadataKey.GEMINI_CLI_START_SESSION_MODEL,