Commit Graph
163383 Commits
Author SHA1 Message Date
0fc8be8db5 Cache Agent Host session list metadata (#331040)
* sessions: Cache Agent Host session metadata

Persist pull request metadata and aggregate change counts so cached Agent Host sessions render complete list rows before the first live refresh.

(Written by Copilot)

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

* sessions: Clear cached change summaries

Handle explicit change-summary clears so stale aggregate counts are not persisted and restored.

(Written by Copilot)

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

* agentHost: Preserve summary clears over the wire

Represent aggregate change-summary clears with an additive protocol marker and cover both transport serialization and metadata-only cache persistence.

(Written by Copilot)

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

* sessions: Keep cache change protocol-neutral

Remove the locally invented summary-clear wire marker while retaining isolated coverage for change-stat and metadata-only cache persistence.

(Written by Copilot)

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

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-08-15 21:53:58 +00:00
962cde6575 agentHost: Preserve detached shells during idle eviction (#330132)
* agentHost: Preserve detached shells during idle eviction

Let SDK session.idle complete the AHP turn normally, but defer non-destructive provider release while Copilot reports a running detached shell. Keep cached state until release succeeds, retry deferred releases, and preserve reconnect ordering while release is in flight.

Add focused unit coverage plus a real bundled-SDK mock-LLM integration test that verifies detached work survives beyond the release grace.

(Written by Copilot)

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

* agentHost: Normalize idle release coordination

Key idle-release timers by the owning root session so chat and subagent subscriptions cancel and re-arm the same retry. Preserve the original in-flight provider release promise when overlapping timers fire.

(Written by Copilot)

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

* agentHost: Adapt idle release to chat lifecycle

Split idle release into a provider preflight and chat teardown so detached shells can veto eviction while successful releases preserve state-first reconstruction. Normalize release coordination across all chats and update restart coverage to unsubscribe every open chat.

(Written by Copilot)

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

* agentHost: Remove no-op Claude release change

Restore the original combined release guard after the chat release contract returned to void semantics.

(Written by Copilot)

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

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-08-15 20:59:04 +00:00
roblourensandGitHub 68a5009137 sessions: Fix chat input model disposal race (#331041)
Keep the synchronously created input model alive until its resolver reference takes ownership, and dispose late references when the widget has already closed. Add a regression test for immediate disposal during reference acquisition.\n\n(Written by Copilot)\n\nCo-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-08-15 20:32:38 +00:00
f00de87961 [Perf] Add Agent Host startup telemetry (#330484)
* Add Agent Host startup telemetry

Track connection, authentication, and initial session-list startup phases, including retries, terminal failures, and timeouts. (Written by Copilot)

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

* Attribute post-connection startup failures to the session-list stage

A terminal connection close after AHP connected was reported as a protocolConnection failure, matching neither the timeout path nor reality. (Written by Copilot)

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

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-08-15 20:24:35 +00:00
roblourensandGitHub a88eb324af Fix terminal buffer mark navigation hang (#331035)
Consume the existing buffer mark iterator instead of repeatedly creating a new iterator that returns the first marker. Add a regression test for marker navigation without command detection.\n\nFixes #331034\n\n(Written by Copilot)\n\nCo-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-08-15 20:23:33 +00:00
6604ee8271 agentHost: resolve archived divergent Copilot backings (#331032)
* agentHost: resolve archived divergent Copilot backings

Fixes #331030\n\n(Written by Copilot)

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

* agentHost: persist resolved resume roots

Keep the resolved primary directory aligned with the ordered working-directory metadata when restoring divergent Copilot backings.\n\n(Written by Copilot)

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

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-08-15 20:23:16 +00:00
82bf722255 Avoid blocking agent host startup on proxy resolution (#330876)
* Avoid blocking agent host startup on proxy resolution

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

* Defer proxy restart during credential updates

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

* Refresh proxy on every Copilot client start

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

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-08-15 17:04:06 +00:00
336b8eeadd agentHost: Increase E2E coverage (#330995)
agentHost: increase E2E coverage

Add stable conformance coverage for chat references, filesystem operations, and Git sync.\n\n(Written by Copilot)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-08-15 16:29:34 +00:00
f8023e37c1 sessions: Preserve editor width when restoring details (#331008)
* sessions: preserve editor width when restoring details

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

* sessions: test explicit details visibility reset

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

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-08-15 14:37:33 +00:00
c69ccc0835 sessions: Support dragging subagent chats to the side (#331009)
sessions: support dragging subagent chats to side

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-08-15 14:37:15 +00:00
vs-code-engineering[bot]GitHubgithub-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
6c27443ce6 chore: bump @github/copilot-sdk to 1.0.11 and @github/copilot to 1.0.81-0 (#330990)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-08-15 05:41:30 +00:00
Joaquín RualesandGitHub 80b2a71e86 Harden launch skill TMPDIR fallback (#330989) 2026-08-15 04:07:19 +00:00
6abe1bf33f Improve pet animations and gravity mechanics (#330969)
* Agent Host changes for agents/pet-animation-and-gravity-improvements

* chat: address pet animation review feedback

- Track the active renderer window separately from application focus so moving
  between main and auxiliary windows cannot leave multiple pets visible.
- Align the blink cycle with the documented 260ms contract while preserving the
  intended visible eye closure.
- Add focused regression coverage for active-window ownership and blink timing.

(Commit message generated by Copilot)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 35477556-cb8e-4dd0-bb39-ce6e3734f381

* chat: provide host service in component fixtures

- Register the host focus service required by ChatPetWidget so Sessions chat
  fixtures can construct successfully.
- Allow normal fixture teardown to dispose the complete widget graph instead of
  reporting secondary undisposed resources after construction aborts.

(Commit message generated by Copilot)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 35477556-cb8e-4dd0-bb39-ce6e3734f381

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 35477556-cb8e-4dd0-bb39-ce6e3734f381
2026-08-15 02:22:57 +00:00
Joaquín RualesandGitHub 99851565b3 Show Preview for HTML files changed by an agent turn (#330980) 2026-08-15 02:12:18 +00:00
bb7e37086f agentHost: Attribute telemetry to initiating clients (#330982)
* agentHost: attribute telemetry to initiating clients

Plumb VS Code client telemetry identity through AHP and attach the complete known initiator context to attributable Agent Host events without replacing host identity. (Written by Copilot)

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

* agentHost: address client attribution feedback

Fix test registration, propagate initiator context through provider operations and Claude edit telemetry, and retain identity in AHP diagnostic logs. (Written by Copilot)

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

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-08-15 01:27:07 +00:00
d8baf2284e Fix launch skill on macOS default TMPDIR (#330988)
macOS's default TMPDIR makes the Electron IPC socket path exceed the
~103-char unix socket limit, so every launch failed with EINVAL. Fall
back to /tmp, and document the same limit for the Playwright daemon.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-08-15 01:16:14 +00:00
Vijay UpadyaandGitHub c3c097e0e8 Migrate per-request credits when adopting legacy EH Copilot CLI sessions (#330981)
* Migrate per-request credits when adopting legacy EH Copilot CLI sessions

* feedback update
2026-08-15 00:59:10 +00:00
Vijay UpadyaandGitHub 199093dc4b agentHost: EH migration - show worktree sessions in a window opened on their repository folder (#330973)
agentHost: show worktree sessions in a window opened on their repository folder
2026-08-15 00:59:08 +00:00
vs-code-engineering[bot]GitHubgithub-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>vs-code-engineering[bot] <122617954+vs-code-engineering[bot]@users.noreply.github.com>CopilotPaul Wang
50e03bd878 chore: bump @github/copilot-sdk to 1.0.11-preview.2 and @github/copilot to 1.0.80 (#330782)
* chore: bump @github/copilot-sdk to 1.0.11-preview.2 and @github/copilot to 1.0.80-1

* Adapt agentHost to SDK JsonValue tool-args/settings widening

SDK 1.0.11-preview.2 widened PermissionRequest custom-tool args,
tool.execution_start arguments, callTool arguments, and managed-settings
resolved data from Record<string, unknown> to the recursive JsonValue type.
Migrate the VS Code call sites (and their tests) to the new contract,
narrowing JsonValue back to an object where property access is needed.

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

* Fix Copilot agent host E2E regressions

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

Copilot-Session: e206fce0-c0c1-4d83-8462-4fca8ed4d5cc

* Update Copilot CLI to 1.0.80

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

Copilot-Session: e206fce0-c0c1-4d83-8462-4fca8ed4d5cc

* Isolate Copilot state in smoke tests

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

Copilot-Session: e206fce0-c0c1-4d83-8462-4fca8ed4d5cc

* Isolate Codex state in smoke tests

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

Copilot-Session: e206fce0-c0c1-4d83-8462-4fca8ed4d5cc

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: vs-code-engineering[bot] <122617954+vs-code-engineering[bot]@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Paul Wang <8560030+pwang347@users.noreply.github.com>
Copilot-Session: e206fce0-c0c1-4d83-8462-4fca8ed4d5cc
2026-08-14 23:33:28 +00:00
Megan RoggeandGitHub 9650e9c24b Improve Omni Chat window and voice ownership (#330886) 2026-08-14 23:08:45 +00:00
553ee8803d Implement Start Over confirmation similar to Restore Checkpoint (#330968)
* Agent Host changes for agents/start-over-confirmation-implementation

* chat: restore requests after checkpoint confirmation

- Keeps canceled Restore Checkpoint and Start Over actions side-effect free so the composer remains untouched.
- Adds regression coverage for cancellation on both checkpoint action paths.

(Commit message generated by Copilot)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: a607cd2e-84d2-4397-807a-ae36ff764d7e

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: a607cd2e-84d2-4397-807a-ae36ff764d7e
2026-08-14 23:07:37 +00:00
Connor PeetandGitHub ffb45b73c1 Merge pull request #330752 from microsoft/copilot/fix-xtensions-autoprofiler-teardown
Skip Extension Auto-Profiler for Test Hosts
2026-08-14 16:04:11 -07:00
Vijay UpadyaandGitHub 89d4afc2f5 agentHost: stop legacy Copilot CLI sessions from migrating on list/scroll and enforce the migrate setting (#330959)
* agentHost: stop legacy Copilot CLI sessions from migrating on list/scroll and enforce the migrate setting

* Feedback fixes
2026-08-14 22:50:03 +00:00
Michelle MaandGitHub 44acc92025 Merge pull request #330961 from microsoft/michiisai/copilot-title-span-sdk-conversation-id
agentHost: emit Copilot title span under the SDK conversation id
2026-08-14 15:27:55 -07:00
Connor PeetandGitHub 895830fa7d Merge pull request #330413 from microsoft/alexd/agent-host-plugin-cache-not-found
agentHost: drop missing plugin cache entries
2026-08-14 15:27:10 -07:00
Joaquín RualesandGitHub f764694f93 Add regression tests for thenable RPC proxies (#330966) 2026-08-14 21:56:36 +00:00
Megan RoggeandGitHub e47603bd6d Fix moved Omni picker positioning (#330963)
* Fix moved Omni picker positioning

Use authoritative native bounds for the focused Omni window when positioning model, folder, and context picker overlays after the window has been dragged.

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

Copilot-Session: 38881cae-54c4-44ea-9f5b-e0a2874c2979

* Target Omni window for picker bounds

Resolve picker geometry by the Omni auxiliary window ID instead of the last active main window.

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

Copilot-Session: 38881cae-54c4-44ea-9f5b-e0a2874c2979

---------

Copilot-Session: 38881cae-54c4-44ea-9f5b-e0a2874c2979
2026-08-14 21:55:28 +00:00
Michelle Ma 5cc8da4dd5 copilot: recover the SDK conversation id from the default-chat backing after restart 2026-08-14 14:47:22 -07:00
Michelle Ma c8e6c01afa copilot: recover the SDK conversation id from the default-chat backing after restart
The title span resolved the SDK conversation id only from a live session or a
provisional reservation, both of which are empty after a cold restart until the
session is resumed. A rename in that window fell back to the AH session id, so
the title span drifted off the turn spans again for fork/import/peer sessions.
Consult the persisted default-chat backing before falling back (fresh sessions
store the AH id there, so no change for them).
2026-08-14 14:47:19 -07:00
43c9cf468f Fix Chat panel progress badge alignment (#330965)
Fixes #330962

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-08-14 21:46:03 +00:00
c355b6e72f Condense comment
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
2026-08-14 14:24:02 -07:00
29a3e6fd96 Potential fix for pull request finding
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
2026-08-14 14:23:32 -07:00
Henning DieterichsandGitHub d6abb42654 Implements rich link rendering in chat (#330925)
* implements rich link presentation in chats

* Allows settings to be set by experiments

* Fix rich link CI configuration

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

Copilot-Session: b8949987-7bbf-43c2-a7bb-ee6450ac74c7

---------

Copilot-Session: b8949987-7bbf-43c2-a7bb-ee6450ac74c7
2026-08-14 21:17:51 +00:00
442593fc2e agentHost: avoid status index lock races (#330952)
Run background status probes with optional Git locks disabled so changeset commits do not contend for index.lock. (Written by Copilot)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-08-14 21:16:39 +00:00
Aaron MungerandGitHub cff47d718c agentHost: add Copilot SKU telemetry context (#330756)
* agentHost: add Copilot SKU telemetry context

Propagate the raw Copilot entitlement SKU from account discovery to provider-scoped Agent Host events while omitting unavailable and non-Copilot values.\n\nCo-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* agentHost: use Copilot provider ID for SKU telemetry

Align SKU enrichment and its coverage with the production copilotcli provider identifier.\n\nCo-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* agentHost: support Copilot telemetry provider aliases

Include SKU context for both the copilotcli agent provider and direct Copilot SDK telemetry paths that still emit copilot.\n\nCo-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* agentHost: centralize Copilot SKU telemetry context

Add the authenticated account SKU in the Agent Host telemetry service so every standard and restricted event receives it, independent of provider. Clear the context on sign-out without relying on immutable common-property storage.\n\nCo-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* agentHost: register SKU as common telemetry context

Use the telemetry delegate's common-property path for standard classified events so their exact GDPR types remain intact. Continue enriching restricted telemetry in the Agent Host sender.\n\nCo-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* agentHost: reuse common telemetry properties for SKU

Add a generic setCommonProperty to the restricted telemetry surface and fan common properties out from the Agent Host telemetry service, so account context reaches GH and internal events without per-property special casing.\n\nCo-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-08-14 21:16:16 +00:00
7d74b41159 Fix Automations custom view registration (#330926)
* Fix Automations custom view registration

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-08-14 21:12:11 +00:00
fef7793c50 Improve logging for automation timeout issues and session tracking (#330920)
* Agent Host changes for agents/automation-timeout-issue-logging-update

* Automations: Improve timeout diagnostic accuracy

Log the created session resource when link persistence fails, and use the persisted post-update run state in timeout diagnostics.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-08-14 21:09:18 +00:00
Michelle Ma d9e89ae592 copilot: emit session-title span under the SDK conversation id
The host-emitted title_changed span carried gen_ai.conversation.id set to
the AH session id, while the agent's anchor and turn spans use the SDK
conversation id. After the id namespaces were separated, those diverge for
fork/import/peer chats, so the title span stopped correlating with the
turn spans. Resolve the SDK conversation id backing the session URI when
emitting the title span, falling back to the AH session id (no change for
fresh sessions).
2026-08-14 13:58:22 -07:00
9b441bb7e5 chat: identify managed settings client via query parameters (#330759)
* chat: carry managed settings client identity in the query string

Neither header channel survives the trip to the settings service: fetch
refuses to set User-Agent, and custom headers are dropped before reaching
the monolith unless they are allow-listed. Move the client identity into
the request URL, which is subject to neither restriction and behaves the
same on desktop and web.

Restores the product service injection that #330762 removed along with
the dead headers, since the identity is built from the product version.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 584bc910-e58b-44d4-9aaf-eefda60f23e4

* chat: drop a stale runtime version from the managed settings url

The helper preserves query parameters already present on the configured
endpoint, so a `copilot_runtime_version` carried by that URL would stand
in for a runtime this build did not bundle. Remove it when no runtime is
present, and stop exporting the client id, which has no consumer outside
this module.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 584bc910-e58b-44d4-9aaf-eefda60f23e4

---------

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 584bc910-e58b-44d4-9aaf-eefda60f23e4
2026-08-14 13:56:27 -07:00
Justin ChenandGitHub 8715d6263b fix md resize causing wrong calculated position (#330930) 2026-08-14 19:54:41 +00:00
3be68b887b automations: Handle edit dialog failures (#330919)
* automations: Handle edit dialog failures

Log edit dialog failures and surface them through the existing automation update error dialog.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 4bf587de-21e4-4023-bce8-ee1c1426a0be
2026-08-14 19:35:41 +00:00
Joaquín RualesandGitHub f59e07449b Guard RPC proxies against becoming thenables (#330923) 2026-08-14 19:35:25 +00:00
b307f82103 Hide breadcrumbs in compact windows (#330656)
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 04194fda-2b28-4ebe-a199-2d02e9ce21d5
2026-08-14 19:10:45 +00:00
e0f3c81f4d agentHost: anchor the side chat boundary to the inherited turn id (#330910)
* agentHost: use the side chat seed marker as the inherited turn boundary

A side chat forks its source chat, so its transcript starts with inherited turns
and continues with its own turns. The boundary was kept only as a turn count in
the persisted backing. The count is a copy of a value that changes with time, and
a recompute in `createChat` wrote the full transcript length back into it. When
that recompute ran again for a chat that already had its own turns, the count
increased and the display hid the turns of the user. In one session the count
moved from 16 to 24 and hid 8 turns.

The first own turn of a side chat carries a `<side-chat-context>` seed marker.
The marker gives the same boundary, it stays in the transcript, and it does not
change with time. The marker is now the authority and the count is a hint.

- Removes the recompute in `createChat` that wrote the transcript length into
  `inheritedTurnCount`. The value from the fork is correct and must stay.
- Adds `resolveSideChatBoundary`, which keeps the recorded count when a marker is
  at that position, and otherwise moves to the first marker. A count that is too
  large can no longer hide turns. A side chat that forks a side chat keeps the
  recorded count, because its inherited turns hold the marker of the parent.
- Adds `sliceSideChatTurns`, which resolves the boundary, slices, strips the seed
  and reports a misalignment to the log. The Copilot and Claude read paths use it.
- Compares against the resolved boundary in `prepareSideChatPrompt`, so a count
  that is too large can no longer cause a second seed injection.
- Adds a warning when a fork does not find its anchor turn. The fallback treats
  the full source as inherited, which hid all turns without a record.
- Extracts the seed parser from `stripSideChatContext` so that detection and
  removal of the seed cannot diverge.
- Binds two side chat test fakes to the sends of the recorder instead of a count
  of `getMessages` calls. The count made the tests depend on the defect.

Corrupt counts need no migration, because the correction occurs at read time.

(Commit message generated by Copilot)

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

* agentHost: let the last side chat seed marker set the boundary

Simplifies the boundary resolver to a reverse scan that stops at the last seed
marker. The earlier version searched only at or before the recorded count, which
made the corrupt value bound the repair, and which returned the seed of an
ancestor when a nested side chat had a count that drifted past its own seed.

- Returns the index of the last seed marker in the transcript. Markers of
  ancestors always precede the marker of the chat, so the last one is the
  boundary for a nested side chat as well.
- Uses the recorded count only when the transcript holds no marker, which means
  the chat did not send a message yet.
- Adds a test for a nested side chat with a count that drifted past its own
  marker. The earlier version resolved that case to the marker of the parent and
  showed the turns of the parent.

(Commit message generated by Copilot)

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

* agentHost: anchor the side chat boundary to the inherited turn id

Replaces `inheritedTurnCount` with `inheritedTurnId`, the id of the last turn a
side chat inherits from its source. The id names a turn of the same transcript
that the reads slice, so it stays correct while the chat grows, and it tells the
seed marker of the chat apart from the markers of the side chats it descends
from. A count cannot do either.

Copilot reported the gap on the previous revision: a side chat that forks
another side chat holds the marker of the parent before it sends anything, so a
rule of "take the last marker" gave the index of the parent. Reads then showed
the turns of the parent, and the first prompt of the child went out with no
context.

- Records `inheritedTurnId` on the Copilot and Claude fork paths. Forks copy the
  transcript, so the ids of the inherited turns carry over unchanged.
- Resolves the boundary from that id first, then from the last seed marker, then
  from the count that older builds wrote.
- Keeps `inheritedTurnCount` as an optional legacy field. A chat written by an
  older build still resolves, and a chat whose count drifted is repaired by the
  marker.
- Adds tests for a nested side chat before and after its first message, and for
  an id that no longer resolves.

(Commit message generated by Copilot)

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

* agentHost: drop inherited side chat turn counts

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

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-08-14 18:36:28 +00:00
CopilotGitHubcopilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>benibenj
a7c5d021f3 Document proper context key usage (#330891)
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: benibenj <44439583+benibenj@users.noreply.github.com>
2026-08-14 18:09:23 +00:00
79c2382913 Revert to showing all context size options (#330737)
* Revert to showing all context size options

Removes the `github.copilot.chat.preferLongContext.enabled` setting and
reverts to always showing both the default and long-context options in the
model picker. Also removes the now-dead `freeLongContext` plumbing that the
setting gated.

Reverts:
- https://github.com/microsoft/vscode/pull/322950
- https://github.com/microsoft/vscode/pull/323116
- https://github.com/microsoft/vscode/pull/324650
- https://github.com/microsoft/vscode/pull/328628

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

* Add context-size picker coverage for both surfaces

Addresses PR review: cover the reverted "always show both context options"
behavior for each independently implemented picker surface.

- languageModelAccess.test.ts: a free/no-surcharge endpoint publishes both
  the default and full windows, with the smaller window as the default.
- copilotCliModels.spec.ts: a CLI model with defaultContextMax < maxInputTokens
  and no long-context surcharge exposes both sizes, smaller as default.

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

* Default to the longer window for free long-context models

Keeps both context-size options in every picker, but when the long-context
tier has no surcharge (free long context) the default selection — and the
no-selection behavioral fallback — is the full window rather than the smaller
default tier. Models with a long-context surcharge still default to the
smaller tier so users opt into the extra cost.

Applied consistently across all four surfaces:
- Main chat picker: getContextSizeOptions default + applyContextSizeOverride fallback
- Copilot CLI picker: buildConfigurationSchema default + resolveContextTier fallback
- Agent host: _createContextSizeConfigSchemaProperty default + getCopilotContextTier
  via the restored freeLongContext flag (and hasLongContextSurcharge helper)

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

* Shorten context-size comments

Condense the free-long-context comments added across the picker surfaces to
concise one-liners; no behavior change.

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

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-08-14 11:00:17 -07:00
c3087f0426 agentHost: stabilize ARC reporter ordering test (#330898)
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-08-14 17:59:19 +00:00
Logan RamosandGitHub 78db8bfcd7 Further Cleanup Model restoration logic (#330884)
* Further cleanup of model restoration logic

* Small cleanup

* Fix comments

* Preserve a conversation's model across pool rebinds

initialize() wrote the profile preference into the bound conversation's intent
unconditionally, erasing a model seeded from request history before the catalog
published it. Seed only when the conversation has not chosen a model.

Also capture the inline editor's instruction routing with the mode it belongs to,
so a resubmit cannot pair the edited mode with the composer's tool selection.
2026-08-14 17:50:39 +00:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>Raymond Zhao
a83ce21692 build(deps): bump nanoid from 3.3.11 to 3.3.18 in /test/monaco (#329700)
Bumps [nanoid](https://github.com/ai/nanoid) from 3.3.11 to 3.3.18.
- [Release notes](https://github.com/ai/nanoid/releases)
- [Changelog](https://github.com/ai/nanoid/blob/3.3.18/CHANGELOG.md)
- [Commits](https://github.com/ai/nanoid/compare/3.3.11...3.3.18)

---
updated-dependencies:
- dependency-name: nanoid
  dependency-version: 3.3.18
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Raymond Zhao <7199958+rzhao271@users.noreply.github.com>
2026-08-14 10:48:44 -07:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>Raymond Zhao
da166b949c build(deps): bump nanoid from 3.3.12 to 3.3.18 in /extensions/mermaid-markdown-features (#330691)
build(deps): bump nanoid in /extensions/mermaid-markdown-features

Bumps [nanoid](https://github.com/ai/nanoid) from 3.3.12 to 3.3.18.
- [Release notes](https://github.com/ai/nanoid/releases)
- [Changelog](https://github.com/ai/nanoid/blob/3.3.18/CHANGELOG.md)
- [Commits](https://github.com/ai/nanoid/compare/3.3.12...3.3.18)

---
updated-dependencies:
- dependency-name: nanoid
  dependency-version: 3.3.18
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Raymond Zhao <7199958+rzhao271@users.noreply.github.com>
2026-08-14 10:48:19 -07:00