@iammralmost/usage-hud 0.0.0-stage → 1.0.0

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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 iammralmost
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,3 +1,46 @@
1
- # Temporary Holding Version
1
+ # horizon
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ DeepSeek Harness 的用量与花费显示插件。
4
+
5
+ 输入框上方常驻账户余额,点开能看今天的用量和花费,每条回答末尾也会标出这一轮花了多少钱。
6
+
7
+ ## 显示什么
8
+
9
+ - 输入框上方一行:`⛁ 余额 ¥128.00`
10
+ - 每条回答的按钮行:`⛁ 用量 7.5M tok ¥0.18 03:15`,悬停可看输入、输出、缓存明细
11
+ - 点余额展开面板:今日总量、24 小时柱状图(悬停显示那一小时的花费和忙/闲)、按模型拆分
12
+
13
+ ## 安装
14
+
15
+ 侧边栏 → 插件 → 添加插件 → 输入包名:
16
+
17
+ ```
18
+ @iammralmost/usage-hud
19
+ ```
20
+
21
+ 安装源选「中国大陆镜像源」最快。刚发布的版本镜像要同步几分钟,这时候临时切到「npm 官方源」再切回来。
22
+
23
+ 装完按 `Ctrl+R` 刷新;没变化就完整退出 DSH 再打开。
24
+
25
+ 也可以直接用仓库地址安装:`https://github.com/iammralmost/horizon`。
26
+
27
+ ## 价格
28
+
29
+ DSH 不存单价,所以费用是按 `prices.json` 算出来的估算值,不是平台账单。
30
+
31
+ 内置了 `deepseek-flash` 和 `deepseek-v4-pro` 的官方价,单位是人民币元/百万 token,填的是高峰价,闲时按 `offPeakDiscount` 打折。高峰时段按官方规则:工作日 9:00–12:00 和 14:00–18:00,其余时间含周末都算闲时。
32
+
33
+ **法定节假日要自己加**到 `peak.holidays`(格式 `2026-10-01`)。不加的话,那天会被当成高峰计价,费用会高估一倍。
34
+
35
+ 换模型就改 `models` 里对应那行,不用重新安装。
36
+
37
+ ## 几点说明
38
+
39
+ - 余额走平台接口,今日用量读本机会话日志,都不消耗 token
40
+ - 只统计本机的会话,别的设备或网页版的用量不会算进来
41
+ - 余额缓存 60 秒,今日用量缓存 90 秒,点面板里的「刷新」才会强制重算
42
+ - 针对 DSH 0.2.1-rc.5 的界面结构写的。其中把花费排到「用量」和「时间」之间用了 CSS 重排,DSH 改版后位置可能会跑,但数字不会消失
43
+
44
+ ## License
45
+
46
+ MIT