Foreword¶
In DSH plugin scenarios, models often need to output structured interface content: charts, KPI cards, tables, forms, and dashboards. If the model only outputs text or code, the frontend has to parse, render, and handle interactions itself; if extra nested model calls are introduced, the workflow becomes longer.
The idea behind dsh-valuz-genui is to provide the model with a generate_ui tool, allowing it to generate A2UI v0.9.1 documents, which the browser then renders as an interactive interface within the chat. The following sections introduce its positioning, capabilities, installation methods, configuration options, and known limitations.
What is this¶
dsh-valuz-genui is a DeepSeek Harness plugin maintained by valuz-ai, licensed under MIT. It is a Web client plugin, with package.json declaring dsh.client.platform as web.
Its core value is that the model generates UI in a single model turn, the browser renders it within the chat, and no nested model calls are initiated. It is based on valuz-genui core, utilizing the A2UI catalog, streaming sanitizer, and React renderer.
Core Capabilities¶
generate_ui Tool¶
The plugin provides the generate_ui tool to the model. The call format is:
generate_ui(messages, title?)
Where:
messages: An array of A2UI v0.9.1 message objects written by the model.createSurfaceappears first inmessages, followed byupdateComponents/updateDataModel.- Exactly one component has an
idofroot. titleis optional and serves as the short surface title.
In-Chat Rendering¶
The browser renders the A2UI document as an interactive interface within the chat, including:
- Charts;
- KPI cards;
- Tables;
- Forms;
- Dashboards.
Rendering occurs within the current chat context, not on an extra page or external panel.
Streaming Generation¶
As the model writes the generate_ui parameters, the browser streams and renders the already generated parts. The UI appears in real-time as the model’s own output, rather than waiting for the complete document to finish before displaying.
Interaction Feedback¶
User clicks or submissions on the rendered interface are returned to the model as ordinary user messages. The model can continue answering text based on these interactions, or call generate_ui again to generate an updated interface.
Validation and Replay¶
The generated document is validated and then persisted to tool/result.meta. On reload/replay, the plugin re-renders the surface based on that result.
A2UI document validation discards schema-invalid components rather than failing the entire surface.
Authoring Guide¶
The plugin provides an authoring guide to the model via system prompt and skill.
In hosts supporting skills, the full catalog can be loaded on demand; if no skill capability exists, or alwaysOnFullGuide: true is configured, the full catalog is retained in the system prompt.
Installation and Enabling¶
Basic Installation¶
Requirements:
Node.js >=22.19
Install the plugin into an existing profile that has models configured:
dsh plugin --profile web add @valuz/dsh-valuz-genui
The npm package carries pre-built lib/, so no build steps or allowBuilds entry are required.
Basic usage requires no extra configuration.
Post-Installation Verification¶
After installation, restart dsh web first, then perform a hard-refresh in the browser. Then ask the model to generate a chart or dashboard to confirm the surface appears normally in the chat.
Pinning an Unreleased Commit¶
If you need to pin to an unreleased commit, you can use git installation instead:
dsh plugin --profile web add github:valuz-ai/dsh-valuz-genui#<commit-sha>
If pnpm version >= 10, the prepare build for git dependencies might need to be allowed to succeed.
Local Development¶
When developing locally, you can do the following:
git clone https://github.com/valuz-ai/dsh-valuz-genui.git
cd dsh-valuz-genui && pnpm install && pnpm run check
dsh plugin --profile web add /absolute/path/to/dsh-valuz-genui
Afterward, restart dsh web and hard-refresh as per the normal process.
Configuration¶
You can override the following configuration items in the profile’s cordis.patch.yml:
| Key | Default | Meaning |
|---|---|---|
maxDocumentBytes |
262144 |
Serialized A2UI document byte limit, inclusive. |
alwaysOnFullGuide |
false |
Whether to retain the full catalog in the system prompt instead of loading it on-demand via skills. |
If you want the full authoring guide to always appear in the system prompt, you can set:
alwaysOnFullGuide: true
Use Cases and Notes¶
Who is this for¶
This plugin is suitable for scenarios where you want the model to directly produce interactive UI in DSH chat, especially interfaces like charts, dashboards, forms, and tables that require user clicks or submissions.
Pre-Installation Notes¶
The plugin runs with the current dsh process permissions. It is recommended to check the source code and license before installation. The license in the currently verified materials is MIT.
Authoring Guide Cost¶
Always-on authoring guide incurs prompt costs.
If no skill capability exists, or alwaysOnFullGuide: true is set, the full catalog is kept in the system prompt. If the model guesses fields, components might be discarded.
Client Bundle¶
The client bundle is relatively large, approximately 3.5 MB.
Theme Bridging¶
Theme bridging is coarse: A2UI --va2-* tokens are not fully mapped to the host --dsw-alias-* scale.
Interaction Path¶
All interactions go through the model round-trip; there is currently no local-only handling.
PTC / Code Mode Preset¶
Surfaces do not appear under the PTC / Code Mode preset. Use the Standard preset, or mode: both.
Session Events¶
No plugin-owned session events. Temporary surface state is not part of the model-visible log.
Host Compatibility¶
Peer ranges are open, and the client bundle manually copies the dsh module list. Future host changes might affect loading.
The peerDependencies verified in the materials include:
@deepseek-ai/cordis ^4.0.1
multiple @deepseek-ai/dsh-* packages >=0.1.0-rc.5
React ^18.2.0 || ^19.0.0
The complete dependencies list is not fully provided in the currently verified materials; it is still recommended to check package.json in the repository before installation.
Links¶
- GitHub: https://github.com/valuz-ai/dsh-valuz-genui
- Directory page: The currently verified materials do not provide a directory page URL.