show cached input hint with input/output tokens (codex style)#80
Merged
slkiser merged 3 commits intoMay 8, 2026
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
This PR extends the session token summary model to carry cached input and combined (new + cached) input totals, and updates the various renderers (full rows, sidebar summary, and compact/TUI status line) to display a richer token breakdown when cache data is present.
Changes:
- Add
cachedInputandtotalInputto per-model session token rows, plus aggregatetotalCachedInputandtotalCombinedInput. - Update session token formatting to render
new,cache,in(combined), andoutwhere applicable, including compact/sidebar variants. - Update/extend tests to lock in the new display semantics across formats.
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/tui-sidebar-format.test.ts | Updates sidebar expectations to include new/cache/combined token display. |
| tests/tui-compact-format.test.ts | Updates compact status line expectations for cache-aware token breakdown. |
| tests/session-tokens-format.test.ts | Adds coverage for cache-aware rendering in both detailed and sidebar-summary renderers. |
| tests/quota-command-format.test.ts | Updates /quota output expectations to include cache breakdown. |
| tests/format.test.ts | Adds coverage for cache-aware session token rendering in single/all window toast formats. |
| src/lib/tui-compact-format.ts | Renders cache-aware token segment in the compact/TUI status line. |
| src/lib/session-tokens.ts | Threads cache/combined totals through the display fetch result. |
| src/lib/session-tokens-format.ts | Implements cache-aware formatting for detailed + compact + sidebar-summary session token sections. |
| src/lib/quota-stats.ts | Aggregates cached input and combined input in getSessionTokenSummary. |
| src/lib/entries.ts | Extends the session token data interfaces to include cached + combined input fields. |
Owner
|
@MRNAQA Thanks for the contribution |
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.
Summary
Session input/output tokenslayout instead of expanding it into new cache-specific columnsshowSessionTokensbehavior in the READMELinked Issue
OpenCode Validation
1.14.39Quality Checklist
npm run buildnpm run typechecknpm test -- --run tests/session-tokens-format.test.ts tests/format.test.ts tests/quota-command-format.test.ts tests/tui-sidebar-format.test.ts tests/tui-compact-format.test.ts tests/quota-stats.test.ts