Versions in this module Expand all Collapse all v0 v0.5.0 Jun 24, 2024 Changes in this version + var ErrOutpathMultipleFiles = errors.New("outpath cannot be provided when multiple input files are provided") + var ErrOutpathRewriteConflict = errors.New("outpath and rewrite cannot be provided together") + var ErrPromptOrPromptPathRequired = errors.New("either prompt or prompt-path must be provided") + type Config struct + Confirm bool + Diff bool + DryRun bool + InputFileList string + LogAPILevel string + MaxCompletionRepeatCount int + MaxTokens int + Model string + Outpath string + Prompt string + PromptOptimize bool + PromptPath string + Rewrite bool + ShowCost bool + Silent bool + UseFirstCodeBlock bool + Verbose bool + func (c *Config) Validate(inputFiles []string) error + type ConfirmFunc func(string) (bool, error) + type GenerativeAIHandlerFactoryFunc func(model string) (openai.GenerativeAIClient, error) + type Process struct + func NewProcess(config *Config, confirmFunc ConfirmFunc) *Process + func (p *Process) Run(ctx context.Context, i int, inputPath string, opt *RunOption, ...) error + type RunOption struct + type Runner struct + func New(config *Config, inputFiles []string, gaiFactory GenerativeAIHandlerFactoryFunc, ...) *Runner + func (r *Runner) Run(ctx context.Context, opt *RunOption, onBeforeProcessing func(string), ...) error + func (r *Runner) Setup() (*RunOption, error)