Skip to content

Unify new session and active session composer - #342683

Merged
Logan Ramos (lramos15) merged 19 commits into
mainfrom
lramos15/agents/session-agent-model-picker-fix
Oct 20, 2026
Merged

Logan Ramos (lramos15) merged 19 commits into
mainfrom
lramos15/agents/session-agent-model-picker-fix

Conversation

@lramos15

@lramos15 Logan Ramos (lramos15) commented Oct 19, 2026 •

Copy link
Copy Markdown
Member

The Agents window had two chat inputs. Running sessions used the workbench ChatWidget / ChatInputPart, while the new-session and new-chat composers used NewChatInputWidget: a separate implementation of about 4,600 lines with its own editor, attachments, completions, slash commands, paste handling, voice wiring and Send button. Every input feature had to be built twice, and anything that targets "the chat input" (keybindings, commands, accessibility) skipped the composer. That is how this started: the model picker keybindings did nothing before a session existed.

This PR deletes the separate composer. The new-session and new-chat composers now host the same ChatWidget as a running session, and only add what is specific to starting one.

What we gain from unification

  • One input, one behavior. The composer is a registered chat widget, so chat input commands and keybindings act on it: Send, Open Model Picker (Cmd+Alt+.), Switch to Next Model, Add Context, dictation, paste, focusing notices, and accessibility help. The keybinding bug is fixed by construction rather than with routing special cases.
  • Features come for free. # references, agent host commands and skills, / commands, attachment pills, paste and drag and drop, input notices (tips, migrations, promotions), voice input and draft persistence all come from the shared input. Future chat input work reaches both surfaces without a port.
  • No more drift. Model selection, send gating, slash commands and reference handling each have one implementation, so the composer can no longer quietly fall out of step with the running session's input.
  • Less code. Product code is down 3,875 lines net (+1,863 / −5,738), and tests and fixtures are down 2,236. The old composer and its completion, paste and slash command handlers (about 4,600 lines) are replaced by about 1,000 lines of composer glue.

How it works

  • SharedChatInputComposer renders a ChatWidget bound to the draft session's chat model. The host still owns workspace selection, session creation and sending.
  • ChatWidget / ChatInputPart gain small, generic host options, so an embedder can own parts of the input instead of forking it:
    • submitHandler + hostSubmit: the host sends, and decides when Send is enabled and how it is labeled.
    • hostModelSelection: the session provider owns the model; the input's model commands, picker and notifications act on it.
    • deferredNotificationsEnabled, ownsDraftVoiceSession, menus.inputToolbar and inputPartHorizontalPadding. renderGettingStartedTip: false now leaves the tip slot to the host.
  • The Agents window pickers (agent, mode and permissions, model, session controls, busy state) are contributed to the input toolbar through Menus.NewSessionChatInputToolbar and action view items instead of being hand-built.
  • What remains composer-specific: client-side slash commands run before the host sends, inline references are re-based for the trimmed prompt, attachments added before render are kept, and a draft-targeted Voice Mode session belongs to the composer (segmented control and decorations).
  • File search for github-remote-file workspaces moves from an agent-host-specific provider to the generic FileSystemFileSearchProvider.

Behavior changes for reviewers

  • Status items render in the input's own status row, as in running sessions (below the input on phones).
  • Add Context opens the workbench picker, and dictation uses the workbench command.
  • The input chrome (Send button, input height) matches the running session's input. The blocks-ci hashes for the new-session fixtures are updated, and each changed image was compared against main.
  • Pasted context that carries an icon, such as an issue picked from the workspace row, renders as its icon and name instead of "Pasted …".
  • Removed: the NewSessionConfig and NewSessionAttachContext menus, and the old composer's custom OpenTelemetry status hover.

How to test

In the Agents window:

  1. In the new-session composer, Cmd+Alt+. opens the model picker, and Chat: Switch to Next Model changes the model.
  2. /models opens the model picker and /blobby opens Customize Blobby, without starting a session. A # file reference is sent with the prompt.
  3. Add Context, paste, Send, and Alt+Enter (send in the background) work.
  4. In a running session, a new chat (Cmd+T) uses the same composer.
  5. With sessions.chat.experimental.newSessionComposerLayout on, the controls move into the input, and the phone layout keeps the chip lane above the input.

Validation on 61d0cbc63b2:

Command Result
npm run typecheck-client Passed
npm run eslint -- $(git diff --name-only --diff-filter=ACMR origin/main...HEAD -- '*.ts') Passed (49 files)
node build/hygiene.ts $(git diff --name-only --diff-filter=ACMR origin/main...HEAD) Passed (58 files)
npm run valid-layers-check Passed
npm run check-cyclic-dependencies Passed
./scripts/test.sh --runGlob '{vs/sessions/contrib/chat/test/**/*.test.js,vs/sessions/contrib/providers/agentHost/test/**/*.test.js,vs/workbench/contrib/chat/test/browser/widget/**/*.test.js,vs/workbench/contrib/chat/test/browser/voiceClient/*.test.js,vs/workbench/services/search/test/common/*.test.js}' Passed (5,913 passing, 25 pending)
Component fixtures (sessions/ and chat), rendered in the component explorer 3,614 of 3,616 render; the 2 sessions/chatReferences failures also fail on main
CI Screenshots check Passed

The changes were also checked live in Code OSS: model picker keybindings, Compare Models, slash commands, inline references, Add Context, send, the in-session composer, and the experimental layout toggle.

Copilot AI balanced review requested due to automatic review settings October 19, 2026 20:45
@vs-code-engineering

vs-code-engineering Bot commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

📬 CODENOTIFY

The following users are being notified based on files changed in this PR:

Benjamin Christopher Simmonds (@benibenj)

Matched files:

  • src/vs/sessions/browser/parts/mobile/mobileChatShell.css

Sandeep Somavarapu (@sandy081)

Matched files:

  • src/vs/sessions/services/sessions/browser/sessionContext.ts

Ladislau Szomoru (@lszomoru)

Matched files:

  • src/vs/sessions/services/sessions/browser/sessionContext.ts

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The composer migration leaves functional regressions in submission metadata, command handling, session references, and Voice Mode integration.

3 open issues
What changed in this PR

Unifies the Agents Window composers around the shared chat widget so new and active sessions use common input behavior and keybindings.

Changes:

  • Migrates composer controls, model selection, submission, and prompt options to shared infrastructure.
  • Removes standalone completion, paste, voice UI, and styling implementations.
  • Generalizes file-system search and updates related tests and fixtures.
