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
parent b3e06aa215
commit dc0291fa8f

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("");