dsh-diff-approval 0.11.0 → 0.13.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -14,16 +14,20 @@ The numbered markers (① – ⑧) in the screenshot point to the matching detai
14
14
  ## ✨ Features
15
15
 
16
16
  - **Diff view**: syntax-highlighted whole-file diff ⑤ with +/− counts, an overview ruler ④ on the scrollbar showing where changes sit, and an in-file search (`Ctrl+F`). Rows are virtualized, so huge files stay smooth.
17
- - **Block navigation & decisions**: jump between change blocks with `Ctrl+↑/↓` (or the previous/next buttons) — the focused block flashes. Hover a block to **Keep** or **Revert** just that block from a small actions frame ③ that also shows its position (e.g. "2/5").
17
+ - **Block navigation & decisions**: jump between change blocks with `Ctrl+↑/↓` (or the previous/next buttons) — the focused block flashes. Hover a block to **Keep** or **Revert** just that block from a small actions frame ③ that also shows its position (e.g. "2/5"); after a single-block decision, focus advances to the next block.
18
+ - **Selection frame**: drag to select a range of lines and a frame appears to **Keep** / **Revert** exactly that range.
18
19
  - **Per-file and bulk decisions**: the files in the file list ② can be kept / reverted one at a time, or **Keep all** / **Revert all** from its footer ⑦.
20
+ - **Resolved files stay listed**: once every change in a file has been kept/reverted, the entry remains in the list and the panel asks whether to remove it or keep it for later.
19
21
  - **Undo / Redo**: every keep, revert, and import is undoable with `Ctrl+Z` / `Ctrl+Y` (active while the panel is open; text inputs keep their own editing).
20
- - **Line references**: select text in the diff the status bar shows its `file:start-end` reference; click it (or press `Ctrl+L`) to copy, and with the setting on it auto-pastes into the composer ⑥ and focuses it.
22
+ - **Quick summon & file cycling**: `Ctrl+D` (configurable in settings) toggles the review panel from anywhere and `Esc` closes it; `Ctrl+Tab` / `Ctrl+Shift+Tab` cycle through the pending files.
23
+ - **Line references**: select text in the diff — the status bar shows its `(file:line)` / `(file:start-end)` reference; click it (or press `Ctrl+L`) to copy, and with the setting on it auto-pastes into the composer ⑥ and focuses it. References in the composer and queued messages are **auto-aligned** when the referenced file changes: surviving lines re-map to their new range, and a fully-removed line becomes `(file:LINE_MISSING)`.
21
24
  - **Highlight language**: auto-detected from the file extension, or overridden from a dropdown ⑧.
22
25
  - **Auto-wrap**: a "Wrap lines" toggle beside the language selector ⑧ wraps long lines for that language (CJK breaks between characters, Latin words stay whole), remembered per language.
26
+ - **Side-by-side split view**: an opt-in two-column diff (left "before" | right "current"), line-aligned with per-side horizontal scrolling and a shared vertical scrollbar. Enabled in settings; the default is the single-column unified view.
23
27
  - **External changes**: files already in the pending list are monitored — if one is later modified outside the reviewed edits (another tool, an editor), the panel adopts the new content and flags the divergence.
24
28
  - **Open / Reveal**: while reviewing a file's diff, open it in its default app or reveal it in the system file manager with one click.
25
29
  - **Import workspace changes**: when the list is empty, click the button to import the workspace's local changes from **Git / SVN / Perforce** — modified, deleted, and (opt-in) untracked files. The VCS root is found by walking up from the workspace, so a workspace inside a subdirectory works too.
26
- - **Settings**: a "Diff Approval" section in DeepSeek Harness settings with the preferences for auto-paste on copy, whether untracked files are included when importing, and the diff's tab width (2 / 4 / 8 spaces).
30
+ - **Settings**: a "Diff Approval" section in DeepSeek Harness settings with preferences for auto-paste on copy, whether untracked files are included when importing, the diff's tab width (2 / 4 / 8 spaces), the side-by-side split view, and the quick-summon chord.
27
31
  - **Persistence**: pending state is stored per workspace at `<dshHome>/diff-approval/workspaces/<workspaceId>.json` and survives restarts — unhandled changes are still there when you come back, even in a fresh session.
28
32
 
29
33
  ## 📦 Install
@@ -65,7 +69,9 @@ Then restart `dsh web`.
65
69
  - Only tracked mutations (`edit`, `write`, and `str_replace_editor` editor calls) are recorded automatically. Deletions made outside these tools (e.g. shell `rm`) are sensed only for tracked files: the entry turns "File is gone" and its Revert restores the file.
66
70
  - The VCS import runs read-only Git/SVN/Perforce commands through the deployment's shell executor, so the respective CLI must be on `PATH`. Importing untracked files (default off) scans the whole workspace, which can be slow on large trees.
67
71
  - Reverting a created file deletes it (the fs seam has no delete API).
72
+ - Reverting a file writes it back with its current line endings (LF / CRLF) preserved.
68
73
  - Sessions with no workspace keep their entries memory-only; corrupt persistence files are rejected and can be deleted to reset.
74
+ - The sidebar footer entry stacks vertically with other plugins' footer actions and defers to the dedicated `dsh-footer-order` plugin when it is present.
69
75
 
70
76
  ## 🛠 Development
71
77
 
package/README.zh.md CHANGED
@@ -14,16 +14,20 @@
14
14
  ## ✨ 功能
15
15
 
