中文
新增
- 数据新鲜度标注:额度页与底栏挂件均显示「最近成功更新」时间;额度页每 30s 自动刷新(与底栏挂件同频),DSH 明细页显示「统计时间」
- stale 保留旧数据:轮询失败时保留最后一次成功数据并标注「未更新」,不再把网络抖动误显示为查询失败或额度清零
- 诊断区块:额度页可展开「诊断」——最近成功拉取时间、HTTP 状态码、解析版本、凭证来源与掩码 key、最近 3 次请求快照(时间 / 状态 / 错误 / 原始响应体,超长响应自动截断为预览),便于与官方页面核对、排查多 key 混用
- 计费口径提示:DSH 明细标注「本地统计仅供参考」(计费规则、舍入、重试、隐藏 token 等差异,以官方账单为准);额度页标注「限额为套餐参考值」
变更
usage()结果扩展fetchedAt/httpStatus/parseVersion/credential/snapshots字段(typert 严格 schema 已同步;解析规则版本化,解析逻辑变更时递增)dshUsage()新增fetchedAt- 底栏挂件悬停提示追加最近成功更新时间与「未更新」标记
升级
dsh plugin --profile web add github:yascitom/dsh-opencode-go-box
# 或离线:dsh plugin --profile web add file:/path/to/dsh-opencode-go-usage-0.4.0.tgz升级后重启 dsh web 并硬刷新页面(Ctrl+F5)。
English
Added
- Data freshness: the quota page and the dock widget show the last successful update time; the quota page auto-refreshes every 30s (same cadence as the dock), and the DSH details page shows the stats time
- Stale retention: a failed poll now keeps the last successful data marked stale instead of blanking it — a network blip no longer looks like a failed query or zeroed quota
- Diagnostics block: the quota page can expand Diagnostics — last successful fetch, HTTP status, parse version, credential source with a masked key, and the latest 3 request snapshots (time / status / error / raw body, truncated when large) for cross-checking against the official page and spotting mixed keys
- Billing caveat: the DSH details page notes that local stats are for reference only (billing rules, rounding, retries, hidden tokens — the official bill is authoritative); the quota page labels limits as reference plan values
Changed
usage()result extended withfetchedAt/httpStatus/parseVersion/credential/snapshots(strict typert schema updated; parse logic is now versioned and bumped on change)dshUsage()returnsfetchedAt- Dock tooltip adds the last-update time and the stale marker
Upgrade
dsh plugin --profile web add github:yascitom/dsh-opencode-go-box
# or offline: dsh plugin --profile web add file:/path/to/dsh-opencode-go-usage-0.4.0.tgzThen restart dsh web and hard-refresh the page (Ctrl+F5).
Asset: dsh-opencode-go-usage-0.4.0.tgz (npm pack tarball, 25506 bytes)
SHA-256: 48106B4CECEB41E2778A2D2204740977659B3CDCC5610C93DBD69C29BA021767