@max-null/dsh-node-appearance 0.3.5 → 0.4.0
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 +12 -1
- package/docs/shots//344/274/232/350/257/235/351/235/242/346/235/277/346/210/252/345/233/276.png +0 -0
- package/docs/shots//346/217/220/351/227/256/345/215/241/347/211/207/346/210/252/345/233/276.png +0 -0
- package/docs/shots//347/233/256/346/240/207/350/257/246/346/203/205-/345/261/225/345/274/200.png +0 -0
- package/docs/shots//347/233/256/346/240/207/350/257/246/346/203/205-/346/212/230/345/217/240.png +0 -0
- package/docs/shots//350/256/276/347/275/256/351/241/265/346/210/252/345/233/276.png +0 -0
- package/lib/client.js +730 -152
- package/lib/client.js.map +1 -1
- package/lib/index.js +2 -0
- package/lib/types/client/ask-card.d.ts +19 -0
- package/lib/types/client/ask-card.d.ts.map +1 -0
- package/lib/types/client/ask-model.d.ts +92 -0
- package/lib/types/client/ask-model.d.ts.map +1 -0
- package/lib/types/client/goal-detail.d.ts +32 -0
- package/lib/types/client/goal-detail.d.ts.map +1 -0
- package/lib/types/client/index.d.ts.map +1 -1
- package/lib/types/client/palette.d.ts +1 -1
- package/lib/types/client/palette.d.ts.map +1 -1
- package/lib/types/client/settings-card.d.ts +18 -12
- package/lib/types/client/settings-card.d.ts.map +1 -1
- package/lib/types/index.d.ts +1 -0
- package/lib/types/index.d.ts.map +1 -1
- package/package.json +3 -4
package/README.md
CHANGED
|
@@ -10,6 +10,8 @@ This plugin belongs to the **`@max-null/*` family** — a set of plugins that to
|
|
|
10
10
|
|
|
11
11
|
- **节点着色**:工具调用、联网搜索、智能体调用、代码 / 指令执行、文件操作、任务 / 目标、指令节点(`/command`)、思考行(Think)——每种类别一个可配置颜色,左侧 3px 色条 + 淡色底,深 / 浅主题均可读。
|
|
12
12
|
- **工具级颜色覆盖**:任意工具名(如 `web_search`、`subagent`、`run_code`)可单独指定颜色,优先级高于类别色。
|
|
13
|
+
- **提问卡片**:`ask_user_question` 的卡片改为展示**当时给出的全部选项**,被选中的选项用 `ask` 类别色(默认蓝)反显并打勾。官方转录卡只保留已选答案,提问一旦结算就再也看不到其他选项 —— 本插件把选项读回来。
|
|
14
|
+
- **目标条详情**:官方目标条下方接一条**与它拼成同一张卡**的详情行(借待办卡片的折叠形态),把官方条上被 ellipsis 截断的目标展开成可读详情:完整目标、阶段、阻塞原因、自主轮次、目标标识。只读投影,不碰官方的编辑/暂停/清除,那四个按钮仍是官方在跑。
|
|
13
15
|
- **思考过程显示开关**:关闭后 Think 思考行前端隐藏(`display: none`),配置项与配色在同一张设置卡片里。
|
|
14
16
|
- **即时生效**:设置改动立即重绘会话,并持久化到 DSH 用户设置文档(`$DSH_HOME/settings.yaml`)。
|
|
15
17
|
|
|
@@ -19,6 +21,10 @@ This plugin belongs to the **`@max-null/*` family** — a set of plugins that to
|
|
|
19
21
|
|---|---|
|
|
20
22
|
|  |  |
|
|
21
23
|
|
|
24
|
+
| 提问卡片 | 目标条(折叠 / 展开) |
|
|
25
|
+
|---|---|
|
|
26
|
+
|  |   |
|
|
27
|
+
|
|
22
28
|
## 安装
|
|
23
29
|
|
|
24
30
|
```sh
|
|
@@ -49,6 +55,7 @@ node-appearance:
|
|
|
49
55
|
execute: '#f59e0b' # 代码 / 指令执行
|
|
50
56
|
file: '#22c55e' # 文件操作
|
|
51
57
|
task: '#ec4899' # 任务 / 目标
|
|
58
|
+
ask: '#65a30d' # 提问卡片
|
|
52
59
|
command: '#f97316' # 指令节点
|
|
53
60
|
thinking: '#c4b5fd' # 思考过程
|
|
54
61
|
context: '#8a9bb5' # 上下文注入
|
|
@@ -63,10 +70,14 @@ node-appearance:
|
|
|
63
70
|
- Host half 通过 `installSettingsSection` 注册 `node-appearance` settings namespace,插件配置作为 base 层。
|
|
64
71
|
- Browser half 绑定 `ctx.settingsScope`,把快照交给纯函数 `buildCss()` 生成 CSS,注入一个 `<style data-plugin-css="node-appearance/rules">` 标签;快照变化即重绘。
|
|
65
72
|
- 着色目标全部使用 DSH 会话 DOM 的稳定 data 属性(`data-chat-flow-kind` / `data-tool` / `data-variant`),不依赖任何 CSS Modules 哈希类名。
|
|
73
|
+
- 提问卡片是**接管**而非样式覆盖:`tool.call.toolview` 是 keyed slot,同一 key 只有最低 priority 的注册会渲染(DSH 的 slot 契约原话是 "a key the shipped composition already covers is replaced, not shared"),插件以 `priority: -1` 注册自己的 `ask_user_question` 视图,从调用参数里读回官方丢弃的 `options`。行外壳(24px 折叠行、running 扫光、Inspect 胶囊)与官方 `ToolRow` 逐项对齐,组件复用共享的 `ui-primitives`,locale 文案复用官方 `conversation` 字典。
|
|
74
|
+
- 目标详情折叠条是**并列追加**而非接管:`conversation.input.dock` 是 list 槽(官方占 `todo` order 0 / `goal` order 10 / `queue` order 20),插件以 `order: 11` 紧随官方目标条追加自己的条目,只读 `useProjection('goal')`。官方的 edit/pause/resume/clear 是 ui-goal 的注册者私有注入面(四个 Remote 动词 + 一个带竞态防护的 activation 订阅源),接管它们等于在本插件里再养一套会写会话数据的 RPC 客户端。
|
|
66
75
|
|
|
67
76
|
## 已知限制
|
|
68
77
|
|
|
69
78
|
- v0.1 不做运行态动画与节点折叠。
|
|
79
|
+
- 提问卡是接管式实现:组件来自共享 `ui-primitives`、业务字段只读调用与结果的 JSON,但官方 `ask_user_question` 的行外壳若变更,插件需同步。
|
|
80
|
+
- 提问卡高度随内容自适应、不做卡片内滚动;选项极多时由整条会话流承担滚动。
|
|
70
81
|
- 命令节点只有类别色(`command`),暂无命令名级配色。
|
|
71
82
|
- `toolColors` 按工具名精确匹配;DSH 工具名变更时旧条目静默失效(可在设置面板删除)。
|
|
72
83
|
|
|
@@ -75,7 +86,7 @@ node-appearance:
|
|
|
75
86
|
```sh
|
|
76
87
|
npm install
|
|
77
88
|
npm run typecheck # tsc
|
|
78
|
-
npm test # vitest(CSS 规则生成 + Config schema
|
|
89
|
+
npm test # vitest(CSS 规则生成 + Config schema + 提问卡派生)
|
|
79
90
|
npm run build # tsc 类型 + tsdown(lib/index.js + lib/client.js)
|
|
80
91
|
```
|
|
81
92
|
|
package/docs/shots//344/274/232/350/257/235/351/235/242/346/235/277/346/210/252/345/233/276.png
ADDED
|
Binary file
|
package/docs/shots//346/217/220/351/227/256/345/215/241/347/211/207/346/210/252/345/233/276.png
ADDED
|
Binary file
|
package/docs/shots//347/233/256/346/240/207/350/257/246/346/203/205-/345/261/225/345/274/200.png
ADDED
|
Binary file
|