Repository navigation
Add Cursor agent usage collector - #6604
rlimberger wants to merge 6 commits into
Conversation
There was a problem hiding this comment.
Pull request overview
Adds Cursor usage collection and meters-only display support to the agents panel.
Changes:
- Collects Cursor plan usage from its local credentials and usage API.
- Adds Cursor branding and enables the provider by default.
- Hides unavailable charts and consolidates shared reset times.
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 4 out of 7 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
bin/omarchy-agent-usage-cursor |
Implements the Cursor collector. |
test/shell.d/agent-usage-cursor-scanner-test.sh |
Tests credentials, mapping, validation, and API responses. |
shell/plugins/agents/Panel.qml |
Supports meters-only agents and shared reset headers. |
shell/plugins/agents/README.md |
Documents Cursor support and display behavior. |
shell/plugins/agents/manifest.json |
Enables and describes Cursor. |
shell/plugins/agents/assets/cursor.svg |
Adds the dark-surface Cursor mark. |
shell/plugins/agents/assets/cursor-light.svg |
Adds the light-surface Cursor mark. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Ship Cursor as an omarchy-agent-usage-* collector that writes the shared record contract (plan-pool meters, hasLocalStats false), plus panel polish to hoist a shared LIMITS reset and hide charts for meters-only agents. Co-authored-by: Cursor <[email protected]>
a15454a to
fa2db8a
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 4 out of 7 changed files in this pull request and generated no new comments.
Suppressed comments (1)
shell/plugins/agents/Panel.qml:642
- The required running-UI verification for this layout change is still unchecked in the PR test plan. Before merging, verify the shared reset header and per-row fallback in the live panel, including narrow widths and both Cursor and Claude states;
AGENTS.md:104-105requires visual changes to be inspected for clipping, overlap, spacing, and regressions.
Item {
width: parent.width
implicitHeight: Math.max(limitsHeaderLabel.implicitHeight, limitsHeaderResetText.implicitHeight)
PanelSectionHeader {
id: limitsHeaderLabel
text: "LIMITS"
foreground: root.foreground
fontFamily: root.fontFamily
anchors.left: parent.left
anchors.verticalCenter: parent.verticalCenter
}
Text {
id: limitsHeaderResetText
visible: text !== ""
text: root.limitsHeaderReset
color: root.dim
font.family: root.fontFamily
font.pixelSize: Style.font.caption
anchors.right: parent.right
// Match the header glyphs, not the padded box centre.
anchors.verticalCenter: limitsHeaderLabel.verticalCenter
anchors.verticalCenterOffset: Math.round(limitsHeaderLabel.topPadding / 2)
}
Give the hoisted reset countdown an explicit width and elide from the left so LIMITS and "Resets in …" stay separated on narrow panels. Co-authored-by: Cursor <[email protected]>
Map totalPercentUsed to an Included total meter and pass through Cursor's displayMessage so the panel matches the in-app usage summary. Co-authored-by: Cursor <[email protected]>
Cursor's displayMessage banner reads "You've hit your usage limit" even when total usage is ~49%; feeding it into usageStatusText turned the hero and status card red. Meters already carry the authoritative pools. Co-authored-by: Cursor <[email protected]>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 4 out of 7 changed files in this pull request and generated no new comments.
Suppressed comments (1)
shell/plugins/agents/README.md:25
- This provider list is incomplete: a successful Fireworks collection sets
hasLocalStatsto true and emitsrecentDays, so the panel also displays this chart for Fireworks. Describing it as Claude/Codex-only makes the documented behavior disagree with the implementation.
Shown only when the agent has local day history (Claude/Codex).
Fireworks also emits recentDays and modelUsage; the README should not imply tokens-by-day is limited to Claude and Codex. Co-authored-by: Cursor <[email protected]>
Read local Grok/pi/opencode session stats and the CLI billing endpoint into the same JSON the other agent scanners emit.
|
Automated duplication check: this pull request looks similar to #7087, which covers the same Cursor 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. |
Summary
bin/omarchy-agent-usage-cursor, which reads Cursor's localstate.vscdb(read-only) and mapsGetCurrentPeriodUsageplan pools onto the agents record contract (limits[]for Cursor Models / Other Models,hasLocalStats: false)shell/plugins/agents/assets/so the panel discovers them by conventionresetsAt, and gate day/model charts onhasLocalStatscursoralongside Claude/CodexBuilds on #6603. Supersedes #6591.
Test plan
bash test/shell.d/agent-usage-cursor-scanner-test.shbash test/shell.d/agent-usage-update-test.shomarchy-agent-usage-cursor --force | jq .shows Cursor Models / Other Models + tieromarchy-agent-usage-update cursorwrites~/.local/state/omarchy/agents/usage/cursor.jsonagents/skills/visual-verification.md)Made with Cursor