struct ACP::Protocol::TextContentBlock

Overview

A plain-text content block. This is the most common block type, used for user messages and code snippets. All Agents MUST support text content blocks in prompts. Clients SHOULD render this text as Markdown.

See: https://agentclientprotocol.com/protocol/content#text-content

Included Modules

Defined in:

acp/protocol/content_block.cr

Constructors

Instance Method Summary

Instance methods inherited from struct ACP::Protocol::ContentBlock

type : String type

Constructor methods inherited from struct ACP::Protocol::ContentBlock

new(pull : JSON::PullParser) new

Constructor Detail

def self.new(pull : JSON::PullParser) #

A plain-text content block. This is the most common block type, used for user messages and code snippets. All Agents MUST support text content blocks in prompts. Clients SHOULD render this text as Markdown.

See: https://agentclientprotocol.com/protocol/content#text-content


[View source]
def self.new(text : String, annotations : Annotations | Nil = nil, meta : Hash(String, JSON::Any) | Nil = nil) #

[View source]

Instance Method Detail

def annotations : Annotations | Nil #

Optional metadata about how the content should be used or displayed.


[View source]
def annotations=(annotations : Annotations | Nil) #

Optional metadata about how the content should be used or displayed.


[View source]
def content : String #

Alias for backward compatibility (previously named #content).


[View source]
def meta : Hash(String, JSON::Any) | Nil #

Extension metadata.


[View source]
def meta=(meta : Hash(String, JSON::Any) | Nil) #

Extension metadata.


[View source]
def text : String #

The text content of the block.


[View source]
def text=(text : String) #

The text content of the block.


[View source]
def type : String #

Always "text" for this block type.


[View source]