Commit Graph

160591 Commits

Author SHA1 Message Date
ulugbekna d4affdc2d2 Report the request UUID under the Opportunity ID line
Instead of adding a dedicated "Request UUID" line, populate the existing
"Opportunity ID" diagnostic from the shown item's `opportunityId` (VS Code
core's `InlineCompletionContext.requestUuid`).

Drop the now-redundant telemetry-sourced "Opportunity ID" assignment: the
item value is authoritative and avoids a potentially stale
`telemetry.properties.opportunityId` for cached / typing-as-suggested
completions. Update the tests accordingly.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
2026-07-06 21:01:31 +02:00
ulugbekna ae0d0cf957 Include the request UUID in completion feedback report
Add a "Request UUID" line to the "Send Copilot Completion Feedback"
diagnostics so triagers can correlate a report with editor logs and
telemetry. It is sourced from the shown item's `opportunityId`, which is
VS Code core's `InlineCompletionContext.requestUuid` for the request.

The value comes from `item.opportunityId` rather than
`telemetry.properties.opportunityId`: the latter is built from the
completion's original `choice.telemetryData`, so for cached or
typing-as-suggested completions it can be a stale request id. "Opportunity
ID" (from telemetry) is kept as a separate line since it matches core
telemetry terminology and usually equals the request UUID.

Add unit tests for `collectCompletionDiagnostics` covering the new line and
the stale-source guard.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
2026-07-06 15:04:22 +02:00
ulugbekna a7dc934a59 Fix empty telemetry section in completion feedback report
The "Send Copilot Completion Feedback" report tracked the shown item as a
legacy `InlineCompletionItem` and read its telemetry from
`item.command?.arguments?.[0].telemetry`. That shape came from the old
standalone completions extension. In the unified provider the shown item is
a `GhostTextCompletionItem` that has no `command`, so the extraction always
yielded `undefined` and the report's telemetry section (Header Request ID,
Choice Index, Opportunity ID, Client Completion ID, Model ID) rendered empty.

