run

package
v0.4.26 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 20, 2025 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RunContext

type RunContext struct {
	// Core components (ConversationManager is required)
	ConversationManager conversation.Manager

	StepSettings *settings.StepSettings

	StepFactory *ai.StandardStepFactory
	Router      *events.EventRouter

	// Optional UI/Terminal specific components
	UISettings *UISettings
	Writer     io.Writer

	// Run configuration
	RunMode RunMode
}

RunContext encapsulates all the settings and state needed for a single command run

func NewRunContext

func NewRunContext(manager conversation.Manager) *RunContext

NewRunContext creates a new RunContext with default values and a required manager

type RunMode

type RunMode int
const (
	RunModeBlocking RunMode = iota
	RunModeInteractive
	RunModeChat
)

type RunOption

type RunOption func(*RunContext) error

func WithConversationManager

func WithConversationManager(manager conversation.Manager) RunOption

func WithRouter

func WithRouter(router *events.EventRouter) RunOption

func WithRunMode

func WithRunMode(mode RunMode) RunOption

func WithStepSettings

func WithStepSettings(settings *settings.StepSettings) RunOption

func WithUISettings

func WithUISettings(settings *UISettings) RunOption

func WithWriter

func WithWriter(w io.Writer) RunOption

type UISettings

type UISettings struct {
	Interactive      bool
	ForceInteractive bool
	NonInteractive   bool
	StartInChat      bool
	PrintPrompt      bool
	Output           string
	WithMetadata     bool
	FullOutput       bool
}

UISettings contains all settings related to terminal UI and output formatting

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL