Skip to main content

How to use dsh-genui

Enables the DSH model to directly generate interactive charts, forms, statistical cards, and other UI elements in responses. Users can

This article is auto-derived from indexed fields (wiki / faq / compatibility_json), not freshly AI-generated.

This article is derived from the plugin's already-indexed fields (wiki / faq / compatibility_json / readme), not freshly generated by AI. Source field is noted at the end of each section.

Quick start

dsh-genui

— source: plugin_wiki.wiki_content

Install & verify

dsh plugin --profile web add @changfenhuang/dsh-genui

Run the command above in your DSH Web Profile. Then enable the plugin in the plugin list.

— source: plugins.install

Key points

  • Registry channel: when the host exposes the fence-registry extension point (newer dsh builds), fences register through the host's streaming render pipeline and behave seamlessly with the host;
  • Answer-as-UI: components are embedded in the reply and appear as they stream — no waiting for the whole message
  • 30+ components: cards, tables, charts, forms, tabs, accordions, file trees, timelines, diffs…
  • Function plots: plot draws curves; parameter sliders redraw in real time, with optional auto-animation
  • Quiz: quiz grades on click with explanation and retry; with action, the answer is also sent back to the model (grading stays local and instant)

— source: plugin_wiki.readme_en (fallback readme_raw)

FAQ

The fence renders as a regular code block, what should I do?

Check three things in order: whether the host dsh has the fence-registry extension point (if not, it will automatically fall back to the DOM channel), whether dsh plugin --profile web list can see this plugin, and finally restart dsh web and hard refresh (Cmd/Ctrl+Shift+R).

During installation it reports pnpm not found on PATH, how to solve?

dsh's plugin subcommand depends on pnpm. After running corepack enable or npm i -g pnpm to install, you must open a new terminal for PATH to take effect, confirm pnpm -v outputs something, then retry.

Installed but mermaid or 3D scene doesn't render?

These two engines are loaded on demand, and on first use they will fetch from /plugins/@omdsh-dev/dsh-genui/assets/*.js. First hard refresh the browser; if it still fails, remove and reinstall (dsh plugin --profile web remove @omdsh-dev/dsh-genui then add).

Model doesn't output dsh-ui fence, only returns text, what to do?

New sessions require restarting dsh web to take effect; or directly say "use dsh-ui to draw a statistics panel" when asking to remind the model.

Just cloned and there's no lib/ directory, can I use it directly?

No, lib/ is a build artifact. You need to first run pnpm install then pnpm run check (which will build automatically).

Can I use link: to install a just-cloned directory?

It's fine for daily iteration, but link mode won't automatically install the plugin's dependencies (mermaid/three/react), which will break the renderer. For normal installation, use the git URL form.

Will too many fence nodes be truncated?

Yes. Plugins have hard resource limits: maximum 200 nodes per fence, nested depth of 8 layers; excess parts will be silently discarded without crashing the interface.

How to uninstall this plugin?

Run dsh plugin --profile web remove @omdsh-dev/dsh-genui, then restart dsh web; the fence will naturally degrade to a regular code block and won't pollute existing sessions.

— source: plugin_wiki.faq_json

Compatibility

  • DSH: >=0.1.0-rc.6
  • Node: >=22.19.0

— source: plugin_wiki.compatibility_json

Pitfalls

Review the upstream repo before installing. This guide is auto-derived from indexed fields and may lag the latest release. If anything contradicts the official docs, treat the upstream source as authoritative.

— source: general rule