Skip to content

fix: detect GitHub Copilot CLI via copilot binary and ~/.copilot - #338

Open
chencen-cz wants to merge 1 commit into
MinishLab:mainfrom
chencen-cz:fix/copilot-detection
Open

chencen-cz wants to merge 1 commit into
MinishLab:mainfrom
chencen-cz:fix/copilot-detection

Conversation

@chencen-cz

Copy link
Copy Markdown

Summary

Fixes GitHub Copilot detection in semble install so GitHub Copilot CLI (and the GitHub Copilot desktop app) are properly detected.

Problem

In src/semble/installer/agents.py, the copilot AgentTarget had:

  • binary=None (missing "copilot" binary lookup on PATH)
  • config_dir=_HOME / ".config" / "github-copilot" (legacy IDE/Vim path), whereas mcp and subagent_path already target ~/.copilot/....

As a result, users running GitHub Copilot CLI (whose config directory is ~/.copilot) saw GitHub Copilot listed as undetected during semble install.

Changes

  • Set binary="copilot" on the copilot AgentTarget.
  • Added _copilot_config_dir() (mirroring _xdg_jsonc_path()) to check ~/.copilot first and fall back to legacy ~/.config/github-copilot for backwards compatibility.
  • Added unit tests in tests/test_installer.py verifying binary="copilot", ~/.copilot preference, and ~/.config/github-copilot fallback.

Verification

  • pytest tests/test_installer.py — 104 passed
  • ruff check src/semble/installer/agents.py tests/test_installer.py — all checks passed
  • mypy src/semble/installer/agents.py — no issues found

- Set binary="copilot" on the GitHub Copilot AgentTarget so installations on PATH are detected
- Add _copilot_config_dir() preferring ~/.copilot (matching mcp and subagent paths) while falling back to legacy ~/.config/github-copilot
- Add unit tests covering binary detection, ~/.copilot preference, and legacy fallback

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@chencen-cz
chencen-cz force-pushed the fix/copilot-detection branch from 7348a95 to 1ca62a1 Compare December 2, 2026 03:06

This branch has not been deployed

No deployments
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