Skip to content

Add symbol extraction, inline CodeLens, restore undo, native diff, and fixes#2

Merged
KirtiJha merged 1 commit into
mainfrom
claude/symbols-codelens-undo-AAlOm
Jun 4, 2026
Merged

Add symbol extraction, inline CodeLens, restore undo, native diff, and fixes#2
KirtiJha merged 1 commit into
mainfrom
claude/symbols-codelens-undo-AAlOm

Conversation

@KirtiJha

@KirtiJha KirtiJha commented Jun 4, 2026

Copy link
Copy Markdown
Owner

Symbols (#1):

  • Capture now records the functions/classes a change touched via VS Code's
    document symbol provider (executeDocumentSymbolProvider), plus the active
    function/class. This activates symbol history, the clickable symbol tags, and
    symbol-aware search/embeddings — previously the symbols array was always empty.

Duplicate-embedding fix (#2):

  • Embeddings were generated on CHANGE_CAPTURED, before the row was inserted, so
    updateEmbeddingId() no-op'd and embedding_id stayed NULL -> the change was
    re-embedded (a duplicate vector) on every restart. Now embeds on a new
    CHANGES_FLUSHED event, after insert.

Undo on restore (#3):

  • RestoreResult carries the backup id; a native notification offers one-click
    Undo (wired to the existing undoRestoration).

Inline history CodeLens (#4):

  • New provider shows "N changes in history" above a file and "k versions" above
    each function/class; click to open the file/symbol history. Gated by
    ui.showInlineHistory. Fixed showFileHistory (was matching an absolute path
    against relative-path records).

Native diff compare (#5):

  • "Compare with current" opens VS Code's diff editor (file now <-> before this
    change); "Open diff" shows the change's unified diff with syntax highlighting.

Polish & security:

  • Default log level INFO (opt into DEBUG via codeHistorian.debug); stop popping
    the output panel on every settings save.
  • Stop logging API keys / full settings payloads to the output channel.

Tests/docs:

  • DB-layer integration tests against sql.js in Node (compression round-trip,
    BM25 ranking, bookmarks, retention, symbol/file lookup, stats) via a vscode
    stub. 46 tests total.
  • CHANGELOG + README updated.

…d fixes

Symbols (#1):
- Capture now records the functions/classes a change touched via VS Code's
  document symbol provider (executeDocumentSymbolProvider), plus the active
  function/class. This activates symbol history, the clickable symbol tags, and
  symbol-aware search/embeddings — previously the symbols array was always empty.

Duplicate-embedding fix (#2):
- Embeddings were generated on CHANGE_CAPTURED, before the row was inserted, so
  updateEmbeddingId() no-op'd and embedding_id stayed NULL -> the change was
  re-embedded (a duplicate vector) on every restart. Now embeds on a new
  CHANGES_FLUSHED event, after insert.

Undo on restore (#3):
- RestoreResult carries the backup id; a native notification offers one-click
  Undo (wired to the existing undoRestoration).

Inline history CodeLens (#4):
- New provider shows "N changes in history" above a file and "k versions" above
  each function/class; click to open the file/symbol history. Gated by
  ui.showInlineHistory. Fixed showFileHistory (was matching an absolute path
  against relative-path records).

Native diff compare (#5):
- "Compare with current" opens VS Code's diff editor (file now <-> before this
  change); "Open diff" shows the change's unified diff with syntax highlighting.

Polish & security:
- Default log level INFO (opt into DEBUG via codeHistorian.debug); stop popping
  the output panel on every settings save.
- Stop logging API keys / full settings payloads to the output channel.

Tests/docs:
- DB-layer integration tests against sql.js in Node (compression round-trip,
  BM25 ranking, bookmarks, retention, symbol/file lookup, stats) via a vscode
  stub. 46 tests total.
- CHANGELOG + README updated.
@KirtiJha KirtiJha merged commit 72c176f into main Jun 4, 2026
2 checks passed
@KirtiJha KirtiJha deleted the claude/symbols-codelens-undo-AAlOm branch June 4, 2026 11:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants