-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpackage.json
365 lines (365 loc) · 11.3 KB
/
package.json
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
{
"name": "dish-ai-commit",
"displayName": "Dish AI Commit Gen",
"description": "🤖 AI-Powered VSCode extension for generating standardized Git/SVN commit messages. ✨ Supports multiple AI services: OpenAI, ChatGPT, Ollama, Zhipu, DashScope, Doubao, Gemini and VS Code built-in AI. 🌍 Multi-language support (EN/CN/JP/KR/Other). 📊 Auto-generate weekly reports.",
"version": "0.7.1",
"engines": {
"vscode": "^1.96.0"
},
"publisher": "littleCareless",
"repository": "https://github.com/littleCareless/dish-ai-commit",
"icon": "images/logo.png",
"categories": [
"SCM Providers",
"Machine Learning",
"Snippets",
"Formatters",
"Other"
],
"keywords": [
"OpenAI",
"ChatGPT",
"Ollama",
"Vscode",
"GitEmoji",
"SvnEmoji",
"Git Commit",
"Svn Commit",
"Conventional Commits",
"Commitizen",
"Commit Message",
"Commit Message Generator",
"AI Commit",
"Auto Commit",
"SCM Providers",
"SCM",
"Dish Ai Commit",
"Zhipu",
"DashScope",
"Doubao",
"Gemini"
],
"extensionDependencies": [
"vscode.git"
],
"main": "./out/extension.js",
"activationEvents": [
"onCommand:dish-ai-commit"
],
"contributes": {
"commands": [
{
"command": "extension.dish-ai-commit",
"title": "[Dish] AI Commit Generate",
"category": "[Dish AI Commit]",
"icon": "/images/icon.svg"
},
{
"command": "dish-ai-commit.selectModel",
"title": "[Dish] Select AI Model",
"category": "[Dish AI Commit]",
"icon": "/images/icon.svg",
"description": "选择用于生成提交信息的AI模型(OpenAI/Ollama/VS Code Provided)",
"when": "(config.svn.enabled && svnOpenRepositoryCount > 0) || (config.git.enabled && gitOpenRepositoryCount > 0)"
},
{
"command": "dish-ai-commit.generateWeeklyReport",
"title": "[Dish] Generate Weekly Report with AI",
"category": "[Dish AI Commit]",
"icon": "/images/icon.svg",
"description": "使用 AI 生成周报"
},
{
"command": "dish-ai-commit.reviewCode",
"title": "[Dish] Review Code with AI",
"category": "[Dish AI Commit]",
"icon": "/images/icon.svg",
"description": "使用 AI 对代码进行评审"
}
],
"configuration": {
"title": "Dish AI Commit",
"properties": {
"dish-ai-commit.base.language": {
"type": "string",
"default": "Simplified Chinese",
"description": "Commit message language",
"enum": [
"Simplified Chinese",
"Traditional Chinese",
"Japanese",
"Korean",
"Czech",
"German",
"French",
"Italian",
"Dutch",
"Portuguese",
"Vietnamese",
"English",
"Spanish",
"Swedish",
"Russian",
"Bahasa",
"Polish",
"Turkish",
"Thai"
],
"enumDescriptions": [
"简体中文",
"繁體中文",
"にほんご",
"한국어",
"česky",
"Deutsch",
"française",
"italiano",
"Nederlands",
"português",
"tiếng Việt",
"english",
"español",
"Svenska",
"русский",
"bahasa",
"Polski",
"Turkish",
"ไทย"
]
},
"dish-ai-commit.base.systemPrompt": {
"type": "string",
"default": "",
"description": "Custom system prompt"
},
"dish-ai-commit.base.provider": {
"type": "string",
"default": "OpenAI",
"description": "AI provider",
"enum": [
"OpenAI",
"Ollama",
"VS Code Provided",
"Zhipu",
"DashScope",
"Doubao",
"Gemini",
"Deepseek"
]
},
"dish-ai-commit.base.model": {
"type": "string",
"default": "gpt-3.5-turbo",
"description": "AI model",
"scope": "machine"
},
"dish-ai-commit.providers.openai.apiKey": {
"type": "string",
"default": "",
"description": "OpenAI API Key"
},
"dish-ai-commit.providers.openai.baseUrl": {
"type": "string",
"default": "https://api.openai.com/v1",
"description": "OpenAI API Base URL"
},
"dish-ai-commit.providers.zhipu.apiKey": {
"type": "string",
"default": "",
"description": "Zhipu AI API Key"
},
"dish-ai-commit.providers.dashscope.apiKey": {
"type": "string",
"default": "",
"description": "DashScope API Key"
},
"dish-ai-commit.providers.doubao.apiKey": {
"type": "string",
"default": "",
"description": "Doubao API Key"
},
"dish-ai-commit.providers.ollama.baseUrl": {
"type": "string",
"default": "http://localhost:11434",
"description": "Ollama API Base URL"
},
"dish-ai-commit.providers.gemini.apiKey": {
"type": "string",
"default": "",
"description": "Gemini AI API Key"
},
"dish-ai-commit.providers.deepseek.apiKey": {
"type": "string",
"default": "",
"description": "Deepseek AI API Key"
},
"dish-ai-commit.features.codeAnalysis.simplifyDiff": {
"type": "boolean",
"default": false,
"description": "Enable diff content simplification (Warning: Enabling this feature may result in less accurate commit messages)"
},
"dish-ai-commit.features.codeAnalysis.maxLineLength": {
"type": "number",
"default": 120,
"description": "Maximum line length after simplification"
},
"dish-ai-commit.features.codeAnalysis.contextLines": {
"type": "number",
"default": 3,
"description": "Number of context lines to preserve"
},
"dish-ai-commit.features.commitFormat.enableMergeCommit": {
"type": "boolean",
"default": false,
"description": "Allow merging changes from multiple files into a single commit message"
},
"dish-ai-commit.features.commitFormat.enableEmoji": {
"type": "boolean",
"default": true,
"description": "Use emoji in commit messages"
},
"dish-ai-commit.features.weeklyReport.systemPrompt": {
"type": "string",
"default": "",
"description": "Custom system prompt"
},
"dish-ai-commit.features.codeReview.systemPrompt": {
"type": "string",
"default": "Custom system prompt",
"description": "Custom system prompt for code review"
}
}
},
"menus": {
"scm/title": [
{
"command": "extension.dish-ai-commit",
"when": "scmProvider =~ /(git|svn)/",
"group": "navigation"
}
],
"scm/resourceState/context": [
{
"command": "extension.dish-ai-commit",
"when": "((config.svn.enabled && scmProvider == svn) || (config.git.enabled && scmProvider == git)) && scmResourceGroup != unversioned && scmResourceGroup != external && scmResourceGroup != conflicts && scmResourceGroup != remotechanges",
"group": "1_modification"
},
{
"command": "dish-ai-commit.reviewCode",
"when": "((config.svn.enabled && scmProvider == svn) || (config.git.enabled && scmProvider == git)) && scmResourceGroup != unversioned && scmResourceGroup != external && scmResourceGroup != conflicts && scmResourceGroup != remotechanges",
"group": "1_modification"
}
],
"scm/resourceFolder/context": [
{
"command": "extension.dish-ai-commit",
"when": "scmProvider =~ /(git|svn)/",
"group": "inline"
},
{
"command": "dish-ai-commit.reviewCode",
"when": "scmProvider =~ /(git|svn)/",
"group": "inline"
}
],
"commandPalette": [
{
"command": "extension.dish-ai-commit",
"when": "(config.svn.enabled && svnOpenRepositoryCount > 0) || (config.git.enabled && gitOpenRepositoryCount > 0)"
},
{
"command": "dish-ai-commit.selectModel",
"group": "navigation",
"when": "(config.svn.enabled && svnOpenRepositoryCount > 0) || (config.git.enabled && gitOpenRepositoryCount > 0)"
},
{
"command": "dish-ai-commit.generateWeeklyReport",
"when": "true"
},
{
"command": "dish-ai-commit.reviewCode",
"when": "((config.svn.enabled && svnOpenRepositoryCount > 0) || (config.git.enabled && svnOpenRepositoryCount > 0))"
}
]
}
},
"scripts": {
"vscode:prepublish": "pnpm run compile",
"compile": "pnpm run compile:webview && tsc -p ./",
"compile:webview": "cd src/webview-ui && pnpm install && pnpm run build",
"watch": "tsc -watch -p ./",
"pretest": "pnpm run compile && pnpm run lint",
"lint": "eslint src",
"test": "vscode-test",
"prepare": "husky",
"commit": "git add . && git-cz",
"release": "standard-version --preset gitmoji-config",
"changelog": "conventional-changelog -i CHANGELOG.md -s -r 0",
"update-config": "ts-node ./src/scripts/updateConfig.ts",
"package": "rm -rf node_modules && rm -rf src/webview-ui/node_modules && npm install && vsce package",
"publish": "rm -rf node_modules && rm -rf src/webview-ui/node_modules && npm install && vsce publish"
},
"devDependencies": {
"@commitlint/cli": "^19.6.1",
"@commitlint/config-conventional": "^19.6.0",
"@stylistic/eslint-plugin-ts": "^2.12.1",
"@types/jest": "^29.5.14",
"@types/mocha": "^10.0.10",
"@types/node": "~16.18.123",
"@types/vscode": "^1.96.0",
"@typescript-eslint/eslint-plugin": "^8.19.0",
"@typescript-eslint/parser": "^8.19.0",
"@vscode/test-cli": "^0.0.10",
"@vscode/test-electron": "^2.4.1",
"commitizen": "^4.3.1",
"commitlint-config-gitmoji": "^2.3.1",
"conventional-changelog-gitmoji-config": "^1.5.2",
"cz-conventional-changelog": "^3.3.0",
"cz-customizable": "^7.4.0",
"eslint": "^9.17.0",
"husky": "^9.1.7",
"lint-staged": "^15.3.0",
"standard-version": "^9.5.0",
"ts-node": "^10.9.2",
"typescript": "^5.7.2"
},
"dependencies": {
"inversify": "^6.2.1",
"ollama": "^0.5.11",
"openai": "^4.77.0"
},
"bundleDependencies": [
"inversify",
"ollama",
"openai"
],
"resolutions": {
"@types/node": "16.x"
},
"license": "MIT",
"config": {
"commitizen": {
"path": "node_modules/cz-customizable"
}
},
"lint-staged": {
"src/**/*.{ts}": "npm run lint"
},
"commitlint": {
"extends": [
"gitmoji"
],
"rules": {
"header-max-length": [
2,
"always",
108
],
"type-empty": [
2,
"never"
]
}
},
"packageManager": "[email protected]+sha512.7c2ea089e1a6af306409c4fc8c4f0897bdac32b772016196c469d9428f1fe2d5a21daf8ad6512762654ac645b5d9136bb210ec9a00afa8dbc4677843ba362ecd"
}