flash

package
v0.10.2 Latest Latest
Warning

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

Go to latest
Published: Mar 16, 2026 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const HistoryLimit = 50

Variables

This section is empty.

Functions

func ColorizeCommand added in v0.10.0

func ColorizeCommand(cmd string, textStyle, matchedStyle lipgloss.Style) string

ColorizeCommand tokenizes cmd and applies textStyle to plain tokens and matchedStyle to flag tokens (those starting with "-").

Types

type CommandHistoryEntry added in v0.10.0

type CommandHistoryEntry struct {
	ID      uint64
	Command string
	Text    string
	Err     error
}

type CommandHistorySource added in v0.10.0

type CommandHistorySource interface {
	CommandHistorySnapshot() []CommandHistoryEntry
	DeleteCommandHistoryByID(id uint64)
}

type FlashMessageView added in v0.9.7

type FlashMessageView struct {
	// Content might contain ANSI colour codes
	Content string
	Rect    layout.Rectangle
}

type Model

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

func New

func New(context *context.MainContext) *Model

func (*Model) AddWithCommand added in v0.10.0

func (m *Model) AddWithCommand(text string, command string, error error) uint64

func (*Model) Any

func (m *Model) Any() bool

func (*Model) CommandHistorySnapshot added in v0.10.0

func (m *Model) CommandHistorySnapshot() []CommandHistoryEntry

func (*Model) DeleteCommandHistoryByID added in v0.10.0

func (m *Model) DeleteCommandHistoryByID(id uint64)

func (*Model) DeleteOldest

func (m *Model) DeleteOldest()

func (*Model) Init

func (m *Model) Init() tea.Cmd

func (*Model) LiveMessagesCount added in v0.10.0

func (m *Model) LiveMessagesCount() int

func (*Model) Update

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

func (*Model) ViewRect added in v0.9.11

func (m *Model) ViewRect(dl *render.DisplayContext, box layout.Box)

Jump to

Keyboard shortcuts

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