Feat: Add chunk also supports uploading image. (#13628)

### What problem does this PR solve?

Feat: Add chunk also supports uploading image.

### Type of change

- [x] New Feature (non-breaking change which adds functionality)
This commit is contained in:
chanx
2026-03-16 20:15:49 +08:00
committed by GitHub
parent af7e24ba8c
commit 5403f142ae
2 changed files with 2 additions and 7 deletions

View File

@ -382,7 +382,7 @@ export function FileUploader(props: FileUploaderProps) {
<div className="relative flex flex-col gap-4 overflow-hidden">
{!(hideDropzoneOnMaxFileCount && reachesMaxFileCount) && (
<Tabs defaultValue="file" className="w-full">
<TabsList className="w-full justify-start">
<TabsList className="w-fit justify-start">
<TabsTrigger value="file" className="gap-2">
<FileText className="size-4" />
{t('fileManager.files', 'Files')}

View File

@ -146,7 +146,6 @@ const ChunkCreatingModal: React.FC<IModalProps<any> & kFProps> = ({
</FormItem>
)}
/>
{/* Do not display the type field in create mode */}
{isEditMode && (
<FormField
@ -174,7 +173,7 @@ const ChunkCreatingModal: React.FC<IModalProps<any> & kFProps> = ({
/>
)}
{isEditMode && form.getValues('doc_type_kwd') === 'image' && (
{(!isEditMode || form.getValues('doc_type_kwd') + '' === 'image') && (
<FormField
control={form.control}
name="image"
@ -213,7 +212,6 @@ const ChunkCreatingModal: React.FC<IModalProps<any> & kFProps> = ({
)}
/>
)}
<FormField
control={form.control}
name="important_kwd"
@ -227,7 +225,6 @@ const ChunkCreatingModal: React.FC<IModalProps<any> & kFProps> = ({
</FormItem>
)}
/>
<FormField
control={form.control}
name="question_kwd"
@ -255,7 +252,6 @@ const ChunkCreatingModal: React.FC<IModalProps<any> & kFProps> = ({
</FormItem>
)}
/>
{isTagParser && (
<FormField
control={form.control}
@ -271,7 +267,6 @@ const ChunkCreatingModal: React.FC<IModalProps<any> & kFProps> = ({
)}
/>
)}
{!isTagParser && (
<FormProvider {...form}>
<TagFeatureItem />