github mksglu/context-mode v1.0.66

latest releases: v1.0.75, v1.0.74, v1.0.73...
one day ago

v1.0.66

Breaking Changes

  • ctx_stats no longer accepts a reset parameter. Session data lifecycle is now managed exclusively through ctx_purge. Calls passing reset: true will be ignored.
  • /clear and /compact no longer affect context-mode data. These IDE commands reset only the LLM conversation window — FTS5 indexes, session state, and analytics data persist across clears. Use ctx_purge for explicit data deletion.

New Features

  • ctx_purge tool — Explicit, confirm-gated deletion of all session data (FTS5 index, session DB, analytics). Requires a confirm: true parameter to execute, preventing accidental data loss. Works correctly after --continue resumes. (#200)
  • Platform-isolated content DB — Each IDE/adapter now gets its own FTS5 database, eliminating hash mismatches and cross-contamination between concurrent sessions in different editors (e.g., Claude Code and Copilot running in the same project).
  • CONTEXT_MODE_PROJECT_DIR — New universal environment variable for overriding the project directory across all 12 supported platforms. Replaces the previous OPENCLAW_HOME semantic which incorrectly used the install directory as the project directory.

Bug Fixes

  • #227: ctx_search returning empty results after ctx_batch_execute when the session was started with /clear. Root cause: /clear was resetting the FTS5 index, so batch-indexed content was lost on the next search. Now fixed by decoupling /clear from data lifecycle. (#227)
  • #200: FTS database lifecycle on /clear — previously, clearing conversation history also wiped indexed content. Now handled exclusively by the explicit ctx_purge tool. (#200)
  • Hash mismatch between content DB and session DB on Windows — Platform-isolated DB paths now use hashProjectDir(), a shared helper that produces consistent hashes across all code paths.
  • ctx_purge after --continue — Purge now correctly identifies and deletes session data when resuming a previous session.
  • ctx_purge deletion reporting — The deleted array now honestly reports only items that were actually removed from disk, rather than listing all expected paths.
  • Removed OPENCLAW_HOME semantic bug — The install directory was incorrectly being used as the project directory, causing FTS5 databases to collide across different projects.

Internal

  • Adapter-based session paths via _detectedAdapter — Session and content DB paths are now derived from the detected adapter (e.g., claude-code, vscode-copilot), ensuring platform isolation without user configuration.
  • hashProjectDir() shared helper — Centralised project directory hashing eliminates duplicate logic and prevents hash divergence between content DB and session DB.
  • 85 tests passing — Test suite expanded to cover ctx_purge, platform-isolated DBs, adapter detection, and analytics engine (315+ new test lines in server.test.ts).

Upgrade Notes

  • If you previously relied on ctx_stats(reset: true) to clear session data, switch to ctx_purge(confirm: true).
  • The /clear command in your IDE will continue to work as expected for conversation history — it simply no longer touches context-mode's indexed knowledge base.
  • No configuration changes required. CONTEXT_MODE_PROJECT_DIR is opt-in.

Full diff: 26 files changed, 863 insertions, 316 deletions.

Don't miss a new context-mode release

NewReleases is sending notifications on new releases.