Documentation
¶
Index ¶
- Variables
- func PrintAgentName(agentName string)
- func PrintError(err error)
- func PrintToolCall(toolCall tools.ToolCall, colorFunc ...func(format string, a ...any) string)
- func PrintToolCallResponse(toolCall tools.ToolCall, response string)
- func PrintWelcomeMessage(appName string)
- func Run(ctx context.Context, cfg Config, agentFilename string, rt runtime.Runtime, ...) error
- type Config
- type ConfirmationResult
- type RuntimeError
Constants ¶
This section is empty.
Variables ¶
View Source
var ( Blue = blue Yellow = yellow Red = red White = white Green = green Bold = bold )
Color formatting functions (exported for use by other packages)
Functions ¶
func PrintAgentName ¶
func PrintAgentName(agentName string)
PrintAgentName prints the agent name header
func PrintToolCall ¶
PrintToolCall prints a tool call
func PrintToolCallResponse ¶
PrintToolCallResponse prints a tool call response
func PrintWelcomeMessage ¶
func PrintWelcomeMessage(appName string)
PrintWelcomeMessage prints the welcome message
Types ¶
type ConfirmationResult ¶
type ConfirmationResult string
ConfirmationResult represents the result of a user confirmation prompt
const ( ConfirmationApprove ConfirmationResult = "approve" ConfirmationApproveSession ConfirmationResult = "approve_session" ConfirmationReject ConfirmationResult = "reject" ConfirmationAbort ConfirmationResult = "abort" )
func PrintToolCallWithConfirmation ¶
func PrintToolCallWithConfirmation(ctx context.Context, toolCall tools.ToolCall, rd io.Reader) ConfirmationResult
PrintToolCallWithConfirmation prints a tool call and prompts for confirmation
func PromptMaxIterationsContinue ¶
func PromptMaxIterationsContinue(ctx context.Context, maxIterations int) ConfirmationResult
PromptMaxIterationsContinue prompts the user to continue after max iterations
func PromptOAuthAuthorization ¶
func PromptOAuthAuthorization(ctx context.Context, serverURL string) ConfirmationResult
PromptOAuthAuthorization prompts the user for OAuth authorization
type RuntimeError ¶
type RuntimeError struct {
Err error
}
RuntimeError wraps runtime errors to distinguish them from usage errors
func (RuntimeError) Error ¶
func (e RuntimeError) Error() string
func (RuntimeError) Unwrap ¶
func (e RuntimeError) Unwrap() error
Click to show internal directories.
Click to hide internal directories.