-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathREADME.md.en
130 lines (87 loc) · 5.35 KB
/
README.md.en
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
# auto-git-commit-deepseek
A DeepSeek V3 powered VS Code extension, git lazy tool, press Ctrl+Shift+P and type "gen Commit Message"
## Features
Using [DeepSeek](https://www.deepseek.com/) to automatically compare code changes and generate git commit messages following [Angular commit format](https://github.com/angular/angular/blob/main/CONTRIBUTING.md), then auto-push
## Requirements
* [DeepSeek](https://www.deepseek.com/) API Key
* New branches must be pushed first using ``git push --set-upstream origin new-branch``.
---
## Usage
**git add .**

**Ctrl + Shift + p, generate commit message**

**Example Result**

## API Key Settings
Adopt SecureStore, will ask for API Key if needed.
## Extension Settings
Since the diff output may contain unnecessary content or length issues, please refer to the settings. Default values should work for most cases.
---
### Basic Settings
| Setting | Type | Default | Example | Description |
| --------------- | -------- | ------------------------------------------------ | ----------------------- | -------------------------------------------------------------------- |
| url | string | [https://api.deepseek.com](https://api.deepseek.com) | | API URL |
| autoPush | boolean | true | | Auto push after commit |
| autoAdd | boolean | true | | Auto Add, add command parameter is rootPath/* |
| language | string | System language | en | Supported languages: en, zh-CN, ja, etc. |
| model | string | deepseek-chat | | Available models: deepseek-chat (currently only supports deepseek-chat) |
| temperature | float | 0.7 | | Creativity (0-2) |
| maxTokens | number | 500 | | Maximum length of generated content |
| excludeFiles | string[] | [".png", ".jpg", ".gif", ".svg"] | | Exclude specific file types using glob patterns |
| excludePatterns | string[] | ["import"] | ["^//", "console.log"] | Exclude code snippets containing specific patterns using regex (automatically adds ^ and $ anchors) |
---
### Token Length Settings for Prompts (Using estimated calculation, not precise)
| Setting | Type | Default | Example | Description |
| ----------------- | ------- | ------- | ------- | -------------------------------------------- |
| forceTruncat | boolean | true | | Only effective when this setting is true |
| maxPossibleToken | number | 32768 | | Refer to model version length reference table |
| chineseRatio | float | 0.6 | | 0.1~0.9 |
| englishRatio | float | 0.3 | | 0.1~0.9 |
| safetyMargin | float | 0.9 | | 0.1~0.9 Length buffer to avoid exceeding limits |
### Model Version Length Reference Table
---
| Model Version | Max Tokens | Recommended Value |
| --------------------- | ---------- | ----------------- |
| DeepSeek-7B | 4096 | 3000 |
| DeepSeek-16K | 16384 | 12000 |
| DeepSeek-MoE-16B | 32768 | 28000 |
### Common Exclusion Pattern Examples
* `^//`: Exclude all comments
* `console.*`: Exclude all console statements
* `\bTODO\b`: Exclude code containing TODO
* `\d{4}-\d{2}-\d{2}`: Exclude date formats
```json
{
"deepseekCommit.autoPush": true,
"deepseekCommit.autoAdd": true,
"deepseekCommit.language": "zh-CN",
"deepseekCommit.model": "deepseek-chat",
"deepseekCommit.temperature": 0.7,
"deepseekCommit.maxTokens": 500,
"deepssekCommit.excludeFiles": [".png", ".jpg", ".gif", ".svg"],
"deepssekCommit.excludePatterns": ["import"],
"deepseekCommit.forceTruncat": true,
"deepseekCommit.maxPossibleToken": 32768,
"deepseekCommit.chineseRatio": 0.6,
"deepseekCommit.englishRatio": 0.3,
"deepseekCommit.safetyMargin": 0.9,
}
```
## Known Issues
* Fails when exceeding DeepSeek token limits
* Branches must be pushed first using `git push --set-upstream origin new-branch`.
## Release Notes
### 1.0.0
* Initial release of ...
### 1.0.1
* Improved API Key input workflow
### 1.0.6
* Generate different languages according to vscode.env.language.
### 1.0.7
* Default ignoring changes with keywords like 'import, .png, .jpg, .gif'
* Remove some illegal symbols due to massive attacks on DeepSeek server
### 1.0.8
* Added settings feature
### 1.0.9
* Avoid token length limit