Renders the final fenced card block of an answer as a typographic card, with card and article layouts, twelve block types and credited images.
Install
# from GitHub (first run asks for allowBuilds approval — follow the hint, retry)
dsh plugin --profile web add github:ninepoin4/dsh-rich-cards
Any plugin you install runs third-party code with your own permissions — it can read your files, use your credentials, and reach the network, and tool approvals don’t sandbox it. GitHub-sourced plugins also run build scripts at install time — pnpm blocks those until you allow them, so an install can stop with ERR_PNPM_GIT_DEP_PREPARE_NOT_ALLOWED or ERR_PNPM_IGNORED_BUILDS; dsh prints the exact key to add under allowBuilds in your profile’s pnpm-workspace.yaml, and the install works on the next run. Allowing a build is a trust decision: only install sources you trust, and pin a commit (github:owner/repo#sha).
README
This plugin publishes its README in Chinese only.
它长这样
安装
dsh plugin --profile <你的 profile> add link:/path/to/dsh-rich-cards
装完刷新窗口即可,卡片渲染在回答末尾,不用重启会话。
用法
模型会自己在合适的回答末尾写一个 card 围栏块:
```card
{
"title": "一句话答案",
"kicker": "分类 · 主题",
"lead": "导语",
"accent": "indigo",
"blocks": [
{"type": "paragraph", "text": "正文"}
]
}
```
也可以自己手写——渲染器只认 card 这个 info string,正文必须是合法 JSON。
配图也是这个约定的一部分:讲人物、地点、作品时先查一张真图(Windows 上用 curl 走维基图库接口),查到就配上 url + 说明 + 来源;两三次查不到就安静地不配图,不在正文里交代“接口被拦”“没找到配图”——缺图不是新闻。
| 块类型 | 作用 |
|---|---|
heading paragraph |
小节标题、正文段落 |
bullets steps chips |
要点、步骤、标签 |
stats |
2–4 个关键数字 |
kv |
左右对照的键值行 |
callout quote |
提示框(info / tip / warn)、引用 |
timeline |
带年份的事件线 |
image |
真实 URL + 说明 + 来源 |
divider |
分隔线 |
顶层还有 layout: "card" | "article"(article 去掉卡片外壳,按文章排版)、sources(底部来源标签)、footer。
原理
- 宿主端:往系统提示里加一段写作约定,教模型用围栏块收尾,不注册任何工具。
- 浏览器端:
MutationObserver扫描回答里的代码块,正文能解析成卡片就隐藏代码、在原位挂一张卡;解析失败就原样留着。
失败即降级(fail open):卡片写坏最多显示成一段代码,永远不会中断整轮回答——这也是它不用工具调用传参的原因。
更长的版本(为什么这么设计、两条通道的取舍、拆壳的细节)在 docs/intro.md。
已知边界
- 一张回答只渲染一张卡(最后一张生效);
- 卡片位置固定在回答末尾,不能插到段落中间;
- 解析靠 DOM 匹配,主题改动代码块结构时可能失效。
License
MIT
Links
More in this category
zhu1090093659/dsh-web#packages/dsh-task-board★ 9262
Task board for the dsh web GUI: a sidebar multi-column kanban whose cards run in real DSH agent sessions and can also be scheduled with cron expressions, executed host-side even with the browser closed.
zhu1090093659/dsh-web#packages/dsh-web-all★ 9262
Plugin and skin collection for the DSH Web UI: task board, Git graph, right-side panel, remote mobile UI, pet, live token stats, and a skin center.
MeteorNOX/DeepSeek-Balance-Whale-Widget★ 5677
A fixed-corner whale widget for the DSH web GUI — balance, today's usage and per-turn cost with peak/off-peak pricing, editable balance-alert and daily-budget bubbles, a module-based custom bubble queue with A/B weighted choices and random lines or images, 30+ vendor templates (OpenAI, OpenRouter, Kimi, SiliconFlow, Ark, Zhipu, MiniMax and more) with per-model balance and subscription quota, plus task-end sound, imported audio, custom roles and a resource manager. Local-only, no telemetry.
ccch1mneyyy/dsh-TUI★ 5125
Claude Code-style full-screen terminal UI: pixel-whale header, live status line, and streaming thought expansion.
omdsh-dev/DSH-better-sidebar★ 4413
Full sidebar workbench with file rendering and editing, terminal, Git, and subagents; third-party plugins can register new tabs.
Devin-AXIS/deepseek-design#deepseek-idesign★ 1491
Visual design studio for websites, app prototypes, posters, cards, reports, and magazines, with templates, direct element editing, selection-aware AI draft handoff, and export.
Community comments
Comments are public GitHub Discussions. Loading them connects to GitHub and Giscus; a GitHub account is required to post.