summaryrefslogtreecommitdiffhomepage
path: root/packages
diff options
context:
space:
mode:
authorHaris Gušić <[email protected]>2025-10-31 23:35:15 +0100
committerAiden Cline <[email protected]>2025-10-31 17:37:31 -0500
commitd473d4ffc8d15e1b6cbb34f5171e6b600f8d3eaa (patch)
treeb0acfac281f1fbd83cb426d41c1acf3e868cb172 /packages
parentaf5059652903f8f66b92773fce87a295bfdee274 (diff)
downloadopencode-d473d4ffc8d15e1b6cbb34f5171e6b600f8d3eaa.tar.gz
opencode-d473d4ffc8d15e1b6cbb34f5171e6b600f8d3eaa.zip
opentui: fix: Make worker.ts path independent from cwd (#3600)
Diffstat (limited to 'packages')
-rw-r--r--packages/opencode/src/cli/cmd/tui/thread.ts5
1 files changed, 4 insertions, 1 deletions
diff --git a/packages/opencode/src/cli/cmd/tui/thread.ts b/packages/opencode/src/cli/cmd/tui/thread.ts
index 74afba05b..956ddfb1b 100644
--- a/packages/opencode/src/cli/cmd/tui/thread.ts
+++ b/packages/opencode/src/cli/cmd/tui/thread.ts
@@ -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({
@@ -77,7 +78,9 @@ export const TuiThreadCommand = cmd({
return undefined
})()
- const worker = new Worker("./src/cli/cmd/tui/worker.ts")
+ const worker = new Worker(
+ path.join(path.dirname(fileURLToPath(import.meta.url)), "worker.ts"),
+ )
worker.onerror = console.error
const client = Rpc.client<typeof rpc>(worker)
process.on("uncaughtException", (e) => {