File tree Expand file tree Collapse file tree
app/workspace/[workspaceId]/home/hooks Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -3694,7 +3694,7 @@ export function useChat(
36943694 shouldContinue : isSameRecoverySubject ,
36953695 } )
36963696 if ( ! succeeded && streamGenRef . current === recoveryGen && isSameRecoverySubject ( ) ) {
3697- finalizeRef . current ( { error : true } )
3697+ finalizeRef . current ( { error : true , targetChatId : chatId } )
36983698 }
36993699 }
37003700 } ) ( )
Original file line number Diff line number Diff line change @@ -33,6 +33,12 @@ function isLocalOptimisticActiveStream(current: TaskChatHistory | undefined) {
3333 return current . messages . some ( ( message ) => message . id === liveAssistantId )
3434}
3535
36+ /**
37+ * Returns true when the cached active stream is known to be later in the
38+ * chronological transcript than the stream that emitted this status event.
39+ * If either stream is absent from the transcript, callers should refetch
40+ * instead of inferring order from incomplete cache state.
41+ */
3642function hasNewerKnownActiveStream ( current : TaskChatHistory | undefined , streamId : string ) {
3743 if ( ! current ?. activeStreamId || current . activeStreamId === streamId ) return false
3844
You can’t perform that action at this time.
0 commit comments