Documentation
¶
Overview ¶
Package tui provides remote client functionality for connecting to a running daemon.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewRemoteDashboard ¶
func NewRemoteDashboard(addr string) (*Dashboard, *RemoteClient, error)
NewRemoteDashboard creates a dashboard that connects to a remote daemon via WebSocket. The addr can be a port number, host:port, or full URL.
func RenderLiveFeedEvents ¶
func RenderLiveFeedEvents(events []daemon.LiveFeedEvent, width int) string
RenderLiveFeedEvents renders a slice of live feed events with styling
Types ¶
type AgentOutputMsg ¶
AgentOutputMsg is sent when agent output is updated
type AgentSelectedMsg ¶
type AgentSelectedMsg struct {
Agent *daemon.AgentState
}
AgentSelectedMsg is sent when an agent is selected
type Dashboard ¶
type Dashboard struct {
// contains filtered or unexported fields
}
Dashboard is the main TUI model that displays agent status, output, and progress
func NewDashboard ¶
func NewDashboard(state *daemon.RuntimeState, eventBus *events.EventBus) *Dashboard
NewDashboard creates a new dashboard TUI with in-process state and event bus
type RemoteClient ¶
type RemoteClient struct {
// contains filtered or unexported fields
}
RemoteClient connects to a running daemon via HTTP/WebSocket
func NewRemoteClient ¶
func NewRemoteClient(addr string) *RemoteClient
NewRemoteClient creates a new remote client for the given daemon address
func (*RemoteClient) BaseURL ¶
func (c *RemoteClient) BaseURL() string
BaseURL returns the base HTTP URL
func (*RemoteClient) Close ¶
func (c *RemoteClient) Close() error
Close closes the WebSocket connection
func (*RemoteClient) Connect ¶
func (c *RemoteClient) Connect() error
Connect establishes connection to the daemon First fetches initial state via HTTP, then connects WebSocket for updates
func (*RemoteClient) GetEventBus ¶
func (c *RemoteClient) GetEventBus() *events.EventBus
GetEventBus returns the event bus for use by the TUI
func (*RemoteClient) GetState ¶
func (c *RemoteClient) GetState() *daemon.RuntimeState
GetState returns the runtime state for use by the TUI
func (*RemoteClient) IsConnected ¶
func (c *RemoteClient) IsConnected() bool
IsConnected returns whether the client is connected
type TerminalModel ¶
type TerminalModel struct {
// contains filtered or unexported fields
}
TerminalModel represents the terminal pane that displays agent output
func NewTerminalModel ¶
func NewTerminalModel() TerminalModel
NewTerminalModel creates a new terminal model
func (TerminalModel) Init ¶
func (m TerminalModel) Init() tea.Cmd
Init initializes the terminal model
func (*TerminalModel) SetAgent ¶
func (m *TerminalModel) SetAgent(agent *daemon.AgentState)
SetAgent updates the selected agent
func (TerminalModel) Update ¶
func (m TerminalModel) Update(msg tea.Msg) (TerminalModel, tea.Cmd)
Update handles messages and updates the terminal model