From 33060a4aab87a79d222b10d088e01acf6ac8be29 Mon Sep 17 00:00:00 2001 From: "Danilo M." Date: Mon, 9 Nov 2026 19:31:13 +0100 Subject: feat: opencode session spend and brand marks in the LLM card --- static/deck.css | 16 +++++++++++++++- static/logos/claude.svg | 1 + static/logos/opencode.svg | 1 + static/modules/llm.js | 12 +++++++++--- 4 files changed, 26 insertions(+), 4 deletions(-) create mode 100644 static/logos/claude.svg create mode 100644 static/logos/opencode.svg (limited to 'static') diff --git a/static/deck.css b/static/deck.css index 79bf374..6f9e49a 100644 --- a/static/deck.css +++ b/static/deck.css @@ -266,7 +266,20 @@ select { border: 1px solid var(--udt-surface1); } .llm-head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; } -.llm-head .ico { width: 18px; height: 18px; color: var(--udt-accent); flex: none; } +.brand { + width: 18px; + height: 18px; + flex: none; + background: var(--udt-accent); + -webkit-mask-repeat: no-repeat; + -webkit-mask-position: center; + -webkit-mask-size: contain; + mask-repeat: no-repeat; + mask-position: center; + mask-size: contain; +} +.brand.claude { -webkit-mask-image: url(/logos/claude.svg); mask-image: url(/logos/claude.svg); } +.brand.opencode { -webkit-mask-image: url(/logos/opencode.svg); mask-image: url(/logos/opencode.svg); } .llm-head h3 { font-size: 12px; text-transform: uppercase; @@ -291,6 +304,7 @@ select { .gbar { height: 6px; background: var(--udt-surface2); border-radius: 3px; overflow: hidden; } .gbar > i { display: block; height: 100%; background: var(--udt-accent); } .lbig { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border-radius: 12px; background: var(--udt-surface1); } +.lpair { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; } .good { color: var(--udt-green); } .bad { color: var(--udt-red); } diff --git a/static/logos/claude.svg b/static/logos/claude.svg new file mode 100644 index 0000000..29bb61b --- /dev/null +++ b/static/logos/claude.svg @@ -0,0 +1 @@ +Claude \ No newline at end of file diff --git a/static/logos/opencode.svg b/static/logos/opencode.svg new file mode 100644 index 0000000..b090155 --- /dev/null +++ b/static/logos/opencode.svg @@ -0,0 +1 @@ +OpenCode \ No newline at end of file diff --git a/static/modules/llm.js b/static/modules/llm.js index 9d05f29..1465a30 100644 --- a/static/modules/llm.js +++ b/static/modules/llm.js @@ -8,8 +8,8 @@ const tokens = (n) => { return String(n); }; -const CLAUDE_ICON = ''; -const OPENCODE_ICON = ''; +const CLAUDE_ICON = ''; +const OPENCODE_ICON = ''; function section(icon, title, model) { const sec = document.createElement("section"); @@ -87,7 +87,13 @@ export default { box.append(claude); const opencode = section(OPENCODE_ICON, "opencode", o.model); - opencode.append(stat("spend", money(o.cost), `${tokens(o.tokens)} · ${o.calls ?? 0} calls`)); + const pair = document.createElement("div"); + pair.className = "lpair"; + pair.append( + stat("session", money(o.session_cost), `${tokens(o.session_tokens)} · ${o.session_calls ?? 0} calls`), + stat("total", money(o.cost), `${tokens(o.tokens)} · ${o.calls ?? 0} calls`), + ); + opencode.append(pair); box.append(opencode); }, }; -- cgit v1.2.3