Skip to content

fix(vscode): correct cache token indicator#12170

Closed
mjnaderi wants to merge 1 commit into
Kilo-Org:mainfrom
mjnaderi:fix/vscode-cache-token-arrow
Closed

fix(vscode): correct cache token indicator#12170
mjnaderi wants to merge 1 commit into
Kilo-Org:mainfrom
mjnaderi:fix/vscode-cache-token-arrow

Conversation

@mjnaderi

Copy link
Copy Markdown
Contributor

Issue

No linked issue. This is a small visual correctness fix for the session token usage summary.

Context

Cached tokens are cache-read prompt tokens, so they belong to the input side of token usage. The summary previously showed them with the output/down-arrow icon and placed them after output, which made the token flow misleading.

Implementation

The compact token summary now renders cache reads with the input/up-arrow icon and orders the values as fresh input, cached input, then generated output. A patch changeset is included because this corrects user-visible token usage information.

Screenshots / Video

before after
Screenshot From 2026-07-13 16-04-47 Screenshot From 2026-07-13 16-04-16

How to Test

Manual/local verification

  • Ran bun run typecheck from packages/kilo-vscode/.
  • Built the VS Code extension and manually confirmed the updated token summary in VS Code.

Reviewer test steps

  1. Open a session that has both prompt-cache reads and generated output.
  2. Expand the task usage summary.
  3. Confirm the compact summary orders values as fresh input, cached input, then output.
  4. Confirm both fresh input and cache use up-arrow icons, while output uses the down-arrow icon.

Blocked checks and substitute verification

  • No checks were blocked.

Checklist

  • Issue linked above, or exception explained
  • Tests/verification described
  • Screenshots/video included for visual changes, or marked N/A
  • Changeset considered for user-facing changes
  • I personally reviewed the diff and can explain the changes, including any AI-assisted work.

@kilo-code-bot

kilo-code-bot Bot commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

Code Review Summary

Status: No Issues Found | Recommendation: Merge

Files Reviewed (2 files)
  • .changeset/fix-cache-token-arrow.md
  • packages/kilo-vscode/webview-ui/src/components/chat/TaskUsage.tsx

Reviewed by gpt-5.6-sol · Input: 30.7K · Output: 3K · Cached: 117.1K

Review guidance: REVIEW.md from base branch main

@mjnaderi

Copy link
Copy Markdown
Contributor Author

The visual-regression failure is expected: this PR changes the compact token usage summary.
A Kilo developer needs to update and commit the visual-regression baseline as stated in the CI error:

Please ask a Kilo developer for help updating the screenshots.

@marius-kilocode

marius-kilocode commented Jul 14, 2026

Copy link
Copy Markdown
Collaborator

Thanks for this, @mjnaderi . Superseding with #12211 so the visual-regression baselines can auto-commit from an org-owned branch. Your original commit is preserved with full authorship.

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