Documentation
¶
Index ¶
- type Model
- func (m *Model) CancelActiveRound()
- func (m *Model) Focused() bool
- func (m *Model) HasActiveRound() bool
- func (m *Model) LastRound() *round.Model
- func (m *Model) Len() int
- func (m *Model) RemoveLastRound()
- func (m *Model) SetFocused(focused bool)
- func (m *Model) SetOrigin(x, y int)
- func (m *Model) SetSize(width, height int)
- func (m *Model) StartTurn(conversationID domain.ConversationID, accountID domain.AccountID, ...) tea.Cmd
- func (m *Model) Update(msg tea.Msg) tea.Cmd
- func (m *Model) View() string
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 displays the conversation history and manages rounds. Scroll, focus, and hit-test math is delegated to a viewport.Model.
Methods are split across files by responsibility:
- messagelist.go struct, constructor, accessors, layout helpers
- update.go message dispatch
- render.go View, block rendering, gaps, dividers
- mouse.go click routing, text selection
- rounds.go round lifecycle, block collection
func New ¶
func New( theme styles.Theme, db sqlite.DB, chatClient chatclient.Client, toolRegistry *tools.Registry, scope log.Scope, ) *Model
New creates a new message list.
func (*Model) CancelActiveRound ¶
func (m *Model) CancelActiveRound()
CancelActiveRound cancels the last round if it is still active.
func (*Model) HasActiveRound ¶
HasActiveRound returns true if the last round is still active.
func (*Model) RemoveLastRound ¶ added in v1.11.0
func (m *Model) RemoveLastRound()
RemoveLastRound removes the last round and rebuilds blocks.
func (*Model) SetOrigin ¶
SetOrigin sets the terminal-absolute position of this component's top-left corner. Called by the parent during layout so mouse coordinates can be translated.
func (*Model) StartTurn ¶
func (m *Model) StartTurn( conversationID domain.ConversationID, accountID domain.AccountID, userMessageID domain.MessageID, input msgs.UserSubmittedInput, messages []domain.Message, context []domain.ContextEntity, ) tea.Cmd
StartTurn creates a new round and begins streaming.
Directories
¶
| Path | Synopsis |
|---|---|
|
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. |
|
Package messagelisttest provides test helpers for the messagelist package.
|
Package messagelisttest provides test helpers for the messagelist package. |
Click to show internal directories.
Click to hide internal directories.