Skip to content

copilot: append the Copilot shim to the terminal PATH - #338931

Merged
Karthik Nadig (karthiknadig) merged 1 commit into
packaging/vscode-with-copilotfrom
karthiknadig/copilot-shim-append-path
Sep 30, 2026
Merged

Karthik Nadig (karthiknadig) merged 1 commit into
packaging/vscode-with-copilotfrom
karthiknadig/copilot-shim-append-path

Conversation

@karthiknadig

Copy link
Copy Markdown
Member

b284dd5b991 changed the extension to put the Copilot shim's folder at the front of the integrated terminal PATH (contributePath(..., true)). The shim then came before the user's own PATH in every integrated terminal.

Change

  • Append again: the extension appends the shim's folder to the terminal PATH again, the same way Windows setup appends {app}\bin\copilot-shim to the user PATH.
    • A Copilot CLI already on the user's PATH is found by the shell directly.
    • The shim answers copilot only when nothing else on PATH does.
    • Copilot-created terminals are unaffected, because they run the shim by its full path.
  • Docs: REQUIREMENTS.md now says the folder is appended.

Merging with #338927

#338927, which makes the extension use the shipped shim, is independent of this PR. I merged both branches locally: they merge cleanly and the specs pass (40 tests).

Validation

  • copilotCLITerminalIntegration.spec.ts passes (27 tests).
  • tsc --noEmit -p extensions/copilot/tsconfig.json and eslint pass on the changed files.

The extension had switched to prepending the shim's folder to the integrated
terminal PATH, so the shim came before the user's own PATH. Append it again,
as Windows setup does, so a Copilot CLI already on PATH is found first.

Co-authored-by: Copilot <[email protected]>
@karthiknadig
Karthik Nadig (karthiknadig) merged commit 781767e into packaging/vscode-with-copilot Sep 30, 2026
3 checks passed
@karthiknadig
Karthik Nadig (karthiknadig) deleted the karthiknadig/copilot-shim-append-path branch September 30, 2026 20:51
@vs-code-engineering vs-code-engineering Bot added this to the 1.141.0 milestone Sep 30, 2026
@vs-code-engineering vs-code-engineering Bot locked and limited conversation to collaborators Nov 14, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants