From ab9eb4dd62d3784e9f1a622d7ae152aeb383e7f9 Mon Sep 17 00:00:00 2001 From: EyJunge1 Date: Tue, 4 Aug 2026 09:52:10 +0200 Subject: [PATCH 1/2] chore: release v2.24.0 Co-authored-by: Cursor --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index d6c9c09..8142baf 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "opencode-mem", - "version": "2.23.0", + "version": "2.24.0", "description": "OpenCode plugin that gives coding agents persistent memory using local Turso/libSQL vector search", "type": "module", "main": "dist/plugin.js", From 34bac26a55af9ff10ce1a36b4dfe911fec3abd72 Mon Sep 17 00:00:00 2001 From: EyJunge1 Date: Tue, 4 Aug 2026 09:57:11 +0200 Subject: [PATCH 2/2] fix(memory): migrate Windows prompt paths reliably Normalize path separators only for matching while preserving the native destination path. Co-authored-by: Cursor --- src/services/shard-path-migration-service.ts | 6 +---- .../user-prompt/user-prompt-manager.ts | 11 ++++++---- tests/shard-path-migrate.test.ts | 22 +++++++++++++++++++ 3 files changed, 30 insertions(+), 9 deletions(-) diff --git a/src/services/shard-path-migration-service.ts b/src/services/shard-path-migration-service.ts index d2f45bd..1054e90 100644 --- a/src/services/shard-path-migration-service.ts +++ b/src/services/shard-path-migration-service.ts @@ -18,7 +18,6 @@ import { tursoVectorSearch } from "./turso/vector-search.js"; import { withSqliteFileLockRetry } from "./turso/sqlite-handle-release.js"; import { log } from "./logger.js"; import { - normalizeProjectPath, shardInventoryService, type ResolveMigrationSourceOptions, type ResolvedMigrationSource, @@ -362,10 +361,7 @@ export class ShardPathMigrationService { // recoverable memory migration. if (source.group.projectPath && target.projectPath) { try { - await userPromptManager.updateProjectPath( - normalizeProjectPath(source.group.projectPath), - normalizeProjectPath(target.projectPath) - ); + await userPromptManager.updateProjectPath(source.group.projectPath, target.projectPath); } catch (error) { log("Path migration prompt metadata update failed", { error: String(error) }); } diff --git a/src/services/user-prompt/user-prompt-manager.ts b/src/services/user-prompt/user-prompt-manager.ts index 453e8ec..f020133 100644 --- a/src/services/user-prompt/user-prompt-manager.ts +++ b/src/services/user-prompt/user-prompt-manager.ts @@ -373,10 +373,13 @@ export class UserPromptManager { return 0; } const db = await this.ready(); - return db.run(`UPDATE user_prompts SET project_path = ? WHERE project_path = ?`, [ - newProjectPath, - oldProjectPath, - ]); + const normalizedOldPath = oldProjectPath.replace(/\\/g, "/"); + return db.run( + `UPDATE user_prompts + SET project_path = ? + WHERE REPLACE(project_path, '\\', '/') = ?`, + [newProjectPath, normalizedOldPath] + ); } private rowToPrompt(row: Record): UserPrompt { diff --git a/tests/shard-path-migrate.test.ts b/tests/shard-path-migrate.test.ts index a4d9f30..5ba2a5c 100644 --- a/tests/shard-path-migrate.test.ts +++ b/tests/shard-path-migrate.test.ts @@ -426,4 +426,26 @@ describe("shard path migration", () => { expect(await tursoShardManager.getAllShards("project", oldHash)).toHaveLength(1); expect(await tursoShardManager.getAllShards("project", newHash)).toHaveLength(0); }); + + it("updates stored Windows prompt paths using separator-independent matching", async () => { + await createProjects(); + const { userPromptManager } = + await import("../src/services/user-prompt/user-prompt-manager.js"); + const promptId = await userPromptManager.savePrompt( + "windows-session", + "windows-message", + "C:\\workspace\\old-project", + "Windows path prompt" + ); + + const updated = await userPromptManager.updateProjectPath( + "C:/workspace/old-project", + "C:\\workspace\\new-project" + ); + + expect(updated).toBe(1); + expect((await userPromptManager.getPromptById(promptId))?.projectPath).toBe( + "C:\\workspace\\new-project" + ); + }); });