tui

package
v0.0.0-...-1834054 Latest Latest
Warning

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

Go to latest
Published: May 9, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run

func Run(provider, model, sessionID string) error

Run initializes and runs the TUI

func RunWithModel

func RunWithModel(m *Model) error

RunWithModel runs the TUI with a pre-configured model

Types

type ContentUpdateMsg

type ContentUpdateMsg string

New messages for overall content update and error reporting

type ErrorMsg

type ErrorMsg error

type HeaderModel

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

HeaderModel represents the header component

type Model

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

Model represents the main TUI model

func NewModel

func NewModel(provider, model, sessionID string) Model

NewModel creates a new TUI model

func (*Model) Err

func (m *Model) Err() error

Err returns any error that was set on the model.

func (Model) Init

func (m Model) Init() tea.Cmd

Init initializes the model

func (*Model) SetContent

func (m *Model) SetContent(content string)

SetContent updates the viewport content

func (*Model) SetError

func (m *Model) SetError(err error)

SetError sets an error state

func (*Model) SetProgram

func (m *Model) SetProgram(p *tea.Program)

SetProgram stores the tea.Program instance on the model. This is crucial for sending messages to the TUI from external goroutines.

func (*Model) SetProgress

func (m *Model) SetProgress(current, total int, currentFile string)

SetProgress updates the progress state (overall file progress)

func (*Model) StartProcessing

func (m *Model) StartProcessing()

StartProcessing starts the processing state

func (*Model) StopProcessing

func (m *Model) StopProcessing()

StopProcessing stops the processing state

func (*Model) Update

func (m *Model) Update(msg tea.Msg) (tea.Model, tea.Cmd)

Update handles model updates

func (Model) View

func (m Model) View() string

View renders the model

type ProgressModel

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

ProgressModel represents the progress component

func NewProgressModel

func NewProgressModel() ProgressModel

NewProgressModel creates a new progress model

func (ProgressModel) Init

func (m ProgressModel) Init() tea.Cmd

Init initializes the progress model

func (*ProgressModel) SetProgress

func (m *ProgressModel) SetProgress(current, total int, currentFile string)

SetProgress updates the progress state

func (ProgressModel) Update

func (m ProgressModel) Update(msg tea.Msg) (ProgressModel, tea.Cmd)

Update handles progress model updates

func (ProgressModel) View

func (m ProgressModel) View() string

View renders the progress model

Directories

Path Synopsis
internal/tui/chat/model.go
internal/tui/chat/model.go

Jump to

Keyboard shortcuts

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