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 <marius@kilocode.ai>
This commit is contained in:
Trim21
2026-07-04 00:48:40 +08:00
committed by GitHub
parent 771f8c880c
commit e79b75126c
2 changed files with 11 additions and 1 deletions
+5
View File
@@ -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".
+6 -1
View File
@@ -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)