Commit Graph

155263 Commits

Author SHA1 Message Date
Matt Bierner
7efcd94838 Merge pull request #311537 from mjbvz/dev/mjbvz/wee-parrot
Apply class pascal cases eslint rule to all ts files
2026-04-20 16:54:00 -07:00
Matt Bierner
a13c4de255 Merge pull request #311536 from mjbvz/dev/mjbvz/eerie-raven
Remove old tfidf worker code
2026-04-20 16:39:20 -07:00
Matt Bierner
0295564b79 Apply class pascal cases eslint rule to all ts files
No reason to keep this just to core
2026-04-20 16:32:18 -07:00
Rob Lourens
4e3f7dcbe2 Hide 'View Extension' hover action for core chat agents (#311526)
* Hide 'View Extension' hover action for core chat agents

Core agents (e.g. the agent host) register with a placeholder
extension id and have no real extension to view. Skip adding the
'View Extension' hover action when the agent has isCore: true.

Fixes #311510

(Written by Copilot)

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

* Fix TDZ in getChatAgentHoverOptions, defer agent lookup

Some callers construct the hover options before the surrounding
template variable is initialized, so resolving the agent eagerly
hits a TDZ. Make 'actions' a lazy getter so the agent is only
read when the hover is actually shown.

(Written by Copilot)

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

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-04-20 16:30:49 -07:00
Rob Lourens
e0c3dafcdb Reuse PermissionPickerActionItem for agent host auto-approve picker (#311263)
* Reuse PermissionPickerActionItem for agent host auto-approve picker

Previously the agent host had its own custom auto-approve picker that
duplicated most of the workbench PermissionPickerActionItem widget. This
refactor reuses the workbench widget when the active session's
autoApprove session-config property uses the well-known schema (string
type, enum subset of {default, autoApprove, autopilot} containing
'default'). Sessions that match get the workbench widget; non-conforming
agents fall back to the existing generic per-property picker.

- Adds AgentHostPermissionPickerDelegate and a thin
  AgentHostPermissionPickerActionItem subclass that toggles its
  visibility reactively as the active session changes.
- Generalizes the warning/info color rules in chat.css so they live
  with the widget rather than being scoped to .chat-secondary-toolbar.
- Groups all agent-host-only files under
  src/vs/sessions/contrib/chat/browser/agentHost/.
- Fixes a regression where the picker would stay hidden after
  navigating back to the new-chat view; the IActionViewItemService
  factory only runs once per render, so visibility must be reactive
  rather than gated at construction.

(Written by Copilot)

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

* Refactor: agent host reuses PermissionPicker (sessions) instead of PermissionPickerActionItem (workbench)

Both pickers now render in the same context (new-chat-page action bar), so
the previously-needed CSS specificity overrides (icon/font sizing,
padding, color rule un-scoping in chat.css) all go away.

Changes:
- Add IPermissionPickerDelegate to permissionPicker.ts: optional
  currentLevel observable, optional isApplicable observable, setLevel.
- Refactor PermissionPicker to take a delegate. When currentLevel is
  provided, the picker label tracks it reactively. When isApplicable is
  provided, the picker hides itself when false.
- Add CopilotPermissionPickerDelegate (writes through to the active
  CopilotChatSessionsProvider session). Preserves today's behavior.
- Move AgentHostPermissionPickerDelegate to its own file under
  agentHost/, retargeted at the new interface (currentLevel,
  isApplicable, setLevel).
- agentHostSessionConfigPicker.ts now constructs PermissionPicker with
  the agent host delegate and wraps in PickerActionViewItem.
- Delete agentHostPermissionPickerActionItem.ts (the workbench widget
  subclass) and its CSS overrides.
- Revert chat.css warning/info color un-scoping (no longer needed since
  agent host doesn't use the workbench widget anymore).
- Rename the test file to match the new product file. Tests cover the
  delegate's permission-level mapping, isApplicable reactivity, and
  isWellKnownAutoApproveSchema.

(Written by Copilot)

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

* Use PermissionPickerActionItem for ChatInputSecondary, PermissionPicker for NewSessionControl

Restore the contextual split: agent host now uses each widget where it's
expected to render. The new-chat page (NewSessionControl) keeps the
sessions PermissionPicker (matches surrounding sessions pickers); the
running chat widget (ChatInputSecondary) uses the workbench
PermissionPickerActionItem (matches the rest of the chat-input
secondary toolbar that the extension-host CLI already uses).

Both share AgentHostPermissionPickerDelegate. To make the same delegate
satisfy both consumers, rename its members to
currentPermissionLevel/setPermissionLevel (matching the workbench's
IPermissionPickerDelegate).

(Written by Copilot)

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

* Consolidate duplicate AUTO_APPROVE_PROPERTY constant

Both `agentHostPermissionPickerDelegate.ts` and
`agentHostSessionConfigPicker.ts` had identical `'autoApprove'` string
constants (one called `AUTO_APPROVE_SESSION_CONFIG_PROPERTY`, the other
`AUTO_APPROVE_PROPERTY`). Standardize on the shorter name and import it
in the picker. Also drops a now-unused `KNOWN_AUTO_APPROVE_VALUES` set
that was left behind in the picker file. (Written by Copilot)

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

* Address Copilot review comments

- Dispose `onDidChangeProviders` Emitter in delegate test setup so the
  suite-level leak detector is happy. Refactor `setup()` to take the
  leak-tracking store and register all created disposables itself, so
  individual tests don't repeat the boilerplate.
- Fix corrupted JSDoc on `CopilotPermissionPickerDelegate` (sentence
  was mangled across an inline-code span). (Written by Copilot)

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

* Drop redundant `_slot` field from PermissionPicker

The `slot` local in `render()` is in scope for the `autorun` closures, so
storing it on `this` is unnecessary. Removing the field also drops the
needless null-check inside the visibility autorun. (Written by Copilot)

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

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-04-20 16:25:00 -07:00
Rob Lourens
25032cf76e Revert "Don't add agent-host worktree as workspace folder (#310888)" (#311525)
* Revert "Don't add agent-host worktree as workspace folder (#310888)"

This reverts commit f97c287567.

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

* Remove now-unused AGENT_HOST_SCHEME guard

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

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-04-20 16:24:34 -07:00
Matt Bierner
26e2b58a36 Remove old tfidf worker code 2026-04-20 16:16:39 -07:00
Bhavya U
641cbea24b Fix create_file duplicating content when file deleted but doc in memory (#311500) 2026-04-20 15:26:08 -07:00
Don Jayamanne
d52c531dd3 Enhance draft input persistence for remote chat sessions (#311312)
* Enhance draft input persistence for remote chat sessions

* Strip attachments from external session draft input state in metadata

Agent-Logs-Url: https://github.com/microsoft/vscode/sessions/fdcea905-d6d1-42f5-8993-0ead68edb74c

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-20 22:11:51 +00:00
ulugbekna
bc3fee1c7c update jsdoc
Co-authored-by: Copilot <copilot@github.com>
2026-04-21 03:06:02 +05:00
ulugbekna
7382ed6438 nes: refactor: simplify toInlineSuggestion
Co-authored-by: Copilot <copilot@github.com>
2026-04-21 03:06:02 +05:00
Matt Bierner
4920ebc905 Merge pull request #311501 from mjbvz/dev/mjbvz/plain-llama
Don't expose public mutable properties from actionbar
2026-04-20 15:04:27 -07:00
vs-code-engineering[bot]
4aaee5198e [cherry-pick] fix: update presentation logic for ManageTodoListTool invocation (#311494)
Co-authored-by: vs-code-engineering[bot] <vs-code-engineering[bot]@users.noreply.github.com>
2026-04-21 07:46:28 +10:00
Matt Bierner
bef799f103 Don't expose public mutable properties from actionbar 2026-04-20 14:42:20 -07:00
Ben Villalobos
79e5111feb Allow cherry-pick bot PRs in engineering system changes check (#311475)
* Allow cherry-pick bot PRs in engineering system changes check

Add an exception for PRs created by vs-code-engineering[bot] whose title
starts with [cherry-pick] and that carry the cherry-pick-artifact label.

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

* Fetch cherry-pick-artifact label via API at runtime

The label is applied ~2s after PR creation, so the webhook payload may
not include it. Fetch current labels from the API instead, gated behind
cheap event-payload checks to avoid extra API calls on unrelated PRs.

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

* Add label retry loop and consolidate guard expressions

Retry the cherry-pick-artifact label check up to 3 times (2s apart) to
handle the ~2s delay between PR creation and label application.

Consolidate the repeated exception guards into a single 'allowed' step
with a 'blocked' output, simplifying downstream conditions.

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

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-04-20 21:23:32 +00:00
Don Jayamanne
ac1bfe801a feat: add 'kind' property to parent session metadata (#311469)
Co-authored-by: Copilot <copilot@github.com>
2026-04-20 14:22:21 -07:00
Matt Bierner
8f3523f853 Merge pull request #311486 from microsoft/cherry-pick/311474
[cherry-pick] Fix bad modal clipping
2026-04-20 14:20:06 -07:00
Bhavya U
78548e184d Make tool_search visible in the tools picker (#311485)
- Add userDescription and toolReferenceName to tool_search registration
  so it passes the canBeReferencedInPrompt check
- Localize displayName and userDescription with l10n.t()
- Group tool under the 'vscode' toolset
- Remove redundant allowTools gate in agentIntent (already gated by
  models filter on registration and endpoint.supportsToolSearch)
2026-04-20 21:18:10 +00:00
Connor Peet
4fd4618c7e Merge pull request #311472 from microsoft/connor4312/ah-auto-connect
agentHost: auto-connect for tunnels and cached sessions
2026-04-21 07:17:25 +10:00
Connor Peet
7a0f366d3f agentHost: use vacuum into for safer sqlite migration during forking (#311477)
* agentHost: use vacuum into for safer sqlite migration during forking

* comments
2026-04-21 07:17:22 +10:00
Connor Peet
dd50d09337 Merge pull request #311473 from microsoft/connor4312/terminal-nointeract
agentHost: set non-interactive env vars for tool-triggered terminals
2026-04-21 07:17:05 +10:00
Matt Bierner
2b6f58f8e1 Merge pull request #311483 from mjbvz/dev/mjbvz/new-mole
Remove empty dispose overrides
2026-04-20 14:14:25 -07:00
Matt Bierner
da62f68185 Merge pull request #311479 from microsoft/dev/mjbvz/heavy-aardvark
Remove old `MSGestureEvent` based conditional
2026-04-20 13:45:51 -07:00
vs-code-engineering[bot]
30701dbfcd [cherry-pick] Fix bad modal clipping 2026-04-20 20:45:47 +00:00
Peng Lyu
dadeb7c416 no nps survey for agents app (#311478) 2026-04-20 20:45:25 +00:00
Matt Bierner
442a0515b8 Remove empty dispose overrides 2026-04-20 13:41:49 -07:00
Raymond Zhao
8974e74593 chore: bump SDK (#311451)
* chore: bump SDK

* Lower version due to breaking changes
2026-04-21 06:32:26 +10:00
vs-code-engineering[bot]
751ee75ed0 [cherry-pick] Add expand action for question part (#311464)
[cherry-pick] Add expand action for question part

Co-authored-by: vs-code-engineering[bot] <vs-code-engineering[bot]@users.noreply.github.com>
2026-04-20 13:31:32 -07:00
Josh Spicer
fd15d12cea Remove redundant back-to-installed links from MCP/Plugin widgets (#311456)
Leverage the global back arrow button (left of search) to handle
browse-mode exit instead of showing separate 'Back to installed
servers/plugins' links inside each widget.

- Parameterize createBackArrowButton with optional click handler
- For MCP/Plugin sections, exit browse mode on click when active
- Remove backLink DOM element, listeners, and layout accounting
- Remove .mcp-back-link CSS styles
- Add public isInBrowseMode()/exitBrowseMode() to both widgets

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-04-21 06:30:57 +10:00
Matt Bierner
38b3e89910 Remove old MSGestureEvent conditional
I think this only existed in ie/edge?
2026-04-20 13:23:14 -07:00
Hawk Ticehurst
f7bd15603c chat: tighten generated title prompt (#311459)
Refine the title-generation prompt to prefer sentence case and more compact 3-6 word summaries for chat sessions.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-04-20 16:20:42 -04:00
Rob Lourens
a557dbcf64 Await pending session DB writes on agent host shutdown (#311432)
* Await pending session DB writes on agent host shutdown

The agent host server's SIGTERM/SIGINT handler called process.exit(0)
synchronously, abandoning any fire-and-forget SQLite writes that were
in flight (configValues, customTitle, isRead/isDone, diffs). Under CI
load this caused the 'Session Config persistence across restarts'
integration test to  the most recent SessionConfigChanged writeflake
could lose the race against shutdown, leaving the previous value
persisted instead.

Track in-flight writes inside SessionDatabase via a _pendingWrites set
populated by every public mutating method (the outermost wrap is
required so the await this._ensureDb() window is also covered).
SessionDataService aggregates whenIdle() across all live per-session
DBs. The server's shutdown handler now awaits this with a 3s
raceTimeout before disposing.

Removes the await timeout(500) hack the test previously needed.

(Written by Copilot)

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

* Address PR review: close ws server first, simplify whenIdle loop

- Close the WebSocket server before awaiting whenIdle() so no further
  actions can be dispatched during the flush window.
- Simplify SessionDataService.whenIdle(): per-DB whenIdle() already
  drains writes against existing DBs, so the outer loop only needs to
  re-pass when a NEW DB was opened during the await. Comment now
  matches the code.

(Written by Copilot)

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

* Fix Windows: trigger graceful shutdown via stdin close in test

On Windows, child.kill() (SIGTERM) terminates the process unconditionally
without invoking the SIGTERM  so the in-flight setMetadata writehandler
never reaches SQLite and the second phase sees no persisted config at all.
Closing the child's stdin fires process.stdin.on('end', shutdown) on every
platform, exercising the same graceful flush path.

(Written by Copilot)

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

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-04-20 12:51:16 -07:00
Ulugbek Abdullaev
11d49abcbf nes: fix: do not insert spurious trailing newline after suggestion (#311441)
* nes: show how insertion at cursor leaves an unnecessary newline after the suggestion

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

* nes: fix: do not insert spurious trailing newline after suggestion

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

* account for CRLF

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

---------

Co-authored-by: Copilot <copilot@github.com>
2026-04-20 19:31:30 +00:00
Matt Bierner
7f7a471f88 Merge pull request #311449 from mjbvz/dev/mjbvz/educational-egret
Fix some basic eslint errors in copilot
2026-04-20 12:10:31 -07:00
vs-code-engineering[bot]
46656886db [cherry-pick] Hide review button when chat plan is collapsed (#311445)
Co-authored-by: vs-code-engineering[bot] <vs-code-engineering[bot]@users.noreply.github.com>
2026-04-20 19:05:47 +00:00
Hawk Ticehurst
1b82a19e2b sessions: animate active sidebar chat spinner (#311440)
sessions: animate active sidebar chat icons

Render the existing spinning loading icon for in-progress sessions in the sidebar list so active chats match the rest of the sessions app.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-04-20 14:59:57 -04:00
Matt Bierner
110f6f9559 Fix some basic eslint errors in copilot
Starts working through some basic repo wide eslint rules for the copilot extension. Stuff like missing semicolons and missing readonly modifiers for disposables
2026-04-20 11:48:22 -07:00
Raymond Zhao
3aeae51bd2 chore: add copilot tag prefix (#311416)
Co-authored-by: Copilot <copilot@github.com>
2026-04-20 11:17:34 -07:00
Ben Villalobos
3aa6d1dc97 Revert "Update endgame notebook milestones to 1.118.0" (#311409)
Revert "Update endgame notebook milestones to 1.118.0 (#311302)"

This reverts commit 8412c237a3.
2026-04-20 17:10:53 +00:00
Justin Chen
2f08b1e9a9 add hint for chat.permissions.default and agents input fix (#311273) 2026-04-20 16:55:45 +00:00
Ladislau Szomoru
df017eb046 Editor - exploration for layout controls in the editor title (#311007) 2026-04-20 18:48:30 +02:00
Anthony Kim
ef2d27ce59 Merge pull request #311309 from microsoft/anthonykim1/whyAgentLocalShowsUpWithoutSetting
Gate AgentHostTerminalContribution on chat.agentHost.enabled
2026-04-20 09:48:09 -07:00
Vijay Upadya
62fb0f06ae Revert "Add menu toggle for cloud sync in chat panel" (#311392)
Revert "Add menu toggle for cloud sync in chat panel (#311130)"

This reverts commit eafba12c12.
2026-04-20 09:46:14 -07:00
Logan Ramos
f2576e277e Fix model list hover for upgrade scenario (#311399) 2026-04-20 09:45:14 -07:00
vs-code-engineering[bot]
8412c237a3 Update endgame notebook milestones to 1.118.0 (#311302)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-04-20 09:28:33 -07:00
Connor Peet
abdc25ae7b Merge pull request #311129 from microsoft/connor4312/eager-activeclient
agentHost: adopt eager activeClient announcement
2026-04-20 08:58:01 -07:00
Courtney Webster
de172fb30d Merge pull request #311093 from microsoft/territorial-asp
Change close button
2026-04-20 10:54:59 -05:00
Ladislau Szomoru
a6209df8f6 Copilot - add session parentId to metadata (#311366)
* Copilot - add session parentId to metadata

* Fix build

* Fix test
2026-04-20 15:17:04 +00:00
Ulugbek Abdullaev
2212cb295d chat: add "Don't show again" to Autopilot and Bypass Approvals warning dialogs (#311262)
* Add 'Don't show again' to autopilot/bypass approvals warning dialogs

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

* Add developer command to reset chat permission warning dialogs

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

* Always show AutoApprove warning independently of Autopilot

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

* Extract permission storage keys to shared constants module

Move AUTOPILOT_DONT_SHOW_AGAIN_KEY and AUTO_APPROVE_DONT_SHOW_AGAIN_KEY
to chat/common/chatPermissionStorageKeys.ts so both chatDeveloperActions
and permissionPickerActionItem import from a lightweight shared module.
This avoids chatDeveloperActions pulling in heavy widget/UI dependencies
at startup via the permissionPickerActionItem import.

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

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-04-20 17:13:13 +02:00
Ulugbek Abdullaev
197f33eb36 NES: consolidate speculative request cancellation with type-through trajectory check (#310969)
nes: consolidate speculative request cancellation

Introduces SpeculativeRequestManager that owns the lifecycle of NES
speculative requests (the in-flight 'pending' bet on a post-accept
document state, plus the 'scheduled' speculative deferred until its
originating stream completes). All cancellation now goes through one
path with a typed SpeculativeCancelReason logged on the request's
log context, and pairs cancel() with dispose() on the token source
to release listeners.

Adds these cancellation triggers that previously leaked the speculative:

- CacheCleared: clearCache() now cancels in-flight speculatives — they
  would otherwise land into a cache that was meant to be empty.

- DocumentClosed: when a doc is removed from openDocuments, any
  speculative targeting it is cancelled — its cached result could
  never be hit again.

- Disposed: provider dispose now cancels all speculatives.

Also removes the special-case in handleIgnored for the superseded
branch — the trajectory check on the document change that caused the
supersede is the authoritative signal.
2026-04-20 15:01:49 +00:00