File Description
src/​vs/​workbench/​test/​browser/​componentFixtures/​chat/​chatFixtureUtils.ts Adds shared-widget fixture services.
src/​vs/​workbench/​services/​search/​test/​common/​fileSystemFileSearchProvider.test.ts Updates search-provider tests.
src/​vs/​workbench/​services/​search/​common/​fileSystemFileSearchProvider.ts Generalizes file-system search.
src/​vs/​workbench/​services/​agentHost/​common/​agentHostFileSystemService.ts Uses the generalized search provider.
src/​vs/​workbench/​contrib/​chat/​test/​browser/​widget/​input/​chatInputPart.test.ts Tests host-owned input behavior.
src/​vs/​workbench/​contrib/​chat/​test/​browser/​widget/​input/​chatInputModelUtils.test.ts Tests model cycling.
src/​vs/​workbench/​contrib/​chat/​test/​browser/​widget/​chatWidget.test.ts Tests host submission gating.
src/​vs/​workbench/​contrib/​chat/​common/​actions/​chatContextKeys.ts Removes standalone composer context.
src/​vs/​workbench/​contrib/​chat/​browser/​widget/​media/​chat.css Styles host-provided submit labels.
src/​vs/​workbench/​contrib/​chat/​browser/​widget/​input/​chatInputPart.ts Adds host model and submission integration.
src/​vs/​workbench/​contrib/​chat/​browser/​widget/​input/​chatInputModelUtils.ts Extracts model cycling helper.
src/​vs/​workbench/​contrib/​chat/​browser/​widget/​chatWidget.ts Forwards host input options.
src/​vs/​workbench/​contrib/​chat/​browser/​voiceClient/​media/​voiceGlow.css Removes obsolete toolbar selector.
src/​vs/​workbench/​contrib/​chat/​browser/​speechToText/​media/​dictationMicGlow.css Removes standalone mic selector.
src/​vs/​workbench/​contrib/​chat/​browser/​chat.ts Extends widget hosting contracts.
src/​vs/​workbench/​contrib/​chat/​browser/​actions/​chatActions.ts Uses shared chat focus context.
src/​vs/​sessions/​sessions.common.main.ts Loads composer contributions.
src/​vs/​sessions/​contrib/​providers/​agentHost/​test/​browser/​agentHostAgentPicker.test.ts Updates picker and context-menu tests.
src/​vs/​sessions/​contrib/​providers/​agentHost/​test/​browser/​agentHost/​agentHostSessionConfigPicker.test.ts Updates toolbar expectations.
src/​vs/​sessions/​contrib/​providers/​agentHost/​browser/​mobile/​mobileChatInputConfigPicker.ts Moves mobile picker registration.
src/​vs/​sessions/​contrib/​providers/​agentHost/​browser/​agentHostAgentPicker.ts Adapts agent actions and shortcut.
src/​vs/​sessions/​contrib/​fileTreeView/​browser/​githubFileSystemProvider.ts Indexes directory children.
src/​vs/​sessions/​contrib/​fileTreeView/​browser/​fileTreeView.contribution.ts Registers GitHub file search.
src/​vs/​sessions/​contrib/​chat/​test/​browser/​slashCommands.test.ts Removes standalone command tests.
src/​vs/​sessions/​contrib/​chat/​test/​browser/​sharedChatInputComposer.test.ts Tests shared composer lifecycle.
src/​vs/​sessions/​contrib/​chat/​test/​browser/​sessionWorkspacePicker.test.ts Removes old context-action test.
src/​vs/​sessions/​contrib/​chat/​test/​browser/​newSessionPromptOptions.test.ts Targets extracted presenter.
src/​vs/​sessions/​contrib/​chat/​test/​browser/​newSessionComposerLayout.test.ts Adapts layout harnesses.
src/​vs/​sessions/​contrib/​chat/​test/​browser/​newChatWidget.test.ts Adapts composer tests.
src/​vs/​sessions/​contrib/​chat/​test/​browser/​newChatVoiceTarget.test.ts Removes obsolete voice-helper tests.
src/​vs/​sessions/​contrib/​chat/​test/​browser/​newChatUserInteraction.test.ts Updates submission harness.
src/​vs/​sessions/​contrib/​chat/​test/​browser/​newChatModelPicker.test.ts Tests shared model commands.
src/​vs/​sessions/​contrib/​chat/​test/​browser/​newChatInputPaste.test.ts Removes standalone paste tests.
src/​vs/​sessions/​contrib/​chat/​test/​browser/​newChatInput.fixture.ts Removes standalone input fixtures.
src/​vs/​sessions/​contrib/​chat/​test/​browser/​chatView.test.ts Updates shared-input expectations.
src/​vs/​sessions/​contrib/​chat/​test/​browser/​agentHostInputCompletions.test.ts Removes standalone completion tests.
src/​vs/​sessions/​contrib/​chat/​browser/​voiceInputDecorations.ts Removes obsolete stylesheet import.
src/​vs/​sessions/​contrib/​chat/​browser/​variableCompletions.ts Removes standalone file completions.
src/​vs/​sessions/​contrib/​chat/​browser/​sharedChatInputComposer.contribution.ts Registers shared composer toolbar items.
src/​vs/​sessions/​contrib/​chat/​browser/​sessionWorkspacePicker.ts Removes old context-action API.
src/​vs/​sessions/​contrib/​chat/​browser/​sessionsChatAccessibilityHelp.ts Updates dictation shortcut reference.
src/​vs/​sessions/​contrib/​chat/​browser/​sessionReferenceCompletions.ts Removes standalone session completions.
src/​vs/​sessions/​contrib/​chat/​browser/​newSessionPromptOptions.ts Extracts prompt-options presenter.
src/​vs/​sessions/​contrib/​chat/​browser/​newSessionConfigToolbars.ts Removes old configuration toolbar factory.
src/​vs/​sessions/​contrib/​chat/​browser/​newChatWidget.ts Adopts shared composer.
src/​vs/​sessions/​contrib/​chat/​browser/​newChatVoice.ts Removes standalone voice UI controller.
src/​vs/​sessions/​contrib/​chat/​browser/​newChatModelPicker.ts Adds host model commands.
src/​vs/​sessions/​contrib/​chat/​browser/​newChatInSessionWidget.ts Adopts shared peer-chat composer.
src/​vs/​sessions/​contrib/​chat/​browser/​newChatInputPasteTarget.ts Removes standalone paste adapter.
src/​vs/​sessions/​contrib/​chat/​browser/​newChatComposerInput.ts Defines composer options and helpers.
src/​vs/​sessions/​contrib/​chat/​browser/​modelPicker.ts Registers shared-toolbar model picker.
src/​vs/​sessions/​contrib/​chat/​browser/​media/​voiceChatView.css Removes standalone voice styling.
src/​vs/​sessions/​contrib/​chat/​browser/​media/​sharedChatInputComposer.css Styles input-only widget hosting.
src/​vs/​sessions/​contrib/​chat/​browser/​media/​newChatInSession.css Removes obsolete composer overrides.
src/​vs/​sessions/​contrib/​chat/​browser/​media/​chatWidget.css Removes obsolete toolbar styles.
src/​vs/​sessions/​contrib/​chat/​browser/​media/​chatInputMobile.css Removes standalone mobile input styles.
src/​vs/​sessions/​contrib/​chat/​browser/​chatView.ts Removes obsolete voice stylesheet import.
src/​vs/​sessions/​common/​contextkeys.ts Removes old attachment-menu context key.
src/​vs/​sessions/​browser/​parts/​mobile/​mobileChatShell.css Removes obsolete mobile toolbar override.
src/​vs/​sessions/​browser/​menus.ts Defines shared composer toolbar menu.

Review effort: Balanced

@lramos15
Logan Ramos (lramos15) force-pushed the lramos15/agents/session-agent-model-picker-fix branch from 6659c88 to c58b1e1 Compare October 19, 2026 21:10
@github-actions

github-actions Bot commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

Screenshot Changes

Base: 7c4967fa Current: 2e154d79

Changed (86)

sessions/chat/input/chatInput/SessionsWindowVoicePickerSpacing/Light
Before After
before after
sessions/chat/input/chatInput/SessionsWindowModelConfiguration/Light
Before After
before after
sessions/chat/input/chatInput/CodexWriterLock/Light
Before After
before after
sessions/chat/input/chatInput/CodexWriterLockNarrow/Light
Before After
before after
sessions/chat/input/chatInput/CodexWriterLockChecking/Light
Before After
before after
sessions/chat/input/chatInput/ResponsiveModelResizeCycleExpanded/Light
Before After
before after
sessions/chat/input/chatInput/ResponsiveModelResizeCycleEllipsized/Light
Before After
before after
sessions/chat/newWidget/newChatWidget/Migrations/Light
Before After
before after
sessions/chat/newWidget/newChatWidget/MigrationsNarrow/Light
Before After
before after
sessions/chat/newWidget/newChatWidget/MigrationsBackground/Light
Before After
before after
sessions/chat/newWidget/newChatWidget/ConnectorRecommendationsBefore/Light
Before After
before after
sessions/chat/newWidget/newChatWidget/ConnectorRecommendations/Light
Before After
before after
sessions/chat/newWidget/newChatWidget/ConnectorRecommendationsNarrow/Light
Before After
before after
sessions/chat/newWidget/newChatWidget/ConnectorRecommendationsOneDismissed/Light
Before After
before after
sessions/chat/newWidget/newChatWidget/ConnectorRecommendationsTwoDismissed/Light
Before After
before after
sessions/chat/newWidget/newChatWidget/ConnectorRecommendationsFallbackIcons/Light
Before After
before after
sessions/chat/newWidget/newChatWidget/ConnectorRecommendationsBackground/Light
Before After
before after
sessions/chat/newWidget/newChatWidget/ConnectorRecommendationsWithNotices/Light
Before After
before after
sessions/chat/newWidget/newChatWidget/ConnectorRecommendationsShortAfterLayoutToggle/Light
Before After
before after
sessions/chat/newWidget/newChatWidget/ConnectorRecommendationsFocused/Light
Before After
before after
sessions/chat/newWidget/newChatWidget/ConnectorRecommendationsPhone/Light
Before After
before after
sessions/chat/newWidget/newChatWidget/ConnectorRecommendationsPhoneWithNotices/Light
Before After
before after
sessions/chat/newWidget/newChatWidget/NewSessionDefault/Light
Before After
before after
sessions/chat/newWidget/newChatWidget/NewSessionUnifiedWorkspacePicker/Light
Before After
before after
sessions/chat/newWidget/newChatWidget/NewSessionExperimentalComposer/Light
Before After
before after
sessions/chat/newWidget/newChatWidget/NewSessionExperimentalComposerBackground/Light
Before After
before after
sessions/chat/newWidget/newChatWidget/NewSessionOptionsExpanded/Light
Before After
before after
sessions/chat/newWidget/newChatWidget/NewSessionOptionsCollapsed/Light
Before After
before after
sessions/chat/newWidget/newChatWidget/NewSessionOptionsIconRail/Light
Before After
before after
sessions/chat/newWidget/newChatWidget/NewSessionOptionsAnimated/Light
Before After
before after
sessions/chat/newWidget/newChatWidget/NewSessionOptionsExpandedNarrow/Light
Before After
before after
sessions/chat/newWidget/newChatWidget/NewSessionPromptPickers/Light
Before After
before after
sessions/chat/newWidget/newChatWidget/NewSessionVoicePickerSpacing/Light
Before After
before after
sessions/chat/newWidget/newChatWidget/NewSessionPromptPickersNarrow/Light
Before After
before after
sessions/chat/newWidget/newChatWidget/NewSessionPromptPickersCompact/Light
Before After
before after
sessions/chat/newWidget/newChatWidget/NewSessionChatBackground/Light
Before After
before after
sessions/chat/newWidget/newChatWidget/NewSessionBackgroundControls/Light
Before After
before after
sessions/chat/newWidget/newChatWidget/NewSessionAutoModel/Light
Before After
before after
sessions/chat/newWidget/newChatWidget/NewSessionCompactAutoModel/Light
Before After
before after
sessions/chat/newWidget/newChatWidget/NewSessionConfiguredModel/Light
Before After
before after
sessions/chat/newWidget/newChatWidget/NewSessionCompactConfiguredModel/Light
Before After
before after
sessions/chat/newWidget/newChatWidget/NewSessionWorkspacePicker/Light
Before After
before after
sessions/chat/newWidget/newChatWidget/NewSessionComparisonSetup/Light
Before After
before after
sessions/chat/newWidget/newChatWidget/NewSessionGitHubContextPicker/Light
Before After
before after
sessions/chat/newWidget/newChatWidget/NewSessionAttachedContext/Light
Before After
before after
sessions/chat/newWidget/newChatWidget/NewSessionPhoneAttachedContext/Light
Before After
before after
sessions/chat/newWidget/newChatWidget/NewSessionPhoneWelcomePhrase/Light
Before After
before after
sessions/chat/newWidget/newChatWidget/NewSessionPhoneSettingsDisabled/Light
Before After
before after
sessions/chat/newWidget/newChatWidget/NewSessionPhoneUnifiedWorkspacePicker/Light
Before After
before after
sessions/chat/newWidget/newChatWidget/NewSessionPhoneExperimentalComposer/Light
Before After
before after
sessions/chat/newWidget/newChatWidget/NewSessionRemoteWorkspace/Light
Before After
before after
sessions/chat/newWidget/newChatWidget/NewSessionNarrow/Light
Before After
before after
sessions/chat/newWidget/newChatWidget/NewSessionComments/Light
Before After
before after
sessions/chat/newWidget/newChatWidget/NewSessionTip/Light
Before After
before after
sessions/chat/newWidget/newChatWidget/PromptOptionsLoading/Light
Before After
before after
sessions/chat/newWidget/newChatWidget/PromptOptionsStandard/Light
Before After
before after
sessions/chat/newWidget/newChatWidget/PromptOptionsGitHubMixed/Light
Before After
before after
sessions/chat/newWidget/newChatWidget/PromptOptionsSelected/Light
Before After
before after
sessions/chat/newWidget/newChatWidget/PromptOptionsEditedDisabled/Light
Before After
before after
sessions/chat/newWidget/newChatWidget/PromptOptionsNarrow/Light
Before After
before after
sessions/agentHostModePicker/NewChat/Light
Before After
before after
sessions/agentHostModePicker/NewChatPermissions/Light
Before After
before after
sessions/agentHostModePicker/NewChatSeparatePermissions/Light
Before After
before after
sessions/agentHostModePicker/MobilePermissions/Light
Before After
before after
sessions/agentHostModePicker/MobilePermissionsNarrow/Light
Before After
before after
sessions/agentHostModePicker/NewChatCompact/Light
Before After
before after
chat/agent-lifecycle/chatAgentLifecycle/OffscreenSubagentApprovals/Light
Before After
before after
chat/input/chatInput/WithProviderIcon/Light
Before After
before after
chat/input/chatInput/WithShortModelName/Light
Before After
before after
chat/input/chatInput/CopilotHarnessCombinedPickers/Light
Before After
before after
chat/input/chatInput/WithCopilotIntroduction/Light
Before After
before after
chat/input/chatInput/NarrowWithCopilotIntroduction/Light
Before After
before after
chat/input/chatInput/NarrowWithCopilotIntroductionFeedback/Light
Before After
before after
chat/input/chatInput/CopilotIntroductionExperiments/current-dismiss/Light
Before After
before after
chat/input/chatInput/CopilotIntroductionExperiments/current-feedback/Light
Before After
before after
chat/input/chatInput/CopilotIntroductionExperiments/capabilities-dismiss/Light
Before After
before after
chat/input/chatInput/CopilotIntroductionExperiments/capabilities-feedback/Light
Before After
before after
chat/input/chatInput/CopilotIntroductionExperiments/agent-dismiss/Light
Before After
before after
chat/input/chatInput/CopilotIntroductionExperiments/agent-feedback/Light
Before After
before after
chat/input/chatInput/CopilotIntroductionExperiments/original-dismiss/Light
Before After
before after
chat/input/chatInput/CopilotIntroductionExperiments/original-feedback/Light
Before After
before after
chat/input/tabbedModelPicker/InputPicker/Light
Before After
before after
chat/input/tabbedModelPicker/InputPickerAuto/Light
Before After
before after
chat/input/tabbedModelPicker/InputPickerOnDeviceLoading/Light
Before After
before after
chat/input/tabbedModelPicker/InputPickerOnDeviceReady/Light
Before After
before after
chat/input/tabbedModelPicker/InputPickerOnDeviceReloading/Light
Before After
before after

