go.bigb.es/claudio
Index
- func SanitizeAPIKey(input string) string
- type CategorizedResult
- type Model
- func New(cfg *config.Config, cdb *cache.DB) Model
- func NewModelPicker(cfg *config.Config, cdb *cache.DB, models []copilot.CopilotModel) Model
- func (Model) Cfg() *config.Config
- func (Model) Init() tea.Cmd
- func (Model) LaunchAfterConfig() bool
- func (Model) Quitting() bool
- func (Model) Update(msg tea.Msg) (tea.Model, tea.Cmd)
- func (Model) View() string
- type ModelFetcher
- type PickerItem
Functions
func SanitizeAPIKey(input string) string
Types
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.
type Model struct { // contains filtered or unexported fields }
Model is the Bubble Tea model for the TUI.
func NewModelPicker(cfg *config.Config, cdb *cache.DB, models []copilot.CopilotModel) Model
NewModelPicker creates a Model that goes directly to the copilot model selection phase.
func (m Model) Cfg() *config.Config
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.
type PickerItem struct { ID string Name string ContextLength int }
PickerItem is a generic model entry for the two-column picker.
func (p PickerItem) DisplayName() string
DisplayName returns a human-friendly label for the item.
Source Files
- constructor.go
- fetch.go
- fetcher.go
- fetcher_copilot.go
- fetcher_deepseek.go
- fetcher_kimi.go
- fetcher_lmstudio.go
- fetcher_mistral.go
- fetcher_nvidia.go
- fetcher_ollama.go
- fetcher_openrouter.go
- file_picker.go
- key_input.go
- model.go
- model_loading.go
- model_select.go
- plan_select.go
- provider_select.go
- styles.go
- types.go
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"