Skip to content

Conversation

@joshspicer
Copy link
Member

No description provided.

Copilot AI review requested due to automatic review settings January 29, 2026 16:29
@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

This PR filters out git worktrees from the repository list when determining GitHub repository IDs in multi-root workspace scenarios. The change prevents worktrees (which share remote URLs with their parent repositories) from creating duplicate repository ID entries.

Changes:

  • Modified getRepoId() to filter out repositories with kind === 'worktree' in multi-root workspace scenarios
Comments suppressed due to low confidence (1)

src/extension/chatSessions/vscode/copilotCodingAgentUtils.ts:94

  • The single repository case should also filter out worktrees for consistency with the multi-root case. Currently, if the active repository is a worktree, it will be included here but would be filtered out in the multi-root case. Consider adding a check: if (repo && repo.kind !== 'worktree' && repo.remoteFetchUrls?.[0]) to ensure worktrees are consistently excluded.
	const repo = gitService.activeRepository.get();
	if (repo && repo.remoteFetchUrls?.[0]) {
		const id = getGithubRepoIdFromFetchUrl(repo.remoteFetchUrls[0]);
		if (id) {
			return [id];
		}
	}

@joshspicer joshspicer enabled auto-merge January 29, 2026 16:36
@joshspicer joshspicer added this pull request to the merge queue Jan 29, 2026
Merged via the queue into main with commit ea0b085 Jan 29, 2026
25 checks passed
@joshspicer joshspicer deleted the joshspicer/filteroutworktree branch January 29, 2026 16:57
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