chat: add URL handlers for plugin installation and marketplace registration#302556
Merged
connor4312 merged 2 commits intomainfrom Mar 17, 2026
Merged
chat: add URL handlers for plugin installation and marketplace registration#302556connor4312 merged 2 commits intomainfrom
connor4312 merged 2 commits intomainfrom
Conversation
…ration Adds a PluginUrlHandler workbench contribution that handles vscode:// URIs for plugin-related actions: - vscode://chat-plugin/install?source=<owner/repo or base64> triggers plugin installation from a GitHub repo or git clone URL, with a trust confirmation dialog before proceeding. - vscode://chat-plugin/add-marketplace?ref=<owner/repo or base64> adds a marketplace reference to the user's chat.plugins.marketplaces setting, deduplicating against existing entries. - Query parameters support both plain-text (owner/repo) and base64-encoded values, with validation fallback: tries base64 decode first, then raw value. - Includes unit tests covering routing, base64/plain-text decoding, dialog confirmation/rejection, missing/invalid params, and marketplace dedup. Fixes #302316 (Commit message generated by Copilot)
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a new workbench URL handler contribution under the chat workbench to support vscode://chat-plugin/... URIs for plugin installation and marketplace registration, aligning with existing URL-handler patterns in the workbench.
Changes:
- Introduce
PluginUrlHandlerworkbench contribution to route/installand/add-marketplaceactions viavscode://chat-plugin/...URLs. - Register the handler in
chat.contribution.tsatWorkbenchPhase.BlockRestore. - Add unit tests covering routing, confirmation dialogs, param decoding, invalid params, and basic dedup behavior.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 5 comments.
| File | Description |
|---|---|
| src/vs/workbench/contrib/chat/browser/pluginUrlHandler.ts | Implements the vscode://chat-plugin/* URL handler and confirmation flows. |
| src/vs/workbench/contrib/chat/browser/chat.contribution.ts | Wires the new handler into the chat workbench contributions. |
| src/vs/workbench/contrib/chat/test/browser/plugins/pluginUrlHandler.test.ts | Adds unit tests for URL routing, decoding, confirmation, and marketplace updates. |
You can also share your feedback on Copilot code review. Take the survey.
roblourens
previously approved these changes
Mar 17, 2026
roblourens
approved these changes
Mar 17, 2026
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.
Adds a PluginUrlHandler workbench contribution that handles vscode:// URIs for
plugin-related actions:
installation from a GitHub repo or git clone URL, with a trust confirmation
dialog before proceeding.
marketplace reference to the user's \chat.plugins.marketplaces\ setting,
deduplicating against existing entries.
values, with validation fallback: tries base64 decode first, then raw value.
confirmation/rejection, missing/invalid params, and marketplace dedup.
Fixes #302316
(Commit message generated by Copilot)