Refactor: Datasets UI #3221 (#8349)

### What problem does this PR solve?

Refactor Datasets UI #3221.
### Type of change

- [X] New Feature (non-breaking change which adds functionality)
This commit is contained in:
BlueYu-0221
2025-06-19 16:40:30 +08:00
committed by GitHub
parent 403efe81a1
commit fa3e90c72e
55 changed files with 2960 additions and 425 deletions

View File

@ -25,19 +25,29 @@ export function ChunkMethodItem() {
control={form.control}
name={'parser_id'}
render={({ field }) => (
<FormItem>
<FormLabel tooltip={t('chunkMethodTip')}>
{t('chunkMethod')}
</FormLabel>
<FormControl>
<RAGFlowSelect
{...field}
options={parserList}
placeholder={t('chunkMethodPlaceholder')}
// onChange={handleChunkMethodSelectChange}
/>
</FormControl>
<FormMessage />
<FormItem className=" items-center space-y-0 ">
<div className="flex items-center">
<FormLabel
tooltip={t('chunkMethodTip')}
className="text-sm text-muted-foreground whitespace-nowrap w-1/4"
>
{t('chunkMethod')}
</FormLabel>
<div className="w-3/4 ">
<FormControl>
<RAGFlowSelect
{...field}
options={parserList}
placeholder={t('chunkMethodPlaceholder')}
// onChange={handleChunkMethodSelectChange}
/>
</FormControl>
</div>
</div>
<div className="flex pt-1">
<div className="w-1/4"></div>
<FormMessage />
</div>
</FormItem>
)}
/>
@ -55,19 +65,29 @@ export function EmbeddingModelItem() {
control={form.control}
name={'embd_id'}
render={({ field }) => (
<FormItem>
<FormLabel tooltip={t('embeddingModelTip')}>
{t('embeddingModel')}
</FormLabel>
<FormControl>
<RAGFlowSelect
{...field}
options={embeddingModelOptions}
disabled={disabled}
placeholder={t('embeddingModelPlaceholder')}
/>
</FormControl>
<FormMessage />
<FormItem className=" items-center space-y-0 ">
<div className="flex items-center">
<FormLabel
tooltip={t('embeddingModelTip')}
className="text-sm text-muted-foreground whitespace-nowrap w-1/4"
>
{t('embeddingModel')}
</FormLabel>
<div className="w-3/4">
<FormControl>
<RAGFlowSelect
{...field}
options={embeddingModelOptions}
disabled={disabled}
placeholder={t('embeddingModelPlaceholder')}
/>
</FormControl>
</div>
</div>
<div className="flex pt-1">
<div className="w-1/4"></div>
<FormMessage />
</div>
</FormItem>
)}
/>