messages

package
v1.8.2 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AutoScrollTickMsg added in v1.8.2

type AutoScrollTickMsg struct {
	Direction int // -1 for up, 1 for down
}

AutoScrollTickMsg triggers auto-scroll during selection

type DebouncedCopyMsg added in v1.8.2

type DebouncedCopyMsg struct {
	ClickID int // Unique identifier to match with current selection state
}

DebouncedCopyMsg triggers a debounced copy after multi-click selection

type Model

type Model interface {
	layout.Model
	layout.Sizeable
	layout.Focusable
	layout.Help
	layout.Positionable

	AddUserMessage(content string) tea.Cmd
	AddLoadingMessage(description string) tea.Cmd
	ReplaceLoadingWithUser(content string) tea.Cmd
	AddErrorMessage(content string) tea.Cmd
	AddAssistantMessage() tea.Cmd
	AddCancelledMessage() tea.Cmd
	AddWelcomeMessage(content string) tea.Cmd
	AddOrUpdateToolCall(agentName string, toolCall tools.ToolCall, toolDef tools.Tool, status types.ToolStatus) tea.Cmd
	AddToolResult(msg *runtime.ToolCallResponseEvent, status types.ToolStatus) tea.Cmd
	AppendToLastMessage(agentName string, messageType types.MessageType, content string) tea.Cmd
	AddShellOutputMessage(content string) tea.Cmd
	LoadFromSession(sess *session.Session) tea.Cmd

	ScrollToBottom() tea.Cmd
}

Model represents a chat message list component

func New

func New(a *app.App, sessionState *service.SessionState) Model

New creates a new message list component

func NewScrollableView added in v1.8.2

func NewScrollableView(width, height int, sessionState *service.SessionState) Model

NewScrollableView creates a simple scrollable view for displaying messages in dialogs This is a lightweight version that doesn't require app or session state management

type StreamCancelledMsg added in v1.8.2

type StreamCancelledMsg struct {
	ShowMessage bool // Whether to show a cancellation message after cleanup
}

StreamCancelledMsg notifies components that the stream has been cancelled

type ToggleHideToolResultsMsg added in v1.8.2

type ToggleHideToolResultsMsg struct{}

ToggleHideToolResultsMsg triggers hiding/showing tool results

Jump to

Keyboard shortcuts

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