cli

package
v0.0.0-...-648e486 Latest Latest
Warning

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

Go to latest
Published: Jun 29, 2025 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ShowHelp

func ShowHelp()

ShowHelp displays the help message

Types

type Config

type Config struct {
	WorkingDirectory string
	Mode             Mode
	Prompt           string
	SystemPrompt     string
	Verbose          bool
	Help             bool
	Provider         string
}

Config holds the configuration for the CLI application

func ParseArgs

func ParseArgs() (*Config, error)

ParseArgs parses command line arguments and returns a Config

type Executor

type Executor interface {
	Execute() error
}

type Mode

type Mode string

Mode represents the execution mode of the application

const (
	ModeREPL    Mode = "repl"
	ModeOneShot Mode = "oneshot"
)

type OneShotHandler

type OneShotHandler struct {
	state.Dispatcher
	llm.Provider
	// contains filtered or unexported fields
}

OneShotHandler handles one-shot mode execution

func NewOneShotHandler

func NewOneShotHandler(config *Config) *OneShotHandler

NewOneShotHandler creates a new one-shot handler

func (*OneShotHandler) Execute

func (h *OneShotHandler) Execute() error

Execute runs the one-shot mode

type ReplHandler

type ReplHandler struct {
	state.Dispatcher
	llm.Provider
	ui.Stack
	*Config
	*tea.Program
}

func NewReplHandler

func NewReplHandler(config *Config) *ReplHandler

func (*ReplHandler) Execute

func (h *ReplHandler) Execute() error

Jump to

Keyboard shortcuts

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