tui

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2026 License: Apache-2.0 Imports: 35 Imported by: 0

Documentation

Overview

Package tui is codebot's full-screen terminal interface. See docs/tui-plan.md.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run added in v1.0.0

func Run(a *app.App, ui *UI, version string) error

Run prints the conversation to the terminal on exit. ui must be the UI a was booted with.

Types

type Model

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

Model shows the conversation (or a page over it) on top, and the editor (or the top panel) below.

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() tea.View

type UI added in v1.0.0

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

UI is the interact.UI the App boots with; Run binds it to the program.

func (*UI) Approve added in v1.0.0

func (u *UI) Approve(ctx context.Context, req interact.Approval) (interact.Verdict, error)

func (*UI) Ask added in v1.0.0

func (u *UI) Ask(ctx context.Context, qs []interact.Question) (interact.Answers, error)

Directories

Path Synopsis
Package commands holds the slash commands.
Package commands holds the slash commands.
Package editor is the multi-line input: history and history search, completion of slash commands and @file mentions, pasted text and images, and handing the input off to the user's $EDITOR.
Package editor is the multi-line input: history and history search, completion of slash commands and @file mentions, pasted text and images, and handing the input off to the user's $EDITOR.
Package imageinput turns clipboard images and dropped image files into image blocks.
Package imageinput turns clipboard images and dropped image files into image blocks.
Package markdown renders markdown and wraps plain text for the terminal.
Package markdown renders markdown and wraps plain text for the terminal.
Package onboarding is the first-run setup.
Package onboarding is the first-run setup.
Package panel holds the views that replace the editor at the bottom of the screen until dismissed: permission requests, questions, lists and text.
Package panel holds the views that replace the editor at the bottom of the screen until dismissed: permission requests, questions, lists and text.
Package syntax colors code with chroma.
Package syntax colors code with chroma.
Package theme holds the TUI's palette and styles.
Package theme holds the TUI's palette and styles.
Package transcript turns a conversation into cells that render at any width.
Package transcript turns a conversation into cells that render at any width.

Jump to

Keyboard shortcuts

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