Commit Graph
414 Commits
Author SHA1 Message Date
Rohit Agrawal - MSFT 3bf9306bd0 Record CAPI X-GitHub-Copilot-Request-Te on GitHub telemetry events (#339087)
* Record CAPI X-GitHub-Copilot-Request-Te on GitHub telemetry events

* PR feedback changes
2026-10-01 16:28:44 -07:00
Giuseppe Cianci c1ce6113b8 chat: preserve reasoning across turns and custom providers (#338874)
* chat: preserve earlier-turn reasoning for opted-in models

Honor preserved-thinking capabilities in both Copilot and extension-contributed endpoints. Enable Kimi K3 by default and support per-model opt-in or opt-out while retaining same-model and Messages API safeguards.

Fixes #338820. Verified with red-green request serialization tests and 607 targeted tests.

* chat: carry reasoning protocol capabilities through model API

Declare the selected provider API and adaptive-thinking mode across language-model registration and selection. Unknown protocols no longer bypass the Messages safeguard, and extension-contributed endpoints honor family aliases when choosing the preserved-thinking default.

Address both CCR findings on #338874 with custom-provider red-green regressions and API transport coverage.

* chat: tolerate hosts without reasoning protocol API

Feature-detect the proposed model protocol enum during provider registration and endpoint construction. Published Insiders used by Copilot CI may predate the API; leave their protocol unknown to preserve replay safeguards.

* chat: preserve reasoning state through custom providers

Request opaque reasoning state from custom providers and retain it when a thinking completion marker arrives. Recognize the documented k3 and k3-256k aliases while preserving protocol-specific replay policy and explicit model overrides.

Add streaming regressions for stateless Responses and signed Messages, and cover both K3 aliases across the two history renderers. Refs #338820.
2026-10-01 15:36:29 +02:00
Dirk Bäumer f2abb9c2d3 Support continuous reads and improve session management (#338380)
* Support continuous reads

* Remove adjusted read requests if grep result is not managing it anymore

* Improve adjustment code

* Improve reservation code

* Only emit event if a session is evicted

* More telemetry

* Add setting to package.json

* Refactor code for readability

* Fix test
2026-09-28 16:00:26 +00:00
13dcab03b6 Skip content exclusion checks for apply_patch Add File (#337324)
* Fix apply_patch Add File content exclusion

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

* Reject apply_patch adds to existing files

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

* Fix apply_patch typecheck

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

---------

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Logan Ramos <lramos15@gmail.com>
2026-09-24 16:04:16 +00:00
Dileep Yavanmandha 7f9e1f90bb Updating default prompts (#336859)
updating default prompts
2026-09-19 00:16:45 +00:00
Dileep Yavanmandha 6182a6ebe7 Refactoring prompts for openAI models (#336196)
Agent Host changes for agents/replace-hiddenmodel-n-with-gpt-6
2026-09-15 20:29:45 -07:00
copilot-swe-agent[bot]andaeschli bd41432b04 Fix symlinked workspace file permissions
Co-authored-by: aeschli <6461412+aeschli@users.noreply.github.com>
2026-09-15 09:11:53 +00:00
Dirk Baeumer 548a4a8ecb Refactor GrepResultService to use constant for maximum session limit in cache 2026-09-11 17:41:48 +02:00
Dirk Baeumer 99f25da447 Increase session URI limit in GrepResultService tests to enhance coverage 2026-09-11 17:35:11 +02:00
Dirk Baeumer 3eb73a54c5 Enhance GrepResultService to limit memory usage and improve session management
- Cap maximum grep results per session to 16 to optimize memory usage.
- Update SessionMatches constructor to accept sessionUri.
- Modify addGrepResult to handle eviction of least recently used sessions and fire events for removed results.
- Add unit test to verify behavior when the least recently used session is removed.
2026-09-11 17:27:31 +02:00
Dirk Baeumer 7d3409d7bc Performance optimizations 2026-09-10 21:44:18 +02:00
Dirk Baeumer 0b0b34303f Address Copilot comments 2026-09-10 21:10:22 +02:00
Dirk Baeumer 0f525cd6dd Update grep result handling to include session URI and improve event firing 2026-09-10 19:05:01 +02:00
Dirk Bäumer d536fa603e Add node paths for telemetry in region context (#334320)
* Add node paths to the region for telemetry purpose

* Address CCRs
2026-09-03 17:47:58 +00:00
Dirk Bäumer ff8ef0b06d Send language ID for read file telemetry (#334231) 2026-09-03 11:34:51 +00:00
vs-code-engineering[bot]andvs-code-engineering[bot] af195aabe8 [cherry-pick] Refactor model capabilities (#334179)
Co-authored-by: vs-code-engineering[bot] <vs-code-engineering[bot]@users.noreply.github.com>
2026-09-03 08:01:42 +02:00
Dirk BäumerandCopilot Autofix powered by AI e6094c9396 Add GrepResultService and RegionContextProviderService implementations (#333727)
* First cut of GrepResultService

* Wire up a TS7 implementation

* WIP

* WIP

* WIP

* Add TS6 implementation

* WIP

* WIP

* Align implementation

* Polish telemetry and fix tests

* Potential fix for pull request finding

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

* Potential fix for pull request finding

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

* Enable developer action only for typescript and javascript

* More review comments fixed

* Handle dispose correctly

* Correct parent for property access

---------

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
2026-09-01 10:14:25 +00:00
Connor PeetandCopilot b2774de5d7 copilot: validate apply patch move destinations (#332804)
* copilot: validate apply patch move destinations

Checks each source and move destination before the tool creates edits.

- Reuses resolved paths for text and notebook edit generation.
- Adds tests for blocked and allowed move destinations.

(Commit message generated by Copilot)

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

* copilot: check move destinations with proposed contents

Evaluates destination rules against the content that the move will write.

- Passes optional contents through the ignore service.
- Avoids path verdict caching for proposed content checks.
- Adds coverage for content rules on new destination paths.

(Commit message generated by Copilot)

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

* copilot: use test string style

Uses the extension test suite's required single-quoted string style in the move patch fixture.

(Commit message generated by Copilot)

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

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-08-26 19:50:22 +00:00
Connor PeetandCopilot dc51f4a3ae chat: require confirmation for .mcp.json and .npmrc edits (#332639)
* chat: require confirmation for .mcp.json edits

Updates edit approval patterns so edits to `.mcp.json` require user confirmation in both edit execution paths.

- Adds `.mcp.json` to the standard chat edit confirmation patterns.
- Adds `.mcp.json` to the agent host edit confirmation patterns.
- Extends focused tests for both edit execution paths.

(Commit message generated by Copilot)

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

* agentHost: test .mcp.json path casing

Adds `.mcp.json` to the existing non-canonical casing coverage for protected edit paths.

(Commit message generated by Copilot)

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

* chat: always confirm .npmrc edits

Treat .npmrc files as non-overridable protected edit targets in both chat approval paths, with root and nested-path coverage.

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

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-08-26 02:28:24 +00:00
roblourensandCopilot d0686fe12d Remove unused code (#332219)
* Remove unused code

Delete unreachable helpers, stale notebook styles, and obsolete compatibility aliases across workbench and Copilot code. (Written by Copilot)

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

* Update chat input type comment

Remove the stale reference to deleted compatibility aliases. (Written by Copilot)

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

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-08-24 02:42:32 +00:00
Martin Aeschlimann 611c5dfed2 local harness: simplity checking for external resources (#331816)
* local harness: simplity checking for external resources

* fix test
2026-08-20 16:12:57 +00:00
Martin Aeschlimann 680caf21e4 warn when reading linked files (#331799)
* warn when reading symlinked files

* fix windows tests
2026-08-20 15:12:45 +00:00
Martin Check 09b07fe400 chat: avoid splitting surrogate pairs in read_file (#331005) 2026-08-16 07:59:52 +00:00
Bhavya U a5944fe94f Enable tool search for Claude Haiku 4.5 and Sonnet 5 (#328662)
Anthropic's tool search compatibility table lists Haiku 4.5 as supported,
but the capability gate denied all Haiku. Sonnet 5 and Mythos 5 were also
missing from the tool's model picker list.
2026-08-03 05:17:22 +00:00
Bhavya UandCopilot 9ccad27a28 Enable tool search for GPT models and add deferThreshold setting (#328136)
* Enable tool search for GPT models and add deferThreshold setting

- Uncomment GPT-5.4/5.5/5.6 support in agentHostModelSupportsToolSearch
- Add chat.agentHost.copilot.toolSearch.deferThreshold setting (default 1)
- Fix system instruction: generic 'use tool search' instead of backtick-quoted tool_search_tool name that doesn't exist in OpenAI Responses API
- Fix tool search description: generic 'deferred tools list' instead of extension-specific availableDeferredTools tag name
- Floor fractional threshold values to prevent runtime fallback to 30

* Address tool search review feedback

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

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-07-31 11:32:32 -07:00
Arthur Cnops eb699a8ed4 Voice: answer question carousels by voice (#327899) 2026-07-29 18:18:51 +00:00
Vijay Upadya 7d6473ca69 Compress large telemetry properties with gzip chunked columns (#327490)
* Compress large telemetry properties with gzip chunked columns

* feedback updates

* Fix continuous telemetry sender test for async best-effort send
2026-07-27 19:41:29 +00:00
Bhavya U a7fa33e78a Add Claude Opus 5 system prompt (#327410)
* Add Claude Opus 5 system prompt

Adds a minimal Opus 5 prompt behind `chat.claudeOpus5Prompt.enabled`,
following Anthropic's guidance for the Claude 5 generation: describe the
environment as facts rather than rules, put the behavioral weight into
scope and correction guidance, and drop the rule lists the model now
handles with its own judgement. Off by default, falling back to the
Claude 4.6 Opus prompt.

Also:
- Remove the Opus 4.8 and Sonnet 5 prompts and their settings. Both
  models now use the Claude 4.6 prompts.
- Add comment-etiquette guidance to the shared optimized reminder, so it
  reaches every Claude 4.6+ family rather than a single prompt.
- Enable tool search for claude-opus-5.

* Reword Opus 5 prompt to remove borrowed phrasing

The prompt had picked up wording from a reference system prompt during
drafting. Rewrites every affected passage in original wording, keeping
the guidance intact. Verified no shared word sequence of five or more
remains between the branch's added lines and that reference.
2026-07-24 23:09:33 +00:00
Paul 4224780376 Update edit permissions (#327199) 2026-07-23 21:00:49 +00:00
c6b3beee5e Add tool search to Copilot agent host (#326213)
* Add tool search to Copilot agent host

* Address review: alias-aware tool-search gating, drop transient candidates, cover prompt branch

- Compute the tool-search capability decision from the family-aliased model in
  both the launcher and CopilotAgentSession so an aliased preview model is no
  longer rejected and the two stay in agreement.
- Strip the transient tool-search candidate corpus from the completed tool
  call's _meta so repeated searches don't bloat synchronized session state or
  persist across reconnects.
- Add active/inactive + composition tests for the tool-search prompt line at
  both the unit and prompt-registry layers, plus a model-family alias
  regression test for tool-search gating.

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

* Remove obsolete tool-search start barrier

* Address tool-search review feedback

* Use the extension's existing tool-embedding cache for Agent Host search

* Address review: keep server tools eager, harden tool-search candidate corpus

- Force server-provided SDK tools to defer:'never' so they stay eager and are
  not deferred behind tool_search.
- Default missing candidate descriptions to '' when building the tool-search
  corpus, so the all-or-nothing metadata reader never drops a valid corpus.
- Drop the unused inputSchema field from the tool-search candidate corpus
  (name + description are all the embeddings ranker consumes).
- Use the client-facing tool name in the custom-tool auto-approve membership
  check so a deferred tool_search runtime name resolves correctly.
- Remove a redundant conjunct in _clientToolName already implied by
  _isToolSearchActive().

* Potential fix for pull request finding

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

* Potential fix for pull request finding

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

* Temporarily disable GPT tool search

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
2026-07-23 18:06:31 +00:00
Logan Ramos bc38398417 Make sub agents implemented as tools render as subagents (#326867) 2026-07-21 19:40:57 +00:00
Dirk Baeumer c08cf69cd3 Update default in code. 2026-07-20 20:40:50 +02:00
Dirk Bäumer 9d65f09189 Add defaultMaxResults parameter to FindTextInFilesTool options (#324733) 2026-07-07 10:57:29 +00:00
Dirk Bäumer 36984a011c Replace hard coded values with dynamic methods (#324709)
Replace hard coded values
2026-07-07 10:13:09 +00:00
Dirk Bäumer 2d0877ddee Make grep the new default search tool output format (#324186) 2026-07-03 10:06:31 +00:00
Dirk Bäumer 132a773459 Enhance telemetry for findTextInFilesTool with requested max results (#323892)
* Enhance telemetry for findTextInFilesTool with requested max results

* Fix telemetry maxResults parameter handling in FindTextInFilesTool

* Fix GDPR comment
2026-07-01 16:44:27 +00:00
Dirk Bäumer 2a8040d14f Enhance telemetry for FindTextInFilesTool (#323737)
Enhance telemetry for FindTextInFilesTool: include default max results and cap
2026-06-30 17:28:02 +00:00
Dirk Bäumer 33dec983b5 Make max results configurable (#323729)
* Make max results configurable

* Define settings in package.json

* Sanitize config values
2026-06-30 15:19:33 +00:00
Bhavya UandCopilot 2e52a6b834 Update model capabilities (#322237)
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-06-21 00:21:22 +00:00
Bhavya U d778afd715 Fix tool_search for GPT models; scope tool_search to deferred tools (#322235)
getAvailableTools(): skip virtual-tool grouping for any tool-search-capable endpoint (not just Anthropic). Previously GPT-5.4/5.5 ran virtual-tool grouping AND responses-API client tool search simultaneously, so real MCP tools were hidden behind activate_* groups (or trimmed) and never appeared in the request's tools map - making them searchable via tool_search but not callable.

toolSearchTool: exclude always-available (non-deferred) tools from the tool_search candidate set so the limited result slots only go to tools that actually need loading.

Fixes #317998
Fixes #317992
2026-06-20 22:44:38 +02:00
Dirk Bäumer 19afd815d6 Fix long line rendering for grep style output (#321938)
* Fix long line problem

* WIP

* Revert tag style to original code.
2026-06-18 08:28:58 -07:00
Martin AeschlimannandCopilot Autofix powered by AI 83535b58f9 Move ComputeAutomaticInstructions to extension (#314402)
* Move ComputeAutomaticInstructions to extension

* Potential fix for pull request finding

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

* update missing fullReferenceName

* update

* update

* update

* update

* update

* Remove ComputeAutomaticInstructions migration plan document

* Potential fix for pull request finding

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

* Potential fix for pull request finding

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

* Potential fix for pull request finding

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

* Potential fix for pull request finding

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

* Potential fix for pull request finding

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

* update

---------

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
2026-06-16 19:51:49 +00:00
Dirk Bäumer 1e1a9a7af1 Optimize grep output and enhance configuration (#321601)
* Optimize grep output

* WIP

* Fix algorithm to honor maxResults

* Add output format to telemetry

* Improve boolean check
2026-06-16 23:35:07 +10:00
Bhavya U 1a8ef07a81 Update tool calling prompts and tests (#320906) 2026-06-11 08:01:46 +00:00
Bhavya U 1e79f161ce Add claude-opus-4.8 to tool search model list (#320473) 2026-06-08 14:31:13 -07:00
Vijay Upadya 5fd263f7d0 Chronicle: consolidate /chronicle standup into the skill workflow (#320031)
* Chronicle: consolidate /chronicle standup into the skill workflow

* fix test
2026-06-05 13:34:47 +10:00
Vijay Upadya b365ecd0b8 Chronicle: per-subcommand telemetry attribution for sessionStoreSql tool (#319054)
chronicle: per-subcommand telemetry attribution for sessionStoreSql tool

Add a 'subcommand' enum input on copilot_sessionStoreSql so each /chronicle slash command (standup, tips, cost-tips, search, improve, reindex) tags its tool calls. Plumb it through _invokeQuery/_invokeStandup/_invokeReindex and emit it on the chronicle.sqlQuery telemetry event (with 'unknown' for ad-hoc model calls). Also add command/target/success dimensions while preserving the legacy 'source' value so existing dashboards keep working. Update each chronicle-*.prompt.md to instruct the model to set the subcommand on every call.
2026-05-29 21:16:38 +00:00
guomaggie 8544893480 [Search Subagent] Handle context window limit exceeded error (#316529)
* truncate and retry tool calls

* keep visibility of getEndpoint

* address code review comments

* fix ci errors

* address code review comments

* add testing

* address code review comments
2026-05-27 21:50:51 +00:00
Vijay Upadya ba999257bb Chronicle cost-tips: scope to interactive VS Code chat with explicit opt-in for other agent surfaces (#318625)
* Chronicle cost-tips: scope to VS Code chat sessions

* add test
2026-05-27 20:30:22 +00:00
Vijay Upadya d96a3c83b7 Chronicle: handle undefined CapturingToken in execution_subagent (#318503)
* Chronicle: handle undefined CapturingToken in execution_subagent

* minor update
2026-05-27 05:02:01 +00:00