* Show the source conversation in a side chat
A side chat spawned by `/btw` or a response selection carries hidden
context from the conversation it branched from, but the transcript gave
no sign of it: the first message read as a bare "hello" with no
indication that anything else was in scope.
Render a reply card above that first user message, quoting the source
turn the side chat branched from and revealing it when activated.
The card is driven by the chat's origin rather than a synthetic message
attachment, so the origin dictates how the first request renders. The
chat layer resolves it through the existing `IChatSideChatProvider`,
keyed by session resource — `IChatModel.sessionResource` is already
`IChat.resource` — which keeps `vs/sessions` out of the chat layer and
lets a single reused widget render the right card per chat.
Quote text prefers the captured selection, falling back to the source
turn's prompt and then to the chat title. `turnId` is now carried
through `IChatOrigin`, which the protocol already provided.
Fixes#327699
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Address review feedback on the side chat origin card
Cover the asynchronous reveal path, where the widget rebinds its view
model after `openChat` rather than already pointing at the source chat,
plus the timeout path when that rebind never arrives. The existing test
only exercised the synchronous fast path, leaving the fragile branch
unguarded.
Use the stroke thickness token for the high contrast border so it stays
consistent with the focus outline.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
---------
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Refresh cloned plugin marketplaces on a TTL
Private marketplace repos are discovered by cloning, because
raw.githubusercontent.com returns 4xx for them. `ensureRepository`
short-circuited whenever the clone directory already existed, so
discovery stayed frozen at the originally-cloned commit and newly
added plugins never appeared. The raw-fetch path had an 8h TTL; the
clone path had none, and the only refresher (`pullRepository`) is
reached from `updateAllPlugins`, which iterates *installed* plugins —
so a marketplace with nothing installed from it could not be
refreshed at all.
Give the clone path the same TTL via `refreshIfOlderThanMs`: a stale
clone is silently pulled inside the existing clone sequencer, so
concurrent fetchers collapse to a single pull. Local-file
marketplaces and SHA-pinned refs are never pulled. Failures are
non-fatal and still timestamped, so an unreachable remote cannot
cause a pull storm; cancellations are not timestamped, so navigating
away does not suppress the next attempt.
`pullRepository` now records the timestamp too — an explicit pull
leaves the clone just as fresh, and without this `updateAllPlugins`
pulled every marketplace twice in a row.
Also adds `Chat: Refresh Plugin Marketplaces` to bypass both caches
on demand, and hoists service lookups in the plugin commands into the
synchronous window: `invokeFunction` invalidates the accessor once the
handler returns, so the existing post-`await` `accessor.get` calls in
`updatePlugins` were throwing instead of showing their notifications.
Fixes#328523
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Address PR feedback on marketplace refresh
- Don't commit a cancelled fetch's results. `fetchMarketplacePlugins`
wrote its results to `lastFetchedPlugins` unconditionally, so
cancelling the refresh replaced the list with the empty/partial
result and blanked the marketplace UI.
- Thread the caller's token into the cold-clone path. Only stale
pulls honoured it, so cancelling the refresh did not stop a
first-time clone. Cancelled clones no longer raise a failure
notification, since the user asked for the abort.
- Report partial failures. The fetch helpers swallow per-marketplace
errors and return `[]`, so the command reported success even when a
marketplace failed to clone. Add `onMarketplaceError` so callers can
distinguish a partial result, and warn with the affected names.
- Invalidate the raw-fetch cache entry when falling back to cloning.
A marketplace that went from public to private kept serving its
stale raw entry on the next non-forced fetch until the original TTL
expired.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
---------
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Ignore zero-delta mousemove events emitted while opening custom context menus so the initiating right-click does not immediately dismiss the menu. Preserve hover focus and submenu expansion for actual pointer movement.
Fixes#329675
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
test: wait for Agent Host discard operations
Synchronize changeset discard scenarios with the operation metadata that enables resource-scoped invocation. This prevents macOS CI from invoking discard-changes before it is advertised.\n\n(Written by Copilot)\n\nCo-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Treat an already-selected session type as available so smoke tests do not wait for a picker that is intentionally suppressed for a sole provider. (Written by Copilot)
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The nullish coalescing operator (??) has lower precedence than division (/),
so `this.tree?.renderHeight ?? 0 / ItemHeight` parses as
`this.tree?.renderHeight ?? (0 / ItemHeight)` instead of the intended
`(this.tree?.renderHeight ?? 0) / ItemHeight`.
This causes the fallback page size to use renderHeight directly (e.g. 500)
instead of dividing by ItemHeight (22), resulting in ~24x over-fetching of
timeline items on every load.
Co-authored-by: Shehab Sherif <shehabsherif0@users.noreply.github.com>
CopilotAgent and ClaudeAgent each subscribe to session title changes and emit a `vscode.agent_host.session.title_changed` span; CodexAgent made no equivalent call, so Codex sessions produced no title span.
Wire the same provider-gated listener in CodexAgent. The conversation id is the agent host session id (AgentSession.id), matching what getSessionTraceContext already passes, so title spans join the session's existing trace rather than forming a standalone one.
IAgentHostStateManager is a new required dependency, so existing CodexAgent tests stub it.
Since #329331 the Claude model picker shows Copilot-proxy and native-Anthropic
models together, each carrying a provider-qualified id, and a session routes on
the provider of the model it was started with (resolveClaudeSessionTransport).
That makes the host-global override redundant — and, worse, incoherent.
Model enumeration (_refreshModels) gates the proxy half on holding a GitHub
token and the native half on detectExistingClaudeSetup; neither consulted the
setting. getProtectedResources() advertises the Copilot resource required:false
unconditionally. So `claudeUseCopilotProxy: false` never stopped Copilot-routed
Claude from being offered or used by a signed-in user, which is exactly what its
title ("Route Claude Through Copilot") promised. Its only remaining effect was
on the model-less fallback, where an explicit `true` broke the one state the
signed-out feature exists to serve: opt-in on, signed out, local Anthropic
credential present — forced to proxy and dead-ended on AHP_AUTH_REQUIRED.
resolveClaudeTransportMode drops its explicitProxy input and reduces to three:
opt-in off => proxy; signed in => proxy; else local setup => native; else proxy.
Clean deletion, not a deprecation: the key was never forwarded from a VS Code
setting (AgentHostRootConfigForwarder never managed it) and was only ever
hand-written into agent-host-config.json. A profile carrying a stale value
starts with no error and drops the key on the first config write.
Also corrects mergeClaudeModelCatalogs' claim that proxy-first ordering makes
Copilot the session default. It does not: the picker re-buckets by the _meta
vendor token, so the Anthropic group sorts first and the pre-selected model
routes native. Verified end-to-end.
Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
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>