fix: update stale README command examples (#239)#264
Merged
Conversation
- Add missing 'Est. Cost' column to copilot-usage live table - Replace raw comma-formatted token integers with K/M format (468.6K, 483.8K, 1.2M) - Fix cost 'Since last shutdown' row: show estimated cost (~3) instead of N/A Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Updates the documentation examples in README.md so the shown CLI output matches the current Rich table rendering produced by render_live_sessions() and render_cost_view() in src/copilot_usage/report.py.
Changes:
- Fixes
copilot-usage liveREADME example to include the missing Est. Cost column (8 columns total). - Updates
Output Tokensformatting in theliveexample to use the same K/M suffix formatting asformat_tokens(). - Fixes the
copilot-usage costREADME example so the “↳ Since last shutdown” Premium Cost value reflects the estimated~{cost}output (instead ofN/A).
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Contributor
There was a problem hiding this comment.
Quality Gate: APPROVED ✅
Low-impact documentation-only change — updates three stale example output blocks in README.md to match current code.
Verified against source code:
- ✅
render_live_sessions()includes "Est. Cost" column between Messages and Output Tokens (report.py:210-212) - ✅
format_tokens()produces K/M formatted values (report.py:44-61) - ✅
_estimate_premium_cost()returns~{cost}notN/A(report.py:153-168)
Auto-approving for merge.
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.
Fixes #239
Updates the example output blocks in
README.mdto match the currentrender_live_sessionsandrender_cost_viewimplementations inreport.py.Changes
copilot-usage livetable (2 fixes):render_live_sessionsoutput)468,625→468.6K,483,762→483.8K,1,225,990→1.2M) to matchformat_tokens()outputcopilot-usage costtable (1 fix):N/Ato~3— the actual code calls_estimate_premium_cost()which returns~{cost}, notN/AVerification
All CI checks pass locally: ruff, pyright, and 506 tests with 99% coverage.
Warning
The following domain was blocked by the firewall during workflow execution:
astral.shTo allow these domains, add them to the
network.allowedlist in your workflow frontmatter:See Network Configuration for more information.