Skip to content

Add GitHub Copilot collector to the agents panel - #7893

Closed
gustavobragac wants to merge 2 commits into
omacom:quattrofrom
gustavobragac:copilot-agent-usage
Closed

gustavobragac wants to merge 2 commits into
omacom:quattrofrom
gustavobragac:copilot-agent-usage

Conversation

@gustavobragac

Copy link
Copy Markdown

Adds omarchy-agent-usage-copilot alongside claude/codex/fireworks: reads the OAuth token the official Copilot editor/CLI plugins already keep under ~/.config/github-copilot/ and calls the same copilot_internal/user endpoint those clients use, so it works for personal, Business, and Enterprise/EMU seats alike (the public billing API 400s a PAT on org-managed seats). Falls back to that public billing API via a githubToken in ~/.config/omarchy/agents/copilot.json for a personal account with no editor signed in.

Copilot has no local session files to read the way Claude Code and Codex do, so the tab is limits-only: the account's metered quota (labelled "AI Credits" on Business/Enterprise plans), with the raw used/entitlement count folded into the row title since the panel's limit rows have no separate count field.

Also ships assets/copilot.svg (+ -light twin), sourced from Simple Icons' GitHub Copilot mark, and registers the provider in the panel's manifest defaults, README, and the AI manual page.

Tested live against a Business/EMU seat. ./test/cli passes clean.

Adds omarchy-agent-usage-copilot alongside claude/codex/fireworks: reads the
OAuth token the official Copilot editor/CLI plugins already keep under
~/.config/github-copilot/ and calls the same copilot_internal/user endpoint
those clients use, so it works for personal, Business, and Enterprise/EMU
seats alike (the public billing API 400s a PAT on org-managed seats). Falls
back to that public billing API via a githubToken in
~/.config/omarchy/agents/copilot.json for a personal account with no editor
signed in.

Copilot has no local session files to read the way Claude Code and Codex do,
so the tab is limits-only: the account's metered quota (labelled AI Credits
on Business/Enterprise plans), with the raw used/entitlement count folded
into the row title since the panel's limit rows have no separate count field.

Also ships assets/copilot.svg (+ -light twin), sourced from Simple Icons'
GitHub Copilot mark, and registers the provider in the panel's manifest
defaults, README, and the AI manual page.
Copilot AI balanced review requested due to automatic review settings August 23, 2026 13:50

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds GitHub Copilot quota reporting to the agents panel.

Changes:

  • Adds a Copilot usage collector with OAuth and PAT fallbacks.
  • Registers Copilot with themed icons.
  • Documents configuration and panel support.

Tip

If you aren't ready for review, convert to a draft PR.
Click "Convert to draft" or run gh pr ready --undo.
Click "Ready for review" or run gh pr ready to reengage.

Reviewed changes

Copilot reviewed 3 out of 6 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
bin/omarchy-agent-usage-copilot Collects Copilot quota data.
shell/plugins/agents/manifest.json Enables the provider by default.
shell/plugins/agents/README.md Documents Copilot configuration.
shell/plugins/agents/assets/copilot.svg Adds the dark-surface icon.
shell/plugins/agents/assets/copilot-light.svg Adds the light-surface icon.
manual/17-ai.md Lists Copilot panel support.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread shell/plugins/agents/README.md Resolved
The standalone copilot CLI is not an editor plugin and does not share
~/.config/github-copilot/ with VS Code/JetBrains/copilot.vim — its binary
has no reference to that path, only COPILOT_HOME (~/.copilot/ by default).
Document that distinction instead of claiming the CLI is covered.

Addresses review feedback from github.com/omacom/pull/7893.
@gustavobragac

Copy link
Copy Markdown
Author

Closing this in favor of #7798, which covers the same collector plus the token/session stats (tokens by day, by model) that this PR explicitly couldn't provide — that data comes from ~/.copilot/session-store.db, the standalone CLI's local session store, which this PR didn't read at all.

One thing worth carrying over: while working on this I found that the standalone copilot CLI does not share ~/.config/github-copilot/ with the editor plugins — checked its binary directly, no reference to that path, only COPILOT_HOME. Left a note on #7798 since its quota code currently makes the same claim.

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.

2 participants