cli: prefix reasoning output with 'Thinking:' and use trimEnd()
This commit is contained in:
parent
d3d261d37e
commit
2a38007101
1 changed files with 4 additions and 3 deletions
|
|
@ -416,15 +416,16 @@ export const RunCommand = cmd({
|
||||||
|
|
||||||
if (part.type === "reasoning" && part.time?.end) {
|
if (part.type === "reasoning" && part.time?.end) {
|
||||||
if (emit("reasoning", { part })) continue
|
if (emit("reasoning", { part })) continue
|
||||||
const text = part.text.trim()
|
const text = part.text.trimEnd()
|
||||||
if (!text) continue
|
if (!text) continue
|
||||||
|
const line = `Thinking: ${text}`
|
||||||
if (process.stdout.isTTY) {
|
if (process.stdout.isTTY) {
|
||||||
UI.empty()
|
UI.empty()
|
||||||
UI.println(`\u001b[3m${text}\u001b[0m`)
|
UI.println(`\u001b[3m${line}\u001b[0m`)
|
||||||
UI.empty()
|
UI.empty()
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
process.stdout.write(text + EOL)
|
process.stdout.write(line + EOL)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue