Skip to content

[pull] main from microsoft:main#1336

Merged
pull[bot] merged 29 commits into
code:mainfrom
microsoft:main
Jun 5, 2026
Merged

[pull] main from microsoft:main#1336
pull[bot] merged 29 commits into
code:mainfrom
microsoft:main

Conversation

@pull
Copy link
Copy Markdown

@pull pull Bot commented Jun 5, 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 : )

mrleemurray and others added 29 commits June 5, 2026 12:51
refactor: replace `--vscode-shadow-hover` with `--vscode-shadow-lg` in multiple CSS files

Co-authored-by: mrleemurray <mrleemurray@users.noreply.github.com>
Co-authored-by: Copilot <copilot@github.com>
* Add spacing size variables to theme sizes for consistent layout

Co-authored-by: Copilot <copilot@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: mrleemurray <mrleemurray@users.noreply.github.com>
Co-authored-by: Copilot <copilot@github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Restore the invariant that revealing the editor part also reveals the
auxiliary bar (e.g. opening a file from chat shows the secondary side
bar), but suppress that enforcement while restoring a session's editor
working set on session switch. The working-set reveal is programmatic,
so the session's saved auxiliary bar visibility now wins and a side bar
the user hid for a session stays hidden when returning to it.

Adds the LAYOUT_CONTROLLER.md spec documenting per-session layout state
and links it from LAYOUT.md, README.md, and the sessions skill.

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

* adding prompt completions
* feat: Implement GitHub Pull Request functionality in Agent Host

- Refactor ProtocolServerHandler to delegate changeset operations to AgentService.
- Introduce AgentHostOctoKitService for minimal GitHub REST client operations.
- Add tests for AgentHostPullRequestOperationHandler to validate PR creation and handling.
- Enhance session test helpers with additional Git service methods.
- Create unit tests for AgentHostOctoKitService to ensure correct API interactions.
- Update logging and error handling in various components related to GitHub operations.
- Ensure proper integration of changeset operations in the logging agent connection.

* fix: Remove duplicate import of IAgentService in agentHost files

* feat: Add GITHUB_REPO_PROTECTED_RESOURCE for GitHub repository write operations

* fix: Include changesetKind and changesetUri in PR operation tests for GitHub branches
)

fix(quick-input): improve border visibility for key bindings in light/dark themes

Co-authored-by: mrleemurray <mrleemurray@users.noreply.github.com>
…20077)

* Fix suggest model triggering on disposed inline completions model

