internal

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Jan 12, 2026 License: MIT Imports: 46 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultTestModelHeight = 2 * common.MinimumHeight
View Source
const DefaultTestModelWidth = 2 * common.MinimumWidth
View Source
const DefaultTestTick = 10 * time.Millisecond
View Source
const DefaultTestTimeout = time.Second

Variables

View Source
var (
	LastTimeCursorMove = [2]int{int(time.Now().UnixMicro()), 0} //nolint: gochecknoglobals // TODO: Move to model struct

)

These represent model's state information, its not a global preperty

Functions

func ExecuteTeaCmdWithTimeout added in v1.4.0

func ExecuteTeaCmdWithTimeout(cmd tea.Cmd, timeout time.Duration) tea.Msg

func InitialModel

func InitialModel(firstPanelPaths []string, firstUseCheck bool) tea.Model

Initialize and return model with default configs It returns only tea.Model because when it used in main, the return value is passed to tea.NewProgram() which accepts tea.Model Either way type 'model' is not exported, so there is not way main package can be aware of it, and use it directly

func IsTeaQuit added in v1.3.0

func IsTeaQuit(cmd tea.Cmd) bool

Is the command tea.quit, or a batch that contains tea.quit

func TeaUpdate added in v1.3.0

func TeaUpdate(m *model, msg tea.Msg) tea.Cmd

TODO : Should we validate that returned value is of type *model ? and equal to m ? We are assuming that to be true as of now

Types

type BaseMessage added in v1.4.0

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

func (BaseMessage) GetReqID added in v1.4.0

func (msg BaseMessage) GetReqID() int

type CompressOperationMsg added in v1.4.0

type CompressOperationMsg struct {
	BaseMessage
	// contains filtered or unexported fields
}

func NewCompressOperationMsg added in v1.4.0

func NewCompressOperationMsg(state processbar.ProcessState, reqID int) CompressOperationMsg

func (CompressOperationMsg) ApplyToModel added in v1.4.0

func (msg CompressOperationMsg) ApplyToModel(_ *model) tea.Cmd

type DeleteOperationMsg added in v1.4.0

type DeleteOperationMsg struct {
	BaseMessage
	// contains filtered or unexported fields
}

func NewDeleteOperationMsg added in v1.4.0

func NewDeleteOperationMsg(state processbar.ProcessState, reqID int) DeleteOperationMsg

func (DeleteOperationMsg) ApplyToModel added in v1.4.0

func (msg DeleteOperationMsg) ApplyToModel(m *model) tea.Cmd

type ExtractOperationMsg added in v1.4.0

type ExtractOperationMsg struct {
	BaseMessage
	// contains filtered or unexported fields
}

func NewExtractOperationMsg added in v1.4.0

func NewExtractOperationMsg(state processbar.ProcessState, reqID int) ExtractOperationMsg

func (ExtractOperationMsg) ApplyToModel added in v1.4.0

func (msg ExtractOperationMsg) ApplyToModel(_ *model) tea.Cmd

type IgnorerWriter added in v1.4.0

type IgnorerWriter struct{}

func (IgnorerWriter) Write added in v1.4.0

func (w IgnorerWriter) Write(p []byte) (int, error)

type MetadataMsg added in v1.3.3

type MetadataMsg struct {
	BaseMessage
	// contains filtered or unexported fields
}

func NewMetadataMsg added in v1.4.0

func NewMetadataMsg(meta metadata.Metadata, metadataFocused bool, reqID int) MetadataMsg

func (MetadataMsg) ApplyToModel added in v1.4.0

func (msg MetadataMsg) ApplyToModel(m *model) tea.Cmd

type ModelUpdateMessage added in v1.4.0

type ModelUpdateMessage interface {
	ApplyToModel(m *model) tea.Cmd
	GetReqID() int
}

type NotifyModalUpdateMsg added in v1.4.0

type NotifyModalUpdateMsg struct {
	BaseMessage
	// contains filtered or unexported fields
}

func NewNotifyModalMsg added in v1.4.0

func NewNotifyModalMsg(m notify.Model, reqID int) NotifyModalUpdateMsg

func (NotifyModalUpdateMsg) ApplyToModel added in v1.4.0

func (msg NotifyModalUpdateMsg) ApplyToModel(m *model) tea.Cmd

type PasteOperationMsg added in v1.4.0

type PasteOperationMsg struct {
	BaseMessage
	// contains filtered or unexported fields
}

func NewPasteOperationMsg added in v1.4.0

func NewPasteOperationMsg(state processbar.ProcessState, reqID int) PasteOperationMsg

func (PasteOperationMsg) ApplyToModel added in v1.4.0

func (msg PasteOperationMsg) ApplyToModel(m *model) tea.Cmd

type ProcessBarUpdateMsg added in v1.4.0

type ProcessBarUpdateMsg struct {
	BaseMessage
	// contains filtered or unexported fields
}

func (ProcessBarUpdateMsg) ApplyToModel added in v1.4.0

func (msg ProcessBarUpdateMsg) ApplyToModel(m *model) tea.Cmd

type TeaProg added in v1.4.0

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

func NewTeaProg added in v1.4.0

func NewTeaProg(m *model, eventLoop bool) *TeaProg

If you use this, make sure to handle cleanup

func NewTestTeaProgWithEventLoop added in v1.4.0

func NewTestTeaProgWithEventLoop(t *testing.T, m *model) *TeaProg

func (*TeaProg) Close added in v1.4.0

func (p *TeaProg) Close()

func (*TeaProg) Send added in v1.4.0

func (p *TeaProg) Send(msgs ...tea.Msg)

func (*TeaProg) SendDirectly added in v1.4.0

func (p *TeaProg) SendDirectly(msgs ...tea.Msg) tea.Cmd

Dont use eventloop and dont care about the tea.Cmd returned by Update()

func (*TeaProg) SendKey added in v1.4.0

func (p *TeaProg) SendKey(key string)

func (*TeaProg) SendKeyDirectly added in v1.4.0

func (p *TeaProg) SendKeyDirectly(key string) tea.Cmd

func (*TeaProg) StartEventLoop added in v1.4.0

func (p *TeaProg) StartEventLoop()

Jump to

Keyboard shortcuts

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