* Revert "agentHost: Hook up isRead/isDone (#308107)"
This reverts commit a3d69b7767.
* Revert "agentHost: support connections over tunnels (#307948)"
This reverts commit 75f21d0a8d.
fix: preserve code block toolbar visibility during chat streaming (#255290)
Add JavaScript-based hover tracking to CodeBlockPart so the toolbar
remains clickable through DOM detach/reattach cycles during streaming.
* fix: reset chat mode when switching to session with customAgentTarget
Fixes#307118
When switching from Local to CLI, Ask/Plan modes persisted because:
1. ModePickerActionItem captured customAgentTarget once at construction,
so the dropdown kept showing Local's modes even after switching to CLI.
2. chatInputPart validated the model on session switch but not the mode.
Now the mode picker dynamically evaluates the target on each dropdown
open, and a new checkModeInSessionPool() resets invalid modes to Agent.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* fix: use explicit session type in checkModeInSessionPool
Pass newSessionType directly from the onDidChangeActiveSessionProvider
handler instead of deriving it from the session resource, which may
not yet reflect the newly selected provider.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* fix: dynamically evaluate customAgentTarget in mode picker dropdown
Make the mode picker evaluate the custom agent target each time the
dropdown is opened instead of capturing it once at construction time.
This ensures the correct modes are shown after switching session types.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* 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.
Fixesmicrosoft/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.
Fixesmicrosoft/vscode-internalbacklog#7330
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>
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>
* 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.
Fixesmicrosoft/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).
Fixesmicrosoft/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.
Fixesmicrosoft/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.
Fixesmicrosoft/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.
Fixesmicrosoft/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.
Fixesmicrosoft/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'.
Fixesmicrosoft/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.
Fixesmicrosoft/vscode-internalbacklog#7385
* 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
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>
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).
* 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)
Fixesmicrosoft/vscode-internalbacklog#7377Fixesmicrosoft/vscode-internalbacklog#7384Fixesmicrosoft/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.
Fixesmicrosoft/vscode-internalbacklog#7330