Removed (15)

sessions/chat/newInput/newChatInput/WithPetAndNotification/Light

baseline

sessions/chat/newInput/newChatInput/CompareAttempts/Light

baseline

sessions/chat/newInput/newChatInput/CompareAttemptsDisabled/Light

baseline

sessions/chat/newInput/newChatInput/Default/Light

baseline

sessions/chat/newInput/newChatInput/DictationFocused/Light

baseline

sessions/chat/newInput/newChatInput/Selection/Light

baseline

sessions/chat/newInput/newChatInput/SlashCommand/Light

baseline

sessions/chat/newInput/newChatInput/VariableReference/Light

baseline

sessions/chat/newInput/newChatInput/VoiceInputModeDictationFocused/Light

baseline

sessions/chat/newInput/newChatInput/VoiceInputModeVoiceFocused/Light

baseline

sessions/chat/newInput/newChatInput/VoiceModeFocused/Light

baseline

sessions/chat/newInput/newChatInput/WithPet/Light

baseline

sessions/chat/newInput/newChatInput/WithPetAndGettingStartedTip/Light

baseline

sessions/chat/newInput/newChatInput/WithPetAndSubSessionTip/Light

baseline

sessions/chat/newInput/newChatInput/WithSubSessionTip/Light

baseline

@lramos15

