dsh-file-review-tab
Manifest valid★ 18dsh-better-sidebar Sidebar Tab version file change review: line-level red-green diff + undo, chat line deep link (ported from left0ver/dsh-file-review) / Review agent file changes as a dsh-better-sidebar sidebar tab — line-level diffs + undo, ported from left0ver/
dsh-file-review-tab
把 dsh-file-review(作者 left0ver)的"改动审查"能力移植为 dsh-better-sidebar 的侧边栏 Tab,并保留对话尾部的审查行——两个入口同源,互不干扰。
Port of left0ver/dsh-file-review's change-review capability into a dsh-better-sidebar sidebar tab, keeping the chat turn-tail review row.
功能
- 对话尾部审查行:回合结束出现"已编辑 N 个文件 +M −K / 撤销 / 审查";点「审查」或单个文件名,深链打开侧边栏 Tab,自动展开对应文件的 diff 并定位到该轮分组顶部(不再弹全宽 drawer)。
- 侧边栏 Tab「文件审查」:按轮次分组列出本会话改动文件;点击展开行级红绿 diff;支持撤销本轮 / 单文件撤销 / 重新应用;Tab 角标实时显示改动文件数。
- 删除文件可见:dsh 没有删除文件的工具,删除发生在终端命令里——插件解析
rm族命令(rm/rmdir/unlink/Remove-Item/del/rd等)的字面路径参数,被删文件以「已删除」标记出现在两个入口(内容已不存在,故无行级 diff、不可撤销)。带通配符(rm *.log)或命令替换(rm $(...))的删除不识别——受影响文件事后无法枚举。 - 自动归档:主列表只保留最近 5 轮(进行中的轮次永不归档),更早的已完成轮次沉入底部「已归档 N 轮」折叠区。折叠时归档内容零渲染,展开后每页加载 10 轮(「加载更多」续页),diff 行另有懒挂载——长会话不再一次性挂载几十个 diff 组。深链跳到已归档轮次会自动展开并定位;展开状态按会话记忆;角标只统计主列表。
- PTC / Code Mode 支持:
run_code程序内部的edit/write子调用也会被捕获——Host 端快照完整 before/after,浏览器端重建带行号的行级 hunks 并入所属轮次;diff 查看、状态检查、撤销/重做均可用。标准模式行为不变(对话尾部审查行仍只覆盖标准模式轮次)。 - 会话隔离:每个会话只看自己的改动;Tab 不可见时暂停状态巡检。
- 窄容器自适应:工作台横向分屏半宽或浮动独立窗口下,轮次头部自动换行、次要信息(行数统计、「在编辑器中打开」)让位,撤销操作与文件名始终完整。
- 样式隔离:全部 CSS Module + 宿主
--dsw-alias-*主题令牌,不与对话区或其他插件冲突。

