Repository navigation
Add md-view: read Markdown files in a side pane - #4
Merged
Merged
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <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.
What
A new mod,
md-view, for reading Markdown files without leaving Claude Code..mdpath Claude mentions in a reply becomes a link. A single click opens the file rendered in a pane docked on the right. Ctrl- or alt-click keeps the terminal's own behaviour./md-view: lists every Markdown file that has come up in the session, newest first. Arrows and Enter pick one; the last file viewed is marked and holds the focus./md-view <path>: previews that file directly.Replies that mention no Markdown file are left to the engine and look exactly as before.
How
hooks/register.tsx: the hooks. Files are collected from each model step (Claude's text, tool inputs, shell commands) and after Write, Edit and Bash calls. Two render hooks read that state:AssistantMessageredraws a reply with pressablefile://links,Panedraws the list or the file.hooks/paths.ts: finds.mdpaths in text and rewrites them into links, leaving code fences, code spans, URLs and unknown files alone.hooks/document.ts: prepares a file for the pane: caps it at 60,000 characters, turns front matter into ayamlblock, stacks tables wider than the pane, sets fenced code blocks apart under their language, and splits the text into pieces theMarkdownelement accepts.Limits
file://links and/md-viewstill works.Checks
claude plugin validate plugins/md-viewclaude plugin test plugins/md-view: 66 passtsc -p plugins/md-view --noEmit: cleanimage-preview(76) andclawd-spinner(8) tests still pass after mergingmain🤖 Generated with Claude Code