Logan Ramos (lramos15) commented Oct 19, 2026 •

Copy link
Copy Markdown
Member Author

@justschen Justin Chen (justschen) left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

a few things and then i think it's good to go, cc Megan Rogge (@meganrogge) cc Sandeep Somavarapu (@sandy081)

Image
  • space between above input pickers
Image

Logan Ramos (lramos15) and others added 13 commits October 20, 2026 08:16
Retarget the experimental tray fixture checks from #342586 to the shared chat input's editor, input surface and Add Context icon.

Co-authored-by: Copilot <[email protected]>
…shared composer

- Give a draft-targeted Voice Mode session to the composer that owns the draft, so its segmented control reflects and disconnects its own connection, and restore the transcript and glow decorations for it.
- Run client-side slash commands such as /models and /blobby in the input instead of handing them to the host, on every submit path.
- Send inline references with ranges relative to the trimmed prompt, and restore them with the prompt when sending fails.

Co-authored-by: Copilot <[email protected]>
…rder

Screenshot review of the shared composer's blocks-ci fixtures found unintended changes:

- Attachments a host adds before the composer renders, such as a new session's initial context, were dropped. They are now kept until the input exists.
- The session controls row rendered inside the composer, so phone layouts placed the chip lane below the input. It renders after the composer again, where the host layout positions it.
- Issue and pull request context picked in the workspace row rendered as pasted text. Labelled pasted context now shows its icon and name.
- The new-session fixture now gives the Send action its real enablement, uses the production model picker classes for its stand-in, keeps Add Context visible in the compact model state, and asserts that initial attachments render.

