Repository navigation
Conversation
Setup already offers both as first-party coding agents, but the bar widget only lights up for Claude, Codex, and Fireworks. Ship collectors that print the existing record contract, Grok's official mark, and size provider pills to their labels so longer names still fit.
Contributor
There was a problem hiding this comment.
Pull request overview
Adds Grok and OMP usage collectors to the agents panel.
Changes:
- Collects Grok sessions, billing limits, and balances.
- Aggregates OMP’s local SQLite usage statistics.
- Adds Grok branding and wrapping provider controls.
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 7 out of 11 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
bin/omarchy-agent-usage-grok |
Implements Grok usage collection. |
bin/omarchy-agent-usage-omp |
Implements OMP database collection. |
shell/plugins/agents/Panel.qml |
Makes provider pills wrap. |
shell/plugins/agents/manifest.json |
Enables Grok and OMP. |
shell/plugins/agents/README.md |
Documents both collectors. |
shell/plugins/agents/assets/grok.svg |
Adds dark-surface Grok mark. |
shell/plugins/agents/assets/grok-light.svg |
Adds light-surface Grok mark. |
manual/17-ai.md |
Lists the new providers. |
test/shell.d/agent-usage-grok-scanner-test.sh |
Tests Grok collection. |
test/shell.d/agent-usage-omp-scanner-test.sh |
Tests OMP collection. |
test/shell.d/agents-panel-test.sh |
Tests wrapping provider controls. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
3 of 4 tasks
Member
|
Automated duplication check: this pull request looks similar to #9498, which covers the same Grok usage collector. I keep that one open and close this one to consolidate review. If you feel this is the wrong decision, please open the PR again with a note on the difference. |
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.
Summary
Setup already offers Grok and OMP as first-party coding agents, but
omarchy.agentsnever lights up for them. Collectors are discovered from$OMARCHY_PATH/bin/omarchy-agent-usage-*; there was no Grok or OMP one.This adds
omarchy-agent-usage-grokandomarchy-agent-usage-omp. Both print the record contract the panel already understands.There are several open Grok-only collector PRs (#7200, #6485, #6902, #7393, #8280, #6477). None of them are merged, and none add OMP. This patch covers both.
Change
$GROK_HOME/sessions(default~/.grok/sessions). Billed usage is onupdates.jsonlturn_completedrows (nestedusage, or flat token fields /event_name). Cache read is split out of input.session_kindvalues that start withsubagentare skipped so parent totals are not counted twice._x.ai/billing(grok agent --no-leader stdio), the same source/usageuses. A SuperGrok weekly (or monthly) pool becomeslimits[]. Leftover prepaid / on-demand credits become abalanceonly when the ledger is actually non-zero. SuperGrok Heavy often omitscreditUsagePercent; the collector does not invent a 0% meter.~/.omp/stats.db(or$OMP_HOME/stats.db), grouped by day and model. No subscription limits.assets/grok.svg(and a-lighttwin) use the official Grok mark. The bar glyph still stands in without them.Tests
test/shell.d/agent-usage-grok-scanner-test.sh— nested and flat turn ledgers, cache split, prompt_id dedupe, subagent skip, empty install, weekly/monthly mapping, zero prepaid omit, leftover credits, missing percent.test/shell.d/agent-usage-omp-scanner-test.sh— empty install, message/session/token totals, per-model buckets, local scope.test/shell.d/agents-panel-test.sh— provider switch no longer forces equal-width cells.Verified live on Grok 1.0.5 / SuperGrok Heavy and a populated OMP
stats.db.