dsh-git-changes 0.1.0 → 0.1.2
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.en.md +15 -3
- package/README.md +17 -4
- package/docs/regression-checklist.md +47 -0
- package/package.json +5 -4
package/README.en.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# dsh-git-changes
|
|
2
2
|
|
|
3
|
-
[](LICENSE) [](https://www.deepseek.com/download/) <br>
|
|
3
|
+
[](https://www.npmjs.com/package/dsh-git-changes) [](LICENSE) [](https://www.deepseek.com/download/) <br>
|
|
4
4
|
[中文](README.md)
|
|
5
5
|
|
|
6
6
|

|
|
@@ -19,15 +19,27 @@ DSH's builtin review shows one hunk at a time; this panel gives you the **whole
|
|
|
19
19
|
- **VS Code-style workspace** — file tree, editor tabs, Quick Open (`Ctrl+P`), command palette, workspace search
|
|
20
20
|
- **Language-server navigation** — `F12` definition, `Shift+F12` references, hover, document outline, read-only diagnostics
|
|
21
21
|
- **Git changes panel** — `Staged Changes` / `Changes` groups, stage or unstage a file or a whole group, commit message box, commit and commit & push, current branch with ahead/behind
|
|
22
|
+
- **Per-file and per-folder actions** — hover a file row for open-file / discard / stage icons; discarding asks for confirmation; a folder row stages or unstages everything beneath it; untracked files can be discarded too
|
|
23
|
+
- **Tree / list view** — toggle from the branch bar to switch between the directory tree and a flat list
|
|
24
|
+
- **Project tab** — a second segment next to Changes that browses the whole workspace tree; opening a file there is plain code viewing, not a diff
|
|
22
25
|
- **AI commit messages**: the ✨ button in the commit box asks the Host default model to draft a message from the staged (or unstaged) diff; edit it before committing
|
|
23
26
|
- **Line blame**: pause the cursor on a line for about a second to see `author · time · subject` at the line end; hover the annotation for a commit card (author, time, full message, sha)
|
|
24
|
-
- **Commit graph**: a collapsible lane graph at the bottom of the changes panel lists the latest 80 commits; clicking one opens its diff as the baseline
|
|
25
27
|
- **Inline / side-by-side diffs** — one click to switch; `auto` mode picks a layout from the panel width (900px breakpoint)
|
|
26
28
|
- **Controlled git writes** — only touches the git index and commits: never rewrites files, never runs arbitrary commands, never force pushes; every write goes through a session-authenticated local route
|
|
27
29
|
- **Follows the DSH light/dark theme automatically**
|
|
28
30
|
|
|
29
31
|
## 🆕 What's New
|
|
30
32
|
|
|
33
|
+
### v0.1.1 · Polish
|
|
34
|
+
|
|
35
|
+
- **New Project tab** — a second segment beside Changes that browses the whole workspace tree; opening a file there is plain code viewing.
|
|
36
|
+
- **Discard changes** — per-file `↺`, group-header discard-all and the context menu, with a confirmation dialog; the staged group only offers unstage.
|
|
37
|
+
- **Stage a whole folder** — hover a folder row and press `+` / `−` to stage or unstage everything under it.
|
|
38
|
+
- **Tree / list toggle**, file-type icons on every change row.
|
|
39
|
+
- **Blame on cursor dwell** — the toolbar switch is gone: pause on a line for about a second to see the line-end annotation; hover it for a commit card. Works on both sides of a side-by-side diff.
|
|
40
|
+
- **AI commit messages** — the ✨ button drafts a Chinese message following Conventional Commits, retrying when needed.
|
|
41
|
+
- **Simpler baselines** — fixed to Git uncommitted by default; the baseline dropdown, the changed-only filter and the official diff-review button were removed; other baselines live in the command palette.
|
|
42
|
+
|
|
31
43
|
### v0.1.0 · Git changes panel (first release of this fork)
|
|
32
44
|
|
|
33
45
|
- **Git changes panel** — the Code Review tab now has a `Changes | Project` switch. Changes mode mirrors the Cursor / VS Code CHANGES layout with `Staged Changes (N)` and `Changes (N)` groups, a collapsible tree, and M/A/D/untracked status markers.
|
|
@@ -85,7 +97,7 @@ Every command is registered through DSH's official shortcuts service, so all of
|
|
|
85
97
|
| Go to line | `Ctrl+G` | `Cmd+G` |
|
|
86
98
|
| Next / previous tab | `Ctrl+Tab` / `Ctrl+Shift+Tab` | `Cmd+Tab` / `Cmd+Shift+Tab` |
|
|
87
99
|
| Close tab | `Ctrl+F4` | `Cmd+F4` |
|
|
88
|
-
| Show / hide
|
|
100
|
+
| Show / hide project panel | `Ctrl+Shift+E` | `Cmd+Shift+E` |
|
|
89
101
|
| Document outline | `Ctrl+Shift+O` | `Cmd+Shift+O` |
|
|
90
102
|
| Find in editor | `Ctrl+F` | `Cmd+F` |
|
|
91
103
|
| Go to definition | `F12` / `Ctrl+click` | `F12` / `Cmd+click` |
|
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# dsh-git-changes
|
|
2
2
|
|
|
3
|
-
[](LICENSE) [](https://www.deepseek.com/download/) <br>
|
|
3
|
+
[](https://www.npmjs.com/package/dsh-git-changes) [](LICENSE) [](https://www.deepseek.com/download/) <br>
|
|
4
4
|
[English](README.en.md)
|
|
5
5
|
|
|
6
6
|

|
|
@@ -19,18 +19,31 @@ DSH 自带的审查是一个个 hunk 片段;这个插件给的是**整个文
|
|
|
19
19
|
- **VS Code 式工作区**:文件树、编辑器标签页、Quick Open(Ctrl+P)、命令面板、工作区搜索
|
|
20
20
|
- **语言服务导航**:F12 跳转定义、Shift+F12 查找引用、悬停提示、文档大纲、只读诊断
|
|
21
21
|
- **Git 更改面板**:`暂存的更改` / `更改` 两组、文件与分组一键暂存/取消暂存、提交信息框、提交与提交并推送、当前分支与 ahead/behind 显示
|
|
22
|
+
- **逐文件与整目录操作**:文件行 hover 出现「打开文件 / 放弃更改 / 暂存」图标;放弃更改会弹二次确认;目录行可整目录暂存或取消暂存;未跟踪文件同样可单独放弃
|
|
23
|
+
- **树形 / 列表视图**:更改面板分支栏右侧一键切换,目录树与平铺列表随时互换
|
|
24
|
+
- **「项目」标签**:右侧栏另一个分段,浏览整个工作区的文件树;点击文件是纯代码查看,不会进入 diff 模式
|
|
22
25
|
- **AI 生成提交信息**:提交框右侧 ✨ 按钮调用 Host 的默认模型,根据已暂存(无暂存时用未暂存)改动生成提交信息,填入后仍可修改
|
|
23
26
|
- **行级 Blame**:光标在某行停留约 1 秒后,行尾显示「作者 · 时间 · 提交说明」;鼠标移到标注上弹出提交详情卡片(作者、时间、完整 commit message、提交号)
|
|
24
|
-
- **提交图谱**:更改面板底部「提交图谱」折叠区,用 lane 图展示最近 80 条提交,点击任意提交即以该版本为对比基线打开 diff
|
|
25
27
|
- **内联 / 左右并排 diff**:一键切换,`auto` 模式按面板宽度自动选择(900px 阈值)
|
|
26
28
|
- **可控的 Git 写操作**:只碰 Git 索引与提交,不写文件、不执行任意命令、不 force push;所有写操作都走 DSH 会话鉴权的本地接口
|
|
27
29
|
- **自动跟随 DSH 明暗主题**
|
|
28
30
|
|
|
29
31
|
## 🆕 版本更新
|
|
30
32
|
|
|
33
|
+
### v0.1.1 · 细节打磨
|
|
34
|
+
|
|
35
|
+
- **新增「项目」标签**:与「更改」并列的第二个分段,浏览整个工作区文件树;从项目树打开文件为纯代码查看。
|
|
36
|
+
- **放弃更改**:文件行 `↺` / 分组头「放弃全部更改」/ 右键菜单,单文件、目录、全部均可;执行前弹二次确认;暂存区里不提供撤销,只提供取消暂存。
|
|
37
|
+
- **整目录暂存**:目录行 hover `+` / `−` 一次处理该目录下全部改动。
|
|
38
|
+
- **树形 / 列表视图切换**:分支栏右侧按钮切换。
|
|
39
|
+
- **文件类型图标**:更改面板的每个文件行显示与项目树一致的图标。
|
|
40
|
+
- **Blame 改为光标停留触发**:移除工具栏开关,光标在某行停留约 1 秒显示行尾注释,悬停弹出提交详情卡片;并排 diff 两侧都支持。
|
|
41
|
+
- **AI 提交信息**:提交框 ✨ 按钮生成中文提交信息(遵循 Conventional Commits,必要时自动重试)。
|
|
42
|
+
- **更简单的基线**:默认固定「Git 未提交」,移除比较基线下拉与「仅看改动」「官方 Diff 审查」按钮;其他基线从命令面板切换。
|
|
43
|
+
|
|
31
44
|
### v0.1.0 · Git 更改面板(本 fork 首个版本)
|
|
32
45
|
|
|
33
|
-
- **Git 更改面板**:右侧栏「Git 审查」页新增「更改 |
|
|
46
|
+
- **Git 更改面板**:右侧栏「Git 审查」页新增「更改 | 项目」分段。更改模式按 Cursor/VS Code 的 CHANGES 布局展示 `暂存的更改 (N)` 与 `更改 (N)` 两个分组,目录树折叠、未跟踪/修改/新增/删除状态标记。
|
|
34
47
|
- **暂存与提交**:文件行 hover `+` / `−` 暂存或取消暂存;分组头可一键全部暂存/取消暂存;提交信息框支持 `⌘/Ctrl+Enter` 提交、`⌘/Ctrl+Shift+Enter` 提交并推送,主按钮旁 `▾` 也可选择「提交并推送」;分支栏显示当前分支与 ahead/behind。
|
|
35
48
|
- **内联 / 左右并排 diff**:工具栏新增布局切换(auto → 左右并排 → 内联 → auto)。点击暂存区文件看 `HEAD → 索引` 的改动,点击未暂存文件看 `索引 → 工作区` 的改动。
|
|
36
49
|
- **沿用上游能力**:Agent 本轮 / Git 未提交 / 任意历史版本三种对比基线、VS Code 快捷键、语言服务导航、明暗主题跟随。
|
|
@@ -85,7 +98,7 @@ DSH 自带的审查是一个个 hunk 片段;这个插件给的是**整个文
|
|
|
85
98
|
| 跳转到行 | `Ctrl+G` | `Cmd+G` |
|
|
86
99
|
| 下一个 / 上一个标签页 | `Ctrl+Tab` / `Ctrl+Shift+Tab` | `Cmd+Tab` / `Cmd+Shift+Tab` |
|
|
87
100
|
| 关闭标签页 | `Ctrl+F4` | `Cmd+F4` |
|
|
88
|
-
| 显示 /
|
|
101
|
+
| 显示 / 隐藏项目面板 | `Ctrl+Shift+E` | `Cmd+Shift+E` |
|
|
89
102
|
| 文档大纲 | `Ctrl+Shift+O` | `Cmd+Shift+O` |
|
|
90
103
|
| 编辑器内查找 | `Ctrl+F` | `Cmd+F` |
|
|
91
104
|
| 跳转定义 | `F12` / `Ctrl+单击` | `F12` / `Cmd+单击` |
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
# 功能回归清单
|
|
2
|
+
|
|
3
|
+
每次改动后按顺序执行,确保既有功能不被破坏。
|
|
4
|
+
|
|
5
|
+
## 一、自动回归(必跑)
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
node scripts/verify.mjs
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
等价于 `npm test` 的全部步骤,逐步输出、失败即停:
|
|
12
|
+
|
|
13
|
+
| 步骤 | 覆盖内容 |
|
|
14
|
+
|---|---|
|
|
15
|
+
| build client bundle | `src/client/*.js` 拼成 `lib/client.js` |
|
|
16
|
+
| syntax check bundle | `node --check` |
|
|
17
|
+
| hooks placement | Hooks 只在组件体层(防止 Invalid hook call 再次出现) |
|
|
18
|
+
| smoke client | CHANGES 面板纯函数、ROUTES、i18n 键集、样式关键规则 |
|
|
19
|
+
| smoke host routes | 21 条 API 路由的注册、参数校验、错误码(含 stage/unstage/commit/push/discard/git-diff) |
|
|
20
|
+
| client state | 页面级状态机 20 个场景(基线切换、会话恢复、diff 缓存等) |
|
|
21
|
+
| shortcuts | 快捷键 6 项 |
|
|
22
|
+
| git read layer | 只读 git 层 17 组回归 |
|
|
23
|
+
| lsp bridge | LSP 桥 14 组 |
|
|
24
|
+
| git extras | blame / history / AI 提交信息 / discard(真实临时仓库 11 项) |
|
|
25
|
+
|
|
26
|
+
## 二、GUI 手工验收(重启 DSH NEXT 后)
|
|
27
|
+
|
|
28
|
+
> 改动涉及客户端 bundle 时,必须 Cmd+Q 重启(Desktop 不支持 Cmd+R)。
|
|
29
|
+
|
|
30
|
+
- [ ] 右侧栏「Git 审查」页签可打开,**不空白、无 React 报错**(日志 `~/.dsh/logs/desktop-next.log` 无 `slot entry crashed`)
|
|
31
|
+
- [ ] 左栏「更改 | 文件树」切换正常;树/列表视图切换正常;折叠状态重启后保留
|
|
32
|
+
- [ ] 分支名、ahead/behind、刷新按钮正常
|
|
33
|
+
- [ ] 提交框可输入;✨ 生成**中文** Conventional Commits 信息;⌘Enter 提交
|
|
34
|
+
- [ ] 暂存:单文件 `+`、目录行 `+`、分组头全部暂存;取消暂存 `−` 同理
|
|
35
|
+
- [ ] 放弃更改:单文件/全部 → 弹确认框 → 确认后文件恢复;未跟踪文件被删除
|
|
36
|
+
- [ ] 点文件按 staged/unstaged 打开对应 diff;内联 ↔ 左右并排切换;差异处有红绿底色
|
|
37
|
+
- [ ] `↑ n/m ↓` 改动导航可跳转;重启后**仍记得上次基线**,箭头/底色不消失
|
|
38
|
+
- [ ] Blame 开关可显示行尾作者;提交图谱可展开、点提交可打开该版本 diff
|
|
39
|
+
- [ ] 旧 `dsh-review-panel` 已禁用、与新版不冲突
|
|
40
|
+
|
|
41
|
+
## 三、日志自查
|
|
42
|
+
|
|
43
|
+
```bash
|
|
44
|
+
tail -n 200 ~/.dsh/logs/desktop-next.log | grep -E "dsh-git-changes|slot entry crashed|React error"
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
出现 `slot entry crashed` / `React error` 时必须回滚并定位(历史事故:blame 补丁把两个 `useEffect` 嵌进了别的 effect,触发 Invalid hook call,面板空白)。
|
package/package.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-git-changes",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"license": "MIT",
|
|
6
|
-
"description": "Cursor-style Git changes panel for the DSH right sidebar: staged/unstaged trees, stage/unstage, commit & push, inline or side-by-side diffs, AI commit messages, blame
|
|
6
|
+
"description": "Cursor-style Git changes panel for the DSH right sidebar: staged/unstaged trees, stage/unstage, commit & push, inline or side-by-side diffs, AI commit messages, blame and full-source review.",
|
|
7
7
|
"keywords": [
|
|
8
8
|
"dsh",
|
|
9
9
|
"dsh-plugin",
|
|
@@ -47,7 +47,8 @@
|
|
|
47
47
|
"LICENSE",
|
|
48
48
|
"THIRD_PARTY_NOTICES.md",
|
|
49
49
|
"licenses",
|
|
50
|
-
"docs/images"
|
|
50
|
+
"docs/images",
|
|
51
|
+
"docs/regression-checklist.md"
|
|
51
52
|
],
|
|
52
53
|
"dsh": {
|
|
53
54
|
"bundle": {
|
|
@@ -63,4 +64,4 @@
|
|
|
63
64
|
}
|
|
64
65
|
},
|
|
65
66
|
"author": "dsh-git-changes contributors"
|
|
66
|
-
}
|
|
67
|
+
}
|