dsh-todo-float-ball 0.14.6 → 0.14.7
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 +22 -0
- package/README-en.md +260 -0
- package/README-es.md +15 -15
- package/README-hi.md +15 -15
- package/README-pt.md +15 -15
- package/README.md +185 -182
- package/docs/images/capsule-and-panel.png +0 -0
- package/docs/images/settings-ballnav.png +0 -0
- package/docs/images/skin-and-ball.png +0 -0
- package/lib/client.js +441 -161
- package/package.json +7 -5
- package/README-zh.md +0 -101
- package/README.zh.md +0 -230
- package/docs/images/preview-capsule.jpg +0 -0
- package/docs/images/preview-pinned-sessions-2.jpg +0 -0
- package/docs/images/preview-pinned-sessions.jpg +0 -0
- package/docs/images/preview-skins.png +0 -0
package/README.md
CHANGED
|
@@ -1,254 +1,257 @@
|
|
|
1
1
|
# dsh-todo-float-ball
|
|
2
2
|
|
|
3
|
-
**
|
|
4
|
-
|
|
3
|
+
**AI 在跑长任务,计划清单却总在眼前消失?把它变成一颗常驻桌面的进度球。**
|
|
4
|
+
|
|
5
|
+
把 DeepSeek Harness(DSH)的任务清单搬到桌面右下角的一颗悬浮球上:`已完成/总数` 常驻可见、当前进行中的任务名直接写在球面上,还能拖、能缩成胶囊、能换 130 款皮肤。
|
|
5
6
|
|
|
6
7
|
[](https://www.npmjs.com/package/dsh-todo-float-ball)
|
|
7
8
|
[](LICENSE)
|
|
8
|
-
[](https://github.com/loyalchiiina/dsh-todo-float-ball)
|
|
9
10
|
|
|
10
|
-
English
|
|
11
|
+
[English](README-en.md) | 简体中文
|
|
11
12
|
|
|
12
13
|
---
|
|
13
14
|
|
|
14
|
-
##
|
|
15
|
+
## 效果图
|
|
16
|
+
|
|
17
|
+
### 皮肤菜单 + 悬浮球
|
|
18
|
+
|
|
19
|
+
130 款皮肤分 8 组,菜单首行是「三球皮肤同步」开关,第二行是「0 · 随系统 · 深/浅自动」。
|
|
20
|
+
|
|
21
|
+

|
|
22
|
+
|
|
23
|
+
### 胶囊态 + 面板展开
|
|
24
|
+
|
|
25
|
+
右键球体收起为横向胶囊(进度条 + 当前任务名);单击展开完整任务面板,进行中的那一项带旋转描边环。
|
|
26
|
+
|
|
27
|
+

|
|
28
|
+
|
|
29
|
+
### 设置页「悬浮球导航」
|
|
15
30
|
|
|
16
|
-
|
|
31
|
+
设置页里的共用分区:三球显隐、皮肤下拉、◎ 回到右下角、作者插件清单。
|
|
17
32
|
|
|
18
|
-
|
|
33
|
+

|
|
19
34
|
|
|
20
|
-
|
|
35
|
+
---
|
|
36
|
+
|
|
37
|
+
## 一句话说明
|
|
38
|
+
|
|
39
|
+
DSH 里让 AI 干活时,它会用内置的 `todo_write` 记一份任务清单。官方界面把这份清单渲染成输入框上方的一小条——**但那一小条很容易被忽略、会随对话滚走、助手还在干活时它就已经折叠了**。你被迫反复翻对话找"现在到底做到哪一步了"。
|
|
40
|
+
|
|
41
|
+
**dsh-todo-float-ball 把这份清单搬到一颗常驻悬浮球上:**
|
|
42
|
+
|
|
43
|
+
| 你遇到的 | 这个插件怎么解决 |
|
|
21
44
|
|---|---|
|
|
22
|
-
|
|
|
23
|
-
|
|
|
24
|
-
|
|
|
25
|
-
|
|
|
26
|
-
|
|
|
27
|
-
|
|
|
28
|
-
|
|
|
45
|
+
| 计划条随对话滚走,找不到进度 | 球**常驻桌面右下角**(可拖拽,位置跨重启记忆,拖出屏幕自动拉回) |
|
|
46
|
+
| 想知道"几项做完了",得展开细看 | 球面**直接显示 `已完成/总数`**,外圈进度环同步可视化 |
|
|
47
|
+
| 不知道助手当前在忙哪一项 | 球面显示**当前进行中任务的名称**;胶囊态只显示这一行 |
|
|
48
|
+
| 屏幕空间紧张,球占地方 | 右键切成**横向胶囊**:一条进度条 + 任务名 |
|
|
49
|
+
| 同时跑多个会话,来回切换看进度 | **固定多个会话,面板并排显示多栏进度**,一屏看住所有并行任务 |
|
|
50
|
+
| 任务做完没做完,颜色分不清 | **状态色一眼可读**:橙脉动=进行中 / 绿=全部完成 / 蓝=只有待办 / 灰=暂无清单 |
|
|
51
|
+
| 想回看之前排过的任务 | **历史归档**:新计划覆盖旧计划时,旧任务自动折叠进"已完成历史 / 被抛弃历史",不会凭空消失 |
|
|
52
|
+
| 皮肤看腻了 / 和别的插件风格不搭 | **130 款皮肤**(官方主题 / 招牌特效 / 克制精选 + 5 组配色),三球可同步可独立 |
|
|
53
|
+
| 浅色皮肤上白字看不清 | **强制字色**:自动 / 黑 / 白一键切,官方皮肤下自动锁定 |
|
|
54
|
+
|
|
55
|
+
**它只是一个只读的观察者**:插件从不修改官方面板、不改对话内容、不干扰其他插件。
|
|
56
|
+
|
|
57
|
+
## 为什么值得装
|
|
58
|
+
|
|
59
|
+
- **专治"长任务失联"** —— DSH 的 AI 会自动续跑很多轮,你可能十几分钟不看屏幕。球上的橙灯和 `3/8` 让你一眼就知道**还在跑、跑到哪了**。
|
|
60
|
+
- **多会话并行不再瞎猜** —— 固定标签把两栏进度并排摆在同一个面板里,不用左点右点来回切。
|
|
61
|
+
- **三球视觉统一** —— 与姊妹插件 `dsh-skill-browser`、`dsh-font-enhancer` 共用同一套 **130 款皮肤**目录,三个球可以一起换肤、风格一致,也可以让某个球独立。
|
|
62
|
+
- **双端同一份代码** —— 桌面端(Electron)和网页端行为一致。
|
|
63
|
+
- **零侵入零配置** —— 装上即用,不写配置文件也不改官方 UI;`Shadow DOM + all:initial` 做样式隔离,与你其他主题/皮肤插件互不干扰。
|
|
64
|
+
- **数据来源可靠** —— 三路同步:**主** = 运行时 `sessions` 服务的权威投影帧;**兜底 1** = 官方 todo 面板的 DOM 观察;**兜底 2** = 传输帧被动拦截。兜底只在权威通道对该会话尚无数据时才发言。**官方那一条折叠了、甚至没渲染,球上依然是完整清单**。
|
|
29
65
|
|
|
30
|
-
|
|
66
|
+
---
|
|
31
67
|
|
|
32
|
-
##
|
|
68
|
+
## 功能详解
|
|
33
69
|
|
|
34
|
-
|
|
35
|
-
- **Parallel sessions stop being guesswork** — pinning side-by-side columns puts two conversations' progress in one panel; no more clicking back and forth.
|
|
36
|
-
- **Visually consistent with its siblings** — shares one **128-skin** catalogue with the `dsh-skill-browser` and `dsh-font-enhancer` balls (plus the 6 classic skins kept as a separate "legacy" group), so all three switch together and match.
|
|
37
|
-
- **One codebase, two targets** — identical behaviour on Desktop (Electron) and the web UI.
|
|
38
|
-
- **Zero intrusion, zero config** — install and it works; no config files, no changes to the official UI. `Shadow DOM + all:initial` keeps styles isolated, so it cannot clash with your theme or skin plugins.
|
|
39
|
-
- **Reliable data** — three-tier sync: the runtime's `sessions` service (authoritative projection) drives the ball; a debounced `MutationObserver` on the official todo panel and a passive transport tap are fallbacks that only speak when the service has produced nothing for that session. **Even when the official strip is collapsed — or unrendered — the ball still has the full list.**
|
|
70
|
+
### 悬浮球与胶囊态
|
|
40
71
|
|
|
41
|
-
|
|
72
|
+
- **圆形悬浮球**常驻窗口右下角(默认 `right:18px; bottom:18px`),随时可见。
|
|
73
|
+
- 球面实时显示 **`已完成/总数`**,下方一行是**当前进行中任务的名称**(超长自动截断)。
|
|
74
|
+
- **外圈进度环**用同一比例可视化进度(`conic-gradient` + 百分比遮罩),与球面数字同源。
|
|
75
|
+
- **状态色**:橙色脉动 = 正在干活 / 绿色 = 全部完成 / 蓝色 = 只有待办 / 灰色 = 暂无清单。
|
|
76
|
+
- **可拖动**:按住拖到任意位置,坐标按 profile 存 `localStorage`,重启后恢复;**保存的坐标跑到屏幕外时会自动拉回视口内**(防"球丢了")。
|
|
77
|
+
- **胶囊态**:右键球体在【圆形球】与【横向胶囊】之间切换。胶囊是一条横向进度条 + 任务名 + `已完成/总数`,屏幕空间紧张时用。
|
|
78
|
+
- **点击**展开完整任务面板;**再点一下**(或按 `Esc`)收起。
|
|
42
79
|
|
|
43
|
-
###
|
|
80
|
+
### 任务面板
|
|
44
81
|
|
|
45
|
-
|
|
82
|
+
- **任务清单**:每项带状态图标与配色——✓ 已完成(绿色 + 删除线)、▶ 进行中(橙色)、○ 待办(灰色虚线圈)。
|
|
83
|
+
- **进行中旋转描边环**:正在执行的那一项外圈有一道绕行描边(`@property --tfb-spin` + `tfbBorderSpin`),一眼看出"就是这条在跑"。
|
|
84
|
+
- **已完成历史折叠**:`▾ 已完成 · N`,默认收起,点标题展开。
|
|
85
|
+
- **被抛弃历史折叠**:`▸ 已抛弃 · N`,被新计划替换掉的未完成任务收在这里。
|
|
86
|
+
- **分界线**:历史区与当前轮清单之间有一道 `── 当前进度 · 5/10 完成 ──` 分界线(两侧渐隐细线 + 圆角胶囊标签,两套皮肤各自配色,`pointer-events:none` 不挡点击),把"历史贡献"和"官方最新清单"在视觉上一刀切开。
|
|
87
|
+
- **行级 ✕ 隐藏**、**🧹 一键隐藏本区**、**↩︎ 恢复已隐藏的 N 条**、**📋 整行复制**(复制完整文本,非显示截断)。
|
|
88
|
+
- **📌 固定会话**:把别的会话也钉到面板里,与当前对话走**同一个渲染器**,折叠开合与隐藏记录**按会话隔离**。
|
|
89
|
+
- **⇄ 布局切换**:上下堆叠 ⇄ 左右并排,偏好写 `localStorage`,下次打开自动恢复;左右并排时带列标题。
|
|
46
90
|
|
|
47
|
-
|
|
91
|
+
### 皮肤:130 款,8 组
|
|
48
92
|
|
|
49
|
-
|
|
93
|
+
皮肤菜单(标题栏 🎨 按钮)分组与数量(实测目录,显示序号 1..130 连续):
|
|
50
94
|
|
|
51
|
-
|
|
95
|
+
| 分组 | 数量 | 说明 |
|
|
96
|
+
|---|---|---|
|
|
97
|
+
| 官方主题 | 2 | **1 · 官方深色** / **2 · 官方浅色**,与 DSH 界面同色系 |
|
|
98
|
+
| 招牌特效 | 20 | 曜石极光、赛博机能、全息幻彩……自带外圈光带与旋转描边、呼吸动画 |
|
|
99
|
+
| 克制精选 | 8 | 墨玉、石墨极简、暮蓝……静态、安静、不抢眼 |
|
|
100
|
+
| 浓郁深底 | 38 | 高饱和深色底 |
|
|
101
|
+
| 尘埃灰调 | 20 | 低饱和灰调 |
|
|
102
|
+
| 柔光深底 | 15 | 柔和暗色 |
|
|
103
|
+
| 中性点缀 | 10 | 中性色 + 一点强调色 |
|
|
104
|
+
| 浅色纸面 | 17 | 浅色底,适合白天 |
|
|
52
105
|
|
|
53
|
-
|
|
106
|
+
- **0 · 随系统 · 深/浅自动**:菜单第二行。跟随 `prefers-color-scheme`,系统切深浅色时球和面板实时跟着切(解析到「官方深色」或「官方浅色」)。
|
|
107
|
+
- **三球皮肤同步**:菜单第一行的勾选行。**勾选 = 跟随全局皮肤**(三球同款,改一个三个一起变);**不勾 = 本球独立皮肤**,只影响 Todo 球,全局换肤不动它。
|
|
108
|
+
- **招牌特效类皮肤自带外圈光带**(底部 `radial-gradient` 光带 + 旋转描边),随皮肤自动出现或消失,**没有单独的开关**——换皮肤就是开关。
|
|
54
109
|
|
|
55
|
-
|
|
110
|
+
### 强制字色
|
|
56
111
|
|
|
57
|
-
|
|
112
|
+
标题栏的 ◐ 按钮循环切换 **自动 → 黑 → 白**,作用于**面板内外所有文字**(球面标签、任务行、折叠行、提示语),解决浅色皮肤白字看不清 / 深色皮肤黑字看不清。
|
|
58
113
|
|
|
59
|
-
|
|
114
|
+
- **自动**:跟随皮肤自带的文字色。
|
|
115
|
+
- **官方皮肤下自动锁定**:选到 **1 · 官方深色**、**2 · 官方浅色**,或选「0 · 随系统」解析到官方皮肤时,字色由皮肤强制决定(深色皮肤 → 白字、浅色皮肤 → 黑字),按钮呈锁定态、点击不再切换——官方皮肤本身就带正确的对比度,不需要也不允许手动覆盖。
|
|
60
116
|
|
|
61
|
-
|
|
117
|
+
### 拖到屏幕顶部也不丢
|
|
62
118
|
|
|
63
|
-
|
|
119
|
+
DSH 桌面端窗口顶部约 40px 是窗口拖拽带(Electron 的 `app-region: drag`)。球和面板都写了:
|
|
64
120
|
|
|
65
|
-
|
|
66
|
-
-
|
|
67
|
-
-
|
|
68
|
-
-
|
|
69
|
-
|
|
70
|
-
|
|
121
|
+
```css
|
|
122
|
+
.tfb-ball, .tfb-panel, .tfb-theme-menu {
|
|
123
|
+
-webkit-app-region: no-drag;
|
|
124
|
+
app-region: no-drag;
|
|
125
|
+
}
|
|
126
|
+
```
|
|
71
127
|
|
|
72
|
-
|
|
128
|
+
所以**把球拖到屏幕最顶端也不会点不动、拖不动**——否则落在拖拽带上的球会被窗口拖拽逻辑吃掉所有鼠标事件,看着在、实际已经"死"了。
|
|
73
129
|
|
|
74
|
-
|
|
130
|
+
### 设置页「悬浮球导航」
|
|
75
131
|
|
|
76
|
-
|
|
132
|
+
DSH 设置页里有一个 **「悬浮球导航」** 分区(`settings.section`,`order: 22`)。**这个分区由姊妹插件 `dsh-skill-browser` 注册**,本插件只读它写入的共享键,属于三球共用的一块面板:
|
|
77
133
|
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
| 状态颜色一眼可读:橙脉动=进行中 / 绿=全部完成 / 蓝=只有待办 / 灰=暂无清单 | Status colours at a glance: orange pulse = working, green = all done, blue = pending only, gray = no list |
|
|
83
|
-
| 每项任务带图标与配色:✓ 完成(绿+删除线)、▶ 进行中(橙)、○ 待办(灰虚线) | Per-item icons & colours: ✓ done (green, strikethrough), ▶ in progress (orange), ○ pending (dashed gray) |
|
|
134
|
+
- **三球显隐**:技能浏览器 / 字体插件 / **Todo 进度** 三个勾选框(没装的插件显示「(未安装)」且置灰)。
|
|
135
|
+
- **皮肤下拉**:`0 · 跟随系统 · 深/浅自动` + 8 个分组的全部皮肤,等价于三球同步时的全局皮肤。
|
|
136
|
+
- **◎ 回到右下角**:一键把球归位。
|
|
137
|
+
- **作者插件**:12 个插件清单(名字 + 一句话描述 + ⭐ 链接)。
|
|
84
138
|
|
|
85
|
-
|
|
139
|
+
> 装了这一组插件里任意一个,这个分区就会出现;只装 Todo 球而没有 `dsh-skill-browser` 时,用球自己的标题栏按钮(◎ 归位、🎨 皮肤)做同样的事。
|
|
86
140
|
|
|
87
|
-
|
|
88
|
-
|---|---|
|
|
89
|
-
| 点球折叠/展开面板,靠屏幕边缘自动翻侧 | Click to fold/expand; the panel flips sides near the screen edge |
|
|
90
|
-
| 三路数据同步:**主** = 运行时 `sessions` 服务的权威投影帧;**兜底 1** = MutationObserver 抓官方 todo 面板;**兜底 2** = 被动拦截传输帧。兜底仅在权威通道对该会话尚无数据时才发言,官方面板折叠时也有完整清单 | Three-tier sync: **primary** = the runtime `sessions` service (authoritative projection); **fallback 1** = DOM observer on the official panel; **fallback 2** = passive transport tap. Fallbacks only speak while the authoritative channel has produced nothing for that session — full list even when the strip is collapsed |
|
|
91
|
-
| Shadow DOM + `all:initial` 样式隔离,不进不出,主题/皮肤插件互不干扰 | Shadow DOM with `all:initial` — no style leaks in or out, immune to theme/skin plugins |
|
|
92
|
-
| 桌面端(Electron)与网页端同一份代码双端可用 | One codebase for Desktop (Electron) and the web UI |
|
|
141
|
+
### 标题栏按钮(全部黑白线性图标)
|
|
93
142
|
|
|
94
|
-
|
|
143
|
+
面板标题栏那排按钮都是 `stroke: currentColor` 的线性 SVG,跟着字色走,不用 emoji:
|
|
95
144
|
|
|
96
|
-
|
|
|
145
|
+
| 图标 | 动作 |
|
|
97
146
|
|---|---|
|
|
98
|
-
|
|
|
99
|
-
|
|
|
100
|
-
|
|
|
101
|
-
|
|
|
102
|
-
|
|
|
103
|
-
|
|
|
147
|
+
| ⇄ | 切换面板布局:上下堆叠 / 左右并排 |
|
|
148
|
+
| 📌(线性) | 固定 / 取消固定当前会话 |
|
|
149
|
+
| ◎ | 归位到右下角 |
|
|
150
|
+
| 🎨(线性调色板) | 打开皮肤菜单 |
|
|
151
|
+
| ◐ / ● / ○ | 强制字色:自动 / 黑 / 白(官方皮肤下锁定) |
|
|
152
|
+
| ✕ | 折叠面板 |
|
|
153
|
+
| ☆ | 去 GitHub 点 Star |
|
|
104
154
|
|
|
105
|
-
|
|
155
|
+
## 快速上手
|
|
106
156
|
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
157
|
+
1. **装上就有效果**:装好后右下角出现一颗球。没有任务时它是灰色的,显示 `✓`。
|
|
158
|
+
2. **让 AI 干活**:随便让它做个多步骤任务,它会调用 `todo_write`,球面立刻变成 `0/3`、`1/3`……并显示当前那一项的名字。
|
|
159
|
+
3. **点球看全清单**:单击球体展开面板,进行中的那项带旋转描边环;再点收起。
|
|
160
|
+
4. **右键变胶囊**:觉得球挡视线就右键切成横向胶囊,只留一条进度条 + 任务名。
|
|
161
|
+
5. **换个皮肤**:点 🎨 打开皮肤菜单。想跟另外两个球一致就勾上「三球皮肤同步」;想单独一个球漂亮就取消勾选再选。懒得选就点 `0 · 随系统 · 深/浅自动`。
|
|
162
|
+
6. **字看不清就调**:点 ◐ 在 自动 → 黑 → 白 之间切。(官方皮肤下这个按钮会锁定,是正常行为。)
|
|
163
|
+
7. **拖到哪都行**:按住球拖到顺手的位置,位置会记住;拖到屏幕顶端也不会失效。想归位就点 ◎。
|
|
112
164
|
|
|
113
|
-
|
|
165
|
+
## 基本用法
|
|
114
166
|
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
167
|
+
- **悬浮球**始终固定在窗口角落(默认右下角)。
|
|
168
|
+
- **球面**实时显示 `已完成/总数`,下方显示当前进行中的任务名;外圈进度环同步可视化同一比例。
|
|
169
|
+
- **单击**展开完整任务面板;**再点一下**(或按 `Esc`)收起。
|
|
170
|
+
- **右键**切换到胶囊模式。
|
|
171
|
+
- **拖拽**到任意位置,按 profile 记忆坐标;拖出屏幕会自动拉回。
|
|
172
|
+
- **颜色**一眼看状态:橙色脉动 = 正在干活,绿色 = 全部完成,蓝色 = 只有待办,灰色 = 暂无清单。
|
|
119
173
|
|
|
120
|
-
##
|
|
174
|
+
## 安装
|
|
121
175
|
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
| Status colors | Per-item icons and colors: ✓ completed (green, strikethrough), ▶ in progress (orange), ○ pending (dashed gray); ball itself: orange pulse / green / blue / idle gray |
|
|
128
|
-
| Data sync (3 tiers) | **Primary**: `ctx.sessions.list.subscribe` — the runtime's authoritative `todos` projection, plus a 2 s pull as a safety net. **Fallback 1**: a debounced `MutationObserver` over `[data-testid="todo-panel"]`. **Fallback 2**: a passive tap on `window.fetch` and `WebSocket.onmessage` that only reacts to projection-shaped frames. Fallbacks are gated by `hasPrimaryData()` and stay silent once the service has spoken for a session |
|
|
129
|
-
| Shadow DOM isolation | All UI lives inside an open Shadow DOM with `all:initial` — no style leaks in or out, immune to theme/skin plugins |
|
|
130
|
-
| Dual-end support | Works in DSH Desktop (Electron window) and the web UI (browser) with the same code, because both render the same page; the UI mounts on `<html>` to dodge `transform`-related `position:fixed` breakage |
|
|
131
|
-
| Privacy-friendly | Zero telemetry, zero data upload. The only host-side surface is a loopback-only health route (`/dsh-todo-float-ball/health`) |
|
|
132
|
-
| **Discipline injection (v0.9.0)** | The host injects a 6-rule todo discipline (498 chars measured, `order=190`) into the system prompt of **every session** — **works as soon as the plugin is installed, no skill needs to be loaded**; turn it off with `injectDiscipline: false` |
|
|
133
|
-
| **History archive & panel tools (v0.10.0)** | Merged snapshots no longer wipe older todos — they become a foldable history archive; per-row ✕ hide, two independent fold rows, 🧹 batch cleanup, ♻️ one-click restore, 📋 full-text copy; all counters reflect only the latest snapshot |
|
|
134
|
-
| **Pinned-panel parity & layout switch (v0.11.0)** | 📌 pinned sessions render through the *same* history renderer as the current view (folds, 🧹, ♻️, per-session state and per-session action scoping); the panel header gained a ⇄ button to flip between a stacked layout and a side-by-side layout (left = current list, right = pinned sessions) with per-column captions |
|
|
135
|
-
|
|
136
|
-
## Pinned sessions & panel layout (v0.11.0)
|
|
137
|
-
|
|
138
|
-
- **One renderer, two lists** — the current conversation and every pinned (📌)
|
|
139
|
-
conversation are rendered by the same `historySectionHtml()` function: latest
|
|
140
|
-
snapshot flat, then `▾ Completed history (N)` and
|
|
141
|
-
`▸ Abandoned history tasks (M)`, each fold with its own 🧹, plus
|
|
142
|
-
`🧹 Clear all history` and `♻️ Restore all hidden history`. Pinned panels got
|
|
143
|
-
the last two rows for the first time in this release.
|
|
144
|
-
- **Per-session state** — fold open/closed and hidden rows are keyed by session
|
|
145
|
-
id, so expanding or cleaning one conversation never moves another one; every
|
|
146
|
-
control carries the id of the list it was rendered for (`data-ownsid`).
|
|
147
|
-
- **Stable snapshot boundary** — the snapshot/history split is taken on the raw
|
|
148
|
-
list and the hidden-row filter is applied afterwards, so hiding a snapshot row
|
|
149
|
-
can no longer drag an archived row into the live area or shift a fold count.
|
|
150
|
-
- **⇄ layout switch** — stacked (current list above, pinned below) or
|
|
151
|
-
side-by-side (left current, right pinned). The preference is stored in
|
|
152
|
-
`localStorage["dsh-todo-float-ball-layout"]` and restored on load.
|
|
153
|
-
- **Column captions** — in side-by-side mode the left column is captioned with
|
|
154
|
-
the current conversation title and the right one with `📌 固定会话`; in stacked
|
|
155
|
-
mode the captions stay hidden and nothing about the old layout changes.
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
## History & panel management (v0.10.0)
|
|
159
|
-
|
|
160
|
-
A plan is rewritten many times during a long task. From v0.10.0 the panel keeps
|
|
161
|
-
the **latest snapshot** as the live list and archives everything older instead
|
|
162
|
-
of discarding it:
|
|
163
|
-
|
|
164
|
-
- **Merge, not replace** — a fresh snapshot updates the leading `snapLen` rows
|
|
165
|
-
of the session bucket; previous items that are not part of the new snapshot
|
|
166
|
-
are appended after it, so old tasks never disappear.
|
|
167
|
-
- **Statistics mean "the current plan"** — the ball face (`done/total`), the
|
|
168
|
-
progress ring, the header summary and the "N items left" notice count only
|
|
169
|
-
the latest snapshot (`snapshotList()`); history is a pure archive.
|
|
170
|
-
- **Per-row hide (✕)** — hover a history row and click ✕ to hide it. Hidden
|
|
171
|
-
rows live in `localStorage` (`dsh-todo-float-ball-hidden-v1`, per session);
|
|
172
|
-
the data layer is untouched. Pinned (📌) sessions hide rows independently —
|
|
173
|
-
a hidden row in session A can never hide a row in session B (`data-ownsid`).
|
|
174
|
-
- **Two fold rows** — `▾ Completed history (N)` and `▸ Abandoned history
|
|
175
|
-
tasks (M)` are independent collapsible rows (collapsed by default); the
|
|
176
|
-
latest snapshot always renders fully expanded.
|
|
177
|
-
- **Batch cleanup (🧹)** — each fold row has a 🧹 button to clear that fold,
|
|
178
|
-
plus a `🧹 Clear all history (X)` row that hides both folds at once.
|
|
179
|
-
- **One-click restore (♻️)** — `♻️ Restore all hidden history (X)` appears
|
|
180
|
-
only while something is hidden and unhides everything in the session.
|
|
181
|
-
- **Row copy (📋)** — copies the *full* task text (not the 80-char display
|
|
182
|
-
truncation), with a real ✓/⚠ feedback.
|
|
183
|
-
|
|
184
|
-
## Discipline injection (v0.9.0)
|
|
185
|
-
|
|
186
|
-
DSH skills are **loaded on demand**: a session that never loads the `todo-show-discipline` skill carries no todo rules at all. Since v0.9.0 the host half injects a stable "todo discipline" section into every session's system prompt, so **installing the plugin is enough** — independent of which skill got loaded, which preset is active, and whether you run Desktop or the web UI.
|
|
187
|
-
|
|
188
|
-
- **ON by default** (no `config` row means ON).
|
|
189
|
-
- To turn it off: add `config: { injectDiscipline: false }` to this plugin's row in `cordis.patch.yml` (or your profile's patch layer), then **restart DSH**.
|
|
190
|
-
- Only an explicit boolean `false` disables it; `"false"` / `0` / typos / a missing `config` all keep it ON (guards against accidental shutdown).
|
|
191
|
-
- The injected text is deliberately short (a system-prompt section costs tokens in every session); the full rules stay in the `todo-show-discipline` skill, which is disabled for model invocation by default once this plugin is installed, and can be re-enabled if you uninstall the plugin.
|
|
192
|
-
|
|
193
|
-
## Install
|
|
194
|
-
|
|
195
|
-
The plugin is a standard DSH npm package (`dsh.bundle` self-declared). Two ways:
|
|
196
|
-
|
|
197
|
-
### From npm (when published)
|
|
176
|
+
### 从 DSH 插件市场安装(推荐)
|
|
177
|
+
|
|
178
|
+
在 DSH 的插件市场里搜索 **`dsh-todo-float-ball`** 或 **`Todo 进度球`**,点安装后重启 DSH。
|
|
179
|
+
|
|
180
|
+
### 从 npm 安装
|
|
198
181
|
|
|
199
182
|
```bash
|
|
200
183
|
npm install dsh-todo-float-ball
|
|
201
184
|
```
|
|
202
185
|
|
|
203
|
-
|
|
186
|
+
然后在你所用 profile 的 `package.json`(如 `%USERPROFILE%\.dsh\profiles\desktop\package.json`)里,把 `"dsh-todo-float-ball"` 同时加进 `dependencies` 和 `dsh.profile.bundles`,重启 DSH 生效。
|
|
204
187
|
|
|
205
|
-
###
|
|
188
|
+
### 手动安装
|
|
206
189
|
|
|
207
|
-
|
|
190
|
+
把本包目录整体复制进 profile 的 `node_modules`(必须是真实目录复制——**不要**用 `link:` / `file:` 依赖,会触发 DSH 安装恢复死循环),按上面同样方式注册后重启。
|
|
208
191
|
|
|
209
|
-
|
|
192
|
+
重启后右下角应出现悬浮球。可用下面的地址验证宿主端已挂载:
|
|
210
193
|
|
|
211
194
|
```
|
|
212
|
-
http://127.0.0.1
|
|
213
|
-
→ {"ok":true,"plugin":"dsh-todo-float-ball","version":"
|
|
195
|
+
http://127.0.0.1:<你当前的 DSH 端口>/dsh-todo-float-ball/health
|
|
196
|
+
→ {"ok":true,"plugin":"dsh-todo-float-ball","version":"<已安装 package.json 里的版本号>"}
|
|
214
197
|
```
|
|
215
198
|
|
|
216
|
-
|
|
199
|
+
**端口要填你自己的。** DSH 桌面端默认 `port: 0`(每次重启换一个随机端口),没有固定值可抄。可从 DSH 窗口地址栏读取,或在 `%USERPROFILE%\.dsh\desktop-preferences.json` 里把 `port` 固定下来。该路由还只接受本机渲染进程的请求,其他请求一律回 `403 Browser access is disabled`,所以除非你打开 `browserAccess`,`curl` 是拿不到的。
|
|
200
|
+
|
|
201
|
+
## 适配版本
|
|
202
|
+
|
|
203
|
+
- DSH 内核(`@deepseek-ai/dsh`):**0.2.1-rc.3**(`package.json` 的 `engines.dsh` 已声明 `>=0.1.7-rc.1`)
|
|
204
|
+
- DSH 桌面端:**2.0.20-next**(DSH NEXT)
|
|
205
|
+
- Node.js:`^22.19.0 || >=24.0.0`
|
|
206
|
+
- 已在上述版本实测通过;低版本 `0.1.7-rc.1` 及以上兼容。
|
|
207
|
+
|
|
208
|
+
## 实现原理
|
|
209
|
+
|
|
210
|
+
官方的 todo 数据是一条**会话投影(session projection)**:
|
|
211
|
+
|
|
212
|
+
1. `@deepseek-ai/dsh-tool-todo` 注册 `todo_write` 工具,并在 `sessionProjections` 上登记 `todos` 投影单元;每次调用向会话日志追加一条 `todo/write` 快照;
|
|
213
|
+
2. `@deepseek-ai/dsh-client-connection` 把当前值以控制帧广播:`{type:"projection", sessionId, key:"todos", value:[{content,status}...]}`;
|
|
214
|
+
3. `@deepseek-ai/dsh-client-ui-conversation` 把它渲染成输入框上方的任务条(`[data-testid="todo-panel"]`)。
|
|
215
|
+
|
|
216
|
+
本插件在两端各挂一个只读探针,不碰任何一端:
|
|
217
|
+
|
|
218
|
+
- **主路**:订阅运行时 `sessions` 服务的权威投影帧(另有 2 秒轮询兜底,防 shell 重建后回调失联)。
|
|
219
|
+
- **兜底一(DOM)**:一个带 200ms 防抖的 `MutationObserver` 盯着 `[data-testid="todo-panel"]`——面板展开时读 `li[data-status]` 全量清单;折叠时解析本地化的计数文案(如"1 完成 · 2 进行中",含中文数字解析)。
|
|
220
|
+
- **兜底二(传输层)**:一次性、防御式的 `window.fetch` 包装(clone 响应、只处理文本/JSON)与 `WebSocket.prototype.onmessage` 包装(文本帧),把每个载荷送进严格的提取器——只对形如投影帧、`todo/write` 事件、`{todos:[...]}` 快照的对象起反应,其余一律忽略,绝不回写。
|
|
217
221
|
|
|
218
|
-
|
|
222
|
+
所有通道汇入同一个归一化器:过滤出三种合法状态、丢弃空内容、列表无变化时零开销跳过(签名比对)。兜底由 `hasPrimaryData()` 把关,权威通道有数据即静默。
|
|
219
223
|
|
|
220
|
-
|
|
224
|
+
**历史归档的口径**:权威通道的一帧就是当前计划的全部(`todo_write` 是整表替换),所以 `snapLen = norm.length`,其后的合并项即历史。球面计数、进度环、头部汇总只统计**最新快照**,历史是纯档案、不进任何计数。
|
|
221
225
|
|
|
222
|
-
|
|
223
|
-
2. `@deepseek-ai/dsh-client-connection` broadcasts the current value as a control frame: `{type:"projection", sessionId, key:"todos", value:[{content,status}...]}`.
|
|
224
|
-
3. `@deepseek-ai/dsh-client-ui-conversation` renders it as the plan strip above the input box (`[data-testid="todo-panel"]`).
|
|
226
|
+
## 常见问题
|
|
225
227
|
|
|
226
|
-
|
|
228
|
+
**悬浮球不出现?**
|
|
229
|
+
先开上面的 health 地址:能返回说明宿主端正常,是客户端 bundle 没加载(查 DSH 日志有无 `loaded without registering`,bundle id 必须与包名一致);不能返回说明插件没进 profile 的 bundles 列表。
|
|
227
230
|
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
- **Fallback 2 — transport tap**: a one-time, defensive wrapper around `window.fetch` (cloning responses, text/json only) and `WebSocket.prototype.onmessage` (text frames) feeds every payload through a strict extractor that only reacts to objects shaped like projection frames, `todo/write` events, or `{todos:[...]}` snapshots. Malformed payloads are ignored; nothing is ever written back.
|
|
231
|
+
**球拖到屏幕顶端就点不动了?**
|
|
232
|
+
不会。球和面板都写了 `app-region: no-drag`,落在窗口拖拽带上依然可点可拖。若真遇到,请报 issue 并附 DSH 版本。
|
|
231
233
|
|
|
232
|
-
|
|
234
|
+
**选了官方皮肤,字色按钮点不动?**
|
|
235
|
+
正常。官方皮肤(官方深色 / 官方浅色 / 随系统解析到官方皮肤)下字色由皮肤强制决定并锁定按钮,保证对比度。
|
|
233
236
|
|
|
234
|
-
|
|
237
|
+
**「三球皮肤同步」勾和不勾有什么区别?**
|
|
238
|
+
勾选 = 跟随全局皮肤(改一个三个球一起变);不勾 = 这个球用自己的皮肤,全局换肤不影响它。
|
|
235
239
|
|
|
236
|
-
|
|
237
|
-
|
|
240
|
+
**官方面板折叠时也能同步吗?**
|
|
241
|
+
能。这正是兜底存在的意义:官方面板折叠时只渲染计数文案,而投影帧始终携带完整清单。
|
|
238
242
|
|
|
239
|
-
|
|
240
|
-
|
|
243
|
+
**会拖慢界面吗?**
|
|
244
|
+
不会。观察器 200ms 防抖;传输层窃听先做 `"todos"` 字符串预筛再解析;兜底看门狗跑约 10 分钟后自动停止。
|
|
241
245
|
|
|
242
|
-
|
|
243
|
-
Yes. That is exactly why channel B exists: the official strip renders only a counts label when collapsed, while projection frames always carry the full list.
|
|
246
|
+
## 兼容性
|
|
244
247
|
|
|
245
|
-
|
|
246
|
-
|
|
248
|
+
- DSH 桌面端 2.x(desktop profile)与 DSH web(web profile)
|
|
249
|
+
- Node.js `^22.19.0 || >=24.0.0`
|
|
250
|
+
- 插件自包含,只通过公开 DOM/HTTP 面与 DSH 交互;皮肤目录与 `dsh-skill-browser`、`dsh-font-enhancer` 共用(可选,不装也能单独用)
|
|
247
251
|
|
|
248
|
-
##
|
|
252
|
+
## 隐私
|
|
249
253
|
|
|
250
|
-
-
|
|
251
|
-
- No `peerDependencies` — the plugin is self-contained and talks to DSH only through public DOM/HTTP surfaces
|
|
254
|
+
零遥测、零数据上传。宿主端只注册一个仅限本机回环访问的健康检查路由(`/dsh-todo-float-ball/health`)。
|
|
252
255
|
|
|
253
256
|
## License
|
|
254
257
|
|
|
Binary file
|
|
Binary file
|
|
Binary file
|