Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AssistantSegments ¶ added in v1.128.0
AssistantSegments is a line-oriented active assistant rendering. Header and Stable are retained by the message view and immutable until the next width change; Tail contains only the mutable markdown block.
type Model ¶
type Model interface {
layout.Model
layout.Sizeable
SetMessage(msg *types.Message) tea.Cmd
AppendContent(content string) tea.Cmd
SetSelected(selected bool)
SetHovered(hovered bool)
CodeBlocks() []markdown.CodeBlock
// Finalize releases per-message render state that is only needed while the
// message is actively streaming. The message content and code-block metadata
// are preserved; calling View() afterwards still produces correct output
// without retaining a per-view render cache or IncrementalRenderer.
Finalize()
// HasLiveRenderState reports whether this view currently retains a
// populated renderCache or an IncrementalRenderer instance. Used by tests
// to assert that finalized views have actually released their per-message
// render state without reaching into unexported fields via reflection.
HasLiveRenderState() bool
// RenderedSegments exposes immutable header/stable blocks separately from
// the mutable tail so transcript follow-tail rendering need not flatten the
// complete active response on every chunk.
RenderedSegments(width int) (AssistantSegments, bool)
}
Model represents a view that can render a message
Click to show internal directories.
Click to hide internal directories.