feat(vscode): .md link navigation and stale panel fix#7
Merged
Conversation
- Intercept <a href="*.md"> clicks in the webview and post a navigate message so clicking a link switches the editor to that file instead of opening a browser URL - Add resolveLink() supporting both relative and absolute hrefs; absolute paths walk up the directory tree to find the target file - showTextDocument uses the current editor's viewColumn so the file replaces in-place rather than opening a new tab - Register onDidDispose in deserializeWebviewPanel (mirrors the createOrShowPreview path) so restored panels clean up correctly - Switch vscode:prepublish from tsc to esbuild bundle so wiremd is inlined into the VSIX and the extension activates correctly Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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.
Summary
vscode-plugin-navigation.mp4
.mdlink navigation — clicking<a href="*.md">links in the preview switches the editor to that file in the same column instead of opening a new tab. Supports relative and absolute hrefs; absolute paths walk up the directory tree to locate the target.deserializeWebviewPanelnow registersonDidDisposeto clearthis.panel, matching whatcreateOrShowPreviewalready does. Prevents stale references after VS Code restart.vscode:prepublishfrom plaintscto an esbuild bundle sowiremdis inlined into the VSIX. Without this the extension silently failed to activate (status bar button missing).Test plan
[Label](other.md)link, open the preview, click the link — editor switches toother.mdin the same column, preview updates/pages/other.md) — resolves correctly from any directory depth🤖 Generated with Claude Code