Documentation
¶
Index ¶
- type App
- func (a *App) CompactSession()
- func (a *App) CurrentAgentCommands(ctx context.Context) map[string]string
- func (a *App) CurrentMCPPrompts(ctx context.Context) map[string]mcptools.PromptInfo
- func (a *App) EmitStartupInfo(ctx context.Context, events chan runtime.Event)
- func (a *App) ExecuteMCPPrompt(ctx context.Context, promptName string, arguments map[string]string) (string, error)
- func (a *App) FirstMessage() *string
- func (a *App) FirstMessageAttachment() string
- func (a *App) NewSession()
- func (a *App) PlainTextTranscript() string
- func (a *App) ResolveCommand(ctx context.Context, userInput string) string
- func (a *App) Resume(resumeType runtime.ResumeType)
- func (a *App) ResumeElicitation(ctx context.Context, action tools.ElicitationAction, content map[string]any) error
- func (a *App) Run(ctx context.Context, cancel context.CancelFunc, message string, ...)
- func (a *App) RunBangCommand(ctx context.Context, command string)
- func (a *App) RunWithMessage(ctx context.Context, cancel context.CancelFunc, msg *session.Message)
- func (a *App) Runtime() runtime.Runtime
- func (a *App) Session() *session.Session
- func (a *App) Subscribe(ctx context.Context, program *tea.Program)
- func (a *App) SwitchAgent(agentName string) error
- type Opt
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type App ¶
type App struct {
// contains filtered or unexported fields
}
func (*App) CompactSession ¶ added in v1.6.0
func (a *App) CompactSession()
func (*App) CurrentAgentCommands ¶ added in v1.9.1
CurrentAgentCommands returns the commands for the active agent
func (*App) CurrentMCPPrompts ¶ added in v1.9.25
CurrentMCPPrompts returns the available MCP prompts for the active agent
func (*App) EmitStartupInfo ¶ added in v1.9.14
EmitStartupInfo emits initial agent, team, and toolset information to the provided channel
func (*App) ExecuteMCPPrompt ¶ added in v1.9.25
func (a *App) ExecuteMCPPrompt(ctx context.Context, promptName string, arguments map[string]string) (string, error)
ExecuteMCPPrompt executes an MCP prompt with provided arguments and returns the content
func (*App) FirstMessage ¶
func (*App) FirstMessageAttachment ¶ added in v1.17.0
FirstMessageAttachment returns the attachment path for the first message.
func (*App) NewSession ¶ added in v1.6.0
func (a *App) NewSession()
func (*App) PlainTextTranscript ¶ added in v1.9.8
func (*App) ResolveCommand ¶ added in v1.9.1
ResolveCommand converts /command to its prompt text
func (*App) Resume ¶
func (a *App) Resume(resumeType runtime.ResumeType)
Resume resumes the runtime with the given confirmation type
func (*App) ResumeElicitation ¶ added in v1.9.14
func (a *App) ResumeElicitation(ctx context.Context, action tools.ElicitationAction, content map[string]any) error
ResumeElicitation resumes an elicitation request with the given action and content
func (*App) Run ¶
func (a *App) Run(ctx context.Context, cancel context.CancelFunc, message string, attachments map[string]string)
Run one agent loop
func (*App) RunBangCommand ¶ added in v1.8.0
func (*App) RunWithMessage ¶ added in v1.17.0
RunWithMessage runs the agent loop with a pre-constructed message. This is used for special cases like image attachments.
func (*App) SwitchAgent ¶ added in v1.16.0
SwitchAgent switches the currently active agent for subsequent user messages
type Opt ¶ added in v1.17.0
type Opt func(*App)
Opt is an option for creating a new App.
func WithFirstMessage ¶ added in v1.17.0
WithFirstMessage sets the first message to send.
func WithFirstMessageAttachment ¶ added in v1.17.0
WithFirstMessageAttachment sets the attachment path for the first message.