Documentation
¶
Index ¶
- type Model
- func (m *Model) Blocks() []block.Block
- func (m *Model) Cancel()
- func (m *Model) Duration() time.Duration
- func (m *Model) ID() domain.MessageID
- func (m *Model) Init() tea.Cmd
- func (m *Model) SetWidth(width int)
- func (m *Model) StartStream(messages []domain.Message, context []domain.ContextEntity) tea.Cmd
- func (m *Model) State() State
- func (m *Model) Update(msg tea.Msg) tea.Cmd
- type State
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 represents a complete user→assistant exchange, potentially with multiple turns if tools are involved. A round starts with explicit user input and ends when the assistant stops (no more tool calls). It is a fixed-height component - height is determined by content.
func New ¶
func New( theme styles.Theme, conversationID domain.ConversationID, accountID domain.AccountID, userMessageID domain.MessageID, input msgs.UserSubmittedInput, width int, db sqlite.DB, chatClient chatclient.Client, toolRegistry *chattools.Registry, scope log.Scope, ) *Model
New creates a new round from explicit user input.
func (*Model) Blocks ¶
Blocks returns all visual blocks from all turns in this round. The thinking animation is appended at the end while the round is active.
func (*Model) Cancel ¶
func (m *Model) Cancel()
Cancel stops all in-flight turns and marks the round cancelled.
func (*Model) StartStream ¶
StartStream begins streaming for the first turn.
Click to show internal directories.
Click to hide internal directories.