Skip to main content

Module message

Module message 

Source
Expand description

Message and content part types for opencode_rs.

Structs§

AgentSource
Agent source information.
CacheUsage
Cache usage information.
CommandRequest
Request to execute a command in a session.
FilePartSourceText
Text range within a file part source.
Message
A message with its parts (API response format).
MessageInfo
Message info (metadata).
MessageTime
Message timestamps.
PromptRequest
Request to send a prompt to a session.
ShellRequest
Request to execute a shell command in a session.
TokenUsage
Token usage information.
ToolStateCompleted
Tool state when completed successfully.
ToolStateError
Tool state when errored.
ToolStatePending
Tool state when pending execution.
ToolStateRunning
Tool state when running.
ToolTimeRange
Tool execution time range.
ToolTimeStart
Tool execution time (start only).

Enums§

FilePartSource
Source information for a file part (internally tagged by “type”).
Part
A content part within a message (12 variants).
PromptPart
A content part in a prompt request.
ToolState
State of a tool execution (untagged enum with Unknown fallback).

Type Aliases§

MessageWithParts
Alias for backward compatibility.