fix: make chatinput text appear on playground only if no sessions are present (#5117)

Changed newChatView to only set chat value if no messages are present on the flow

Co-authored-by: Cristhian Zanforlin Lousa <cristhian.lousa@gmail.com>
This commit is contained in:
Lucas Oliveira 2024-12-09 15:37:14 -03:00 committed by GitHub
commit dc0291fa8f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -83,7 +83,7 @@ export default function ChatView({
return new Date(a.timestamp).getTime() - new Date(b.timestamp).getTime();
});
if (finalChatHistory.length === 0 && !lockChat && chatInputNode)
if (messages.length === 0 && !lockChat && chatInputNode)
setChatValue(chatInputNode.data.node.template["input_value"].value ?? "");
else setChatValue("");