1 parent 3d663a5 commit 53dc493Copy full SHA for 53dc493
1 file changed
packages/opencode/src/cli/cmd/tui/thread.ts
@@ -68,9 +68,15 @@ export const TuiThreadCommand = cmd({
68
try {
69
stdin = process.stdin.isTTY
70
? process.stdin
71
- : new tty.ReadStream((await fs.open("/dev/tty", "r")).fd)
+ : new tty.ReadStream(
72
+ process.platform === "win32"
73
+ ? (await fs.open("CONIN$", "rw", 0o644)).fd
74
+ : (await fs.open("/dev/tty", "r")).fd
75
+ )
76
} catch (err) {
- console.error("Failed to open /dev/tty for input. Prompt piping from stdin might not be supported on your platform.")
77
+ console.error(
78
+ "Failed to open TTY for input. Prompt piping from stdin might not be supported on your platform.",
79
80
process.exit(1)
81
}
82
0 commit comments