fix: hide typing indicator once assistant message appears during streaming
The "two diamond" bug was caused by GeminiTypingIndicator (which has its own gem icon) rendering simultaneously with GeminiMessage (also has a gem icon) once the first token arrived. Now the typing indicator only shows while isLoading is true AND no assistant message exists yet (last message is not role "assistant"). Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 4.6
parent
c2e14c48a0
commit
b9465f4c5a
@@ -367,7 +367,9 @@ export function GeminiChat() {
|
||||
/>
|
||||
);
|
||||
})}
|
||||
{isLoading && <GeminiTypingIndicator />}
|
||||
{isLoading && messages.length > 0 && messages[messages.length - 1].role !== "assistant" && (
|
||||
<GeminiTypingIndicator />
|
||||
)}
|
||||
<div ref={messagesEndRef} />
|
||||
</div>
|
||||
)}
|
||||
|
||||
Reference in New Issue
Block a user