Skip to content

[pull] main from microsoft:main#1277

Merged
pull[bot] merged 44 commits into
code:mainfrom
microsoft:main
May 20, 2026
Merged

[pull] main from microsoft:main#1277
pull[bot] merged 44 commits into
code:mainfrom
microsoft:main

Conversation

@pull
Copy link
Copy Markdown

@pull pull Bot commented May 20, 2026

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.4)

Can you help keep this open source service alive? 💖 Please sponsor : )

Lefgk and others added 30 commits May 19, 2026 13:15
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The wizard flow opens the reporter before populateReporterDataAsync
completes, so isInstallationPure defaults to true and is never updated
in the overlay's internal model. Add a whenDataComplete promise that
resolves after all async data is populated, and forward the resolved
isInstallationPure value into the wizard via updateModel.

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

Issue reporter wizard

Improves the issue reporting flow so users can create high quality issues directly from VS Code, including screenshots and video recordings
…s providers (#317525)

* sessions: workspace picker emits folder URI, session type picker spans providers

Refactor the new-session workspace picker so it selects only a folder URI
instead of a (providerId, workspace) pair. The session management service
resolves the provider from the URI at session-creation time. The session
type picker now queries the management service for all session types every
registered provider can serve for the folder, grouped by provider with a
separator between groups.

Highlights:

- ISessionsManagementService gains:
  - getSessionTypesForFolder(folderUri): returns one entry per provider x
    sessionType supported for the URI.
  - resolveWorkspaceForFolder(folderUri): finds the first provider that
    can resolve the URI.
  - createNewSession(folderUri, options?): iterates providers and picks
    the first matching one when no providerId is supplied.

- WorkspacePicker:
  - Emits URI | undefined; selectedFolderUri / setSelectedWorkspace(uri).
  - Drops the up-front quick-pick that asked the user to choose between
    multiple local providers when browsing.
  - Recents storage stores URI only (with backward-compat reads of old
    {uri, providerId} entries); recents resolution prefers the stored
    providerId hint so a re-picked folder stays with the same provider.

- SessionTypePicker:
  - Reads getSessionTypesForFolder; groups items by provider with a
    separator between groups and the provider label as a header.
  - Emits IPickedSessionType = { providerId, sessionTypeId } so the same
    sessionType id (e.g. 'copilot-cli') from different providers is
    disambiguated.
  - Recomputes types at open time as a safety net for late-registering
    providers.

- SessionsManagementService._updateSessionTypes now fires
  onDidChangeSessionTypes unconditionally; the previous dedup check
  skipped the event when a new provider contributed an overlapping
  sessionType id, leaving the per-folder list stale.

- LocalAgentHostSessionsProvider drops the `[Local]` suffix from
  workspace labels so its sessions for a folder share the workspace
  group with other providers' sessions for the same folder.

- NewChatViewPane is rewired to the URI flow and uses the picker's
  selectedResolved.providerId as the createNewSession fallback when
  the session type picker has no explicit pick yet, preserving the
  user's historical provider association for recently-picked folders.

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>

* sessions: address CCR feedback — providerId hint + legacy session type pref

- selectWorkspace(folderUri, providerId?) plumbs an explicit providerId
  hint from "New Session" in a workspace section down through the
  workspace picker so the created session matches the section's provider.
- setSelectedWorkspace accepts an options bag with { fireEvent?, providerId? }.
- _readStoredPick now honors legacy storage shapes (raw string sessionTypeId
  and JSON without providerId) as a deferred preference; the provider is
  resolved lazily once the active folder is known.
- New IPreferredSessionType type for stored / restored preferences where
  providerId may be missing; IPickedSessionType remains required-providerId
  for picker emissions.

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

* sessions: rename IFolderSessionType → IProviderSessionType and getSessionTypes → getSessionTypesForFolder

- IFolderSessionType was misleading (implied 'a type for a folder'; it's really a provider × session-type pair)
- ISessionsManagementService.getSessionTypes() collided in name with ISessionsProvider.getSessionTypes() but returned a different type
- Rename to IProviderSessionType and getSessionTypesForFolder() for clarity

Co-authored-by: Copilot <223556219+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>
* Address GHE onboarding issues

* More polish

* Enhance GitHub Enterprise sign-in flow with improved UI state management and input validation

* Use InputBox for GHE onboarding entry

* Implement GHE instance input parsing and validation with unit tests

* Update onboarding button behavior based on user sign-in status

Co-authored-by: Copilot <copilot@github.com>

* Wrap overflow text

* Address PR review feedback

- Fix GHE_DOMAIN_REGEX to allow numbers (consistent with GHE_FULL_URI_REGEX)
- Use inputBox.onDidChange instead of raw DOM 'input' listener
- Remove hardcoded RGBA fallbacks in CSS that break light themes
- Extract duplicate error notification to _notifyEnterpriseSignInError helper
- Clear enterpriseSignInWatch when cancelling via back button or Escape
- Remove redundant .info CSS rule (identical to base rule)
- Add missing test for single-word slug with numbers

* Revert CSS rgba fallbacks, clear enterpriseSignInWatch in _nextStep

- Restore rgba() fallbacks in GHE CSS to match the rest of the file
  (these CSS variables may be undefined in some themes)
- Clear enterpriseSignInWatch in _nextStep when leaving sign-in step
  to prevent StopWatch leak when user clicks GHE then continues
  without signing in

* Address some PR feedback and cleanup listeners

* middle aligned arrow

---------

Co-authored-by: Copilot <copilot@github.com>
Co-authored-by: Logan Ramos <lramos15@gmail.com>
Co-authored-by: Logan Ramos <loganramos@microsoft.com>
Co-authored-by: Elijah King <elijahwilliamking@icloud.com>
#317532)

Add agent (grok build, cursor) and agy (antigravity) CLIs to ignoredCommands

This will turn off sticky scroll when these CLIs are active
Persists enough installed plugin identity for marketplace plugins to survive reloads while keeping installed.json easy for external tools to read.

- Stores plugin name alongside plugin URI and marketplace in installed.json, avoiding full source descriptor persistence.

- Hydrates installed plugin metadata by re-reading marketplace data and matching current entries by stored name.

- Falls back to install URI matching for older entries without names and keeps package/git install URI handling consistent.

- Adds focused coverage for GitHub-sourced marketplace plugins like azure from awesome-copilot.

(Commit message generated by Copilot)
…ptsStorage (#317555)

* add ChatSessionCustomizationItem.source, clean up AICustomizationPromptsStorage

* 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>

* Potential fix for pull request finding

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

* update

* use promptsServiceItemProvider

* update

* update

* update

---------

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
…ixes #317566) (#317576)

When sessionManager.getSession() throws due to a corrupted session file,
catch the error, log it, and return empty history instead of letting the
error propagate as an unhandled rejection.

This follows the same pattern used in sessionReindexer.ts where corrupt
sessions are skipped gracefully.

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: Megan Rogge <meganrogge@Megans-MacBook-Pro.local>
…ilot

Remove copilot models from default list
* fix worktree-created task dispatch

Only dispatch worktree-created tasks for newly-created sessions once a concrete worktree is available. Keep restored sessions from re-running setup tasks on window open while still tracking pending untitled sessions created before the dispatcher starts.

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

* fix worktree task replacement tracking

Avoid wall-clock restored-session checks and only allow committed replacements from still-pending tracked sessions. This prevents restored or already-dispatched sessions from re-running worktreeCreated tasks while preserving pending untitled session dispatch.

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

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
sandy081 and others added 14 commits May 20, 2026 13:34
)

* agents: add smoke test for Agents Window with mocked LLM server

Adds a smoke test that opens the Agents Window, creates a new session
on a workspace folder, sends a 'hello world' prompt, and verifies the
request reaches a local mock LLM server that returns a canned response.

The test exercises two session types: Copilot CLI and Claude Code. A
third Local-session test is included but marked `it.skip` for now.

Key pieces:

* `test/smoke/src/areas/agents/agents.test.ts` — new smoke suite. Starts
  `scripts/chat-simulation/common/mock-llm-server.js` on a random port,
  registers a per-test scenario with a distinct reply, and injects
  `VSCODE_COPILOT_CHAT_TOKEN` / `GITHUB_PAT` / `IS_SCENARIO_AUTOMATION`
  env vars so the Copilot extension's token manager picks up a fake
  token whose endpoints.api/proxy point at the mock server.

* `test/automation/src/agents.ts` — new `Agents` workbench helper with
  `openCurrentFolderInAgentsWindow`, `switchToAgentsWindow`,
  `startNewSession`, `selectSessionType`, `submitNewSessionPrompt`,
  `waitForAssistantText`.

* `test/automation/src/code.ts` + `electron.ts` — `LaunchOptions` now
  accepts an `extraEnv` map that is merged on top of `process.env`
  when spawning the Electron child, so tests can inject env-based mocks
  without going through a custom launcher.

* `src/vs/sessions/browser/sessionsSetUpService.ts` —
  `shouldSkipSessionsWelcome` now returns `true` whenever
  `enableSmokeTestDriver` is set, so the welcome/auth dialog does not
  block smoke runs.

* `scripts/chat-simulation/common/mock-llm-server.js` — adds two
  models to `EXTRA_MODELS` (`gpt-5.3-codex` for Copilot CLI default,
  `claude-sonnet-4.5` for Claude Code), and routes `/v1/messages` to a
  new `handleMessagesApi` that streams Anthropic-format SSE
  (`message_start` / `content_block_delta` / `message_stop`) which the
  Claude Code session type's messages-API parser expects.

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>

* fix copilot cli test

* skip claude test

* sessions: fix new-session removal regression and rename smoke test

1. Revert the `_refreshSessionCache` filter change from d5747b3
   back to `adapter instanceof AgentSessionAdapter`. The broadened
   `adapter !== this._currentNewSession` check raced with the
   unconditional `this._currentNewSession = undefined` in the
   `_sendFirstChat*` paths: a late callback from a previous session's
   commit would wipe the pointer and the next refresh would evict the
   new session's temp adapter, navigating the Agents Window back to the
   homepage mid-request.

2. Rename the Agents Window smoke test infrastructure for clarity:
   - `test/automation/src/agents.ts` -> `agentsWindow.ts`
     (class `Agents` -> `AgentsWindow`,
     `workbench.agents` -> `workbench.agentsWindow`)
   - `test/smoke/src/areas/agents/agents.test.ts` ->
     `areas/agentsWindow/agentsWindow.test.ts`

Verified with 10 consecutive smoke-test loops: 8/10 fully green
(Copilot CLI + Claude + Local), 2 intermittent UI timing flakes
unrelated to the navigation regression.

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

* agents smoke: address PR #317545 review feedback

- switchToAgentsWindow: replace fixed 2s sleep with waitForElement on
  the Agents workbench DOM (`.agent-sessions-workbench`) so the helper
  returns as soon as the new window is interactable.
- resolveElectronConfiguration: apply `extraEnv` last, after the
  TESTRESOLVER_* assignments in the remote branch, so caller-provided
  env vars truly have final precedence.

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

* agents smoke: skip Agents Window tests for OSS quality

The Copilot extension is not built in OSS CI (it's in excludedExtensions
and its dist/extension.js is only produced by its own esbuild pipeline).
Without it all three session-type providers fail to activate, causing
every Agents Window test to time out.

Skip the suite when quality is OSS, matching the pattern used by
setupExtensionTests and setupLocalizationTests.

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

* copilotcli: add proxy endpoint to getAuthInfo for mock server routing

Without `endpoints.proxy`, the SDK's model-fetch calls
(`/models/session`, `/copilot_internal/v2/token`) fall back to
the real GitHub API which rejects the fake HMAC with a 401. This
caused intermittent smoke test failures (1 in 10) because the
Copilot CLI language models never registered, making the chat-setup
readiness gate depend on Claude's model registration timing.

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

* copilotcli: don't cache failed model fetches

When `getAvailableModels` throws (e.g. transient network failure or
HMAC validation error with a proxy), the empty result was permanently
cached in `_availableModels`. Subsequent calls to `getModels()` would
return the cached empty array without retrying, leaving the Copilot CLI
language model provider with zero models for the rest of the session.

Clear `_availableModels` on error so the next call retries the fetch.

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

* agents smoke: reset workspace before opening Agents Window

Earlier smoke test suites (e.g. Tasks) modify .vscode/tasks.json and
leave uncommitted changes. A dirty workspace prevents worktree creation
and triggers the uncommitted-changes confirmation flow which aborts the
Copilot CLI session on builds.

Reset via `git checkout . --quiet` in the before hook, matching the
pattern used by notebook and search smoke tests.

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

---------

Co-authored-by: Sandeep Somavarapu <sandy081@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>
Fixes #316968

Creates a new theme for mermaid diagrams that is derived from the current VS Code color theme
Fix typo in README contributing section
Sessions surfaced by the agent host sessions provider were using the
generic provider icon (`vm` for Local, `remote` for Remote) instead of
the per-agent icon that the matching session type already uses (e.g.
`copilot`, `claude`, `openai`).

Route session adapter and new-session creation through the same
`iconForAgentProvider` lookup that `_syncSessionTypesFromRootState`
uses, so a session's icon always matches its session type.

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

Add granular provider group management actions to Manage Models
Sanity test: tighten agent-mode prompt so the model can't skip the tool call
…etimers

test(mcp): silence sinon FakeTimers native-timer warning in sampling log tests
Add new VS Code theme for mermaid diagrams
@pull pull Bot locked and limited conversation to collaborators May 20, 2026
@pull pull Bot added the ⤵️ pull label May 20, 2026
@pull pull Bot merged commit fb7459a into code:main May 20, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.