Skip to content

chat: add URL handlers for plugin installation and marketplace registration#302556

Merged
connor4312 merged 2 commits intomainfrom
connor4312/302316
Mar 17, 2026
Merged

chat: add URL handlers for plugin installation and marketplace registration#302556
connor4312 merged 2 commits intomainfrom
connor4312/302316

Conversation

@connor4312
Copy link
Copy Markdown
Member

Adds a PluginUrlHandler workbench contribution that handles vscode:// URIs for
plugin-related actions:

  • \�scode://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.
  • \�scode://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)

…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)
Copilot AI review requested due to automatic review settings March 17, 2026 20:58
@connor4312 connor4312 enabled auto-merge (squash) March 17, 2026 20:58
@vs-code-engineering vs-code-engineering bot added this to the 1.113.0 milestone Mar 17, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 PluginUrlHandler workbench contribution to route /install and /add-marketplace actions via vscode://chat-plugin/... URLs.
  • Register the handler in chat.contribution.ts at WorkbenchPhase.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.

Comment thread src/vs/workbench/contrib/chat/browser/pluginUrlHandler.ts
Comment thread src/vs/workbench/contrib/chat/browser/pluginUrlHandler.ts
Comment thread src/vs/workbench/contrib/chat/browser/pluginUrlHandler.ts
roblourens
roblourens previously approved these changes Mar 17, 2026
@connor4312 connor4312 merged commit 988ee7f into main Mar 17, 2026
20 checks passed
@connor4312 connor4312 deleted the connor4312/302316 branch March 17, 2026 22:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

URL Handlers for Plugin Installation from Multiple Sources and Marketplaces

3 participants