import { AvatarUpload } from '@/components/avatar-upload'; import { FormControl, FormField, FormItem, FormLabel, FormMessage, } from '@/components/ui/form'; import { Input } from '@/components/ui/input'; import { useFormContext } from 'react-hook-form'; import { useTranslation } from 'react-i18next'; import { EmbeddingModelItem } from './configuration/common-item'; import { PermissionFormField } from './permission-form-field'; export function GeneralForm() { const form = useFormContext(); const { t } = useTranslation(); return ( <> (
* {t('common.name')}
)} /> (
{t('setting.avatar')}
)} /> { // null initialize empty string if (typeof field.value === 'object' && !field.value) { form.setValue('description', ' '); } return (
{t('flow.description')}
); }} /> ); }