@xdarkicex/openclaw-memory-libravdb 1.4.47 → 1.4.48
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +2 -2
- package/dist/ingest-queue.js +4 -3
- package/openclaw.plugin.json +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -38262,12 +38262,12 @@ var IngestQueue = class {
|
|
|
38262
38262
|
});
|
|
38263
38263
|
}
|
|
38264
38264
|
for (let i = 0; i < chunks.length; i++) {
|
|
38265
|
-
const
|
|
38265
|
+
const isFirst = i === 0;
|
|
38266
38266
|
const chunkParams = {
|
|
38267
38267
|
...baseParams,
|
|
38268
38268
|
sourceDoc,
|
|
38269
38269
|
text: chunks[i].text,
|
|
38270
|
-
mode:
|
|
38270
|
+
mode: isFirst ? IngestMode.REPLACE : IngestMode.APPEND
|
|
38271
38271
|
};
|
|
38272
38272
|
await this.ingestWithRetry(chunkParams);
|
|
38273
38273
|
}
|
package/dist/ingest-queue.js
CHANGED
|
@@ -34,14 +34,15 @@ export class IngestQueue {
|
|
|
34
34
|
mode: IngestMode.REPLACE,
|
|
35
35
|
});
|
|
36
36
|
}
|
|
37
|
-
// Multiple chunks:
|
|
37
|
+
// Multiple chunks: clear the source once, then append the remaining chunks.
|
|
38
|
+
// Sending REPLACE last deletes the earlier chunks from the same source_doc.
|
|
38
39
|
for (let i = 0; i < chunks.length; i++) {
|
|
39
|
-
const
|
|
40
|
+
const isFirst = i === 0;
|
|
40
41
|
const chunkParams = {
|
|
41
42
|
...baseParams,
|
|
42
43
|
sourceDoc,
|
|
43
44
|
text: chunks[i].text,
|
|
44
|
-
mode:
|
|
45
|
+
mode: isFirst ? IngestMode.REPLACE : IngestMode.APPEND,
|
|
45
46
|
};
|
|
46
47
|
await this.ingestWithRetry(chunkParams);
|
|
47
48
|
}
|
package/openclaw.plugin.json
CHANGED