Commit Graph

160574 Commits

Author SHA1 Message Date
Sandeep Somavarapu
1864ca91a9 chore: remove throwaway screenshot artifacts 2026-07-05 05:12:13 +02:00
Sandeep Somavarapu
ea096becc2 sessions: address CCR feedback on single-pane refinements
- remove dead singlePaneEditorTitleAuxiliaryBarOrder const + void stmt
- remove unused ICommandService dependency from the base layout controller
  (and its now-dead test-harness stub)
- update SINGLE_PANE_SCENARIOS.md + desktopSessionLayoutController.md for the
  merged controller, transition-triggered R1, and the Toggle Details command

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-07-05 05:12:00 +02:00
Sandeep Somavarapu
28a74af283 Merge remote-tracking branch 'origin/main' into agents/agents-window-redesign-single-pane
# Conflicts:
#	.github/skills/sessions/SKILL.md
#	src/vs/sessions/LAYOUT.md
#	src/vs/sessions/LAYOUT_CONTROLLER.md
#	src/vs/sessions/browser/dockedAuxiliaryBarController.ts
#	src/vs/sessions/browser/layoutActions.ts
#	src/vs/sessions/browser/workbench.ts
#	src/vs/sessions/contrib/changes/browser/changes.contribution.ts
#	src/vs/sessions/contrib/changes/browser/changesView.ts
#	src/vs/sessions/contrib/changes/browser/media/sessionChangesEditor.css
#	src/vs/sessions/contrib/changes/browser/sessionChangesEditor.ts
#	src/vs/sessions/contrib/editor/browser/addTabActions.ts
#	src/vs/sessions/contrib/editor/browser/editor.contribution.ts
#	src/vs/sessions/contrib/layout/browser/sessions.layout.contribution.ts
#	src/vs/sessions/contrib/layout/test/browser/layoutControllerTestUtils.ts
#	src/vs/sessions/test/browser/layoutActions.test.ts
#	src/vs/workbench/browser/parts/editor/editorPart.ts
2026-07-05 04:51:41 +02:00
Sandeep Somavarapu
6efdc367c6 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>
2026-07-05 04:47:56 +02: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
a232efbd0f 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>
2026-07-04 13:47:15 +02: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
Sandeep Somavarapu
49e92be712 Merge remote-tracking branch 'origin/main' into agents/agents-window-redesign-single-pane
# Conflicts:
#	src/vs/sessions/contrib/changes/browser/changesView.ts
2026-07-04 10:54:45 +02:00
Sandeep Somavarapu
52643c97ed 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>
2026-07-04 10:47:47 +02: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
Sandeep Somavarapu
360944154d 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>
2026-07-04 02:04:50 +02:00
Sandeep Somavarapu
12ee6fc384 Merge remote-tracking branch 'origin/main' into agents/agents-window-redesign-single-pane 2026-07-04 01:58:35 +02:00
Sandeep Somavarapu
eea2c504b4 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>
2026-07-04 01:05:29 +02: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
Sandeep Somavarapu
7e8cd3c640 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>
2026-07-03 22:02:25 +02:00
Sandeep Somavarapu
ee2cd47f3a 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>
2026-07-03 21:53:58 +02:00
Sandeep Somavarapu
4f23468f59 Merge remote-tracking branch 'origin/main' into agents/agents-window-redesign-single-pane
# Conflicts:
#	src/vs/sessions/contrib/changes/browser/changesActions.ts
#	src/vs/sessions/contrib/layout/test/browser/layoutControllerTestUtils.ts
2026-07-03 21:48:05 +02:00
Justin Chen
4dec01cd4f fix agents window misplaced steering hover (#324254) 2026-07-03 18:04:47 +00:00
Sandeep Somavarapu
626003aee5 sessions: add setting to show empty default groups (Pinned, Chats) in sessions list (#324251)
* sessions: add setting to show empty default groups (Pinned, Chats) in the sessions list

Add `sessions.list.showEmptyDefaultGroups` (default true) to control whether the
empty Pinned and Chats default groups are shown in the sessions list. When disabled,
the always-visible empty sections are hidden until they contain sessions. The list
re-renders live when the setting changes.

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

* sessions: set APPLICATION scope on showEmptyDefaultGroups setting

Fixes the unused `ConfigurationScope` import (noUnusedLocals) and aligns the
setting scope with nearby Sessions settings.

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

* sessions: use window scope for showEmptyDefaultGroups setting

Remove the APPLICATION scope (defaulting to WINDOW) and drop the now-unused
ConfigurationScope import.

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

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-07-03 18:04:28 +00:00
Lee Murray
83b736f2da Style overrides: Add border-radius and padding to terminal tab entries (#324241)
* style: Add border-radius and padding to terminal tab entries

* Potential fix for pull request finding

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

---------

Co-authored-by: mrleemurray <mrleemurray@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
2026-07-03 18:00:52 +00:00
Sandeep Somavarapu
d9d73bef2b 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>
2026-07-03 19:39:01 +02:00
Henning Dieterichs
3fbc14e673 fixes lockfile 2026-07-03 17:48:37 +02:00
Henning Dieterichs
f6a4e0843f updates rspack
* reduces memory usage
* loads fixtures from source instead of out
2026-07-03 17:48:37 +02:00
Henning Dieterichs
f8458073d8 adds agentEditorComments proposed API for markdown editor (#324207)
* adds agentEditorComments proposed API for markdown editor

* adds comments file

* Fixes CI
2026-07-03 15:48:12 +00:00
Benjamin Christopher Simmonds
b4b15a9158 sessions: identify session in worktree delete prompt (#324237)
Pass the Copilot CLI session label through the Agents Window delete flow into the Git worktree removal confirmation so dirty worktree prompts show which session owns the worktree.\n\nFixes #324220\n\nCo-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-07-03 15:42:28 +00:00
Giuseppe Cianci
6e781f1802 Merge pull request #324232 from microsoft/agents/kimi-models-temp1-top095-override
copilot: force temperature=1 and top_p=0.95 for Kimi models
2026-07-03 17:04:42 +02:00
Ladislau Szomoru
d44e5ba3d7 Agents - add review/unreview operation to the multi-file diff editor (#324218)
* Review changes (P1): add overlayPathIntoTree git primitive

Add `IAgentHostGitService.overlayPathIntoTree(base, path, source)` which
builds a new tree equal to `base` with a single repo-relative path replaced
by (or removed to match) the content in `source`, using a throwaway
GIT_INDEX_FILE so the user's real index is untouched.

This is the file-level building block for the upcoming reviewed-ref based
"review changes" feature: mark reviewed = overlay from the working-tree
snapshot; unmark = overlay from the baseline tree.

Includes the `parseSingleLsTreeEntry` helper and real-git integration tests
covering modified, added, and removed paths, plus the non-git no-op case.

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

* Review changes (P2): extract shared Branch Changes baseline resolver

Extract the Branch Changes baseline resolution so the changeset service and
the upcoming review service cannot drift on which baseline they use:

- Add `IAgentHostGitService.resolveBranchBaselineCommit(workingDirectory,
  baseBranch?)` which resolves the merge-base commit-ish the Branch Changes
  diff is anchored on (origin/<base> preference, HEAD fallback, empty-tree
  fallback). `computeSessionFileDiffs` now delegates to the same private
  `_resolveBranchMergeBaseCommit` helper -- pure refactor, no behavior change.
- Add the pure `resolveDiffBaseBranchName(persisted, gitState)` helper for the
  base-branch-name precedence and use it from the changeset service.

Adds unit tests for both pure helpers and real-git integration tests for
`resolveBranchBaselineCommit`; existing `computeSessionFileDiffs` tests still
pass.

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

* Review changes (P3): add reviewed-ref review service core

Add `IAgentHostReviewService` and its node implementation, tracking which
files in a session's Branch Changes the user has reviewed as a session-private
synthetic git ref (`refs/agents/<sid>/reviewed`) whose tree snapshots the
reviewed content.

- `markFileReviewed` overlays the file's current working-tree content into the
  reviewed tree; `unmarkFileReviewed` resets it to the baseline content. Each
  action appends a parent-chained commit (first parent = baseline commit) and
  advances the ref; no-op mutations are skipped so the chain doesn't grow.
- `getReviewedPaths` derives review status from git trees: reviewed = Branch
  Changes files whose reviewed-tree content matches the working tree. Editing a
  reviewed file therefore auto-unreviews it.
- Mutations/reads are serialized per session; the reviewed ref is deleted on
  session data disposal. Operations no-op when not in a git work tree (a future
  milestone adds the non-git DB fallback).

Also adds the `diffTreePaths` git primitive used to compute review status, and
wires the service into the agent-host node and server entry points. Covered by
real-git integration tests.

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

* Review changes (P4): wire the review operation handler + provider

Add `AgentHostReviewFileOperationHandler` (mark/unmark, one instance per
direction) and `AgentHostReviewOperationContribution`, advertising the
`mark-as-reviewed` / `mark-as-unreviewed` resource-scoped operations for the
Branch Changes changeset and delegating to `IAgentHostReviewService`.

The handler resolves the session's working directory and base branch (via the
shared `resolveDiffBaseBranchName`) so review status is keyed on the same
baseline the Branch Changes diff uses.

Plumb the review service into `AgentService`'s inner DI (mirroring the
checkpoint service, defaulting to `NULL_REVIEW_SERVICE`) and register the
contribution. Covered by handler unit tests using a fake review service.

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

* Review changes (P5): surface per-file review status on the Branch changeset

Populate `ChangesetFile._meta.reviewed` for the Branch Changes changeset so the
client can render reviewed/unreviewed affordances per file:

- Inject `IAgentHostReviewService` into the changeset service and, when
  publishing the Branch changeset, look up the reviewed repo-relative paths and
  set `_meta.reviewed` per file (keyed by the file id's repo-relative path).
- Extract the base-branch resolution into a shared `_resolveBranchBaseBranch`
  helper reused by the diff computation and the review-status lookup.
- After a mark/unmark, the operation handler triggers `refreshBranchChangeset`
  so the updated `_meta.reviewed` is republished (the working tree is unchanged
  by a review toggle, so no file-watcher event would otherwise fire).

Adds a reusable `createNoopChangesetService` test helper, updates the handler
test to assert the refresh, and threads the new dependency through existing
agent-host test fakes.

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

* Review changes (P6): copy the reviewed ref on session fork

Add `IAgentHostReviewService.copyReviewedRef(source, target, workingDirectory)`
which points the forked session's reviewed ref at the same commit as the
source's, so a fork starts with the parent's review progress. No-op when the
source has no reviewed ref or the directory is not a git work tree.

Wire it into the Copilot session-fork path (best-effort, after the forked
session's database is copied), and inject the review service into CopilotAgent.
Covered by a real-git integration test.

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

* More refactoring/cleanup

* More changes to get things working

* Fix the actions in the toolbar

* Collapse multi-file diff item that is reviewed

* Remove precondition

* Fix tests + pull request feedback

* Fix hygiene

* Skip integration tests for now

* Make the UI snappier

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-07-03 14:43:28 +00:00
Lee Murray
51981501c9 Style override: Update badge overflow property and title padding (#324234)
style: update overflow property for badge elements and padding titles

Co-authored-by: mrleemurray <mrleemurray@users.noreply.github.com>
2026-07-03 14:18:35 +00:00
Lee Murray
201c7fee48 Style override: Add border-radius to update indicator in action bar (#324231)
style: add border-radius to update indicator in action bar

Co-authored-by: mrleemurray <mrleemurray@users.noreply.github.com>
2026-07-03 14:18:09 +00:00
Aiday Marlen Kyzy
598245572c fix: restore color theme when detecting high contrast theme (#324025)
* feat: adding code actions for github and playwright server enablement

* removing prompt validator

* removing code

* adding mcp server and extension search

* adding changes

* polish changes

* polishing tests

* polishing changes

* adding code

* fixing condition

* adding description

* adding splitBySlash

* extracting extension from extension tool name

* using single quotes for mcp server installation

* updating message

* fix: restore color theme when detecting high contrast theme

* removing other PR

* using a setting instead
2026-07-03 16:17:11 +02:00
Christof Marti
e4e5653fd3 Set HTTP_PROXY and HTTPS_PROXY from user / OS config (#324209) 2026-07-03 14:06:15 +00:00