fix: restore Bun stdin reads for prompt input (#16300)

This commit is contained in:
Dax
2026-03-06 02:08:10 -05:00
committed by GitHub
parent aec6ca71fa
commit 326c70184d
2 changed files with 2 additions and 4 deletions
+1 -2
View File
@@ -3,7 +3,6 @@ import { tui } from "./app"
import { Rpc } from "@/util/rpc"
import { type rpc } from "./worker"
import path from "path"
import { text as streamText } from "node:stream/consumers"
import { fileURLToPath } from "url"
import { UI } from "@/cli/ui"
import { Log } from "@/util/log"
@@ -54,7 +53,7 @@ async function target() {
}
async function input(value?: string) {
const piped = process.stdin.isTTY ? undefined : await streamText(process.stdin)
const piped = process.stdin.isTTY ? undefined : await Bun.stdin.text()
if (!value) return piped
if (!piped) return value
return piped + "\n" + value