dsh-desktop-statusbar 1.0.0 → 2.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 +77 -77
- package/README.en.md +96 -0
- package/README.md +55 -63
- package/docs/pricing.en.png +0 -0
- package/docs/pricing.png +0 -0
- package/docs/settings.en.png +0 -0
- package/docs/settings.png +0 -0
- package/docs/statusbar.en.png +0 -0
- package/docs/statusbar.png +0 -0
- package/lib/client.js +1099 -273
- package/lib/holiday.js +95 -0
- package/lib/index.js +384 -34
- package/package.json +62 -60
package/LICENSE
CHANGED
|
@@ -1,77 +1,77 @@
|
|
|
1
|
-
Required Notice: Copyright 2026 北浮森屿 (https://github.com/
|
|
2
|
-
|
|
3
|
-
PolyForm Noncommercial License 1.0.0
|
|
4
|
-
|
|
5
|
-
https://polyformproject.org/licenses/noncommercial/1.0.0
|
|
6
|
-
|
|
7
|
-
## Acceptance
|
|
8
|
-
|
|
9
|
-
In order to get any license under these terms, you must agree to them as both strict obligations and conditions to all your licenses.
|
|
10
|
-
|
|
11
|
-
## Copyright License
|
|
12
|
-
|
|
13
|
-
The licensor grants you a copyright license for the software to do everything you might do with the software that would otherwise infringe the licensor's copyright in it for any permitted purpose. However, you may only distribute the software according to [Distribution License](#distribution-license) and make changes or new works based on the software according to [Changes and New Works License](#changes-and-new-works-license).
|
|
14
|
-
|
|
15
|
-
## Distribution License
|
|
16
|
-
|
|
17
|
-
The licensor grants you an additional copyright license to distribute copies of the software. Your license to distribute covers distributing the software with changes and new works permitted by [Changes and New Works License](#changes-and-new-works-license).
|
|
18
|
-
|
|
19
|
-
## Notices
|
|
20
|
-
|
|
21
|
-
You must ensure that anyone who gets a copy of any part of the software from you also gets a copy of these terms or the URL for them above, as well as copies of any plain-text lines beginning with `Required Notice:` that the licensor provided with the software. For example:
|
|
22
|
-
|
|
23
|
-
> Required Notice: Copyright Yoyodyne, Inc. (http://example.com)
|
|
24
|
-
|
|
25
|
-
## Changes and New Works License
|
|
26
|
-
|
|
27
|
-
The licensor grants you an additional copyright license to make changes and new works based on the software for any permitted purpose.
|
|
28
|
-
|
|
29
|
-
## Patent License
|
|
30
|
-
|
|
31
|
-
The licensor grants you a patent license for the software that covers patent claims the licensor can license, or becomes able to license, that you would infringe by using the software.
|
|
32
|
-
|
|
33
|
-
## Noncommercial Purposes
|
|
34
|
-
|
|
35
|
-
Any noncommercial purpose is a permitted purpose.
|
|
36
|
-
|
|
37
|
-
## Personal Uses
|
|
38
|
-
|
|
39
|
-
Personal use for research, experiment, and testing for the benefit of public knowledge, personal study, private entertainment, hobby projects, amateur pursuits, or religious observance, without any anticipated commercial application, is use for a permitted purpose.
|
|
40
|
-
|
|
41
|
-
## Noncommercial Organizations
|
|
42
|
-
|
|
43
|
-
Use by any charitable organization, educational institution, public research organization, public safety or health organization, environmental protection organization, or government institution is use for a permitted purpose regardless of the source of funding or obligations resulting from the funding.
|
|
44
|
-
|
|
45
|
-
## Fair Use
|
|
46
|
-
|
|
47
|
-
You may have "fair use" rights for the software under the law. These terms do not limit them.
|
|
48
|
-
|
|
49
|
-
## No Other Rights
|
|
50
|
-
|
|
51
|
-
These terms do not allow you to sublicense or transfer any of your licenses to anyone else, or prevent the licensor from granting licenses to anyone else. These terms do not imply any other licenses.
|
|
52
|
-
|
|
53
|
-
## Patent Defense
|
|
54
|
-
|
|
55
|
-
If you make any written claim that the software infringes or contributes to infringement of any patent, your patent license for the software granted under these terms ends immediately. If your company makes such a claim, your patent license ends immediately for work on behalf of your company.
|
|
56
|
-
|
|
57
|
-
## Violations
|
|
58
|
-
|
|
59
|
-
The first time you are notified in writing that you have violated any of these terms, or done anything with the software not covered by your licenses, your licenses can nonetheless continue if you come into full compliance with these terms, and take practical steps to correct past violations, within 32 days of receiving notice. Otherwise, all your licenses end immediately.
|
|
60
|
-
|
|
61
|
-
## No Liability
|
|
62
|
-
|
|
63
|
-
_**As far as the law allows, the software comes as is, without any warranty or condition, and the licensor will not be liable to you for any damages arising out of these terms or the use or nature of the software, under any kind of legal claim.**_
|
|
64
|
-
|
|
65
|
-
## Definitions
|
|
66
|
-
|
|
67
|
-
The **licensor** is the individual or entity offering these terms, and the **software** is the software the licensor makes available under these terms.
|
|
68
|
-
|
|
69
|
-
**You** refers to the individual or entity agreeing to these terms.
|
|
70
|
-
|
|
71
|
-
**Your company** is any legal entity, sole proprietorship, or other kind of organization that you work for, plus all organizations that have control over, are under the control of, or are under common control with that organization. **Control** means ownership of substantially all the assets of an entity, or the power to direct its management and policies by vote, contract, or otherwise. Control can be direct or indirect.
|
|
72
|
-
|
|
73
|
-
**Your licenses** are all the licenses granted to you for the software under these terms.
|
|
74
|
-
|
|
75
|
-
**Use** means anything you do with the software requiring one of your licenses.
|
|
76
|
-
|
|
77
|
-
© PolyForm Project Inc.
|
|
1
|
+
Required Notice: Copyright 2026 北浮森屿 (https://github.com/raphael-y7/dsh-desktop-statusbar)
|
|
2
|
+
|
|
3
|
+
PolyForm Noncommercial License 1.0.0
|
|
4
|
+
|
|
5
|
+
https://polyformproject.org/licenses/noncommercial/1.0.0
|
|
6
|
+
|
|
7
|
+
## Acceptance
|
|
8
|
+
|
|
9
|
+
In order to get any license under these terms, you must agree to them as both strict obligations and conditions to all your licenses.
|
|
10
|
+
|
|
11
|
+
## Copyright License
|
|
12
|
+
|
|
13
|
+
The licensor grants you a copyright license for the software to do everything you might do with the software that would otherwise infringe the licensor's copyright in it for any permitted purpose. However, you may only distribute the software according to [Distribution License](#distribution-license) and make changes or new works based on the software according to [Changes and New Works License](#changes-and-new-works-license).
|
|
14
|
+
|
|
15
|
+
## Distribution License
|
|
16
|
+
|
|
17
|
+
The licensor grants you an additional copyright license to distribute copies of the software. Your license to distribute covers distributing the software with changes and new works permitted by [Changes and New Works License](#changes-and-new-works-license).
|
|
18
|
+
|
|
19
|
+
## Notices
|
|
20
|
+
|
|
21
|
+
You must ensure that anyone who gets a copy of any part of the software from you also gets a copy of these terms or the URL for them above, as well as copies of any plain-text lines beginning with `Required Notice:` that the licensor provided with the software. For example:
|
|
22
|
+
|
|
23
|
+
> Required Notice: Copyright Yoyodyne, Inc. (http://example.com)
|
|
24
|
+
|
|
25
|
+
## Changes and New Works License
|
|
26
|
+
|
|
27
|
+
The licensor grants you an additional copyright license to make changes and new works based on the software for any permitted purpose.
|
|
28
|
+
|
|
29
|
+
## Patent License
|
|
30
|
+
|
|
31
|
+
The licensor grants you a patent license for the software that covers patent claims the licensor can license, or becomes able to license, that you would infringe by using the software.
|
|
32
|
+
|
|
33
|
+
## Noncommercial Purposes
|
|
34
|
+
|
|
35
|
+
Any noncommercial purpose is a permitted purpose.
|
|
36
|
+
|
|
37
|
+
## Personal Uses
|
|
38
|
+
|
|
39
|
+
Personal use for research, experiment, and testing for the benefit of public knowledge, personal study, private entertainment, hobby projects, amateur pursuits, or religious observance, without any anticipated commercial application, is use for a permitted purpose.
|
|
40
|
+
|
|
41
|
+
## Noncommercial Organizations
|
|
42
|
+
|
|
43
|
+
Use by any charitable organization, educational institution, public research organization, public safety or health organization, environmental protection organization, or government institution is use for a permitted purpose regardless of the source of funding or obligations resulting from the funding.
|
|
44
|
+
|
|
45
|
+
## Fair Use
|
|
46
|
+
|
|
47
|
+
You may have "fair use" rights for the software under the law. These terms do not limit them.
|
|
48
|
+
|
|
49
|
+
## No Other Rights
|
|
50
|
+
|
|
51
|
+
These terms do not allow you to sublicense or transfer any of your licenses to anyone else, or prevent the licensor from granting licenses to anyone else. These terms do not imply any other licenses.
|
|
52
|
+
|
|
53
|
+
## Patent Defense
|
|
54
|
+
|
|
55
|
+
If you make any written claim that the software infringes or contributes to infringement of any patent, your patent license for the software granted under these terms ends immediately. If your company makes such a claim, your patent license ends immediately for work on behalf of your company.
|
|
56
|
+
|
|
57
|
+
## Violations
|
|
58
|
+
|
|
59
|
+
The first time you are notified in writing that you have violated any of these terms, or done anything with the software not covered by your licenses, your licenses can nonetheless continue if you come into full compliance with these terms, and take practical steps to correct past violations, within 32 days of receiving notice. Otherwise, all your licenses end immediately.
|
|
60
|
+
|
|
61
|
+
## No Liability
|
|
62
|
+
|
|
63
|
+
_**As far as the law allows, the software comes as is, without any warranty or condition, and the licensor will not be liable to you for any damages arising out of these terms or the use or nature of the software, under any kind of legal claim.**_
|
|
64
|
+
|
|
65
|
+
## Definitions
|
|
66
|
+
|
|
67
|
+
The **licensor** is the individual or entity offering these terms, and the **software** is the software the licensor makes available under these terms.
|
|
68
|
+
|
|
69
|
+
**You** refers to the individual or entity agreeing to these terms.
|
|
70
|
+
|
|
71
|
+
**Your company** is any legal entity, sole proprietorship, or other kind of organization that you work for, plus all organizations that have control over, are under the control of, or are under common control with that organization. **Control** means ownership of substantially all the assets of an entity, or the power to direct its management and policies by vote, contract, or otherwise. Control can be direct or indirect.
|
|
72
|
+
|
|
73
|
+
**Your licenses** are all the licenses granted to you for the software under these terms.
|
|
74
|
+
|
|
75
|
+
**Use** means anything you do with the software requiring one of your licenses.
|
|
76
|
+
|
|
77
|
+
© PolyForm Project Inc.
|
package/README.en.md
ADDED
|
@@ -0,0 +1,96 @@
|
|
|
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://www.npmjs.com/package/dsh-desktop-statusbar"><img alt="npm version" src="https://img.shields.io/npm/v/dsh-desktop-statusbar?color=red"></a>
|
|
6
|
+
<a href="LICENSE"><img alt="license" src="https://img.shields.io/badge/license-PolyForm%20Noncommercial%201.0.0-green"></a>
|
|
7
|
+
<a href="https://github.com/deepseek-ai/deepseek-harness"><img alt="DeepSeek Harness" src="https://img.shields.io/badge/DeepSeek%20Harness-0.1.7-%234d6bfe"></a>
|
|
8
|
+
<a href="https://nodejs.org/"><img alt="node" src="https://img.shields.io/badge/node-%5E22.19%20%7C%7C%20%3E%3D24-%235fa04e"></a>
|
|
9
|
+
<img alt="language" src="https://img.shields.io/github/languages/top/raphael-y7/dsh-desktop-statusbar?color=yellow">
|
|
10
|
+
<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>
|
|
11
|
+
<a href="https://deepseek1024.com/plugins/Rapheal-Y7/dsh-desktop-statusbar"><img alt="1024Store" src="https://img.shields.io/badge/1024Store-listed-orange"></a>
|
|
12
|
+
</p>
|
|
13
|
+
|
|
14
|
+
<p align="center"><a href="README.md">中文</a> | English</p>
|
|
15
|
+
|
|
16
|
+
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.
|
|
17
|
+
|
|
18
|
+
> Noncommercial licence: free for personal, study, teaching and nonprofit use, with modification allowed; **commercial use is not permitted** ([PolyForm Noncommercial 1.0.0](LICENSE)).
|
|
19
|
+
|
|
20
|
+

|
|
21
|
+
|
|
22
|
+
## Features
|
|
23
|
+
|
|
24
|
+
- **10 optional fields**: session status, peak / off-peak check, turns and steps, combined hit, TTFT, TPS, run time, this turn cost, session cost, balance
|
|
25
|
+
- **Click a field for details**:
|
|
26
|
+
|
|
27
|
+
| Field | Content |
|
|
28
|
+
| --- | --- |
|
|
29
|
+
| Session status | Context occupancy: system prompt / tool definitions / messages |
|
|
30
|
+
| Combined hit | Highest / lowest cache hit rate |
|
|
31
|
+
| TTFT | Fastest / slowest first-token delay |
|
|
32
|
+
| TPS | Fastest / slowest output speed |
|
|
33
|
+
| Run time | Model time / tool calls |
|
|
34
|
+
| This turn cost | Token breakdown for this turn |
|
|
35
|
+
| Session cost | Cumulative token breakdown for the whole session |
|
|
36
|
+
| Balance | Top-up balance / granted balance |
|
|
37
|
+
|
|
38
|
+
- **Cost estimation**: priced with the official peak/off-peak rules; each call is computed from the moment it happened and the model it used
|
|
39
|
+
- **Price book**: your own prices, an optional peak/off-peak split, and a CNY / USD currency switch
|
|
40
|
+
- **Also**: one-click holiday calendar update, balance refreshed every minute, bilingual UI
|
|
41
|
+
|
|
42
|
+
## Install
|
|
43
|
+
|
|
44
|
+
In the DSH desktop app, open **Plugins → Add plugin** and install by package name:
|
|
45
|
+
|
|
46
|
+
```
|
|
47
|
+
dsh-desktop-statusbar
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
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:
|
|
51
|
+
|
|
52
|
+
```
|
|
53
|
+
https://github.com/raphael-y7/dsh-desktop-statusbar
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
Command line:
|
|
57
|
+
|
|
58
|
+
```powershell
|
|
59
|
+
dsh plugin --profile desktop add dsh-desktop-statusbar
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
Published on npm and listed on [dshfind](https://dshfind.com/zh/plugins/raphael-y7/dsh-desktop-statusbar) and [1024Store](https://deepseek1024.com/plugins/Rapheal-Y7/dsh-desktop-statusbar).
|
|
63
|
+
|
|
64
|
+
## Usage
|
|
65
|
+
|
|
66
|
+
Open **Settings → Status bar**:
|
|
67
|
+
|
|
68
|
+

|
|
69
|
+
|
|
70
|
+
- **Session status**: the ring at the front of the bar — progress shows context occupancy and colour the run state (grey idle / green running / red error / amber pending approval); click it for the token composition
|
|
71
|
+
- **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
|
|
72
|
+
- **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
|
|
73
|
+
- **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
|
|
74
|
+
- **Holidays**: "Update holidays" fetches and writes the next year's public-holiday calendar
|
|
75
|
+
- **Balance**: refreshed once a minute
|
|
76
|
+
|
|
77
|
+
### Billing rules
|
|
78
|
+
|
|
79
|
+
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).
|
|
80
|
+
|
|
81
|
+

|
|
82
|
+
|
|
83
|
+
## Known limitations
|
|
84
|
+
|
|
85
|
+
- Fastest / slowest TTFT and speed come from a new host-side projection: **you must fully quit and restart DSH** before it starts collecting
|
|
86
|
+
- A model with no price is not billed; adding the price back-fills its earlier calls
|
|
87
|
+
|
|
88
|
+
## Development
|
|
89
|
+
|
|
90
|
+
```powershell
|
|
91
|
+
node tools/test.cjs
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
## Licence
|
|
95
|
+
|
|
96
|
+
[PolyForm Noncommercial 1.0.0](LICENSE): permitted for personal, research, study, teaching and nonprofit use, and for modification and redistribution (keep attribution); **commercial use is not permitted**.
|
package/README.md
CHANGED
|
@@ -1,54 +1,65 @@
|
|
|
1
|
-
|
|
1
|
+
<h1 align="center">dsh-desktop-statusbar</h1>
|
|
2
2
|
|
|
3
|
-
|
|
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://www.npmjs.com/package/dsh-desktop-statusbar"><img alt="npm version" src="https://img.shields.io/npm/v/dsh-desktop-statusbar?color=red"></a>
|
|
6
|
+
<a href="LICENSE"><img alt="license" src="https://img.shields.io/badge/license-PolyForm%20Noncommercial%201.0.0-green"></a>
|
|
7
|
+
<a href="https://github.com/deepseek-ai/deepseek-harness"><img alt="DeepSeek Harness" src="https://img.shields.io/badge/DeepSeek%20Harness-0.1.7-%234d6bfe"></a>
|
|
8
|
+
<a href="https://nodejs.org/"><img alt="node" src="https://img.shields.io/badge/node-%5E22.19%20%7C%7C%20%3E%3D24-%235fa04e"></a>
|
|
9
|
+
<img alt="language" src="https://img.shields.io/github/languages/top/raphael-y7/dsh-desktop-statusbar?color=yellow">
|
|
10
|
+
<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>
|
|
11
|
+
<a href="https://deepseek1024.com/plugins/Rapheal-Y7/dsh-desktop-statusbar"><img alt="1024Store" src="https://img.shields.io/badge/1024Store-listed-orange"></a>
|
|
12
|
+
</p>
|
|
4
13
|
|
|
5
|
-
|
|
14
|
+
<p align="center">中文 | <a href="README.en.md">English</a></p>
|
|
6
15
|
|
|
7
|
-
|
|
16
|
+
以一条可配置的状态栏替换 DSH 桌面端对话区底部的统计行:字段、顺序、模型单价与计价单位均可配置,费用按官方峰谷口径实时估算。
|
|
8
17
|
|
|
9
|
-
|
|
18
|
+
> 非商业许可:个人、学习、教学与非营利使用均可自由使用和修改,**禁止商业用途**([PolyForm Noncommercial 1.0.0](LICENSE))。
|
|
10
19
|
|
|
11
|
-
|
|
12
|
-
- **自定义顺序**:设置页里拖动把手调整顺序,取消勾选只隐藏、不改变位置;点「恢复默认设置」一键回到出厂顺序并全选
|
|
13
|
-
- **费用估算**:按 DeepSeek 官方的峰谷口径计价,每条调用按**自己发生的那一刻**和**自己使用的模型**分别计算后累加,跨时段、跨模型都不会串价
|
|
14
|
-
- **模型价格库**:可自定义每个模型的单价;支持「峰谷计价」开关(不勾选就是全天同价);补填单价后,之前没算上的历史调用会自动补算
|
|
15
|
-
- **账户余额**:直连 DeepSeek 余额接口,每分钟刷新(key 只在本机内存中使用,不落盘、不转发)
|
|
16
|
-
- **中英双语**:跟随 DSH 的语言设置
|
|
20
|
+

|
|
17
21
|
|
|
18
|
-
##
|
|
22
|
+
## 功能
|
|
19
23
|
|
|
20
|
-
|
|
24
|
+
- **10 个可选字段**:会话状态、峰谷判断、轮次与步数、综合命中、首字平均、输出速度、运行用时、本轮费用、总计费用、余额
|
|
25
|
+
- **点击字段可查看详情**:
|
|
21
26
|
|
|
22
|
-
|
|
27
|
+
| 字段 | 内容 |
|
|
28
|
+
| --- | --- |
|
|
29
|
+
| 会话状态 | 上下文占用:系统提示词 / 工具定义 / 对话消息 |
|
|
30
|
+
| 综合命中 | 最高 / 最低缓存命中率 |
|
|
31
|
+
| 首字平均 | 最快 / 最慢首字延迟 |
|
|
32
|
+
| 输出速度 | 最快 / 最慢输出速度 |
|
|
33
|
+
| 运行用时 | 模型用时 / 工具调用 |
|
|
34
|
+
| 本轮费用 | 本轮会话的 token 明细 |
|
|
35
|
+
| 总计费用 | 整个会话累计的 token 明细 |
|
|
36
|
+
| 余额 | 充值余额 / 赠金余额 |
|
|
23
37
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
38
|
+
- **费用估算**:按官方峰谷口径计价,每条调用按其发生时刻与所用模型分别计算
|
|
39
|
+
- **价格库**:自定义单价、峰谷分档、CNY / USD 计价单位
|
|
40
|
+
- **其他**:节假日日历一键更新、账户余额每分钟刷新、中英双语
|
|
27
41
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
### 方式二:手动安装
|
|
42
|
+
## 安装
|
|
31
43
|
|
|
32
|
-
|
|
44
|
+
在 DSH 桌面端打开 **插件 → 添加插件**,输入包名后安装:
|
|
33
45
|
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
46
|
+
```
|
|
47
|
+
dsh-desktop-statusbar
|
|
48
|
+
```
|
|
37
49
|
|
|
38
|
-
|
|
50
|
+
网络受限时,可在同一对话框内将安装源切换为「中国大陆镜像源」。亦支持 GitHub 仓库地址:
|
|
39
51
|
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
```
|
|
52
|
+
```
|
|
53
|
+
https://github.com/raphael-y7/dsh-desktop-statusbar
|
|
54
|
+
```
|
|
44
55
|
|
|
45
|
-
|
|
56
|
+
命令行方式:
|
|
46
57
|
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
58
|
+
```powershell
|
|
59
|
+
dsh plugin --profile desktop add dsh-desktop-statusbar
|
|
60
|
+
```
|
|
50
61
|
|
|
51
|
-
|
|
62
|
+
已发布至 npm,并收录于 [dshfind](https://dshfind.com/zh/plugins/raphael-y7/dsh-desktop-statusbar) 与 [1024Store](https://deepseek1024.com/plugins/Rapheal-Y7/dsh-desktop-statusbar)。
|
|
52
63
|
|
|
53
64
|
## 使用
|
|
54
65
|
|
|
@@ -56,49 +67,30 @@ dsh plugin --profile desktop add github:Rapheal-Y7/dsh-desktop-statusbar
|
|
|
56
67
|
|
|
57
68
|

|
|
58
69
|
|
|
59
|
-
-
|
|
60
|
-
-
|
|
61
|
-
-
|
|
70
|
+
- **会话状态**:栏首圆环,进度表示上下文占用,颜色表示运行状态(空闲灰 / 运行绿 / 报错红 / 待审批黄),点击查看各部分的 token 构成
|
|
71
|
+
- **统计字段**:勾选控制显示,取消勾选仅隐藏、不改变位置;拖动右侧把手调整顺序;「恢复默认设置」恢复出厂顺序并全选
|
|
72
|
+
- **自定义模型价格**:输入模型名并「添加」以新增条目;「修改」展开编辑区,保存后写入;需区分峰谷时段时勾选「峰谷计价」,否则按全天同价计算
|
|
73
|
+
- **计价单位**:价格编辑区右上角可选 CNY 或 USD。切换时内置的两款模型改用对应币种的官方参考价(已修改的条目保留),费用段的符号随之变化;余额按接口返回的币种显示
|
|
74
|
+
- **节假日**:点「更新节假峰谷」获取并写入下一年的放假安排
|
|
75
|
+
- **余额**:每分钟自动刷新
|
|
62
76
|
|
|
63
77
|
### 计费口径
|
|
64
78
|
|
|
65
|
-
高峰时段为**北京时间周一至周五 9:00-12:00、14:00-18:00
|
|
66
|
-
|
|
67
|
-
节假日与调休**不单独处理**:官方规则只按星期几判断,所以法定假日落在工作日仍按峰谷算,调休上班的周末仍按空闲价。
|
|
79
|
+
高峰时段为**北京时间周一至周五 9:00-12:00、14:00-18:00**,空闲价为高峰价的一半;法定节假日与周末全天按空闲价计费(与[官方文档](https://api-docs.deepseek.com/zh-cn/quick_start/pricing)一致,2026-09 核对)。
|
|
68
80
|
|
|
69
81
|

|
|
70
82
|
|
|
71
|
-
### 需要注意
|
|
72
|
-
|
|
73
|
-
价格库里**没有单价的模型会被跳过不计费**(不是算错,是不知道单价)。补上单价后,该模型此前所有调用会自动补算进总计。底栏的字段会即时更新,不用重开会话。
|
|
74
|
-
|
|
75
83
|
## 已知限制
|
|
76
84
|
|
|
77
|
-
-
|
|
78
|
-
-
|
|
79
|
-
- 会话投影只保留最近 4000 条调用记录,超出后最旧的记录不再参与费用重算
|
|
85
|
+
- 最快 / 最慢首字与速度来自 host 新增的投影,**升级后需完全退出并重启 DSH** 才开始统计
|
|
86
|
+
- 价格库中缺少单价的模型不计费,补充单价后自动补算
|
|
80
87
|
|
|
81
88
|
## 开发
|
|
82
89
|
|
|
83
|
-
```
|
|
84
|
-
tests/ 16 个测试脚本(纯 Node,不需要浏览器)
|
|
85
|
-
tools/ test.cjs 跑全部测试、sync-from-plugin.cjs 把插件目录的源码同步进项目
|
|
86
|
-
```
|
|
87
|
-
|
|
88
90
|
```powershell
|
|
89
91
|
node tools/test.cjs
|
|
90
92
|
```
|
|
91
93
|
|
|
92
|
-
测试覆盖:字段占位与格式化、峰谷边界与跨周末/工作日、价格自愈与补算、存储键迁移、指标悬停、host 路由、导航图标替换、死代码扫描。
|
|
93
|
-
|
|
94
94
|
## 许可
|
|
95
95
|
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
这不是 OSI 认可的开源许可证 —— 源码公开,但商业使用需要另行获得授权。
|
|
99
|
-
|
|
100
|
-
## 致谢
|
|
101
|
-
|
|
102
|
-
思路来自 DSH 社区的 [`@bananiceee/dsh-status-bar`](https://www.npmjs.com/package/@bananiceee/dsh-status-bar)(MIT 许可):隐藏官方统计行、用自建底栏接管。
|
|
103
|
-
|
|
104
|
-
本项目为**独立实现**。与该项目的 0.1.10 版逐行比对结果:非空行 1415 行中有 247 行文字相同(17.5%),其中 190 行是 `}`、`);` 这类短行;**长于 40 字符的相同行仅 9 行**,全部是 DSH 平台集成的必要写法(`ctx.slots.inject(...)`、`useProjection("tokenUsage")`、模块包装样板等)与通用函数命名(`apply`、`formatTokens`、`segmentView` 等)。除这些之外没有相同代码片段。
|
|
96
|
+
[PolyForm Noncommercial 1.0.0](LICENSE):允许个人、研究、学习、教学与非营利使用,允许修改与再分发(保留署名),**禁止商业用途**。
|
|
Binary file
|
package/docs/pricing.png
ADDED
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|