From e79b75126c3da34a6aa6ac83cbf24672497c0910 Mon Sep 17 00:00:00 2001 From: Trim21 Date: Sat, 4 Jul 2026 00:48:40 +0800 Subject: [PATCH] fix(vscode): include kilo-sandbox-mutation-worker.js in extension bundle (#11926) * fix(vscode): include kilo-sandbox-mutation-worker.js in extension bundle The release build script (packages/kilo-vscode/script/build.ts) was missing the copyKiloSandboxWorker call, causing the sandbox mutation worker file to be absent from .vsix packages. All sandbox-enclosed file operations (write, copy, rename, chmod, etc.) would fail with a "Module not found" error because the kilo binary could not spawn the required worker process. Closes #11925 * chore(vscode): fix import formatting --------- Co-authored-by: marius-kilocode --- .changeset/fix-missing-sandbox-worker.md | 5 +++++ packages/kilo-vscode/script/build.ts | 7 ++++++- 2 files changed, 11 insertions(+), 1 deletion(-) create mode 100644 .changeset/fix-missing-sandbox-worker.md diff --git a/.changeset/fix-missing-sandbox-worker.md b/.changeset/fix-missing-sandbox-worker.md new file mode 100644 index 0000000000..25ecfb93d9 --- /dev/null +++ b/.changeset/fix-missing-sandbox-worker.md @@ -0,0 +1,5 @@ +--- +"kilo-code": patch +--- + +Fix missing kilo-sandbox-mutation-worker.js in VS Code extension bundle, which caused sandboxed file operations to fail with "Module not found". diff --git a/packages/kilo-vscode/script/build.ts b/packages/kilo-vscode/script/build.ts index 74abe402ab..c6dd9b4b9a 100644 --- a/packages/kilo-vscode/script/build.ts +++ b/packages/kilo-vscode/script/build.ts @@ -2,7 +2,11 @@ import { $ } from "bun" import { join } from "node:path" import { existsSync, mkdirSync, rmSync, chmodSync } from "node:fs" -import { copySandboxResources, copyTreeSitterResources } from "../src/services/cli-backend/cli-resources" +import { + copyKiloSandboxWorker, + copySandboxResources, + copyTreeSitterResources, +} from "../src/services/cli-backend/cli-resources" import { ensureFfmpegForTarget } from "./ffmpeg-helper" const packageJsonPath = join(import.meta.dir, "..", "package.json") @@ -78,6 +82,7 @@ for (const config of targets) { await $`cp ${sourceBinary} ${targetBinary}` await copyTreeSitterResources(sourceBinary, targetBinary) await copySandboxResources(sourceBinary, targetBinary) + await copyKiloSandboxWorker(sourceBinary, targetBinary) if (config.binary !== "kilo.exe") { chmodSync(targetBinary, 0o755)