Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BaseHost ¶ added in v0.1.1
type BaseHost interface {
TeaModel() tea.Model
Styles() theme.Styles
State() session.State
LastState() session.State
TransitionTo(session.State) bool
Width() int
Height() int
}
BaseHost defines common methods that almost all features need from the main Model.
type Feature ¶
type Feature interface {
// Name returns a human-readable label for debugging.
Name() string
// Active reports whether the feature should receive messages.
Active() bool
// Update handles a message. Returns (commands, consumed).
// If consumed is true, the message won't be passed to other features or the base model.
Update(msg tea.Msg) (tea.Cmd, bool)
// View returns the rendered content for this feature.
View(width, height int) string
// Init returns the initial command when the feature activates.
Init() tea.Cmd
}
Feature is a self-contained UI component that owns its own state and can consume messages before the base Model.
Click to show internal directories.
Click to hide internal directories.