From 74ec8f5fa2466a69b86a8b2b9826c4cc8ea394b5 Mon Sep 17 00:00:00 2001 From: kirillk Date: Wed, 29 Jul 2026 16:39:09 -0400 Subject: [PATCH] fix(vscode): use positional workspace for isolated scripts --- .vscode/launch.json | 22 ---------------------- packages/kilo-vscode/script/launch.ts | 9 +++++++-- 2 files changed, 7 insertions(+), 24 deletions(-) diff --git a/.vscode/launch.json b/.vscode/launch.json index 9ad3477ef8..08c16627ff 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -31,34 +31,12 @@ "command": "bun script/launch.ts --isolated --workspace \"${workspaceFolder}\"", "cwd": "${workspaceFolder}/packages/kilo-vscode" }, - { - "name": "VSCode - Run Extension (Isolated: Choose Folder)", - "type": "node-terminal", - "request": "launch", - "command": "bun script/launch.ts --isolated --workspace \"${input:kiloDevWorkspace}\"", - "cwd": "${workspaceFolder}/packages/kilo-vscode" - }, { "name": "VSCode - Run Extension (Isolated Clean)", "type": "node-terminal", "request": "launch", "command": "bun script/launch.ts --isolated --clean --workspace \"${workspaceFolder}\"", "cwd": "${workspaceFolder}/packages/kilo-vscode" - }, - { - "name": "VSCode - Run Extension (Isolated Clean: Choose Folder)", - "type": "node-terminal", - "request": "launch", - "command": "bun script/launch.ts --isolated --clean --workspace \"${input:kiloDevWorkspace}\"", - "cwd": "${workspaceFolder}/packages/kilo-vscode" - } - ], - "inputs": [ - { - "id": "kiloDevWorkspace", - "type": "promptString", - "description": "Folder to open in the isolated VS Code instance", - "default": "${workspaceFolder}" } ] } diff --git a/packages/kilo-vscode/script/launch.ts b/packages/kilo-vscode/script/launch.ts index 4d6fb3a3d2..627223035b 100644 --- a/packages/kilo-vscode/script/launch.ts +++ b/packages/kilo-vscode/script/launch.ts @@ -3,7 +3,7 @@ * Build the Kilo VS Code extension and launch it in a development host. * * Usage: - * bun script/launch.ts [options] + * bun script/launch.ts [options] [workspace] * * Options: * --no-build Skip the build step (reuse last build) @@ -44,10 +44,14 @@ const repo = resolve(root, "..", "..") function parse(argv: string[]) { const result: Record = {} + const values: string[] = [] for (let i = 0; i < argv.length; i++) { const item = argv[i]! - if (!item.startsWith("--")) continue + if (!item.startsWith("--")) { + values.push(item) + continue + } if (item.startsWith("--no-")) { result[item.slice(5)] = false @@ -72,6 +76,7 @@ function parse(argv: string[]) { i++ } + if (typeof result.workspace !== "string" && values[0]) result.workspace = values[0] return result }