yangzhe1991/dsh-code-review 预览 preview

yangzhe1991/dsh-code-review

Plugin插件 Native原生 ⭐ 2 MIT Dev Workflow开发与代码工作流

DSH Web 插件:一键打开独立双栏 Code Review 页面用于 git diff,支持语法高亮与行内评论

Project Overview项目介绍

dsh-code-review is a native plugin built exclusively for the DeepSeek Harness (DSH) web UI. It adds a one-click "open in new tab" button to any git diff block in a DSH conversation, opening a dedicated two-column code review page that avoids the chat window’s height and width constraints. To install the plugin, run the DSH CLI command dsh plugin --profile web add @yangzhe1991/dsh-code-review, then restart the DSH web process and refresh your browser tab to activate it. It is compatible with all DSH versions from 0.1.0-rc.x onward, with separate handling for legacy and modern session data structures.

The plugin automatically detects diff output in both markdown code blocks and collapsed bash tool rows, and adds the open button without modifying existing DSH DOM nodes in a way that breaks React reconciliation. When an absolute path to a local .diff or .patch file is mentioned in conversation, the plugin adds a view link button that opens the file directly in the review page. Local file reads are handled by the DSH host half of the plugin, and have a maximum size limit of 5MB per file. You can add inline comments to any line in the review, then export all comments at once to the DSH composer for sending back to the agent.

This plugin is released under the open-source MIT license, and it inherits DSH’s current theme to keep light or dark mode consistent across the interface. It also matches DSH’s interface language for a seamless user experience, with full support for both English and Chinese bilingual UI. The review page includes many quality-of-life features, such as character-level change highlighting, syntax highlighting via Shiki, a file navigation sidebar, a sticky stats bar, and full-page scrolling for large diffs. All changes to the plugin’s browser-side code can be applied with a simple hard refresh after rebuilding, while host-side changes require a full restart of the DSH web process.

dsh-code-review 是专为 DeepSeek Harness (DSH) 开发的原生插件,作用是将对话中的 git diff 输出转换成独立浏览器标签页的代码审查页面,提供双栏友好视图,解决对话窗口尺寸限制带来的阅读问题。插件安装通过 DSH 命令行完成,执行 dsh plugin --profile web add @yangzhe1991/dsh-code-review 后重启 DSH Web 服务即可生效。它适配从 0.1.0-rc.x 到最新版的多个 DSH 版本,兼容新旧数据结构。

对于开发人员来说,典型工作流程是:当对话中出现 git diff 内容时,插件会自动在 diff 块右上角添加「在新标签页打开」按钮,点击即可跳转至独立审查页面。如果对话中提到了本地的 .diff 或 .patch 文件绝对路径,插件也会自动生成查看链接按钮,点击即可打开对应文件的审查页面。插件提供行级注释功能,用户可以在行号上点击添加评论,最终批量导出到 DSH 对话输入框中。

本插件采用 MIT 许可开源免费使用,依赖 DSH 版本不低于 0.1.2-alpha.4,本地 diff 文件大小限制为 5MB 以内,仅支持绝对路径和 .diff/.patch 后缀。插件会继承 DSH 当前主题颜色,保持明暗模式一致,界面语言跟随 DSH 系统语言切换,支持中英双语。首次安装后需要重启 DSH Web 服务并刷新浏览器标签页才能正常加载。

Pre-install check安装前体检Compatibility · Security兼容性 · 安全性 1 warning1 项注意
  • Only 2 stars - very few users, little community feedback星标只有 2,几乎没人在用,遇到问题缺少社区反馈
DSH walks through these 9 checksDSH 会逐条核对这 9 项

Compatibility兼容性

  • DSH, Node, OS and profile requirementsDSH 版本 / Node 版本 / 操作系统 / profile 是否满足要求
  • External dependencies and runtimes (Electron / Python / Docker, ...)外部依赖与运行时(Electron / Python / Docker 等)是否齐备
  • Conflicts with installed plugins: command names, skill / tool names, ports, duplicate MCP registration与已装插件是否冲突:命令名、skill / tool 重名、端口占用、重复 MCP 注册

