dsh-desktop-statusbar 2.1.0 → 2.1.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/README.en.md +108 -108
- package/README.md +108 -108
- package/lib/balance-api.js +211 -15
- package/lib/client.js +1401 -181
- package/lib/index.js +1668 -78
- package/locale/en.json +6 -0
- package/locale/zh.json +6 -0
- package/package.json +3 -1
package/README.en.md
CHANGED
|
@@ -1,108 +1,108 @@
|
|
|
1
|
-
<h1 align="center">dsh-desktop-statusbar</h1>
|
|
2
|
-
|
|
3
|
-
<p align="center">
|
|
4
|
-
<a href="https://github.com/raphael-y7/dsh-desktop-statusbar/stargazers"><img alt="GitHub stars" src="https://img.shields.io/github/stars/raphael-y7/dsh-desktop-statusbar?style=social"></a>
|
|
5
|
-
<a href="https://github.com/deepseek-ai/deepseek-harness"><img alt="DeepSeek Harness" src="https://img.shields.io/badge/DeepSeek%20Harness-0.2.0--rc.2-%234d6bfe"></a>
|
|
6
|
-
<a href="https://dshfind.com/zh/plugins/raphael-y7/dsh-desktop-statusbar"><img alt="dshfind" src="https://img.shields.io/badge/dshfind-listed-%2300a884"></a>
|
|
7
|
-
<a href="https://deepseek1024.com/plugins/Rapheal-Y7/dsh-desktop-statusbar"><img alt="1024Store" src="https://img.shields.io/badge/1024Store-listed-orange"></a>
|
|
8
|
-
<a href="https://www.npmjs.com/package/dsh-desktop-statusbar"><img alt="npm version" src="https://img.shields.io/npm/v/dsh-desktop-statusbar?color=red"></a>
|
|
9
|
-
<br>
|
|
10
|
-
<a href="https://nodejs.org/"><img alt="node" src="https://img.shields.io/badge/node-%5E22.19%20%7C%7C%20%3E%3D24-%238b5cf6"></a>
|
|
11
|
-
<img alt="language" src="https://img.shields.io/github/languages/top/raphael-y7/dsh-desktop-statusbar?color=yellow">
|
|
12
|
-
<a href="LICENSE"><img alt="license" src="https://img.shields.io/badge/license-MIT-%235fa04e"></a>
|
|
13
|
-
</p>
|
|
14
|
-
|
|
15
|
-
<p align="center"><a href="README.md">中文</a> | English</p>
|
|
16
|
-
|
|
17
|
-
Replaces the stats line under the message input in the DSH desktop app with a configurable status bar: fields, ordering, per-model prices and currency are all configurable, with live cost estimates using DeepSeek's official peak/off-peak rates.
|
|
18
|
-
|
|
19
|
-

