@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 CHANGED
@@ -38262,12 +38262,12 @@ var IngestQueue = class {
38262
38262
  });
38263
38263
  }
38264
38264
  for (let i = 0; i < chunks.length; i++) {
38265
- const isLast = i === chunks.length - 1;
38265
+ const isFirst = i === 0;
38266
38266
  const chunkParams = {
38267
38267
  ...baseParams,
38268
38268
  sourceDoc,
38269
38269
  text: chunks[i].text,
38270
- mode: isLast ? IngestMode.REPLACE : IngestMode.APPEND
38270
+ mode: isFirst ? IngestMode.REPLACE : IngestMode.APPEND
38271
38271
  };
38272
38272
  await this.ingestWithRetry(chunkParams);
38273
38273
  }
@@ -34,14 +34,15 @@ export class IngestQueue {
34
34
  mode: IngestMode.REPLACE,
35
35
  });
36
36
  }
37
- // Multiple chunks: use APPEND mode for all but last (which can be REPLACE)
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 isLast = i === chunks.length - 1;
40
+ const isFirst = i === 0;
40
41
  const chunkParams = {
41
42
  ...baseParams,
42
43
  sourceDoc,
43
44
  text: chunks[i].text,
44
- mode: isLast ? IngestMode.REPLACE : IngestMode.APPEND,
45
+ mode: isFirst ? IngestMode.REPLACE : IngestMode.APPEND,
45
46
  };
46
47
  await this.ingestWithRetry(chunkParams);
47
48
  }
@@ -2,7 +2,7 @@
2
2
  "id": "libravdb-memory",
3
3
  "name": "LibraVDB Memory",
4
4
  "description": "Persistent vector memory with three-tier hybrid scoring",
5
- "version": "1.4.47",
5
+ "version": "1.4.48",
6
6
  "kind": [
7
7
  "memory",
8
8
  "context-engine"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xdarkicex/openclaw-memory-libravdb",
3
- "version": "1.4.47",
3
+ "version": "1.4.48",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",