@moonsand/dsh-ui-optimize 0.9.26 → 0.9.27

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.md CHANGED
@@ -2,7 +2,9 @@
2
2
 
3
3
  English | [中文](README.zh.md)
4
4
 
5
- Three independent features for the DeepSeek Harness web interface, each with its own switch: a **theme gallery** of eight minimalist themes (each defining one palette for light and one for dark), the **desktop Reload/Restart buttons** at the sidebar foot, and **sidebar panel folding** — the panel rows collapse into a single **Panels** entry that opens a two-column launcher.
5
+ A collection of switches that tune how DeepSeek Harness looks and behaves — the whole interface, not a few named screens. Each switch works on its own, and more arrive as the shell grows.
6
+
7
+ Today: a **theme gallery** of eight minimalist themes (each defining one palette for light and one for dark), and **sidebar panel folding** — the panel rows collapse into a single **Panels** entry that opens a two-column launcher.
6
8
 
7
9
  Colours travel only through `ctx.theme.overrideTokens`, as a single layer of theme variables. No structural CSS is injected and no other plugin's DOM is read, so an upstream redesign can at worst make the colours inert — it cannot break the layout.
8
10
 
@@ -18,13 +20,6 @@ Open **Settings → UI Optimize**.
18
20
 
19
21
  Celadon, Linen, Cream, Graphite, Indigo, Slate, Sage, Rose. Picking a card recolours the whole interface; **Default** restores the stock look. Every theme defines one palette for light and one for dark — switching Appearance between them carries the theme along, so there is no separate version to pick.
20
22
 
21
- ### Desktop actions
22
-
23
- Two switches control the sidebar-foot buttons:
24
-
25
- - **Reload UI** — reloads the page and client plugins only; the Host and running tasks keep going
26
- - **Restart app** — restarts the whole app including its Host; interrupts the current conversation. **Desktop app only** — in a browser it degrades to reloading the page
27
-
28
23
  ### Sidebar
29
24
 
30
25
  A switch folds the panel rows in the left rail into a single **Panels** entry. Clicking it opens a two-column launcher with the panel icons, a title and count, a search box once there are more than seven panels, and keyboard control (↑ ↓ to move, Enter to open, Esc to close). Panels that register later — including ones added by other plugins — are picked up on the next open, so nothing silently disappears from the list.
@@ -33,18 +28,13 @@ The entry calls the shell's own panel-selection API instead of synthesising clic
33
28
 
34
29
  The **More** row keeps its own line. Folding it in was tried and dropped: the shell's overflow menu only opens from a trusted click, which a plugin cannot produce, and the synthetic pointer events that came close also closed the launcher through the shell's click-outside handler.
35
30
 
