pFad - Phone/Frame/Anonymizer/Declutterfier! Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

URL: http://github.com/microsoft/vscode/pull/311131

sets/global-b40ec823a1a6a1af.css" /> agentHost: expand AHP customization refs into per-type items for chat customizations UI by joshspicer · Pull Request #311131 · microsoft/vscode · GitHub
Skip to content

agentHost: expand AHP customization refs into per-type items for chat customizations UI#311131

Draft
joshspicer wants to merge 1 commit intomainfrom
agents/fix-agent-host-protocol-display
Draft

agentHost: expand AHP customization refs into per-type items for chat customizations UI#311131
joshspicer wants to merge 1 commit intomainfrom
agents/fix-agent-host-protocol-display

Conversation

@joshspicer
Copy link
Copy Markdown
Member

@joshspicer joshspicer commented Apr 18, 2026

Problem

The item source pipeline in fetchItemsFromProvider and normalizeItems filters provider items by item.type === promptType. AHP-contributed customizations use type: 'plugin' (an Open Plugins reference, not a PromptsType enum value), so they were silently dropped in every per-type section (Skills, Agents, Instructions, Hooks, Prompts).

This was introduced in d7c19c5af6e when the group-based display path (sectionToCustomizationGroupIds) was replaced with a type-based filter that assumed all items would have a valid PromptsType.

Fix

Include items whose type is not a recognised PromptsType alongside the type-matched items. This is a 3-line change in aiCustomizationItemSource.ts:

  1. In fetchItemsFromProvider: collect items with unrecognised types (untypedItems) and append them to the filtered set for every section.
  2. In normalizeItems: relax the filter to also pass items with unrecognised types.

AHP customizations now show in every per-type section as flat remote items in the sync layout, with their server-reported status/enabled state preserved. No coupling to local plugin discovery.

Changed files

  • src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationItemSource.ts — relax type filters to include untyped provider items

Copilot AI review requested due to automatic review settings April 18, 2026 01:51
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 18, 2026

Screenshot Changes

Base: 197f33eb Current: e7745714

Changed (4)

chat/aiCustomizations/aiCustomizationManagementEditor/McpBrowseMode/Dark
Before After
before after
editor/inlineCompletions/other/JumpToHint/Dark
Before After
before after
agentSessionsViewer/CompletedUnread/Dark
Before After
before after
agentSessionsViewer/CompletedUnread/Light
Before After
before after

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

Fixes the Sessions window “Chat Customizations” UI for remote Agent Host Protocol (AHP) agents by expanding server-supplied customization plugin refs into per-PromptsType items (skills/agents/prompts/instructions/hooks), making them visible in the corresponding filtered sections.

Changes:

  • Reworked RemoteAgentCustomizationItemProvider to expand each AHP customization ref into per-type ICustomizationItems derived from the matching local IAgentPluginService plugin contents.
  • Added a reactive refresh (autorun) so the customization list updates when local plugin contents change.
  • Wired IAgentPluginService into the remote agent contribution so the provider can resolve/expand plugin refs.
Show a summary per file
File Description
src/vs/sessions/contrib/remoteAgentHost/browser/remoteAgentHostCustomizationHarness.ts Expands AHP customization refs into per-type items using local plugin contents; adds change tracking for plugin updates.
src/vs/sessions/contrib/remoteAgentHost/browser/remoteAgentHost.contribution.ts Passes IAgentPluginService into the customization item provider.

Copilot's findings

  • Files reviewed: 2/2 changed files
  • Comments generated: 2

Comment on lines +160 to +161
const plugin = localPlugins.find(p => p.uri.toString() === refUri.toString());
if (!plugin || !isContributionEnabled(plugin.enablement.get())) {
Copy link

Copilot AI Apr 18, 2026

Choose a reason for hiding this comment

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

Plugin lookup uses p.uri.toString() === refUri.toString(). This is a strict, case-sensitive string comparison and can fail on platforms with case-insensitive paths (e.g. Windows drive letter/path casing) or if URIs differ only by normalization, causing the plugin to be treated as “not installed” and preventing expansion. Prefer URI-aware comparison (e.g. isEqual(p.uri, refUri) from vs/base/common/resources or an injected IUriIdentityService.extUri.isEqual) so matching is robust.

Copilot uses AI. Check for mistakes.
Comment on lines +164 to +173
return [{
uri: refUri,
type: 'plugin',
name: refName,
description: refDescription,
storage: PromptsStorage.plugin,
enabled: overlay.enabled,
status: overlay.status,
statusMessage: overlay.statusMessage,
}];
Copy link

Copilot AI Apr 18, 2026

Choose a reason for hiding this comment

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

The fallback/placeholder item uses type: 'plugin', but the AI Customizations UI filters provider items with item.type === promptType where promptType is a PromptsType value (instructions/prompt/agent/skill/hook). As a result, this placeholder will never render in any section, so missing/disabled local plugins still appear as “no customizations” and are silently dropped. Consider returning a placeholder per relevant PromptsType (or choosing a single section such as PromptsType.prompt) and using the description/statusMessage to indicate the plugin isn't installed locally, so the user can actually see the entry.

Copilot uses AI. Check for mistakes.
The item source pipeline filters provider items by
item.type === promptType, silently dropping items whose type
is not a recognised PromptsType. AHP-contributed customizations
use type 'plugin' (an Open Plugins reference, not a prompt type),
so they were invisible in every per-type section.

Fix by including items with unrecognised types alongside the
type-matched items in both fetchItemsFromProvider and
normalizeItems. This restores visibility for AHP customizations
without coupling the display layer to local plugin discovery.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@joshspicer joshspicer force-pushed the agents/fix-agent-host-protocol-display branch from 2403c6d to e27782c Compare April 20, 2026 15:08
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

pFad - Phonifier reborn

Pfad - The Proxy pFad © 2024 Your Company Name. All rights reserved.





Check this box to remove all script contents from the fetched content.



Check this box to remove all images from the fetched content.


Check this box to remove all CSS styles from the fetched content.


Check this box to keep images inefficiently compressed and original size.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy