Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: ccusage/ccusage
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: main
Choose a base ref
...
head repository: WGDevelopment/ccusage
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: main
Choose a head ref
Checking mergeability… Don’t worry, you can still create the pull request.
  • 1 commit
  • 1 file changed
  • 2 contributors

Commits on Dec 28, 2025

  1. fix(ccusage): keep entry with highest output_tokens during deduplication

    Claude Code creates multiple transcript entries per response during
    streaming. The first entry often has a low output_tokens count (1-3)
    while a subsequent entry has the correct cumulative count. The previous
    deduplication logic kept the first entry encountered, resulting in
    inaccurate token counts.
    
    This fix modifies the deduplication to:
    - Track both the entry index and output_tokens for each message+request hash
    - When a duplicate is found with higher output_tokens, replace the old entry
    - Filter out replaced entries after processing
    
    Applied to loadDailyUsageData, loadSessionData, and loadSessionBlockData.
    
    🤖 Generated with [Claude Code](https://claude.com/claude-code)
    
    Co-Authored-By: Claude Opus 4.5 <[email protected]>
    wg-whm and claude committed Dec 28, 2025
    Configuration menu
    Copy the full SHA
    8c57644 View commit details
    Browse the repository at this point in the history
Loading