Class: ClaudeAgentSDK::UserMessage

Inherits:
Object
  • Object
show all
Defined in:
lib/claude_agent_sdk/types.rb

Overview

User message

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(content:, uuid: nil, parent_tool_use_id: nil, tool_use_result: nil) ⇒ UserMessage

Returns a new instance of UserMessage.



86
87
88
89
90
91
# File 'lib/claude_agent_sdk/types.rb', line 86

def initialize(content:, uuid: nil, parent_tool_use_id: nil, tool_use_result: nil)
  @content = content
  @uuid = uuid # Unique identifier for rewind support
  @parent_tool_use_id = parent_tool_use_id
  @tool_use_result = tool_use_result # Tool result data when message is a tool response
end

Instance Attribute Details

#contentObject

Returns the value of attribute content.



84
85
86
# File 'lib/claude_agent_sdk/types.rb', line 84

def content
  @content
end

#parent_tool_use_idObject

Returns the value of attribute parent_tool_use_id.



84
85
86
# File 'lib/claude_agent_sdk/types.rb', line 84

def parent_tool_use_id
  @parent_tool_use_id
end

#tool_use_resultObject

Returns the value of attribute tool_use_result.



84
85
86
# File 'lib/claude_agent_sdk/types.rb', line 84

def tool_use_result
  @tool_use_result
end

#uuidObject

Returns the value of attribute uuid.



84
85
86
# File 'lib/claude_agent_sdk/types.rb', line 84

def uuid
  @uuid
end