DeepSeek Harness Plugin Hub

Publish and manage complete Harness Profiles. Discover Plugins for your next setup.

Explore

PluginsPresetsDocsNews

Community

Publish a pluginContactReport an issue

Resources

Plugin Hub on GitHubDeepSeek HarnessSystem statusPrivacy notice
© 2026 DeepSeek Harness Plugin HubPowered byPaxTech

Independent and unofficial. Not affiliated with, authorized by, or endorsed by DeepSeek.

DeepSeek Harness Plugin Hub
ProfilesPluginsCategoriesNewsDocsSign inManage Profiles
ProfilesPluginsCategoriesNewsDocsSign in
← Plugins
P

dsh-ptc-diff-card

Ptc Diff Card

DSH Web 插件:PTC 模式(run_code 内的嵌套调用)里的 edit/write 显示标准 diff 卡片 | DSH Web GUI plugin: standard diff cards for edit/write calls made inside PTC programs

The plugin will be installed here. Keep web if you are unsure.

npx -y @deepseek-ai/dsh plugin --profile web add github:GrounzerLiu/dsh-ptc-diff-card#7fd785de09e366bfa48370564e02b2270ea14188
READMECompatibilityVersions

Compatibility and provenance

Ptc Diff Card is published as dsh-ptc-diff-card and currently resolves to version 0.1.0. The Hub verifies its manifest and preserves the exact installation source for reproducible installs.

DSH compatibility
*
Runtime surfaces
web
Release source
github
Registry updated
10/26/2026

Versions

0.1.0stable
10/26/2026

Related plugins

Loading related plugins…

Latest
0.1.0
DSH
*
HMR
Process restart
Tree shaking
Safe tree shaking not declared
Unpacked size
Unavailable
Files
Unavailable
Surface
web
License
MIT
Source
github
GitHub
★ 0
Weekly downloads
0
Last push
10/26/2026
View source ↗
README badge

Click the badge to copy Markdown for your README.

Do you maintain this Plugin?Claim benefit · Priority security scan

Verify the GitHub repository declared in package.json to manage this listing. After you claim it, Hub will prioritize a security scan of the current version and publish the result when it passes.

Claim this Plugin →
Report an issue

Related plugins

More verified plugins in developer-tools.

MarketdshmarketVisual plugin market inside DeepSeek Harness — browse, search, and one-click install community plugins. · DSH 可视化插件市场:逛一逛,点一下,装好。Opsdsh-opsNative file and PTC tools for DSH on Windows x64, Linux x64 and macOS arm64/x64; Windows-only optional Bash payload and host PowerShell integrationCc Safety Netcc-safety-netA coding agent CLI hook - block destructive commands and secret file accessRemotedsh-remoteRemote-work assistant for DeepSeek Harness: connect SSH (password/key/agent/keyboard-interactive, multi-hop ProxyJump), list hosts from ~/.ssh/config, pick a remote workspace, operate on it with 21 rw_* tools, conflict-aware mirror sync, an embedded PTY t

README

dsh-ptc-diff-card

简体中文 · English

DSH Web GUI 插件:让 PTC 模式下的 edit/write 显示和标准模式一样的 diff 卡片。

解决什么问题

PTC(Programmatic Tool Calling)模式下,agent 在 run_code 程序里调用 edit/write。 这些调用被记录成嵌套的 tool/ptc-dispatch 事件,在 run_code 卡片下面渲染成通用行: 展开只有结果文本 The file ... has been updated successfully,没有 diff 卡片。

官方 Tool 层的 diff 推导在 packages/client/ui-tool 的 diffCardModel 里,第一行就把嵌套调用排除了:

if (block.parentCallId !== undefined) return null

而卡片需要的数据其实都在——嵌套块上有调用参数(file_path/old_string/new_string/content) 和落盘的 meta.diffs(已应用 hunks)。

效果

  • 嵌套的 edit/write 行变成标准文件卡片:标题、工作区相对路径、输入大小、+新增 -删除;
  • 展开就是官方 DiffBlock:语言标签、换行/复制、路径行、增删着色、⋯ 其余 N 行 折叠;
  • 失败的调用不画 diff,标题显示错误首行、展开是原始输出(与官方一致);
  • 根调用(标准模式)外观与官方逐字一致,因为整行是照官方实现的复刻。

原理

在 tool.call.toolview 这个 keyed slot 上注册自己的 edit/write 视图,priority: -1 覆盖官方行(低优先级渲染),插件卸载自动还原。行本身复刻官方文件行(同一套 DisclosureRow/DiffBlock 原语 + 一份 vendor 的官方样式表),diff 推导沿用官方逻辑, 只去掉「根调用限定」:

调用状态diff 来源
成功 settle 且 meta.diffs 非空记录的实际 hunks(路径回写成入参拼写)
write 新建 / 调用进行中由入参推导的整文件 diff
失败 / 中断不画 diff

安装

作为普通 DSH bundle 挂到某个 profile:

# 本地目录(开发)
dsh plugin --profile <name> add link:D:/dsh-plugins/dsh-ptc-diff-card

# 从 GitHub
dsh plugin --profile <name> add "github:GrounzerLiu/dsh-ptc-diff-card"

# 从 npm(已发布后)
dsh plugin --profile <name> add dsh-ptc-diff-card

然后把 dsh-ptc-diff-card 加进该 profile package.json 的 dsh.profile.bundles, 重启应用生效。

兼容性与边界

  • 目标:DSH >= 0.2.1-rc.2(engines.dsh),Web GUI(platform: web)。
  • 只接管 edit 和 write;str_replace_editor/apply_patch 等未覆盖。
  • 行样式是从 ui-tool 0.2.1-rc.3 vendor 的一份拷贝,应用大改版后如需同步外观要重新 vendor。
  • 与同样以 priority: -1 抢占 edit/write 的插件(如 dsh-diff-viewer)不能共存: 同 key 同优先级会被 DSH 拒。本插件会捕获并打日志,让官方行继续接管,不会让整个插件加载失败。
  • 不自动展开 diff,行为与标准模式一致。

开发

pnpm install
pnpm run check     # typecheck + 纯逻辑断言 + 构建
pnpm run build     # 只构建 lib/index.js 与 lib/client.js

source 结构:

src/index.ts                宿主半身:inert 的 Loader 入口(浏览器半身的挂载点)
src/client/index.tsx        slot 注册(edit/write,priority -1)
src/client/row.tsx          行组件(preparing / dispatched-settled 两态)
src/client/model.ts         行状态、路径、diff 推导
src/client/tool-row.module.css   vendor 的官方行样式
scripts/model-check.ts      纯逻辑断言(Node 原生 type stripping,无额外依赖)

浏览器半身按 DSH 客户端插件格式打包:platform 模块表(react、@deepseek-ai/cordis、 ui-slots、ui-primitives…)保持 external,其余内联;CSS Modules 编译成哈希类名 + 一个 <style data-plugin>。

验收

见 VERIFY.md:怎么起测试 profile、在 PTC 会话里看哪一行、怎么对照标准模式与失败调用。

许可

MIT