Co-authored-by: Copilot <[email protected]>
The new-session composer now hosts the workbench chat input, so the automation finds its editor and Send action the same way as in an active session.

Co-authored-by: Copilot <[email protected]>
When a newer draft superseded one that was still loading, the composer cancelled the load. The load is shared with the session's own view and the agent host's prewarm, so cancelling it could drop the session's subscription and leave its first turn without a response. The superseded load is now released when it finishes instead.

Also dispose the prompt options presenter before the input's services, since disposing it restores the input text.

Co-authored-by: Copilot <[email protected]>
The experimental layout's session controls no longer use the base action
item's pointer handling, which flashed the whole group as pressed, ran its
placeholder action and moved focus off the clicked picker. Focus now moves
into the nested pickers.

The input part no longer picks up the session view's input padding inside
the session part, which left a gap below the picker tray and extra space
below the input.

Co-authored-by: Copilot <[email protected]>
- Use the composer's 8/2 editor padding, so the input keeps its height.
- Render ChatInputStatus items in the composer's controls row, including
  the phone chip lane, instead of the input's own status toolbar.
- Keep the pickers in place while attachments grow the input, and inset
  attachment pills like the composer's text.
- Restore the phone Send button's size and shape.
- Keep a labelled attachment's themed icon color, such as an open issue's.
- Show Send enabled in fixtures with comments or a selected prompt option.

Co-authored-by: Copilot <[email protected]>
The lane lives in the secondary toolbar, but it was created, and subscribed
to the widget's session, even when a host renders no secondary toolbar. The
Agents window's new-session composer is such a host: its widget shows the
draft, so the lane subscribed to a session that only exists once sent. The
agent host then tried to restore that session, and when the draft's eager
creation won the race, the restore reset the session during its first turn,
so the turn never completed.

Co-authored-by: Copilot <[email protected]>
The new-session composer set its placeholder once, and the widget replaced
it with a locked agent's "Chat with ..." as soon as it bound the draft.

Co-authored-by: Copilot <[email protected]>
@lramos15
Logan Ramos (lramos15) force-pushed the lramos15/agents/session-agent-model-picker-fix branch from 4436a5c to 6ffe63b Compare October 20, 2026 12:24
The trigger now reports `aria-expanded`, like the input's other pickers, so
screen readers hear the state and the toolbar keeps its open picker
background while the list is shown.

Co-authored-by: Copilot <[email protected]>
The summary was a step smaller than its own model label and than the
permissions split's secondary label beside it, which made the two split
separators look like different sizes.

Co-authored-by: Copilot <[email protected]>
Tray items used 4px horizontal padding, so their hover backgrounds hugged
the content. They now use the 6px picker padding the input toolbar uses.

Co-authored-by: Copilot <[email protected]>
Phones have no hover for the wider padding to frame, and the tray needs the
room: with it, the branch picker dropped its label on a 390px phone.

Co-authored-by: Copilot <[email protected]>
@lramos15
Logan Ramos (lramos15) merged commit d1755aa into main Oct 20, 2026
49 checks passed
@lramos15
Logan Ramos (lramos15) deleted the lramos15/agents/session-agent-model-picker-fix branch October 20, 2026 14:16
@vs-code-engineering vs-code-engineering Bot added this to the 1.144.0 milestone Oct 20, 2026
Logan Ramos (lramos15) added a commit that referenced this pull request Oct 22, 2026
#343370)

* sessions: fix Send and chat binding regressions in the shared composer

