refactor: extract text variable and skip empty output

pull/11814/head
Dax Raad 2026-02-02 13:06:34 -05:00
parent f21f8bb4c7
commit 7bcf5e40ec
1 changed files with 4 additions and 2 deletions

View File

@ -405,12 +405,14 @@ export const RunCommand = cmd({
if (part.type === "text" && part.time?.end) {
if (emit("text", { part })) continue
const text = part.text.trim()
if (!text) continue
if (!process.stdout.isTTY) {
process.stdout.write(part.text + EOL)
process.stdout.write(text + EOL)
continue
}
UI.empty()
UI.println(part.text.trim())
UI.println(text)
UI.empty()
}