dsh-git-ui 0.0.1 → 0.0.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.md +22 -4
- package/README.zh.md +22 -4
- package/lib/client.js +34 -34
- package/lib/client.js.map +4 -4
- package/lib/host/actions.d.ts +14 -0
- package/lib/host/core.d.ts +24 -0
- package/lib/host/index.d.ts +13 -8
- package/lib/host/index.js +108 -12
- package/lib/host/index.js.map +3 -3
- package/lib/host/types.d.ts +44 -0
- package/package.json +1 -1
- package/src/client/GitCenter.tsx +261 -0
- package/src/client/GitPill.tsx +29 -5
- package/src/client/controller.ts +48 -1
- package/src/client/index.ts +2 -1
- package/src/client/locales.ts +38 -0
- package/src/client/remote.ts +58 -0
- package/src/client/styles.ts +153 -0
- package/src/host/actions.ts +127 -0
- package/src/host/core.ts +31 -12
- package/src/host/index.ts +34 -17
- package/src/host/types.ts +39 -0
package/README.md
CHANGED
|
@@ -1,13 +1,23 @@
|
|
|
1
1
|
# dsh-git-ui
|
|
2
2
|
|
|
3
|
+
[](https://www.npmjs.com/package/dsh-git-ui)
|
|
4
|
+
[](https://www.npmjs.com/package/dsh-git-ui)
|
|
5
|
+
[](https://www.npmjs.com/package/dsh-git-ui)
|
|
6
|
+
|
|
3
7
|
A [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness) (dsh) plugin that visualizes Git status in the Web UI: current branch, HEAD, dirty-state counts (staged / modified / untracked), ahead/behind, recent commits, and changed files — right in the session header, no terminal needed.
|
|
4
8
|
|
|
5
9
|
> Read this in [简体中文](README.zh.md).
|
|
6
10
|
|
|
11
|
+
- 📦 **npm**: <https://www.npmjs.com/package/dsh-git-ui>
|
|
12
|
+
- 🐙 **GitHub**: <https://github.com/Julyves/dsh-git-ui>
|
|
13
|
+
- 🐛 **Issues**: <https://github.com/Julyves/dsh-git-ui/issues>
|
|
14
|
+
|
|
7
15
|
## Features
|
|
8
16
|
|
|
9
17
|
- **Branch pill** in the session header (right-aligned, per-session): shows the current branch at a glance, with dirty-state and ahead/behind indicators:
|
|
10
18
|
|
|
19
|
+
<img src="docs/screenshots/pill.png" alt="Branch pill in the session header" width="720">
|
|
20
|
+
|
|
11
21
|
| State | Pill |
|
|
12
22
|
|---|---|
|
|
13
23
|
| Clean | `⎇ main` |
|
|
@@ -18,9 +28,19 @@ A [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness) (dsh) plug
|
|
|
18
28
|
| Not a git repo | Dimmed `无 Git 仓库` |
|
|
19
29
|
| Git unavailable / error | Dimmed `Git 不可用` (reason in tooltip) |
|
|
20
30
|
|
|
21
|
-
- **Detail popover** (click the pill): repository root, count grid (staged / modified / untracked / ahead / behind), recent commits (hash · subject · author · relative time), changed-file list with status chips, manual refresh button, and last-checked time
|
|
31
|
+
- **Detail popover** (click the pill): repository root, count grid (staged / modified / untracked / ahead / behind), recent commits (hash · subject · author · relative time), changed-file list with status chips, manual refresh button, and last-checked time:
|
|
32
|
+
|
|
33
|
+
<img src="docs/screenshots/popup.png" alt="Git status detail popup" width="720">
|
|
34
|
+
|
|
35
|
+
- **Git center** (management panel from the popup): IDE-style changes view — stage / unstage / discard per file or all, and commit with a message (selected files or everything staged). Every operation refreshes the status instantly:
|
|
36
|
+
|
|
37
|
+
<img src="docs/screenshots/center.png" alt="Git center changes view" width="720">
|
|
38
|
+
|
|
22
39
|
- **Always-fresh data, zero interaction**: automatic fetch on session open, silent polling (host-configured interval, default 30s, no overlapping requests), **immediate refresh when an agent turn completes** (best-effort — the working tree most likely changed right then), resync after reconnect, and a manual refresh button.
|
|
23
|
-
- **Deterministic degradation**: non-git directories, missing cwd, missing git, timeouts, and oversized repositories show stable fallback states — never crashes, never spams
|
|
40
|
+
- **Deterministic degradation**: non-git directories, missing cwd, missing git, timeouts, and oversized repositories show stable fallback states — never crashes, never spams:
|
|
41
|
+
|
|
42
|
+
<img src="docs/screenshots/dirty.png" alt="Clean vs dirty vs non-repository states" width="720">
|
|
43
|
+
|
|
24
44
|
- **Pure read-only UI**: no new model tools, no session events, no impact on agent behavior.
|
|
25
45
|
|
|
26
46
|
## Installation
|
|
@@ -106,8 +126,6 @@ pnpm run build # host (esbuild ESM, never minified) + client (ModuleLoade
|
|
|
106
126
|
dsh plugin --profile web add ./ # local install; restart dsh web to verify
|
|
107
127
|
```
|
|
108
128
|
|
|
109
|
-
See [PLAN.md](PLAN.md) for the architecture research and engineering decisions.
|
|
110
|
-
|
|
111
129
|
## License
|
|
112
130
|
|
|
113
131
|
[MIT](LICENSE)
|
package/README.zh.md
CHANGED
|
@@ -1,13 +1,23 @@
|
|
|
1
1
|
# dsh-git-ui
|
|
2
2
|
|
|
3
|
+
[](https://www.npmjs.com/package/dsh-git-ui)
|
|
4
|
+
[](https://www.npmjs.com/package/dsh-git-ui)
|
|
5
|
+
[](https://www.npmjs.com/package/dsh-git-ui)
|
|
6
|
+
|
|
3
7
|
[DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness)(dsh)Web UI 插件:在会话界面中可视化展示当前工程的 Git 状态——分支、HEAD、脏状态计数(已暂存/已修改/未跟踪)、领先/落后、最近提交与变更文件。无需切换终端,扫一眼即得。
|
|
4
8
|
|
|
5
9
|
> English version: [README.md](README.md)
|
|
6
10
|
|
|
11
|
+
- 📦 **npm**:<https://www.npmjs.com/package/dsh-git-ui>
|
|
12
|
+
- 🐙 **GitHub**:<https://github.com/Julyves/dsh-git-ui>
|
|
13
|
+
- 🐛 **Issues**:<https://github.com/Julyves/dsh-git-ui/issues>
|
|
14
|
+
|
|
7
15
|
## 功能特性
|
|
8
16
|
|
|
9
17
|
- **会话头部分支 Pill**(右侧、每会话独立):常态只显示分支,脏状态与领先/落后以徽标呈现:
|
|
10
18
|
|
|
19
|
+
<img src="docs/screenshots/pill.png" alt="会话头部分支 Pill" width="720">
|
|
20
|
+
|
|
11
21
|
| 状态 | Pill 显示 |
|
|
12
22
|
|---|---|
|
|
13
23
|
| 干净 | `⎇ main` |
|
|
@@ -18,9 +28,19 @@
|
|
|
18
28
|
| 非 git 仓库 | 弱化显示 `无 Git 仓库` |
|
|
19
29
|
| git 不可用/出错 | 弱化显示 `Git 不可用`(tooltip 显示原因) |
|
|
20
30
|
|
|
21
|
-
- **详情面板**(点击 pill 展开):仓库根目录、计数格(已暂存/已修改/未跟踪/领先/落后)、最近提交(哈希·主题·作者·相对时间)、变更文件列表(状态 chip
|
|
31
|
+
- **详情面板**(点击 pill 展开):仓库根目录、计数格(已暂存/已修改/未跟踪/领先/落后)、最近提交(哈希·主题·作者·相对时间)、变更文件列表(状态 chip)、手动刷新按钮、上次检查时间:
|
|
32
|
+
|
|
33
|
+
<img src="docs/screenshots/popup.png" alt="Git 状态详情面板" width="720">
|
|
34
|
+
|
|
35
|
+
- **Git 中心**(从面板进入的管理面板):IDE 式变更视图——单文件/全部暂存、取消暂存、丢弃,以及带提交信息的提交(勾选文件或全部已暂存)。每次操作即时刷新状态:
|
|
36
|
+
|
|
37
|
+
<img src="docs/screenshots/center.png" alt="Git 中心变更视图" width="720">
|
|
38
|
+
|
|
22
39
|
- **数据自动保鲜,零操作**:进入会话自动拉取、静默轮询(间隔由主机下发,默认 30s,不重叠请求)、**agent 完成一个回合后立即刷新**(尽力而为——此时工作区最可能已变化)、断线重连 resync、面板内手动刷新。
|
|
23
|
-
- **确定性降级**:非 git 目录、无 cwd、git
|
|
40
|
+
- **确定性降级**:非 git 目录、无 cwd、git 缺失、超时、巨型仓库等边界显示稳定降级态——不崩溃、不刷屏:
|
|
41
|
+
|
|
42
|
+
<img src="docs/screenshots/dirty.png" alt="干净 / 脏状态 / 非 git 仓库对照" width="720">
|
|
43
|
+
|
|
24
44
|
- **纯只读 UI**:不给模型新增工具、不写会话事件,不改变 agent 的任何行为。
|
|
25
45
|
|
|
26
46
|
## 安装
|
|
@@ -103,8 +123,6 @@ pnpm run build # host(esbuild ESM,禁止压缩)+ client(ModuleLoa
|
|
|
103
123
|
dsh plugin --profile web add ./ # 本地安装;重启 dsh web 验证
|
|
104
124
|
```
|
|
105
125
|
|
|
106
|
-
架构研究与工程决策见 [PLAN.md](PLAN.md)。
|
|
107
|
-
|
|
108
126
|
## 许可证
|
|
109
127
|
|
|
110
128
|
[MIT](LICENSE)
|