Commit Graph

156088 Commits

Author SHA1 Message Date
Zhichao Li 52947bbc19 OTel: replace string literals with typed constants
- 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.
2026-04-29 16:37:36 -07:00
Kyle Cutler fbce3ede57 Support browser context attachment (#313315)
* Support browser context attachment

* feedback
2026-04-29 15:27:53 -07:00
Connor Peet c4ffdb5da7 Merge pull request #313301 from microsoft/connor4312/ah-plan-mode
agentHost: implement plan and native autopilot modes
2026-04-29 15:23:26 -07:00
Justin Chen 06d480b4f9 ask question tool in autopilot always returns user unavailable message (#313331) 2026-04-29 22:03:05 +00:00
Martin Aeschlimann 44dda2c61e add enabled property to ICustomAgent (#313328)
* add enabled property to ICustomAgent

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

* update

* update

---------

Co-authored-by: Copilot <copilot@github.com>
2026-04-29 14:58:40 -07:00
Michael Lively 41499ac00a ci: drop VSCODE_OSS token conditional from pr.yml compile job (#313314)
Follow-up to #313128. The VSCODE_OSS fallback isn't needed for the
api.github.com calls in core-ci — secrets.GITHUB_TOKEN already
authenticates those reads with permissions: contents: read (added in
#304929), so we don't hit the anonymous rate limit on 1ES.
2026-04-29 14:41:25 -07:00
Connor Peet f1def1447c update 2026-04-29 14:39:25 -07:00
Rob Lourens 9cd698c36b Sync built-in skills to agent hosts and add skill buttons (#313277)
* 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>
2026-04-29 21:36:05 +00:00
Matt Bierner af74f12920 Merge pull request #313329 from microsoft/dev/mjbvz/arbitrary-ant
Revert to previous vscode-markdown-languageserver
2026-04-29 14:29:44 -07:00
Connor Peet 93711c3a70 test and tweak to ap answer 2026-04-29 14:27:57 -07:00
Justin Chen 81b30fce9e gradient input button in regular chat panel too (#313306) 2026-04-29 14:10:56 -07:00
Tyler James Leonhardt f5e05a0253 chore: migrate agent-browser to @playwright/cli (#313316)
* 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.
2026-04-29 20:55:11 +00:00
Matt Bierner 7317d8ad1a Merge pull request #313308 from microsoft/dev/mjbvz/equal-cougar
Enable external ingest for non-file resources too
2026-04-29 13:42:19 -07:00
Megan Rogge 6a826ef129 Remove set -e guidance from all shells and prevent reusing dead terminals (#313313) 2026-04-29 13:41:50 -07:00
Matt Bierner e35f3c6e4d Merge branch 'main' into dev/mjbvz/arbitrary-ant 2026-04-29 13:41:38 -07:00
Megan Rogge ade6340a22 Recover from terminal hangs when shell integration breaks or the pty exits (#313312) 2026-04-29 13:41:37 -07:00
Joaquín Ruales 9d9b679f33 Update CODENOTIFY with more integrated browser items (#313212) 2026-04-29 13:41:26 -07:00
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
Connor Peet e8848aa993 comments and polish 2026-04-29 13:14:42 -07:00
Josh Spicer de1f8b14f7 fix updating active harness wrt customizations (#313289) 2026-04-29 12:53:34 -07:00
Josh Spicer 60cabe81c5 hide unsupported customizations categories in Agents app (harness-based) (#313278)
* hide unsupported customizations categories in Agents app (harness-based)

* Fix mock harness descriptor icons

Agent-Logs-Url: https://github.com/microsoft/vscode/sessions/ce93aa65-5ce5-43c9-92bf-a0fc1b9d0150

Co-authored-by: joshspicer <23246594+joshspicer@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
2026-04-29 12:53:31 -07:00
Matt Bierner 3b7dc50c85 use null 2026-04-29 12:31:51 -07:00
Paul c28b221bde UBB styling fixes (#313304) 2026-04-29 19:27:25 +00: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
Matt Bierner 3cb650cc2d Enable external ingest for non-file resources too
Fixes #313281

Gate was mainly to help reduce noise on initial rollout
2026-04-29 12:04:15 -07:00
Justin Chen c1ba1db8aa add spacing between profile and update button (#313294) 2026-04-29 19:02:55 +00:00
Connor Peet e8825bfd05 Merge remote-tracking branch 'origin/main' into connor4312/ah-plan-mode 2026-04-29 11:52:39 -07:00
Connor Peet 75ec86b07f agentHost: implement plan and native autopilot modes 2026-04-29 11:43:46 -07: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
Megan Rogge 82326bc012 Specify max chars in askQuestions tool description, don't truncate (#313280)
Specify max chars in askQuestions tool description, drop question truncation

Fixes #312726
2026-04-29 18:25:14 +00: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
Michael Lively 7a833e177b ci: switch PR workflows back to 1ES self-hosted runners with JobId (#313128)
* ci: switch PR workflows back to 1ES self-hosted runners with JobId

Re-applies #311975 (reverted in #312033). Adds per-run+attempt JobId
labels to scope 1ES agents to specific GitHub Actions runs and prevent
intermittent runner cancellations.

Also switches the pr.yml compile job's GITHUB_TOKEN from the
ephemeral repo-scoped runner token to secrets.VSCODE_OSS so cross-repo
GitHub API release fetches (vscode-js-debug, vscode-js-debug-companion,
vscode-js-profile-visualizer, etc.) authenticate properly. On 1ES pools
the shared egress IPs hit the anonymous 60/hr api.github.com rate limit
and produced 403 fan-out across PRs last time.

* ci: fall back to GITHUB_TOKEN for fork PRs

Match the historical pattern from before #255987 — fork PRs can't
access secrets.VSCODE_OSS, so use the conditional to pick GITHUB_TOKEN
for forks.
2026-04-29 10:51:12 -07:00
Rob Lourens 35edb04454 Re-parse agent host history prompts to revive slash decorations (#313158)
* Re-parse agent host history prompts to revive slash decorations

When restoring an agent host session (local `agent-host-*` or remote
`remote-*`), historical prompts were wrapped in a single ChatRequestTextPart,
losing decorations for slash commands, prompt slash commands (e.g. /skill),
and agent mentions.

Re-run the prompt through ChatRequestParser for agent host sessions so
decorated parts are revived in the UI. Falls back to a plain text part on
parse failure or empty parse result.

Also moves `isAgentHostTarget` from the browser layer into common (where
ChatService lives), with a re-export from the browser file for existing
callers.

Adds two snapshot tests for /skill parsing covering both the forcedAgent +
supportsPromptAttachments path and the no-agent fallback.

(Written by Copilot)

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

* Hoist empty references/tool map to avoid per-history-item allocations

Address Copilot review feedback on #313158.

(Written by Copilot)

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

* Source attachmentCapabilities from chat session contribution

Agent-host providers register capabilities via registerChatSessionContribution,
but that programmatic path does not create an IChatAgentData with those
capabilities. Look them up via IChatSessionsService.getCapabilitiesForSessionType
instead so /skill etc. are revived in restored history.

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

(Written by Copilot)

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-04-29 17:41:15 +00: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
Connor Peet c5c6407374 comments and tests 2026-04-29 10:25:23 -07:00
Raymond Zhao 72751c9adf fix: write key even if source exists (#312902)
Fixes #311713

---------

Co-authored-by: Copilot <copilot@github.com>
2026-04-29 19:22:51 +02:00
Lee Murray 37383337f5 Merge pull request #313246 from microsoft/mrleemurray/agent-account-menu-polish
Agents: Refactor account menu and chat status dashboard for improved UI
2026-04-29 18:22:06 +01: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
Ladislau Szomoru fabf9dc21e Agents - refactor GitHub models and polling logic (#313261)
* Add GitHub PR review threads model

* Cache GitHub PR review thread models

* Use PR review threads model in code review

* Keep GitHub PR model refresh lightweight

* Complete PR review threads validation checklist

* Saving my work

* Limit PR review polling to active session

* Refactor CodeReviewService to only poll the model for the active session

* Add GitHub PR polling lifecycle

* Refactor the logic that polls

* Use pull request head SHA for CI checks

* More fixes in

* Fix  bug + tests

* More test cleanup
2026-04-29 17:01:11 +00:00
Kyle Cutler 129ffaba5a Support prompting the user to share an existing browser tab (#313256)
* Support prompting the user to share an existing browser tab

* feedback

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

---------

Co-authored-by: Copilot <copilot@github.com>
2026-04-29 09:58:45 -07:00
Martin Aeschlimann 3bf522af17 add ChatSessionCustomizationType.userInvocable (#313260)
* add ChatSessionCustomizationType.userInvocable

* Update src/vs/workbench/contrib/chat/browser/aiCustomization/promptsServiceCustomizationItemProvider.ts

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

* Update src/vs/workbench/contrib/chat/common/customizationHarnessService.ts

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

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-04-29 16:57:33 +00:00
Raymond Zhao d1ce2fc8c8 chore: remove cleanup step (#313264) 2026-04-29 16:56:37 +00: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
Connor Peet 2a5c152b65 agentHost: drop the agent event abstraction
We had a separate representation of agent events in the agent host that
were usually mostly just the same as the protocol events/state. And we
had steps to map to and from in various places which added to code and
implementation complexity. Remove it.
2026-04-29 09:52:36 -07:00
Matt Bierner a8ed6f83b7 Revert to previous vscode-markdown-languageserver
This new version causes issues in the production build only. Fix is in https://github.com/microsoft/vscode-markdown-languageserver/pull/18 but reverting for now
2026-04-29 09:48:37 -07:00