feat: Always enable embeddings, remove enableEmbeddings config option

Testing showed semantic search produces significantly better results for
natural language queries that Claude writes. FTS alone often ranks
properties above their parent classes and misses conceptual matches.
Embeddings are now always on — the vector manager is created eagerly,
with model download and embedding generation still happening lazily.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Colby McHenry
2026-04-03 10:03:41 -05:00
co-authored by Claude Opus 4.6
parent 8b5622d346
commit 7e6914ddff
6 changed files with 10 additions and 29 deletions
+3 -6
View File
@@ -157,12 +157,9 @@ export class CodeGraph {
this.resolver = createResolver(projectRoot, queries);
this.graphManager = new GraphQueryManager(queries);
this.traverser = new GraphTraverser(queries);
// Vector manager is created lazily when embeddings are enabled
// Uses global ~/.codegraph/models directory for shared embedding models
if (config.enableEmbeddings) {
this.vectorManager = createVectorManager(db.getDb(), queries, {});
}
// Context builder (uses vector manager if available)
// Vector manager — always created, embeddings generated lazily on first use
this.vectorManager = createVectorManager(db.getDb(), queries, {});
// Context builder (uses vector manager for semantic search)
this.contextBuilder = createContextBuilder(
projectRoot,
queries,