automations: move Agent/Model pickers into the automation dialog composer - #337590
Merged
Merged
Conversation
Relocate the Agent mode and Model pickers from the standalone Session configuration toolbar into the chat input composer, matching how the New Chat composer surfaces the same controls. Execution mode and permissions remain below the prompt, and the now-redundant Session configuration header is removed. - �utomationDialog.ts reuses ChatInputPart.inputToolbarElement as the embedded Agent/Model lane and keeps execution/permission controls in a separate labelled group below the prompt. - chatInputPart.ts exposes the existing input toolbar element as a narrow, reusable getter. - modelPicker.ts and �gentHostAgentPicker.ts contribute Agent/Model actions to the new Menus.AutomationsDialogInputToolbar menu, with responsive/compact support for the embedded layout. - mobileChatInputConfigPicker.ts registers the combined phone picker against the same menu so phone layout stays equivalent. - �utomationsAccessibility.ts documents the new control layout in the dialog's accessibility help. - Tests updated/extended to cover embedded vs. below-input placement, accessible grouping, and menu gating on desktop vs. phone.
The New Session and Automation dialog pickers showed the cloud-hosted agent as \Cloud\, which reads as an infrastructure detail rather than the product name users pick. Rename the label to \Copilot\ to match how it's presented elsewhere.
Adds a component-explorer fixture for the automation dialog's Default and Populated states, exercising the real `renderForm` export and a real `Dialog` instance (matching `externalSessionBanner.fixture.ts`'s precedent) rather than hand-built dialog chrome. Follows existing fixture conventions: - Agent-mode and execution/permission chips use plain synthetic `FixtureMenuService` entries (matching `newChatWidget.fixture.ts` / `renderChatInput.ts`), avoiding a non-provider fixture importing provider-specific picker contribution classes across the layer boundary. - The Model picker keeps its real `AutomationModelPickerContribution` (a legitimate same-layer, non-provider import), preserving the real thinking-effort/context config-summary chip (e.g. "GPT-5.4 · High · 872K"). `modelPicker.ts`'s `AutomationModelPickerContribution` stays exported so the fixture can instantiate it directly. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot started reviewing on behalf of
Ben Villalobos (benvillalobos)
September 23, 2026 23:50
View session
Contributor
There was a problem hiding this comment.
Copilot review overview
🔵 Needs a closer look
Agent and mobile pickers become inaccessible when moved into the toolbar overflow.
Review effort: Balanced
Findings: None
What changed in this PR
Aligns the Automation dialog composer with New Session and adds fixture coverage.
Changes:
- Moves Agent/Model pickers into the prompt toolbar.
- Moves execution/permission controls below the prompt.
- Updates Copilot labeling, accessibility help, tests, and fixtures.
| File | Review |
|---|---|
src/vs/workbench/contrib/chat/browser/widget/input/chatInputPart.ts |
Exposes the input toolbar element. |
src/vs/sessions/contrib/sessions/browser/views/automationsAccessibility.ts |
Updates help text, but should clarify arrow-key navigation within toolbars. |
src/vs/sessions/contrib/providers/copilotChatSessions/test/browser/copilotChatSessionsProvider.test.ts |
Updates label expectations. |
src/vs/sessions/contrib/providers/copilotChatSessions/browser/copilotChatSessionsProvider.ts |
Renames the Cloud label to Copilot. |
src/vs/sessions/contrib/providers/agentHost/test/browser/agentHostAgentPicker.test.ts |
Tests automation toolbar contributions. |
src/vs/sessions/contrib/providers/agentHost/browser/mobile/mobileChatInputConfigPicker.ts |
Adds mobile picker support, but lacks overflow activation support. |
src/vs/sessions/contrib/providers/agentHost/browser/agentHostAgentPicker.ts |
Adds Agent picker support, but lacks overflow activation support. |
src/vs/sessions/contrib/chat/test/browser/modelPicker.test.ts |
Tests model picker registration and responsiveness. |
src/vs/sessions/contrib/chat/browser/modelPicker.ts |
Adds the Automation Model picker contribution. |
src/vs/sessions/contrib/automations/test/browser/automationDialog.test.ts |
Verifies the revised layout and accessibility state. |
src/vs/sessions/contrib/automations/test/browser/automationDialog.fixture.ts |
Adds default and populated themed fixtures. |
src/vs/sessions/contrib/automations/browser/media/automationDialog.css |
Styles the revised layout. |
src/vs/sessions/contrib/automations/browser/automationDialog.ts |
Reorganizes composer and session controls. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Contributor
|
Base:
|
…at changes Merging main brought in an upstream refactor that moved 'changes'/'changesets' from ISession to IChat. The fixture's mock ISession still overrode them, and its mock ISession.modelId/mode were derived from another mocked class's same-named properties (chat.modelId/chat.mode) rather than independent literals like every other override in that class - both trigger TS4113 (override modifier target not found) under tsgo/tsc on the merged tree even though the interfaces do declare those members. Fixed by giving session.modelId/session.mode their own constObservable(...) literals (matching the rest of the class) and moving the changes/changesets mocks onto the chat object, which is what production code (readSessionChangesStats) actually reads from.
Defer the new Automation dialog fixture and its export-only adaptation to follow-up work because its shared-bundle CSS ordering changes unrelated screenshots. Restore the existing Cloud provider label. Keep this PR focused on picker placement, required wiring, accessibility, and tests without changing global chat backgrounds or screenshot baselines. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot started reviewing on behalf of
Ben Villalobos (benvillalobos)
September 24, 2026 18:18
View session
Contributor
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
The actual picker toolbar remains unnamed for assistive technologies while another control receives duplicate labeling.
Get a fresh assessment by requesting another Copilot review.
Review effort: Balanced
Findings: 1
Open (1)
Preserve main's picker DOM/control access for Try this and its regression tests while retaining the Automation-only toolbar contributions and responsive wiring. Resolve the two model-picker conflicts by combining both sets of imports and test suites. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Forward the prompt toolbar label through ChatInputPart to the existing ActionBar API and remove redundant wrapper group roles. Assert the names on real nested toolbars and ensure each label appears only once. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Ben Villalobos (benvillalobos)
marked this pull request as ready for review
September 24, 2026 20:55
Michael Lively (Yoyokrazy)
approved these changes
Sep 24, 2026
Ben Villalobos (benvillalobos)
deleted the
automation-dialog-fixture
branch
September 24, 2026 21:05
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.

Fixes #336999
Back to this style, while keeping workspace / worktree / session type above the prompt field.
What
How
Reuse the existing Automation input-toolbar menu and the chat input's responsive toolbar while retaining the provider-draft-backed model/configuration behavior. Update the related accessibility help and regression tests.
Scope
This PR is limited to picker placement and its required wiring, accessibility, and tests. The new dialog component fixture is deferred to follow-up work because its shared-bundle CSS ordering affected unrelated screenshots. The existing Cloud provider label is preserved. There are no global chat-background or screenshot-baseline changes.
Validation
npm run typecheck-client, targeted ESLint,git diff --check, and commit-time hygiene pass.