()
| 50 | } |
| 51 | |
| 52 | async function target() { |
| 53 | if (typeof OPENCODE_WORKER_PATH !== "undefined") return OPENCODE_WORKER_PATH |
| 54 | const dist = new URL("./cli/tui/worker.js", import.meta.url) |
| 55 | if (await Filesystem.exists(fileURLToPath(dist))) return dist |
| 56 | return new URL("../tui/worker.ts", import.meta.url) |
| 57 | } |
| 58 | |
| 59 | async function input(value?: string) { |
| 60 | const piped = process.stdin.isTTY ? undefined : await Bun.stdin.text() |
no test coverage detected