Commit Graph

3702 Commits

Author SHA1 Message Date
Matt Bierner b8598f90cb Merge pull request #313311 from mjbvz/dev/mjbvz/main-quail
Include the `isAvailable` check in the codebase timeout
2026-04-29 13:41:24 -07:00
Matt Bierner 3b7dc50c85 use null 2026-04-29 12:31:51 -07:00
Matt Bierner d3119d4419 Include the isAvailable check in the codebase timeout 2026-04-29 12:06:32 -07:00
Christof Marti 6691e81993 Add modeChanged to request telemetry (#312554) 2026-04-29 21:06:17 +02:00
Aashna Garg 8ee6428137 Merge pull request #313132 from microsoft/aashnagarg/router-restricted-telemetry
Add availableModels to routerDecisionRestricted telemetry
2026-04-29 11:29:00 -07:00
Matt Bierner dfbb962031 Merge pull request #313272 from mjbvz/dev/mjbvz/yeasty-whitefish
Make sure we get files in stable order for external ingest checkpoint
2026-04-29 11:14:35 -07:00
Connor Peet 1321b30541 Merge pull request #313266 from microsoft/connor4312/state-cleanup
agentHost: drop the agent event abstraction
2026-04-29 10:51:59 -07:00
Matt Bierner 8b4ca97442 Merge pull request #313269 from mjbvz/dev/mjbvz/latin-wildebeest
Reuse existing ingest operation if files haven't changed
2026-04-29 10:36:40 -07:00
Matt Bierner 230f242a9c Make sure we get files in stable order for external ingest checkpoint
We should make this explicit

Co-authored-by: Copilot <copilot@github.com>
2026-04-29 10:26:27 -07:00
Matt Bierner 003f366336 Simplify
Co-authored-by: Copilot <copilot@github.com>
2026-04-29 10:11:36 -07:00
Matt Bierner 1257035bb1 Reuse existing ingest operation if files haven't changed
We already handled the case where an ingest had completed. This makes it so that any ongoing ingests also should reuse the existing operation

Co-authored-by: Copilot <copilot@github.com>
2026-04-29 10:06:12 -07:00
Matt Bierner 9b74dd466c Merge pull request #313133 from microsoft/dev/mjbvz/copilot-eslint-unify
Use root eslint for copilot
2026-04-29 09:55:27 -07:00
Connor Peet 52333822f6 Merge remote-tracking branch 'origin/main' into connor4312/state-cleanup 2026-04-29 09:55:20 -07:00
Megan Rogge 21b99b6c8a Resolve parent directory when realpath fails with ENOENT in edit confirmation (#313252) 2026-04-29 16:04:41 +00:00
Harald Kirschner 380d7101a2 telemetry: add workspaceChunkSearch.tryInit event for cold-init tracking (#313127)
* telemetry: add workspaceChunkSearch.tryInit event for cold-init tracking

Adds telemetry to track duration and outcome of workspace chunk search
cold initialization (getPreferredType + service creation). Records
success, noEmbeddingType, alreadyInitialized, or error outcomes.
Not fired for fast paths (no auth, already initialized).

Related: microsoft/vscode#313070

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

* fix: type outcome as string literal union per review

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

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-04-29 09:02:07 -07:00
Tyler James Leonhardt 8244e9b00c Refactor Claude Agent core code (#313163)
* handle steering the way the SDK wants it (via priority)
* pass along properties via the queued request (rather than setting them when we get the message) so that we can set them when the message is to be yielded to the SDK
* Tons of code simplification

There's still more simplification to do... but this is getting unwieldy so let's start here.

Co-authored-by: Copilot <copilot@github.com>
2026-04-29 08:45:44 -07:00
Martin Aeschlimann 21ef72b45b add pluginUri and extensionId to ICustomizationItem: fix slash command qualification (#313217)
* add pluginUri and  extensionId to ICustomizationItem: fix slash command qualification

* Update src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostLocalCustomizations.ts

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

* update

* update

* update

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-04-29 15:35:37 +00:00
Johannes Rieken cf647dbc0e chore: move inline chat stuff around (#313242)
feat: add inline chat progress messages and prompts for user feedback
2026-04-29 17:14:52 +02:00
Matt Bierner 75d676cce9 Merge branch 'main' into dev/mjbvz/copilot-eslint-unify 2026-04-29 08:00:31 -07:00
Ulugbek Abdullaev 344028732a nes: feat: ghost-text-like behavior (#313206)
* nes: feat: ghost-text-like behavior

* adddresss review
2026-04-29 15:35:21 +02:00
Johannes Rieken c76e907f98 make v2 default mode for inline chat (#313184)
* remove old inline chat from extension

* refactor: remove deprecated inline chat V2 configuration and related checks

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

* refactor: update context keys for inline chat and clean up unused variables

* address copilot review: fix typo and rename forInlineAndInlineChatIntent

---------

Co-authored-by: Copilot <copilot@github.com>
2026-04-29 12:50:58 +02:00
shaypet 0e01add334 Add compareBranch to TitleAndDescriptionProvider for enhanced PR context (#312326)
* feat: add compareBranch to TitleAndDescriptionProvider for enhanced PR context

* feat: enhance PR description to include escaped compare branch name

* Update extensions/copilot/src/extension/prompts/node/github/pullRequestDescriptionPrompt.tsx

Co-authored-by: Alex Ross <38270282+alexr00@users.noreply.github.com>

* feat: update pull request user message to include escaped compare branch name

---------

Co-authored-by: Alex Ross <38270282+alexr00@users.noreply.github.com>
2026-04-29 12:23:45 +02:00
Bhavya U 224020150a Filter non-deferred tools from Responses tool search output (#313169) 2026-04-29 07:41:50 +00:00
Zhichao Li b1c43e9589 Merge pull request #313138 from microsoft/zhichli/otel-tool-definitions
OTel: include tool parameters and emit tool definitions on child chat spans
2026-04-28 19:28:08 -07:00
Paul 161a11c507 Update style for chat input notification to latest design (#313137) 2026-04-29 01:14:41 +00:00
Zhichao Li c78e55e3a4 Address review: truncate tool definitions and clarify normalizer JSDoc
- Wrap GenAiAttr.TOOL_DEFINITIONS / tools_available toolDefinitions in truncateForOTel to avoid exceeding the 64KB OTel attribute cap with large tool catalogs.

- Drop misleading tool_search variant from toToolDefinitions JSDoc; the implementation requires a name and emits type:'function', so OpenAI client-side tool_search entries are intentionally skipped.
2026-04-28 17:07:57 -07:00
Aashna Garg 12b11d299c Add availableModels to routerDecisionRestricted telemetry
The router decision restricted event logs candidateModels (router
output) but not the input model pool sent to the router. Without
this field we cannot determine whether per-SKU CoGS differences
come from different input pools vs different routing decisions.

Add availableModels as a JSON-stringified array of the model
identifiers passed in the available_models request body field.
2026-04-28 15:45:47 -07:00
Matt Bierner 371c4a0a73 Use root eslint for copilot 2026-04-28 15:20:59 -07:00
dileepyavan b5f0a81fbb On agent mode change, ignore stateful marker (#312951)
* on agent mode change, ignore stateful marker

* updates to modechange
2026-04-28 15:19:22 -07:00
Zhichao Li b1206355fa fix: include tool parameters and emit tool definitions on chat spans
- toolCallingLoop emits tool definitions with parameters (tool inputSchema) on the agent span and tools_available event, per OTel GenAI semantic conventions (fixes #300318).

- chatMLFetcher and BYOK providers (anthropic, gemini) now also set gen_ai.tool.definitions on each chat {model} child span so trace viewers can render the tool catalog per LLM call (fixes #299934).

- toToolDefinitions normalizer extended to handle OpenAI Responses API, Anthropic input_schema, and VS Code inputSchema shapes.
2026-04-28 15:13:21 -07:00
Justin Chen 4d6223ba24 disable ask questions tool for autopilot (#313090) 2026-04-28 14:14:58 -07:00
yemohyleyemohyle ffc280ded2 Yemohyle/add to telemetry (#311837)
* add last asst messages logs

* add last asst messages logs ...

* add last asst messages logs ....

* add last asst messages logs .....

* add assistant messages added logs

* ...

* add tokens info

* add parentHeaderrequestId value to subagent telemetry

* remove debug logging

* Apply suggestion from @Copilot

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

* suggested change

* extra verification

* revert suggested change

* remove debug logs

* add cashed tokens to Legasy SSE path

---------

Co-authored-by: Yevhen Mohylevskyy <yevhenmohylevskyy@Yevhens-MacBook-Pro-2.local>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-04-28 17:59:04 +00:00
Zhichao Li 757e7d3724 Merge pull request #312929 from zhichli/zhichli/mcp-traceparent-sep414
MCP: forward W3C traceparent to servers via _meta (SEP-414)
2026-04-28 07:56:36 -07:00
Tyler James Leonhardt ffadbb00d0 Clean up some parameters and stuff in Claude (#312946)
* Clean up some parameters and stuff in Claude

Just some debt.

* fix tests
2026-04-27 22:46:50 -07:00
Paul b712765852 Add support for usage-based billing (#312892) 2026-04-28 02:37:05 +00:00
Vijay Upadya 00680fde6d Add GDPR tag to capi.assignmentcontext (#312933)
Co-authored-by: Copilot <copilot@github.com>
2026-04-27 17:54:53 -07:00
Zhichao Li b804497dc2 Support OTel GenAI gen_ai.response.time_to_first_chunk attribute
The CLI runtime is migrating from the vendor-prefixed
github.copilot.time_to_first_chunk attribute to the OTel GenAI
semconv attribute gen_ai.response.time_to_first_chunk. Both encode
TTFT in seconds. The sqlite store's _ttftMs() now reads either
name (preferring the new one) so we keep populating ttft_ms before,
during, and after the runtime rollout.

Adds two unit tests: one for the new attribute alone, one verifying
the new attribute wins when both are present.

Refs:
  https://github.com/open-telemetry/semantic-conventions/pull/3607
  https://github.com/github/copilot-agent-runtime/pull/6949
2026-04-27 16:57:25 -07:00
Pierce Boggan 0b4fc3e2ad Fix Copilot CLI /remote session prompt handling (#312874)
* Fix Copilot CLI remote session prompts

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

* Fix user_query sanitization

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

* Fix remote ask-user session cleanup

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

* Fix Copilot Linux lint failure

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

* Fix remote ask-user answer sync

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

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-04-27 17:35:14 -06:00
Zhichao Li a106aa680d Address PR feedback: preserve trace flags/state, plumb inbound $invokeTool
- TraceContext now carries optional traceFlags + traceState (W3C); the real
  OTel impl populates them so the built traceparent reflects the upstream
  sampling decision instead of hardcoding '01'.
- toolsService: build traceparent with the actual flag, forward tracestate.
- extHostLanguageModelTools.$invokeTool: deliver traceparent/tracestate to
  extension-implemented tools for symmetry with outbound $invokeTool.
- Reword toolsService comment so it matches the unconditional behavior.
2026-04-27 16:33:54 -07:00
Zhichao Li 1810e63dd1 Forward W3C traceparent to MCP servers via _meta (SEP-414)
Plumb the active execute_tool span's W3C traceparent through
LanguageModelToolInvocationOptions and IMcpToolCallContext, then inject
it into the JSON-RPC tools/call payload's _meta so MCP server-side spans
can be parented to the client trace.

Refs #302301
2026-04-27 16:22:28 -07:00
Bhavya U 0910f0dea3 Enable tool search for Claude Opus 4.6/4.7 1M context models (#312913) 2026-04-27 22:43:36 +00:00
Vijay Upadya 09d54a6849 Add /chronicle:reindex command to rebuild local session index from JS… (#312905)
* Add /chronicle:reindex command to rebuild local session index from JSONL logs

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

* Address feedback

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

---------

Co-authored-by: Copilot <copilot@github.com>
2026-04-27 15:34:04 -07:00
Zhichao Li 51e531ab6f Merge pull request #310878 from microsoft/zhichli/claudeOtel
Add OTel tracing for Claude agent sessions
2026-04-27 15:31:12 -07:00
Bhavya U d025ee4199 fix: handle BudgetExceededError after background compaction re-render (#312901)
* fix: handle BudgetExceededError after background compaction re-render

When the initial render throws BudgetExceededError and a completed
background compaction is applied, the re-render was unprotected. If
the compacted prompt still exceeds the budget (e.g. many MCP tools
consuming token space, or cache breakpoints preventing pruning), the
BudgetExceededError propagated uncaught and crashed the chat with
'No lowest priority node found'.

Now the re-render is wrapped in a try-catch that falls back to
renderWithoutSummarization (full budget, no cache breakpoints) on
BudgetExceededError, with telemetry outcome 'appliedButReRenderFailed'
to track how often this path is hit.

Fixes #311407

* fix: update telemetry for background compaction outcomes and re-render handling
2026-04-27 14:31:29 -07:00
Zhichao Li bb13080fa9 refactor: extract ClaudeOTelTracker from ClaudeCodeSession 2026-04-27 14:14:41 -07:00
Zhichao Li 6e32d80c1d feat(monitoring): update cache token usage metrics for accuracy and clarity
feat(tracing): rename hook_name attribute to hook_command for better context
fix(agent): clear subagent trace contexts after request completion
2026-04-27 14:14:40 -07:00
Zhichao Li 8c2b6f0737 feat(tracing): update span name in handleHookStarted for improved clarity 2026-04-27 14:14:39 -07:00
Zhichao Li 2072d5fa13 feat(tracing): refine span name in handleHookStarted for clarity 2026-04-27 14:14:39 -07:00
Zhichao Li 685ca6ca28 feat(tracing): update hook started span attributes for improved telemetry 2026-04-27 14:14:38 -07:00
Zhichao Li c9807ed451 feat(telemetry): simplify Claude OTel environment configuration by removing beta tracing and content capture variables 2026-04-27 14:14:37 -07:00