Commit a30adbc
authored
🤖 feat: differentiate cache create vs cache read colors in costs tab (#1199)
## Summary
Adds a distinct orange/amber color for **Cache Create** tokens in the
costs tab, differentiating them from **Cache Read** (grey).
For Anthropic models, cache create is significantly more expensive than
cache read (~3.75x input cost vs 0.1x input cost). Having distinct
colors makes it easy to see at a glance where costs are coming from.
## Changes
- Add `--color-token-cache-create` CSS variable to all 4 themes (dark,
light, solarized-dark, solarized-light)
- Add `cacheCreate` key to `TOKEN_COMPONENT_COLORS`
- Update `CostsTab.tsx` to use new color in both:
- The token component table color indicators
- The cost percentage bar visualization
- Update `tokenMeterUtils.ts` `SEGMENT_DEFS` to use new color for
context usage bar
- Add `CostsTabWithCacheCreate` story showing the visual difference
## Color choices
| Theme | Cache Create | Cache Read |
|-------|-------------|------------|
| Dark | `hsl(30 90% 50%)` (amber) | `hsl(0 0% 50%)` (grey) |
| Light | `hsl(30 85% 45%)` (darker amber) | `hsl(210 16% 50%)` (grey) |
| Solarized | `#cb4b16` (solarized orange) | `#839496` / `#586e75`
(grey) |
---
_Generated with `mux` • Model: `anthropic:claude-opus-4-5` • Thinking:
`high`_1 parent 49bc8af commit a30adbc
File tree
4 files changed
+62
-3
lines changed- src
- browser
- components/RightSidebar
- stories
- styles
- common/utils/tokens
4 files changed
+62
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
236 | 236 | | |
237 | 237 | | |
238 | 238 | | |
239 | | - | |
| 239 | + | |
240 | 240 | | |
241 | 241 | | |
242 | 242 | | |
| |||
312 | 312 | | |
313 | 313 | | |
314 | 314 | | |
315 | | - | |
| 315 | + | |
316 | 316 | | |
317 | 317 | | |
318 | 318 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
101 | 101 | | |
102 | 102 | | |
103 | 103 | | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
104 | 158 | | |
105 | 159 | | |
106 | 160 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
131 | 131 | | |
132 | 132 | | |
133 | 133 | | |
| 134 | + | |
134 | 135 | | |
135 | 136 | | |
136 | 137 | | |
| |||
383 | 384 | | |
384 | 385 | | |
385 | 386 | | |
| 387 | + | |
386 | 388 | | |
387 | 389 | | |
388 | 390 | | |
| |||
622 | 624 | | |
623 | 625 | | |
624 | 626 | | |
| 627 | + | |
625 | 628 | | |
626 | 629 | | |
627 | 630 | | |
| |||
836 | 839 | | |
837 | 840 | | |
838 | 841 | | |
| 842 | + | |
839 | 843 | | |
840 | 844 | | |
841 | 845 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
7 | 8 | | |
8 | 9 | | |
9 | 10 | | |
| |||
35 | 36 | | |
36 | 37 | | |
37 | 38 | | |
38 | | - | |
| 39 | + | |
39 | 40 | | |
40 | 41 | | |
41 | 42 | | |
| |||
0 commit comments