Commit Graph

150132 Commits

Author SHA1 Message Date
Megan Rogge
4e5ed5dba9 move bg button registration (#308000)
fix #304828
2026-04-06 17:21:32 +00:00
Robo
3609a92bb0 feat: register agents to launchservices to allow launch from vscode (#308021)
* feat: register agents to launchservices to allow launch from vscode

* chore: skip stable
2026-04-06 16:47:18 +00:00
Connor Peet
75f21d0a8d agentHost: support connections over tunnels (#307948)
* wip

* clean up unused bits and make auth work correctly

* comments and fixes
2026-04-06 16:14:01 +00:00
Rob Lourens
de4fc2b8a0 Update milestone in notebook (#308016)
Update milestone
2026-04-06 16:11:02 +00:00
Yogeshwaran C
363cc80652 Merge pull request #307996 from yogeshwaran-c/feat/testing-scrollbar-indicators-failing-tests
Add scrollbar indicators for failing tests
2026-04-06 16:08:13 +00:00
Ladislau Szomoru
cf91b8fd29 Sessions - fix sorting of the files (#307915) 2026-04-06 09:04:51 -07:00
Josh Spicer
6c8fcf1806 fix: exempt agent instructions from workspace subpath filter (#307937)
* fix: exempt agent instructions from workspace subpath filter

AGENTS.md, CLAUDE.md, and copilot-instructions.md live at the workspace
root by design. The CLI harness restricts items to workspaceSubpaths
(.github, .copilot, .agents, .claude) which filtered out these root-level
agent instruction files. Now items with groupKey 'agent-instructions' are
exempt from the subpath filter, matching the existing exemption for
instructionFileFilter patterns.

* sessions: include AGENTS.md in instructions listing

The sessions AI customization tree view and overview were only calling
listPromptFiles(PromptsType.instructions) to discover instruction files.
However, AGENTS.md (along with CLAUDE.md and copilot-instructions.md)
is classified as an agent type by getPromptFileType(), so it was never
returned by that call.

Fix by also calling listAgentInstructions() and merging the results
(deduplicating by URI), matching the pattern already used by the
workbench customization editor.

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

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-04-06 02:44:23 +00:00
Josh Spicer
ec038bfa43 fix: customization provider API rendering bugs and sessions window isolation (#307745)
* fix: add sequence counter to loadItems to prevent race conditions

Multiple concurrent loadItems() calls can overlap when autoruns fire
simultaneously. Without serialization, a slow earlier call can resolve
after the correct one and overwrite allItems with stale/empty results.
The sequence counter ensures only the latest call's result is applied.

* fix: add missing onDidChangeInstructions subscription

The list widget subscribed to onDidChangeCustomAgents,
onDidChangeSlashCommands, and onDidChangeSkills but not
onDidChangeInstructions. This meant instruction file discovery
completing after the initial load never triggered a widget refresh.

* fix: re-establish provider onDidChange when harness registers

The autorun that subscribes to itemProvider.onDidChange only read
activeHarness. If the harness ID was persisted from a previous session,
activeHarness never changed when the CLI harness registered, so the
subscription was never set up. Now also reads availableHarnesses to
re-fire when harnesses are added/removed.

* fix: add instruction groups to filterItemsForProvider

filterItemsForProvider only had storage-based groups (local, user,
extension, builtin). Provider-supplied instruction items have semantic
groupKey values like 'context-instructions' and 'on-demand-instructions'
which didn't match any group, causing all instruction items to be
silently dropped (allItems: 0). Add instruction-semantic groups when
the current section is Instructions, matching filterItemsForCore.

* fix: ignore customization provider API in sessions window

The sessions window manages its own harnesses via
SessionsCustomizationHarnessService and the remoteAgentHost
contribution. Extension-contributed harnesses via the provider API
should not be registered in the sessions window.
2026-04-05 18:49:16 -07:00
Justin Chen
46f8d7e9e0 show progress in subagent when uncollapsed (#307928)
* show progress in subagent when uncollapsed

* fix hygiene
2026-04-05 17:10:31 -07:00
Ladislau Szomoru
36c2be7cac Sessions - extract more logic from the view pane (#307911) 2026-04-05 14:17:12 -07:00
Rob Lourens
21cd6ee756 agentHost: Remember and reuse CLI processes for ssh (#307770)
* agentHost: Remember and reuse CLI processes for ssh

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

* fix tests

* comments

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

---------

Co-authored-by: Copilot <copilot@github.com>
2026-04-05 14:16:47 -07:00
Justin Chen
3ef1267f38 make sure warnings in subagent have right padding (#307912) 2026-04-05 19:46:46 +00:00
Justin Chen
d7b1858955 batched confirmations above the input v1 (#307689)
* batched confirmations above the input v1

* fixes and comment addressing

* fix input permanence when editing and hygiene

* fix some comments
2026-04-05 19:22:31 +00:00
Justin Chen
476aed847f thinking content perf improvements (#307878)
* thinking content perf

* cleanup comments

* address comments
2026-04-05 18:56:49 +00:00
Ladislau Szomoru
b8c85f09c7 Session - more code organization (#307903)
* Sessions - extract view model and renderer

* Extract button bar

* Pull request feedback
2026-04-05 10:04:37 -07:00
Ladislau Szomoru
1da74cc029 Sessions - add a resize observer to the title to match the width of the chat part (#307877) 2026-04-05 01:14:29 -07:00
Ladislau Szomoru
8d41591236 Sessions - cleanup context keys (#307843) 2026-04-04 18:12:50 -07:00
Robo
7d74ce04e5 fix: agents launch from cli on windows (#307846) 2026-04-04 20:59:05 +00:00
Ladislau Szomoru
8d7bd011ff Sessions - changes view cleanup (#307836)
* Initial refactoring

* More cleanup

* Even more cleanup

* Pull request feedback
2026-04-04 18:59:38 +00:00
Nick Trogh
12392b3cc5 Fix: close window after generating default keybindings (#307834) 2026-04-04 20:31:24 +02:00
Robo
b77fb98c08 fix: safestorage keychain for renamed agents app (#307831) 2026-04-04 10:29:15 -07:00
dileepyavan
ddd33432b4 Clarify sandbox-first guidance for terminal tool unsandboxing (#307783)
* Clarify sandbox-first guidance for terminal tool

* Refine terminal sandbox schema wording
2026-04-04 02:45:21 -07:00
dileepyavan
b33353e5a1 Ignore file-like domain suffixes in terminal sandbox (#307780)
* Ignore file-like domain suffixes in terminal sandbox

* Handle file-like suffixes for URL and SSH domains
2026-04-04 02:45:17 -07:00
Hawk Ticehurst
a240f2ab95 sessions: use generic sign out confirmation copy (#307727)
* sessions: use generic sign out confirmation copy (#307465)

Allow the shared account sign-out action to accept dialog copy overrides so the Agents app can show a generic confirmation instead of listing extension usage.

Adds a focused test for the override path while preserving the default workbench confirmation behavior.

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

* sessions: scope sign out confirmation to Agents app (#307465)

Keep the Agents-specific sign-out confirmation flow inside the sessions account menu instead of extending the shared authentication sign-out action.

This restores the core workbench auth dialog behavior and limits the copy change to the sessions app surface.

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

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-04-04 00:14:49 -04:00
dileepyavan
28880a6e48 Prefer terminal presentation overrides in chat text (#307777) 2026-04-03 20:40:45 -07:00
Rob Lourens
a24c4fad60 agentHost: Ensure all tests use an in-memory db to reduce flakiness (#307736)
Co-authored-by: Copilot <copilot@github.com>
2026-04-03 19:13:53 -07:00
Rob Lourens
099304243a Revert chatEditingSession change (#307740)
From #304603 since it leads to not rendering parallel edits from Copilot CLI correctly

Co-authored-by: Copilot <copilot@github.com>
2026-04-03 22:59:55 +00:00
Rob Lourens
9cf142023a agentHost: Enable local agent host in sessions app (#307732)
* agentHost: Enable local agent host in sessions app

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

* comments

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

---------

Co-authored-by: Copilot <copilot@github.com>
2026-04-03 15:42:57 -07:00
Rob Lourens
b564ded0d6 agentHost: Validate strings in bash commands (#307699)
Co-authored-by: Copilot <copilot@github.com>
2026-04-03 22:14:07 +00:00
Kyle Cutler
5fa910752d Snapshot browser state before disposal (#307734)
Remember last browser URL before disposal
2026-04-03 22:09:05 +00:00
Kyle Cutler
de4547a2f9 Browser: don't show a loading spinner for in-page navigation (#307728) 2026-04-03 21:40:04 +00:00
Vijay Upadya
51c35484a9 Agent Debug Panel: pagination, incremental filtering, and service optimizations (#307715)
* Agent Debug Panel: pagination, incremental filtering, and service optimizations

* update

* feedback update
2026-04-03 14:33:51 -07:00
Copilot
885fbb64b2 Fix: Clicking settings link in bool setting description incorrectly toggles the checkbox (#298074)
* Initial plan

* Fix clicking on settings link in bool setting toggles the checkbox

When a settings link is clicked in the description of a bool setting,
the MOUSE_DOWN handler was checking if `e.target.tagName === 'a'` to
avoid toggling the checkbox. However, settings links rendered by the
markdown renderer contain an SVG icon inside the `<a>` tag. Clicking
on the SVG makes `e.target` the SVG element (not the `<a>`), causing
the check to fail and incorrectly toggling the checkbox.

Fix by using `targetElement.closest('a')` which traverses up the DOM
tree to detect clicks within any ancestor `<a>` element.

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

* Fix type safety of e.target cast in bool setting MOUSE_DOWN handler

Use `instanceof Element` guard instead of casting to HTMLElement,
since clicks can originate from SVGElement/SVGPathElement. Also guard
against null before calling closest('a').

Co-authored-by: rzhao271 <7199958+rzhao271@users.noreply.github.com>
Agent-Logs-Url: https://github.com/microsoft/vscode/sessions/102850fa-98da-4c19-b23a-414cbe95323b

---------

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-03 21:33:30 +00:00
Kyle Cutler
9b2810be53 Let new browser tabs outlive their parents (#307726) 2026-04-03 21:29:22 +00:00
Connor Peet
b3afb80fdb agentHost: fix editing (#307721)
Some old bad logic here caught up to us
2026-04-03 21:12:16 +00:00
Hawk Ticehurst
6b7e153639 sessions: reduce left sidebar minimum width (#307709)
Lower the sessions sidebar resize floor from 270px to 170px and keep the layout specification in sync with the final sessions app behavior.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-04-03 16:52:33 -04:00
Hawk Ticehurst
36824e3562 sessions: show branch in active session title (#307711)
Append repository detail metadata, or fall back to the worktree folder name, in the sessions titlebar widget so active titles render as 'Title · repo (branch/worktree)'.

Also update the sessions layout spec to document the new title format.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-04-03 16:29:30 -04:00
Hawk Ticehurst
b9d09e3d65 sessions: disable branch picker in folder mode (#307692)
* sessions: disable branch picker in folder mode

Keep the new chat branch picker visible when isolation switches to Folder, but disable it until Worktree is selected again. Also add regression coverage for the folder/worktree toggle and keep the disabled picker cursor consistent on hover.

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

* sessions: remove branch picker hover cursor tweak

Keep the branch picker behavior change, but drop the extra disabled hover cursor styling so the PR only contains the intended picker visibility/disabled-state update.

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

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-04-03 16:01:03 -04:00
Ladislau Szomoru
e2694d78ec Sessions - more cleanup around state management (#307694)
* Sessions - move state computation to the view model

* Remove debug message

* Add back the missing context key
2026-04-03 19:47:09 +00:00
Osvaldo Ortega
3c60b099c3 Sessions: preserve cancelled session content in list (#307684)
* Sessions: preserve cancelled session content in list

When a session is stopped before the agent commits a worktree, keep it
in the sessions list with Completed status instead of removing it. This
lets the user review whatever content the agent produced before
cancellation.

- Use CancellationError in _waitForCommittedSession to distinguish
  cancellation from unexpected failures
- On CancellationError in _sendFirstChat/_sendSubsequentChat, set
  Completed status and fire a changed event instead of removing
- Add tests for committed-then-stopped and cancelled-before-commit flows

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

* Address review: defer CancellationError until timeout, remove unused variable

- Move isCanceled check from the early-exit path to after the 5s
  safety timeout so a late commit event (user stops after worktree was
  initiated but before IPC finishes) is not missed.
- Remove unused changes variable in committed-session test.

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

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-04-03 12:30:48 -07:00
Connor Peet
89d0d1310f agentPlugins: clone locally when in a remote (#303606)
* agentPlugins: clone locally when in a remote

The git extension runs on the remote side, so it's not suitable to use to clone. This just does it directly.

I would kind of like to just take this path in all cases since I previously had to add some internal commands in the git extension. But for now going into next release this only affects the remote case which was previously broken.

Closes #298701

* cleanup

* comments
2026-04-03 12:30:07 -07:00
Rob Lourens
0805547143 agentHost: archive and store archive state for remote agent host sessions (#307677)
* agentHost: archive and store archive state for remote agent host sessions

* stub IStorageService in remote agent host sessions provider tests
2026-04-03 12:29:39 -07:00
Courtney Webster
af760e008d Merge pull request #307643 from microsoft/arbitrary-pike
Remove chat.statusWidget.anonymous setting
2026-04-03 13:43:40 -05:00
Rob Lourens
66639f8c58 chat: add startup telemetry for live chat model counts (#307678)
* chat: add startup telemetry for live chat model counts

After reviving sessions with pending edits at startup, log telemetry
with the number of live chat models, how many are open in widgets,
how many are background-only, and how many are kept alive solely
because they have unaccepted edits.

- Expose whenSessionsRevived promise on IChatService
- Add browser-layer contribution that awaits revival + uses
  IChatWidgetService to classify models without hard-coded strings

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

* address review: error handling, void fire-and-forget, referenceCount check

- Wrap reviveSessionsWithEdits with .catch() to avoid unhandled rejection
- Mark logTelemetry() as void fire-and-forget
- Check referenceCount === 1 for modelsKeptAliveOnlyForEdits

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

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-04-03 18:24:55 +00:00
Paul
20b24833bc Remove debug event attachments (#307544) 2026-04-03 10:58:55 -07:00
Paul
75ef49679c Default ignore skills and slash commands for other session types unless when condition specifies chatSessionType (#307530) 2026-04-03 10:52:24 -07:00
Kyle Cutler
1394fbde3c Fix reasoning effort menu being hidden behind browser (#307670) 2026-04-03 10:42:20 -07:00
Kyle Cutler
46379c39fe Fix error noise on browser tab close (#307674) 2026-04-03 10:35:57 -07:00
Josh Spicer
44b152c72d feat: add plugins to chatPromptFiles API (#307669)
Wire installed agent plugins through the chatPromptFiles proposed API:

- Add ChatPluginResource interface with uri + label
- Add chat.plugins getter and chat.onDidChangePlugins event
- Add IPluginDto and $acceptPlugins to ext host protocol
- Push plugins from mainThread via autorun on IAgentPluginService
- Inject IAgentPluginService into MainThreadChatAgents2
2026-04-03 10:35:00 -07:00
Ladislau Szomoru
3d70aab9a4 Sessions - improve merge skill + a minor fix (#307657) 2026-04-03 09:58:58 -07:00