dsh-ide-git 0.21.2 → 0.22.0

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
@@ -98,6 +98,7 @@ DSH 自带的 Git 面板覆盖「暂存 / 提交 / 还原 / 看历史」;`dsh-id
98
98
  | 状态行 | 当前分支、上游、`↑ahead ↓behind`、stash 数量、忙碌指示 |
99
99
  | 输入框状态条 | 宿主输入框工具条里的仓库/分支胶囊(着色 ±未提交 / ↓可拉取 / ↑待推送),点击切换仓库与分支,与面板双向联动;单仓库只切分支,多仓库两边都切;设置可关(默认开) |
100
100
  | 分支树 | `HEAD / 本地 / 远程 / 标签` 分组(可折叠)、过滤框、星标当前分支、ahead/behind 角标、worktree 占用标记;本地蓝 / 远程紫 / 标签黄 / HEAD 绿 |
101
+ | 工作树 | 动作条新增「工作树」视图:列出主工作树与全部链接工作树(当前 / 主工作树 / 已锁定 / 可清理标记、分支、短 HEAD、路径),可新建(新分支或挂已有分支,可指定起点)、在面板中打开、复制路径、移除(有未提交改动需二次强制确认)、清理失效记录;与官方「变更请求」面板并存 |
101
102
  | 分支右键 | 签出、将当前分支变基到此、合并到当前分支、与当前分支比较、从该分支新建分支、重命名、删除(当前分支禁用)、更新(Fetch)、推送、发送到对话(分支名 + 仓库) |
102
103
  | 历史筛选 | 文本或哈希、分支或标签、提交人、日期(今天 / 近 7 天 / 近 30 天 / 今年),外加排序方向(新→旧 / 旧→新)与一键清除;路径筛选回车后由 git 服务端过滤(`git log -- <path>`) |
103
104
  | 提交列表 | 列序对齐 IDEA:**日期 → 提交人 → 图谱 → 分支标签 → 提交信息**;lane 拓扑图整格连线(相邻行像素对齐)、HEAD 空心点、refs 徽章(HEAD 绿 / 本地蓝 / 远程紫 / 标签黄,最多 3 个 + `+n`)、加载更多/无限滚动(每页 120)、三列表框选批量选中 |
@@ -127,7 +128,7 @@ dsh plugin --profile web add dsh-better-sidebar
127
128
 
128
129
  ### 兼容性
129
130
 
130
- - `engines.dsh` 声明为 **`>=0.1.2-0`** ——0.1.2 起的全部版本都算,包括 `0.1.5-rc` / `0.1.6-alpha` 这类**预发布**(纯 semver 下预发布默认不匹配任何范围,所以起点写成了 `-0`)。**同一个值也是 `@deepseek-ai/dsh` 的 peerDependencies**:dsh 0.1.7 起会强制执行 peer 里的 `@deepseek-ai/dsh*` 范围(不满足就不加载),而 `engines` 没有任何读取方——写进 peer 才算数。范围是**开放下界、不封顶**,所以 0.1.7 起的任何宿主(含 rc / alpha 预发布)都不会因此被禁用;0.1.0–0.1.6 没有这套检查,完全不受影响。
131
+ - `engines.dsh` 与 `@deepseek-ai/dsh` 的 peerDependencies 都声明为 **`>=0.2.2-alpha.2`**:本版跟随 dsh 0.2.2-alpha.2 的会话列表行尾座位与模型徽章字段,pre-release 需要显式写出起点才匹配。范围是**开放下界、不封顶**,之后的 rc / alpha 预发布都算。dsh 会强制执行 peer 里的 `@deepseek-ai/dsh*` 范围(不满足就不加载),`engines` 是给包管理器与排障看的第二份声明。
131
132
  - 只依赖三样长期契约:宿主半的 `webServer.register({ kind: 'prefix' })` 路由、客户端半的 `window.__ModuleLoader__.load({ id, factory })`、以及客户端的 `slots` 服务。**不引用 `ui-primitives` 图标集**(图标全是自带 SVG),所以宿主删改图标不会波及本插件。
132
133
  - 底座是**可选** peer:没装、装坏了、或它自己要等上游修,都不影响本插件挂到原生右侧栏。
133
134
 
@@ -146,7 +147,7 @@ dsh plugin --profile web add dsh-better-sidebar
146
147
  └─ 会话工作区 = cwd(客户端 scope.cwd 传入)
147
148
  ```
