diff options
| author | Danilo M. <danix@danix.xyz> | 2026-11-09 19:31:13 +0100 |
|---|---|---|
| committer | Danilo M. <danix@danix.xyz> | 2026-11-09 19:31:13 +0100 |
| commit | 33060a4aab87a79d222b10d088e01acf6ac8be29 (patch) | |
| tree | 5a5cc2c73f0c6814919541f40f93f78456f33fca /static/modules | |
| parent | 7a985a14d440acdda93dc7a43ee7c6bdecc2bf44 (diff) | |
| download | deck-it-33060a4aab87a79d222b10d088e01acf6ac8be29.tar.gz deck-it-33060a4aab87a79d222b10d088e01acf6ac8be29.zip | |
feat: opencode session spend and brand marks in the LLM card
Diffstat (limited to 'static/modules')
| -rw-r--r-- | static/modules/llm.js | 12 |
1 files changed, 9 insertions, 3 deletions
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 = '<svg class="ico" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="m12 3 1.9 5.8L20 11l-6.1 2.2L12 19l-1.9-5.8L4 11l6.1-2.2L12 3Z"/></svg>'; -const OPENCODE_ICON = '<svg class="ico" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect x="3" y="3" width="18" height="18" rx="2"/><path d="m7 10 2 2-2 2"/><path d="M12.5 14H17"/></svg>'; +const CLAUDE_ICON = '<span class="brand claude"></span>'; +const OPENCODE_ICON = '<span class="brand opencode"></span>'; 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); }, }; |
