mirror of
https://github.com/sst/opencode.git
synced 2025-12-23 10:11:41 +00:00
append piped stdin to prompt
This commit is contained in:
parent
facd851b11
commit
da909d9684
1 changed files with 1 additions and 5 deletions
|
|
@ -56,11 +56,7 @@ export const RunCommand = cmd({
|
|||
handler: async (args) => {
|
||||
let message = args.message.join(" ")
|
||||
|
||||
// Read from stdin if no message provided and stdin is available
|
||||
if (!message && !process.stdin.isTTY) {
|
||||
message = await Bun.stdin.text()
|
||||
message = message.trim()
|
||||
}
|
||||
if (!process.stdin.isTTY) message += "\n" + (await Bun.stdin.text())
|
||||
|
||||
await bootstrap({ cwd: process.cwd() }, async () => {
|
||||
const session = await (async () => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue