feat: add hyperlink support to GitBranch and GitRootDir widgets#224
Open
ereli-sevenai wants to merge 2 commits intosirmalloc:mainfrom
Open
feat: add hyperlink support to GitBranch and GitRootDir widgets#224ereli-sevenai wants to merge 2 commits intosirmalloc:mainfrom
ereli-sevenai wants to merge 2 commits intosirmalloc:mainfrom
Conversation
- GitBranch: toggle (l)ink wraps branch name in OSC 8 link to github.com/owner/repo/tree/<branch>; only activates for GitHub remotes, falls back to plain text otherwise - GitRootDir: toggle (l)ink wraps project root name in OSC 8 cursor://file/<path> link to open the directory in Cursor - Add shared src/utils/hyperlink.ts with renderOsc8Link and parseGitHubBaseUrl helpers Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
feat: add hyperlink support to GitBranch and GitRootDir widgets
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
(l)ink to GitHubtoggle: when enabled, the branch name becomes a clickable OSC 8 terminal hyperlink pointing tohttps://github.com/owner/repo/tree/<branch>. Only activates when the git remote is a GitHub URL — non-GitHub remotes display plain text.(l)ink to Cursortoggle: when enabled, the project/subtree root name becomes a clickablecursor://file/<path>hyperlink that opens the directory in Cursor.src/utils/hyperlink.tsprovidesrenderOsc8LinkandparseGitHubBaseUrlhelpers, used by both widgets.Test plan
lto toggle GitHub link on/off — modifier text shows(GitHub link)when activelto toggle Cursor link on/off — modifier text shows(Cursor link)when active🤖 Generated with Claude Code