command

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package command provides the command input component for the TUI.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Mode

type Mode int

Mode represents the command input mode.

const (
	ModeHidden Mode = iota
	ModeCommand
	ModeFilter
	ModeAckMessage
)

Mode constants for command input states.

type Model

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

Model represents the command input component.

func New

func New(styles *theme.Styles) Model

New creates a new command input model.

func (*Model) Hide

func (m *Model) Hide()

Hide hides the command input.

func (Model) Init

func (m Model) Init() tea.Cmd

Init implements tea.Model.

func (Model) IsActive

func (m Model) IsActive() bool

IsActive returns true if the command input is active.

func (Model) Mode

func (m Model) Mode() Mode

Mode returns the current mode.

func (*Model) SetMode

func (m *Model) SetMode(mode Mode)

SetMode activates a specific input mode.

func (*Model) SetStyles added in v0.5.0

func (m *Model) SetStyles(styles *theme.Styles)

SetStyles updates the component's styles (for runtime theme changes).

func (*Model) SetWidth

func (m *Model) SetWidth(width int)

SetWidth sets the component width.

func (Model) Update

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

Update implements tea.Model.

func (Model) Value

func (m Model) Value() string

Value returns the current input value.

func (Model) View

func (m Model) View() string

View implements tea.Model.

Jump to

Keyboard shortcuts

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