Skip to content

Copilot AH: show hooks in customizations#322097

Open
aeschli wants to merge 1 commit into
mainfrom
aeschli/lively-tortoise-447
Open

Copilot AH: show hooks in customizations#322097
aeschli wants to merge 1 commit into
mainfrom
aeschli/lively-tortoise-447

Conversation

@aeschli

@aeschli aeschli commented Jun 19, 2026

Copy link
Copy Markdown
Contributor

No description provided.

Copilot AI review requested due to automatic review settings June 19, 2026 13:52
@aeschli aeschli enabled auto-merge (squash) June 19, 2026 13:52
@aeschli aeschli self-assigned this Jun 19, 2026

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.

Pull request overview

This PR extends the Agent Host “customizations” pipeline to include hook files as first-class discovered customizations, so they can be surfaced alongside agents/skills/instructions in the workbench’s customizations UI and covered by agent-host discovery tests.

Changes:

  • Add Hook support to agent-host discovery (DiscoveredType.Hook) including scanning .github/hooks and ~/.copilot/hooks, plus fixed hook settings files (e.g. .github/copilot/settings*.json, .claude/settings*.json).
  • Map discovered hook files into protocol-level CustomizationType.Hook children and workbench-side prompt typing (PromptsType.hook).
  • Expand and update unit tests to cover discovery, watching, and bundling of hook files.
Show a summary per file
File Description
src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentCustomizationItemProvider.ts Maps CustomizationType.HookPromptsType.hook so directory-discovered hooks can be rendered in the customizations UI.
src/vs/platform/agentHost/test/node/sessionCustomizationDiscovery.test.ts Adds coverage for hook discovery (workspace + user), nested hook files, fixed settings files, and watcher behavior.
src/vs/platform/agentHost/node/shared/sessionPluginBundler.ts Adds bundling path mapping for discovered hook files into the synthetic plugin tree.
src/vs/platform/agentHost/node/copilot/sessionCustomizationDiscovery.ts Introduces DiscoveredType.Hook, hook search roots, fixed hook settings discovery, and recursive scanning for *.json hook files.
src/vs/platform/agentHost/node/copilot/copilotAgent.ts Maps discovered hook directories/files into CustomizationType.Hook child customizations.

Copilot's findings

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

Comment on lines +463 to 468
for (const [type, files] of filesByType.entries()) {
if (files.length === 0) {
continue;
}
result.push({ uri: base, type, files: files.sort(compareDiscoveredFile) });
}
Comment on lines 26 to 37
/**
* Maps a {@link DiscoveredType} to the plugin sub-directory under which that
* component type lives in the Open Plugin format.
*/
function pluginDirForType(type: DiscoveredType): string | undefined {
switch (type) {
case DiscoveredType.Agent: return 'agents';
case DiscoveredType.Skill: return 'skills';
case DiscoveredType.Instruction: return 'rules';
case DiscoveredType.Hook: return 'hooks';
case DiscoveredType.AgentInstruction: return undefined;
}
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.

3 participants