diff --git a/web/app/components/base/chat/chat-with-history/hooks.tsx b/web/app/components/base/chat/chat-with-history/hooks.tsx index 88f6c8f61..0a4cbae96 100644 --- a/web/app/components/base/chat/chat-with-history/hooks.tsx +++ b/web/app/components/base/chat/chat-with-history/hooks.tsx @@ -266,7 +266,7 @@ export const useChatWithHistory = (installedAppInfo?: InstalledApp) => { const currentConversationLatestInputs = useMemo(() => { if (!currentConversationId || !appChatListData?.data.length) - return {} + return newConversationInputsRef.current || {} return appChatListData.data.slice().pop().inputs || {} }, [appChatListData, currentConversationId]) const [currentConversationInputs, setCurrentConversationInputs] = useState>(currentConversationLatestInputs || {}) diff --git a/web/app/components/base/chat/embedded-chatbot/hooks.tsx b/web/app/components/base/chat/embedded-chatbot/hooks.tsx index 197aa7649..a5665ab34 100644 --- a/web/app/components/base/chat/embedded-chatbot/hooks.tsx +++ b/web/app/components/base/chat/embedded-chatbot/hooks.tsx @@ -242,7 +242,7 @@ export const useEmbeddedChatbot = () => { const currentConversationLatestInputs = useMemo(() => { if (!currentConversationId || !appChatListData?.data.length) - return {} + return newConversationInputsRef.current || {} return appChatListData.data.slice().pop().inputs || {} }, [appChatListData, currentConversationId]) const [currentConversationInputs, setCurrentConversationInputs] = useState>(currentConversationLatestInputs || {})