Documentation
¶
Overview ¶
Package contextbar provides a thin progress indicator showing how full the LLM context window is as a single row of half-block characters (▄).
Index ¶
- Constants
- type Model
- func (m *Model) Cancel()
- func (m *Model) Filled() bool
- func (m *Model) Hold()
- func (m *Model) Label() string
- func (m *Model) SetContextUsage(used, limit int64) tea.Cmd
- func (m *Model) SetContextUsageDirect(used, limit int64)
- func (m *Model) SetWidth(width int)
- func (m *Model) Update(msg tea.Msg)
- func (m *Model) View() string
Constants ¶
const (
Height = 1
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Model ¶
type Model struct {
// contains filtered or unexported fields
}
Model holds the state for the context-usage bar.
func (*Model) Hold ¶
func (m *Model) Hold()
Hold marks usage as pending while keeping the displayed fill as the next origin.
func (*Model) SetContextUsage ¶
SetContextUsage updates context-window utilisation with an animated transition. A zero limit has no reading and eases the fill to an empty track.
func (*Model) SetContextUsageDirect ¶
SetContextUsageDirect initializes context-window utilisation without animation.