Adds a pure helper shouldKickOffBackgroundSummarization that gates the
post-render background compaction trigger based on prompt-cache warmth:
- inline + warm cache (toolCallRounds.length > 0): jittered threshold in
[0.78, 0.82) straddling the historical 0.80 edge.
- inline + cold cache: emergency kick-off at >= 0.90 to keep long-running
sessions from hitting sync foreground compaction.
- non-inline: unchanged >= 0.80.
The rng is injected via a private field so tests are deterministic and
the warm-only jitter path is exercised without touching Math.random.
* Adopt InputState in Claude
Gets rid of the old options API
Co-authored-by: Copilot <copilot@github.com>
* agents.md
* Address PR review comments
- Fix _rebuildInputState to branch on existing vs new sessions,
preserving locked groups for existing sessions
- Fix permissionModes type from ReadonlySet<string> to ReadonlySet<PermissionMode>
- Fix disposable leak: track onDidChange subscriptions alongside WeakRefs,
sweep on refresh, and dispose all on provider teardown
- Avoid strong state capture in onDidChange closure (use WeakRef deref)
---------
Co-authored-by: Copilot <copilot@github.com>
* feat(copilotcli): Support CLI todo via worker support
* Fix tests
Co-authored-by: Copilot <copilot@github.com>
* Address Copilot review comments
- Swap logService.error arguments (error first, context second)
- Update todo widget even when query returns empty list
- Use separator-agnostic regex in test assertion
- Change RpcProxy to import type
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* fix: guard against missing DB file and set busy_timeout
- Add existsSync check before opening DatabaseSync to prevent
creating phantom empty database files
- Set PRAGMA busy_timeout = 2000 to reduce SQLITE_BUSY errors
during concurrent CLI writes
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
---------
Co-authored-by: Copilot <copilot@github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Callers can now opt into Anthropic features (context editing, tool
search, etc.) by setting modelCapabilities on the request itself,
as introduced in #308387. The base endpoint no longer needs to inject
beta headers — the Claude agent controls its own headers.
Reverts the merge logic from microsoft/vscode-copilot-chat#4945.
Simplify compaction fallback: use Simple mode on budget exceeded, skip Full
When the main prompt render exceeds the token budget and falls back to
foreground summarization (renderWithSummarization), skip Full mode and
go straight to Simple mode via forceSimpleSummary. This saves a wasted
LLM request since Full would likely also fail under the same budget
pressure, and Simple is guaranteed to fit via hard tool-result truncation.
- Add forceSimpleSummary prop to AgentPromptProps and SummarizedAgentHistoryProps
- Honor forceSimpleSummary in getSummaryWithFallback (unless config forces Full)
- Remove summarizationSource prop and source telemetry field (no longer needed)
- Clean up stale GDPR annotations for removed source field
- /compact and background standard-mode paths keep existing Full → Simple chain
- Use single for-loop to partition available_models into routableModels and
droppedModels (bhavyaus review)
- Fix test: when ALL available_models are unknown, _selectDefaultModel throws
since none match knownEndpoints — test now expects throw instead of gpt-4o
Previously isNESForAnotherDoc was only set inside addNotebookTelemetry,
so non-notebook cross-file NES always reported false.
- Set the flag on the main edit path for all cases (notebook and non-notebook)
- Set the flag on the jump-to-position path when targetDocumentId differs
- Set the flag and status 'noEdit:crossFileTargetNotFound' when cross-file
target document is not found in the workspace
- Remove redundant setIsNESForOtherEditor call from addNotebookTelemetry
Emits a new telemetry event after all client-side model overrides are applied.
Properties: candidateModel, actualModel, overrideReason (none/clientOverride),
conversationId. Tests cover: match, vision fallback override, router failure.
Bug fixes only (no telemetry changes):
1. Filter available_models through knownEndpoints before sending to router
2. Remove same-provider override from router path - trust router ranking
3. Iterate all candidate_models via _findFirstAvailableModel
4. Warn-level logs for sync mismatches
* nes: cache: add a test to show how rebasing fails
* feat: add reverse-agreement rebase for NES cache behind experiment flag
When the user types more text than the model predicted at the same
position (e.g., model: '{', user: '{\n\t'), the rebase engine now
recognizes that the model's edit is consumed by the user's typing and
offers the remaining unconsumed model edits as rebased suggestions.
The new behavior is gated behind the 'reverseAgreement' experiment
flag in NesRebaseConfigs (config key:
chat.advanced.inlineEdits.reverseAgreement, default: false).
Adds 10 unit tests covering positive, negative, and edge cases.
- Renamed session-related variables to agent-related variables in theme files.
- Updated JSON files to reflect the new agent variables for background, foreground, and borders.
- Modified CSS files to use the new agent variables for styling sidebar, panels, chat inputs, and other UI components.
- Adjusted TypeScript files to import and utilize the new agent theme variables.
- Ensured consistent naming across all relevant files to improve clarity and maintainability.
* better handling of too many images in chat
* address review: handle no-user-message fallback, assert filter output, cover tool-role images
* factor filterHistoryImages into a pure helper with direct tests
* restore validateAndFilterImages delegate so existing tests are unchanged
* address comments, throw early
* chronicle
* local and cloud store
* upload vscode events to remote store
* few updates
* consent ui and settings
* few optimizations
* test fix
* feedback updates
* test fix
* check setting to enable cmd
* fix test
* Settings update and tool update
* command update
* Settings update
* merge main
* feedback updates
* setting and test update
* few updates
* updates
* test update
* blocks ci update
* feedback updates
* comment update
Consolidate reasoning effort override into single advanced setting
Replaces chat.advanced.responsesApiReasoningEffort and chat.advanced.anthropicThinkingEffort with a single chat.advanced.reasoningEffortOverride setting used by both the Responses API and the Anthropic Messages API for evals.
Follow-up to #310343: remove dead code left behind after server-side
tool search removal.
- Remove IServerToolCall interface from fetch.ts
- Remove serverToolCalls field from IResponseDelta
- Remove logServerToolCall from IRequestLogger interface and all implementations
- Remove dead consumer in toolCallingLoop.ts
- Clean up unused imports
- Remove all server-side tool_search_tool_regex types, handlers, and stream processing from messagesApi.ts
- Remove isAnthropicToolSearchEnabled/isAnthropicCustomToolSearchEnabled functions
- Remove AnthropicToolSearchEnabled and AnthropicToolSearchMode settings
- Remove TOOL_SEARCH_TOOL_NAME, TOOL_SEARCH_TOOL_TYPE, TOOL_SEARCH_SUPPORTED_MODELS constants
- Refactor modelSupportsToolSearch to use version parsing instead of prefix list
- Add models filter to ToolSearchTool registration for Claude Sonnet/Opus 4.5+
- Fix MockEndpoint to derive supportsToolSearch from model family
- Gate advanced-tool-use beta header directly on endpoint.supportsToolSearch
- Update prompts to use client-side tool_search name and semantic search instructions
- Update 24 snapshot files to reflect new tool name and instructions