Add GitHub Copilot CLI support#38
Open
t1gu1 wants to merge 2 commits into
Open
Conversation
added 2 commits
June 5, 2026 04:08
Contributor
Author
|
Please if you can merge that PR first -> #40 I care less about the copilot cli one and it will be easier to fix conflict for me. Merci 🙏🏻 |
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.
Why
Added
copilot-clicause some are using it.I was thinking about adding
gemini-clitoo, but it is migrating toantigravity-cliso i'll wait for that one.Added
copilot-clijoinsclaude-code-cli,codex-cli, andopencode-cliin theAIProviderunion. It piggybacks on the user's locally-installedcopilotbinary and their GitHub Copilot subscription — no API key required. Detection mirrors the existing CLI providers (binary discovery across PATH + common install locations) and it appears in Settings → AI with the same status/re-detect pattern. Prompts run one-shot viacopilot -p(model selectable via the per-provider model picker, free-text since Copilot has no enumeration command). Tool permissions are deliberately restricted (--deny-tool=shell,--deny-tool=write,--no-ask-user, andCOPILOT_ALLOW_ALLstripped from the child env) so Copilot only produces text and cannot edit files, run shell commands, or block on interactive prompts.Technical
detect_copilot_cliandcopilot_cli_prompt(copilot --no-color --deny-tool=shell --deny-tool=write --no-ask-user [--model …] -p <prompt>), plus aCopilotCliInfotype; registered inlib.rs. Mirrored across all three layers:commands/ai.rs,dev-server.mjs, and thebackend-ai.tswrapper.useAIProvideraddscopilot-clitoCLI_AGENT_PROVIDERS, dispatches it insuggest()/rawPrompt(), and forwards the per-provider model.SettingsPanelgains the provider option, detection state, and status block.aiProviderCopilotCli,aiProviderCopilotCliNotFound,aiCopilotCliDetectedHint,aiCopilotCliInfoBoxacross all five locales (en, fr, es, pt-BR, zh-CN).useAIProvider-opencode.test.tsfor the Copilot dispatch and model fallback.