mirror of
https://github.com/infiniflow/ragflow.git
synced 2026-01-30 23:26:36 +08:00
### What problem does this PR solve? Feat: Replace antd with shadcn and delete the template node. #10427 ### Type of change - [x] New Feature (non-breaking change which adds functionality)
34 lines
819 B
TypeScript
34 lines
819 B
TypeScript
import { useFormContext } from 'react-hook-form';
|
|
import { useTranslation } from 'react-i18next';
|
|
import {
|
|
FormControl,
|
|
FormField,
|
|
FormItem,
|
|
FormLabel,
|
|
FormMessage,
|
|
} from './ui/form';
|
|
import { NumberInput } from './ui/input';
|
|
|
|
export function MessageHistoryWindowSizeFormField() {
|
|
const form = useFormContext();
|
|
const { t } = useTranslation();
|
|
|
|
return (
|
|
<FormField
|
|
control={form.control}
|
|
name={'message_history_window_size'}
|
|
render={({ field }) => (
|
|
<FormItem>
|
|
<FormLabel tooltip={t('flow.messageHistoryWindowSizeTip')}>
|
|
{t('flow.messageHistoryWindowSize')}
|
|
</FormLabel>
|
|
<FormControl>
|
|
<NumberInput {...field}></NumberInput>
|
|
</FormControl>
|
|
<FormMessage />
|
|
</FormItem>
|
|
)}
|
|
/>
|
|
);
|
|
}
|