mirror of
https://github.com/anomalyco/opencode.git
synced 2026-05-23 21:16:06 +00:00
add reasoning support to run command
This commit is contained in:
parent
666ffa2832
commit
2a7869dbf8
1 changed files with 13 additions and 0 deletions
|
|
@ -413,6 +413,19 @@ export const RunCommand = cmd({
|
|||
UI.println(part.text)
|
||||
UI.empty()
|
||||
}
|
||||
|
||||
if (part.type === "reasoning" && part.time?.end) {
|
||||
if (emit("reasoning", { part })) continue
|
||||
const text = part.text.trim()
|
||||
if (!text) continue
|
||||
if (!process.stdout.isTTY) {
|
||||
process.stdout.write(text + EOL)
|
||||
continue
|
||||
}
|
||||
UI.empty()
|
||||
UI.println(`_${text}_`)
|
||||
UI.empty()
|
||||
}
|
||||
}
|
||||
|
||||
if (event.type === "session.error") {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue