Commit Graph

3505 Commits

Author SHA1 Message Date
Bhavya U c78e004e28 Warm-cache gate for inline background summarization (#311047)
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.
2026-04-17 14:14:51 -04:00
Ladislau Szomoru 20298ed3a8 Background - use merge-base commit for the left hand side of the diff editor (#311026)
* Background - use merge-base commit for the left hand side of the diff editor
2026-04-17 16:36:58 +00:00
Martin Aeschlimann 9677ab2714 Use 'sessionTypes' to filter chat customizations in UI, 'when' only in promptsService (#310999)
* Use 'sessionTypes' to filter chat customizations in UI, 'when' only in promptsService

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

* update

* correctly handle when from providers

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

* fix compile error

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

---------

Co-authored-by: Copilot <copilot@github.com>
2026-04-17 16:25:48 +00:00
Alex Ross 6cda49d9db Allow list commands for the run command tool (#310959)
Part of #302411

Co-authored-by: Copilot <copilot@github.com>
2026-04-17 10:33:52 +00:00
Vijay Upadya 8853744af1 Chronicle: Enrich session data capture for CLI sessions and improve standup quality (#310926)
* Chronicle: Enrich session data capture for CLI sessions and improve standup quality

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

* feedback updates

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

---------

Co-authored-by: Copilot <copilot@github.com>
2026-04-17 10:09:59 +02:00
Tyler James Leonhardt 8b28af1897 Adopt InputState in Claude (#310924)
* 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>
2026-04-17 06:51:52 +00:00
Don Jayamanne d72f98075f feat(copilotcli): Support CLI todo via worker support (#310913)
* 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>
2026-04-16 22:31:34 -07:00
Bhavya U 6cd94ddc6f revert: remove anthropic-beta header merge in Claude streaming endpoint (#310908)
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.
2026-04-17 03:55:32 +00:00
Bhavya U 37d6ea1740 Simplify compaction fallback: use Simple mode on budget exceeded (#310889)
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
2026-04-16 19:18:02 -07:00
Vijay Upadya 88cd054ab2 Add agentName to chronicle telemetry (#310880)
* add agentName to telemetry

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

* comment update

---------

Co-authored-by: Copilot <copilot@github.com>
2026-04-17 01:32:19 +00:00
Logan Ramos b0adc5d2b2 Handle showing weekly and session rate limit data (#310836)
* Handle showing weekly and session rate limit data

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

* Fix error

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

* Update extensions/copilot/src/extension/conversation/vscode-node/chatParticipants.ts

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

* Fix casing

* Update verbiage + clear stale

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

---------

Co-authored-by: Copilot <copilot@github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-04-16 17:17:26 -04:00
Don Jayamanne 88fc27106a Add GitHub Copilot upgrader skill and CLI integration documentation (#310830)
* feat: add GitHub Copilot upgrader skill and CLI integration documentation

* Updates

* Update extensions/copilot/src/extension/chatSessions/copilotcli/AGENTS.md

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

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-04-16 20:14:30 +00:00
Aashna Garg e5cd52fcaa Merge remote-tracking branch 'origin/main' into aashnagarg/iterate-candidate-models-fallback
# Conflicts:
#	extensions/copilot/src/platform/endpoint/node/test/automodeService.spec.ts
2026-04-16 11:49:16 -07:00
Aashna Garg f785e0158f Merge pull request #310238 from microsoft/aashnagarg/actual-model-telemetry
Add automode.routerModelSelection telemetry with actualModel
2026-04-16 11:42:27 -07:00
Aashna Garg 98fff9f761 Address review: single partition pass, fix failing test
- 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
2026-04-16 11:36:21 -07:00
Ulugbek Abdullaev d60ffdc802 fix: set isNESForAnotherDoc correctly for cross-file NES (#310794)
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
2026-04-16 10:52:48 -07:00
Aashna Garg 1696c1957d Add automode.routerModelSelection telemetry with actualModel
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.
2026-04-16 10:33:49 -07:00
Aashna Garg 2d68d33f42 Fix router model selection: filter available_models, remove same-provider override, iterate candidates
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
2026-04-16 10:31:45 -07:00
Ulugbek Abdullaev f563e5b84c Add reverse-agreement rebase for NES cache behind experiment flag (#310793)
* 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.
2026-04-16 17:20:02 +00:00
Martin Aeschlimann 3b7a361194 chat customizations: add ChatResourceEnablement (#310212)
* chat customizations: add ChatResourceEnablement

* update

* filter by sessionTypes

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

* inline ChatResourceEnablement

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

* update

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

* update

* revert version change

---------

Co-authored-by: Copilot <copilot@github.com>
2026-04-16 17:18:45 +00:00
Don Jayamanne 8b883105ca Enhance Copilot CLI session management and permissions handling (#310495)
* Enhance Copilot CLI session management and permissions handling

* Update src/vs/workbench/contrib/chat/browser/chatSessions/chatSessions.contribution.ts

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

* Update extensions/copilot/src/extension/chatSessions/copilotcli/node/copilotcliSession.ts

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

* updates

* Fixes

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-04-16 09:31:33 +00:00
Justin Chen c47cdd79dd better handling of too many images in chat (#310437)
* 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
2026-04-16 10:32:09 +02:00
Vijay Upadya 602484ad5f Chronicle - local and remote (#308602)
* 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
2026-04-16 10:31:39 +02:00
Bhavya U f5b4ab4cdb Consolidate reasoning effort override for evals into a single advanced setting (#310517)
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.
2026-04-16 06:44:04 +00:00
Anisha Agarwal 866d1d88eb Telemetry: add RequestId and ConversationId to toolCallDetails and response.success events (#310281)
add requestId and conversationId to relevant events
2026-04-16 06:05:38 +00:00
Bhavya U ca3b9bfb2f Remove dead serverToolCalls / IServerToolCall code (#310470)
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
2026-04-15 22:21:47 -07:00
Don Jayamanne 4ab3ca5546 chore: update @github/copilot to version 1.0.28 (#310378)
* chore: update @github/copilot to version 1.0.28

* updates
2026-04-15 21:14:21 -07:00
Don Jayamanne 1f636954ac copilotcli: Enhance permission handling in Copilot CLI (#310359)
* Enhance permission handling in Copilot CLI

* Updates

* updates

* Fixes

* Fix issues

* add tests
2026-04-15 19:37:04 -07:00
Bhavya U d75a4078ce Remove server-side tool search and consolidate on client-side tool_search (#310343)
- 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
2026-04-16 00:59:37 +00:00
Tyler James Leonhardt 070960a87d feat: implement ClaudeCodeFolderMruService for managing recently used folders (#310349)
This will help us adopt SessionOptionGroupBuilder
2026-04-15 17:23:02 -07:00
Luciana Abud c622ad5b09 Merge pull request #310291 from microsoft/witty-eel
Disable chat experiments if VS Code experiments are disabled via setting
2026-04-15 16:04:51 -07:00
luabud c53b47c368 Disable chat experiments if VS Code experiments are disabled via setting 2026-04-15 15:29:26 -07:00
Zhichao Li 4594ce7dd6 Update extensions/copilot/src/extension/otel/vscode-node/otelContrib.ts
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-04-15 15:08:03 -07:00
Zhichao Li f8cc2d60e9 Prompt reload when OTel settings change 2026-04-15 15:03:18 -07:00
Aashna Garg 34754a86b5 Merge pull request #308321 from abadawi591/abadawi/send-has-image-to-router
Abadawi/send has image to router
2026-04-15 14:34:16 -07:00
Zhichao Li a4ba36894b Merge pull request #310213 from microsoft/zhichli/otel-genai-message-format
fix: normalize OTel message JSON to GenAI semantic conventions
2026-04-15 14:24:11 -07:00
Connor Peet e5c1c730d5 tools: move testFailure tool to core (#310201)
* tools: move testFailure tool to core

It had some outdated instructions and used a worse reporting format than the built-in tool. Migrate to core.

* fix

* fix
2026-04-15 20:48:09 +00:00
Ulugbek Abdullaev 62edfd476c nes: cursor line divergence: add tests (#310107) 2026-04-15 20:17:57 +00:00
Zhichao Li 2f618341b8 fix: guard toSystemInstructions in chatMLFetcher too 2026-04-15 13:02:43 -07:00
Zhichao Li ff64fa13b0 fix: address review feedback - guard empty system instructions, skip empty content 2026-04-15 12:58:19 -07:00
Zhichao Li dfc5c46cf0 fix: normalize OTel message JSON to GenAI semantic conventions
- Add normalizeProviderMessages() to convert provider-specific message
  formats (Anthropic tool_use/tool_result, OpenAI tool messages) to
  OTel GenAI standard types (tool_call, tool_call_response)
- Fix tool_call_response to use 'response' field per OTel spec (was 'content')
- Wrap gen_ai.system_instructions in OTel JSON schema format
  [{ type: 'text', content: '...' }] instead of raw plain text
- Apply normalization in genAiEvents.ts and chatMLFetcher.ts
- Fix Anthropic and Gemini BYOK providers to capture tool_call and
  tool_call_response parts in input messages (was text-only)
- Add .playwright-mcp to .gitignore

Fixes #299931
Fixes #306746
2026-04-15 12:56:38 -07:00
dileepyavan 66be4fa334 Refactoring labels. (#310199)
* Fix Responses API assistant history content type

* Update extensions/copilot/src/platform/endpoint/node/responsesApi.ts

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

* Update extensions/copilot/src/platform/endpoint/node/test/responsesApi.spec.ts

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

* Update Responses API assistant history test

* updating labels

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-04-15 19:29:05 +00:00
Tyler James Leonhardt b0a5faba75 Implement fallback folder resolution for Claude sessions in FolderRepositoryManager (#310193)
* Implement fallback folder resolution for Claude sessions in FolderRepositoryManager

By making CopilotCLI logic more generic.

* feedback
2026-04-15 18:36:59 +00:00
Sandeep Somavarapu 5ba065d91e fix deleting/renaming multi chat sessions (#310174)
* fix deleting multi chat sessions

* fix multi chat session issues

* fix tests
2026-04-15 18:30:45 +00:00
Anthony Kim 23e042ff73 Fix Copilot CLI terminal profile launch for non-default shells (#310006)
* Fix Copilot CLI terminal profile launch for non-default shells (fish, Git Bash, custom profiles, etc)

* retrun parentehsis

* better follow terminLEnvironment

* Make sure to cover windows for powershell well

* addres feedback on fish

* clean up non null asesrtion

* add support for windows

* use git bash converter from terminal suggest code

* comment should be less verbose

* better qaulity comments
2026-04-15 18:11:59 +00:00
Logan Ramos 0dcf0529d4 Support custom HTML hovers in model picker (#310146)
* Support custom HTML hovers in model picker

* Address review comments
2026-04-15 17:52:19 +00:00
Christof Marti 0ca67ba958 Use model id from endpoint which is always set (#298236) 2026-04-15 14:19:55 +02:00
Don Jayamanne e65c9a5d5a fix(copilotcli): update rebuildInputState to handle selectedFolderUri (#310068) 2026-04-15 19:41:20 +10:00
Don Jayamanne 93a9f739a4 feat(copilot): add configuration for showing external sessions (#310078)
* feat(copilot): add configuration for showing external sessions

* Updates

* Updatse

* Update extensions/copilot/src/extension/chatSessions/vscode-node/copilotCLIChatSessionsContribution.ts

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

* Fix tests

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-04-15 07:58:42 +00:00
Martin Aeschlimann bf8712457a use IPromptsService to provide customizations (#309873)
* use IPromptsService to provide customizations

* update

* update

* update

* update

* Update extensions/copilot/src/platform/promptFiles/test/common/mockPromptsService.ts

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

* update

* dispose MockPromptsService

* update

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-04-15 00:40:03 -07:00