安装
# npm(推荐)
dsh plugin --profile web add dsh-file-review-tab
# 或 GitHub 源
dsh plugin --profile web add github:Lzh3070/dsh-file-review-tab
前置依赖:DeepSeek Harness web(0.1.5-rc.1+,已在 0.1.5-rc.1 / 0.1.5-rc.2 上真机验证)+ dsh-better-sidebar(≥ 0.19.1)。
版本对应:
dsh-file-review-tab@0.5.x只支持 DSH 0.1.5 及更新的侧边栏 API;仍停留在 DSH 0.1.2 / 0.1.1 的用户请继续使用dsh-file-review-tab@0.4.1。
安装后重启 dsh web,在 better-sidebar 侧边栏「+」菜单打开「文件审查」即可。
致谢
核心 diff 渲染器与撤销服务移植自 left0ver/dsh-file-review(MIT License, © ZhangWenChao)。侧边栏集成基于 dsh-better-sidebar 开放的 ctx.betterSidebar 注册 API。
License
Features (English)
- Chat turn-tail review row ("Edited N files +M −K · Undo · Review") that deep-links into the sidebar tab (auto-expanding the diffs and scrolling the turn group to the top) instead of a full-width drawer.
- Sidebar tab "File Review" in dsh-better-sidebar: per-turn grouped changed files, line-level red/green diffs, undo per turn or per file, live badge with the changed-file count.
- Deleted files stay visible: dsh has no delete-file tool, so deletions happen in terminal commands — literal
rm-family arguments (rm,rmdir,unlink,Remove-Item,del, …) are parsed and deleted files appear marked "deleted" in both surfaces (no line diff, no undo: the content is gone). Glob/command-substitution deletions are not guessed. - Auto-archive: only the newest 5 turns stay in the main list (live turns never archive); older completed turns sink into an "Archived turns" section pinned to the tab's bottom. Collapsed it renders nothing; open, it loads 10 turns per page. Deep links auto-open and page to their target; the badge counts the main list only.
- Session-isolated, pause-when-hidden, CSS-Module scoped styling (no conflicts with the chat area or other plugins).
- Narrow-pane adaptive: in half-width splits and floated free windows the turn header wraps and secondary content yields so undo and file names never clip.
Requires DeepSeek Harness web (0.1.5-rc.1+, verified on 0.1.5-rc.1 / 0.1.5-rc.2) and dsh-better-sidebar (≥ 0.19.1). dsh-file-review-tab@0.5.x targets only the DSH 0.1.5 client API; users on DSH 0.1.2 / 0.1.1 should stay on 0.4.1. Restart dsh web after installing, then open the "File Review" tab from the sidebar's "+" menu.
Compatibility
Versions
| Latest version | Published | Size |
|---|---|---|
| 0.1.0 | — | — |
| 0.1.1 | — | — |
| 0.1.2 | — | — |
| 0.2.0 | — | — |
| 0.4.0 | — | — |
| 0.4.1 | — | — |
| 0.5.0 | — | — |
Comments
Loading…
Similar plugins
by left0ver
dsh插件 - 立刻审查agent对文件的修改,查看diff,支持在dsh-better-sidebar中使用。a dsh plugin - review files that an agent just changed,you can see the diff,support dsh-better-sidebar
★ 42
↓ 980/wk
MIT
TypeScript
Oct 28, 2026
dsh plugin --profile web add dsh-file-reviewby SiriLee
Per-edit approval gate for DeepSeek Harness — red/green line diff review before write/edit/stream operations · DSH 插件:逐操作审批门,write/edit/stream 执行前进行红绿行级 diff 审查
★ 4
↓ 346/wk
MIT
TypeScript
Sep 28, 2026
dsh plugin --profile web add dsh-edit-approvalby omdsh-dev
DSH Web UI 文件追踪插件:记录并查看模型读取/写入/编辑的每个文件,带行号内容、终端风逐行 diff(红删绿增蓝改)与 hunk 上下文折叠;支持 present 交付文件查看(Markdown 渲染 / KaTeX / Mermaid / 图片)。适配至 dsh 0.2.0-rc.2,纯客户端零核心改动。
★ 3
BSD-3-Clause
JavaScript
Oct 24, 2026
dsh plugin --profile web add @dsh-external/dsh-file-traceby lhh010
DSH Web UI 文件追踪插件:记录并查看模型读取/写入/编辑的每个文件,带行号内容、终端风逐行 diff(红删绿增蓝改)与 hunk 上下文折叠;支持 present 交付文件查看(Markdown 渲染 / KaTeX / Mermaid / 图片)。适配至 dsh 0.2.0-rc.2,纯客户端零核心改动。
★ 4
BSD-3-Clause
JavaScript
Oct 28, 2026
dsh plugin --profile web add @dsh-external/dsh-file-traceby feifiefei
DSH right-sidebar file helper: annotate a selection in the document preview (text lines / Excel ranges / Word-PDF pages) or right-click a file, then send the quote plus your note into the current chat
★ 0
MIT
JavaScript
Oct 19, 2026
dsh plugin --profile web add dsh-file-to-chatby ztyhehe
DSH 插件:为 dsh-better-sidebar 添加 SVN 源代码管理 Tab——status/diff/log/commit/update/revert/冲突解决,与内置 Git 面板对称,纯 svn CLI(--xml 输出)驱动,git 直装免构建
★ 3
MIT
TypeScript
Oct 5, 2026
dsh plugin --profile web add dsh-better-sidebar-svn