Add symbol extraction, inline CodeLens, restore undo, native diff, and fixes#2
Merged
Merged
Conversation
…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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Symbols (#1):
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):
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):
Undo (wired to the existing undoRestoration).
Inline history CodeLens (#4):
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):
change); "Open diff" shows the change's unified diff with syntax highlighting.
Polish & security:
the output panel on every settings save.
Tests/docs:
BM25 ranking, bookmarks, retention, symbol/file lookup, stats) via a vscode
stub. 46 tests total.