You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* agent-host: stop redundant customization sync events
Refactors customization syncing to publish state changes as SessionActions
through the session state manager rather than via a per-call progress callback
that emitted full lists each tick. Also avoids redundant `activeClientChanged`
dispatches that were driving large loops of customization/file requests across
the connection.
- `setClientCustomizations` now takes the session URI and publishes
`SessionCustomizationsChanged` once with the resolved list, followed by
`SessionCustomizationUpdated` actions only when an individual customization's
state actually changes.
- `agentSideEffects` no longer wires its own progress callback; it lets the
agent publish actions and forwards action signals into the state manager even
when no turn is active so session-level state (customizations, title, config)
stays consistent.
- `agentHostSessionHandler` no longer claims the active-client role on session
restore, and only re-dispatches `activeClientChanged` when the local view of
`activeClient` actually differs from the session state. The pre-send hook
ensures the active client is current before sending a message.
- `agentCustomizationItemProvider` reads session customizations from the
shared session subscription instead of caching them locally and re-firing on
every customization update.
- Adds tests covering the no-redundant-dispatch behavior and the new progress
publishing flow.
Fixes#316538
(Commit message generated by Copilot)
* address Copilot review and fix provider tests
- copilotAgent: construct SessionCustomizationUpdated explicitly (omit clientId)
- mockAgent: always emit SessionCustomizationsChanged so clears propagate
- agentCustomizationItemProvider: restore session customizations cache and handle both Changed/Updated actions
- agentSideEffects.test: assert clear publishes one empty SessionCustomizationsChanged
* drop local session-customization cache, read from session subscription
Replaces the provider-local _sessionCustomizationsCache with a direct read from the central session subscription via getSubscriptionUnmanaged(StateComponents.Session). The session reducer already maintains 'customizations' from SessionCustomizationsChanged/Updated, so the local mirror only duplicated logic and would have missed state populated before the provider attached. Teaches MockAgentConnection to expose session subscriptions backed by fireAction so tests exercise the same code path.
* build
0 commit comments