Commit Graph

150170 Commits

Author SHA1 Message Date
Anthony Kim
4f24877577 Fix ctrl+v img file path paste in windows powershell (#308097)
* Fix ctrl+v img file path paste in windows powershell

* better

* comment
2026-04-06 20:02:54 -07:00
Courtney Webster
469880ff30 Merge pull request #308044 from microsoft/copilot/start-implementation-copilot-cli-tip
Add Copilot CLI chat tip
2026-04-06 20:49:01 -05:00
Josh Spicer
d50b48b975 chat: add policy for chat.plugins.enabled (#308084)
* chat: add policy for chat.plugins.enabled

Add a managed policy 'ChatPluginsEnabled' to the chat.plugins.enabled
setting so that organizations can control whether agent plugin
integration is enabled.

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

* Update src/vs/workbench/contrib/chat/browser/chat.contribution.ts

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

* Update build/lib/policies/policyData.jsonc

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-06 18:44:33 -07:00
Josh Spicer
4f71da1273 Detect extension-sourced items in provider path for correct grouping (#308115)
* Detect extension-sourced items in provider path for correct grouping

Items from VS Code extensions (under extensions/ directory) were
classified as 'user' storage because _inferStorageAndGroup only
checked workspace folders, plugins, and file: scheme. Now detects
extension install directories by finding 'extensions' in the path
segments and extracting the extension ID from the folder name.
Items from the default chat extension are classified as Built-in;
items from other extensions as Extensions.

This aligns the provider path grouping with how the core (Local)
path handles extension-contributed skills, agents, and other items.

Fixes microsoft/vscode-internalbacklog#7330

* Make built-in and extension items read-only in provider path

Set storage alongside groupKey in _inferStorageAndGroup so that
built-in items (non-file schemes, chat extension) always have
PromptsStorage.extension as their storage. This ensures the
delete action's when-clause correctly hides the trash icon for
read-only items without needing a groupKey fallback hack.

Fixes microsoft/vscode-internalbacklog#7330
2026-04-06 18:33:10 -07:00
Josh Spicer
bda49a1b25 Enable chat.customizations.providerApi.enabled by default (#308116)
Enable chat.customizations.providerApi.enabled by default

Set the default value of 'chat.customizations.providerApi.enabled' to
true and remove the experimental tag, graduating this setting to stable.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-04-07 01:11:23 +00:00
Rob Lourens
62b45362b0 chat: Remove startup revive of chat sessions with pending edits (#308113)
Remove startup revive of chat sessions with pending edits

Remove reviveSessionsWithEdits() and the whenSessionsRevived property from
IChatService. This code eagerly loaded sessions at startup if they had
pending edits, which is no longer needed.

Also removes the modelsKeptAliveOnlyForEdits telemetry metric that was
specific to this revive path. The hasPendingEdits field is kept on the
serialized data and storage index for potential future use.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-04-06 17:58:12 -07:00
Rob Lourens
a3d69b7767 agentHost: Hook up isRead/isDone (#308107)
* agentHost: Hook up isRead/isDone

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

* comments

* Fix build

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

* Fix test

---------

Co-authored-by: Copilot <copilot@github.com>
2026-04-06 17:50:53 -07:00
Josh Spicer
bb14e18d79 ChatSessionCustomizationProvider: fix groupKey, deletion refresh, section visibility, and dropdown UX (#308096)
* Show provider items with custom groupKey in Chat Customizations

Items from external customization providers that use a custom
groupKey (not matching predefined groups like Workspace, User, etc.)
were silently dropped. Dynamically create a group for unknown
groupKeys so the items appear under a collapsible header using
the groupKey as the label.

Fixes microsoft/vscode-internalbacklog#7402

* Refresh list after deleting a customization item

After deleting a file through the Chat Customizations UI, explicitly
refresh the list widget. This ensures the deleted item is removed
immediately even if the provider's onDidChange doesn't fire (e.g.
when the provider doesn't watch the filesystem for changes).

Fixes microsoft/vscode-internalbacklog#7401

* Reset section counts on harness switch to prevent stale flash

When switching between customization harnesses (e.g. Local → Copilot
CLI), reset all section counts to zero immediately before starting
the async count refresh. This prevents stale counts from the
previous harness briefly appearing in the sidebar.

Fixes microsoft/vscode-internalbacklog#7400

* Add tooltip to harness dropdown button in Chat Customizations

Show the active provider's label as a managed hover tooltip on
the harness dropdown button, so long provider names that are
truncated by CSS ellipsis can still be read.

Fixes microsoft/vscode-internalbacklog#7396

* Prevent harness dropdown from jumping when providers register late

Keep the dropdown container in the DOM when the harness selector
setting is enabled, even if only one harness is available. The
visibility is controlled by CSS display:none in updateHarnessDropdown
based on harness count. This prevents the dropdown from being
destroyed and recreated at the wrong position when a provider
registers asynchronously after the editor has already laid out.

Fixes microsoft/vscode-internalbacklog#7398

* Fix focus outline clipping on plugin page buttons

Add margin to focused buttons in the button group to prevent the
focus outline from being clipped by the parent widget's
overflow:hidden. The outline-offset: -1px alone was not sufficient
because the outline still extended to the container edge.

Fixes microsoft/vscode-internalbacklog#7385

* Classify plugin-sourced items correctly in provider path

Items from installed plugins (under agent-plugins directory) were
classified as 'user' storage because _inferStorageAndGroup only
checked workspace folders and file: scheme. Now checks against
IAgentPluginService.plugins URIs to detect plugin-sourced items
and classify them as PromptsStorage.plugin. Also adds Plugin
group to the provider grouping layout so these items appear
under a proper 'Plugins' header instead of 'User'.

Fixes microsoft/vscode-internalbacklog#7330

* Add horizontal padding to search-and-button container for outline room

Restore 2px horizontal padding on .list-search-and-button-container
so the focus outline on the rightmost button has room to render
without being clipped by the parent widget's overflow:hidden.

Fixes microsoft/vscode-internalbacklog#7385
2026-04-07 00:27:33 +00:00
Osvaldo Ortega
910529e09d Sessions: Add #file context completions to new-chat input (#308095)
* Sessions: Add #file context completions to new-chat input

Adds # completions to the sessions NewChatViewPane input editor,
scoped to the workspace selected in the dropdown picker.

- New VariableCompletionHandler registers a completion provider on the
  sessions-chat URI scheme (same pattern as SlashCommandHandler)
- Typing # shows files from the selected workspace via ISearchService
  (local/remote) or IFileService tree walk (virtual filesystems)
- Recent workspace-scoped files from editor history are always shown
- Accepted completions insert #file:<name> text with slash-command-style
  decorations (colored background/foreground, rounded corners)
- Files are also added as attachment pills via NewChatContextAttachments
- Added public addAttachments() method to NewChatContextAttachments

* Review comment

* Address review: fix JSDoc to say #file: for files and folders

* Support folder
2026-04-07 00:27:10 +00:00
Justin Chen
f2199e406c fix overflow issue in chat (#308108) 2026-04-07 00:05:33 +00:00
Ben Villalobos
cf22cdfc96 Allow version bump PRs with package-lock.json changes (#308100)
Extends the bot exception in no-engineering-system-changes to handle
version bump PRs that include package-lock.json alongside package.json.

The previous change (#308090) only allowed single-file package.json
changes. Version bumps also run npm install which updates the lock file.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-04-07 00:04:20 +00:00
Rob Lourens
2bfd243feb agentHost: Simplify SSH relay reconnect with dispose-and-recreate pattern (#308106)
Refactor SSHConnection to use the same dispose-and-recreate pattern as
TunnelConnection instead of the more complex isActiveRelay/replaceRelay
approach.

Key changes:
- Remove isActiveRelay() and replaceRelay() from SSHConnection
- Make _relay readonly (immutable connection objects)
- Add detachSshClient() for ownership transfer during reconnect
- Add removeListener to SSHClient interface for proper cleanup
- Simplify relay close handlers to just call conn.dispose()
- Add try/catch in reconnect to clean up SSH client on failure

Add 18 new unit tests covering relay message routing, multi-host
isolation, SSH close lifecycle, CLI install flow, reconnect failure
cleanup, and listener cleanup across reconnects (33 total, up from 15).
2026-04-06 17:03:39 -07:00
Osvaldo Ortega
66c2fef3d2 Sessions: telemetry fix (#308093) 2026-04-06 16:37:35 -07:00
Josh Spicer
dc5a5460f4 ChatSessionCustomizationProvider testing fixes (#308071)
* Delete individual hooks instead of entire hooks file

When deleting a hook from the Chat Customizations UI, parse the hook
item ID to identify the specific entry within the JSON file. Remove
only that entry and write the file back, instead of deleting the
entire hooks file. If no hooks remain after removal, the file is
deleted.

Also passes the item ID through the action context so the delete
handler can distinguish individual hook entries from whole files.

Fixes microsoft/vscode-internalbacklog#7381

* Throw CancellationError when plugin trust dialog is declined

When the user cancels the trust dialog during plugin installation,
throw a CancellationError instead of silently returning. This allows
the install button's catch handler to properly reset to 'Install'
state instead of incorrectly showing 'Installed'.

Fixes microsoft/vscode-internalbacklog#7378

* Check installed state when rendering marketplace plugin items

When rendering marketplace plugin items in the plugin list, check
whether the plugin is already installed by comparing install URIs
with the agent plugin service's plugin list. Show 'Installed' with
the button disabled instead of offering a redundant install option.

Fixes microsoft/vscode-internalbacklog#7379

* Replace floppy disk icon with newFile icon for create plugin button

The save/floppy disk icon is misleading for a create action. Use the
newFile codicon instead, which better communicates the intent and is
consistent with other create actions in the UI.

Fixes microsoft/vscode-internalbacklog#7373

* Fix plugin page CSS: padding, back button, and focus outlines

- Add padding-bottom to marketplace plugin footer for proper Install
  button alignment (fixes #7377)
- Restyle back-to-installed link as a button with muted foreground
  color and rounded hover background instead of link styling
  (fixes #7384)
- Add outline-offset: -1px to button group buttons to prevent focus
  outline clipping by parent container (fixes #7385)

Fixes microsoft/vscode-internalbacklog#7377
Fixes microsoft/vscode-internalbacklog#7384
Fixes microsoft/vscode-internalbacklog#7385

* Show workspace folder name in provider path for multi-root workspaces

When rendering items from external customization providers (e.g.
Copilot CLI), use the label service to produce workspace-relative
paths for file: URIs instead of bare filenames. This shows the
folder name (e.g. 'tankgame • AGENTS.md') in multi-root workspaces,
matching the core (Local) path behavior.

Fixes microsoft/vscode-internalbacklog#7330
2026-04-06 16:03:04 -07:00
Ben Villalobos
d843b57fb4 Allow vs-code-engineering bot to update version field in package.json (#308090) 2026-04-06 22:57:34 +00:00
Osvaldo Ortega
d15541a5ef Sessions: center approval row (#307676)
* Sessions: center approval row

* Remove old align
2026-04-06 15:36:56 -07:00
Elijah King
27f3ec77a9 Merge pull request #307717 from microsoft/copilot/update-ghe-button-label
Change GHE enterprise sign-in button label from "GHE.com" to "GHE"
2026-04-06 15:31:33 -07:00
Megan Rogge
992a6847a2 make terminal timeout mandatory (#308081)
fixes #308037
2026-04-06 15:11:32 -07:00
Justin Chen
b15c8fd37e fix stuck/stopping thinking parts (#307929)
* fix stuck/stopping thinking parts

* address comments
2026-04-06 14:57:20 -07:00
Megan Rogge
f1c30e9dc2 Fix listener leak from multiple background OutputMonitors on same terminal (#308069) 2026-04-06 21:12:26 +00:00
Megan Rogge
6ad7758ef9 use backticks for sent terminal commands (#308075) 2026-04-06 21:11:19 +00:00
vs-code-engineering[bot]
6c8b1e5763 [cherry-pick] fix padding in solo tool calls (#308077)
Co-authored-by: vs-code-engineering[bot] <vs-code-engineering[bot]@users.noreply.github.com>
2026-04-06 21:03:05 +00:00
Vijay Upadya
493ca793c1 Agent Debug: Use fileLogging.enabled as sole authoritative setting for agent debug logging (#308061)
* Consolidate flag for debug panel

* feedback changes
2026-04-06 13:40:38 -07:00
cwebster-99
59296f8b9e Remove dismiss 2026-04-06 15:19:10 -05:00
Courtney Webster
6db44eaf7e Merge pull request #308038 from microsoft/cli-terminal-ghosttext
Add setting to experiment with Copilot CLI nudge in terminal hint text
2026-04-06 14:52:46 -05:00
Ladislau Szomoru
2fc4c8fd37 Sessions - fix Changes view for cloud sessions (#308058) 2026-04-06 12:37:16 -07:00
Matt Bierner
4a99413ce4 Merge pull request #307758 from mjbvz/dev/mjbvz/safe-crab
Try using anchor positioning for webview
2026-04-06 12:01:21 -07:00
Rob Lourens
07f2e22302 Work around for missing stop button (#307938)
* Work around for missing stop button
For #283328

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

* Simplify to chatSessionHasActiveRequest

---------

Co-authored-by: Copilot <copilot@github.com>
2026-04-06 12:00:05 -07:00
Courtney Webster
294b0e928c Apply suggestion from @cwebster-99 2026-04-06 13:22:54 -05:00
Courtney Webster
b33b59f65a Apply suggestion from @cwebster-99 2026-04-06 13:22:31 -05:00
copilot-swe-agent[bot]
e18868fa4a Add Copilot CLI chat tip to TIP_CATALOG
Agent-Logs-Url: https://github.com/microsoft/vscode/sessions/dfc6122a-8257-416c-965d-d2bd0ed372f7

Co-authored-by: cwebster-99 <60238438+cwebster-99@users.noreply.github.com>
2026-04-06 17:49:23 +00:00
cwebster-99
2430248598 Address code review comments 2026-04-06 12:44:51 -05:00
copilot-swe-agent[bot]
f37fc72eca Initial plan 2026-04-06 17:33:27 +00:00
Megan Rogge
4e5ed5dba9 move bg button registration (#308000)
fix #304828
2026-04-06 17:21:32 +00:00
cwebster-99
c858f3527c Experiment with terminal hint for Copilot CLI 2026-04-06 12:12:39 -05: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