-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpackage.json
More file actions
169 lines (169 loc) · 7.13 KB
/
package.json
File metadata and controls
169 lines (169 loc) · 7.13 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
{
"name": "wtf-commit",
"displayName": "WTF Commit",
"description": "AI-powered Git commit message generator",
"version": "1.0.7",
"license": "MIT",
"publisher": "codertesla",
"icon": "icon.png",
"repository": {
"type": "git",
"url": "https://github.com/codertesla/wtf-commit"
},
"engines": {
"vscode": "^1.75.0"
},
"categories": [
"SCM Providers",
"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)"
}
],
"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",
"when": "editorTextFocus"
}
],
"configuration": {
"title": "WTF Commit",
"properties": {
"wtfCommit.autoCommit": {
"type": "boolean",
"default": false,
"description": "Automatically commit changes after generating the message.",
"order": 0
},
"wtfCommit.autoPush": {
"type": "boolean",
"default": false,
"description": "Automatically push changes after commit (requires autoCommit to be enabled).",
"order": 0
},
"wtfCommit.smartStage": {
"type": "boolean",
"default": true,
"description": "Automatically stage all changes if nothing is staged.",
"order": 0
},
"wtfCommit.confirmBeforeCommit": {
"type": "boolean",
"default": true,
"description": "Show a confirmation dialog before auto-committing.",
"order": 0
},
"wtfCommit.prompt": {
"type": "string",
"default": "You are an expert software developer. Generate a clear and concise Git commit message based on the provided diff.\n\nRules:\n1. Use conventional commit format: <type>(<scope>): <description>\n2. Types: feat, fix, docs, style, refactor, perf, test, chore, ci, build\n3. Keep the first line under 72 characters. If necessary, add a blank line and a bulleted list for details.\n4. Use imperative mood (e.g., 'add' not 'added')\n5. Focus on WHAT changed and WHY, not HOW\n6. CRITICAL: If a new file is created (especially documentation or features), it MUST be mentioned in the description.\n7. If multiple changes exist, prioritize the most significant impact (e.g., \"add Chinese documentation\" is more significant than \"add link\").\n8. Only output the commit message, nothing else.",
"description": "System Prompt for AI (supports multi-line)",
"editPresentation": "multilineText",
"order": 1
},
"wtfCommit.language": {
"type": "string",
"enum": [
"English",
"简体中文",
"繁体中文",
"Japanese",
"Classical Chinese (文言文)",
"Custom"
],
"default": "English",
"description": "Language for the generated commit message",
"order": 2
},
"wtfCommit.customLanguage": {
"type": "string",
"default": "English",
"description": "Enter your target language (only used when Language is set to 'Custom'). e.g. 'French', 'Emoji only', 'Cantonese'.",
"order": 3
},
"wtfCommit.provider": {
"type": "string",
"enum": [
"OpenAI",
"DeepSeek",
"MiniMax",
"Moonshot",
"GLM",
"Gemini",
"OpenRouter",
"Custom"
],
"default": "OpenAI",
"description": "Select an AI provider",
"order": 3
},
"wtfCommit.baseUrl": {
"type": "string",
"default": "",
"description": "Global API Base URL (Fallback). Leave empty to use the provider's default.",
"markdownDescription": "Global API Base URL (Fallback). Used if the provider-specific Base URL is not set. Leave empty to use the provider's default.\n\n**Defaults:**\n- OpenAI: `https://api.openai.com/v1`\n- DeepSeek: `https://api.deepseek.com`\n- MiniMax: `https://api.minimaxi.com/v1`\n- Moonshot: `https://api.moonshot.cn/v1`\n- GLM: `https://open.bigmodel.cn/api/paas/v4`\n- Gemini: `https://generativelanguage.googleapis.com/v1beta/openai`\n- OpenRouter: `https://openrouter.ai/api/v1`\n\n> **Note:** Use the input box below to enter a custom Base URL if needed.",
"order": 4
},
"wtfCommit.model": {
"type": "string",
"default": "",
"description": "Global Model name (Fallback). Leave empty to use the provider's default.",
"markdownDescription": "Global Model name (Fallback). Used if the provider-specific Model is not set. Leave empty to use the provider's default.\n\n**Defaults:**\n- OpenAI: `gpt-5-nano`\n- DeepSeek: `deepseek-chat`\n- MiniMax: `MiniMax-M2.5`\n- Moonshot: `kimi-k2-turbo-preview`\n- GLM: `glm-5`\n- Gemini: `gemini-3.1-flash-lite-preview`\n- OpenRouter: `openrouter/free`\n\n> **Note:** Use the input box below to enter a custom Model name if needed.",
"order": 5
},
"wtfCommit.providerOverrides": {
"type": "object",
"default": {},
"markdownDescription": "Custom Base URL and Model specifically for each AI provider. Overrides the global settings.\n\n**Example in `settings.json`:**\n```json\n{\n \"DeepSeek\": {\n \"baseUrl\": \"https://api.deepseek.com/beta\",\n \"model\": \"deepseek-coder\"\n },\n \"Custom\": {\n \"baseUrl\": \"https://my-custom-endpoint.com/v1\",\n \"model\": \"my-custom-model\"\n }\n}\n```",
"order": 6
}
}
}
},
"scripts": {
"compile": "tsc -p ./",
"watch": "tsc -watch -p ./",
"pretest": "pnpm run compile && pnpm run lint",
"lint": "eslint src",
"test": "vscode-test",
"package": "pnpm run compile && 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\"",
"release": "pnpm run package && pnpm run publish:ovsx"
},
"devDependencies": {
"@types/mocha": "^10.0.10",
"@types/node": "22.x",
"@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",
"ovsx": "^0.10.8",
"typescript": "^5.9.3",
"typescript-eslint": "^8.52.0"
}
}