Documentation
¶
Index ¶
- type Model
- func (m *Model) AddToolCall(msg *types.Message) tea.Cmd
- func (m *Model) AgentName() string
- func (m *Model) AppendReasoning(content string)
- func (m *Model) GetSize() (int, int)
- func (m *Model) HasToolCall(toolCallID string) bool
- func (m *Model) Height() int
- func (m *Model) ID() string
- func (m *Model) Init() tea.Cmd
- func (m *Model) IsExpanded() bool
- func (m *Model) IsHeaderLine(lineIdx int) bool
- func (m *Model) IsToggleLine(lineIdx int) bool
- func (m *Model) Reasoning() string
- func (m *Model) SetExpanded(expanded bool)
- func (m *Model) SetReasoning(content string)
- func (m *Model) SetSize(width, height int) tea.Cmd
- func (m *Model) Toggle()
- func (m *Model) ToolCount() int
- func (m *Model) Update(msg tea.Msg) (layout.Model, tea.Cmd)
- func (m *Model) UpdateToolCall(toolCallID string, status types.ToolStatus, args string)
- func (m *Model) UpdateToolResult(toolCallID, content string, status types.ToolStatus, ...) tea.Cmd
- func (m *Model) View() string
- type ToggleMsg
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 collapsible reasoning + tool calls block.
func New ¶
func New(id, agentName string, sessionState *service.SessionState) *Model
New creates a new reasoning block.
func (*Model) AddToolCall ¶
AddToolCall adds a tool call to the block.
func (*Model) AppendReasoning ¶
AppendReasoning appends to the reasoning content. Creates a new reasoning item if the last item was a tool, otherwise appends to the last reasoning item.
func (*Model) HasToolCall ¶
HasToolCall returns true if the block contains the given tool call ID.
func (*Model) IsExpanded ¶
IsExpanded returns the current expanded state.
func (*Model) IsHeaderLine ¶
IsHeaderLine returns true if the given line index is the header (line 0).
func (*Model) IsToggleLine ¶
IsToggleLine returns true if clicking this line should toggle the block. Only the header is toggleable.
func (*Model) Reasoning ¶
Reasoning returns the full reasoning content (concatenated from all reasoning items).
func (*Model) SetExpanded ¶
SetExpanded sets the expanded state directly.
func (*Model) SetReasoning ¶
SetReasoning sets reasoning content (replaces all content items with a single reasoning item).
func (*Model) Toggle ¶
func (m *Model) Toggle()
Toggle switches between expanded and collapsed state.
func (*Model) UpdateToolCall ¶
func (m *Model) UpdateToolCall(toolCallID string, status types.ToolStatus, args string)
UpdateToolCall updates an existing tool call in the block.
func (*Model) UpdateToolResult ¶
func (m *Model) UpdateToolResult(toolCallID, content string, status types.ToolStatus, result *tools.ToolCallResult) tea.Cmd
UpdateToolResult updates tool result for a tool call.