* sessions: fix maximized side pane toggle
Make the Agents workbench own side-pane visibility transitions and expose completed before/after state to layout controllers. This ensures a maximized side pane closes fully while preserving editor/detail restoration and per-session state.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* sessions: address side pane review feedback
Keep side-pane state editor/aux-only, correct lifecycle documentation, and leave transient auxiliary-bar cleanup to layout-specific strategies.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
---------
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* agentHost: separate agent and execution mode telemetry
Keep chat.modeChange scoped to user picker and custom-agent selections, including the Agents Window, and report interactive, plan, and autopilot transitions through agentHost.executionModeChanged.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* sessions: scope mode picker telemetry to active chat
Resolve the previous mode and request count from the picker surface's scoped session and active chat so multi-session and peer-chat selections are attributed correctly.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
---------
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* build: harden targeted validation scripts
Reject validation commands that would otherwise succeed without checking files, support multiple stylelint targets, and report validation scope and elapsed time. Document how to avoid redundant typechecking before compilation.\n\n(Written by Copilot)\n\nCo-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* build: count files entering hygiene checks
Track requested files only when they reach an actual hygiene checker, deduplicate across checker branches, and cover non-checkable assets.\n\n(Written by Copilot)\n\nCo-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* policy: keep exported policy data synchronized
Export policy catalogs from both the Workbench and Agents window in isolated profiles, then merge them with explicit conflict validation. Restore the blocking integration check so policy source changes cannot drift from the generated catalog.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* policy: regenerate catalog after main merge
Regenerate the catalog with the canonical dual-entrypoint exporter after resolving the main merge. This restores ChatAllowManagedMcpServersOnly and keeps newly merged policies in generated order.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* policy: isolate export environment
Ignore portable and app-data overrides when launching policy export windows, and honor the configured temporary directory with compact paths that remain under macOS IPC limits.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* policy: sort exported catalog by key
Sort merged policy entries by configuration key before serialization so identical sources always produce the same catalog regardless of registration order.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
---------
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The agent host aggregates one `listSessions` result across all of its
agents. An agent that isn't ready yet returned an empty list rather than
failing, so a startup auth race produced a listing that looked complete
but was missing whole agents. `_refreshSessions` then evicted every
cached session absent from it and fired `removed`, which
`SessionGroupsService` and `SessionsListModelService` treated as a
deletion — permanently erasing the user's group membership, pins and
manual sort keys. The sessions returned on the next launch, but ungrouped
and unpinned.
Three changes:
- Durable UI state is discarded only on a definitive delete
(`onDidDeleteSession`) or archive, never on `onDidChangeSessions.removed`,
which is an eviction and can be transient.
- `CodexAgent.listSessions` rejects with `AHP_AUTH_REQUIRED` instead of
returning `[]` while its GitHub token is still landing. The workbench
already handles a rejected listing correctly: no eviction, the cache is
not marked authoritative, and a backoff retry heals it. This also fixes
a latent bug where an `openai` usage source could never list sessions.
- `_refreshSessions` no longer evicts an agent's sessions when that agent
contributed no rows while others did — that namespace is unknown, not
empty. A wholly empty listing still prunes, preserving the existing
stale-hydrated-entry cleanup.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
sessions: fix: keep feedback submit overlay inside diff
Anchor the agent feedback overlay to the inset editor pane instead of the full editor group so the docked detail panel cannot capture its bottom-right placement. Add focused unit coverage and a dark/light component fixture for the single-pane geometry.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 151ec481-fb28-49e1-8485-9229da423c15
Apply the circular send styling across every chat composer, not just the
editor one:
- The sessions part re-declared the send button's radius as
`cornerRadius-small`, overriding the base rule and leaving the Agents
window's active chat a rounded square. Drop those overrides so it
inherits from chat.css — duplicating the radius per surface is what let
the two drift apart in the first place.
- The Agents window's new-chat composer is a distinct widget with its own
send button, so give `.sessions-chat-send-button` the circular radius
too, and carry the ringed-circle treatment to its voice toolbar and
dictation mic so the row stays consistent with the editor.
Use the compact glyph for Add Context. `Codicon.addCompact` exists, and
the convention is to swap to the optically tuned glyph rather than only
scaling the base one. Updated in both composers plus the automation
dialog's selector, and the Agents attach button drops an off-ramp 14px
size in the process. The design-tokens doc listed "plus" as having no
compact variant, which is no longer true.
Add screenshot fixture variants for the standalone dictation and Voice
Mode controls across all eight states they style differently: dictation
idle / recording / preparing, and Voice Mode idle / connecting /
listening / speaking / disconnect. The glow's audio-reactive level is
pinned so the screenshots stay deterministic.
Those fixtures immediately caught a live bug: the green disconnect rule
was specificity (0,3,0) while the blanket `icon-foreground !important`
rule that colors every toolbar codicon is (0,5,0). With equal
`!important` the higher specificity wins, so the disconnect button had
been rendering grey rather than green. Scoped the rule to the full
toolbar path so it wins, rather than baselining the bug.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* agents window: apply session `_meta` once per update and keep it transactional
Follow-up to "agents window: keep workspace-less quick chats out of bogus
workspace groups". That change made `_meta` arrive on every `listSessions`
refresh, which turns two pre-existing quirks in `AgentHostSessionAdapter.update`
into per-session, per-turn-completion work:
- `_meta` was applied twice: once inline and again through the trailing
`setMeta`. With the promotion logic now living in `setMeta`, that also ran
`_promoteToQuickChatIfWorkspaceless` and `_computeWorkspace` twice. Apply it
once, up front, where the promotion still precedes the workspace rebuild.
- `setMeta` opened its own `transaction()`. `transaction()` never joins an
enclosing one - it constructs a `TransactionImpl` and `finish()`es it - so
moving the single application to the top of `update` would notify observers
of `_meta` / `isQuickChat` / `workspace` before `isArchived`, `isRead`,
`changes` and `activity` were applied, handing them a torn snapshot. Take an
optional `ITransaction` and use `subtransaction`, and thread the caller's
transaction from `update` and `_handleSessionSummaryChanged`. The two
standalone callers pass nothing and keep their own transaction.
Also pins the absent-`_meta` case on the wire (the item is built field by field
and `satisfies SessionSummary` cannot catch a dropped optional in either
direction), and corrects the session-database key named in the docs: the marker
is persisted as `agentHost.workspaceless` (`AH_META_WORKSPACELESS_DB_KEY`,
written by `AgentService`), never `copilot.workspaceless`.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 8f4788b1-3307-4b88-b3fc-23565548de06
* agents window: drop the redundant workspace rebuild and finish the transaction threading
Addresses review feedback on this PR.
- `update()` still recomputed the workspace unconditionally after `setMeta`
had already rebuilt it from the same project / working directories and the
same `_meta`, so a `_meta`-bearing refresh paid for `_computeWorkspace()`
twice - exactly the duplicate per-turn work this PR set out to remove. The
fallback rebuild now only runs when the snapshot carries no `_meta`.
- `setChangesSummary` and `setActivity` wrote their observables with no
transaction, and `observableValue.set(v, undefined)` builds and finishes one
of its own, so they notified mid-way through the enclosing update. Both now
take an optional `ITransaction`, and `update()` /
`_handleSessionSummaryChanged` thread theirs through. Without this, threading
the transaction into `setMeta` alone left `SessionSummaryChanged` still torn:
`changes` is applied before `_meta`, so an observer of both ran once on the
new chip with the stale workspace, then again at the outer finish.
The new test covers that notification path and fails with the intermediate
`{ branch: undefined, files: 2 }` snapshot when the transaction is dropped.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 8f4788b1-3307-4b88-b3fc-23565548de06
---------
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 8f4788b1-3307-4b88-b3fc-23565548de06
* feat(agentHost): add support for multiple working directories in Copilot provider
- Introduced `AgentHostCopilotMultiRootEnabledConfigKey` to enable multiple working directory support.
- Updated `platformRootSchema` to include the new configuration key with default value set to false.
- Modified `agentHostStarter.config.contribution.ts` to register the new setting, hidden from the UI.
- Enhanced `agentService.ts` to manage the new configuration key for Copilot sessions.
- Updated `CopilotAgent` to advertise `multipleWorkingDirectories` capability based on the new setting.
- Added tests to ensure correct behavior of multiple working directories feature.
- Created `AgentHostWorkspaceSessionMembershipStore` to manage session membership in multi-root workspaces.
- Updated session list store to utilize the new membership store for filtering sessions based on workspace context.
* feat(agentHost): enhance multi-root workspace handling and session membership management
agents window: keep workspace-less quick chats out of bogus workspace groups
Automation-created quick chats (and any quick chat seen after a reload or a
list refresh) rendered in the sessions sidebar under a section header labelled
with a raw session UUID instead of under "Chats".
Whether a session is a quick chat cannot be derived from its working directory
-- the host assigns workspace-less sessions a throwaway scratch cwd at
~/.copilot/chats/<sessionId> -- so it travels as an `agentHost.workspaceless`
marker on the generic `_meta` bag. `AgentService.listSessions()` overlays it
correctly, but the AHP `root/listSessions` round-trip dropped `_meta` on both
ends, so any session first materialized from a listing was classified as a
workspace session rooted at that scratch dir. `notify/sessionAdded` does carry
`_meta`, which is why a fresh quick chat looked right until the next refresh.
- carry `_meta` on the `listSessions` wire item (server) and map it back
(client -- the only IAgentConnection implementation, so this covers the
local host too)
- infer workspace-less in `_buildInitialSummary` from `config?.` so a
`createSession()` with no config matches what the agents themselves infer
- make the adapter session-kind monotonically promotable instead of frozen at
construction, so a mis-classified session heals when an authoritative
`_meta` arrives, and report the promotion even when the workspace was
already undefined so the list regroups
- persist the healed kind by overlaying the adapter live quick-chat state in
`_persistCache`, so a stale snapshot cannot resurrect the mis-classification
The provider tests could never have caught the wire drop -- the mock host
returns its stored metadata verbatim, bypassing both mappers -- so the wire
regression tests live at the protocol layer, and the provider tests cover the
promotion and the cache round-trip.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: c93359f3-9a7d-411d-9adb-21bdda78c6af
* chat: ask side questions from selected responses
Reuse the feedback input affordance in the Agents window to create side chats from selected assistant markdown, with accessible pending state and Agent Host context coverage.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* chat: address side question review feedback
Preserve accessible labels and multiline input behavior, guard stale async UI completion after navigation, and normalize side-chat orchestration APIs.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
---------
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* sessions: Refine prompt sticky header styling and navigation
- Replace the sticky title hover underline with the chat request bubble
background and hover color, matching the VS Code standard treatment.
- Give the hover background breathing room (padding + control-tier radius)
while keeping the label aligned with the prompts underneath.
- Let the header span the full transcript width so the prompt label uses the
available room before it has to ellipsize.
- Reveal the prompt row itself on Previous/Next (like the dock rail and the
title), and drop the navigation pin so the header consistently hides after a
jump instead of covering the top-aligned prompt.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* sessions: Roll the sticky prompt header label on prompt change
When the pinned prompt changes while the sticky header is visible, the
outgoing prompt name slides and fades out while the incoming name slides in
from the scroll direction, using the Web Animations API. The opaque band
stays fixed (translating it would overflow above the transcript and clip its
shadow); only the label text rolls inside a clip viewport. Snaps on first
appearance and jumps, and honors prefers-reduced-motion.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* sessions: Constrain the sticky prompt band to the message column
Move the band's background, border, and shadow from the full-width outer
element onto the centered content element (max-width 950, margin auto) so it
matches the transcript's title and prompt column instead of bleeding to the
window edges. This also removes the ~1px bump where the full-width band
overhung the vertical scrollbar gutter on the right.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* sessions: Align the sticky prompt band with the session header
Mirror the session header's box model so the band's background lines up with
the header's bottom-border line above it: a centered 950 host with the header
bar's 10px side padding, and an inner band that carries the background,
border, and shadow (like .chat-composite-bar-header). A 22px left inset
reproduces the header's status-icon column so the prompt text stays aligned
with the title and the prompts below.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* sessions: Round the sticky prompt band's bottom corners
Add a 4px (control-tier) radius to the bottom corners of the sticky prompt
band so it reads as a rounded control resting on the transcript.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* sessions: Add side borders to the sticky prompt band
Give the band left and right borders (in addition to the bottom) with the
top left open, so the rounded bottom corners read as intentional: the band is
anchored to the top of the transcript and closes off at the bottom. Switch the
border to the stroke-thickness token.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* sessions: Address PR review feedback on the sticky prompt header
- Composite the label hover token over the opaque panel base so it matches the
standard chat bubble hover instead of stacking over the band's own tint.
- Reuse --session-view-centered-content-max-width (with a 950px fallback)
instead of duplicating the centered-content width literal.
- Keep the SKILL note aligned with the request-bubble hover treatment.
- Shorten two-line method-body comments to one line.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
---------
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Propagate /btw transcript selections through sessions and agent host.
Hide the snapshot in the first side-chat prompt while preserving it in origin metadata.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Keep the selected local turn as side-chat provenance while using a separate concrete provider anchor. Inject the bounded local context exactly once on the first side-chat prompt.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Require explicit fork/sideChat source kinds throughout VS Code.
Remove the legacy ChatSource helper/fallbacks and update focused tests plus the sessions skill note.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
/btw now branches the active chat context into standard Agents tabs instead of a separate side chat surface.
This keeps hidden tool subagents out of the visible tab model while preserving compatibility with the legacy fork-based side chat protocol.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Document Agent Host E2E coverage strategy
Capture the public principles for coverage-guided test selection, model-boundary choices, portable oracles, shared-server isolation, and completion criteria.\n\n(Written by Copilot)\n\nCo-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Expand Agent Host multi-chat E2E coverage
Add cross-provider peer chat lifecycle and provider-backed history tests, validate actual replay requests carry prior context, and document provider capability gaps through targeted skips.\n\n(Written by Copilot)\n\nCo-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Refresh Agent Host E2E coverage metrics
Regenerate the loaded-file coverage summary after rebasing the multi-chat E2E expansion onto current main.\n\n(Written by Copilot)\n\nCo-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Expand Agent Host peer chat E2E coverage
Add 21 peer-chat scenarios covering local commands, workspace tools, provider context isolation and attachment projection. Record strict Claude and Copilot fixtures and refresh aggregate coverage metrics.\n\n(Written by Copilot)\n\nCo-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Document disabled Agent Host E2E tests
Add a persistent inventory and reevaluation process for suspected provider bugs, platform limitations, record-only scenarios, and capability skips. Gate the two Copilot peer file mutations whose recorded POSIX tool plans do not produce Windows filesystem effects.\n\n(Written by Copilot)\n\nCo-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Strengthen Agent Host context assertions
Require prior assistant responses to be non-empty before using them to verify provider request history.\n\n(Written by Copilot)\n\nCo-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Fix Agent Host E2E approval loop
Deduplicate retained toolCallReady notifications by server sequence so the permission test sends one confirmation instead of flooding and terminating the shared Copilot host.\n\n(Written by Copilot)\n\nCo-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Recycle shared Agent Host E2E server to prevent cumulative wedge
The shared replay server caches one provider SDK/CLI subprocess and reuses
it across the whole suite. After enough sessions that subprocess degrades
and eventually wedges a turn (turn starts, no model response arrives even
though replay is instant), which times out and, via teardown of the
mid-turn session, leaves the host unavailable so the next test hits
ECONNREFUSED. Proactively recycle the server every 25 tests, and restart
it after any failed test so a wedge cannot cascade into unrelated tests.
(Written by Copilot)
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
---------
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Expand Agent Host end-to-end coverage
Add cross-provider E2E coverage for host-owned completions, local commands, session state, and terminal lifecycle. Record tokenless replay fixtures and semantic AHP snapshots, and refresh coverage metrics.\n\n(Written by Copilot)\n\nCo-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Deduplicate Agent Host E2E test setup
Centralize common test timeouts and terminal cleanup without changing test titles or replay fixture identities.\n\n(Written by Copilot)\n\nCo-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Stabilize Agent Host E2E tests on Windows
Allow slower Windows terminal completion and skip the Git-backed branch-completion scenario where the temporary repository remains locked during suite cleanup.\n\n(Written by Copilot)\n\nCo-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Fix Agent Host E2E timeout wrappers
Set timeouts inside wrapper callbacks because the test registration function does not return a chainable object in the Windows Electron test runtime. Preserve Mocha context for snapshot assertions.\n\n(Written by Copilot)\n\nCo-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Gate successful bang E2E test on Windows
Windows surfaces bang-command output but does not reach host-local tool completion, which wedges the shared replay server. Keep the failure-path and direct terminal coverage enabled while skipping only this POSIX-dependent success scenario.\n\n(Written by Copilot)\n\nCo-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Share empty fixture across host-only E2E tests
Register host-only tests explicitly and route them through one strict empty replay fixture in all update modes. Remove 99 duplicate empty captures while preserving hard cache misses for unexpected model traffic.\n\n(Written by Copilot)\n\nCo-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* sessions: scope git availability to each session surface
Publish usable Git availability on ISession and have the shared session context
key plumbing bind it into root and per-session scoped context key services. This
keeps repository picker menu visibility aligned with each toolbar's own session
when multiple session inputs are visible.
Remove the provider contribution that mirrored only the globally active session,
and add regression coverage for independent scoped contexts.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* sessions: forward git availability through session wrappers
Delegate the optional hasGitRepository observable from both VisibleSession and
ResourceOverrideSession so scoped context keys preserve provider-refined Git
availability through the visibility model.
Add regression coverage for both wrapper paths.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
EOF && git push
---------
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-07-20 21:07:50 +00:00
Raymond ZhaoGitHubcopilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>