Jelajahi Sumber

feat: re-enable reasoning output with proper display handling

Dax Raad 2 bulan lalu
induk
melakukan
6402c2ab19
1 mengubah file dengan 11 tambahan dan 1 penghapusan
  1. 11 1
      packages/opencode/src/cli/cmd/run.ts

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

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