Repository navigation
Expand file tree
/
Copy pathpackage.json
More file actions
140 lines (140 loc) · 5.14 KB
/
Copy pathpackage.json
File metadata and controls
140 lines (140 loc) · 5.14 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
{
"name": "whisper-code",
"displayName": "Whisper Code",
"description": "Real-time voice dictation for VS Code, powered by a self-hosted whisper-flow server.",
"version": "1.0.0",
"publisher": "dimastatz",
"license": "MIT",
"repository": {
"type": "git",
"url": "https://github.com/dimastatz/whisper-code"
},
"engines": {
"vscode": "^1.95.0"
},
"categories": [
"Other"
],
"activationEvents": [
"onStartupFinished"
],
"main": "./out/extension.js",
"contributes": {
"commands": [
{
"command": "whisperCode.toggleDictation",
"title": "Toggle Dictation",
"category": "Whisper Code"
},
{
"command": "whisperCode.setApiKey",
"title": "Set API Key",
"category": "Whisper Code"
},
{
"command": "whisperCode.clearApiKey",
"title": "Clear API Key",
"category": "Whisper Code"
}
],
"keybindings": [
{
"command": "whisperCode.toggleDictation",
"key": "ctrl+alt+d",
"mac": "cmd+alt+d",
"when": "!inChatInput"
},
{
"command": "whisperCode.toggleDictation",
"key": "ctrl+alt+d",
"mac": "cmd+alt+d",
"when": "inChatInput",
"args": {
"target": "focused"
}
}
],
"configuration": {
"title": "Whisper Code",
"properties": {
"whisperCode.serverUrl": {
"type": "string",
"default": "http://localhost:8181",
"markdownDescription": "URL of the [whisper-flow](https://github.com/dimastatz/whisper-flow) server. The WebSocket URL is derived from it (`http` \u2192 `ws`, `https` \u2192 `wss`, plus `/ws`). Audio is sent only to this server; a non-local server needs your confirmation once."
},
"whisperCode.model": {
"type": "string",
"default": "",
"markdownDescription": "Model for each session, from the server's `GET /ready` `models` list (for example `base.en.pt`). Empty uses the server's default. Needs whisper-flow 1.2 or newer."
},
"whisperCode.vocabulary.enabled": {
"type": "boolean",
"default": true,
"markdownDescription": "Bias transcription toward identifiers from open editors (such as `useMemo` or `getUserById`), and respell them in the inserted text. Sending the vocabulary to the server needs whisper-flow 1.2 or newer."
},
"whisperCode.recorderCommand": {
"type": "array",
"items": {
"type": "string"
},
"default": [],
"markdownDescription": "Command that records the microphone and writes raw 16 kHz mono signed 16-bit little-endian PCM to stdout, for example `[\"sox\", \"-q\", \"-d\", \"-t\", \"raw\", \"-r\", \"16000\", \"-e\", \"signed-integer\", \"-b\", \"16\", \"-c\", \"1\", \"-L\", \"-\"]`. Empty tries `sox`, then `arecord` (Linux) or `ffmpeg`.",
"scope": "machine"
},
"whisperCode.wrap.comments": {
"type": "number",
"default": 80,
"minimum": 0,
"markdownDescription": "Wrap dictated comments at this column, continuing with the comment marker (`// `, ` * `, `# `\u2026). `0` turns wrapping off."
},
"whisperCode.wrap.commitBody": {
"type": "number",
"default": 72,
"minimum": 0,
"markdownDescription": "Wrap dictated commit message bodies at this column. The subject line is never wrapped. `0` turns wrapping off."
},
"whisperCode.vocabulary.scanWorkspace": {
"type": "boolean",
"default": true,
"markdownDescription": "Also collect identifiers from source files in the workspace that aren't open (skipping `node_modules`, build output and similar). Open editors always count more."
},
"whisperCode.vocabulary.maxFiles": {
"type": "number",
"default": 500,
"minimum": 0,
"markdownDescription": "Most workspace files to read for the vocabulary. Files over 200 KB are skipped, and scanning stops after 2 seconds."
}
}
}
},
"scripts": {
"vscode:prepublish": "npm run compile",
"compile": "tsc -p ./",
"watch": "tsc -watch -p ./",
"typecheck": "tsc --noEmit -p ./",
"lint": "eslint .",
"format": "prettier --write .",
"format:check": "prettier --check .",
"pretest": "npm run compile",
"test": "vscode-test",
"pretest:coverage": "npm run compile",
"test:coverage": "vscode-test --coverage --coverage-reporter text --coverage-reporter json-summary --coverage-reporter lcov --coverage-output coverage && node scripts/check-coverage.mjs 95",
"check": "npm run format:check && npm run lint && npm run typecheck && npm run test:coverage",
"e2e": "node scripts/e2e.mjs"
},
"devDependencies": {
"@types/mocha": "^10.0.10",
"@types/node": "20.x",
"@types/vscode": "^1.95.0",
"@types/ws": "^8.18.2",
"@vscode/test-cli": "^0.0.15",
"@vscode/test-electron": "^3.1.0",
"eslint": "^9.25.1",
"prettier": "^3.9.9",
"typescript": "^5.8.3",
"typescript-eslint": "^8.31.1"
},
"dependencies": {
"ws": "^8.22.0"
}
}