Repository navigation
terminal: offer optional Copilot CLI installation on macOS - #341982
Merged
Don Jayamanne (DonJayamanne) merged 2 commits intoOct 16, 2026
Merged
Don Jayamanne (DonJayamanne) merged 2 commits into
Don Jayamanne (DonJayamanne) merged 2 commits into
Conversation
Extend the macOS PATH action with a localized Copilot opt-in and run the shipped shim in a local terminal without waiting for installation to finish. Reuse shim discovery and installation while preserving normal launch, other-platform behavior, policy gates, and existing shell-command metadata. Add regression coverage and documentation. Follow-up to #341667. Co-authored-by: Copilot <[email protected]>
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
Two platform-dependent path expectations fail on Windows; live installation validation also remains outstanding.
1 open finding
What changed in this PR
Extends the macOS Shell Command action with optional Copilot CLI installation using the existing native shim.
Changes:
- Adds a localized, default-No prompt with policy gating and cancellation.
- Adds macOS install-only shim behavior without launching Copilot afterward.
- Adds regression coverage and documents installation behavior.
| File | Description |
|---|---|
| src/vs/workbench/electron-browser/desktop.contribution.ts | Removes legacy install-action registration. |
| src/vs/workbench/contrib/terminal/test/electron-browser/terminalInstallActions.test.ts | Tests prompts, gating, terminals, and failures. |
| src/vs/workbench/contrib/terminal/electron-browser/terminalInstallActions.ts | Implements optional installation and palette labels. |
| src/vs/workbench/contrib/terminal/electron-browser/terminal.contribution.ts | Registers the macOS action. |
| copilot_shim/tests/pty.rs | Tests interactive installation and cancellation. |
| copilot_shim/tests/app.rs | Tests existing-CLI detection without launch. |
| copilot_shim/src/runtime.rs | Updates policy-enforcement comments. |
| copilot_shim/src/app.rs | Implements and tests macOS install-only dispatch. |
| copilot_shim/SHIM_POST_INSTALL.md | Documents install-only and PATH behavior. |
| copilot_shim/REQUIREMENTS.md | Defines action behavior and command contracts. |
🧠 Review effort: Balanced
💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Select Yes by default in the optional macOS installation picker and update its documented behavior. Normalize both expected executable paths with URI.file(...).fsPath so the tests match the native Windows path format. Addresses the path assertion review on #341982. Co-authored-by: Copilot <[email protected]>
Don Jayamanne (DonJayamanne)
marked this pull request as ready for review
October 16, 2026 10:14
Don Jayamanne (DonJayamanne)
enabled auto-merge (squash)
October 16, 2026 10:14
Contributor
📬 CODENOTIFYThe following users are being notified based on files changed in this PR: Anthony Kim (@anthonykim1)Matched files:
|
Dmitriy Vasyura (dmitrivMS)
approved these changes
Oct 16, 2026
Don Jayamanne (DonJayamanne)
deleted the
don/agents/install-code-insiders-with-copilot-04a3283c
branch
October 16, 2026 10:18
Don Jayamanne (DonJayamanne)
added a commit
that referenced
this pull request
Oct 17, 2026
Distinguish newly installed and existing Copilot CLI installations, retain the discovered executable location, and show the terminal's localized close-on-keypress hint after completion. Preserve the existing install picker and setting checks. Follow-up to #341982. Co-authored-by: Copilot <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Summary
Follow-up to #341667.
code/code-insidersname and existing command ID.--vscode-shim install --interactive, reusing existing discovery and Homebrew/official-script installation without repeating the shim consent prompt or launching Copilot afterward.Validation
Passed on macOS arm64:
cargo test --locked --manifest-path copilot_shim/Cargo.tomlcargo fmt --manifest-path copilot_shim/Cargo.toml --checknpm run build-fast -- --client-only./scripts/test.sh --reporter dot --run src/vs/workbench/contrib/terminal/test/electron-browser/terminalInstallActions.test.tsnpm run typecheck-clientnpm run precommit -- copilot_shim/REQUIREMENTS.md src/vs/workbench/contrib/terminal/electron-browser/terminalInstallActions.ts src/vs/workbench/contrib/terminal/test/electron-browser/terminalInstallActions.test.tsnpm run valid-layers-checkgit diff --checkSix isolated Code OSS Dev UI checks also passed: combined command title before extension activation, Yes/No with Yes initially active, keyboard focus/accessibility attributes, Escape cancellation, and command-title gating with Copilot CLI or AI disabled. Settings checks used a controlled reload.
Both executable-path fixtures were also checked using the actual VS Code URI/path helpers in isolated
darwinandwin32contexts: the original literals mismatch on Windows, while the corrected expectations match on both platforms. This is a platform simulation, not a native Windows test run.Validation limits
Installer tests use temporary HOME/PREFIX/PATH and fake installer tools. No real Copilot download/install, shell-profile changes, or native administrator prompt was exercised. Local validation did not include native Windows/Linux or Intel macOS runs, live remote/Agents-window flows, or VoiceOver output.