agentHost: finish implementing host-level settings#312268
Merged
connor4312 merged 3 commits intomainfrom Apr 24, 2026
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adds the remaining plumbing for host-level (root) agent host settings so the Sessions UI can view/edit root config (for example host-wide permissions) via a synthetic JSONC editor, with schema-backed completion/validation.
Changes:
- Seed and synchronize RootState.config (schema + default values) and expose it through
IAgentHostSessionsProviderwith change events and dispatch helpers. - Add
agent-host-settings://…synthetic settings file system provider + schema registration + UI action (“Open Host Settings”). - Widen dispatch typing across agent host client/server paths to include RootAction.
Show a summary per file
| File | Description |
|---|---|
| src/vs/workbench/contrib/terminal/test/browser/agentHostPty.test.ts | Updates mock dispatch typing to include root actions. |
| src/vs/workbench/contrib/chat/test/browser/agentSessions/agentHostClientTools.test.ts | Updates test mocks to accept root actions. |
| src/vs/workbench/contrib/chat/test/browser/agentSessions/agentHostChatContribution.test.ts | Updates test mocks/dispatch APIs to accept root actions. |
| src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/loggingAgentConnection.ts | Extends logging wrapper dispatch typing to include root actions. |
| src/vs/sessions/sessions.web.main.ts | Registers the new host-settings contribution in the Sessions web entrypoint. |
| src/vs/sessions/sessions.desktop.main.ts | Registers the new host-settings contribution in the Sessions desktop entrypoint. |
| src/vs/sessions/contrib/remoteAgentHost/test/browser/remoteAgentHostSessionsProvider.test.ts | Updates remote provider tests for root action typing. |
| src/vs/sessions/contrib/remoteAgentHost/browser/remoteAgentHostSessionsProvider.ts | Syncs root config from root state when connecting and on root state changes. |
| src/vs/sessions/contrib/chat/test/browser/sessionWorkspacePicker.test.ts | Updates mock providers to satisfy new root-config methods/events. |
| src/vs/sessions/contrib/agentHost/test/browser/localAgentHostSessionsProvider.test.ts | Updates local provider tests for root action typing. |
| src/vs/sessions/contrib/agentHost/browser/localAgentHostSessionsProvider.ts | Syncs root config from root state at startup and on root state changes. |
| src/vs/sessions/contrib/agentHost/browser/baseAgentHostSessionsProvider.ts | Implements root-config caching, change event, and dispatch helpers; syncs from root state. |
| src/vs/sessions/contrib/agentHost/browser/agentSessionSettingsFileSystemProvider.ts | Refactors session-settings provider/schema registrar to use shared config plumbing. |
| src/vs/sessions/contrib/agentHost/browser/agentHostSettingsShared.ts | New shared abstractions for settings FS providers and schema registrars. |
| src/vs/sessions/contrib/agentHost/browser/agentHostSettingsFileSystemProvider.ts | New host-settings FS provider + schema registrar for agent-host-settings://…. |
| src/vs/sessions/contrib/agentHost/browser/agentHostSettings.contribution.ts | Registers FS provider + label formatter and contributes “Open Host Settings” action. |
| src/vs/sessions/common/agentHostSessionsProvider.ts | Extends provider interface with root-config APIs/events. |
| src/vs/platform/agentHost/test/node/protocolServerHandler.test.ts | Updates protocol server handler test typing to include root actions. |
| src/vs/platform/agentHost/test/node/agentHostStateManager.test.ts | Updates root snapshot assertions now that root config is seeded. |
| src/vs/platform/agentHost/node/sessionPermissions.ts | Adjusts permissions logic/comments to reflect host-level inheritance. |
| src/vs/platform/agentHost/node/protocolServerHandler.ts | Accepts root/terminal actions in dispatchAction handling. |
| src/vs/platform/agentHost/node/copilot/copilotAgent.ts | Leaves per-session permissions unset so host-level defaults can apply. |
| src/vs/platform/agentHost/node/agentService.ts | Widens dispatchAction typing to include root actions. |
| src/vs/platform/agentHost/node/agentHostStateManager.ts | Seeds root config schema/defaults and allows dispatching root actions. |
| src/vs/platform/agentHost/electron-browser/agentHostService.ts | Widens dispatch typing for the agent host service client. |
| src/vs/platform/agentHost/common/state/agentSubscription.ts | Allows optimistic dispatch of root actions. |
| src/vs/platform/agentHost/common/agentService.ts | Widens public interfaces to include root actions. |
| src/vs/platform/agentHost/common/agentHostSchema.ts | Updates validateOrDefault behavior and adds platformRootSchema for root config. |
| src/vs/platform/agentHost/browser/remoteAgentHostProtocolClient.ts | Widens dispatchAction typing to include root actions. |
Copilot's findings
- Files reviewed: 29/29 changed files
- Comments generated: 3
roblourens
approved these changes
Apr 24, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.