Support extended thinking blocks display #120

Closed
opened 2026-02-06 16:31:10 -08:00 by hikari Β· 1 comment
Owner

Description

Claude Code supports extended thinking blocks where Claude shows its reasoning process. Multiple changelog versions reference improvements to thinking block handling.

Current State

We don't currently parse or display thinking blocks in the conversation view.

Proposed Changes

  1. Parse thinking content blocks from assistant messages
  2. Add a collapsible "Thinking" section in the conversation view
  3. Style thinking blocks distinctly from regular content (e.g., dimmed, italic)
  4. Consider a toggle to show/hide thinking blocks globally

References

  • Various changelog entries reference thinking block improvements
  • Thinking blocks appear as content blocks with type: "thinking" in assistant messages

Priority

Medium - Thinking blocks provide valuable insight into Claude's reasoning

✨ This issue was created with help from Hikari~ 🌸

## Description Claude Code supports extended thinking blocks where Claude shows its reasoning process. Multiple changelog versions reference improvements to thinking block handling. ## Current State We don't currently parse or display thinking blocks in the conversation view. ## Proposed Changes 1. Parse `thinking` content blocks from assistant messages 2. Add a collapsible "Thinking" section in the conversation view 3. Style thinking blocks distinctly from regular content (e.g., dimmed, italic) 4. Consider a toggle to show/hide thinking blocks globally ## References - Various changelog entries reference thinking block improvements - Thinking blocks appear as content blocks with `type: "thinking"` in assistant messages ## Priority Medium - Thinking blocks provide valuable insight into Claude's reasoning ✨ This issue was created with help from Hikari~ 🌸
Author
Owner

βœ… Implementation Complete (Awaiting CLI Support)

I've successfully implemented full support for extended thinking blocks display in commit 7781b2c! πŸŽ‰

What Was Implemented:

Backend (Rust):

  • βœ… Modified wsl_bridge.rs to emit thinking blocks with dedicated line_type: "thinking"
  • βœ… Sends raw thinking content (no [Thinking] prefix)

Frontend:

  • βœ… Added "thinking" to TerminalLine type union
  • βœ… Created ThinkingBlock.svelte component with collapsible UI
  • βœ… Updated Terminal.svelte to render thinking blocks conditionally
  • βœ… Added show_thinking_blocks config toggle (default: true)
  • βœ… Added UI toggle in Settings β†’ Appearance section

Component Features:

  • πŸ’‘ Lightbulb icon to indicate extended thinking
  • πŸ“… Timestamp display
  • ⬇️ Collapsible/expandable with animated chevron
  • 🎨 Distinct styling: dimmed, italic, monospace text
  • βš™οΈ Respects global config setting

Current Status: ⏳ Awaiting CLI Support

Extended thinking blocks are not currently being emitted by Claude Code CLI. Based on research:

  • Extended thinking is supported in Claude 4 models and Claude 3.7 Sonnet
  • There's an active GitHub issue (#287658) about enabling extended thinking in Claude Code
  • The feature appears to still be in development for the CLI

Testing:

Attempted to trigger extended thinking with various complex prompts (algorithmic analysis, multi-step reasoning, mathematical proofs), but no thinking blocks were received from the CLI. This suggests the feature isn't enabled yet in Claude Code.

Next Steps:

Our implementation is complete and ready! Once Claude Code CLI starts emitting thinking content blocks:

  • They will automatically display in the conversation
  • Users can toggle visibility via Settings
  • The collapsible UI will show Claude's reasoning process

The implementation is future-proof and awaiting upstream CLI support! 🌸

✨ Implemented by Hikari~ 🌸

## βœ… Implementation Complete (Awaiting CLI Support) I've successfully implemented full support for extended thinking blocks display in commit `7781b2c`! πŸŽ‰ ### What Was Implemented: **Backend (Rust)**: - βœ… Modified `wsl_bridge.rs` to emit thinking blocks with dedicated `line_type: "thinking"` - βœ… Sends raw thinking content (no `[Thinking]` prefix) **Frontend**: - βœ… Added "thinking" to `TerminalLine` type union - βœ… Created `ThinkingBlock.svelte` component with collapsible UI - βœ… Updated `Terminal.svelte` to render thinking blocks conditionally - βœ… Added `show_thinking_blocks` config toggle (default: true) - βœ… Added UI toggle in Settings β†’ Appearance section **Component Features**: - πŸ’‘ Lightbulb icon to indicate extended thinking - πŸ“… Timestamp display - ⬇️ Collapsible/expandable with animated chevron - 🎨 Distinct styling: dimmed, italic, monospace text - βš™οΈ Respects global config setting ### Current Status: ⏳ Awaiting CLI Support Extended thinking blocks are **not currently being emitted** by Claude Code CLI. Based on research: - Extended thinking is supported in Claude 4 models and Claude 3.7 Sonnet - There's an active [GitHub issue (#287658)](https://github.com/microsoft/vscode/issues/287658) about enabling extended thinking in Claude Code - The feature appears to still be in development for the CLI ### Testing: Attempted to trigger extended thinking with various complex prompts (algorithmic analysis, multi-step reasoning, mathematical proofs), but **no thinking blocks were received** from the CLI. This suggests the feature isn't enabled yet in Claude Code. ### Next Steps: Our implementation is **complete and ready**! Once Claude Code CLI starts emitting thinking content blocks: - They will automatically display in the conversation - Users can toggle visibility via Settings - The collapsible UI will show Claude's reasoning process The implementation is future-proof and awaiting upstream CLI support! 🌸 ✨ Implemented by Hikari~ 🌸
naomi closed this issue 2026-03-06 23:49:06 -08:00
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: nhcarrigan/hikari-desktop#120