dsh-usage-peak 1.3.0 → 1.3.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/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.3.1
4
+
5
+ - 修复余额充足时头部胶囊仍显示「余额仅够 X 天」的文案:改为「可撑 X 天」,只有低于 7 天警戒线才显示「余额仅够」。
6
+
3
7
  ## 1.3.0
4
8
 
5
9
  - 新增「按项目」统计:从会话头读取绝对 `cwd`,按项目聚合窗口内的请求、tokens、花费与占比;没有会话头时回落到 workspace slug 解码。
package/client.js CHANGED
@@ -81,6 +81,7 @@ window.__ModuleLoader__.load({
81
81
  'unit.day': '天',
82
82
  'wallet.avg': '日均',
83
83
  'wallet.alert': '余额仅够',
84
+ 'wallet.runway': '可撑',
84
85
  'wallet.warn': '余额偏低',
85
86
  'wallet.low': '余额紧张',
86
87
 
@@ -178,6 +179,7 @@ window.__ModuleLoader__.load({
178
179
  'unit.day': 'd',
179
180
  'wallet.avg': 'avg',
180
181
  'wallet.alert': 'Balance covers',
182
+ 'wallet.runway': 'covers',
181
183
  'wallet.warn': 'Low balance',
182
184
  'wallet.low': 'Balance critical',
183
185
 
@@ -841,6 +843,7 @@ window.__ModuleLoader__.load({
841
843
  const walletLevel = wallet ? wallet.level : 'unknown';
842
844
  const walletAlert = walletLevel === 'low' || walletLevel === 'warn';
843
845
  const walletTone = walletLevel === 'low' ? C.error : walletLevel === 'warn' ? C.peak : C.text3;
846
+ const runwayLabel = walletAlert ? t('wallet.alert') : t('wallet.runway');
844
847
  const remain = data ? Math.max(0, data.now.nextAt - Date.now()) : 0;
845
848
  const switchText =
846
849
  data && remain > 30_000
@@ -920,7 +923,7 @@ window.__ModuleLoader__.load({
920
923
  ? h(
921
924
  'span',
922
925
  { style: { color: walletTone, fontWeight: 600 } },
923
- ` · ${t('wallet.alert')} ${runway(wallet.runwayDays, t)}`,
926
+ ` · ${runwayLabel} ${runway(wallet.runwayDays, t)}`,
924
927
  )
925
928
  : null,
926
929
  ),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-usage-peak",
3
- "version": "1.3.0",
3
+ "version": "1.3.1",
4
4
  "type": "module",
5
5
  "description": "DeepSeek Harness 用量峰谷仪表盘:峰/谷时段(含节假日与调休)、今日花费与 tokens、按项目/模型统计、余额可撑天数、CSV 导出、7/14/30 天窗口、缓存命中、谷时更省,侧栏常驻胶囊 + 设置页详情。",
6
6
  "exports": {