148
149
 
149
- - **宿主半**:一个前缀路由 `/dsh-ide-git/api`,方法表 32 个(`summary` / `branches` / `log` / `commitDetail` / `diff` / `compare` / `stage` / … / `push` / `tagDelete` / `version`)。所有 git 调用都是 **argv 数组 + `spawn`**(没有 shell 字符串、没有 `exec`),参数先过校验(绝对路径、ref 不以 `-` 开头、无控制字符、路径不越出仓库)。
150
+ - **宿主半**:一个前缀路由 `/dsh-ide-git/api`,方法表 51 个(`summary` / `branches` / `log` / `commitDetail` / `diff` / `compare` / `stage` / … / `push` / `tagDelete` / `version`)。所有 git 调用都是 **argv 数组 + `spawn`**(没有 shell 字符串、没有 `exec`),参数先过校验(绝对路径、ref 不以 `-` 开头、无控制字符、路径不越出仓库)。
150
151
  - **客户端半**:无构建、单文件、`window.__ModuleLoader__.load({ id, factory })` 包装,只 `require('react')`(DSH 客户端基线模块白名单内)。
151
152
  - **信任围栏**:路由挂在 DSH 自己的 web server 上,天然同源;只有 Host 为 loopback,或浏览器标记 `Sec-Fetch-Site: same-origin/same-site` 的请求才会被服务。
152
153
  - **破坏性操作**:`push` / 硬重置 / 强制删分支 / 丢弃未跟踪文件 / 删除 stash 都必须显式 `confirm: true`,UI 侧一律弹二次确认。
@@ -158,8 +159,7 @@ dsh plugin --profile web add dsh-better-sidebar
158
159
  - 交互式变基(`rebase -i`)、fixup/squash、补丁(format-patch/apply);
159
160
  - 三方合并冲突编辑器、冲突解决动作(接受本地/远端);
160
161
  - blame / 文件历史视图、行级注释;
161
- - 设置页的插件自有开关(提交后自动刷新、diff 上下文行数等);
162
- - worktree 视图(当前只在分支行标注占用)。
162
+ - 设置页的插件自有开关(提交后自动刷新、diff 上下文行数等)。
163
163
  - **只面向 `web` profile**:`dsh.client.platform` 为 `web`;桌面客户端的 renderer 复用同一套 shell 资产,但尚未真机验证。
164
164
  - **不写 `.git`**:所有操作都通过 `git` 命令走正常索引/引用,插件不直接改 `.git` 内部文件。
165
165
  - **大仓库**:提交列表分页(120/页),diff 输出上限 400KB(超出截断并标记)。
