From 2fc7e7fec1616301b2c725d2f92da4093fcc2d97 Mon Sep 17 00:00:00 2001 From: Miguel Stevens Date: Mon, 9 Jun 2025 17:42:13 +0200 Subject: [PATCH] isTyping only true when isGenerating When a tool call fails, the last known message will be from the user, however that does not mean that the user is typing. --- apps/www/registry/default/ui/chat.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/www/registry/default/ui/chat.tsx b/apps/www/registry/default/ui/chat.tsx index b8e433e..247cfa9 100644 --- a/apps/www/registry/default/ui/chat.tsx +++ b/apps/www/registry/default/ui/chat.tsx @@ -65,7 +65,7 @@ export function Chat({ }: ChatProps) { const lastMessage = messages.at(-1) const isEmpty = messages.length === 0 - const isTyping = lastMessage?.role === "user" + const isTyping = isGenerating && lastMessage?.role === "user" const messagesRef = useRef(messages) messagesRef.current = messages