tui

package
v0.7.5 Latest Latest
Warning

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

Go to latest
Published: Aug 2, 2026 License: Apache-2.0 Imports: 30 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run

func Run(cfg bootstrap.Config, bundle assets.Bundle, version string) error

Run 启动 TUI。 启动模式分层约定: 1. 快速模式、共创模式属于“启动编排”; 2. 正式创作会话进入 host.Host; 3. 未来若新增“续写已有小说”等共享模式,统一落到 internal/entry/startup。

Types

type Model

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

Model 是 TUI 的顶层状态。

func NewModel

func NewModel(rt *host.Host, version string) Model

NewModel 创建 TUI Model。

func (Model) Init

func (m Model) Init() tea.Cmd

func (Model) Update

func (m Model) Update(msg tea.Msg) (tea.Model, tea.Cmd)

func (Model) View

func (m Model) View() string

Jump to

Keyboard shortcuts

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