
Security News
Deno Goes the Way of the Dinosaur
Cloudflare is acquiring Deno’s team, which will provide another year of bug fixes and security updates before ending support for the runtime.
dsh-turn-diff
Advanced tools
此插件由 AI 生成,未经人工代码审查(Code Review)。使用前请自行审查源码,确保符合你的安全要求。
DeepSeek Harness (DSH) Web UI 插件:每轮对话结束时,汇总本轮所有文件修改差异。
在每轮对话最后一条 assistant 消息下方,新增一个可折叠的"改动汇总"面板:
N 个文件 · M 处修改DiffBlock 组件渲染,与工具调用内联 diff 样式一致DSH 已有 ui-deliverables 插件,在每轮结束时显示"修改了哪些文件"的文件芯片清单。但没有一个地方能一次性查看本轮所有改动的 diff 内容——你得回到对话流里,逐个展开每个工具调用的 diff 卡片。
本插件补上这个缺口:数据来源与 ui-deliverables 相同(工具自身的 diff 渲染意图),但把所有 hunk 按文件合并,在一个面板里展示。
构建产物:
lib/index.js (0.4 KB) — Node 端插件入口lib/client.js (12.4 KB) — 浏览器端 bundle(__ModuleLoader__.load 格式)lib/types/ — TypeScript 类型声明dsh web 模式运行# 1. 克隆仓库到 harness 的 workspace 同级目录,或直接放在 harness 仓库目录下
git clone https://github.com/<你的用户名>/dsh-turn-diff.git
cd dsh-turn-diff
# 2. 暂时将插件注册为 harness 的 workspace 成员,以便依赖解析
# 编辑 <harness>/pnpm-workspace.yaml,在 packages: 列表末尾添加一行:
# 注意缩进,与 `- vendor/*` 对齐
# - dsh-turn-diff
# 3. 在 harness 根目录安装依赖
cd <harness-root>
pnpm install --no-frozen-lockfile
# 4. 构建插件
pnpm --filter dsh-turn-diff run build
# 5. 安装进 web profile
dsh plugin --profile web add link:$(pwd)/dsh-turn-diff
# 6. 重启 dsh web
dsh web
或者直接从 npm 安装(发布后):
dsh plugin --profile web add dsh-turn-diff
重启后,每轮对话结束时即可看到改动汇总面板。
dsh plugin --profile web remove dsh-turn-diff
重启 dsh web 即可。
dsh-turn-diff/
├── cordis.patch.yml # bundle 入口:挂载 node 端和 client 端插件
├── src/
│ ├── index.ts # Node 端(无操作,仅作为插件入口)
│ ├── invariant.ts # 运行时不变式
│ └── client/
│ ├── index.ts # 浏览器端入口:注册节点和槽位
│ ├── turn-diff.ts # ConversationNodeDefinition:聚合 tool/result diff 数据
│ ├── TurnDiffPanel.tsx # React 组件:可折叠的差异面板
│ └── TurnDiffPanel.module.css
├── tsconfig.json
├── tsdown.config.ts
└── package.json
tool/result (card: 'diff', diffs: FileDiff[])
│
▼
turnDiffDefinition.match() → 匹配 turn/start 和 tool/result
│
▼
turnDiffDefinition.update() → 合并 hunk 到按路径索引的状态
│
▼
turnDiffDefinition.buildLocationData() → 发布 turn-diff 到回合数据 { files: [...] }
│
▼
TurnDiffPanel 从 turn.data.get('turn-diff') 读取 → 渲染展开/折叠面板
@deepseek-ai/dsh-client-runtime — 会话节点和数据存储@deepseek-ai/dsh-client-ui-conversation — turnTail 槽位@deepseek-ai/dsh-client-ui-slots — 槽位注册@deepseek-ai/dsh-client-ui-primitives — DiffBlock 组件@deepseek-ai/dsh-tools/presentation — FileDiff 类型react / clsx — UI 渲染ui-deliverables 一致,因为 presentResult 产生的 diff 视图只在这些工具上定义)viewFor 函数重算视图,应该能正常渲染;但如果某个工具在回放时没有注册,view 会缺失pnpm run build 再安装MIT
FAQs
DSH Web UI 插件:每轮结束时汇总本轮所有文件修改差异
The npm package dsh-turn-diff receives a total of 0 weekly downloads. As such, dsh-turn-diff popularity was classified as not popular.
We found that dsh-turn-diff demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.

Security News
Cloudflare is acquiring Deno’s team, which will provide another year of bug fixes and security updates before ending support for the runtime.

Security News
Anthropic’s free OSS Scanner uses Mythos and other Claude models to find open source vulnerabilities and send maintainers reports with proposed fixes.

Security News
On Front Lines’ Early Adopters: CISO podcast, Andrew Becherer shares lessons from Datadog, weighs the long-term costs of AI-built tools, and explains how founders can actually gain a CISO’s trust.