git-aicommit 4.0.0 → 4.0.1
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 -15
- package/autocommit.js +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -8,8 +8,10 @@ Tired of writing commit messages? Let the computer do it for you!
|
|
|
8
8
|
|
|
9
9
|
## Installation
|
|
10
10
|
|
|
11
|
+
It's recommended to use [bun](https://bun.sh/)
|
|
12
|
+
|
|
11
13
|
```bash
|
|
12
|
-
|
|
14
|
+
bun install -g git-aicommit
|
|
13
15
|
```
|
|
14
16
|
|
|
15
17
|
## Configuration
|
|
@@ -34,28 +36,30 @@ touch $HOME/.git-aicommitrc
|
|
|
34
36
|
|
|
35
37
|
```js
|
|
36
38
|
// $HOME/.git-aicommitrc
|
|
37
|
-
|
|
39
|
+
export default {
|
|
38
40
|
openAiKey: process.env.OPENAI_API_KEY,
|
|
39
41
|
addAllChangesBeforeCommit: true,
|
|
40
42
|
autocommit: true,
|
|
41
43
|
openCommitTextEditor: false,
|
|
42
|
-
|
|
43
|
-
|
|
44
|
+
language: 'english',
|
|
45
|
+
systemMessagePromptTemplate: '' +
|
|
46
|
+
'You are expert AI, your job is to write clear and concise Git commit messages.' +
|
|
47
|
+
'Your responsibility is to ensure that these messages accurately describe the changes made in each commit,' +
|
|
48
|
+
'follow established guidelines. Provide a clear history of changes to the codebase.' +
|
|
49
|
+
'Write 1-2 sentences. Output only the commit message without comments or other text.',
|
|
50
|
+
humanPromptTemplate: '' +
|
|
51
|
+
'Read the following git diff for a multiple files and ' +
|
|
52
|
+
'write 1-2 sentences commit message in {language}' +
|
|
53
|
+
'without mentioning lines or files:\n' +
|
|
54
|
+
'{diff}',
|
|
44
55
|
excludeFromDiff: [
|
|
45
|
-
'*.lock'
|
|
56
|
+
'*.lock', '*.lockb'
|
|
46
57
|
],
|
|
47
58
|
diffFilter: 'ACMRTUXB',
|
|
48
59
|
completionPromptParams: {
|
|
49
|
-
model: "
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
top_p: 1,
|
|
53
|
-
presence_penalty: 0,
|
|
54
|
-
frequency_penalty: 0,
|
|
55
|
-
best_of: 1,
|
|
56
|
-
n: 1,
|
|
57
|
-
stream: false,
|
|
58
|
-
stop: ["\n\n\n"],
|
|
60
|
+
model: "gpt-3.5-turbo",
|
|
61
|
+
temperature: 0.0,
|
|
62
|
+
maxTokens: 1000,
|
|
59
63
|
}
|
|
60
64
|
}
|
|
61
65
|
```
|
package/autocommit.js
CHANGED