Class: Roast::Cogs::Agent::Providers::Claude::Messages::ThinkingMessage

Inherits:
Roast::Cogs::Agent::Providers::Claude::Message show all
Defined in:
lib/roast/cogs/agent/providers/claude/messages/thinking_message.rb

Constant Summary collapse

IGNORED_FIELDS =
[
  :signature,
  :role,
].freeze

Instance Attribute Summary collapse

Attributes inherited from Roast::Cogs::Agent::Providers::Claude::Message

#error, #session_id, #type, #unparsed

Instance Method Summary collapse

Methods inherited from Roast::Cogs::Agent::Providers::Claude::Message

from_hash, from_json

Constructor Details

#initialize(type:, hash:) ⇒ ThinkingMessage

: (type: Symbol, hash: Hash[Symbol, untyped]) -> void



20
21
22
23
24
# File 'lib/roast/cogs/agent/providers/claude/messages/thinking_message.rb', line 20

def initialize(type:, hash:)
  @thinking = hash.delete(:thinking) || ""
  hash.except!(*IGNORED_FIELDS)
  super(type:, hash:)
end

Instance Attribute Details

#thinkingObject (readonly)

: String



17
18
19
# File 'lib/roast/cogs/agent/providers/claude/messages/thinking_message.rb', line 17

def thinking
  @thinking
end

Instance Method Details

#format(context) ⇒ Object

: (ClaudeInvocation::Context) -> String?



27
28
29
# File 'lib/roast/cogs/agent/providers/claude/messages/thinking_message.rb', line 27

def format(context)
  @thinking
end