Commit Graph

158156 Commits

Author SHA1 Message Date
Anthony Kim 63cbdd5205 Bump 500 mb for Mac dmg (#318670)
Bump 500 mb for mac dmg
2026-05-28 02:59:46 +00:00
Justin Chen b0d10ad25b use pixel spinner for all sessions lists (#318656) 2026-05-27 18:54:26 -07:00
Robo 843588fd83 chore: bump electron 42 header version for msvc compatibility (#318587) 2026-05-28 01:12:00 +00:00
Vijay Upadya d3b895504a Read cloud_session_storage_enabled from /copilot_internal/user instead of /v2/token (#318643) 2026-05-27 18:04:40 -07:00
Kyle Cutler 0ee1ce2107 Refactor browser error page to a feature contribution (#318637) 2026-05-27 17:30:47 -07:00
Rob Lourens c7d320d48e agentHost: dedupe concurrent _resumeSession calls per sessionId (#318636)
* agentHost: dedupe concurrent _resumeSession calls per sessionId

Concurrent _resumeSession(id) callers (e.g. an outdated-config refresh in
sendMessage plus a getSessionMessages subscribe) each constructed a fresh
CopilotAgentSession and ran it through _createAgentSession, whose
this._sessions.set(id, …) on a DisposableMap synchronously disposed the
first entry mid-initializeSession(). The result was a tight loop of
'Trying to add a disposable to a DisposableStore that has already been
disposed' warnings (~550 in one repro) and a half-initialised session
with no event subscriptions — the chat widget opens, but sending a
message goes nowhere.

Fix:
- Add an _resumingSessions: Map<string, Promise<CopilotAgentSession>>;
  _resumeSession is now a thin wrapper that returns the in-flight promise
  when one exists, else delegates to a new _doResumeSession and memoizes
  the promise until it settles.
- Stop registering sessions in _sessions inside _createAgentSession.
  Both callers (_doResumeSession and _materializeProvisional) now set
  _sessions only after initializeSession() succeeds, and dispose the
  freshly-constructed agentSession if it throws. This removes the
  DisposableMap.set footgun that disposed an in-flight entry from under
  its own init.

Adds focused tests for the dedup contract:
- concurrent calls for the same id share one promise + one _doResumeSession
- inflight entry is cleared after resolution (next call re-invokes)
- inflight entry is cleared after rejection (next call retries)
- different ids resolve independently

(Written by Copilot)

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

* agentHost: guard post-init _sessions.set against shutdown race

Address Copilot review on #318636: now that _sessions.set is deferred
until after initializeSession() resolves, an in-flight _resumeSession /
_materializeProvisional whose init resolves AFTER dispose() ->
shutdown() -> super.dispose() has run would call _sessions.set(...) on
a disposed DisposableMap, leaking the session and reproducing the
'Trying to add a disposable to a DisposableStore that has already been
disposed' warning this PR exists to eliminate.

Extract a small _registerInitializedSession helper that bails (dispose
+ CancellationError) when _shutdownPromise is already set, and route
both call sites through it. The provisional path additionally still
removes its created worktree on cancel via the existing catch block.

Add a focused unit test that exercises the helper directly with a fake
session, simulating the shutdown-started state.

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

* launch skill: call out the transpile-client → preLaunch-skips-compile trap

When 'out/' already exists from a prior 'npm run transpile-client',
'node build/lib/preLaunch.ts' will skip 'npm run compile' and you'll
get a launched window whose built-in extensions fail to activate with
'Cannot find module .../extensions/.../out/...'. Document the trap in
both prerequisites and troubleshooting, and add a 'node_modules / npm
install' prereq.

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

* launch skill: tighten compile prereq + sign-in nudge

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

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-05-28 00:06:56 +00:00
Connor Peet cbbe0a9370 Merge pull request #318634 from microsoft/connor4312/ahp-customization-refactor
agentHost: adopt new customization protocol shape
2026-05-27 16:42:51 -07:00
Connor Peet 6c30651491 Merge remote-tracking branch 'origin/main' into connor4312/ahp-customization-refactor
# Conflicts:
#	src/vs/platform/agentHost/node/claude/claudeAgent.ts
2026-05-27 16:12:50 -07:00
Connor Peet 0245c88390 mcp: prefer announced server title for tool prefixes and picker labels (#318638)
* mcp: prefer announced server title for tool prefixes and picker labels

Reworks how MCP tool prefixes are generated and how MCP servers are labelled
in the Configure Tools picker so that the server-announced serverInfo.title
(falling back to serverInfo.name) is preferred over the mcp.json key.

- Introduces a shared McpPrefixGenerator with a 	ake(name): IReference<string>
  API that hands out collision-resolved tool prefixes and releases them on
dispose. Replaces the eager one-shot generator that used to live in
McpService.
- McpServer now derives its tool prefix from its preferred name (announced
title when known, otherwise the mcp.json label) so registry-style names like
io.github.upstash/context7 no longer end up as truncated
mcp_io_github_ups_* prefixes.
- Configure Tools picker and ToolDataSource.classify for MCP sources now
  prefer serverLabel (the announced title) over label .
- Adds unit tests for McpPrefixGenerator covering collisions, slot reuse on
dispose, bucket cleanup, and name sanitization.

Fixes https://github.com/microsoft/vscode/issues/299749
Fixes https://github.com/microsoft/vscode/issues/299787

(Commit message generated by Copilot)

* pr comments
2026-05-27 23:02:21 +00:00
Elijah King 99b24fc22a Merge pull request #318615 from microsoft/copilot/remove-button-focus-borders
Onboarding: make agent feature cards non-interactive on Build with AI Agents step
2026-05-27 17:58:02 -05:00
Benjamin Christopher Simmonds 1c265a4687 Merge pull request #318633 from microsoft/benibenj/expensive-sailfish
Multiple panes improvements
2026-05-28 00:43:28 +02:00
Paul 9f475b05d0 Sync quota snapshots (#318460) 2026-05-27 15:43:16 -07:00
Tyler James Leonhardt 36c57182de Claude agent — Phase 11: customizations / plugins (#318113)
* Claude agent — Phase 11: customizations/plugins

Workbench-pushed customizations (setClientCustomizations /
setCustomizationEnabled) flow through IAgentPluginManager into
Options.plugins for the Claude SDK Query. Server-side
(SDK-discovered) commands / agents / MCP servers are projected as a
single "Discovered in Claude" Open Plugins-conformant on-disk bundle.

Notable design notes:

  - The SDK's Query.reloadPlugins() is parameterless and cannot
    change the plugin URI set after startup, so any client-side
    customization change triggers a yield-restart through the same
    rematerializer path used for client-tool changes. send()'s
    pre-flight runs a single rebind when either toolDiff or
    clientCustomizationsDiff is dirty.

  - SessionClientCustomizationsDiff drives dirty from the model
    state observable (not just enabledPluginPaths), so nonce bumps
    and metadata refreshes at the same URI are detected.

  - setClientCustomizations runs inside the per-session sequencer so
    a fire-and-forget call from AgentSideEffects cannot race a first
    sendMessage.

  - ClaudeSdkCustomizationBundler writes a hashed, content-addressed
    on-disk tree under the plugin manager's basePath. Repeated
    calls with the same SDK snapshot are nonce-stable and skip the
    rewrite. The on-disk tree is intentionally a cross-session warm
    cache.

Tests:
  - New customizations/ test folder mirrors the source structure:
    SessionClientCustomizationsDiff (URI list, nonce, metadata,
    enablement, dirty semantics), projector (client+server merge),
    bundler (write layout, nonce stability, name sanitisation,
    namespacing, delete-on-change).
  - claudeAgent.test.ts: sync-and-toggle dispatch, sequencer
    serialisation, rebind on customizations dirty, mid-turn race
    coverage, swallowed-SDK-snapshot fallback in
    getSessionCustomizations.

* fix: address customizations lint and review feedback

Co-authored-by: TylerLeonhardt <2644648+TylerLeonhardt@users.noreply.github.com>

* test: fix customizations enablement key mismatch

Co-authored-by: TylerLeonhardt <2644648+TylerLeonhardt@users.noreply.github.com>

* Fix Windows path assertions in Phase 11 tests

URI.file('/p/a').fsPath is '\p\a' on Windows, so the literal POSIX
string comparisons fail there. Compute expected via URI.file().fsPath
so the same path round-trip drives both sides of the assertion.

* Phase 11 docs: reflect shipped rebind-always architecture

The original plan described setCustomizationEnabled as defer-and-coalesce
via Query.reloadPlugins() with a tool-set-divergence escalation to rebind.
Council review during PR #318113 verified Query.reloadPlugins() is
parameterless in @anthropic-ai/claude-agent-sdk and cannot change the
plugin URI set captured into Options.plugins at startup, so any client-
pushed customization change ships as a yield-restart through the same
rematerializer path that client-tool changes use.

Rewrites the Phase 11 sections of roadmap.md and phase11-plan.md so the
docs match what was merged. Historical "original plan called for X"
notes preserved for context. Phase 11 marked DONE on the roadmap.

* Claude phase 11: agent picker plumbing + on-disk URIs

- Add IAgent.changeAgent for Claude: pre-materialize stash, post-materialize
  rebind via dirty bit (SDK has no working runtime control to swap agent in
  place — applyFlagSettings({ agent }) exists but doesn't actually swap).
- Thread Options.agent through buildOptions / materialize / rematerializer
  and persist selection in the per-session metadata overlay so resume
  picks it up.
- ClaudeSdkCustomizationBundler now publishes CustomizationAgentRef.uri
  as the on-disk `agents/<name>.md` path (was a synthetic
  `claude-sdk-agent:/` scheme). The workbench customization harness
  needs a real file URI to parse via promptsService.parseNew — without
  it the agents never reached the picker.
- Hide 'general-purpose' (SDK default) from the picker via shared
  CLAUDE_SDK_DEFAULT_AGENT_NAME constant.
- Tests: 3 changeAgent cases (provisional / mid-session rebind /
  clear-to-undefined), bundler agent-URI shape.

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
2026-05-27 15:43:00 -07:00
Connor Peet 8bc3060452 agentPlugins: single source of truth for child customizations
Decompose parsed plugins into their full set of child customizations (agents, skills, prompts/commands, rules, hooks, MCP servers) from a single point of truth in the parser, instead of synthesizing only agents ad-hoc inside the copilot agent.

- Adds protocol-level projection types to the parsed primitives: each parsed agent/skill/rule now exposes a typed customization field, and IParsedHookGroup/IMcpServerDefinition carry their HookCustomization/McpServerCustomization. parsePlugin() mints these at parse time using customizationId-based ids.

- Introduces toChildCustomizations(plugins) in copilotPluginConverters that walks all parsed primitives and emits a deduped ChildCustomization[]. The copilot agent's host/synced/session-discovered resolvers now populate Customization.children via this single helper instead of calling toAgentCustomizations(plugin.agents) ad-hoc.

- Address Copilot review feedback: customizationId now percent-encodes existing '#' and uses a reserved '#range=' suffix so ranged ids cannot collide with URI fragments.

- mockAgent.setCustomizationEnabled now records the opaque id so tests can catch id !== uri regressions.

- Updates pluginParsers / copilotPluginConverters / convertBareEnvVarsToVsCodeSyntax tests to satisfy the new customization-bearing definition shapes; adds a thin test alias for convertBareEnvVarsToVsCodeSyntax that fills in the irrelevant customization stub.

(Commit message generated by Copilot)
2026-05-27 15:40:01 -07:00
Connor Peet 150d40b632 agentHost: adopt new customization protocol shape
Brings the platform and workbench code in line with the reorganized AHP customization types: containers (PluginCustomization, DirectoryCustomization) carry the children (agents, skills, prompts, rules, hooks, MCP servers) discovered inside them.

- Replaces CustomizationRef/SessionCustomization/CustomizationAgentRef with the new Customization tree, plus ClientPluginCustomization for client-published plugins. Adds a customizationId(uri, range?) helper for minting session-unique ids that disambiguate inline manifest declarations.

- Updates IAgent and IAgentPluginManager: getCustomizations/getSessionCustomizations return Customization[]; setClientCustomizations/syncCustomizations take ClientPluginCustomization[]; setCustomizationEnabled now takes the opaque id.

- Reworks copilotAgent's PluginController + SessionDiscoveredEntry around the flat Customization shape with the CustomizationLoadStatus enum and a children array; SessionCustomizationUpdated dispatches the whole entry.

- Restores the legacy plugin-only agentHostCustomizationConfigSchema so existing agent-host-config.json files keep working; entries are lifted into the new Customization container shape at read time by getAgentHostConfiguredCustomizations / toContainerCustomization.

- Renames toCustomizationAgentRefs to toAgentCustomizations; drops the redundant enabled flag on ChildCustomization (children inherit their container's enablement). customAgents.getEffectiveAgents now walks children filtered by CustomizationType.Agent.

- Updates the workbench item provider, active-client service, harnesses, custom-agent pickers, and the remote harness to the new types; toStatusString/toStatusMessage drive UI status off CustomizationLoadStatus.

- Adapts all consumer tests (reducers, agentPluginManager, agentSideEffects, copilotAgent, mockAgent, syncedCustomizationBundler, resolveCustomizationRefs, localAgentHostSessionsProvider, remoteAgentHostCustomizationHarness, agentHostAgents/AgentPicker) to the new shapes.

- Cleans up a stale URI auto-generated import in channels-session/actions.ts.

(Commit message generated by Copilot)
2026-05-27 15:01:37 -07:00
Kyle Cutler dc97685e1b Refactor browser WebContentsView layout into feature contribution (#318627)
* Refactor browser WebContentsView layout into feature contribution

* feedback
2026-05-27 14:59:33 -07:00
BeniBenj cd9b8c778c multiple panes improvements 2026-05-27 23:59:14 +02:00
Peng Lyu dedf92715b Merge pull request #318081 from microsoft/rebornix/fascinating-camel
Add mobile multi-diff view
2026-05-27 14:54:22 -07:00
guomaggie 8544893480 [Search Subagent] Handle context window limit exceeded error (#316529)
* truncate and retry tool calls

* keep visibility of getEndpoint

* address code review comments

* fix ci errors

* address code review comments

* add testing

* address code review comments
2026-05-27 21:50:51 +00:00
Justin Chen 67caeb293c mobile thinking cleanup + icon fix (#318628)
* mobile thinking cleanup + icon fix

* address comments
2026-05-27 14:46:05 -07:00
Elijah King 2dd09eed03 Merge branch 'main' into copilot/remove-button-focus-borders 2026-05-27 16:38:55 -05:00
Elijah King 6418c95ec2 Update src/vs/workbench/contrib/welcomeOnboarding/browser/onboardingVariationA.ts
Co-authored-by: Courtney Webster <60238438+cwebster-99@users.noreply.github.com>
2026-05-27 14:38:44 -07:00
Elijah King a43ae2e8d9 Update src/vs/workbench/contrib/welcomeOnboarding/browser/onboardingVariationA.ts
Co-authored-by: Courtney Webster <60238438+cwebster-99@users.noreply.github.com>
2026-05-27 14:38:34 -07:00
Elijah King 182d43f2e4 Update src/vs/workbench/contrib/welcomeOnboarding/browser/onboardingVariationA.ts
Co-authored-by: Courtney Webster <60238438+cwebster-99@users.noreply.github.com>
2026-05-27 14:38:24 -07:00
Bhavya U 8ed3078d21 Tweak Anthropic Opus prompt routing and tool-search heuristics (#318597) 2026-05-27 13:54:07 -07:00
Vritant Bhardwaj e55a7ac05b Merge pull request #318613 from microsoft/copilot/fix-tooltip-mailto-links 2026-05-27 13:53:00 -07:00
Ulugbek Abdullaev 0c15482d09 copilot: remove leftover code from /tests test-generation codelens (#318609)
Remove leftover code from /tests test-generation codelens

The codelens feature for /tests test generation was removed in
c0eaa94d6a, but related infrastructure remained as dead code:

- ITestGenInfoStorage was never populated (the deleted testGenAction.ts
  was the only writer), so TestFromTestInvocation and Test2Impl always
  took the 'undefined' branch.
- IParserService.getTreeSitterAST().getTestableNode/getTestableNodes
  and the underlying testGenParsing helpers + testableNodeQueries had
  no remaining callers.

Delete the storage service, the parser API, the tree-sitter queries,
and the related tests. The /tests slash command itself is preserved;
`_findLastTest` stays since testFromSrcInvocation.tsx still uses it.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-05-27 20:42:30 +00:00
Vijay Upadya ba999257bb Chronicle cost-tips: scope to interactive VS Code chat with explicit opt-in for other agent surfaces (#318625)
* Chronicle cost-tips: scope to VS Code chat sessions

* add test
2026-05-27 20:30:22 +00:00
Logan Ramos 3345e39e26 More enterprise friendly wording (#318610)
* More enterprise friendly wording

* word smith
2026-05-27 20:26:10 +00:00
Sandeep Somavarapu 6ab81ab35c fix opening session (#318626) 2026-05-27 20:18:27 +00:00
Elijah King 48492791fd Merge branch 'main' into copilot/remove-button-focus-borders 2026-05-27 15:17:20 -05:00
Peng Lyu 6369c6bb53 better tap handling 2026-05-27 13:16:19 -07:00
Elijah King 404261dd12 Merge pull request #318624 from microsoft/copilot/change-inline-suggestions-sentence
Change "Inline suggestions quota reached" to "Inline suggestions limit reached"
2026-05-27 15:13:23 -05:00
copilot-swe-agent[bot] 7d654c37af Update inline suggestions quota message to limit
Co-authored-by: eli-w-king <201316543+eli-w-king@users.noreply.github.com>
2026-05-27 19:47:39 +00:00
Tyler James Leonhardt 2d95154af0 feat: XAA enterprise-managed MCP authentication (ID-JAG) (#318067)
Implements a 3-legged OAuth flow for enterprise-managed MCP servers where
VS Code routes per-resource authentication through a tenant-wide IdP via
ID-JAG (draft-ietf-oauth-identity-assertion-authz-grant) token exchange:

  1. User signs in once to the enterprise IdP (Auth Code + PKCE via the
     existing DynamicAuthProvider base class). The IdP id_token is stored
     in OS secret storage and survives window reload.
  2. The id_token is exchanged at the IdP for a resource-scoped ID-JAG
     assertion (RFC 8693 token exchange, subject_token_type=id_token,
     requested_token_type=id-jag, audience=<resource AS>).
  3. The ID-JAG is redeemed at the resource's authorization server
     (grant_type=urn:ietf:params:oauth:grant-type:jwt-bearer) for a
     resource-scoped access token.
  4. The resource access token is used to call the MCP server.

Surfaces:

- New 'mcp.enterpriseManagedAuth.idp' setting (issuer/clientId/clientSecret),
  delivered via policy (McpEnterpriseManagedAuthIdp). The setting is
  hidden from Settings UI (included: false) but readable/writable by hand
  for local dev. APPLICATION scope so it never syncs.

- New 'enterpriseManaged' flag on MCP HTTP server entries triggers the
  XAA flow instead of per-server Dynamic Client Registration.

- New proposed API 'authSessionAudience' adds optional 'audience' to
  AuthenticationProviderSessionOptions so the XAA provider can receive
  the resource AS URL through the standard session options shape.

- IAuthenticationService grows createOrGetXaaProvider(issuer): registers
  one XAA provider per IdP issuer (shared across enterprise MCP servers).

- Resource-AS client secrets (distinct from IdP client secrets) are stored
  in OS secret storage keyed by (resource indicator, resource client_id)
  and resolved through the existing 'Set Client Secret' codelens above
  oauth.clientId in mcp.json, with a prompt fallback for first run.

Silent re-mint on reload: getSessions reads the persisted IdP session
from base-class secret storage and silently runs legs 2-4 to produce a
resource token without prompting. Only escalates to createSession when
the resource AS needs interactive client-secret entry.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-05-27 12:30:18 -07:00
dileepyavan d10bf32663 Correcting the model family for tool search (#318608)
correcting the model family for tool search
2026-05-27 19:12:14 +00:00
Copilot ee4fd9a1b4 Update sign-in text to specify GitHub Copilot (#318603)
Update sign-in text to specify GitHub Copilot instead of generic AI features/development

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: eli-w-king <201316543+eli-w-king@users.noreply.github.com>
2026-05-27 19:10:52 +00:00
copilot-swe-agent[bot] 4fd26f5edc Fix mailto links in Manage Language Models tooltips
Co-authored-by: vritant24 <13074644+vritant24@users.noreply.github.com>
2026-05-27 19:08:30 +00:00
copilot-swe-agent[bot] b82a21abd2 Make onboarding agent cards non-focusable and rename section
Co-authored-by: eli-w-king <201316543+eli-w-king@users.noreply.github.com>
2026-05-27 19:03:20 +00:00
copilot-swe-agent[bot] fd29833470 Initial plan 2026-05-27 18:52:51 +00:00
Vritant Bhardwaj 3f358676e3 Merge pull request #318575 from microsoft/agents/missing-config-icon-model-picker
Enable 'Manage Models' action in Agent Host Model Picker
2026-05-27 11:49:10 -07:00
dileepyavan 0fd3a3d234 [WindowsSandboxing]: Updated env and commandline for executing commands using pwsh.exe (#318466)
* Exclude MXC SDK catalog manifests from Authenticode checks

* Exclude MXC executables from VersionInfo sanity check

* Exclude MXC bin from VersionInfo sanity check

* investigation

* fixing issue for pwsh execution

* fixing issue for pwsh execution
2026-05-27 11:46:57 -07:00
Kyle Cutler a5dd3ccc12 Fix browser pixel alignment (#318563)
* Fix browser pixel alignment

* clean

* clean
2026-05-27 11:32:58 -07:00
dependabot[bot] de64517971 build(deps-dev): bump tmp from 0.2.4 to 0.2.6 in /extensions/copilot (#318513)
Bumps [tmp](https://github.com/raszi/node-tmp) from 0.2.4 to 0.2.6.
- [Changelog](https://github.com/raszi/node-tmp/blob/master/CHANGELOG.md)
- [Commits](https://github.com/raszi/node-tmp/compare/v0.2.4...v0.2.6)

---
updated-dependencies:
- dependency-name: tmp
  dependency-version: 0.2.6
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-05-27 18:29:48 +00:00
Vritant Bhardwaj c76c3c42fa Merge branch 'main' into agents/missing-config-icon-model-picker 2026-05-27 11:29:41 -07:00
vritant24 cbdbafe14e actually fix agent window 2026-05-27 11:28:28 -07:00
Joaquín Ruales 0d6a34f010 Put Browser Settings in a separate section (#318602) 2026-05-27 18:18:26 +00:00
Don Jayamanne 26835ca487 Implement utilityChatCompletion in CopilotApiService (#318495)
* feat: Implement utilityChatCompletion in CopilotApiService and add integration tests

* fix: Update comments and improve caching logic in CopilotApiService integration tests
2026-05-28 04:03:45 +10:00
Peng Lyu 9f0f92f490 polish border 2026-05-27 10:47:07 -07:00
Rob Lourens ffe6e9afdd Use per-action min-widths for short agent-host pickers (#318502)
Convert the agent-host short-picker set to a map so each picker can have
its own min-width. The tunnel-sharing toggle has no chevron, so it
collapses to 16px instead of 22px.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-05-27 10:45:52 -07:00