mirror of
http://112.124.100.131/huang.ze/ebiz-dify-ai.git
synced 2025-12-09 02:46:52 +08:00
feat: upgrade knowledge metadata (#16063)
Support filter knowledge by metadata. Co-authored-by: Joel <iamjoel007@gmail.com> Co-authored-by: NFish <douxc512@gmail.com>
This commit is contained in:
@@ -8,24 +8,24 @@ export type inputType = 'input' | 'select' | 'textarea'
|
||||
export type metadataType = DocType | 'originInfo' | 'technicalParameters'
|
||||
|
||||
type MetadataMap =
|
||||
Record<
|
||||
metadataType,
|
||||
{
|
||||
text: string
|
||||
allowEdit?: boolean
|
||||
icon?: React.ReactNode
|
||||
iconName?: string
|
||||
subFieldsMap: Record<
|
||||
string,
|
||||
{
|
||||
label: string
|
||||
inputType?: inputType
|
||||
field?: string
|
||||
render?: (value: any, total?: number) => React.ReactNode | string
|
||||
}
|
||||
>
|
||||
}
|
||||
>
|
||||
Record<
|
||||
metadataType,
|
||||
{
|
||||
text: string
|
||||
allowEdit?: boolean
|
||||
icon?: React.ReactNode
|
||||
iconName?: string
|
||||
subFieldsMap: Record<
|
||||
string,
|
||||
{
|
||||
label: string
|
||||
inputType?: inputType
|
||||
field?: string
|
||||
render?: (value: any, total?: number) => React.ReactNode | string
|
||||
}
|
||||
>
|
||||
}
|
||||
>
|
||||
|
||||
const fieldPrefix = 'datasetDocuments.metadata.field'
|
||||
|
||||
@@ -240,7 +240,7 @@ export const useMetadataMap = (): MetadataMap => {
|
||||
},
|
||||
'data_source_type': {
|
||||
label: t(`${fieldPrefix}.originInfo.source`),
|
||||
render: value => t(`datasetDocuments.metadata.source.${value}`),
|
||||
render: value => t(`datasetDocuments.metadata.source.${value === 'notion_import' ? 'notion' : value}`),
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user