Repository navigation
Expand file tree
/
Copy pathpackage.json
More file actions
516 lines (516 loc) · 23.3 KB
/
Copy pathpackage.json
File metadata and controls
516 lines (516 loc) · 23.3 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
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
{
"name": "levelcode-ai",
"displayName": "LevelCode AI",
"description": "Native, Claude-first AI for LevelCode — chat with your code, no middle-man backend.",
"publisher": "levelcode",
"version": "0.1.0",
"license": "MIT",
"engines": {
"vscode": "^1.126.0"
},
"categories": [
"Other"
],
"capabilities": {
"virtualWorkspaces": true,
"untrustedWorkspaces": {
"supported": true
}
},
"activationEvents": [
"onStartupFinished"
],
"main": "./extension.js",
"contributes": {
"walkthroughs": [
{
"id": "welcome",
"title": "Welcome to LevelCode",
"description": "Your AI-native, hackable, Notepad++-powered editor — set it up in a couple of minutes.",
"steps": [
{
"id": "ai",
"title": "Connect your AI",
"description": "Native Claude, built into the editor — chat with your files as context, inline completions as you type, and an agent that reads, edits, and runs commands across your project. **Sign in and you're on your plan** — no API key to manage. Prefer your own? BYOK speaks Claude, OpenAI, Groq, Mistral, Ollama and more.\n[Sign in to LevelCode](command:levelcode.ai.account)\n[Use your own key (BYOK)](command:levelcode.ai.setApiKey)\n[Pick a model](command:levelcode.ai.pickModel)\n[Open the chat](command:levelcode.ai.focus)",
"media": {
"svg": "media/walkthrough/ai.svg",
"altText": "Native AI chat, inline completions, and an agent built into the editor"
},
"completionEvents": [
"onCommand:levelcode.ai.setApiKey",
"onCommand:levelcode.ai.account"
]
},
{
"id": "look",
"title": "Make it yours",
"description": "Signature **One Dark / One Light** themes, **Atom · Notepad++ · Sublime** keymaps so your muscle memory just works, and Notepad++ power-editing — macros, column edit, big-file mode. Make it feel like home.\n[Choose a theme](command:workbench.action.selectTheme)\n[Apply a keymap preset](command:levelcode.keymap.apply)",
"media": {
"svg": "media/walkthrough/look.svg",
"altText": "Signature themes, keymap presets, and Notepad++ power-editing"
},
"completionEvents": [
"onCommand:levelcode.keymap.apply"
]
},
{
"id": "updates",
"title": "Stay up to date",
"description": "LevelCode checks for new releases in the background and tells you the moment one's ready — one click to download. That's the tour. Happy hacking.\n[Check for updates](command:levelcode.update.check)",
"media": {
"svg": "media/walkthrough/updates.svg",
"altText": "LevelCode checks for new releases and downloads them in one click"
},
"completionEvents": [
"onCommand:levelcode.update.check"
]
}
]
}
],
"languageModelChatProviders": [
{
"vendor": "levelcode",
"displayName": "LevelCode (Claude)"
}
],
"viewsContainers": {
"secondarySidebar": [
{
"id": "levelcodeAi",
"title": "LevelCode AI",
"icon": "media/levelcode-ai.svg"
}
]
},
"views": {
"levelcodeAi": [
{
"id": "levelcodeAi.chat",
"name": "Chat",
"type": "webview"
}
]
},
"commands": [
{
"command": "levelcode.customize",
"title": "Customize…",
"category": "LevelCode"
},
{
"command": "levelcode.import.vscode",
"title": "Import from VS Code…",
"category": "LevelCode"
},
{
"command": "levelcode.ai.focus",
"title": "AI: Focus Chat",
"category": "LevelCode"
},
{
"command": "levelcode.ai.newChat",
"title": "AI: New Chat",
"category": "LevelCode",
"icon": "$(add)"
},
{
"command": "levelcode.ai.pickModel",
"title": "AI: Select Model…",
"category": "LevelCode"
},
{
"command": "levelcode.ai.sketch",
"title": "AI: Agent Sketch…",
"category": "LevelCode",
"icon": "$(type-hierarchy)"
},
{
"command": "levelcode.ai.addSelection",
"title": "AI: Add Selection to Chat",
"category": "LevelCode"
},
{
"command": "levelcode.ai.addFileContext",
"title": "AI: Add Files to Chat…",
"category": "LevelCode",
"icon": "$(new-file)"
},
{
"command": "levelcode.ai.editSelection",
"title": "AI: Edit Selection…",
"category": "LevelCode",
"icon": "$(sparkle)"
},
{
"command": "levelcode.ai.applyEdit",
"title": "Keep AI Edit",
"category": "LevelCode",
"icon": "$(check)"
},
{
"command": "levelcode.ai.discardEdit",
"title": "Discard AI Edit",
"category": "LevelCode",
"icon": "$(close)"
},
{
"command": "levelcode.ai.setApiKey",
"title": "AI: Set API Key…",
"category": "LevelCode",
"icon": "$(key)"
},
{
"command": "levelcode.ai.account",
"title": "Account: Sign in to LevelCode…",
"category": "LevelCode",
"icon": "$(account)"
},
{
"command": "levelcode.ai.clearApiKey",
"title": "AI: Clear API Key",
"category": "LevelCode"
},
{
"command": "levelcode.ai.toggleCompletions",
"title": "AI: Toggle Inline Completions",
"category": "LevelCode"
},
{
"command": "levelcode.ai.review.keepActive",
"title": "Keep Agent Edit",
"category": "LevelCode",
"icon": "$(check)"
},
{
"command": "levelcode.ai.review.undoActive",
"title": "Undo Agent Edit",
"category": "LevelCode",
"icon": "$(discard)"
}
],
"menus": {
"view/title": [
{
"command": "levelcode.ai.addFileContext",
"when": "view == levelcodeAi.chat",
"group": "navigation@1"
},
{
"command": "levelcode.ai.newChat",
"when": "view == levelcodeAi.chat",
"group": "navigation@2"
},
{
"command": "levelcode.ai.setApiKey",
"when": "view == levelcodeAi.chat",
"group": "navigation@3"
}
],
"editor/title": [
{
"command": "levelcode.ai.review.keepActive",
"when": "levelcode.ai.reviewActive",
"group": "navigation@1"
},
{
"command": "levelcode.ai.review.undoActive",
"when": "levelcode.ai.reviewActive",
"group": "navigation@2"
},
{
"command": "levelcode.ai.applyEdit",
"when": "levelcode.ai.diffActive",
"group": "navigation@3"
},
{
"command": "levelcode.ai.discardEdit",
"when": "levelcode.ai.diffActive",
"group": "navigation@4"
}
],
"editor/context": [
{
"command": "levelcode.ai.editSelection",
"when": "editorHasSelection",
"group": "z_levelcode@1"
},
{
"command": "levelcode.ai.addSelection",
"when": "editorHasSelection",
"group": "z_levelcode@2"
}
],
"commandPalette": [
{
"command": "levelcode.ai.applyEdit",
"when": "false"
},
{
"command": "levelcode.ai.discardEdit",
"when": "false"
}
]
},
"keybindings": [
{
"command": "levelcode.ai.focus",
"key": "ctrl+shift+i",
"mac": "shift+cmd+i",
"linux": "ctrl+alt+shift+i"
},
{
"command": "levelcode.ai.focus",
"key": "ctrl+cmd+i"
},
{
"command": "levelcode.ai.addSelection",
"key": "cmd+alt+a",
"when": "editorTextFocus && editorHasSelection"
},
{
"command": "levelcode.ai.editSelection",
"key": "cmd+alt+e",
"when": "editorTextFocus && editorHasSelection"
}
],
"configuration": {
"title": "LevelCode AI",
"properties": {
"levelcode.ai.provider": {
"type": "string",
"enum": [
"claude",
"openai",
"openrouter",
"groq",
"together",
"fireworks",
"deepseek",
"xai",
"mistral",
"ollama",
"custom"
],
"enumDescriptions": [
"Anthropic Claude (native API — also powers the agent)",
"OpenAI (GPT-4o, o-series)",
"OpenRouter (one key → hundreds of models across providers)",
"Groq (fast Llama/Mixtral inference)",
"Together AI",
"Fireworks AI",
"DeepSeek (V3 / R1)",
"xAI (Grok)",
"Mistral (incl. Codestral)",
"Local models via Ollama (no key)",
"Any OpenAI-compatible endpoint (set levelcode.ai.baseURL) — vLLM, LM Studio, LiteLLM…"
],
"default": "claude",
"markdownDescription": "Which AI provider chat, inline completion and edit use. Every provider except Anthropic speaks the OpenAI-compatible `/v1/chat/completions` protocol, so one key + one setting unlocks it. **Agent mode currently runs on Anthropic (Claude) only.** Pick a model with **LevelCode: AI: Select Model…** — it sets the provider and model together."
},
"levelcode.ai.model": {
"type": "string",
"default": "",
"markdownDescription": "Active model id for the selected provider (used by every provider except Claude and Ollama, which keep their own `levelcode.ai.claude.model` / `levelcode.ai.ollama.model`). Usually set for you by **LevelCode: AI: Select Model…**; you can also type any model id your provider serves (e.g. `gpt-4o`, `anthropic/claude-sonnet-4-6` on OpenRouter)."
},
"levelcode.ai.baseURL": {
"type": "string",
"default": "",
"markdownDescription": "Base URL for the **OpenAI-compatible (custom)** provider — must end in `/v1` (e.g. `http://localhost:8000/v1` for vLLM, `http://localhost:1234/v1` for LM Studio). Only used when `levelcode.ai.provider` is `custom`. Prefer `https` (or explicit localhost) — your key is sent as a Bearer token to this host."
},
"levelcode.ai.cloudModel": {
"type": "string",
"default": "moonshotai/kimi-k2.7-code",
"markdownDescription": "Which **LevelCode Cloud** (gateway) model to run on a paid plan — chosen from your plan's roster via **LevelCode: AI: Select Model…** (the picker shows the live models with their credit multiplier + turns-left). Ignored on the free plan (always gpt-oss-120b) and in BYOK mode. The backend re-checks entitlement, so this can't over-reach your plan."
},
"levelcode.ai.includeActiveFile": {
"type": "boolean",
"default": true,
"description": "Automatically send the currently open file to the AI as context with each chat message."
},
"levelcode.ai.chat.autoContext": {
"type": "boolean",
"default": true,
"description": "Automatically find and include workspace files relevant to your chat question (via filename + symbol search)."
},
"levelcode.ai.chat.autoContextMaxFiles": {
"type": "number",
"default": 4,
"minimum": 0,
"description": "Maximum number of files auto-included as context per chat message."
},
"levelcode.ai.chat.scopeToActiveProject": {
"type": "boolean",
"default": true,
"description": "Limit auto-context search to the active file's top-level sub-folder, so unrelated sibling projects in the same workspace don't pollute results."
},
"levelcode.ai.chat.workspaceMap": {
"type": "boolean",
"default": false,
"description": "Include a list of all project file paths with each chat message, so the AI knows the repo structure. Uses more tokens."
},
"levelcode.ai.chat.groupActivity": {
"type": "boolean",
"default": true,
"description": "Fold consecutive agent actions (reads, edits, commands) into one collapsible activity card in the chat — the header shows the live step while running and a summary when done. Turn off for the flat, ungrouped timeline."
},
"levelcode.cloud.endpoint": {
"type": "string",
"default": "https://levelcode.ai",
"markdownDescription": "Base URL of your LevelCode Cloud host (Rails on Elastic Beanstalk) — one host serves sign-in, the account dashboard, AND the metered AI gateway. **Dev:** set to your ngrok URL, e.g. `https://thinly.ngrok.app`. **Prod:** `https://levelcode.ai`. Set to empty to make sign-in inert. In **BYOK** mode your keys never leave your machine."
},
"levelcode.cloud.apiUrl": {
"type": "string",
"default": "",
"markdownDescription": "Advanced: override the **backend API** base (metered gateway + token exchange) only if you split the API onto a different host from the website. Leave empty to use `levelcode.cloud.endpoint` (the normal one-host setup)."
},
"levelcode.ai.providerMode": {
"type": "string",
"enum": [
"byok",
"gateway"
],
"enumDescriptions": [
"Bring your own key — AI requests always go direct from your machine to your provider with your own key, even when you're signed in; your keys never touch LevelCode Cloud.",
"LevelCode Cloud gateway (default) — when you're signed in, AI runs through your metered LevelCode plan (no provider key needed) and automatically falls back to your own key (BYOK) when you're signed out."
],
"default": "gateway",
"markdownDescription": "How AI requests are routed. **gateway** (default): when you're signed in to LevelCode Cloud, requests run through your metered LevelCode plan via `levelcode.cloud.apiUrl` (the Rails backend) — no provider key required — and **automatically fall back to BYOK when you're signed out**, so simply signing in puts you on your plan with nothing to toggle. **byok**: always go direct to your provider with your own key, even when signed in. (The gateway is only ever used while signed in, so this default is safe when signed out.)"
},
"levelcode.ai.commandTimeout": {
"type": "number",
"default": 120000,
"description": "Backstop timeout in milliseconds before an approved shell command is force-killed (its whole process group). The Stop button on the terminal card is the primary control; set 0 to disable the backstop so long-running servers run until you stop them."
},
"levelcode.ai.contextWindow": {
"type": "number",
"default": 200000,
"description": "The model's context window in tokens, used for the in-chat context-usage meter and warning. Claude 4 models are 200000; raise to 1000000 if you've enabled the 1M-token context beta."
},
"levelcode.ai.debug": {
"type": "boolean",
"default": false,
"description": "Print detailed debug logs (every agent/chat action) inline in the chat, prefixed with 🐛 DEBUG. For diagnosing agent/chat issues. Off by default — when on, logs may include file contents, tool arguments, and full model responses, so avoid enabling it during screen-shares or recorded demos."
},
"levelcode.ai.agent.maxSteps": {
"type": "number",
"default": 25,
"minimum": 1,
"description": "Maximum tool-use steps the AI agent may take for one goal before stopping."
},
"levelcode.ai.agent.maxTokens": {
"type": "number",
"default": 8192,
"minimum": 1024,
"maximum": 32768,
"description": "Maximum output tokens per agent turn (agent mode only; chat/completions use levelcode.ai.claude.maxTokens). If a turn hits this cap mid-output the agent automatically continues in the next turn (so long answers/files aren't truncated), but raising it lets more come out in one turn. Capped at 32768 to bound worst-case spend across continuation turns."
},
"levelcode.ai.agent.autopilot": {
"type": "boolean",
"default": false,
"description": "Autopilot: let the agent run commands without asking, and prefer verifying its own work over pausing to ask you. It still stops and asks before anything hard to undo — deleting files, sudo, force-push / history rewrite, piping a remote script into a shell, publishing a package, or writing outside the project. File edits stay reviewable with Keep/Undo either way. Off by default."
},
"levelcode.ai.skills.enabled": {
"type": "boolean",
"default": true,
"description": "Let the agent self-select bundled skills (expert playbooks) for matching tasks like code review, bug fixes, and test writing. Each skill is a SKILL.md the agent loads on demand."
},
"levelcode.ai.verify.enabled": {
"type": "boolean",
"default": true,
"description": "After the agent finishes editing, automatically verify its work — pull editor diagnostics (type/lint errors) for the files it changed and, if a verify command is set, run it — then feed any failures back so the agent self-corrects until clean (bounded by levelcode.ai.verify.maxRounds)."
},
"levelcode.ai.verify.command": {
"type": "string",
"default": "",
"markdownDescription": "Optional one-shot command run to verify the agent's edits (e.g. `npm run typecheck`, `npm test`, `npm run lint`). It MUST exit on its own — do **not** use a dev server or watch command (those block; the `commandTimeout` backstop force-kills them). Leave empty to verify with editor diagnostics only."
},
"levelcode.ai.verify.maxRounds": {
"type": "number",
"default": 2,
"minimum": 0,
"description": "How many times the agent may be sent back to fix failing verification before it stops and hands the remaining problems to you. 0 = report-only (verification still runs and is shown, but the agent won't auto-retry)."
},
"levelcode.ai.verify.includeWarnings": {
"type": "boolean",
"default": false,
"description": "Treat editor warnings (not just errors) as verification failures the agent must fix. Off by default — only errors block."
},
"levelcode.ai.preview.autoOpen": {
"type": "boolean",
"default": true,
"markdownDescription": "When the agent starts a web server in the background, automatically open the site in LevelCode's built-in browser, beside the chat.\n\nOnly **local** addresses are ever opened — `localhost`, `127.0.0.1`, or the IPv6 loopback `[::1]`. The bind addresses `0.0.0.0` and `[::]` count as local and are shown as `localhost`, since a browser can't resolve them. A remote URL printed by a dev script is ignored, never opened.\n\nEach address opens at most once per session, so closing the tab is respected, and your focus is never taken. Turn this off to open previews yourself with **Simple Browser: Show**."
},
"levelcode.ai.mcp.servers": {
"type": "object",
"default": {},
"scope": "application",
"markdownDescription": "MCP servers the agent may use, as `{ \"name\": { \"command\": \"…\", \"args\": […], \"env\": {…} } }` (a `mcpServers` wrapper is also accepted). Each entry names **a process LevelCode will run with your privileges**, so add only servers you trust.\n\nExample:\n```json\n{ \"filesystem\": { \"command\": \"npx\", \"args\": [\"-y\", \"@modelcontextprotocol/server-filesystem\", \"/path\"] } }\n```\n\n**User-settings only** (application-scoped): a repo's committed `.vscode/settings.json` cannot set this, so opening an untrusted repo can never make LevelCode spawn a process. Servers defined in a repo's `.levelcode/mcp.json` are likewise read and listed but **never started** — its approval step ships in a later release."
},
"levelcode.ai.mcp.toolPolicy": {
"type": "object",
"default": {},
"scope": "application",
"markdownDescription": "Which MCP tools may run, as `{ \"server__tool\": \"allow\" | \"ask\" }` — use `\"*\": \"allow\"` for all of them. Tool names are namespaced `server__tool` exactly as they appear in the chat.\n\n**User-settings only** (application-scoped): a repo cannot set this to auto-allow its own tools. Anything not allow-listed is **refused**, including under Autopilot: an MCP tool is third-party code, so Autopilot deliberately does not relax this. A server's own `destructiveHint` overrides an `allow` here — server hints may only ever tighten, never loosen."
},
"levelcode.ai.completions.enabled": {
"type": "boolean",
"default": true,
"description": "Show inline AI code completions (ghost text) as you type. Accept with Tab."
},
"levelcode.ai.completions.model": {
"type": "string",
"enum": [
"claude-haiku-4-5-20251001",
"claude-sonnet-4-6",
"claude-opus-4-8"
],
"enumDescriptions": [
"Claude Haiku 4.5 (fastest — recommended)",
"Claude Sonnet 4.6 (balanced)",
"Claude Opus 4.8 (most capable, slower)"
],
"default": "claude-haiku-4-5-20251001",
"description": "Claude model used for inline completions. A fast model is recommended for low latency."
},
"levelcode.ai.completions.debounce": {
"type": "number",
"default": 150,
"minimum": 0,
"description": "Idle time in milliseconds before requesting an inline completion (lower = snappier but more requests)."
},
"levelcode.ai.claude.model": {
"type": "string",
"enum": [
"claude-opus-4-8",
"claude-sonnet-4-6",
"claude-haiku-4-5-20251001"
],
"enumDescriptions": [
"Claude Opus 4.8 (most capable)",
"Claude Sonnet 4.6 (balanced)",
"Claude Haiku 4.5 (fastest)"
],
"default": "claude-sonnet-4-6",
"description": "Claude model to use."
},
"levelcode.ai.claude.maxTokens": {
"type": "number",
"default": 4096,
"minimum": 256,
"description": "Maximum tokens in a Claude chat/completion response. (Agent turns use the separate levelcode.ai.agent.maxTokens setting.)"
},
"levelcode.ai.ollama.url": {
"type": "string",
"default": "http://localhost:11434",
"description": "Base URL of your local Ollama server."
},
"levelcode.ai.ollama.model": {
"type": "string",
"default": "llama3.1",
"description": "Ollama model name (must be pulled locally, e.g. `ollama pull llama3.1`)."
}
}
}
}
}