Skip to content

use nonce when comparing customizations changes#320102

Merged
aeschli merged 1 commit into
mainfrom
aeschli/noisy-hedgehog-213
Jun 5, 2026
Merged

use nonce when comparing customizations changes#320102
aeschli merged 1 commit into
mainfrom
aeschli/noisy-hedgehog-213

Conversation

@aeschli
Copy link
Copy Markdown
Contributor

@aeschli aeschli commented Jun 5, 2026

No description provided.

Copilot AI review requested due to automatic review settings June 5, 2026 13:20
@aeschli aeschli enabled auto-merge (squash) June 5, 2026 13:20
@aeschli aeschli self-assigned this Jun 5, 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 refines how BaseAgentHostSessionsProvider detects session customization changes so that onDidChangeCustomAgents / onDidChangeCustomizations only fire when relevant customization inputs actually change (reducing unnecessary picker recomputation during frequent SessionState updates).

Changes:

  • Added a customizationsChanged(previous, state) helper to centralize customization-diff logic.
  • Switched the two SessionState update fan-out paths to use the helper (instead of raw reference comparisons), including nonce-based comparison for activeClient.customizations.
Show a summary per file
File Description
src/vs/sessions/contrib/providers/agentHost/browser/baseAgentHostSessionsProvider.ts Adds customizationsChanged and uses it to gate customization-change events during session state updates.

Copilot's findings

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

Comment on lines +596 to +601
return arrayEquals(previousActiveCustomizations, currentActiveCustomizations, (a, b) => {
if (a.nonce !== undefined && a.nonce === b.nonce) {
return true;
}
return a === b;
});
@aeschli aeschli merged commit f2aa048 into main Jun 5, 2026
40 of 41 checks passed
@aeschli aeschli deleted the aeschli/noisy-hedgehog-213 branch June 5, 2026 17:33
@vs-code-engineering vs-code-engineering Bot added this to the 1.124.0 milestone Jun 5, 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