Skip to content

Commit e76cf78

Browse files
committed
add cache count to claude statusline
1 parent a90e1b5 commit e76cf78

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

ai/claude/statusline.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,9 @@ try {
8888
const isDumbZone = percent > CLAUDE_DUMB_ZONE;
8989
const bgColor = isDumbZone ? "rgb(226, 0, 0)" : "rgb(217, 119, 87)";
9090
const color = isDumbZone ? "rgb(255, 255, 255)" : "rgb(0, 0, 0)";
91-
sections.push({ text: `${formatTokens(currentTokens)}/${formatTokens(contextSize)} (${percent}%)`, bgColor, color });
91+
const cacheRead = usage.cache_read_input_tokens || 0;
92+
const cacheSuffix = cacheRead > 0 ? ` ⚡${formatTokens(cacheRead)}` : '';
93+
sections.push({ text: `${formatTokens(currentTokens)}/${formatTokens(contextSize)} (${percent}%)${cacheSuffix}`, bgColor, color });
9294
}
9395

9496
// Rate limit usage. Claude Code currently exposes `five_hour` and `seven_day`

0 commit comments

Comments
 (0)