From 5c3a32d0c69636a235cc13697efc4d98ea9040a9 Mon Sep 17 00:00:00 2001 From: abhigyanpatwari Date: Fri, 27 Feb 2026 11:31:07 +0530 Subject: [PATCH] fix(kuzu): remove duplicate ftsLoaded declaration that broke typecheck The module-level `let ftsLoaded` was declared twice (line 19 and 679), causing TS2451. Removed the duplicate and cleaned up redundant assignments in loadFTSExtension. Co-Authored-By: Claude Opus 4.6 --- gitnexus/src/core/kuzu/kuzu-adapter.ts | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/gitnexus/src/core/kuzu/kuzu-adapter.ts b/gitnexus/src/core/kuzu/kuzu-adapter.ts index 1ba30d15b..3f20f9084 100644 --- a/gitnexus/src/core/kuzu/kuzu-adapter.ts +++ b/gitnexus/src/core/kuzu/kuzu-adapter.ts @@ -674,22 +674,18 @@ export const getEmbeddingTableName = (): string => EMBEDDING_TABLE_NAME; /** * Load the FTS extension (required before using FTS functions). - * Safe to call multiple times — tracks loaded state. + * Safe to call multiple times — tracks loaded state via module-level ftsLoaded. */ -let ftsLoaded = false; export const loadFTSExtension = async (): Promise => { if (ftsLoaded) return; if (!conn) { throw new Error('KuzuDB not initialized. Call initKuzu first.'); } - if (ftsLoaded) return; try { await conn.query('INSTALL fts'); await conn.query('LOAD EXTENSION fts'); - ftsLoaded = true; } catch { // Extension may already be loaded - ftsLoaded = true; } ftsLoaded = true; };