tui

package
v0.5.1 Latest Latest
Warning

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

Go to latest
Published: Mar 11, 2026 License: GPL-3.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

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

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
}

TODO merge into TUI

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

RequestingState with progress indicator

func (*Chat) UIButtonInterState added in v0.5.0

func (c *Chat) UIButtonInterState(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) UIMsgEnter added in v0.5.0

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

func (*Chat) UIMsgState added in v0.5.0

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

type Clock added in v0.2.0

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

TODO merge into TUI TODO bind mem to the clock

func NewClock added in v0.2.0

func NewClock(tui *TUI, diff [][]int) *Clock

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

func (*Clock) UIRenderClockEnter added in v0.5.0

func (c *Clock) UIRenderClockEnter(e *am.Event) bool

func (*Clock) UIRenderClockState added in v0.5.0

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

type ClockService added in v0.5.0

type ClockService struct {
	Agent *am.Machine
	Cfg   *shared.Config
	// agent's history
	Hist      func() (amhist.MemoryApi, error)
	SeriesLen int
	Height    int
	// contains filtered or unexported fields
}

func (*ClockService) Data added in v0.5.0

func (c *ClockService) Data() [][]int

func (*ClockService) UIUpdateClockEnter added in v0.5.0

func (c *ClockService) UIUpdateClockEnter(e *am.Event) bool

func (*ClockService) UIUpdateClockState added in v0.5.0

func (c *ClockService) UIUpdateClockState(e *am.Event)

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
}

TODO merge into TUI

func NewStories added in v0.2.0

func NewStories(tui *TUI, actions []shared.ActionInfo, stories []shared.StoryInfo, cfg *shared.Config) *Stories

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

func (*Stories) Init added in v0.2.0

func (s *Stories) Init() error

func (*Stories) UICleanOutputState added in v0.5.0

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

func (*Stories) UIRenderStoriesState added in v0.5.0

func (s *Stories) UIRenderStoriesState(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.

type TUI added in v0.5.0

type TUI struct {
	*ssam.DisposedHandlers

	MachTUI    *am.Machine
	ClientAddr string
	// contains filtered or unexported fields
}

func NewTui added in v0.4.0

func NewTui(agent *am.Machine, logger *slog.Logger, config *shared.Config, clientAddr string) *TUI

func (*TUI) DisposingState added in v0.5.0

func (t *TUI) DisposingState(e *am.Event)

func (*TUI) Init added in v0.5.0

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

func (*TUI) InitComponents added in v0.5.0

func (t *TUI) InitComponents()

func (*TUI) Logger added in v0.5.0

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

func (*TUI) Redraw added in v0.5.0

func (t *TUI) Redraw()

func (*TUI) Start added in v0.5.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.5.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