The wait inside \`_waitForInlineCompletionsAndTrigger\` snapshotted
\`inlineController.model.get()\` and then subscribed long-term to the
snapshot's \`state\`/\`status\` derived observables. Those derived are
owned only for debug — they are not registered to the model's
\`_store\`, so after the controller swaps or disposes the model
(text model replaced, readOnly toggled, controller disposed) they
keep observing live external dependencies and continue to fire.
That could cause the 750ms timeout to call \`stop()\` on a disposed
model and the autorun to trigger quick suggest spuriously.

Read \`inlineController.model\` as the first dependency of a single
autorun; if it differs from the snapshot, bail out before touching
\`state\`/\`status\`. A single autorun avoids the nested-autorun
ordering hazard (no defined run order between independent autoruns
that share a dependency).
…in smoke tests (#320072)

* fix: support token auth for CLI SDK mock server to enable auto-model in smoke tests

- Add `advanced.debug.overrideAuthType` setting to control HMAC vs token
  auth when overrideProxyUrl is set (default: HMAC for dev, token for tests)
- Update mock server model definitions to match real CAPI response shape
  (family, vendor, version, supported_endpoints, billing, etc.)
- Add `selected_model` to mock `/models/session` response (required by SDK
  auto-mode resolution)
- Add Responses API SSE handler for gpt-5.3-codex which uses `/responses`
  instead of `/chat/completions`
- DRY up mock model definitions with shared `ALL_MODELS` array

* fix: add inspectConfig to test mock for copilotCliAuth and skip the other CLI smoke tests for now

* Don't run in PRs for now
fix: update checkbox border colors for 2026 dark and light themes

Co-authored-by: mrleemurray <mrleemurray@users.noreply.github.com>
Co-authored-by: Copilot <copilot@github.com>
… Lines (#320089)

* nes-datagen: stream large JSON array inputs to avoid 2 GiB readFile limit

Reading the whole input via fs.readFile fails for files larger than 2 GiB
(and exceeds V8's max string length). Add a streaming JSON-array parser and
use it in both the sequential and parallel pipeline paths so multi-GB
recordings can be processed with bounded memory.

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

* nes-datagen: also accept JSON Lines (NDJSON) input

Auto-detect the input format from the first non-whitespace character: a
leading '[' is parsed as a single JSON array, otherwise the file is parsed
as JSON Lines (one JSON object per line). Both formats are streamed so
multi-GB inputs work regardless of shape. Rename streamJsonArray ->
streamJsonRecords to reflect the broader purpose.

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

* nes-datagen: infer JSON vs JSON Lines input format from file extension

Use the file extension (.jsonl/.ndjson -> JSON Lines, otherwise JSON array)
to select the streaming parser instead of sniffing the content.

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

* nes-datagen: validate streamed JSON arrays for truncation and malformed input

The new streaming parser previously accepted any prefix of a JSON array
silently: a truncated file (no closing ']'), a missing element between
commas, a trailing comma or trailing data after the array all produced
zero or fewer records rather than an error. That is especially dangerous
for the multi-GB inputs this parser was introduced for, because the
underlying file is much more likely to be incomplete.

Tighten the state machine to surface these as errors, matching what the
old whole-file JSON.parse would have done, and add tests for each case.

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

* nes-datagen: stream worker-result merging and final output write

For multi-GB inputs the parent process was still hitting V8's ~512 MiB
max-string-length limit in two places after the input-side fix:

1. Merging worker result files used fs.promises.readFile + JSON.parse on
   each result, but with a 5+ GB input split N ways each per-worker file
   is hundreds of MB of similar-shaped data and easily exceeds the
   string limit.
2. writeSamples serialized the entire validSamples array via a single
   JSON.stringify(arr, null, 2) before writing, which has the same
   problem on output.

Switch both to stream over individual records:

- A new shared openWriteStream(filePath) helper wraps fs.createWriteStream,
  attaches an 'error' listener immediately (so async write failures don't
  surface as uncaughtException and skip cleanup), awaits backpressure via
  the per-write callback, and exposes an idempotent close().
- writeChunkFiles uses the helper inside a try/finally so any mid-stream
  ENOSPC/EIO bubbles up cleanly and the tmp dir is still removed.
- The merge step now uses streamJsonRecords<ISample>(resultPath), so the
  parent never materializes a single worker's output as one string.
- writeSamples emits the output JSON array incrementally: per-sample
  JSON.stringify(..., null, 2) (indented two spaces to match the previous
  layout) joined with ',\n'. Byte size is accumulated for the existing
  IWriteResult.fileSize.

Also documents that single-process loadAndParseInput still buffers the
full row set in memory and that --parallelism is required for very large
inputs (workers each only load their slice).

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

* nes-datagen: switch output to JSON Lines

Both the final user-facing output and the per-worker intermediate result
files now use JSON Lines (one record per line) instead of a
pretty-printed JSON array. JSONL is dramatically simpler to write and
read incrementally: no surrounding brackets/commas to track, no
multi-line per-element indentation, just JSON.stringify + '\n' per
record on the write side and split-on-newline + JSON.parse per non-empty
line on the read side (this is what streamJsonRecords already does when
it detects the .jsonl extension).

Changes:
- writeSamples emits one JSON.stringify(sample) + '\n' per validated
  sample via  no array wrapper, no pretty-printing.openWriteStream
- resolveOutputPath defaults the implicit output to <input>_output.jsonl
  (was <input>_output.json).
- Per-worker result files in runInputPipelineParallel are now
  result_${w}.jsonl, so the merge step's streamJsonRecords auto-picks
  the JSONL parser from the extension.
- E2e tests updated to read JSONL (split on newline, JSON.parse per
  line) and to use .jsonl output paths.

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

* nes-datagen: surface worker-result parse errors and update --out help text

Two review follow-ups:

1. The merge step that streams each worker's result file used to wrap
   the iteration in a try/catch that downgraded any parse error to a
   console.error warning. With the new streaming reader that is unsafe:
   streamJsonRecords yields N valid records first and then throws on a
   malformed/truncated tail, leaving those N partial records already in
   allSamples. The pipeline would then quietly emit a truncated
   training-data output. Drop the swallowing try/catch so a corrupt
   worker result aborts the run non-zero.

2. The --out help text in simulationOptions.ts still advertised the old
   JSON-array default (<input>_output.json). Update it to reflect the
   JSONL output, and also note in --input that the format is inferred
   from the .jsonl/.ndjson extension.

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

---------

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

* sessions: inherit active session workspace for new session view

When pressing Ctrl/Cmd+N (or using the New button, mobile titlebar '+'
button, or the sessions quick picker's New Session item) in the Agents
window while a session is already open, the new session view now inherits
the currently open session's workspace instead of defaulting to the
workspace of the last composed new session.

openNewSessionView accepts an optional inheritWorkspaceFromActiveSession
flag; when set and an established session is active, a fresh pending new
session is created for that session's workspace folder. An in-progress
draft for the same workspace is preserved (skipped via the isEqual guard),
and the change falls back to the prior behavior when the workspace cannot
be resolved. Internal callers (restore fallback, archive, background
reseed) keep the previous behavior.

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

* Address Copilot review: clarify no-op docs, document close-session fallback, add draft-preservation test

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

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* fix: update high contrast button border colors for extension actions

* fix: remove unused buttonSecondaryBorder import from extensionsActions

---------

Co-authored-by: mrleemurray <mrleemurray@users.noreply.github.com>
* Skip for now CLI smoke tests

* skip the correct one

* fix typo
* ChatModes: throttle update requests, only fire on change

* 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

* update

---------

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

fix: update hover background colors for 2026 themes and adjust titlebar widget styling

Co-authored-by: mrleemurray <mrleemurray@users.noreply.github.com>
Co-authored-by: Copilot <copilot@github.com>
The session type picker only persisted on manual dropdown selection, so an
auto-selected or defaulted type was never written to storage and reverted to
the first provider by order (Copilot Chat) on reload. It now persists the
active session's {providerId, sessionTypeId} on every change, like any picker.

NewChatWidget no longer pre-validates the stored pick against the folder's
currently-available types in onDidSelectWorkspace (which discarded a valid
preference whose provider had not yet registered). Instead it creates the draft
immediately with the best available provider and upgrades it in place once the
preferred provider registers (driven by onDidChangeSessionTypes), cancelling on
re-pick or send. No timeout or LifecyclePhase give-up, since agent hosts can
connect arbitrarily late.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…on button (#320050)

Align session list action icon buttons with top bar search icon button
Fix issue reporter dropping preset extension data

The new IssueReporterOverlay wizard dropped the `data` payload provided via
`workbench.action.openIssueReporter` when an `extensionId` was also preset.
This broke callers like Copilot's NES feedback flow, which attaches an STest
and recording context via the `data`  that context was silently lostfield
from the resulting issue body.

The constructor calls `updateSelectedExtension(extensionId, /* loadExtensionData */ false)`.
With `loadExtensionData=false`, the existing `applyExtensionIssueData` path
that propagates `data` onto the selected extension and into the model
(`extensionData` + `includeExtensionData`) was never invoked.

Fix: in `updateSelectedExtension`, when `loadExtensionData=false` but the
caller-supplied `this.data` carries `data`/`uri`/`privateUri`, apply it
when `updateExtensionOptions` re-invokes `updateSelectedExtension` after
`updateModel` repopulates `allExtensions`.

Fixes #320101

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
agents: fix Mark as Done on cancelled new chat session (#318550)

When a Mark as Done action was invoked on an uncommitted (NEW) chat
session that had been cancelled mid-flight, the click was a no-op:
the session stayed in the active list and the UI never refreshed.

Root cause: 'CopilotChatSessionsProvider.archiveSession' tried the
agent-host lookup ('_findAgentSession') first. For untitled sessions
that were started via the chat view, an entry already exists in the
agent-host model (registered by 'getOrCreateChatSession' during the
initial chat send) but with providerType 'Local'. That providerType is
filtered out by '_refreshSessionCache', so calling
'agentSession.setArchived(true)' updates the agent-host model in
isolation and never propagates to the chat adapter's '_isArchived'
observable that the UI is bound to.

Fix: reorder the logic in both 'archiveSession' and 'unarchiveSession'
to check the chat-adapter first. If it is a NEW (uncommitted) session,
archive it via the chat adapter and fire 'onDidChangeSessions' so the
UI updates immediately. Only fall back to the agent-host path for
committed sessions (where 'AgentSessionAdapter' is the chat adapter and
'_refreshSessionCache' does propagate the change).

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

* nes: patch: implement prediction formats

* address Copilot review: docs, eager config, rename

- Rewrite PatchModelPrediction JSDoc in conventional style; note line numbers are 0-based

- Skip patchModelPredictionKind experiment lookup when responseFormat is not CustomDiffPatch

- Rename cursorOriginalLinesOffset -> cursorLineInEditWindowOffset on UnifiedXmlInsertContext and its handler
…319803) (#319804)

Reduces 6x redundant getComputedStyle() calls to 1x in the mouse move
hot path. Each call forces a synchronous style recalculation —
caching the result eliminates 5 unnecessary recalculations per
mousemove event over shadow DOM editor content.

No functional change — same properties read, same output, same behavior.

Closes #319803
* Better shrinking of items in browser toolbar

* Potential fix for pull request finding

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

* feedback

---------

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
* Send repoInfo telemetry for each repo in multi-repo workspaces

* Feedback update

* fix test
Refactor session header context menu and rename actions for improved session title editing
…#320007)

Bumps [hono](https://github.com/honojs/hono) from 4.12.18 to 4.12.23.
- [Release notes](https://github.com/honojs/hono/releases)
- [Commits](honojs/hono@v4.12.18...v4.12.23)

---
updated-dependencies:
- dependency-name: hono
  dependency-version: 4.12.23
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…#320109)

The Copilot CLI smoke tests were failing because overrideAuthType was
not set, causing the CLI SDK to use HMAC auth (the default) against the
mock LLM server. The mock server cannot validate HMAC signatures, so
/models calls returned 401, model fetching failed, and prompt rendering
threw "Unexpected generated prompt structure".

Add the missing ['github.copilot.advanced.debug.overrideAuthType', '"token"']
setting to both chatSessions.test.ts and copilotCli.test.ts (matching
what agentsWindow.test.ts already does), and remove the it.skip that
was added as a temporary workaround.

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

* agentHost: narrow Copilot resume fallback to true empty-session errors

The catch block in CopilotAgent._doResumeSession converted *any* -32603
JSON-RPC error from client.resumeSession into a fresh session created with
the same id via client.createSession({ sessionId }). When the underlying
session file fails schema validation (e.g. a session.compaction_complete
event with batchSize: 0, rejected by @github/copilot's schema), this masked
the corruption: the user saw an empty chat instead of an error, and the
original session contents were not surfaced.

Narrow the fallback so we only recreate an empty session when the error
message clearly indicates 'no messages / empty session', and never when the
message looks like corruption / validation / parse failure. All other
-32603s now propagate so the UI and logs reflect the real failure.

Add regression tests that exercise the real _doResumeSession path via a
ResumePathCopilotAgent subclass: one confirming the empty-session fallback
still works, one confirming a corrupted-session error is no longer swallowed.

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

* agentHost: preserve resume fallback for Start Over / truncated sessions

The previous narrowing was too aggressive: it required the SDK error
message to match a small whitelist ('no messages', 'empty session', ...)
to trigger the fallback. But the legitimate empty-session case this
fallback exists for is post-'Start Over' / post-truncateSession, where
the SDK currently surfaces a generic 'no events' message that doesn't
match any of those phrases. The previous version would have regressed
Start Over (user truncates all turns, reopens session, gets a hard
error instead of an empty chat).

Invert the heuristic: treat any -32603 from resumeSession as the
empty-session case (preserving Start Over and any future SDK rewording)
UNLESS the message clearly indicates corruption / schema validation /
parse failure / malformed  those should propagate so the userinput
sees the real error rather than silently getting an empty session.

Refresh tests: add a Start Over / truncated-session test using a
realistic 'returned no events' message, plus an 'unknown -32603'
defensive test; keep the corruption test.

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

* monaco: regenerate monaco.d.ts after folding markers change

PR #312679 (folding markers pattern+flags syntax) removed a doc line
from FoldingMarkers in languageConfiguration.ts but didn't regenerate
src/vs/monaco.d.ts. Picking up the regeneration so the monaco-d.ts
check passes.

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

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* fix: add overrideAuthType=token to CLI smoke tests and re-enable them

The Copilot CLI smoke tests were failing because overrideAuthType was
not set, causing the CLI SDK to use HMAC auth (the default) against the
mock LLM server. The mock server cannot validate HMAC signatures, so
/models calls returned 401, model fetching failed, and prompt rendering
threw "Unexpected generated prompt structure".

Add the missing ['github.copilot.advanced.debug.overrideAuthType', '"token"']
setting to both chatSessions.test.ts and copilotCli.test.ts (matching
what agentsWindow.test.ts already does), and remove the it.skip that
was added as a temporary workaround.

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

* Increase timeouts (reason for failure on Linux)

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@pull pull Bot locked and limited conversation to collaborators Jun 5, 2026
@pull pull Bot added the ⤵️ pull label Jun 5, 2026
@pull pull Bot merged commit 816978a into code:main Jun 5, 2026
2 of 3 checks passed
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.