core

package
v1.10.0 Latest Latest
Warning

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

Go to latest
Published: Mar 6, 2026 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PageID

type PageID string

Define the Page IDs here so everything can share them without cycles

const (
	PageChat PageID = "chat"
	PageLogs PageID = "logs"
)

type UIState

type UIState struct {
	// Window dimensions
	Width  int
	Height int

	// Page navigation state
	CurrentPage  PageID
	PreviousPage PageID

	// Layout engine for responsive dimensions
	LayoutEngine *layout.LayoutEngine

	// Focus state
	InputFocused bool

	// AI execution state
	IsExecuting    bool
	ExecutingTool  string
	ExecutingAgent string
}

UIState represents the shared application state across all TUI components.

func NewUIState

func NewUIState() *UIState

NewUIState creates a new UIState with default values.

func (*UIState) EndExecution

func (s *UIState) EndExecution()

EndExecution marks the end of AI tool execution.

func (*UIState) GoBack

func (s *UIState) GoBack()

GoBack returns to the previous page.

func (*UIState) IsPageLoaded

func (s *UIState) IsPageLoaded(pageID PageID) bool

IsPageLoaded checks if a page has been initialized.

func (*UIState) MarkPageLoaded

func (s *UIState) MarkPageLoaded(pageID PageID)

MarkPageLoaded marks a page as initialized.

func (*UIState) SetDimensions

func (s *UIState) SetDimensions(width, height int)

SetDimensions updates window dimensions and recalculates layout.

func (*UIState) SetPage

func (s *UIState) SetPage(pageID PageID)

SetPage sets the current page and tracks navigation history.

func (*UIState) StartExecution

func (s *UIState) StartExecution(agent, tool string)

StartExecution marks the start of AI tool execution.

Jump to

Keyboard shortcuts

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