Skip to content

Commit dfe9130

Browse files
thdxrishaksebsib
authored andcommitted
cli: add --thinking flag to show reasoning blocks in run command (anomalyco#12013)
1 parent 926479f commit dfe9130

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

  • packages/opencode/src/cli/cmd

packages/opencode/src/cli/cmd/run.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -277,6 +277,11 @@ export const RunCommand = cmd({
277277
type: "string",
278278
describe: "model variant (provider-specific reasoning effort, e.g., high, max, minimal)",
279279
})
280+
.option("thinking", {
281+
type: "boolean",
282+
describe: "show thinking blocks",
283+
default: false,
284+
})
280285
},
281286
handler: async (args) => {
282287
let message = [...args.message, ...(args["--"] || [])]
@@ -455,7 +460,7 @@ export const RunCommand = cmd({
455460
UI.empty()
456461
}
457462

458-
if (part.type === "reasoning" && part.time?.end) {
463+
if (part.type === "reasoning" && part.time?.end && args.thinking) {
459464
if (emit("reasoning", { part })) continue
460465
const text = part.text.trim()
461466
if (!text) continue

0 commit comments

Comments
 (0)