fix: embedded chat file form

This commit is contained in:
StyleZhang 2024-09-29 14:55:56 +08:00
parent d239c5b54d
commit dc3e86b82a
3 changed files with 1 additions and 3 deletions

View File

@ -8,7 +8,6 @@ import { FileUploaderInAttachmentWrapper } from '@/app/components/base/file-uplo
const Form = () => {
const { t } = useTranslation()
const {
appParams,
inputsForms,
newConversationInputs,
newConversationInputsRef,

View File

@ -8,7 +8,6 @@ import { FileUploaderInAttachmentWrapper } from '@/app/components/base/file-uplo
const Form = () => {
const { t } = useTranslation()
const {
appParams,
inputsForms,
newConversationInputs,
newConversationInputsRef,

View File

@ -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)