Skip to content

Add .agents workspace and personal path support for prompts, instructions, hooks, and agents#318195

Open
cgorican wants to merge 2 commits into
microsoft:mainfrom
cgorican:main
Open

Add .agents workspace and personal path support for prompts, instructions, hooks, and agents#318195
cgorican wants to merge 2 commits into
microsoft:mainfrom
cgorican:main

Conversation

@cgorican
Copy link
Copy Markdown

Summary

Adds support for resolving .agents workspace folder paths for:

  • agents
  • prompts
  • instructions
  • hooks

Skills were already supported previously, so this change brings the remaining workspace resource types to feature parity.

Changes

  • Added .agents workspace path handling for agent resources
  • Added support for prompt path resolution
  • Added support for instruction path resolution
  • Added support for hook path resolution
  • Kept existing skills behavior unchanged

Motivation

This improves consistency across workspace resource loading and enables all supported resource types to be discovered from the .agents workspace structure.

Copilot AI review requested due to automatic review settings May 25, 2026 08:17
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

Note

Copilot was unable to run its full agentic suite in this review.

Adds support for .agents/* workspace locations for prompt-related files and updates chat configuration defaults to derive enabled source folders from the centralized default folder lists.

Changes:

  • Introduced .agents/agents, .agents/prompts, .agents/instructions, and .agents/hooks folder constants and included them in the relevant default source folder arrays.
  • Updated configuration defaults to be generated from DEFAULT_*_SOURCE_FOLDERS instead of hardcoded per-folder keys.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
src/vs/workbench/contrib/chat/common/promptSyntax/config/promptFileLocations.ts Defines .agents/* folder constants and wires them into default source folder lists for instructions, prompts, agents, and hooks.
src/vs/workbench/contrib/chat/browser/chat.shared.contribution.ts Switches configuration “default enabled folders” objects to be derived from the default folder arrays.

),
default: {
[PROMPT_DEFAULT_SOURCE_FOLDER]: true,
...DEFAULT_PROMPT_SOURCE_FOLDERS.map((folder) => ({ [folder.path]: true })).reduce((acc, curr) => ({ ...acc, ...curr }), {}),
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Kept this approach to maintain consistency with the surrounding field implementations.

[AGENTS_SOURCE_FOLDER]: true,
[CLAUDE_AGENTS_SOURCE_FOLDER]: true,
[COPILOT_USER_AGENTS_SOURCE_FOLDER]: true,
...DEFAULT_AGENT_SOURCE_FOLDERS.map((folder) => ({ [folder.path]: true })).reduce((acc, curr) => ({ ...acc, ...curr }), {}),
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Kept this approach to maintain consistency with the surrounding field implementations.

@cgorican
Copy link
Copy Markdown
Author

@microsoft-github-policy-service agree

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants