dsh-tui-theme 0.2.0 → 0.2.1
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
|
@@ -23,6 +23,20 @@
|
|
|
23
23
|
|
|
24
24
|
> 小知识:`pink-day` 的 `text` 写成 `rgb(61,43,51)` 而非 hex——宿主按 `text` 墨色亮度自动判定主题深浅,且只认 `rgb()` 格式。
|
|
25
25
|
|
|
26
|
+
## 截图
|
|
27
|
+
|
|
28
|
+
实测于 dsh-tui 0.9.0:
|
|
29
|
+
|
|
30
|
+
| 昼樱 `pink-day` | 夜樱 `pink-night` |
|
|
31
|
+
| :---: | :---: |
|
|
32
|
+
|  |  |
|
|
33
|
+
|
|
34
|
+
`/settings` 里的 pink-theme 区块(跟随终端背景 / 花符 / 时钟 / 轮数,保存即时生效):
|
|
35
|
+
|
|
36
|
+

|
|
37
|
+
|
|
38
|
+
> 图中底栏上下文进度条的蓝色分段与 ❯ 提示符是宿主硬编码的,见下文[宿主限制](#受宿主限制目前无法定制的部分)。
|
|
39
|
+
|
|
26
40
|
## 自动跟随终端背景
|
|
27
41
|
|
|
28
42
|
设置里的“跟随终端背景”开启后(本部署默认开启):
|
|
@@ -35,11 +49,14 @@
|
|
|
35
49
|
## 安装
|
|
36
50
|
|
|
37
51
|
```sh
|
|
38
|
-
#
|
|
39
|
-
dsh plugin --profile dsh-tui add -w
|
|
52
|
+
# 方式一:从 npm(已发布)
|
|
53
|
+
dsh plugin --profile dsh-tui add -w dsh-tui-theme
|
|
40
54
|
|
|
41
|
-
# 方式二:从 GitHub
|
|
42
|
-
dsh plugin --profile dsh-tui add -w github
|
|
55
|
+
# 方式二:从 GitHub
|
|
56
|
+
dsh plugin --profile dsh-tui add -w github:xiaoxiaohaigui/dsh-tui-theme
|
|
57
|
+
|
|
58
|
+
# 方式三:本地路径(开发/自用)
|
|
59
|
+
dsh plugin --profile dsh-tui add -w /path/to/dsh-tui-theme
|
|
43
60
|
```
|
|
44
61
|
|
|
45
62
|
重启 dsh-TUI 后插件自动把三套主题复制进 `~/.dsh-tui/themes/`(**仅缺失时复制,绝不覆盖你已有的同名文件**),然后:
|
|
@@ -65,7 +82,19 @@ dsh plugin --profile dsh-tui add -w github:<你的用户名>/dsh-tui-theme
|
|
|
65
82
|
|
|
66
83
|
三项装饰全关时状态行整体消失。另有仅 profile 层的开关(`cordis.patch.yml`,不出现在 /settings):`autoInstallThemes`、`statusEnabled`。
|
|
67
84
|
|
|
68
|
-
|
|
85
|
+
## 受宿主限制、目前无法定制的部分
|
|
86
|
+
|
|
87
|
+
以下元素的颜色/形态由 dsh-TUI 宿主**硬编码**,不读取任何主题键,主题 JSON 与插件接缝都覆盖不到(dsh-TUI 0.9.0 实测):
|
|
88
|
+
|
|
89
|
+
| 元素 | 现状 | 位置(宿主源码) |
|
|
90
|
+
| --- | --- | --- |
|
|
91
|
+
| 输入框 ❯ 提示符 | 默认态无颜色参数(终端默认前景色,模型工作时变暗);最高推理档充能动画用**写死的蓝色 ramp**(深色端 `#82B9FF` / 浅色端 `#1E5FEB`) | `EffortChargeGlyph.tsx`、`trajectory/effortIgnition.ts` |
|
|
92
|
+
| 底栏上下文进度条分段色 | system / prompt / assistant / thinking / tools 五段为**写死的藏青→品牌蓝系**(`#22305F`→`#5A7CFF`),永远不随主题变化 | `screens/StatusMetrics.ts` |
|
|
93
|
+
| 进度条空余段配色 | 宿主按 `themeName === 'light'` **字符串比较**取浅色配色——自定义浅色主题(如 pink-day)不等于 `'light'`,会拿到深色空余段,在浅色终端上偏深 | `screens/StatusLine.tsx` |
|
|
94
|
+
| 状态行文字颜色 | 插件状态行(tuiStatus)由宿主统一以**无色 + 终端 dim** 渲染,插件无法指定颜色(✿ 行因此继承终端默认前景色) | `screens/Chat.tsx` |
|
|
95
|
+
| 主界面组件与布局 | 顶栏像素鲸鱼、工具卡、输入框等宿主组件不可被插件替换或改布局——平台规则(内建优先,无组件替换接缝);主题能碰的只有颜色层 | 宿主架构约定 |
|
|
96
|
+
|
|
97
|
+
这些都需要上游 dsh-TUI 修改(例如:把充能色/进度条分段色接入主题键、空余段判断改用 `isLightThemeActive()`)。上游修复前,任何社区主题包都受同样约束。
|
|
69
98
|
|
|
70
99
|
## 卸载
|
|
71
100
|
|
|
@@ -86,5 +115,5 @@ npm run verify # 沙盒测试(临时 HOME + 伪造 TTY,不碰
|
|
|
86
115
|
|
|
87
116
|
## 兼容性
|
|
88
117
|
|
|
89
|
-
- dsh-TUI
|
|
118
|
+
- **dsh-TUI 版本下限:0.8.8**(全功能,含状态行与设置面板;0.9.0 实测)。更旧的宿主缺 `dsh-tui-extensions` 扩展面时,插件自动降级为“仅安装三套主题 + 背景跟随”,不报错。
|
|
90
119
|
- Node `^22.19 || >=24`,纯 ESM,MIT。
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-tui-theme",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.1",
|
|
4
4
|
"description": "Sakura-pink themes for dsh-TUI with terminal-background auto-follow (pink-day/pink-night), a blossom status line, and a /settings section. No shortcuts, no commands.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "lib/types/index.js",
|
|
@@ -16,6 +16,7 @@
|
|
|
16
16
|
"files": [
|
|
17
17
|
"lib",
|
|
18
18
|
"themes",
|
|
19
|
+
"docs",
|
|
19
20
|
"cordis.patch.yml"
|
|
20
21
|
],
|
|
21
22
|
"engines": {
|