From dc0291fa8fb1ca955f569d8e151aef236e7c0c75 Mon Sep 17 00:00:00 2001 From: Lucas Oliveira <62335616+lucaseduoli@users.noreply.github.com> Date: Mon, 9 Dec 2024 15:37:14 -0300 Subject: [PATCH] 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 --- .../src/modals/IOModal/components/chatView/newChatView.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/frontend/src/modals/IOModal/components/chatView/newChatView.tsx b/src/frontend/src/modals/IOModal/components/chatView/newChatView.tsx index 31b746695..7619cce68 100644 --- a/src/frontend/src/modals/IOModal/components/chatView/newChatView.tsx +++ b/src/frontend/src/modals/IOModal/components/chatView/newChatView.tsx @@ -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("");