mirror of
https://github.com/davidkaya/aryx.git
synced 2026-08-28 05:43:57 +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
|
// Optimistic thinking classification: fold a pending assistant
|
||||||
// message into the current thinking group when it immediately follows
|
// message into the current activity group when it immediately follows
|
||||||
// thinking messages during an active turn. This prevents the brief
|
// thinking messages during an active turn, OR when it's the very last
|
||||||
// flash of content that occurs before a message-reclassified event
|
// message and no kind has been assigned yet. This prevents the brief
|
||||||
// arrives. Only the very last message qualifies — earlier messages
|
// flash where content renders as a full chat message before the
|
||||||
// have already been classified definitively.
|
// message-reclassified event arrives.
|
||||||
if (
|
if (
|
||||||
busy
|
busy
|
||||||
&& isLast
|
&& isLast
|
||||||
&& pendingThinking.length > 0
|
|
||||||
&& message.role === 'assistant'
|
&& message.role === 'assistant'
|
||||||
&& message.pending
|
&& message.pending
|
||||||
&& !message.messageKind
|
&& !message.messageKind
|
||||||
|
|||||||
Reference in New Issue
Block a user