app

package
v0.32.0 Latest Latest
Warning

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

Go to latest
Published: Jun 7, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package app implements the root Bubble Tea model and view routing.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type App

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

App is the root Bubble Tea model that routes between views.

func New

func New(ctx *Context) *App

New creates the root application model.

func (*App) Init

func (a *App) Init() tea.Cmd

Init starts the dashboard data fetch.

func (*App) Update

func (a *App) Update(msg tea.Msg) (tea.Model, tea.Cmd)

Update handles all messages, routing to the active view.

func (*App) View

func (a *App) View() tea.View

View renders the active view (and optional palette overlay).

type Context

type Context struct {
	DataSource afclient.DataSource
	Width      int
	Height     int
	BaseURL    string
	UseMock    bool
}

Context is shared by pointer across all views.

type MCPResultMsg

type MCPResultMsg struct {
	Action  string
	Success bool
	Message string
}

MCPResultMsg carries the result of an MCP tool action.

type ViewState

type ViewState int

ViewState represents which view is currently active.

const (
	ViewDashboard ViewState = iota
	ViewDetail
)

View state values for routing between TUI views.

Jump to

Keyboard shortcuts

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