Skip to content

feat: enhance session customization handling with throttling and cancellation support#320038

Merged
DonJayamanne merged 5 commits into
mainfrom
don/costly-junglefowl
Jun 5, 2026
Merged

feat: enhance session customization handling with throttling and cancellation support#320038
DonJayamanne merged 5 commits into
mainfrom
don/costly-junglefowl

Conversation

@DonJayamanne
Copy link
Copy Markdown
Contributor

No description provided.

Copilot AI review requested due to automatic review settings June 5, 2026 03:01
@DonJayamanne DonJayamanne 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 agent-host session customization discovery and bundling behavior by reducing redundant filesystem writes and making refresh handling more robust under rapid change (via throttling + cancellation-aware refresh).

Changes:

  • Optimize SessionPluginBundler.bundle() to skip deleting/re-writing the on-disk plugin bundle when the computed content nonce is unchanged.
  • Introduce throttled, cancellation-aware refresh logic in SessionDiscoveredEntry to avoid unstable intermediate states during repeated discovery updates.
  • Add/adjust unit tests to validate “no rewrite on identical content” and “clears discovered customizations when roots disappear”.
Show a summary per file
File Description
src/vs/platform/agentHost/node/shared/sessionPluginBundler.ts Avoids re-writing bundle output when the content-based nonce is unchanged.
src/vs/platform/agentHost/node/copilot/copilotAgent.ts Adds throttling + cancellation handling to session-discovered customization refreshes.
src/vs/platform/agentHost/test/node/sessionCustomizationDiscovery.test.ts Extends nonce stability test to assert no filesystem writes/deletes on identical rebundles.
src/vs/platform/agentHost/test/node/copilotAgent.test.ts Adds test ensuring discovered directory customizations clear when the underlying directory is deleted.

Copilot's findings

  • Files reviewed: 4/4 changed files
  • Comments generated: 5

Comment thread src/vs/platform/agentHost/node/copilot/copilotAgent.ts
Comment thread src/vs/platform/agentHost/test/node/copilotAgent.test.ts
Comment thread src/vs/platform/agentHost/node/copilot/copilotAgent.ts Outdated
Comment thread src/vs/platform/agentHost/node/copilot/copilotAgent.ts Outdated
DonJayamanne and others added 4 commits June 5, 2026 13:09
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@DonJayamanne DonJayamanne requested a review from Copilot June 5, 2026 03:30
@DonJayamanne DonJayamanne marked this pull request as ready for review June 5, 2026 03:33
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.

Copilot's findings

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

Comment thread src/vs/platform/agentHost/node/shared/sessionPluginBundler.ts
@DonJayamanne DonJayamanne enabled auto-merge (squash) June 5, 2026 03:56
@DonJayamanne DonJayamanne merged commit df25ea5 into main Jun 5, 2026
26 checks passed
@DonJayamanne DonJayamanne deleted the don/costly-junglefowl branch June 5, 2026 04:10
@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