bubbletea

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Feb 15, 2026 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Overview

Package bubbletea implements ui.ChatUI for interactive terminals using the Charm bubbletea framework. It provides a scrollable chat history, a text input prompt, a typing/spinner indicator, and Markdown rendering via glamour.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Terminal

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

Terminal implements ui.ChatUI for interactive terminal sessions.

func New

func New() (*Terminal, error)

New creates a new terminal chat UI. The UI takes over the terminal and should be closed when done.

func (*Terminal) AppendHistory

func (t *Terminal) AppendHistory(role, text string)

AppendHistory adds a message to the chat display without generating an event. Used to restore previous conversation history.

func (*Terminal) ClearHistory

func (t *Terminal) ClearHistory()

ClearHistory clears all messages from the chat display.

func (*Terminal) Close

func (t *Terminal) Close() error

Close shuts down the terminal UI.

func (*Terminal) Receive

func (t *Terminal) Receive(ctx context.Context) (ui.Event, error)

Receive blocks until the next user event or until the context is cancelled.

Jump to

Keyboard shortcuts

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