dsh-diff-approval 0.36.1 → 0.37.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
@@ -10,26 +10,22 @@ English | [中文](README.zh.md)
10
10
 
11
11
  A DeepSeek Harness (DSH) plugin for pending-change review: it automatically tracks every successful `edit`, `write`, and editor (`str_replace_editor`) mutation, folds them into a single pending list in the sidebar where each file's diff can be reviewed and kept/reverted — and it can also import the workspace's version-control repository's local changes (Git / SVN / Perforce) in one click.
12
12
 
13
- ![Pending changes panel](docs/images/pending-panel.png)
13
+ ![Floating review panel](docs/images/floating-panel.png)
14
14
 
15
- The panel also collapses its file list into a floating card; while floating, each of its four edges — the left sidebar, the header above, the right sidebar, the composer below — can be chosen to be covered (all four is what used to be fullscreen, and covering nothing is a plain floating card), and it can dock as a tab in the right sidebar:
15
+ The panel also collapses its review sidebar into a floating card; while floating, each of its four edges — the left sidebar, the header above, the right sidebar, the composer below — can be chosen to be covered (all four is what used to be fullscreen, and covering nothing is a plain floating card).
16
16
 
17
17
  Two entries open it: the row at the sidebar foot, and a button in the Session header's right-hand controls — the cluster the app keeps its own per-session actions in (where "Download session log" lives) — so the review stays one click away with the sidebar collapsed or hidden.
18
18
 
19
- | Collapsed file list | Covering everything |
20
- | --- | --- |
21
- | ![Collapsed file list](docs/images/file-list-collapsed.png) | ![Covering everything](docs/images/fullscreen.png) |
19
+ The panel can also dock as a tab in the app's right sidebar:
22
20
 
23
- For Markdown files, the source-line diff can also be shown as a rendered before/after preview:
24
-
25
- ![Markdown preview](docs/images/markdown.png)
21
+ ![Docked in the right sidebar](docs/images/docked-sidebar.png)
26
22
 
27
23
  ## ✨ Features
28
24
 
29
25
  - **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. The line-number column keeps a surface of its own — a shade lighter than the code block, so the numbers read as a column rather than as part of the code — and stays pinned while the code scrolls sideways.
30
26
  - **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.
31
27
  - **Selection frame**: drag to select a range of lines and a frame appears to **Keep** / **Revert** exactly that range.
32
- - **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.
28
+ - **Per-file and bulk decisions**: the files in the review sidebar can be kept / reverted one at a time, or **Keep all** / **Revert all** from its footer.
33
29
  - **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 there.
34
30
  - **Undo / Redo**: every keep, revert, import, and comment 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.
35
31
  - **Quick summon & file cycling**: `Ctrl+D` (configurable in settings) toggles the review panel from anywhere and `Esc` closes it; the panel is also one click away from the sidebar-foot row and from a button in the Session header beside the app's own controls; `Ctrl+Tab` / `Ctrl+Shift+Tab` cycle through the pending files.
@@ -37,9 +33,13 @@ For Markdown files, the source-line diff can also be shown as a rendered before/
37
33
  - **Highlight language**: auto-detected from the file extension, or overridden from a dropdown.
38
34
  - **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.
39
35
  - **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.
40
- - **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
+ - **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. With "Structure-rendered Markdown diff" in the "Diff view" group on, the diff is mapped onto the document's own Markdown rendering: lists, tables, headings and code blocks keep their structure; character-level changes are marked, and even a change the rendering cannot show is flagged. The switch is off by default; while it is off the preview keeps the original fragment renderer. The figure below shows the structure-rendered two-column view, with word-level highlights and the hovered block's Keep / Revert toolbar.
37
+
38
+ ![Markdown preview](docs/images/markdown-preview.png)
41
39
  - **Customizable appearance**: from the "Diff view" settings group, adjust the diff's code font size (%), line height (px), the added / removed line colors, and the tab width (2 / 4 / 8 spaces), with a live preview.
