From 26eb3da05d618aa4fefd2249fc49da2859c16d6f Mon Sep 17 00:00:00 2001 From: rUv Date: Sat, 7 Feb 2026 18:24:04 +0000 Subject: [PATCH] Checkpoint: File edits MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Automatic checkpoint created by Claude Code - Branch: feature/codex-integration - Timestamp: 2026-02-07T18:24:04Z - Changes: 1 file(s) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 --- .../cli/src/memory/memory-initializer.ts | 22 ++++++++++++------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/v3/@claude-flow/cli/src/memory/memory-initializer.ts b/v3/@claude-flow/cli/src/memory/memory-initializer.ts index 3f508594a6..548f3828b8 100644 --- a/v3/@claude-flow/cli/src/memory/memory-initializer.ts +++ b/v3/@claude-flow/cli/src/memory/memory-initializer.ts @@ -1874,14 +1874,20 @@ export async function storeEntry(options: { embeddingModel = embResult.model; } - // Insert entry - db.run(` - INSERT INTO memory_entries ( - id, key, namespace, content, type, - embedding, embedding_dimensions, embedding_model, - tags, metadata, created_at, updated_at, expires_at, status - ) VALUES (?, ?, ?, ?, 'semantic', ?, ?, ?, ?, ?, ?, ?, ?, 'active') - `, [ + // Insert or update entry (upsert mode uses REPLACE) + const insertSql = upsert + ? `INSERT OR REPLACE INTO memory_entries ( + id, key, namespace, content, type, + embedding, embedding_dimensions, embedding_model, + tags, metadata, created_at, updated_at, expires_at, status + ) VALUES (?, ?, ?, ?, 'semantic', ?, ?, ?, ?, ?, ?, ?, ?, 'active')` + : `INSERT INTO memory_entries ( + id, key, namespace, content, type, + embedding, embedding_dimensions, embedding_model, + tags, metadata, created_at, updated_at, expires_at, status + ) VALUES (?, ?, ?, ?, 'semantic', ?, ?, ?, ?, ?, ?, ?, ?, 'active')`; + + db.run(insertSql, [ id, key, namespace,