Add plugin marketplaces from the UI instead of editing settings.json#325640
Open
samueltauil wants to merge 2 commits into
Open
Add plugin marketplaces from the UI instead of editing settings.json#325640samueltauil wants to merge 2 commits into
samueltauil wants to merge 2 commits into
Conversation
Registering an agent-plugin marketplace previously required hand-editing the chat.plugins.marketplaces array in settings.json. This adds a guided "Chat: Add Plugin Marketplace" command that opens an input box accepting owner/repo, a git URL, or a file:// path. It validates the reference, skips duplicates, respects the strictMarketplaces organization policy, and writes to the setting at user scope. The command is reachable from the Command Palette, the Agent Plugins view "Manage Plugin Marketplaces" title action (now led by an "Add Marketplace..." item), and the Agents window plugin list "+" menu. The URI handler and the new command share one addConfiguredMarketplace helper so the add-and-dedupe logic lives in a single place.
Author
Contributor
There was a problem hiding this comment.
Pull request overview
Adds guided UI flows for configuring agent-plugin marketplaces while centralizing validation and deduplication.
Changes:
- Adds the
Chat: Add Plugin Marketplacecommand and UI entry points. - Centralizes marketplace configuration updates in a shared helper.
- Adds unit coverage for validation and deduplication.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
addConfiguredMarketplace.test.ts |
Tests shared add behavior. |
pluginMarketplaceService.ts |
Re-exports the helper. |
marketplaceReference.ts |
Implements validated configuration updates. |
pluginUrlHandler.ts |
Reuses the shared helper. |
pluginListWidget.ts |
Adds the marketplace menu action. |
chatPluginActions.ts |
Implements command and management flows. |
| return; | ||
| } | ||
|
|
||
| await addConfiguredMarketplace(configurationService, source); |
Comment on lines
+230
to
+232
| if (!options?.skipReveal) { | ||
| extensionsWorkbenchService.openSearch(`@agentPlugins ${ref.displayLabel}`); | ||
| } |
Comment on lines
+821
to
+825
| { | ||
| id: 'plugin.addMarketplace', | ||
| label: localize('addMarketplace', "Add Marketplace..."), | ||
| tooltip: localize('addMarketplaceTooltip', "Add a plugin marketplace to browse and install plugins from"), | ||
| icon: Codicon.globe, |
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.





Why
Registering an agent-plugin marketplace today means opening settings and hand-editing the
chat.plugins.marketplacesarray. You have to know the setting exists, know the accepted formats (owner/repo, a git URL, or afile://path), and get the JSON right. There is no entry point in the places where people actually browse plugins: the Agents window plugin list and the Extensions view Agent Plugins section.This adds a guided way to add a marketplace in a few keystrokes, with validation, de-duplication, and the enterprise policy check handled for you. It writes to the same setting, so nothing about the underlying model changes.
What changed
A new command,
Chat: Add Plugin Marketplace, opens an input box that acceptsowner/repo, a git URL, or afile://path. It validates the reference, skips duplicates, respects the organizationstrictMarketplacespolicy, writes tochat.plugins.marketplacesat user scope, and reveals the result in the Agent Plugins view.It is reachable from three places:
Chat: Add Plugin Marketplace).Manage Plugin Marketplaces, which now leads with anAdd Marketplace...item and offers it as the empty state.+menu.The URI handler and the new command now share a single
addConfiguredMarketplacehelper, so the add-and-dedupe logic that used to be duplicated lives in one place.Files
src/vs/workbench/contrib/chat/common/plugins/marketplaceReference.ts: newaddConfiguredMarketplacehelper.src/vs/workbench/contrib/chat/common/plugins/pluginMarketplaceService.ts: re-export of the helper.src/vs/workbench/contrib/chat/browser/pluginUrlHandler.ts: reuse the shared helper.src/vs/workbench/contrib/chat/browser/actions/chatPluginActions.ts:AddPluginMarketplaceActionand the updated manage flow.src/vs/workbench/contrib/chat/browser/aiCustomization/pluginListWidget.ts:Add Marketplace...in the+menu.src/vs/workbench/contrib/chat/test/common/plugins/addConfiguredMarketplace.test.ts: unit tests.Screenshots
Screenshots are attached below in comments.
Testing
npm run typecheck-client: 0 errors.addConfiguredMarketplace.test.tscover append, whitespace trim, duplicate no-op, equivalent git-URL de-dupe, and invalid reference no-op. All pass.chat.plugins.marketplaceswithout clobbering existing entries and that its plugins appeared in the Agent Plugins view. An invalid reference shows the validation message and makes no change.Notes
This is my first contribution to VS Code. Happy to adjust the approach, wording, or placement of the entry points based on your feedback. If you would prefer this be tracked by an issue first, let me know and I will open one.