-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathpackage.json
More file actions
278 lines (278 loc) · 11.9 KB
/
Copy pathpackage.json
File metadata and controls
278 lines (278 loc) · 11.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
{
"name": "wtf-commit",
"displayName": "WTF Commit",
"description": "AI commit messages from your git diff. Conventional Commits, your own API key — DeepSeek, Gemini, OpenAI, and more.",
"version": "1.14.1",
"license": "MIT",
"publisher": "codertesla",
"icon": "icon.png",
"repository": {
"type": "git",
"url": "https://github.com/codertesla/wtf-commit"
},
"homepage": "https://codertesla.github.io/wtf-commit/",
"bugs": {
"url": "https://github.com/codertesla/wtf-commit/issues"
},
"keywords": [
"git",
"commit",
"commit message",
"ai",
"llm",
"conventional commits",
"scm",
"source control",
"deepseek",
"gemini",
"openai",
"cursor",
"changelog",
"auto commit"
],
"engines": {
"vscode": "^1.75.0"
},
"categories": [
"SCM Providers",
"Machine Learning",
"Other"
],
"main": "./out/extension.js",
"extensionDependencies": [
"vscode.git"
],
"contributes": {
"commands": [
{
"command": "wtf-commit.generate",
"title": "WTF Commit: Generate",
"icon": "$(sparkle)"
},
{
"command": "wtf-commit.setApiKey",
"title": "WTF Commit: Set API Key",
"icon": "$(key)"
},
{
"command": "wtf-commit.showOutput",
"title": "WTF Commit: Show Output",
"icon": "$(output)"
}
],
"menus": {
"scm/title": [
{
"command": "wtf-commit.generate",
"group": "navigation",
"when": "scmProvider == git"
}
]
},
"keybindings": [
{
"command": "wtf-commit.generate",
"key": "ctrl+alt+g",
"mac": "cmd+alt+g"
}
],
"configuration": [
{
"title": "WTF Commit",
"properties": {
"wtfCommit.uiLanguage": {
"type": "string",
"enum": ["en", "zh"],
"default": "en",
"markdownDescription": "**Interface Language** — Language for the extension's own UI (buttons, prompts, notifications). Independent of the commit-message language. `en` = English, `zh` = 简体中文.",
"order": 0
},
"wtfCommit.commitMessageLanguage": {
"type": "string",
"enum": [
"English",
"简体中文",
"繁体中文",
"Japanese",
"Classical Chinese (文言文)",
"Custom"
],
"default": "English",
"markdownDescription": "**Commit Message Language** — Language for the generated commit message (not the extension UI).",
"order": 1
},
"wtfCommit.customCommitMessageLanguage": {
"type": "string",
"default": "English",
"markdownDescription": "Used only when **Commit Message Language** is `Custom`. e.g. `French`, `Emoji only`, `Cantonese`.",
"order": 2
},
"wtfCommit.provider": {
"type": "string",
"enum": [
"OpenAI",
"DeepSeek",
"MiMo",
"GLM",
"Z.AI",
"Gemini",
"OpenRouter",
"NVIDIA NIM",
"Custom"
],
"default": "DeepSeek",
"description": "Select an AI provider. Default is DeepSeek (deepseek-v4-flash) — fast and low-cost for commit messages.",
"order": 3
},
"wtfCommit.autoCommit": {
"type": "boolean",
"default": true,
"markdownDescription": "**Automation — Auto Commit** (default on): After generating, commit automatically. Turn off if you only want the message in Source Control for manual review.",
"order": 10
},
"wtfCommit.autoPush": {
"type": "boolean",
"default": false,
"markdownDescription": "**Automation — Auto Push** (default off): After auto-commit, push to the remote. Keep off for new users; enable when you want a full local generate → commit → push shortcut. ⚠️ Requires **Auto Commit**.",
"order": 11
},
"wtfCommit.smartStage": {
"type": "boolean",
"default": true,
"markdownDescription": "**Automation — Smart Stage**: When Auto Commit is on and nothing is staged, stage current changes before generation so later edits cannot sneak into the commit. Only relevant when Auto Commit is enabled.",
"order": 12
},
"wtfCommit.confirmBeforeCommit": {
"type": "boolean",
"default": false,
"markdownDescription": "**Safety — Confirm Before Commit** (default off): Extra dialog before auto-commit. Leave off for a smooth generate → commit flow; turn on if you want a final check.",
"order": 20
},
"wtfCommit.confirmAutoPush": {
"type": "boolean",
"default": true,
"markdownDescription": "**Safety — Confirm Before Push** (default on): Ask before pushing when Auto Push is enabled. New users should keep this on; experienced users can turn it off for a fully unattended generate → commit → push shortcut.",
"order": 21
}
}
},
{
"title": "WTF Commit › Advanced",
"properties": {
"wtfCommit.showStatusBarItem": {
"type": "boolean",
"default": true,
"description": "Show the WTF Commit icon in the status bar.",
"order": 0
},
"wtfCommit.changelogPopup": {
"type": "boolean",
"default": false,
"description": "Show a notification with a View Changelog action after the extension is updated. Takes effect immediately when toggled.",
"order": 1
},
"wtfCommit.warnOnTruncatedDiff": {
"type": "boolean",
"default": false,
"description": "Show a warning when the diff is too large and only a summarized/partial diff is sent to the AI.",
"order": 2
},
"wtfCommit.prompt": {
"type": "string",
"default": "Generate a concise Git commit message from the provided diff.\n\nRules:\n1. Use Conventional Commits: <type>(<scope>): <description>\n2. Types: feat, fix, docs, style, refactor, perf, test, chore, ci, build\n3. Keep the first line under 72 characters; use imperative mood\n4. If a new file is added, mention it in the description (especially docs or features); output only the commit message",
"description": "System Prompt for AI (supports multi-line)",
"editPresentation": "multilineText",
"order": 10
},
"wtfCommit.temperature": {
"type": "number",
"default": 1,
"minimum": 0,
"maximum": 2,
"description": "Temperature for AI generation. Lower values produce more deterministic results.",
"order": 11
},
"wtfCommit.baseUrl": {
"type": "string",
"default": "",
"description": "API Base URL for the Custom provider. Built-in providers use their defaults or Provider Overrides.",
"markdownDescription": "API Base URL for the **Custom** provider only. Built-in providers use their own defaults unless configured in **Provider Overrides**.",
"order": 20
},
"wtfCommit.model": {
"type": "string",
"default": "",
"description": "Model name for the Custom provider. Built-in providers use their defaults or Provider Overrides.",
"markdownDescription": "Model name for the **Custom** provider only. Built-in providers use their own defaults unless configured in **Provider Overrides**.",
"order": 21
},
"wtfCommit.providerOverrides": {
"type": "object",
"default": {},
"markdownDescription": "Per-provider Base URL and Model overrides (preferred way to customize built-in providers).\n\n**Example in `settings.json`:**\n```json\n{\n \"DeepSeek\": {\n \"baseUrl\": \"https://api.deepseek.com/beta\",\n \"model\": \"deepseek-coder\"\n }\n}\n```",
"order": 22
},
"wtfCommit.ignorePaths": {
"type": "array",
"items": {
"type": "string"
},
"default": [
"*.snap",
"*.min.js",
"*.min.css",
".gen.ts",
"_generated"
],
"markdownDescription": "Extra file or directory name patterns to exclude from the diff sent to the AI. Each entry is matched against a path segment (for a bare name like `generated`) or as a filename suffix (for an entry starting with `.` or `*`, e.g. `*.snap`, `.gen.ts`). Matches are case-insensitive. Built-in filters (lock files, build outputs, binaries, etc.) always apply. Set to `[]` to disable these defaults.",
"order": 30
},
"wtfCommit.maxDiffChars": {
"type": "number",
"default": 10000,
"minimum": 1000,
"description": "Maximum total characters of the diff sent to the AI. Larger diffs are summarized or truncated.",
"order": 31
},
"wtfCommit.maxUntrackedFiles": {
"type": "number",
"default": 30,
"minimum": 0,
"description": "Maximum number of untracked (new) files included in the diff. Set to 0 to disable untracked-file inclusion.",
"order": 32
}
}
}
]
},
"scripts": {
"compile": "tsc -p ./",
"watch": "tsc -watch -p ./",
"pretest": "pnpm run compile && pnpm run lint",
"lint": "eslint src",
"clean:vscode-test": "node scripts/clean-vscode-test.mjs",
"test": "mocha 'out/test/**/*.test.js'",
"test:unit": "pnpm run compile && mocha 'out/test/**/*.test.js'",
"test:electron": "node scripts/run-electron-tests.mjs",
"package:audit": "vsce ls | node scripts/audit-package-list.mjs",
"package": "pnpm run compile && pnpm run package:audit && vsce package",
"package:vscode": "pnpm run compile && node scripts/run-with-publisher.mjs CoderTesla -- pnpm exec vsce package",
"publish:ovsx": "PAT=${OVSX_PAT:-}; if [ -z \"$PAT\" ] && [ \"$(uname -s)\" = \"Darwin\" ] && command -v security >/dev/null 2>&1; then PAT=$(security find-generic-password -a \"$USER\" -s \"wtf-commit.ovsx\" -w 2>/dev/null || true); fi; if [ -z \"$PAT\" ]; then echo \"Open VSX token not found.\" >&2; echo \"Set OVSX_PAT or save it in macOS Keychain with service 'wtf-commit.ovsx'.\" >&2; exit 1; fi; pnpm exec ovsx publish \"wtf-commit-${npm_package_version}.vsix\" --pat \"$PAT\"",
"publish:vscode": "PAT=${VSCE_PAT:-}; if [ -z \"$PAT\" ] && [ \"$(uname -s)\" = \"Darwin\" ] && command -v security >/dev/null 2>&1; then PAT=$(security find-generic-password -a \"$USER\" -s \"wtf-commit.vsce\" -w 2>/dev/null || true); fi; if [ -z \"$PAT\" ]; then echo \"Visual Studio Marketplace token not found.\" >&2; echo \"Set VSCE_PAT or save it in macOS Keychain with service 'wtf-commit.vsce'.\" >&2; echo \"See UPDATEFLOW.md for PAT setup (Marketplace Manage scope).\" >&2; exit 1; fi; pnpm run compile && node scripts/run-with-publisher.mjs CoderTesla -- pnpm exec vsce publish --pat \"$PAT\"",
"release": "pnpm run package && pnpm run publish:ovsx && pnpm run clean:vscode-test",
"release:all": "pnpm run package && pnpm run publish:ovsx && pnpm run publish:vscode && pnpm run clean:vscode-test"
},
"devDependencies": {
"@types/mocha": "^10.0.10",
"@types/node": "~18.19.130",
"@types/vscode": "^1.70.0",
"@vscode/test-cli": "^0.0.12",
"@vscode/test-electron": "^2.5.2",
"@vscode/vsce": "^3.7.1",
"eslint": "^9.39.2",
"mocha": "^11.7.5",
"ovsx": "^0.10.8",
"typescript": "^5.9.3",
"typescript-eslint": "^8.52.0"
}
}