Skip to content

Add plugin marketplaces from the UI instead of editing settings.json#325640

Open
samueltauil wants to merge 2 commits into
microsoft:mainfrom
samueltauil:feature/add-plugin-marketplace-from-ui
Open

Add plugin marketplaces from the UI instead of editing settings.json#325640
samueltauil wants to merge 2 commits into
microsoft:mainfrom
samueltauil:feature/add-plugin-marketplace-from-ui

Conversation

@samueltauil

@samueltauil samueltauil commented Jul 13, 2026

Copy link
Copy Markdown

Why

Registering an agent-plugin marketplace today means opening settings and hand-editing the chat.plugins.marketplaces array. You have to know the setting exists, know the accepted formats (owner/repo, a git URL, or a file:// 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 accepts owner/repo, a git URL, or a file:// path. It validates the reference, skips duplicates, respects the organization strictMarketplaces policy, writes to chat.plugins.marketplaces at user scope, and reveals the result in the Agent Plugins view.

It is reachable from three places:

  1. The Command Palette (Chat: Add Plugin Marketplace).
  2. The Agent Plugins view title action Manage Plugin Marketplaces, which now leads with an Add Marketplace... item and offers it as the empty state.
  3. The Agents window plugin list + menu.

The URI handler and the new command now share a single addConfiguredMarketplace helper, 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: new addConfiguredMarketplace helper.
  • 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: AddPluginMarketplaceAction and 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.
  • ESLint on the changed files: clean.
  • New unit tests in addConfiguredMarketplace.test.ts cover append, whitespace trim, duplicate no-op, equivalent git-URL de-dupe, and invalid reference no-op. All pass.
  • Manual: added a real marketplace, confirmed it appended to chat.plugins.marketplaces without 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.

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.
Copilot AI review requested due to automatic review settings July 13, 2026 15:32
@samueltauil

Copy link
Copy Markdown
Author
shot-command-palette shot-input-empty shot-input-validation shot-manage-quickpick shot-real-repo-clean

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Adds guided UI flows for configuring agent-plugin marketplaces while centralizing validation and deduplication.

Changes:

  • Adds the Chat: Add Plugin Marketplace command 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,
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.

3 participants