go.bigb.es/claudio

v0.7.0
Doc Versions Source

Functions

f func SanitizeAPIKey

src
func SanitizeAPIKey(input string) string

SanitizeAPIKey extracts just the API key value if the input contains YAML-like content. This handles cases where the user accidentally pastes config content like: "zai: api_key: xxx model: yyy"

Types

T type CategorizedResult

src
type CategorizedResult struct {
	Families              []string
	Items                 map[string][]PickerItem
	PopularProviders      []string
	PopularProviderModels map[string][]PickerItem
	AllModelIDs           map[string]bool
}

CategorizedResult holds the output of a model fetcher's categorization step.

T type Model

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

Model is the Bubble Tea model for the TUI.

f func New

src
func New(cfg *config.Config, cdb *cache.DB) Model

f func NewModelPicker

src

NewModelPicker creates a Model that goes directly to the copilot model selection phase.

m func (Model) Cfg

src
func (m Model) Cfg() *config.Config

m func (Model) Init

src
func (m Model) Init() tea.Cmd

m func (Model) LaunchAfterConfig

src
func (m Model) LaunchAfterConfig() bool

m func (Model) Quitting

src
func (m Model) Quitting() bool

m func (Model) Update

src
func (m Model) Update(msg tea.Msg) (tea.Model, tea.Cmd)

m func (Model) View

src
func (m Model) View() string

T type ModelFetcher

src
type ModelFetcher interface {
	// ProviderKey returns the cache/provider key (e.g. "copilot", "openrouter").
	ProviderKey() string
	// FetchAndCategorize handles cache check, API fetch, cache store,
	// filtering, and categorization. Returns the final result for the picker.
	FetchAndCategorize(cdb *cache.DB) (CategorizedResult, error)
}

ModelFetcher abstracts per-provider model fetching, filtering, and categorization.

T type PickerItem

src
type PickerItem struct {
	ID            string
	Name          string
	ContextLength int
}

PickerItem is a generic model entry for the two-column picker.

m func (PickerItem) DisplayName

src
func (p PickerItem) DisplayName() string

DisplayName returns a human-friendly label for the item.