tui

package
v0.0.0-...-765e27d Latest Latest
Warning

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

Go to latest
Published: Jan 13, 2026 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Model

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

Model 是 TUI 的状态模型

func New

func New(agent fantasy.Agent, permService *permission.Service, modelName string) *Model

New 创建新的 TUI 实例

func (*Model) Init

func (m *Model) Init() tea.Cmd

Init 实现 tea.Model 接口

func (*Model) SetProgram

func (m *Model) SetProgram(p *tea.Program)

SetProgram 设置 Program 引用,用于流式回调

func (*Model) Update

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

Update 实现 tea.Model 接口,处理所有消息

func (*Model) View

func (m *Model) View() string

View 实现 tea.Model 接口,渲染界面

Jump to

Keyboard shortcuts

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