tui

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2025 License: GPL-3.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ParseArgs = shared.ParseArgs
View Source
var Pass = shared.Pass

Functions

func NewSessionScreen added in v0.2.0

func NewSessionScreen(s ssh.Session) (tcell.Screen, error)

Types

type A added in v0.2.0

type A = shared.A

type Chat

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

func NewChat

func NewChat(mach *am.Machine, logger *slog.Logger, msgs []*shared.Msg) *Chat

func (*Chat) BindHandlers added in v0.2.0

func (c *Chat) BindHandlers() error

BindHandlers binds transition handlers to the state machine. Overwrite it to bind methods from a subclass.

func (*Chat) Init added in v0.2.0

func (c *Chat) Init(sub shared.UI, screen tcell.Screen, name string) error

func (*Chat) InitComponents added in v0.2.0

func (c *Chat) InitComponents()

func (*Chat) InputBlockedEnd added in v0.2.0

func (c *Chat) InputBlockedEnd(e *am.Event)

func (*Chat) InputBlockedState added in v0.2.0

func (c *Chat) InputBlockedState(e *am.Event)

func (*Chat) InterruptedEnd added in v0.2.0

func (c *Chat) InterruptedEnd(e *am.Event)

func (*Chat) InterruptedState added in v0.2.0

func (c *Chat) InterruptedState(e *am.Event)

func (*Chat) Logger added in v0.2.0

func (c *Chat) Logger() *slog.Logger

func (*Chat) Mach added in v0.2.0

func (c *Chat) Mach() *am.Machine

func (*Chat) MsgEnter added in v0.2.0

func (c *Chat) MsgEnter(e *am.Event) bool

func (*Chat) MsgState added in v0.2.0

func (c *Chat) MsgState(e *am.Event)

func (*Chat) PromptState

func (c *Chat) PromptState(e *am.Event)

func (*Chat) Redraw added in v0.2.0

func (c *Chat) Redraw()

func (*Chat) RequestingEnd

func (c *Chat) RequestingEnd(e *am.Event)

func (*Chat) RequestingState

func (c *Chat) RequestingState(e *am.Event)

func (*Chat) Start added in v0.2.0

func (c *Chat) Start(dispose func() error) error

Start starts the UI and optionally returns the error and mutates with UIErr.

func (*Chat) Stop added in v0.2.0

func (c *Chat) Stop() error

func (*Chat) UIButtonInttState added in v0.2.0

func (c *Chat) UIButtonInttState(e *am.Event)

func (*Chat) UIButtonSendState added in v0.2.0

func (c *Chat) UIButtonSendState(e *am.Event)

func (*Chat) UICleanOutputState added in v0.2.0

func (c *Chat) UICleanOutputState(e *am.Event)

func (*Chat) UIMach added in v0.2.0

func (c *Chat) UIMach() *am.Machine

type Clock added in v0.2.0

type Clock struct {
	Height   int
	States   am.S
	HistSize int

	SeriesLen int
	// contains filtered or unexported fields
}

func NewClock added in v0.2.0

func NewClock(mach *am.Machine, logger *slog.Logger, clockStates am.S) *Clock

func (*Clock) AnyState added in v0.2.0

func (c *Clock) AnyState(e *am.Event)

func (*Clock) BindHandlers added in v0.2.0

func (c *Clock) BindHandlers() error

BindHandlers binds transition handlers to the state machine. Overwrite it to bind methods from a subclass.

func (*Clock) Chart added in v0.2.0

func (c *Clock) Chart(data [][]float64) string

func (*Clock) Data added in v0.2.0

func (c *Clock) Data() [][]float64

func (*Clock) DisposingState added in v0.2.0

func (c *Clock) DisposingState(e *am.Event)

func (*Clock) Init added in v0.2.0

func (c *Clock) Init(sub shared.UI, screen tcell.Screen, name string) error

func (*Clock) InitComponents added in v0.2.0

func (c *Clock) InitComponents()

func (*Clock) Logger added in v0.2.0

func (c *Clock) Logger() *slog.Logger

func (*Clock) Mach added in v0.2.0

func (c *Clock) Mach() *am.Machine

func (*Clock) Redraw added in v0.2.0

func (c *Clock) Redraw()

func (*Clock) Start added in v0.2.0

func (c *Clock) Start(dispose func() error) error

Start starts the UI and optionally returns the error and mutates with UIErr.

func (*Clock) Stop added in v0.2.0

func (c *Clock) Stop() error

func (*Clock) UIMach added in v0.2.0

func (c *Clock) UIMach() *am.Machine

type S added in v0.2.0

type S = am.S

type Stories added in v0.2.0

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

func NewStories added in v0.2.0

func NewStories(
	mach *am.Machine, logger *slog.Logger, buttons []shared.StoryButton, stories []shared.StoryInfo,
) *Stories

NewStories returns a new TUI dedicated to showing stories and their progress (as buttons).

func (*Stories) AddButton added in v0.2.0

func (s *Stories) AddButton(button shared.StoryButton) error

func (*Stories) BindHandlers added in v0.2.0

func (s *Stories) BindHandlers() error

BindHandlers binds transition handlers to the state machine. Overwrite it to bind methods from a subclass.

func (*Stories) ClearButtons added in v0.2.0

func (s *Stories) ClearButtons()

ClearButtons replaces the whole button view with a new one. This method CANT be called while rendering, as replacing flexview items will deadlock.

func (*Stories) Init added in v0.2.0

func (s *Stories) Init(sub shared.UI, screen tcell.Screen, name string) error

func (*Stories) InitComponents added in v0.2.0

func (s *Stories) InitComponents()

func (*Stories) Logger added in v0.2.0

func (s *Stories) Logger() *slog.Logger

func (*Stories) Mach added in v0.2.0

func (s *Stories) Mach() *am.Machine

func (*Stories) Redraw added in v0.2.0

func (s *Stories) Redraw()

func (*Stories) ReplaceContentEnd added in v0.2.0

func (s *Stories) ReplaceContentEnd(e *am.Event)

func (*Stories) ReplaceContentState added in v0.2.0

func (s *Stories) ReplaceContentState(e *am.Event)

func (*Stories) ReqReplaceContentState added in v0.2.0

func (s *Stories) ReqReplaceContentState(e *am.Event)

func (*Stories) Start added in v0.2.0

func (s *Stories) Start(dispose func() error) error

func (*Stories) Stop added in v0.2.0

func (s *Stories) Stop() error

func (*Stories) UIMach added in v0.2.0

func (s *Stories) UIMach() *am.Machine

type StoriesHandlers added in v0.2.0

type StoriesHandlers struct {
	*am.ExceptionHandler
	// contains filtered or unexported fields
}

StoriesHandlers are handlers for the agent's machine from the Stories TUI.

func (*StoriesHandlers) UICleanOutputState added in v0.2.0

func (h *StoriesHandlers) UICleanOutputState(e *am.Event)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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