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>
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>
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>
* 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>
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>
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>
* 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
* 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>
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
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>
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>
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>
* 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>
* 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>
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>
* 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>
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>
* 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>
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>
* 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>
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>
* 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>
* 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>
* WIP - initial implementation
* Extract code into a separate widget
* Animate width change
* Remove code that is no needed
* Add throttling to the animation
* 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>
* 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>
- 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>
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>
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>
* 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>
* 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>