Skip to content

Commit 0316b05

Browse files
committed
fix(sdk): satisfy the package build's stricter null-narrowing on the error partial
The error-path UI-message array construction tripped the tshy build's stricter check (partialResponse not narrowed by the includePartial flag). Assert non-null where includePartial already guarantees it.
1 parent aaa51a3 commit 0316b05

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

  • packages/trigger-sdk/src/v3

packages/trigger-sdk/src/v3/ai.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7970,9 +7970,9 @@ function chatAgent<
79707970
let erroredUIMessagesWithPartial: TUIMessage[] = !includePartial
79717971
? erroredUIMessages
79727972
: partialIdx === -1
7973-
? [...erroredUIMessages, partialResponse]
7973+
? [...erroredUIMessages, partialResponse!]
79747974
: (erroredUIMessages.map((m, i) =>
7975-
i === partialIdx ? partialResponse : m
7975+
i === partialIdx ? partialResponse! : m
79767976
) as TUIMessage[]);
79777977

79787978
let erroredNewUIMessages: TUIMessage[] = erroredWireMessage ? [erroredWireMessage] : [];

0 commit comments

Comments
 (0)