refactor(cli-run): stream reasoning text instead of summarized thinking line
Replace the single-line "Thinking: <summary>" rendering with direct streaming of reasoning tokens via writePaddedText. Removes maybePrintThinkingLine and renderThinkingLine in favor of incremental output with dim styling. 🤖 Generated with assistance of [OhMyOpenCode](https://github.com/code-yeongyu/oh-my-opencode)
This commit is contained in:
@@ -25,29 +25,11 @@ export function renderAgentHeader(
|
||||
}
|
||||
|
||||
export function openThinkBlock(): void {
|
||||
return
|
||||
process.stdout.write("\n ┃ Thinking: ")
|
||||
}
|
||||
|
||||
export function closeThinkBlock(): void {
|
||||
process.stdout.write("\n")
|
||||
}
|
||||
|
||||
export function renderThinkingLine(
|
||||
summary: string,
|
||||
previousWidth: number,
|
||||
): number {
|
||||
const line = ` ┃ Thinking: ${summary} `
|
||||
const isGitHubActions = process.env.GITHUB_ACTIONS === "true"
|
||||
|
||||
if (isGitHubActions) {
|
||||
process.stdout.write(`${pc.dim(line)}\n`)
|
||||
return line.length
|
||||
}
|
||||
|
||||
const minPadding = 6
|
||||
const clearPadding = Math.max(previousWidth - line.length + minPadding, minPadding)
|
||||
process.stdout.write(`\r${pc.dim(line)}${" ".repeat(clearPadding)}`)
|
||||
return line.length
|
||||
process.stdout.write(" \n")
|
||||
}
|
||||
|
||||
export function writePaddedText(
|
||||
|
||||
Reference in New Issue
Block a user