36
- ## Relationship to dsh-desktop-restart
37
-
38
- The desktop actions are ported from [`@moonsand/dsh-desktop-restart`](https://github.com/MoonSand/dsh-desktop-restart) and use their own route prefix, `/ui-optimize/desktop`.
39
-
40
- Both plugins can be installed at the same time without crashing, but you would get two sets of buttons. When the old plugin is detected, a notice appears at the top of the settings page suggesting you uninstall it.
31
+ The launcher follows the pattern of the community plugin [dsh-sidebar-shelf](https://github.com/wumouren114/dsh-sidebar-shelf): register a real rail row, hide the rest with one scoped CSS rule, enumerate entries through the slot API, and select a panel through the shell's own API rather than by faking clicks.
41
32
 
42
33
  ## Known limitations
43
34
 
44
35
  - The theme choice lives in browser `localStorage`; it is lost with the browser profile or site data
45
- - Restart works only in the desktop app; a browser session can only reload
46
- - Restart logs still go to `%TEMP%\dsh-desktop-restart.log`, inherited from the ported source
47
- - The restart action is a process-level operation that cannot be verified automatically
36
+ - The **More** row is not folded; it stays in the native rail
37
+ - The launcher keeps the shell's own panel order — it does not sort, pin or reorder
48
38
  - The **More** row is not folded; it stays in the native rail
49
39
  - The launcher keeps the shell's own panel order — it does not sort, pin or reorder
50
40
  - Sidebar folding and `dsh-sidebar-shelf` rewrite the same rail; enable one of them, not both
@@ -55,7 +45,7 @@ Both plugins can be installed at the same time without crashing, but you would g
55
45
  node scripts/smoke.mjs
56
46
  ```
57
47
 
58
- The smoke test covers the assembly contract only: the three runtime files parse, the theme table is complete (8 themes × 10 tokens × 2 schemes), and the published identity plus `engines.dsh` are intact. It does **not** check whether the palettes look right or whether restart actually restarts.
48
+ The smoke test covers the assembly contract only: the three runtime files parse, the theme table is complete (8 themes × 10 tokens × 2 schemes), and the published identity plus `engines.dsh` are intact. It does **not** check whether the palettes look right or whether the sidebar launcher opens.
59
49
 
60
50
  ## License
61
51
 
package/README.zh.md CHANGED
@@ -2,11 +2,9 @@
2
2
 
3
3
  [English](README.md) | 中文
4
4
 
5
- 给 DeepSeek Harness 界面换主题、把「刷新界面 / 重启应用」收进同一个插件,并把侧栏的面板列表收成一个入口——三个功能各自独立开关。
5
+ 一组用来调 DeepSeek Harness 观感与操作的开关——管的是整套界面,不是某几块屏幕。每个开关单独生效,宿主长出新能力时会继续增加。
6
6
 
7
- - **主题画廊**:8 套极简主题,浅色与深色各定义一组配色,点一张卡片整套配色生效
8
- - **桌面操作**:侧栏底部的刷新与重启按钮,可分别关掉
9
- - **侧栏收纳**:面板行收成一个「面板」入口,点开是两列启动面板
7
+ 目前包含:**主题画廊**(8 套极简主题,浅色与深色各定义一组配色),以及**侧栏收纳**(面板行收成一个「面板」入口,点开是两列启动面板)。
10
8
 
11
9
  配色只通过 `ctx.theme.overrideTokens` 以**单层**覆盖主题变量,不注入任何结构性 CSS、不读写其他插件的 DOM,所以宿主改版最多让颜色不生效,不会把界面layout弄坏。
12
10
 
@@ -37,13 +35,6 @@ dsh plugin 或 GUI 插件管理:安装 @moonsand/dsh-ui-optimize
37
35
 
38
36
  选「默认」恢复原生外观。每套主题为浅色与深色各定义一组配色,切换「外观」里的浅色/深色时自动跟随,不需要为两种模式各选一次。
39
37
 
40
- ### 桌面操作
41
-
42
- 两个开关分别控制侧栏底部的「刷新界面」和「重启应用」按钮:
43
-
44
- - **刷新界面**:只重新加载页面与客户端插件,Host 与正在跑的任务不受影响
45
- - **重启应用**:重启整个应用(含 Host),会中断当前对话;**仅桌面端可用**,网页端会降级为刷新页面
46
-
47
38
  ### 侧栏
48
39
 
49
40
  一个开关把左侧竖栏里的面板行收成一个「面板」入口。点开是两列启动面板:图标、标题与数量、面板多于 7 个时出现搜索框,并支持键盘操作(↑ ↓ 移动、回车打开、Esc 关闭)。之后才注册的面板——包括其他插件加进来的——在下次打开时自动出现,不会漏。
@@ -52,18 +43,11 @@ dsh plugin 或 GUI 插件管理:安装 @moonsand/dsh-ui-optimize
52
43
 
53
44
  「更多」保持独立一行。把它也收进去试过并放弃了:宿主的溢出菜单只认真实点击,插件造不出来;而伪造的指针事件又会被宿主的「点外部即关闭」吃掉,刚打开的弹层立刻被关掉。
54
45
 
55
- ## 与 dsh-desktop-restart 的关系
56
-
57
- 本插件的桌面操作移植自 [`@moonsand/dsh-desktop-restart`](https://github.com/MoonSand/dsh-desktop-restart),并已改用独立的路由前缀 `/ui-optimize/desktop`。
58
-
59
- 两个插件**可以同时安装而不会崩溃**,但会出现两套刷新/重启按钮。检测到旧插件仍在运行时,设置页顶部会给出提示,建议卸载它。
46
+ 启动面板的做法参考社区插件 [dsh-sidebar-shelf](https://github.com/wumouren114/dsh-sidebar-shelf):注册一根真实的竖栏行、用一条 scoped CSS 规则隐藏其余行、通过槽位 API 枚举条目,并用宿主自己的接口选中面板,而不是伪造点击。
60
47
 
61
48
  ## 已知限制
62
49
 
63
50
  - 主题选择保存在浏览器 `localStorage`,换机器或清站点数据会丢失
64
- - 重启只适用于桌面端;网页端只能刷新
65
- - 重启日志仍写在 `%TEMP%\dsh-desktop-restart.log`(沿用移植来源的路径)
66
- - 重启动作为进程级操作,无法在自动化测试中验证,只能人工点一次确认
67
51
  - 「更多」没有收进弹层,仍在原生竖栏里
68
52
  - 弹层沿用宿主自己的面板顺序,不排序、不置顶、不重排
69
53
  - 侧栏收纳与 `dsh-sidebar-shelf` 改的是同一根竖栏,两个只能开一个
@@ -74,7 +58,7 @@ dsh plugin 或 GUI 插件管理:安装 @moonsand/dsh-ui-optimize
74
58
  node scripts/smoke.mjs
75
59
  ```
76
60
 
77
- 冒烟只验证装配契约:三个运行时文件可解析、主题表结构完整(8 套 × 10 个变量 × 浅/深两组)、包身份与 `engines.dsh` 完好。**它不验证配色观感,也不验证重启是否真的重启。**
61
+ 冒烟只验证装配契约:三个运行时文件可解析、主题表结构完整(8 套 × 10 个变量 × 浅/深两组)、包身份与 `engines.dsh` 完好。**它不验证配色观感,也不验证侧栏弹层能否正常打开。**
78
62
 
79
63
  ## 许可
80
64
 
package/client.js CHANGED
@@ -34,8 +34,7 @@ window.__ModuleLoader__.load({
34
34
  const DICT = {
35
35
  en: {
36
36
  title: 'UI Optimize',
37
- subtitle:
38
- 'Pick one theme and the whole interface follows. Each theme defines one palette for light and one for dark; switching Appearance between them carries the theme along — no separate version to pick.',
37
+ subtitle: 'Making the DSH interface pleasant to live in, one switch at a time.',
39
38
  defaultName: 'Default',
40
39
  defaultHint: 'Keep the current look',
41
40
  'section.theme': 'Theme',
@@ -65,7 +64,7 @@ window.__ModuleLoader__.load({
65
64
  'sidebar.hint': '↑↓ move · ↵ open · Esc close',
66
65
  'sidebar.more': 'More',
67
66
  'sidebar.switch': 'Fold the sidebar menu into one Panels entry',
68
- 'sidebar.switchHint': 'The menu rows collapse into a single launcher that lists every panel; panels a future plugin registers show up on their own. Also narrows the New Session button',
67
+ 'sidebar.switchHint': 'The menu rows collapse into a single launcher that lists every panel; panels a future plugin registers show up on their own. Also makes the New Session button shorter',
69
68
  'desktop.label': 'Restart app',
70
69
  'desktop.hint': 'Restart DeepSeek Harness (app and Host)',
71
70
  'desktop.refresh': 'Reload UI',
@@ -91,8 +90,7 @@ window.__ModuleLoader__.load({
91
90
  },
92
91
  zh: {
93
92
  title: '界面优化',
94
- subtitle:
95
- '选一个主题,整个界面跟着换。每套主题为浅色与深色各定义一组配色,切换「外观」时自动跟随,不需要为两种模式各选一次。',
93
+ subtitle: '把 DSH 界面调得顺眼顺手,一个开关一件事。',
96
94
  defaultName: '默认',
97
95
  defaultHint: '保持当前外观',
98
96
  'section.theme': '主题',
@@ -122,7 +120,7 @@ window.__ModuleLoader__.load({
122
120
  'sidebar.hint': '↑↓ 选择 · ↵ 打开 · Esc 关闭',
123
121
  'sidebar.more': '更多',
124
122
  'sidebar.switch': '把侧栏菜单收进「面板」',
125
- 'sidebar.switchHint': '菜单行合并成一个入口,点开列出全部面板;新插件注册的面板会自动出现。同时把「新会话」按钮收窄',
123
+ 'sidebar.switchHint': '菜单行合并成一个入口,点开列出全部面板;新插件注册的面板会自动出现。同时把「新会话」按钮压低一点',
126
124
  'desktop.label': '重启应用',
127
125
  'desktop.hint': '重启 DeepSeek Harness(应用与 Host)',
128
126
  'desktop.refresh': '刷新界面',
package/locale/en.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "meta": {
3
3
  "title": "dsh-ui-optimize",
4
- "description": "Minimalist theme gallery for the DSH interface: pick one card in Settings and the whole UI re-colours at once — no per-token tuning. Eight themes — Celadon, Linen, Cream, Graphite, Indigo, Slate, Sage, Rose — each define one palette for light and one for dark and follow the Appearance setting automatically. Choosing Default restores the original look. Colours travel only through the theme token layer, so an upstream redesign cannot break the layout or the plugin. The same page also folds the sidebar panel rows into one Panels entry that opens a two-column launcher with search and keyboard control, and adds the desktop Reload/Restart buttons at the sidebar foot — each feature has its own switch."
4
+ "description": "Optimizes how DeepSeek Harness looks and behaves across the whole interface, not just a few screens: the switches are meant to grow with the shell, and every one of them can be turned off on its own. Today it carries a minimalist theme gallery — Celadon, Linen, Cream, Graphite, Indigo, Slate, Sage, Rose — where each theme defines one palette for light and one for dark, follows the Appearance setting, and re-colours the interface through a single theme-token layer so an upstream redesign cannot break the layout; plus folding the sidebar panel rows into one Panels entry that opens a two-column launcher with search and keyboard control. The sidebar launcher follows the pattern of the community plugin dsh-sidebar-shelf (github.com/wumouren114/dsh-sidebar-shelf)."
5
5
  }
6
6
  }
package/locale/zh.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "meta": {
3
3
  "title": "dsh-ui-optimize",
4
- "description": "给 DSH 界面换主题的极简插件:设置页里只有一排主题卡片,点一下整套界面配色跟着换,不必逐个去调颜色。内置 8 套主题——青瓷、亚麻、奶油、石墨、靛蓝、雾蓝、苔绿、玫瑰,每套为浅色与深色各定义一组配色、切换外观时自动跟随;选「默认」即恢复原生外观。配色只走主题变量层、不注入结构性样式,上游改版不会把界面弄坏。同一页里还能把侧栏面板行收成一个「面板」入口(点开是两列启动面板,带搜索与键盘操作),并在侧栏底部加上刷新/重启按钮——三个功能各有独立开关。"
4
+ "description": "优化的是 DeepSeek Harness 的整体观感与操作,不局限于某几个界面;开关会随宿主长出的新能力继续增加,每一项都能单独关掉。目前包含:8 套极简主题的画廊——青瓷、亚麻、奶油、石墨、靛蓝、雾蓝、苔绿、玫瑰,每套为浅色与深色各定义一组配色并跟随「外观」设置,配色只走单一主题变量层,上游改版不会把界面弄坏;以及把侧栏面板行收成一个「面板」入口,点开是两列启动面板,带搜索与键盘操作。侧栏启动面板的做法参考社区插件 dsh-sidebar-shelf(github.com/wumouren114/dsh-sidebar-shelf)。"
5
5
  }
6
6
  }
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "@moonsand/dsh-ui-optimize",
3
- "version": "0.9.26",
3
+ "version": "0.9.27",
4
4
  "type": "module",
5
- "description": "Three features for the DSH web interface, each with its own switch: a minimalist theme gallery (eight themes, one palette for light and one for dark), the desktop Reload/Restart actions at the sidebar foot, and folding the sidebar panel rows into one Panels launcher. · DSH 界面优化:8 套极简主题(浅色与深色各一组配色)+ 侧栏底部的刷新/重启按钮 + 侧栏面板收成一个「面板」入口,三个功能各有独立开关。",
5
+ "description": "Switches that tune how DeepSeek Harness looks and behaves across the whole interface, not just a few screens — each works on its own and more arrive as the shell grows. Sidebar launcher pattern from dsh-sidebar-shelf (github.com/wumouren114/dsh-sidebar-shelf). · 调 DeepSeek Harness 整体观感与操作的开关集合,管的是整套界面而不只是某几块;每个开关独立生效,随宿主能力增长继续增加。侧栏启动面板的做法参考 dsh-sidebar-shelf(github.com/wumouren114/dsh-sidebar-shelf)。",
6
6
  "license": "MIT",
7
7
  "author": "MoonSand",
8
8
  "publishConfig": {