terminal

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Dec 28, 2025 License: AGPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrPaneNotRunning = fmt.Errorf("pane is not running")

Functions

This section is empty.

Types

type ExitFocusMsg

type ExitFocusMsg struct{}

ExitFocusMsg signals to return to board view

type ExitMsg

type ExitMsg struct {
	PaneID string
	Err    error
}

ExitMsg indicates the process has exited

type OutputMsg

type OutputMsg struct {
	PaneID string
	Data   []byte
}

OutputMsg carries data read from the PTY

type Pane

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

func New

func New(id string, width, height int) *Pane

func (*Pane) ExitErr

func (p *Pane) ExitErr() error

ExitErr returns any error from the process exit

func (*Pane) GetContent

func (p *Pane) GetContent() string

GetContent returns the current terminal content as plain text for analysis.

func (*Pane) GetWorkdir

func (p *Pane) GetWorkdir() string

func (*Pane) HandleKey

func (p *Pane) HandleKey(msg tea.KeyMsg) tea.Msg

HandleKey processes a key event and sends to PTY

func (*Pane) HandleMouse

func (p *Pane) HandleMouse(msg tea.MouseMsg)

func (*Pane) ID

func (p *Pane) ID() string

ID returns the pane's identifier

func (*Pane) Running

func (p *Pane) Running() bool

Running returns whether the pane has a running process

func (*Pane) SetSize

func (p *Pane) SetSize(width, height int)

func (*Pane) SetWorkdir

func (p *Pane) SetWorkdir(dir string)

SetWorkdir sets the working directory for commands

func (*Pane) Size

func (p *Pane) Size() (width, height int)

Size returns the current dimensions

func (*Pane) Start

func (p *Pane) Start(command string, args ...string) tea.Cmd

Start launches a command in a PTY and returns a Cmd to begin reading

func (*Pane) Stop

func (p *Pane) Stop() error

func (*Pane) StopGraceful

func (p *Pane) StopGraceful(timeout time.Duration) error

StopGraceful sends SIGTERM, waits for timeout, then SIGKILL if needed.

func (*Pane) Update

func (p *Pane) Update(msg tea.Msg) tea.Cmd

Update handles messages for this pane, returns commands to execute

func (*Pane) View

func (p *Pane) View() string

View returns the rendered terminal content

func (*Pane) WriteInput

func (p *Pane) WriteInput(data []byte) (int, error)

type RenderTickMsg

type RenderTickMsg struct {
	PaneID string
}

RenderTickMsg triggers a throttled render

Jump to

Keyboard shortcuts

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