Skip to content

Agents - switch back to using repository state in the session tracker to avoid a race condition#309169

Open
lszomoru wants to merge 4 commits intomainfrom
lszomoru/metropolitan-dormouse
Open

Agents - switch back to using repository state in the session tracker to avoid a race condition#309169
lszomoru wants to merge 4 commits intomainfrom
lszomoru/metropolitan-dormouse

Conversation

@lszomoru
Copy link
Copy Markdown
Member

No description provided.

Copilot AI review requested due to automatic review settings April 11, 2026 10:12
@lszomoru lszomoru enabled auto-merge (squash) April 11, 2026 10:12
@lszomoru lszomoru self-assigned this Apr 11, 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 Copilot Agents session repository tracking logic to listen to Git repository state changes (via IGitService) instead of relying on file system watchers, aiming to avoid a race condition while keeping session change metadata up to date.

Changes:

  • Replace workspace file system watchers with Git repository state listeners (repository.state.onDidChange).
  • Add IGitService dependency to open repositories and subscribe to state changes.
  • Rename internal tracking/disposal structures from workspace “watchers” to repository watchers.
Show a summary per file
File Description
extensions/copilot/src/extension/chatSessions/vscode-node/chatSessionRepositoryTracker.ts Switches from filesystem-based change detection to Git repository state change tracking for session refresh/cache invalidation.

Copilot's findings

  • Files reviewed: 1/1 changed files
  • Comments generated: 3

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