3872 Commits

Author SHA1 Message Date
Ulugbek Abdullaev
8f98cb758b nes: implement cursor line distance check for serving from cache (#309011)
* nes: implement cursor line distance check for serving from cache

* address review: use rebasedEdit for rejection, skip cross-file cursorOffset, fix test types
2026-04-10 14:10:48 +00:00
Christof Marti
cde30eb64e Resend all messages after summarization (#298236) 2026-04-10 13:56:49 +00:00
Ulugbek Abdullaev
0e5f2c4f5c nes: fix: address _performFetch review comments (#309000)
nes: fix: address PR review for _performFetch extraction

- Rename FetchResult.Error to FetchResult.FetchFailure to avoid
  confusion with built-in Error class
- Move fetchResultPromise .then/.catch/.finally handlers before
  await Promise.race so early-return paths get setFetchEndTime()
  telemetry
2026-04-10 18:16:04 +05:00
Don Jayamanne
d786cb0bcb fix(copilotcli): delegation to Copilot CLI (#308984) 2026-04-10 10:46:59 +00:00
Christof Marti
1bb4a6694c Add model details on WebSocket telemetry (#298236) 2026-04-10 10:35:41 +00:00
Alex Ross
8b5518b088 Show combination tool approval args (#308747) 2026-04-10 12:05:03 +02:00
Robo
c88afdaf77 chore: update electron@39.8.7 (#308959)
* chore: update electron@39.8.7

* chore: update command

* chore: remove showNodeSystemCertificates command

* chore: bump distro
2026-04-10 10:33:39 +02:00
Don Jayamanne
4660585937 refactor(copilotcli): move worktree properties and metadata tracking to session request lifecycle (#308960)
refactor: move worktree properties and metadata tracking to session request lifecycle
2026-04-10 10:06:10 +02:00
Don Jayamanne
e9aba237c9 refactor(copilotcli): update action descriptions and adjust plan path handling (#308954) 2026-04-10 06:58:22 +00:00
Don Jayamanne
e8b419162f refactor(copilotcli): enhance session handling with branch name generation (#308956) 2026-04-10 08:56:14 +02:00
Ladislau Szomoru
eb62869277 Background - validate upstream branch before creating the worktree (#308953)
* Background - validate upstream branch before creating the worktree

* Pull request feedback
2026-04-10 08:55:42 +02:00
Don Jayamanne
e9d8794d1d feat(CopilotCLI): support reasoning effort (#308951)
* feat(CopilotCLI): support reasoning effort

* Enable reasoning effort for Copilot CLI
2026-04-10 16:29:15 +10:00
Bhavya U
05d42a27ac Fix double compaction on first-turn budget exceeded (#308949)
* Fix double compaction on first-turn budget exceeded

When the first render of a turn throws BudgetExceededError and the
background summarizer is Idle, we fall back to a synchronous foreground
'full' summarization via renderWithSummarization. That path did not set
the 'summary applied this iteration' flag, so the post-render gate
(>= 80% + Idle) would also kick off a background 'inline' compaction
in the same buildPrompt call — producing both
summarizeConversationHistory-full and summarizeConversationHistory-inline.

- Set the flag on both foreground fallback call sites so the post-render
  gate correctly short-circuits.
- Rename 'summaryAppliedThisIteration' to 'didSummarizeThisIteration' to
  better reflect that it covers any summarization work (pre-render bg
  apply, budget-exceeded bg apply, or foreground fallback).

* Update extensions/copilot/src/extension/intents/node/agentIntent.ts

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

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-04-10 05:55:00 +00:00
Don Jayamanne
78e6db311e Enhance welcome view to pre-select and deduplicate selected folder (#308948)
feat: enhance welcome view to pre-select and deduplicate selected folder in chat session options
2026-04-10 07:48:05 +02:00
Don Jayamanne
dcacca1b39 refactor: streamline session option group selection logic and improve test coverage (#308743)
* refactor: streamline session option group selection logic and improve test coverage

* refactor: enhance chat session initialization with new options structure and improve input state handling

* Update extensions/copilot/src/extension/chatSessions/vscode-node/test/sessionOptionGroupBuilder.spec.ts

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

* Updates

* Fixes

* Fixes

* Updates

* Updates

* More updates

* Fix tests

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-04-10 04:49:37 +00:00
Bhavya U
100cbe59eb Background inline summarization v1 (#308923)
* Refactor inline summarization handling in ToolCallingLoop

* Refactor conversation summarization settings and improve logging in AgentIntent

* Refactor agent intent to improve telemetry and remove obsolete test file

* Refactor inline summarization handling: remove unused properties and related tests

* Remove unused summarization instruction from AgentPromptProps interface

* Refactor AgentIntentInvocation to streamline model capabilities handling in background summarization

* Update debugName for background summarization to reflect inline context

* Update logging message in AgentIntentInvocation for clarity and remove unused test suite for inline summarization
2026-04-10 03:16:57 +00:00
dileepyavan
ccff27a612 [copilot] prompt updates (#308915)
* Update hidden Model B agent prompt for evals

* Refine hidden Model B prompt tag structure

* updating prompt to remove codex string

* main merge

* adding task execution tag

* adding task execution tag
2026-04-09 18:11:25 -07:00
Josh Spicer
47a66928de fix: reduce /enabled endpoint traffic and surface unexpected status codes (#308879)
* fix: cache CCA disabled results with 5-min TTL to reduce /enabled traffic

The checkCCAEnabled() method previously only cached enabled=true results
(introduced in 19541d79ea). For the majority of users whose repos have CCA
disabled, every provideChatSessionProviderOptions() call bypassed the cache
and hit the jobs/:owner/:repo/enabled CAPI endpoint unconditionally. With
growing adoption, this became significant upstream traffic.

Fix: cache all /enabled results. enabled=true keeps the 30-min TTL.
enabled=false/undefined uses a new 5-min TTL (CCA_DISABLED_CACHE_TTL_MS),
short enough that users who just enabled CCA won't wait long, but long enough
to dramatically reduce repeated calls.

To support the shorter TTL for disabled entries without changing the enabled
TTL, TtlCache.set() now accepts an optional per-entry ttlMs override that
takes precedence over the cache-wide TTL.

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

* fix: surface unexpected /enabled status codes (e.g. 429) in telemetry

Previously, isCCAEnabled's default case returned { enabled: undefined }
with no statusCode, swallowing 429 rate-limit and 5xx responses.

Changes:
- Widen CCAEnabledResult.statusCode from 401|403|422 to number so
  unexpected codes can be propagated
- Return statusCode: response.status in isCCAEnabled's default case
- Add sendTelemetryErrorEvent('copilot.codingAgent.CCAIsEnabledUnexpectedStatus')
  in checkCCAEnabled for any status code outside {401, 403, 422}, with
  isRateLimited flag for quick 429 filtering in dashboards

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

* refactor: hoist knownStatusCodes to constant and add GDPR annotation

- Extract CCA_KNOWN_STATUS_CODES to file-level Set to avoid re-creating
  it on every call and centralize the list of handled status codes
- Add __GDPR__ comment block for the new
  copilot.codingAgent.CCAIsEnabledUnexpectedStatus telemetry error event

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

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-04-09 16:38:16 -07:00
Osvaldo Ortega
c5729b10dc sessions: rename inSessions to inAgents and fix updateTask duplication bug (#308876)
Rename the `inSessions` task property to `inAgents` across all source,
tests, JSON configs, and documentation.

Also fix a bug in `updateTask` where `setProperty` with a numeric
array index was inserting a duplicate entry instead of replacing the
existing one. The fix replaces the entire tasks array with the updated
entry mapped in at the correct index, consistent with how `removeTask`
already works.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-04-09 14:53:14 -07:00
Matt Bierner
20775e04a7 Merge pull request #308873 from mjbvz/dev/mjbvz/exuberant-flea
Avoid hardcoding external ingest embedding type
2026-04-09 14:52:59 -07:00
Matt Bierner
7bb6eb7c63 Update extensions/copilot/src/platform/workspaceChunkSearch/node/codeSearch/externalIngestIndex.ts
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-04-09 14:31:51 -07:00
Christof Marti
571a7d595d Resend all messages when WebSocket's previous response id does not match (#298236) 2026-04-09 21:26:39 +00:00
dileepyavan
f42a0019d1 Remove codex string from hidden Model B prompt (#308672)
* Update hidden Model B agent prompt for evals

* Refine hidden Model B prompt tag structure

* updating prompt to remove codex string
2026-04-09 21:10:35 +00:00
Matt Bierner
a556f3229a Avoid hardcoding external ingest embedding type
Also updated some telemetry fields so we can do correlations more easily
2026-04-09 14:05:15 -07:00
Eleanor Boyd
6282a77b7d Merge pull request #308821 from eleanorjboyd/alright-peafowl
remove duplicate discount text
2026-04-09 14:03:33 -07:00
Ladislau Szomoru
06f88e480a Background - add exception handling when computing changes (#308849) 2026-04-09 15:44:02 -04:00
Ulugbek Abdullaev
c5ac25e125 nes: xtab: refactor: extract _performFetch from _streamEditsImpl (#308778)
refactor(xtab): extract _performFetch from _streamEditsImpl

Separate the HTTP fetch lifecycle (FetchStreamSource setup, makeChatRequest2,
initial error handling, line stream construction with cursor-tag removal and
latency logging) into a dedicated _performFetch method.

This makes the fetch infrastructure self-contained and returns a clean
AsyncIterable<string> line stream + getFetchFailure callback for downstream
format handlers, matching the pattern already used by
XtabCustomDiffPatchResponseHandler.

_streamEditsImpl is now a coordinator: it calls _performFetch, then dispatches
to format handlers, then post-processes edit-window results.

Part of #308744
2026-04-09 10:50:41 -07:00
Justin Chen
35a23cd116 switch to copilot icon for cli (#308831) 2026-04-09 17:33:01 +00:00
Eleanor Boyd
ea1830921d Merge branch 'main' into alright-peafowl 2026-04-09 10:06:31 -07:00
eleanorjboyd
c6ba46b5d1 remove duplicate discount text 2026-04-09 09:52:22 -07:00
Ladislau Szomoru
087126b872 Agents - use "agents" in the worktree branch/folder name (#308811) 2026-04-09 09:29:23 -07:00
Christof Marti
16be18337a Move chat-lib workflow up 2026-04-09 16:27:21 +00:00
Vikram Nitin
f36cefe175 [Bug Fix] Make execution subagent model exp based instead of simple. (#308642)
Make execution subagent model exp based. Also change default tool call limit
2026-04-09 09:26:54 -07:00
dependabot[bot]
63c42301f2 Bump basic-ftp from 5.2.0 to 5.2.1 in /extensions/copilot (#308600)
Bumps [basic-ftp](https://github.com/patrickjuchli/basic-ftp) from 5.2.0 to 5.2.1.
- [Release notes](https://github.com/patrickjuchli/basic-ftp/releases)
- [Changelog](https://github.com/patrickjuchli/basic-ftp/blob/master/CHANGELOG.md)
- [Commits](https://github.com/patrickjuchli/basic-ftp/compare/v5.2.0...v5.2.1)

---
updated-dependencies:
- dependency-name: basic-ftp
  dependency-version: 5.2.1
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-04-09 08:43:57 -07:00
João Moreno
5bfbf02616 fix build (#308793) 2026-04-09 14:44:23 +00:00
Paul
27ff22ccb5 Add throttling for tool stream invocations (#308607) 2026-04-09 07:40:48 -07:00
Logan Ramos
558b5e56ab Don't redact ABExp Contact (#308789) 2026-04-09 16:34:28 +02:00
Logan Ramos
5a67f67236 Revert "Support timing out hung streams (#308517)" (#308779)
This reverts commit ba8d730bd0.
2026-04-09 13:58:25 +00:00
João Moreno
17bd6b57ec proper insider build increments (#308774)
* proper insider build increments

* Update extensions/copilot/.esbuild.ts

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

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-04-09 13:55:47 +00:00
Tyler James Leonhardt
e0347a20a9 Add support for parsing bare model names in parseClaudeModelId (#308777) 2026-04-09 09:54:16 -04:00
Ladislau Szomoru
6f424b98fb Copilot - remove code that is not needed (#308772) 2026-04-09 09:53:32 -04:00
Ulugbek Abdullaev
9f03a14ab0 ghost: migrate to CompletionsFetchService (#308494)
* ghost: debt: migrate to CompletionsFetchService and remove dead code

* ghost: propagate copilotAnnotations in convertStreamToApiChoices

The v2 stream processor (convertStreamToApiChoices) was not setting
copilotAnnotations on the returned APIChoice objects, despite tracking
them in the CompletionAccumulator. This caused annotations (e.g., code
citations) to be lost.

Add accumulator.annotations.current to the createAPIChoice helper.

* ghost: fix tests to mock ICompletionsFetchService for v2

After migrating to CompletionsFetchService, LiveOpenAIFetcher no longer
calls ICompletionsFetcherService (via postRequest). Tests that mocked
the old low-level fetcher with StaticFetcher were silently bypassed.

Add StaticCompletionsFetchService adapter that bridges StaticFetcher
responses into ICompletionsFetchService by parsing SSE bodies through
jsonlStreamToCompletions. Wire it up in ghostText.test.ts and
inlineCompletion.test.ts setupCompletion helpers.
2026-04-09 13:15:05 +00:00
Tyler James Leonhardt
1a385de57d Fix initial option values not getting passed down (#308664)
Without this, `this._controller.items.get(uri)` returns undefined... but the metadata is stored on the item so that is needed to resolve.

FYI @mjbvz as an interesting quirk of the API.
2026-04-09 13:11:13 +00:00
Pierce Boggan
4c4b9906a5 Allow BYOK for business/enterprise users with client_byok policy (#308608)
- Add isClientBYOKEnabled() method to CopilotToken class
- Update isBYOKEnabled to allow users with client_byok=1 token flag
- Add github.copilot.clientByokEnabled context key for VS Code core model picker

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-04-09 09:07:19 -04:00
Ladislau Szomoru
7fe7589e7a Background - handle empty git repositories (#308767) 2026-04-09 09:02:41 -04:00
Ulugbek Abdullaev
08f44fb517 nes: xtab: cleanup: split response format parsing implementation out of XtabProvider (#308753)
* nes: fix: check chatResponseFailure consistently before yielding edits

* nes: xtab: cleanup: split response format parsing implementation out of XtabProvider
2026-04-09 14:04:28 +02:00
Martin Aeschlimann
c2c0f22daa update vscode.proposed.chatPromptFiles.d.ts (#308757) 2026-04-09 14:03:37 +02:00
Ulugbek Abdullaev
286d98a854 NES: refactor InlineEditRequestLogContext state management (#308749)
* nes: replace implicit _icon state with explicit outcome state machine (#308719)

Replace the implicit \`_icon\` field with an explicit \`_outcome: LogContextOutcome\`
discriminated union in InlineEditRequestLogContext.

- Define LogContextOutcome type with 8 states: pending, succeeded,
  noSuggestions, cached, cachedFromGhostText, skipped, cancelled, errored
- Derive icon from outcome via switch in _resolveIcon()
- Keep _isCompleted orthogonal (lifecycle flag, not an outcome)
- Add _setOutcome() with debug warning on invalid re-transitions
- Refactor setIsCachedResult to use direct field copy (avoids
  triggering outcome transitions during bulk data inheritance)
- Add double-completion warning in markCompleted()
- No caller changes required — public method signatures unchanged

* nes: unify live and static log entry paths (#308720, #308722)

Remove the static \`add()\` path from InlineEditLogger — all log entries
now use the live pattern with callbacks for icon/content resolution.

- Remove InlineEditLogger.add() and _liveRequestIds tracking
- Ghost text provider now uses addLive() + markCompleted() in finally
  block, ensuring lifecycle is always closed
- Remove redundant add() call in NES inlineCompletionProvider (the live
  entry was already registered via addLive())

This eliminates the static snapshot path that was the source of frozen
spinner bugs, and ensures ghost text entries have proper lifecycle
management matching the NES pattern.

* nes: fix stale icon caching in ChatPromptItem tree nodes (#308721)

Store the main entry reference in ChatPromptItem and always resolve
the icon unconditionally from it, preventing stale icon snapshots.

- Add _mainEntryRef field to ChatPromptItem
- setMainEntry() always sets iconPath (even to undefined when icon
  resolves to undefined), clearing any previous stale value
- withFilteredChildren() re-resolves from the entry ref via
  setMainEntry() instead of copying a potentially stale iconPath

This makes stale icons structurally impossible — the icon is always
derived from the live entry state on each tree refresh.

* nes: map cancelled outcome to skipped icon instead of loading

Cancelled requests should show a terminal icon, not a spinner.
Map 'cancelled' to Icon.skipped alongside 'skipped' to avoid
frozen-spinner appearance in the log tree.
2026-04-09 17:02:21 +05:00
Don Jayamanne
c7fd971659 refactor: remove getSessionIdForWorkspaceFolder method and update clearWorkspaceChanges to handle both session IDs and folder URIs (#308644)
* refactor: remove getSessionIdForWorkspaceFolder method and update clearWorkspaceChanges to handle both session IDs and folder URIs

* Address comments
2026-04-09 11:19:33 +00:00
Ladislau Szomoru
f6d4cad1c1 Sessions - do not use -A so that we can better handle git repositories using GVFS (#308740) 2026-04-09 12:53:40 +02:00