aboutsummaryrefslogtreecommitdiffstats
path: root/static/modules/llm.js
diff options
context:
space:
mode:
Diffstat (limited to 'static/modules/llm.js')
-rw-r--r--static/modules/llm.js12
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);
},
};