fix: removed dependency from useEffect that causes chat input to be cleared (#7393)

* Removed flowPool from dependencies of function that clears chat input

* remove console.log

---------

Co-authored-by: Cristhian Zanforlin Lousa <cristhian.lousa@gmail.com>
This commit is contained in:
Lucas Oliveira 2025-04-02 17:03:54 -03:00 committed by GitHub
commit f11a89c701
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1,9 +1,5 @@
import LangflowLogo from "@/assets/LangflowLogo.svg?react";
import ForwardedIconComponent from "@/components/common/genericIconComponent";
import { ProfileIcon } from "@/components/core/appHeaderComponent/components/ProfileIcon";
import { TextEffectPerChar } from "@/components/ui/textAnimation";
import { CustomProfileIcon } from "@/customization/components/custom-profile-icon";
import { ENABLE_DATASTAX_LANGFLOW } from "@/customization/feature-flags";
import { track } from "@/customization/utils/analytics";
import { useMessagesStore } from "@/stores/messagesStore";
import { useUtilityStore } from "@/stores/utilityStore";
@ -114,12 +110,11 @@ export default function ChatView({
setChatValueStore(
chatInputNode.data.node.template["input_value"].value ?? "",
);
} else {
isTabHidden ? setChatValueStore("") : null;
}
setChatHistory(finalChatHistory);
}, [flowPool, messages, visibleSession]);
}, [messages, visibleSession]);
useEffect(() => {
if (messagesRef.current) {
messagesRef.current.scrollTop = messagesRef.current.scrollHeight;