155146 Commits

Author SHA1 Message Date
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
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
Rob Lourens
f2ba2857c7
Merge branch 'main' into connor4312/ra-links 2026-04-17 11:56:08 -07:00
Maruthan G
8dac599754
fix(terminal-chat): dedupe terminal tool-session registrations to prevent listener leak (#309906) (#310740) 2026-04-17 18:54:41 +00:00
vs-code-engineering[bot]
99a3906d67
Update distro commit (main) (#311059)
Update distro commit to cccc9754

Co-authored-by: vs-code-engineering[bot] <122617954+vs-code-engineering[bot]@users.noreply.github.com>
2026-04-17 18:51:23 +00:00
Kyle Cutler
3704d95c91
Support frames / workers in browser CDP (#311049)
* Support frames / workers in browser CDP

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

* path fix

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

* feedback

* Normalize blank URLs

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

---------

Co-authored-by: Copilot <copilot@github.com>
2026-04-17 11:47:17 -07:00
Josh Spicer
5027dde858
Add back button to AI customization section screens (#310881)
* Add back button to AI customization section screens

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

* Move back button to left of search box

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

* Align editor/detail back button position with section back arrow

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

* Top-align section back arrow with editor header back button

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

* Add fixtures for editor/detail views to verify back-button alignment

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

* Top-align editor/detail back button to match section arrow

The .editor-header has align-items: center and contains a multi-line title
(name + filename), causing the 26px back button to drift down when centered
in the taller row. Pin it to flex-start so it sits at top of the padding
box, exactly where the section back arrow sits.

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

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-04-17 11:31:48 -07:00
Josh Spicer
960abe8998
Always open overview from sidebar customization entrypoints (#311050)
Follow-up to #310871: the sidebar entrypoint actions (Agents, Skills,
Instructions, Hooks, MCP Servers, Plugins) still called
selectSectionById after opening the editor, which deep-linked into
the section instead of showing the overview.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-04-17 18:23:35 +00:00
Bhavya U
c78e004e28
Warm-cache gate for inline background summarization (#311047)
Adds a pure helper shouldKickOffBackgroundSummarization that gates the
post-render background compaction trigger based on prompt-cache warmth:

- inline + warm cache (toolCallRounds.length > 0): jittered threshold in
  [0.78, 0.82) straddling the historical 0.80 edge.
- inline + cold cache: emergency kick-off at >= 0.90 to keep long-running
  sessions from hitting sync foreground compaction.
- non-inline: unchanged >= 0.80.

The rng is injected via a private field so tests are deterministic and
the warm-only jitter path is exercised without touching Math.random.
2026-04-17 14:14:51 -04:00
Courtney Webster
15248d52dd
Merge pull request #311042 from microsoft/remove-onboarding-extensions-step
Remove extensions step from onboarding
2026-04-17 13:10:25 -05:00
Courtney Webster
0e3e05d98a
Merge pull request #310169 from microsoft/respectable-aardwolf
Disabling walkthrough for web
2026-04-17 13:03:48 -05:00
Connor Peet
8c03967ae9
Merge pull request #311025 from microsoft/connor4312/readfile-diffs
agentHost: show rich diffs when requesting write confirmations
2026-04-17 13:57:59 -04:00
Josh Spicer
377feb62b4
chat customizations: splash when MCP/plugins disabled (#310847)
Block the MCP servers and Plugins tabs in the chat customizations editor
when their respective access settings are disabled, including via
enterprise policy.

- McpListWidget watches `chat.mcp.access`; shows splash when value is
  `none`. If `policyValue === 'none'`, shows policy-locked message and
  hides the "Open Setting" button.
- PluginListWidget watches `chat.plugins.enabled` with the same
  user/policy distinction.
- Reuse `.mcp-list-widget` root class so the new `.mcp-disabled-state`
  CSS applies to both widgets via a single `.access-disabled` modifier.
- Add Dark/Light fixtures for both widgets in user-disabled and
  policy-locked states (8 new screenshots).

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-04-17 17:49:27 +00:00
Connor Peet
c0a6ca54b8
comments 2026-04-17 10:46:36 -07:00
dependabot[bot]
7d224d9546
build(deps): bump rand from 0.8.5 to 0.9.3 in /cli (#309689)
* build(deps): bump rand from 0.8.5 to 0.9.3 in /cli

Bumps [rand](https://github.com/rust-random/rand) from 0.8.5 to 0.9.3.
- [Release notes](https://github.com/rust-random/rand/releases)
- [Changelog](https://github.com/rust-random/rand/blob/0.9.3/CHANGELOG.md)
- [Commits](https://github.com/rust-random/rand/compare/0.8.5...0.9.3)

---
updated-dependencies:
- dependency-name: rand
  dependency-version: 0.9.3
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>

* fix clippy lint warnings after rand 0.8.5 → 0.9.3 upgrade

Agent-Logs-Url: https://github.com/microsoft/vscode/sessions/8e6151a9-d6c4-42c0-9e9e-e8e384b8ce48

Co-authored-by: rzhao271 <7199958+rzhao271@users.noreply.github.com>

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: rzhao271 <7199958+rzhao271@users.noreply.github.com>
2026-04-17 10:31:19 -07:00
Megan Rogge
251d09925e
Fix unescaped icon and undefined text in terminal tool confirmations (#311037)
fix some issues
2026-04-17 13:21:13 -04:00
Connor Peet
d689175e71
Merge branch 'connor4312/readfile-diffs' into connor4312/ra-links 2026-04-17 10:16:25 -07:00
Connor Peet
1830427c43
more build 2026-04-17 10:03:38 -07:00
cwebster-99
7c2a50c979 Remove extensions step from onboarding 2026-04-17 11:44:15 -05:00
Rob Lourens
e44fc34055
Remove noisy log (#311034) 2026-04-17 16:39:59 +00:00
Hawk Ticehurst
b82b1848fe
sessions: add subtle border to GH profile image (#311036)
sessions: add subtle account avatar border

Use the existing command center border tokens for the GitHub profile image so the avatar reads cleanly against active and inactive titlebar chrome.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-04-17 12:37:38 -04:00
Ladislau Szomoru
20298ed3a8
Background - use merge-base commit for the left hand side of the diff editor (#311026)
* Background - use merge-base commit for the left hand side of the diff editor
2026-04-17 16:36:58 +00:00
Connor Peet
6476a36e10
build and tests: 2026-04-17 09:30:34 -07:00
Connor Peet
82a6ad187b
Merge branch 'connor4312/readfile-diffs' into connor4312/ra-links 2026-04-17 09:30:18 -07:00
Henning Dieterichs
2cc8b21a3a Updates component explorer 2026-04-17 18:29:29 +02:00
Connor Peet
696552cfc5
agentHost: correctly rewrite links in markdown for remote files
Stacked on #311025
2026-04-17 09:28:04 -07:00
Martin Aeschlimann
9677ab2714
Use 'sessionTypes' to filter chat customizations in UI, 'when' only in promptsService (#310999)
* Use 'sessionTypes' to filter chat customizations in UI, 'when' only in promptsService

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

* update

* correctly handle when from providers

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

* fix compile error

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

---------

Co-authored-by: Copilot <copilot@github.com>
2026-04-17 16:25:48 +00:00
Connor Peet
a1427eeb1a
Merge remote-tracking branch 'origin/main' into connor4312/readfile-diffs 2026-04-17 09:14:21 -07:00
Maruthan G
27bc1e2593
fix(chat): cancel in-flight streaming tool invocations when response is cancelled (#288701) (#310979) 2026-04-17 16:11:58 +00:00
Megan Rogge
7d58583b70
Fix run_in_terminal wedging when cached terminal is disposed (#311019)
fix issues with disposed terminal
2026-04-17 09:06:27 -07:00