16
16
  - **差异视图**:语法高亮整文件差异 ⑤ 与 +/− 统计,滚动条上有概览标尺 ④ 标示改动位置,支持文件内搜索(`Ctrl+F`)。列表按视口虚拟化渲染,大文件也能保持流畅。
17
- - **差异块导航与操作**:用 `Ctrl+↑/↓`(或上一处 / 下一处按钮)在差异块间跳转,当前块会高亮闪烁。悬停某一块可从小操作框 ③ 单独**保留 / 回退**该块,并显示其位置(如「2/5」)。
17
+ - **差异块导航与操作**:用 `Ctrl+↑/↓`(或上一处 / 下一处按钮)在差异块间跳转,当前块会高亮闪烁。悬停某一块可从小操作框 ③ 单独**保留 / 回退**该块,并显示其位置(如「2/5」);处理完一块后会自动跳到下一块。
18
+ - **选区操作框**:拖动选中一段行,会浮现**保留 / 回退**该段行的操作框。
18
19
  - **整文件与批量操作**:文件列表 ② 里的文件可逐个保留 / 回退,也可在列表底部**全部保留** / **全部回退** ⑦。
20
+ - **已处理文件保留在列表**:某文件的改动全部处理完后,条目仍保留在列表中,面板会询问是移除还是继续保留。
19
21
  - **撤销 / 重做**:每次保留、回退、导入都可以用 `Ctrl+Z` / `Ctrl+Y` 撤销 / 重做(面板打开期间全局生效,输入框保留各自的编辑行为)。
20
- - **行引用**:选中 diff 文本后,底部状态栏显示其 `文件:起-止` 引用——点击(或按 `Ctrl+L`)即可复制,开启设置后还会自动粘贴到消息输入框 ⑥ 并获得焦点。
22
+ - **快速呼出与文件切换**:`Ctrl+D`(可在设置中修改)在任意位置开关面板,`Esc` 关闭;`Ctrl+Tab` / `Ctrl+Shift+Tab` 在待处理文件间切换。
23
+ - **行引用**:选中 diff 文本后,底部状态栏显示其 `(文件:行号)` / `(文件:起-止)` 引用——点击(或按 `Ctrl+L`)即可复制,开启设置后还会自动粘贴到消息输入框 ⑥ 并获得焦点。消息输入框和排队消息里的引用会随文件改动**自动对齐**:存活的行映射到新行号,整段被删的行变成 `(文件:LINE_MISSING)`。
21
24
  - **高亮语言**:默认按扩展名自动检测,也可通过下拉列表 ⑧ 手动切换。
22
25
  - **自动换行**:语言下拉 ⑧ 旁有个「Wrap lines / 自动换行」开关,按语言记住;CJK 逐字断行、拉丁词保持完整。
26
+ - **双栏对比**:可选的双栏视图(左「改前」|右「当前」),逐行对齐,两侧各自横向滚动、共享纵向滚动条。在设置中开启,默认是单栏(合并)视图。
23
27
  - **外部改动**:已纳入列表的文件若之后被外部修改(其它工具 / 编辑器),面板会跟进最新内容并标记分歧。
24
28
  - **打开 / 定位**:查看某个文件的差异时,可一键在默认应用中打开它,或在系统文件管理器中定位它。
25
29
  - **导入工作区改动**:列表为空时,点击按钮即可导入工作区里 **Git / SVN / Perforce** 的本地改动——已修改、已删除,以及(可选开启的)未跟踪文件。通过从工作区目录逐级向上查找 VCS 根目录,工作区在子目录里也能识别。
26
- - **设置**:在 DeepSeek Harness 设置里新增「改动审批」页,包含复制后自动粘贴、导入时是否包含未跟踪文件,以及 diff 的 Tab 宽度(2 / 4 / 8 空格)等偏好。
30
+ - **设置**:在 DeepSeek Harness 设置里新增「改动审批」页,包含复制后自动粘贴、导入时是否包含未跟踪文件、diff 的 Tab 宽度(2 / 4 / 8 空格)、双栏对比开关,以及快速呼出快捷键。
27
31
  - **持久化**:待处理状态按 workspace 落盘至 `<dshHome>/diff-approval/workspaces/<workspaceId>.json`,跨重启保留——回来时未处理的改动仍在,即便换了新会话。
28
32
 
29
33
  ## 📦 安装
@@ -65,7 +69,9 @@ npx @deepseek-ai/dsh plugin --profile web add dsh-diff-approval
65
69
  - 只自动记录被跟踪的改动(`edit`、`write` 与编辑器 `str_replace_editor` 调用)。通过以上工具以外的删除(如 shell `rm`)只能对已跟踪的文件感知:条目显示"文件已不存在",回退即恢复。
66
70
  - VCS 导入通过部署环境的 shell 执行器运行只读的 Git / SVN / Perforce 命令,需要对应 CLI 在 `PATH` 中。导入未跟踪文件(默认关闭)会扫描整个工作区,目录很大时可能较慢。
67
71
  - 回退新建文件会删除该文件(文件系统接缝没有删除 API)。
72
+ - 回退文件时会保留其当前换行符(LF / CRLF)。
68
73
  - 没有 workspace 的会话条目仅存内存;损坏的落盘文件会被拒绝,删除即可重置。
74
+ - 侧边栏底部入口会与其他插件的入口纵向排列,并在存在专门的 dsh-footer-order 插件时交由它统一管理。
69
75
 
70
76
  ## 🛠 开发
71
77