Explorar o código

cli: re-enable reasoning output with italic formatting

Dax Raad hai 2 meses
pai
achega
48db3981e4
Modificáronse 1 ficheiros con 9 adicións e 1 borrados
  1. 9 1
      packages/opencode/src/cli/cmd/run.ts

+ 9 - 1
packages/opencode/src/cli/cmd/run.ts

@@ -415,7 +415,15 @@ export const RunCommand = cmd({
             }
 
             if (part.type === "reasoning" && part.time?.end) {
-              continue
+              if (emit("reasoning", { part })) continue
+              const text = part.text.trimEnd()
+              if (!text) continue
+              const line = `Thinking: ${text}`
+              if (process.stdout.isTTY) {
+                UI.println(`\u001b[3m${line}\u001b[0m`)
+                continue
+              }
+              process.stdout.write(line + EOL)
             }
           }