Skip to content

Commit ba2d7cc

Browse files
vicarious11claude
andcommitted
feat: model panel shows input/output/cache breakdown per model
Each model row now shows a breakdown line: in 1.2M out 8.4M cache 4.9B Hover tooltip also shows full breakdown. Numbers now match top bar — billed tokens as primary, cache as detail. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 7327a49 commit ba2d7cc

2 files changed

Lines changed: 7 additions & 1 deletion

File tree

src/agenttop/web/static/css/theme.css

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -291,6 +291,7 @@ h3 { font-size: var(--text-md); font-weight: 600; margin-bottom: var(--sp-3); co
291291
.model-stats { display: flex; gap: var(--sp-3); font-size: var(--text-xs); font-family: var(--font-mono); }
292292
.model-tokens { color: var(--text-secondary); }
293293
.model-cost { color: var(--tool-claude); }
294+
.model-breakdown { display: flex; gap: var(--sp-2); font-size: 9px; font-family: var(--font-mono); color: var(--text-dim); padding-top: 1px; }
294295
.model-bar-track { height: 4px; background: var(--bg-elevated); border-radius: 2px; display: flex; overflow: hidden; }
295296
.model-seg { height: 100%; transition: width var(--duration-normal); }
296297
.seg-input { background: var(--accent); opacity: 0.8; }

src/agenttop/web/static/js/panels.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ const Panels = {
7777
const iPct = (m.input / maxBilled * 100).toFixed(2);
7878
const oPct = (m.output / maxBilled * 100).toFixed(2);
7979
return `
80-
<div class="model-row">
80+
<div class="model-row" title="In: ${App.formatNum(m.input)} | Out: ${App.formatNum(m.output)} | Cache: ${App.formatNum(m.cache)}">
8181
<div class="model-info">
8282
<span class="model-name" style="color:${m.color}">${m.name}</span>
8383
<span class="model-stats">
@@ -89,6 +89,11 @@ const Panels = {
8989
<div class="model-seg seg-input" style="width:${iPct}%" title="Input: ${App.formatNum(m.input)}"></div>
9090
<div class="model-seg seg-output" style="width:${oPct}%" title="Output: ${App.formatNum(m.output)}"></div>
9191
</div>
92+
<div class="model-breakdown">
93+
<span>in ${App.formatNum(m.input)}</span>
94+
<span>out ${App.formatNum(m.output)}</span>
95+
${m.cache > 0 ? `<span>cache ${App.formatNum(m.cache)}</span>` : ''}
96+
</div>
9297
</div>
9398
`;
9499
}).join('');

0 commit comments

Comments
 (0)