Skip to content

chat: Make customizations multi-root workspace aware - #335592

Draft
Jessie Houghton (houghj16) wants to merge 1 commit into
mainfrom
agents/customizations-multi-root-workspace
Draft

chat: Make customizations multi-root workspace aware#335592
Jessie Houghton (houghj16) wants to merge 1 commit into
mainfrom
agents/customizations-multi-root-workspace

Conversation

@houghj16

@houghj16 Jessie Houghton (houghj16) commented Sep 10, 2026

Copy link
Copy Markdown
Contributor

Summary

  • group workspace agents, skills, instructions, prompts, and hooks under separate headers for each folder in multi-root workspaces
  • scope customization and hook creation flows to the workspace folder where the action was invoked
  • show source paths in file customization rows and source paths or plugin provenance for MCP servers, with descriptions available from the existing row hover
  • remove redundant workspace-folder prefixes from rows and scoped location pickers

Customization page comparisons

Instructions

The row now shows the source path instead of the description, without repeating the workspace folder name. The description remains available in the row hover.

Instructions page before and after

Hooks

Hooks are grouped by workspace folder and show their source paths. Creating a hook from a workspace section scopes the hook file choices and destination to that workspace.

Hooks page before and after

Agents

Agents are grouped by workspace folder and show their source paths, with descriptions available in the row hover.

Agents page before and after

MCP Servers

MCP server rows now show the source path or Plugin: <plugin name> instead of the description. The description remains available in the row hover when present.

MCP Servers page before and after

Skills workflow

Before

  • All skills show up in the Workspace section, and the only way to tell which skill is part of which workspace is to hover or click it.
  • The skill line item contains the name and description, while the folder/path is shown on hover.
  • Clicking New Skill surfaces all folder options for every workspace in the quick pick.

Skills page before: one combined Workspace section

New Skill before: folder options from every workspace

Proposal

  • Each workspace has its own section.
  • The skill line item contains the name and path, with the description shown on hover.
  • Clicking New Skill surfaces only the folder options for the workspace where the action originated.

Skills page proposal: separate sections for each workspace

New Skill proposal: folder options scoped to the selected workspace

Questions

  • With migration in mind, should I consider removing some of the available options?
  • Would it be best to prioritize .github over .agents in the quick pick and add a Recommended label?
  • For other New Skill entry points, the quick pick will likely need to allow selecting the workspace first, then selecting the folder.

Testing

  • npm run compile
  • scripts\test.bat --run src\vs\workbench\contrib\chat\test\browser\aiCustomization\aiCustomizationListWidget.test.ts --run src\vs\workbench\contrib\chat\test\browser\aiCustomization\customizationCreatorService.test.ts --run src\vs\workbench\contrib\chat\test\browser\aiCustomization\mcpListWidget.test.ts --run src\vs\workbench\contrib\chat\test\browser\promptSyntax\hookActions.test.ts (90 passing)
  • hygiene checks and git diff --check
  • visually verified Agents, Instructions, Hooks, Prompts, and MCP Servers component fixtures

Fixes #332290
Fixes #333755
Addresses #332543

Group workspace customizations by folder, scope creation flows to the originating workspace, and consistently show source provenance in customization rows while moving descriptions to hovers.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI balanced review requested due to automatic review settings September 10, 2026 23:14

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.

Copilot review overview

🟡 Changes recommended

AI generation remains unscoped, and source/description information has accessibility and remote-workspace regressions.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Review tier: Balanced
Findings: 3 Medium severity

New issues introduced by this change (3)
Severity Finding
Medium severity src/​vs/​workbench/​contrib/​chat/​browser/​aiCustomization/​aiCustomizationItemSource.ts — Preserve source paths for remote workspace files
Medium severity src/​vs/​workbench/​contrib/​chat/​browser/​aiCustomization/​aiCustomizationListWidget.ts — Propagate the originating folder to AI generation
Medium severity src/​vs/​workbench/​contrib/​chat/​browser/​aiCustomization/​mcpListWidget.ts — Expose MCP provenance in the row's ARIA label
What changed in this PR

Makes AI customizations multi-root aware by grouping items per workspace folder and scoping manual creation flows.

Changes:

  • Adds per-folder customization sections and source paths.
  • Scopes manual customization and hook creation.
  • Adds MCP provenance and updated tests/fixtures.
File Description
aiCustomizationManagementEditor.fixture.ts Adds MCP source fixtures.
hookActions.test.ts Tests workspace hook filtering.
mcpListWidget.test.ts Tests provenance and hover text.
customizationCreatorService.test.ts Tests folder-scoped creation locations.
aiCustomizationListWidget.test.ts Tests grouping, paths, and creation context.
hookActions.ts Scopes hook selection and creation.
mcpListWidget.ts Displays MCP source provenance.
customizationCreatorService.ts Filters and labels creation destinations.
aiCustomizationManagementEditor.ts Propagates workspace-folder context.
aiCustomizationListWidgetUtils.ts Uses filenames as secondary text.
aiCustomizationListWidget.ts Adds per-folder grouping and actions.
aiCustomizationItemSource.ts Removes workspace prefixes from labels.

💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment on lines 211 to 213
filename: item.uri.scheme === Schemas.file
? this.labelService.getUriLabel(item.uri, { relative: isWorkspaceItem })
? this.labelService.getUriLabel(item.uri, { relative: isWorkspaceItem, noPrefix: isWorkspaceItem })
: basename(item.uri),
readonly kind?: 'generate';
readonly target?: 'workspace' | 'user';
run(): void;
run(workspaceFolder?: URI): void;
Comment on lines +268 to +270
const secondaryText = this.getSecondaryText(element);
templateData.description.textContent = secondaryText ?? '';
templateData.description.style.display = secondaryText ? '' : 'none';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants