dsh-sidebar-suite 0.2.6 → 0.2.8

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 CHANGED
@@ -1,12 +1,34 @@
1
1
  # 更新日志 / Changelog
2
2
 
3
- > 版本号以 npm registry **实际发布记录**为准(当前:`0.0.0-stage`、`0.1.3`、`0.2.4`、`0.2.5`、`0.2.6`)。
3
+ > 版本号以 npm registry **实际发布记录**为准(当前:`0.0.0-stage`、`0.1.3`、`0.2.4`、`0.2.5`、`0.2.6`、`0.2.7`、`0.2.8`)。
4
4
  > `0.2.0`、`0.2.1`、`0.2.2`、`0.2.3` 是开发过程中的本地迭代号,**从未单独发布**;它们的功能一次性随 `0.2.4` 上线,所以在下面合并记录。
5
5
  >
6
6
  > Versions mirror the npm registry. `0.2.0`–`0.2.3` were local iteration numbers that were never published on their own; all of their features shipped together in `0.2.4`.
7
7
 
8
8
  ---
9
9
 
10
+ ## 0.2.8 — 设置全图形化 + 配置热重载 / Graphical settings & hot reload(2026-11-11)
11
+
12
+ **这次改了运行时代码**(`lib/client.js`、`lib/temp-session-host.mjs`),所以**升级后要托盘退出 DSH 再重开一次**;但从此以后改任何设置都不用再重启。
13
+
14
+ - **8 项设置全部有开关** — 详情页新增「侧栏与临时会话」卡:`SHOW_TEMP_BUTTON`、`TEMP_IN_CHAT_MODE`、`TEMP_BUTTON_STYLE`、`EXPAND_ALL_SESSIONS`、`MAX_KEPT` 做成开关 / 选项按钮 / 数字框;原有的 `DELETE_ON_EXIT`、`SCHEDULE_DELETE`、`SCHEDULE_TIME` 保持。另加「立即清理临时会话」按钮,直连已有的 `purge` 路由。Every config key now has a control; a manual purge button was added.
15
+ - **改文件免重启** — Host 半在 `status` / `config` / `probe` 请求时用 `mtime + size` 感知 `temp-session-config.txt` 的外部改动,重解析、重排定时清理计划、递增 `configRevision`;Client 半每 2.5–3 秒轮询,版本变化才原地重应用(按钮显隐、摆法、CHAT 兼容、会话全展开)。约 3 秒生效。No `fs.watch`: editors save by rename and a watcher would keep the host alive.
16
+ - **不再覆盖手改** — `saveConfig()` 写盘前先重新读文件,UI 改一项不会把用户刚在记事本里改的其它项冲掉(新增回归断言)。
17
+ - **文档口径统一** — 配置文件头、`README.md`、`DETAIL.md`、`使用说明.md`、locale 简介里所有「改文件必须彻底退出重开」的旧说明全部改为「约 3 秒自动生效,不用重启」;只有**升级插件包本身**和改 `cordis.patch.yml` 仍需重启。配置文件头仍保持 3 行,所以文档里的行号全部继续有效。
18
+ - **测试** — 新增 `tests/test_028.mjs`(真实 Host 半的热重载 / 防覆盖 / 路由 / 源码契约),`tests/test_023.mjs` 追加 0.2.8 详情页渲染与点击断言;`npm test` 链扩为 6 套。
19
+
20
+ ---
21
+
22
+ ## 0.2.7 — 下载数据可见 / Download counts made visible(2026-11-10)
23
+
24
+ **纯文档改动**:`lib/` 三份脚本、`locale/` 与 0.2.6 逐字一致,没有运行时变化。Docs only, no runtime changes.
25
+
26
+ - **两个下载量徽章 / Two download badges** — README 顶部挂 npm 近 30 天安装量徽章与 GitHub Release 附件下载总数徽章,并写明两者统计口径不同(GitHub 只数附件下载,clone / npm 安装不算)。Both badges link to their source pages; the difference between the two counters is explained right below them.
27
+ - **跟进市场图标 PR / Followed up on the storefront PR** — `awesome-dsh-plugin` PR #14032 的两个检查(`Submission gate` / `check`)均已 success,已在 PR 里留言请维护者合并;该 PR 只加一行 `icon:`,描述逐字保留上游最新文案。目录措辞的补充 PR 等它合并后再开,避免同一文件两个 PR 冲突。
28
+ - **每个版本都带附件 / Assets for every release** — `v0.2.7` 同样附 `.zip` + `.tgz`,与 0.2.4–0.2.6 保持一致。
29
+
30
+ ---
31
+
10
32
  ## 0.2.6 — 默认值披露 + 可下载 Release / Default-behaviour disclosure & downloadable releases(2026-11-10)
11
33
 
12
34
  **同样没有改运行时逻辑**:只把「临时会话默认在退出 DSH 时删除;每天定时清理默认关」这件插件目录维护者在 PR #13993 复验后要求披露的事,写进所有用户看得到的地方,并给 GitHub Release 补上可下载附件。No runtime logic changed.
package/DETAIL.md CHANGED
@@ -88,7 +88,7 @@ dsh plugin --profile desktop add dsh-sidebar-suite
88
88
  本地开发可把包名换成本目录路径或 `.tgz` 安装包。已在 **DSH 0.2.2-rc.1(desktop profile)** 验证。
89
89
  For local development, point the same command at this folder or a packed `.tgz`. Tested on **DSH 0.2.2-rc.1 (desktop profile)**.
90
90
 
91
- **客户端代码不会热重载 / the client half is not hot-reloaded** — 安装或改动文件后请完全退出并重新打开 DSH / fully quit and reopen DSH after installing or editing files.
91
+ **升级插件包后仍需重启 / Upgrading the plugin package still needs a restart** — 安装新版或改 `lib/` 下的代码后,请完全退出并重新打开 DSH(客户端代码不热重载)。**但改配置不用重启**:0.2.8 起 `temp-session-config.txt` 的改动、以及详情页的任何开关,都在约 3 秒内原地生效。 / Config edits are the exception: from 0.2.8 they hot-reload in place within seconds.
92
92
 
93
93
  > 组合包自带的 `cordis.patch.yml` 会自动挂载,不要再往 profile 的 `cordis.patch.yml` 里加同名行,否则会加载两次。
94
94
  > The bundle patch mounts the plugin automatically; do not add a manual mount line or it loads twice.
@@ -116,10 +116,12 @@ For local development, point the same command at this folder or a packed `.tgz`.
116
116
 
117
117
  **为什么删除是安全的**:`dsh-session-query-sqlite` 的 `_reconcile()` 会拿「磁盘上实际存在的会话」和索引行对比,多出来的行直接 `persistentDeletes`,因此删目录之后搜索索引会自愈,不会留下点不开的幽灵会话。
118
118
 
119
- 配置:`SHOW_TEMP_BUTTON` / `TEMP_IN_CHAT_MODE` / `TEMP_BUTTON_STYLE` / `DELETE_ON_EXIT` / `SCHEDULE_DELETE` / `SCHEDULE_TIME` / `MAX_KEPT`,记事本改等号右边,完全退出并重开 DSH 生效。
119
+ 配置:`SHOW_TEMP_BUTTON` / `TEMP_IN_CHAT_MODE` / `TEMP_BUTTON_STYLE` / `EXPAND_ALL_SESSIONS` / `DELETE_ON_EXIT` / `SCHEDULE_DELETE` / `SCHEDULE_TIME` / `MAX_KEPT` —— **全部 8 项都能在详情页设**,用记事本改等号右边也行,保存后约 3 秒自动生效,不用重启。
120
120
 
121
121
  **详情页设置(0.2.2)**:插件详情页顶部卡片新增「临时会话自动删除」区块 —— 「退出 DSH 时删除」和「每天定时清理 + 时间」两个独立开关。它不走 `configForms`,而是 `GET/POST /api/dsh-temp-session.config` 交给 Host 半执行,因为**只有一个数据源**:`temp-session-config.txt`。Host 半按行替换(`KEY=value` 只换 `= ` 右边),注释、空行、键顺序原样保留,用户手写的内容不会丢;缺失的键追加到末尾。保存后立即 `restartScheduler()`,无需重启。
