ui

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2026 License: GPL-3.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewSessionScreen

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

Types

type Chat

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

TODO merge into TUIAgent

func NewChat

func NewChat(tui *TUIAgent, msgs []*shared.Msg) *Chat

func (*Chat) Init

func (c *Chat) Init() error

func (*Chat) InputBlockedEnd

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

func (*Chat) InputBlockedState

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

func (*Chat) InterruptedEnd

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

func (*Chat) InterruptedState

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

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

func (*Chat) UIButtonSendState

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

func (*Chat) UICleanOutputState

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

func (*Chat) UIMsgEnter

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

func (*Chat) UIMsgState

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

type Clock

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

TODO merge into TUIAgent TODO bind mem to the clock

func NewClock

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

func (*Clock) Init

func (c *Clock) Init() error

func (*Clock) Redraw

func (c *Clock) Redraw()

func (*Clock) UIRenderClockEnter

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

func (*Clock) UIRenderClockState

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

type ClockService

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

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

func (*ClockService) UIUpdateClockEnter

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

func (*ClockService) UIUpdateClockState

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

type S

type S = am.S

type Stories

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

TODO merge into TUIAgent

func NewStories

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

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

func (*Stories) Init

func (s *Stories) Init() error

func (*Stories) UICleanOutputState

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

func (*Stories) UIRenderStoriesState

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

type StoriesHandlers

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

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

type TUIAgent

type TUIAgent struct {
	*ssam.DisposedHandlers

	// MachTUI is a mach dedicated to this UI instance (fork)
	MachTUI    *am.Machine
	ClientAddr string
	Id         string
	// contains filtered or unexported fields
}

func NewTui

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

func (*TUIAgent) DisposingState

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

func (*TUIAgent) Init

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

func (*TUIAgent) InitComponents

func (t *TUIAgent) InitComponents()

func (*TUIAgent) Logger

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

func (*TUIAgent) Redraw

func (t *TUIAgent) Redraw()

func (*TUIAgent) Start

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

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

func (*TUIAgent) Stop

func (t *TUIAgent) Stop() error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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