dsh-diff-approval 0.18.0 → 0.19.1

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
@@ -15,23 +15,29 @@ The panel also collapses its file list into a floating card and expands to fulls
15
15
  | --- | --- |
16
16
  | ![Collapsed file list](docs/images/file-list-collapsed.png) | ![Fullscreen](docs/images/fullscreen.png) |
17
17
 
18
+ For Markdown files, the source-line diff can also be shown as a rendered before/after preview:
19
+
20
+ ![Markdown preview](docs/images/markdown.png)
21
+
18
22
  ## ✨ Features
19
23
 
20
24
  - **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`, step with `F3` / `Shift+F3`) that highlights matched words. Rows are virtualized, so huge files stay smooth.
21
- - **Block navigation & decisions**: jump between change blocks with `Ctrl+↑/↓` (or the previous/next buttons) — the focused block flashes, and navigation is anchored to the scroll position. 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. The lead rows left above the jumped-to block are configurable in settings.
25
+ - **Block navigation & decisions**: jump between change blocks with `Ctrl+↑/↓` (or the previous/next buttons) — the focused block flashes, navigation is anchored to the scroll position and wraps at the top/bottom. 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. The lead rows left above the jumped-to block are configurable in settings.
22
26
  - **Selection frame**: drag to select a range of lines and a frame appears to **Keep** / **Revert** exactly that range.
23
27
  - **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.
24
28
  - **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.
25
- - **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).
29
+ - **Undo / Redo**: every keep, revert, and import is undoable with `Ctrl+Z` / `Ctrl+Shift+Z` (rebindable in Shortcuts; `Ctrl+Y` remains an alias), active while the panel is open text inputs keep their own editing.
26
30
  - **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.
27
31
  - **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)`.
28
32
  - **Highlight language**: auto-detected from the file extension, or overridden from a dropdown.
29
33
  - **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.
30
34
  - **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. Toggle it from the toolbar or in settings (default: single-column unified view). In split view, changed blocks are aligned by content similarity and changed lines show intra-line word diffs — whole words for Latin text, per-character for CJK.
35
+ - **Markdown preview**: for Markdown files, toggle between the source-line diff and a rendered before/after preview (`Preview` / `Source`). The preview content max width is configurable.
36
+ - **Customizable appearance**: from the "Diff view" settings group, adjust the diff's code font size (%), line height (px), and the added / removed line colors, with a live preview.
31
37
  - **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.
32
38
  - **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.
33
39
  - **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.
