@klarkxy/dsh-git-commit 0.2.2 → 0.2.3

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
@@ -1,86 +1,35 @@
1
- # @klarkxy/dsh-git-commit
1
+ # Git Commit
2
2
 
3
3
  <!-- release-state-note -->
4
4
 
5
- Commit workspace changes to git without leaving the chat. Every conversation
6
- thread gets a **Commit** action in its header: click it, check the branch, the
7
- file count and the model that will be used, then confirm to commit every
8
- uncommitted path in the repository that contains the session's working
9
- directory.
10
-
11
5
  [简体中文](docs/README.zh-CN.md)
12
6
 
13
- ## Install
7
+ Commit workspace changes without leaving the chat. A model groups your changes into a few sensible commits and writes their messages.
14
8
 
15
- Requires Node.js ≥22 (26 verified). Install the published package into the target profile
16
- with the DSH plugin manager; the install also enables the `git-commit` entry:
9
+ ## Install
17
10
 
18
11
  ```sh
19
12
  dsh plugin --profile web add @klarkxy/dsh-git-commit
20
13
  ```
21
14
 
22
- Replace `web` with your profile name. Installation or removal may require a
23
- restart when the host asks for one.
24
-
25
- To uninstall:
26
-
27
- ```sh
28
- dsh plugin --profile web remove @klarkxy/dsh-git-commit
29
- ```
30
-
31
- ## How it works
32
-
33
- A model splits the change set into a small number of coherent commits with
34
- proper messages, then the groups are applied in order as path-scoped commits.
35
- The model route comes from this plugin's own settings row: configure the
36
- **Commit planning model** there in advance to pin a dedicated model; when
37
- nothing is configured, the request follows the live session model and then the
38
- host default chat model. If the model call fails or returns an invalid plan,
39
- the run is **rejected** and nothing is staged or committed — a commit the model
40
- never planned is not one you asked for. The plugin page can opt back into the
41
- old behavior with **Commit even without a model plan**, which merges every
42
- change into a single commit with a plugin-written message.
43
-
44
- ## Plugin page settings
45
-
46
- `Settings → Plugins → Git Commit` holds the rows this plugin needs.
47
- **Commit planning model** is optional: a saved route is used for the planning
48
- call as an explicit model, an empty selection follows the live session model
49
- and then the host default chat model, and the conversation header panel reports
50
- which of the two is in effect. Only that call is affected; a saved route selects
51
- a model, but it is not evidence of connectivity. **Commit even without a model
52
- plan** is off by default and only changes what happens when planning produces
53
- nothing.
54
-
55
- ## Usage
15
+ Replace `web` with your profile name and restart it if DSH asks.
56
16
 
57
- 1. Open a conversation whose workspace sits inside a git repository.
58
- 2. Click **Commit** in the thread header (top right).
59
- 3. Confirm in the popover, then wait for the run to finish.
60
- 4. The panel lists every commit it created (hash + message).
17
+ ## Use
61
18
 
62
- The button is disabled while the session is running. The host checks again
63
- before committing, and stops the run if the workspace changes during planning.
19
+ 1. Open a conversation whose workspace is inside a Git repository.
20
+ 2. Click **Commit** in the top-right of the conversation.
21
+ 3. Check the branch, file count, and model, then confirm.
22
+ 4. The panel lists the commits it created.
64
23
 
65
- If a later group fails or the run is cancelled, completed commits stay in place.
66
- The panel shows those commits, the remaining groups and the stopping reason,
67
- then refreshes repository status. A commit whose hash could not be read is
68
- marked explicitly. It never rolls back completed commits or retries them
69
- automatically. Unloading the plugin cancels in-flight planning and rejects new
70
- runs while existing cleanup finishes.
71
- If a rejected Git command leaves HEAD changed or unreadable, its group's outcome
72
- is marked uncertain without attributing a commit to the plugin. Check Git log
73
- and status before acting on that group; it is separate from groups not executed.
24
+ Under **Plugins → Git Commit** you can choose the **Commit planning model** (empty follows the current session model) and turn on **Commit even without a model plan**, which makes one commit when the model is unavailable.
74
25
 
75
- ## Notes
26
+ ## Good to know
76
27
 
77
- - Each selected file is committed from its current worktree content. Pre-staged
78
- changes that belong to another group stay staged until that group is
79
- committed.
80
- - Untracked files are included: small text files get a content preview for the
81
- model, while binaries are listed by path only.
82
- - Commits never push. Pushing stays a manual decision.
28
+ - All uncommitted changes in the repository are included, including new files.
29
+ - It only commits; it never pushes.
30
+ - If the run stops partway, finished commits stay and the panel shows what was left. Nothing is rolled back or retried automatically.
31
+ - The button is unavailable while the session is running.
83
32
 
84
33
  ## License
85
34
 
86
- SEE LICENSE IN LICENSE
35
+ [SATA License 2.1](LICENSE)
@@ -1,64 +1,35 @@
1
- # @klarkxy/dsh-git-commit
1
+ # Git 提交
2
2
 
3
3
  <!-- release-state-note -->
4
4
 
5
- 在对话里直接把工作区修改提交到 git。每个对话线程的右上角都有一个 **提交** 按钮:
6
- 点一下打开弹层,确认分支、文件数量和将使用的模型,再点一下即可把会话工作目录
7
- 所在仓库的全部未提交改动分次提交。
8
-
9
5
  [English](../README.md)
10
6
 
11
- ## 安装
7
+ 不离开对话就能提交工作区改动。模型会把改动分成几个合理的提交,并写好提交信息。
12
8
 
13
- 需要 Node.js ≥22(已验证 26)。用 DSH 插件管理器把已发布包装进目标 profile,安装即启用
14
- `git-commit` 入口:
9
+ ## 安装
15
10
 
16
11
  ```sh
17
12
  dsh plugin --profile web add @klarkxy/dsh-git-commit
18
13
  ```
19
14
 
20
- 把 `web` 换成你的 profile 名。安装或卸载后宿主可能要求重启。
21
-
22
- 卸载:
23
-
24
- ```sh
25
- dsh plugin --profile web remove @klarkxy/dsh-git-commit
26
- ```
27
-
28
- ## 工作方式
29
-
30
- 模型会把改动整理成若干个内聚的提交并生成提交信息,然后按顺序逐组创建限定路径的提交。模型路由由本插件自己的设置行提供:在「设置 → 插件 → Git 提交」提前配置**提交规划模型**即可固定专用模型;没有配置时依次使用当前会话模型和宿主默认对话模型。模型调用失败或返回非法分组时,本次提交会被**拒绝**,不会暂存也不会提交任何内容——模型没有规划过的提交不是你要求的提交。想要回到旧行为,可以在插件页打开**模型不可用时仍然提交**,此时全部改动会合并成一个提交,由插件代写提交信息。
31
-
32
- ## 插件页设置
33
-
34
- 「设置 → 插件 → Git 提交」下是本插件需要的设置项。**提交规划模型**用于提交规划调用,
35
- 可留空:保存某个路由后,对应该调用会使用这个显式模型;留空则使用当前会话模型,
36
- 再回落到宿主默认对话模型。对话头部面板会显示实际生效的是哪一种。只有这个调用受影响;
37
- 保存路由只表示选定模型,不代表已连通。**模型不可用时仍然提交**默认关闭,只在
38
- 规划完全没有产出时改变行为。
15
+ 把 `web` 换成你的 profile 名,DSH 提示时重启。
39
16
 
40
17
  ## 使用
41
18
 
42
- 1. 打开一个工作目录位于 git 仓库内的对话。
43
- 2. 点击线程右上角的 **提交** 按钮。
44
- 3. 在弹层里确认,然后等待执行完成。
45
- 4. 面板会列出创建的每个提交(哈希 + 信息)。
46
-
47
- 会话运行期间按钮不可用。宿主在提交前还会再检查一次,规划期间工作区发生变化时会中止本次提交。
19
+ 1. 打开一个工作目录位于 Git 仓库内的对话。
20
+ 2. 点击对话右上角的「提交」。
21
+ 3. 确认分支、文件数和模型后提交。
22
+ 4. 面板会列出创建的提交。
48
23
 
