Documentation
¶
Overview ¶
Package models provides the model selection dialog for the TUI.
Index ¶
- Constants
- type APIKeyInput
- func (a *APIKeyInput) Cursor() *tea.Cursor
- func (a *APIKeyInput) GetTitle() string
- func (a *APIKeyInput) Init() tea.Cmd
- func (a *APIKeyInput) Reset()
- func (a *APIKeyInput) SetProviderName(name string)
- func (a *APIKeyInput) SetShowTitle(show bool)
- func (a *APIKeyInput) SetWidth(width int)
- func (a *APIKeyInput) Tick() tea.Cmd
- func (a *APIKeyInput) Update(msg tea.Msg) (util.Model, tea.Cmd)
- func (a *APIKeyInput) Value() string
- func (a *APIKeyInput) View() string
- type APIKeyInputState
- type APIKeyStateChangeMsg
- type CloseModelDialogMsg
- type KeyMap
- type ModelDialog
- type ModelListComponent
- func (m *ModelListComponent) Cursor() *tea.Cursor
- func (m *ModelListComponent) GetModelType() int
- func (m *ModelListComponent) Init() tea.Cmd
- func (m *ModelListComponent) SelectedModel() *ModelOption
- func (m *ModelListComponent) SetInputPlaceholder(placeholder string)
- func (m *ModelListComponent) SetModelType(modelType int) tea.Cmd
- func (m *ModelListComponent) SetSize(width, height int) tea.Cmd
- func (m *ModelListComponent) Update(msg tea.Msg) (*ModelListComponent, tea.Cmd)
- func (m *ModelListComponent) View() string
- type ModelOption
- type ModelSelectedMsg
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) 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) KeyBindings ¶
KeyBindings implements layout.KeyMapProvider
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 ModelSelectedMsg ¶
type ModelSelectedMsg struct {
Model config.SelectedModel
ModelType config.SelectedModelType
}
ModelSelectedMsg is sent when a model is selected
Click to show internal directories.
Click to hide internal directories.