Documentation
¶
Index ¶
- Constants
- type AgentInfo
- type AvailableTool
- type Chat
- func (c *Chat) AddAssistantMessage(content string)
- func (c *Chat) AddErrorMessage(content string)
- func (c *Chat) AddUserMessage(content string)
- func (c *Chat) Blur()
- func (c *Chat) ClearInput()
- func (c *Chat) Focus()
- func (c Chat) Focused() bool
- func (c Chat) Init() tea.Cmd
- func (c *Chat) SetSending(sending bool)
- func (c *Chat) SetSize(w, h int)
- func (c Chat) Update(msg tea.Msg) (Chat, tea.Cmd)
- func (c Chat) Value() string
- func (c Chat) View() string
- type ChatMessage
- type Dashboard
- func (d *Dashboard) AddMessage(msg Message)
- func (d *Dashboard) AddTokens(count int)
- func (d Dashboard) AgentID() string
- func (d Dashboard) Connected() bool
- func (d *Dashboard) SetAgentID(id string)
- func (d *Dashboard) SetConnected(connected bool)
- func (d *Dashboard) SetError(msg string)
- func (d *Dashboard) SetSize(w, h int)
- func (d Dashboard) TotalTokens() int
- func (d Dashboard) Update(msg tea.Msg) (Dashboard, tea.Cmd)
- func (d Dashboard) View() string
- type Help
- type LogEntry
- type LogLevel
- type Logs
- type MemoryInfo
- type Message
- type MessageDirection
- type Messages
- type Messaging
- func (m *Messaging) AddWatchMessage(msg WatchMessage)
- func (m *Messaging) Blur()
- func (m *Messaging) ClearInputs()
- func (m *Messaging) ClearWatch()
- func (m *Messaging) Focus()
- func (m Messaging) Focused() bool
- func (m Messaging) Help() string
- func (m Messaging) Init() tea.Cmd
- func (m Messaging) IsSending() bool
- func (m Messaging) IsWatchActive() bool
- func (m Messaging) LeftContent() string
- func (m Messaging) LeftTitle() string
- func (m Messaging) Message() string
- func (m Messaging) Mode() MessagingMode
- func (m Messaging) RightContent() string
- func (m Messaging) RightTitle() string
- func (m *Messaging) SetResponse(response string, err error)
- func (m *Messaging) SetSending(sending bool)
- func (m *Messaging) SetSize(w, h int)
- func (m *Messaging) SetWatchStatus(topic string, err error)
- func (m Messaging) Topic() string
- func (m Messaging) Update(msg tea.Msg) (Messaging, tea.Cmd)
- func (m Messaging) View() string
- func (m Messaging) WatchTopicValue() string
- func (m Messaging) WatchedTopic() string
- type MessagingMode
- type RouteInfo
- type Status
- func (s *Status) AddTokens(count int)
- func (s Status) AgentID() string
- func (s Status) Connected() bool
- func (s Status) Content() string
- func (s *Status) SetAgentID(id string)
- func (s *Status) SetConnected(connected bool)
- func (s *Status) SetError(msg string)
- func (s *Status) SetSize(w, h int)
- func (s Status) TotalTokens() int
- func (s Status) View() string
- type Tab
- type Tabs
- type ToolExecution
- type ToolStatus
- type Tools
- func (t *Tools) AddEvent(exec ToolExecution)
- func (t Tools) LeftContent() string
- func (t Tools) LeftTitle() string
- func (t Tools) RightContent() string
- func (t Tools) RightTitle() string
- func (t *Tools) SetAvailableTools(tools []AvailableTool)
- func (t *Tools) SetSize(w, h int)
- func (t Tools) Update(msg tea.Msg) (Tools, tea.Cmd)
- func (t Tools) View() string
- type WatchMessage
Constants ¶
const ( TabDashboard = 0 TabChat = 1 TabMessaging = 2 TabLogs = 3 TabTools = 4 )
TabIndex constants for easy reference.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AgentInfo ¶
type AgentInfo struct {
Name string
Model string
Server string // Athyr server address
Subscribe []string
Publish []string
Routes []RouteInfo
MCPServers []string
Memory MemoryInfo
}
AgentInfo holds configuration details about the agent.
type AvailableTool ¶
AvailableTool represents an available MCP tool.
type Chat ¶
type Chat struct {
// contains filtered or unexported fields
}
Chat provides an interactive chat interface.
func (*Chat) AddAssistantMessage ¶
AddAssistantMessage adds an assistant message to the history.
func (*Chat) AddErrorMessage ¶
AddErrorMessage adds an error message to the history.
func (*Chat) AddUserMessage ¶
AddUserMessage adds a user message to the history.
func (*Chat) SetSending ¶
SetSending sets the sending state (shows spinner).
type ChatMessage ¶
type ChatMessage struct {
Time time.Time
Role string // "user", "assistant", "error"
Content string
}
ChatMessage represents a message in the chat history.
type Dashboard ¶
type Dashboard struct {
// contains filtered or unexported fields
}
Dashboard displays the agent status and message flow side by side.
func NewDashboard ¶
NewDashboard creates a new Dashboard component.
func (*Dashboard) AddMessage ¶
AddMessage adds a new message to the log.
func (*Dashboard) SetAgentID ¶
SetAgentID updates the agent ID.
func (*Dashboard) SetConnected ¶
SetConnected updates the connection status.
func (Dashboard) TotalTokens ¶
TotalTokens returns the total token count.
type Help ¶
type Help struct {
// contains filtered or unexported fields
}
Help displays a keyboard shortcuts overlay.
type Logs ¶
type Logs struct {
// contains filtered or unexported fields
}
Logs displays a scrollable list of log entries.
type MemoryInfo ¶
type MemoryInfo struct {
Enabled bool
SessionPrefix string
TTL string
ProfileType string
MaxTokens int
}
MemoryInfo holds memory/session configuration.
type Message ¶
type Message struct {
Time time.Time
Direction MessageDirection
Topic string
Content string
Model string
Tokens int
}
Message represents a single message in the log.
type MessageDirection ¶
type MessageDirection int
MessageDirection indicates whether a message is incoming or outgoing.
const ( MessageIncoming MessageDirection = iota MessageOutgoing )
type Messages ¶
type Messages struct {
// contains filtered or unexported fields
}
Messages displays a scrollable list of messages.
func (*Messages) AddMessage ¶
AddMessage adds a new message to the log.
func (*Messages) SetSize ¶
SetSize updates the component size. w and h are the total panel dimensions.
type Messaging ¶
type Messaging struct {
// contains filtered or unexported fields
}
Messaging provides an interface to send messages to topics.
func NewMessaging ¶
NewMessaging creates a new Messaging component.
func (*Messaging) AddWatchMessage ¶
func (m *Messaging) AddWatchMessage(msg WatchMessage)
AddWatchMessage adds a message to the watch buffer.
func (*Messaging) ClearInputs ¶
func (m *Messaging) ClearInputs()
ClearInputs clears all inputs, response, and watch state.
func (*Messaging) ClearWatch ¶
func (m *Messaging) ClearWatch()
ClearWatch clears watch state and messages.
func (*Messaging) Focus ¶
func (m *Messaging) Focus()
Focus focuses the component on the topic field.
func (Messaging) IsWatchActive ¶
IsWatchActive returns whether watching is active.
func (Messaging) LeftContent ¶
LeftContent returns the content for the left (Send) panel without title.
func (Messaging) Mode ¶
func (m Messaging) Mode() MessagingMode
Mode returns the current messaging mode.
func (Messaging) RightContent ¶
RightContent returns the content for the right (Watch) panel without title.
func (Messaging) RightTitle ¶
RightTitle returns the title for the right (Watch) panel.
func (*Messaging) SetResponse ¶
SetResponse sets the response from a request.
func (*Messaging) SetSending ¶
SetSending sets the sending state.
func (*Messaging) SetWatchStatus ¶
SetWatchStatus updates the watch state.
func (Messaging) WatchTopicValue ¶
WatchTopicValue returns the current watch topic input value.
func (Messaging) WatchedTopic ¶
WatchedTopic returns the currently watched topic (empty if not watching).
type MessagingMode ¶
type MessagingMode int
MessagingMode represents the message sending mode.
const ( ModePublish MessagingMode = iota // Fire-and-forget ModeRequest // Wait for reply )
type Status ¶
type Status struct {
// contains filtered or unexported fields
}
Status displays the connection status panel.
func (*Status) SetConnected ¶
SetConnected updates the connection status.
func (Status) TotalTokens ¶
TotalTokens returns the total token count.
type Tabs ¶
type Tabs struct {
// contains filtered or unexported fields
}
Tabs manages tab navigation.
type ToolExecution ¶
type ToolExecution struct {
Time time.Time
Status ToolStatus
Name string
Args string
Result string
Error error
Duration time.Duration
}
ToolExecution represents a tool call and its result.
type ToolStatus ¶
type ToolStatus int
ToolStatus indicates the state of a tool execution.
const ( ToolStarted ToolStatus = iota ToolCompleted ToolFailed )
type Tools ¶
type Tools struct {
// contains filtered or unexported fields
}
Tools displays available tools and execution history in a split view.
func (*Tools) AddEvent ¶
func (t *Tools) AddEvent(exec ToolExecution)
AddEvent adds a new tool execution event.
func (Tools) LeftContent ¶
LeftContent returns the content for the left panel (viewport content).
func (Tools) RightContent ¶
RightContent returns the content for the right panel (viewport content).
func (Tools) RightTitle ¶
RightTitle returns the title for the right panel.
func (*Tools) SetAvailableTools ¶
func (t *Tools) SetAvailableTools(tools []AvailableTool)
SetAvailableTools sets the list of available tools.
type WatchMessage ¶
WatchMessage represents a message received on a watched topic.