Feat: Render DynamicCategorize with shadcn-ui. #3221 (#5610)

### What problem does this PR solve?

Feat: Render DynamicCategorize with shadcn-ui. #3221

### Type of change


- [x] New Feature (non-breaking change which adds functionality)
This commit is contained in:
balibabu
2025-03-04 19:31:32 +08:00
committed by GitHub
parent fb4b5b0a06
commit 850e218051
8 changed files with 239 additions and 405 deletions

View File

@ -0,0 +1,31 @@
import {
FormControl,
FormField,
FormItem,
FormLabel,
FormMessage,
} from '@/components/ui/form';
import { useFormContext } from 'react-hook-form';
import { useTranslation } from 'react-i18next';
import { NextLLMSelect } from './llm-select';
export function LargeModelFormField() {
const form = useFormContext();
const { t } = useTranslation();
return (
<FormField
control={form.control}
name="llm_id"
render={({ field }) => (
<FormItem>
<FormLabel tooltip={t('chat.modelTip')}>{t('chat.model')}</FormLabel>
<FormControl>
<NextLLMSelect {...field} />
</FormControl>
<FormMessage />
</FormItem>
)}
/>
);
}