Skip to content

Conversation

@ryoppippi
Copy link
Owner

@ryoppippi ryoppippi commented Aug 22, 2025

Summary

Updates the statusline documentation to reflect recent cost source feature additions in PRs #571 and #574.

Changes Made

  • Added comprehensive cost source option documentation for the new --cost-source parameter
  • Updated setup examples showing how to configure different cost source modes in settings.json
  • Enhanced output format examples including the new "both" mode that displays both Claude Code and ccusage costs
  • Added practical guidance on when to use each cost source mode
  • Updated component explanations to reference the new cost source options

Cost Source Modes Documented

  • auto (default): Prefer Claude Code cost, fallback to ccusage calculation
  • ccusage: Always use ccusage token-based calculation
  • cc: Always use Claude Code's pre-calculated cost
  • both: Display both costs side by side for comparison

References

Test Plan

  • Documentation builds correctly
  • All internal links work properly
  • Examples match actual command behavior
  • Formatting is consistent with existing docs

Summary by CodeRabbit

  • Documentation
    • Expanded Statusline guide with Cost Source Options, detailing modes: auto, ccusage, cc, and both.
    • Added configuration examples via command-line and settings, plus explicit output samples (including combined costs with both).
    • Provided guidance on when to use each mode and clarified output differences between single-cost and dual-cost displays.
    • Updated Components Explained to note Session Cost varies by selected mode and to reference the new section.
    • No code changes.

Add comprehensive documentation for the new --cost-source option in statusline command:

- Document all four cost source modes: auto, ccusage, cc, both
- Add setup examples for settings.json configuration
- Show output format differences for both mode
- Explain when to use each mode with practical guidance
- Update output format examples with both costs display

References recent PRs:
- feat(statusline): add costSource option to use Claude Code session cost (#571)
- feat(statusline): add 'both' cost source option to display cc and ccusage costs (#574)
@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Aug 22, 2025

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
ccusage-guide d781670 Commit Preview URL

Branch Preview URL
Aug 22 2025, 11:34 AM

@coderabbitai
Copy link

coderabbitai bot commented Aug 22, 2025

Caution

Review failed

The pull request is closed.

Walkthrough

Documentation updates introduce Cost Source Options for the statusline, detailing modes (auto, ccusage, cc, both), CLI usage, Settings.json examples, and output examples. Components Explained now notes mode-dependent Session Cost. No code or API changes.

Changes

Cohort / File(s) Change Summary
Docs: Statusline Cost Source Options
docs/guide/statusline.md
Added Cost Source Options section with modes (auto, ccusage, cc, both), CLI and Settings.json examples, guidance on usage, and output examples including combined costs. Updated examples and Components Explained to reference mode-dependent Session Cost.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Poem

I nibble notes on status lines so fine,
Four modes of cost now neatly align.
Auto, cc, ccusage—both if you please,
Numbers hop in pairs like leaves on a breeze.
With every tally tidy and terse,
I thump approval in rabbitverse. 🐇💸

Tip

🔌 Remote MCP (Model Context Protocol) integration is now available!

Pro plan users can now connect to remote MCP servers from the Integrations page. Connect with popular remote MCPs such as Notion and Linear to add more context to your reviews and chats.


📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between a5c4cc7 and d781670.

📒 Files selected for processing (1)
  • docs/guide/statusline.md (3 hunks)
✨ Finishing Touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch docs/update-statusline-cost-source

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR/Issue comments)

Type @coderabbitai help to get the list of available commands.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Status, Documentation and Community

  • Visit our Status Page to check the current availability of CodeRabbit.
  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@ryoppippi ryoppippi merged commit 6507ba6 into main Aug 22, 2025
13 of 16 checks passed
@ryoppippi ryoppippi deleted the docs/update-statusline-cost-source branch August 22, 2025 11:33
Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Summary of Changes

Hello @ryoppippi, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request updates the statusline documentation to incorporate the recently added cost source options. It provides comprehensive details on how to configure and interpret the new --cost-source parameter, ensuring users understand the different calculation modes and their implications for session cost display.

Highlights

  • Cost Source Documentation: Comprehensive documentation for the new --cost-source parameter, detailing its available modes: auto, ccusage, cc, and both.
  • Configuration Examples: Updated settings.json examples demonstrating how to configure the statusline to use different cost source modes.
  • Output Format Examples: Enhanced examples showing the statusline output, specifically illustrating how the "both" mode displays both Claude Code and ccusage costs.
  • Usage Guidance: Practical guidance on when to use each cost source mode, helping users choose the most appropriate option for their needs.
  • Component Explanations: Updates to the "Session Cost" component explanation to reference the new cost source options, providing clarity on cost calculation methods.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point in your pull request via creating an issue comment (i.e. comment on the pull request page) using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in issue comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request does a great job of documenting the new --cost-source option for the statusline command. The new sections are well-structured and provide clear examples.

I have one suggestion to make the documentation even more helpful by clarifying the relationship between the new --cost-source option and the existing --mode option used by other commands.

Additionally, for completeness and better discoverability, consider updating docs/guide/cli-options.md to include the new --cost-source and --visual-burn-rate options in the statusline command section. This would ensure all command-line options are documented in the central reference file.

Comment on lines +174 to +176
- **`auto`**: Best for most users, provides accurate costs with fallback reliability
- **`ccusage`**: When you want consistent calculation methods across all ccusage commands
- **`cc`**: When you trust Claude Code's cost calculations and want minimal processing
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

The descriptions for the cost source modes are good, but they could be more precise by explicitly linking them to the global --mode option used by other ccusage commands. This would improve clarity for users familiar with other commands and prevent potential confusion about how statusline's cost calculation relates to the rest of the tool.

Suggested change
- **`auto`**: Best for most users, provides accurate costs with fallback reliability
- **`ccusage`**: When you want consistent calculation methods across all ccusage commands
- **`cc`**: When you trust Claude Code's cost calculations and want minimal processing
- **`auto`**: Best for most users. It provides accurate costs by preferring Claude Code's data and falling back to `ccusage`'s calculation, similar to the default `--mode auto` behavior in other commands.
- **`ccusage`**: Use this for a consistent calculation method across all `ccusage` commands, equivalent to using `--mode calculate` with commands like `daily` or `blocks`.
- **`cc`**: Use this when you trust Claude Code's pre-calculated costs and want minimal processing, similar to the `--mode display` behavior in other commands.

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