You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
refactor: extract pushStreamErrorRow helper in StreamingMessageAggregator
Both stream-error rows in `buildDisplayedMessagesForMessage` (the existing
`message.metadata?.error` branch and the new `finishReason === "length"`
branch added in #3223) push structurally identical objects, differing only in
`id` suffix, `error` string, and `errorType`. The shared parent-message-derived
fields (`historyId`, `historySequence`, `model`, `routedThroughGateway`,
`timestamp`) were duplicated across both pushes.
Extract a local `pushStreamErrorRow` closure that captures the shared fields
once. Each branch now reduces to a single call passing the three differing
values. Pure refactor — emitted DisplayedMessage objects are identical.
0 commit comments