widgets

package
v0.51.0 Latest Latest
Warning

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

Go to latest
Published: Sep 1, 2026 License: MIT Imports: 14 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FormatSessionPickerCard

func FormatSessionPickerCard(picker *SessionPicker, width, maxHeight int) string

func IsCancel

func IsCancel(msg tea.Msg) bool

func IsComplete

func IsComplete(msg tea.Msg) bool

Types

type Model

type Model struct {
	Step                       Step
	SelectedProvider           string
	SelectedModel              string
	APIKeyInput                string
	BaseURLInput               string
	BaseURLError               string
	ProviderCursor             int
	ModelCursor                int
	ThinkingCursor             int
	ThinkingOptions            []string
	SelectedThinking           string
	UpdateProviderConfigCursor int

	OAuthStatus  string
	OAuthURL     string
	ProviderList []providers.Provider
	ModelList    []providers.Model
	ErrorMessage string
	// contains filtered or unexported fields
}

func New

func New(registry *providers.Registry, globalCfg *config.GlobalConfig, loader *config.Loader, resolvedCfg *config.ResolvedConfig, onComplete func(provider, model, apiKey string) error) *Model

func NewWithAuthManager

func NewWithAuthManager(registry *providers.Registry, globalCfg *config.GlobalConfig, loader *config.Loader, resolvedCfg *config.ResolvedConfig, authManager *keenauth.OAuthManager, onComplete func(provider, model, apiKey string) error) *Model

func (*Model) Select

func (m *Model) Select(providerID, modelID string) (*Model, tea.Cmd, error)

func (*Model) Update

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

func (*Model) ViewString

func (m *Model) ViewString() string

type SessionPicker

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

func NewSessionPicker

func NewSessionPicker(summaries []session.Summary) *SessionPicker

func (*SessionPicker) Current

func (p *SessionPicker) Current() *session.Summary

func (*SessionPicker) Move

func (p *SessionPicker) Move(delta int)

type Step

type Step int
const (
	StepProvider Step = iota
	StepModel
	StepThinking
	StepUpdateProviderConfigs
	StepBaseURL
	StepAPIKey
	StepAPIKeyHelper
	StepOAuth
)

type SuggestionItem

type SuggestionItem struct {
	Name        string
	Value       string
	Description string
}

SuggestionItem is a generic suggestion entry used for both slash commands and file paths.

type SuggestionModel

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

func NewSuggestionModel

func NewSuggestionModel() SuggestionModel

func (SuggestionModel) Current

func (s SuggestionModel) Current() *SuggestionItem

func (SuggestionModel) First

func (s SuggestionModel) First() *SuggestionItem

func (SuggestionModel) Height

func (s SuggestionModel) Height() int

func (*SuggestionModel) Hide

func (s *SuggestionModel) Hide()

func (SuggestionModel) IsFileMode

func (s SuggestionModel) IsFileMode() bool

func (SuggestionModel) IsFirstSelected

func (s SuggestionModel) IsFirstSelected() bool

func (SuggestionModel) IsModelMode

func (s SuggestionModel) IsModelMode() bool

func (*SuggestionModel) MoveDown

func (s *SuggestionModel) MoveDown()

func (*SuggestionModel) MoveUp

func (s *SuggestionModel) MoveUp()

func (*SuggestionModel) Refresh

func (s *SuggestionModel) Refresh(input string)

func (*SuggestionModel) RefreshFiles

func (s *SuggestionModel) RefreshFiles(paths []string)

func (*SuggestionModel) RefreshModels

func (s *SuggestionModel) RefreshModels(input string, pairs []string)

RefreshModels sets provider/model suggestions directly.

func (*SuggestionModel) RefreshWithSkills

func (s *SuggestionModel) RefreshWithSkills(input string, skills []SuggestionItem)

func (SuggestionModel) View

func (s SuggestionModel) View(width int) string

func (SuggestionModel) Visible

func (s SuggestionModel) Visible() bool

Jump to

Keyboard shortcuts

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