diff --git a/src/frontend/src/components/chatComponent/index.tsx b/src/frontend/src/components/chatComponent/index.tsx index eaf0ba4ef..cd3c9c789 100644 --- a/src/frontend/src/components/chatComponent/index.tsx +++ b/src/frontend/src/components/chatComponent/index.tsx @@ -3,7 +3,6 @@ import { useNodes } from "reactflow"; import { ChatType } from "../../types/chat"; import ChatTrigger from "./chatTrigger"; import BuildTrigger from "./buildTrigger"; -import ChatModal from "../../modals/chatModal"; import { getBuildStatus } from "../../controllers/API"; import { NodeType } from "../../types/flow"; @@ -45,10 +44,11 @@ export default function Chat({ flow }: ChatType) { const prevNodesRef = useRef(); const nodes = useNodes(); useEffect(() => { + const prevNodes = prevNodesRef.current; const currentNodes = nodes.map( - (node: NodeType) => node.data.node.template.value - ); + (node: NodeType) => node.data.node.template + ); if ( prevNodes && diff --git a/src/frontend/src/modals/formModal/chatInput/index.tsx b/src/frontend/src/modals/formModal/chatInput/index.tsx index 17a673d68..50d42dd3f 100644 --- a/src/frontend/src/modals/formModal/chatInput/index.tsx +++ b/src/frontend/src/modals/formModal/chatInput/index.tsx @@ -59,15 +59,15 @@ export default function ChatInput({ placeholder={"Send a message..."} />
-