@moonsand/dsh-ui-optimize 0.0.0-stage → 0.8.4

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 ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 MoonSand
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.md CHANGED
@@ -1,3 +1,51 @@
1
- # Temporary Holding Version
1
+ # dsh-ui-optimize
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ English | [中文](README.zh.md)
4
+
5
+ Two independent features for the DeepSeek Harness web interface: a **theme gallery** of eight minimalist themes (each defining one palette for light and one for dark), and the **desktop Reload/Restart buttons** at the sidebar foot — every feature has its own switch.
6
+
7
+ 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
+
9
+ ## Install
10
+
11
+ Install `@moonsand/dsh-ui-optimize` from the GUI plugin manager. Requires `engines.dsh >= 0.2.1-rc.3`.
12
+
13
+ ## Use
14
+
15
+ Open **Settings → UI Optimize**.
16
+
17
+ ### Themes
18
+
19
+ 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
+
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
+ ## Relationship to dsh-desktop-restart
29
+
30
+ 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`.
31
+
32
+ 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.
33
+
34
+ ## Known limitations
35
+
36
+ - The theme choice lives in browser `localStorage`; it is lost with the browser profile or site data
37
+ - Restart works only in the desktop app; a browser session can only reload
38
+ - Restart logs still go to `%TEMP%\dsh-desktop-restart.log`, inherited from the ported source
39
+ - The restart action is a process-level operation that cannot be verified automatically
40
+
41
+ ## Development
42
+
43
+ ```
44
+ node scripts/smoke.mjs
45
+ ```
46
+
47
+ 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
+
49
+ ## License
50
+
51
+ MIT
package/README.zh.md ADDED
@@ -0,0 +1,69 @@
1
+ # dsh-ui-optimize
2
+
3
+ [English](README.md) | 中文
4
+
5
+ 给 DeepSeek Harness 界面换主题,并把「刷新界面 / 重启应用」两个按钮收进同一个插件——两个功能各自独立开关。
6
+
7
+ - **主题画廊**:8 套极简主题,浅色与深色各定义一组配色,点一张卡片整套配色生效
8
+ - **桌面操作**:侧栏底部的刷新与重启按钮,可分别关掉
9
+
10
+ 配色只通过 `ctx.theme.overrideTokens` 以**单层**覆盖主题变量,不注入任何结构性 CSS、不读写其他插件的 DOM,所以宿主改版最多让颜色不生效,不会把界面layout弄坏。
11
+
12
+ ## 安装
13
+
14
+ ```
15
+ dsh plugin 或 GUI 插件管理:安装 @moonsand/dsh-ui-optimize
16
+ ```
17
+
18
+ 要求 `engines.dsh >= 0.2.1-rc.3`。
19
+
20
+ ## 使用
21
+
22
+ 打开 **设置 → 界面优化**。
23
+
24
+ ### 主题
25
+
26
+ | 主题 | 风格 |
27
+ |---|---|
28
+ | 青瓷 | 冷调青绿,克制安静 |
29
+ | 亚麻 | 暖调棕褐,像未漂白的布 |
30
+ | 奶油 | 淡黄暖白,柔和护眼 |
31
+ | 石墨 | 近单色中性,冷静克制 |
32
+ | 靛蓝 | 近白画布配冷靛强调 |
33
+ | 雾蓝 | 蓝灰中性,现代后台的默认脸 |
34
+ | 苔绿 | 低饱和绿,比青瓷更松弛 |
35
+ | 玫瑰 | 灰调玫瑰,暖而不吵 |
36
+
37
+ 选「默认」恢复原生外观。每套主题为浅色与深色各定义一组配色,切换「外观」里的浅色/深色时自动跟随,不需要为两种模式各选一次。
38
+
39
+ ### 桌面操作
40
+
41
+ 两个开关分别控制侧栏底部的「刷新界面」和「重启应用」按钮:
42
+
43
+ - **刷新界面**:只重新加载页面与客户端插件,Host 与正在跑的任务不受影响
44
+ - **重启应用**:重启整个应用(含 Host),会中断当前对话;**仅桌面端可用**,网页端会降级为刷新页面
45
+
46
+ ## 与 dsh-desktop-restart 的关系
47
+
48
+ 本插件的桌面操作移植自 [`@moonsand/dsh-desktop-restart`](https://github.com/MoonSand/dsh-desktop-restart),并已改用独立的路由前缀 `/ui-optimize/desktop`。
49
+
50
+ 两个插件**可以同时安装而不会崩溃**,但会出现两套刷新/重启按钮。检测到旧插件仍在运行时,设置页顶部会给出提示,建议卸载它。
51
+
52
+ ## 已知限制
53
+
54
+ - 主题选择保存在浏览器 `localStorage`,换机器或清站点数据会丢失
55
+ - 重启只适用于桌面端;网页端只能刷新
56
+ - 重启日志仍写在 `%TEMP%\dsh-desktop-restart.log`(沿用移植来源的路径)
57
+ - 重启动作为进程级操作,无法在自动化测试中验证,只能人工点一次确认
58
+
59
+ ## 开发
60
+
61
+ ```
62
+ node scripts/smoke.mjs
63
+ ```
64
+
65
+ 冒烟只验证装配契约:三个运行时文件可解析、主题表结构完整(8 套 × 10 个变量 × 浅/深两组)、包身份与 `engines.dsh` 完好。**它不验证配色观感,也不验证重启是否真的重启。**
66
+
67
+ ## 许可
68
+
69
+ MIT