Commit Graph

157390 Commits

Author SHA1 Message Date
Don Jayamanne
d1e403ebbf Add archived state management and worktree sharing for chat sessions (#316561)
* 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>
2026-05-14 22:21:16 -07:00
Vijay Upadya
0b181f5821 Chronicle: fold sub-agent sessions into parent timeline and address session overwrite issue (#316542)
* Chronicle: fold sub-agent sessions into parent timeline and fix session overwrite

* feedback update
2026-05-14 21:45:13 -07:00
Connor Peet
ce8277d567 Merge pull request #316559 from microsoft/connor4312/ahp-soft-reconnect
Soft reconnect for remote agent host protocol client
2026-05-14 21:43:20 -07:00
Dmitriy Vasyura
56582e6155 BYOK: Enable Chat UI for offline scenarios (#316515)
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.
2026-05-14 21:42:49 -07:00
Don Jayamanne
1fbe0acb19 Add completions service and slash command support for Copilot CLI (#316520)
* 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>
2026-05-15 14:30:24 +10:00
Bhavya U
c2e88be2fd Enable chat.freezeCustomizationsIndex by default (#316466)
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.
2026-05-14 21:23:01 -07:00
Paul
b0334a16a0 Handle quota errors for claude CLI (#316310) 2026-05-14 21:18:40 -07:00
Anthony Kim
bdb8a61881 Enable input/output UI for agent host tool calls (#316512)
Better input output UI for agent host tool calls
2026-05-14 21:14:50 -07:00
Connor Peet
c60f31ee3e review 2026-05-14 21:13:17 -07:00
Connor Peet
ca28b2066f Soft reconnect for remote agent host protocol client
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.
2026-05-14 20:55:36 -07:00
Rob Lourens
5a542b854e CCR followup from #316516 (#316527)
Co-authored-by: Copilot <copilot@github.com>
2026-05-14 18:52:01 -07:00
Paul
754406cdf9 Add quota reached message (#316519) 2026-05-14 18:42:13 -07:00
Kyle Cutler
90954aa759 Restyle 'add element to chat' picker (#316522)
* Restyle 'add element to chat' picker

* feedback

* fix
2026-05-15 01:07:25 +00:00
Rob Lourens
933e34f096 Fix AH msbench and extra untitled session creation (#316516)
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)
2026-05-14 16:28:48 -07:00
Vijay Upadya
7b21b8ff11 Enable exp for sessions sync (#316513)
enable exp
2026-05-14 23:23:03 +00:00
Justin Chen
d032b988cf fix tool call and progress part not rendering (#316464)
* fix tool call and progress part not rendering

* address comments
2026-05-14 15:58:45 -07:00
Ben Villalobos
6d58e1120d Add Mocha retries to sanity test runner (#316508) 2026-05-14 22:28:41 +00:00
Paul
bf45fc4450 Await copilot CLI metadata persistence (#316507) 2026-05-14 15:24:16 -07:00
Matt Bierner
0dbae252f5 Merge pull request #316503 from microsoft/dev/mjbvz/rapid-butterfly
Rework custom editor diff/merge contribution points
2026-05-14 15:02:01 -07:00
Don Jayamanne
cb855bd361 feat: implement session customization discovery and bundling for agent host (#316405)
* feat: implement session customization discovery and bundling for agent host

* Avoid duplicate global file-change listeners in customization discovery

Co-authored-by: DonJayamanne <1948812+DonJayamanne@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
2026-05-14 15:01:25 -07:00
Osvaldo Ortega
cab6b4c995 Tag extension telemetry with common.isAgentsWindow (#316497)
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>
2026-05-14 14:36:51 -07:00
Connor Peet
59f7592b5d chat: recover failed agent host subscriptions (#316499)
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)
2026-05-14 14:25:31 -07:00
Osvaldo Ortega
ce2ab59a8a Agents picker: include private repos in search results (#316495)
/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
2026-05-14 14:14:58 -07:00
Paul
9d51c504ef Simplify to manage budget label (#316498) 2026-05-14 21:06:22 +00:00
Matt Bierner
621b650519 Rework custom editor diff/merge contribution points
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
2026-05-14 14:04:58 -07:00
Vritant Bhardwaj
74465a46fc Merge pull request #316469 from microsoft/dev/vritant24/userSelectableModels
Treat `isUserSelectable` as `true` when not set
2026-05-14 12:58:20 -07:00
Anthony Kim
f428e7666b Don't propagate custom pty title/icon updates to the pty host (#316482) 2026-05-14 12:49:17 -07:00
Henning Dieterichs
824ba8c802 Merge pull request #316484 from microsoft/hediet/b/ethical-marlin
Sets virtual clock to a fixed date
2026-05-14 21:49:00 +02:00
Henning Dieterichs
2d03d75c49 Sets virtual clock to a fixed date 2026-05-14 21:22:18 +02:00
Bryan Chen
bdfa14a24b Merge pull request #316479 from microsoft/bryanchen/add-tsa-upload-retry
build: retry TSA upload task
2026-05-14 12:20:13 -07:00
Logan Ramos
5a4bf8b366 Treat EDU sku as EDU plan (#316476)
* Treat EDU sku as EDU plan

* Strings
2026-05-14 19:17:43 +00:00
Vritant Bhardwaj
a2fb803f5c Merge pull request #316467 from microsoft/agents/rename-copilot-utility-models
Rename copilot-fast/copilot-base to copilot-utility-small/copilot-uility
2026-05-14 12:12:30 -07:00
Bryan Chen
fe4fc73d8a build: retry TSA upload task
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-05-14 12:02:06 -07:00
vritant24
0ef1eb45c6 address PR comments 2026-05-14 11:54:53 -07:00
Vritant Bhardwaj
4f5c4a852a Merge branch 'main' into agents/rename-copilot-utility-models 2026-05-14 11:50:15 -07:00
Zhichao Li
49557b25eb Merge pull request #316338 from microsoft/zhichli/ahtrajectory
Agent Host OTel: local SQLite trace store + OTLP forwarder
2026-05-14 11:48:18 -07:00
Paul
64df1ce598 Update limit display condition for enterprise (#316468) 2026-05-14 18:45:52 +00:00
Vritant Bhardwaj
4f8ce47c05 Merge branch 'main' into agents/rename-copilot-utility-models 2026-05-14 11:38:24 -07:00
Vritant Bhardwaj
7ddf59d9f1 Potential fix for pull request finding
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
2026-05-14 11:34:38 -07:00
vritant24
fe539a073b chat: add regression tests for chat model picker isUserSelectable behavior
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.
2026-05-14 11:20:25 -07:00
vritant24
174b002601 chat: treat languageModelChatProvider isUserSelectable as opt-out
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`.
2026-05-14 11:20:10 -07:00
Logan Ramos
a1803b2a0c Fix UBB model details in Copilot CLI (#316452)
* Bump SDK

* fix cli tests and stuff

* Tests plz
2026-05-14 17:47:40 +00:00
Paul
70c1941597 Fix model hover warning CSS (#316458) 2026-05-14 17:38:28 +00:00
vritant24
ef061ccb0f Rename copilot-fast/copilot-base to copilot-utility-small/copilot-utility
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
2026-05-14 10:37:23 -07:00
Aaron Munger
2cd5e1919d tool call events for AH and Claude CLI as well (#316291)
* 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)
2026-05-14 10:33:32 -07:00
Michael Lively
5af4ba5f06 switch to short lived tokens (#316456) 2026-05-14 17:24:48 +00:00
vs-code-engineering[bot]
edf3c9a1bd fix: guard _onProcessExit against disposed terminal instance (fixes #316441) (#316447)
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>
2026-05-14 17:13:21 +00:00
Paul
77c45b33cf Update in-chat message for credit limit (#315135) 2026-05-14 10:12:36 -07:00
vs-code-engineering[bot]
1a2b823d90 fix: handle network errors in MCP gallery query gracefully (fixes #315094) (#315096)
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>
2026-05-14 16:08:58 +00:00
vs-code-engineering[bot]
be263d4ccd fix: handle pending CDP command rejections during debugger detach (fixes #316420) (#316422)
fix: handle pending CDP command rejections during debugger detach

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>
2026-05-14 16:05:04 +00:00