cc-cream 0.4.0 → 0.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -6,6 +6,15 @@ All notable changes to cc-cream are documented here. Format follows
6
6
 
7
7
  ## [Unreleased]
8
8
 
9
+ ## [0.5.0] — 2026-06-04
10
+
11
+ ### Added
12
+ - **`tokens_in` segment.** Shows total input tokens for the current turn (`total_input_tokens`, with per-field sum fallback) formatted via the existing `numbers` setting. Appears on Row 1 after `api_ratio`.
13
+ - **`tokens_out` segment.** Shows output tokens for the current turn (`current_usage.output_tokens`), also on Row 1. Both segments are on by default and independently toggleable via `--hide`/`--show` or `~/.claude/cc-cream.json`.
14
+
15
+ ### Changed
16
+ - **`effort` and `thinking` moved from Row 1 to Row 3** (the model row). Their natural home is alongside model metadata (`model | thinking | effort | session_name`), and moving them frees two Row 1 slots for the new token segments. **Breaking default for users on the default layout** — use `--set effort.row=1 --set thinking.row=1` to pin them back.
17
+
9
18
  ## [0.4.0] — 2026-06-04
10
19
 
11
20
  ### Added
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cc-cream",
3
- "version": "0.4.0",
3
+ "version": "0.5.0",
4
4
  "description": "See cache health, context fill, token burn, rate limits, and peak hours in Claude Code CLI. The status line for tokenminning - cache rules everything around me - dolla, dolla bill, y'all.",
5
5
  "directories": {
6
6
  "doc": "docs"
@@ -26,17 +26,19 @@ export const DEFAULTS = {
26
26
  // counts down "peak in Nm".
27
27
  peak: { on: true, row: 2, order: 3, start: 5, end: 11, lead: 60 },
28
28
  burn: { on: true, row: 2, order: 1.5 },
29
- effort: { on: true, row: 1, order: 6 },
30
- thinking: { on: true, row: 1, order: 7 },
31
- api_ratio: { on: true, row: 1, order: 8 },
29
+ effort: { on: true, row: 3, order: 0.7 },
30
+ thinking: { on: true, row: 3, order: 0.6 },
31
+ api_ratio: { on: true, row: 1, order: 6 },
32
32
  session_name: { on: true, row: 3, order: 1 },
33
33
  write: { on: true, row: 1, order: 3.5 },
34
+ tokens_in: { on: true, row: 1, order: 7 },
35
+ tokens_out: { on: true, row: 1, order: 8 },
34
36
  },
35
37
  };
36
38
 
37
39
  // Row 1 renders as visual zones separated by " | " (PRD §4.3).
38
40
  // Empty zones drop out, so a model-only bar is just the name with no separators.
39
- export const ROW1_ZONES = [['ctx', 'cache', 'write', 'ttl', 'effort', 'thinking', 'api_ratio'], ['cost']];
41
+ export const ROW1_ZONES = [['ctx', 'cache', 'write', 'ttl', 'api_ratio', 'tokens_in', 'tokens_out'], ['cost']];
40
42
 
41
43
  export const ANSI = {
42
44
  red: '\x1b[31m',
@@ -122,6 +122,20 @@ function segCacheWrite(data) {
122
122
  return { text: `write:${Math.round((creation / denom) * 100)}%`, color: null };
123
123
  }
124
124
 
125
+ function segTokensIn(data, cfg) {
126
+ const cw = data?.context_window;
127
+ if (!cw || typeof cw !== 'object') return null;
128
+ const total = magnitudeTokens(cw);
129
+ if (!isNum(total)) return null;
130
+ return { text: `in:${fmtNum(total, cfg.numbers)}`, color: null };
131
+ }
132
+
133
+ function segTokensOut(data, cfg) {
134
+ const n = data?.context_window?.current_usage?.output_tokens;
135
+ if (!isNum(n)) return null;
136
+ return { text: `out:${fmtNum(n, cfg.numbers)}`, color: null };
137
+ }
138
+
125
139
  function segPeak(data, cfg, now, tz) {
126
140
  // peak rides the account-budget row, so it shows only when that row has windows.
127
141
  if (!hasWindow(data?.rate_limits)) return null;
@@ -169,5 +183,7 @@ export function renderSegments(data, cfg, ttlMin, now, prevSessionState = null,
169
183
  api_ratio: segApiRatio(data),
170
184
  session_name: segSessionName(data),
171
185
  write: segCacheWrite(data),
186
+ tokens_in: segTokensIn(data, cfg),
187
+ tokens_out: segTokensOut(data, cfg),
172
188
  };
173
189
  }