- Add GenAiProviderName.GEMINI; switch geminiNativeProvider, anthropicProvider, copilotcliSession to use GenAiProviderName.* constants
- Add CopilotChatAttr.HOOK_TYPE/HOOK_INPUT/HOOK_OUTPUT/HOOK_RESULT_KIND, MODE_NAME, TOTAL_COST_USD; switch chatHookService, claudeMessageDispatch, copilotCliBridgeSpanProcessor, chatDebugFileLoggerService, otelSpanToChatDebugEvent, toolCallingLoop, claudeOTelTracker to use the new constants
- Add CopilotCliSdkAttr group for SDK-emitted hook attribute keys (github.copilot.hook.*); switch consumers in copilotCliBridgeSpanProcessor and otelSpanToChatDebugEvent
- Replace magic-number SpanStatusCode casts in copilotCliBridgeSpanProcessor with the enum members
- Expand otel barrel index.ts to re-export CopilotCliSdkAttr and previously-missing event helpers (emitEditFeedbackEvent, emitEditHunkActionEvent, emitInlineDoneEvent, emitEditSurvivalEvent, emitUserFeedbackEvent, emitCloudSessionInvokeEvent)
No behavior change.
* Sync built-in skills + add skill buttons for agent-host sessions
Brings back the UX from #311815 for the Agents window:
- Sync built-in prompts (e.g. /merge, /create-pr) into the local
agent-host customization bundle so agent-host sessions can run
the same slash commands as the Copilot CLI extension. The
enumeration helper now reads the BUILTIN_STORAGE bucket from
IPromptsService and includes those entries in the bundle pushed
to the harness, alongside workspace, user, and extension prompts.
- Add four skill buttons to the changes view of agent-host sessions:
Merge Changes, Create Pull Request, Create Draft Pull Request, and
Sync Pull Request. Each button dispatches the matching slash
command to the active session via IChatService, scoped to git +
GitHub state context keys so the right buttons appear at the right
time. The first registered button is hoisted as the primary blue
toolbar button; the rest live in the apply submenu.
- Suppress the duplicate Copilot CLI extension buttons (Commit, Sync,
Create PR, etc.) when the active session is an agent-host session,
clause in extensions/copilot/package.json. The check only narrows
the chatSessionType==copilotcli rows; claude-code rows are
unchanged.
- Mark the agent-host chat contribution supportsPromptAttachments so
/create-pr and friends parse as slash commands in the chat input.
Tests:
- agentHostSkillButtons.test.ts: action registration, context key
reactivity, when-clause coverage.
- enumerateLocalCustomizationsForHarness.test.ts: built-in skill
enumeration is folded into the bundle with BUILTIN_STORAGE.
- resolveCustomizationRefs.test.ts: built-in entries are resolvable
through the existing ref resolution path.
End-to-end verified manually: clicking 'Merge Changes' on a
debug-test agent-host session dispatches '/merge', the agent host
receives the slash command, expands the merge skill, and runs its
tool steps. Copilot CLI extension buttons are not visible on
agent-host sessions.
(Written by Copilot)
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* agent-host: read git.branchProtection in repo scope
The git.branchProtection setting is resource-scoped, so its value can
differ per workspace folder. Reading it without an override picked up
the host window's active workspace value instead of the session's own
repository value, which made the agent host show a Merge Changes button
for sessions whose repo had a protected main branch.
Pass the session's project URI as the resource override so we read the
setting in the scope of that folder.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* agent-host: register skill buttons from sessions main, drop stale comment
Move the skillButtons import to sessions.desktop.main.ts and
sessions.web.main.ts so it is wired in both desktop and web sessions
windows, instead of from the local-only contribution.
Drop the now-redundant comment on supportsPromptAttachments in the chat
session contribution registration.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* agent-host: register client filesystem provider for local in-process agent host
Previously, `vscode-agent-client://` was only registered for WebSocket
agent host transports (dynamic and env-var driven). The local in-process
utility-process agent host had no provider, so plugin syncs from the
renderer (used by `/create-pr`, `/merge` and other built-in skills) failed
with `ENOPRO`.
This wires the same reverse-RPC pattern over the existing MessagePort IPC:
* Renderer registers an `AgentHostClientResourceChannel` (server channel)
on its `MessagePortClient`, wrapping the renderer's `IFileService`.
* The renderer's clientId is now used as the IPC ctx so the agent host can
route reverse calls to a specific client.
* Agent host hoists `AgentHostClientFileSystemProvider` to a single shared
instance and, for utility-process IPC connections, registers an authority
per connection backed by the new channel.
Result: `vscode-agent-client://` URIs resolve identically for local and
remote agent hosts, the in-memory `vscode-synced-customization://` bundle
is reachable from the agent-host process, and built-in skills sync.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* agent-host: address Copilot review comments and fix branchProtection resource scope
- resourceList now throws when target URI is not a directory
- wrap BUILTIN_STORAGE listPromptFilesForStorage in try/catch so regular
workbench prompts service (which throws on unknown storage) is handled
- update test to model the throw case for regression coverage
- use workingDirectory ?? project.uri as resource for git.branchProtection
config lookup so worktree paths resolve the per-folder setting correctly
(Written by Copilot)
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
---------
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* chore: migrate agent-browser to @playwright/cli
Replace all uses of the `agent-browser` automation tool with `@playwright/cli`,
which supports `npx @playwright/cli attach --cdp=<port>` for connecting to
Electron/Chromium apps via CDP.
- Rewrite launch SKILL.md files (Code OSS and Copilot variants) with new
command mappings: attach --cdp, tab-list, snapshot, screenshot --filename,
fill, press
- Update auto-perf-optimize and chat-customizations-editor skills with
@playwright/cli commands; fix eval blocks to use IIFE syntax required by
the new tool
- Migrate testRemoteAgentHost.sh: connect→attach --cdp, snapshot -i→snapshot,
screenshot path→screenshot --filename=path; verified end-to-end with --skip-message
- Remove agent-browser from extensions/copilot/package.json (covered by root
devDependency); bump @playwright/cli to ^0.1.9 in root package.json
* fix: add @types/ws as explicit devDependency in copilot extension
Previously pulled in transitively via agent-browser -> webdriver.
Now that agent-browser is removed, @types/ws must be declared directly.
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>
* 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>
* 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>
The previous reverts only changed the spec to ^1.0.34, but the resolved entries in the lockfiles still pointed at 1.0.38 (with 1.0.38 tarballs and integrity hashes). Since ^1.0.34 satisfies 1.0.38, npm ci would still install the broken version. Pin to exact 1.0.34 in all three package.json files and regenerate the lockfiles.
* 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>
- 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.
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.
- 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.