Moses14159/dsh-visualizer ↗★ 6

dsh-visualizer

在对话流中流式渲染图表与HTML组件 适合需要AI实时生成并直观展示SVG、HTML沙箱或ECharts图表的用户。

包名
dsh-visualizer
兼容性
待验证
Harness 依赖范围
^0.1.0-rc.8
Cordis 依赖范围
^4.0.1
版本
0.3.0
许可证
MIT
最近更新
2026年8月23日

同名包的其他仓库

安装

$npx -p @deepseek-ai/dsh dsh plugin --profile web add github:Moses14159/dsh-visualizer

Usage

After installing, just tell the model in the conversation:

  • Say "draw a chart with visualize" → the model calls visualize with a spec;
  • Say "write an SVG badge / HTML widget" → the model streams ```svg / ```html fences directly in the reply, and you see it render frame by frame as it generates;
  • The model can also pass a widget parameter to visualize to deliver a complete widget (validated, persisted, and replayable on the host).

Tool payloads

visualize takes exactly one of:

// Structured chart
{ "spec": {
    "kind": "bar",                    // bar | line | area | pie | scatter
    "title": "Shenzhen · 7-day temperature",
    "xAxis": ["Sat", "Sun", "Mon", "Tue", "Wed", "Thu", "Fri"],
    "yName": "°C",
    "series": [{ "name": "Max", "data": [32, 32, 30, 31, 29, 31, 32] }]
} }
// SVG / HTML widget
{ "widget": { "kind": "svg", "code": "…", "title": "Card title" } }

Streaming fence

```svg

  …rendered token by token…

```