models

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Jan 8, 2026 License: MIT Imports: 24 Imported by: 0

Documentation

Overview

Package models provides the model selection dialog for the TUI.

Index

Constants

View Source
const (
	LargeModelType int = iota
	SmallModelType
)
View Source
const (
	ModelsDialogID dialogs.DialogID = "models"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type APIKeyInput

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

func NewAPIKeyInput

func NewAPIKeyInput() *APIKeyInput

func (*APIKeyInput) Cursor

func (a *APIKeyInput) Cursor() *tea.Cursor

func (*APIKeyInput) GetTitle

func (a *APIKeyInput) GetTitle() string

func (*APIKeyInput) Init

func (a *APIKeyInput) Init() tea.Cmd

func (*APIKeyInput) Reset

func (a *APIKeyInput) Reset()

func (*APIKeyInput) SetProviderName

func (a *APIKeyInput) SetProviderName(name string)

func (*APIKeyInput) SetShowTitle

func (a *APIKeyInput) SetShowTitle(show bool)

func (*APIKeyInput) SetWidth

func (a *APIKeyInput) SetWidth(width int)

func (*APIKeyInput) Tick

func (a *APIKeyInput) Tick() tea.Cmd

func (*APIKeyInput) Update

func (a *APIKeyInput) Update(msg tea.Msg) (util.Model, tea.Cmd)

func (*APIKeyInput) Value

func (a *APIKeyInput) Value() string

func (*APIKeyInput) View

func (a *APIKeyInput) View() string

type APIKeyInputState

type APIKeyInputState int
const (
	APIKeyInputStateInitial APIKeyInputState = iota
	APIKeyInputStateVerifying
	APIKeyInputStateVerified
	APIKeyInputStateError
)

type APIKeyStateChangeMsg

type APIKeyStateChangeMsg struct {
	State APIKeyInputState
}

type CloseModelDialogMsg

type CloseModelDialogMsg struct{}

CloseModelDialogMsg is sent when a model is selected

type KeyMap

type KeyMap struct {
	Select,
	Next,
	Previous,
	Choose,
	Tab,
	Close key.Binding
	// contains filtered or unexported fields
}

func DefaultKeyMap

func DefaultKeyMap() KeyMap

func (KeyMap) FullHelp

func (k KeyMap) FullHelp() [][]key.Binding

FullHelp implements help.KeyMap.

func (KeyMap) KeyBindings

func (k KeyMap) KeyBindings() []key.Binding

KeyBindings implements layout.KeyMapProvider

func (KeyMap) ShortHelp

func (k KeyMap) ShortHelp() []key.Binding

ShortHelp implements help.KeyMap.

type ModelDialog

type ModelDialog interface {
	dialogs.DialogModel
}

ModelDialog interface for the model selection dialog

func NewModelDialogCmp

func NewModelDialogCmp() ModelDialog

type ModelListComponent

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

func NewModelListComponent

func NewModelListComponent(keyMap list.KeyMap, inputPlaceholder string, shouldResize bool) *ModelListComponent

func (*ModelListComponent) Cursor

func (m *ModelListComponent) Cursor() *tea.Cursor

func (*ModelListComponent) GetModelType

func (m *ModelListComponent) GetModelType() int

GetModelType returns the current model type

func (*ModelListComponent) Init

func (m *ModelListComponent) Init() tea.Cmd

func (*ModelListComponent) SelectedModel

func (m *ModelListComponent) SelectedModel() *ModelOption

func (*ModelListComponent) SetInputPlaceholder

func (m *ModelListComponent) SetInputPlaceholder(placeholder string)

func (*ModelListComponent) SetModelType

func (m *ModelListComponent) SetModelType(modelType int) tea.Cmd

func (*ModelListComponent) SetSize

func (m *ModelListComponent) SetSize(width, height int) tea.Cmd

func (*ModelListComponent) Update

func (m *ModelListComponent) Update(msg tea.Msg) (*ModelListComponent, tea.Cmd)

func (*ModelListComponent) View

func (m *ModelListComponent) View() string

type ModelOption

type ModelOption struct {
	Provider catwalk.Provider
	Model    catwalk.Model
}

type ModelSelectedMsg

type ModelSelectedMsg struct {
	Model     config.SelectedModel
	ModelType config.SelectedModelType
}

ModelSelectedMsg is sent when a model is selected

Jump to

Keyboard shortcuts

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