Documentation
¶
Index ¶
- type Agent
- type AgentManager
- func (m *AgentManager) CloseAgent(agent *Agent) error
- func (m *AgentManager) CloseAll()
- func (m *AgentManager) CloseWorkspaceAgents(ws *data.Workspace)
- func (m *AgentManager) CreateAgent(ws *data.Workspace, agentType AgentType, rows, cols uint16) (*Agent, error)
- func (m *AgentManager) CreateViewer(ws *data.Workspace, command string, rows, cols uint16) (*Agent, error)
- func (m *AgentManager) SendInterrupt(agent *Agent) error
- type AgentType
- type Terminal
- func (t *Terminal) Close() error
- func (t *Terminal) File() *os.File
- func (t *Terminal) IsClosed() bool
- func (t *Terminal) Read(p []byte) (int, error)
- func (t *Terminal) Running() bool
- func (t *Terminal) SendInterrupt() error
- func (t *Terminal) SendString(s string) error
- func (t *Terminal) SetSize(rows, cols uint16) error
- func (t *Terminal) Write(p []byte) (int, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Agent ¶
type Agent struct {
Type AgentType
Terminal *Terminal
Workspace *data.Workspace
Config config.AssistantConfig
}
Agent represents a running AI agent instance
type AgentManager ¶
type AgentManager struct {
// contains filtered or unexported fields
}
AgentManager manages agent instances
func NewAgentManager ¶
func NewAgentManager(cfg *config.Config) *AgentManager
NewAgentManager creates a new agent manager
func (*AgentManager) CloseAgent ¶
func (m *AgentManager) CloseAgent(agent *Agent) error
CloseAgent closes an agent
func (*AgentManager) CloseWorkspaceAgents ¶ added in v0.0.5
func (m *AgentManager) CloseWorkspaceAgents(ws *data.Workspace)
CloseWorkspaceAgents closes and removes all agents for a specific workspace
func (*AgentManager) CreateAgent ¶
func (m *AgentManager) CreateAgent(ws *data.Workspace, agentType AgentType, rows, cols uint16) (*Agent, error)
CreateAgent creates a new agent for the given workspace.
func (*AgentManager) CreateViewer ¶
func (m *AgentManager) CreateViewer(ws *data.Workspace, command string, rows, cols uint16) (*Agent, error)
CreateViewer creates a new agent (viewer) for the given workspace and command.
func (*AgentManager) SendInterrupt ¶
func (m *AgentManager) SendInterrupt(agent *Agent) error
SendInterrupt sends an interrupt to an agent
type Terminal ¶
type Terminal struct {
// contains filtered or unexported fields
}
Terminal wraps a PTY with an associated command
func NewWithSize ¶
NewWithSize creates a new terminal with an initial size, if provided.
func (*Terminal) Read ¶
Read reads output from the terminal Note: This does NOT hold the mutex during the blocking read to avoid deadlock
func (*Terminal) SendInterrupt ¶
SendInterrupt sends Ctrl+C to the terminal
func (*Terminal) SendString ¶
SendString sends a string to the terminal