DSH Plugins Marketplace

DSH Plugins

Plugins

/

Terminal & Clients

/

dsh-smart-ui

d

dsh-smart-ui

Manifest valid

Render interactive UI — comparisons, charts, and calculators — inside the conversation.

UI (client)hasBundlePatch

English | 简体中文

dsh-smart-ui

Structured UI cards for DSH conversations. The model calls one tool, ui_render, writes a JSON spec — and the page renders an interactive card: comparisons, charts, headline figures, ordered steps, tables, live calculators, unit conversions, flowcharts.

Answers are often structures: three or more things compared on shared criteria, a series of magnitudes, a handful of headline numbers, ordered steps, rows of records, arithmetic the user wants to redo with their own numbers. In plain text those cost tokens and read badly. This plugin hands the structure to a card and leaves the prose as the conclusion.

  • The model writes data, never HTML/JSX. The spec is plain JSON; it goes into the session log and redraws identically after a fork or a resume.
  • The card is a pure function of the tool arguments. Nothing is fetched from the host, so a reload or a resumed session gets the same card.
  • Light and dark both work. A spec only carries semantic tones (success, warn, …); the client resolves them to theme tokens, so the model never writes a literal color.

Card types

kindWhen to useMain fields
comparethree or more things compared on shared criteriacolumns, rows[{label, cells[]}]
charta series of magnitudes (bar), a trend (line), parts of one whole (pie / donut)series[{label, value, tone?, hint?}], variant, unit
statstwo to six headline figuresstats[{label, value, tone?, hint?}]
progressone ratio to feel at a glance — pass rate, quota usedvalue, max, label, unit, tone
stepsthree or more ordered stepssteps["text" | {text, detail?}]
tablerows and columns of recordscolumns, rows[][]
diagramboxes joined by arrows: flow, decision tree, hierarchy, dependency or class sketchnodes[{id, label, detail?, tone?}] + edges[{from, to, label?}] + layout, or raw mermaid
calculatorarithmetic the user will redo with their own numbers — bill split, tipmode: split | tip, fields[{label, value, min?, max?}]
unita quantity converted between unitsunits, factors?, from, to, value
noteone thing the reader must not misstext, tone

Every card also takes title (heading) and caption (footnote).

diagram has two forms: a structured nodes + edges list (compiled to a Mermaid flowchart; layout: "tree" draws a top-down hierarchy) or complete mermaid source (sequence, state machine, Gantt, ER, and the rest of the diagram family). Exactly one of the two.

How it works

the model writes a spec (plain JSON)
   ↓
index.js   registers the ui_render tool and one prompt section:
           validation, normalization, oversize errors back to the model
   ↓
client.js  renders the card in the tool.call.toolview slot
  • index.js is the host half: the tool schema, normalizeSpec and the Mermaid compilation all live here, so the session log stores exactly the diagram that was drawn.
  • client.js is the client half: compare / stats / steps / table / note / calculator / unit are plain React, progress is inline SVG, chart goes through ECharts, diagram through Mermaid.
  • The chart libraries are lazy chunks: client.echarts.js / client.mermaid.js are generated, loaded on first use, and never committed.

Install

Add this repo to your DSH profile dependencies — a local link: or a GitHub URL both work:

{
  "dependencies": { "dsh-smart-ui": "link:<absolute path>" },
  "dsh": { "profile": { "bundles": ["dsh-smart-ui"] } }
}

Insert the plugin line in the profile's cordis.patch.yml:

- insert:
    - id: smart-ui
      name: 'dsh-smart-ui'

Then install:

cd "$DSH_PROFILE_DIR"
pnpm install --no-frozen-lockfile

Build

The two chart chunks are generated and git-ignored. Build them after installing, or charts fall back to a plain-text summary:

pnpm install
node build-echarts.mjs     # writes client.echarts.js
node build-mermaid.mjs     # writes client.mermaid.js

The scripts wrap the npm dist files in DSH's module-loader envelope: ECharts takes its UMD exports branch (no global leak), and Mermaid's API is captured off globalThis before the global is deleted again.

Tests

node test/normalize.mjs      # spec normalizer self-check: happy path + guards, per kind
node test/echarts-chunk.mjs  # loads the generated chunk without a browser, asserts a usable ECharts
node test/render-svg.mjs     # ECharts SSR renders charts and flowcharts into test/out for inspection
node test/render-mermaid.mjs # renders the Mermaid diagram families headless into test/out-mermaid
node test/shot-mermaid.mjs   # Chrome screenshots (Mermaid labels are foreignObject HTML)

The last two look for Chrome / Edge (default Windows install paths).

Deliberate limits

LimitValueWhy
nodes per spec400 (apply(ctx, { maxNodes }))a runaway model cannot wedge the page
raw mermaid source12000 charsone card cannot swallow the page
diagram formsexactly onethe two paths can never disagree

Acknowledgments

Thanks to everyone who contributed to this project:

@windzxy @anyiba

License

MIT, see LICENSE.

This repo contains no chart-library code (the generated chunks are git-ignored); the build pulls them from npm: ECharts under Apache License 2.0, Mermaid under MIT.

Comments

Loading…

From the same category

dsh-TUI

by ccch1mneyyy

DSH 官方公众号收录的 TUI 补位插件:Claude Code 风,鲸鱼顶栏/实时状态/流式思考/双击 Esc 回滚/上下文进度+TPS。npm 一键装。 DSH official WeChat featured TUI plugin — Claude Code style: whale bar, live status, streaming thoughts, double-Esc rol

Terminal & ClientsManifest valid

★ 4.8k

↓ 11.9k/wk

MIT

TypeScript

Oct 18, 2026

dsh plugin --profile terminal add @deepseek-harness-tui/dsh-tui

by strukto-ai

The World's First Virtual Terminal for AI Agents

Terminal & ClientsManifest valid

★ 3.7k

↓ 374/wk

Apache-2.0

TypeScript

Oct 18, 2026

dsh plugin --profile agent add @struktoai/mirage-dsh

by bowenliang123

The best DeepSeek Harness plugin for context insight and management, with context dashboard / browser / sidebar and context command, for context statistics, composition, breakdown, evolution details,

Tools & CapabilitiesUI & ExperienceTerminal & ClientsManifest valid

★ 2.3k

↓ 52.1k/wk

Apache-2.0

TypeScript

Oct 18, 2026

dsh plugin --profile web add dsh-context

by huiliyi37

官方 DeepSeek Harness 的交互式终端 UI 插件:自研 ANSI 极简交互渲染、流式 Markdown/工具卡、16+ 主题、slash 命令与选择器、输入历史与本地偏好持久化、LSP 诊断、memory记忆,很丝滑的开发体验。

Terminal & ClientsManifest valid

★ 287

↓ 493/wk

Apache-2.0

TypeScript

Sep 30, 2026

dsh plugin --profile terminal add @huiliyi37/dsh-tianshu-tui

by Hilbert-beinghappy

面向 DeepSeek Harness 的 Claude Code 风格终端界面,支持 Windows、macOS 与 Linux,兼容透明终端、VS Code 主题和自定义配色。

Terminal & ClientsManifest valid

★ 196

↓ 108/wk

MIT

TypeScript

Oct 13, 2026

dsh plugin --profile web add seektty

by c3cvld7aag

富江DSH完美破甲|富江破甲 DSH 本地插件,内置提示词规则,支持 Windows 一键安装、环境自动准备与一键卸载,全中文使用说明。

Terminal & ClientsManifest valid

★ 121

JavaScript

Oct 3, 2026

dsh plugin --profile web add fujiang-armor