Deep Diff LinksA deep-linkable diff viewer for code reviews in VS Code and Cursor. Turn Markdown code-review comments into clickable, contextual Git diffs. Jump directly to the changes being discussed, even when you're on another branch, without disturbing your working tree. Just tell your favorite LLM to produce a guided review document with those links and save hours by reading what matters. How it worksA review written in Markdown points at the exact change it's talking about:
Click the link, in the Markdown preview or in the source, and the built-in diff editor opens:
ScopeThis extension does one thing: open precise historical diffs from review documents written outside the editor. It deliberately has:
It is not a replacement for GitLens or other general git tools, and it works alongside them. Feature requests outside this scope will be declined. Link format
Partial diffs (
|
| Setting | Default | |
|---|---|---|
deepDiffLinks.maxFileBytes |
10485760 |
If either side is bigger than this, you get a notice instead of the diff. |
Errors
Every failure shows a notification and writes a line to the Deep Diff Links output channel.
| Code | When |
|---|---|
| U3 | A commit isn't in the clone |
| U6 | The path isn't in either commit |
| U11 | Info only: no changes in the requested lines |
| U8 / U9 | No workspace folder, or more than one, has the repo name |
| E1 | A parameter is invalid (the message names the parameter, never its value) |
| E2 | Git failed or timed out (10 s) |
| E3 | The built-in Git extension is disabled |
| E4 | The matched folder isn't a git repository |
Binary files show Binary file, cannot display. Submodule entries and directories get similar placeholders.
Development
npm run test:unit # validator, git argument building, error mapping, fixture-repo reads
npm run test:integration # downloads VS Code and runs the suite against a generated fixture repo
CDL_EDITOR=/Applications/Cursor.app/Contents/MacOS/Cursor node out/test/integration/runTest.js # same suite in Cursor
CDL_GREP='source editor' npm run test:integration # run a subset
The link address is the extension id, <publisher>.<name> from package.json. If either changes, add the old id to LEGACY_IDS in src/extension.ts so old links keep working from Markdown.
Layout
| File | Role |
|---|---|
src/validator.ts |
Pure §5.1 checks |
src/gitReader.ts |
execFile wrapper (argument arrays, timeouts, error mapping) |
src/fileAtCommit.ts |
Commit resolution, file reads, binary detection |
src/repoResolver.ts |
repo → workspace folder → repository root, via the Git extension API |
src/contentProvider.ts |
deep-diff:// scheme with an in-memory cache |
src/hunkSelector.ts |
Partial diffs: -U0 block parsing, selection, synthetic side |
src/linkRewriter.ts |
Rewrites links to the running editor's scheme, in the preview (markdown-it plugin) and the source editor (link provider) |
src/diffOpener.ts |
Reads both sides, checks U6 and size, then calls vscode.diff |
src/uriHandler.ts |
Entry point; turns every failure into a notification and a log line |
License
Copyright (c) 2026 Olivier Cado. Released under the MIT License. See AUTHORS and the changelog.