Skip to content

[pull] main from microsoft:main#1173

Merged
pull[bot] merged 68 commits intocode:mainfrom
microsoft:main
Apr 22, 2026
Merged

[pull] main from microsoft:main#1173
pull[bot] merged 68 commits intocode:mainfrom
microsoft:main

Conversation

@pull
Copy link
Copy Markdown

@pull pull Bot commented Apr 22, 2026

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.4)

Can you help keep this open source service alive? 💖 Please sponsor : )

mjbvz and others added 30 commits April 21, 2026 22:32
Fixes #311836

Switch to stream content to webviews. Previously we always read the entire content into a buffer before sending it over

This should speed up loading of resources inside webview and reduce memory usage. It's most helpful for videos and other larger files

Co-authored-by: Copilot <copilot@github.com>
…oval

I started this branch to just make 'Allow in this Session' work, and
rabbit holed a bit down into making sessions settings visible+editable.

- Sessions settings are available via a context menu action on the session.
- This opens an editor backed by a new filesystem provider that maps to
  the agent host's settings.
- Tool approval options are available as agent host-provided `options` on
  the tool call.

Stil todo:

- Register a JSON schema for agent sessions for intellisense
- Make options appear in a dropdown like normal tool call options
- Currently for new sessions we do an untitled->titled swap which closes
  settings if they're open. A very edge case but will fix if it's easy.
- I think we want a more formal way to say what settings should be
  editable prior to a session being started (worktree etc.) and what
  settings are just there if the user wants them.
- Currently `permissions` are just tool names, but I want to do more
  claude code-esque wildcard matching.
Co-authored-by: Copilot <copilot@github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <copilot@github.com>
…11873)

* refactor(chat): enhance chat input animation and update comments for clarity

* refactor(chat): update chat input working border colors for improved visibility

* refactor(chat): update border-radius to inherit and improve color descriptions for chat input

---------

Co-authored-by: mrleemurray <mrleemurray@users.noreply.github.com>
* refactor(chat): remove unused hover/focus styles from send button

Co-authored-by: Copilot <copilot@github.com>

* refactor(chat): update gradient styling for chat send button

Co-authored-by: Copilot <copilot@github.com>

* refactor(chat): add hover/focus box-shadow effect to send button for improved feedback

Co-authored-by: Copilot <copilot@github.com>

---------

Co-authored-by: mrleemurray <mrleemurray@users.noreply.github.com>
Co-authored-by: Copilot <copilot@github.com>
…311317)

* shared application storage

* add tests

* fix tests

Co-authored-by: Copilot <copilot@github.com>

* add logging and address feedback

* Add application shared storage scope

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Add fallback migration for APPLICATION_SHARED storage

VS Code: AbstractStorageService.get() falls back from
APPLICATION_SHARED to APPLICATION scope transparently,
enabling lazy per-key migration without a registry.

Agents App: SharedSQLiteStorageDatabase reads the host
(VS Code) app's application storage DB as a fallback
during getItems(), merging missing keys so shared data
is available even before VS Code runs with new scope code.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Move storage fallback into Storage class with auto-migration

Move the APPLICATION → APPLICATION_SHARED fallback logic from
AbstractStorageService into the base Storage class via the new
fallbackStorage property on IStorage. When a key is not found,
the fallback is checked and the value is automatically written
through to persist the migration.

This eliminates duplicated fallback code in get/getBoolean/
getNumber and ensures write-through happens for all access
patterns.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Make fallbackStorage an implementation detail of Storage

Remove fallbackStorage from IStorage interface. It is now a
property on the Storage class only, set directly by callers
that have access to the concrete type.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Pass fallback storage via ApplicationSharedStorageMain constructor

Wire up the application storage as fallback during doCreate()
instead of post-init. The ApplicationStorageMain is created
first and passed to ApplicationSharedStorageMain's constructor.
The fallback is set on the Storage instance when the shared
database is created, so it's ready by the time reads happen.

Removes setFallbackStorage() method and post-init wiring.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Remove fallbackDatabasePath - use fallbackStorage only

