feat: enhance ChatMessage loading state management (#6196)

🔧 (chat-message.tsx): add isBuilding variable to track if the chat message is being built to improve user experience

Co-authored-by: anovazzi1 <otavio2204@gmail.com>
Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
This commit is contained in:
Cristhian Zanforlin Lousa 2025-02-11 14:06:20 -03:00 • committed by GitHub
commit 3ea8e7291e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -313,8 +313,10 @@ export default function ChatMessage({
contentBlocks={chat.content_blocks} contentBlocks={chat.content_blocks}
isLoading={ isLoading={
chatMessage === "" && chatMessage === "" &&
lockChat &&
chat.properties?.state === "partial" &&
isBuilding && isBuilding &&
chat.properties?.state === "partial" lastMessage
} }
state={chat.properties?.state} state={chat.properties?.state}
chatId={chat.id} chatId={chat.id}