Repository navigation
feat: pasted GitHub file links become chips with the file's contents - #575
Merged
Merged
Conversation
A github.com /blob/ link (optionally #L6 or #L6-L9) now converts to a chip like `repo: kustomization.yaml:6`. The agent receives the linked lines and the whole file at that ref, read in one GraphQL query that tries each ref/path split, so branches with slashes resolve and a folder stays a plain link. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
adampeterhiggins
force-pushed
the
ah/fix-github-link-paste-parsing
branch
from
November 13, 2026 15:07
63d5d6a to
e73f12f
Compare
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.
Problem
Pasting a GitHub file link (
github.com/<owner>/<repo>/blob/<ref>/<path>#L6) into the composer left it as plain text. The/blob/URL shape wasn't one of the GitHub links the composer recognises, so the agent got only the URL and had to fetch the file itself.Fix
A file link is now one more kind of GitHub ref (
linkType: "blob",refType: "file"). The existing ref pipeline carries it end to end: the composer chip, the loading chip, the hover card, the RPC, MCPread_context_link, and bare links in chat messages.packages/contracts/src/githubRefs.ts):/blob/<ref>/<path>with an optional#L6,#L6-L9or#L6C2-L9C5anchor. The ref and path are kept joined, because a branch name can contain slashes.apps/server/src/githubIssues/gitHubRefs.ts): onegh api graphqlquery asks forobject(expression: "<ref>:<path>")under an alias for every way the URL can split into ref and path (up to 8 ref segments). The shortest ref that resolves to a blob wins. A missing file or a folder returns null, not a 404, so a folder link stays a plain link.repo: kustomization.yaml:6. Web shows a file-code icon; mobile uses the generic file glyph. The context id includes the path, so two files at one commit don't collapse into one chip.Docs:
docs/user/composer.mdanddocs/fork-differences.md.Verification
composerObjectLinks.test.ts), andGitHubIssues.test.ts(a branch with a slash plus linked lines, a folder treated as not found, a binary file at a SHA).vp run check:changedpasses.ghagainst the private link that prompted this:Not yet done: a pass in the running app with before/after screenshots of the chip.
Claude Opus 5.5 via Claude Code (in T3 Code).
🤖 Generated with Claude Code