The in-memory fallbackStorage (application storage) makes the
DB-level fallback (reading VS Code's DB from disk) redundant.
Both VS Code and Agents App now use the same mechanism: the
Storage.fallbackStorage property that reads from application
storage and auto-migrates on hit.

Removes getHostUserDataPath, IProductService dependency, and
INativeEnvironmentService from StorageMainService.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Add MigratingStorage with persisted migration tracking

Introduce MigratingStorage that migrates keys from a fallback
storage on first access. Migrated keys are tracked via a
persisted marker key (__$__migratedStorageMarker) in the DB
so deleted keys are never resurrected from the fallback.

- VS Code windows: MigratingStorage falls back to own
  APPLICATION storage for transparent key migration
- Sessions windows: MigratingStorage falls back to host
  (VS Code) application storage loaded via IPC
- Main process: ApplicationSharedStorageMain uses
  HostApplicationStorageMain for embedded app fallback
- sharedDataFolderName added to product configuration
- Workspace trust migration simplified (handled by
  MigratingStorage automatically)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* fix compilation

* minimise changes

* some fixes

Co-authored-by: Copilot <copilot@github.com>

* fixes

* fix

* delete migrated key

* fix removing migrated key

* update distro

* feedback

* Fix MigratingStorage: persist marker only on actual migration

Add key to migratedKeys immediately before checking fallback
to prevent redundant lookups. Only persist the MIGRATED_KEY
marker when a value was actually found and migrated, avoiding
unnecessary writes when the key doesn't exist in the fallback.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* feedback

* fix tests

Co-authored-by: Copilot <copilot@github.com>

* fix application storage path

* fix compilation

---------

Co-authored-by: Copilot <copilot@github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <copilot@github.com>
Co-authored-by: Copilot <copilot@github.com>
* style: adjust padding for session section label

* Update src/vs/sessions/contrib/sessions/browser/media/sessionsList.css

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: mrleemurray <mrleemurray@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* show the model that has been used for a request

fixes microsoft/vscode-internalbacklog#7319

Co-authored-by: Copilot <copilot@github.com>

* fix: update getAgentTools to accept model parameter and adjust inlineChatIntent accordingly (micro perf improvement)

* Update src/vs/workbench/contrib/inlineChat/browser/inlineChatZoneWidget.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* ccr

---------

Co-authored-by: Copilot <copilot@github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <copilot@github.com>
We can't transfer the underlying buffer in this case
pwang347 and others added 27 commits April 22, 2026 11:48
Co-authored-by: Copilot <copilot@github.com>
* Fix broken sessions list
From #311751

Co-authored-by: Copilot <copilot@github.com>

* fix tests

* agentHost: settings followups

- Unrelated: fix local agent host being broken on main following
  some overnight cleanups
- Register a JSON schema for agent session settings (only when they're
  open since it has a perf cost)
- When there are multiple custom approval buttons, show them in a
  dropdown similar to other tool calls.

* Add tests for agent session settings schema registration

* Bump @github/copilot from ^1.0.28 to ^1.0.34

Matches the version used in extensions/copilot.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* agentHost: tolerate synthetic Copilot models with empty capabilities

After bumping @github/copilot to 1.0.34, listModels() returns a synthetic
'auto' router entry shaped like { id: 'auto', name: 'Auto', capabilities: {} }.
The SDK's ModelInfo type still declares capabilities.limits.max_context_window_tokens
as required, so reading it crashed _listModels and zeroed out the model list.

Wrap the SDK type in a local ICopilotModelInfo with the actually-optional
fields marked optional, and skip entries lacking max_context_window_tokens
with a warn log instead of throwing.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* agentHost: surface synthetic 'auto' model with optional maxContextWindow

Instead of dropping the synthetic 'auto' router model, make
IAgentModelInfo.maxContextWindow optional and pass it through as
undefined when the SDK doesn't report a fixed context window. The
agentHostLanguageModelProvider already handles undefined via '?? 0',
and the protocol state type already had the field optional.

Update the real-SDK listModels test to allow undefined maxContextWindow
and to assert the 'auto' entry is present.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <copilot@github.com>
Co-authored-by: Connor Peet <connor@peet.io>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Fixes #311966

Co-authored-by: Copilot <copilot@github.com>
…311975)

* ci: switch PR workflows back to 1ES self-hosted runners with JobId

Reverts the GitHub-hosted runner switch for ubuntu/windows jobs in pr*.yml
and adds a unique JobId label per job, per the IcM mitigation. The JobId
ensures 1ES pool runs are scoped to a specific GitHub Actions run+attempt,
which prevents the cancellation issues that occurred with bare pool labels.

Pool labels:
- 1es-vscode-oss-ubuntu-22.04-x64
- 1es-vscode-oss-windows-2022-x64

macOS jobs (pr-darwin-test.yml, pr-node-modules macOS) remain on
GitHub-hosted runners as no 1ES macOS pool exists.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* ci: keep pr-linux-test.yml on ubuntu-24.04 GH-hosted runner

Linux electron tests were stabilized by moving to ubuntu-24.04 in #308495
and #309451. Keep that runner GH-hosted while the rest of the PR workflows
use 1ES self-hosted pools.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* ci: include inputs.job_name in JobId for reusable test workflows

