Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/worktree-dependencies.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"kilo-code": patch
---

Bootstrap missing locked workspace dependencies before building the extension from an Agent Manager worktree.
21 changes: 21 additions & 0 deletions packages/kilo-vscode/script/launch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,7 @@ async function compile() {
return
}

await ensureDependencies()
console.log("[launch] Building extension...")
await $`bun run build:launch`.cwd(root).env(cleanEnv(process.env))
console.log("[launch] Build complete")
Expand All @@ -254,6 +255,26 @@ function cleanEnv(input: NodeJS.ProcessEnv) {
return env
}

async function ensureDependencies() {
const required = [
{ name: "esbuild", dir: root },
{ name: "@opencode-ai/core/npm", dir: join(repo, "packages", "opencode") },
{ name: "@hey-api/openapi-ts", dir: join(repo, "packages", "sdk", "js") },
]
const ready = required.every((item) => {
try {
Bun.resolveSync(item.name, item.dir)
return true
} catch {
return false
}
})
if (ready) return

console.log("[launch] Worktree dependencies are missing, installing...")
await $`bun install --frozen-lockfile`.cwd(repo).env(cleanEnv(process.env))
}

// ---------------------------------------------------------------------------
// VSIX packaging (only for --mode vsix)
// ---------------------------------------------------------------------------
Expand Down
Loading