Skip to content

feat: add tui.showThinking config toggle for reasoning visibility #600

Description

@avoidwork

Summary

Add a tui.showThinking config toggle to conditionally render the reasoning/thinking element in MessageBubble.

Motivation

The TUI has plumbing for reasoning content (reasoningContent field on the message model, rendered in MessageBubble at line 157-173), but it is always rendered when present. Users may want to hide thinking text for cleaner output. The config toggle provides control without requiring graph-level changes.

Proposed Solution

  1. Add tui.showThinking: true (default: true for backward compat) to config schema
  2. In messageBubble.js, check the config before rendering reasoningEl:
    const showReasoning = config?.tui?.showThinking !== false;
    const reasoningEl = showReasoning && hasReasoning ? ... : null;
  3. Add config validation in src/config/schemas.js

Alternatives Considered

  • Hardcoding the toggle off — less flexible, no user control
  • Stripping reasoning before it hits the TUI — loses the data entirely, config toggle preserves it

OpenSpec Note

This project uses OpenSpec for feature development. If this request is approved, I will:

  1. Run /opsx:propose to generate a full proposal with specs and tasks
  2. Iterate on the design before any code is written
  3. Follow the task-driven implementation workflow

Additional Context

  • Message model already has reasoningContent — no model changes needed
  • reasoningEl at messageBubble.js:161-173 is already conditionally rendered based on hasReasoning — just needs a config gate
  • committedReasoning in app.js is always "" — reasoning content is never populated, but the rendering path exists for when it is

Audit Findings (for Issue #600)

  • src/tui/messageBubble.js:157hasReasoning check: role === "assistant" && reasoningContent
  • src/tui/messageBubble.js:161-173reasoningEl renders (thinking) ... truncated at 200 chars when hasReasoning is true
  • src/tui/messageBubble.js:243reasoningEl rendered in the bubble JSX
  • src/config/schemas.js — Need to add tui.showThinking to the TUI config schema
  • src/tui/app.js:717reasoningContent: committedReasoning || undefined — ready to receive reasoning data

Implementation scope: One config field, one conditional in MessageBubble, one config schema update. Low risk, straightforward.

Metadata

Metadata

Assignees

No one assigned

    Labels

    approvedAn identifier for Madz to take action.feature

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions