mirror of
https://github.com/langgenius/dify.git
synced 2025-12-25 01:00:42 -05:00
feat: Implement partial update for document metadata, allowing merging of new values with existing ones. (#28390)
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
This commit is contained in:
@@ -115,6 +115,7 @@ const useBatchEditDocumentMetadata = ({
|
||||
return {
|
||||
document_id: documentId,
|
||||
metadata_list: newMetadataList,
|
||||
partial_update: docIndex < 0,
|
||||
}
|
||||
})
|
||||
return res
|
||||
|
||||
@@ -25,7 +25,7 @@ export type MetadataItemInBatchEdit = MetadataItemWithValue & {
|
||||
isMultipleValue?: boolean
|
||||
}
|
||||
|
||||
export type MetadataBatchEditToServer = { document_id: string, metadata_list: MetadataItemWithValue[] }[]
|
||||
export type MetadataBatchEditToServer = { document_id: string, metadata_list: MetadataItemWithValue[], partial_update?: boolean }[]
|
||||
|
||||
export enum UpdateType {
|
||||
changeValue = 'changeValue',
|
||||
|
||||
Reference in New Issue
Block a user