Skip to content

chat: hide plugin actions for synced customization items#315320

Merged
joshspicer merged 1 commit intomainfrom
agents/hide-plugin-details-for-synced-customization
May 8, 2026
Merged

chat: hide plugin actions for synced customization items#315320
joshspicer merged 1 commit intomainfrom
agents/hide-plugin-details-for-synced-customization

Conversation

@joshspicer
Copy link
Copy Markdown
Member

Fixes #314879

What

Items from the vscode-synced-customization: scheme are backed by a synthetic plugin — purely an implementation detail of the sync mechanism. Surfacing "Show Plugin" and "Uninstall Plugin" context menu actions for those items is confusing because the plugin concept is not user-facing in this context.

How

Tightened WHEN_ITEM_IS_PLUGIN to also require that the item's plugin URI does not match the vscode-synced-customization: scheme. Since all three plugin-related menu registrations (inline trash icon, 4_modify "Uninstall Plugin", 1_open "Show Plugin") use this single constant, the suppression is automatic for synced customization entries.

const WHEN_ITEM_IS_PLUGIN = ContextKeyExpr.and(
	ContextKeyExpr.equals(AI_CUSTOMIZATION_ITEM_STORAGE_KEY, PromptsStorage.plugin),
	ContextKeyExpr.regex(AI_CUSTOMIZATION_ITEM_PLUGIN_URI_KEY, new RegExp(`^${SYNCED_CUSTOMIZATION_SCHEME}:`)).negate(),
);

Regular (non-synced) plugin items are unaffected.

Items that come from the 'vscode-synced-customization' scheme are backed
by a synthetic plugin that is purely an implementation detail of the sync
mechanism. Showing 'Show Plugin' and 'Uninstall Plugin' context menu
actions for those items is confusing because the plugin concept is not
user-facing in that context.

Tighten WHEN_ITEM_IS_PLUGIN to also require that the plugin URI does NOT
start with the 'vscode-synced-customization:' scheme, so all three
plugin-related menu items (inline trash icon, 'Uninstall Plugin', and
'Show Plugin') are suppressed for synced customization entries.

Fixes: #314879

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings May 8, 2026 17:28
@joshspicer joshspicer enabled auto-merge (squash) May 8, 2026 17:29
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 adjusts the AI Customization management UI so that plugin-specific context menu actions are not shown for synced customization items, which are internally represented via a synthetic plugin under the vscode-synced-customization: scheme.

Changes:

  • Tighten the WHEN_ITEM_IS_PLUGIN when-clause to exclude items whose plugin URI uses the synced customization scheme.
  • Reuse the refined when-clause across all plugin-related menu contributions (“Show Plugin”, “Uninstall Plugin”, and the inline uninstall/trash action).
Show a summary per file
File Description
src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagement.contribution.ts Refines plugin item visibility logic to suppress plugin actions for synced customization entries by checking the plugin URI scheme.

Copilot's findings

  • Files reviewed: 1/1 changed files
  • Comments generated: 0

@joshspicer joshspicer merged commit b0e2250 into main May 8, 2026
29 checks passed
@joshspicer joshspicer deleted the agents/hide-plugin-details-for-synced-customization branch May 8, 2026 17:55
@vs-code-engineering vs-code-engineering Bot added this to the 1.120.0 milestone May 8, 2026
wpfleger96 added a commit to wpfleger96/vscode that referenced this pull request May 8, 2026
…2-not-clearing-terminal-title

* upstream/main:
  chat: hide plugin actions for synced customization items (microsoft#315320)
  fixes microsoft#291188 (microsoft#314713)
  sessions: restore last active session on reload (microsoft#315312)
  Replace "Agents app" with "Agents window" in user-facing strings (microsoft#315302)
  chat: remove 'Bridged' badge from MCP servers in AI Customizations UI (microsoft#315319)
  Add proposal for custom editor diff/merge priority
  agentHost: revert undefined-field omission, update tests instead
  sessions: fix Customizations single-entry width overflow (microsoft#315125)
  agentHost: rewrite Resource attachments and omit undefined fields
  agentHost: support image and blob user-message attachments
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.

AgentHost: Instructions context menu talks about plugins

3 participants