@aigne/default-memory 1.1.2 → 1.1.4

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/CHANGELOG.md CHANGED
@@ -1,5 +1,32 @@
1
1
  # Changelog
2
2
 
3
+ ## [1.1.4](https://github.com/AIGNE-io/aigne-framework/compare/default-memory-v1.1.3...default-memory-v1.1.4) (2025-08-18)
4
+
5
+
6
+ ### Bug Fixes
7
+
8
+ * **memory:** memory storage error if search segments is empty ([#379](https://github.com/AIGNE-io/aigne-framework/issues/379)) ([4e36b6b](https://github.com/AIGNE-io/aigne-framework/commit/4e36b6bfe71cd78ee75014ba26a4c121417e5daa))
9
+
10
+
11
+ ### Dependencies
12
+
13
+ * The following workspace dependencies were updated
14
+ * dependencies
15
+ * @aigne/core bumped to 1.51.0
16
+ * devDependencies
17
+ * @aigne/openai bumped to 0.11.4
18
+
19
+ ## [1.1.3](https://github.com/AIGNE-io/aigne-framework/compare/default-memory-v1.1.2...default-memory-v1.1.3) (2025-08-16)
20
+
21
+
22
+ ### Dependencies
23
+
24
+ * The following workspace dependencies were updated
25
+ * dependencies
26
+ * @aigne/core bumped to 1.50.1
27
+ * devDependencies
28
+ * @aigne/openai bumped to 0.11.3
29
+
3
30
  ## [1.1.2](https://github.com/AIGNE-io/aigne-framework/compare/default-memory-v1.1.1...default-memory-v1.1.2) (2025-08-14)
4
31
 
5
32
 
@@ -37,12 +37,13 @@ class DefaultMemoryStorage extends storage_js_1.MemoryStorage {
37
37
  const { limit = DEFAULT_MAX_MEMORY_COUNT } = query;
38
38
  const sessionId = (await this.options?.getSessionId?.(context)) ?? null;
39
39
  const db = await this.db;
40
- const memories = this.options?.enableFTS && query.search
40
+ const match = this.options?.enableFTS && query.search ? this.segment(query.search).join(" OR ") : undefined;
41
+ const memories = match
41
42
  ? await db
42
43
  .select()
43
44
  .from(memory_js_1.Memories)
44
45
  .innerJoin((0, drizzle_orm_1.sql) `Memories_fts`, (0, drizzle_orm_1.sql) `Memories_fts.id = ${memory_js_1.Memories.id}`)
45
- .where((0, drizzle_orm_1.sql) `Memories_fts MATCH ${drizzle_orm_1.sql.param(this.segment(query.search).join(" OR "))}`)
46
+ .where((0, drizzle_orm_1.sql) `Memories_fts MATCH ${drizzle_orm_1.sql.param(match)}`)
46
47
  .orderBy((0, drizzle_orm_1.sql) `bm25(Memories_fts)`)
47
48
  .limit(limit)
48
49
  .execute()
@@ -34,12 +34,13 @@ export class DefaultMemoryStorage extends MemoryStorage {
34
34
  const { limit = DEFAULT_MAX_MEMORY_COUNT } = query;
35
35
  const sessionId = (await this.options?.getSessionId?.(context)) ?? null;
36
36
  const db = await this.db;
37
- const memories = this.options?.enableFTS && query.search
37
+ const match = this.options?.enableFTS && query.search ? this.segment(query.search).join(" OR ") : undefined;
38
+ const memories = match
38
39
  ? await db
39
40
  .select()
40
41
  .from(Memories)
41
42
  .innerJoin(sql `Memories_fts`, sql `Memories_fts.id = ${Memories.id}`)
42
- .where(sql `Memories_fts MATCH ${sql.param(this.segment(query.search).join(" OR "))}`)
43
+ .where(sql `Memories_fts MATCH ${sql.param(match)}`)
43
44
  .orderBy(sql `bm25(Memories_fts)`)
44
45
  .limit(limit)
45
46
  .execute()
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aigne/default-memory",
3
- "version": "1.1.2",
3
+ "version": "1.1.4",
4
4
  "description": "Default memory for AIGNE framework",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -36,7 +36,7 @@
36
36
  "uuid": "^11.1.0",
37
37
  "yaml": "^2.8.0",
38
38
  "zod": "^3.25.67",
39
- "@aigne/core": "^1.50.0",
39
+ "@aigne/core": "^1.51.0",
40
40
  "@aigne/sqlite": "^0.4.0"
41
41
  },
42
42
  "devDependencies": {
@@ -44,7 +44,7 @@
44
44
  "npm-run-all": "^4.1.5",
45
45
  "rimraf": "^6.0.1",
46
46
  "typescript": "^5.8.3",
47
- "@aigne/openai": "^0.11.2"
47
+ "@aigne/openai": "^0.11.4"
48
48
  },
49
49
  "scripts": {
50
50
  "lint": "tsc --noEmit",