Documentation
¶
Index ¶
- type Message
- func Agent(typ MessageType, agentName, content string) *Message
- func Cancelled() *Message
- func Error(content string) *Message
- func ShellOutput(content string) *Message
- func Spinner() *Message
- func ToolCallMessage(agentName string, toolCall tools.ToolCall, toolDef tools.Tool, ...) *Message
- func User(content string) *Message
- func Welcome(content string) *Message
- type MessageType
- type Todo
- type ToolStatus
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Message ¶
type Message struct {
Type MessageType
Content string
Sender string // Agent name for assistant messages
ToolCall tools.ToolCall // Associated tool call for tool messages
ToolDefinition tools.Tool // Definition of the tool being called
ToolStatus ToolStatus // Status for tool calls
}
Message represents a single message in the chat
func Agent ¶ added in v1.9.12
func Agent(typ MessageType, agentName, content string) *Message
func ShellOutput ¶ added in v1.9.12
func ToolCallMessage ¶ added in v1.9.12
type MessageType ¶
type MessageType int
MessageType represents different types of messages
const ( MessageTypeUser MessageType = iota MessageTypeAssistant MessageTypeAssistantReasoning MessageTypeSpinner MessageTypeError MessageTypeShellOutput MessageTypeCancelled MessageTypeToolCall MessageTypeToolResult MessageTypeWelcome )
type Todo ¶ added in v1.9.11
type Todo struct {
ID string `json:"id"`
Description string `json:"description"`
Status string `json:"status"`
}
Todo represents a single todo item
type ToolStatus ¶
type ToolStatus int
ToolStatus represents the status of a tool call
const ( ToolStatusPending ToolStatus = iota ToolStatusConfirmation ToolStatusRunning ToolStatusCompleted ToolStatusError )
Click to show internal directories.
Click to hide internal directories.