34
- - **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, the block-jump lead rows, and the quick-summon chord.
40
+ - **Settings**: a "Diff Approval" section in DeepSeek Harness settings, grouped into **Diff view** (code font size, line height, added / removed colors) and **Shortcuts** (rebind the panel's keyboard chords) plus 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, the block-jump lead rows, the Markdown preview default and width, and the quick-summon chord.
35
41
  - **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.
36
42
 
37
43
  ## 📦 Install
package/README.zh.md CHANGED
@@ -15,23 +15,29 @@
15
15
  | --- | --- |
16
16
  | ![折叠的文件列表](docs/images/file-list-collapsed.zh.png) | ![全屏](docs/images/fullscreen.zh.png) |
17
17
 
18
+ 对 Markdown 文件,还可把源码行差异切换为渲染后的「改前 / 改后」预览:
19
+
20
+ ![Markdown 预览](docs/images/markdown.zh.png)
21
+
18
22
  ## ✨ 功能
19
23
 
20
24
  - **差异视图**:语法高亮整文件差异与 +/− 统计,滚动条上有概览标尺标示改动位置,支持文件内搜索(`Ctrl+F`,用 `F3` / `Shift+F3` 步进,并高亮匹配词)。列表按视口虚拟化渲染,大文件也能保持流畅。
21
- - **差异块导航与操作**:用 `Ctrl+↑/↓`(或上一处 / 下一处按钮)在差异块间跳转,当前块会高亮闪烁,导航以当前滚动位置为锚点。悬停某一块可从小操作框单独**保留 / 回退**该块,并显示其位置(如「2/5」);处理完一块后会自动跳到下一块。跳转目标上方保留的行数可在设置中配置。
25
+ - **差异块导航与操作**:用 `Ctrl+↑/↓`(或上一处 / 下一处按钮)在差异块间跳转,当前块会高亮闪烁,导航以当前滚动位置为锚点并在首尾循环。悬停某一块可从小操作框单独**保留 / 回退**该块,并显示其位置(如「2/5」);处理完一块后会自动跳到下一块。跳转目标上方保留的行数可在设置中配置。
22
26
  - **选区操作框**:拖动选中一段行,会浮现**保留 / 回退**该段行的操作框。
23
27
  - **整文件与批量操作**:文件列表里的文件可逐个保留 / 回退,也可在列表底部**全部保留** / **全部回退**。
24
28
  - **已处理文件保留在列表**:某文件的改动全部处理完后,条目仍保留在列表中,面板会询问是移除还是继续保留。
25
- - **撤销 / 重做**:每次保留、回退、导入都可以用 `Ctrl+Z` / `Ctrl+Y` 撤销 / 重做(面板打开期间全局生效,输入框保留各自的编辑行为)。
29
+ - **撤销 / 重做**:每次保留、回退、导入都可以用 `Ctrl+Z` / `Ctrl+Shift+Z` 撤销 / 重做(可在「快捷键」中重绑,`Ctrl+Y` 仍作为别名),面板打开期间全局生效,输入框保留各自的编辑行为。
26
30
  - **快速呼出与文件切换**:`Ctrl+D`(可在设置中修改)在任意位置开关面板,`Esc` 关闭;`Ctrl+Tab` / `Ctrl+Shift+Tab` 在待处理文件间切换。
27
31
  - **行引用**:选中 diff 文本后,底部状态栏显示其 `(文件:行号)` / `(文件:起-止)` 引用——点击(或按 `Ctrl+L`)即可复制,开启设置后还会自动粘贴到消息输入框并获得焦点。消息输入框和排队消息里的引用会随文件改动**自动对齐**:存活的行映射到新行号,整段被删的行变成 `(文件:LINE_MISSING)`。
28
32
  - **高亮语言**:默认按扩展名自动检测,也可通过下拉列表手动切换。
29
33
  - **自动换行**:语言下拉旁有个「Wrap lines / 自动换行」开关,按语言记住;CJK 逐字断行、拉丁词保持完整。
30
34
  - **双栏对比**:可选的双栏视图(左「改前」|右「当前」),逐行对齐,两侧各自横向滚动、共享纵向滚动条。可在工具栏或设置中切换,默认是单栏(合并)视图。双栏视图按内容相似度对齐改动块,并对改动行做词级差异高亮——拉丁文字按整词、CJK 逐字。
35
+ - **Markdown 预览**:对 Markdown 文件可在「源码」行差异与渲染后的「改前 / 改后」预览之间切换。预览内容最大宽度可配置。
36
+ - **外观自定义**:在「差异视图」设置组里可调整差异代码字号(%)、行高(px)以及新增 / 删除行颜色,并带实时预览。
31
37
  - **外部改动**:已纳入列表的文件若之后被外部修改(其它工具 / 编辑器),面板会跟进最新内容并标记分歧。
32
38
  - **打开 / 定位**:查看某个文件的差异时,可一键在默认应用中打开它,或在系统文件管理器中定位它。
33
39
  - **导入工作区改动**:列表为空时,点击按钮即可导入工作区里 **Git / SVN / Perforce** 的本地改动——已修改、已删除,以及(可选开启的)未跟踪文件。通过从工作区目录逐级向上查找 VCS 根目录,工作区在子目录里也能识别。
34
- - **设置**:在 DeepSeek Harness 设置里新增「改动审批」页,包含复制后自动粘贴、导入时是否包含未跟踪文件、diff 的 Tab 宽度(2 / 4 / 8 空格)、双栏对比开关、差异跳转行距,以及快速呼出快捷键。
40
+ - **设置**:在 DeepSeek Harness 设置里新增「改动审批」页,分为「差异视图」(代码字号、行高、新增 / 删除颜色)与「快捷键」(重绑面板各类按键组合)两组,另有复制后自动粘贴、导入时是否包含未跟踪文件、diff 的 Tab 宽度(2 / 4 / 8 空格)、双栏对比开关、差异跳转行距、Markdown 预览默认与宽度,以及快速呼出快捷键。
35
41
  - **持久化**:待处理状态按 workspace 落盘至 `<dshHome>/diff-approval/workspaces/<workspaceId>.json`,跨重启保留——回来时未处理的改动仍在,即便换了新会话。
36
42
 
37
43
  ## 📦 安装
Binary file
Binary file