From 67a3ed7558ef848add3f576acd16c42e6cc714da Mon Sep 17 00:00:00 2001 From: Jack Date: Tue, 2 Jun 2026 10:23:04 +0800 Subject: [PATCH] Fix auto metadata type issue (#15338) ### What problem does this PR solve? Fix auto metadata type issue https://github.com/infiniflow/ragflow/issues/15323 Type information is missing at frontend - backend correctly store the type information for the auto metadata type. ### Type of change - [x] Bug Fix (non-breaking change which fixes an issue) --- .../dataset/components/metedata/hooks/use-manage-modal.ts | 4 ++-- web/src/pages/dataset/components/metedata/interface.ts | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/web/src/pages/dataset/components/metedata/hooks/use-manage-modal.ts b/web/src/pages/dataset/components/metedata/hooks/use-manage-modal.ts index ef360f197a..a279c54aad 100644 --- a/web/src/pages/dataset/components/metedata/hooks/use-manage-modal.ts +++ b/web/src/pages/dataset/components/metedata/hooks/use-manage-modal.ts @@ -116,13 +116,13 @@ export const util = { description: item.description, values: item.enum || [], restrictDefinedValues: !!item.enum?.length, - valueType: DEFAULT_VALUE_TYPE, + valueType: item.type || DEFAULT_VALUE_TYPE, } as IMetaDataTableData; }); } const properties = data.properties || {}; return Object.entries(properties).map(([key, property]) => { - const valueType = 'string'; + const valueType = property.type || 'string'; const values = property.enum || property.items?.enum || []; return { field: key, diff --git a/web/src/pages/dataset/components/metedata/interface.ts b/web/src/pages/dataset/components/metedata/interface.ts index 6b759a64c5..551eeb8417 100644 --- a/web/src/pages/dataset/components/metedata/interface.ts +++ b/web/src/pages/dataset/components/metedata/interface.ts @@ -12,6 +12,7 @@ export type IMetaDataReturnJSONType = Record< export interface IMetaDataReturnJSONSettingItem { key: string; + type?: string; description?: string; enum?: string[]; }