fix(ui): prevent empty div flicker between tool transitions

The text wrapper div was rendering when `isStreaming` was true but
`text` was empty, causing a brief empty flex container to appear
between tool executions. Changed condition from `(text || isStreaming)`
to `text` only, so the div only renders when there's actual content.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Naiyuan Qing 2026-02-26 16:18:29 +08:00
parent e9e8b9c7a1
commit d96bdb0126

View file

@ -119,8 +119,8 @@ export const MessageList = memo(function MessageList({
<ThinkingItem thinking={thinking} isStreaming={isStreaming} />
)}
{/* Render text content (if any) */}
{(text || isStreaming) && (
{/* Render text content (if any) - require actual text, not just streaming state */}
{text && (
<div
className={cn(
"flex items-center gap-1.5",