chat

package
v1.19.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Model

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

Model is the main chat model. It is a flexible component - it renders exactly the size given by SetSize.

func New

func New(
	user *auth.User,
	account domain.Account,
	workspace domain.Workspace,
	theme styles.Theme,
	db sqlite.DB,
	chatClient chatclient.Client,
	toolRegistry *tools.Registry,
	scope log.Scope,
) *Model

New creates a new chat model.

func (*Model) CancelActiveRound

func (m *Model) CancelActiveRound() bool

CancelActiveRound cancels the active round if one exists. Returns true if a round was cancelled.

func (*Model) ConversationID

func (m *Model) ConversationID() domain.ConversationID

ConversationID returns the current conversation ID.

func (*Model) Init

func (m *Model) Init() tea.Cmd

Init initializes the model.

func (*Model) SetOrigin

func (m *Model) SetOrigin(x, y int)

SetOrigin sets the terminal-absolute position of this component's top-left corner.

func (*Model) SetSize

func (m *Model) SetSize(width, height int)

SetSize updates the dimensions. This is a flexible component.

func (*Model) ShortHelp

func (m *Model) ShortHelp() []key.Binding

ShortHelp returns the key bindings for the short help view.

func (*Model) Update

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

Update handles messages.

func (*Model) View

func (m *Model) View() string

View renders the chat. This is a flexible component - renders exactly to SetSize dimensions.

Directories

Path Synopsis
block
Package block defines the shared interface for all visual blocks in the message list viewport.
Package block defines the shared interface for all visual blocks in the message list viewport.
messagelisttest
Package messagelisttest provides test helpers for the messagelist package.
Package messagelisttest provides test helpers for the messagelist package.
round/turn/assistant/blocks/tools/action
Package action provides a generic tool UI model for simple tools that accumulate input, execute, and show status — with no custom body.
Package action provides a generic tool UI model for simple tools that accumulate input, execute, and show status — with no custom body.
round/turn/assistant/blocks/tools/show
Package show renders entity cards inside tool chrome.
Package show renders entity cards inside tool chrome.

Jump to

Keyboard shortcuts

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