Type the tracked item as `GhostTextCompletionItem` and read telemetry from
`item.copilotCompletion.telemetry` (a `TelemetryWithExp`, which extends
`TelemetryData`), restoring the telemetry section.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
2026-07-06 15:03:07 +02:00
Ulugbek Abdullaev baf7e19bcb Only show completion feedback command for paid users (#324469)
* Only show completion feedback command for paid users

The 'Send Copilot Completion Feedback' command is attached to every
inline completion list, which surfaces the feedback button for all
users including free and unauthenticated ones. This has been a source
of low-signal issue-tracker spam.

Gate the command so it is only offered when the Copilot token belongs
to a paid user (not free and not no-auth).

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

* Fix completion feedback token shadowing

Rename the Copilot auth token local so it does not shadow the cancellation token used by inline completion generation.

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

---------

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
2026-07-06 15:23:43 +05:00
Giuseppe Cianci f239f20c54 Merge pull request #324255 from microsoft/guard-agent-sdk-native-deps
Guard agent-SDK release build against missing native optional-dep packages
2026-07-06 12:06:32 +02:00
Aiday Marlen Kyzy 25d59f1479 fix: checking position is valid before accessing line content (#324235) 2026-07-06 11:10:36 +02:00
Justin Chen 46e337170b remove padding from changed view to make it aligned with rest of chat (#324106) 2026-07-06 08:21:47 +00:00
vs-code-engineering[bot] 7bbfe96e44 Bump version to 1.129.0 (#324433)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-07-06 08:21:14 +00:00
vs-code-engineering[bot] ac68c0f81d Update endgame notebook milestones to 1.128.0 (#324432)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-07-06 08:21:08 +00:00
Alexandru Dima f4f16f1c48 Fix flaky Copilot customizations integration test (settle-aware notification assertions) (#324291)
fix flaky Copilot customizations integration test

The "session/customizationsChanged" exact-count assertion raced against
the eventually-consistent customization discovery. A pre-discovery empty
snapshot (customizations: []) can be delivered after clearReceived(),
inflating the count to 2. Match/count only settled (non-empty)
notifications instead.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-07-06 07:44:12 +00:00
Aiday Marlen Kyzy 9e11dcb134 fix: hide hover when mouse down not on hover (#324233) 2026-07-06 09:14:29 +02:00
Joaquín Ruales 86df0e5dc8 Fix multiple askQuestions in Agent Host (#323943)
Potential fix
2026-07-06 05:12:47 +00:00
Rob Lourens 79eaefdc36 Fix codeblock spacing when it follows a list in chat (#324340)
Code blocks in chat markdown only carry a bottom margin and rely on the
previous element's bottom margin for the space above them. Inside lists,
that margin is collapsed away to keep list items tight, so a code block
following list content ended up with no space above it (cramped above,
loose below).

Add a matching top margin to code blocks that follow a list or are nested
in a list item. Margin collapsing leaves the other cases (after a
paragraph, first child, etc.) unchanged.

Also add a CodeBlockInList chat widget fixture covering both DOM shapes,
and register IChatOutputRendererService + IAiEditTelemetryService in the
chat fixture services so markdown code blocks can render in fixtures.

(Written by Copilot)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-07-05 22:10:00 -07:00
Don Jayamanne bbefcbd118 fix: improve user prompt handling by ignoring non-text content and adding fallback options (#324426) 2026-07-06 04:53:44 +00:00
Ben Villalobos eddcc76b44 Remove toggle automations command (#324415)
Removes the command registration and its dead telemetry helper.
2026-07-06 03:58:33 +00:00
Benjamin Christopher Simmonds e6ab937aa2 chat: add turn status pills for agent sessions (#324413)
* chat: add turn status pills for agent sessions

Adds 'changes' and 'preview' pills that surface a turn's file changes and previewable Markdown/HTML files. They float above the chat input while a turn streams and move into the completed response. Agent-host sessions only, gated by the new 'chat.turnStatusPills' object setting (both pills off by default).

* fix component fixture typecheck: use invokeFunction to access config service

* chat: vertically center the preview pill resource label
2026-07-05 23:28:39 +00:00
Sandeep Somavarapu 94c155c4d9 sessions: single-pane layout controller cleanup (#324410)
* sessions: single-pane layout controller cleanup (no workbench.ts)

Base/single-pane layout controller changes assembled without the
workbench.ts side-pane Strategy extraction:
- R1: remove the base-controller single-pane leak via Template Method hooks
  and override them in SinglePaneDesktopSessionLayoutController.
- Additional single-pane controller / editor contribution refinements and
  spec updates (LAYOUT.md, SINGLE_PANE_SCENARIOS.md, sessions SKILL.md).

Excludes workbench.ts, sidePaneLayoutStrategy.ts and workbench.test.ts by design.

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

* sessions: capture editor-part hidden state eagerly to fix side-pane restore race

The per-session editor-part hidden state was captured lazily in
_saveWorkingSet by reading live editor visibility at switch-away time.
That races the switch derive (activeSessionForWorkingSet lags the raw
active session), so the incoming session's layout could flip the outgoing
session's recorded state to visible — reopening a side pane the user had
closed when switching back to it.

Capture it eagerly via a [B2] onDidChangePartVisibility(EDITOR_PART)
listener (mirroring the [B1] panel capture), guarded by single-session
and not-restoring, and drop the racy lazy read.

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

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-07-05 22:48:31 +00:00
Ben Villalobos 3379a344bb Automations: Wire into customizations UI (#324167)
Connects the Automations feature to existing VS Code surfaces:
- AI Customizations sidebar entry gated on ChatAutomationsEnabledContext
- Overview tile with automation count badge
- Deep-link: sidebar click navigates directly to Automations tab
- Feature gate when-clauses on all entry points
- Allow a way to set model without persisting globally
2026-07-05 14:37:28 -07:00
Benjamin Christopher Simmonds d53a614f51 sessions: only show blocked sessions in non-stable builds (#324411)
Gate the blocked-sessions titlebar widget indicator (the 'N sessions require input' pill and dropdown) on productService.quality !== 'stable' so the feature stays disabled in stable/public builds. The underlying BlockedSessions model uses lazy observables, so no GitHub CI/PR work runs when the feature is off.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-07-05 21:31:46 +00:00
Vritant Bhardwaj 02cf79c52c Merge pull request #324127 from microsoft/agents/unified-model-picker-implementation-69c82b16
Group agent-host models by provider in the picker
2026-07-05 14:24:25 -07:00
Vritant Bhardwaj f282fac5dc Merge branch 'main' into agents/unified-model-picker-implementation-69c82b16 2026-07-05 13:32:03 -07:00
Ladislau Szomoru e21571cb98 Agents - fix issue with reviewed/unreviewed state detection (#324400) 2026-07-05 19:45:12 +00:00
Rob Lourens 0514584208 Agent host: show tool intention on terminal tool cards (#324347)
The Copilot shell tools (bash/powershell) carry a `description` argument
describing why the command is being run. Surface it as the tool call's
`intention` in the Agent Host Protocol and render it on terminal tool cards.

- Producer: `getShellIntention()` reads the shell tool's `description` arg and
  sets `ChatToolCallStart.intention` on both the live path
  (copilotAgentSession) and history replay (mapSessionEvents). Scoped to shell
  tools so the `task` tool's own `description` is not mistaken for an intention.
- Protocol/adapter: new optional `IChatTerminalToolInvocationData.intention`,
  threaded from `tc.intention` in `buildTerminalToolSpecificData`.
- UI: the collapsed terminal tool row shows "<intention> `command`" instead of
  "Ran `command`", laid out so the intention and command stay inline and only
  divide/truncate the space on overflow.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-07-05 09:47:57 +00:00
Sandeep Somavarapu 4f5e1a3b23 sessions: address CCR feedback on single-pane detail panel (#324349)
Follow-up to #324348 (which auto-merged before the review fixes landed):

- remove dead singlePaneEditorTitleAuxiliaryBarOrder const + void statement
- remove the unused ICommandService dependency from the base layout
  controller (and its now-dead test-harness stub)
- update SINGLE_PANE_SCENARIOS.md and desktopSessionLayoutController.md for
  the merged controller, transition-triggered R1, and Toggle Details command

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-07-05 03:50:13 +00:00
Sandeep Somavarapu 5cfa71584e sessions: refine the single-pane detail-panel layout (#324348)
* sessions: single-pane detail-panel layout for the Agents window

Add an experimental `sessions.layout.singlePaneDetailPanel` setting (default off) that docks the detail panel (auxiliary bar) inside the editor part, so a single editor tab bar spans the editor content and the docked panel. Introduces a custom Changes (multi-diff) editor, Files/Browser tabs, and a "+" add-tab menu, with the Changes view and diff-stats split into standard vs single-pane subclasses chosen at startup.

The redesign uses a mode-based architecture: all single-pane parts, editors, serializers, actions and views are registered/gated behind the setting via `IAgentWorkbenchLayoutService.isSinglePaneLayoutEnabled` (the single source of truth), so the standard Agents-window layout is unchanged when the setting is off.

Core editor support: `EditorPart.setContentRightInset` (concrete class, not the public `IEditorPart` interface) insets only right-edge groups so the tab bar stays full-width; a generic `MenuId.EditorTabsBarAddTab` renders a core-owned "+" dropdown at the end of the tab strip.

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

* sessions: address CCR feedback on single-pane layout

- empty-file editor: register a touch Gesture target and handle Tap (iOS) in addition to click, and set `touch-action: manipulation` to avoid the tap delay.

- docked detail panel border: use `var(--vscode-strokeThickness)` instead of a hardcoded 1px.

- drop the internal `[Option A]` design-discussion marker from comments across workbench.ts / style.css / sessionConfig.ts.

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

* sessions: fix use-before-init in DetailPanelController

The _activeEditorObs / _auxBarVisibleObs field initializers referenced the constructor-injected _editorService / _layoutService, which run before the parameter properties are assigned (TS2729, caught by tsc in CI but not by the tsgo typechecker). Move their initialization into the constructor body.

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

* test: update blocks-ci screenshot hashes

Refresh the committed blocks-ci-screenshots.md to the current CI-rendered image hashes (CodeEditor / InlineChatZoneWidget fixtures). These are bare editor-widget fixtures not affected by this PR's editor-tab changes; the drift is from the screenshot service re-render.

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

* sessions: make SessionChangesService resolvable without the workbench layout service

SessionChangesService is a DI singleton also instantiated in component fixtures / unit tests, which do not register IAgentWorkbenchLayoutService. Read the single-pane setting via IConfigurationService (available everywhere) instead, so resolving ISessionChangesService no longer fails with 'depends on layoutService which is NOT registered'. The layout service remains the single source of truth for contributions that run only in the real Agents window.

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

* test: re-sync blocks-ci screenshot hashes

Update the committed hashes to the current CI render (the 6 CodeEditor / InlineChatZoneWidget fixtures shifted with the merged upstream editor changes).

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

* sessions: fix single-pane layout bugs from layout audit

Grid/sizing: persist the logical editor width (excluding the docked panel) so the Sessions Part no longer shrinks by the panel width on every reload; clamp the stored docked width to its minimum and yield to the editor's minimum in narrow windows; keep the editor grid leaf visible when only the docked aux bar toggles.

Editor content inset: recompute on group maximize/restore so a maximized non-right group is not rendered under the docked panel, and re-layout the docked panel after the un-maximize resize.

Controllers: DetailPanelController shows Changes while the editor is maximized (agreeing with the D5 rule) and classifies editor types (file/empty-file -> Files, Changes -> Changes, Browser -> hidden, other -> preserve); the LayoutController no longer auto-reveals the Changes view on editor open in single-pane, so existing sessions keep the 'never auto-open' rule. Docs: fix stale method references in LAYOUT.md.

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

* sessions: single-pane detail panel refinements and controller merge

Merge the single-pane detail/tab controllers into the layout controller,
add a dedicated Toggle Details command, refine R1 (transition-triggered
editor hide), default a created session to the Changes editor with the
detail closed, reveal the docked editor part for created sessions, and
remove the docked reveal-sync suppression mechanism.

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

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-07-05 03:11:38 +00:00
Rob Lourens c815614c3d agentHost: fix stalled completion duration (#324337)
* agentHost: add stalled tool call telemetry

Track tool calls that remain blocked for five minutes and report when they later complete, including blocker and tool source metadata.

(Written by Copilot)

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

* agentHost: measure time after stall accurately

Start a dedicated stopwatch when the stall event is emitted so confirmation latency is not included in the recovery duration.

(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-05 03:03:07 +00:00
Rob Lourens 5f595aede5 Cache local agent host sessions for instant startup display (#324328)
Share startup session caching across local and remote agent hosts

Hoist the session-summary persistence layer from RemoteAgentHostSessionsProvider
into BaseAgentHostSessionsProvider so the local agent host also shows its
sessions immediately on Agents-window startup, before the in-process agent host
has started and the first listSessions() round-trip returns.

- Base now owns serialize/deserialize, _metaByRawId/_cacheDirty bookkeeping, and
  _loadCachedSessions()/_persistCache(), gated behind an explicit
  _enableSessionCachePersistence(storageKey) opt-in that subclasses call at the
  end of their constructor (once identity fields needed by createAdapter are set).
- A _shouldTrackSessionCacheChanges() hook preserves the remote provider's
  offline (_unpublished) gate.
- Remote provider drops the migrated code and just supplies its per-authority
  key; local provider supplies the fixed key localAgentHost.cachedSessions.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-07-04 21:37:50 +00:00
Rob Lourens ff7190a001 agentHost: link workspace references in responses (#324326)
* agentHost: link file references in responses

Teach Copilot Agent Host models to emit absolute-path Markdown links and resolve them at render time so streaming responses retain native link labels and remote filesystem routing.

Fixes #315183

(Written by Copilot)

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

* agentHost: link folder references in responses

Extend the Agent Host response-formatting prompt so existing workspace folders are linked consistently alongside files and symbols.

(Written by Copilot)

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

* agentHost: refine workspace link instructions

Clarify folder and symbol link examples in the Agent Host response-formatting prompt.

(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-04 21:37:16 +00:00
Rob Lourens 874e480c7f agentHost: add stalled tool call telemetry (#324327)
Track tool calls that remain blocked for five minutes and report when they later complete, including blocker and tool source metadata.

(Written by Copilot)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-07-04 21:36:29 +00:00
Rob Lourens c1340d6ed6 Support line range syntax in Quick Open file paths (#324318)
* Support line range syntax in Quick Open file paths

Extend the Quick Open file path syntax to accept a line range using a
hyphen (e.g. 'file.txt:20-40' or 'file.txt:20:3-40:5'). Pressing Enter
opens the file with the range selected. This mirrors the existing
markdown document link range syntax.

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

* Preserve line/column range when terminal links fall back to Quick Open

The TerminalSearchLinkOpener reconstructs the search text from the parsed
link suffix but only re-emitted the start row/column, dropping any
rowEnd/colEnd. As a result, clicking a terminal link with a range (e.g.
'lines 20-40') fell back to Quick Open with only the start line. Emit the
range end using Quick Open's syntax so the range is selected.

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

* Revert "Preserve line/column range when terminal links fall back to Quick Open"

This reverts commit 128a00ceac.

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-07-04 19:20:00 +00:00
Rob Lourens 07c9774985 markdown: repair incomplete streaming links inside bold/lists (#324317)
The streaming-markdown repair logic completed emphasis and codespans before
links, so an incomplete link nested in bold (e.g. `- **[text](file:///pa`)
had its `**` closed first and the link target was left broken, rendering as
raw text. The link-target detection also only matched `[` at start-of-line or
after whitespace, missing links that follow an emphasis marker.

Complete an incomplete link target before emphasis/codespan (the link is the
innermost unfinished construct), and allow `[` to follow `*`, `_`, or `~` in
hasLinkTextAndStartOfLinkTarget. This fixes bold/italic/strikethrough links in
paragraphs and lists.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-07-04 18:39:42 +00:00
Rob Lourens 58aae0cd58 Add tailored tool-call rendering for agent-coordination SDK tools (#324284)
* Add tailored tool-call rendering for built-in SDK tools

The agent host's copilotToolDisplay only emitted tailored invocation /
past-tense messages for a handful of tools; the rest (read_agent,
write_agent, list_agents, store_memory, web_search, etc.) fell back to
the generic "Using {tool}" / "Used {tool}" rendering in the client.

Give every built-in Copilot SDK tool a natural verb phrase:
- Agent coordination tools surface the target agent id, e.g.
  "Reading agent math-helper" / "Wrote to agent math-helper".
- Arg-bearing tools surface their key argument (query, title, subject,
  pattern, path).
- No-arg tools use a shared verb-phrase table instead of the generic
  fallback.
- Register the previously-unhandled send_inbox and context_board
  built-in tools.

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

* Scope agent tool rendering to read/write/list agents; simplify generic fallback

Add tailored invocation/past-tense messages for the agent-coordination
tools we care about (read_agent, write_agent, list_agents) alongside the
existing task tool, and drop the broader set of built-in SDK tool cases
that were mostly unused and noisy.

Change the generic tool fallback from `Used "Tool Name"` to just the
display name for both the Copilot and Claude tool renderers.

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

* Render tailored invocation message for agent-coordination tools

The list/read/write agent tools are auto-approved client tools that skip
the permission flow, so their invocation previously rendered the generic
"Running {displayName}…" fallback while completion showed the correct
past-tense message. Auto-ready just these tools so they surface a tailored
message, and collapse each to a single (past-tense) phrase since they are
fast.

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

* Guard agent_id against non-string tool args

Address Copilot review feedback: agent_id is parsed from untrusted JSON,
so a truthy non-string value (e.g. 123) would pass the presence check and
throw inside appendEscapedMarkdownInlineCode. Extract a getAgentId helper
that only returns a non-empty string, and fall back to the generic phrase
otherwise.

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

* Simplify

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-07-04 18:22:51 +00:00
Tyler James Leonhardt 6603aa7e44 Emit auth/required when Claude flips native → proxy (#323828)
When the Claude agent's transport mode flips from native to proxy at
runtime (via a `claudeUseCopilotProxy` root-config change) and it has no
live proxy handle, proactively emit the AHP `auth/required` notification
so the connected client re-authenticates GitHub Copilot — instead of only
failing the next command lazily with `AHP_AUTH_REQUIRED`.

- IAgent gains an optional `onDidRequireAuth` event; AgentHostStateManager
  gains `emitAuthRequired` (mirrors `emitProgress`), fired on the root
  channel and forwarded to clients over the existing notification path.
- AgentSideEffects wires the agent event to the state manager.
- ClaudeAgent fires it on the native→proxy flip when no proxy handle
  exists, and hardens `authenticate()` so an unchanged token still starts
  the proxy when no live handle is present (closes a re-auth deadlock).
- Adds unit tests for the flip-emit and hardening behaviors.

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-04 10:57:53 -07:00
Sandeep Somavarapu ae3f5e7d28 sessions: keep subagents live in the catalog and reflect their running status in the pill (#324301)
* sessions: keep visible sessions subscribed so subagent chats stay live

Fixes the "Open Subagent" pill sometimes not resolving/opening until the
session is switched away and back.

A subagent is added to the parent session's chat catalog by the agent
host spontaneously (no client action), so it only reaches `cached.chats`
while the provider's session-state subscription is alive. That
subscription was governed by a 30s idle timer that only client-initiated
actions/queries refresh — client chat creations explicitly call
`_keepSessionStateAlive`, but a host-spawned subagent has no such hook.
Passively watching a long delegation could therefore let the timer
release the state listener mid-view, dropping the subagent's `chatAdded`;
the inline pill (rendered from the separately-subscribed chat content)
still showed but couldn't resolve to a tab until a re-subscribe.

Pin the state subscription of every on-screen session (driven by
`ISessionsService.visibleSessions`) so host-driven catalog changes keep
flowing while the session is visible; the idle timer still governs
off-screen sessions so the host can evict their restored state.

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

* sessions: address CCR feedback on visible-session pin

- Compare session resources with `isEqual` instead of `toString()`.
- Shorten the regression test's inline comment to a concise note.

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

* sessions: drive Open Subagent pill spinner from the subagent's own status

The inline "Open Subagent" pill showed a static icon while its subagent
was still running: its spinner was driven purely by the parent
`.chat-subagent-part`'s `chat-thinking-active` class, which reflects the
spawning tool call. That tool call completes as soon as the subagent is
dispatched, so the class (and the spinner) stopped early while the worker
kept running — even though the running-subagents chip above the composer
correctly showed it as active.

Toggle a `chat-subagent-running` class on the pill from the resolved
subagent chat's own `SessionStatus.InProgress` status (reusing the
`findSubagentChat` autorun that already resolves the title), and drive the
spinner/open-icon swap from it; keep `chat-thinking-active` as a CSS
fallback. Now the pill and the chip reflect the same live status.

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

* sessions: stub visibleSessions in the remote provider test (fix CI)

The visible-session pin autorun reads `ISessionsService.visibleSessions`
in the base provider constructor. The remote provider test's
`ISessionsService` mock only stubbed `activeSession`, so constructing the
provider threw. Stub `visibleSessions` there too, matching the local
provider test harness.

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

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-07-04 16:56:26 +00:00
Sandeep Somavarapu 7317e60fe4 sessions: single-pane detail-panel layout for the Agents window (#324257)
* sessions: single-pane detail-panel layout for the Agents window

Add an experimental `sessions.layout.singlePaneDetailPanel` setting (default off) that docks the detail panel (auxiliary bar) inside the editor part, so a single editor tab bar spans the editor content and the docked panel. Introduces a custom Changes (multi-diff) editor, Files/Browser tabs, and a "+" add-tab menu, with the Changes view and diff-stats split into standard vs single-pane subclasses chosen at startup.

The redesign uses a mode-based architecture: all single-pane parts, editors, serializers, actions and views are registered/gated behind the setting via `IAgentWorkbenchLayoutService.isSinglePaneLayoutEnabled` (the single source of truth), so the standard Agents-window layout is unchanged when the setting is off.

Core editor support: `EditorPart.setContentRightInset` (concrete class, not the public `IEditorPart` interface) insets only right-edge groups so the tab bar stays full-width; a generic `MenuId.EditorTabsBarAddTab` renders a core-owned "+" dropdown at the end of the tab strip.

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

* sessions: address CCR feedback on single-pane layout

- empty-file editor: register a touch Gesture target and handle Tap (iOS) in addition to click, and set `touch-action: manipulation` to avoid the tap delay.

- docked detail panel border: use `var(--vscode-strokeThickness)` instead of a hardcoded 1px.

- drop the internal `[Option A]` design-discussion marker from comments across workbench.ts / style.css / sessionConfig.ts.

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

* sessions: fix use-before-init in DetailPanelController

The _activeEditorObs / _auxBarVisibleObs field initializers referenced the constructor-injected _editorService / _layoutService, which run before the parameter properties are assigned (TS2729, caught by tsc in CI but not by the tsgo typechecker). Move their initialization into the constructor body.

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

* test: update blocks-ci screenshot hashes

Refresh the committed blocks-ci-screenshots.md to the current CI-rendered image hashes (CodeEditor / InlineChatZoneWidget fixtures). These are bare editor-widget fixtures not affected by this PR's editor-tab changes; the drift is from the screenshot service re-render.

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

* sessions: make SessionChangesService resolvable without the workbench layout service

SessionChangesService is a DI singleton also instantiated in component fixtures / unit tests, which do not register IAgentWorkbenchLayoutService. Read the single-pane setting via IConfigurationService (available everywhere) instead, so resolving ISessionChangesService no longer fails with 'depends on layoutService which is NOT registered'. The layout service remains the single source of truth for contributions that run only in the real Agents window.

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

* test: re-sync blocks-ci screenshot hashes

Update the committed hashes to the current CI render (the 6 CodeEditor / InlineChatZoneWidget fixtures shifted with the merged upstream editor changes).

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

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-07-04 09:31:19 +00:00
Dmitriy Vasyura b18492a288 Adjust chat input editor min height calculations (#324289) 2026-07-04 07:45:51 +00:00
Ladislau Szomoru 89657622e1 Agents - animated changes summary action (#324266)
* WIP - initial implementation

* Extract code into a separate widget

* Animate width change

* Remove code that is no needed

* Add throttling to the animation
2026-07-04 07:28:52 +00:00
Rob Lourens ed64b5f419 Fix agent host checkpoint file changes flicker (#324282)
Fix agent host file changes flicker

Avoid recreating per-turn changeset subscriptions when equivalent session state updates produce equivalent URI objects. Add regression coverage for subscription stability. (Written by Copilot)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-07-04 06:19:57 +00:00
Rob Lourens 64d400d4d7 Use local icon treatment for Agent Host Copilot (#324281)
(Written by Copilot)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-07-04 06:19:54 +00:00
Rob Lourens 6759ccd0c7 Fix agent host worktree metadata timing (#324280)
Fix agent host worktree metadata timing (Written by Copilot)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-07-04 06:19:21 +00:00
Rob Lourens ae2541df16 Fix Agent Host telemetry gaps (#324278)
* Fix Agent Host telemetry gaps (#8209)

- trackEditSurvival: resolve ahp-chat sub-channel URIs to the parent
  harness before extracting provider/id (gap #6)
- turnCompleted: add isSubagentSession so subagent activity is
  measurable from turn events (gap #4)
- interactiveSessionProviderInvoked: add a harness property derived from
  the remote session type so remote AH can be split by harness (gap #2)
- agents/requestSent: fire once per user message (including follow-ups),
  add isNewChat, so it works as a per-message counter (gap #5)

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

* Forward host telemetry IDs to local agent host (#8209)

The local agent host process computed machineId/sqmId/devDeviceId live on
every launch, which can diverge from the workbench's persisted, state-backed
identifiers and break per-user telemetry joins. Forward the main process's
already-resolved IDs via env vars and prefer them in the agent host telemetry
service, falling back to live computation when absent (e.g. remote/server AH).

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

* Revert gap #4 (isSubagentSession on turnCompleted) and gap #5 (agents/requestSent)

turnCompleted never fires for subagent sessions (no matching turnStarted),
and after ahp-chat resolution the session is always the parent, so the
isSubagentSession field was always false. The agents/requestSent
session-create-only behavior was by design. Also restores the JSDoc on
parseRemoteAgentHostSessionTypeAuthority.

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

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-07-04 06:18:41 +00:00
Rob Lourens e9f000c4d2 Fix skill invocation attribution for subagents (#324272)
Agent Host changes for agents/remove-skill-invoked-event-handler
2026-07-04 06:18:11 +00:00
Rob Lourens efa4ddddc3 chat: render Agent Host system notifications consistently (#323382)
* agentHost: restore system notifications within turns

Persist system-initiated notification boundaries and map unmarked SDK notifications back to response parts during history reconstruction. Coordinate boundary writes with replay so restored transcripts match live behavior.

(Written by Copilot)

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

* agentHost: stream system notifications during active turns

Forward system notification response parts through the live turn observer, while avoiding duplicate progress when reconnecting to an active turn. Remove the unnecessary history/database workaround from the previous commit.

(Written by Copilot)

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

* agentHost: simplify notification reconnect tracking

Use the active-turn response-part snapshot boundary instead of notification-specific counters when deciding which notifications still need live emission.

(Written by Copilot)

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

* chat: render persistent system notification response parts

Add a native chat response content kind for system notifications so in-turn notifications use the same compact checked-row treatment as system-initiated requests without disappearing when later content arrives.

(Written by Copilot)

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

* agentHost: restore Copilot system notifications

Use persisted assistant turn boundaries to restore in-turn notifications as response parts and idle wake-up notifications as system-initiated turns.

(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-04 02:24:02 +00:00
Connor Peet 710b8c0cb4 Agent host: run !-prefixed chat messages as terminal commands (#324270)
- Add a "bang command" feature: in any chat agent, a message starting with
  `!` runs as a terminal command (via the existing agent-host terminal/shell
  integration) instead of being sent to the model. The host emits a
  transcript-only tool-call response for the command.
- Persist host-injected "local turns" (`!command` and `/rename`) so they
  survive reload; fork/truncate/rename resolve them to the preceding concrete
  SDK turn. Handled uniformly per-chat (default, peer and subagent chats).
- Refactor local command handling into a pluggable `LocalChatCommandRegistry`
  with self-contained `AgentHostLocalCommands` dispatcher, extracting the
  logic out of `AgentSideEffects`. Add `renameLocalCommand` and
  `bangLocalCommand`.
- Extract shared helpers: `shellCommandExecution` (agent-agnostic shell exec
  core) and `persistSessionMetadata`.
- Fix peer-chat truncation routing: `truncateSession` now takes the chat URI
  and routes peer chats to their own backing session.
- Fix truncate no-op after forking into a second peer chat: `SessionDataService`
  keyed every peer chat of a session onto one data dir/DB (chat id lives in the
  URI authority, which `AgentSession.id` dropped), so a second fork's
  `vacuumInto` failed with "output file already exists" and the forked chat
  never inherited its turn event IDs. Key now includes the authority; both fork
  copy sites also clear any stale target DB first.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-07-04 00:28:28 +00:00
Christof Marti ac3c7f9168 Include proxy config source in telemetry event (#324056) 2026-07-03 21:46:52 +00:00
Rob Lourens 0fc534223c chat: avoid relayout while hidden (#324264)
Skip chat view relayouts while the widget is hidden so dynamic-height rows are not measured against detached or display-none DOM.\n\n(Written by Copilot)\n\nCo-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-07-03 20:11:18 +00:00
Rob Lourens 40983a9818 Fix chat progressive rendering after hidden updates (#324260)
Use the response render cursor, rather than stream word statistics, to detect content that has not yet been displayed. Add regression coverage for initial catch-up behavior.\n\n(Written by Copilot)\n\nCo-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-07-03 20:10:58 +00:00
Sandeep Somavarapu 3a39cd27d1 sessions: add running-subagents status chip above the chat input (#324222)
* sessions: add ephemeral running-subagents chip above the chat input

Adds a status chip above the composer that appears only while the
currently-viewed chat has running (or attention-needing) subagents, so a
parallel background fan-out has a glanceable overview the transcript
can't provide once it scrolls.

- Shows "N running" with a spinner; escalates to "N need attention"
  (warning color) when any subagent is blocked (SessionStatus.NeedsInput).
- Hidden entirely while idle, so it adds no chrome when nothing is running.
- Clicking opens a menu of the running subagents (attention-needing first,
  with the current step surfaced from the chat description); selecting one
  reveals its read-only tab.

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

* sessions: name the single running subagent in the status chip

When exactly one subagent is running, the chip now reads
"Running subagent: <title>" with its live progress inline; for more than
one it stays "N subagents running". The subagent title is read reactively
so it updates when the worker is auto-titled.

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

* sessions: drop needs-attention state from running-subagents chip

Show only running (InProgress) subagents. Removes the NeedsInput
"needs attention" escalation, its warning styling, and the attention-first
ordering; the chip is purely a running-workers indicator now.

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

* sessions: make input-part mounting idempotent (CCR feedback)

Key the banner/chip mounting off the desired final order
([subagentsNode, bannersNode, ...]) so `_ensureBannersMounted` is a true
no-op once the DOM has settled, instead of performing two insertBefore
mutations on every doLayout()/resize.

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

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-07-03 20:08:36 +00:00
Benjamin Christopher Simmonds 4a7d3b7309 sessions: update changes view file sections (#324247)
* sessions: update changes view file sections

Rename the external session files section to Other Files and align its rows with the main changes list. Update split sizing so CI and file changes cap to their content while Other Files takes remaining space, including a 140px empty file-changes minimum.

Add full Changes view component fixtures for the main split-view states.

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

* sessions: preserve changes view sash size

Fire the tree pane SplitView change event without a preferred size so relayout clamps constraints without forcing the File Changes pane to its maximum.

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

* sessions: mock lifecycle for changes view fixture

Register a no-op ILifecycleService so the full Changes view component fixture can instantiate ViewWelcomeController under the strict fixture instantiation service.

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

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-07-03 22:07:06 +02:00
Justin Chen 4dec01cd4f fix agents window misplaced steering hover (#324254) 2026-07-03 18:04:47 +00:00