Commit Graph

154439 Commits

Author SHA1 Message Date
Sandeep Somavarapu 6ea419c8ec feedback (#308993)
feedback - listen to setting change
2026-04-10 11:19:36 +00:00
Johannes Rieken 80c19eb317 Merge pull request #308797 from microsoft/joh/private-fields-async-fix
build: fix async private method token fusion; inlineChat: adopt native private fields
2026-04-10 12:49:00 +02:00
Don Jayamanne d786cb0bcb fix(copilotcli): delegation to Copilot CLI (#308984) 2026-04-10 10:46:59 +00:00
Sandeep Somavarapu 17c0b4f6b9 add enable/disable ai features actions (#308988)
* support disabling AI features at workspace level

* add enable/disable ai features actions
2026-04-10 10:37:16 +00:00
Christof Marti 1bb4a6694c Add model details on WebSocket telemetry (#298236) 2026-04-10 10:35:41 +00:00
Johannes Rieken 8d272b24f6 Merge pull request #308971 from microsoft/joh/build-tests-node-runner
build: migrate tests from mocha to node native test runner
2026-04-10 12:33:46 +02:00
Ladislau Szomoru 59e49b4229 Agents - hide toolbar when there is no workspace (#308986) 2026-04-10 10:28:30 +00:00
Alex Ross 8b5518b088 Show combination tool approval args (#308747) 2026-04-10 12:05:03 +02:00
Sandeep Somavarapu a6e4912053 guard installing built in extensions in cli (#308967)
guard instlaling built in extensions in cli
2026-04-10 11:33:25 +02:00
Johannes 2c368160e0 build: migrate tests from mocha to node native test runner 2026-04-10 10:49:47 +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
Johannes 8f9f5509b2 inlineChat: adopt native ES private fields
Convert inlineChat module from TypeScript private (`private _field`)
to native ES private fields (`#field`) for better encapsulation and
V8 performance (after the private-to-property build step mangles them).
2026-04-10 10:18:29 +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
Johannes Rieken f83607587d add cpu-profile analysis skill (#308963) 2026-04-10 07:56:37 +00: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
Rob Lourens b8323ca4fe perf: Fix leak in rendering markdown/edits in thinking/subagent parts (#308939)
Co-authored-by: Copilot <copilot@github.com>
2026-04-10 07:40:08 +02:00
Rob Lourens a4f5119796 agentHost: subagents (#308592)
* agentHost: subagents

* agentHost: remove _meta.parentToolCallId dependency, subscribe to child sessions instead

Inner tool calls from subagent sessions are no longer stored in the parent
turn with _meta.parentToolCallId. Instead:

- Server: _buildTurnsFromMessages skips inner events (parentToolCallId),
  _restoreSubagentSession builds child session turns from raw messages
- Client: _enrichHistoryWithSubagentCalls subscribes to child sessions
  during history restore, injects serialized inner tool calls with
  subAgentInvocationId set

Also fixes hygiene: replace 'in' operator with hasKey in
agentSideEffects.test.ts, exclude .jsonl from copyright filter.

* fix: set terminalCommandUri from terminal content blocks in stateToProgressAdapter

completedToolCallToSerialized and toolCallStateToInvocation were not
detecting terminal tools via ToolResultContentType.Terminal content
blocks or setting terminalCommandUri/terminalToolSessionId, causing
6 test failures in CI.

* comments

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

* revert diff

---------

Co-authored-by: Copilot <copilot@github.com>
2026-04-09 21:56:36 -07: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
Yogeshwaran C cf92c7da1c Show breakpoint widget on Alt+click in gutter (#308687)
feat: show breakpoint widget on Alt+click in gutter

Add Alt+click handling in the editor gutter to quickly add or edit
conditional breakpoints. When Alt+clicking on a line without
breakpoints, the breakpoint widget opens in conditional breakpoint
mode. When Alt+clicking on a line with existing breakpoints, the
breakpoint widget opens for editing the first breakpoint.

Fixes #203259

Co-authored-by: Rob Lourens <roblourens@gmail.com>
2026-04-10 04:33:18 +00:00
Don Jayamanne 1028f069e1 feat: apply selected option values to active chat sessions on update (#308931) 2026-04-09 20:40:42 -07:00
Rob Lourens c205311e4a editor: remove debug console.warn logs from render path (#308928)
Remove chat code block render-drop warnings that are no longer needed.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-04-09 20:29:50 -07: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
Josh Spicer ce9a6650d4 Add home button to customizations editor sidebar (#308919)
An Overview button with a home icon sits in the header row alongside
the harness picker. When the harness picker is visible, the button
shows only the icon; when hidden (single harness), it expands to a
full-width button with label.
2026-04-09 19:34:53 -07:00
Rob Lourens 6df6bbde2a perf: Fix CKS bug and don't store full instructions contents on the ChatModel (#308920)
* perf: Fix CKS bug and don't store full instructions contents on the ChatModel

* Add test
2026-04-10 01:51:54 +00:00
Josh Spicer 7ff79304b1 Add marketplace deeplink for Browse buttons in customizations editor (#308913)
* Add marketplace deeplink for Browse buttons in customizations editor

The Browse buttons on MCP Servers and Plugins welcome page cards now
open the section with the marketplace browse mode active instead of
just navigating to the installed list.

- Add public showBrowseMarketplace() to McpListWidget and PluginListWidget
- Extend selectSectionById/selectSection with showMarketplace option
- Add hidden aiCustomization.openMarketplace command for deeplink
- Add selectSectionWithMarketplace callback to welcome page interface
- Wire Browse buttons on MCP/Plugin cards to activate marketplace mode

* Use example placeholder text for workflow input

* Show New/Browse buttons in sessions, use natural language prompts

- Enable showGenerateActions in sessions welcome page
- In sessions, New button prefills chat with 'Create me a {type} that...'
  instead of calling generateCustomization via slash commands
- Main Generate Workflow entrypoint uses 'Generate agent customizations.'
  instead of /agent-customization in sessions
- Apply same changes to both prompt-launchers and classic welcome pages

* Use /init instead of /agent-customization in core welcome pages

* Remove showGenerateActions flag from IWelcomePageFeatures

Generate actions are now always shown. The conditional was replaced
with a simple promptType check.

* Fix chat prefill to use singular type names with 'custom' prefix

* Increase spacing between subtitle and Generate Workflow block

* Shorten welcome page subtitle

* Fix fixture: add missing selectSectionWithMarketplace callback
2026-04-10 01:17:10 +00:00
dileepyavan 087a87f1d7 terminal: use display command in approval actions (#308916)
terminal: use display command in approval actions (#308895)

Use the display form of the command when computing terminal approval actions so wrapped unsandboxed commands do not leak into confirmation labels.

Also update the runInTerminalTool regression test to assert the display command label.
2026-04-10 01:13:13 +00:00
Rob Lourens 23f83001d5 chat: make codeblock editors simple widgets (#308896)
Mark chat codeblock and diff editor pools as simple widgets so their
text models are not synced to the extension host. This was the original
behavior before #204780 experimentally changed it.

The tool editor pool was already marked as simple.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-04-09 18:12:26 -07: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
Matt Bierner 34b3b3c400 Merge pull request #308898 from mjbvz/dev/mjbvz/legitimate-amphibian
Override ts implicit project defaults explicitly
2026-04-09 18:11:21 -07:00
Connor Peet bf6ff0b24f agentHost: adopt notify/sessionSummaryChanged protocol notification (#308889)
- Syncs agent-host-protocol to pick up the new
  `notify/sessionSummaryChanged` notification type, which lets clients
  keep cached session lists in sync without subscribing to every
  session URI individually.
- Emits the notification from AgentHostStateManager: after the session
  reducer runs, an identity check on the summary object detects
  changes, which are debounced (100ms) and flushed as partial diffs.
- Replaces the onDidAction-based subscription-peeking pattern in
  AgentHostSessionListController with the cleaner notification-based
  approach, removing the need for StateComponents/isSessionAction
  imports and the getSubscriptionUnmanaged call.
- Adds unit tests for emission, coalescing, no-op suppression, and
  cleanup on session deletion.

Adopts https://github.com/microsoft/agent-host-protocol/pull/51
Fixes https://github.com/microsoft/vscode/issues/305330

(Commit message generated by Copilot)
2026-04-09 18:10:59 -07:00
dileepyavan 0a11ecda7e terminal: reduce sandbox URL false positives (#308894)
Restrict bare host detection to a conservative set of coding-related domain suffixes while continuing to treat explicit URLs and SSH remotes as domains.

Add regression coverage for valid and invalid bare suffixes, multi-label hosts, explicit URLs, and dotted non-domain identifiers.
2026-04-09 17:51:58 -07:00
Josh Spicer b38be3cb1a Fix Agents app group policy (#308603)
* polish: improve policy-blocked overlay with agents icon, button fixes, and product names

* feat: add AgentsAppEnabled enterprise policy with parent policy identity propagation

- Register chat.agentsApp.enabled configuration with policy support
- Add agents_app_enabled to IPolicyData for account-level policy
- Save parent VS Code policy identity (win32RegValueName/darwinBundleIdentifier)
  in bootstrap-meta before product.sub.json merge so the agents sub-app reads
  policies from the parent VS Code's registry/plist domain
- Use parentPolicyConfig in main.ts when creating NativePolicyService
- Improve policy-blocked overlay: agents icon, button width fix, keyboard fix,
  hardcoded 'Agents' name, Open VS Code scheme fix

* chore: regenerate policyData.jsonc with AgentsAppEnabled policy

* refactor: use existing ChatAgentMode policy instead of separate AgentsAppEnabled

Piggyback on chat.agent.enabled (ChatAgentMode) policy to show the
policy-blocked splash screen in the agents app, rather than introducing
a separate AgentsAppEnabled policy.

* polish: use sessions logo SVG, save parent urlProtocol, update overlay text

- Replace codicon with sessions logo SVG (theme-aware light/dark)
- Save parent urlProtocol in parentPolicyConfig for correct Open VS Code link
- Update overlay title to 'Agents Disabled by Policy'
- Update description to 'Your organization has disabled Agents via policy.'

* fix: update Learn more link to agents docs

* refactor: move sessions logo SVGs to shared location, update title
2026-04-09 17:24:33 -07:00
Justin Chen afba0a4a1f track tools inside thinking (#308903)
* track tools inside thinking

* Update src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatThinkingContentPart.ts

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

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-04-10 00:00:02 +00: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
Matt Bierner 1804dfd6c6 Merge pull request #308888 from mjbvz/dev/mjbvz/petite-wolf
Add new chat session items on the ext host side
2026-04-09 16:10:20 -07:00
Matt Bierner 602bc5a588 Override ts implicit project defaults explicitly
Fixes https://github.com/microsoft/vscode/issues/308559
2026-04-09 16:08:23 -07:00
Connor Peet baa9c85c29 Merge pull request #308866 from microsoft/connor4312/ah-terminals-2
agentHost: integrate terminals with tool call
2026-04-09 18:55:48 -04:00
Osvaldo Ortega e13eb9b0fa sessions: fix "Generate New Task" no-op on existing sessions (#308883)
* Fix 'Generate New Task' no-op on existing sessions

sendAndCreateChat only works for new (untitled) sessions or when
multi-chat is enabled. For existing/completed sessions it threw an
error that was silently swallowed, making the action appear to do
nothing.

Add a _generateNewTask helper that checks the session status:
- Untitled sessions: use sendAndCreateChat (existing first-chat flow)
- Existing sessions: send /generate-run-commands directly to the
  active chat widget via acceptInput

Fixes #308805

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

* Address review: use passed-in session, add sendAndCreateChat fallback

- Use session.mainChat.resource instead of re-reading activeSession
  from global state, avoiding stale-reference bugs.
- Fall back to sendAndCreateChat when no chat widget is found for
  the session, so the action is never a silent no-op.

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

* Simplify _generateNewTask: consolidate sendAndCreateChat fallback

Both the untitled and widget-not-found paths called sendAndCreateChat,
so collapse the if/else into a single widget-first-then-fallback flow.

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

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-04-09 22:53:30 +00:00
Matt Bierner 94fed89742 Add new chat session items on the ext host side 2026-04-09 15:32:54 -07:00
Connor Peet 93a9f97101 Merge remote-tracking branch 'origin/main' into connor4312/ah-terminals-2 2026-04-09 15:19:50 -07:00
Matt Bierner e4749092e1 Merge pull request #308878 from microsoft/dev/mjbvz/fair-echidna
Update distro
2026-04-09 15:12:50 -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
Rob Lourens 6be8d6a5d4 Add performance workflow and heap-snapshot-analysis skills (#308834)
* Add performance workflow and heap-snapshot-analysis skills

Add two agent skills for memory/performance investigations:

- vscode-performance-workflow: Drives repeatable VS Code scenarios,
  captures heap snapshots, and includes bundled chat smoke runners
  (chat-memory-smoke, chat-session-switch-smoke).
- heap-snapshot-analysis: Parses V8 heap snapshots, compares before/after,
  and traces retainer paths.

Both skills include scratchpad folders (gitignored) for one-off
investigation scripts organized in dated subfolders with findings.md.

(Written by Copilot)

* Rename skill to auto-perf-optimize

(Written by Copilot)

* workspace

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

* this

* Comments

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

---------

Co-authored-by: Copilot <copilot@github.com>
2026-04-09 21:53:06 +00: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 9aecaa03dc Merge branch 'main' into dev/mjbvz/fair-echidna 2026-04-09 14:37:46 -07:00