Skip to content

Conversation

@joshspicer
Copy link
Member

I think we need API changes in provideChatSessionProviderOptions or add some filter() to enable updating other options based on one option

Copilot AI review requested due to automatic review settings January 29, 2026 16:55
@vs-code-engineering vs-code-engineering bot added this to the January 2026 milestone Jan 29, 2026
Copy link
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

Tactically disables the “Custom Agents” chat session option in multi-repo workspaces by avoiding remote custom agent retrieval and tightening the conditions under which the Custom Agents option group is shown.

Changes:

  • Only fetch remote custom agents when exactly one repository is detected.
  • Only show the Custom Agents option group when remote agents exist, or when exactly one repo is detected and local-only agent files exist.
Comments suppressed due to low confidence (1)

src/extension/chatSessions/vscode-node/copilotCloudSessionsProvider.ts:677

  • When repoIds?.length !== 1, customAgents is forced to [] and the Custom Agents option group will never be shown, but the code still calls getLocalCustomAgentFiles(...), which triggers a workspace file search (vscode.workspace.findFiles). Consider skipping the local scan unless Custom Agents are actually eligible to be displayed (e.g., wrap the whole local-scan + option-group construction in a repoIds?.length === 1 guard).
			const { matches, localOnly } = await this.getLocalCustomAgentFiles(
				customAgents.status === 'fulfilled' ? customAgents.value : []
			);

			if ((customAgents.status === 'fulfilled' && customAgents.value.length > 0) || (repoIds?.length === 1 && localOnly.length > 0)) {

@joshspicer joshspicer added this pull request to the merge queue Jan 29, 2026
Merged via the queue into main with commit a5de0c9 Jan 29, 2026
25 checks passed
@joshspicer joshspicer deleted the joshspicer/customagents-more1 branch January 29, 2026 18:20
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