Problem
The create-pull-request skill currently instructs AI agents to rewrite canonical GitHub pull request links such as:
https://github.com/microsoft/vscode/pull/330860
into extension-specific deep links:
vscode-insiders://github.vscode-pull-request-github/open-pull-request-webview?uri=https://github.com/microsoft/vscode/pull/330860
This leaks client and extension implementation details into agent output. It also means:
- AI must know which editor and extension will handle the link.
- Generated content is tied to either
vscode:// or vscode-insiders://.
- Copying the link produces a VS Code-specific URI instead of the canonical GitHub URL.
- Other clients cannot interpret the link.
- Users cannot choose whether PR links open in VS Code or their browser.
Agents should only need to emit canonical, portable GitHub URLs.
Proposal
Have the GitHub Pull Requests extension register an external URI opener for supported GitHub pull request URLs using VS Code's proposed ExternalUriOpener API:
- Recognize canonical PR URLs such as
https://github.com/{owner}/{repository}/pull/{number}.
- Recognize equivalent URLs for configured GitHub Enterprise hosts.
- Open matching URLs in the Pull Request webview.
- Leave the browser available as an opener.
- Integrate with VS Code's existing opener selection and
workbench.externalUriOpeners configuration so users can choose their preferred behavior.
The create-pull-request skill could then return a normal Markdown link:
Created PR [#330860](https://github.com/microsoft/vscode/pull/330860) targeting `main`.
VS Code would resolve the preferred opener when the user clicks it.
Desired behavior
When a user clicks a canonical GitHub PR URL:
- If the user has configured a preferred opener, use it.
- Otherwise, offer applicable choices such as:
- Open Pull Request in VS Code
- Open in Default Browser
- Allow the user to configure a default for future PR links.
This should work for links from chat as well as links from editors, hovers, notifications, and other VS Code surfaces that permit contributed external URI openers.
Acceptance criteria
Related
The external URI opener API is currently proposed. If this extension cannot adopt a proposed API, finalizing that API may need to be tracked separately in microsoft/vscode.
Problem
The create-pull-request skill currently instructs AI agents to rewrite canonical GitHub pull request links such as:
into extension-specific deep links:
This leaks client and extension implementation details into agent output. It also means:
vscode://orvscode-insiders://.Agents should only need to emit canonical, portable GitHub URLs.
Proposal
Have the GitHub Pull Requests extension register an external URI opener for supported GitHub pull request URLs using VS Code's proposed
ExternalUriOpenerAPI:https://github.com/{owner}/{repository}/pull/{number}.workbench.externalUriOpenersconfiguration so users can choose their preferred behavior.The create-pull-request skill could then return a normal Markdown link:
VS Code would resolve the preferred opener when the user clicks it.
Desired behavior
When a user clicks a canonical GitHub PR URL:
This should work for links from chat as well as links from editors, hovers, notifications, and other VS Code surfaces that permit contributed external URI openers.
Acceptance criteria
vscode://orvscode-insiders://wrapper.Related
The external URI opener API is currently proposed. If this extension cannot adopt a proposed API, finalizing that API may need to be tracked separately in
microsoft/vscode.