Skip to content

Comments

agent: add preliminary plugin support#296617

Merged
connor4312 merged 4 commits intomainfrom
connor4312/cp-plugins-1
Feb 21, 2026
Merged

agent: add preliminary plugin support#296617
connor4312 merged 4 commits intomainfrom
connor4312/cp-plugins-1

Conversation

@connor4312
Copy link
Member

Supports Copilot-style and the almost identical Claude-style plugins.
In this PR we support skills, commands, and prompts.

There is also a "browse" experience, based on the same registries that
Copilot CLI comes with out of the box, but there is not yet an "Install"
experience.

Demo: https://memes.peet.io/img/26-02-6b29afc1-c3df-4f32-8364-c5307c35d43a.mp4

Supports Copilot-style and the almost identical Claude-style plugins.
In this PR we support skills, commands, and prompts.

There is also a "browse" experience, based on the same registries that
Copilot CLI comes with out of the box, but there is not yet an "Install"
experience.

Demo: https://memes.peet.io/img/26-02-6b29afc1-c3df-4f32-8364-c5307c35d43a.mp4
Copy link
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

This PR adds preliminary plugin support to VS Code's chat functionality, implementing Copilot-style and Claude-style plugin infrastructure. The changes enable plugins to contribute skills, commands, prompts, and MCP server definitions through a filesystem-based discovery mechanism.

Changes:

  • Adds new plugin service infrastructure (IAgentPluginService) for discovering and managing plugins from configured directories
  • Implements plugin marketplace browsing functionality that fetches plugin metadata from GitHub repositories
  • Integrates plugins with the existing prompts system, allowing plugin commands and skills to appear as slash commands
  • Updates slash command validation and completion regex patterns to support colons (:) in command names for namespaced plugin commands
  • Adds MCP discovery adapter to expose plugin-defined MCP servers to the MCP registry

Reviewed changes

Copilot reviewed 11 out of 11 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
agentPluginService.ts Interface definitions for plugin service, discovery, and plugin data structures
agentPluginServiceImpl.ts Implementation of plugin discovery from configured filesystem paths with file watching
pluginMarketplaceService.ts Service to fetch plugin metadata from GitHub marketplace repositories
pluginMcpDiscovery.ts Adapter to register MCP servers defined in plugins to the MCP registry
promptsServiceImpl.ts Integration of plugin commands/skills into the prompts system; refactored cache invalidation logic
promptsService.ts Added optional name and description fields to IPromptFileResource interface
chatInputCompletions.ts Updated regex patterns to support colons in slash command names
chat.contribution.ts Registered new services and configuration settings
chatPluginActions.ts UI actions for managing plugins (enable/disable, browse marketplace, add from folder)
constants.ts Added configuration keys for plugin paths and marketplaces
mcp.contribution.ts Registered plugin MCP discovery in the MCP discovery registry
Comments suppressed due to low confidence (6)

src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputCompletions.ts:294

  • There is a potential inconsistency between the validation regex and the completion regex. The validation pattern in isValidSlashCommandName uses \p{L} to match Unicode letters, but the completion patterns use a-z which only matches ASCII letters. This means users might be able to type slash commands with Unicode letters (which would pass validation) but those commands won't be properly matched by the completion regex. Consider changing the completion pattern to use (@|\\/)[\\p{L}0-9_.:-]* to match the validation pattern.
				const range = computeCompletionRanges(model, position, /\/[a-z0-9_.:-]*/gi);

src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputCompletions.ts:435

  • There is a potential inconsistency between the validation regex and the completion regex. The validation pattern in isValidSlashCommandName uses \p{L} to match Unicode letters, but the completion patterns use a-z which only matches ASCII letters. This means users might be able to type slash commands with Unicode letters (which would pass validation) but those commands won't be properly matched by the completion regex. Consider changing the completion pattern to use (@|\\/)[\\p{L}0-9_.:-]* to match the validation pattern.
				const range = computeCompletionRanges(model, position, /(@|\/)[a-z0-9_.:-]*/gi);

src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputCompletions.ts:502

  • There is a potential inconsistency between the validation regex and the completion regex. The validation pattern in isValidSlashCommandName uses \p{L} to match Unicode letters, but the completion patterns use a-z which only matches ASCII letters. This means users might be able to type slash commands with Unicode letters (which would pass validation) but those commands won't be properly matched by the completion regex. Consider changing the completion pattern to use (@|\\/)[\\p{L}0-9_.:-]* to match the validation pattern.
				const range = computeCompletionRanges(model, position, /(@|\/)[a-z0-9_.:-]*/gi);

src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputCompletions.ts:86

  • There is a potential inconsistency between the validation regex and the completion regex. The validation pattern in isValidSlashCommandName uses \p{L} to match Unicode letters, but the completion patterns use a-z which only matches ASCII letters. This means users might be able to type slash commands with Unicode letters (which would pass validation) but those commands won't be properly matched by the completion regex. Consider changing the completion pattern to use [\\p{L}0-9_.:-]* to match the validation pattern.
				const range = computeCompletionRanges(model, position, /\/[a-z0-9_.:-]*/gi);

src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputCompletions.ts:335

  • There is a potential inconsistency between the validation regex and the completion regex. The validation pattern in isValidSlashCommandName uses \p{L} to match Unicode letters, but the completion patterns use a-z which only matches ASCII letters. This means users might be able to type slash commands with Unicode letters (which would pass validation) but those commands won't be properly matched by the completion regex. Consider changing the completion pattern to use (@|\\/)[\\p{L}0-9_.:-]* to match the validation pattern.
				const range = computeCompletionRanges(model, position, /(@|\/)[a-z0-9_.:-]*/gi);

src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputCompletions.ts:555

  • There is a potential inconsistency between the validation regex and the completion regex. The validation pattern in isValidSlashCommandName uses \p{L} to match Unicode letters, but the completion patterns use a-z which only matches ASCII letters. This means users might be able to type slash commands with Unicode letters (which would pass validation) but those commands won't be properly matched by this check. Consider changing the pattern to use \\/[\\p{L}0-9_.:-]* to match the validation pattern.
			if (!(partAfterAgent instanceof ChatRequestTextPart) || !partAfterAgent.text.trim().match(/^(\/[a-z0-9_.:-]*)?$/i)) {

@connor4312 connor4312 merged commit 127ba17 into main Feb 21, 2026
19 checks passed
@connor4312 connor4312 deleted the connor4312/cp-plugins-1 branch February 21, 2026 00:26
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.

2 participants