Skip to content

Add GitHub Copilot CLI support#38

Open
t1gu1 wants to merge 2 commits into
devlint:mainfrom
t1gu1:feat/copilot-cli-provider
Open

Add GitHub Copilot CLI support#38
t1gu1 wants to merge 2 commits into
devlint:mainfrom
t1gu1:feat/copilot-cli-provider

Conversation

@t1gu1
Copy link
Copy Markdown
Contributor

@t1gu1 t1gu1 commented Jun 5, 2026

Why

Added copilot-cli cause some are using it.
I was thinking about adding gemini-cli too, but it is migrating to antigravity-cli so i'll wait for that one.

Added

  • GitHub Copilot CLI as an AI providercopilot-cli joins claude-code-cli, codex-cli, and opencode-cli in the AIProvider union. It piggybacks on the user's locally-installed copilot binary 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 via copilot -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, and COPILOT_ALLOW_ALL stripped from the child env) so Copilot only produces text and cannot edit files, run shell commands, or block on interactive prompts.

Technical

  • New Rust commands detect_copilot_cli and copilot_cli_prompt (copilot --no-color --deny-tool=shell --deny-tool=write --no-ask-user [--model …] -p <prompt>), plus a CopilotCliInfo type; registered in lib.rs. Mirrored across all three layers: commands/ai.rs, dev-server.mjs, and the backend-ai.ts wrapper.
  • useAIProvider adds copilot-cli to CLI_AGENT_PROVIDERS, dispatches it in suggest() / rawPrompt(), and forwards the per-provider model. SettingsPanel gains the provider option, detection state, and status block.
  • i18n: aiProviderCopilotCli, aiProviderCopilotCliNotFound, aiCopilotCliDetectedHint, aiCopilotCliInfoBox across all five locales (en, fr, es, pt-BR, zh-CN).
  • Unit tests extended in useAIProvider-opencode.test.ts for the Copilot dispatch and model fallback.
image

@t1gu1
Copy link
Copy Markdown
Contributor Author

t1gu1 commented Jun 5, 2026

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 🙏🏻

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