
omdsh-dev/dsh-genui
11313最近提交 2026年8月15日
dsh-genui DSH 插件
dsh-genui 是一个 DSH 插件,让模型在回答中直接输出交互式 UI 组件。它支持 30 多种组件(卡片、图表、表格、表单、测验等),并随着模型流式输出即时渲染。插件通过两种渲染通道(注册表和 DOM)兼容所有 DSH 构建版本,并内置本地优先的交互(如评分、状态持久化)以及对错误规格的自愈能力。
如何安装 dsh-genui DSH 插件
dsh plugin --profile web add git+https://github.com/omdsh-dev/dsh-genui.git复制不会执行命令。安装 dsh-genui DSH 插件前请核对仓库和版本。
dsh-genui DSH 插件数据来源
dsh-genui DSH 插件快照日期:2026年8月16日
discovered
dsh-genui DSH 插件能做什么
- 回答即 UI:组件随模型输出流式渲染,无需等待完整消息。
- 30 多种交互组件:卡片、表格、图表、表单、选项卡、手风琴、文件树、时间线、差异对比等。
- 函数绘图:支持实时参数滑块和自动动画。
- 测验本地评分:得分、每题正误和解释立即显示,无需模型往返。
- 状态持久化:答案、锁定状态和输入值在刷新或重启后恢复。
- 自愈机制:错误规格静默丢弃,图表自动修复,恶意规格不会导致 UI 崩溃。
dsh-genui DSH 插件适合哪些场景
- 实时数据仪表盘展示(如月收入统计与趋势图)。
- 交互式图表分析:拖动滑块调整参数,实时查看变化。
- 在线测验即时评分并支持重试。
- 表单交互:填写字段后提交给模型,无需失焦。
- 创建持久会话面板,用于持续的工具输出。
dsh-genui DSH 插件适合谁
- 希望模型提供更丰富交互式回答的 DSH 用户。
- 需要从模型响应快速原型化数据驱动 UI 的开发者。
dsh-genui DSH 插件的限制
- 需要安装 DSH(任意构建版本)并确保系统 PATH 中包含 pnpm。
- 模型必须输出 dsh-ui 格式的 JSON 围栏;新会话可能需要提示或重启才能触发。
- 部分旧版 DSH 可能缺少注册表扩展点,会回退到 DOM 通道(可工作但可能产生控制台警告)。
- 按需加载的资产(mermaid、three.js)首次使用时需要网络;离线或慢速连接可能延迟渲染。
dsh-genui DSH 插件的仓库 README 摘录
以下文字摘自 dsh-genui DSH 插件的上游仓库 omdsh-dev/dsh-genui 的 README,版权归原作者,仅作引用。
**English** · [简体中文](./README.zh-CN.md) </div> > Give the model's answers a face — the text is still there, and an interactive UI is already live. > > 🔌 Ecosystem: the repo carries the `#dsh` · `#dsh-plugin` topics — welcome to be listed by @dsh-plugin. The model no longer just answers in text. Install this plugin, ask "how are this month's orders doing", and it renders a **clickable data panel** right inside the answer as it analyzes: watch trends, drag sliders, hit refresh — and the model actually responds. <div align="center"> https://github.com/user-attachments/assets/f5db33ec-7471-4d4a-a85b-79c9962ab4ef </div> <p align="center"> <img src="./assets/showcase-panel.png" width="92%" alt="Real rendering: an interactive monitoring panel"> <br><em>Real output: an interactive monitoring panel rendered by the model (click "refresh" and it regenerates the data)</em> </p> > Player won't load? [Download the mp4](./assets/demo.mp4). Four-act demo script: [demo-prompts.md](./demo-prompts.md). --- ## ⚠️ Read this first: dual-channel rendering (works with any dsh build) The plugin ships **two rendering channels** and picks one automatically at startup — no dependency on a spec
阅读完整 README仓库许可: MIT
dsh-genui DSH 插件常见问题
插件已安装,但 dsh-ui 围栏仍然显示为代码块,怎么办?
首先检查你的 DSH 构建版本是否包含 fence-registry 扩展点(较新版本)。如果没有,插件会回退到 DOM 通道,应该也能正常工作。确保你运行 `dsh plugin --profile web list` 能看到插件已列出。然后重启 DSH web 并强制刷新浏览器(Cmd+Shift+R)。如果仍然显示为代码,尝试提示模型“用 dsh-ui 输出”。
安装 dsh-genui 后,渲染 dsh-ui 围栏时聊天界面变空白,如何修复?
这通常是因为 DSH 版本过旧。请更新 DSH 到最新版本,然后重新安装插件。插件需要主机端具备一定程度的渲染管道支持。
如何让模型自动输出 dsh-ui 围栏?
安装插件并重启 DSH 后,模型会学会使用 dsh-ui 格式。如果它没有自动输出,你可以在提示中明确说“用 dsh-ui 输出”。高级用户可以将 SKILL.md 复制到 ~/.dsh/skills/genui/ 来增强模型的能力。
我需要安装 pnpm 吗?看到提示“pnpm not found on PATH”。
是的,`dsh plugin` 命令需要 pnpm。你可以通过 `corepack enable`(如果你有 Node.js)或 `npm i -g pnpm` 来安装。安装后打开一个新的终端,确认 `pnpm -v` 能输出版本号,然后插件安装就可以正常进行。
我可以在本地开发中使用 dsh-genui 吗(link 模式)?
可以。克隆仓库后,运行 `pnpm install`,然后使用 `dsh plugin --profile web add link:$PWD` 从本地目录安装插件。不过对于生产环境,建议使用 git URL 形式以确保所有依赖正确安装。