tui

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2026 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ModelFast    = "claude-haiku-4-5-20251001"
	ModelDefault = "claude-sonnet-4-20250514"
	ModelDeep    = "claude-opus-4-20250514"
)

Model tiers for routing.

Variables

View Source
var ModelOverride string

ModelOverride is set externally to force a specific model for all queries. When empty, automatic model routing is used.

Functions

func PrintBanner added in v0.2.0

func PrintBanner(servers []string)

PrintBanner displays the startup banner with server information. This is called before entering the REPL loop.

func RouteModel added in v0.3.0

func RouteModel(query string) string

RouteModel selects an appropriate Claude model based on query complexity. Returns empty string to use whatever default is configured.

func Run

func Run(mcpConfigPath, workDir string, servers []string) error

Run starts the TUI application in REPL mode (terminal-native scrolling).

func RunAltScreen added in v0.2.0

func RunAltScreen(mcpConfigPath, workDir string, servers []string) error

RunAltScreen starts the TUI in full-screen alt-screen mode (legacy).

func RunQuery

func RunQuery(ctx context.Context, prompt, sessionID, mcpConfigPath, workDir, model string) (<-chan StreamEvent, error)

RunQuery runs a Claude query and streams events back on a channel. sessionID can be empty for a new session, or a prior session ID to resume. model can be empty to use the CLI default, or a specific model ID.

func RunREPL added in v0.2.0

func RunREPL(mcpConfigPath, workDir string, servers []string) error

RunREPL starts an interactive REPL that streams Claude responses inline. This matches the terminal-native scrolling style (no alt-screen).

Types

type StreamEvent

type StreamEvent struct {
	Type      string
	Content   string
	Tool      string
	Input     string
	SessionID string
}

StreamEvent represents a single streamed event from the Claude process.

Jump to

Keyboard shortcuts

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