Fix type errors with exactOptionalPropertyTypes

Use conditional spread for turnId to avoid passing undefined
explicitly when the target type expects an optional property.

Co-Authored-By: Claude Opus 4.5 <[email protected]>
This commit is contained in:
Julius MarmingeandClaude Opus 4.5 authored and Julius Marminge committed 2026-02-26 20:43:22 -08:00
1 parent 001902c881
commit e119e18ed3
1 file changed
+2 -2
@@ -491,7 +491,7 @@ const make = Effect.gen(function* () {
const assistantDeliveryMode = yield* resolveAssistantDeliveryModeForMessage({
threadId: thread.id,
sessionId: event.sessionId,
turnId,
...(turnId ? { turnId } : {}),
messageId: assistantMessageId,
});
yield* rememberAssistantDeliveryModeForMessage(assistantMessageId, assistantDeliveryMode);
@@ -520,7 +520,7 @@ const make = Effect.gen(function* () {
const assistantDeliveryMode = yield* resolveAssistantDeliveryModeForMessage({
threadId: thread.id,
sessionId: event.sessionId,
turnId,
...(turnId ? { turnId } : {}),
messageId: assistantMessageId,
});
yield* rememberAssistantDeliveryModeForMessage(assistantMessageId, assistantDeliveryMode);