tui

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Jan 18, 2026 License: GPL-3.0 Imports: 20 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(tui *Tui, msgs []*shared.Msg) *Chat

func (*Chat) Init added in v0.2.0

func (c *Chat) Init() error

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) 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) RequestingEnd

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

func (*Chat) RequestingState

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

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)

type Clock added in v0.2.0

type Clock struct {
	Height    int
	SeriesLen int
	// contains filtered or unexported fields
}

func NewClock added in v0.2.0

func NewClock(tui *Tui, hist func() (amhist.MemoryApi, error)) *Clock

func (*Clock) AnyState added in v0.2.0

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

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() error

func (*Clock) Redraw added in v0.2.0

func (c *Clock) Redraw()

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(tui *Tui, buttons []shared.StoryAction, stories []shared.StoryInfo, cfg *shared.Config) *Stories

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

func (*Stories) AddAction added in v0.4.0

func (s *Stories) AddAction(button shared.StoryAction) error

func (*Stories) ClearActions added in v0.4.0

func (s *Stories) ClearActions()

ClearActions 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() error

func (*Stories) ReplaceStoriesEnd added in v0.4.0

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

func (*Stories) ReplaceStoriesState added in v0.4.0

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

func (*Stories) ReqReplaceStoriesState added in v0.4.0

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

type StoriesHandlers added in v0.2.0

type StoriesHandlers struct {
	// 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)

type Tui added in v0.4.0

type Tui struct {
	MachTUI *am.Machine
	// contains filtered or unexported fields
}

func NewTui added in v0.4.0

func NewTui(mach *am.Machine, logger *slog.Logger, config *shared.Config) *Tui

func (*Tui) BindHandlers added in v0.4.0

func (t *Tui) BindHandlers() error

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

func (*Tui) Init added in v0.4.0

func (t *Tui) Init(
	screen tcell.Screen, name string, stories *Stories, clock *Clock, chat *Chat,
) error

func (*Tui) InitComponents added in v0.4.0

func (t *Tui) InitComponents()

func (*Tui) Logger added in v0.4.0

func (t *Tui) Logger() *slog.Logger

func (*Tui) Mach added in v0.4.0

func (t *Tui) Mach() *am.Machine

Mach returns the agent machine.

func (*Tui) Redraw added in v0.4.0

func (t *Tui) Redraw()

func (*Tui) Start added in v0.4.0

func (t *Tui) Start(dispose func() error) error

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

func (*Tui) Stop added in v0.4.0

func (t *Tui) Stop() error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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