@xdarkicex/openclaw-memory-libravdb 1.4.25 → 1.4.26

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.
@@ -124,6 +124,9 @@ function createMemorySearchManager(getRpc, cfg, defaults, initialStatus) {
124
124
  }
125
125
  async function searchResolvedCollections(rpc, cfg, userId, sessionId, queryText, k) {
126
126
  const collections = resolveSearchCollections(cfg, userId, sessionId);
127
+ if (collections.length === 0) {
128
+ return { results: [] };
129
+ }
127
130
  return collections.length === 1
128
131
  ? await rpc.call("search_text", {
129
132
  collection: collections[0],
@@ -138,20 +141,24 @@ async function searchResolvedCollections(rpc, cfg, userId, sessionId, queryText,
138
141
  });
139
142
  }
140
143
  function resolveSearchCollections(cfg, userId, sessionId) {
144
+ if (cfg.crossSessionRecall === false) {
145
+ return sessionId ? [resolveSessionSearchCollection(cfg, sessionId)] : [];
146
+ }
141
147
  const collections = [`user:${userId}`, "global"];
142
148
  if (!sessionId) {
143
149
  return collections;
144
150
  }
151
+ collections.unshift(resolveSessionSearchCollection(cfg, sessionId));
152
+ return collections;
153
+ }
154
+ function resolveSessionSearchCollection(cfg, sessionId) {
145
155
  if (cfg.useSessionSummarySearchExperiment) {
146
- collections.unshift(`session_summary:${sessionId}`);
147
- return collections;
156
+ return `session_summary:${sessionId}`;
148
157
  }
149
158
  if (cfg.useSessionRecallProjection) {
150
- collections.unshift(`session_recall:${sessionId}`);
151
- return collections;
159
+ return `session_recall:${sessionId}`;
152
160
  }
153
- collections.unshift(`session:${sessionId}`);
154
- return collections;
161
+ return `session:${sessionId}`;
155
162
  }
156
163
  function firstString(...values) {
157
164
  return values.find((value) => typeof value === "string" && value.length > 0);
@@ -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.25",
5
+ "version": "1.4.26",
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.25",
3
+ "version": "1.4.26",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",