pr-win32-test.yml is invoked 3x from pr.yml (Electron/Browser/Remote) and
without a per-invocation discriminator all 3 jobs share the same JobId
within a run, defeating the 1ES per-job scoping. Add inputs.job_name to
the JobId prefix so each invocation is distinct. Apply the same defense
to pr-linux-cli-test.yml for safety.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* updating prompt for intermediatery updates

* updating prompt for intermediatery updates
* Addresses conflict with release notes setting

* Redesign post-update widget with banner, badge, and feature list

* Fixing some bugs

* remove command

* bugs

Co-authored-by: Copilot <copilot@github.com>

* Apply suggestions from code review

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* docs: add JSDoc to IUpdateInfoFeature and IParsedUpdateInfoInput in updateInfoParser.ts

Agent-Logs-Url: https://github.com/microsoft/vscode/sessions/a90e2aff-d018-447d-a88a-71201c6afb3a

Co-authored-by: cwebster-99 <60238438+cwebster-99@users.noreply.github.com>

* Filling test gaps

Co-authored-by: Copilot <copilot@github.com>

---------

Co-authored-by: Copilot <copilot@github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Add one time prompt to try ts 7.0 if you have ts nightly installed
…ion (#311978)

* extensions: split devtoolsExtensionHost action into its own contribution

Pull DebugExtensionHostInDevToolsAction registration out of
extensions.contribution.ts into a new devtoolsExtensionHost.contribution.ts
so the Agents app (vs/sessions) can opt into just this action without
importing the full electron-browser extensions contribution. Mirrors the
recent timeline.contribution split (#311882).

The action only depends on services already registered in the Agents app:
IExtensionService, INativeHostService, IQuickInputService.

(Written by Copilot)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* extensions: move devtoolsExtensionHost import to debug section

(Written by Copilot)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Add option to switch to Auto in weekly limit messaging
sessions: adjust notification placement

Default sessions notifications to bottom-right and tune the sessions-only notification center and toast offsets for each supported placement.

Also reapply the sessions top-right offset after the shared notification controllers run so the sessions window keeps its intended 40px spacing.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…311989)

Sequence setMetadata writes per key in SessionDatabase

@vscode/sqlite3 runs in parallelized mode and dispatches db.run() calls
to libuv's thread pool, so two setMetadata calls for the same key
submitted close together can complete in the opposite order they were
 the later (and intended-final) value silently loses.submitted

Surfaced by the 'Session Config persistence across restarts' integration
test, which dispatches SessionConfigChanged shortly after createSession,
then asserts the new branch is restored after a server restart. Repros
in roughly 1-2 / 100 local runs under load; was a recurring CI flake.

Fix: route setMetadata through a SequencerByKey<string> so writes for
the same key run in submission order while writes for different keys
still run concurrently. Same pattern already used for storeFileEdit.

(Written by Copilot)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…usy-spin (#311993)

* fix: real-SDK integration  skip plan-mode, fix subagent busy-spintests

- Skip 'planning-mode session-state writes are auto-approved in default mode'
  because @github/copilot-sdk lacks agentMode:'plan' on MessageOptions and
  respondToExitPlanMode() on the session. Add a TODO comment tracking what
  needs to change in the SDK before this can be re-enabled.

- Fix busy-spin in the subagent approval loop: track confirmed tool call IDs
  in a Set and skip re-approving ones already handled. waitForNotification
  returns matching entries from the queue without consuming them, so without
  this guard the loop would repeatedly re-approve the same tool call.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* fix: track approval loop by serverSeq instead of toolCallId

The same toolCallId can appear in multiple notifications (e.g. a legitimate
re-confirmation while the tool is running). Using toolCallId as the
dedup key would silently drop those. Switch to serverSeq, which is unique
per notification, so each distinct toolCallReady event is processed
exactly once.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <copilot@github.com>
* sessions: replace diff stats widget with right sidebar toggle icon

Replace the custom diff stats indicator (showing +insertions/-deletions) in
the titlebar with a simple right sidebar toggle using layoutSidebarRight /
layoutSidebarRightOff codicons to match the left sidebar toggle behavior.

- Drop ChangesTitleBarActionViewItem and all diff stat rendering logic
- Use icon variants (layoutSidebarRightOff / layoutSidebarRight) for toggle
  state instead of background toggling
- Update tooltip to 'Toggle Secondary Side Bar Visibility'
- Remove diff stat CSS (insertions, deletions, custom indicator styles)
- Add CSS override so the right sidebar button does not show the activeBackground
  when toggled (relying on icon variants like the left sidebar)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* sessions: scope secondary sidebar toggle styling

Target the secondary sidebar titlebar toggle by its icon classes so it
opts out of the shared checked background styling without affecting the
terminal toggle.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* sessions: restore secondary sidebar hover state

Allow the secondary sidebar titlebar toggle to keep the normal hover
background when checked, while still suppressing the persistent checked
background.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* sessions: switch titlebar title spacing to margin

Use margin-left for the command center title container spacing and
update the sidebar-visible override to reset margin-left instead of
padding-left.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* sessions: address Copilot PR feedback

- clarify the remaining changes titlebar CSS comment
- avoid command center overflow when sidebar spacing uses margin
- give the changes toggle a changes-specific action title while keeping
  the requested secondary-sidebar tooltip text

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* sessions: prevent attached sidebar snap-close

Keep the auxiliary bar at its normal minimum width while disabling sash snap-to-close when attached diff or integrated browser editors are visible beside it.

Add focused sessions tests for the attached-editor constraint and update the layout spec to document the behavior.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* sessions: also detect localhost link browser editor in sidebar snap fix

Add 'workbench.editor.browser' (BrowserEditorInput) to the set of integrated browser editor IDs that disable sash snap-to-close on the auxiliary bar. This covers the case where workbench.browser.openLocalhostLinks opens a browser tab as a BrowserEditorInput, which has editorId='workbench.editor.browser' rather than a mainThreadWebview ID.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* sessions: generalize sidebar snap prevention and increase editor min width

- Simplify hasAttachedEditorRequiringSidebarSpace() to check EDITOR_PART
  visibility only, removing the editor-type allowlist. Any editor open in
  the main part now prevents sash snap-close automatically, covering all
  current and future editor types without needing updates.
- Removes IEditorService dependency, DiffEditorInput import, and the
  INTEGRATED_BROWSER_EDITOR_IDS / MULTI_DIFF_EDITOR_INPUT_ID constants.
- Increase DEFAULT_EDITOR_MIN_DIMENSIONS width from 220px to 300px.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* sessions: restore default editor minimum width

Keep the generalized auxiliary bar snap-close prevention, but revert the unrelated editor minimum-width increase so EditorPart returns to the standard 220px default. Also update the sessions layout note to match the narrower scope of the change.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* sessions: fix auxiliary bar test harness

Restore the ViewDescriptorService setup required by AuxiliaryBarPart tests and use the disposable leak helper correctly so the new sessions test suite can construct the part in CI.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…extKeyService (#307593)

* fix: clear parent change listener before disposeContext in ScopedContextKeyService (#307067)

* ci: retrigger after Linux Electron segfault
* Tear down SSH tunnel when removing a remote (Written by Copilot)

Removing an SSH-backed agent host previously only disposed the renderer-side
protocol client and SSHRelayTransport. SSHRelayTransport.dispose() removed
the IPC listeners but did not tell the shared-process side to close the SSH
tunnel, so the tunnel leaked and the next connect silently reused it.

Fix this by giving IRemoteAgentHostService a generic ownership hook for
transport-level teardown:

- Rename addSSHConnection -> addManagedConnection and add an optional
  transportDisposable parameter. The platform service registers it on the
  same per-entry DisposableStore as the protocol client, so it runs on
  removeRemoteAgentHost, on config-driven reconciliation, and on service
  disposal.
- SSHRemoteAgentHostService passes a transport disposable that
  synchronously drops the renderer-side handle from its connections map,
  fires the change event, marks the handle closed, disposes it, then
  best-effort tells the shared-process service to disconnect. The early
  'return existing' branches in connect()/reconnect() are now safe across
  remove -> reconnect because the map is cleared synchronously.
- Web/desktop tunnel renderers just pick up the rename. Their existing
  transports (TunnelConnectionTransport.dispose, TunnelRelayTransport.dispose)
  already close the underlying connection, so no behavior change there.

Adds renderer-side lifecycle tests covering connect/remove/reconnect and
main-side close, plus platform-side tests proving the transport disposable
runs on entry removal, replacement, and service dispose.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Address Copilot review comments (Written by Copilot)

- Share a _setupConnection helper between connect() and reconnect() that
  wraps the full setup (handshake, handle creation, registration with
  IRemoteAgentHostService) in a single try/catch. On any failure after the
  shared-process tunnel is established, drop the renderer-side handle, fire
  the change event, dispose the protocol client, and best-effort tell main
  to  so we don't leak the SSH tunnel if registration throws.disconnect
  Previously reconnect() had no error handling at all.
- Replace the polling-based awaitClientThenResolve helper in the renderer
  test with a deterministic DeferredPromise that resolves the moment the
  Nth protocol client is created, removing potential CI flakiness on slow
  machines.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@pull pull Bot locked and limited conversation to collaborators Apr 22, 2026
@pull pull Bot added the ⤵️ pull label Apr 22, 2026
@pull pull Bot merged commit 1f9cd94 into code:main Apr 22, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.