mirror of
https://github.com/anthropics/claude-plugins-official.git
synced 2026-04-27 20:22:39 +00:00
Compare commits
2 Commits
tobin/aws-
...
thariq/ses
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e8f2fa8b24 | ||
|
|
ed498715de |
@@ -61,9 +61,9 @@
|
|||||||
#meta-line { color: var(--subtle); font-size: 11px; }
|
#meta-line { color: var(--subtle); font-size: 11px; }
|
||||||
|
|
||||||
#hero { margin: 14px 0 6px; }
|
#hero { margin: 14px 0 6px; }
|
||||||
#hero-total { font-size: 56px; font-weight: 700; line-height: 1; }
|
#hero-total { font-size: 36px; font-weight: 700; line-height: 1; }
|
||||||
#hero-total .unit { color: var(--clay); }
|
#hero-total .unit { color: var(--clay); }
|
||||||
#hero-total .label { font-size: 18px; font-weight: 400; color: var(--dim); margin-left: 8px; }
|
#hero-total .label { font-size: 14px; font-weight: 400; color: var(--dim); margin-left: 8px; }
|
||||||
#hero-split { color: var(--dim); margin-top: 8px; }
|
#hero-split { color: var(--dim); margin-top: 8px; }
|
||||||
#hero-split b { color: var(--term-fg); font-weight: 500; }
|
#hero-split b { color: var(--term-fg); font-weight: 500; }
|
||||||
#hero-split .ok { color: var(--green); }
|
#hero-split .ok { color: var(--green); }
|
||||||
@@ -213,7 +213,7 @@
|
|||||||
@media (max-width: 760px) {
|
@media (max-width: 760px) {
|
||||||
body { padding: 20px 12px 48px; }
|
body { padding: 20px 12px 48px; }
|
||||||
.term-body { padding: 16px 16px 24px; }
|
.term-body { padding: 16px 16px 24px; }
|
||||||
#hero-total { font-size: 40px; }
|
#hero-total { font-size: 28px; }
|
||||||
.bar { grid-template-columns: 14ch 1fr 7ch; gap: 8px; }
|
.bar { grid-template-columns: 14ch 1fr 7ch; gap: 8px; }
|
||||||
.drill summary { grid-template-columns: 6ch 1fr; }
|
.drill summary { grid-template-columns: 6ch 1fr; }
|
||||||
.drill .body { padding-left: 12px; }
|
.drill .body { padding-left: 12px; }
|
||||||
@@ -345,6 +345,7 @@
|
|||||||
const esc = s => String(s).replace(/[&<>"]/g, c =>
|
const esc = s => String(s).replace(/[&<>"]/g, c =>
|
||||||
({'&':'&','<':'<','>':'>','"':'"'}[c]));
|
({'&':'&','<':'<','>':'>','"':'"'}[c]));
|
||||||
const short = p => String(p||'').replace(/^-Users-[^-]+-/,'').replace(/^code-/,'');
|
const short = p => String(p||'').replace(/^-Users-[^-]+-/,'').replace(/^code-/,'');
|
||||||
|
const sid = s => String(s||'').slice(0,8);
|
||||||
const MON = ['Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec'];
|
const MON = ['Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec'];
|
||||||
const niceDate = iso => { const d = new Date(iso); return isNaN(d) ? '' :
|
const niceDate = iso => { const d = new Date(iso); return isNaN(d) ? '' :
|
||||||
`${MON[d.getMonth()]} ${d.getDate()} · ${String(d.getHours()).padStart(2,'0')}:${String(d.getMinutes()).padStart(2,'0')}`; };
|
`${MON[d.getMonth()]} ${d.getDate()} · ${String(d.getHours()).padStart(2,'0')}:${String(d.getMinutes()).padStart(2,'0')}`; };
|
||||||
@@ -359,8 +360,7 @@
|
|||||||
$('cmd-flags').innerHTML = DATA.since
|
$('cmd-flags').innerHTML = DATA.since
|
||||||
? `<span class="flag">--since</span> ${esc(DATA.since)}` : '';
|
? `<span class="flag">--since</span> ${esc(DATA.since)}` : '';
|
||||||
$('meta-line').textContent =
|
$('meta-line').textContent =
|
||||||
(span ? `${span.from.slice(0,10)} → ${span.to.slice(0,10)}` : '') +
|
span ? `${span.from.slice(0,10)} → ${span.to.slice(0,10)}` : '';
|
||||||
` · ${DATA.root || ''}`;
|
|
||||||
$('foot-gen').textContent = `generated ${DATA.generated_at?.slice(0,16).replace('T',' ') || ''}`;
|
$('foot-gen').textContent = `generated ${DATA.generated_at?.slice(0,16).replace('T',' ') || ''}`;
|
||||||
$('foot-stats').textContent =
|
$('foot-stats').textContent =
|
||||||
`${o.sessions} sessions · ${o.api_calls} api calls · ${o.human_messages} prompts`;
|
`${o.sessions} sessions · ${o.api_calls} api calls · ${o.human_messages} prompts`;
|
||||||
@@ -370,8 +370,9 @@
|
|||||||
`${m?m[1]:num}<span class="unit">${m?m[2]:''}</span><span class="label">tokens</span>`;
|
`${m?m[1]:num}<span class="unit">${m?m[2]:''}</span><span class="label">tokens</span>`;
|
||||||
const cacheCls = it.pct_cached>=85 ? 'ok' : 'warn';
|
const cacheCls = it.pct_cached>=85 ? 'ok' : 'warn';
|
||||||
$('hero-split').innerHTML =
|
$('hero-split').innerHTML =
|
||||||
`<b>${fmt(it.total)}</b> input <span class="${cacheCls}">(${it.pct_cached}% cache-read)</span> · `+
|
`<b>${pct(it.total,GRAND)}</b> input · `+
|
||||||
`<b>${fmt(o.output_tokens)}</b> output · all figures below are % of this total`;
|
`<span class="${cacheCls}"><b>${it.pct_cached}%</b> of input cached</span> · `+
|
||||||
|
`<b>${pct(o.output_tokens,GRAND)}</b> output`;
|
||||||
|
|
||||||
// overall stat grid
|
// overall stat grid
|
||||||
$('overall-grid').innerHTML = [
|
$('overall-grid').innerHTML = [
|
||||||
@@ -498,7 +499,8 @@
|
|||||||
return `<details><summary>`+
|
return `<details><summary>`+
|
||||||
`<span class="amt">${share(p.total_tokens)}</span>`+
|
`<span class="amt">${share(p.total_tokens)}</span>`+
|
||||||
`<span class="desc">${esc(p.text)}</span>`+
|
`<span class="desc">${esc(p.text)}</span>`+
|
||||||
`<span class="meta">${niceDate(p.ts)} · ${esc(short(p.project))} · ${p.api_calls} calls`+
|
`<span class="meta">${niceDate(p.ts)} · ${esc(short(p.project))} · `+
|
||||||
|
`sess <code>${esc(sid(p.session))}</code> · ${p.api_calls} calls`+
|
||||||
(p.subagent_calls?` · ${p.subagent_calls} subagents`:'')+
|
(p.subagent_calls?` · ${p.subagent_calls} subagents`:'')+
|
||||||
` · ${pct(p.input.cache_read,inTot)} cached</span>`+
|
` · ${pct(p.input.cache_read,inTot)} cached</span>`+
|
||||||
`</summary><div class="body">`+
|
`</summary><div class="body">`+
|
||||||
@@ -514,7 +516,8 @@
|
|||||||
`<span class="amt">${fmt(b.uncached)}</span>`+
|
`<span class="amt">${fmt(b.uncached)}</span>`+
|
||||||
`<span class="desc">${esc(short(b.project))} · `+
|
`<span class="desc">${esc(short(b.project))} · `+
|
||||||
`${b.kind==='subagent'?esc(b.agentType||'subagent'):'main'}</span>`+
|
`${b.kind==='subagent'?esc(b.agentType||'subagent'):'main'}</span>`+
|
||||||
`<span class="meta">${niceDate(b.ts)} · ${pct(b.uncached,b.total)} of ${fmt(b.total)} uncached</span>`+
|
`<span class="meta">${niceDate(b.ts)} · sess <code>${esc(sid(b.session))}</code> · `+
|
||||||
|
`${pct(b.uncached,b.total)} of ${fmt(b.total)} uncached</span>`+
|
||||||
`</summary><div class="body">`+
|
`</summary><div class="body">`+
|
||||||
renderContext(b.context,
|
renderContext(b.context,
|
||||||
`<div class="ctx-break"><b>${fmt(b.uncached)}</b> uncached `+
|
`<div class="ctx-break"><b>${fmt(b.uncached)}</b> uncached `+
|
||||||
@@ -562,7 +565,8 @@
|
|||||||
];
|
];
|
||||||
table($('tbl-projects'), statCols, statRows(DATA.by_project));
|
table($('tbl-projects'), statCols, statRows(DATA.by_project));
|
||||||
table($('tbl-subagents'), statCols, statRows(DATA.by_subagent_type));
|
table($('tbl-subagents'), statCols, statRows(DATA.by_subagent_type));
|
||||||
table($('tbl-skills'), statCols, statRows(DATA.by_skill));
|
table($('tbl-skills'), statCols.slice(0,8),
|
||||||
|
statRows(DATA.by_skill).map(r=>r.slice(0,8)));
|
||||||
})();
|
})();
|
||||||
</script>
|
</script>
|
||||||
</body>
|
</body>
|
||||||
|
|||||||
Reference in New Issue
Block a user