@straydragon/dsh-halcyon-uiux 0.0.0-stage → 0.1.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/LICENSE +21 -0
- package/README.md +109 -2
- package/THIRD_PARTY_NOTICES.md +94 -0
- package/assets/icon.svg +22 -0
- package/assets/locale/en.json +129 -0
- package/assets/locale/zh.json +129 -0
- package/cordis.patch.yml +21 -0
- package/dist/client.js +1439 -0
- package/dist/index.js +938 -0
- package/dist/types/config.d.ts +177 -0
- package/dist/types/identity.d.ts +8 -0
- package/dist/types/index.d.ts +11 -0
- package/dist/types/shared.d.ts +86 -0
- package/package.json +84 -5
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 L8ng
|
|
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,110 @@
|
|
|
1
|
-
#
|
|
1
|
+
# dsh-halcyon-uiux
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
美好易用的 [DeepSeek Harness](https://github.com/StrayDragon/deepseek-harness) Web GUI 行为插件。
|
|
4
|
+
每一个行为都可以在设置里独立开关,互不影响。
|
|
5
|
+
|
|
6
|
+
两个查看器行为共享同一套浮窗壳:
|
|
7
|
+
|
|
8
|
+
- **Mermaid 查看器** —— 聊天或侧栏文档里的 Mermaid 代码块悬浮即出现「查看图表」按钮,
|
|
9
|
+
点击后在可拖动的浮窗中本地渲染([pele](https://github.com/obsidianmd/pele)),
|
|
10
|
+
消息或文档中的原始代码块保持不变。
|
|
11
|
+
- **状态机查看器** —— 识别代码块里的 XState 机器(`createMachine`/`setup().createMachine`/`createStateConfig`),
|
|
12
|
+
以嵌套状态卡片展示结构,并可发事件模拟运行(内置 [XState v5](https://github.com/statelyai/xstate) 引擎)。
|
|
13
|
+
- **Mermaid 文件预览** —— 在右侧栏打开 `.mmd` / `.mermaid` 文件时直接渲染为图表,
|
|
14
|
+
可切换源码、复制、下载 SVG,或交给浮窗缩放查看。
|
|
15
|
+
|
|
16
|
+
## 行为
|
|
17
|
+
|
|
18
|
+
### 浮窗(共享)
|
|
19
|
+
|
|
20
|
+
| 开关 | 说明 |
|
|
21
|
+
| --- | --- |
|
|
22
|
+
| 启用缩放与平移 | 工具栏、滚轮、触控板捏合、拖动;双击复位(仅 Mermaid 视图) |
|
|
23
|
+
| 默认启用透明化 | 开启后新打开的浮窗直接使用毛玻璃背景,默认关闭;单个浮窗仍可随时用顶栏按钮切换 |
|
|
24
|
+
| 浮窗透明化的不透明度 | 顶栏「透明化」按钮的背景不透明度,默认 70%;调低更透,可看穿到底层聊天 |
|
|
25
|
+
|
|
26
|
+
### Mermaid 查看器
|
|
27
|
+
|
|
28
|
+
| 开关 | 说明 |
|
|
29
|
+
| --- | --- |
|
|
30
|
+
| 启用 Mermaid 查看器 | 总开关;关闭后立即隐藏触发按钮并收起浮窗 |
|
|
31
|
+
| 显示悬停触发按钮 | 悬停 Mermaid 代码块或复制按钮获得焦点时显示;默认开启 |
|
|
32
|
+
| 允许图表中的链接 | 仅 `http`/`https`/`mailto`,默认关闭 |
|
|
33
|
+
| 多窗口打开图表 | 开启后每次查看都开新浮窗(最多六个);关闭时单浮窗切换;顶栏按钮随时切换 |
|
|
34
|
+
|
|
35
|
+
### 状态机查看器
|
|
36
|
+
|
|
37
|
+
| 开关 | 说明 |
|
|
38
|
+
| --- | --- |
|
|
39
|
+
| 启用状态机查看器 | 总开关;关闭后不再探测机器代码块 |
|
|
40
|
+
| 多窗口打开状态机 | 与 Mermaid 的多窗口行为一致,独立开关 |
|
|
41
|
+
| 模拟方式 | 静态 / 确认后模拟(默认)/ 自动模拟 |- 判定规则:显式 `xstate` 语言标注,或任何代码块里能成功解析出机器配置(词法提取 `createMachine(...)` 的第一个对象字面量
|
|
42
|
+
并能构建出状态树;TypeScript 注解、注释、字符串均安全跳过)。解析失败则不当成机器,绝不猜测——运行时拼装的
|
|
43
|
+
`createMachine(variable)` 调用同样不识别。
|
|
44
|
+
- **事件图视图**:浮窗内可在卡片视图与扁平事件图(状态为节点、事件为箭头,dagre 分层布局)之间切换;
|
|
45
|
+
事件图里点击箭头标签即可发事件,活动状态高亮。
|
|
46
|
+
- **导出**:机器窗底栏可把解析出的机器复制为 Mermaid `stateDiagram-v2`(扁平点号 id)或 Graphviz DOT(compound 分簇)文本。
|
|
47
|
+
- **消息中的代码从不被当作脚本执行**。模拟通过把解析出的配置交给内置引擎重建:guard 视为通过、action 为空操作、
|
|
48
|
+
invoke 不运行、仅数字 `after` 延迟生效;面板会以徽标标注这些近似。
|
|
49
|
+
- 静态模式下点击事件做无副作用的结构推演(守卫一律通过);确认/自动模式下驱动真实 actor,
|
|
50
|
+
可看当前状态、context、事件日志,并随时重置。
|
|
51
|
+
|
|
52
|
+
### 侧栏文档
|
|
53
|
+
|
|
54
|
+
| 开关 | 说明 |
|
|
55
|
+
| --- | --- |
|
|
56
|
+
| 侧栏文档的代码块显示查看按钮 | 右侧栏文档里的 Mermaid / 状态机代码块与聊天一样悬停出按钮;默认开启 |
|
|
57
|
+
| 将 Mermaid 文件预览为图表 | 右侧栏打开 `.mmd` / `.mermaid` 直接渲染图表并可切源码;关闭后按纯文本打开 |
|
|
58
|
+
|
|
59
|
+
- 侧栏里的代码块归属所在文档:`←`/`→` 只在同一段文字里切换,不会跨到别的文件。
|
|
60
|
+
- 从侧栏打开的浮窗落在侧栏旁边的空闲一侧(取更宽的一边),被打开的文档保持可见;
|
|
61
|
+
屏幕放不下时回退到默认落点。
|
|
62
|
+
- 侧栏较窄时按钮会折叠成只剩图标,并避开文档工具栏自带的按钮,不互相遮挡。
|
|
63
|
+
- Mermaid 文件预览的工具栏提供「浮窗查看 / 复制源码 / 下载 SVG」;语法错误时显示
|
|
64
|
+
错误详情并可跳到源码。文件未读完(仍在加载)时先不渲染,读完后整体出图。
|
|
65
|
+
- 「打开方式」菜单仍可随时把它切回纯文本或代码高亮视图,选择会被记住。
|
|
66
|
+
|
|
67
|
+
- 覆盖同一条消息内的所有 Mermaid 代码块(含用户/工具输出),浮窗内可用 `←`/`→` 切换。
|
|
68
|
+
- 非模态浮窗,无遮罩;默认落在屏幕右 1/3 区域、垂直居中,宽高比 3:5;标题栏拖动、右下角自由调整大小(双击恢复默认位置与比例),支持页面内全屏(不接管浏览器 F11)。
|
|
69
|
+
- 顶栏「缩小到顶栏」按钮把浮窗折叠成只剩标题栏,再点「展开浮窗」恢复原尺寸;折叠时保持拖动的横向位置与宽度。
|
|
70
|
+
- 顶栏「透明化」按钮切换毛玻璃背景(`backdrop-filter` 模糊),对当前浮窗立即生效;按钮高亮表示已开启,再点恢复不透明。设置里可让新浮窗默认透明化。
|
|
71
|
+
- 顶栏「定位」按钮会滚动回聊天中的代码块并柔和闪烁提示;多个浮窗点击即置顶,快捷键作用于最上层窗口。
|
|
72
|
+
- 图表里的文字可以直接用鼠标拖动选中并复制(双击选词);缩放后同样有效——在文字上拖动是选择,在空白处拖动是平移,平移时不会误选文字。
|
|
73
|
+
- 渲染在本地完成,不发起任何网络请求;消息仍在流式输出时可「重新读取源码」。
|
|
74
|
+
- 快捷键:聚焦复制按钮后 `Alt+Enter` 打开;`Esc` 先展开折叠的浮窗,再退出全屏/源码,最后关闭浮窗。
|
|
75
|
+
|
|
76
|
+
## 安装
|
|
77
|
+
|
|
78
|
+
从 npm 安装:
|
|
79
|
+
|
|
80
|
+
```sh
|
|
81
|
+
dsh plugin --profile <profile> add @straydragon/dsh-halcyon-uiux
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
也可以在 Harness 的插件管理中安装本包。从源码打包(构建产物已含浏览器端打包):
|
|
85
|
+
|
|
86
|
+
```sh
|
|
87
|
+
just check # typecheck + build + smoke
|
|
88
|
+
just pack # 产出可安装的 bundle
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
## 开发
|
|
92
|
+
|
|
93
|
+
```sh
|
|
94
|
+
bun install
|
|
95
|
+
just check
|
|
96
|
+
bun test
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
- `src/`:Host 半部(配置 schema)与 `src/client/`(浏览器半部)。
|
|
100
|
+
- 浏览器端产物是单文件 IIFE,经 DSH module loader 声明加载;
|
|
101
|
+
React 复用宿主副本,`pele`、`xstate`、`@dagrejs/dagre` 被内联打包。
|
|
102
|
+
- 状态机数据流:`src/client/xstate/source.ts`(词法提取)→ `ir.ts`(归一化 IR + 静态推演)→
|
|
103
|
+
`engine.ts`(v5 引擎重建,版本差异收敛在此)→ `view.tsx`(嵌套卡片渲染)。
|
|
104
|
+
- 交互均通过官方 slot(`shell.overlay`、`settings.section`、`sidebar.right.tab.document`),
|
|
105
|
+
不向 `document.body` 追加节点。Mermaid 文件预览经 `ctx.inject(['documentPreviews'], …)`
|
|
106
|
+
可选注册:profile 里没有侧栏文档预览服务时该特性静默不启用,不影响其余行为。
|
|
107
|
+
|
|
108
|
+
## License
|
|
109
|
+
|
|
110
|
+
MIT。第三方许可见 [THIRD_PARTY_NOTICES.md](./THIRD_PARTY_NOTICES.md)。
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
# Third-party notices
|
|
2
|
+
|
|
3
|
+
This package bundles the following third-party code into `dist/client.js`.
|
|
4
|
+
|
|
5
|
+
## XState
|
|
6
|
+
|
|
7
|
+
MIT License
|
|
8
|
+
|
|
9
|
+
Copyright (c) 2025 Stately.ai, Inc.
|
|
10
|
+
|
|
11
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
12
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
13
|
+
in the Software without restriction, including without limitation the rights
|
|
14
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
15
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
16
|
+
furnished to do so, subject to the following conditions:
|
|
17
|
+
|
|
18
|
+
The above copyright notice and this permission notice shall be included in all
|
|
19
|
+
copies or substantial portions of the Software.
|
|
20
|
+
|
|
21
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
22
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
23
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
24
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
25
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
26
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
27
|
+
SOFTWARE.
|
|
28
|
+
|
|
29
|
+
## @dagrejs/dagre
|
|
30
|
+
|
|
31
|
+
MIT License
|
|
32
|
+
|
|
33
|
+
Copyright (c) 2026 Dagre Team
|
|
34
|
+
|
|
35
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
36
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
37
|
+
in the Software without restriction, including without limitation the rights
|
|
38
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
39
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
40
|
+
furnished to do so, subject to the following conditions:
|
|
41
|
+
|
|
42
|
+
The above copyright notice and this permission notice shall be included in all
|
|
43
|
+
copies or substantial portions of the Software.
|
|
44
|
+
|
|
45
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
46
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
47
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
48
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
49
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
50
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
51
|
+
SOFTWARE.
|
|
52
|
+
|
|
53
|
+
## Pele
|
|
54
|
+
|
|
55
|
+
MIT License
|
|
56
|
+
|
|
57
|
+
Copyright (c) 2026 kepano
|
|
58
|
+
|
|
59
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
60
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
61
|
+
in the Software without restriction, including without limitation the rights
|
|
62
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
63
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
64
|
+
furnished to do so, subject to the following conditions:
|
|
65
|
+
|
|
66
|
+
The above copyright notice and this permission notice shall be included in all
|
|
67
|
+
copies or substantial portions of the Software.
|
|
68
|
+
|
|
69
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
70
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
71
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
72
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
73
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
74
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
75
|
+
SOFTWARE.
|
|
76
|
+
|
|
77
|
+
---
|
|
78
|
+
|
|
79
|
+
The reset icon from Pele's zoom controls is "rotate-ccw" from Lucide v1.14.0
|
|
80
|
+
(https://lucide.dev), under the ISC License:
|
|
81
|
+
|
|
82
|
+
Copyright (c) 2026 Lucide Icons and Contributors
|
|
83
|
+
|
|
84
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
|
85
|
+
purpose with or without fee is hereby granted, provided that the above
|
|
86
|
+
copyright notice and this permission notice appear in all copies.
|
|
87
|
+
|
|
88
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
|
89
|
+
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
|
90
|
+
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
|
91
|
+
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
|
92
|
+
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
|
93
|
+
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
|
94
|
+
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
package/assets/icon.svg
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64" role="img" aria-label="Halcyon UI/UX">
|
|
2
|
+
<defs>
|
|
3
|
+
<linearGradient id="bg" x1="8" y1="6" x2="56" y2="58" gradientUnits="userSpaceOnUse">
|
|
4
|
+
<stop stop-color="#16233a"/>
|
|
5
|
+
<stop offset="1" stop-color="#0b1220"/>
|
|
6
|
+
</linearGradient>
|
|
7
|
+
<linearGradient id="line" x1="16" y1="16" x2="49" y2="49" gradientUnits="userSpaceOnUse">
|
|
8
|
+
<stop stop-color="#8ee7c4"/>
|
|
9
|
+
<stop offset="1" stop-color="#6eb7ff"/>
|
|
10
|
+
</linearGradient>
|
|
11
|
+
</defs>
|
|
12
|
+
<rect width="64" height="64" rx="15" fill="url(#bg)"/>
|
|
13
|
+
<rect x="1" y="1" width="62" height="62" rx="14" fill="none" stroke="#3c506f" opacity=".7"/>
|
|
14
|
+
<g fill="none" stroke="url(#line)" stroke-width="2.6" stroke-linecap="round" stroke-linejoin="round">
|
|
15
|
+
<rect x="12" y="12" width="18" height="12" rx="3"/>
|
|
16
|
+
<rect x="35" y="40" width="17" height="12" rx="3"/>
|
|
17
|
+
<rect x="35" y="12" width="17" height="12" rx="3"/>
|
|
18
|
+
<path d="M30 18h5M21 24v10a4 4 0 0 0 4 4h10M43.5 24v16"/>
|
|
19
|
+
</g>
|
|
20
|
+
<circle cx="21" cy="18" r="2" fill="#f7d58b"/>
|
|
21
|
+
<circle cx="43.5" cy="46" r="2" fill="#8ee7c4"/>
|
|
22
|
+
</svg>
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
{
|
|
2
|
+
"meta": {
|
|
3
|
+
"title": "Halcyon UI/UX",
|
|
4
|
+
"description": "Thoughtful UI/UX behavior for the DeepSeek Harness Web GUI: floating viewers for Mermaid diagrams and XState machines in chat and sidebar documents, plus a Mermaid file preview."
|
|
5
|
+
},
|
|
6
|
+
"section.title": "Halcyon-UIUX",
|
|
7
|
+
"section.intro": "Small, switchable behaviors that make the Web GUI calmer to read and easier to navigate.",
|
|
8
|
+
"section.loading": "Loading settings…",
|
|
9
|
+
"section.saved": "Saved",
|
|
10
|
+
"section.saving": "Saving…",
|
|
11
|
+
"section.error": "Could not save",
|
|
12
|
+
"section.readonly": "This configuration is read-only.",
|
|
13
|
+
"section.panels.title": "Floating windows",
|
|
14
|
+
"section.panels.zoom": "Enable zoom and pan",
|
|
15
|
+
"section.panels.zoom.hint": "Use the toolbar, plain mouse wheel, trackpad pinch, or drag inside the diagram. Double-click resets the view.",
|
|
16
|
+
"section.panels.defaultTranslucent": "Start windows translucent",
|
|
17
|
+
"section.panels.defaultTranslucent.hint": "On: new floating windows open with the glass background already on. The title-bar translucency button still toggles each window on its own.",
|
|
18
|
+
"section.panels.opacity": "Translucent background opacity",
|
|
19
|
+
"section.panels.opacity.hint": "How much of the panel background stays opaque when the title-bar translucency button is on. Default 70%; lower is more see-through.",
|
|
20
|
+
"section.behavior.mermaid.title": "Mermaid viewer",
|
|
21
|
+
"section.behavior.mermaid.description": "Render Mermaid code blocks in chat in a draggable floating window. The original source block stays in the message.",
|
|
22
|
+
"section.behavior.mermaid.master": "Enable Mermaid viewer",
|
|
23
|
+
"section.behavior.mermaid.master.hint": "Turning this off hides the trigger and closes the viewer immediately. Your settings stay saved.",
|
|
24
|
+
"section.behavior.mermaid.codeButton": "Show the hover trigger",
|
|
25
|
+
"section.behavior.mermaid.codeButton.hint": "A small \"View diagram\" chip appears beside the block's language label. It also appears when the copy button receives keyboard focus.",
|
|
26
|
+
"section.behavior.mermaid.allowLinks": "Allow links in diagrams",
|
|
27
|
+
"section.behavior.mermaid.allowLinks.hint": "Links use http, https, and mailto only. Leave this off if you open diagrams from untrusted sources.",
|
|
28
|
+
"section.behavior.mermaid.multiInstance": "Open each diagram in its own window",
|
|
29
|
+
"section.behavior.mermaid.multiInstance.hint": "On: every view opens a new floating window (up to six). Off: one window switches its content. The title-bar button toggles this anytime.",
|
|
30
|
+
"section.behavior.xstate.title": "State-machine viewer",
|
|
31
|
+
"section.behavior.xstate.description": "Detect XState machines in chat code blocks, show their nested state structure in a floating window, and simulate events. Parsing happens locally; message code is never executed as a script.",
|
|
32
|
+
"section.behavior.xstate.master": "Enable state-machine viewer",
|
|
33
|
+
"section.behavior.xstate.master.hint": "Off: machine code blocks are no longer detected. Windows already open stay.",
|
|
34
|
+
"section.behavior.xstate.multiInstance": "Open each machine in its own window",
|
|
35
|
+
"section.behavior.xstate.multiInstance.hint": "On: every view opens a new floating window (up to six). Off: one window switches its content.",
|
|
36
|
+
"section.behavior.xstate.execution": "Simulation tier",
|
|
37
|
+
"section.behavior.xstate.execution.hint": "Static: structure only, clicked events are walked without side effects. Confirm: the static graph loads first; simulation starts after you press run. Auto: simulation starts when the window opens. Simulation rebuilds the machine with a bundled engine; function bodies never run.",
|
|
38
|
+
"section.behavior.xstate.execution.off": "Static",
|
|
39
|
+
"section.behavior.xstate.execution.confirm": "Confirm to simulate",
|
|
40
|
+
"section.behavior.xstate.execution.auto": "Simulate automatically",
|
|
41
|
+
"section.preview": "Try the viewer",
|
|
42
|
+
"section.preview.hint": "Opens a sample diagram in the floating window, using the current settings.",
|
|
43
|
+
"section.preview.xstate.hint": "Opens a sample state machine in the floating window, using the current settings.",
|
|
44
|
+
"section.preview.xstate.action": "Open sample machine",
|
|
45
|
+
"trigger.label": "View diagram",
|
|
46
|
+
"trigger.open": "Open Mermaid diagram",
|
|
47
|
+
"trigger.hint": "Open in a floating window",
|
|
48
|
+
"trigger.xstate.label": "View machine",
|
|
49
|
+
"trigger.xstate.open": "Open the state-machine viewer",
|
|
50
|
+
"panel.title": "Mermaid",
|
|
51
|
+
"panel.xstate.title": "State machine",
|
|
52
|
+
"panel.close": "Close viewer",
|
|
53
|
+
"panel.zoomIn": "Zoom in",
|
|
54
|
+
"panel.zoomOut": "Zoom out",
|
|
55
|
+
"panel.fit": "Fit to window",
|
|
56
|
+
"panel.fullscreen": "In-page fullscreen",
|
|
57
|
+
"panel.exitFullscreen": "Exit fullscreen",
|
|
58
|
+
"panel.collapse": "Collapse to title bar",
|
|
59
|
+
"panel.expand": "Expand window",
|
|
60
|
+
"panel.translucent": "Translucent ({opacity}% background)",
|
|
61
|
+
"panel.opaque": "Restore opaque background",
|
|
62
|
+
"panel.copySource": "Copy source",
|
|
63
|
+
"panel.copied": "Source copied",
|
|
64
|
+
"panel.copyFailed": "Copy failed",
|
|
65
|
+
"panel.downloadSvg": "Download SVG",
|
|
66
|
+
"panel.downloadFailed": "Download failed",
|
|
67
|
+
"panel.prev": "Previous diagram",
|
|
68
|
+
"panel.next": "Next diagram",
|
|
69
|
+
"panel.of": "{current} of {total}",
|
|
70
|
+
"panel.loading": "Rendering diagram…",
|
|
71
|
+
"panel.error": "This diagram could not be rendered.",
|
|
72
|
+
"panel.empty": "The code block is empty.",
|
|
73
|
+
"panel.retry": "Read the source again",
|
|
74
|
+
"panel.source": "Source",
|
|
75
|
+
"panel.sourceHint": "The message keeps the original code block.",
|
|
76
|
+
"panel.help": "Wheel to zoom · drag to pan · drag text to select · double-click to reset",
|
|
77
|
+
"panel.streamingHint": "If the message is still streaming, read the source again after it finishes.",
|
|
78
|
+
"panel.unknownType": "diagram",
|
|
79
|
+
"panel.resize": "Drag to resize · double-click to reset",
|
|
80
|
+
"panel.locate": "Scroll to the code block",
|
|
81
|
+
"panel.modeToMulti": "Switch to multi-window: every open creates a new panel",
|
|
82
|
+
"panel.modeToSingle": "Switch to single window: replace the content of one panel",
|
|
83
|
+
"xstate.loading": "Parsing the machine…",
|
|
84
|
+
"xstate.parseError": "No state machine could be parsed from this code.",
|
|
85
|
+
"xstate.empty": "The code block is empty.",
|
|
86
|
+
"xstate.static": "Static mode: no code runs, clicked events are structure-only walks",
|
|
87
|
+
"xstate.stopped": "Simulation stopped",
|
|
88
|
+
"xstate.run": "Run simulation",
|
|
89
|
+
"xstate.run.hint": "Rebuilds the machine from the parsed configuration and starts simulating; function bodies never run.",
|
|
90
|
+
"xstate.reset": "Reset simulation",
|
|
91
|
+
"xstate.state": "Current state",
|
|
92
|
+
"xstate.context": "context",
|
|
93
|
+
"xstate.log": "Event log",
|
|
94
|
+
"xstate.log.empty": "No events yet.",
|
|
95
|
+
"xstate.initial": "initial",
|
|
96
|
+
"xstate.final": "final",
|
|
97
|
+
"xstate.parallel": "parallel",
|
|
98
|
+
"xstate.history": "history",
|
|
99
|
+
"xstate.entry": "entry",
|
|
100
|
+
"xstate.exit": "exit",
|
|
101
|
+
"xstate.after": "after",
|
|
102
|
+
"xstate.guard": "guard",
|
|
103
|
+
"xstate.actions": "actions",
|
|
104
|
+
"xstate.invoke": "invoke",
|
|
105
|
+
"xstate.unresolved": "unresolved target",
|
|
106
|
+
"xstate.opaque": "expression",
|
|
107
|
+
"xstate.noEvents": "No events available in the current state.",
|
|
108
|
+
"section.behavior.mermaid.sample": "Open a Mermaid sample",
|
|
109
|
+
"section.behavior.xstate.sample": "Open an XState sample",
|
|
110
|
+
"panel.viewGraph": "Event-graph view",
|
|
111
|
+
"panel.viewCards": "Card view",
|
|
112
|
+
"panel.copyMermaid": "Copy Mermaid",
|
|
113
|
+
"panel.copyDot": "Copy DOT",
|
|
114
|
+
"panel.graphHelp": "Click an arrow or event label to fire a transition · the event graph is fixed; layout is automatic",
|
|
115
|
+
"section.behavior.sidebar.title": "Sidebar documents",
|
|
116
|
+
"section.behavior.sidebar.description": "Extend the viewers to documents opened in the right sidebar, such as Markdown files and Mermaid source files.",
|
|
117
|
+
"section.behavior.sidebar.codeBlocks": "Show the trigger in sidebar documents",
|
|
118
|
+
"section.behavior.sidebar.codeBlocks.hint": "Mermaid and state-machine code blocks inside sidebar documents get the same hover trigger as in chat. Their window opens beside the sidebar so the document stays visible.",
|
|
119
|
+
"section.behavior.sidebar.mermaidFile": "Preview Mermaid files as a diagram",
|
|
120
|
+
"section.behavior.sidebar.mermaidFile.hint": "Opening a .mmd or .mermaid file in the sidebar renders it as a diagram with a source toggle. Off: the file opens as plain text.",
|
|
121
|
+
"mermaidFile.title": "Mermaid diagram",
|
|
122
|
+
"mermaidFile.loading": "Reading the diagram source…",
|
|
123
|
+
"mermaidFile.rendering": "Rendering the diagram…",
|
|
124
|
+
"mermaidFile.empty": "This file is empty.",
|
|
125
|
+
"mermaidFile.error": "This file could not be rendered as a Mermaid diagram.",
|
|
126
|
+
"mermaidFile.viewSource": "View source",
|
|
127
|
+
"mermaidFile.viewDiagram": "View diagram",
|
|
128
|
+
"mermaidFile.renderAgain": "Render again"
|
|
129
|
+
}
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
{
|
|
2
|
+
"meta": {
|
|
3
|
+
"title": "Halcyon UI/UX",
|
|
4
|
+
"description": "为 DeepSeek Harness Web GUI 提供舒适、易用的界面行为:聊天与侧栏文档中的 Mermaid 图表、XState 状态机浮动查看器,以及 Mermaid 文件预览。"
|
|
5
|
+
},
|
|
6
|
+
"section.title": "Halcyon-UIUX",
|
|
7
|
+
"section.intro": "一些可以随时开关的小行为,让 Web GUI 更安静、更顺手。",
|
|
8
|
+
"section.loading": "正在读取设置…",
|
|
9
|
+
"section.saved": "已保存",
|
|
10
|
+
"section.saving": "保存中…",
|
|
11
|
+
"section.error": "保存失败",
|
|
12
|
+
"section.readonly": "当前配置为只读。",
|
|
13
|
+
"section.panels.title": "浮窗",
|
|
14
|
+
"section.panels.zoom": "启用缩放与平移",
|
|
15
|
+
"section.panels.zoom.hint": "可用工具栏、鼠标滚轮、触控板捏合或拖动图表操作,双击恢复视图。",
|
|
16
|
+
"section.panels.defaultTranslucent": "默认启用透明化",
|
|
17
|
+
"section.panels.defaultTranslucent.hint": "开启后新打开的浮窗直接使用毛玻璃背景;仍可用顶栏「透明化」按钮单独切换当前浮窗。",
|
|
18
|
+
"section.panels.opacity": "浮窗透明化的不透明度",
|
|
19
|
+
"section.panels.opacity.hint": "点顶栏「透明化」按钮时,浮窗背景保留的不透明度。默认 70%,数值越低越透明。",
|
|
20
|
+
"section.behavior.mermaid.title": "Mermaid 查看器",
|
|
21
|
+
"section.behavior.mermaid.description": "在可拖动的浮窗中渲染聊天里的 Mermaid 代码块,消息中的原始代码块会保留。",
|
|
22
|
+
"section.behavior.mermaid.master": "启用 Mermaid 查看器",
|
|
23
|
+
"section.behavior.mermaid.master.hint": "关闭后立即隐藏触发按钮并收起浮窗,已保存的设置不会丢失。",
|
|
24
|
+
"section.behavior.mermaid.codeButton": "显示悬停触发按钮",
|
|
25
|
+
"section.behavior.mermaid.codeButton.hint": "鼠标悬停在 Mermaid 代码块上时,语言标签旁显示「查看图表」。复制按钮获得键盘焦点时也会显示。",
|
|
26
|
+
"section.behavior.mermaid.allowLinks": "允许图表中的链接",
|
|
27
|
+
"section.behavior.mermaid.allowLinks.hint": "仅允许 http、https 和 mailto 链接。打开来源不可信的图表时建议关闭。",
|
|
28
|
+
"section.behavior.mermaid.multiInstance": "多窗口打开图表",
|
|
29
|
+
"section.behavior.mermaid.multiInstance.hint": "开启后每次查看都会打开新的浮窗(最多六个);关闭时在单个浮窗内切换图表。顶栏按钮可随时切换。",
|
|
30
|
+
"section.behavior.xstate.title": "状态机查看器",
|
|
31
|
+
"section.behavior.xstate.description": "识别聊天代码块里的 XState 状态机,在浮窗中展示嵌套状态结构,并可发事件模拟运行。解析在本地完成,不会把消息中的代码当作脚本执行。",
|
|
32
|
+
"section.behavior.xstate.master": "启用状态机查看器",
|
|
33
|
+
"section.behavior.xstate.master.hint": "关闭后不再探测状态机代码块,已打开的浮窗保留。",
|
|
34
|
+
"section.behavior.xstate.multiInstance": "多窗口打开状态机",
|
|
35
|
+
"section.behavior.xstate.multiInstance.hint": "开启后每次查看都会打开新的浮窗(最多六个);关闭时在单个浮窗内切换状态机。",
|
|
36
|
+
"section.behavior.xstate.execution": "模拟方式",
|
|
37
|
+
"section.behavior.xstate.execution.hint": "静态:只看结构,点击事件仅做无副作用的推演。确认:先看静态图,点「运行」后才启动真实模拟。自动:打开浮窗即开始模拟。模拟由内置引擎重建,源码中的函数不会被执行。",
|
|
38
|
+
"section.behavior.xstate.execution.off": "静态",
|
|
39
|
+
"section.behavior.xstate.execution.confirm": "确认后模拟",
|
|
40
|
+
"section.behavior.xstate.execution.auto": "自动模拟",
|
|
41
|
+
"section.preview": "试用查看器",
|
|
42
|
+
"section.preview.hint": "用当前设置打开一张示例图表。",
|
|
43
|
+
"section.preview.xstate.hint": "用当前设置打开一个示例状态机。",
|
|
44
|
+
"section.preview.xstate.action": "打开状态机示例",
|
|
45
|
+
"trigger.label": "查看图表",
|
|
46
|
+
"trigger.open": "打开 Mermaid 图表",
|
|
47
|
+
"trigger.hint": "在浮窗中查看",
|
|
48
|
+
"trigger.xstate.label": "查看状态机",
|
|
49
|
+
"trigger.xstate.open": "打开状态机查看器",
|
|
50
|
+
"panel.title": "Mermaid",
|
|
51
|
+
"panel.xstate.title": "状态机",
|
|
52
|
+
"panel.close": "关闭查看器",
|
|
53
|
+
"panel.zoomIn": "放大",
|
|
54
|
+
"panel.zoomOut": "缩小",
|
|
55
|
+
"panel.fit": "适应窗口",
|
|
56
|
+
"panel.fullscreen": "页面内全屏",
|
|
57
|
+
"panel.exitFullscreen": "退出全屏",
|
|
58
|
+
"panel.collapse": "缩小到顶栏",
|
|
59
|
+
"panel.expand": "展开浮窗",
|
|
60
|
+
"panel.translucent": "透明化(背景不透明度 {opacity}%)",
|
|
61
|
+
"panel.opaque": "恢复不透明",
|
|
62
|
+
"panel.copySource": "复制源码",
|
|
63
|
+
"panel.copied": "源码已复制",
|
|
64
|
+
"panel.copyFailed": "复制失败",
|
|
65
|
+
"panel.downloadSvg": "下载 SVG",
|
|
66
|
+
"panel.downloadFailed": "下载失败",
|
|
67
|
+
"panel.prev": "上一张图表",
|
|
68
|
+
"panel.next": "下一张图表",
|
|
69
|
+
"panel.of": "第 {current} / {total} 张",
|
|
70
|
+
"panel.loading": "正在渲染图表…",
|
|
71
|
+
"panel.error": "这张图表无法渲染。",
|
|
72
|
+
"panel.empty": "代码块是空的。",
|
|
73
|
+
"panel.retry": "重新读取源码",
|
|
74
|
+
"panel.source": "源码",
|
|
75
|
+
"panel.sourceHint": "消息中的原始代码块仍然保留。",
|
|
76
|
+
"panel.help": "滚轮缩放 · 拖空白平移 · 拖文字选中 · 双击复位",
|
|
77
|
+
"panel.streamingHint": "如果消息仍在生成,可以等生成结束后再重新读取源码。",
|
|
78
|
+
"panel.unknownType": "图表",
|
|
79
|
+
"panel.resize": "拖动调整大小 · 双击恢复默认",
|
|
80
|
+
"panel.locate": "定位到代码块",
|
|
81
|
+
"panel.modeToMulti": "切换为多窗口:每次打开新浮窗",
|
|
82
|
+
"panel.modeToSingle": "切换为单窗口:同一浮窗内切换内容",
|
|
83
|
+
"xstate.loading": "正在解析状态机…",
|
|
84
|
+
"xstate.parseError": "这段代码无法解析出状态机。",
|
|
85
|
+
"xstate.empty": "代码块是空的。",
|
|
86
|
+
"xstate.static": "静态模式:不执行代码,点击事件仅为结构推演",
|
|
87
|
+
"xstate.stopped": "模拟已停止",
|
|
88
|
+
"xstate.run": "运行模拟",
|
|
89
|
+
"xstate.run.hint": "从源码解析出的配置重建状态机并开始模拟;函数体不会执行。",
|
|
90
|
+
"xstate.reset": "重置模拟",
|
|
91
|
+
"xstate.state": "当前状态",
|
|
92
|
+
"xstate.context": "context",
|
|
93
|
+
"xstate.log": "事件日志",
|
|
94
|
+
"xstate.log.empty": "还没有事件。",
|
|
95
|
+
"xstate.initial": "初始",
|
|
96
|
+
"xstate.final": "终态",
|
|
97
|
+
"xstate.parallel": "并行",
|
|
98
|
+
"xstate.history": "历史",
|
|
99
|
+
"xstate.entry": "进入",
|
|
100
|
+
"xstate.exit": "退出",
|
|
101
|
+
"xstate.after": "延迟",
|
|
102
|
+
"xstate.guard": "条件",
|
|
103
|
+
"xstate.actions": "动作",
|
|
104
|
+
"xstate.invoke": "调用",
|
|
105
|
+
"xstate.unresolved": "未解析目标",
|
|
106
|
+
"xstate.opaque": "表达式",
|
|
107
|
+
"xstate.noEvents": "当前状态没有可触发的事件。",
|
|
108
|
+
"section.behavior.mermaid.sample": "打开 Mermaid 示例",
|
|
109
|
+
"section.behavior.xstate.sample": "打开 XState 示例",
|
|
110
|
+
"panel.viewGraph": "事件图视图",
|
|
111
|
+
"panel.viewCards": "卡片视图",
|
|
112
|
+
"panel.copyMermaid": "复制 Mermaid",
|
|
113
|
+
"panel.copyDot": "复制 DOT",
|
|
114
|
+
"panel.graphHelp": "点击箭头或事件标签触发转移 · 事件图不可拖动缩放,节点布局自动生成",
|
|
115
|
+
"section.behavior.sidebar.title": "侧栏文档",
|
|
116
|
+
"section.behavior.sidebar.description": "把查看器延伸到右侧栏打开的文档,例如 Markdown 文件和 Mermaid 源文件。",
|
|
117
|
+
"section.behavior.sidebar.codeBlocks": "侧栏文档的代码块显示查看按钮",
|
|
118
|
+
"section.behavior.sidebar.codeBlocks.hint": "右侧栏文档里的 Mermaid 与状态机代码块,和聊天里一样悬停即显示查看按钮。浮窗开在侧栏旁边,文档保持可见。",
|
|
119
|
+
"section.behavior.sidebar.mermaidFile": "将 Mermaid 文件预览为图表",
|
|
120
|
+
"section.behavior.sidebar.mermaidFile.hint": "在右侧栏打开 .mmd 或 .mermaid 文件时直接渲染为图表,并可切换到源码。关闭后按纯文本打开。",
|
|
121
|
+
"mermaidFile.title": "Mermaid 图表",
|
|
122
|
+
"mermaidFile.loading": "正在读取图表源码…",
|
|
123
|
+
"mermaidFile.rendering": "正在渲染图表…",
|
|
124
|
+
"mermaidFile.empty": "这个文件是空的。",
|
|
125
|
+
"mermaidFile.error": "这个文件无法渲染为 Mermaid 图表。",
|
|
126
|
+
"mermaidFile.viewSource": "查看源码",
|
|
127
|
+
"mermaidFile.viewDiagram": "查看图表",
|
|
128
|
+
"mermaidFile.renderAgain": "重新渲染"
|
|
129
|
+
}
|
package/cordis.patch.yml
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
- insert:
|
|
2
|
+
- id: dsh-halcyon-uiux
|
|
3
|
+
name: '@straydragon/dsh-halcyon-uiux'
|
|
4
|
+
config:
|
|
5
|
+
panels:
|
|
6
|
+
zoom: true
|
|
7
|
+
defaultTranslucent: false
|
|
8
|
+
panelOpacity: 70
|
|
9
|
+
behaviors:
|
|
10
|
+
mermaid:
|
|
11
|
+
enabled: true
|
|
12
|
+
codeButton: true
|
|
13
|
+
allowLinks: false
|
|
14
|
+
multiInstance: false
|
|
15
|
+
xstate:
|
|
16
|
+
enabled: true
|
|
17
|
+
multiInstance: false
|
|
18
|
+
execution: confirm
|
|
19
|
+
sidebar:
|
|
20
|
+
codeBlocks: true
|
|
21
|
+
mermaidFile: true
|