opencode-statboard 2.10.35 → 2.10.37
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 +1 -1
- package/public/index.html +1 -2
- package/server.js +2 -2
package/package.json
CHANGED
package/public/index.html
CHANGED
|
@@ -1033,7 +1033,7 @@ function renderAll() {
|
|
|
1033
1033
|
renderTrend(tr || null);
|
|
1034
1034
|
renderHeatmap(heatmapTrend);
|
|
1035
1035
|
renderTools(lastTools);
|
|
1036
|
-
|
|
1036
|
+
loadQuota(); // always refresh quota on render (server caches 5 min, so this is cheap)
|
|
1037
1037
|
}
|
|
1038
1038
|
|
|
1039
1039
|
// ---- data loading ------------------------------------------------------
|
|
@@ -1074,7 +1074,6 @@ async function poll() {
|
|
|
1074
1074
|
lastUpdatedText = t('lastUpdated') + ' ' + time + ' (' + t('dataAgo') + ' ' + ago + 's)';
|
|
1075
1075
|
$('updated').textContent = lastUpdatedText;
|
|
1076
1076
|
refreshCurrentReport(); // auto-refresh report panels
|
|
1077
|
-
loadQuota(); // keep quota/RPD fresh on a 24/7 dashboard (server caches 5 min, so this is cheap)
|
|
1078
1077
|
return j;
|
|
1079
1078
|
} catch (e) {
|
|
1080
1079
|
$('updated').textContent = t('connFail') + ': ' + e.message;
|
package/server.js
CHANGED
|
@@ -1600,14 +1600,14 @@ async function fetchOpenRouterQuota() {
|
|
|
1600
1600
|
const d = j.data || {};
|
|
1601
1601
|
const eb = d.effective_budget || {};
|
|
1602
1602
|
// free_model_daily_requests is account-level (shared across all keys of the same account).
|
|
1603
|
-
//
|
|
1603
|
+
// Show RPD for all keys so the user can see the account's daily free model usage.
|
|
1604
1604
|
const isFree = !!d.is_free_tier;
|
|
1605
1605
|
accounts.push({
|
|
1606
1606
|
label, limitUsd: d.limit != null ? d.limit : null, usedUsd: d.usage || 0,
|
|
1607
1607
|
remainingUsd: d.limit_remaining != null ? d.limit_remaining : null,
|
|
1608
1608
|
dailyUsed: d.usage_daily || 0, weeklyUsed: d.usage_weekly || 0, monthlyUsed: d.usage_monthly || 0,
|
|
1609
1609
|
isFreeTier: isFree, expiresAt: d.expires_at || null,
|
|
1610
|
-
freeModelDaily:
|
|
1610
|
+
freeModelDaily: d.free_model_daily_requests || null,
|
|
1611
1611
|
budgetScope: eb.scope || null, budgetLimit: eb.limit_usd != null ? eb.limit_usd : null,
|
|
1612
1612
|
budgetSpend: eb.spend_usd != null ? eb.spend_usd : null,
|
|
1613
1613
|
budgetRemaining: eb.remaining_usd != null ? eb.remaining_usd : null,
|