mirror of
https://github.com/anomalyco/opencode.git
synced 2026-05-20 02:50:40 +00:00
cli: prefix reasoning output with 'Thinking:' and use trimEnd()
This commit is contained in:
@@ -416,15 +416,16 @@ export const RunCommand = cmd({
|
||||
|
||||
if (part.type === "reasoning" && part.time?.end) {
|
||||
if (emit("reasoning", { part })) continue
|
||||
const text = part.text.trim()
|
||||
const text = part.text.trimEnd()
|
||||
if (!text) continue
|
||||
const line = `Thinking: ${text}`
|
||||
if (process.stdout.isTTY) {
|
||||
UI.empty()
|
||||
UI.println(`\u001b[3m${text}\u001b[0m`)
|
||||
UI.println(`\u001b[3m${line}\u001b[0m`)
|
||||
UI.empty()
|
||||
continue
|
||||
}
|
||||
process.stdout.write(text + EOL)
|
||||
process.stdout.write(line + EOL)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user