* Add archived state management and worktree sharing for chat sessions
- Introduced `archived` property in `ChatSessionMetadataFile` to track archived sessions.
- Updated `IChatSessionMetadataStore` interface to include methods for setting and getting archived state.
- Implemented logic in `ChatSessionMetadataStore` and `MockChatSessionMetadataStore` to handle archived sessions.
- Added `getBlockingSiblingSessionsForFolder` utility to identify sessions that share worktrees.
- Modified CLI chat session commands to respect archived state during session deletion and worktree cleanup.
- Updated tests to cover new functionality and ensure proper behavior of session management.
* Add worktree sharing edge-case unit tests
Co-authored-by: DonJayamanne <1948812+DonJayamanne@users.noreply.github.com>
---------
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
All new UI behavior is under chat.offlikeByok switch (off by default).
This PR turns off sign-in requirement in chat, removes sign-in button and dialog when BYOK models are registered by the user.
* Add completions service and slash command support for Copilot CLI
- Introduced IAgentHostCompletions to expose completions service in AgentService.
- Implemented CopilotSlashCommandCompletionProvider for handling slash commands.
- Enhanced chat input completion handling to support command and skill attachments.
- Updated tests for new completions and command parsing functionality.
* Skip slash command for now
* Disable compact for now.
* 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>
* ignore compact
* Add _meta property to command and skill attachments for metadata preservation
---------
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Flips the default for `chat.freezeCustomizationsIndex` from `false` to `true` so the customizations payload (`<instructions>`/`<skills>`/`<agents>`) is frozen at the first turn of a conversation and reused on subsequent turns, stabilizing the system-prompt prefix for cache reuse.
Persist the protocol client across transport drops. On WebSocket close
or watchdog timeout, install a fresh transport via an optional
constructor-supplied factory and issue a `reconnect` RPC with the
existing clientId, last-seen server seq, and active subscription URIs;
server replies with a replay buffer or fresh snapshots. Outgoing
requests and buffered notifications gate on a DeferredPromise until the
handshake completes, then drain (with dedup of optimistic actions the
server already echoed). State is modeled as a discriminated union so
reconnect-only fields can't leak into other states. Service-layer
surfaces Reconnecting as `connecting` so the UI doesn't flicker.
Workbench owns provisional agent-host session config
Maintain a workbench-side cache of session config on each provisional
entry, seeded by _getInitialConfig() at create time and updated
synchronously by the picker via a new applyConfigChange API. tryRebind
copies straight from this cache instead of reading the agent's
state.config.values, which lags behind by a server roundtrip and was
dropping workbench-seeded defaults (autoApprove, isolation) on the new
backend session. Also tombstones rebound URIs so a stale onDidChange
or post-rebind getOrCreate cannot resurrect the provisional and orphan
a session on the agent.
(Written by Copilot)
Mirrors the core VS Code change that adds common.isAgentsWindow to
workbench common properties, so that extension-emitted telemetry
(RawEventsVSCodeExt) is also tagged when running in the Agents window.
The isSessionsWindow flag is already plumbed through IEnvironment to all
extension host variants, so this only needs the common property added in
extHostTelemetry.
Follow-ups (tracked separately):
- vscode-gdpr-tooling: add common.isAgentsWindow to PROTECTED_PROPERTY_NAMES (if not already covering ext events)
- IcM with data team to classify this common property for RawEventsVSCodeExt
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Avoid reusing a session subscription that previously failed while the backend session was still being created.
- Drops cached Agent Host session subscriptions whose current value is an Error before subscribing again.
- Adds a regression test for the first-send path when a provisional session has a stale failed subscription.
- Lets the existing create-then-subscribe flow recover and sync the initial pending message normally.
(Commit message generated by Copilot)
/search/repositories does not include private repos unless the query is scoped via user:/org: qualifiers. Append the authenticated user's login and their org memberships to the search query so private repos accessible to the permissive token surface in the agents repo picker.
Fixes#309659
For #292379
Instead of new top level fields, let's make it so these are all defined on the priority field like so:
```
priority: {
editor: "default",
diff: "option",
merge: "option"
}
```
This should be more extensible going forward and keeps all the priorities nicely grouped
Adds an end-to-end regression suite (`filterModelsForSession` -> `buildModelPickerItems`) in `chatModelPicker.test.ts` covering the picker visibility rules for models contributed by both the copilot vendor and third-party `languageModelChatProvider` extensions:
- Models with `isUserSelectable` omitted or set to `true` appear in the picker.
- Models with `isUserSelectable: false` are hidden, regardless of vendor.
- The picker matches the model configuration view for third-party models that do not opt out.
Also updates the corresponding `shouldRestoreLateArrivingModel` test in `chatModelSelectionLogic.test.ts` to reflect the new default-to-true semantics for late-arriving models.
Default `isUserSelectable` to `true` in the chat model picker pipeline so that models contributed by third-party `languageModelChatProvider` extensions appear in the picker without requiring the flag to be set explicitly. Only an explicit `false` now hides a model, matching the model configuration view.
The same rule is applied to the copilot vendor pre-filter in `_resolveAllLanguageModels` so the existing comment ('all user selectable unless marked otherwise') finally matches the code.
Affects `filterModelsForSession` and `shouldRestoreLateArrivingModel` in `chatModelSelectionLogic.ts`, and the copilot pre-filter in `languageModels.ts`.
Introduces dedicated endpoint resolver classes (CopilotUtilitySmallChatEndpoint,
CopilotUtilityChatEndpoint) in place of the ModelAliasRegistry indirection, and
republishes the resolved utility endpoints under their new family ids
('copilot-utility-small', 'copilot-utility') as LanguageModelChatInformation
entries so that workbench callers using selectLanguageModels({ vendor: 'copilot',
id: 'copilot-utility-small' }) keep working.
- Renames the internal family identifiers everywhere they're consumed:
callers, tests, and workbench code in src/vs/workbench/contrib/chat/.
- Drops src/platform/endpoint/common/modelAliasRegistry.ts.
- CopilotUtilitySmallChatEndpoint.resolve tries a small primary model and
falls back to a second small model if the primary is unavailable.
- CopilotUtilityChatEndpoint.resolve returns the API-marked default base
model (is_chat_fallback === true), preserving existing behavior.
- Updates _copilotBaseModel field and 'copilot-base' literal in
ModelMetadataFetcher to _copilotUtilityModel / 'copilot-utility'.
No user-facing behavior change. The setting-driven 'disabled'/'default'/BYOK
selector support will be layered on top in a follow-up.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
remove comment
remove code smell
remove more code smell
* tool call events for AH and Claude CLI as well
* consistent ownership
* share definitions
* comment
* Remove Agent Host telemetry changes (split to aamunger/ToolCallTelemetry-AH)
When a terminal instance is disposed while its process is still running,
the process exit event fires after disposal. _onProcessExit then tries
to call _scopedInstantiationService.createInstance() which throws
'InstantiationService has been disposed'. Add an isDisposed check at the
top of _onProcessExit to bail out early when the terminal is already
disposed, since showing notifications for a disposed terminal is
pointless.
Co-authored-by: vs-code-engineering[bot] <122617954+vs-code-engineering[bot]@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
When the network is unavailable, the MCP gallery service's
queryRawGalleryMcpServers method throws an unhandled 'Failed to fetch'
TypeError. This change catches network errors, logs them, and returns
empty results instead of letting the error propagate as an unhandled
error to telemetry.
Co-authored-by: vs-code-engineering[bot] <122617954+vs-code-engineering[bot]@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Bryan Chen <41454397+bryanchen-d@users.noreply.github.com>