* 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.
* 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
- 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.
* 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>
* 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>
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.
* 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.
* 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>
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#317998Fixes#317992
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.