claude-finops 0.7.0 → 0.7.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/finops/analytics.py +14 -0
- package/package.json +1 -1
- package/web/app.js +11 -2
- package/web/styles.css +6 -0
package/finops/analytics.py
CHANGED
|
@@ -47,6 +47,19 @@ def _plan(acct):
|
|
|
47
47
|
return (base + mult) if base else ""
|
|
48
48
|
|
|
49
49
|
|
|
50
|
+
def _version():
|
|
51
|
+
"""The version of the copy that is actually serving this page.
|
|
52
|
+
|
|
53
|
+
Worth surfacing: a global npm install and a checkout look identical in the
|
|
54
|
+
browser, and "why is my new feature missing" is almost always this.
|
|
55
|
+
"""
|
|
56
|
+
try:
|
|
57
|
+
from .update import _installed
|
|
58
|
+
return _installed()
|
|
59
|
+
except Exception:
|
|
60
|
+
return ""
|
|
61
|
+
|
|
62
|
+
|
|
50
63
|
def detect_account():
|
|
51
64
|
"""Who Claude Code is signed in as, read from ~/.claude.json (actual, not guessed).
|
|
52
65
|
|
|
@@ -1759,5 +1772,6 @@ class Analytics:
|
|
|
1759
1772
|
"pricing": {"updated": self.pricing.updated, "source": self.pricing.source,
|
|
1760
1773
|
"models": self.pricing.models},
|
|
1761
1774
|
"settings": self.settings,
|
|
1775
|
+
"version": _version(),
|
|
1762
1776
|
"unavailable_label": UNAVAILABLE,
|
|
1763
1777
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "claude-finops",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.1",
|
|
4
4
|
"description": "Local FinOps dashboard for Claude Code: what you used, what it cost, why it cost that much, and what to change. Reads your own transcripts, no API key, no data leaves the machine.",
|
|
5
5
|
"bin": {
|
|
6
6
|
"claude-finops": "bin/claude-finops.js"
|
package/web/app.js
CHANGED
|
@@ -146,7 +146,8 @@ const NAV = [
|
|
|
146
146
|
function shell() {
|
|
147
147
|
document.body.innerHTML = `<div class="app">
|
|
148
148
|
<aside class="sidebar">
|
|
149
|
-
<div class="brand"><div class="mark"><span class="dot"></span>Claude FinOps
|
|
149
|
+
<div class="brand"><div class="mark"><span class="dot"></span>Claude FinOps
|
|
150
|
+
<span class="ver" id="ver"></span></div>
|
|
150
151
|
<div class="sub">Command Center</div></div>
|
|
151
152
|
<nav class="nav">${NAV.map(([g, items], gi) => `<div class="group g${gi}">${g}</div>` +
|
|
152
153
|
items.map(([id, ic, label]) =>
|
|
@@ -2414,8 +2415,16 @@ function applyAgentChrome() {
|
|
|
2414
2415
|
const a = selAgents();
|
|
2415
2416
|
const label = a.length === 1 ? a[0].name.replace(/ (Code|CLI)$/, '') : a.length ? 'Multi-agent' : 'AI';
|
|
2416
2417
|
whoBlock();
|
|
2418
|
+
// Stamp the version onto the logo. Two copies of this app can be installed at
|
|
2419
|
+
// once (npm global, a checkout) and the browser cannot tell them apart.
|
|
2420
|
+
const ver = $('#ver');
|
|
2421
|
+
if (ver && S.opts?.version) {
|
|
2422
|
+
ver.textContent = 'v' + S.opts.version;
|
|
2423
|
+
ver.title = 'Version serving this page';
|
|
2424
|
+
}
|
|
2417
2425
|
const mark = $('.brand .mark');
|
|
2418
|
-
if (mark) mark.innerHTML = `<span class="dot"></span>${esc(label)} FinOps
|
|
2426
|
+
if (mark) mark.innerHTML = `<span class="dot"></span>${esc(label)} FinOps` +
|
|
2427
|
+
(S.opts?.version ? `<span class="ver" id="ver" title="Version serving this page">v${esc(S.opts.version)}</span>` : '');
|
|
2419
2428
|
const sub = $('.brand .sub');
|
|
2420
2429
|
if (sub) sub.textContent = a.length > 1 ? a.map(x => x.name).join(' + ') : 'Command Center';
|
|
2421
2430
|
document.title = `${label} FinOps Command Center`;
|
package/web/styles.css
CHANGED
|
@@ -435,3 +435,9 @@ table.tbl .sub { font-size:10.5px; color:var(--muted); }
|
|
|
435
435
|
max-height: 76px; overflow: auto; color: var(--text-2); }
|
|
436
436
|
.trial-s { border-top: 1px solid var(--border); padding-top: 7px; }
|
|
437
437
|
.trial-out:empty { display: none; }
|
|
438
|
+
|
|
439
|
+
/* Version badge beside the wordmark: small, muted, and always the version of
|
|
440
|
+
the copy actually serving the page. */
|
|
441
|
+
.brand .ver { font-size: 9.5px; font-weight: 600; color: var(--muted);
|
|
442
|
+
border: 1px solid var(--border); border-radius: 99px;
|
|
443
|
+
padding: 1px 5px; margin-left: 5px; letter-spacing: .01em; }
|