42
- - **Comments & annotations**: select any lines and write a comment. The card is anchored below the selected lines and holds the discussion with the agent. Comment mode is on by default and can be turned off in settings. The agent can comment on its own (annotate): asking it to annotate a piece of code is one way to read that code faster. Say "annotate this project's startup flow for me" and it marks the entry point, the initialisation order and the important branches, line by line, to be read in order. In the side-by-side view the comment quotes both sides of the change, the removed lines and the added ones, so the agent reads the whole replacement.
40
+ - **Comments & annotations**: select any lines and write a comment. The card is anchored below the selected lines and holds the discussion with the agent; it shows the `(file:line)` anchor, the note, and its own comment box. Comment mode is on by default and can be turned off in settings. The agent can comment on its own (annotate): asking it to annotate a piece of code is one way to read that code faster. Say "annotate this project's startup flow for me" and it marks the entry point, the initialisation order and the important branches, line by line, to be read in order. In the side-by-side view the comment quotes both sides of the change, the removed lines and the added ones, so the agent reads the whole replacement.
41
+
42
+ ![Comment card](docs/images/comment-card.png)
43
43
  - **File menu**: on by default (the "File menu" row in the "Diff view" group turns it off). It takes over the click on some file links: a file row in the shell's edited / produced lists, an `@file` reference or file link in a message, and a relative link in this plugin's Markdown preview, and offers: **Open as usual** (the shell's own behaviour, replayed), **View in the review panel**, and **Copy file path**.
44
44
  - **Bundled CJK code font**: the panel ships JetBrains Maple Mono, subset and sliced by `unicode-range`; it is on by default and can be turned off in settings.
45
45
  - **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.
package/README.zh.md CHANGED
@@ -10,26 +10,22 @@
10
10
 
11
11
  一个 DeepSeek Harness(DSH)待处理改动审核插件:自动跟踪每次成功的 `edit` / `write` / 编辑器(`str_replace_editor`)改动,在侧边栏整合为一个待处理列表,可逐个文件查看完整差异并保留 / 回退,也可以把工作区里版本控制仓库的本地改动一键导入(Git / SVN / Perforce)。
12
12
 
13
- ![待处理改动面板](docs/images/pending-panel.zh.png)
13
+ ![浮窗审核面板](docs/images/floating-panel.zh.png)
14
14
 
15
- 面板还可把文件列表折叠成浮动卡片;浮窗形态下可以逐边选择覆盖左侧边栏、上方标题栏、右侧边栏与下方输入框(四边全开就是原来的全屏,全关则是一张普通浮窗卡片),也可以停靠到右侧边栏、成为其中一个标签页:
15
+ 面板的审批侧边栏(待审列表与评论)还可折叠成浮动卡片;浮窗形态下可以逐边选择覆盖左侧边栏、上方标题栏、右侧边栏与下方输入框(四边全开就是原来的全屏,全关则是一张普通浮窗卡片)。
16
16
 
17
17
  打开它的入口有两个:左侧边栏底部那一行,以及会话标题行右侧的按钮簇——也就是 App 放自己会话级操作的地方(「下载 Session 日志」就在那里),所以左侧边栏折叠或隐藏时也能一键叫出审核面板。
18
18
 
19
- | 折叠的文件列表 | 覆盖全部 |
20
- | --- | --- |
21
- | ![折叠的文件列表](docs/images/file-list-collapsed.zh.png) | ![覆盖全部](docs/images/fullscreen.zh.png) |
19
+ 面板也可以作为标签页停靠到 App 的右侧边栏:
22
20
 
23
- 对 Markdown 文件,还可把源码行差异切换为渲染后的「改前 / 改后」预览:
24
-
25
- ![Markdown 预览](docs/images/markdown.zh.png)
21
+ ![停靠到右侧边栏](docs/images/docked-sidebar.zh.png)
26
22
 
27
23
  ## ✨ 功能
28
24
 
29
25
  - **差异视图**:语法高亮整文件差异与 +/− 统计,滚动条上有概览标尺标示改动位置,支持文件内搜索(`Ctrl+F`,用 `F3` / `Shift+F3` 步进,并高亮匹配词)。列表按视口虚拟化渲染,大文件也能保持流畅。
30
26
  - **差异块导航与操作**:用 `Ctrl+↑/↓`(或上一处 / 下一处按钮)在差异块间跳转,当前块会高亮闪烁,导航以当前滚动位置为锚点并在首尾循环。悬停某一块可从小操作框单独**保留 / 回退**该块,并显示其位置(如「2/5」);处理完一块后会自动跳到下一块。跳转目标上方保留的行数可在设置中配置。
31
27
  - **选区操作框**:拖动选中一段行,会浮现**保留 / 回退**该段行的操作框。
32
- - **整文件与批量操作**:文件列表里的文件可逐个保留 / 回退,也可在列表底部**全部保留** / **全部回退**。
28
+ - **整文件与批量操作**:审批侧边栏里的文件可逐个保留 / 回退,也可在列表底部**全部保留** / **全部回退**。
33
29
  - **已处理文件保留在列表**:某文件的改动全部处理完后,条目仍保留在列表中,面板会询问是移除还是继续保留。
34
30
  - **撤销 / 重做**:每次保留、回退、导入与**评论**都可以用 `Ctrl+Z` / `Ctrl+Shift+Z` 撤销 / 重做(可在「快捷键」中重绑,`Ctrl+Y` 仍作为别名),面板打开期间全局生效,输入框保留各自的编辑行为。
35
31
  - **快速呼出与文件切换**:`Ctrl+D`(可在设置中修改)在任意位置开关面板,`Esc` 关闭;左侧栏底部那行、以及会话标题行里 App 自身操作旁的按钮,也都是一键入口;`Ctrl+Tab` / `Ctrl+Shift+Tab` 在待处理文件间切换。
@@ -37,9 +33,13 @@
37
33
  - **高亮语言**:默认按扩展名自动检测,也可通过下拉列表手动切换。
38
34
  - **自动换行**:语言下拉旁有个「Wrap lines / 自动换行」开关,按语言记住;CJK 逐字断行、拉丁词保持完整。
39
35
  - **双栏对比**:可选的双栏视图(左「改前」|右「当前」),逐行对齐,两侧各自横向滚动、共享纵向滚动条。可在工具栏或设置中切换,默认是单栏(合并)视图。双栏视图按内容相似度对齐改动块,并对改动行做词级差异高亮——拉丁文字按整词、CJK 逐字。
40
- - **Markdown 预览**:对 Markdown 文件可在「源码」行差异与渲染后的「改前 / 改后」预览之间切换。预览内容最大宽度可配置。
36
+ - **Markdown 预览**:对 Markdown 文件可在「源码」行差异与渲染后的「改前 / 改后」预览之间切换,预览内容最大宽度可配置。开启「差异视图」组的「结构化渲染 Markdown 差异」后,差异按 Markdown 本来的渲染结构直接标在文档上:列表、表格、标题与代码块保持原样,同时标出字符级改动,渲染里看不出来的改动也会标出来。该开关默认关闭,关闭时预览保持原来的按片段渲染方式。下图展示的就是结构化渲染的双栏视图,带词级高亮和悬停块的「保留 / 回退」工具条。
37
+
38
+ ![Markdown 预览](docs/images/markdown-preview.zh.png)
41
39
  - **外观自定义**:在「差异视图」设置组里可调整差异代码字号(%)、行高(px)、新增 / 删除行颜色,以及 Tab 宽度(2 / 4 / 8 空格),并带实时预览。
42
- - **评论与批注**:在任意行上选中一段并写下评论,评论卡片锚定在选中行下方,可以在卡片中与智能体直接探讨相关内容。评论模式默认开启,可以在设置中关闭。智能体可以主动评论(标注):利用该功能可以要求智能体对相关代码进行标注,提高代码阅读效率。例如说一句「请帮我标注下这个项目的启动流程」,它会把入口、初始化顺序与关键分支的说明逐条标注到对应代码行上,顺着卡片读下来即可。双栏视图里评论会把这次改动的两侧都引用进去(删除行与新增行),智能体看到的是完整的替换。
40
+ - **评论与批注**:在任意行上选中一段并写下评论,评论卡片锚定在选中行下方,可以在卡片中与智能体直接探讨相关内容;卡片上会显示 `(文件:行号)` 锚点、评论内容,以及继续写评论的输入框。评论模式默认开启,可以在设置中关闭。智能体可以主动评论(标注):利用该功能可以要求智能体对相关代码进行标注,提高代码阅读效率。例如说一句「请帮我标注下这个项目的启动流程」,它会把入口、初始化顺序与关键分支的说明逐条标注到对应代码行上,顺着卡片读下来即可。双栏视图里评论会把这次改动的两侧都引用进去(删除行与新增行),智能体看到的是完整的替换。
41
+
42
+ ![评论卡片](docs/images/comment-card.zh.png)
43
43
  - **文件菜单**:默认开启(在「差异视图」组里的「文件菜单」一行可关)。它接管了如下一些文件链接的点击操作:外壳「已编辑 / 产出文件」列表里的文件行、消息里的 `@文件` 引用与文件链接、以及本插件 Markdown 预览里的相对链接,并提供:**默认方式打开**(重放外壳自己的行为)、**在审批面板中查看**、**复制文件路径**。
44
44
  - **内置 CJK 代码字体**:面板内置 JetBrains Maple Mono,按 `unicode-range` 子集化并切片,默认开启,设置中可以关闭。
45
45
  - **外部改动**:已纳入列表的文件若之后被外部修改(其它工具 / 编辑器),面板会跟进最新内容并标记分歧。
Binary file
Binary file
Binary file
Binary file
Binary file