Moses14159/dsh-visualizer ↗★ 6

dsh-visualizer

DSH 外部插件:模型在对话流中流式生成 SVG/HTML Widget(```svg/```html 围栏逐 token 渲染于沙箱 iframe)与结构化图表(visualize 工具的 ChartSpec -> echarts)。复用已有 assistant/chunk + tool/result 事件,不改 DSH 源码。 适合需要AI实时生成并直观展示SVG、HTML沙箱或ECharts图表的用户。

패키지
dsh-visualizer
호환성
미검증
Harness peer 범위
^0.1.0-rc.8
Cordis peer 범위
^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…

```