122
122
 
123
+ **全部设置图形化 + 热重载(0.2.8)**:详情页新增「侧栏与临时会话」卡,把剩下的 5 个键也做成开关 / 选项按钮 / 数字框,并加了一个「立即清理临时会话」按钮。至此 `temp-session-config.txt` 里**没有任何一项**需要用户手改文本。Host 半在每次 `status` / `config` / `probe` 请求时比对文件的 `mtime + size`,变化就重解析、重排定时清理计划、递增 `configRevision`;Client 半每 2.5–3 秒轮询一次,只在版本变化时原地重应用(按钮显隐、按钮摆法、CHAT 兼容策略、会话全展开)。`saveConfig()` 写盘前也会先重新读文件,避免 UI 的一次保存覆盖掉用户刚刚手改的其它行。不用 `fs.watch`,因为编辑器保存通常是「写临时文件再改名」,且监听器会拖住宿主进程。 / Every remaining key now has a control; a stamp-based reload makes both the switches and Notepad edits live within seconds, with no restart and no lost hand edits.
124
+
123
125
  **定时清理(0.2.2)的实现要点**:
124
126
 
125
127
  - 调度器是 `setInterval(30s)` + `computeNextRun(HH:MM)`,`timer.unref()` 保证它不会把宿主进程吊住;每次 apply/保存都先 `stopScheduler()` 再重建,避免重载后出现两个定时器。
package/README.md CHANGED
@@ -1,5 +1,10 @@
1
1
  # 侧栏布局大师 · Sidebar Suite
2
2
 
