Commit Graph
166987 Commits
Author SHA1 Message Date
Vijay Upadya bb2b4cea1a Fix internal-org and staff targeting in the new TAS endpoint (#339929)
Fix VS Code team targeting in the new TAS endpoint
2026-10-05 22:51:26 +00:00
roblourensandCopilot ba0606e7e8 agentHost: expand SDK regression and managed-settings E2E coverage (#339864)
* agentHost: expand regression E2Es (Written by Copilot)

Add 79 focused declarations covering managed OTel and permission enforcement, live client tools, native MCP payloads and recovery, history and forks, Git changesets, and real terminal lifecycle behavior. Preserve demonstrated provider defects as narrowly tracked expected failures and refresh measured host coverage.

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

* agentHost: stabilize E2E fixtures on CI (Written by Copilot)

Read Claude files before editing them, compare directory identity across Windows short and long paths, render ConPTY output before counting scrollback bytes, and exercise Unicode input in a ready child independently of shell locale. Preserve exact byte and successful-tool assertions.

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

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-10-05 22:48:16 +00:00
Bhavya UandCopilot d524f802d9 Classify HydraFusion as an agent host selection mode (#339915)
* agentHost: classify HydraFusion as a selection mode

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

* agentHost: limit selection telemetry to turns

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

* agentHost: scope HydraFusion selection to Copilot

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

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-10-05 21:57:38 +00:00
Vritant Bhardwaj 205d0627ee mcp: show where built-in MCP servers come from (#339427)
<!-- Thank you for submitting a Pull Request. Please:
* Read our Pull Request guidelines:

https://github.com/microsoft/vscode/wiki/How-to-Contribute#pull-requests
* Associate an issue with the Pull Request.
* Ensure that the code is up-to-date with the `main` branch.
* Include a description of the proposed changes and how to test them.
-->

Fixes #338719

The MCP server details in Chat Customizations didn't say where built-in
servers come from. The header showed a made-up `mcp.json`, and
Configuration only said "No definition is available". This PR uses what
the agent runtime already reports about each server (its source, display
name and contributing plugin) to show the real origin, and explains when
there's nothing to show.

### What you'll see

| MCP server | Before | Now |
|---|---|---|
| `github-mcp-server` (built into Copilot CLI) | Made-up `mcp.json`
label; "No definition is available" | **Built-in: Copilot**.
Configuration explains that Copilot sets it up, with an **Open
Settings** link to `chat.agentHost.githubMcpServer.enabled` |
| Copilot connector, e.g. "Linear (Connector)" | Made-up `mcp.json`
label; "No definition is available" | **Managed by Copilot**, and an
explanation of why there's no definition |
| GitHub server from the Copilot Chat extension (local chat) | No source
| **Built-in: GitHub Copilot Chat**, linking to the extension; the `...`
menu gains **Show Extension** |
| Added via **MCP: Add Server → Add to Current Agent Session** | Could
land under Built-In; no definition | Listed under **User**, labelled
**Agent host configuration**, with its definition |
| Reported as user or workspace config, but no file is known | Made-up
`mcp.json` label | **User configuration** / **Workspace configuration**
|
| Configured in an `mcp.json` or another app's config file | File link
and Edit Configuration | Unchanged. Built-in rows backed by another
app's file (e.g. Claude Desktop) also get **Show Configuration** in the
`...` menu |

### How it works

- The Copilot agent host forwards the runtime's `sourcePlugin` (from
`session.mcp.list`) as optional, namespaced `_meta` on MCP server
customizations. Other agent hosts can leave it out.
- The agent host also declares, in `_meta`, the setting that controls a
server it adds itself. The UI only offers **Open Settings** when the
host declares one.
- The details page shows where a server comes from when there's no file
to open, and an explanation when the agent owns the definition.
- An open details page updates when the agent host reports new metadata.
For example, a server in a restored session gets its origin and settings
link once the runtime reports it, without reopening the page.
- `getMcpServers()` also exposes the definition the agent host's own
configuration holds for a server, so servers added there show their
definition.

### Notes for reviewers

- Connector names come from the connector catalog (#339431). This PR
doesn't forward the runtime's own `displayName`: for anything other than
a connector it falls back to the server's advertised title, which would
rename servers that users configured.
- Copilot Chat's own servers keep their extension ID (to link to it) but
stay under Built-In.
- The setting link is never inferred from a server's name. Another agent
host, a plugin, or a user's config can also publish a
`github-mcp-server` that `chat.agentHost.githubMcpServer.enabled` can't
control, so Copilot declares the setting only for the runtime's own
GitHub server.
- Not in this PR: showing a built-in server's tools or instructions, or
its actual definition (the Copilot SDK doesn't expose it).

### How to test

1. In a Copilot CLI agent session, open Chat Customizations → MCP
Servers and select `github-mcp-server`. The header says "Built-in:
Copilot", Configuration explains why there's no definition, and **Open
Settings** opens `chat.agentHost.githubMcpServer.enabled`.
2. Run **MCP: Add Server → Add to Current Agent Session**. The server is
listed under User with "Agent host configuration" and its definition.
3. In a local chat, select Copilot's GitHub server. The header links to
GitHub Copilot Chat, and `...` → **Show Extension** opens it.
4. A server from `.vscode/mcp.json` still shows its file link and Edit
Configuration.
5. Open a server's details while a resumed Copilot CLI session is still
starting. Once the runtime reports the server, the details update
(origin, settings link) without reopening.

The `EmbeddedMcpDetailBuiltinAgent` and
`EmbeddedMcpDetailBuiltinExtension` component fixtures show the new
details states.

Validation (run locally on top of current `main`):

- Unit tests: passed, 1236 passing and 0 failing.
  ```
  ./scripts/test.sh \
--run src/vs/platform/agentHost/test/common/agentMetaReaders.test.ts \
--run
src/vs/platform/agentHost/test/common/metadataCompatibility.test.ts \
--run
src/vs/platform/agentHost/test/node/shared/mcpCustomizationController.test.ts
\
--run src/vs/platform/agentHost/test/node/shared/githubMcpServer.test.ts
\
--run src/vs/platform/agentHost/test/node/copilotAgentSession.test.ts \
--run
src/vs/workbench/contrib/chat/test/browser/agentSessions/agentHostCustomizationService.test.ts
\
--run
src/vs/workbench/contrib/chat/test/browser/aiCustomization/embeddedMcpServerDetail.test.ts
\
--run
src/vs/workbench/contrib/chat/test/browser/aiCustomization/mcpListWidget.test.ts
\
--run
src/vs/workbench/contrib/chat/test/browser/aiCustomization/aiCustomizationManagementEditor.test.ts
\
--run
src/vs/workbench/contrib/chat/test/browser/widget/chatContentParts/chatMcpAuthenticationContentPart.test.ts
\
--run
src/vs/workbench/contrib/chat/test/browser/widget/chatContentParts/chatMcpServersStartingContentPart.test.ts
\
--run
src/vs/workbench/contrib/chat/test/browser/widget/chatContentParts/chatToolAuthenticationSubPart.test.ts
  ```
- Connector-name suites from #339431: passed.
`copilotSessionLauncher.test.ts` and `stateToProgressAdapter.test.ts`
had 301 passing; `mcpCommands.test.ts` had 2 passing.
- `npx tsc --project ./src/tsconfig.json --noEmit --skipLibCheck`: no
errors in code this PR changes. My locally installed dependencies are
older than `main`'s lockfile (Copilot SDK 1.0.15-preview.4 vs
1.0.17-preview.4). That causes 23 errors about newer APIs (`proxyCa`,
`managedSettings.resolve`, `FoundryLocalManager`), all in lines this PR
doesn't change.
- `npx eslint --max-warnings 0` on the changed files: passed.
- `node build/stylelint.ts
src/vs/workbench/contrib/chat/browser/aiCustomization/media/aiCustomizationManagement.css`:
passed.
- `node build/checker/layersChecker.ts`: passed.
- Pre-commit hygiene: passed.
2026-10-05 13:39:24 -08:00
roblourensandCopilot 6308cbdc3d agentHost: update Copilot SDK to 1.0.17-preview.5 (#339835)
Align root and remote SDK/runtime pins with 1.0.92-5. Handle the SDK's credential-free account authentication variant in connector account selection, with coverage for both provider and token-callback accounts.

(Written by Copilot)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-10-05 21:02:11 +00:00
roblourensandCopilot bd64649be1 Use proper ahp-session: scheme URIs for new AH sessions (#339492)
* Make native Agent Host session identities interoperable with AHP

Negotiate standard addressing for new allocations while preserving existing backend and frontend identities, explicit provider routing, and version-skew compatibility. Add regression coverage and contributor identity guardrails.

(Written by Copilot)

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

* Fix remaining AHP identity consumers and CI regressions

Require connection-based committed session resolution, preserve exact owner deletion resources, route Copilot MCP replay explicitly, and keep cloud discovery/provisioning backend identity consistent. Add a public turn-tracker interface and repair CI fixture and class-field initialization wiring.

Validated 555 Chromium tests, 171 MCP/history/telemetry tests, and 29 native identity tests; both client and define-class-fields type checks, transpilation, lint and diff checks passed. (Written by Copilot)

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

* Wire committed identity resolution in generic config chip tests

Update the provisional-generation fixture for the required connections contract. All 24 generic-config/submit-handler Chromium tests pass. (Written by Copilot)

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

* Register eager Agent Host session identity before first send

Record each acknowledged allocation on its owning connection before subscriptions and first-send routing, and verify the host preserves the requested URI. Keep native allocation collision checks scoped away from non-native providers. Preserve historical recovery fixture addressing and use explicit Copilot provider IDs in MCP expectations.

Validated all 2096 affected unit tests (27 pending), all 3 local AgentHost and SDK-sandbox smoke scenarios, client and class-field type checks, transpilation and lint. (Written by Copilot)

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

* Validate Agent Host identities before allocating disposable adapters

Reject conflicting backend registration before constructing adapters, preventing orphaned instances on refresh retry. Interpret older cloud-sandbox cached UI addresses only in the sandbox cache path, preserving generic/native advertised resources.

Reproduced five leaked adapters before the fix; 571 provider tests pass afterward. Live Code OSS with isolated cached state completed five session refreshes and ten forced GCs with zero leaked-disposable warnings or identity conflicts. Typecheck and lint pass. (Written by Copilot)

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

* Protect explicit session ownership and cold backing teardown

Serialize explicit creation by raw storage identity, preserve same-provider retries and legacy provenance, and prevent competing legacy/standard claims. Resolve persisted provider ownership before deletion and prepare all cold backings before destructive disposal, preserving metadata on unavailable-provider or preparation failures.

Added controlled contention and fresh-service cold-deletion regressions for all native providers, individual peer/default preparation failures and unresolved legacy identities. Full affected suites: 2290 passed, 27 pending; actual local AgentHost/SDK-sandbox smoke: 3 passed. Both typecheck modes, transpile and lint passed. (Written by Copilot)

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

* Fix cold session discovery and immutable rebind allocations

Preserve exact delegation sources and owning-connection links; constrain legacy resolution to advertised identities; keep sandbox task operations isolated from colliding provider IDs. Add cold restoration, standard tombstone races, frontend publication and opaque scoped-link regressions. (Written by Copilot)

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

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-10-05 12:57:17 -07:00
Vritant Bhardwaj 729f257fa4 chat: Show only the selected harness's Copilot models in Manage Models (#339840)
<!-- Thank you for submitting a Pull Request. Please:
* Read our Pull Request guidelines:

https://github.com/microsoft/vscode/wiki/How-to-Contribute#pull-requests
* Associate an issue with the Pull Request.
* Ensure that the code is up-to-date with the `main` branch.
* Include a description of the proposed changes and how to test them.
-->

Fixes #326538

## Problem

The Manage Models (Language Models) editor can show several groups that
are all labelled **Copilot**. Copilot models come from:

- the regular Copilot provider (`copilot`)
- the Copilot CLI extension (`copilotcli`)
- each agent host harness. The Copilot CLI agent host groups its models
under `copilotcli`; the Claude and Codex agent hosts group theirs under
`copilot`, reaching them through the Copilot subscription (Claude via
its `copilot` transport, Codex via `vscode-proxy`).

Each of these lists only works in its own harness, but they all appear
together with the same label.

## Change

Manage Models now scopes the "Copilot" lists to the harness it was
opened for:

- If the harness publishes its own Copilot models (models with
`targetChatSessionType` equal to the harness), only that list is shown.
- Otherwise, only the regular Copilot models are shown.
- Models from other providers (BYOK, Ollama, OpenRouter, a harness's
non-Copilot groups, …) are unaffected.

How the editor learns the harness:

- The model picker's **Manage Models...** action passes the harness it
picks models for: `ChatInputPart.modelTargetSessionType` in the chat
input, or the current model's target in the Agents window picker.
- Other entry points (Command Palette, account menu, notifications) fall
back to the last focused chat's harness, then to the active
customization harness.

Scope is limited to the Manage Models editor. The Chat Customizations
editor's Models section and the model picker contents are unchanged.

## How to test

1. Make sure Copilot models from more than one harness are registered
(e.g. local, Copilot CLI agent host, Claude/Codex agent hosts).
2. In a chat, select the **Local** harness, open the model picker and
choose **Manage Models...**. Only the regular **Copilot** group is
listed; other providers are unchanged.
3. Switch the chat to the **Copilot CLI** agent host harness and open
**Manage Models...** again. Only the agent host's Copilot group is
listed.
4. Repeat with the **Claude** and **Codex** agent host harnesses. Each
shows only its own Copilot group.

## Validation

- `./scripts/test.sh --grep
"ChatModelsViewModel|ChatModelsWidget|modelPicker|ModelPicker|ChatInputPart"`:
passed, 372 tests, including a new `ChatModelsViewModel` test covering
all four Copilot sources plus a non-Copilot harness group.
- `npx eslint` on the changed files: passed.
- `npm run typecheck-client`: no errors in the changed files. It fails
only on errors that already exist in
`src/vs/platform/agentHost/test/node/*` (`proxyCa`), which this change
doesn't touch.
- `npm run valid-layers-check`: passed.
- Manual steps 2–4 above have not been run yet.
2026-10-05 10:40:07 -08:00
Giuseppe Cianci acb9c66032 chat: restore Codex continuation with safe session routing (#339790)
* chat: restore Codex continuation with safe session routing

Reapply the continuation feature from #339074 while preserving the parent-session resolver and the peer-chat recovery added in #339476. Decline reverse mappings that cannot resolve back to the exact backend identity.

Add real configuration-control regression coverage for local and remote Copilot, Codex, and Claude peer selections. The six cases fail when the original fragment-preserving behavior is reintroduced. Validated 2,930 tests, compilation, lint, layers, hygiene, and an isolated persistence replay. Signed-in UI validation remains pending macOS Keychain access.

* chat: address continuation review and add hidden preview

Release failed visibility claims and use the shared dismiss button. Add an excluded experimental setting and a private preview command that leaves shared suppression and experiment telemetry untouched.

* chat: make Codex continuation threshold experimental

Add a hidden percentage setting with a 90 percent default and automatic ExP updates. Preserve the threshold in saved warning boundaries so other windows cannot clear suppression using a different assignment.
2026-10-05 11:40:01 -07:00
Vritant Bhardwaj e9193bd97b agentHost: forward tool-result images to BYOK models (#339830)
Fixes #339595
Fixes #339439

## Problem

In agent-host sessions, a BYOK (OpenAI-compatible) model never received
images returned by tools such as `view`. It only received the text
receipt `Viewed image file successfully.`

## Root cause

There were two problems:

1. **Vision capability never reached the runtime.**
`synthesizeByokSessionConfig` registered BYOK models with token limits
only. The renderer already reports `supportsVision`, but it wasn't
passed on, so the Copilot runtime treated every BYOK model as text-only.
It replaced tool-result images with the text receipt before the request
reached the BYOK proxy. I confirmed this by running the SDK runtime
against a stub `/responses` server. Without the capability,
`function_call_output.output` is the plain string. With
`capabilities.supports.vision: true`, it's an `[input_text,
input_image]` array.
2. **The BYOK LM bridge had no image channel for tool outputs.** Once
vision is declared, the array output was passed through untyped, and the
renderer wrapped it in a text part.

## Changes

- `copilotSessionLauncher.ts`: forward `supportsVision` as
`capabilities.supports.vision` on each BYOK `ProviderModelConfig`.
- `agentHostByokLm.ts`: add an optional `images` field to the two
tool-output bridge items. `output` stays text, so a renderer that
doesn't know the new field still gets today's text result.
- `byokResponsesTranslation.ts`: split array tool outputs into text plus
images, reusing the existing data-URL and MIME validation from user
messages.
- `agentHostByokLmHandler.ts`: forward the images as `data` parts inside
the LM API `tool_result`, the same shape the in-extension path produces.

## How to test

1. Turn on `chat.agentHost.byokModels.enabled`.
2. Add an OpenAI-compatible BYOK model that supports images (e.g.
`gpt-4o`), with `"vision": true` and `"toolCalling": true`.
3. Put an image containing text the model can't guess (e.g.
`ZEBRA-7341`) in the workspace.
4. In an agent-host session with that model, ask: *"Use the view tool to
open probe.png and tell me exactly what text it contains. If you didn't
receive image pixels, say so."*
- Before this change: the model says it only got "Viewed image file
successfully."
   - After this change: the model reads the text.
5. With `"vision": false`, the model should still get the text receipt
and the turn should finish cleanly.

## Validation

- `./scripts/test.sh --run
src/vs/platform/agentHost/test/node/byokResponsesTranslation.test.ts
--run src/vs/platform/agentHost/test/node/copilotSessionLauncher.test.ts
--run src/vs/platform/agentHost/test/node/byokLmProxyService.test.ts
--run
src/vs/workbench/contrib/chat/test/browser/agentSessions/agentHostByokLmHandler.test.ts`:
passed, 145 tests.
- New tests use the exact payload captured from the runtime, plus a
renderer `tool_result` mapping test. The launcher snapshot test now
covers `supportsVision`.
- `npm run typecheck-client`: reports 20 errors, the same 20 as without
this change. They come from the locally installed `@github/copilot-sdk`
(1.0.16) being older than the version pinned in `package.json`. None are
in files this PR touches.
2026-10-05 10:38:52 -08:00
Logan Ramos b871bc83f9 Fix send button overflow in chat input toolbar for narrow widths (#339847)
* Agent Host changes for lramos15/agents/fix-issue-331228-vscode
2026-10-05 13:27:33 -05:00
Sandeep SomavarapuandCopilot b062efe169 sessions: Remove session title from command center (#339856)
Keep the Agents Window command center focused on workspace and branch context in every chat presentation. Add light and dark screenshot fixtures for single-chat folder, worktree, and no-workspace states.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-10-05 18:10:55 +00:00
Ulugbek AbdullaevandCopilot 9216ae7828 sessions: remove Automations new badge (#339855)
Remove the badge's first-use state, experiment configuration, reset action, styling, and obsolete tests and fixtures.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-10-05 18:06:52 +00:00
vritant24andCopilot 67fbdd36f6 chat: Scope Manage Models group actions and statuses to the harness
Address review feedback:
- "Hide All Models" on a Copilot group now only toggles the models listed for
  the selected harness. Groups from different harnesses can share an id (e.g.
  the regular Copilot group and Codex's `copilot` group).
- Provider status rows that render as a Copilot group (e.g. a Copilot agent
  host that failed to load its models) are scoped to their harness like models.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-10-05 10:07:38 -07:00
vritant24andCopilot 0190c1de57 chat: Show only the selected harness's Copilot models in Manage Models
Copilot models are published separately by the regular Copilot provider and
by each agent host harness (Copilot CLI, Claude, Codex), and every one of
those lists is labelled "Copilot" in the Manage Models editor. Scope the
"Copilot" lists to the harness the editor is opened for: show that harness's
own Copilot models, or the regular Copilot models if it has none. Models from
other providers are unaffected.

The model picker's "Manage Models..." action now passes the harness it picks
models for. Other entry points fall back to the last focused chat's harness,
then the active customization harness.

Fixes #326538

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-10-05 09:56:07 -07:00
vritant24andCopilot 8596958f0b Merge remote-tracking branch 'origin/main' into agents/mcp-servers-config-visibility-issue
Reconcile with #339431 (Show connector names in MCP authentication), which
added its own MCP display-name metadata:

- Adopt main's display name everywhere: the connector catalog name under
  `vscode.mcpServerDisplayName`, published from connector reconciliation
  and shown as "<name> (Connector)" by getMcpServerDisplayLabel.
- Stop forwarding the runtime's `mcp.list` display name. It falls back to a
  server's own advertised title, which would rename user-configured servers
  on every surface that now uses the display name.
- Remove getActiveSessionServerLabel in favour of getMcpServerDisplayLabel.
- Keep this branch's source plugin and controlling setting metadata, the
  host configuration, and the details refresh.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-10-05 09:54:52 -07:00
vritant24andCopilot da885edd7c agentHost: carry ordered tool-output content parts in the BYOK bridge
Completes the previous commit: bridge type, translation, and tests for ordered tool-output content parts.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-10-05 09:18:54 -07:00
vritant24andCopilot 472a2e70c7 agentHost: preserve tool-result part order across the BYOK bridge
Carry tool outputs that contain images as ordered content parts so each image keeps its caption, instead of one concatenated text plus a separate image list. The text output stays populated for renderers that predate the field.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-10-05 09:18:37 -07:00
vritant24andCopilot d55e298a57 agentHost: forward tool-result images to BYOK models
BYOK models were registered with the Copilot runtime without their vision capability, so the runtime replaced tool-result images (e.g. from the view tool) with a text receipt. Pass supportsVision through as capabilities.supports.vision, and carry the resulting input_image parts across the BYOK LM bridge into the LM API tool result.

Fixes #339595

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-10-05 09:11:33 -07:00
Benjamin Christopher SimmondsandCopilot 3d5764c14d sessions: Enable New Session V2 tour in Insiders (#339820)
Default Insiders builds to the workspaceAndModel tour variant while retaining experiment gating and treatment selection for other product qualities.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-10-05 16:02:27 +00:00
Logan RamosandCopilot 182f2f5bf9 chat: Open model picker on touch and pen taps (#339777)
The Chat view's pane container registers as a Gesture target, which cancels touchstart/touchend and suppresses the compatibility mousedown. The model picker buttons only listened for mousedown, so finger and pen taps never opened them. Register the buttons as Gesture targets and handle Tap.

Fixes #339467

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-10-05 11:26:52 -04:00
8c43b576af extensions: keep update checks on polling cadence (#339365)
* extensions: keep update checks on polling cadence

Do not reschedule the full installed-extension update check when an extension's auto-update delay expires. Clarify that delay expiry makes an update eligible rather than guaranteeing its installation time.

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

Copilot-Session: 5e8ac536-0855-45fb-bd88-3b651e80b60d

* extensions: clarify auto update eligibility

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

---------

Co-authored-by: Jimmy Lewis <jamlew@microsoft.com>
Co-authored-by: Sandeep Somavarapu <sasomava@microsoft.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 5e8ac536-0855-45fb-bd88-3b651e80b60d
2026-10-05 17:14:04 +02:00
Giuseppe CianciandCopilot 0014c09291 agentHost: Extend bounded telemetry context (#339800)
* agentHost: Extend bounded turn context

Carry an additional validated account window through Agent Host turn telemetry while preserving the existing bounded snapshot semantics.

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

* markdown: Restore generated contributions

Restore generated Markdown editor metadata changed by the local compile environment.

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

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-10-05 15:11:39 +00:00
Sandeep SomavarapuandCopilot fad4d42fb7 agentHost: let chats switch workspace or move to a worktree via tools (#339778)
* agentHost: isolate all chats in an existing session

Add the main-chat-only isolate_session tool, defer conversion until active chats finish, and preserve session histories while switching all Copilot backings to one worktree.

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

* agentHost: support Codex isolation and preserve worktree branch identity

Enable session-wide Codex isolation with durable directory updates and rollback handling. Seed the generated branch before exposing the worktree and simplify the isolation divider.

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

* agentHost: isolate only the calling chat in a worktree

Allow main and peer chats to request isolation while preserving other chat scopes. Persist exact-chat provider directories, update the Sessions workspace and branch model, and quarantine uncertain changes per chat.

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

* agentHost: refine chat isolation scope and workspace conversion

Allow single-chat isolation without multi-root support while preserving repository identity. Keep multi-chat isolation gated, correct Git-state ownership, avoid refresh cooldown waits, and remove the superseded session-wide provider path.

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

* agentHost: change a chat workspace through the set_workspace and isolate_session tools

A chat can now move to another folder or into a new Git worktree when the model calls set_workspace or isolate_session, including in sessions that already have a workspace. The change is deferred until the requesting turn ends and the original task then continues automatically. Only the addressed chat changes: a single user chat replaces the session roots under the chat catalog lock, and with several chats the siblings keep their folders.

Host: restore sibling chats before the provider moves, validate the chat identity across the asynchronous steps, quarantine the exact chat durably when the outcome is uncertain, and reject cancel, steering, new turns, truncation and archive while the host-owned conversion turn is running. Publish a per-chat workspace change state so clients can block input and show a blocked notice.

Providers: pin sibling working directories before a main chat move, guard archived-history resume, distinguish definitive Codex rejections from uncertain outcomes, and retain or reconcile worktrees through ownership records.

Client: block input while a conversion runs, render the workspace transition notice, and roll back an archive that the host rejects. There is no UI for changing the workspace; the tools are the only entry point.

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

* agentHost: keep the workspace change feature to the tool path

There is no UI to start a workspace change, so remove the client reactions that only supported a user-initiated change: the workbench input blocking and notice, the Sessions archive rollback and bulk archive handling, and the published per-chat state they read. The host still rejects cancel, steering, new turns, truncation and archive while a conversion owns the turn.

Drop incidental churn from the feature diff and keep the project and worktree handling the Agents Window adapter needs after a tool-driven change. The transition notice now reads 'Workspace changed to a new worktree of {0}' for a worktree and 'Workspace changed to {0}' for a folder.

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

* agentHost: shorten the worktree workspace transition label

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

* Revert "agentHost: shorten the worktree workspace transition label"

This reverts commit a155fcbaa2.

* agentHost: allow set_workspace to move a worktree chat to a worktree of another folder

A chat already in its session's worktree was refused a new worktree of a
different folder with a generic error. Only reject when the target is the
chat's current folder, keep the old worktree on disk, and explain the
rejection.

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

* agentHost: update e2e expectations for set_workspace on chats with a workspace

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

* agentHost: update Copilot prompt snapshots for the workspace tools

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

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-10-05 17:02:40 +02:00
Benjamin Christopher SimmondsandCopilot 2aa2ca76ee sessions: Suppress archive nudges after continuing a conversation (#339787)
* sessions: Suppress archive nudges after continuing a conversation

Remember the shown pull requests and chat turns across reloads. Hide the suggestion when the session continues and allow it again only after a new pull request is added and all pull requests are merged.

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

* sessions: Keep archive nudge visible when removing a turn

Require a request timestamp at or after the nudge impression before treating a changed last request as continuation. Cover removal revealing older history, removing every request, reload, and sending a new turn.

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

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-10-05 14:49:56 +00:00
Benjamin Christopher SimmondsandCopilot 7e4e261244 test: Stabilize flaky component fixtures (#339789)
* test: Stabilize flaky component fixtures

Use local decoded avatars, browser-owned readiness conditions and deferred paint to keep component screenshots deterministic. Replace the discovery SVG loader with the shared DOM spinner and preserve reduced-motion behavior. Document the fixture design contract and extend loading-state regression coverage.

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

* chat: Scope discovery spinner styles to the result row

Ensure the hidden spinner state wins over the shared spinner stylesheet regardless of CSS load order. This fixes the continuation regression assertion in the full Electron and browser test suites.

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

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-10-05 16:46:13 +02:00
Lee Murray cd97b0dff8 Agents window: make bottom panel alignment configurable (#339736)
Fixes #336738

This makes the Agents window bottom panel configurable so it can remain
full-span or align beneath chat without squeezing the side pane.

### Changes

- Add a checkable **Align Panel with Chat** action to the existing panel
overflow and persist the selected alignment per profile.
- Reparent the existing Grid views while preserving panel height,
side-pane width, focus, hidden views, and maximize/restore behavior.
- Preserve hidden leaf and branch visibility in the shared Grid
operations exercised by these transitions.
- Keep the panel inset when the primary sidebar is collapsed, match
native macOS lower-corner geometry, and retain the full-span layout on
mobile.
- Add focused Grid, layout-action, topology, sizing, and styling
regression coverage.

### Validation

- `npm run compile` — passed with 0 errors.
- `./scripts/test.sh --run src/vs/base/test/browser/ui/grid/grid.test.ts
--run src/vs/sessions/test/browser/workbench.test.ts --run
src/vs/sessions/test/browser/layoutActions.test.ts` — passed, 172 tests.
- `npm run typecheck-client` — passed.
- Targeted ESLint for all changed TypeScript files — passed.
- `npm run stylelint -- src/vs/sessions/browser/media/workbench.css` —
passed.
- `git diff --check` — passed.
- Agents window Dev UI scenario PA-01 through PA-08 — passed, covering
both alignments, existing-overflow placement, collapsed-sidebar spacing,
native macOS corners, maximization restoration, hidden views, and sash
regressions.


### UI validation

**Chat-aligned panel**

![Chat-aligned bottom panel beneath the chat
area](https://github.com/user-attachments/assets/3f85de9d-9730-4012-80f8-b7e78a59fd63)

**Full-span panel**

![Full-span bottom panel restored across chat and side
pane](https://github.com/user-attachments/assets/050e4695-08b1-4aaa-8876-181e3ce2d37f)

**Chat-aligned panel with the primary sidebar collapsed**

![Chat-aligned panel showing the left inset and native macOS lower
corner](https://github.com/user-attachments/assets/f855373d-be8d-4c20-8d74-16cc5873aa90)

**Full-span panel after maximization and alignment restoration**

![Full-span panel restored after panel maximization without hidden
columns or extra
sashes](https://github.com/user-attachments/assets/ad09d41e-d4b2-49f3-a2db-86b4aff6e7df)
2026-10-05 15:11:36 +01:00
Dmitriy VasyuraandCopilot 9e771b5aab github: migrate Dev Container sample reads (#339533)
* github: migrate Dev Container sample reads

Use the local anonymous GitHub engine to resolve repository HEAD and read commit-pinned Contents API JSON. Preserve the sample cache and container lifecycle, validate bounded base64 envelopes, and cover cancellation and lease ownership.

The desktop migration must not merge until compatible shared-process proxy and certificate transport is available and verified.

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

* github: expose repository reads through a service domain

Compose the public repository workflow under IGitHubService.repositories instead of requiring consumers to pass the service into a free helper. Keep anonymous client leases, commit pinning, cancellation and deadlines owned by the domain, and cover service startup and disposal.

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

* github: use AbortSignal for repository file reads

Align the repository domain with the existing GitHub cancellation APIs. Forward the caller signal and abort reason unchanged, and adapt Dev Container cancellation tokens only at the caller boundary with scoped listener cleanup.

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

* github: normalize cancellation inputs inside the service

Accept AbortSignal or CancellationToken for repository reads and share operation-scoped normalization with the GitHub IPC boundary. Preserve caller signals and abort reasons, release token listeners with the request lifetime, and remove adapter boilerplate from Dev Container callers.

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

* github: scope repository reads to anonymous clients

Move the repository domain from the root service to IGitHubAnonymousClient and rename readPublicFile to readFile. Use the owning client endpoint and get capability without nested lease acquisition; preserve shared cancellation normalization and explicit caller lease ownership.

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

* github: simplify anonymous client API

Move the anonymous client into its own module and expose readFile directly. Default omitted acquisition options to GitHub.com while preserving explicit endpoints, shorten the cancellation helper name, and remove the requested sample-cancellation test suite.

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

* github: consolidate anonymous client tests

Rename the client tests to anonymousClient.test.ts and include the repository file-read coverage in the same module. Retain all existing test definitions and update documented test selectors.

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

* github: let anonymous callers supply request options

Accept GitHubCancellation in get and readFile, use signal parameter names, and remove the IPC token adapter. Forward readFile caller, priority and deadline options; attribute interactive Dev Container reads at their call site instead of hardcoding github.query in the reusable client.

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

* Updates

* github: use governed raw downloads for repository files

Add a configurable raw-content base to anonymous host options and retain one REST commit lookup followed by a SHA-pinned raw download. Reuse bounded download handling with credential omission, pinned redirects and raw-origin quota isolation, preserving the sample cache and author SHA/path helpers.

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

* Updates

* PR feedback

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-10-05 16:00:10 +02:00
Ulugbek AbdullaevandCopilot 32a12c70b9 sessions: fix: canvas reopen failures (#339591)
* sessions: fix canvas reopen failures

Treat undefined editor results without a matching open editor as failures, and scope presentation cleanup to the exact canvas input generation. Add regressions for undefined results and overlapping stale/new opens.

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

* sessions: harden canvas reopen cleanup

Ignore disposed editor matches when validating undefined open results, and cover rejected close cleanup so the same live canvas can create a fresh input generation.

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

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-10-05 15:41:50 +02:00
Sandeep SomavarapuandCopilot 7d2e8e2469 sessions: Support read state with legacy Agent Hosts (#339704)
* sessions: support read state with legacy Agent Hosts

Treat missing per-chat read state from pre-0.10 Agent Hosts as unknown, preserve the client's conservative state across refreshes, and translate read updates to the legacy session-level action.

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

* sessions: fix legacy chat read fallback

Update the requested chat optimistically on pre-0.10 hosts and always dispatch retryable session-level read actions.

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

* sessions: use valid protocol version in remote tests

Use the generated current AHP version in remote provider mocks so capability checks exercise a valid negotiated SemVer.

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

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-10-05 13:05:36 +00:00
Sandeep SomavarapuandCopilot 8dab265f0c agentHost: Eagerly load set_workspace for workspaceless chats (#339730)
* agentHost: Eagerly load set_workspace for workspaceless chats

Keep the base tool deferred, but expose it eagerly when a session is workspaceless. Add Copilot and Codex end-to-end coverage for first-prompt workspace conversion.

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

* agentHost: Expand workspace file URI placeholders on replay

Preserve file URI semantics when replaying workdir placeholders so Windows drive paths are parsed as file paths rather than URI authorities. Regenerate the workspace conversion fixtures and cover the expansion directly.

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

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-10-05 14:57:22 +02:00
Sandeep SomavarapuandCopilot 7da3a97f02 agentHost: Synchronize session read state from chats (#339732)
* sessions: synchronize session read aggregate

Dispatch the session-level read action whenever a participating chat changes the effective aggregate, while leaving hidden and tool chats independent.

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

* agentHost: synchronize session read state from chats

Move aggregate read-state authority to Agent Host so clients only dispatch chat changes. Promote the session when the last participating unread chat becomes read, while preserving explicitly unread sessions on redundant chat updates.

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

* agentHost: restore chat read action documentation

Keep session aggregate synchronization as an Agent Host implementation detail without changing the existing protocol action contract.

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

* agentHost: avoid duplicate read state persistence

Apply an explicit session read action before synchronizing its sole chat so the chat transition does not recursively promote and persist the same session state twice.

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

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-10-05 12:56:29 +00:00
Simon SiefkeandDmitriy Vasyura 3e28fe0d50 fix: memory leak in MainThreadDebugService (#334102)
fix: dispose debug configuration providers

Co-authored-by: Dmitriy Vasyura <dmitriv@microsoft.com>
2026-10-05 12:51:38 +00:00
Christof MartiandCopilot d839efbde6 test: Match Dev Container smoke CLI quality and commit (#339697)
* test: Match Dev Container smoke CLI quality and commit

Prefer the desktop commit CLI when published, and explicitly fall back to the latest CLI in the same quality channel for unpublished builds. Stable smoke runs no longer depend on an Insiders-only fixture.

Fixes #339677

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

* test: Match source Dev Container CLI server directory

Apply the runtime source-only -dev suffix after merging product overrides so the provisioned commit-pinned CLI is reused by the production installer. Packaged and legacy fallback paths remain unchanged.

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

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-10-05 14:51:21 +02:00
mrleemurrayandCopilot d4feb25f37 sessions: Forward committed panel maximization state
Notify layout consumers after Grid maximization is committed so panelMaximized updates immediately.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-10-05 13:33:49 +01:00
mrleemurrayandCopilot 1ca93a48c2 sessions: Harden panel layout restoration
Restore maximized Grid visibility before orientation changes replace its nodes, and keep desktop editor visibility synchronization suspended through nested detail callbacks during panel reparenting.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-10-05 13:08:42 +01:00
mrleemurrayandCopilot 3447a18ad5 Merge main and address panel layout feedback
Preserve explicit visibility changes when leaving a maximized grid. Keep panel content sizing, divider affordances, and focused chat controls correct across panel alignment transitions.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-10-05 12:42:08 +01:00
vs-code-engineering[bot]andgithub-actions[bot] 16023148d6 Update endgame notebook milestones to 1.141.0 (#339649)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-10-05 11:38:56 +00:00
Sandeep SomavarapuandCopilot 01efa1ac56 sessions: Scope PR pills to their creating chat (#339727)
Honor the owning host's automatic PR association setting when resolving chat PR pills. Map recorded artifact owners from host chat URIs to UI resources so created PRs remain visible, including during chat catalog hydration.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-10-05 11:22:47 +00:00
mrleemurrayandCopilot 985b1dce93 sessions: Add configurable bottom panel alignment
Allow the Agents Window panel to span the main region or align beneath chat from the existing panel overflow. Preserve hidden Grid views, pane sizing, maximized state restoration, collapsed-sidebar spacing, and native macOS corner treatment across layout transitions.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-10-05 12:17:59 +01:00
Simon SiefkeandDmitriy Vasyura dae0d5919e feature: reduce number of strings by 1200 (#327689)
* perf: avoid premature listener stack traces

* test: inject listener stack trace creation

* refactor: keep listener stack change minimal

---------

Co-authored-by: Dmitriy Vasyura <dmitriv@microsoft.com>
2026-10-05 11:01:28 +00:00
Simon SiefkeandDmitriy Vasyura 1d92a977c4 fix: release terminal command history when clearing the normal buffer (#326931)
* fix: clear terminal command history with buffer

* fix: clear partial command detection markers

* fix: clear scrollback command history

* fix: preserve terminal command history when clearing alternate buffer

---------

Co-authored-by: Dmitriy Vasyura <dmitriv@microsoft.com>
2026-10-05 10:40:32 +00:00
Simon SiefkeandDmitriy Vasyura 3468b27020 fix: memory leak in debug adapter descriptor factory (#334103)
fix: dispose debug adapter descriptor factories

Co-authored-by: Dmitriy Vasyura <dmitriv@microsoft.com>
2026-10-05 10:40:06 +00:00
vs-code-engineering[bot]andgithub-actions[bot] 5a44f782c3 Bump version to 1.142.0 (#339650)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-10-05 10:39:46 +00:00
Dmitriy VasyuraandCopilot 7f7c7b1acf chat: validate plugin marketplace source and cache paths (#339655)
* chat: validate plugin source paths and skill copy destinations

Keep marketplace identities and cache locations consistent, recover stale cache entries, and validate copied skill filenames against the destination filesystem.

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

* chat: keep skill copying unchanged

Keep the change set focused on plugin marketplace path validation while retaining the latest upstream skill installer behavior.

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

* chat: validate Windows cache names and decoded Git paths

Validate computed and persisted cache components, check decoded source paths before sanitization, and filter invalid source and revision descriptors before catalog rendering.

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

* chat: validate generated marketplace ref cache segments

Reject unsupported ref cache names during marketplace parsing instead of failing later during installation. Cover trailing dots and encoded filename-length boundaries.

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

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-10-05 10:38:39 +00:00
Ürem Sancaktutan 1e72bb9dd2 Fix/issue 337524 multidiff order (#337565)
* Fix SCM multi-diff file ordering

* test: cover SCM multi-diff file ordering

* test: cover SCM multi-diff file ordering

* test: simplify SCM multi-diff ordering coverage

* test: organize SCM multi-diff test imports

* test: fix SCM multi-diff review findings
2026-10-05 10:38:28 +00:00
Ladislau Szomoru 45a59e27c2 Agents - fix branch picker defaults for New Worktree and Branch selection (#339701)
Agent Host changes for lszomoru/agents/branch-picker-defaults-fix
2026-10-05 12:27:56 +02:00
Ladislau Szomoru a52d7d628e Git - fix duplicate co-authors in git blame hover for squash merges (#339678)
Agent Host changes for lszomoru/agents/vscode-issue-331109-investigation
2026-10-05 11:38:33 +02:00
Christof MartiandCopilot 2dca67a07a test: Align Node unit test timeouts with Electron (#339290)
Configure the actual Mocha runner with local and CI defaults, and forward explicit timeout overrides instead of relying on the outer CLI.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-10-05 09:34:02 +02:00
Simon Siefke 48573218e0 fix: memory leak in output channel disposal listeners (#338240)
* fix: release output channel disposal listeners with their channel

* test: cover output disposal retention without explicit GC

* test: isolate output channel disposal from shared registry

Save and clear pre-existing output channel descriptors before constructing the test service, then restore them after its disposal. This prevents order-dependent active-channel assertions and initialization-after-shutdown leaks when agent-session tests run first.
2026-10-05 06:16:06 +00:00
Connor Peet 1a944823b6 Merge pull request #338278 from denizguney/patch-43
Fix duration calculation for agent stop command
2026-10-05 01:15:45 -05:00