From b9465f4c5af575547e03865da1c8e82d9169b8d6 Mon Sep 17 00:00:00 2001 From: gongzhiyong Date: Wed, 8 Apr 2026 17:43:58 +0800 Subject: [PATCH] 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) --- frontend/components/gemini/GeminiChat.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/frontend/components/gemini/GeminiChat.tsx b/frontend/components/gemini/GeminiChat.tsx index ffb78bc..f066bd3 100644 --- a/frontend/components/gemini/GeminiChat.tsx +++ b/frontend/components/gemini/GeminiChat.tsx @@ -367,7 +367,9 @@ export function GeminiChat() { /> ); })} - {isLoading && } + {isLoading && messages.length > 0 && messages[messages.length - 1].role !== "assistant" && ( + + )}
)}