Documentation
¶
Overview ¶
Copyright 2026 Teradata
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. Package models provides a model selection dialog for Loom. Model selection in Loom is handled via the server's looms.yaml configuration.
Index ¶
- Constants
- type APIKeyInput
- func (a *APIKeyInput) Blur() tea.Cmd
- func (a *APIKeyInput) Cursor() *tea.Cursor
- func (a *APIKeyInput) Focus() tea.Cmd
- func (a *APIKeyInput) GetSize() (int, int)
- func (a *APIKeyInput) Init() tea.Cmd
- func (a *APIKeyInput) IsFocused() bool
- func (a *APIKeyInput) SetSize(width, height int) tea.Cmd
- func (a *APIKeyInput) SetWidth(width int)
- 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 Model
- type ModelChangedMsg
- type ModelListComponent
- func (m *ModelListComponent) Blur() tea.Cmd
- func (m *ModelListComponent) Focus() tea.Cmd
- func (m *ModelListComponent) GetSize() (int, int)
- func (m *ModelListComponent) Init() tea.Cmd
- func (m *ModelListComponent) IsFocused() bool
- func (m *ModelListComponent) SelectedModel() *ModelOption
- func (m *ModelListComponent) SetSize(width, height int) tea.Cmd
- func (m *ModelListComponent) Update(msg tea.Msg) (util.Model, tea.Cmd)
- func (m *ModelListComponent) View() string
- type ModelOption
- type ModelSelectedMsg
Constants ¶
const ModelSelectorID = "models"
ModelSelectorID is the dialog ID.
const ModelsDialogID = ModelSelectorID
ModelsDialogID is an alias for ModelSelectorID.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type APIKeyInput ¶
type APIKeyInput struct {
// contains filtered or unexported fields
}
APIKeyInput is a stub API key input component.
func NewAPIKeyInput ¶
func NewAPIKeyInput() *APIKeyInput
NewAPIKeyInput creates a new API key input.
func (*APIKeyInput) Cursor ¶
func (a *APIKeyInput) Cursor() *tea.Cursor
Cursor returns the cursor position.
func (*APIKeyInput) GetSize ¶
func (a *APIKeyInput) GetSize() (int, int)
GetSize returns the component size.
func (*APIKeyInput) IsFocused ¶
func (a *APIKeyInput) IsFocused() bool
IsFocused returns whether the component is focused.
func (*APIKeyInput) SetSize ¶
func (a *APIKeyInput) SetSize(width, height int) tea.Cmd
SetSize sets the component width.
func (*APIKeyInput) SetWidth ¶
func (a *APIKeyInput) SetWidth(width int)
SetWidth sets the component width.
func (*APIKeyInput) Value ¶
func (a *APIKeyInput) Value() string
Value returns the current input value.
type APIKeyInputState ¶
type APIKeyInputState int
APIKeyInputState represents API key input state.
const ( APIKeyInputStateEmpty APIKeyInputState = iota APIKeyInputStateVerifying APIKeyInputStateVerified APIKeyInputStateInvalid APIKeyInputStateError )
type APIKeyStateChangeMsg ¶
type APIKeyStateChangeMsg struct {
State APIKeyInputState
}
APIKeyStateChangeMsg is sent when API key state changes.
type Model ¶
type Model struct {
// contains filtered or unexported fields
}
Model is the model selector dialog.
func NewModelDialogCmp ¶
func NewModelDialogCmp() *Model
NewModelDialogCmp creates a new model dialog component.
type ModelChangedMsg ¶
ModelChangedMsg is sent when the model is changed.
type ModelListComponent ¶
type ModelListComponent struct {
// contains filtered or unexported fields
}
ModelListComponent is a stub list component for model selection.
func NewModelListComponent ¶
func NewModelListComponent(keyMap list.KeyMap, placeholder string, showProvider bool) *ModelListComponent
NewModelListComponent creates a new model list component.
func (*ModelListComponent) Blur ¶
func (m *ModelListComponent) Blur() tea.Cmd
Blur blurs the component.
func (*ModelListComponent) Focus ¶
func (m *ModelListComponent) Focus() tea.Cmd
Focus focuses the component.
func (*ModelListComponent) GetSize ¶
func (m *ModelListComponent) GetSize() (int, int)
GetSize returns the component size.
func (*ModelListComponent) Init ¶
func (m *ModelListComponent) Init() tea.Cmd
Init initializes the component.
func (*ModelListComponent) IsFocused ¶
func (m *ModelListComponent) IsFocused() bool
IsFocused returns whether the component is focused.
func (*ModelListComponent) SelectedModel ¶
func (m *ModelListComponent) SelectedModel() *ModelOption
SelectedModel returns the currently selected model.
func (*ModelListComponent) SetSize ¶
func (m *ModelListComponent) SetSize(width, height int) tea.Cmd
SetSize sets the component size.
func (*ModelListComponent) View ¶
func (m *ModelListComponent) View() string
View renders the component.
type ModelOption ¶
ModelOption represents a model selection option.
type ModelSelectedMsg ¶
type ModelSelectedMsg struct {
Model config.Model
ModelType config.SelectedModelType
}
ModelSelectedMsg is sent when a model is selected.