fix: clear chat input when sending from play button (#5071)

Fix newChatView to clear chat input if the component runs before
This commit is contained in:
Lucas Oliveira 2024-12-05 17:57:50 -03:00 • committed by GitHub
commit c044a1c947
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -85,6 +85,7 @@ export default function ChatView({
if (finalChatHistory.length === 0 && !lockChat && chatInputNode)
setChatValue(chatInputNode.data.node.template["input_value"].value ?? "");
else setChatValue("");
setChatHistory(finalChatHistory);
}, [flowPool, messages, visibleSession]);