Repeat failed Mocha blocks after the parallel suite summary and wait for changeset operations before invoking them in the affected conformance test.\n\n(Written by Copilot)\n\nCo-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot CLI agent hosts already configure the SDK's built-in GitHub MCP server with form deferral disabled. Avoid syncing the extension-contributed duplicate so it cannot override that behavior, while retaining user servers and non-Copilot agent-host support.\n\nCo-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* sessions: remove local chat enablement setting
Always register the local chat provider and its customization harness, and remove obsolete setting gates, tests, and documentation. (Written by Copilot)
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* sessions: remove Local harness from Agents window
Remove the Local sessions provider, harness registration, picker actions, documentation, and smoke coverage while preserving Agent Host fork behavior in its own contribution. (Written by Copilot)
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* sessions: avoid Local customization fallback
Activate the first real provider harness and suppress the shared Local fallback label in the Agents window when no harness is available. (Written by Copilot)
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
---------
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* agentHost: Attribute edits in focus windows
Share Agent Host reload correlations across the long-term, 10-minute, and 20-minute edit trackers. Focus windows reclassify the observed reload without consuming Agent Host retained state or double-counting totals, with bounded late-marker fallback.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* agentHost: Harden focus edit correlation
Reject malformed marker metadata, preserve per-edit request identity, and expire unresolved reload observations without discarding resolved results still used by active focus trackers.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* agentHost: Clarify marker source validation
Use explicit rejection and a named type guard for untrusted Agent Host marker source metadata.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
---------
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Fix stale session changes document lifecycle
Release resolved multi-diff models when session Changes editors clear while preserving restorable editor inputs. Guard retired tsserver event generations from recreating watchers.\n\n(Written by Copilot)\n\nCo-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Fix lifecycle teardown races
Dispose multi-diff models that resolve after their input is released and reject tsserver events once their exact server handle is inactive.\n\n(Written by Copilot)\n\nCo-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Rename session changes clear method
Align the inner input lifecycle method with the editor pane clear operation.\n\n(Written by Copilot)\n\nCo-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
assignment: Avoid entitlement lazy re-entry
Initialize Copilot assignment filters before subscribing to entitlement changes so constructing ChatEntitlementContext cannot recursively read its own Lazy value.
(Written by Copilot)
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Add rejected edit memory to PatchBased02
Keep rejected suggestions in a separate bounded compact history and annotate them in PatchBased02 prompts behind a default-off model memory option.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: db1eb24e-67e7-4c60-8dc6-15dd94044638
* simplify
* simplify telemetry
* Apply model config once instead of per-request (too complicated
* Update tests
* simplify
* Clean up prompt creation
* Test history entry ordering when we insert rejection entries
* Make helper function for defining rejection annotation option
* Fix type error
* Make memory declaration match that of lintOptions
* Assign sequence for all additions to xtab edit history and skip entries with no sequence when inserting rejection annotations
* Make sequence required
* Move rejection memory setting to string enum
* Document sequence number
* Clean up postscript implementation
* Document memory mode enum
* Disable rejection annotations for next cursor prediction prompts
* Discard stale undefined check
* Add explanation comment
* ws
* Restore opts.includePostScript
* Add sequence field to test fixtures
* Revese test to match new behavior -- don't output the rejection annotation explanation when postscript is disabled
* Restore outer check postscript
* inlineEdits: refactor: simplify rejected edit memory
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 93b030a9-f47a-461a-92c1-7853ea7693bc
---------
Co-authored-by: Ben Steenhoek <bensteenhoek@github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: ulugbekna <ulugbekna@gmail.com>
Copilot-Session: db1eb24e-67e7-4c60-8dc6-15dd94044638
Copilot-Session: 93b030a9-f47a-461a-92c1-7853ea7693bc
* style: adjust padding and alignment for activity bar and tabs
* style: adjust padding and alignment for sidebar and composite bar elements
* style: enhance active item indicator for composite bar in activity bar
* style: adjust badge positioning in activity bar for better alignment
* style: update activity bar and tabs styles for improved layout and visibility
Co-authored-by: Copilot <copilot@github.com>
* style: update spacing variables for improved layout consistency across activity bar, tabs, and padding
Co-authored-by: Copilot <copilot@github.com>
* style: adjust positioning of codicon-more label in auxiliary bar for improved alignment
* style: add hover effect for codicon-more in composite bar for improved visibility
* Potential fix for pull request finding
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
* Potential fix for pull request finding
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
---------
Co-authored-by: mrleemurray <mrleemurray@users.noreply.github.com>
Co-authored-by: Copilot <copilot@github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
* sessions: keep aux-only tabs limited to Changes and Files
Reapply the non-docked editor collapse after session working-set restores and editor-list changes so restored file tabs cannot remain visible while the editor area is hidden.\n\nCo-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* sessions: cover aux-only editor-list updates
Add regression coverage for tabs added while Details-only outside a layout restore, including capture and reopening when Editor becomes visible.\n\nCo-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Require dynamic code block editor contributions to declare an API version and expose providers through the namespaced V1 extension API. Unsupported versions are ignored before they are advertised to the Markdown editor.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 52d9b18a-7144-4b00-9fe2-d2672f2a5e12
Use the async clipboard strategy designed for VS Code webviews so paste reaches the EditContext-backed editor.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 094798e8-9ed5-4fcc-95bc-949de48c691d
* sessions: don't swallow clicks on header meta pills via session drag
The session header container is draggable so sessions can be
reordered, but its dragstart handler only excluded the title-actions
toolbar from initiating a drag. A small pointer move while clicking a
meta-row pill (changed-files, workspace folder, pull request) started
a native HTML5 drag instead, which suppresses the click event -
making the changed-files "X files" summary intermittently a no-op.
Extend the dragstart exclusion to also cover the meta row.
Fixes#327373
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* sessions: fix header drag exclusion to check the real gesture origin
dragstart's own `event.target` is always the draggable container
itself, never the descendant the gesture began on (verified against
real browser behavior). The previous check compared that target
against the title-actions toolbar and meta row, so it could never
match and never actually excluded either from initiating a drag.
Track the preceding pointerdown's target instead, and check that
when dragstart fires. Also trim the surrounding comments to a single
line per the header's contribution style.
Update the regression test to simulate a real mousedown on the
gesture origin followed by a dragstart targeted at the container,
instead of fabricating a descendant `DragEvent.target` that a real
browser would never produce.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
---------
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* feat: add modern file icon theme with SVG assets and configuration
* fix: add missing newlines at the end of SVG and JSON files
* feat: add TypeScript icon and update README for modern icon theme
Co-authored-by: Copilot <copilot@github.com>
* fix: add missing newline at the end of typescript.svg
* feat: add modern icons for Apple, Argdown, ASM, and Audio file types
Co-authored-by: Copilot <copilot@github.com>
* Add new SVG icons for various file types in the modern theme
- Added video.svg for video files
- Added vue.svg for Vue.js files
- Added wasm.svg for WebAssembly files
- Added wat.svg for Wat files
- Added webpack.svg for Webpack files
- Added wgt.svg for WGT files
- Added windows.svg for Windows files
- Added word.svg for Word documents
- Added xls.svg for Excel files
- Added xml.svg for XML files
- Added yarn.svg for Yarn files
* feat: add update script and implement icon theme generator
Co-authored-by: Copilot <copilot@github.com>
* feat: implement currentColor support for image icons in file icon theme
* fix: add missing newline at the end of fileIconThemeData.test.ts
* feat: update SVG icons and integrate them into the modern icon theme
Co-authored-by: Copilot <copilot@github.com>
* feat: remove old SVG icons and add new icons for file and folder types
Co-authored-by: Copilot <copilot@github.com>
* feat: update README and icon theme to reflect currentColor support; remove unused SVG icons
Co-authored-by: Copilot <copilot@github.com>
---------
Co-authored-by: mrleemurray <mrleemurray@users.noreply.github.com>
Co-authored-by: Copilot <copilot@github.com>
* agentHost: add provider-qualified Claude model-selection id codec
Pure precursor for per-session provider selection in the Claude harness.
Mirrors Codex's `@provider=` convention: toClaudeModelSelectionId encodes a
provider + model id into one opaque ModelSelection.id; parseClaudeModelSelection
splits it back, with a bare/malformed/legacy id defaulting to the Copilot
(proxy) provider so nothing needs a data migration. claudeTransportForProvider
maps the token to a transport (anthropic -> native, everything else -> proxy).
Dead code until the merged-catalog + per-session routing core wires it in;
landed first because it's a leaf with zero behavioral risk. Fully unit-tested
with no mocks, mirroring codexModelSelection.test.ts.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
* agentHost: add merged-catalog + per-session transport resolvers for Claude
Two pure precursors for per-session provider selection, co-located with the
model-selection id codec and covered by the same test suite:
- mergeClaudeModelCatalogs(proxy, native): flattens the two provider catalogs
into one picker list, proxy-first (preserving models[0]-is-default), each id
provider-qualified so a row carries its transport and the same model under
both providers yields two non-colliding rows. Either side may be empty so one
source failing to fetch never blanks the other.
- resolveClaudeSessionTransport({ perSessionProviderEnabled, model, defaultMode }):
the per-session counterpart to the host-global resolver — off, or no model,
inherits the host default (identical to today); on, the selected model's
provider decides.
Both are dead code until the flag-gated wiring lands; kept as a separately
reviewable, fully-tested unit.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
* agentHost: wire Claude per-session provider flag into the backend read-path
Slice 2a (flag plumbing) + 2b (backend read-path) of per-session provider
selection for the Claude agent host, gated behind the off-by-default
experimentation flag `chat.agentHost.claude.perSessionProvider`.
Flag plumbing (2a): register the boolean setting (APPLICATION scope,
experimental/advanced), its customization-config key, and the forwarder
contribution.
Backend read-path (2b): ClaudeAgent merges the proxy (Copilot-CAPI) and
native (Anthropic) model catalogs into one provider-qualified picker list,
and resolves each session's transport from its selected model's provider
when the flag is on (inheriting the host default when off, or when no model
is selected).
Review fixes folded in:
- A: gate the constructor / hydration model-refresh on the flag so the
native catalog bootstraps signed-out without a manual refresh.
- B: _resolveParentSession inherits a never-materialized parent's provisional
model so a forked peer chat keeps its native transport.
- C: a runtime flag toggle re-enumerates and repopulates the merged catalog.
- D: a failing proxy start no longer fails native-default sign-in.
- E: toClaudeSdkModelId strips the `@provider=` qualification before the SDK /
CAPI boundary — the wrapper is unparseable downstream and would 400 both
transports whenever the flag is on and a model is explicitly selected.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
* agentHost: guard Claude model refresh against a mid-flight per-session provider toggle
The refresh stale-write guards captured only the transport token/mode, not the
per-session provider flag. Because `_startModelRefresh` supersedes an in-flight
refresh as the coalescing target but never cancels it, a false-flip of the flag
mid-refresh left the superseded refresh running; when it settled it published a
stale wrong-mode catalog (merged provider-qualified over the bare single-transport
list the flag-off refresh had already published, or vice versa), clobbering the
correct one.
Capture `_perSessionProviderEnabled` at the start of both `_refreshModelsSingle`
and `_refreshModelsMerged` and bail in the stale-write guard when it moved, so the
superseded refresh drops its result.
Tests: a flag-on→off toggle mid-merge (native half parked on a gate so the merged
refresh is provably still in-flight) asserts the bare single catalog survives the
straggler; and a flag-off regression that a forked peer chat still inherits its
never-materialized parent's explicit model (the inheritance in `_resolveParentSession`
is intentionally not flag-gated).
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
* agentHost: group Claude models by transport provider in the picker
With per-session provider selection on, the merged catalog now stamps each
model's `provider` with its transport token (`copilot` for the Copilot-CAPI
proxy, `anthropic` for the user's own Anthropic account) alongside the
provider-qualified id, so the chat model picker — which buckets by
`provider` — splits Claude into a Copilot group and an Anthropic group. The
same model offered by both transports yields two distinct, separately
selectable rows.
- common/claudeProviders.ts (new): the two transport-provider tokens live in
one `common` module so the backend that stamps `model.provider` and the
frontend vendor descriptor that names the group are a single,
compile-checked source of truth rather than two literals that can drift.
- claudeModelSelection.ts: `withQualifiedProvider` re-stamps each model's
`provider` with its transport token; re-exports the tokens for node callers.
- agentHostChatContribution.ts: register the `anthropic` group vendor
(localized "Anthropic"), mirroring the Codex `chatgpt` second-vendor
registration, so the native group resolves a clean label. Copilot-routed
Claude models keep grouping under the global `copilot` vendor. Dormant while
the flag is off — no Claude model carries the `anthropic` provider then.
- claudeAgent.ts: correct the stale `toAgentModelInfo` doc — the picker
*groups* (does not filter) by `provider`.
Flag-off path is unchanged: the single-catalog refresh still stamps the
harness provider and no second vendor is registered.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
* agentHost: live per-session provider switching, unconditional
Complete the Claude per-session provider feature. Switching a live
session's model to one on a different transport now re-routes the running
subprocess, and the feature ships unconditionally (no experimental flag).
Live provider switch:
- Refactor IMaterializeContext.transport into a resolveTransport callback so
the transport is re-resolved inside materialize and on every rebuild — a
provider switch re-routes the rebuilt subprocess onto the new transport.
- A cross-transport model change defers via a pending-switch flag; the next
send() rebuilds onto the newly-selected transport and commits it once the
new subprocess is live. Same-transport changes still hot-swap in place.
Remove the experimental flag:
- Delete chat.agentHost.claude.perSessionProvider, revert the generic flag
plumbing, and delete the setting-to-root-config forwarder contribution.
- Collapse the per-session-provider gates in claudeAgent.ts to always-on and
remove the now-dead members.
- Drop the perSessionProviderEnabled parameter from
resolveClaudeSessionTransport; bare/legacy ids still resume on the host
default transport with no migration.
- Add modelProviders to the e2e CLAUDE_CONFIG and de-flag the unit tests.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
* agentHost: simplify Claude per-session transport resolution
Follow-up cleanup on the per-session-provider read-path, now that the
feature is unconditional and the single-catalog path is gone.
- Collapse the cached `_transportMode` and its reactive
`_resolveTransportMode`/`_applyTransportModeChange` machinery into a
read-on-demand `_defaultTransportMode()`. The host default is only the
fallback for model-less / bare-id sessions, so it needs no caching or
config/sign-in re-resolve — the next session reads live availability.
- `authenticate()`: a Copilot proxy-start failure is now uniformly soft.
GitHub sign-in still succeeds and both `_githubToken` and `_proxyHandle`
stay uncommitted, so a retry re-attempts `start()`; a Copilot-routed
model re-drives sign-in on its first send. Drops the native/proxy
default special-casing and the mid-flight transport-mode flip.
- Replace `IMaterializeContext.resolveTransport` (a callback the session
re-invoked on every rebuild) with a `transport` value the agent pins at
materialize. A per-session provider switch is pushed in through `send`'s
new `switchTransport` (staged in `_pendingSwitchTransport`); ordinary and
SDK-recover rebuilds reuse the materialized transport. A throwing guard
replaces the defensive re-resolve.
- Move cross-transport switch detection into `ClaudeAgentSession.setModel`
(the session owns it); drop the agent-computed `deferForTransportSwitch`
option and expose `hasPendingTransportSwitch` in place of `transportKind`.
- Inline the one-off `_settledCatalog` helper into `_refreshModels` and drop
the `_refreshModels` -> `_refreshModelsMerged` forwarder.
- Drop the now-unused provider-token re-export from `claudeModelSelection`;
tests import the tokens from `common/claudeProviders` directly.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
* agentHost: address Claude per-session provider review feedback
Fixes five review comments on the per-session provider slice:
- Keep IAgentModelInfo.provider as the `claude` routing owner and carry the
transport/group token in `_meta.modelGroupId`, so a model-selected
create_session no longer misroutes to a `copilot`/`anthropic` agent that
the node provider registry can't resolve.
- Drop the agent-host `anthropic` picker vendor that clobbered the Copilot
extension's shared `anthropic` vendor on dispose; reuse the shared one.
- On a replacement-token proxy start() failure, tear down the stale account
(handle, token, and merged catalog) instead of leaving it live behind a
"successful" sign-in that would silently serve the superseded account.
- Guard setModel's cross-transport detection on an explicit provider so a
bare/legacy id (parser-fallback `copilot`) can't spuriously reroute a
native session.
- Condense the over-long rematerializer transport-pinning comment.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
Use the shared floating panel gap for the Agents window's right and bottom shell gutters so the outer edges follow the same spacing rhythm as adjacent parts.\n\nCo-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Add EditorInputCapabilities.CannotClose for editors that cannot be closed via standard user actions
Fixes#329370
Introduces a new editor input capability that allows an editor to opt
out of being closed through standard user-initiated actions (tab
close button, middle click, Close Editor / Close All / Close Group
commands and keybindings, and toolbar close/unpin affordances) while
preserving internal/programmatic force-close paths such as shutdown,
window reload, workspace transitions, editor replacement and restore
failure handling.
- EditorGroupView.closeEditor/closeEditors/closeAllEditors now filter
out non-closeable editors for user-facing calls, while a new
`force`/internal option lets lifecycle call sites (state
reapplication, cross-window group moves, auxiliary window merge)
bypass the restriction.
- Mixed selections/bulk operations close whatever is closeable and
leave the rest open rather than failing the whole operation.
- Editor replacement continues to work for CannotClose editors since
it is considered an internal operation.
- Tab close/unpin actions, context menu items and toolbar items are
hidden for CannotClose editors via a new
ActiveEditorCannotCloseContext context key, avoiding misleading
close affordances.
- Middle-click tab closing is a no-op for CannotClose editors.
- CloseAllEditorGroupsAction only removes a group once it is actually
empty, so a group containing a CannotClose editor is not disposed.
- Added targeted tests covering individual close, bulk close/close
all, mixed sets, replacement, and group-close semantics.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Adopt non-closeable managed tabs in Agents window
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* editor: refresh tabs when input capabilities change
Update editor tab controls and active-editor context keys immediately when an input changes capabilities. Use this to make the Agents Changes and Files inputs non-closeable only while the editor area is hidden.\n\nCo-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* editor: address non-closeable input review feedback
Add explicit forced targeted closes for lifecycle cleanup, keep unpin and mixed bulk actions available, and prevent Revert and Close from reverting protected inputs.\n\nCo-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* editor: add non-closeable tab fixtures
Add active, dirty, and sticky protected editor variants to the real editor tab-bar component fixture.\n\nCo-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
---------
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Dmitriy Vasyura <dmitriv@microsoft.com>