mirror of
https://git.mirrors.martin98.com/https://github.com/langgenius/dify.git
synced 2025-08-18 21:45:59 +08:00
fix: embedded chat file form
This commit is contained in:
parent
d239c5b54d
commit
dc3e86b82a
@ -8,7 +8,6 @@ import { FileUploaderInAttachmentWrapper } from '@/app/components/base/file-uplo
|
|||||||
const Form = () => {
|
const Form = () => {
|
||||||
const { t } = useTranslation()
|
const { t } = useTranslation()
|
||||||
const {
|
const {
|
||||||
appParams,
|
|
||||||
inputsForms,
|
inputsForms,
|
||||||
newConversationInputs,
|
newConversationInputs,
|
||||||
newConversationInputsRef,
|
newConversationInputsRef,
|
||||||
|
@ -8,7 +8,6 @@ import { FileUploaderInAttachmentWrapper } from '@/app/components/base/file-uplo
|
|||||||
const Form = () => {
|
const Form = () => {
|
||||||
const { t } = useTranslation()
|
const { t } = useTranslation()
|
||||||
const {
|
const {
|
||||||
appParams,
|
|
||||||
inputsForms,
|
inputsForms,
|
||||||
newConversationInputs,
|
newConversationInputs,
|
||||||
newConversationInputsRef,
|
newConversationInputsRef,
|
||||||
|
@ -94,7 +94,7 @@ export const useEmbeddedChatbot = () => {
|
|||||||
setNewConversationInputs(newInputs)
|
setNewConversationInputs(newInputs)
|
||||||
}, [])
|
}, [])
|
||||||
const inputsForms = useMemo(() => {
|
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) {
|
if (item.paragraph) {
|
||||||
let value = initInputs[item.paragraph.variable]
|
let value = initInputs[item.paragraph.variable]
|
||||||
if (value && item.paragraph.max_length && value.length > item.paragraph.max_length)
|
if (value && item.paragraph.max_length && value.length > item.paragraph.max_length)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user