Documentation
¶
Index ¶
- Constants
- Variables
- func Exit(err error)
- func GetConfigData() embed.FS
- func InitConfig(viper *fangs.Viper)
- func NewUserInputError(text string) error
- func NewUserInputErrorf(format string, a ...interface{}) error
- func ParseAgentArgs(app *api.AppConfig, args []string, defaultAgent string) []string
- func ParseArgs(viper *fangs.Viper, app *api.AppConfig, args []string, defaultAgent string)
- func ParseConfig(viper *fangs.Viper, app *api.AppConfig, args []string) error
- func ParseLLM(viper *fangs.Viper, app *api.AppConfig) error
- func ParseSpecialChars(viper *fangs.Viper, app *api.AppConfig, args []string) []string
- func Validate(app *api.AppConfig) error
- type UserInputError
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 = "ai -i edit"
View Source
const StdinRedirect = "-"
Variables ¶
View Source
var V *fangs.Viper
View Source
var Version = "0.0.1" // version of the ai binary
Functions ¶
func Exit ¶
func Exit(err error)
Exit checks error and exit with the following code: 0 -- no error 1 -- general failure 2 -- user error
func GetConfigData ¶
func NewUserInputError ¶
func NewUserInputErrorf ¶
func ParseAgentArgs ¶
return the agent/command and the rest of the args
func ParseSpecialChars ¶
parse special char sequence for stdin/clipboard they can: + be at the end of the args or as a suffix to the last one + be in any order + be multiple instances
Types ¶
type UserInputError ¶
type UserInputError struct {
// contains filtered or unexported fields
}
UserInputError represents user input error.
func (*UserInputError) Error ¶
func (r *UserInputError) Error() string
Directories
¶
| Path | Synopsis |
|---|---|
|
choose
Package choose provides an interface to choose one option from a given list of options.
|
Package choose provides an interface to choose one option from a given list of options. |
|
confirm
Package confirm provides an interface to ask a user to confirm an action.
|
Package confirm provides an interface to ask a user to confirm an action. |
|
file
Package file provides an interface to pick a file from a folder (tree).
|
Package file provides an interface to pick a file from a folder (tree). |
|
util/tty
Package tty provides tty-aware printing.
|
Package tty provides tty-aware printing. |
|
write
Package write provides a shell script interface for the text area bubble.
|
Package write provides a shell script interface for the text area bubble. |
|
data
|
|
Click to show internal directories.
Click to hide internal directories.