Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Agent ¶
type Agent struct {
agentdomain.AgentService
// contains filtered or unexported fields
}
Agent is the chat TUI's agent for a local chat rendered through AG-UI: the in-process agent's events are written as a run by the encoder the serve worker uses and read back by the reducer a daemon chat uses, so both chats share one mapping. Everything but the run stream goes straight to the agent.
func New ¶
func New(agent agentdomain.AgentService, repo convdomain.ConversationRepository, jobs func() []scheddomain.TrackedJob) *Agent
New wraps agent, whose runs the TUI then reads back from AG-UI frames. jobs snapshots the background tasks, whose patch hands over a step's tool results.
func (*Agent) RunWithStream ¶
func (a *Agent) RunWithStream(ctx context.Context, req *agentdomain.AgentRequest) (<-chan agentdomain.ChatEvent, error)
RunWithStream runs the request on the wrapped agent and streams what its AG-UI run reduces to, until the run wrote its terminal event. ponytail: a plan skips the run, since the agent does not wait on it and the chat restarts the run itself. It becomes an interrupt once the handlers stop deciding plans.