Skip to content

Agents - improve the changes observable so that it does not fire too often#315031

Merged
lszomoru merged 1 commit into
mainfrom
lszomoru/fluttering-chickadee
May 7, 2026
Merged

Agents - improve the changes observable so that it does not fire too often#315031
lszomoru merged 1 commit into
mainfrom
lszomoru/fluttering-chickadee

Conversation

@lszomoru
Copy link
Copy Markdown
Member

@lszomoru lszomoru commented May 7, 2026

No description provided.

@lszomoru lszomoru requested review from Copilot and sandy081 May 7, 2026 15:31
@lszomoru lszomoru enabled auto-merge (squash) May 7, 2026 15:32
@lszomoru lszomoru self-assigned this May 7, 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 reduces unnecessary reactive updates in the Agents (sessions) UI by adding a structural equality comparer for session file-change arrays and wiring it into changes observables. This fits into the vs/sessions layer by improving how session providers publish file-change updates without triggering redundant downstream renders/derivations.

Changes:

  • Added sessionFileChangesEqual to perform structural equality checks for arrays of ISessionFileChange.
  • Updated Copilot chat sessions provider observables to use observableValueOpts(..., { equalsFn }) for changes.
  • Updated agent-host sessions provider observables to use observableValueOpts(..., { equalsFn }) for changes.
Show a summary per file
File Description
src/vs/sessions/services/sessions/common/session.ts Introduces a reusable structural equality function for session file-change arrays using URI-aware comparisons.
src/vs/sessions/contrib/copilotChatSessions/browser/copilotChatSessionsProvider.ts Applies the new equality comparer to changes observables to suppress redundant notifications when republishing equivalent arrays.
src/vs/sessions/contrib/agentHost/browser/baseAgentHostSessionsProvider.ts Applies the new equality comparer to agent-host-backed session changes observables to reduce update churn.

Copilot's findings

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

@lszomoru lszomoru merged commit 1b6d7db into main May 7, 2026
30 checks passed
@lszomoru lszomoru deleted the lszomoru/fluttering-chickadee branch May 7, 2026 16:06
@vs-code-engineering vs-code-engineering Bot added this to the 1.120.0 milestone May 7, 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