Skip to content

context-mode v1.7.0 — Local Code Indexing

Choose a tag to compare

@ShmidtS ShmidtS released this 13 May 20:12
· 3 commits to main since this release
932690f

What's New

Local Code Indexing (Merkle diff + hybrid search)

  • Merkle-style incremental indexing — SHA-256 + mtime diff. Re-indexes only changed files.
  • Semantic chunking — tree-sitter AST extraction (functions, classes, interfaces, methods) with tiktoken fallback for unsupported languages.
  • FTS5 + vector hybrid search — BM25 full-text ranking fused with cosine similarity from local embeddings.
  • ONNX / Ollama / zero-vector fallback — all-MiniLM-L6-v2 via onnxruntime-node, Ollama API, or graceful FTS5-only degradation.
  • Cross-encoder reranking — optional ms-marco-MiniLM-L-6-v2 ONNX reranker + heuristic scoring fallback.
  • File watcher — fs.watch with 1-second debounce; persists watch list to ~/.context-mode/watched.json.
  • CLI commands: local-index, local-search, local-repos, local-status.
  • MCP tools: ctx_local_index, ctx_local_search, ctx_local_status, ctx_local_repos, ctx_local_watch, ctx_local_unwatch.
  • WAL-safe SQLite schema — dedicated code-index.db with FTS5 virtual table, vectors BLOB store, and jobs tracking.

Technical Details

  • 384-d embeddings, batch size 32.
  • Tiktoken truncation for result formatting.
  • Lazy model download via .url markers in ~/.context-mode/models/.
  • WAL mode + mmap_size = 256MB for read-heavy search workloads.