Documentation
¶
Index ¶
- Constants
- func Cat(a, b, sep string) string
- func GetUserInput(cfg *api.InputConfig, msg string) (*api.UserInput, error)
- func LaunchEditor(editor string, content string) (string, error)
- func LoadHistory(base string, maxHistory, maxSpan int) ([]*api.Message, error)
- func NewFileMemStore(workspace string) api.MemStore
- func OnceValue[T any](f func() T) func() T
- func ParseSpecialChars(args []string) *api.InputConfig
- func PlayAudio(data string) error
- func PrintInput(ctx context.Context, input string)
- func PrintOutput(ctx context.Context, format string, output *api.Output) error
- func ProcessBashScript(ctx context.Context, cfg *api.AppConfig, script string) error
- func ReadStdin() (string, error)
- func Run(argv []string) error
- func RunSwarm(cfg *api.App, user *api.User, argv []string) error
- func SaveOutput(filename string, message *api.Output) error
- func SetupAppConfig(app *api.App) error
- func SimpleEditor(title, content string) (string, bool, error)
- func StoreHistory(base string, messages []*api.Message) error
- func Validate(app *api.AppConfig) error
- type Editor
- type FileMemStore
Constants ¶
View Source
const ( // read from clipboard ClipinRedirect = "{" // read from clipboard and wait, allowing multiple copy // until Ctrl-D is entered ClipinRedirect2 = "{{" // write to clipboard, overwriting its content ClipoutRedirect = "}" // append to clipboard ClipoutRedirect2 = "}}" )
clipboard redirection
View Source
const DefaultEditor = "vi"
View Source
const StdinRedirect = "-"
Variables ¶
This section is empty.
Functions ¶
func GetUserInput ¶
GetUserInput collects user input for the agent. It prefers a direct message from the command line flag (--message), otherwise, it determines the input source (stdin, clipboard, editor) and collects input accordingly. It also attaches any provided files or template file if provided.
func LoadHistory ¶ added in v0.3.0
func NewFileMemStore ¶ added in v0.3.0
func ParseSpecialChars ¶
func ParseSpecialChars(args []string) *api.InputConfig
parse special char sequence for stdin/clipboard they can: + be at the end of the args + be in any order + be multiple instances
func PrintInput ¶
PrintInput prints the user input
func ProcessBashScript ¶
func SetupAppConfig ¶ added in v0.12.1
Types ¶
Click to show internal directories.
Click to hide internal directories.