Skip to content

Fix pattern for finding .md files in agents directory#4200

Open
jeremymeng wants to merge 7 commits intomicrosoft:mainfrom
jeremymeng:patch-2
Open

Fix pattern for finding .md files in agents directory#4200
jeremymeng wants to merge 7 commits intomicrosoft:mainfrom
jeremymeng:patch-2

Conversation

@jeremymeng
Copy link
Copy Markdown
Member

@jeremymeng jeremymeng commented Mar 4, 2026

The current relative pattern for finding agent *.md files actually searches all sub directory of the workspace root and causes serious performance issue when large projects are opened in VS Code. This PR limits the search starting point to folder/.github.

Related issue: microsoft/vscode#286778 (comment)

The current relative pattern for finding agent *.md files actually search all sub directory of the workspace root and caused serious performance issue when large projects are opened in VS Code.  This PR limits the search starting point to `folder/.github`.

Related issue: microsoft/vscode#286778 (comment)
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 addresses a performance issue in the Copilot Cloud Sessions provider by narrowing the workspace search scope for custom agent markdown files to the .github folder instead of the full workspace root.

Changes:

  • Adjusts the vscode.workspace.findFiles RelativePattern base to start under .github to avoid scanning large workspaces unnecessarily.

Comment thread src/extension/chatSessions/vscode-node/copilotCloudSessionsProvider.ts Outdated
Comment thread src/extension/chatSessions/vscode-node/copilotCloudSessionsProvider.ts Outdated
@jeremymeng
Copy link
Copy Markdown
Member Author

@lostintangent or anyone can take a look?

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