ctrl

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2025 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Controller

type Controller struct {
	// contains filtered or unexported fields
}

func New

func New(cfg config.Config) *Controller

func (*Controller) DeleteHistory added in v0.3.0

func (c *Controller) DeleteHistory(entry HistoryEntry) error

func (*Controller) GenerateCommands

func (c *Controller) GenerateCommands(prompt string) ([]string, error)

func (*Controller) LoadHistory

func (c *Controller) LoadHistory() []HistoryEntry

func (*Controller) UpdateHistory

func (c *Controller) UpdateHistory(prompt, command string) error

type HistoryEntry

type HistoryEntry struct {
	Prompt  string `json:"prompt"`
	Command string `json:"command"`
}

type Model

type Model struct {
	// contains filtered or unexported fields
}

Model is the interface for generating commands based on a prompt.

func NewModel

func NewModel(ctx context.Context, cfg config.LLMConfig) (Model, error)

func (Model) GenerateCommands

func (m Model) GenerateCommands(ctx context.Context, prompt string) ([]string, error)

GenerateCommands generates commands based on the provided prompt.