162086 Commits

Author SHA1 Message Date
Justin Chen
c64d68e60d
Merge branch 'main' into agents/edit-plan-mode-widget-functionality 2026-07-29 17:02:49 -07:00
Ulugbek Abdullaev
1516e1ad31
nes: generate samples from workspace recordings (#328095)
* nes: feat: generate samples from workspace recordings

Parse stateful local workspace recordings, select deterministic user-edit and cursor pivots, materialize privacy-safe replay slices, and support bounded parallel datagen without splitting raw timelines.

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

Copilot-Session: 62cca64b-0581-410e-ab89-034e20f02ca7

* nes: fix: include cursor boundaries in sample deduplication

Hash the complete post-pivot label so identical prompts with different cursor destinations are rejected as conflicting samples.

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

Copilot-Session: 62cca64b-0581-410e-ab89-034e20f02ca7

* nes: fix: consolidate workspace recording imports

Use inline type specifiers so the Copilot extension lint job accepts the new workspace-recording modules.

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

Copilot-Session: 62cca64b-0581-410e-ab89-034e20f02ca7

---------

Copilot-Session: 62cca64b-0581-410e-ab89-034e20f02ca7
2026-07-30 04:49:08 +05:00
Connor Peet
820ce2bb64
Merge pull request #328132 from microsoft/copilot/remove-tool-failure-auto-expand
chat: stop auto-expanding non-terminal tool failures
2026-07-29 16:46:38 -07:00
Connor Peet
e40b563f89
agentHost: preserve steering before queued messages (#328106)
* agentHost: preserve steering before queued messages

Buffer steering before invoking the SDK so synchronous echoes are correlated, and keep queued messages pending across the SDK's intermediate idle until steering is promoted.

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

* agentHost: strengthen steering timing tests

Keep mocked SDK sends unresolved while emitting steering events so the regressions exercise the in-flight race directly.

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

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-07-29 23:38:15 +00:00
Aaron Munger
18e5dfaf6e
agentHost: fix flaky ARC reporter test (#328129)
Wait for the intentional sample failure and final telemetry event instead of relying on a fixed wall-clock delay.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-07-29 23:36:18 +00:00
Osvaldo Ortega
99f129b2db
Copilot cloud sandbox sessions over a live Agent Host Protocol relay (#328097)
* Add Copilot cloud sandbox sessions over a live AHP relay

Copilot cloud sessions whose tasks run in a Mission Control sandbox (agent slug
`copilot-developer-cli`) are rendered by polling REST logs today, so they have no
slash commands and no steering.

Connect to the sandbox instead: `copilotd` runs inside it and speaks the Agent
Host Protocol, so once a relay is open the existing agent-host stack renders the
session natively — history, live output, steering and slash commands.

The sandbox is not directly addressable, so both sides connect outward to an
Azure Web PubSub relay brokered by Mission Control. Credentials are minted per
connection, and the user's GitHub token is forwarded only as a sealed envelope
the relay cannot read.

Everything runs in the renderer, so this also works in VS Code Web, where no
Copilot extension host is available. Mission Control is reached over the Copilot
API host: `api.github.com/agents/*` omits CORS headers on authenticated
responses, so a renderer fetch receives the reply and then discards it.

The AHP `initialize` now advertises every protocol version this client can
negotiate rather than only the newest, so a sandbox running an older `copilotd`
can negotiate down instead of being rejected.

Gated behind `chat.agentHost.cloudSandbox.enabled`, off by default.

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

* Address PR review feedback for cloud sandbox sessions

- Subscribe to host state by the backend URI. Session output, changesets and
  last-turn changes still rebuilt the URI from the UI scheme, so an aliased
  sandbox session subscribed to a URI the host's registry does not know.

- Apply the session-scheme alias on the live `SessionAdded` path too. Only the
  refresh and persistence paths adopted, so a session created while connected
  kept the host's scheme and never routed to a content provider.

- Report discovery completeness instead of a bare list. A failed or partial scan
  read as "these sessions no longer exist", so a transient request failure could
  tear down live providers and cancel the auth retry. Only a complete scan is
  reconciled against.

- Cancel in-flight work when the feature is disabled. Discovery and connect ran
  with `CancellationToken.None` and did not recheck enablement after their
  awaits, so either could commit state — including a live relay — after teardown.

- Document why publish acks are not tracked, and why the feature is gated on a
  setting: sandbox tasks carry a slug the Copilot extension's cloud provider does
  not list today, but that is expected to change.

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

* Reuse the shared Copilot API host constant

The cloud sandbox service declared its own copy of `https://api.githubcopilot.com`
alongside the one in `githubEndpoints.ts`. Export the existing constant and use it,
noting that it is distinct from `IGitHubEndpoints.apiBaseUri` (`api.github.com`).

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

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-07-29 23:35:20 +00:00
Rob Lourens
96729ed399
agentHost: Remove obsolete tool arguments metadata (#328086)
* agentHost: Remove obsolete tool arguments metadata

Use the AHP toolInput field as the sole source of tool invocation input instead of duplicating serialized arguments in the provider-specific _meta bag. Remove the legacy producer, typed metadata slot, and obsolete tests.\n\n(Written by Copilot)\n\nCo-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* agentHost: Address tool input review feedback

Reject array-valued tool input when synthesizing structured SDK arguments and make the history assertion validate the raw AHP toolInput representation directly.\n\n(Written by Copilot)\n\nCo-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* sessions: Fix voice bridge test construction

Supply the sessions and chat widget service mocks required by NewChatVoiceTargetService after concurrent voice changes landed on main.\n\n(Written by Copilot)\n\nCo-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-07-29 23:28:48 +00:00
Connor Peet
94ef2b9456
chat: stop auto-expanding non-terminal tool failures
Keep terminal tool failures expanded while preserving the collapsed state for other failed tool calls.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-07-29 16:18:55 -07:00
Vritant Bhardwaj
663aa23e78
Merge pull request #328010 from microsoft/dev/vritan24/geminiByok
chat: fix BYOK tool schemas and continuation state
2026-07-29 16:10:28 -07:00
Aaron Munger
70511d6782
disable flakey test (#328101) 2026-07-29 22:59:55 +00:00
Bryan Chen
15fc669eed
telemetry: report ResizeObserver delivery context (#328065)
* telemetry: report ResizeObserver delivery context

The browser's ResizeObserver loop ErrorEvent contains only a generic message; it does not expose the skipped target or causative callback. Prefixing that warning with the most recently invoked DisposableResizeObserver therefore turned callback order into false causal attribution.

Record the wrapped observers that ran in the current rendering frame instead. Context is scoped per window, deduplicated, sorted for stable bucketing, and bounded to the canonical smallest eight names plus an overflow marker. The telemetry prefix explicitly calls these recent wrapped observers rather than an offending consumer.

Clear context at the next animation frame, after Blink dispatches any loop warning from the current rendering update. Unit coverage locks deduplication, canonical overflow, window isolation, and frame cleanup; a real Chromium component fixture deliberately triggers a self-resize loop and verifies context survives until the native warning.

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

Copilot-Session: aacd276e-cf84-48bd-a2ab-6f6a4d4c3431

* telemetry: shorten ResizeObserver context prefix

ResizeObserverLoopContext already identifies the observer names as non-causal context, so remove the redundant 
ecentWrappedObservers= label from the emitted error string.

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

Copilot-Session: aacd276e-cf84-48bd-a2ab-6f6a4d4c3431

---------

Copilot-Session: aacd276e-cf84-48bd-a2ab-6f6a4d4c3431
2026-07-29 15:53:37 -07:00
Megan Rogge
a27cde4387
Voice Mode onboarding preview polish (#328094) 2026-07-29 22:42:19 +00:00
Justin Chen
64a7da22f4
Fix request timestamp placement while editing (#327972)
* Fix request timestamp placement while editing

Keep request timestamps visible and place them below the inline edit input.

Fixes #327712

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

* fix some stuff

* remove anchoring stuff

* address comments

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-07-29 22:29:20 +00:00
Vritant Bhardwaj
dd83544dc8
Merge branch 'main' into dev/vritan24/geminiByok 2026-07-29 15:27:22 -07:00
Connor Peet
b5c7a93247
Merge pull request #328115 from microsoft/megrogge/fix-main-voicebridge
Fix voice bridge test service setup
2026-07-29 15:27:04 -07:00
vritant24
77c4d629a7
Revert "agentHost: preserve BYOK tool-call continuation state"
This reverts commit c4d7b35b646e2b54162fe53739d52df3cb5a902d.
2026-07-29 15:07:38 -07:00
Megan Rogge
61d798d02d
Fix voice bridge test service setup
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: db94f3da-b5b5-4265-b2f6-f4dd41a4527c
2026-07-29 17:59:40 -04:00
vritant24
c4d7b35b64
agentHost: preserve BYOK tool-call continuation state
Keep provider thinking and opaque continuation metadata across the Agent
Host OpenAI loopback boundary. Cache it by authenticated session and tool
call, then rehydrate the assistant turn when Copilot replays the call.

This preserves Gemini thought signatures, Claude signed and redacted
thinking blocks, and unsigned reasoning content used by compatible
providers such as DeepSeek and Kimi. Bound the cache per session and add
round-trip, ordering, coalescing, retry, and isolation coverage.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-07-29 14:35:58 -07:00
Justin Chen
d97bfb9069
Merge branch 'main' into agents/edit-plan-mode-widget-functionality 2026-07-29 14:31:06 -07:00
justschen
dc1856aae8
remove editor.ts changes, scope to just linking for now 2026-07-29 14:21:16 -07:00
Copilot
e283ece67e
Avoid duplicate extension tools in the tool picker (#328081)
* Initial plan

* Fix duplicate extension tools in picker

Co-authored-by: dmitrivMS <9581278+dmitrivMS@users.noreply.github.com>

* Preserve documentation capitalization

Co-authored-by: dmitrivMS <9581278+dmitrivMS@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: dmitrivMS <9581278+dmitrivMS@users.noreply.github.com>
2026-07-29 21:09:09 +00:00
Connor Peet
ac7add9f0c
Address review feedback from #328087 (#328093)
Address review feedback

- Resolve the type check child process on `close` rather than `exit`, so the
  captured stdout/stderr is complete before it is inspected. Resolving on
  `exit` could race with the pipes draining and truncate diagnostics.
- Use an explicit type predicate when filtering out unresolved symbols rather
  than relying on inferred narrowing of `Symbol | undefined`.
- Drop the redundant second `disallowedTypes.includes()` in toViolations by
  splitting the direct name match from the symbol id lookup.
- Fix a collapsed function signature and reword the pass 1 comment, which
  described files matched by a rule that disallows nothing as "exempt" and
  read as though skipped files were traversed.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-07-29 20:59:38 +00:00
MR NILARNAB GITHUB
3ee2723dee
docs: fix minor typos and grammar in README (#325006)
docs: fix minor typos and grammar in README

- Fixes spacing and indentation for the VS Code image HTML wrapper.
- Updates "Visual Studio Code's website" to "the Visual Studio Code website" for better readability.
- Changes "help us verify as they are checked in" to "help us verify them as they are checked in".
- Merges "code base" into the modern single-word form "codebase".
- Adds missing commas for introductory clauses (e.g., before "which creates a Docker volume" and "see the Code of Conduct FAQ").
2026-07-29 22:59:11 +02:00
Elijah King
8628d21588
Merge pull request #328070 from microsoft/eli/agents/remove-shimmer-animation-vscode
chat: replace the dictation shimmer with a static processing color
2026-07-29 13:47:39 -07:00
Copilot
e80928bcd8
Voice mode: show for a single chat input (#327852) 2026-07-29 20:41:49 +00:00
Ulugbek Abdullaev
060d04f069
xtab: clamp tagged patch range to document (#328090)
xtab: fix: clamp tagged patch range to document

Tagged prompt content can add lines beyond the source document. Clamp the CustomDiffPatch pseudo-window to the source range to avoid an unexpected failure.

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

Copilot-Session: 62cca64b-0581-410e-ab89-034e20f02ca7
2026-07-30 01:41:11 +05:00
Aaron Munger
aa1e3cda0f
Validate workspace trust for notebook links (#328043)
* Validate workspace trust for notebook links

Route notebook webview resource links through the editor service trust gate while preserving selections and editor group targeting.

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

* Preserve notebook link opener behavior

Keep custom URI, folder, fragment selection, and existing editor handling intact while validating trust for out-of-workspace resources.

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

* Fix notebook link opener options

Rely on the opener URI fragment for selections instead of passing text editor options through the generic opener API.

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

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-07-29 20:41:07 +00:00
Ladislau Szomoru
a92b91de60
AgentsHost - add configurattion to control branch tracking during worktree creation (#328088)
Initial implementation
2026-07-29 20:36:53 +00:00
Copilot
dcd05f9eb9
Skip voice narration summary for cancelled chat turns (#328046)
* Initial plan

* Suppress voice narration summary for cancelled chat turns

Co-authored-by: meganrogge <29464607+meganrogge@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: meganrogge <29464607+meganrogge@users.noreply.github.com>
2026-07-29 20:36:16 +00:00
Elijah King
69c267aebd Merge remote-tracking branch 'upstream/main' into eli/agents/remove-shimmer-animation-vscode
# Conflicts:
#	src/vs/workbench/contrib/chat/test/browser/dictationSession.test.ts
2026-07-29 13:31:24 -07:00
Connor Peet
dde569a9f6
Speed up valid-layers-check by ~11x (#328087)
The check took ~257s and would sometimes run out of memory. Two separate
bottlenecks were responsible.

layersChecker.ts built a full in-process ts.Program (15s, 2GB) and then
asked the type checker for a symbol at every property access in the
program, ~2.5M identifiers. Each lookup materialized symbol and type
objects, pushing the heap past 3.6GB, and the alias/containment chain was
then walked per symbol.

It now runs on the TS7 native API that the repo already vendors for
build/lib/tsgo.ts:

- updateSnapshot replaces createProgram, so the program lives in the
  compiler rather than the V8 heap
- the disallowed types are resolved to symbols once up front, turning the
  per-reference check into a local id lookup
- symbol lookups are batched instead of issued one node at a time
- property accesses are prefiltered by member name, so only those that
  could name a member of a disallowed type are resolved at all

That brings it from 48.6s and 3.8GB peak to 11.7s and 0.8GB peak.

The six tsconfig.<layer>.json projects were type checked serially with
TS6, which accounted for the remaining ~208s. They move to the native
compiler and run in parallel in the new layersTypeCheck.ts, taking ~11s.
Concurrency is derived from free memory (the largest project peaks at
~3.5GB) so a memory-constrained machine falls back towards serial
execution rather than swapping.

Verified to report byte-identical violations, including line and column,
against a seeded set covering direct references, import aliases,
inherited members, nested member access and ipcMain.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-07-29 20:24:47 +00:00
Copilot
9250f17cc3
Rename "Copilot CLI" tool set label to "Copilot" (#328068)
* Initial plan

* fix: rename Copilot CLI tool set label to Copilot

Co-authored-by: dmitrivMS <9581278+dmitrivMS@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: dmitrivMS <9581278+dmitrivMS@users.noreply.github.com>
2026-07-29 20:14:09 +00:00
Connor Peet
e9b4f5d3d3
Merge pull request #327836 from microsoft/ulugbekna/ulugbekna-fix-duplicate-mcp-auto-auth
agentHost: Make MCP token authentication idempotent
2026-07-29 13:00:22 -07:00
Copilot
8cae2dabe9
Only show "Downloading model" for dictation on an actual cache miss (#328045)
* Initial plan

* Only report 'Downloading' model status on an actual cache miss

Co-authored-by: meganrogge <29464607+meganrogge@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: meganrogge <29464607+meganrogge@users.noreply.github.com>
2026-07-29 19:56:55 +00:00
Copilot
4a311fc7c4
Fix dictation getting stuck on when transcript cleanup stalls (#328050)
* Initial plan

* Bound dictation LLM transcript cleanup so stop can't hang

Co-authored-by: meganrogge <29464607+meganrogge@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: meganrogge <29464607+meganrogge@users.noreply.github.com>
2026-07-29 19:53:44 +00:00
Logan Ramos
fd027234d3
Fix model picker styling (#328073) 2026-07-29 19:53:21 +00:00
Copilot
74bf97bf57
Fix hold-to-talk for Voice Mode push-to-talk keybinding (#328047) 2026-07-29 19:53:17 +00:00
Copilot
1020b65cc3
Improve dictation list formatting with explicit ordering cues (#328056)
* Initial plan

* Improve dictation prompt to format enumerations as Markdown lists

Co-authored-by: meganrogge <29464607+meganrogge@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: meganrogge <29464607+meganrogge@users.noreply.github.com>
2026-07-29 19:52:58 +00:00
Copilot
7f39e01694
Reset voice mode when a fresh new-session composer takes over (agents window) (#328044)
* Initial plan

* Disconnect stale voice session when a fresh new-session composer takes over

Co-authored-by: meganrogge <29464607+meganrogge@users.noreply.github.com>

* Potential fix for pull request finding

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

* Potential fix for pull request finding

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

* Potential fix for pull request finding

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

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: meganrogge <29464607+meganrogge@users.noreply.github.com>
Co-authored-by: Megan Rogge <merogge@microsoft.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
2026-07-29 19:52:37 +00:00
Rob Lourens
83006328d3
agentHost: Sync session read state across all connected clients (#327950)
* agentHost: Sync session read state across all connected clients

Read/unread for an Agent Host session is now a single host-owned fact that
every connected client agrees on.

The host had two parallel representations: the `SessionStatus.IsRead` bit
(persisted under the `isRead` session-database key) and separate
`isRead`/`isArchived` booleans on the local `IAgentSessionMetadata` IPC
shape. Different paths read different ones and they could disagree, so the
booleans are gone and `status` is the sole carrier. The database values now
fold into `status` once, in `AgentService.listSessions()`/`restoreSession()`,
and the redundant re-folds in `protocolServerHandler` and
`remoteAgentHostProtocolClient` are removed.

Persistence of both flags moves onto the existing `onDidEmitEnvelope`
observer, which sees client- and server-dispatched actions alike and skips
rejected envelopes. Previously each dispatch path wrote the database itself,
so any new server-side dispatch would silently skip persistence.

The editor window had its own disconnected read model while the agent window
was already wired to the host, so the two windows disagreed. It now shares
the same state through a bridge mirroring the archive one:
`IChatSessionItem.isRead`, `IChatSessionItemController.setChatSessionItemRead`,
and `canSetChatSessionItemRead`/`setChatSessionItemRead` on
`IChatSessionsService`. `AgentSessionsModel` delegates to it when the
provider owns read state; its local timestamp heuristics now apply only to
providers that do not. `migrateReadStateToProvider` performs a one-time,
additive hand-off of existing local read state so sessions do not resurface
as unread on upgrade, deferring until the provider has actually reported so
a stale startup cache cannot consume the one-shot flag.

Neither the Copilot SDK nor Claude/Codex track read state, and the host
drives it from provider-neutral turn signals, so this works identically for
all three agents.

(Written by Copilot)

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

* agentHost: Trim read-state comments and docs

Cut restatement and over-explanation from the comments added in the previous
commit, keeping only what isn't already obvious from the code. Condenses the
SESSIONS_LIST.md read/unread section to the user-visible behaviour rather
than the implementation detail behind it.

(Written by Copilot)

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

* agentHost: Only report sessions known to be unread

Address PR feedback on #327950.

Folding the read flag into `status` accidentally widened the `unread`
semantics in the session server tools: `isSessionStatusRead(undefined)` is
`false`, so a session with no status was treated as unread. The previous
code required an explicit `isRead === false`. This is reachable and common —
`ClaudeSessionMetadataStore.project()` returns no `status`, so every cold
Claude session would have matched an `unread: true` listing and serialized
as unread. `sessionIsUnread` now requires a known status, restoring the
original semantics.

Also hoists the duplicated read-timestamp comparison out of `isRead` and
`migrateReadStateToProvider` into `localReadDateCoversActivity`, so the
grace window and baseline fallback live in one place.

(Written by Copilot)

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

* agentHost: Don't infer read state from a synthesized status

Address GPT-5.6 review feedback on #327950.

Neither `CopilotAgent.listSessions` nor `ClaudeSessionMetadataStore.project`
projects a `status`, so every cold session that has never been marked read or
archived reaches clients without one. `SessionSummary.status` is required, so
the session-list store synthesized `Idle` — and the editor window then read the
absent `IsRead` bit off that synthesized value and reported the session as
unread, while the agents window treats an absent status as read. The two
windows disagreed on the most common cold session, which is exactly what this
change set out to fix.

The list entry now records whether the status came from the host, and the
controller leaves `IChatSessionItem.isRead` unset when it did not. That keeps
all three surfaces consistent (agents window, editor window, and the
`sessionIsUnread` server-tool helper) and stops the migration from consuming
its one-shot flag for a session whose real state was never reported. The flag
is resolved as soon as a summary carries a status, or when a client mutation
establishes one.

Also moves the migration ledger from workspace to application scope. The state
it hands off to is host-global, so a second workspace that can see the same
session — an empty window lists them all — would otherwise migrate it again and
re-promote a session the user had deliberately marked unread elsewhere.

(Written by Copilot)

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

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-07-29 12:44:18 -07:00
Elijah King
5ab23402a8 Merge remote-tracking branch 'upstream/main' into eli/agents/remove-shimmer-animation-vscode
# Conflicts:
#	src/vs/workbench/contrib/chat/browser/speechToText/dictationSession.ts
#	src/vs/workbench/contrib/chat/test/browser/dictationSession.test.ts
2026-07-29 12:30:00 -07:00
Megan Rogge
67e1cc5520
Polish Voice Mode and Dictation onboarding (#328058) 2026-07-29 19:16:45 +00:00
Connor Peet
a8f4f263e5
agentHost: fix side chats from reconnected and server-initiated turns (#328071)
The renderer minted a client-side `request_<uuid>` id for turns it did not
dispatch itself, so `/btw` sent the agent host a turn id it had never seen and
createChat failed with "side chat source turn ... not found". The same broken
anchor affected selection side chats, Ask in Side Chat, and forking.

Two paths dropped the provider's turn id: the active turn pushed into history
on reconnect, and server-initiated turns surfaced via onDidStartServerRequest.
Both now carry it. The id is required rather than optional so a future caller
cannot silently omit it and fall back to a client-generated id.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-07-29 19:13:27 +00:00
Elijah King
b3121228ee chat: out-specify Monaco token colors for the dictation interim style
The interim decoration was applied correctly but had no visual effect: the
`.monaco-editor .dictation-interim-processing` rule ties on specificity with
Monaco's syntax-token rules (`.monaco-editor .mtkN`), which are injected into the
document after this stylesheet and therefore won, painting the provisional text
in the normal foreground color.

The shimmer never hit this because it colored text through -webkit-text-fill-color
and background-clip rather than `color`, which bypasses the tie entirely.

Qualify the selector with .view-line and the element name so it outranks the
token rules regardless of injection order. Verified in a running Code OSS build:
a span carrying both `mtk1` and the decoration class now computes to the
placeholder color instead of the editor foreground.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-07-29 12:06:26 -07:00
Elijah King
c750571715 chat: keep the whole in-progress transcript in the placeholder color
Splitting on the recognizer's finalized prefix looked right in principle, but
streaming backends endpoint segments almost as fast as they are spoken. Styling
only the uncommitted tail therefore left nearly every word solid on arrival, so
the provisional state was never visible in practice - dictation appeared to jump
straight from empty to the finished transcript.

Render the whole not-yet-final transcript in the placeholder color instead, and
clear it when dictation ends. This matches the pre-existing visual behavior
minus the animation.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-07-29 12:00:56 -07:00
Aaron Munger
a24ac99d80
report edit arc in Agent host (#328027)
* agentHost: report edit ARC telemetry

Port ARC tracking to Agent Host and integrate it with edit attribution.

* agentHost: harden ARC telemetry reporting

Handle sampling failures, subagent attribution, and stable branch detection.

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

* agentHost: address ARC telemetry review feedback

Ensure detailed diffs reconstruct EOL changes, keep best-effort ARC work off the tool completion path, and harden reporter lifecycle limits and races.

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

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-07-29 11:59:24 -07:00
Rob Lourens
5d5b8096fc
Optimize layer checker memory use (#327953)
* build: optimize layer checker

(Written by Copilot)

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

* build: fix layer checker test lint

(Written by Copilot)

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

* build: address layer checker review feedback

(Written by Copilot)

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

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-07-29 18:58:32 +00:00
Rob Lourens
bd4df5967b
agent host: share agent catalog across session adapters (#328031)
* Agent Host: Share agent catalog across session adapters

Avoid one root-state listener per cached session by publishing the agent catalog once from the provider. Preserve late capability hydration and cover listener scaling with 200 adapters.\n\n(Written by Copilot)\n\nCo-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Agent Host: Address shared catalog review feedback

Use public listener lifecycle hooks in the regression test, clear derived root state on errors and disconnects, and precompute the provider capability lookup.

(Written by Copilot)

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

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-07-29 18:58:20 +00:00
Aaron Munger
e45b03c5f7
chat tool approval parity (#327884)
* added classification comments for response events

* Classify forwarded Copilot identifiers as pseudonymous

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

* agentHost: Emit toolCallDetails telemetry

Preserve the local per-turn tool-call aggregate on the Microsoft telemetry channel while retaining the restricted peer events. Include Agent Host correlation fields and report successful, cancelled, and failed turns once.

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

* agentHost: Emit chat.toolApproval telemetry

Emit the workbench-compatible tool-approval event from the agent host on the standard telemetry channel, correlating SDK permission events with each tool invocation. Fires once per tool call at either permission.completed (denied) or tool.execution_start (approved / no permission requested).

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

* agentHost: Wait for tool permission outcome

Defer chat.toolApproval emission until permission.completed when a permission lifecycle exists. Tool calls without permission requests now emit at completion with no inferred auto-approval reason, preventing premature and contradictory rows.

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

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-07-29 11:56:43 -07:00
Connor Peet
2278ac68b4
chat: keep leading whitespace in a response selection snippet (#328063)
- Trims only the end of the selected text when building the side-chat
  snippet. The trailing newline browsers append when a line selection
  spills into the next block is still dropped, but a selection that
  starts mid-indentation (a nested list item, a quoted line) no longer
  silently loses the whitespace the user actually selected.

Follow-up to #327931, addressing Copilot review feedback.

(Commit message generated by Copilot)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-07-29 18:43:19 +00:00