@deepslacker/dsh-task-progress 0.0.0-stage → 0.5.12
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 +95 -0
- package/LICENSE +21 -0
- package/README.en.md +177 -0
- package/README.md +180 -2
- package/client.js +1492 -0
- package/cordis.patch.yml +3 -0
- package/docs/DETAIL.md +106 -0
- package/docs/DETAIL.zh.md +106 -0
- package/docs/images/scene-completed.png +0 -0
- package/docs/images/scene-progress.png +0 -0
- package/docs/mockups/README.md +8 -0
- package/docs/mockups/scenes.html +408 -0
- package/icon.svg +1 -0
- package/index.js +435 -0
- package/lib/judge.js +168 -0
- package/lib/progress.js +213 -0
- package/lib/steps.js +87 -0
- package/locale/en.json +7 -0
- package/locale/zh.json +7 -0
- package/package.json +57 -4
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to `dsh-task-progress` are documented here. GitHub Releases are created from the matching section of this file by the `Release` workflow.
|
|
4
|
+
|
|
5
|
+
## [0.5.12] - 2026-11-17
|
|
6
|
+
|
|
7
|
+
### Changed
|
|
8
|
+
|
|
9
|
+
- Published as `@deepslacker/dsh-task-progress`. `dsh-task-progress` on npm belongs to an unrelated package, so the plugin now ships under its author's scope; `client.js`'s module id and the `cordis.patch.yml` row name follow the new package name.
|
|
10
|
+
|
|
11
|
+
### Added
|
|
12
|
+
|
|
13
|
+
- Registry installs: devices install from npm and the Plugins page offers version updates (`BundleInfo.update === 'registry'`), which a `link:` install never shows.
|
|
14
|
+
|
|
15
|
+
## [0.5.11] - 2026-11-17
|
|
16
|
+
|
|
17
|
+
### Changed
|
|
18
|
+
|
|
19
|
+
- The **Task progress** entry in the DSH Settings navigation now shows the custom progress glyph. It is registered through `settings.section.icon` with the same id as `settings.section`; replacing `icon.svg` alone only changed the plugin-list icon.
|
|
20
|
+
|
|
21
|
+
## [0.5.10] - 2026-11-17
|
|
22
|
+
|
|
23
|
+
### Changed
|
|
24
|
+
|
|
25
|
+
- The completed-task glyph in a reply footer now sits after the context action and before the branch action, instead of after the usage/time. The extra action uses a high slot order so it stays the last extra action.
|
|
26
|
+
|
|
27
|
+
## [0.5.9] - 2026-11-17
|
|
28
|
+
|
|
29
|
+
> 0.5.8 was an unreleased internal build; 0.5.9 supersedes it.
|
|
30
|
+
|
|
31
|
+
### Added
|
|
32
|
+
|
|
33
|
+
- A gray progress glyph in the footer of the latest completed reply. It opens the **Nodes** tab in the Right Sidebar.
|
|
34
|
+
- A Right Sidebar **Nodes** tab that shows every node of the completed task as a card in time order: status, label, phase, duration and finish time.
|
|
35
|
+
- New plugin icon (`icon.svg`), using the custom progress glyph.
|
|
36
|
+
|
|
37
|
+
### Changed
|
|
38
|
+
|
|
39
|
+
- Completed turn rails are retained until the next turn's first observation (previously deleted 60 seconds after `turn/end`).
|
|
40
|
+
- The footer glyph and the Right Sidebar panel mark the last node as completed as soon as `taskProgress.done` arrives, even before the Host's next sweep.
|
|
41
|
+
|
|
42
|
+
## [0.5.7] - 2026-11-17
|
|
43
|
+
|
|
44
|
+
### Added
|
|
45
|
+
|
|
46
|
+
- A **Node list font size** option in Settings → Task progress (9–24 px, default 11), also configurable as `listFontSize` and `--dtp-list-font-size`.
|
|
47
|
+
|
|
48
|
+
### Changed
|
|
49
|
+
|
|
50
|
+
- The expanded node list now has a fixed 180 px height and scrolls internally, so it no longer changes the composer's layout as nodes arrive.
|
|
51
|
+
|
|
52
|
+
## [0.5.6] - 2026-11-17
|
|
53
|
+
|
|
54
|
+
### Added
|
|
55
|
+
|
|
56
|
+
- An expandable node list at the left of the second row, with a count badge: the current node first, then every completed node in time order.
|
|
57
|
+
- An interactive Settings preview: hovering the bar enlarges it and hovering a sample node opens its detail card.
|
|
58
|
+
|
|
59
|
+
### Fixed
|
|
60
|
+
|
|
61
|
+
- Clicking a bar node no longer leaves the bar enlarged after the pointer leaves (removed the sticky `:focus-within` scale and prevented mouse-down focus).
|
|
62
|
+
|
|
63
|
+
## [0.5.5] - 2026-11-17
|
|
64
|
+
|
|
65
|
+
### Fixed
|
|
66
|
+
|
|
67
|
+
- The browser half's `__ModuleLoader__.load` id now equals the package name, so the Host cannot silently skip the client half.
|
|
68
|
+
- Install docs and config examples use the public package name `dsh-task-progress`.
|
|
69
|
+
|
|
70
|
+
## [0.5.4] - 2026-11-16
|
|
71
|
+
|
|
72
|
+
### Fixed
|
|
73
|
+
|
|
74
|
+
- Bar nodes are sorted by their last-seen percentage.
|
|
75
|
+
- Coincident nodes are nudged apart so each one remains hoverable.
|
|
76
|
+
|
|
77
|
+
## [0.5.3] - 2026-11-16
|
|
78
|
+
|
|
79
|
+
### Changed
|
|
80
|
+
|
|
81
|
+
- Milestones are named nodes in the UI and docs.
|
|
82
|
+
- Nodes are numbered from 0 and completed nodes beyond the current fill are hidden until progress catches up.
|
|
83
|
+
|
|
84
|
+
## [0.5.2] - 2026-11-16
|
|
85
|
+
|
|
86
|
+
### Fixed
|
|
87
|
+
|
|
88
|
+
- Step timing starts at the first observation instead of turn start.
|
|
89
|
+
- Phase fallback when a judge result omits the phase.
|
|
90
|
+
|
|
91
|
+
## [0.5.0] - 2026-11-16
|
|
92
|
+
|
|
93
|
+
### Added
|
|
94
|
+
|
|
95
|
+
- Per-turn node rail in the composer, progress ring on the session row, the `report_progress` tool, and the side-channel evaluator.
|
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 dsh-task-progress contributors
|
|
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.en.md
ADDED
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
# dsh-task-progress · Session Task Progress
|
|
2
|
+
|
|
3
|
+
[中文](README.md) · English
|
|
4
|
+
|
|
5
|
+
A DeepSeek Harness (DSH) plugin that shows how far the current task has got, both in the session and on the sidebar row. Each time the model moves to a new node within the current turn, the previous node leaves a node on the progress bar.
|
|
6
|
+
|
|
7
|
+
 
|
|
8
|
+
|
|
9
|
+
## Scene previews
|
|
10
|
+
|
|
11
|
+
Two illustrations of a fictional task (no real conversation content).
|
|
12
|
+
|
|
13
|
+
**In progress:** several completed nodes and one current node on the bar; hovering a node opens its detail card, and the node list is expanded below.
|
|
14
|
+
|
|
15
|
+

|
|
16
|
+
|
|
17
|
+
**Completed:** after the reply is final, the gray node glyph in the reply footer (after the context action, before the branch) opens the Right Sidebar, which lists every node as a card in time order.
|
|
18
|
+
|
|
19
|
+

|
|
20
|
+
|
|
21
|
+
## Features
|
|
22
|
+
|
|
23
|
+
| Where | What it shows |
|
|
24
|
+
| --- | --- |
|
|
25
|
+
| Above the composer (`conversation.input.dock`) | Two rows: the first has the bar, the percentage and this turn's nodes; the second has the phase, current node, next step and estimated time left. Width follows the chat content area (the host's `--dsh-chat-content-width`) and tracks resizing |
|
|
26
|
+
| On the session row (`sidebar.session.row.trailing`) | A small ring and percentage next to the timestamp, colored like the bar; shown only for a running, non-empty, non-subagent session that has an estimate |
|
|
27
|
+
| In a completed reply's footer (`conversation.chat.assistant-actions`) | After the model's reply is final, a gray progress glyph after the context action and before the branch action; only on the latest completed turn |
|
|
28
|
+
| Right Sidebar (`sidebar.right.pane.tab`) | Clicking that glyph opens a **Nodes** card page: every node of the task in time order, with durations |
|
|
29
|
+
|
|
30
|
+
It appears only while a session runs and lingers briefly after it ends; history and idle sessions show nothing. The large percentage is always **this turn's** 0–100% and never accumulates across turns.
|
|
31
|
+
|
|
32
|
+
### Nodes for the current turn
|
|
33
|
+
|
|
34
|
+
Nodes belong to the current turn only and do not record earlier turns:
|
|
35
|
+
|
|
36
|
+
- Whenever model self-report or the side-channel evaluator names a new "current node", the previous node counts as finished and leaves a **filled node** at the percentage where it was last seen.
|
|
37
|
+
- The current node is an **outlined node** at the bar's current percentage.
|
|
38
|
+
- Hovering any node opens a detail card: which node, finished / in progress, its label and phase; finished nodes show the completion time and how long that segment took (from appearing to being replaced), the current node shows elapsed time and the *next step*.
|
|
39
|
+
- Nodes are Tab-focusable and show the same detail on focus.
|
|
40
|
+
- At most **100** nodes are kept per turn; older ones fade off the rail.
|
|
41
|
+
- Nodes are numbered from **0**: the first finished node is "Node 0", with the current node next.
|
|
42
|
+
- Coincident nodes are nudged apart so every one stays hoverable.
|
|
43
|
+
- A completed node is shown only inside the current fill: if a later estimate lowers the percentage, nodes beyond the fill are hidden until progress catches up.
|
|
44
|
+
|
|
45
|
+
The rail is maintained in the host's evaluator memory (it observes the effective node every 15 seconds), so nodes survive a page reload and reset on the next turn. When a turn ends, the last node is closed at `turn/end` and stays visible briefly.
|
|
46
|
+
|
|
47
|
+
### Node list
|
|
48
|
+
|
|
49
|
+
The leftmost control on the second row is a **Nodes** button with a count badge. Opening it expands the turn's full node list:
|
|
50
|
+
|
|
51
|
+
- the current node first (`Node N [In progress]: detail · phase · elapsed`);
|
|
52
|
+
- below a separator, every completed node in time order (`Node 0 [Done]: detail · phase · duration · finished at`), numbered from 0;
|
|
53
|
+
- the list has a **fixed 180px height** and scrolls inside itself; click the button again to collapse it. The badge is the total number of nodes this turn.
|
|
54
|
+
|
|
55
|
+
The list includes completed nodes that are temporarily hidden from the bar after a lowered estimate.
|
|
56
|
+
|
|
57
|
+
### Completed-task entry
|
|
58
|
+
|
|
59
|
+
Once the reply is final and this is the latest turn, the completed message's action row (`conversation.chat.assistant-actions`) shows a **gray** progress glyph after the context action and before the branch action. It is not repeated on older turns; only the latest completed turn carries it. Clicking it:
|
|
60
|
+
|
|
61
|
+
- opens the Right Sidebar on a tab named **Nodes** with the same glyph in its title;
|
|
62
|
+
- shows every node of `rails[sessionId]` as a card in time order: number, done/in-progress, label, phase, duration and finish time; the header carries the total;
|
|
63
|
+
- the Host keeps the completed turn's rail until the next turn's first observation, and the client marks the last node done as soon as `taskProgress.done` arrives, even before the next Host sweep.
|
|
64
|
+
|
|
65
|
+
The plugin icon (the one shown under Settings → Plugins) is `icon.svg`; the **Task progress** icon in the Settings navigation is registered through the `settings.section.icon` slot (same id as `settings.section`), so the Settings page shows the same glyph too.
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
## Where the number comes from
|
|
70
|
+
|
|
71
|
+
The evaluator is always **the session's own model**, through two channels:
|
|
72
|
+
|
|
73
|
+
1. **In-session tool `report_progress`** (preferred): `percent`, `phase` (plan / execute / verify / deliver), `milestone`, optional `next`, `eta_min`, `revised`. The tool description pins a scale: 0 not started, 25 plan settled, 50 half the work done, 75 verifying, 100 delivered and verified.
|
|
74
|
+
2. **Side-channel evaluator** (fallback): models often ignore such "telemetry" tools, so while a turn is open and the last self-report is stale, the host sends one short request on the session's current model route. The input is a compressed digest of **this turn only** (user request, todos, last 8 tool calls, last assistant output, minutes elapsed), capped at ~900 tokens; the output is forced to a single JSON line. Results live in memory and the page reads them every 2 seconds from a read-only route.
|
|
75
|
+
|
|
76
|
+
Merge priority: **fresh model self-report (within 3 minutes) > side-channel evaluation > todo ratio > nothing**. When none exists the bar shows "evaluating" and elapsed time instead of inventing a number. The node rail uses the same priority to pick the node on display.
|
|
77
|
+
|
|
78
|
+
## Install
|
|
79
|
+
|
|
80
|
+
Option 1 (npm, recommended — the Plugins page then offers version updates):
|
|
81
|
+
|
|
82
|
+
```text
|
|
83
|
+
Plugins -> Add plugin -> @deepslacker/dsh-task-progress -> pick a version -> install -> restart DSH
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
or from the profile directory:
|
|
87
|
+
|
|
88
|
+
```bash
|
|
89
|
+
cd C:/Users/<you>/.dsh/profiles/desktop
|
|
90
|
+
pnpm add @deepslacker/dsh-task-progress@latest
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
Option 2 (local directory, for development):
|
|
94
|
+
|
|
95
|
+
```text
|
|
96
|
+
plugin_manager action=install_bundle target=D:\DSH-workspace\dsh-task-progress
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
Option 3 (manual, in the profile directory):
|
|
100
|
+
|
|
101
|
+
```bash
|
|
102
|
+
cd C:/Users/<you>/.dsh/profiles/desktop
|
|
103
|
+
npm install "file:D:/DSH-workspace/dsh-task-progress"
|
|
104
|
+
# then add "@deepslacker/dsh-task-progress" to dsh.profile.bundles in package.json,
|
|
105
|
+
# and add a row to cordis.patch.yml:
|
|
106
|
+
# - insert:
|
|
107
|
+
# - id: task-progress
|
|
108
|
+
# name: @deepslacker/dsh-task-progress
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
Restart the DSH desktop app afterwards to load the plugin.
|
|
112
|
+
|
|
113
|
+
### Update
|
|
114
|
+
|
|
115
|
+
When the Plugins page shows "N plugin updates available", open this plugin -> version section -> pick the new version -> update, then restart DSH. Only bundles installed from a registry get that notice; a `link:` install never does.
|
|
116
|
+
|
|
117
|
+
## Appearance
|
|
118
|
+
|
|
119
|
+
**Settings → Task progress** offers three options, applied immediately and stored in the browser's localStorage:
|
|
120
|
+
|
|
121
|
+
- Bar height: 2–24 px, default 6
|
|
122
|
+
- Bar color: any CSS color (`#hex`, `rgb()`, `var(--x)`); empty follows the theme accent. Also used by the sidebar ring and the nodes
|
|
123
|
+
- Caption font size: 9–24 px, default 12
|
|
124
|
+
- Node list font size: 9–24 px, default 11
|
|
125
|
+
|
|
126
|
+
Precedence: **settings page > row config > theme default**. Row config lives in the profile's `cordis.patch.yml`:
|
|
127
|
+
|
|
128
|
+
```yaml
|
|
129
|
+
- id: task-progress
|
|
130
|
+
name: dsh-task-progress
|
|
131
|
+
config:
|
|
132
|
+
barHeight: 8
|
|
133
|
+
barColor: '#7c5cff'
|
|
134
|
+
textFontSize: 14
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
Other fields: `enableTool`, `minStep`, `todoBaseline`, `judge`, `judgeIntervalMs` (reload the plugin after changing them); appearance can also be set in row config as `barHeight` / `barColor` / `textFontSize` / `listFontSize`. You can also set the CSS variables `--dtp-bar-height` / `--dtp-bar-color` / `--dtp-font-size` / `--dtp-list-font-size`. The section ends with a live preview (one completed node and the current node): hovering the bar grows it, and hovering a node opens its detail card.
|
|
138
|
+
|
|
139
|
+
## Layout
|
|
140
|
+
|
|
141
|
+
```text
|
|
142
|
+
dsh-task-progress/
|
|
143
|
+
├─ package.json dsh manifest: bundle patch + client platform/injection order
|
|
144
|
+
├─ cordis.patch.yml a single insert host row
|
|
145
|
+
├─ index.js Host half: projection, side-channel evaluator, node observation, read-only route
|
|
146
|
+
├─ lib/progress.js progress merging and the todo fallback
|
|
147
|
+
├─ lib/judge.js evaluator digest and JSON contract
|
|
148
|
+
├─ lib/steps.js node rail reducer (max 10 steps per turn)
|
|
149
|
+
├─ client.js browser half: bar, nodes, sidebar ring, settings page
|
|
150
|
+
├─ locale/{zh,en}.json titles/descriptions shown by the plugin manager
|
|
151
|
+
├─ docs/ design and implementation notes
|
|
152
|
+
└─ test/ node --test unit tests
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
## Cost and limits
|
|
156
|
+
|
|
157
|
+
- Tool schema is about 150–200 tokens per request (`minStep` can raise it).
|
|
158
|
+
- Each side-channel evaluation: ~600–900 input tokens, output capped at 1.2k (usually a few dozen), at most once per 2 minutes per running session; skipped entirely while a model self-report is fresh.
|
|
159
|
+
- The percentage is the model's judgement, not a measurement, and may be optimistic; the scale, `revised` and the side-channel check only mitigate that. The evaluator sees this turn's digest only, not the code.
|
|
160
|
+
|
|
161
|
+
## Releases
|
|
162
|
+
|
|
163
|
+
Version history lives in [CHANGELOG.md](CHANGELOG.md). GitHub Releases are created by `.github/workflows/release.yml` when `main` is pushed:
|
|
164
|
+
|
|
165
|
+
1. Set the new version in `package.json`'s `version`.
|
|
166
|
+
2. Add a `## [x.y.z] - YYYY-MM-DD` section at the top of `CHANGELOG.md`, with `### Added` / `### Changed` / `### Fixed` as needed.
|
|
167
|
+
3. Commit and push to `main`. When the version has no `vx.y.z` release yet, the workflow creates the tag and Release from that CHANGELOG section; an unchanged version is skipped.
|
|
168
|
+
|
|
169
|
+
Manual: `gh release create vx.y.z --target <commit> --title vx.y.z --notes-file <(node scripts/changelog-section.mjs x.y.z)`.
|
|
170
|
+
|
|
171
|
+
Releases: https://github.com/DeepSlacking/dsh-task-progress/releases
|
|
172
|
+
|
|
173
|
+
## License
|
|
174
|
+
|
|
175
|
+
MIT License, Copyright (c) 2026 dsh-task-progress contributors.
|
|
176
|
+
|
|
177
|
+
Free to use, modify and redistribute under the MIT license; see [LICENSE](LICENSE) for the full text.
|
package/README.md
CHANGED
|
@@ -1,3 +1,181 @@
|
|
|
1
|
-
#
|
|
1
|
+
# dsh-task-progress · 会话任务进度
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
中文 · [English](README.en.md)
|
|
4
|
+
|
|
5
|
+
DeepSeek Harness(DSH)插件:在会话里和侧栏上显示「当前任务做到哪一步」。同一轮里模型每换一个节点,上一个节点就在进度条上留一个节点,悬停可看详情与耗时。
|
|
6
|
+
|
|
7
|
+
 
|
|
8
|
+
|
|
9
|
+
## 场景示例
|
|
10
|
+
|
|
11
|
+
两张虚构任务的界面示意(不含真实会话内容)。
|
|
12
|
+
|
|
13
|
+
**进行中的任务**:进度条上有多个已完成节点和一个进行中的节点;悬停节点显示详情卡,第二行展开节点列表。
|
|
14
|
+
|
|
15
|
+

|
|
16
|
+
|
|
17
|
+
**完成后的任务**:模型回复完成后,回复底部的灰色节点图标(排在上下文之后、分支之前)打开右侧边栏;侧栏以卡片形式按时间正序展示全部节点。
|
|
18
|
+
|
|
19
|
+

|
|
20
|
+
|
|
21
|
+
## 功能
|
|
22
|
+
|
|
23
|
+
| 位置 | 显示 |
|
|
24
|
+
| --- | --- |
|
|
25
|
+
| 输入框上方(`conversation.input.dock`) | 两行:第一行整条进度条、百分比和本轮节点;第二行阶段、当前节点、下一节点、预计剩余时间。宽度跟随会话内容区(宿主共享的 `--dsh-chat-content-width`),拖动宽度控制柄或缩放窗口时一起变化 |
|
|
26
|
+
| 会话行上(`sidebar.session.row.trailing`) | 行尾时间旁的小圆环和百分比,颜色与进度条一致;只有「运行中、非空白、非子代理、且有估算」的会话才显示 |
|
|
27
|
+
| 完成后的回复底部(`conversation.chat.assistant-actions`) | 模型回复完成后,在本轮最后一条回复的操作行里、上下文图标之后、分支图标之前显示灰色进度图标;只出现在最新完成的一轮 |
|
|
28
|
+
| 右侧边栏(`sidebar.right.pane.tab`) | 点击上面的图标打开「节点」卡片页,按时间正序显示本次任务的全部节点和耗时 |
|
|
29
|
+
|
|
30
|
+
只在会话运行中出现,结束后短暂保留;历史会话和空闲会话不显示。
|
|
31
|
+
|
|
32
|
+
### 本轮节点
|
|
33
|
+
|
|
34
|
+
进度条的大号百分比是**当前这一轮任务**的 0–100%,节点只属于这一轮,不记录前面几轮会话:
|
|
35
|
+
|
|
36
|
+
- 模型自评或旁路评估每给出一个新的「当前节点」,上一个节点就算完成,在它最后一次被看到的百分比处留一个实心节点。
|
|
37
|
+
- 当前节点是落在进度条当前百分比处的空心节点;悬停显示内容、阶段、已用时间和「下一步」。
|
|
38
|
+
- 已完成节点悬停显示:第几个节点、节点内容、阶段、完成时刻,以及**这一段耗时**(从它出现到被下一个节点替换)。
|
|
39
|
+
- 鼠标移到进度条上会纵向放大并带光晕,节点共用这个热区;节点也支持 Tab 聚焦查看详情。
|
|
40
|
+
- 本轮最多保留最近 **100 个**节点,更早的从轨道上淡出。
|
|
41
|
+
- 节点编号从 **0** 开始:第一个完成的节点是「节点 0」,当前节点排在其后。
|
|
42
|
+
- 同一位置附近有多个节点时会左右错开,保证每一个都能悬停查看。
|
|
43
|
+
- 节点位置取该节点最后一次被看到时的百分比。已完成节点只在当前填充范围内显示:如果评估把百分比下调,超出当前填充的节点会暂时隐藏,等进度追上再出现。
|
|
44
|
+
|
|
45
|
+
轨道由宿主在旁路评估器的内存里维护(每 15 秒观察一次有效节点),刷新页面后节点仍在;换到下一轮时自动清空。一轮结束时最后一个节点会在 `turn/end` 处收尾,并短暂保留。
|
|
46
|
+
|
|
47
|
+
### 节点列表
|
|
48
|
+
|
|
49
|
+
第二行最左侧有一个带数量角标的「节点」按钮,点开后展开本轮所有节点的列表:
|
|
50
|
+
|
|
51
|
+
- 第一行是当前正在进行的节点(`节点 N [进行中]:详情 · 阶段 · 已用时间`);
|
|
52
|
+
- 分隔线以下按时间正序列出所有已完成节点(`节点 0 [已完成]:详情 · 阶段 · 耗时 · 完成时刻`),编号从 0 开始;
|
|
53
|
+
- 列表**固定 180px 高**,超出时在列表内部滚动,再次点击按钮收起;角标是本轮节点总数。
|
|
54
|
+
|
|
55
|
+
列表包含所有已完成节点(包括因为评估下调而暂时不画在进度条上的节点)。
|
|
56
|
+
|
|
57
|
+
### 完成后的节点入口
|
|
58
|
+
|
|
59
|
+
模型回复完成、且这一轮就是最新一轮时,最后一条回复底部的操作行(`conversation.chat.assistant-actions`)会在上下文图标之后、分支图标之前显示一个**灰色**进度图标;它不是每轮历史回复都出现,只跟随最新完成的一轮。点击后:
|
|
60
|
+
|
|
61
|
+
- 右侧边栏打开,标签页叫「节点」,标题带同一个进度图标;
|
|
62
|
+
- 页面以**节点卡片**按时间正序展示 `rails[sessionId]` 里的全部节点:编号、`已完成 / 进行中`、节点内容、阶段、耗时和完成时刻;顶部显示节点总数;
|
|
63
|
+
- 宿主保留已完成轮次的轨道,直到下一轮第一次观察时替换;客户端在收到 `taskProgress.done` 后即使宿主还没跑下一趟清扫,也会把最后一个节点按已完成显示。
|
|
64
|
+
|
|
65
|
+
插件图标(设置 → 插件里的图标)是 `icon.svg`;设置导航里的「任务进度」图标通过 `settings.section.icon` 槽(id 与 `settings.section` 相同)注册同一套路径,所以设置页左侧也显示这个进度字形。
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
## 进度是怎么来的
|
|
70
|
+
|
|
71
|
+
评估者始终是**该会话自己的模型**,两条通道:
|
|
72
|
+
|
|
73
|
+
1. **会话内自评工具 `report_progress`**(首选):`percent`、`phase`(plan / execute / verify / deliver)、`milestone`、可选的 `next`、`eta_min`、`revised`。工具描述里写死了标尺:0 未开始、25 计划确定、50 核心工作完成一半、75 主体完成并在验证、100 已交付并验证。
|
|
74
|
+
2. **旁路评估器**(兜底):模型经常不调这类「遥测」工具,所以当某一轮开着而上次自评已过期时,宿主用该会话当前的模型路由发一次短请求——输入是**只属于当前这一轮**的压缩摘要(用户请求、待办、最近 8 次工具调用、最后一段助手输出、已用分钟数),上限约 900 tokens;输出强制成一行 JSON。结果存在内存,页面每 2 秒从只读路由取一次;节点轨道也随这个路由下发。
|
|
75
|
+
|
|
76
|
+
合并优先级:**模型自评(3 分钟内新鲜)> 旁路评估 > 待办比例 > 无**。三者都没有时显示「评估中」和已进行时间,而不是编一个数;节点轨道也按同一优先级取当前正在显示的节点。
|
|
77
|
+
|
|
78
|
+
摘要按 `turn/start` / `turn/end` 切分,继续会话时不会把上一轮的请求或「下一步」带进新任务。
|
|
79
|
+
|
|
80
|
+
## 安装
|
|
81
|
+
|
|
82
|
+
方式一(npm,推荐;装上后插件页会提示新版本):
|
|
83
|
+
|
|
84
|
+
```text
|
|
85
|
+
插件 → 添加插件 → 输入 @deepslacker/dsh-task-progress → 选择版本 → 安装 → 重启 DSH
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
或在 profile 目录用命令行装:
|
|
89
|
+
|
|
90
|
+
```bash
|
|
91
|
+
cd C:/Users/<you>/.dsh/profiles/desktop
|
|
92
|
+
pnpm add @deepslacker/dsh-task-progress@latest
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
方式二(本地目录,开发时用):
|
|
96
|
+
|
|
97
|
+
```text
|
|
98
|
+
plugin_manager action=install_bundle target=D:\\DSH-workspace\\dsh-task-progress
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
方式三(profile 目录手动安装,没有 pnpm 时):
|
|
102
|
+
|
|
103
|
+
```bash
|
|
104
|
+
cd C:/Users/<you>/.dsh/profiles/desktop
|
|
105
|
+
npm install "file:D:/DSH-workspace/dsh-task-progress"
|
|
106
|
+
# 再把 "@deepslacker/dsh-task-progress" 加进 package.json 的 dsh.profile.bundles,
|
|
107
|
+
# 并在 cordis.patch.yml 加一行(name 必须与 package.json 的包名一致):
|
|
108
|
+
# - insert:
|
|
109
|
+
# - id: task-progress
|
|
110
|
+
# name: '@deepslacker/dsh-task-progress'
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
包名是 `@deepslacker/dsh-task-progress`;`cordis.patch.yml` 的 name、`client.js` 里 `__ModuleLoader__.load` 的 id 都必须与它一致。安装后重启 DSH 桌面端加载插件。
|
|
114
|
+
|
|
115
|
+
### 更新
|
|
116
|
+
|
|
117
|
+
插件页顶部出现「有 N 个插件可更新」时,打开本插件 → 版本区块 → 选新版本 → 更新,然后重启 DSH。只有从 npm 源安装的组合包会收到这个提示;`link:` 本地目录安装不会。
|
|
118
|
+
|
|
119
|
+
## 外观配置
|
|
120
|
+
|
|
121
|
+
**设置 → 任务进度** 里三项,改完立即生效,保存在本机 localStorage:
|
|
122
|
+
|
|
123
|
+
- 进度条高度:2–24 px,默认 6
|
|
124
|
+
- 进度条颜色:任意 CSS 颜色(`#hex`、`rgb()`、`var(--x)`),清空跟随主题强调色;同时用于侧栏圆环和节点
|
|
125
|
+
- 说明文字字号:9–24 px,默认 12
|
|
126
|
+
- 节点列表字号:9–24 px,默认 11
|
|
127
|
+
|
|
128
|
+
优先级:**设置页 > 行配置 > 主题默认**。行配置写在 profile 的 `cordis.patch.yml`:
|
|
129
|
+
|
|
130
|
+
```yaml
|
|
131
|
+
- id: task-progress
|
|
132
|
+
name: 'dsh-task-progress'
|
|
133
|
+
config:
|
|
134
|
+
barHeight: 8
|
|
135
|
+
barColor: '#7c5cff'
|
|
136
|
+
textFontSize: 14
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
其余字段:`enableTool`、`minStep`、`todoBaseline`、`judge`、`judgeIntervalMs`(改完需在「插件」里重载);外观也可在行配置里写 `barHeight` / `barColor` / `textFontSize` / `listFontSize`。也可直接设 CSS 变量 `--dtp-bar-height` / `--dtp-bar-color` / `--dtp-font-size` / `--dtp-list-font-size`。设置页底部有实时预览(一个完成节点和一个当前节点):预览条悬停会放大,移入节点会弹出详情卡。
|
|
140
|
+
|
|
141
|
+
## 目录
|
|
142
|
+
|
|
143
|
+
```text
|
|
144
|
+
dsh-task-progress/
|
|
145
|
+
├─ package.json dsh 清单:bundle patch + client 平台/注入顺序
|
|
146
|
+
├─ cordis.patch.yml 一条 insert 宿主行
|
|
147
|
+
├─ index.js Host 半:投影、旁路评估、节点轨道、只读路由
|
|
148
|
+
├─ lib/progress.js 进度合并、待办兜底
|
|
149
|
+
├─ lib/steps.js 本轮节点轨道的纯 reducer(标签变化 → 关闭上一步)
|
|
150
|
+
├─ lib/judge.js 旁路评估摘要与 JSON 契约
|
|
151
|
+
├─ client.js 浏览器半:进度条、节点、侧栏圆环、设置页
|
|
152
|
+
├─ locale/{zh,en}.json 插件管理器显示用的标题/描述
|
|
153
|
+
├─ docs/ 详细设计与实现说明
|
|
154
|
+
└─ test/ node --test 单元测试
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
## 成本与限制
|
|
158
|
+
|
|
159
|
+
- 工具 schema 约 150–200 tokens/请求(`minStep` 可调高)。
|
|
160
|
+
- 每次旁路评估:输入约 600–900 tokens,输出上限 1.2k(实际几十个),每个运行中的会话最多每 2 分钟一次;模型自评新鲜时完全跳过。
|
|
161
|
+
- 百分比是模型的判断而非测量,可能偏乐观;标尺、`revised` 和旁路复核只能缓解。旁路评估只看当前轮摘要,不知道代码细节。
|
|
162
|
+
- 节点耗时是**观察区间**(宿主每 15 秒观察一次),分辨率是十几秒;旁路评估换一种措辞描述同一件事时会多出一个内容相近的节点。
|
|
163
|
+
- 轨道只存在宿主内存里,DSH 重启后从当前节点重新开始;投影和自评仍在会话日志里。
|
|
164
|
+
|
|
165
|
+
## 发布 / Releases
|
|
166
|
+
|
|
167
|
+
版本记录在 [CHANGELOG.md](CHANGELOG.md),GitHub Releases 由 `.github/workflows/release.yml` 在推送到 `main` 时自动创建:
|
|
168
|
+
|
|
169
|
+
1. 把 `package.json` 的 `version` 改成新版本号;
|
|
170
|
+
2. 在 `CHANGELOG.md` 顶部加 `## [x.y.z] - YYYY-MM-DD` 段,按需写 `### Added` / `### Changed` / `### Fixed`;
|
|
171
|
+
3. 提交并推送到 `main`。工作流发现该版本还没有 `vx.y.z` Release 时,会用 CHANGELOG 的对应段落创建 tag 和 Release;版本号没变则自动跳过。
|
|
172
|
+
|
|
173
|
+
也可以手动创建:`gh release create vx.y.z --target <commit> --title vx.y.z --notes-file <(node scripts/changelog-section.mjs x.y.z)`。
|
|
174
|
+
|
|
175
|
+
Releases 页:https://github.com/DeepSlacking/dsh-task-progress/releases
|
|
176
|
+
|
|
177
|
+
## 许可
|
|
178
|
+
|
|
179
|
+
MIT License,Copyright (c) 2026 dsh-task-progress contributors。
|
|
180
|
+
|
|
181
|
+
本插件在 MIT 许可下自由使用、修改与分发;完整条款见 [LICENSE](LICENSE)。
|