dsh-diff-approval 0.29.0 → 0.30.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 +12 -4
- package/README.zh.md +12 -4
- package/lib/client.js +3177 -1530
- package/lib/index.js +2723 -191
- package/lib/types/annotate-skill.d.ts +34 -0
- package/lib/types/annotate-tool.d.ts +216 -0
- package/lib/types/annotate.d.ts +158 -0
- package/lib/types/atomic-write.d.ts +77 -0
- package/lib/types/client/PendingPanel.d.ts +66 -4
- package/lib/types/client/code-font.d.ts +10 -4
- package/lib/types/client/discussion.d.ts +69 -16
- package/lib/types/client/dock.d.ts +0 -5
- package/lib/types/client/dsh-icons.d.ts +60 -0
- package/lib/types/client/header-entry.d.ts +20 -5
- package/lib/types/client/ids.d.ts +18 -0
- package/lib/types/client/locales.d.ts +50 -28
- package/lib/types/client/panel-memory.d.ts +94 -29
- package/lib/types/client/port.d.ts +50 -1
- package/lib/types/client/presentation-menu.d.ts +1 -1
- package/lib/types/client/produced-diff.d.ts +57 -20
- package/lib/types/client/session-seat.d.ts +53 -0
- package/lib/types/client/slots.d.ts +71 -11
- package/lib/types/client/store.d.ts +35 -2
- package/lib/types/comment-ask.d.ts +209 -0
- package/lib/types/comment-lines.d.ts +131 -0
- package/lib/types/comments.d.ts +357 -0
- package/lib/types/index.d.ts +36 -5
- package/lib/types/pending.d.ts +23 -0
- package/lib/types/types.d.ts +176 -0
- package/lib/types/vcs.d.ts +51 -25
- package/package.json +4 -1
- package/lib/types/client/chat-bridge.d.ts +0 -70
package/README.md
CHANGED
|
@@ -38,8 +38,8 @@ For Markdown files, the source-line diff can also be shown as a rendered before/
|
|
|
38
38
|
- **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.
|
|
39
39
|
- **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.
|
|
40
40
|
- **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.
|
|
41
|
-
- **Import
|
|
42
|
-
- **Settings**: a "Diff Approval" section in DeepSeek Harness settings, grouped into **Diff view** (code font size, line height, added / removed colors), **Shortcuts** (rebind the panel's keyboard chords), and **Floating coverage** (the same four edge switches the panel's own popover offers) plus preferences for auto-paste on copy, whether
|
|
41
|
+
- **Import version-control changes**: when the list is empty, click the button to import the workspace's local changes from **Git / SVN / Perforce** — everything that is **not committed yet, staged or not** (Git is read against the last commit, the `git diff HEAD` view), plus deleted files and, opt-in, files the VCS has never seen (untracked / unversioned). The VCS root is found by walking up from the workspace, so a workspace inside a subdirectory works too.
|
|
42
|
+
- **Settings**: a "Diff Approval" section in DeepSeek Harness settings, grouped into **Diff view** (code font size, line height, added / removed colors), **Shortcuts** (rebind the panel's keyboard chords), and **Floating coverage** (the same four edge switches the panel's own popover offers) plus preferences for auto-paste on copy, whether to include files version control has not seen 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.
|
|
43
43
|
- **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.
|
|
44
44
|
|
|
45
45
|
## 📦 Install
|
|
@@ -74,12 +74,12 @@ Then restart `dsh web`.
|
|
|
74
74
|
|
|
75
75
|
1. Work with the agent as usual — successful `edit` / `write` / editor (`str_replace_editor`) calls are recorded automatically.
|
|
76
76
|
2. Click the **Pending changes** action at the sidebar footer, review each file's diff, and **Keep** / **Revert**.
|
|
77
|
-
3. When the list is empty, **Import
|
|
77
|
+
3. When the list is empty, **Import version-control changes** pulls in what the workspace has not committed yet.
|
|
78
78
|
|
|
79
79
|
## 📝 Notes
|
|
80
80
|
|
|
81
81
|
- 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.
|
|
82
|
-
- The VCS import runs read-only Git/SVN/Perforce commands through the deployment's shell executor, so the respective CLI must be on `PATH`.
|
|
82
|
+
- The VCS import runs read-only Git/SVN/Perforce commands through the deployment's shell executor, so the respective CLI must be on `PATH`. Including files version control has not seen (default off) scans the whole workspace, which can be slow on large trees.
|
|
83
83
|
- For a newly-created file, the whole-file revert action reads **Delete** and removes the file.
|
|
84
84
|
- Reverting a file writes it back with its current line endings (LF / CRLF) preserved.
|
|
85
85
|
- Sessions with no workspace keep their entries memory-only; corrupt persistence files are rejected and can be deleted to reset.
|
|
@@ -97,3 +97,11 @@ pnpm run fonts:plan # what a page actually downloads, by how many hanzi it show
|
|
|
97
97
|
```
|
|
98
98
|
|
|
99
99
|
The bundled font is [JetBrains Maple Mono](https://github.com/SpaceTimee/Fusion-JetBrainsMapleMono) (SIL OFL 1.1), subset and sliced by `scripts/fonts` — see [`assets/fonts/README.md`](assets/fonts/README.md) for the pipeline, the licence and what the slices cost.
|
|
100
|
+
|
|
101
|
+
A `file:` profile install copies what the package's `files` list named *at install time*, so a checkout whose list grew needs a refresh before the host can hand the new files out:
|
|
102
|
+
|
|
103
|
+
```sh
|
|
104
|
+
npx @deepseek-ai/dsh plugin --profile web install # then restart `dsh web`
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
Only the client half reloads on its own (its bundle is watched), so a client change shows up on a page refresh while a host-half change — like the route that serves the font — waits for the restart.
|
package/README.zh.md
CHANGED
|
@@ -38,8 +38,8 @@
|
|
|
38
38
|
- **外观自定义**:在「差异视图」设置组里可调整差异代码字号(%)、行高(px)以及新增 / 删除行颜色,并带实时预览。
|
|
39
39
|
- **外部改动**:已纳入列表的文件若之后被外部修改(其它工具 / 编辑器),面板会跟进最新内容并标记分歧。
|
|
40
40
|
- **打开 / 定位**:查看某个文件的差异时,可一键在默认应用中打开它,或在系统文件管理器中定位它。
|
|
41
|
-
-
|
|
42
|
-
- **设置**:在 DeepSeek Harness 设置里新增「改动审批」页,分为「差异视图」(代码字号、行高、新增 /
|
|
41
|
+
- **导入版本控制的改动**:列表为空时,点击按钮即可导入工作区里 **Git / SVN / Perforce** 的本地改动——**凡是没有提交的都算,add 过与否一样**(Git 以最后一次提交为基准,即 `git diff HEAD` 的口径),以及已删除文件,和(可选开启的)VCS 从未见过的文件(未跟踪 / 未版本化)。通过从工作区目录逐级向上查找 VCS 根目录,工作区在子目录里也能识别。
|
|
42
|
+
- **设置**:在 DeepSeek Harness 设置里新增「改动审批」页,分为「差异视图」(代码字号、行高、新增 / 删除颜色)、「快捷键」(重绑面板各类按键组合)与「浮窗覆盖」(面板自身弹出菜单里的那四个边的开关)三组,另有复制后自动粘贴、导入时是否包含版本控制未跟踪文件、diff 的 Tab 宽度(2 / 4 / 8 空格)、双栏对比开关、差异跳转行距、Markdown 预览默认与宽度,以及快速呼出快捷键。
|
|
43
43
|
- **持久化**:待处理状态按 workspace 落盘至 `<dshHome>/diff-approval/workspaces/<workspaceId>.json`,跨重启保留——回来时未处理的改动仍在,即便换了新会话。
|
|
44
44
|
|
|
45
45
|
## 📦 安装
|
|
@@ -74,12 +74,12 @@ npx @deepseek-ai/dsh plugin --profile web add dsh-diff-approval
|
|
|
74
74
|
|
|
75
75
|
1. 照常和智能体对话——成功的 `edit` / `write` / 编辑器(`str_replace_editor`)调用会自动记录。
|
|
76
76
|
2. 点击侧边栏底部的 **待处理改动** 入口,逐文件查看差异并 **保留 / 回退**。
|
|
77
|
-
3. 列表为空时,点
|
|
77
|
+
3. 列表为空时,点 **导入版本控制的改动**,把尚未提交的 Git / SVN / Perforce 改动拉入。
|
|
78
78
|
|
|
79
79
|
## 📝 注意事项
|
|
80
80
|
|
|
81
81
|
- 只自动记录被跟踪的改动(`edit`、`write` 与编辑器 `str_replace_editor` 调用)。通过以上工具以外的删除(如 shell `rm`)只能对已跟踪的文件感知:条目显示"文件已不存在",回退即恢复。
|
|
82
|
-
- VCS 导入通过部署环境的 shell 执行器运行只读的 Git / SVN / Perforce 命令,需要对应 CLI 在 `PATH`
|
|
82
|
+
- VCS 导入通过部署环境的 shell 执行器运行只读的 Git / SVN / Perforce 命令,需要对应 CLI 在 `PATH` 中。包含版本控制未跟踪文件(默认关闭)会扫描整个工作区,目录很大时可能较慢。
|
|
83
83
|
- 新建文件的整文件回退操作显示为**删除**并移除该文件。
|
|
84
84
|
- 回退文件时会保留其当前换行符(LF / CRLF)。
|
|
85
85
|
- 没有 workspace 的会话条目仅存内存;损坏的落盘文件会被拒绝,删除即可重置。
|
|
@@ -97,3 +97,11 @@ pnpm run fonts:plan # 页面上出现多少汉字时实际会下载多少
|
|
|
97
97
|
```
|
|
98
98
|
|
|
99
99
|
内置字体是 [JetBrains Maple Mono](https://github.com/SpaceTimee/Fusion-JetBrainsMapleMono)(SIL OFL 1.1),由 `scripts/fonts` 子集化并切片——流水线、许可证与各切片的体积见 [`assets/fonts/README.md`](assets/fonts/README.md)。
|
|
100
|
+
|
|
101
|
+
`file:` 方式安装的 profile 只复制**安装当时** `files` 列出的文件,所以本地 checkout 后来新增的文件(如 `assets/fonts`)必须先刷新安装,宿主才拿得到:
|
|
102
|
+
|
|
103
|
+
```sh
|
|
104
|
+
npx @deepseek-ai/dsh plugin --profile web install # 然后重启 `dsh web`
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
客户端那半会自己热更新(它的 bundle 被监听),所以客户端改动刷新页面即可;宿主那半的改动(例如提供字体的这条路由)要等重启才生效。
|