Repository navigation
Conversation
AI Usage now shows plan limits, API value, trends, models, projects, activity and Codex resets for Claude, Codex, OpenCode and GitHub Copilot, read from this Mac's local logs. Prompts, replies and tool output are never stored, only counters; MacTools reads no account credentials. Adapted from Vorssaint (GPL-3.0-or-later), recorded in the third-party notices in place of the cc-bar logos the plugin no longer uses. Builds as Swift 6 with strict concurrency, with tests for log parsing and pricing. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Thanks for the work on the expanded AI Usage page! I reviewed
Thanks! Happy to take another look after these are addressed. |
Updating from the earlier AI Usage plugin carries its Codex and Claude switches over once, before anything is read, so an agent turned off stays off; a choice already made on the page wins, and the old record is kept. A backup taken before the update restores those two switches. Changes made in Settings or on the page itself tell the host again, so automatic backup and sync pick them up. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Stopping no longer waits on the reader's queue: saving progress, or removing it, runs after whatever the reader is doing. Only quitting waits, for up to a second, since the process ends right after; a missed save only makes the next launch's first read longer. A locked OpenCode database used to hold each query for SQLite's two-second busy timeout; the wait now ends as soon as reading stops. With the database locked, a stop took 9.6 seconds before and 0.2 seconds now. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The archive keeps each record's model, project and session id and each log's path and position, not only counters. The guide now says so, and that the menu bar item and refresh interval of the earlier plugin are gone while its Codex and Claude switches carry over. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Thanks, all three are addressed:
The guide now also says what the archive keeps (each record's model, project and session id, and each log's path and position) and that the earlier plugin's menu bar item and refresh interval are gone. (a87a2c2) Tests: new unit tests for the one-time carry-over, a choice on the page winning, no earlier record, and restoring an earlier backup, plus a test that holds an OpenCode database locked and stops the read (it fails with the old busy timeout and passes now). The full XCTest suite passes on the branch (3,243 tests, 0 failures; 6 skipped by upstream's own settings), and |
|
Thanks for the updates! I rechecked One legacy-backup case still fails. If OpenCode and Copilot are already off, an earlier backup with both Codex and Claude disabled is rejected by the “at least one provider enabled” check. The previous version allowed this configuration, so a valid backup cannot restore its intended disabled state. I reproduced this with synthetic data. Please allow restoring the all-disabled state and show an appropriate inactive/setup view. Keep all provider choices intact, and ensure the restored state can also be exported and restored in the new format. For UI consistency, please also replace the hardcoded 8.5–9.5 pt ordinary labels with The 11 existing plugin tests and 275 script tests pass; the stop and host-callback checks also pass. Thanks again for addressing the earlier feedback! |
Closes #545.
Problem and result
AI Usage showed Codex and Claude Code quotas and reset times. It now shows a full AI page for Claude, Codex, OpenCode and GitHub Copilot:
Changes
AIUsageLogAndPricingTestscovers Claude and Codex log parsing, turn boundaries, the shipped price list, model price families, and cost arithmetic.docs/plugins/ai-usage.mdupdated, the backup inventory regenerated (credentials are no longer touched), and one plugin changelog fragment.Verification
AIUsageLogAndPricingTests,AIUsagePreferencesMigrationTests(carry-over, a choice on the page winning, earlier backups) andAIUsageOpenCodeLockTests(a stop with the database locked returns at once), within the full XCTest suite: pass, 3,309 tests, 0 failures (6 skipped by upstream's own settings)make script-tests: pass (changelog, localization, website data, backup inventory, and 275 tooling tests)UI evidence
Before, the current AI Usage:
After, the new page with the same accounts (Claude session and week limits, Codex week limit):
Only the limit cards are enabled in these settings; trends, models, projects and activity are further cards the person turns on.
Checklist
🤖 Generated with Claude Code