|
import { TopNFormField } from '@/components/top-n-item'; |
|
import { |
|
Form, |
|
FormControl, |
|
FormField, |
|
FormItem, |
|
FormLabel, |
|
FormMessage, |
|
} from '@/components/ui/form'; |
|
import { RAGFlowSelect } from '@/components/ui/select'; |
|
import { useTranslate } from '@/hooks/common-hooks'; |
|
import { LanguageOptions } from '../../constant'; |
|
import { INextOperatorForm } from '../../interface'; |
|
import { DynamicInputVariable } from '../components/next-dynamic-input-variable'; |
|
|
|
const WikipediaForm = ({ form, node }: INextOperatorForm) => { |
|
const { t } = useTranslate('common'); |
|
|
|
return ( |
|
<Form {...form}> |
|
<form |
|
className="space-y-6" |
|
onSubmit={(e) => { |
|
e.preventDefault(); |
|
}} |
|
> |
|
<DynamicInputVariable node={node}></DynamicInputVariable> |
|
<TopNFormField></TopNFormField> |
|
|
|
<FormField |
|
control={form.control} |
|
name="language" |
|
render={({ field }) => ( |
|
<FormItem> |
|
<FormLabel>{t('language')}</FormLabel> |
|
<FormControl> |
|
<RAGFlowSelect {...field} options={LanguageOptions} /> |
|
</FormControl> |
|
<FormMessage /> |
|
</FormItem> |
|
)} |
|
/> |
|
</form> |
|
</Form> |
|
); |
|
}; |
|
|
|
export default WikipediaForm; |
|
|