From dc3e86b82a17d8ff1bb90e307a26a6a6742a1d2c Mon Sep 17 00:00:00 2001 From: StyleZhang Date: Sun, 29 Sep 2024 14:55:56 +0800 Subject: [PATCH] fix: embedded chat file form --- .../base/chat/chat-with-history/config-panel/form.tsx | 1 - .../components/base/chat/embedded-chatbot/config-panel/form.tsx | 1 - web/app/components/base/chat/embedded-chatbot/hooks.tsx | 2 +- 3 files changed, 1 insertion(+), 3 deletions(-) diff --git a/web/app/components/base/chat/chat-with-history/config-panel/form.tsx b/web/app/components/base/chat/chat-with-history/config-panel/form.tsx index b1e4e5034a..2429de36fa 100644 --- a/web/app/components/base/chat/chat-with-history/config-panel/form.tsx +++ b/web/app/components/base/chat/chat-with-history/config-panel/form.tsx @@ -8,7 +8,6 @@ import { FileUploaderInAttachmentWrapper } from '@/app/components/base/file-uplo const Form = () => { const { t } = useTranslation() const { - appParams, inputsForms, newConversationInputs, newConversationInputsRef, diff --git a/web/app/components/base/chat/embedded-chatbot/config-panel/form.tsx b/web/app/components/base/chat/embedded-chatbot/config-panel/form.tsx index 6a9e0102dd..da26fdfa24 100644 --- a/web/app/components/base/chat/embedded-chatbot/config-panel/form.tsx +++ b/web/app/components/base/chat/embedded-chatbot/config-panel/form.tsx @@ -8,7 +8,6 @@ import { FileUploaderInAttachmentWrapper } from '@/app/components/base/file-uplo const Form = () => { const { t } = useTranslation() const { - appParams, inputsForms, newConversationInputs, newConversationInputsRef, diff --git a/web/app/components/base/chat/embedded-chatbot/hooks.tsx b/web/app/components/base/chat/embedded-chatbot/hooks.tsx index fa6e80c336..affd3c5955 100644 --- a/web/app/components/base/chat/embedded-chatbot/hooks.tsx +++ b/web/app/components/base/chat/embedded-chatbot/hooks.tsx @@ -94,7 +94,7 @@ export const useEmbeddedChatbot = () => { setNewConversationInputs(newInputs) }, []) const inputsForms = useMemo(() => { - return (appParams?.user_input_form || []).filter((item: any) => item.paragraph || item.select || item['text-input'] || item.number).map((item: any) => { + return (appParams?.user_input_form || []).filter((item: any) => !item.external_data_tool).map((item: any) => { if (item.paragraph) { let value = initInputs[item.paragraph.variable] if (value && item.paragraph.max_length && value.length > item.paragraph.max_length)