49
- 后续分组失败或执行被取消时,已经完成的提交仍然保留。面板显示这些提交、剩余
50
- 分组和停止原因,再刷新仓库状态;已创建但未能读回哈希的提交会明确标注。
51
- 插件不会回滚已完成的提交,也不会自动重试。卸载插件会取消正在进行的规划,
52
- 拒绝新的执行,并等待已有操作完成清理。
53
- 如果 Git 命令报错后 HEAD 已变化或无法读回,对应分组会标为“结果不确定”,不擅自
54
- 归属某个提交。请先检查 Git 日志和状态;这一组与尚未执行的分组分开显示。
24
+ 在「插件 → Git 提交」里可以选择**提交规划模型**(留空跟随当前会话模型),也可以打开**模型不可用时仍然提交**,这时所有改动合并为一个提交。
55
25
 
56
- ## 说明
26
+ ## 注意
57
27
 
58
- - 每个选中文件按当前工作区内容提交。属于其他分组的已暂存修改会保留到对应分组提交。
59
- - 未跟踪文件也会提交:较小的文本文件会把内容预览发给模型,二进制文件只列路径。
60
- - 插件只做 commit,不会 push;push 仍由你手动决定。
28
+ - 会提交仓库里的全部未提交改动,包括新文件。
29
+ - 只提交,不推送。
30
+ - 中途停止时,已完成的提交会保留,面板显示剩余内容;不会自动回滚或重试。
31
+ - 会话运行期间按钮不可用。
61
32
 
62
33
  ## 许可证
63
34
 
64
- SEE LICENSE IN LICENSE
35
+ [SATA License 2.1](../LICENSE)
package/locale/en.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "meta": {
3
3
  "title": "Git Commit",
4
- "description": "Commit workspace changes from the conversation header, with AI-split commits via AI Services."
4
+ "description": "Commit workspace changes from the conversation header, with the model grouping the commits."
5
5
  }
6
6
  }
package/locale/zh.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "meta": {
3
3
  "title": "Git 提交",
4
- "description": "从会话顶栏提交工作区修改,并由 AI 服务拆成多次提交。"
4
+ "description": "从会话顶栏提交工作区改动,由模型分组。"
5
5
  }
6
6
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@klarkxy/dsh-git-commit",
3
- "version": "0.2.2",
3
+ "version": "0.2.3",
4
4
  "description": "Git Commit: commit workspace changes from the conversation header, with model-planned commit groups.",
5
5
  "icon": "./icon.svg",
6
6
  "license": "SEE LICENSE IN LICENSE",
@@ -74,8 +74,8 @@
74
74
  "test": "vitest run --root ../.. --config vitest.editor-plugins.config.ts --maxWorkers=2 plugins/dsh-git-commit/src"
75
75
  },
76
76
  "dependencies": {
77
- "@klarkxy/dsh-model-route": "0.2.1",
78
- "@klarkxy/dsh-plugin-kit": "0.3.1",
77
+ "@klarkxy/dsh-model-route": "0.2.2",
78
+ "@klarkxy/dsh-plugin-kit": "0.3.2",
79
79
  "zod": "^4.1.5"
80
80
  },
81
81
  "peerDependencies": {
@@ -124,6 +124,6 @@
124
124
  "registry": "https://registry.npmjs.org/"
125
125
  },
126
126
  "dshRelease": {
127
- "contentHash": "4acf2bc66703208b27ee0eafa2b3eb91cc51907e5ffde9ffcd7d8d98d9a56fdd"
127
+ "contentHash": "077d58a4b92b919573e9181cd1e3bf98f34deaabfd12f2366f87894352b2ab4f"
128
128
  }
129
129
  }