|
|
20
|
-
|
|
21
|
-
## Features
|
|
22
|
-
|
|
23
|
-
- **10 optional fields**: context occupancy (the ring at the head of the bar), peak / off-peak check, turns & steps, cache hit rate, output speed, TTFT, run time, this turn cost, session cost, balance
|
|
24
|
-
- **Click a field for details**:
|
|
25
|
-
|
|
26
|
-
| Field | Content |
|
|
27
|
-
| --- | --- |
|
|
28
|
-
| Context ring (bar head) | System prompt / tool definitions / messages |
|
|
29
|
-
| Peak / off-peak check | Usage heat map: day / week / month / year |
|
|
30
|
-
| Turns & steps | Context compactions / skills injected / tool calls |
|
|
31
|
-
| Combined hit | This turn / highest / lowest cache hit rate |
|
|
32
|
-
| TPS | This turn / fastest / slowest speed |
|
|
33
|
-
| TTFT | This turn / fastest / slowest first-token delay |
|
|
34
|
-
| Run time | Wait time / model time / tool calls |
|
|
35
|
-
| This turn cost | Token breakdown for this turn |
|
|
36
|
-
| Session cost | Cumulative token breakdown for this session |
|
|
37
|
-
| Balance | Top-up balance / granted balance / quota left |
|
|
38
|
-
|
|
39
|
-
- **Session data drill-down**: context compactions mark the node they happened at, skills injected counts the skills injected in this session, and tool calls list every tool the session used by count; click the title to go back up
|
|
40
|
-
- **Version check and update**: DSH checks for the latest version on startup, shows a hint next to the "Status bar" nav item when one is available, and offers a one-click update button in settings
|
|
41
|
-
- **GitHub support**: your support is the biggest motivation for the developer to keep going! Click the button to open the GitHub project page and help with a star — thanks, everyone!
|
|
42
|
-
- **Cost estimation**: priced with the official peak/off-peak rules; each call is computed from the moment it happened and the model it used
|
|
43
|
-
- **Price book**: your own prices, an optional peak/off-peak split, and a CNY / USD currency switch
|
|
44
|
-
- **Also**: one-click holiday calendar update, balance refreshed every minute, bilingual UI
|
|
45
|
-
|
|
46
|
-
## Install
|
|
47
|
-
|
|
48
|
-
In the DSH desktop app, open **Plugins → Add plugin** and install by package name:
|
|
49
|
-
|
|
50
|
-
```
|
|
51
|
-
dsh-desktop-statusbar
|
|
52
|
-
```
|
|
53
|
-
|
|
54
|
-
Where the npm registry is not reachable, the same dialog offers the China mainland mirror as the install source. A GitHub repository URL is also accepted:
|
|
55
|
-
|
|
56
|
-
```
|
|
57
|
-
https://github.com/raphael-y7/dsh-desktop-statusbar
|
|
58
|
-
```
|
|
59
|
-
|
|
60
|
-
Command line:
|
|
61
|
-
|
|
62
|
-
```powershell
|
|
63
|
-
dsh plugin --profile desktop add dsh-desktop-statusbar
|
|
64
|
-
```
|
|
65
|
-
|
|
66
|
-
### Install from npm
|
|
67
|
-
|
|
68
|
-
Both ways above install from the npm registry; the package name is `dsh-desktop-statusbar`. To check the current version on npm:
|
|
69
|
-
|
|
70
|
-
```powershell
|
|
71
|
-
npm view dsh-desktop-statusbar version
|
|
72
|
-
```
|
|
73
|
-
|
|
74
|
-
Also listed on [dshfind](https://dshfind.com/zh/plugins/raphael-y7/dsh-desktop-statusbar) and [1024Store](https://deepseek1024.com/plugins/Rapheal-Y7/dsh-desktop-statusbar).
|
|
75
|
-
|
|
76
|
-
## Usage
|
|
77
|
-
|
|
78
|
-
Open **Settings → Status bar**:
|
|
79
|
-
|
|
80
|
-

|
|
81
|
-
|
|
82
|
-
- **Context occupancy**: the ring at the head of the bar — progress shows the share of context used, the gap marks the compaction threshold, and the colour shows the run state (grey idle / green running / red error / amber pending approval)
|
|
83
|
-
- **Stats fields**: ticking controls visibility only, so unticking hides a field without moving it; drag the handle on the right to reorder; "Reset settings" restores the factory order
|
|
84
|
-
- **Custom model prices**: enter a model name and "Add" to create an entry; "Edit" opens the editor and changes are written on save; tick "peak / off-peak pricing" to split by time of day, otherwise a flat all-day price applies
|
|
85
|
-
- **Currency**: CNY or USD in the top-right corner of the editor. Switching replaces the two built-in models with that currency's official reference prices (edited entries are kept) and changes the symbol in the cost fields; the balance follows the currency reported by the API
|
|
86
|
-
- **Holidays**: click "Update holidays" to fetch and write the next year's public-holiday calendar
|
|
87
|
-
- **Balance**: refreshed once a minute
|
|
88
|
-
|
|
89
|
-
### Billing rules
|
|
90
|
-
|
|
91
|
-
Peak hours are **09:00–12:00 and 14:00–18:00 Beijing time, Monday to Friday**, and off-peak rates are half the peak rates; Chinese public holidays and weekends are billed off-peak all day (matching the [official docs](https://api-docs.deepseek.com/quick_start/pricing), checked 2026-09).
|
|
92
|
-
|
|
93
|
-

|
|
94
|
-
|
|
95
|
-
## Known limitations
|
|
96
|
-
|
|
97
|
-
- Fastest / slowest TTFT and speed come from a new host-side projection: **you must fully quit and restart DSH** before it starts collecting
|
|
98
|
-
- A model with no price is not billed; adding the price back-fills its earlier calls
|
|
99
|
-
|
|
100
|
-
## Development
|
|
101
|
-
|
|
102
|
-
```powershell
|
|
103
|
-
node tools/test.cjs
|
|
104
|
-
```
|
|
105
|
-
|
|
106
|
-
## Licence
|
|
107
|
-
|
|
108
|
-
[MIT](LICENSE): free to use, modify and redistribute; keep the copyright and licence notice.
|
|
1
|
+
<h1 align="center">dsh-desktop-statusbar</h1>
|
|
2
|
+
|
|
3
|
+
<p align="center">
|
|
4
|
+
<a href="https://github.com/raphael-y7/dsh-desktop-statusbar/stargazers"><img alt="GitHub stars" src="https://img.shields.io/github/stars/raphael-y7/dsh-desktop-statusbar?style=social"></a>
|
|
5
|
+
<a href="https://github.com/deepseek-ai/deepseek-harness"><img alt="DeepSeek Harness" src="https://img.shields.io/badge/DeepSeek%20Harness-0.2.0--rc.2-%234d6bfe"></a>
|
|
6
|
+
<a href="https://dshfind.com/zh/plugins/raphael-y7/dsh-desktop-statusbar"><img alt="dshfind" src="https://img.shields.io/badge/dshfind-listed-%2300a884"></a>
|
|
7
|
+
<a href="https://deepseek1024.com/plugins/Rapheal-Y7/dsh-desktop-statusbar"><img alt="1024Store" src="https://img.shields.io/badge/1024Store-listed-orange"></a>
|
|
8
|
+
<a href="https://www.npmjs.com/package/dsh-desktop-statusbar"><img alt="npm version" src="https://img.shields.io/npm/v/dsh-desktop-statusbar?color=red"></a>
|
|
9
|
+
<br>
|
|
10
|
+
<a href="https://nodejs.org/"><img alt="node" src="https://img.shields.io/badge/node-%5E22.19%20%7C%7C%20%3E%3D24-%238b5cf6"></a>
|
|
11
|
+
<img alt="language" src="https://img.shields.io/github/languages/top/raphael-y7/dsh-desktop-statusbar?color=yellow">
|
|
12
|
+
<a href="LICENSE"><img alt="license" src="https://img.shields.io/badge/license-MIT-%235fa04e"></a>
|
|
13
|
+
</p>
|
|
14
|
+
|
|
15
|
+
<p align="center"><a href="README.md">中文</a> | English</p>
|
|
16
|
+
|
|
17
|
+
Replaces the stats line under the message input in the DSH desktop app with a configurable status bar: fields, ordering, per-model prices and currency are all configurable, with live cost estimates using DeepSeek's official peak/off-peak rates.
|
|
18
|
+
|
|
19
|
+

|
|
20
|
+
|
|
21
|
+
## Features
|
|
22
|
+
|
|
23
|
+
- **10 optional fields**: context occupancy (the ring at the head of the bar), peak / off-peak check, turns & steps, cache hit rate, output speed, TTFT, run time, this turn cost, session cost, balance
|
|
24
|
+
- **Click a field for details**:
|
|
25
|
+
|
|
26
|
+
| Field | Content |
|
|
27
|
+
| --- | --- |
|
|
28
|
+
| Context ring (bar head) | System prompt / tool definitions / messages |
|
|
29
|
+
| Peak / off-peak check | Usage heat map: day / week / month / year |
|
|
30
|
+
| Turns & steps | Context compactions / skills injected / tool calls |
|
|
31
|
+
| Combined hit | This turn / highest / lowest cache hit rate |
|
|
32
|
+
| TPS | This turn / fastest / slowest speed |
|
|
33
|
+
| TTFT | This turn / fastest / slowest first-token delay |
|
|
34
|
+
| Run time | Wait time / model time / tool calls |
|
|
35
|
+
| This turn cost | Token breakdown for this turn |
|
|
36
|
+
| Session cost | Cumulative token breakdown for this session |
|
|
37
|
+
| Balance | Top-up balance / granted balance / quota left |
|
|
38
|
+
|
|
39
|
+
- **Session data drill-down**: context compactions mark the node they happened at, skills injected counts the skills injected in this session, and tool calls list every tool the session used by count; click the title to go back up
|
|
40
|
+
- **Version check and update**: DSH checks for the latest version on startup, shows a hint next to the "Status bar" nav item when one is available, and offers a one-click update button in settings
|
|
41
|
+
- **GitHub support**: your support is the biggest motivation for the developer to keep going! Click the button to open the GitHub project page and help with a star — thanks, everyone!
|
|
42
|
+
- **Cost estimation**: priced with the official peak/off-peak rules; each call is computed from the moment it happened and the model it used
|
|
43
|
+
- **Price book**: your own prices, an optional peak/off-peak split, and a CNY / USD currency switch
|
|
44
|
+
- **Also**: one-click holiday calendar update, balance refreshed every minute, bilingual UI
|
|
45
|
+
|
|
46
|
+
## Install
|
|
47
|
+
|
|
48
|
+
In the DSH desktop app, open **Plugins → Add plugin** and install by package name:
|
|
49
|
+
|
|
50
|
+
```
|
|
51
|
+
dsh-desktop-statusbar
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
Where the npm registry is not reachable, the same dialog offers the China mainland mirror as the install source. A GitHub repository URL is also accepted:
|
|
55
|
+
|
|
56
|
+
```
|
|
57
|
+
https://github.com/raphael-y7/dsh-desktop-statusbar
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
Command line:
|
|
61
|
+
|
|
62
|
+
```powershell
|
|
63
|
+
dsh plugin --profile desktop add dsh-desktop-statusbar
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
### Install from npm
|
|
67
|
+
|
|
68
|
+
Both ways above install from the npm registry; the package name is `dsh-desktop-statusbar`. To check the current version on npm:
|
|
69
|
+
|
|
70
|
+
```powershell
|
|
71
|
+
npm view dsh-desktop-statusbar version
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
Also listed on [dshfind](https://dshfind.com/zh/plugins/raphael-y7/dsh-desktop-statusbar) and [1024Store](https://deepseek1024.com/plugins/Rapheal-Y7/dsh-desktop-statusbar).
|
|
75
|
+
|
|
76
|
+
## Usage
|
|
77
|
+
|
|
78
|
+
Open **Settings → Status bar**:
|
|
79
|
+
|
|
80
|
+

|
|
81
|
+
|
|
82
|
+
- **Context occupancy**: the ring at the head of the bar — progress shows the share of context used, the gap marks the compaction threshold, and the colour shows the run state (grey idle / green running / red error / amber pending approval)
|
|
83
|
+
- **Stats fields**: ticking controls visibility only, so unticking hides a field without moving it; drag the handle on the right to reorder; "Reset settings" restores the factory order
|
|
84
|
+
- **Custom model prices**: enter a model name and "Add" to create an entry; "Edit" opens the editor and changes are written on save; tick "peak / off-peak pricing" to split by time of day, otherwise a flat all-day price applies
|
|
85
|
+
- **Currency**: CNY or USD in the top-right corner of the editor. Switching replaces the two built-in models with that currency's official reference prices (edited entries are kept) and changes the symbol in the cost fields; the balance follows the currency reported by the API
|
|
86
|
+
- **Holidays**: click "Update holidays" to fetch and write the next year's public-holiday calendar
|
|
87
|
+
- **Balance**: refreshed once a minute
|
|
88
|
+
|
|
89
|
+
### Billing rules
|
|
90
|
+
|
|
91
|
+
Peak hours are **09:00–12:00 and 14:00–18:00 Beijing time, Monday to Friday**, and off-peak rates are half the peak rates; Chinese public holidays and weekends are billed off-peak all day (matching the [official docs](https://api-docs.deepseek.com/quick_start/pricing), checked 2026-09).
|
|
92
|
+
|
|
93
|
+

|
|
94
|
+
|
|
95
|
+
## Known limitations
|
|
96
|
+
|
|
97
|
+
- Fastest / slowest TTFT and speed come from a new host-side projection: **you must fully quit and restart DSH** before it starts collecting
|
|
98
|
+
- A model with no price is not billed; adding the price back-fills its earlier calls
|
|
99
|
+
|
|
100
|
+
## Development
|
|
101
|
+
|
|
102
|
+
```powershell
|
|
103
|
+
node tools/test.cjs
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
## Licence
|
|
107
|
+
|
|
108
|
+
[MIT](LICENSE): free to use, modify and redistribute; keep the copyright and licence notice.
|
package/README.md
CHANGED
|
@@ -1,108 +1,108 @@
|
|
|
1
|
-
<h1 align="center">dsh-desktop-statusbar</h1>
|
|
2
|
-
|
|
3
|
-
<p align="center">
|
|
4
|
-
<a href="https://github.com/raphael-y7/dsh-desktop-statusbar/stargazers"><img alt="GitHub stars" src="https://img.shields.io/github/stars/raphael-y7/dsh-desktop-statusbar?style=social"></a>
|
|
5
|
-
<a href="https://github.com/deepseek-ai/deepseek-harness"><img alt="DeepSeek Harness" src="https://img.shields.io/badge/DeepSeek%20Harness-0.2.0--rc.2-%234d6bfe"></a>
|
|
6
|
-
<a href="https://dshfind.com/zh/plugins/raphael-y7/dsh-desktop-statusbar"><img alt="dshfind" src="https://img.shields.io/badge/dshfind-listed-%2300a884"></a>
|
|
7
|
-
<a href="https://deepseek1024.com/plugins/Rapheal-Y7/dsh-desktop-statusbar"><img alt="1024Store" src="https://img.shields.io/badge/1024Store-listed-orange"></a>
|
|
8
|
-
<a href="https://www.npmjs.com/package/dsh-desktop-statusbar"><img alt="npm version" src="https://img.shields.io/npm/v/dsh-desktop-statusbar?color=red"></a>
|
|
9
|
-
<br>
|
|
10
|
-
<a href="https://nodejs.org/"><img alt="node" src="https://img.shields.io/badge/node-%5E22.19%20%7C%7C%20%3E%3D24-%238b5cf6"></a>
|
|
11
|
-
<img alt="language" src="https://img.shields.io/github/languages/top/raphael-y7/dsh-desktop-statusbar?color=yellow">
|
|
12
|
-
<a href="LICENSE"><img alt="license" src="https://img.shields.io/badge/license-MIT-%235fa04e"></a>
|
|
13
|
-
</p>
|
|
14
|
-
|
|
15
|
-
<p align="center">中文 | <a href="README.en.md">English</a></p>
|
|
16
|
-
|
|
17
|
-
以一条可配置的状态栏替换 DSH 桌面端对话区底部的统计行:字段、顺序、模型单价与计价单位均可配置,费用按官方峰谷口径实时估算。
|
|
18
|
-
|
|
19
|
-

|
|
20
|
-
|
|
21
|
-
## 功能
|
|
22
|
-
|
|
23
|
-
- **10 个可选字段**:上下文占用(栏首圆环)、峰谷判断、轮次&步数、缓存命中率、输出速度、首字平均、运行用时、本轮费用、总计费用、余额
|
|
24
|
-
- **点击字段可查看详情**:
|
|
25
|
-
|
|
26
|
-
| 字段 | 内容 |
|
|
27
|
-
| --- | --- |
|
|
28
|
-
| 上下文占用(栏首圆环) | 系统提示词 / 工具定义 / 对话消息 |
|
|
29
|
-
| 峰谷判断 | 日 / 周 / 月 / 年数据统计热力图 |
|
|
30
|
-
| 轮次&步数 | 上下文压缩 / 技能注入 / 工具调用 |
|
|
31
|
-
| 综合命中 | 本轮 / 最高 / 最低缓存命中率 |
|
|
32
|
-
| 综合速度 | 本轮 / 最快 / 最慢速度 |
|
|
33
|
-
| 首字平均 | 本轮 / 最快 / 最慢首字延迟 |
|
|
34
|
-
| 运行用时 | 等待用时 / 模型用时 / 工具调用 |
|
|
35
|
-
| 本轮费用 | 本轮会话的 token 明细 |
|
|
36
|
-
| 总计费用 | 当前会话的累计 token 明细 |
|
|
37
|
-
| 余额 | 充值余额 / 赠金余额 / 剩余配额 |
|
|
38
|
-
|
|
39
|
-
- **会话数据下钻**:上下文压缩逐次标注发生节点,技能注入统计当前会话注入的技能,工具调用按次数列出会话使用的所有工具;点击标题返回上一层
|
|
40
|
-
- **版本自检与更新**:DSH启动时自动检测最新版本,发现新版时在「状态栏」导航项旁显示提示,并在设置页提供一键更新按钮
|
|
41
|
-
- **费用估算**:按官方峰谷口径计价,每条调用按其发生时刻与所用模型分别计算
|
|
42
|
-
- **价格库**:自定义单价、峰谷分档、CNY / USD 计价单位
|
|
43
|
-
- **GitHub支持**:用户的支持是开发者持续开发的最大动力!点击按钮转跳GitHub项目页,帮忙点亮Star支持一下,感谢各位!
|
|
44
|
-
- **其他**:节假日日历一键更新、账户余额每分钟刷新、中英双语
|
|
45
|
-
|
|
46
|
-
## 安装
|
|
47
|
-
|
|
48
|
-
在 DSH 桌面端打开 **插件 → 添加插件**,输入包名后安装:
|
|
49
|
-
|
|
50
|
-
```
|
|
51
|
-
dsh-desktop-statusbar
|
|
52
|
-
```
|
|
53
|
-
|
|
54
|
-
网络受限时,可在同一对话框内将安装源切换为「中国大陆镜像源」。亦支持 GitHub 仓库地址:
|
|
55
|
-
|
|
56
|
-
```
|
|
57
|
-
https://github.com/raphael-y7/dsh-desktop-statusbar
|
|
58
|
-
```
|
|
59
|
-
|
|
60
|
-
命令行方式:
|
|
61
|
-
|
|
62
|
-
```powershell
|
|
63
|
-
dsh plugin --profile desktop add dsh-desktop-statusbar
|
|
64
|
-
```
|
|
65
|
-
|
|
66
|
-
### 从 npm 安装
|
|
67
|
-
|
|
68
|
-
插件面板与命令行两种方式,安装源默认都是 npm registry,包名为 `dsh-desktop-statusbar`。想确认 npm 上的当前版本:
|
|
69
|
-
|
|
70
|
-
```powershell
|
|
71
|
-
npm view dsh-desktop-statusbar version
|
|
72
|
-
```
|
|
73
|
-
|
|
74
|
-
本插件亦收录于 [dshfind](https://dshfind.com/zh/plugins/raphael-y7/dsh-desktop-statusbar) 与 [1024Store](https://deepseek1024.com/plugins/Rapheal-Y7/dsh-desktop-statusbar)。
|
|
75
|
-
|
|
76
|
-
## 使用
|
|
77
|
-
|
|
78
|
-
打开 **设置 → 状态栏**:
|
|
79
|
-
|
|
80
|
-

|
|
81
|
-
|
|
82
|
-
- **上下文占用**:栏首圆环,进度表示上下文占用比例,缺口表示上下文压缩阈值,颜色表示运行状态(空闲灰 / 运行绿 / 报错红 / 待审批黄)
|
|
83
|
-
- **统计字段**:勾选控制显示,取消勾选仅隐藏、不改变位置;拖动右侧把手调整顺序;「恢复默认设置」恢复出厂顺序并全选
|
|
84
|
-
- **自定义模型价格**:输入模型名并「添加」以新增条目;「修改」展开编辑区,保存后写入;需区分峰谷时段时勾选「峰谷计价」,否则按全天同价计算
|
|
85
|
-
- **计价单位**:价格编辑区右上角可选 CNY 或 USD。切换时内置的两款模型改用对应币种的官方参考价(已修改的条目保留),费用段的符号随之变化;余额按接口返回的币种显示
|
|
86
|
-
- **节假日**:点击「更新节假峰谷」获取并写入下一年的放假安排
|
|
87
|
-
- **余额**:每分钟自动刷新
|
|
88
|
-
|
|
89
|
-
### 计费口径
|
|
90
|
-
|
|
91
|
-
高峰时段为**北京时间周一至周五 9:00-12:00、14:00-18:00**,空闲价为高峰价的一半;法定节假日与周末全天按空闲价计费(与[官方文档](https://api-docs.deepseek.com/zh-cn/quick_start/pricing)一致,2026-09 核对)。
|
|
92
|
-
|
|
93
|
-

|
|
94
|
-
|
|
95
|
-
## 已知限制
|
|
96
|
-
|
|
97
|
-
- 最快 / 最慢首字与速度来自 host 新增的投影,**升级后需完全退出并重启 DSH** 才开始统计
|
|
98
|
-
- 价格库中缺少单价的模型不计费,补充单价后自动补算
|
|
99
|
-
|
|
100
|
-
## 开发
|
|
101
|
-
|
|
102
|
-
```powershell
|
|
103
|
-
node tools/test.cjs
|
|
104
|
-
```
|
|
105
|
-
|
|
106
|
-
## 许可
|
|
107
|
-
|
|
108
|
-
[MIT](LICENSE):可自由使用、修改与再分发;保留版权与许可声明即可。
|
|
1
|
+
<h1 align="center">dsh-desktop-statusbar</h1>
|
|
2
|
+
|
|
3
|
+
<p align="center">
|
|
4
|
+
<a href="https://github.com/raphael-y7/dsh-desktop-statusbar/stargazers"><img alt="GitHub stars" src="https://img.shields.io/github/stars/raphael-y7/dsh-desktop-statusbar?style=social"></a>
|
|
5
|
+
<a href="https://github.com/deepseek-ai/deepseek-harness"><img alt="DeepSeek Harness" src="https://img.shields.io/badge/DeepSeek%20Harness-0.2.0--rc.2-%234d6bfe"></a>
|
|
6
|
+
<a href="https://dshfind.com/zh/plugins/raphael-y7/dsh-desktop-statusbar"><img alt="dshfind" src="https://img.shields.io/badge/dshfind-listed-%2300a884"></a>
|
|
7
|
+
<a href="https://deepseek1024.com/plugins/Rapheal-Y7/dsh-desktop-statusbar"><img alt="1024Store" src="https://img.shields.io/badge/1024Store-listed-orange"></a>
|
|
8
|
+
<a href="https://www.npmjs.com/package/dsh-desktop-statusbar"><img alt="npm version" src="https://img.shields.io/npm/v/dsh-desktop-statusbar?color=red"></a>
|
|
9
|
+
<br>
|
|
10
|
+
<a href="https://nodejs.org/"><img alt="node" src="https://img.shields.io/badge/node-%5E22.19%20%7C%7C%20%3E%3D24-%238b5cf6"></a>
|
|
11
|
+
<img alt="language" src="https://img.shields.io/github/languages/top/raphael-y7/dsh-desktop-statusbar?color=yellow">
|
|
12
|
+
<a href="LICENSE"><img alt="license" src="https://img.shields.io/badge/license-MIT-%235fa04e"></a>
|
|
13
|
+
</p>
|
|
14
|
+
|
|
15
|
+
<p align="center">中文 | <a href="README.en.md">English</a></p>
|
|
16
|
+
|
|
17
|
+
以一条可配置的状态栏替换 DSH 桌面端对话区底部的统计行:字段、顺序、模型单价与计价单位均可配置,费用按官方峰谷口径实时估算。
|
|
18
|
+
|
|
19
|
+

|
|
20
|
+
|
|
21
|
+
## 功能
|
|
22
|
+
|
|
23
|
+
- **10 个可选字段**:上下文占用(栏首圆环)、峰谷判断、轮次&步数、缓存命中率、输出速度、首字平均、运行用时、本轮费用、总计费用、余额
|
|
24
|
+
- **点击字段可查看详情**:
|
|
25
|
+
|
|
26
|
+
| 字段 | 内容 |
|
|
27
|
+
| --- | --- |
|
|
28
|
+
| 上下文占用(栏首圆环) | 系统提示词 / 工具定义 / 对话消息 |
|
|
29
|
+
| 峰谷判断 | 日 / 周 / 月 / 年数据统计热力图 |
|
|
30
|
+
| 轮次&步数 | 上下文压缩 / 技能注入 / 工具调用 |
|
|
31
|
+
| 综合命中 | 本轮 / 最高 / 最低缓存命中率 |
|
|
32
|
+
| 综合速度 | 本轮 / 最快 / 最慢速度 |
|
|
33
|
+
| 首字平均 | 本轮 / 最快 / 最慢首字延迟 |
|
|
34
|
+
| 运行用时 | 等待用时 / 模型用时 / 工具调用 |
|
|
35
|
+
| 本轮费用 | 本轮会话的 token 明细 |
|
|
36
|
+
| 总计费用 | 当前会话的累计 token 明细 |
|
|
37
|
+
| 余额 | 充值余额 / 赠金余额 / 剩余配额 |
|
|
38
|
+
|
|
39
|
+
- **会话数据下钻**:上下文压缩逐次标注发生节点,技能注入统计当前会话注入的技能,工具调用按次数列出会话使用的所有工具;点击标题返回上一层
|
|
40
|
+
- **版本自检与更新**:DSH启动时自动检测最新版本,发现新版时在「状态栏」导航项旁显示提示,并在设置页提供一键更新按钮
|
|
41
|
+
- **费用估算**:按官方峰谷口径计价,每条调用按其发生时刻与所用模型分别计算
|
|
42
|
+
- **价格库**:自定义单价、峰谷分档、CNY / USD 计价单位
|
|
43
|
+
- **GitHub支持**:用户的支持是开发者持续开发的最大动力!点击按钮转跳GitHub项目页,帮忙点亮Star支持一下,感谢各位!
|
|
44
|
+
- **其他**:节假日日历一键更新、账户余额每分钟刷新、中英双语
|
|
45
|
+
|
|
46
|
+
## 安装
|
|
47
|
+
|
|
48
|
+
在 DSH 桌面端打开 **插件 → 添加插件**,输入包名后安装:
|
|
49
|
+
|
|
50
|
+
```
|
|
51
|
+
dsh-desktop-statusbar
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
网络受限时,可在同一对话框内将安装源切换为「中国大陆镜像源」。亦支持 GitHub 仓库地址:
|
|
55
|
+
|
|
56
|
+
```
|
|
57
|
+
https://github.com/raphael-y7/dsh-desktop-statusbar
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
命令行方式:
|
|
61
|
+
|
|
62
|
+
```powershell
|
|
63
|
+
dsh plugin --profile desktop add dsh-desktop-statusbar
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
### 从 npm 安装
|
|
67
|
+
|
|
68
|
+
插件面板与命令行两种方式,安装源默认都是 npm registry,包名为 `dsh-desktop-statusbar`。想确认 npm 上的当前版本:
|
|
69
|
+
|
|
70
|
+
```powershell
|
|
71
|
+
npm view dsh-desktop-statusbar version
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
本插件亦收录于 [dshfind](https://dshfind.com/zh/plugins/raphael-y7/dsh-desktop-statusbar) 与 [1024Store](https://deepseek1024.com/plugins/Rapheal-Y7/dsh-desktop-statusbar)。
|
|
75
|
+
|
|
76
|
+
## 使用
|
|
77
|
+
|
|
78
|
+
打开 **设置 → 状态栏**:
|
|
79
|
+
|
|
80
|
+

|
|
81
|
+
|
|
82
|
+
- **上下文占用**:栏首圆环,进度表示上下文占用比例,缺口表示上下文压缩阈值,颜色表示运行状态(空闲灰 / 运行绿 / 报错红 / 待审批黄)
|
|
83
|
+
- **统计字段**:勾选控制显示,取消勾选仅隐藏、不改变位置;拖动右侧把手调整顺序;「恢复默认设置」恢复出厂顺序并全选
|
|
84
|
+
- **自定义模型价格**:输入模型名并「添加」以新增条目;「修改」展开编辑区,保存后写入;需区分峰谷时段时勾选「峰谷计价」,否则按全天同价计算
|
|
85
|
+
- **计价单位**:价格编辑区右上角可选 CNY 或 USD。切换时内置的两款模型改用对应币种的官方参考价(已修改的条目保留),费用段的符号随之变化;余额按接口返回的币种显示
|
|
86
|
+
- **节假日**:点击「更新节假峰谷」获取并写入下一年的放假安排
|
|
87
|
+
- **余额**:每分钟自动刷新
|
|
88
|
+
|
|
89
|
+
### 计费口径
|
|
90
|
+
|
|
91
|
+
高峰时段为**北京时间周一至周五 9:00-12:00、14:00-18:00**,空闲价为高峰价的一半;法定节假日与周末全天按空闲价计费(与[官方文档](https://api-docs.deepseek.com/zh-cn/quick_start/pricing)一致,2026-09 核对)。
|
|
92
|
+
|
|
93
|
+

|
|
94
|
+
|
|
95
|
+
## 已知限制
|
|
96
|
+
|
|
97
|
+
- 最快 / 最慢首字与速度来自 host 新增的投影,**升级后需完全退出并重启 DSH** 才开始统计
|
|
98
|
+
- 价格库中缺少单价的模型不计费,补充单价后自动补算
|
|
99
|
+
|
|
100
|
+
## 开发
|
|
101
|
+
|
|
102
|
+
```powershell
|
|
103
|
+
node tools/test.cjs
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
## 许可
|
|
107
|
+
|
|
108
|
+
[MIT](LICENSE):可自由使用、修改与再分发;保留版权与许可声明即可。
|