-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpackage.json
More file actions
339 lines (339 loc) · 16.1 KB
/
package.json
File metadata and controls
339 lines (339 loc) · 16.1 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
{
"name": "promptimize",
"displayName": "Promptimize",
"description": "Transform voice into optimized prompts using OpenAI Whisper and AI providers",
"icon": "images/icon.png",
"galleryBanner": {
"color": "#1a1d3a",
"theme": "dark"
},
"version": "1.0.5",
"publisher": "vypdev",
"author": {
"name": "Promptimize Team"
},
"license": "MIT",
"repository": {
"type": "git",
"url": "https://github.com/vypdev/promptimize"
},
"bugs": {
"url": "https://github.com/vypdev/promptimize/issues"
},
"engines": {
"vscode": "^1.85.0",
"node": ">=22.0.0"
},
"categories": [
"Other",
"Machine Learning"
],
"keywords": [
"voice",
"speech-to-text",
"whisper",
"ai",
"promptimize",
"productivity",
"gpt-4",
"openai"
],
"activationEvents": [
"onStartupFinished"
],
"main": "./out/extension.js",
"contributes": {
"commands": [
{
"command": "promptimize.startRecording",
"title": "Promptimize: (Deprecated) Start Recording"
},
{
"command": "promptimize.stopRecording",
"title": "Promptimize: (Deprecated) Stop Recording"
},
{
"command": "promptimize.startTranscribeRecording",
"title": "Promptimize: Start Transcribe Recording"
},
{
"command": "promptimize.stopTranscribeRecording",
"title": "Promptimize: Stop Transcribe Recording"
},
{
"command": "promptimize.startPromptimizeRecording",
"title": "Promptimize: Start Promptimize Recording"
},
{
"command": "promptimize.stopPromptimizeRecording",
"title": "Promptimize: Stop Promptimize Recording"
},
{
"command": "promptimize.cancelRecording",
"title": "Promptimize: Cancel Recording"
},
{
"command": "promptimize.configureApiKey",
"title": "Promptimize: Configure OpenAI API Key (Whisper)"
},
{
"command": "promptimize.configureModel",
"title": "Promptimize: Configure OpenAI Optimization Model"
},
{
"command": "promptimize.configureTransformationProvider",
"title": "Promptimize: Configure Prompt Optimization Provider"
},
{
"command": "promptimize.testTransformation",
"title": "Promptimize: Test Configuration"
},
{
"command": "promptimize.firstTimeSetup",
"title": "Promptimize: Setup Wizard"
},
{
"command": "promptimize.openConfigurationPanel",
"title": "Promptimize: Open Configuration"
}
],
"keybindings": [
{
"command": "promptimize.startTranscribeRecording",
"key": "ctrl+alt+v",
"mac": "cmd+alt+v"
},
{
"command": "promptimize.startPromptimizeRecording",
"key": "ctrl+alt+p",
"mac": "cmd+alt+p"
},
{
"command": "promptimize.cancelRecording",
"key": "escape",
"when": "promptimize.isRecording"
}
],
"configuration": {
"title": "Promptimize",
"properties": {
"promptimize.transcriptionLanguage": {
"type": "string",
"default": "auto",
"enum": [
"auto",
"en",
"es",
"fr",
"de",
"it",
"pt",
"ja",
"ko",
"zh"
],
"markdownDescription": "**Transcription language** for OpenAI Whisper.\n\nWhisper transcription always uses your OpenAI API key. [Setup guide](https://github.com/vypdev/promptimize/blob/master/docs/quickstart.md)"
},
"promptimize.transcriptionHint": {
"type": "string",
"default": "",
"markdownDescription": "**Transcription hint** for OpenAI Whisper (optional).\n\nComma-separated vocabulary, acronyms, or technical terms to improve recognition accuracy. Passed to Whisper as the `prompt` parameter — not transcribed as content. Configure in VS Code Settings (not the configuration webview). [Advanced settings](https://github.com/vypdev/promptimize/blob/master/docs/configuration/advanced-settings.md)"
},
"promptimize.enablePromptTransformation": {
"type": "boolean",
"default": true,
"markdownDescription": "**Enable prompt optimization** after Whisper transcription.\n\nWhen disabled, raw transcription is inserted. When enabled, configure a provider below. [Compare providers](https://github.com/vypdev/promptimize/blob/master/docs/configuration/README.md)"
},
"promptimize.transformationProvider": {
"type": "string",
"default": "openai",
"enum": [
"openai",
"anthropic",
"google",
"azure",
"ollama",
"opencode",
"openrouter",
"cursor"
],
"enumDescriptions": [
"OpenAI GPT models (requires OpenAI API key; can reuse Whisper key)",
"Anthropic Claude models (requires Anthropic API key)",
"Google Gemini models (requires Google AI API key)",
"Azure OpenAI deployments (requires Azure API key and endpoint)",
"Local Ollama models (no API key required)",
"Local OpenCode multi-provider proxy via opencode-llm-proxy (no API key required)",
"OpenRouter unified gateway (requires OpenRouter API key)",
"Native Cursor AI via Cursor SDK (works in any editor - requires Cursor API key)"
],
"markdownDescription": "**Prompt optimization provider** (separate from Whisper transcription).\n\nWhisper always uses OpenAI. This setting chooses which AI service optimizes transcribed speech into structured prompts. [Configuration guide](https://github.com/vypdev/promptimize/blob/master/docs/configuration/README.md)"
},
"promptimize.transformationModel": {
"type": "string",
"default": "gpt-4o",
"enum": [
"gpt-4o",
"gpt-4o-mini",
"gpt-4-turbo",
"gpt-4",
"gpt-3.5-turbo"
],
"enumDescriptions": [
"GPT-4o — fast, cost-effective (recommended default)",
"GPT-4o mini — lower cost, slightly reduced quality",
"GPT-4 Turbo — high intelligence with large context",
"GPT-4 — original GPT-4 model",
"GPT-3.5 Turbo — cheapest option, lower quality"
],
"markdownDescription": "**OpenAI model for prompt optimization** when `transformationProvider` is `openai`.\n\nRun **Promptimize: Configure OpenAI Optimization Model** to pick from models available on your API key."
},
"promptimize.anthropicModel": {
"type": "string",
"default": "claude-3-5-sonnet-20241022",
"enum": [
"claude-3-5-sonnet-20241022",
"claude-3-5-haiku-20241022",
"claude-3-opus-20240229",
"claude-3-sonnet-20240229",
"claude-3-haiku-20240307"
],
"markdownDescription": "**Anthropic model** for prompt optimization when `transformationProvider` is `anthropic`. Requires an Anthropic API key."
},
"promptimize.googleModel": {
"type": "string",
"default": "gemini-1.5-pro",
"enum": [
"gemini-1.5-pro",
"gemini-1.5-flash",
"gemini-2.0-flash"
],
"markdownDescription": "**Google Gemini model** for prompt optimization when `transformationProvider` is `google`. Requires a Google AI API key."
},
"promptimize.azureEndpoint": {
"type": "string",
"default": "",
"markdownDescription": "**Azure OpenAI endpoint** for prompt optimization when `transformationProvider` is `azure` (e.g. `https://my-resource.openai.azure.com`)."
},
"promptimize.azureDeployment": {
"type": "string",
"default": "",
"markdownDescription": "**Azure OpenAI deployment name** for the chat model used in prompt optimization."
},
"promptimize.ollamaBaseUrl": {
"type": "string",
"default": "http://localhost:11434",
"markdownDescription": "**Ollama server URL** for local prompt optimization when `transformationProvider` is `ollama`."
},
"promptimize.ollamaModel": {
"type": "string",
"default": "llama3.1:8b",
"markdownDescription": "**Ollama model name/tag** for local prompt optimization."
},
"promptimize.openCodeBaseUrl": {
"type": "string",
"default": "http://127.0.0.1:4010/v1",
"markdownDescription": "**OpenCode LLM proxy base URL** for prompt optimization when `transformationProvider` is `opencode`."
},
"promptimize.openCodeModel": {
"type": "string",
"default": "",
"markdownDescription": "**OpenCode model identifier** (provider/model format) for prompt optimization when `transformationProvider` is `opencode`."
},
"promptimize.openRouterModel": {
"type": "string",
"default": "openai/gpt-4o",
"markdownDescription": "**OpenRouter model identifier** for prompt optimization when `transformationProvider` is `openrouter`. Requires an OpenRouter API key."
},
"promptimize.cursorModel": {
"type": "string",
"default": "composer-2.5",
"enum": [
"composer-2.5",
"composer-2.5-fast",
"claude-4.5-sonnet",
"gpt-5.1",
"gpt-5.2-codex"
],
"markdownDescription": "**Cursor model** for prompt optimization when `transformationProvider` is `cursor`. Works in any editor (VSCode, Cursor, etc.). Requires a Cursor API key from [Cursor Dashboard](https://cursor.com/dashboard/integrations)."
},
"promptimize.audioQuality": {
"type": "string",
"enum": [
"low",
"medium",
"high"
],
"default": "high",
"markdownDescription": "**Audio recording quality** sent to OpenAI Whisper for transcription.\n\n**Note:** Not yet applied at runtime — recording always uses 16 kHz mono (optimal for Whisper). Reserved for a future release. [Advanced settings](https://github.com/vypdev/promptimize/blob/master/docs/configuration/advanced-settings.md)"
},
"promptimize.maxRecordingDuration": {
"type": "number",
"default": 120,
"minimum": 10,
"maximum": 300,
"markdownDescription": "**Maximum recording duration** in seconds before auto-stop.\n\n**Note:** Not yet applied at runtime — recording stops when you click stop or cancel. Reserved for a future release. [Advanced settings](https://github.com/vypdev/promptimize/blob/master/docs/configuration/advanced-settings.md)"
},
"promptimize.showNotifications": {
"type": "boolean",
"default": true,
"markdownDescription": "Show progress and status notifications during recording, transcription, and optimization.\n\n**Note:** Not yet applied at runtime — notifications always appear during processing. Reserved for a future release. [Advanced settings](https://github.com/vypdev/promptimize/blob/master/docs/configuration/advanced-settings.md)"
},
"promptimize.transformationSystemPrompt": {
"type": "string",
"default": "You are an expert prompt engineer specialized in transforming raw developer voice transcriptions into highly effective prompts for AI coding assistants such as Cursor, Claude, Copilot, and ChatGPT.\n\nYour task is to convert spoken, unstructured developer input into a concise, technically precise, execution-oriented prompt.\n\nRules:\n\n1. Clean the transcription\n - Remove filler words, hesitations, repetitions, and verbal noise\n - Fix grammar and sentence structure\n - Preserve the original intent\n - Preserve all technical terminology, APIs, framework names, libraries, file names, variables, and code references exactly as spoken\n\n2. Infer developer intent\n - Detect the actual engineering goal behind the transcription\n - Resolve fragmented speech into coherent technical instructions\n - Preserve implicit requirements when clearly inferred from context\n - Do NOT invent features, requirements, or assumptions not supported by the transcription\n\n3. Optimize for AI coding assistants\n - Make the prompt actionable and implementation-focused\n - Convert vague requests into precise engineering tasks when possible\n - Prioritize clarity, execution order, and technical accuracy\n - Encourage maintainable, production-grade solutions unless explicitly stated otherwise\n\n4. Structure intelligently\n - Only use sections when they improve clarity\n - Possible sections include:\n - Context\n - Objective\n - Requirements\n - Constraints\n - Expected Output\n - Technical Notes\n\n5. Preserve important engineering constraints\n - Maintain architecture preferences\n - Preserve mentioned technologies and stack decisions\n - Preserve performance, security, scalability, UX, DX, or maintainability concerns\n - Preserve coding style preferences if mentioned\n\n6. Improve readability\n - Remove redundancy\n - Shorten unnecessary wording\n - Use professional technical language\n - Prefer bullet points when useful\n - Keep the final prompt dense with useful information\n\n7. Output rules\n - Output ONLY the final optimized prompt\n - Do NOT explain your changes\n - Do NOT add commentary\n - Do NOT wrap the output in markdown\n - Do NOT add quotation marks\n\nAdditional behavior:\n- If the transcription is already clear, improve it minimally\n- If the transcription is incomplete, produce the best technically coherent prompt possible without asking questions\n- If multiple tasks are mentioned, organize them logically by priority or execution order\n- Prefer explicit engineering instructions over conversational phrasing\n- Optimize prompts for implementation quality, not just readability",
"markdownDescription": "**System prompt** for prompt transformation.\n\nThis prompt instructs the AI how to transform your voice transcriptions into optimized prompts. Customize it to change the transformation style and structure.",
"editPresentation": "multilineText"
}
}
}
},
"scripts": {
"vscode:prepublish": "pnpm run compile",
"compile": "webpack --mode production && node scripts/copy-webview-assets.js",
"compile:dev": "webpack --mode development && node scripts/copy-webview-assets.js",
"watch": "webpack --mode development --watch",
"lint": "eslint src --ext ts",
"lint:fix": "eslint src --ext ts --fix",
"test": "jest --coverage",
"test:watch": "jest --watch",
"test:integration": "node ./out/test/runTest.js",
"package": "bash scripts/prepare-package.sh && vsce package",
"package:verify": "unzip -l *.vsix | grep audio-capture",
"publish": "vsce publish",
"publish:ovsx": "ovsx publish",
"format": "prettier --write \"src/**/*.ts\"",
"format:check": "prettier --check \"src/**/*.ts\""
},
"dependencies": {
"@anthropic-ai/sdk": "^0.30.1",
"@cursor/sdk": "^1.0.13",
"@google/generative-ai": "^0.21.0",
"@kstonekuan/audio-capture": "^0.0.3",
"@vscode/webview-ui-toolkit": "1.4.0",
"axios": "^1.7.9",
"openai": "^4.20.0",
"token-costs": "^3.5.0"
},
"devDependencies": {
"@types/jest": "^29.5.11",
"@types/node": "^22.0.0",
"@types/vscode": "^1.85.0",
"@typescript-eslint/eslint-plugin": "^6.16.0",
"@typescript-eslint/parser": "^6.16.0",
"@vscode/test-electron": "^2.3.8",
"eslint": "^8.56.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-prettier": "^5.1.2",
"husky": "^8.0.3",
"jest": "^29.7.0",
"prettier": "^3.1.1",
"ts-jest": "^29.1.1",
"ts-loader": "^9.5.1",
"typescript": "^5.3.3",
"vsce": "^2.15.0",
"webpack": "^5.89.0",
"webpack-cli": "^5.1.4"
},
"packageManager": "pnpm@9.15.4+sha512.b2dc20e2fc72b3e18848459b37359a32064663e5627a51e4c74b2c29dd8e8e0491483c3abb40789cfd578bf362fb6ba8261b05f0387d76792ed6e23ea3b1b6a0"
}