Skip to content

Releases: zerro-223/dsh-token-usage

v1.1.0

Choose a tag to compare

@zerro-223 zerro-223 released this 15 Aug 10:37

更新内容

新增

  • 统计面板新增「自定义日期范围」,最长支持 30 天。
  • 新增「模型汇总表」,点击行可快速按模型筛选图表。
  • 最近请求卡片支持导出:JSON(完整数据)、CSV(最近请求)、CSV(模型汇总)。
  • 趋势图新增成本曲线,使用右侧独立美元 y 轴。
  • 新增轻量热力图接口 /token-stats/api/heatmap,降低刷新开销。
  • 新增「5小时」范围预设,并作为默认视图;「当日」改为显示当天完整数据。
  • usage.jsonl 超过阈值后自动压缩,避免磁盘无限增长。

优化

  • 切换日期范围 / API / 模型时,曲线会平滑过渡,不再生硬切换。
  • 热力图改用轻量接口,并降低刷新频率。
  • 价格面板自动匹配优化,支持 provider 前缀模型按归一化 key / 名称匹配。
  • 弹窗增加焦点陷阱,键盘操作更友好。
  • 数字滚动动画优化,快速切换时不会跳回旧值。

v1.0.2

Choose a tag to compare

@zerro-223 zerro-223 released this 15 Aug 05:44

What's Changed

  • Add GitHub-style daily usage heatmap (last 52 weeks / one year) with weekday labels and centered layout.
  • Trend chart now uses a unified y-axis and replays draw/fade animation when switching API/model/date range.
  • Price panel now lists auto-synced models even before they appear in usage; search also matches display names.
  • Heatmap cells use a custom hover tooltip instead of native title to avoid intermittent blank/black tooltip.
  • README adds screenshots for the main panel and price configuration UI.

v1.0.1

Choose a tag to compare

@zerro-223 zerro-223 released this 15 Aug 01:37

Token usage statistics for the DeepSeek Harness Web UI — v1.0.1.

Added

  • Estimated cost card (USD): per-model prices (input / output / cache read / cache write, USD per 1M tokens) configured in the in-panel pricing dialog, persisted to ~/.dsh/storages/token-stats/prices.json.
  • Automatic price sync from modelradar.cn: fetched on boot with backoff retries, refreshed daily, cached to prices-auto.json; manual prices always override.

Changed

  • USD-correct auto prices — modelradar prices 183 of 294 models natively in CNY; auto prices now always use the dataset's per-field *PriceUsdPer1M conversions (native CNY used to be treated as USD, overstating DeepSeek costs ~7x). CNY-sourced rows are tagged auto·CNY in the pricing dialog.
  • Async batched persistence (was one blocking appendFileSync per model call); history loading reads only the tail of usage.jsonl; cache-only rows survive a restart.
  • Cache read/write stat cards removed (DeepSeek and most providers report no cache-write metric); the stat grid spans the 6 remaining cards.
  • Pricing dialog: cache-write price column, model search box, inline errors when the prices API is unreachable or a refresh fails, and basename matching for provider-prefixed model ids.
  • Total-tokens card shows a Chinese-unit approximation (≈万 / ≈亿).

Full changelog: https://github.com/zerro-223/dsh-token-usage/blob/main/CHANGELOG.md

v1.0.0

Choose a tag to compare

@zerro-223 zerro-223 released this 14 Aug 13:13

v1.0.0 — Initial public release

Token 用量统计插件 for DeepSeek Harness Web UI — 侧边栏「Token 用量」入口 + 动画统计面板。

Features

  • 7 stat cards incl. cache hit rate
  • Unified dual-axis smooth trend chart: uncached input / cache hit / output,
    halo outlines + dashed cache line so overlapping peaks stay readable
  • Range presets: today (hourly) / 7d / month / 30d — x-axis spans full width
  • API & model filters (server-side)
  • Legend hover highlight
  • Recent requests list
  • zh-CN / en, dark & light themes

Install

dsh plugin --profile web add @zerro223/dsh-token-usage

Docs: README