The shared composer (#342683) hosts a real ChatWidget bound to a chat
model, which the previous composer never loaded before Send.

- Cloud drafts: the legacy extension seeds a "no repository" placeholder
  when the draft chat loads, and the chat input's option validity check
  disabled Send even though the repository picker had a valid choice.
  Inputs whose host owns submission (hostSubmit) no longer check option
  validity, and the Copilot provider applies the draft's selections when
  its chat model is published, not only on send.
- Cloud drafts used `owner/repo/HEAD` as the repository option id, which
  the extension saved as a recently selected repository. Use `owner/repo`.
- With several chat groups open, the in-session new-chat composer bound
  and sent to the session's active chat, overwriting another chat's
  input. It now binds and sends to the chat its own group shows.

Co-authored-by: Copilot <[email protected]>

* sessions: keep inline references when the composer binds another draft

Binding a new draft's chat model replaces the input with that model's
state. The composer carried its text and attachments over, but not its
inline references (such as `#file:` completions), so the next parse
dropped them and the prompt was sent as plain text without the file.
Carry the references over as the failed-send restore already does.

Co-authored-by: Copilot <[email protected]>

* sessions: drop the path fallback for a Cloud draft's repository option

Cloud drafts are only created for GitHub repository roots, so `repoNwo`
is always available. The root path fallback could only produce the
`owner/repo/HEAD` form this PR fixes.

Co-authored-by: Copilot <[email protected]>

* chat: fix the tabbed model picker fixture's Fusion metadata type

#343258 made `autoModelFusion` a boolean while #343324 set it to an
object in this fixture, which breaks compilation on main. Same change as
#343376.

Co-authored-by: Copilot <[email protected]>

---------

Co-authored-by: Copilot <[email protected]>
Logan Ramos (lramos15) added a commit that referenced this pull request Oct 22, 2026
…er (#343378)

* sessions: restore #session references for /troubleshoot in the composer

#342683 replaced the Agents window composer input and dropped its
`#session` completions. The workbench completions it now relies on skip
agent-host chats, such as Copilot CLI sessions, and reference a session
resource that the sessions management service does not resolve. So
`/troubleshoot #session:<title>` could no longer point the skill at
another session's event log.

Provide `#session` completions in the shared composer again, listing the
Copilot CLI sessions on the composer session's host. Accepting one adds
an inline reference whose value the troubleshoot augmentation resolves.

Co-authored-by: Copilot <[email protected]>

* sessions: keep #session completions while typing a title, and scope them to the input model

- Filter on the inserted `#session:<title>` text. The `#session <title>`
  filter text had no `:`, so the editor hid every suggestion once
  `#session:` was typed.
- Offer completions only for the composer's own input model, not any
  model that shares its resource.

Co-authored-by: Copilot <[email protected]>

* chat: fix the tabbed model picker fixture's Fusion metadata type

#343258 made `autoModelFusion` a boolean while #343324 set it to an
object in this fixture, which breaks compilation on main. Same change as
#343376.

Co-authored-by: Copilot <[email protected]>

---------

Co-authored-by: Copilot <[email protected]>
Ivan Yermakov (yermakoffivan) pushed a commit to yermakoffivan/vscode that referenced this pull request Nov 27, 2026
…view (microsoft#350681)

* View editors: dispose the view before its instantiation service

A view's content can still create instances while it is disposed, such as a
chat input reacting to its text being reset. Disposing the view's scoped
instantiation service first made that throw. The service is now disposed last.

Co-authored-by: Copilot <[email protected]>

* Chat widget: create the request parser once

Clearing a chat input reparses it, and the widget created a new request parser
through its instantiation service on every parse. When a whole editor group or
auxiliary window closes, the group's scoped instantiation service disposes its
children before the editor panes, so the New Session prompt options clearing
their generated prompt on dispose threw "InstantiationService has been
disposed". The widget now creates its parser once, in its constructor.

The view editor pane registers the view's instantiation service right after
creating it, in an outer store that disposes the view first.

Co-authored-by: Copilot <[email protected]>

* Chat widget: test closing a group or window with a chat input open

Closing a group or window disposes the widget's instantiation service before
the New Session prompt options clear the generated prompt (microsoft#342683); parsing
the cleared input must not throw, and the draft saved on close stays empty.

Co-authored-by: Copilot <[email protected]>

* Clarify that view editors dispose the view first only when the editor closes

Co-authored-by: Copilot <[email protected]>

* chat: give the slash command test's fake widget the request parser it now creates once

Co-authored-by: Copilot <[email protected]>

---------

Co-authored-by: Copilot <[email protected]>
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.

8 participants