Commit Graph

5112 Commits

Author SHA1 Message Date
Paul
6d7542b870 Support subagent costs for local agent (#323175) 2026-06-26 20:18:27 +00:00
Osvaldo Ortega
cbb3fec2b4 Show only cloud coding agent tasks in cloud sessions list (v2) (#323195)
* Show only cloud coding agent tasks in cloud sessions list (v2)

Two fixes to the Task API (v2) cloud sessions list, where local VS Code /
CLI / JetBrains sessions mirrored into Mission Control were leaking in and
settled tasks were stuck showing "In Progress".

- Filter the list to cloud coding agent tasks only. The owning surface is
  identified by the agent integration slug on a task's `agent_collaborators`
  (`copilot-developer` / `copilot-swe-agent` = cloud; `copilot-developer-cli`,
  `vscode-chat`, `jetbrains-chat` = local clients). Adds the exported pure
  helper `isCloudCodingAgentTask` and applies it in `fetchSessionList`.
  `agent_collaborators` is returned to first-party CAPI tokens but not yet
  modeled in `@vscode/copilot-api`, so a minimal local type is used.

- Carry the raw `AgentTaskState` across the backend seam and map it directly
  to `ChatSessionStatus` in the provider, so `idle` renders as Completed and
  `waiting_for_user` as NeedsInput instead of collapsing to InProgress.

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

* Address review: guard malformed slugs and add status fallback

- isCloudCodingAgentTask: use a `typeof c.slug === 'string'` guard so null /
  non-string slugs in the untyped server payload can't reach `Set.has`.
- taskStateToChatSessionStatus: add a `default` branch returning InProgress so
  an unknown/forward-compat task state can't yield an invalid `undefined`
  status. Added tests for both.

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

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-06-26 19:40:05 +00:00
Vritant Bhardwaj
3c30cc5b03 Merge pull request #323176 from microsoft/agents/deprecate-ollama-byok-provider-b5806582
Deprecate internal Ollama BYOK provider in favor of the Offical Ollama extension
2026-06-26 11:31:09 -07:00
vs-code-engineering[bot]
fc9a595992 fix: drop diagnostics with missing range at the language diagnostics boundary (fixes #323148) (#323153)
* fix: drop diagnostics with missing range at the language diagnostics boundary

Other extensions can publish vscode.Diagnostic entries whose `range` is
undefined (violating the non-nullable `range: Range` type via an `any` cast).
These reach copilot verbatim through `vscode.languages.getDiagnostics()` and
crash the many consumers that dereference `diagnostic.range` - notably the
`LintErrors.getData` telemetry path that scans every extension's diagnostics
via `getAllDiagnostics()`. Sanitize at the boundary service so every consumer
is protected once, and log dropped entries so the producer stays diagnosable.

Fixes microsoft/vscode#323148

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

* fix: Copilot - Test lint — use strict equality for range null/undefined check

The eqeqeq ESLint rule (configured as 'warn', enforced with --max-warnings=0)
flagged `range != null` in _dropMalformedDiagnostics. Replace the loose
equality with an explicit strict check that preserves the original semantics
of dropping diagnostics whose range is either null or undefined.

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

---------

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-06-26 18:28:43 +00:00
Vritant Bhardwaj
8482f9336c Merge branch 'main' into agents/deprecate-ollama-byok-provider-b5806582 2026-06-26 10:39:43 -07:00
Ulugbek Abdullaev
a97573159d Add Adhoc Request Sender Mode with Tag Highlighting (#323100)
* Agent Host changes for agents/adhoc-request-sender-mode-extension-55e2bb6f

* Remove unconfigured react-hooks/exhaustive-deps eslint directive

The eslint-disable directive referenced a rule that isn't registered in
this repo's ESLint config, which caused ESLint to error with
"Definition for rule 'react-hooks/exhaustive-deps' was not found" and
failed the Compile & Hygiene and Copilot - Test CI checks.

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

* Coalesce adhoc tag-decoration rescans with requestAnimationFrame

Rescanning the whole editor text on every content change is wasteful for
bursty updates (e.g. a streamed response). Debounce the decoration update
to at most once per animation frame and cancel any pending frame during
cleanup so the callback can't run after the editor is disposed. The
initial scan stays synchronous so tags are highlighted immediately on mount.

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

* Address PR feedback: dispose token source; validate adhoc request JSON

- adhocRequestSender: always dispose the per-send CancellationTokenSource
  in the finally block (separate from the current-send guard) so its
  cancellation listeners don't leak across repeated Send/Stop cycles.
- simulationMain: validate and normalize the adhoc request JSON before use
  so malformed input (missing/null/wrong-typed model/user/system) yields a
  focused error message instead of a thrown stack trace.

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

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-06-26 20:36:56 +05:00
Christof Marti
c0cc253a97 Sandbox only applies with default approvals (#317981) 2026-06-26 13:49:43 +00:00
Logan Ramos
6ae1b8eb97 If long context = default context. Show a single long context option in picker (#323116) 2026-06-26 12:44:45 +00:00
Christof Marti
a91385696d Allow sandbox bypass in Copilot SDK (#317981) 2026-06-26 12:06:47 +02:00
Dmitriy Vasyura
dd7a4b90b1 Show session types as disabled with Sign in button when user is offline (#321861) 2026-06-26 01:17:19 +02:00
Anthony Kim
8a9cd3dd36 Bump Copilot CLI package to 1.0.65 (#322747)
* Bump Copilot CLI package to stable 1.0.64

* Try to bump to 1.0.65 instead

* Remove stale Copilot sdk/worker materialization for 1.0.65

* Update Debian amd64 deps after excluding Copilot native executable

* Remove stale RPM x64 libstdc++ deps after Copilot CLI 1.0.65 packaging

* Prune Copilot SEA executable before CI packaging

* Exclude Copilot SEA executable from packaging stream

* SDK should be 1.0.4
2026-06-25 12:03:54 -07:00
Logan Ramos
0acd78faaf Hide long context for models which have the same cost regardless (#322950) 2026-06-25 14:22:00 +00:00
Ladislau Szomoru
1c80314e3b Engineering - update code owners (#322944) 2026-06-25 15:39:36 +02:00
Paul
4972ac9c09 Fix context size default + reload behaviour, add defensive fallbacks (#322882) 2026-06-25 01:34:40 -07:00
Benjamin Christopher Simmonds
4f77029409 Merge pull request #322831 from microsoft/benibenj/relieved-whippet
Fix context key references
2026-06-25 10:18:01 +02:00
Vijay Upadya
9b0c342101 Support Responses API in Azure BYOK (#322845)
* Support  Responses API in Azure BYOK

* feedback updates
2026-06-24 16:49:35 -07:00
BeniBenj
2aa9cbe581 context key fix 2026-06-24 23:38:04 +02:00
Martin Aeschlimann
bd2db631aa Add ICustomizationItemProvider.provideSourceFolders functionality (#322740)
* provideSourceFolders

* simplify resolveTargetDirectoryWithPicker

* use provideSourceFolders

* update

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

* fix

* fix tests

* fix issues

* fix tests

* fix

---------

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
2026-06-24 19:36:48 +00:00
BeniBenj
479a4986c9 CONTEXT KEYS CLEANUP 2026-06-24 19:51:11 +02:00
vs-code-engineering[bot]
d3e7ccc25f fix: AsyncIterableSource emit after resolve throws TypeError (fixes #322752) (#322759)
fix: keep AsyncIterableSource emit a no-op after resolve (fixes #322752)

Co-authored-by: vs-code-engineering[bot] <122617954+vs-code-engineering[bot]@users.noreply.github.com>
2026-06-24 17:20:40 +00:00
Anthony Kim
1c0b4bea4c Bump Copilot CLI SDK packages to 1.0.64-1 / 1.0.3 (#322645)
* Bump Copilot CLI packages to @github/copilot@1.0.64-1 and @github/copilot-sdk@1.0.3

* Resolve Agent Host Copilot CLI through @github/copilot/bin.copilot

* Materialize @github/copilot/sdk from @github/copilot-<platform> in extension postinstall

* Package @github/copilot-<platform>/copilot for Agent Host and linuxmusl

* Exclude Copilot optional native payloads from extension package

* Scan @github/copilot-*/copilot for Linux package dependencies

* Tighten Copilot SDK 1.0.64-1 attachment and RPC typings

* Increase Copilot SDK native binary scan test timeout

* Update amd64 deb deps for @github/copilot-linux-x64/copilot

* Update arm64 rpm deps for Copilot package layout

* Update x64 rpm deps for @github/copilot-linux-x64/copilot

* Try to fix windows smoke test

* Try to fix platform runtime files for agent host

* exclude copilot computer.node from agent host packaging

* Another attempt to try to get packaging right

* Should only try to load 1.0.64-1

* Try to fix packaing for windows, macos, deb deps

* Update armhf/arm64 deb and x64 rpm Copilot dependency baselines

* Copilot darwin ripgrep universal merge and arm64 rpm deps

* Restore target Copilot SDK prebuilds for built-in extension packaging

* see if changes to gulpfile.reh.ts would help

* dont mess with formatting

* Launch copilot cli from platform index.js and exclude SEA
2026-06-24 06:47:26 -07:00
Alexandru Dima
7219f045a9 Rename "GitHub Copilot Chat" extension to "GitHub Copilot" (#322683)
Agent Host changes for agents/rename-github-copilot-chat-12677b65
2026-06-24 12:18:57 +02:00
Paul
48dd21f8f4 Readd legacy support for cloud model picker prices (#322011) 2026-06-23 20:49:50 +02:00
Ulugbek Abdullaev
0035fb2e7e nes: track originating model patch for streamed edits (#322573)
PR #322438 allowed splitting one model-sent diff-patch into multiple
LineReplacements, breaking the invariant that the Nth shown edit
corresponded to the Nth model patch (progressive ghost-text reveal
already broke it too). As a result, telemetry could no longer attribute
a served edit back to the model patch it came from.

Stamp a 0-based `patchIndex` on each Patch in extractEdits, thread it
through the streamed-edit -> cache -> telemetry pipeline, and emit a new
`sourcePatchIndex` telemetry measurement. All fragments produced from the
same patch (diff splitting or ghost-text early + continuation) share the
index. The field is optional since the edit-window and INSERT response
formats have no patch structure.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-06-23 20:49:29 +02:00
vritant24
358425ad17 add deprecation text to ollama vendor 2026-06-23 11:35:52 -07:00
Ulugbek Abdullaev
ba06c024f8 inline edit: remove noisy outcome transition console warning (#322560)
Removes the '[InlineEditRequestLogContext] outcome transition from ... to ...'
console.warn that polluted the extension host console on benign no-op outcome
self-transitions (e.g. 'skipped' -> 'skipped') during normal NES usage.

Fixes #322547

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-06-23 21:00:28 +05:00
Ulugbek Abdullaev
682d038520 Add config to split xtab diff patches via per-patch diff (#322438)
* nes: update defaults for current file budgeting

to have budget of 1500 tokens and reuse leftover budget for code above

* nes: pin useLeftoverBudgetFromAbove=false in even-split test

The "context above and below get same # of tokens" test inherits its
options from DEFAULT_OPTIONS.currentFile. Flipping the default
useLeftoverBudgetFromAbove to true made it exercise the donation path,
breaking its premise and inline snapshot. Pin the option to false so the
test keeps validating the even-split behavior its name describes; the
donation behavior is already covered by the dedicated
expandRangeToPageRange tests.

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

* nes: file rename

* Add config to split xtab diff patches via per-patch diff

Add InlineEditsXtabSplitPatchOnDiff (boolean, experiment-based, default off).
When enabled, each patch in xtabPatchResponseHandler is line-diffed (removed vs
added lines) using the synchronous DefaultLinesDiffComputer and split into the
minimal set of LineReplacements, leaving re-emitted context lines untouched for
a nicer suggestion shape. Falls back to the single replacement on timeout or a
single-hunk diff.

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

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-06-23 08:35:02 +00:00
Ulugbek Abdullaev
d5a69d4d63 Validate predicted line for cross-file cursor jumps in NES (#322437)
Validate predicted line for cross-file cursor jumps

The cross-file cursor-jump path in `XtabProvider.handleCrossFilePrediction`
fed the model's predicted line number straight into a synthetic request
without checking it against the target document's line count. When the model
predicted an out-of-bounds line, `CurrentDocument.lineWithCursor()` threw a
`BugIndicatingError` ("cursor is out of bounds") that propagated up through
`getNextEdit` and surfaced as an unhandled error in telemetry.

The same-file path already guards against this (`exceedsDocumentLines`); this
mirrors that guard for the cross-file path, returning `NoSuggestions` and
recording `crossFile:exceedsDocumentLines` instead of throwing.

Fixes #318579

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-06-23 12:27:12 +05:00
dileepyavan
b8332d072c Update GPT-5.5 prompt instructions (#322443) 2026-06-22 20:56:35 +00:00
Eleanor Boyd
9cef07e98c Merge pull request #322002 from eleanorjboyd/quiet-otter
Add inline chat OTel invocation span
2026-06-22 11:31:17 -07:00
eleanorjboyd
760d941e7f Reduce brittleness in inline chat OTel tests
- Decouple metric assertions from call ordering via arrayContaining
- Use closeTo for duration assertion so timing-capture refactors don't break it
- Assert sendToolCallingTelemetry call count before indexing mock.calls
- Switch error-result assertion to toMatchObject for forward compatibility
- Fail loudly when the harness's createInstance receives an unknown ctor

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-06-22 11:12:35 -07:00
Bhavya U
49d32125de External ingest: harden finalize against 412 phase mismatch (#322254)
* External ingest: harden finalize against 412 phase mismatch

Fixes the "Build Codebase Semantic Index" failure for non-GitHub repos
where `/external/code/ingest/finalize` returns HTTP 412 ("request sent
for phase which was not the current phase"). The server only advances to
the finalize phase once it has received every expected document, so a
finalize can fail when the server is still missing documents.

- Retry finalize with backoff (bounded) after a 412, re-polling `/batch`
  for documents the server still reports as missing and re-uploading them.
- Stop swallowing per-document upload failures: collect them and fail the
  pass with a descriptive error (status + requestId) before finalize, so
  the real cause is surfaced instead of a misleading finalize 412. Failed
  uploads are no longer counted as uploaded.
- Make a `/document` 404 ("ingest is gone") abort the pass deterministically
  rather than relying on a rejection an intermediate `Promise.all` can swallow.
- When finalize keeps returning 412 but the server reports no missing
  documents, surface a distinct "likely server-side" error after retries.

Adds an ExternalIngestClient test suite driving the real client through the
ingest HTTP protocol (retry-then-success, re-upload still-missing, exhaustion,
server-side-no-missing-docs, persistent upload failure, and 404 abort).

Refs microsoft/vscode#320915

* Use fake timers for finalize-retry tests; count unique uploaded docShas

- Test suite uses fake timers so finalize-retry backoff doesn't add real wall-clock time
- Record unmapped docSha as a deterministic upload failure instead of throwing (rejection was swallowed by Promise.all)
- updatedFileCount counts unique uploaded docShas across passes instead of summing per-pass attempts
- Add test for the unmapped-docSha failure path

* Fix externalIngest tests failing in CI without a GitHub token

createPlatformServices() wires a static auth service backed by createStaticGitHubTokenProvider(), which throws when no GITHUB_PAT/GITHUB_OAUTH_TOKEN is set (CI). Override IAuthenticationService with a static token so getAuthToken() resolves deterministically. Verified by running the suite with the token env vars unset.
2026-06-22 10:48:33 -07:00
eleanorjboyd
1d09882bc8 Fix pre-existing TypeScript errors blocking CI
These errors existed on the branch before the OTel work but block the
Copilot - Test (Linux/Windows) CI checks from passing:

- inlineChatIntent.ts: re-narrow request.location2 inside the private
  loop method (the assertType in run() does not survive across the
  async boundary into _runInlineToolLoop).
- inlineChatIntent.spec.ts: cast mock fields to vitest's Mock type so
  .mock and mockImplementation are accessible; annotate callback
  parameters that were implicit any; fix PromptRenderer generic arity
  (it takes one type parameter, not two).

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-06-22 09:03:19 -07:00
Ulugbek Abdullaev
e010474ba0 nes: update defaults for current file budgeting (#322382)
* nes: update defaults for current file budgeting

to have budget of 1500 tokens and reuse leftover budget for code above

* nes: pin useLeftoverBudgetFromAbove=false in even-split test

The "context above and below get same # of tokens" test inherits its
options from DEFAULT_OPTIONS.currentFile. Flipping the default
useLeftoverBudgetFromAbove to true made it exercise the donation path,
breaking its premise and inline snapshot. Pin the option to false so the
test keeps validating the even-split behavior its name describes; the
donation behavior is already covered by the dedicated
expandRangeToPageRange tests.

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

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-06-22 17:56:13 +02:00
eleanorjboyd
7b79f59c3a Address Copilot review feedback on inline chat OTel span
- Wrap the bail-out exit-tool invocation inside the invoke_agent
  span so its execute_tool span is parented under the root span
  (was previously a sibling).
- Add github.copilot.agent.type='builtin' to the root span to
  match the standard invoke_agent attribute set.
- Remove now-unused IToolsService dependency from InlineChatIntent.
- Add regression test asserting the exit tool is invoked while
  the invoke_agent span is still active.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-06-22 08:34:49 -07:00
vs-code-engineering[bot]
bfea8226d3 Bump version to 1.127.0 (#322339)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Aiday Marlen Kyzy <amarlenkyzy@microsoft.com>
2026-06-22 12:03:16 +00:00
Zhichao Li
b16421d711 Merge branch 'main' into zhichli/otelmonitor 2026-06-21 23:44:59 -07:00
Harald Kirschner
918dfc4372 Add in-editor PMF survey pane (POC) (#322192)
* Add in-editor PMF survey pane (POC)

Moves in-product surveys from notification-based flows into an editor
pane, following the same pattern as the issue reporter editor.

- EditorInput + EditorPane architecture (singleton, readonly)
- Segmented control (Q1) styled with --vscode-radio-* tokens
- List-row selection (Q2/Q3) with native radios visually hidden inside
  full-width label elements, styled via :has(:checked)
- Responsive container query (collapses 2-col to 1-col at 600px)
- HC/focus-visible support for both segment and list-row patterns
- Success animation with auto-close after 3s
- Telemetry event for survey submission (survey/submit)
- Works in both workbench and sessions/agent window
- Testable via Developer: Open Survey command

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

* Address PR feedback: accessibility, localization, design tokens

- Gate 'Open Survey' command behind IsDevelopmentContext (dev builds only)
- Localize all user-facing strings (title, description, questions, options)
- Use stable option IDs for telemetry instead of locale-dependent labels
- Replace custom submit button CSS with shared Button widget
- Add aria-hidden on decorative icons (sparkle, checkAll)
- Add role=status + aria-live=polite on success container
- Announce 'Response sent' via status() for screen readers
- Move focus to success container after submit
- Use --vscode-strokeThickness token for border widths
- Snap padding to spacing ramp (7px → 8px)

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

* Fix responsive layout and accessibility

Responsive:
- Remove broken flex-wrap on segment control (caused 2x2+1 orphan grid)
- At narrow widths, segment stacks vertically (flex-direction: column)
  with full-width items and proper border-radius per edge
- Segment labels get min-width: 0 + text-overflow: ellipsis so they
  shrink gracefully in horizontal mode without wrapping
- Remove overflow: hidden from segment group (was clipping focus rings)

Accessibility:
- Add role=form + aria-label on the editor pane container
- Increase auto-close timeout to 5s (gives screen readers time to read)
- Add position: relative on focus-visible segments for z-index stacking
- Segment labels get explicit border-radius on first/last (no overflow
  hidden needed)

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

* Fix review findings: focus, URI, error handling, a11y

Engineering:
- Override focus() to move focus to first radio when survey opens
- Make resource URI dynamic (vscode-survey:/{surveyId}) to prevent
  collisions across multiple survey definitions
- Guard closeEditor in auto-close timeout with .catch(onUnexpectedError)

Accessibility:
- Add aria-required=true on all radio groups
- Fix HC focus-visible vs checked outline conflict: checked uses 1px
  solid contrastActiveBorder, focus-visible uses 2px dashed focusBorder
- Add completion hint ('Answer all questions to submit') with
  aria-describedby on the submit button; hides once all answered

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

* fix: prevent segment control wrapping with explicit flex-wrap: nowrap

Add position: relative to contain absolutely-positioned radio inputs,
and flex-wrap: nowrap to ensure 5 segment items always stay in a single
row at widths above the 600px container-query breakpoint.

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

* fix: list selection style, compact spacing, scroll visibility

- Remove one-sided border-radius + left-accent on selected list rows;
  use full rectangular border matching VS Code's native list selection
- Reduce row padding (8px→6px), gap (4px→2px), question margin (24→20px)
  and submit margin (28→20px) for a more compact layout
- Add 60px bottom padding to ensure the Submit button is always reachable
  when scrolling
- Split container queries: segment stacks at 560px, list grid collapses
  to single-column at 480px (was 600px for both — too aggressive)

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

* Address review: accessibility help, design tokens, compact styling

- Add SurveyAccessibilityHelp with AccessibleViewProviderId.Survey and
  AccessibilityVerbositySettingId.Survey for screen reader discovery
- Use var(--vscode-strokeThickness) for list-option border
- Use var(--vscode-codiconFontSize) + transform: scale(2) for success icon
- Reduce list-option padding to 6px 10px (on spacing ramp)

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

* feat: track source signal, programmatic command, structured telemetry

- Add 'source' field to SurveyEditorInput so the triggering feature
  (completions, panel.agent, agent.codeEdit) is captured with the response
- Register '_workbench.action.openCopilotSurvey' command for the Copilot
  extension to open the in-editor survey instead of external URL
- Restructure telemetry: extract pmfScore, primaryBenefit, primaryFriction
  as top-level fields for direct Kusto querying (keep JSON blob for
  forward-compat)
- Rename question IDs: main-benefit→primary-benefit, blockers→primary-friction
- Add pmfQuestionId to ISurveyDefinition schema

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

* fix: pmfScore as numeric 0-4, update extension to open in-editor survey

- pmfScore is now a number (0=not at all, 4=extremely) with
  isMeasurement:true for direct Kusto aggregation - no JSON blob
- Update Copilot SurveyService.promptSurvey() to call
  '_workbench.action.openCopilotSurvey' command instead of opening
  external URL - works in both main workbench and agent window
- Remove unused IAuthenticationService, IEnvService, SURVEY_URI from
  SurveyService (no longer needed without external URL)

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

* fix: sanitize source arg, restore focus, handle singleton re-open

- Validate command source against allowlist (telemetry safety)
- Add runtime guard for dev command in stable builds
- Make SurveyEditorInput.source mutable via updateSource()
- Update existing input's source when singleton is re-opened
- Restore focus to survey pane when closing a11y help
- Await command execution in extension with error handling

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

* generalize survey telemetry with telemetryKey mappings

Questions now declare their own telemetry field via telemetryKey and
asMeasurement properties. The pane iterates these at submit time
instead of hardcoding field names.

Telemetry fields:
- score (number): primary measure, option index
- primaryBenefit (string): value driver option ID
- primaryFriction (string): friction point option ID
- programmingExperience (number): experience bracket index

Added Q4: programming experience (5 brackets, 0-4 numeric measure).

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

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-06-21 18:12:40 -07:00
João Moreno
8efe757281 cleanup collaborators list (#321369) 2026-06-21 18:33:46 +00:00
vs-code-engineering[bot]
cb128cbeff fix: tolerate invalid tool-call JSON in language model wrapper (fixes #322123) (#322127)
The model can stream malformed JSON for tool-call arguments. The language model wrapper threw a bare Error from a fire-and-forget finished callback, producing an unhandled rejection in error telemetry without cleanly aborting the response. Align with the other tool-call consumers (langModelServer, messagesApi) by logging the diagnostic and falling back to empty parameters so the tool call is still surfaced to the consuming extension.

Co-authored-by: vs-code-engineering[bot] <122617954+vs-code-engineering[bot]@users.noreply.github.com>
2026-06-21 08:52:11 +00:00
Bhavya U
db0cabd800 Gate memoryInstructions on the memory tool being enabled (#322250)
Render the memory instructions and context blocks only when the memory
tool is in availableTools, so the prompt and available tools stay in sync.

Fixes #321833

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-06-20 20:53:25 -07:00
Bhavya U
bcf17876c3 Fix /compact failing on streaming models (Gemini): don't force stream:false (#322255)
The off-flag conversation summarization path forced `stream: false` on the
chat request. The response processor is selected by the endpoint's static
`supportsStreaming` capability, not by this flag, so for a streaming Chat
Completions model (e.g. gemini-3-flash) the single non-streamed JSON blob is
still routed through the SSE processor, which fails to parse it and reports a
spurious RESPONSE_CONTAINED_NO_CHOICES failure. Both Full and Simple modes hit
this, so /compact reported failure even though the model returned valid
summaries.

Removing `stream: false` lets the request stream (the safe default for every
endpoint type); `interceptBody` still forces `stream: false` for models that
genuinely don't support streaming.

Fixes #321085
2026-06-20 20:53:22 -07:00
Bhavya U
2e52a6b834 Update model capabilities (#322237)
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-06-21 00:21:22 +00:00
Bhavya U
d778afd715 Fix tool_search for GPT models; scope tool_search to deferred tools (#322235)
getAvailableTools(): skip virtual-tool grouping for any tool-search-capable endpoint (not just Anthropic). Previously GPT-5.4/5.5 ran virtual-tool grouping AND responses-API client tool search simultaneously, so real MCP tools were hidden behind activate_* groups (or trimmed) and never appeared in the request's tools map - making them searchable via tool_search but not callable.

toolSearchTool: exclude always-available (non-deferred) tools from the tool_search candidate set so the limited result slots only go to tools that actually need loading.

Fixes #317998
Fixes #317992
2026-06-20 22:44:38 +02:00
Alexandru Dima
4a6e32fc1f copilot: disable process.report in copilot extension (#322178)
Disable process.report in copilot extension

Override process.report.getReport to return undefined, loaded as the first import in the copilot extension entrypoint. Cherry-picked from #321998 and #322036.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-06-19 17:08:10 -07:00
Vijay Upadya
4e116aaf70 Gemini: Fix tool-call validation for Gemini flattened argument keys (#322165)
* Gemini: Fix tool-call validation for Gemini flattened argument keys

* Feedback updates
2026-06-20 01:47:03 +02:00
Julia Kasper
89b8d6d16a Enable persistent CoT for GPT-5.4 and GPT-5.5 (#322161)
Add GPT-5.4 and GPT-5.5 to the Responses API persistent chain-of-thought model-family gate while preserving the existing supported-family condition.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-06-19 22:17:44 +00:00
Paul
c8940a8eb5 Propagate quota snapshots from copilot SDK (#322162) 2026-06-19 15:14:17 -07:00
vs-code-engineering[bot]
3d575eec6f fix: re-check cancellation after postToolUse hook to avoid closed-stream write (fixes #321951) (#321959)
fix: re-check cancellation after postToolUse hook to avoid closed stream write (fixes #321951)

The postToolUse hook can run for a long time because it spawns external,
user-configured commands. If the chat request is cancelled while the hook
runs, the response stream is closed by the time the hook resolves, and
writing hook progress to it throws an unhandled "Response stream has been
closed" error.

The prior fix (cdf17eb2, #319011) only checked cancellation before invoking
the hook, leaving the cancellation-during-hook window open. Re-check the
cancellation token in executePostToolUseHook after the await and skip result
processing when cancelled, since a cancelled turn never consumes the result.

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-06-19 21:32:24 +00:00
Alexandru Dima
37e7e85b10 Optimize node_modules caching for CI & PR checks (#322074)
* CI: speed up node_modules cache with zstd + shared scripts

Switch the Linux/macOS node_modules cache from single-threaded gzip
(tar -czf) to multi-threaded zstd. The "Create node_modules archive"
step was spending ~5min of single-core gzip on a multi-GB tree on every
cache miss; zstd -T0 uses all cores and decompresses much faster, so
cache-hit jobs benefit too. Windows stays on 7-Zip (already threaded).

Extract the archive/extract commands into shared per-platform scripts
under .github/workflows/node_modules_cache/ (cache.sh / cache.ps1, each
dispatching on an archive|extract argument) so the format and flags live
in one place instead of being duplicated across ~8 workflows. Bump
build/.cachesalt to invalidate existing gzip caches.

Also remove the obsolete extensions/copilot CI workflows
(copilot-setup-steps.yml, ensure-node-modules-cache.yml, pr.yml) and the
unused build/listBuildCacheFiles.js, and drop their now-stale entries
(plus lit-html and signals-core) from .eslint-allowed-javascript-files.

* ci: seed copilot node_modules cache on main and rename cache keys

Add copilot-linux and copilot-windows jobs to pr-node-modules.yml so the
copilot node_modules cache is populated on main. Rename the copilot cache
keys to copilot-node_modules-linux / copilot-node_modules-windows in pr.yml.

* ci: extract node_modules cache into composite actions

Factor the repeated node_modules cache plumbing into two local composite
actions, restore-node-modules and save-node-modules, and migrate all
workflows that used the cache.sh/cache.ps1 archive flow (pr, pr-node-modules,
pr-{linux,darwin,win32}-test, copilot-setup-steps, component-fixtures,
css-order-scan).

- restore-node-modules computes the key, restores the cache, optionally
  extracts on a hit, and exports the resolved key via $GITHUB_ENV.
- save-node-modules archives node_modules and saves it to the cache, reusing
  the key exported by restore so callers don't repeat the prefix.
- Bespoke install steps stay in the workflows, so per-job env/secrets never
  cross the action boundary.
- Only seed the cache on branch pushes (component-fixtures skips PRs, whose
  caches aren't shared).

* save the node_modules cache for now to test it

* ci: fix node_modules cache save dropping the archive

cache.sh wrote its archive as cache.tzst, but actions/cache reserves that
name for its own tarball and passes --exclude cache.tzst, so our archive was
excluded and an empty (~200 B) cache was saved on Linux/macOS. Rename the
archive to node-modules.tzst and bump build/.cachesalt to invalidate the
broken cache entries.

* empty commit

* Remove again saving to the node modules cache from PR steps
2026-06-19 17:21:43 +02:00