opencode-statboard 2.10.31 → 2.10.32

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "opencode-statboard",
3
- "version": "2.10.31",
3
+ "version": "2.10.32",
4
4
  "description": "Real-time dashboard for opencode token usage and cost statistics",
5
5
  "main": "server.js",
6
6
  "bin": {
package/public/index.html CHANGED
@@ -636,7 +636,7 @@ function renderReport(rep) {
636
636
  const avgTokensDay = o.days > 0 ? dayTokTotal / o.days : null;
637
637
  const meta = [t('sessionsLabel') + ' ' + fmt(o.sessions), t('messagesLabel') + ' ' + fmt(o.messages),
638
638
  t('daysLabel') + ' ' + fmt(o.days), t('avgCostDay') + ' ' + fmtCost(c.avgDay),
639
- t('avgTokensDay') + ' ' + (avgTokensDay != null ? fmt(avgTokensDay) : EM),
639
+ t('avgTokensDay') + ' ' + (avgTokensDay != null ? fmt(avgTokensDay) : '—'),
640
640
  t('avgTokensSession') + ' ' + fmt(c.avgTokensSession), t('medianTokensSession') + ' ' + fmt(c.medianTokensSession)];
641
641
  $('hl-meta').textContent = meta.join(' · ');
642
642
 
@@ -750,14 +750,14 @@ function renderPricing(rep) {
750
750
  $('pricing-empty').textContent = prov.length ? '' : t('noData');
751
751
  }
752
752
 
753
- function fmtUsd(v) { if (v == null) return EM; return '$' + Number(v).toFixed(4); }
753
+ function fmtUsd(v) { if (v == null) return '—'; return '$' + Number(v).toFixed(4); }
754
754
  function renderQuota(q) {
755
755
  const body = $('quota-body');
756
756
  if (!q || !q.ok) { body.textContent = q && q.error ? q.error : t('noData'); return; }
757
757
  const rows = (q.accounts || []).map((a) => {
758
758
  if (a.error) return '<div style="color:var(--err)">' + esc(a.label) + ': ' + esc(a.error) + '</div>';
759
759
  const free = a.freeModelDaily || {};
760
- const rem = a.remainingUsd != null ? fmtUsd(a.remainingUsd) : EM;
760
+ const rem = a.remainingUsd != null ? fmtUsd(a.remainingUsd) : '—';
761
761
  const used = fmtUsd(a.usedUsd || 0);
762
762
  const lim = a.limitUsd != null ? fmtUsd(a.limitUsd) : 'unlimited';
763
763
  const pct = (a.limitUsd && a.limitUsd > 0) ? Math.round(((a.usedUsd || 0) / a.limitUsd) * 100) : null;