diff options
| author | Dax <[email protected]> | 2026-02-03 15:49:15 -0500 |
|---|---|---|
| committer | GitHub <[email protected]> | 2026-02-03 20:49:15 +0000 |
| commit | ee84eb44eef681188a6c5bca53c5b01db1118114 (patch) | |
| tree | d1be459d57221db1205fa51ea4aea70165a0413a | |
| parent | 82dd4b69080afe623c89cd279a980a99e31a2c6a (diff) | |
| download | opencode-ee84eb44eef681188a6c5bca53c5b01db1118114.tar.gz opencode-ee84eb44eef681188a6c5bca53c5b01db1118114.zip | |
cli: add --thinking flag to show reasoning blocks in run command (#12013)
| -rw-r--r-- | packages/opencode/src/cli/cmd/run.ts | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/packages/opencode/src/cli/cmd/run.ts b/packages/opencode/src/cli/cmd/run.ts index 59d0e01a7..6960ffd55 100644 --- a/packages/opencode/src/cli/cmd/run.ts +++ b/packages/opencode/src/cli/cmd/run.ts @@ -277,6 +277,11 @@ export const RunCommand = cmd({ type: "string", describe: "model variant (provider-specific reasoning effort, e.g., high, max, minimal)", }) + .option("thinking", { + type: "boolean", + describe: "show thinking blocks", + default: false, + }) }, handler: async (args) => { let message = [...args.message, ...(args["--"] || [])] @@ -455,7 +460,7 @@ export const RunCommand = cmd({ UI.empty() } - if (part.type === "reasoning" && part.time?.end) { + if (part.type === "reasoning" && part.time?.end && args.thinking) { if (emit("reasoning", { part })) continue const text = part.text.trim() if (!text) continue |
