Repository navigation
Expand file tree
/
Copy pathpackage.json
More file actions
318 lines (318 loc) · 10.6 KB
/
Copy pathpackage.json
File metadata and controls
318 lines (318 loc) · 10.6 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
{
"name": "opencode-vscode-chryzxc",
"displayName": "OpenCode for VS Code",
"description": "OpenCode client for VS Code with streaming chat, implementation plans, subagents, diff review, sessions, quota monitoring, and managed MCP servers.",
"license": "MIT",
"repository": {
"type": "git",
"url": "https://github.com/chryzxc/vscode-opencode.git"
},
"homepage": "https://github.com/chryzxc/vscode-opencode#readme",
"bugs": {
"url": "https://github.com/chryzxc/vscode-opencode/issues"
},
"version": "0.3.8",
"opencodeCompatibility": {
"extensionVersion": "0.3.8",
"sdk": {
"package": "@opencode-ai/sdk",
"supportedRange": ">=1.18.0 <1.19.0",
"testedVersions": [
"1.18.4"
]
},
"server": {
"supportedRange": ">=1.18.0 <1.19.0",
"testedVersions": [
"1.18.9"
]
},
"policy": "warn"
},
"icon": "resources/extension-icon.png",
"publisher": "chryzxc",
"galleryBanner": {
"color": "#0b1220",
"theme": "dark"
},
"type": "module",
"engines": {
"vscode": "^1.85.0"
},
"keywords": [
"opencode",
"ai",
"agent",
"chat",
"assistant",
"mcp",
"subagents",
"plan"
],
"categories": [
"Other",
"Chat"
],
"activationEvents": [
"onStartupFinished"
],
"main": "./dist/extension.cjs",
"contributes": {
"viewsContainers": {
"activitybar": [
{
"id": "opencode-sidebar",
"title": "OpenCode",
"icon": "resources/icon.svg"
}
]
},
"views": {
"opencode-sidebar": [
{
"type": "webview",
"id": "opencode.chatView",
"name": "Chat",
"icon": "resources/icon.svg"
}
]
},
"commands": [
{
"command": "opencode.focus",
"title": "OpenCode: Focus Chat"
},
{
"command": "opencode.newSession",
"title": "OpenCode: New Session"
},
{
"command": "opencode.sendSelection",
"title": "OpenCode: Send Selection to Chat"
},
{
"command": "opencode.insertFileReference",
"title": "OpenCode: Insert File Reference"
},
{
"command": "opencode.addToThread",
"title": "OpenCode: Add to Thread"
},
{
"command": "opencode.installSkill",
"title": "OpenCode: Install Skill"
},
{
"command": "opencode.openMySkills",
"title": "OpenCode: Open My Skills"
},
{
"command": "opencode.refreshSkills",
"title": "OpenCode: Refresh Skills"
},
{
"command": "opencode.restartServer",
"title": "OpenCode: Restart Server"
}
],
"keybindings": [
{
"command": "opencode.focus",
"key": "ctrl+escape",
"mac": "cmd+escape"
},
{
"command": "opencode.newSession",
"key": "ctrl+shift+escape",
"mac": "cmd+shift+escape"
},
{
"command": "opencode.insertFileReference",
"key": "ctrl+alt+k",
"mac": "cmd+alt+k"
},
{
"command": "opencode.sendSelection",
"key": "ctrl+l",
"mac": "cmd+l"
}
],
"menus": {
"editor/context": [
{
"command": "opencode.sendSelection",
"when": "editorHasSelection",
"group": "opencode"
},
{
"command": "opencode.addToThread",
"group": "opencode"
}
],
"explorer/context": [
{
"command": "opencode.addToThread",
"group": "opencode"
}
]
},
"configuration": {
"title": "OpenCode",
"properties": {
"opencode.serverPort": {
"type": "number",
"default": 0,
"description": "Port for OpenCode server (0 = auto-assign)"
},
"opencode.cliPath": {
"type": "string",
"default": "",
"description": "Optional absolute path to the OpenCode CLI executable when it is not visible to the VS Code extension host PATH."
},
"opencode.autoStart": {
"type": "boolean",
"default": true,
"description": "Automatically start OpenCode server on activation"
},
"opencode.persistSessions": {
"type": "boolean",
"default": true,
"description": "Persist chat sessions across VS Code restarts"
},
"opencode.logging.level": {
"type": "string",
"enum": [
"error",
"warn",
"info",
"debug"
],
"default": "info",
"description": "Minimum log level to output"
},
"opencode.logging.enableConsole": {
"type": "boolean",
"default": true,
"description": "Enable console output for logs"
},
"opencode.logging.enableFile": {
"type": "boolean",
"default": false,
"description": "Enable file output for logs"
},
"opencode.logging.maxFileSize": {
"type": "number",
"default": 5242880,
"description": "Maximum log file size in bytes before rotation (default: 5MB)"
},
"opencode.logging.maxFiles": {
"type": "number",
"default": 3,
"description": "Number of backup log files to keep"
},
"opencode.logging.consoleOutputMode": {
"type": "string",
"enum": [
"pretty",
"json",
"hybrid"
],
"default": "pretty",
"description": "Console output format: pretty (colored text), json (structured), or hybrid (both)"
},
"opencode.logging.enableColors": {
"type": "boolean",
"default": true,
"description": "Enable ANSI colors for console output (pretty mode only)"
},
"opencode.logging.showLogger": {
"type": "boolean",
"default": false,
"description": "Show debug/diagnostic logging output. When disabled, only errors are shown in the console and browser logs. Setting this to false also disables webview-side debug logging."
},
"opencode.autoCompact": {
"type": "boolean",
"default": true,
"description": "Automatically compact a session when context usage reaches the threshold"
},
"opencode.autoCompactThreshold": {
"type": "number",
"default": 0.9,
"minimum": 0.5,
"maximum": 0.99,
"description": "Fraction of model context limit at which auto-compaction fires (0.9 = 90%)"
},
"opencode.debug.suppressConsoleOutput": {
"type": "boolean",
"default": false,
"description": "Suppress all extension host console output (console.log, console.warn, console.error, console.debug, console.info). Useful for silencing debug logging in terminal and browser DevTools."
}
}
}
},
"scripts": {
"build": "npm run structured-output:sync && npm run webview:build && npm run compile",
"verify": "npm run build && npm run lint && npm test",
"vscode:prepublish": "npm run build",
"compile": "node esbuild.config.cjs",
"watch": "node esbuild.config.cjs --watch",
"dev": "node scripts/dev-simple.mjs",
"dev:full": "node scripts/dev-hotreload.mjs",
"webview:build": "npm --prefix webview/shared run build",
"webview:watch": "npm --prefix webview/shared run build -- --watch",
"structured-output:sync": "node scripts/sync-structured-output-contract.mjs",
"structured-output:check": "node scripts/sync-structured-output-contract.mjs --check",
"hooks:install": "node scripts/setup-git-hooks.mjs",
"test:impacted": "node scripts/pre-push-check.mjs --tests-only",
"guard:prepush": "node scripts/pre-push-check.mjs",
"repository:hygiene": "node scripts/repository-hygiene-check.mjs",
"audit:prod": "npm audit --omit=dev --audit-level=high && npm --prefix webview/shared audit --omit=dev --audit-level=high",
"guard:streaming": "node scripts/streaming-contract-check.mjs",
"test": "node --test tests/**/*.test.mjs",
"test:ts": "tsx node --test tests/**/*.test.ts",
"test:integration": "tsx --import tests/integration/helpers/register-vscode-mock.ts node --test 'tests/integration/**/*.test.ts'",
"test:webview-regression": "node --test tests/**/*.test.mjs",
"typecheck": "tsc --noEmit",
"lint": "npm run typecheck && eslint src --ext ts",
"package": "npx @vscode/vsce package",
"package:marketplace": "sh -c 'test -n \"$VSCE_BASE_IMAGES_URL\" || { echo \"VSCE_BASE_IMAGES_URL is required\"; exit 1; }; npx @vscode/vsce package --baseImagesUrl \"$VSCE_BASE_IMAGES_URL\" --baseContentUrl \"${VSCE_BASE_CONTENT_URL:-$VSCE_BASE_IMAGES_URL}\"'",
"publish:marketplace": "sh -c 'test -n \"$VSCE_BASE_IMAGES_URL\" || { echo \"VSCE_BASE_IMAGES_URL is required\"; exit 1; }; npx @vscode/vsce publish --baseImagesUrl \"$VSCE_BASE_IMAGES_URL\" --baseContentUrl \"${VSCE_BASE_CONTENT_URL:-$VSCE_BASE_IMAGES_URL}\"'",
"analyze-logs": "npx tsx scripts/analyze-logs.ts logs/opencode.log",
"analyze-logs:summary": "npx tsx scripts/analyze-logs.ts logs/opencode.log --summary",
"analyze-logs:flows": "npx tsx scripts/analyze-logs.ts logs/opencode.log --flows",
"analyze-logs:errors": "npx tsx scripts/analyze-logs.ts logs/opencode.log --errors",
"analyze-logs:perf": "npx tsx scripts/analyze-logs.ts logs/opencode.log --performance",
"test:logger": "npx tsx scripts/test-logger.ts"
},
"devDependencies": {
"@testing-library/dom": "^10.4.1",
"@testing-library/jest-dom": "^6.9.1",
"@testing-library/react": "^16.3.2",
"@testing-library/user-event": "^14.6.1",
"@types/node": "^20.10.0",
"@types/vscode": "^1.85.0",
"@typescript-eslint/eslint-plugin": "^8.58.2",
"@typescript-eslint/parser": "^8.58.2",
"esbuild": "^0.28.0",
"eslint": "^8.54.0",
"jsdom": "^29.0.1",
"lucide-react": "^1.7.0",
"react": "^19.2.4",
"react-dom": "^19.2.4",
"tsx": "^4.21.0",
"typescript": "^5.3.2"
},
"dependencies": {
"@opencode-ai/sdk": "1.18.4",
"ajv": "^8.20.0",
"ajv-formats": "^3.0.1",
"axios": "^1.19.0",
"highlight.js": "^11.11.1",
"marked": "^17.0.1",
"simple-git": "^3.33.0",
"vscode-file-theme-processor": "^1.0.8"
},
"overrides": {
"fast-uri": "^3.1.5"
}
}