@shelken/pi-co-authored-by 0.2.6 → 0.2.8
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 +19 -5
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -1,13 +1,21 @@
|
|
|
1
1
|
# pi-co-authored-by
|
|
2
2
|
|
|
3
|
-
agent
|
|
3
|
+
agent 用 bash 跑 `git commit` 时,自动追加 trailer:
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
-
|
|
5
|
+
```text
|
|
6
|
+
Co-Authored-By: <model> <noreply@pi.dev>
|
|
7
|
+
Generated-By: pi <version>
|
|
8
|
+
```
|
|
9
|
+
|
|
10
|
+
实现:session 级临时 `core.hooksPath` + `prepare-commit-msg`;结束时清理。
|
|
11
|
+
|
|
12
|
+
初始 fork 自 [bruno-garcia/pi-co-authored-by](https://github.com/bruno-garcia/pi-co-authored-by)。
|
|
7
13
|
|
|
8
|
-
|
|
14
|
+
## 功能
|
|
9
15
|
|
|
10
|
-
|
|
16
|
+
- 只挂钩 `bash` 工具调用
|
|
17
|
+
- 模型名取当前 session;没有则 `unknown`
|
|
18
|
+
- 与仓库已有 hook 兼容(先跑临时 hook,再链式原 hook)
|
|
11
19
|
|
|
12
20
|
## 安装
|
|
13
21
|
|
|
@@ -15,6 +23,12 @@ agent 通过 bash 工具执行 `git commit` 时,自动追加:
|
|
|
15
23
|
pi install npm:@shelken/pi-co-authored-by
|
|
16
24
|
```
|
|
17
25
|
|
|
26
|
+
装好后 `/reload`。之后 agent 提交即可,无需额外命令。
|
|
27
|
+
|
|
28
|
+
## 配置
|
|
29
|
+
|
|
30
|
+
无配置文件。
|
|
31
|
+
|
|
18
32
|
## 验证
|
|
19
33
|
|
|
20
34
|
```bash
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@shelken/pi-co-authored-by",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.8",
|
|
4
4
|
"description": "agent 执行 git commit 时自动追加 Co-Authored-By / Generated-By trailer",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
]
|
|
31
31
|
},
|
|
32
32
|
"peerDependencies": {
|
|
33
|
-
"@earendil-works/pi-coding-agent": "
|
|
33
|
+
"@earendil-works/pi-coding-agent": ">=0.80.0"
|
|
34
34
|
},
|
|
35
35
|
"peerDependenciesMeta": {
|
|
36
36
|
"@earendil-works/pi-coding-agent": {
|