前言¶
在 DeepSeek Harness(DSH)的对话中,模型输出 Markdown 代码块(fences)通常是静态文本,需要开发者自己解析或额外工具来处理。如果这些代码块是结构化数据(如卡片列表、待办事项、测验题目),静态展示会割裂信息与操作。Intelligent Inspiration 把这些 fences 转换为可交互的 UI 块,让回答本身具备引导与可执行性。
插件定位¶
Intelligent Inspiration 是一个客户端插件,由维护者 MicroCapCap 提供。它把对话中的特定 fenced 代码块渲染为交互式组件,包括资源卡片、待办清单、测验、排序练习、温度滑块与图表等。它不改变对话文本,只改变这些 fences 的呈现方式与交互行为。
核心功能¶
插件支持八种 fence 语言,分别对应不同的交互组件:
cards:资源列表,包含标题、链接、缩略图、描述、来源与标签,点击标题跳转链接。actions:待办清单,每项可勾选,状态仅保存在当前块内,支持重置。inspiration:下一步建议,点击将内容填入输入框或复制到剪贴板。quiz:多选题,可即时判分,并显示解析。sort:排序练习,让用户对步骤或项目排序。softmax:温度滑块,配合实时概率条,用于演示采样机制。match:配对练习,让用户将项目与描述匹配。chart:小图表,支持条形图与折线图。
插件运行在 DSH 的 Markdown 渲染管道中,安装后需要开启新会话才能生效。关闭插件后,这些 fences 会恢复为普通代码块,对话文本不受影响。
安装与启用¶
Intelligent Inspiration 以 Bundle 形式提供,包含两部分:Host 半注入回答格式说明,Client 半负责渲染 fences。
在 Web UI 中:
- 打开 Plugins 页面。
- 选择 Add plugin。
- 选择本插件目录。
在 DSH Tool 中:
- 使用
plugin_manager工具,执行action: install_bundle。 - 将本插件目录作为
target参数传入。
在 Profile 文件中:
- 在 profile 的
package.json中添加本插件目录到dsh.profile.bundles。 - 安装后由插件管理器写入该文件,不建议手动编辑。
安装完成后,需要开启新会话,插件才会介入渲染。
典型用法¶
1. 资源卡片¶
在回答中使用 cards fence:
{
"title": "Start here",
"note": "Each row opens the source.",
"cards": [
{
"title": "Stanford CS336",
"href": "https://cs336.stanford.edu/",
"thumb": "https://avatars.githubusercontent.com/u/160359985?v=4",
"desc": "Language modeling from scratch: tokenizer, transformer, training loop, scaling, and alignment.",
"source": "Stanford",
"tags": ["12 weeks"]
}
]
}
渲染后,每行显示标题、缩略图(若无图片则回退到首字母)、描述、来源标签。点击标题会跳转 href(若无 href 则为纯文本)。
2. 待办清单¶
使用 actions fence:
{
"kind": "actions",
"note": "Tick them off; the state stays in this block.",
"items": [
{
"text": "Run CS336 assignment 1 this week",
"why": "It is the cheapest proof that you can build the training loop.",
"effort": "1 evening"
}
]
}
每行是一个复选框,支持勾选与重置。勾选状态仅保存在当前块内,不会向服务端发送消息。
3. 下一步建议¶
使用 inspiration fence:
{
"kind": "inspiration",
"items": [
{
"text": "为我生成一个 transformer 的玩具模型",
"why": "把今天的理论变成可运行的代码"
}
]
}
点击建议会调用输入框的 inputActions.setDraft 填入内容并聚焦编辑器;若无该 API 则复制到剪贴板。
4. 即时测验¶
使用 quiz fence:
{
"kind": "quiz",
"title": "Check yourself",
"questions": [
{
"q": "Why does temperature change the output distribution?",
"options": [
"It rescales logits before softmax",
"It removes low-probability tokens",
"It updates the weights"
],
"answer": 0,
"why": "Dividing logits by T sharpens the distribution as T falls and flattens it as T rises; nothing is removed."
}
]
}
回答后立即判分,并显示解析。若 answer 缺失或超出范围,该问题会被跳过。
5. 排序练习¶
使用 sort fence,让用户对步骤或项目排序,返回结果用于后续处理。
6. 温度滑块¶
使用 softmax fence,提供温度滑块与实时概率条,直观展示采样机制。
7. 配对练习¶
使用 match fence,让用户将项目与描述匹配。
8. 图表¶
使用 chart fence,渲染条形图或折线图,展示数据趋势。
适用场景与注意¶
Intelligent Inspiration 适合需要把回答结构化、可交互的场景,如学习路径、任务清单、知识检查与引导。它对回答格式有一定约定(如 Claim → Quiz → What to do → Recommendations),由 Host 半提供说明,Client 半负责渲染。
注意:
- 插件在客户端运行,不直接发送消息或跨页通信。
- 安装前建议检查源码与许可证(MIT)。
- 安装后需要新会话才能生效。
- 关闭插件后 fences 恢复为普通代码块,不影响对话文本。
总结¶
Intelligent Inspiration 通过将 Markdown fences 转换为可交互组件,让模型回答具备引导与执行能力。它不改变对话内容,仅增强呈现与交互。更多细节可参考:
- 目录页:https://www.skillhub.cn/plugins/MicroCapCap/intelligent-inspiration
- GitHub:https://github.com/MicroCapCap/intelligent-inspiration