Commit Graph

158229 Commits

Author SHA1 Message Date
Don Jayamanne
ec2113ee0b fix: update GitHub Copilot version and improve markdown description formatting 2026-05-30 10:17:46 +10:00
Don Jayamanne
bbf6c9fee6 Merge branch 'main' into don/related-rhinoceros 2026-05-29 17:27:33 +10:00
Robo
b0bdc05bbb fix: zip inflate with yauzl on node v24.16.0 (#318682) 2026-05-29 17:01:24 +10:00
Joaquín Ruales
f21118009e Browser: 'Add Area Screenshot to Chat' and 'Add Full Page Screenshot to Chat (Experimental)' (#318791) 2026-05-29 17:01:09 +10:00
Zhichao Li
9b5ca20b6c Merge pull request #318869 from microsoft/zhichli/normalize-response-model
otel: normalize gen_ai.response.model to match request format
2026-05-28 23:52:50 -07:00
zhichli
abe5ee0cec otel: add regression test for -1m-internal variant suffix
Lock in the prefix-normalization behavior for the real-world case
surfaced by trace 395395a, where the server collapsed
'claude-opus-4.7-1m-internal' to 'claude-opus-4-7'.
2026-05-28 23:21:13 -07:00
zhichli
73234b1a68 otel: normalize when response strips a request-only suffix
Extends normalizeResponseModel to also echo the request model when the
canonical response is a less specific prefix of the canonical request.
This handles cases where the server strips a request-only qualifier
(e.g. reasoning effort 'high') and uses '-' punctuation, so request
'claude-opus-4.7-high' and response 'claude-opus-4-7' no longer create
distinct rows when grouping by gen_ai.response.model.
2026-05-28 23:08:43 -07:00
Connor Peet
9fd54367ba Fix WorktreeCreatedTaskDispatcher overfiring (#318241) (#318880)
* Fix WorktreeCreatedTaskDispatcher overfiring on restored sessions (#318241)

Introduce onDidStartSession event to distinguish sessions we just started from sessions that appear in the catalog (via cloud sync, refresh, etc).

Problem:
WorktreeCreatedTaskDispatcher listened to onDidChangeSessions and tried to filter on status=Untitled to identify newly started sessions. This was wrong because:
- Agent-host sessions are never Untitled when arriving via change events (skeleton gets setStatus(InProgress) before firing)
- onDidChangeSessions fires for any catalog change including cloud-synced/restored sessions from other devices
- This caused tasks to run for existing sessions on every sync, not just newly started ones

Solution:
- Add onDidStartSession: Event<ISession> to ISessionsManagementService
- Fire it from sendNewChatRequest after provider.sendRequest() resolves with committed session
- Rewrite WorktreeCreatedTaskDispatcher to listen ONLY to onDidStartSession instead of added/changed events
- This correctly identifies 'sessions we just started locally' vs 'sessions in the catalog'

Changes:
- ISessionsManagementService: add onDidStartSession event
- SessionsManagementService: implement emitter + fire in sendNewChatRequest
- WorktreeCreatedTaskDispatcher: rewrite to use onDidStartSession exclusively
- Tests: comprehensive rewrite with regression test for #318241
- Docs: update SESSIONS.md spec

Fixes #318241

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

* Address Copilot PR review comments on WorktreeCreatedTaskDispatcher (#318880)

Fix 4 issues identified in review:

1. **Autorun synchronous-dispatch leak** (line 79-91):
   - autorun was running synchronously before store.add() completed
   - when conditions were met immediately, it would dispose the store before the autorun was registered
   - Switch to registerAutorunSelfDisposable to ensure the autorun is registered before it can dispose itself

2. **Config default documentation mismatch** (line 18-21):
   - JSDoc claimed setting defaults to false, but chat.contribution.ts sets true
   - Update JSDoc to say 'Defaults to `true`'

3. **Test doesn't reflect new default** (line 258-268):
   - Test 'skips agent host sessions when the setting is disabled (default)' relied on default
   - Now that default is true, explicitly set config to false
   - Remove '(default)' from test name

4. **Stale comment** (line 74-77):
   - Comment still referred to removed 'dispatched' flag
   - Update to describe actual guard (disposing store removes subscriptions)

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-05-28 22:57:47 -07:00
zhichli
663b03272a otel: reuse normalized response model across span, metric, and event
Address Copilot review on #318869:

- chatMLFetcher: compute normalizeResponseModel once and reuse for
  metricAttrs, span attributes, and emitInferenceDetailsEvent so token
  metrics and inference details event stay consistent with the chat span.
- toolCallingLoop: consolidate two getChatEndpoint calls into one and
  drop the misleading 'will be set on response' comment (there is no
  later fallback).
2026-05-28 22:42:56 -07:00
Vijay Upadya
aa8bcda8c6 Chronicle: Support space-form slash subcommands (#318867)
* Chronicle: Support subcommands

* Feedback update

* Lazy-hydrate known prompt slash command names

Defer the initial getPromptSlashCommands() call and onDidChangeSlashCommands subscription until the first hasPromptSlashCommand() call. The previous constructor-time hydration fired during test workspace setup, priming cachedSlashCommands with empty results before mockFiles() registered files, causing 13 PromptsService test failures.
2026-05-29 07:21:15 +02:00
Don Jayamanne
d2f3972e86 fix: enhance CopilotCLISDK test setup with mock package implementation and path import 2026-05-29 15:16:27 +10:00
Don Jayamanne
a50b630d78 fix: add missing linux-test-proxy binaries to CopilotCLI SDK upgrade tests 2026-05-29 15:07:16 +10:00
Rob Lourens
4459d58b54 stop localizing date in prompt (#318675)
* stop localizing date in prompt- fix #309008

* use local date in ISO format - fix #309008
2026-05-28 21:14:22 -07:00
Don Jayamanne
3c0ed4a09d fix: update GitHub Copilot dependency to version 1.0.56-1 2026-05-29 14:07:03 +10:00
Paul
4810972048 Run chat performance pipeline on commit (#318868) 2026-05-28 20:35:17 -07:00
Justin Chen
cc3370ed68 perf improvements on spinner (#318885)
* perf improvements on spinner

* address comments'
2026-05-29 02:36:09 +00:00
Justin Chen
d799cf2006 vscode to agents window handoff (#316565)
* vscode to agents window handoff

* fix plan review stuff in this PR and address some comments

* fix CI

* address more comments, empty workspace

* address comments

* fix sometimes session is not ready yet

* add telemetry and setting

* off by default

* add exp in setting

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
2026-05-28 18:56:57 -07:00
Don Jayamanne
e68f229ab4 fix: improve token handling and user info resolution in CopilotCLISDK 2026-05-29 10:50:33 +10:00
Bryan Chen
4bb3abbbf5 Make Linux desktop sanity tests robust to mid-test failures (#318850)
The Linux desktop sanity tests (deb/rpm/snap) ran cleanup unconditionally
after `testDesktopApp` without a try/finally, so when that step threw
(e.g. extension install flake tracked in microsoft/vscode-engineering#2877)
the uninstall step was skipped. Mocha then retried the test, the install
step hit `package code-insiders is already installed`, and the retry
masked the real failure with a misleading error
(microsoft/vscode-engineering#2878).

Fix:
- Wrap install/test/uninstall in try/finally so cleanup runs even when
  the test body throws.
- Make the uninstall helpers idempotent by detecting whether the package
  binary exists; this lets the finally block run safely even if install
  itself fails (and avoids double-uninstall on the happy path).
- Add a pre-install assertion to each install helper that fails fast
  with a clear diagnostic when the package is already present, so any
  leftover state from a prior killed run surfaces as a real bug pointing
  at the prior failure instead of as a confusing `rpm -i` /
  `dpkg -i` / `snap install` error.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-05-28 16:41:25 -07:00
zhichli
a09e44ba92 otel: normalize gen_ai.response.model to match request format
Anthropic responses echo the same logical model with a different separator
(e.g. request 'claude-opus-4.6' resolves to 'claude-opus-4-6'), causing
GROUP BY / DISTINCT on gen_ai.response.model to produce duplicate rows.

Add normalizeResponseModel(requestModel, responseModel) that echoes the
request value when the two strings only differ in '.' vs '-', and returns
the resolved value unchanged when it adds real specificity (e.g.
'gpt-5.4-mini' -> 'gpt-5.4-mini-2026-03-17'). Wire into the three call
sites that set gen_ai.response.model: chatMLFetcher (chat spans),
toolCallingLoop (foreground invoke_agent), and claudeOTelTracker
(Claude invoke_agent).

Fixes #318805
2026-05-28 16:06:11 -07:00
Rob Lourens
98abbd3140 Bump @github/copilot-sdk to 1.0.0-beta.8 (#318683)
* Bump @github/copilot-sdk to 1.0.0-beta.8 (Written by Copilot)

Also bumps @github/copilot CLI to 1.0.55-3 to satisfy the SDK's
`^1.0.55-1` peer requirement.

Key SDK breaking changes adapted in `src/vs/platform/agentHost/`:

- `CopilotClientOptions`: `useStdio`/`cliPath`/`autoStart` →
  `connection: RuntimeConnection.forStdio({ path })`; `remote` →
  `enableRemoteSessions`.
- `SessionContext.cwd` → `workingDirectory`.
- `CopilotSession.getMessages()` → `getEvents()`,
  `destroy()` → `disconnect()`.
- `PermissionRequest` is now a discriminated union; the host-side
  `ITypedPermissionRequest` is no longer `extends PermissionRequest` but
  a standalone bag-of-optionals interface so existing call sites continue
  to work. Extended host signal with the new `extension-management` /
  `extension-permission-access` kinds.
- `BaseHookInput`: `timestamp: number` → `Date`, `cwd` →
  `workingDirectory`, new required `sessionId`.
- `Tool.handler` is now optional — tests use `tool.handler!(...)`.
- `ToolBinaryResult.type` narrowed to literal `'image' | 'resource'`.
- `AssistantUsageData.copilotUsage` and `ShutdownData.totalPremiumRequests`
  removed; corresponding accumulation/trace code dropped.

Validation: 0 TS errors, layers check passes, all 1357 agent-host unit
tests pass. Real-SDK integration tests: 9/11 passing. Two failures
documented in the session plan:

- plan-mode session-state test times out (likely needs migration of the
  `_enablePlanModeOnClient` shim to the new public
  `SessionConfig.onExitPlanModeRequest`).
- subagent-routing test: `read_agent` now appears on the parent session
  (likely a CLI 1.0.55 behavior change).

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

* Fix broken @github/copilot-win32-x64 entry in remote/package-lock.json

The committed remote/package-lock.json had a malformed stub entry:

  "node_modules/@github/copilot/node_modules/@github/copilot-win32-x64": {
    "optional": true
  }

with no version field, which caused npm install to crash with:

  TypeError: Invalid Version:
      at Node.canDedupe (.../@npmcli/arborist/lib/node.js:1137:32)
      at PlaceDep.pruneDedupable (.../@npmcli/arborist/lib/place-dep.js:426:14)

Replaced with a proper top-level node_modules entry for
@github/copilot-win32-x64@1.0.55-3 (matches the resolution used for
the other platform optionals on the @github/copilot dep). This is what
npm naturally produces when regenerating the lockfile from scratch.

Fixes the failing 'Install dependencies' step on the macOS / Remote
CI job.

(Written by Copilot)

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

* Bump deb amd64 libc6 floor to 2.15 for new @github/copilot runtime.node

The new @github/copilot 1.0.55-3 ships a Linux x64 runtime.node that
references GLIBC_2.15 (was GLIBC_2.14 in 1.0.49). dpkg-shlibdeps now
emits libc6 (>= 2.15) for amd64; update the reference list so the deb
prepare task no longer fails the build.

Only amd64 is affected: arm64 runtime.node GLIBC version set is
unchanged, and @github/copilot does not ship an armhf binary. The
overall libc6 floor for the package is still 2.28, so distro support
is unchanged.

(Written by Copilot)

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

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-05-28 15:50:15 -07:00
Dmitriy Vasyura
f0fd9f0dfb Hide agent distractions in Zen mode (#318848)
* Hide agent distractions in Zen mode (#318695)

* PR feedback
2026-05-28 22:04:21 +00:00
Justin Chen
93b3566089 fix aquarium regression from sessions grid (#318851)
* fix aquarium regression from sessions grid

* Potential fix for pull request finding

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

---------

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
2026-05-28 22:03:46 +00:00
Courtney Webster
d6368652ba Merge pull request #318841 from microsoft/hon-beaver
Fix EDU model upsell mapping
2026-05-28 16:59:56 -05:00
Raymond Zhao
49d14f8afc chore: npm audit fix (#318614)
* chore: npm audit fix

* Remove merge conflict

* chore: bump build
2026-05-28 21:53:33 +00:00
Osvaldo Ortega
481ec0b9b0 Tasks API events pagination (#318852) 2026-05-28 21:44:03 +00:00
Tyler James Leonhardt
8021a4290e Make sure permission modes are correct across chat kinds for Claude ext host (#318847)
* Make sure permission modes are correct across chat kinds for Claude ext host

* Allow yolo in Agents window for Claude welcome chat
* Allow auto mode in Agents window for Claude chat sessions

* feedback
2026-05-28 21:37:17 +00:00
cwebster-99
3f809b7dc9 Fix isPro reference in chatModelPicker 2026-05-28 16:09:38 -05:00
Courtney Webster
a5f0a9ba40 Merge branch 'main' into hon-beaver 2026-05-28 15:26:02 -05:00
Logan Ramos
e7cc101fb3 Fix quota info surrounding has quota being false when there is org usage left (#318831) 2026-05-28 20:13:27 +00:00
cwebster-99
ca7afda3d5 EDU model upsell 2026-05-28 15:09:24 -05:00
Dmitriy Vasyura
f08b0cab72 Revert "Restore editor.quickSuggestions.other default to 'on' (#318789)" (#318814)
This reverts commit fb72b9be76.
2026-05-28 18:53:50 +00:00
Vritant Bhardwaj
a6ccde1305 Merge pull request #318809 from microsoft/agents/create-a-unit-teat-to-repro-this-issue-4d3ce7a3
Fix HTTP 400 for BYOK Open Router reasoning models
2026-05-28 11:38:22 -07:00
Vritant Bhardwaj
d244434425 Merge branch 'main' into agents/create-a-unit-teat-to-repro-this-issue-4d3ce7a3 2026-05-28 11:04:40 -07:00
vritant24
c222833599 byok: address review feedback for reasoning fields
- Complete the trailing comment documenting the reasoning / reasoning_content fields.
- Correct field-ownership comments in thinking.ts (reasoning_content is DeepSeek/Kimi/Minimax; reasoning is OpenRouter).
- Add SSE stream-parsing regression tests for the reasoning_content and reasoning delta field names.
2026-05-28 11:03:56 -07:00
Osvaldo Ortega
d53d505759 Render cloud task history from typed session events (#318646)
* CAPI package update

* Missindg updates

* Missing lock

* Render cloud task history from typed events

- Extract shared session-event-to-chat-parts renderer into
  chatSessions/common/sessionEventRenderer.ts so both the Copilot CLI
  and Cloud Tasks providers produce identical tool/text formatting.
- Render Task API history via the shared renderer, remapping
  custom_agent.* to the equivalent subagent.* names so tool cards,
  bash terminal output, edits, search results, MCP results and
  subagent groups all render the same way they do in the CLI.
- Match github.com/github/github-ui presentation by suppressing
  intermediate assistant.message events that echo tool input/output
  and only rendering the final summary message per turn.

* Address review: break circular dep & restore flush timing

- Inject CLI tool-event handlers (processStart/processComplete/
  enrichSubagent/isEditToolCall/getEditedUris) into the shared
  renderer via a ToolEventHandlers<T> bundle, so common/sessionEventRenderer
  no longer imports from copilotcli/. Layering now only flows one way.
- Flush buffered assistant.message_delta chunks at the top of the
  CLI loop for non-message events so the session.model_change /
  assistant.usage guards see streamed text exactly the way the
  pre-extraction code did.

* Missing lock changes

* Revert unintended copilot package manifest edits

* Revert unintended root package manifest edits

* remote package revert

* lock

---------

Co-authored-by: Dmitriy Vasyura <dmitriv@microsoft.com>
2026-05-28 10:59:15 -07:00
Bryan Chen
7c3a00e043 Improve install extension failure diagnostics in sanity test (#318792)
Recurring transient failures of the desktop-linux-arm64 sanity test
surface only as 'Failed to install extension after 3 attempts' with no
context. This makes diagnosis hard.

- Carry the last per-attempt failure message into the final thrown error
- Capture a screenshot on each failed install attempt
- Log any visible Marketplace message during failed install attempts
- Add a 5s backoff between install retries

Refs microsoft/vscode-engineering#2877

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-05-28 10:59:00 -07:00
Vritant Bhardwaj
e0de999a95 Merge branch 'main' into agents/create-a-unit-teat-to-repro-this-issue-4d3ce7a3 2026-05-28 10:53:53 -07:00
vritant24
f6bf90fde7 byok: echo reasoning back to thinking models on Chat Completions
Fixes #312746. DeepSeek / Moonshot (Kimi) / Minimax and OpenRouter reject the turn after a tool call with HTTP 400 unless the assistant message replays its reasoning. OpenAIEndpoint now emits reasoning_content and reasoning (alongside cot_id / cot_summary) on the Chat Completions path, gated on the model's thinking capability so non-reasoning endpoints are unaffected.
2026-05-28 10:45:05 -07:00
vritant24
a21f814ced thinking: support reasoning_content and reasoning fields
Add reasoning_content (DeepSeek / Moonshot (Kimi) / Minimax) and reasoning (OpenRouter) to ThinkingDataInMessage and RawThinkingDelta, and read them when extracting reasoning text from responses.
2026-05-28 10:44:51 -07:00
Ulugbek Abdullaev
db8b674826 sessions: scope chat "card style" to chat panel and chat editor only (#318712)
The rules at `.agent-sessions-workbench .interactive-session
.interactive-item-container`, `> .chat-suggest-next-widget`, and
`.interactive-input-part` used to apply to every chat surface inside the
Agents window. That includes surfaces that reuse the chat widget
components but do not want the 950px-wide centered "card" layout
notably the terminal inline chat (Ctrl/Cmd+I in terminal), the editor
inline chat (Ctrl/Cmd+I in an editor), and the agent-session hover
widget. In those surfaces the items got centered with a 950px max-width
which left empty space on the left and overflowed on the right.

Scope the three rules to `.part.sessionspart` and `.chat-editor-relative`,
the two surfaces that actually want the card layout. With the narrowed
needed (no competing rules at the target selectors) and have been
removed.

Verified via CDP-injected test DOM against the running Agents window:

- `.part.sessionspart` -> max-width 950px, auto-centered (preserved)
- `.chat-editor-relative` -> max-width 950px, auto-centered (preserved)
- `.terminal-inline-chat` -> max-width none, margin 0 (fixed)
- `.zone-widget.inline-chat-widget` -> max-width none, margin 0 (fixed)
- `.agent-session-hover` -> max-width none, margin 0 (fixed)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-05-28 19:23:59 +02:00
dependabot[bot]
97dfdd4d6f build(deps): bump tmp from 0.2.4 to 0.2.6 in /test/automation (#318673)
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: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-05-28 17:03:16 +00:00
Dmitriy Vasyura
fb72b9be76 Restore editor.quickSuggestions.other default to 'on' (#318789)
Reverts the default change made in #316900 which set the default of editor.quickSuggestions.other to 'offWhenInlineCompletions'. When Copilot inline completions are active, that default suppresses the suggest widget for snippet, IntelliSense and emmet completions and disrupts IME composition.

Fixes #317916

Fixes #318380

Fixes #318549

Fixes #318735

Fixes #318522

Fixes #317863

Fixes #318694

Fixes #314220
2026-05-28 16:51:00 +00:00
Christof Marti
e4896fd385 Pass sandbox configuration to the SDK (#317981) 2026-05-28 18:45:13 +02:00
Martin Aeschlimann
3027216455 improve copilot AH customization discovery (#318745)
* improve copilot AH customization discovery

* write results as IDiscoveredDirectory
2026-05-28 16:41:00 +00:00
Federico Brancasi
8a08264fe4 Merge pull request #318743 from microsoft/fb/copilot-image-dimensions
Log aggregate input image dimensions for Copilot telemetry
2026-05-28 18:32:02 +02:00
Federico Brancasi
4d00538a94 Merge pull request #317776 from microsoft/attachment-only-chat-sends
Allow sending chat requests with attachments only
2026-05-28 18:28:45 +02:00
dependabot[bot]
bf3a84f793 build(deps-dev): bump tmp from 0.2.4 to 0.2.7 in /build (#318746)
Bumps [tmp](https://github.com/raszi/node-tmp) from 0.2.4 to 0.2.7.
- [Changelog](https://github.com/raszi/node-tmp/blob/master/CHANGELOG.md)
- [Commits](https://github.com/raszi/node-tmp/compare/v0.2.4...v0.2.7)

---
updated-dependencies:
- dependency-name: tmp
  dependency-version: 0.2.7
  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-28 16:25:43 +00:00
Kyle Cutler
1527d75eab Browser: refactor navbar / welcome page to feature contributions (#318765)
* Browser: refactor navbar / welcome page to feature contributions

* feedback
2026-05-28 16:25:36 +00:00
Logan Ramos
67f6e6e644 Fix credit wrapping (#318760)
* Fix credit wrapping

* Fix UI
2026-05-28 16:20:09 +00:00