package/README_EN.md CHANGED
@@ -86,6 +86,7 @@ The panel never guesses: it measures itself with a `ResizeObserver` (width ≥ 6
86
86
  - Status line: branch, upstream, ahead/behind, stash count, busy indicator.
87
87
  - Composer status pill: repository/branch capsule in the host input-bar tool row (colored uncommitted / pullable / to-push counters), click to switch repo and branch — kept in sync with the panel both ways; single-repo workspaces switch branches only, multi-repo workspaces switch both. Off-switch in the settings (on by default). Sessions are pre-warmed on switch so the panel opens instantly.
88
88
  - Branch tree: HEAD / Local / Remote / Tags groups, filter box, ahead/behind badges, worktree marker; local blue / remote violet / tag amber / HEAD green.
89
+ - Worktrees: a rail view listing the primary and every linked worktree (current / primary / locked / prunable badges, branch, short HEAD, path). Create one on a new branch or attach an existing branch (with an optional start point), open it in the panel, copy its path, remove it (a dirty tree asks for a second, forced confirmation), and prune stale records. It coexists with the official change-request panel.
89
90
  - Branch context menu: checkout, rebase current onto this, merge into current, compare with current, new branch from here, rename, delete, fetch, push, send to chat (branch + repo).
90
91
  - History filters: text or hash, branch or tag, author (with a one-click "Me" entry), date (today / 7 days / 30 days / this year), an order toggle (newest / oldest first) and one-click clear; the path filter runs server-side (`git log -- <path>`) on Enter. Infinite scroll keeps loading pages at the list edge, rubber-band selection works across all three lists, and double-clicking a branch browses its history without checking it out.
91
92
  - Commit list: IDEA column order — **date → author → graph → refs → subject**; a lane graph whose segments span whole rows (pixel-aligned across rows), a hollow dot for HEAD, refs badges (HEAD green / local blue / remote violet / tag amber, at most three plus `+n`), load more (120 per page).
@@ -93,7 +94,7 @@ The panel never guesses: it measures itself with a `ResizeObserver` (width ≥ 6
93
94
  - Commit details: full message, author/date, changed files with +/− and per-file line diff.
94
95
  - Diff pane: rendered with DSH's own DiffBlock (red/green rows plus a copy / wrap toolbar), draggable height remembered per placement; **select diff rows and right-click** to send a line-level reference into the conversation — an `@file` chip plus the line range with commit (hash / subject / current branch) or worktree (staged / uncommitted) context; deleted rows are labelled as old-numbered, selections that cannot be pinned to rows degrade to the raw snippet (truncated at 600 characters), and a copy-reference item is always available.
95
96
  - Changes: conflicts / staged / changes / untracked groups, inline stage / unstage / discard, group-level actions, click for diff.
96
- - Commit box: multi-line message, Ctrl+Enter (Cmd+Enter) to commit, amend.
97
+ - Commit box: multi-line message, Ctrl+Enter (Cmd+Enter) to commit, amend. The AI commit-message model picker also shows each model's listing badge, localized to the active interface language.
97
98
  - File context menu: show diff, stage / unstage, discard changes, copy path, send to chat (an `@file` reference chip or the raw path).
98
99
  - **Safety and undo**: deleting a branch or a stash pops a toast in the corner with an **Undo** action — the delete is real, and undo recreates the ref from the object id recorded just before it (one-shot, valid for 30 minutes). Deleting `main` / `master` / `trunk` requires typing the branch name, destructive dialogs focus Cancel instead of the red button, writes are serialised per repository on the host, and while a merge / rebase / cherry-pick / revert / bisect is still open the affected actions are greyed out with the reason.
99
100
 
@@ -114,7 +115,7 @@ Restart `dsh web`, then:
114
115
 
115
116
  ### Compatibility
116
117
 
117
- - `engines.dsh` is **`>=0.1.2-0`**: every DSH from 0.1.2 up, prereleases such as `0.1.5-rc` / `0.1.6-alpha` included (plain semver never matches a prerelease against a range, hence the `-0` floor). **The same value is also the `@deepseek-ai/dsh` peerDependency**: DSH 0.1.7+ enforces `@deepseek-ai/dsh*` peer ranges (an unsatisfied one keeps the plugin from loading) while nothing reads `engines`, so the peer is where the fact has to live. The range is an **open floor with no ceiling**, so no host from 0.1.7 on (prereleases included) can be rejected by it, and 0.1.0–0.1.6 never run that check at all.
118
+ - `engines.dsh` and the `@deepseek-ai/dsh` peerDependency are both **`>=0.2.2-alpha.2`**: this release follows the 0.2.2-alpha.2 session-row trailing seat and model badge fields, and a prerelease needs an explicit floor to match. The range is an **open floor with no ceiling**, so later rc / alpha prereleases are included. DSH enforces the peer range (an unsatisfied one keeps the plugin from loading); `engines` is the second declaration for package managers and diagnostics.
118
119
  - Three long-lived contracts, nothing else: the host's `webServer.register({ kind: 'prefix' })` route, the client's `window.__ModuleLoader__.load({ id, factory })`, and the client `slots` service. It does **not** import the `ui-primitives` icon set (every icon is an inline SVG), so host icon changes cannot reach it.
119
120
  - better-sidebar is an **optional** peer: absent, broken, or waiting on its own upstream fix, the plugin still mounts in the native right sidebar.
120
121
 
@@ -126,7 +127,7 @@ The dictionaries live in the `LOCALES` table inside `src/client.js`: one entry p
126
127
 
127
128
  ## How it works
128
129
 
129
- - **Host half** (`src/index.js`): one prefix route `/dsh-ide-git/api` with a 32-method table. Every git call is an argv array through `spawn` — no shell string, no `exec` — with argument validation (absolute paths, refs never start with `-`, paths stay inside the repository).
130
+ - **Host half** (`src/index.js`): one prefix route `/dsh-ide-git/api` with a 51-method table. Every git call is an argv array through `spawn` — no shell string, no `exec` — with argument validation (absolute paths, refs never start with `-`, paths stay inside the repository).
130
131
  - **Client half** (`src/client.js`): no build step, single file, `window.__ModuleLoader__.load({ id, factory })`, requiring only `react` (a DSH client baseline module).
131
132
  - **Trust fence**: only loopback Hosts, or same-origin browser requests (`Sec-Fetch-Site`), are served.
132
133
  - **Destructive actions** (push, hard reset, force delete, discarding untracked files, dropping a stash) require an explicit `confirm: true` and always ask in the UI first.
@@ -139,7 +140,7 @@ npm test # smoke (file-level invariants) + api (a real throwaway repo driven t
139
140
 
140
141
  ## Limits / roadmap
141
142
 
142
- v0.1.0 covers the main path. Still missing: multi-select and partial commits (changelists), interactive rebase / fixup / squash, patches, a merge-conflict editor, blame and file history, plugin-owned settings rows, a worktree view, and desktop-client verification. Large repositories: paginated log and a 400KB diff cap.
143
+ v0.1.0 covers the main path. Still missing: multi-select and partial commits (changelists), interactive rebase / fixup / squash, patches, a merge-conflict editor, blame and file history, plugin-owned settings rows, and desktop-client verification. Large repositories: paginated log and a 400KB diff cap.
143
144
 
144
145
  ## License
145
146
 
package/dsh.plugin.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "id": "dsh-external/dsh-ide-git",
3
- "version": "0.21.2",
3
+ "version": "0.22.0",
4
4
  "main": "./src/index.js",
5
5
  "description": "IDE 级 Git 操作面板:分支树 + 提交图谱 + 变更/暂存/提交 + 提交详情。装了 dsh-better-sidebar 时挂成它的原生 tab(右侧栏 + 底部工作台);没装时直接挂 DSH 原生右侧栏,单独安装即可用。JetBrains 风格 Git 工具窗口 for DeepSeek Harness.",
6
6
  "engines": {
7
- "dsh": ">=0.1.6-alpha.2"
7
+ "dsh": ">=0.2.2-alpha.2"
8
8
  },
9
9
  "contributes": {
10
10
  "tools": [],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-ide-git",
3
- "version": "0.21.2",
3
+ "version": "0.22.0",
4
4
  "description": "DSH plugin: an IDE-grade Git tool window as a native dsh-better-sidebar tab — branch tree, commit graph, changes, commit details, JetBrains-style actions, in the right sidebar and the bottom panel. | DSH 插件:IDE 级 Git 工具窗口,以 dsh-better-sidebar 原生 Tab 挂载——分支树 / 提交图谱 / 变更与提交详情 / JetBrains 风格操作,右侧栏与底部面板双布局自适应。",
5
5
  "type": "module",
6
6
  "repository": {
@@ -19,7 +19,7 @@
19
19
  },
20
20
  "engines": {
21
21
  "node": ">=18",
22
- "dsh": ">=0.1.6-alpha.2"
22
+ "dsh": ">=0.2.2-alpha.2"
23
23
  },
24
24
  "dsh": {
25
25
  "bundle": {
@@ -66,7 +66,7 @@
66
66
  "license": "MIT",
67
67
  "peerDependencies": {
68
68
  "@deepseek-ai/cordis": "^4.0.1",
69
- "@deepseek-ai/dsh": ">=0.1.6-alpha.2",
69
+ "@deepseek-ai/dsh": ">=0.2.2-alpha.2",
70
70
  "dsh-better-sidebar": ">=0.12.0"
71
71
  },
72
72
  "peerDependenciesMeta": {