@changfenhuang/dsh-genui 0.9.1 → 0.9.2
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/CHANGELOG.md +5 -0
- package/README.md +10 -2
- package/README.zh-CN.md +10 -2
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.9.2] - 2026-08-24
|
|
4
|
+
### 文档
|
|
5
|
+
- 在中英文 README 中补充原生 `npm install @changfenhuang/dsh-genui` 命令,并明确它只添加 Node 依赖;安装并激活 DSH 插件仍使用 `dsh plugin add`。
|
|
6
|
+
- 修正 npm 包已经公开后仍把 404 解释为“尚未发布”的过时提示;产品站安装命令同步改为 npm 公开包。
|
|
7
|
+
|
|
3
8
|
## [0.9.1] - 2026-08-22
|
|
4
9
|
### 新增
|
|
5
10
|
- **编辑级 `diagram` 组件(diagram-design 移植,PR #9)**:白名单新增 `diagram` 节点——27 种 kind(architecture/flowchart/sequence/state/er/timeline/swimlane/quadrant/radar/loop 等)、正交连接器、语义 token 主题(light/dark/editorial 变体)、dotted-paper 底纹、Zone 分组(≤3 个虚线容器 + mono eyebrow 标签)、64px 节点排版与底部 Legend 色板条。复杂度预算由 guard 强制(节点/边/焦点上限),坐标取整 4px 网格、重复 id 自愈、主题色安全校验;`figcaption` 与 SVG `<title>` 分离 id,`aria-labelledby` 稳定指向 `<title>`。
|
package/README.md
CHANGED
|
@@ -96,7 +96,7 @@ Prerequisites — all required:
|
|
|
96
96
|
1. **dsh installed** (any open-source build works — the plugin picks its rendering channel at startup, see "dual-channel rendering" above)
|
|
97
97
|
2. **`pnpm` on your PATH**: the `dsh plugin` command depends on it. If missing: `corepack enable` (or `npm i -g pnpm`), then **open a new terminal** and confirm `pnpm -v` prints a version
|
|
98
98
|
|
|
99
|
-
Install (one command, all dependencies included):
|
|
99
|
+
Install and activate in DSH (one command, all dependencies included):
|
|
100
100
|
|
|
101
101
|
```sh
|
|
102
102
|
# Public npm package (works without an npm account)
|
|
@@ -105,6 +105,14 @@ dsh plugin --profile web add @changfenhuang/dsh-genui
|
|
|
105
105
|
dsh plugin --profile web add git+https://github.com/omdsh-dev/dsh-genui.git
|
|
106
106
|
```
|
|
107
107
|
|
|
108
|
+
To add it only as a Node dependency in an existing project:
|
|
109
|
+
|
|
110
|
+
```sh
|
|
111
|
+
npm install @changfenhuang/dsh-genui
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
> `npm install` only adds the dependency; it does not register the plugin with DSH. Use `dsh plugin add` above when installing it into DSH.
|
|
115
|
+
|
|
108
116
|
> ⚠️ **Don't use `link:` on a freshly cloned directory** — `link:` does not install the plugin's dependencies (mermaid / three / react), so the renderer will break. Use the git URL form above; reserve `link:` for local development iteration (see below).
|
|
109
117
|
|
|
110
118
|
### Verify the install in 60 seconds
|
|
@@ -207,7 +215,7 @@ The core render package stays light (≈110 KB min / 28 KB gzip); the mermaid, t
|
|
|
207
215
|
- **Rendering as a code block?** First check the browser console for `[genui] client active; fence-channel=registry|dom`. If absent, the client bundle was not activated even if its URL returns 200 — align the profile dependency, `package.json.name`, `cordis.patch.yml`, ModuleLoader id, and configured bundle name. If present, inspect the fence label/body; registry-less hosts automatically use the DOM channel.
|
|
208
216
|
- **Chat UI goes blank when rendering a dsh-ui fence?** Your dsh is too old — update dsh first, then reinstall the plugin.
|
|
209
217
|
- **`dsh: pnpm not found on PATH`?** Install pnpm, then **open a new terminal** and retry (`corepack enable` or `npm i -g pnpm`).
|
|
210
|
-
- **Stuck on git credentials / 404 during install?** The
|
|
218
|
+
- **Stuck on git credentials / 404 during install?** The repository and npm package are public and require no login. Run `npm view @changfenhuang/dsh-genui version` to verify the package name and public registry; if a newly published version still returns 404, retry shortly or use the GitHub install command above in the meantime.
|
|
211
219
|
- **Installed but scene3d/mermaid/echarts don't render?** The engines (mermaid / three / echarts) are no longer inlined in client.js — they load on demand the first time they're used (`/plugins/@changfenhuang/dsh-genui/assets/*.js`, hosted by the plugin's own HTTP routes). First restart dsh web + hard refresh (Cmd+Shift+R); still broken, remove and reinstall (`dsh plugin --profile web remove @changfenhuang/dsh-genui`, then add again). Hosts without the asset routes degrade to source/load-error hints — update dsh.
|
|
212
220
|
- **Model not outputting fences?** New sessions pick it up after a restart; or just say "output it with dsh-ui".
|
|
213
221
|
- **No lib/ after cloning?** Build it yourself: `pnpm install && pnpm run check`.
|
package/README.zh-CN.md
CHANGED
|
@@ -96,7 +96,7 @@ https://github.com/user-attachments/assets/f5db33ec-7471-4d4a-a85b-79c9962ab4ef
|
|
|
96
96
|
1. **dsh 已安装**(开源版任意构建均可——插件启动时自动选择渲染通道,见上文「双通道渲染」)
|
|
97
97
|
2. **`pnpm` 在 PATH 上**:`dsh plugin` 命令依赖它。没有就 `corepack enable`(或 `npm i -g pnpm`),然后**新开一个终端**,确认 `pnpm -v` 有输出
|
|
98
98
|
|
|
99
|
-
|
|
99
|
+
安装并在 DSH 中激活(一行命令,自动带上全部依赖):
|
|
100
100
|
|
|
101
101
|
```sh
|
|
102
102
|
# npm 公开包安装(无需 npm 账号)
|
|
@@ -105,6 +105,14 @@ dsh plugin --profile web add @changfenhuang/dsh-genui
|
|
|
105
105
|
dsh plugin --profile web add git+https://github.com/omdsh-dev/dsh-genui.git
|
|
106
106
|
```
|
|
107
107
|
|
|
108
|
+
如果只想把它作为 Node 依赖加入现有项目:
|
|
109
|
+
|
|
110
|
+
```sh
|
|
111
|
+
npm install @changfenhuang/dsh-genui
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
> `npm install` 只添加依赖,不会把插件注册到 DSH;在 DSH 中使用时仍应执行上面的 `dsh plugin add`。
|
|
115
|
+
|
|
108
116
|
> ⚠️ **别用 `link:` 装一个刚 clone 的目录**——`link:` 不会安装插件的依赖(mermaid / three / react),装完渲染器会挂。请用上面的 git URL 方式;只有本地开发迭代才用 link:(见下文)。
|
|
109
117
|
|
|
110
118
|
### 60 秒验证安装
|
|
@@ -207,7 +215,7 @@ dsh plugin --profile web add link:$PWD
|
|
|
207
215
|
- **显示成代码块?** 先在浏览器控制台找 `[genui] client active; fence-channel=registry|dom`。没有这行,即使 `client.js` 返回 200,也只是下载了文件、没有激活:请对齐网页配置依赖名、`package.json.name`、`cordis.patch.yml`、ModuleLoader id 和配置中的 bundle 名。出现这行后再查围栏标签/正文;宿主没有 registry 时会自动走 DOM 通道。
|
|
208
216
|
- **渲染 dsh-ui fence 时聊天界面白屏?** dsh 版本太旧——先更新 dsh 再重装插件。
|
|
209
217
|
- **`dsh: pnpm not found on PATH`?** 装 pnpm 后**新开终端**再试(`corepack enable` 或 `npm i -g pnpm`)。
|
|
210
|
-
- **安装时卡在 git 凭据/404?**
|
|
218
|
+
- **安装时卡在 git 凭据/404?** 仓库和 npm 包都是公开的,无需登录。先执行 `npm view @changfenhuang/dsh-genui version` 核对包名与公共仓库;若 npm 新版本刚发布仍返回 404,稍后重试,或暂时使用上面的 GitHub 安装命令。
|
|
211
219
|
- **装了但 scene3d/mermaid/echarts 不渲染?** 引擎(mermaid / three / echarts)不再内联进 client.js——它们在首次用到时按需加载(`/plugins/@changfenhuang/dsh-genui/assets/*.js`,插件自带 HTTP 路由托管)。先重启 dsh web + 硬刷新(Cmd+Shift+R);仍不渲染就卸掉重装(`dsh plugin --profile web remove @changfenhuang/dsh-genui` 后再 add)。旧版宿主缺少资产路由时会降级显示源码/加载失败提示,更新 dsh 即可。
|
|
212
220
|
- **模型不主动输出?** 重启后新会话生效;或直接说"用 dsh-ui 输出"。
|
|
213
221
|
- **clone 后没有 lib/?** `pnpm install && pnpm run check` 自己构建。
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@changfenhuang/dsh-genui",
|
|
3
3
|
"description": "GenUI for DeepSeek Harness: interactive UI components rendered inline in assistant replies via the ```dsh-ui fence — layout, charts, plots, forms, quizzes, mermaid, 3D scenes, and an action event loop back to the model. Ships the fence-teaching host plugin, the browser renderer (client half), and the genui skill.",
|
|
4
|
-
"version": "0.9.
|
|
4
|
+
"version": "0.9.2",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "lib/index.js",
|
|
7
7
|
"types": "lib/types/plugin/index.d.ts",
|