Skip to content

improve copilot AH customization discovery#318745

Merged
aeschli merged 3 commits into
mainfrom
aeschli/sure-quokka-664
May 28, 2026
Merged

improve copilot AH customization discovery#318745
aeschli merged 3 commits into
mainfrom
aeschli/sure-quokka-664

Conversation

@aeschli
Copy link
Copy Markdown
Contributor

@aeschli aeschli commented May 28, 2026

No description provided.

Copilot AI review requested due to automatic review settings May 28, 2026 13:07
@aeschli aeschli enabled auto-merge (squash) May 28, 2026 13:08
@aeschli aeschli self-assigned this May 28, 2026
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 updates the agent host’s Copilot customization discovery to better align with expected folder layouts, including support for discovering instruction files in nested directories and adding a user-home instructions root.

Changes:

  • Adjust agent-folder discovery expectations around excluding README.md.
  • Add discovery coverage for nested *.instructions.md files (workspace + user home).
  • Update SessionCustomizationDiscovery search roots and scanning logic for instructions.
Show a summary per file
File Description
src/vs/platform/agentHost/test/node/sessionCustomizationDiscovery.test.ts Updates/expands discovery tests (README handling, nested instructions).
src/vs/platform/agentHost/node/copilot/sessionCustomizationDiscovery.ts Extends discovery roots and adds recursive scanning for instruction files; adjusts agent scanning behavior.

Copilot's findings

Comments suppressed due to low confidence (1)

src/vs/platform/agentHost/node/copilot/sessionCustomizationDiscovery.ts:166

  • resolve(..., { resolveMetadata: true }) pulls size/mtime/etag metadata for every child entry, but the discovery scan only needs directory entries and names. This can add unnecessary IO overhead on large folders or remote file systems; consider using resolveMetadata: false (and IFileStat) here and in the recursive instruction traversal.
		let stat: IFileStatWithMetadata;
		try {
			stat = await this._fileService.resolve(rootUri, { resolveMetadata: true });
		} catch {
			// Root does not exist (or is unreadable) — nothing to discover or watch.
			return;
		}
		if (!stat.isDirectory || !stat.children) {
			return;
  • Files reviewed: 2/2 changed files
  • Comments generated: 1

Comment thread src/vs/platform/agentHost/node/copilot/sessionCustomizationDiscovery.ts Outdated
@aeschli aeschli marked this pull request as draft May 28, 2026 13:47
auto-merge was automatically disabled May 28, 2026 13:47

Pull request was converted to draft

@aeschli aeschli marked this pull request as ready for review May 28, 2026 16:17
@aeschli aeschli enabled auto-merge (squash) May 28, 2026 16:17
@aeschli aeschli merged commit 3027216 into main May 28, 2026
25 checks passed
@aeschli aeschli deleted the aeschli/sure-quokka-664 branch May 28, 2026 16:41
@vs-code-engineering vs-code-engineering Bot added this to the 1.123.0 milestone May 28, 2026
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