Pull Request Overview
- Opened on October 21, 2026
- Status Merged
- Commit count 3 with first commit October 21, 2026
Total Delta
Open Days
Test Delta
How long has this pull request spent in each phase of its lifecycle?
| Fraction of total time | Business days | Phase |
|---|---|---|
|
|
0.5 days | Authoring 2 commits before pull request opened for review |
|
|
0.0 days | Awaiting first review |
|
|
9.0 days | Merge to deploy (still awaiting deployment) |
Total time for pull request
0.5 business days
from first commit authored to merge
Still awaiting deployment
agentHost: add a macOS permission setup modal for Computer Use
Why
Computer Use currently asks for macOS Accessibility and Screen Recording with a new question card at every step. This PR replaces those cards with one setup modal. It shows the verified state of both permissions and lets the waiting task continue once both are on.
What changed
- The local macOS Agent Host turns the plugin's permission prompts into one setup per waiting turn and publishes it as
vscode.computerUse.status. Clients act throughvscode.computerUse.request, and chat shows one card that opens the modal. - The Agent Host checks Accessibility again as soon as macOS posts
com.apple.accessibility.api, so the row turns on without a click. - For the System Settings step, the modal offers the helper app as a native drag into the permission list, plus Show in Finder. It shows the app's own icon, read from its
.icnsfile.
Scope
- Covers macOS desktop windows for local Copilot sessions. Other clients and hosts keep the plugin's questions, and no Agent Host Protocol types change.
- Screen Recording is still checked when the window regains focus, because macOS reports that grant only to a new process.
- A real mouse drag into System Settings and a real Accessibility toggle are untested. Live checks posted the notification by script.
Tradeoffs
- Polling the plugin's permission check was rejected. Its helper treats the Agent Host as an untrusted parent and shows an alert on every connection.
- Electron's
app.getFileIconreturns at most 64 px and hung the main process at the large size, so the Agent Host reads the PNG from the app's icon file.
Blast Radius
Chat shows the setup card only for the local Agent Host in a macOS window. IDialogOptions.renderIcon and INativeHostService.startFileDrag change nothing until a caller uses them, and the main process listens for one macOS notification while the Agent Host runs.
Verification
- Tests, types and layers pass:
sh
./scripts/test.sh --run src/vs/platform/agentHost/test/common/computerUse.test.ts --run src/vs/platform/agentHost/test/node/copilotComputerUsePlugin.test.ts --run src/vs/platform/agentHost/test/node/copilotComputerUsePermissionSetup.test.ts --run src/vs/workbench/contrib/chat/test/browser/agentSessions/computerUseSetupDialog.test.ts --run src/vs/base/test/browser/ui/dialog/dialog.test.ts # 46 passing
./scripts/test.sh --run src/vs/platform/agentHost/test/node/agentService.test.ts # 1306 passing, 16 pending
./scripts/test.sh --run src/vs/platform/agentHost/test/node/copilotAgent.test.ts --run src/vs/platform/agentHost/test/node/copilotAgentSession.test.ts --grep "[Cc]omputer [Uu]se|ComputerUse" # 16 passing
npm run typecheck-client # passed
npm run valid-layers-check # passed
ESLint, Stylelint and the pre-commit hygiene check report nothing on the changed files. - Drove the real modal in Code OSS against a live Agent Host through the first round, a running step, the System Settings step, an error, ready and ended. Tab reaches every control. Outlines measure about 1.3:1 against the dialog in the default light and dark themes, and high contrast themes use their contrast border.
- To try it on macOS, turn on
chat.agentHost.computerUse.enabled, run/computer onin a local Copilot chat, and ask it to use an app. Set Up Computer Use in the Command Palette opens the modal any time.
Comments Threads Pending Resolution
Resolved Comment Threads
No resolved comments have been left on this PR.
> [!WARNING]
> Copilot couldn't run its full agentic review because it didn't start before the timeout. Make sure your repository has a runner available, or add a `copilot-code-review.yml` file specifying one with the `runs-on` attribute. See the [docs](https://gh.io/AA11tgch) for more details.
## Copilot review overview
3 open issues
-
[When `renderIcon` is provided, the dialog still sets an `aria-label` derived from the dialog…](https://github.com/microsoft/vscode/pull/343308#discussion_r4340826712) · New
[If `readIcon()` ever rejects (despite the interface contract), `_readingHelperAppIcon` will remain…](https://github.com/microsoft/vscode/pull/343308#discussion_r4340826830) · New
[`app.getFileIcon(...)` and/or `webContents.startDrag(...)` can throw/reject (e.g. transient FS…](https://github.com/microsoft/vscode/pull/343308#discussion_r4340826882) · New
-
-
What changed in this PR
Adds a macOS-specific “Computer Use” permission setup flow that replaces repeated plugin prompts with a single setup modal, plus the supporting host/client plumbing to publish status, request actions, and improve UX around Accessibility / Screen Recording.
**Changes:**
- Introduces a Computer Use setup service + modal UI (including helper-app drag-to-System Settings support) and wires it into chat rendering.
- Adds a new native host API to start a native file drag, plus macOS Accessibility trust-change reporting to re-verify automatically.
- Adds schema/metadata readers and extensive tests for the new status/request contract and UI behavior.
| File | Description |
| ---- | ----------- |
| src/vs/workbench/test/electron-browser/workbenchTestServices.ts | Extends test native host service with `startFileDrag` API surface. |
| src/vs/workbench/contrib/chat/test/browser/agentSessions/stateToProgressAdapter.test.ts | Adds coverage for restoring Computer Use setup requests as settled cards. |
| src/vs/workbench/contrib/chat/test/browser/agentSessions/computerUseSetupDialog.test.ts | New tests for the Computer Use setup modal view/panel/dialog behavior. |
| src/vs/workbench/contrib/chat/test/browser/agentSessions/agentHostChatContribution.test.ts | Adds tests for rendering the setup card and opening the modal via service. |
| src/vs/workbench/contrib/chat/electron-browser/chat.contribution.ts | Registers helper-app contribution in electron chat contribution. |
| src/vs/w...