|
|
|
|
@ -3,7 +3,7 @@ import { useTranslation } from 'react-i18next'
|
|
|
|
|
import { useChatWithHistoryContext } from '../context'
|
|
|
|
|
import Input from '@/app/components/base/input'
|
|
|
|
|
import Textarea from '@/app/components/base/textarea'
|
|
|
|
|
import { PortalSelect } from '@/app/components/base/select'
|
|
|
|
|
import Select from '@/app/components/base/select'
|
|
|
|
|
import { FileUploaderInAttachmentWrapper } from '@/app/components/base/file-uploader'
|
|
|
|
|
import { InputVarType } from '@/app/components/workflow/types'
|
|
|
|
|
|
|
|
|
|
@ -71,13 +71,14 @@ const InputsFormContent = ({ showTip }: Props) => {
|
|
|
|
|
/>
|
|
|
|
|
)}
|
|
|
|
|
{form.type === InputVarType.select && (
|
|
|
|
|
<PortalSelect
|
|
|
|
|
popupClassName='w-[200px]'
|
|
|
|
|
value={inputsFormValue?.[form.variable]}
|
|
|
|
|
items={form.options.map((option: string) => ({ value: option, name: option }))}
|
|
|
|
|
onSelect={item => handleFormChange(form.variable, item.value as string)}
|
|
|
|
|
placeholder={form.label}
|
|
|
|
|
/>
|
|
|
|
|
<Select
|
|
|
|
|
placeholder={form.label}
|
|
|
|
|
className='w-full'
|
|
|
|
|
defaultValue={inputsFormValue?.[form.variable]}
|
|
|
|
|
onSelect={item => handleFormChange(form.variable, item.value as string)}
|
|
|
|
|
items={form.options.map((option: string) => ({ value: option, name: option }))}
|
|
|
|
|
allowSearch={true}
|
|
|
|
|
/>
|
|
|
|
|
)}
|
|
|
|
|
{form.type === InputVarType.singleFile && (
|
|
|
|
|
<FileUploaderInAttachmentWrapper
|
|
|
|
|
|