cmd

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jan 13, 2026 License: AGPL-3.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ChatCommand

func ChatCommand() *cli.Command

func Getenv

func Getenv(key, fallback string) string

func ServeCommand

func ServeCommand() *cli.Command

Types

type ChatRequest

type ChatRequest struct {
	SessionID string `json:"session_id,omitempty"`
	Message   string `json:"message"`
	// Provider config (only used when creating a new session)
	Provider string `json:"provider,omitempty"`
	Model    string `json:"model,omitempty"`
	APIKey   string `json:"api_key,omitempty"`
	BaseURL  string `json:"base_url,omitempty"`
}

type ChatResponse

type ChatResponse struct {
	SessionID string `json:"session_id"`
	Response  string `json:"response"`
	Error     string `json:"error,omitempty"`
}

type CyclingSpinner

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

CyclingSpinner creates an animated spinner similar to charmbracelet/mods

func NewCyclingSpinner

func NewCyclingSpinner(label string) *CyclingSpinner

NewCyclingSpinner creates a new cycling spinner

func (*CyclingSpinner) Start

func (s *CyclingSpinner) Start()

Start begins the spinner animation

func (*CyclingSpinner) Stop

func (s *CyclingSpinner) Stop()

Stop stops the spinner

func (*CyclingSpinner) Update

func (s *CyclingSpinner) Update(label string)

Update changes the spinner label

type ProviderConfig

type ProviderConfig = store.ProviderConfig

ProviderConfig is an alias to store.ProviderConfig for backwards compatibility

type ServerConfig

type ServerConfig struct {
	Addr     string
	Workdir  string
	Provider string
	Model    string
	APIKey   string
	BaseURL  string
}

ServerConfig holds the server configuration

type Session

type Session = store.Session

Session is an alias to store.Session for backwards compatibility

type SessionResponse

type SessionResponse struct {
	ID        string         `json:"id"`
	Config    ProviderConfig `json:"config"`
	CreatedAt time.Time      `json:"created_at"`
	UpdatedAt time.Time      `json:"updated_at"`
	Messages  int            `json:"message_count"`
}

Jump to

Keyboard shortcuts

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