-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathpackage.json
More file actions
436 lines (436 loc) · 14.9 KB
/
package.json
File metadata and controls
436 lines (436 loc) · 14.9 KB
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
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
{
"name": "vscode-git-commit-message-generator",
"displayName": "Git Commit Message Generator",
"description": "一个强大的Git提交信息生成器,基于AI模型自动分析暂存的代码变更并生成规范的commit message。支持Ollama和OpenAI等多种LLM服务,可自定义提示词模板、温度参数等配置选项,让Git提交更加智能和高效。",
"version": "0.1.6",
"publisher": "chenkai2",
"author": {
"name": "chenkai2"
},
"repository": {
"type": "git",
"url": "https://github.com/chenkai2/vscode-git-commit-message-generator.git"
},
"keywords": [
"git",
"commit",
"message",
"generator",
"ai",
"llm",
"ollama",
"openai"
],
"engines": {
"vscode": "^1.57.0"
},
"categories": [
"SCM Providers",
"Other"
],
"icon": "media/panda-avatar.png",
"activationEvents": [
"onCommand:vscode-git-commit-message-generator.generateCommitMessage"
],
"main": "./dist/extension.js",
"contributes": {
"commands": [
{
"command": "vscode-git-commit-message-generator.generateCommitMessage",
"title": "生成 Commit Message",
"icon": {
"dark": "media/commit-message-generator-dark.svg",
"light": "media/commit-message-generator-light.svg"
}
}
],
"menus": {
"scm/title": [
{
"when": "scmProvider == git",
"command": "vscode-git-commit-message-generator.generateCommitMessage",
"group": "navigation",
"order": 1
}
]
},
"configuration": {
"title": "Git Commit Message Generator",
"properties": {
"vscode-git-commit-message-generator.llm.provider": {
"type": "string",
"enum": [
"aliyun",
"openai",
"ollama",
"deepseek",
"anthropic",
"tencent",
"siliconflow",
"volcengine",
"custom"
],
"enumDescriptions": [
"阿里云百炼",
"OpenAI",
"Ollama本地部署",
"DeepSeek",
"Anthropic Claude",
"腾讯混元",
"硅基流动",
"火山引擎",
"自定义配置"
],
"default": "custom",
"description": "选择LLM服务提供商"
},
"vscode-git-commit-message-generator.providers.aliyun.url": {
"type": "string",
"default": "https://dashscope.aliyuncs.com/compatible-mode/v1/chat/completions",
"description": "阿里云百炼API地址"
},
"vscode-git-commit-message-generator.providers.aliyun.model": {
"type": "string",
"enum": [
"Moonshot-Kimi-K2-Instruct",
"deepseek-r1",
"deepseek-r1-distill-llama-70b",
"deepseek-v3.1",
"deepseek-v3.2",
"deepseek-v3.2-exp",
"glm-4.5",
"glm-4.5-air",
"gui-plus",
"kimi-k2-thinking",
"llama-4-maverick-17b-128e-instruct",
"llama-4-scout-17b-16e-instruct",
"qwen-flash",
"qwen-flash-2025-07-28",
"qwen-long",
"qwen-max",
"qwen-mt-flash",
"qwen-mt-lite",
"qwen-mt-plus",
"qwen-mt-turbo",
"qwen-plus-2025-07-14",
"qwen-plus-2025-07-28",
"qwen-plus-2025-12-01",
"qwen-turbo-2025-02-11",
"qwen-turbo-2025-07-15",
"qwen-vl-max-2025-08-13",
"qwen-vl-ocr-2025-08-28",
"qwen-vl-ocr-2025-11-20",
"qwen-vl-plus-2025-08-15",
"qwen2.5-0.5b-instruct",
"qwen2.5-1.5b-instruct",
"qwen3-235b-a22b-instruct-2507",
"qwen3-235b-a22b-thinking-2507",
"qwen3-30b-a3b-instruct-2507",
"qwen3-30b-a3b-thinking-2507",
"qwen3-coder-30b-a3b-instruct",
"qwen3-coder-480b-a35b-instruct",
"qwen3-coder-flash",
"qwen3-coder-flash-2025-07-28",
"qwen3-coder-plus",
"qwen3-coder-plus-2025-07-22",
"qwen3-max-preview",
"qwen3-vl-30b-a3b-instruct",
"qwen3-vl-30b-a3b-thinking",
"qwen3-vl-8b-instruct",
"qwen3-vl-8b-thinking",
"qwen3-vl-flash",
"qwen3-vl-flash-2025-10-15",
"qwen3-vl-plus-2025-12-19",
"qwq-plus"
],
"default": "deepseek-v3.2",
"description": "阿里云百炼模型"
},
"vscode-git-commit-message-generator.providers.aliyun.apiKey": {
"type": "string",
"default": "",
"description": "阿里云百炼API密钥"
},
"vscode-git-commit-message-generator.providers.openai.url": {
"type": "string",
"default": "https://api.openai.com/v1/chat/completions",
"description": "OpenAI API地址"
},
"vscode-git-commit-message-generator.providers.openai.model": {
"type": "string",
"enum": [
"gpt-5.2",
"gpt-5-mini",
"gpt-5-nano",
"gpt-4.1",
"gpt-4.1-nano",
"gpt-4.1-mini",
"gpt-4o",
"gpt-4o-mini",
"gpt-4",
"gpt-4-turbo",
"gpt-3.5-turbo",
"chatgpt-4o-latest",
"o4-mini",
"o3",
"o3-mini",
"o1",
"o1-pro",
"o1-mini"
],
"default": "gpt-5-mini",
"description": "OpenAI模型"
},
"vscode-git-commit-message-generator.providers.openai.apiKey": {
"type": "string",
"default": "",
"description": "OpenAI API密钥"
},
"vscode-git-commit-message-generator.providers.ollama.url": {
"type": "string",
"default": "http://localhost:11434/api/generate",
"description": "Ollama API地址"
},
"vscode-git-commit-message-generator.providers.ollama.model": {
"type": "string",
"default": "deepseek-r1:7b",
"description": "Ollama模型名称"
},
"vscode-git-commit-message-generator.providers.ollama.apiKey": {
"type": "string",
"default": "",
"description": "Ollama API密钥"
},
"vscode-git-commit-message-generator.providers.ollama.protocol": {
"type": "string",
"enum": [
"openai",
"ollama"
],
"default": "ollama",
"description": "Ollama接口协议"
},
"vscode-git-commit-message-generator.providers.deepseek.url": {
"type": "string",
"default": "https://api.deepseek.com/v1/chat/completions",
"description": "DeepSeek API地址"
},
"vscode-git-commit-message-generator.providers.deepseek.model": {
"type": "string",
"enum": [
"deepseek-chat",
"deepseek-reasoner"
],
"default": "deepseek-chat",
"description": "DeepSeek模型"
},
"vscode-git-commit-message-generator.providers.deepseek.apiKey": {
"type": "string",
"default": "",
"description": "DeepSeek API密钥"
},
"vscode-git-commit-message-generator.providers.anthropic.url": {
"type": "string",
"default": "https://api.anthropic.com/v1/messages",
"description": "Anthropic API地址"
},
"vscode-git-commit-message-generator.providers.anthropic.model": {
"type": "string",
"enum": [
"claude-sonnet-4-5",
"claude-haiku-4-5",
"claude-opus-4-5",
"claude-3-opus",
"claude-3-haiku",
"claude-3-5-sonnet",
"claude-3-5-haiku",
"claude-3-7-sonnet",
"claude-opus-4",
"claude-sonnet-4",
"claude-3-opus-20240229",
"claude-3-haiku-20240307",
"claude-3-5-sonnet-20241022",
"claude-3-5-haiku-20241022",
"claude-3-7-sonnet-20250219",
"claude-opus-4-20250514",
"claude-sonnet-4-20250514"
],
"default": "claude-sonnet-4-5",
"description": "Anthropic模型"
},
"vscode-git-commit-message-generator.providers.anthropic.apiKey": {
"type": "string",
"default": "",
"description": "Anthropic API密钥"
},
"vscode-git-commit-message-generator.providers.tencent.url": {
"type": "string",
"default": "https://api.hunyuan.cloud.tencent.com/v1/chat/completions",
"description": "腾讯混元API地址"
},
"vscode-git-commit-message-generator.providers.tencent.model": {
"type": "string",
"enum": [
"hunyuan-2.0-thinking-20251109",
"hunyuan-2.0-instruct-20251111",
"hunyuan-a13b",
"hunyuan-turbos-latest",
"hunyuan-embedding",
"hunyuan-pro",
"hunyuan-standard",
"hunyuan-lite",
"hunyuan-standard-256k",
"hunyuan-code",
"hunyuan-turbo",
"hunyuan-turbos-latest",
"hunyuan-large",
"hunyuan-t1-latest",
"hunyuan-t1-20250521",
"hunyuan-t1-20250403"
],
"default": "hunyuan-2.0-instruct-20251111",
"description": "腾讯混元模型"
},
"vscode-git-commit-message-generator.providers.tencent.apiKey": {
"type": "string",
"default": "",
"description": "腾讯混元API密钥"
},
"vscode-git-commit-message-generator.providers.siliconflow.url": {
"type": "string",
"default": "https://api.siliconflow.cn/v1/chat/completions",
"description": "硅基流动API地址"
},
"vscode-git-commit-message-generator.providers.siliconflow.model": {
"type": "string",
"default": "THUDM/glm-4-9b-chat",
"description": "硅基流动模型"
},
"vscode-git-commit-message-generator.providers.siliconflow.apiKey": {
"type": "string",
"default": "",
"description": "硅基流动API密钥"
},
"vscode-git-commit-message-generator.providers.volcengine.url": {
"type": "string",
"default": "https://ark.cn-beijing.volces.com/api/v3/chat/completions",
"description": "火山引擎API地址"
},
"vscode-git-commit-message-generator.providers.volcengine.model": {
"type": "string",
"enum": [
"deepseek-v3-2-251201",
"deepseek-v3-1-terminus",
"deepseek-v3-1-250821",
"deepseek-v3-250324",
"deepseek-v3-241226",
"deepseek-r1-250120",
"deepseek-r1-distill-qwen-32b-250120",
"kimi-k2-thinking-251104",
"doubao-seed-1-8-251215",
"doubao-seed-code-preview-251028",
"doubao-seed-1-6-lite-251015",
"doubao-seed-1-6-flash-250828",
"doubao-seed-1-6-vision-250815",
"doubao-pro-32k-241215",
"doubao-1-5-pro-256k-250115",
"doubao-1-5-thinking-pro-m-250428",
"doubao-1-5-thinking-pro-250415"
],
"default": "deepseek-v3-2-251201",
"description": "火山引擎模型"
},
"vscode-git-commit-message-generator.providers.volcengine.apiKey": {
"type": "string",
"default": "",
"description": "火山引擎API密钥"
},
"vscode-git-commit-message-generator.providers.custom.url": {
"type": "string",
"default": "",
"description": "自定义API地址"
},
"vscode-git-commit-message-generator.providers.custom.model": {
"type": "string",
"default": "",
"description": "自定义模型"
},
"vscode-git-commit-message-generator.providers.custom.apiKey": {
"type": "string",
"default": "",
"description": "自定义API密钥"
},
"vscode-git-commit-message-generator.providers.custom.protocol": {
"type": "string",
"enum": [
"openai",
"ollama"
],
"default": "openai",
"description": "自定义接口协议"
},
"vscode-git-commit-message-generator.llm.prompt": {
"type": "string",
"default": "根据以下Git变更生成Git提交信息,格式为 <type>: <description>。\n文件:${files}\n变更内容:${diff}",
"description": "生成提交信息的提示词模板,支持${files}和${diff}变量"
},
"vscode-git-commit-message-generator.llm.system": {
"type": "string",
"default": "标题行格式为 <type>: <description>,字数不要超过50个,description如果不是中文,则翻译成中文。两个换行后,输出正文内容,每个要点作为一个符号列表,不超过70个字。type使用英文,description和正文用中文,如果不是,则翻译成中文。要点简洁清晰。",
"description": "生成提交信息的系统指令"
},
"vscode-git-commit-message-generator.llm.temperature": {
"type": "number",
"default": 0.7,
"minimum": 0,
"maximum": 1,
"description": "LLM生成结果的温度参数,值越高生成结果越随机"
},
"vscode-git-commit-message-generator.llm.top_p": {
"type": "number",
"default": 0.9,
"minimum": 0,
"maximum": 1,
"description": "LLM生成结果的top_p参数,控制采样时的累积概率阈值"
},
"vscode-git-commit-message-generator.llm.max_tokens": {
"type": "number",
"default": 2048,
"minimum": 1,
"maximum": 8192,
"description": "LLM生成结果的最大token数量"
}
}
}
},
"scripts": {
"vscode:prepublish": "npm run package",
"compile": "webpack",
"watch": "webpack --watch",
"package": "webpack --mode production --devtool hidden-source-map",
"compile-tests": "tsc -p . --outDir out",
"watch-tests": "tsc -p . -w --outDir out",
"pretest": "npm run compile-tests && npm run compile && npm run lint",
"lint": "eslint src --ext ts",
"test": "node ./out/test/runTest.js"
},
"devDependencies": {
"@types/vscode": "^1.57.0",
"@types/glob": "^7.1.3",
"@types/mocha": "^8.2.2",
"@types/node": "14.x",
"eslint": "^7.27.0",
"glob": "^7.1.7",
"mocha": "^8.4.0",
"typescript": "^4.3.2",
"vscode-test": "^1.5.2",
"ts-loader": "^9.2.2",
"webpack": "^5.38.1",
"webpack-cli": "^4.7.0",
"@typescript-eslint/eslint-plugin": "^4.26.0",
"@typescript-eslint/parser": "^4.26.0"
},
"dependencies": {
"simple-git": "^3.5.0"
}
}