mirror of
https://github.com/davidkaya/aryx.git
synced 2026-08-03 10:28:43 +02:00
fix: eliminate thinking message flash before reclassification
The optimistic fold previously required prior thinking messages in the pending group (pendingThinking.length > 0) before it would absorb an unclassified pending assistant message. When the first assistant message in a turn arrived before any thinking messages were classified, it briefly rendered as a full chat message, then snapped into the collapsible panel once the message-reclassified event arrived. Remove the pendingThinking.length guard so any trailing pending, unclassified assistant message during an active turn is folded into the turn-activity panel immediately, regardless of whether prior thinking messages exist. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
@@ -157,15 +157,14 @@ export function ChatPane({
|
||||
}
|
||||
|
||||
// Optimistic thinking classification: fold a pending assistant
|
||||
// message into the current thinking group when it immediately follows
|
||||
// thinking messages during an active turn. This prevents the brief
|
||||
// flash of content that occurs before a message-reclassified event
|
||||
// arrives. Only the very last message qualifies — earlier messages
|
||||
// have already been classified definitively.
|
||||
// message into the current activity group when it immediately follows
|
||||
// thinking messages during an active turn, OR when it's the very last
|
||||
// message and no kind has been assigned yet. This prevents the brief
|
||||
// flash where content renders as a full chat message before the
|
||||
// message-reclassified event arrives.
|
||||
if (
|
||||
busy
|
||||
&& isLast
|
||||
&& pendingThinking.length > 0
|
||||
&& message.role === 'assistant'
|
||||
&& message.pending
|
||||
&& !message.messageKind
|
||||
|
||||
Reference in New Issue
Block a user