* Make git blob URIs label friendly
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Avoid duplicate git blob path metadata
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Avoid dash placeholder in agent host URIs
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Revert "Avoid dash placeholder in agent host URIs"
This reverts commit de6579dab9.
* Derive Changes editor description from formatted label
Avoid leaking the agent-host wrapper placeholder for root-level wrapped
git-blob URIs (e.g. vscode-agent-host://local/git-blob/-/hello_count.txt?...)
by formatting the full URI with the existing AGENT_HOST_LABEL_FORMATTER
and deriving the description from the formatted label instead of
calling dirname() on the raw wrapped URI.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Keep real path in agent host URIs; make git-blob paths absolute
Agent host URIs now carry the original scheme/authority/query in a JSON
query and keep the real path verbatim in the URI path. git-blob content
URIs use the absolute working-tree path so the diff 'before' side lines
up with the working-tree 'after' side.
(Written by Copilot)
* Encode agent host URI metadata as a url-safe base64 _ah query param
The original scheme/authority/query were carried as raw JSON in the
query, which collided with other query params (e.g. vscodeLinkType) and
got corrupted by URLSearchParams round-trips. Encode the metadata as a
single url-safe base64 _ah parameter so the query stays a well-formed
parameter list and unrelated params can coexist. Update stale test
expectations to the new label-friendly format.
(Written by Copilot)
* Remove dead scopedPathPrefix machinery from SimpleFileDialog
With label-friendly agent host URIs the URI path is already the real
file path, so the scoped path prefix is always empty. Remove the
computeScopedPathPrefix method, the scopedPathPrefix field, and all the
strip/re-add logic that existed to cope with the old /file/- prefix
format. Delete the test file that only exercised that mechanism; the
URI round-trip is covered by agentHostFileSystemProvider.test.ts.
(Written by Copilot)
---------
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Disable VS Code completions as agent-host backed sessions, provide their own completions via AHP
* Potential fix for pull request finding
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
* Refactor completion provider to remove redundant line in slash command handler
---------
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
modelSupportsToolSearch becomes a denylist: Claude 4.5+ is supported automatically (so new and future families work without a code change), while Haiku and pre-4.5 generations are denied explicitly. The Anthropic prompt resolver routes Sonnet/Haiku explicitly and defaults every other current/future model to the latest general-purpose Opus prompt.
* Cache Explorer: agent filter, per-chunk breakdown, stable rail selection
- Agent filter dropdown in the rail (defaults to panel/editAgent)
- Collapsible per-chunk breakdown table for the prompt signature
- Clicking/arrowing rail turns updates selection in place instead of
rebuilding the rail, fixing focus loss and scroll jump; adds Up/Down nav
* Cache Explorer: preserve rail selection for turns without an id
Agent-filter selection was stored as the turn's optional id, so turns
without an id skipped the restore path and could still jump to an
unrelated turn. Store the turn object instead and match in two passes:
precise id/reference identity first, then a composite fallback for
id-less turns so an earlier look-alike can't win over the exact turn.
* Cache Explorer: address review a11y/perf comments
- Rail rows use role=button, so swap aria-selected -> aria-current (kept in sync in selectTurn and on initial render).
- Agent filter trigger: aria-haspopup=menu instead of generic true.
- Mark decorative chevrons (filter + chunk-breakdown toggle) and the chunk role swatch aria-hidden.
- Chunk breakdown gets table semantics: role table/row/columnheader/cell on header, data, and totals rows.
- moveSelection: drop the per-keypress sort; railRowsByIndex Map iteration already yields rows in visual order.
The ArchiveSessionAction (titled "Mark as Done") was rendered on the
session header toolbar (Menus.SessionBarToolbar) whenever the session
was not archived. Since SessionIsArchivedContext defaults to false, the
action also showed on the new-session view where no session exists yet.
Gate the SessionBarToolbar menu entry with SessionIsCreatedContext so
the action only appears once the session has actually been created.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* sessions: clarify session navigation command naming
Disambiguate the four session navigation commands and surface them
together in the Go menu:
- Add "Go Back One Session" / "Go Forward One Session" tooltips to the
history Back/Forward titlebar actions while keeping the concise
"Go Back"/"Go Forward" menu titles.
- Rename the list-position commands to "Navigate to Previous/Next
Session in List" and add them to the Go menu under a separate group.
Fixesmicrosoft/vscode#320466
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Potential fix for pull request finding
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
* Potential fix for pull request finding
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
---------
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Commit c385fd3 introduced IAgentSessionsService.model.observeSession(...)
calls into the provider-agnostic sessions workbench (sessionsList renderer
and the visible-sessions grid) for lazy loading. IAgentSessionsService is a
Copilot-provider internal and must only be consumed by the Copilot chat
sessions provider.
Revert those observeSession triggers and the IAgentSessionsService
dependency from sessionsList.ts and visibleSessions.ts, and update the
affected tests to assert on provider-agnostic signals (open-promise
resolution / visibleSessions) instead of observation. Remove the now
vestigial IAgentSessionsService stub from the agent feedback test.
To prevent recurrence, add an ESLint no-restricted-imports ban on
**/agentSessions/agentSessionsService scoped to src/vs/sessions/** (the
Copilot provider folder is exempted), and document the rule in SESSIONS.md
and the sessions skill.
Follow-up for re-implementing lazy loading correctly: #320480
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Fix execution subagent model setting being ignored (#320231)
getChatEndpoint(string) regressed in the copilot-utility rename (ef061ccb0f): the string branch only resolved the two utility families and threw 'Unrecognized chat endpoint family' for anything else. The execution and search subagents pass their *.model override (e.g. gemini-3-flash) straight to getChatEndpoint(), so the throw was caught and they silently fell back to the parent model.
Restore arbitrary CAPI family resolution via a new _resolveFamily() that routes utility families to their dedicated resolvers and any other family through getChatModelFromCapiFamily(). Adds a regression test.
* Widen getChatEndpoint to accept CAPI family strings; drop casts
Addresses PR review: the public IEndpointProvider.getChatEndpoint only typed its family parameter as ChatEndpointFamily (the two utility aliases), so valid CAPI families like gemini-3-flash required unsafe casts and the contract was misleading. Introduce ChatModelFamily (utility aliases | any CAPI family string, preserving literal autocomplete) and use it for the public API, removing the casts in the execution/search subagents and the regression test.
* Guard search subagent against non-tool-calling configured models
Council review found the search subagent resolved its configured chat.searchSubagent.model and used it directly, without the supportsToolCalls guard the execution subagent already has. Since this PR makes arbitrary CAPI families resolve (instead of throwing and falling back), a resolvable-but-non-tool-calling search model would run the search subagent with its tools stripped by interceptBody. Mirror the execution subagent: fall back to the parent endpoint when the resolved model can't call tools.
* sessions: sync spec docs with implementation
Audit and update the Agents window (`src/vs/sessions`) specification
documents to match the current implementation, and add the missing
agent host provider spec.
Changes:
- LAYOUT.md: correct grid root orientation (vertical: titlebar on top,
then sidebar + right section), aux bar default 340px, and the
model↔view split (`visibleSessions`, reconcile autorun, focus,
`setActive`, `restoreVisibleSessions` now on `ISessionsViewService`).
- LAYERS.md: document `electron-browser/` as a core directory with its
stricter bootstrap rule; clarify services-layer import rules.
- SESSIONS.md: correct the `ISessionsPartService` surface (7 members);
add the agent host provider to the provider-doc list and folder tree.
- SESSIONS_LIST.md: fix context-key names (`sessionIsArchived`,
`sessionIsRead`, `chatSessionProviderId`) and add
`sessionsViewPane.workspaceGroupCapped`.
- MOBILE.md: fix mobile picker file paths; document previously
undocumented mobile files.
- AI_CUSTOMIZATIONS.md: add newer management-editor files.
- README.md: add agentHost (and localChatSessions) to the provider-doc
table.
- New: contrib/providers/agentHost/AGENT_HOST_SESSIONS_PROVIDER.md —
documents the shared base + local agent host provider (identity,
registration, IDs/URI schemes, draft/graduate send flow, dynamic
session config, pickers, settings, local-vs-remote differences).
Documentation only.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* sessions: document agent host chat content path vs item controller
Clarify that the Agents window does not register an
`IChatSessionItemController` for agent host sessions. The chat widget
loads content and sends purely through `IChatService` + the registered
`IChatSessionContentProvider` (`AgentHostSessionHandler`); the item
controller only feeds the classic chat sidebar list.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* sessions: address code review feedback on spec docs
- LAYOUT.md: fix the layout schematic's column separators to show the
Sessions/Editor/Auxiliary splits; replace the non-existent
`.session-view-centered-content` selector with the real CSS classes
(`.chat-composite-bar.session-header-bar`/`.session-chat-tabs-bar` at
990px and `.interactive-item-container` at 950px).
- LAYERS.md: correct the sessions-core import rule — core may import from
the services layer (it cannot import from contrib).
- AGENT_HOST_SESSIONS_PROVIDER.md: clarify `IAgentHostSessionsProvider`
lives in sessions core (`src/vs/sessions/common/agentHostSessionsProvider.ts`)
and fix the `isAgentHostProvider(provider)` /
`isAgentHostProviderId(providerId)` signatures.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
---------
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Lots of logging for chat smoke tests
* PR test workflows: build extensions/copilot before smoke tests
* PR test workflows: drop duplicate copilot compile from linux/win32 (was already built before integration tests)
* smoke tests: remove musl Claude binary on Linux glibc runner
The musl variant is probed first by @anthropic-ai/claude-agent-sdk and
fails to exec on glibc (ENOENT from missing ELF interpreter), which
caused the Test Claude session tests to time out.
* Enhance customization toolbar chevron visibility and header interaction
* Improve CI Status Widget header styles and update collapsed state handling
Co-authored-by: Copilot <copilot@github.com>
* Update customization toolbar to use medium corner radius for improved styling
Co-authored-by: Copilot <copilot@github.com>
* Update icon color in customization toolbar to use standard foreground color
Co-authored-by: Copilot <copilot@github.com>
* Refactor CI Status Widget styles and update focus border comment for clarity
Co-authored-by: Copilot <copilot@github.com>
---------
Co-authored-by: mrleemurray <mrleemurray@users.noreply.github.com>
Co-authored-by: Copilot <copilot@github.com>
* use risk assesment in general confirmations
* Fix disposable leaks: check isEnabled() before resolving tool in risk badge
The risk-badge factory's isEnabled() guard ran after the call sites'
languageModelToolsService.getTool() lookup. With the feature disabled,
getTool() was still invoked; under the shared component-fixture mock
(which omits getTool), this threw inside the confirmation subpart
constructor, leaving partially-constructed parts unregistered and
reported as leaked disposables.
Move the getTool() lookup into createToolRiskBadge() after the
isEnabled() check, so it is only reached when the feature is on. The
factory now takes languageModelToolsService + toolId, removing the
duplicated lookup and null-check from the terminal, generic, and
elicitation confirmation surfaces.