Conversation message types for the agent chat.
Each message represents one entry in the conversation history: a user prompt, an assistant response, a tool call, or a thinking block.
Summary
Types
Image attachment metadata for display in chat.
System message severity level.
A single conversation message.
Deprecated: use MingaAgent.ToolCall.t() directly.
Deprecated: use MingaAgent.ToolCall.status() directly.
Deprecated: use MingaAgent.TurnUsage.t() directly.
Functions
Creates a new assistant message (initially empty).
Creates a system message (session events, status changes).
Extracts the plain text content of a message for clipboard copy.
Creates a new thinking message (initially empty, expanded).
Creates a new tool call message.
Creates a per-turn usage message.
Creates a new user message.
Creates a new user message with image attachments.
Types
@type image_attachment() :: %{filename: String.t(), size_kb: non_neg_integer()}
Image attachment metadata for display in chat.
@type system_level() :: :info | :error
System message severity level.
@type t() :: {:user, String.t()} | {:user, String.t(), [image_attachment()]} | {:assistant, String.t()} | {:thinking, String.t(), boolean()} | {:tool_call, MingaAgent.ToolCall.t()} | {:system, String.t(), system_level()} | {:usage, MingaAgent.TurnUsage.t()}
A single conversation message.
@type tool_call() :: MingaAgent.ToolCall.t()
Deprecated: use MingaAgent.ToolCall.t() directly.
@type tool_status() :: MingaAgent.ToolCall.status()
Deprecated: use MingaAgent.ToolCall.status() directly.
@type turn_usage() :: MingaAgent.TurnUsage.t()
Deprecated: use MingaAgent.TurnUsage.t() directly.
Functions
Creates a new assistant message (initially empty).
@spec system(String.t(), system_level()) :: t()
Creates a system message (session events, status changes).
Extracts the plain text content of a message for clipboard copy.
Creates a new thinking message (initially empty, expanded).
Creates a new tool call message.
@spec usage(MingaAgent.TurnUsage.t()) :: t()
Creates a per-turn usage message.
Creates a new user message.
@spec user(String.t(), [image_attachment()]) :: t()
Creates a new user message with image attachments.