Expand description
Message types, content blocks, and streaming events.
These types are the shared “wire format” used across the project:
- Providers stream
StreamEventvalues that incrementally build an assistant reply. - Sessions persist
Messagevalues as JSON (seecrate::session). - Tools return
ContentBlockoutput that can be rendered in the TUI and replayed to providers.
Structs§
- Assistant
Message - An assistant message.
- Cost
- Cost breakdown in dollars.
- Custom
Message - A custom message injected by the host or extensions.
- Image
Content - Image content block.
- Text
Content - Text content block.
- Thinking
Content - Thinking/reasoning content block.
- Tool
Call - Tool call content block.
- Tool
Result Message - A tool result message.
- Usage
- Token usage and cost tracking.
- User
Message - A user message.
Enums§
- Assistant
Message Event - Streaming event emitted for assistant message updates.
- Content
Block - A content block in a message.
- Message
- A message in a conversation.
- Stop
Reason - Why a response ended.
- Stream
Event - Streaming event from a provider.
- Thinking
Level - Extended thinking level.
- User
Content - User message content - either plain text or blocks.