Security安全性

  • Repo matches the facts registered here; archived or abandoned?仓库是否与页面登记一致,是否归档或长期停更
  • Safety of preinstall / install / postinstall and install.sh / setup.ps1preinstall / install / postinstall 与 install.sh、setup.ps1 是否安全
  • curl|bash, download-then-execute, obfuscation, unrelated domains → stop immediatelycurl|bash、下载即执行、混淆代码、无关域名 → 立刻停止
  • Typosquatting or unmaintained packages among the new dependencies新增依赖里有没有 typosquatting 或无人维护的包
  • Requested permissions vs. what the feature actually needs申请了哪些权限、是否超出功能所需(filesystem / network / shell / clipboard)
  • Any sudo / admin requirement, plus uninstall and rollback是否要求 sudo / 管理员权限,以及卸载与回滚方式

Anything uncertain must be marked unknown with a note on how to confirm it. This site's signal screen is a static snapshot, not a security audit.拿不准的必须标「未知」并说明要我怎么确认。本站的信号筛查是静态快照,不能替代安全审计。

Or use CLI install (for developers)或使用命令行安装(适合开发者)

CLI Install命令行安装

dsh plugin --profile web add @yangzhe1991/dsh-code-review

把 yangzhe1991/dsh-code-review 加入你的 DSH 配置(web profile)即可启用。

READMEREADME

dsh-code-review

English | 中文

npm version npm downloads license dsh-plugin

dsh-code-review is a browser plugin for the DSH (DeepSeek Harness) web UI that turns git diff output in a conversation into a one-click code review page in its own browser tab — a two-column, human-friendly view (old file on the left, new file on the right, both with line numbers), free from the chat window's width/height limits.

The conversation itself stays untouched: when a git diff shows up, a small "open in new tab" button appears on the block (a markdown diff code block, or the bash tool row that produced the diff — even while collapsed). One click opens the review page.

When the conversation mentions a local .diff / .patch file path, the path automatically becomes a view link button — a path inside backticks gets an inline pill right after it, a bare-text path gets a right-aligned button row under the message. One click opens that file's code review page (the browser cannot read local files, so the plugin host half reads them — absolute paths only, .diff/.patch suffix only, ≤ 5 MB).

Compatibility

  • dsh ≥ 0.1.2-alpha.4 — fully supported since 0.1.5. The web UI restructure (chat snapshot moved from useSession((s) => s.chat) to the session-standard useChat hook; markdown code-block DOM wrapped in a bannerWrap layer) is handled on both detection paths: markdown diff blocks and collapsed bash tool rows. Verified against dsh 0.1.3-alpha.2 since 0.2.1, and against dsh 0.2.0-rc.1 since 0.2.2.
  • Why 0.2.2 exists — dsh 0.2.0-rc.1 checks every declared @deepseek-ai/dsh-* peer range against the runtime version and skips any plugin whose ranges do not match (^0.1.3-alpha.2 excludes 0.2.0-rc.1). No plugin code changed: 0.2.2 only widens those ranges to ^0.1.3-alpha.2 || ^0.2.0-rc.1. On 0.2.0-rc.1 an already-installed 0.2.1 can also be admitted without upgrading, by granting the exact-version exemption (dsh plugin --profile <profile> allow-version @yangzhe1991/dsh-code-review@0.2.1 --dsh-version 0.2.0-rc.1 --accept-risk).
  • dsh 0.1.0-rc.x — still supported via the legacy snapshot path.

Showing the opening section of the README — the full document lives in the repository以上为 README 开头摘要,完整文档在仓库内 · View the full README on GitHub →在 GitHub 查看完整 README →

← 上一个 Prev bailinghub-dsh-plugin 下一个 Next dshctl →