Versions in this module Expand all Collapse all v0 v0.12.1 Mar 1, 2026 v0.12.0 Mar 1, 2026 Changes in this version + const MessageTypeError + const MessageTypeResponse + const MessageTypeStatusMessage + const MessageTypeToolCall + const StatusErrored + const StatusFinished + const StatusInProgress + const StatusSurrendered + func RenderError(message string) string + func RenderMessage(msg MessageResponse) string + func RenderResponse(message string) string + func RenderStatus(message string) string + func RenderToolCall(message string) string + func RunREPL(ctx context.Context, client *Client) error + func RunSingleShot(ctx context.Context, client *Client, message string) error + type Client struct + func NewClient(conn Conn, queryParams map[string]string, opts ...ClientOption) *Client + func (c *Client) ChatID() string + func (c *Client) Close() error + func (c *Client) ReadResponses() <-chan MessageResponse + func (c *Client) Send(message string) error + type ClientOption func(*Client) + func WithChatID(id string) ClientOption + func WithSystemPrompt(prompt string) ClientOption + type Conn interface + Close func() error + ReadJSON func(v any) error + WriteJSON func(v any) error + func Dial(ctx context.Context, host string, token string) (Conn, error) + type MessageResponse struct + Message string + MessageType string + Status string + func (m *MessageResponse) IsTerminal() bool + type Payload struct + ChatID string + ExtraSystemPrompt string + Message string + OwnerProvider map[string]string