155174 Commits

Author SHA1 Message Date
Martin Aeschlimann
acfbe35b48
slash commands completions to use harness configurations (#311216)
Co-authored-by: Copilot <copilot@github.com>
2026-04-19 17:49:20 +02:00
Ladislau Szomoru
a653f75bbc
Agents - show auxiliary bar, and files by default on launch (#311214) 2026-04-19 08:16:19 -07:00
Rob Lourens
e40a68f409
Hide delegation picker for local agent host in Agents app; fix Copilot CLI label (#311203)
* Hide delegation picker for local agent host in Agents app; fix label

- AgentHostContribution now reads IWorkbenchEnvironmentService.isSessionsWindow
  and registers the chat session contribution with supportsDelegation: false
  in the Agents app, hiding the delegation picker for local agent host
  sessions (matches remote agent host behavior). VS Code keeps the picker.
- Fix display label for AgentSessionProviders.AgentHostCopilot from
  'Agent Host - Copilot' to 'Agent Host - Copilot CLI' in
  getAgentSessionProviderName, which is what the session target picker uses
  for known provider types.

(Written by Copilot)

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

* Address review: localize label, stub env service in tests

- Localize 'Agent Host - Copilot CLI' provider label like the other
  built-in provider labels.
- Stub IWorkbenchEnvironmentService in agentHostChatContribution tests
  so AgentHostContribution can be constructed after the new injection.

(Written by Copilot)

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

* Revert label localization (it's a product name)

(Written by Copilot)

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

* Show Copilot CLI [Local] in picker for local agent host

Revert hiding the delegation picker for local agent host sessions in the
Agents app. Instead, show the picker (with non-applicable targets
disabled, as the existing DelegationSessionPickerActionItem already
handles) and update the label to match the format used elsewhere:
'Copilot CLI [Local]'.

This removes the IWorkbenchEnvironmentService injection that was added
to gate supportsDelegation, and the corresponding test stub.

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

* Hide delegation picker for local agent host in Agents app

In the Agents window, hide the delegation picker for local agent host
sessions (matches behavior of remote agent host sessions). In VS Code,
keep the picker available so users can hand off to other targets.

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

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-04-18 22:42:52 -07:00
Rob Lourens
6f28118624
Render search/glob tool messages as markdown in agent host (#311201)
Render search/glob tool messages as markdown

The grep/glob invocation and past-tense messages, plus the shell
past-tense message, contain backtick-wrapped values but were being
sent as plain strings. StringOrMarkdown treats plain strings as
literal text, so the backticks rendered as bare characters in the
chat UI. Wrap them in md() so they're rendered as markdown like the
other tool messages.

(Written by Copilot)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-04-18 19:13:03 -07:00
Bhavya U
b88bc8ee8b
Bake transcript pointer into conversation summaries at creation time (#311192)
Append a stable transcript-file hint (path + line-count snapshot) to
every conversation summary, so after compaction the model can read
the uncompacted transcript on disk.

The hint is appended exactly once at summary-creation time and stored
on round.summary / turn metadata. Subsequent renders replay that
string byte-identically, preserving Anthropic prompt cache hits even
as the transcript keeps growing.

Covers all three summarization paths:
- Full / Simple via ConversationHistorySummarizer.summarizeHistory()
- Inline background via agentIntent.ts _startBackgroundSummarization
  (flushes the transcript before snapshotting the line count so the
  baked count matches the on-disk file)

Shared via new exported helper appendTranscriptHintToSummary.
2026-04-18 18:13:27 -07:00
Kyle Cutler
73bca3fa35
Fix: hide browser on overlays within shadow roots (#311198) 2026-04-18 23:19:45 +00:00
Ladislau Szomoru
a165340b34
Agents - do not show "Mark as Done" action when there are incoming changes (#311193) 2026-04-18 15:34:12 -07:00
Peng Lyu
742f436bad
fix: improve touch support for sessions app pickers and overlays (#311183)
Replace EventType.MOUSE_DOWN with addDisposableGenericMouseDownListener
for overlay dismissal in runScriptAction, sessionsWalkthrough,
sessionsPolicyBlocked, and sessionsTitleBarWidget. This uses
POINTER_DOWN on iOS where pointer events are available.

Add touch-action: manipulation to picker trigger elements and the
session title bar pill to eliminate the 300ms tap delay on touch devices.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-04-18 18:56:35 +00:00
Peng Lyu
c347eef8af
fix(actionWidget): replace mouse down listener with generic mouse down listener (support touch) (#311185)
fix(actionWidget): replace mouse down listener with generic mouse down listener
2026-04-18 18:51:35 +00:00
Ladislau Szomoru
32776b54d4
Agents - fix version mode picker regression (#311173) 2026-04-18 11:49:01 -04:00
Vijay Upadya
eafba12c12
Add menu toggle for cloud sync in chat panel (#311130)
* Add menu toggle for cloud sync in chat panel

Co-authored-by: Copilot <copilot@github.com>

* update text

* feedback update

Co-authored-by: Copilot <copilot@github.com>

* fix ns

Co-authored-by: Copilot <copilot@github.com>

* update standup template

Co-authored-by: Copilot <copilot@github.com>

---------

Co-authored-by: Copilot <copilot@github.com>
2026-04-18 17:27:57 +02:00
Don Jayamanne
8183d66bd1
feat(copilotcli): plan review functionality with detailed markdown support (#311139)
* feat(copilotcli): add plan review functionality with detailed markdown support

* feat(chat): add plan review functionality with detailed markdown support

* updates

* updates

* feat(chat): enhance plan review with feedback functionality and autopilot confirmation

* Updates

* Updates

* Fix tests

* Fix tests: handle vscode_reviewPlan in FakeToolsService and update plan path expectation

Agent-Logs-Url: https://github.com/microsoft/vscode/sessions/7d5c785a-bdaa-4a29-9b7c-6a4e93195d47

Co-authored-by: DonJayamanne <1948812+DonJayamanne@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
2026-04-18 17:27:34 +02:00
Pierce Boggan
50f36fc4ff
Fix enterprise BYOK issues: hidden models, disabled button, account carryover (#309889)
* Fix enterprise BYOK issues: hidden models, disabled button, account carryover

Fix three bugs in the BYOK (Bring Your Own Key) model feature:

1. #309499 - BYOK models hidden by default: Add isUserSelectable: true
   to byokKnownModelToAPIInfo() so models appear in the picker on
   registration instead of defaulting to hidden.

2. #309492 - Add Models button disabled when BYOK enabled: Call
   _updateClientByokEnabledContext() during ContextKeysContribution
   initialization so the clientByokEnabled context key is set before
   the Language Models view renders.

3. #309501 - BYOK model carries over from individual account: Use a
   separate DisposableStore for BYOK provider registrations and clear
   them when switching to an account with BYOK disabled, resetting
   the registration flag to allow re-registration on next auth change.

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

* Fix Language Models UI not refreshing on group add/remove (#309495)

The Language Models view did not auto-update when:
- Adding a BYOK model with an invalid configuration (error status)
- Removing a BYOK model group

Root cause: _resolveAllLanguageModels only checked model cache changes
to decide whether to fire onDidChangeLanguageModels. When groups were
added/removed but the model set didn't change (e.g., groups with errors
or empty groups), the event never fired and the UI stayed stale.

Fixes:
1. Add _hasGroupStructureChanged to detect group-level changes (count,
   names, statuses) independently of model cache changes
2. Add explicit viewModel.refresh() after delete action, matching the
   pattern already used by the managementCommand path
3. Await configureLanguageModelsProviderGroup in addModelsForVendor and
   refresh the view model after the add flow completes

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

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-04-17 21:54:19 -06:00
Rob Lourens
6f22a55594
Restore session config for sessions opened from list (#311110)
* Restore session config for sessions opened from list

Sessions opened from the chat list (not created in the current window
lifetime) had no `state.config` populated, so the running-session
auto-approve picker rendered nothing. Two fixes:

1. `AgentService.restoreSession` now re-resolves the session config
   from the working directory and overlays previously persisted user
   values, so `state.config` is set on restore.
2. User-selected config values are now persisted to the per-session DB
   (as `configValues` JSON metadata) both when the session is created
   and on every `SessionConfigChanged` action, so they survive across
   process lifetimes.

The session-mutable subset of `state.config` is also lazily seeded
into the remote/local providers' `_runningSessionConfigs` map via a
reference-counted state subscription, so the picker re-renders once the
snapshot arrives.

Schema is intentionally re-resolved on restore rather than persisted,
so provider schema changes (renamed/removed/changed-enum properties)
are picked up automatically; persisted values that no longer satisfy
the new schema are dropped on the next resolve.

(Written by Copilot)

* Add integration test for session config restore after server restart

Exercises the full create -> change config -> persist -> server restart ->
subscribe -> restored state.config flow at the protocol/WebSocket level.

To enable this:
- `startServer` test helper now accepts a `userDataDir` and `env` so
  two server processes in the same test can share a session DB directory.
- `ScriptedMockAgent` reads `VSCODE_AGENT_HOST_MOCK_SEED_SESSIONS`
  on construction so the second-phase server can re-seed the in-memory
  session list it would otherwise lose across restarts.

(Written by Copilot)

* Address review: extract resolvedConfigsEqual + fix CI typecheck

Extract the shared resolvedConfigsEqual helper into
vs/sessions/common/agentHostSessionsProvider.ts and import it from both
the local and remote agent host session providers (was duplicated).

Fix a typecheck failure in agentService.test.ts where a real URI was
being passed to AgentHostStateManager.removeSession, which takes the
protocol-level URI alias (a string).

Also clarify in the createSession comment why we persist the full
resolved config values rather than only the user input: clients render
the resolved state on restore without having to re-resolve.

(Written by Copilot)
2026-04-17 18:10:51 -07:00
Rob Lourens
995d3dce7c
Try to make multiroot smoke test less flaky (#311127)
* Try to make multiroot smoke test less flaky

The 'Multiroot > shows results from all folders' smoke test on macOS
browser was failing because openFileQuickAccessAndWait() retries 9 times
in ~160ms with no backoff when it sees 'No matching results'. On a fresh
remote/browser server start, the workspace folders may not have been
attached yet (extension host still starting), so file search legitimately
returns 'No matching results' and all 9 retries fire before the workspace
is ready.

Add an incremental backoff between retries so slow workspace/file-search
initialization on CI has a chance to catch up.

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

* Update test/automation/src/quickaccess.ts

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

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-04-17 18:10:47 -07:00
Connor Peet
841ccf5c43
debug: bump js-debug (#311112) 2026-04-18 01:08:23 +00:00
Rob Lourens
e831da2ef9
agentHost: Enable remoteAH setting for oss builds and enable IPC logging by default (#311116) 2026-04-18 00:43:02 +00:00
Justin Chen
7fe1984875
don't double shimmer (#311124) 2026-04-17 17:33:18 -07:00
Kyle Cutler
e60d312067
Add browser tool smoke tests (#311123)
Co-authored-by: Copilot <copilot@github.com>
2026-04-18 00:19:35 +00:00
Ben Villalobos
6159ac50a6
ci: allow copilot extension version bump in engineering system check (#311122) 2026-04-18 00:09:51 +00:00
dileepyavan
9684342937
Disabling flaky test for sandbox (#311113)
disabling flaky test for sandbox
2026-04-17 23:41:30 +00:00
Zhichao Li
d4201f7e8f
Merge pull request #311115 from microsoft/zhichli/sqlite-ttft-cli-fallback
fix: denormalize CLI time_to_first_chunk into ttft_ms column
2026-04-17 16:38:16 -07:00
Rob Lourens
c73e41833d
Show loading indicator while agent host sessions authenticate (#311106)
Adds an `authenticationPending` observable to both the local
(`IAgentHostService`) and remote (`RemoteAgentHostSessionsProvider`)
agent host providers, defaulting to `true` so cached sessions surface
as loading from window-open until the first auth pass settles. The
flag is sticky: once cleared, subsequent background re-auths (account
change, session refresh, server reconnect) do not flicker the UI.

Also unblocks renderer-registered language model providers (such as
the agent host) from waiting on extension host startup: in
`LanguageModelsService._resolveAllLanguageModels`, skip the
`activateByEvent` wait when a provider is already registered. This
removes a 10+ second delay before the agent host model picker
populates.

(Written by Copilot)
2026-04-17 23:17:24 +00:00
Zhichao Li
8d134899f3
fix: denormalize CLI time_to_first_chunk into ttft_ms column
The CLI runtime emits `github.copilot.time_to_first_chunk` (seconds) on
chat spans, while the foreground extension uses
`copilot_chat.time_to_first_token` (ms). The SQLite store only checked
the foreground attribute, leaving ttft_ms NULL for CLI background agent
spans.

Add a `_ttftMs()` helper that coalesces both attributes with unit
conversion (seconds → ms) so the denormalized column is always populated.
2026-04-17 16:16:35 -07:00
vs-code-engineering[bot]
e0bb31efba
Update endgame notebook milestones to 1.117.0 (#309359)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-04-17 16:15:07 -07:00
Rob Lourens
ee95c6e7c1
Fix leaked disposable in NewChatWidget workspace picker (#311085)
The _renderWorkspacePicker method returns an IDisposable (the
onDidSelectWorkspace event subscription), but render() was discarding
it, causing a leaked disposable error. Register it on the widget's
disposable store.

Regression from #309895. (Written by Copilot)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-04-17 16:10:42 -07:00
Kyle Cutler
a4759f300c
Fix schema warnings from browser tools (#311107)
Co-authored-by: Copilot <copilot@github.com>
2026-04-17 23:03:25 +00:00
Raymond Zhao
8ba4c72aa2
chore: run npm audit fix (#311104) 2026-04-17 15:49:13 -07:00
dileepyavan
8e8deb2fbc
Updating labels (#311102)
* Update hidden Model B agent prompt for evals

* Refine hidden Model B prompt tag structure

* updating prompt to remove codex string

* main merge

* adding task execution tag

* adding task execution tag

* updating labels
2026-04-17 22:41:18 +00:00
Ulugbek Abdullaev
f83e7c277d
NES: use git-merge icon for reused in-flight requests (#311099)
Previously both cache hits and reused in-flight requests (async pending
or speculative) showed the database icon in the NES debug log. This
made it hard to tell whether a result was served from cache or joined
an existing stream.

Add a new \`reusedInFlight\` outcome with a git-merge icon ($(git-merge))
to visually distinguish 'joined an in-flight request' from 'loaded from
cache'. The database icon is preserved for true cache hits via
\`setIsCachedResult\`; reused in-flight requests now go through the new
\`setIsReusedInFlightResult\` method.
2026-04-17 15:23:41 -07:00
Megan Rogge
840a3be3a9
Fix Send to Terminal ignoring terminal session auto-approve (#311103)
fixes #310748

Co-authored-by: Copilot <copilot@github.com>
2026-04-17 22:22:19 +00:00
Connor Peet
1493a10145
agentHost: make 'new terminal' button open a terminal in the remote by default (#311075)
* agentHost: make 'new terminal' button open a terminal in the remote by default

Adds a new notion of 'default profile overrides' that the sessions app
uses to set the default terminal profile when a remote session is open.

* build
2026-04-17 22:22:16 +00:00
Connor Peet
b4bdfacbc7
Merge pull request #311041 from microsoft/connor4312/ra-links
[STACKED] agentHost: correctly rewrite links in markdown for remote files
2026-04-17 18:10:14 -04:00
dileepyavan
d431c9645a
Integrating sandboxing with network filter service (#310872)
* Terminal: respect auto approve setting for sandbox analyzer

Fixes #309954

* Revert "Terminal: respect auto approve setting for sandbox analyzer"

This reverts commit 50fd1407f512ca71688dffce4b15a8f48728fd51.

* Revert "Revert "Terminal: respect auto approve setting for sandbox analyzer""

This reverts commit 7cc5cca7d8d7d50ecb41df847162b17de73d915c.

* Apply agent network filter when sandbox is enabled

* Use terminal sandbox service for network filter

* Revert command line sandbox analyzer changes

* Remove unused agent sandbox setting IDs

* changes

* Fix terminal sandbox type-only exports

* Update src/vs/platform/networkFilter/test/common/networkFilterService.test.ts

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

* Move agent sandbox setting to platform

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-04-17 14:54:35 -07:00
Rob Lourens
ab11a299f2
Rename remote agent host Copilot agent displayName to "Copilot CLI" (#311095)
The CopilotAgent.getDescriptor() displayName was "Copilot" but should be
"Copilot CLI" to match the well-known CopilotCLISessionType label used
elsewhere. The remote agent host sessions provider uses this displayName
to build the session type label shown in the UI.

(Written by Copilot)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-04-17 14:28:43 -07:00
Rob Lourens
5711368c8c
Filter Copilot sessions by local data (#311097)
Only list Copilot SDK sessions that already have Agent Host session data, so sessions created by other Copilot CLI agents are filtered out without creating databases during listing.

(Written by Copilot)
2026-04-17 21:25:34 +00:00
Paul
ec992baa49
Add performance tests (#309700) 2026-04-17 21:23:43 +00:00
Osvaldo Ortega
a947515f45
Agents web: Fix for terminals (#311089)
* Agents web: Fix for terminals

Co-authored-by: Copilot <copilot@github.com>

* Review comment

Co-authored-by: Copilot <copilot@github.com>

* Fixes

Co-authored-by: Copilot <copilot@github.com>

---------

Co-authored-by: Copilot <copilot@github.com>
2026-04-17 21:17:44 +00:00
Bryan Chen
a1bec8cfcf
feat: upload commit-to-version mapping for copilot source maps (#311086)
* feat: upload commit-to-version mapping for copilot source maps

During the Copilot CI build, after uploading source maps to CDN, also upload
a small JSON file at sourcemaps/{extensionId}/commits/{commitHash}.json that
maps the VS Code commit hash to the patched extension version.

This enables the vscode-errors deminify service to resolve the correct
extension version for Insider builds, where the version is date-patched
(e.g. 0.44.2026041004) and not derivable from the repo alone.

* fix: use no-cache for commit-version mapping blob

The mapping file could change on pipeline reruns, so use
no-cache instead of long-lived cache headers.
2026-04-17 14:13:03 -07:00
Kyle Cutler
78f19995ff
Match subdomains when checking for existing browser pages (#311084)
Co-authored-by: Copilot <copilot@github.com>
2026-04-17 14:13:00 -07:00
Megan Rogge
309dec510a
Restore autopilot branch and shorten steering text in terminal tool results (#311065) 2026-04-17 21:10:07 +00:00
dependabot[bot]
0f937746f4
Bump dompurify from 3.3.2 to 3.4.0 in /extensions/copilot (#310375)
Bumps [dompurify](https://github.com/cure53/DOMPurify) from 3.3.2 to 3.4.0.
- [Release notes](https://github.com/cure53/DOMPurify/releases)
- [Commits](https://github.com/cure53/DOMPurify/compare/3.3.2...3.4.0)

---
updated-dependencies:
- dependency-name: dompurify
  dependency-version: 3.4.0
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Raymond Zhao <7199958+rzhao271@users.noreply.github.com>
2026-04-17 21:06:21 +00:00
Henning Dieterichs
41770c58f2 Fixes screenshots attributed to the wrong PR. 2026-04-17 22:48:28 +02:00
Connor Peet
22cc340140
agentHost: surface data into the 'changes' view (#311067) 2026-04-17 20:31:10 +00:00
Tyler James Leonhardt
6a8889b460
Move to InputState instead of metadata on sessions (#311060)
* Move to InputState instead of metadata on sessions

Cleans up more old patterns with new patterns.

Co-authored-by: Copilot <copilot@github.com>

* feedback

Co-authored-by: Copilot <copilot@github.com>

---------

Co-authored-by: Copilot <copilot@github.com>
2026-04-17 20:29:55 +00:00
Josh Spicer
6579de67a9
Joshspicer/add policy preview features docs (#311039)
* Update customization: SKILL.md

* Update customization: commit

* Update customization: SKILL.md

* Update customization: commit

* Update customization: SKILL.md

* Update customization: commit

* Add GitHub Preview Features section to add-policy skill
2026-04-17 20:15:24 +00:00
Kyle Cutler
c89a817bae
Browser shouldn't steal window focus (#311082)
Co-authored-by: Copilot <copilot@github.com>
2026-04-17 13:02:28 -07:00
Paul
00a718eb5c
Add incremental chat rendering experiment (#310801) 2026-04-17 19:25:09 +00:00
Osvaldo Ortega
ea6aac971b
Agents tunnels: auto-reconnect with backoff and wake-triggered retry (#310868)
* Agents tunnels: auto-reconnect with backoff and wake-triggered retry

Tunnel-backed remote agent hosts previously had no auto-reconnect
behavior — on laptop sleep / network drop the tunnel would flip to
Disconnected and stay there until the user manually retried.

This adds a reconnect loop inside TunnelAgentHostContribution:

- Detect Connected→Disconnected transitions for still-cached tunnels
  and schedule an immediate reconnect. Only fires when the entry is
  explicitly Disconnected — if the entry has been removed (e.g. user
  clicked "Remove Remote"), we honour the removal and do not reconnect.
- Exponential backoff on consecutive failures: 1s → 30s cap, up to
  10 attempts, then pause.
- Wake-triggered retry: on browser `online` or tab
  `visibilitychange` → visible, resume any paused reconnects.
  Rate-limited to one resume per 10s so rapid tab toggling can't
  hammer a permanently broken endpoint with unbounded attempt bursts.
- Prune all reconnect state when a tunnel is uncached or the
  contribution is disposed.

* Review comment

Co-authored-by: Copilot <copilot@github.com>

* Telemetry

Co-authored-by: Copilot <copilot@github.com>

* Clean up

Co-authored-by: Copilot <copilot@github.com>

---------

Co-authored-by: Copilot <copilot@github.com>
2026-04-17 19:07:05 +00:00
Connor Peet
99c9ee1a5b
agentHost: fix bugs around message handling (#311054)
* agentHost: fix bugs around message handling

- Fix a bug where a sessions were not restored correctly because they
  had in-progress data (that is the move of the `providedSession.isCompleteObs?.get()`)
- Fix a bug where sessions that supported progress streaming would not
  have sendable messages if they were already complete (that is the
	addition of `this._pendingRequests.deleteAndDispose(model.sessionResource);`)
- Fix a bug in the agent host where we didn't provide `onDidStartServerRequest`
  consistently which often prevented multi-client messaging from working
- DRY up some logic and add tests

* comments
2026-04-17 12:06:11 -07:00