File tree Expand file tree Collapse file tree 2 files changed +6
-11
lines changed
app/workspace/[workspaceId]/knowledge/[id]/[documentId] Expand file tree Collapse file tree 2 files changed +6
-11
lines changed Original file line number Diff line number Diff line change @@ -541,12 +541,8 @@ export function Document({
541541 if ( operation === 'delete' ) {
542542 refreshChunks ( )
543543 } else {
544- result . results . forEach ( ( opResult ) => {
545- if ( opResult . operation === operation ) {
546- opResult . chunkIds . forEach ( ( chunkId : string ) => {
547- updateChunk ( chunkId , { enabled : operation === 'enable' } )
548- } )
549- }
544+ chunks . forEach ( ( chunk ) => {
545+ updateChunk ( chunk . id , { enabled : operation === 'enable' } )
550546 } )
551547 }
552548 logger . info ( `Successfully ${ operation } d ${ result . successCount } chunks` )
Original file line number Diff line number Diff line change @@ -755,12 +755,11 @@ export interface BulkChunkOperationParams {
755755}
756756
757757export interface BulkChunkOperationResult {
758+ operation : string
758759 successCount : number
759- failedCount : number
760- results : Array < {
761- operation : string
762- chunkIds : string [ ]
763- } >
760+ errorCount : number
761+ processed : number
762+ errors : Array < { chunkId : string ; error : string } >
764763}
765764
766765export async function bulkChunkOperation ( {
You can’t perform that action at this time.
0 commit comments