Skip to content
Draft
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
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"type": "module",
"packageManager": "bun@1.3.0",
"scripts": {
"dev": "bun run --cwd packages/opencode --conditions=browser src/index.ts",
"dev": "bun run --cwd packages/opencode dev",
"typecheck": "bun turbo typecheck",
"prepare": "husky",
"random": "echo 'Random script'"
Expand Down
2 changes: 1 addition & 1 deletion packages/opencode/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"typecheck": "tsgo --noEmit",
"test": "bun test",
"build": "./script/build.ts",
"dev": "bun run --conditions=browser ./src/index.ts",
"dev": "NODE_ENV=development bun run --conditions=browser ./src/index.ts",
"random": "echo 'Random script updated at $(date)'"
},
"bin": {
Expand Down
7 changes: 6 additions & 1 deletion packages/opencode/src/cli/cmd/tui/thread.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import { upgrade } from "@/cli/upgrade"
import { Session } from "@/session"
import { bootstrap } from "@/cli/bootstrap"
import path from "path"
import { fileURLToPath } from "url"
import { UI } from "@/cli/ui"

export const TuiThreadCommand = cmd({
Expand Down Expand Up @@ -77,7 +78,11 @@ export const TuiThreadCommand = cmd({
return undefined
})()

const worker = new Worker("./src/cli/cmd/tui/worker.ts")
const worker = new Worker(
process.env.NODE_ENV === "development"
? path.join(path.dirname(fileURLToPath(import.meta.url)), "worker.ts")
: "./src/cli/cmd/tui/worker.ts",
)
worker.onerror = console.error
const client = Rpc.client<typeof rpc>(worker)
process.on("uncaughtException", (e) => {
Expand Down