File tree Expand file tree Collapse file tree 2 files changed +3
-6
lines changed
app/workspace/[workspaceId]/knowledge/[id]/[documentId] Expand file tree Collapse file tree 2 files changed +3
-6
lines changed Original file line number Diff line number Diff line change @@ -538,14 +538,11 @@ export function Document({
538538 } ,
539539 {
540540 onSuccess : ( result ) => {
541- if ( operation === 'delete' ) {
541+ if ( operation === 'delete' || result . errorCount > 0 ) {
542542 refreshChunks ( )
543543 } else {
544- const failedChunkIds = new Set ( result . errors . map ( ( e ) => e . chunkId ) )
545544 chunks . forEach ( ( chunk ) => {
546- if ( ! failedChunkIds . has ( chunk . id ) ) {
547- updateChunk ( chunk . id , { enabled : operation === 'enable' } )
548- }
545+ updateChunk ( chunk . id , { enabled : operation === 'enable' } )
549546 } )
550547 }
551548 logger . info ( `Successfully ${ operation } d ${ result . successCount } chunks` )
Original file line number Diff line number Diff line change @@ -759,7 +759,7 @@ export interface BulkChunkOperationResult {
759759 successCount : number
760760 errorCount : number
761761 processed : number
762- errors : Array < { chunkId : string ; error : string } >
762+ errors : string [ ]
763763}
764764
765765export async function bulkChunkOperation ( {
You can’t perform that action at this time.
0 commit comments