xonecas.io
64875
Mc

mini-coder / commit 502c1dd

chore: remove reasoning display plan document

xonecas2026-03-11 502c1dd4ff1ebf8c32f9770e22384697bd2cbda1 parent 4c65a83

1 file changed

reasoning-display-plan.md+0−118
@@ -1,118 +0,0 @@
1-# Implementation Plan: Reasoning Display Support
2-
3-## Current State Analysis
4-
5-### What Already Exists:
6-
7-| Component | Current State |
8-|-----------|---------------|
9-| `ReasoningDeltaEvent` in `types.ts` | ✅ Event type defined |
10-| `runTurn()` in `turn.ts` | ✅ Generates `reasoning-delta` events from AI SDK streams |
11-| `renderTurn()` in `stream-render.ts` | ✅ Handles events, shows "Thinking..." header, renders dimmed text |
12-| `preferred_thinking_effort` | ✅ Controls how much reasoning the model does (separate concern) |
13-
14-### What's Missing:
15-
16-| Component | Missing |
17-|-------------|---------|
18-| User setting | No toggle to show/hide reasoning output |
19-| `accumulatedText` | Reasoning not accumulated (unlike regular text) |
20-| Message persistence | Reasoning not stored in message history |
21-| Headless reporter | Ignores reasoning events |
22-| Status bar | No indicator for reasoning display mode |
23-
24----
25-
26-## Implementation Plan
27-
28-### Phase 1: Add Settings Infrastructure
29-**Files: `src/session/db/settings-repo.ts`**
30-
31-Add `preferred_show_reasoning` setting (boolean stored as "true"/"false" string):
32-- `getShowReasoning(): boolean` - returns true by default
33-- `setShowReasoning(show: boolean): void`
34-
35-### Phase 2: Update Reporter Interface & Types
36-**Files: `src/agent/reporter.ts`, `src/llm-api/types.ts`**
37-
38-1. Add `showReasoning?: boolean` to `StatusBarData` interface
39-2. Add `reasoningText` to `TurnResult` so reasoning can be accumulated and returned
40-
41-### Phase 3: Update Stream Rendering
42-**Files: `src/cli/stream-render.ts`**
43-
44-1. Accept `showReasoning` option in `renderTurn()`
45-2. When `showReasoning` is false: consume reasoning events but don't render them
46-3. Accumulate reasoning text into a separate buffer (not mixed with `accumulatedText`)
47-4. Return accumulated reasoning in `TurnResult`
48-
49-### Phase 4: Update Status Bar
50-**Files: `src/cli/status-bar.ts`**
51-
52-Add reasoning indicator (e.g., "🤔" or "thinking") when `showReasoning` is true
53-
54-### Phase 5: Update Command Context & CLI Commands
55-**Files: `src/cli/commands.ts`, `src/agent/session-runner.ts`, `src/index.ts`**
56-
57-1. Add `showReasoning` to `CommandContext`
58-2. Add `/reasoning` command to toggle (on|off)
59-3. Load/save preference from settings repo
60-4. Pass setting through to `SessionRunner` and reporter
61-
62-### Phase 6: Update Output Reporter & Headless Reporter
63-**Files: `src/cli/output-reporter.ts`, `src/cli/headless-reporter.ts`**
64-
65-1. Accept and forward `showReasoning` option
66-2. Headless reporter: still consume reasoning events (for accumulation) but never render
67-
68-### Phase 7: Agent Integration
69-**Files: `src/agent/agent.ts`**
70-
71-1. Load `getShowReasoning()` preference
72-2. Pass to `CommandContext` and `SessionRunner`
73-3. Update status bar calls to include reasoning flag
74-
75-### Phase 8: Help & Documentation
76-**Files: `src/cli/commands.ts`**
77-
78-Add `/reasoning` to help text
79-
80----
81-
82-## Files to Modify (in dependency order):
83-
84-1. `src/session/db/settings-repo.ts` - Add new setting functions
85-2. `src/llm-api/types.ts` - Add reasoning to TurnResult (if needed)
86-3. `src/agent/reporter.ts` - Update StatusBarData
87-4. `src/cli/stream-render.ts` - Add showReasoning option
88-5. `src/cli/status-bar.ts` - Add reasoning indicator
89-6. `src/cli/output-reporter.ts` - Forward option
90-7. `src/cli/headless-reporter.ts` - Handle reasoning events
91-8. `src/cli/commands.ts` - Add /reasoning command
92-9. `src/agent/session-runner.ts` - Accept and pass through setting
93-10. `src/agent/agent.ts` - Load preference, wire up
94-11. `src/index.ts` - Load preference on startup
95-12. `src/session/db/index.ts` - Export new functions
96-
97----
98-
99-## Design Decisions
100-
101-1. **Separate from thinking effort**: The existing `thinkingEffort` controls how much reasoning the model *produces*. The new `showReasoning` controls whether we *display* it. These are orthogonal concerns.
102-
103-2. **Default to true**: Users who have models with reasoning capability expect to see it. They can opt out.
104-
105-3. **Accumulate separately, don't persist**: Reasoning text should be accumulated for display purposes only. It must **NOT** be added to the message history that gets sent back to the model on subsequent turns - this would bloat the context window unnecessarily. The reasoning is ephemeral UI feedback, not part of the conversation state.
106-
107-4. **Headless mode**: Even when headless, we consume reasoning events to properly track state, but never render them (headless is non-interactive). The accumulated reasoning is discarded, not stored.
108-
109-## Additional Considerations
110-
111-### Context Window Bloat Prevention
112-
113-The reasoning output can be substantial (especially with high thinking effort). We must ensure:
114-
115-- `reasoningText` is **never** added to `coreHistory` or `session.messages`
116-- `reasoningText` is **never** returned in `TurnResult.messages` or `TurnCompleteEvent.messages`
117-- The reasoning is for UI display only and is discarded after the turn completes
118-- Abort message building (`buildAbortMessages`) should not include reasoning text