tui

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jul 28, 2026 License: MIT Imports: 13 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run

func Run(
	ctx context.Context,
	registry *provider.Registry,
	session *agent.Session,
	toolRegistry *tools.Registry,
	approval *tools.ApprovalGate,
) error

Types

type ApprovalBridge

type ApprovalBridge struct {
	RequestCh chan ApprovalRequest
	// contains filtered or unexported fields
}

func NewApprovalBridge

func NewApprovalBridge() *ApprovalBridge

func (*ApprovalBridge) Done

func (b *ApprovalBridge) Done() <-chan struct{}

func (*ApprovalBridge) RequestApproval

func (b *ApprovalBridge) RequestApproval(toolName string, args json.RawMessage, preview string) (bool, error)

func (*ApprovalBridge) Respond

func (b *ApprovalBridge) Respond()

type ApprovalRequest

type ApprovalRequest struct {
	ToolName string
	Args     json.RawMessage
	Preview  string
	ReplyCh  chan bool
}

type ChatMessage

type ChatMessage struct {
	Role    ChatRole
	Label   string
	Content string
}

type ChatRole

type ChatRole int
const (
	RoleUser ChatRole = iota
	RoleAssistant
	RoleTool
	RoleSystem
	RoleError
)

type Model

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

func NewModel

func NewModel(providerName, modelName string, bridge *ApprovalBridge, inputCh chan string, outputCh chan tea.Msg) 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