-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathpackage.json
More file actions
218 lines (218 loc) · 8.88 KB
/
Copy pathpackage.json
File metadata and controls
218 lines (218 loc) · 8.88 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
{
"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.17.0",
"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.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). When set to `Custom`, also set `wtfCommit.customCommitMessageLanguage` in `settings.json` (e.g. `French`, `Emoji only`).",
"order": 0
},
"wtfCommit.provider": {
"type": "string",
"enum": [
"DeepSeek",
"Gemini",
"OpenAI",
"OpenRouter",
"Custom"
],
"default": "DeepSeek",
"markdownDescription": "**Provider** — Default is **DeepSeek** (`deepseek-v4-flash`). Use **OpenRouter** or **Custom** for other OpenAI-compatible endpoints (MiMo, GLM, Z.AI, NVIDIA NIM, proxies). Leave Model empty for built-in defaults.",
"order": 1
},
"wtfCommit.autoCommit": {
"type": "boolean",
"default": true,
"markdownDescription": "**Auto Commit** (default on): Commit after generate. Turn off to only fill Source Control. **Auto Push** only runs when this is on.",
"order": 10
},
"wtfCommit.autoPush": {
"type": "boolean",
"default": false,
"markdownDescription": "**Auto Push** (default off): After auto-commit, push to the remote. Requires **Auto Commit**. Use **Confirm Before Push** as a safety gate.",
"order": 11
},
"wtfCommit.confirmAutoPush": {
"type": "boolean",
"default": true,
"markdownDescription": "**Confirm Before Push** (default on): Ask before pushing when Auto Push is enabled. Only applies when Auto Push is on.",
"order": 20
}
}
},
{
"title": "WTF Commit › Advanced",
"properties": {
"wtfCommit.showStatusBarItem": {
"type": "boolean",
"default": true,
"description": "Show the WTF Commit icon in the status bar.",
"order": 0
},
"wtfCommit.baseUrl": {
"type": "string",
"default": "",
"description": "API Base URL for the Custom provider only.",
"markdownDescription": "**Custom only.** API Base URL when **Provider** is `Custom`. Built-in providers ignore this — use **Provider Overrides** to change their endpoint/model.",
"order": 20
},
"wtfCommit.model": {
"type": "string",
"default": "",
"description": "Model name for the Custom provider only.",
"markdownDescription": "**Custom only.** Model name when **Provider** is `Custom`. Built-in providers ignore this — leave empty for the provider default, or use **Provider Overrides**.",
"order": 21
},
"wtfCommit.providerOverrides": {
"type": "object",
"default": {},
"additionalProperties": {
"type": "object",
"additionalProperties": false,
"properties": {
"baseUrl": { "type": "string" },
"model": { "type": "string" }
}
},
"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
}
}
}
]
},
"scripts": {
"compile": "tsc -p ./",
"watch": "tsc -watch -p ./",
"pretest": "pnpm run compile && pnpm run lint && pnpm run docs:providers:check",
"lint": "eslint src --max-warnings 0",
"docs:providers:check": "node scripts/sync-provider-docs.mjs --check",
"docs:providers:write": "pnpm run compile && node scripts/sync-provider-docs.mjs --write",
"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 docs:providers:check && 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"
}
}