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