Skip to content

feat: add Windows Copilot CLI support with cliArgs and .bat/.cmd handling#7

Merged
digitarald merged 1 commit intomainfrom
feat/windows-cli-support
Feb 15, 2026
Merged

feat: add Windows Copilot CLI support with cliArgs and .bat/.cmd handling#7
digitarald merged 1 commit intomainfrom
feat/windows-cli-support

Conversation

@digitarald
Copy link
Copy Markdown
Owner

Summary

Adds Windows support for Copilot CLI discovery and execution, addressing .cmd/.bat wrapper spawning issues with Node.js execFile().

Inspired by pierceboggan/primer#7. See also: microsoft/vscode#291990

Changes

src/services/copilot.ts - refactored CLI discovery and execution:

  • New CopilotCliConfig type replacing bare string return
  • findCopilotCliConfig() with Windows-first search: npm-loader.js, PATH, static VS Code paths, glob
  • buildExecArgs() helper handles .bat/.cmd via cmd /c and cliArgs passthrough
  • cacheConfig() deduplicates repeated cache assignment pattern
  • Windows npm-loader.js detection uses process.execPath for reliable Node resolution
  • Glob patterns use brace expansion for Windows extension coverage

src/services/instructions.ts, evaluator.ts, evalScaffold.ts - updated CopilotClient instantiation to pass cliConfig directly.

@digitarald digitarald marked this pull request as ready for review February 15, 2026 23:00
@digitarald digitarald merged commit f2791b8 into main Feb 15, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant