ClaudeCode.Content.ThinkingBlock (ClaudeCode v0.16.0)
View SourceRepresents a thinking content block within a Claude message.
Thinking blocks contain Claude's extended reasoning, visible when extended thinking is enabled on supported models.
Summary
Functions
Creates a new Thinking content block from JSON data.
Type guard to check if a value is a Thinking content block.
Types
Functions
Creates a new Thinking content block from JSON data.
Examples
iex> Thinking.new(%{"type" => "thinking", "thinking" => "Let me reason...", "signature" => "sig_123"})
{:ok, %Thinking{type: :thinking, thinking: "Let me reason...", signature: "sig_123"}}
iex> Thinking.new(%{"type" => "text"})
{:error, :invalid_content_type}
Type guard to check if a value is a Thinking content block.