|
1 | | -<p align="center"> |
2 | | - <img src=".github/assets/gitmoji.gif" width="400"> |
3 | | -</p> |
| 1 | +# AI Commit |
4 | 2 |
|
5 | | -<p align="center"> |
6 | | - <img src="https://img.shields.io/badge/gitmoji-%20😜%20😍-FFDD67.svg?style=flat-square"> |
7 | | - <a href="https://github.com/seatonjiang/gitmoji-vscode/issues"> |
8 | | - <img src="https://img.shields.io/github/issues/seatonjiang/gitmoji-vscode?style=flat-square&color=blue"> |
9 | | - </a> |
10 | | - <a href="https://github.com/seatonjiang/gitmoji-vscode/pulls"> |
11 | | - <img src="https://img.shields.io/github/issues-pr/seatonjiang/gitmoji-vscode?style=flat-square&color=brightgreen"> |
12 | | - </a> |
13 | | - <a href="https://github.com/seatonjiang/gitmoji-vscode/blob/main/LICENSE"> |
14 | | - <img src="https://img.shields.io/github/license/seatonjiang/gitmoji-vscode?&style=flat-square"> |
15 | | - </a> |
16 | | -</p> |
| 3 | +AI-powered Git commit message generator for VS Code with Gitmoji support. |
17 | 4 |
|
18 | | -<p align="center">在提交信息中添加表情符号的 VS Code 扩展</p> |
| 5 | + |
19 | 6 |
|
20 | | -<p align="center"> |
21 | | - <strong>简体中文</strong> · <a href=".github/readme/README.en.md">English</a> · <a href=".github/readme/README.pt-br.md">Português Brasileiro</a> · |
22 | | - <a href=".github/readme/README.pt-pt.md">Português Europeu</a> · <a href=".github/readme/README.ja.md">日本語</a> · <a href=".github/readme/README.ko.md">한국어</a> |
23 | | -</p> |
| 7 | + |
24 | 8 |
|
25 | | -## 💻 扩展截图 |
| 9 | +## Features |
26 | 10 |
|
27 | | -<p align="center"> |
28 | | - <img src=".github/assets/about.gif"> |
29 | | -</p> |
| 11 | +- **AI-Powered Commit Messages**: Generate commit messages using AI based on your staged changes |
| 12 | +- **Multiple AI Providers**: Support for DeepSeek, Zhipu AI (GLM), and OpenAI-compatible APIs |
| 13 | +- **Conventional Commits**: Generate messages following the Conventional Commits specification |
| 14 | +- **Style Learning**: Analyze your commit history to match your project's commit style |
| 15 | +- **Multi-language Support**: Generate commit messages in English or Chinese |
| 16 | +- **Gitmoji Integration**: Built-in Gitmoji support for adding emojis to your commits |
30 | 17 |
|
31 | | -## 📦 安装扩展 |
| 18 | +## Supported AI Providers |
32 | 19 |
|
33 | | -1. 首先打开 [Visual Studio Code](https://code.visualstudio.com/); |
34 | | -2. 使用 `Ctrl+Shift+X` 组合键打开「扩展」标签; |
35 | | -3. 输入 `Gitmoji` 寻找此扩展; |
36 | | -4. 点击 `安装` 按钮,然后点击 `启用` 按钮即可。 |
| 20 | +| Provider | Description | |
| 21 | +|----------|-------------| |
| 22 | +| DeepSeek | Fast and affordable | |
| 23 | +| Zhipu AI (GLM) | Chinese language optimized | |
| 24 | +| OpenAI Compatible | Connect to any OpenAI-compatible API | |
37 | 25 |
|
38 | | -**提示**:也可以直接在 Marketplace 中找到 [Gitmoji](https://marketplace.visualstudio.com/items?itemName=seatonjiang.gitmoji-vscode),然后点击 `Install` 即可。 |
| 26 | +## Usage |
39 | 27 |
|
40 | | -## 🔨 配置扩展 |
| 28 | +1. Stage your changes with `git add` |
| 29 | +2. Click the sparkle icon in the SCM panel |
| 30 | +3. Wait for AI to generate the commit message |
| 31 | +4. Review and commit! |
41 | 32 |
|
42 | | -### 表情符号输出类型 |
| 33 | +## Configuration |
43 | 34 |
|
44 | | -- `outputType` - 配置表情符号的输出类型(默认为 `emoji` 模式)。 |
| 35 | +Open VS Code Settings and search for "AI Commit" to configure: |
45 | 36 |
|
46 | | -emoji 模式的例子: |
| 37 | +### AI Provider Settings |
47 | 38 |
|
48 | | - |
| 39 | +- `aiCommit.provider`: Select AI provider (deepseek/zhipu/openai) |
| 40 | +- `aiCommit.deepseek.apiKey`: DeepSeek API Key |
| 41 | +- `aiCommit.zhipu.apiKey`: Zhipu AI API Key (format: api_key.secret) |
| 42 | +- `aiCommit.openai.apiKey`: OpenAI Compatible API Key |
| 43 | +- `aiCommit.openai.endpoint`: Custom API endpoint for OpenAI-compatible services |
49 | 44 |
|
50 | | -code 模式的例子: |
| 45 | +### General Settings |
51 | 46 |
|
52 | | - |
| 47 | +- `aiCommit.language`: Commit message language (auto/en/zh) |
| 48 | +- `aiCommit.includeEmoji`: Include emoji in commit messages |
| 49 | +- `aiCommit.historyCount`: Number of historical commits to analyze for style learning |
| 50 | +- `aiCommit.maxDiffLength`: Maximum diff length to send to AI |
53 | 51 |
|
54 | | -示例配置: |
| 52 | +## Gitmoji Features |
55 | 53 |
|
56 | | -```json |
57 | | -{ |
58 | | - "gitmoji.outputType": "emoji" |
59 | | -} |
60 | | -``` |
| 54 | +This extension also includes Gitmoji functionality: |
61 | 55 |
|
62 | | -> **提示**:如果在 Gitlab 中使用,需要选择「code」模式;如果在 GitHub 中使用,可以随意选择「emoji」或「code」模式。 |
| 56 | +- Click the smiley icon in SCM panel to choose a Gitmoji |
| 57 | +- Configure emoji output type (emoji or code) |
| 58 | +- Add custom emojis |
| 59 | +- Auto-match emojis based on commit message |
63 | 60 |
|
64 | | -### 添加自定义表情符号 |
| 61 | +## License |
65 | 62 |
|
66 | | -- `addCustomEmoji` - 添加自定义表情符号。 |
67 | | - |
68 | | -示例配置: |
69 | | - |
70 | | -```json |
71 | | -{ |
72 | | - "gitmoji.addCustomEmoji": [ |
73 | | - { |
74 | | - "emoji": "🧵", |
75 | | - "code": ":thread:", |
76 | | - "description": "添加或更新与多线程或并发相关的代码" |
77 | | - }, |
78 | | - { |
79 | | - "emoji": "🦺", |
80 | | - "code": ":safety_vest:", |
81 | | - "description": "添加或更新与验证相关的代码" |
82 | | - } |
83 | | - ] |
84 | | -} |
85 | | -``` |
86 | | - |
87 | | -### 仅使用自定义表情符号 |
88 | | - |
89 | | -- `onlyUseCustomEmoji` - 仅使用自定义添加的表情符号,而不使用扩展中自带的表情符号(该功能默认关闭)。 |
90 | | - |
91 | | -示例配置: |
92 | | - |
93 | | -```json |
94 | | -{ |
95 | | - "gitmoji.onlyUseCustomEmoji": true |
96 | | -} |
97 | | -``` |
98 | | - |
99 | | -### 通过简码搜索表情符号 |
100 | | - |
101 | | -- `showEmojiCode` - 开启通过简码搜索表情符号功能(该功能默认关闭)。 |
102 | | - |
103 | | -示例配置: |
104 | | - |
105 | | -```json |
106 | | -{ |
107 | | - "gitmoji.showEmojiCode": true |
108 | | -} |
109 | | -``` |
110 | | - |
111 | | -### 插入位置 |
112 | | - |
113 | | -- `insertPosition` - 配置表情符号的插入位置(默认为 `start`)。 |
114 | | -- 可选值: |
115 | | -- `start`:在消息开头插入,并清理既有前缀表情; |
116 | | -- `end`:在消息末尾插入,并清理既有后缀表情; |
117 | | -- `cursor`:在提交消息输入框的当前光标处插入。 |
118 | | - |
119 | | -示例配置(光标插入): |
120 | | - |
121 | | -```json |
122 | | -{ |
123 | | - "gitmoji.insertPosition": "cursor" |
124 | | -} |
125 | | -``` |
126 | | - |
127 | | -示例配置(消息末尾插入): |
128 | | - |
129 | | -```json |
130 | | -{ |
131 | | - "gitmoji.insertPosition": "end" |
132 | | -} |
133 | | -``` |
134 | | - |
135 | | -### 根据提交消息自动匹配表情符号 |
136 | | - |
137 | | -- `autoMatch` - 根据提交消息自动匹配表情符号功能(该功能默认关闭)。 |
138 | | - |
139 | | -示例配置: |
140 | | - |
141 | | -```json |
142 | | -{ |
143 | | - "gitmoji.autoMatch": true |
144 | | -} |
145 | | -``` |
146 | | - |
147 | | -### 允许重复使用表情符号 |
148 | | - |
149 | | -- `canRepeat` - 允许重复使用表情符号功能(该功能默认关闭)。 |
150 | | - |
151 | | -示例配置: |
152 | | - |
153 | | -```json |
154 | | -{ |
155 | | - "gitmoji.canRepeat": true |
156 | | -} |
157 | | -``` |
158 | | - |
159 | | -## 💖 项目支持 |
160 | | - |
161 | | -如果这个项目为你带来了便利,请考虑为这个项目点个 Star 或者通过微信赞赏码支持我,每一份支持都是我持续优化和添加新功能的动力源泉! |
162 | | - |
163 | | -<div align="center"> |
164 | | - <b>微信赞赏码</b> |
165 | | - <br> |
166 | | - <img src=".github/assets/wechat-reward.png" width="230"> |
167 | | -</div> |
168 | | - |
169 | | -## 🤝 参与共建 |
170 | | - |
171 | | -我们欢迎所有的贡献,你可以将任何想法作为 [Pull Requests](https://github.com/seatonjiang/gitmoji-vscode/pulls) 或 [Issues](https://github.com/seatonjiang/gitmoji-vscode/issues) 提交。 |
172 | | - |
173 | | -## 📃 开源许可 |
174 | | - |
175 | | -项目基于 MIT 许可证发布,详细说明请参阅 [LICENSE](https://github.com/seatonjiang/gitmoji-vscode/blob/main/LICENSE) 文件。 |
| 63 | +MIT |
0 commit comments