Selaa lähdekoodia

fix: fix inputs lost (#17747)

tags/1.3.0
Panpan 6 kuukautta sitten
vanhempi
commit
88cb81d3d6
No account linked to committer's email address

+ 1
- 1
web/app/components/base/chat/chat-with-history/hooks.tsx Näytä tiedosto

@@ -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<Record<string, any>>(currentConversationLatestInputs || {})

+ 1
- 1
web/app/components/base/chat/embedded-chatbot/hooks.tsx Näytä tiedosto

@@ -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<Record<string, any>>(currentConversationLatestInputs || {})

Loading…
Peruuta
Tallenna