simple

package
v0.0.0-beta Latest Latest
Warning

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

Go to latest
Published: Mar 30, 2026 License: MIT Imports: 17 Imported by: 0

Documentation

Overview

Package simple provides a readline-based TUI implementation.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Simple

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

Simple implements a readline-based TUI.

func New

func New(status ui.Status, historyPath string) *Simple

New creates a new Simple UI with the given status and optional history file path.

func (*Simple) Actions

func (s *Simple) Actions() <-chan ui.UserAction

Actions returns the channel for sending UI actions to the assistant.

func (*Simple) Cancel

func (s *Simple) Cancel() <-chan struct{}

Cancel returns the channel for receiving cancel requests.

func (*Simple) Events

func (s *Simple) Events() chan<- ui.Event

Events returns the channel for receiving events from the assistant.

func (*Simple) Input

func (s *Simple) Input() <-chan ui.UserInput

Input returns the channel for sending user input to the assistant.

func (*Simple) Run

func (s *Simple) Run(ctx context.Context) error

Run starts the Simple UI, blocking until exit.

func (*Simple) SetHintFunc

func (s *Simple) SetHintFunc(_ func(string) string)

SetHintFunc is a no-op for the simple UI (hints are TUI-only).

func (*Simple) SetWorkdir

func (s *Simple) SetWorkdir(_ string)

SetWorkdir is a no-op for the simple UI (autocomplete is TUI-only).

type State

type State int

State represents the UI state.

const (
	StateIdle State = iota
	StateStreaming
)

Jump to

Keyboard shortcuts

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