Skip to content

feat: add plugins to chatPromptFiles API#307669

Merged
joshspicer merged 1 commit intomainfrom
josh/plugins-chatpromptfiles-api
Apr 3, 2026
Merged

feat: add plugins to chatPromptFiles API#307669
joshspicer merged 1 commit intomainfrom
josh/plugins-chatpromptfiles-api

Conversation

@joshspicer
Copy link
Copy Markdown
Member

@joshspicer joshspicer commented Apr 3, 2026

Wire installed agent plugins through the chatPromptFiles proposed API so extensions can discover them.

Changes

  • Add chat.plugins readonly getter and chat.onDidChangePlugins event (uses existing ChatResource type)
  • Add IPluginDto to ext host protocol
  • Push plugins from mainThread via autorun on IAgentPluginService.plugins observable
  • Inject IAgentPluginService into MainThreadChatAgents2

Companion PR: microsoft/vscode-copilot-chat#4962

Copilot AI review requested due to automatic review settings April 3, 2026 16:52
@joshspicer joshspicer marked this pull request as draft April 3, 2026 16:54
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

This PR extends the proposed chatPromptFiles API surface to let extensions discover installed agent plugins by wiring IAgentPluginService.plugins from the main thread into the extension host, alongside existing custom agents/instructions/skills resources.

Changes:

  • Added ChatPluginResource plus chat.plugins and chat.onDidChangePlugins to the chatPromptFiles proposed API.
  • Extended the ext host RPC protocol with IPluginDto and $acceptPlugins(...), and implemented storage/events in ExtHostChatAgents2.
  • Pushed plugin updates from MainThreadChatAgents2 via an autorun over IAgentPluginService.plugins (and injected IAgentPluginService).

Reviewed changes

Copilot reviewed 4 out of 5 changed files in this pull request and generated no comments.

Show a summary per file
File Description
src/vscode-dts/vscode.proposed.chatPromptFiles.d.ts Adds the proposed API typings for plugin resources and change notification.
src/vs/workbench/api/common/extHostChatAgents2.ts Stores plugin list in the ext host and raises onDidChangePlugins when updated by the main thread.
src/vs/workbench/api/common/extHost.protocol.ts Adds IPluginDto and $acceptPlugins to the ext host shape for main-thread-to-ext-host updates.
src/vs/workbench/api/common/extHost.api.impl.ts Exposes vscode.chat.plugins and vscode.chat.onDidChangePlugins behind chatPromptFiles proposal gating.
src/vs/workbench/api/browser/mainThreadChatAgents2.ts Observes IAgentPluginService.plugins and pushes DTOs to the ext host reactively.

Wire installed agent plugins through the chatPromptFiles proposed API:

- Add ChatPluginResource interface with uri + label
- Add chat.plugins getter and chat.onDidChangePlugins event
- Add IPluginDto and $acceptPlugins to ext host protocol
- Push plugins from mainThread via autorun on IAgentPluginService
- Inject IAgentPluginService into MainThreadChatAgents2
@joshspicer joshspicer force-pushed the josh/plugins-chatpromptfiles-api branch from fb6c6f8 to 165f4a2 Compare April 3, 2026 17:15
@joshspicer joshspicer marked this pull request as ready for review April 3, 2026 17:17
Copy link
Copy Markdown
Member

@pwang347 pwang347 left a comment

Choose a reason for hiding this comment

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

@joshspicer joshspicer merged commit 44b152c into main Apr 3, 2026
20 checks passed
@joshspicer joshspicer deleted the josh/plugins-chatpromptfiles-api branch April 3, 2026 17:35
@vs-code-engineering vs-code-engineering bot added this to the 1.115.0 milestone Apr 3, 2026
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.

4 participants