Class: Cline::SessionMessage::MessageContent

Inherits:
Cline::Schema
  • Object
show all
Defined in:
lib/cline/session_message.rb

Overview

A content block in a session message. All attributes are optional, some will be nil depending on the type of content.

Defined Under Namespace

Classes: ToolUseInput

Instance Attribute Summary

Attributes inherited from Cline::Schema

#extra_attributes

Public API collapse

Methods inherited from Cline::Schema

#==, as_hash, cast, cline_snake_attributes, of_hash, #to_cline_json, #to_hash

Instance Method Details

#contentString?

Returns Content of the tool result (for type "tool_result").

Returns:

  • (String, nil)

    Content of the tool result (for type "tool_result")



78
# File 'lib/cline/session_message.rb', line 78

attribute :content, :string

#idString?

Returns Tool use identifier (for type "tool_use").

Returns:

  • (String, nil)

    Tool use identifier (for type "tool_use")



66
# File 'lib/cline/session_message.rb', line 66

attribute :id, :string

#inputToolUseInput?

Returns Tool input parameters (for type "tool_use").

Returns:

  • (ToolUseInput, nil)

    Tool input parameters (for type "tool_use")



72
# File 'lib/cline/session_message.rb', line 72

attribute :input, ToolUseInput

#nameString?

Returns Tool name (for type "tool_use").

Returns:

  • (String, nil)

    Tool name (for type "tool_use")



69
# File 'lib/cline/session_message.rb', line 69

attribute :name, :string

#textString?

Returns Text content (for type "text").

Returns:

  • (String, nil)

    Text content (for type "text")



63
# File 'lib/cline/session_message.rb', line 63

attribute :text, :string

#tool_use_idString?

Returns Tool use identifier this result corresponds to (for type "tool_result").

Returns:

  • (String, nil)

    Tool use identifier this result corresponds to (for type "tool_result")



75
# File 'lib/cline/session_message.rb', line 75

attribute :tool_use_id, :string

#typeString

Returns Content block type (text, tool_use, tool_result).

Returns:

  • (String)

    Content block type (text, tool_use, tool_result)



60
# File 'lib/cline/session_message.rb', line 60

attribute :type, :string