@@ -28,6 +28,8 @@ export interface CommandContext {
2828 setModel: (model: string) => void;
2929 thinkingEffort: ThinkingEffort | null;
3030 setThinkingEffort: (effort: ThinkingEffort | null) => void;
31+ showReasoning: boolean;
32+ setShowReasoning: (show: boolean) => void;
3133 planMode: boolean;
3234 setPlanMode: (enabled: boolean) => void;
3335 ralphMode: boolean;
@@ -195,6 +197,28 @@ async function handleModel(ctx: CommandContext, args: string): Promise<void> {
195197 );
196198 }
197199
200+function handleReasoning(ctx: CommandContext, args: string): void {
201+ const mode = args.trim().toLowerCase();
202+ if (!mode) {
203+ ctx.setShowReasoning(!ctx.showReasoning);
204+ writeln(
205+ `${PREFIX.success} reasoning display ${ctx.showReasoning ? c.green("on") : c.dim("off")}`,
206+ );
207+ return;
208+ }
209+ if (mode === "on") {
210+ ctx.setShowReasoning(true);
211+ writeln(`${PREFIX.success} reasoning display ${c.green("on")}`);
212+ return;
213+ }
214+ if (mode === "off") {
215+ ctx.setShowReasoning(false);
216+ writeln(`${PREFIX.success} reasoning display ${c.dim("off")}`);
217+ return;
218+ }
219+ writeln(`${PREFIX.error} usage: /reasoning <on|off>`);
220+}
221+
198222 function handlePlan(ctx: CommandContext): void {
199223 ctx.setPlanMode(!ctx.planMode);
200224 if (ctx.planMode) {
@@ -453,6 +477,7 @@ function handleHelp(
453477 const cmds: [string, string][] = [
454478 ["/model [id]", "list or switch models (fetches live list)"],
455479 ["/undo", "remove the last turn from conversation history"],
480+ ["/reasoning [on|off]", "toggle display of model reasoning output"],
456481 ["/plan", "toggle plan mode (read-only tools + MCP)"],
457482 [
458483 "/ralph",
@@ -557,6 +582,10 @@ export async function handleCommand(
557582 await handleUndo(ctx);
558583 return { type: "handled" };
559584
585+ case "reasoning":
586+ handleReasoning(ctx, args);
587+ return { type: "handled" };
588+
560589 case "plan":
561590 handlePlan(ctx);
562591 return { type: "handled" };