3
+ [![npm downloads](https://img.shields.io/npm/dm/dsh-sidebar-suite)](https://www.npmjs.com/package/dsh-sidebar-suite) [![GitHub Release downloads](https://img.shields.io/github/downloads/YONAN1269/dsh-sidebar-suite/total?label=GitHub%20Release%20downloads)](https://github.com/YONAN1269/dsh-sidebar-suite/releases)
4
+
5
+ > 两个数字不是一回事:左边是 **npm 近 30 天安装量**;右边是 **GitHub Release 附件的下载总数** —— GitHub 只统计这个,`git clone` 和 npm 安装都不计入。附件是 2026-11-10 才补齐的,所以右边从 0 开始,每有一次真实下载才 +1。
6
+ > The left badge counts npm installs (last 30 days); the right one counts downloads of **attached release files only** — clones and npm installs are not included. Assets were first attached on 2026-11-10, so that number starts at zero.
7
+
3
8
  > 让左侧栏从「抢地盘」变成「听你的」。三种布局、一键切换、零改动宿主结构,默认布局在插件详情页顶部直接改。
4
9
  > Tame the DSH sidebar: three layouts, one click, zero DOM rewrites — set your startup default right at the top of the plugin page.
5
10
 
@@ -126,7 +131,7 @@ This bundle deliberately omits `engines.dsh`: DSH is currently a prerelease, and
126
131
  组合包 patch 会自动挂载,**不要**再往 profile 的 `cordis.patch.yml` 加同名行,否则加载两次。
127
132
  The bundle patch mounts the plugin; do not also add a manual mount line.
128
133
 
129
- 客户端代码不热重载:安装或改动文件后请完全退出并重新打开 DSH。
134
+ 升级插件包后请完全退出并重新打开 DSH(客户端代码不热重载);但 0.2.8 起**改配置文件或在详情页改设置都不用重启**,约 3 秒自动生效。
130
135
  The client half is not hot-reloaded — fully quit and reopen DSH after installing or editing files.
131
136
 
132
137
  ## 已知限制 / Known limits
@@ -141,11 +146,11 @@ DSH 自己的会话列表每个工作区只先显示 5 条,剩下的折叠成
141
146
 
142
147
  - 每次侧栏刷新都把每个工作区的会话**全部展开**:按宿主自己的按钮走,不改宿主 DOM。
143
148
  - 「展开其余 N 个会话」/「收起」按钮**整块隐藏**。
144
- - 想恢复 DSH 原来的折叠:把 `temp-session-config.txt` 的 **`EXPAND_ALL_SESSIONS=on` 改成 `off`**,保存后彻底退出 DSH 再重开。
149
+ - 想恢复 DSH 原来的折叠:在详情页关掉「会话默认全展开」开关即可;或把 `temp-session-config.txt` 的 **`EXPAND_ALL_SESSIONS=on` 改成 `off`**,保存后约 3 秒生效(已展开的列表要切换一次工作区才会收回去)。
145
150
 
146
151
  依据(在 `app.asar` 里逐字核对过 `@deepseek-ai/dsh-client-ui-workspace/lib/client.js`):文案 `sessions.expand` = `展开其余 {n} 个会话`,按钮是 `<button data-row-key="overflow:<group>">`,点一次把该组水位线抬高 5 条,全部显示后 `aria-expanded` 变为 `true` 且文案变成「收起」。
147
152
 
148
- > The host folds session lists after five rows. This plugin presses the host's own overflow button until nothing is hidden, then hides that control entirely. Set `EXPAND_ALL_SESSIONS=off` in `temp-session-config.txt` to restore DSH's folding.
153
+ > The host folds session lists after five rows. This plugin presses the host's own overflow button until nothing is hidden, then hides that control entirely. Use the detail-page switch (or set `EXPAND_ALL_SESSIONS=off` in `temp-session-config.txt`) to restore DSH's folding. Both hot-reload in seconds, no restart.
149
154
 
150
155
  ## 临时会话 / Temporary session(0.2.0)
151
156
 
@@ -177,9 +182,29 @@ DSH **没有公开的「删除会话」接口**(我核对过 `app.asar`:`ses
177
182
 
178
183
  **正在使用的会话不会被误删**:定时清理会跳过最近 3 分钟内有写入的会话(打开着的会话一直在写转写文件),5 分钟后再试一次。退出时的删除不受这个保护影响 —— 退出本来就是你要求清理。
179
184
 
185
+ ### 全部设置图形化 + 配置热重载(0.2.8)
186
+
187
+ 详情页最上面那张卡现在能改**全部 8 项**配置,不用再碰文本:
188
+
189
+ | 设置 | 对应键 |
190
+ | --- | --- |
191
+ | 显示「临时」按钮 | `SHOW_TEMP_BUTTON` |
192
+ | CHAT 官网模式:隐藏 / 显示 | `TEMP_IN_CHAT_MODE` |
193
+ | 按钮摆法:并排 / 独占一行 | `TEMP_BUTTON_STYLE` |
194
+ | 会话默认全展开 | `EXPAND_ALL_SESSIONS` |
195
+ | 退出 DSH 时删除 | `DELETE_ON_EXIT` |
196
+ | 每天定时清理 + 时间 | `SCHEDULE_DELETE` / `SCHEDULE_TIME` |
197
+ | 最多保留几个 | `MAX_KEPT` |
198
+ | 立即清理临时会话 | 手动触发 `purge` |
199
+
200
+ 两条路写的是同一个文件:详情页开关按行替换(注释、空行、顺序原样保留),Host 半用 `mtime + size` 感知外部改动并递增 `configRevision`;客户端每 2.5–3 秒轮询一次,看到新版本就原地重应用。所以**记事本改完保存,约 3 秒自动生效,不用重启 DSH**;反过来 UI 保存前也会先重新读文件,不会把刚手改的其它行覆盖掉。卡片底部会显示当前的「设置版本」号,方便确认有没有生效。
201
+
202
+ > 仍然需要重启的只有一件事:**升级插件包本身**(`lib/` 里的客户端代码不会热重载)。
203
+ > The only thing that still needs a restart is upgrading the plugin package itself.
204
+
180
205
  ### 配置(记事本可改)
181
206
 
182
- `temp-session-config.txt`,只改等号右边,保存后**完全退出并重开 DSH** 生效。
207
+ `temp-session-config.txt`,只改等号右边,保存后**约 3 秒自动生效,不用重启**;详情页的开关写的是同一个文件。
183
208
 
184
209
  | 键 | 默认 | 作用 |
185
210
  | --- | --- | --- |