chat

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jul 14, 2026 License: Apache-2.0 Imports: 39 Imported by: 0

Documentation

Index

Constants

View Source
const MessageLeftPaddingTotal = 4

MessageLeftPaddingTotal is the total width consumed by the user message prefix: 2-space margin + border char (1) + 1-space padding = 4 chars. Used to cap content width so lines don't exceed the available area.

Variables

This section is empty.

Functions

func AssistantInfoID

func AssistantInfoID(messageID string) string

AssistantInfoID returns a stable ID for assistant info items.

func BuildToolResultMap

func BuildToolResultMap(messages []*message.Message) map[string]message.ToolResult

BuildToolResultMap creates a map of tool call IDs to their results from a list of messages. Results may live in a dedicated message.Tool-role message (live streaming) or be embedded directly inside the assistant message Parts (restored sessions — convertSDKMessages stores ToolResult alongside the matching ToolCall in the same Parts slice). Scanning every message regardless of role handles both cases without double-counting, since ToolCallID is unique.

func ClearItemCaches

func ClearItemCaches(items []MessageItem)

ClearItemCaches drops any cached rendered output on each item so the next render uses the current styles. It also bumps each item's version so the F6 list-level memo invalidates frozen entries on the next render.

func FormatTodosList

func FormatTodosList(sty *styles.Styles, todos []session.Todo, inProgressIcon string, width int) string

FormatTodosList formats a list of todos for display. Used by the compact Tasks panel (pills.go) and the task_list renderer (task.go).

func IsDockerMCPTool

func IsDockerMCPTool(name string) bool

IsDockerMCPTool returns true if the tool name is a Docker MCP tool.

func ShouldRenderAssistantMessage

func ShouldRenderAssistantMessage(msg *message.Message) bool

ShouldRenderAssistantMessage determines if an assistant message should be rendered

In some cases the assistant message only has tools so we do not want to render an empty message.

func ShouldRenderToolCall

func ShouldRenderToolCall(tc message.ToolCall) bool

ShouldRenderToolCall reports whether a tool call should appear as a normal transcript item. System-state tools can be hidden here and represented by dedicated UI surfaces instead.

func ShouldRenderToolName

func ShouldRenderToolName(name string) bool

ShouldRenderToolName reports whether a tool with the given name should appear as a normal transcript item.

Types

type AgentToolMessageItem

type AgentToolMessageItem struct {
	// contains filtered or unexported fields
}

AgentToolMessageItem is a message item that represents an agent tool call.

func NewAgentToolMessageItem

func NewAgentToolMessageItem(
	sty *styles.Styles,
	toolCall message.ToolCall,
	result *message.ToolResult,
	canceled bool,
) *AgentToolMessageItem

NewAgentToolMessageItem creates a new AgentToolMessageItem.

func (*AgentToolMessageItem) AddNestedTool

func (a *AgentToolMessageItem) AddNestedTool(tool ToolMessageItem)

AddNestedTool adds a nested tool.

func (*AgentToolMessageItem) Animate

func (a *AgentToolMessageItem) Animate(msg anim.StepMsg) tea.Cmd

Animate progresses the message animation if it should be spinning.

Bumps the parent's F6 list-cache version on both the parent-tick and nested-tick branches. Nested tools are not list entries of their own — their IDs map to this parent's index in idInxMap (internal/ui/model/chat.go:240-246) and their renders are embedded inline in this parent's output — so the list only checks the parent's version. Without the bump, the list cache would serve the previously rendered frame indefinitely and the spinner would appear frozen.

func (AgentToolMessageItem) Finished

func (t AgentToolMessageItem) Finished() bool

Finished implements list.Item. A tool call is freezable once the tool call itself is marked finished AND a result has been recorded (or it has been canceled). Tools that override the spinning logic via spinningFunc would short-circuit live ticks; we still gate freezing on isSpinning to keep the contract conservative.

func (AgentToolMessageItem) HandleKeyEvent

func (t AgentToolMessageItem) HandleKeyEvent(key tea.KeyMsg) (bool, tea.Cmd)

HandleKeyEvent implements KeyEventHandler.

func (AgentToolMessageItem) HandleMouseClick

func (t AgentToolMessageItem) HandleMouseClick(btn ansi.MouseButton, x, y int) bool

HandleMouseClick implements MouseClickable.

func (AgentToolMessageItem) ID

func (t AgentToolMessageItem) ID() string

ID returns the unique identifier for this tool message item.

func (AgentToolMessageItem) MessageID

func (t AgentToolMessageItem) MessageID() string

MessageID returns the ID of the message containing this tool call.

func (*AgentToolMessageItem) NestedTools

func (a *AgentToolMessageItem) NestedTools() []ToolMessageItem

NestedTools returns the nested tools.

func (AgentToolMessageItem) RawRender

func (t AgentToolMessageItem) RawRender(width int) string

RawRender implements MessageItem.

func (AgentToolMessageItem) Render

func (t AgentToolMessageItem) Render(width int) string

Render renders the tool message item at the given width.

func (AgentToolMessageItem) RenderPreview

func (t AgentToolMessageItem) RenderPreview(width int) string

RenderPreview renders the tool non-compact without cache or prefix. Bypasses isCompact so the caller gets the full content view regardless of the tool's stored compact state. The caller is responsible for passing the correct available width — no additional capping is applied here.

func (AgentToolMessageItem) SetCompact

func (t AgentToolMessageItem) SetCompact(compact bool)

SetCompact implements the Compactable interface.

func (AgentToolMessageItem) SetMessageID

func (t AgentToolMessageItem) SetMessageID(id string)

SetMessageID sets the ID of the message containing this tool call. MessageID is metadata only and does not affect the rendered output, so we deliberately do not bump the version here.

func (*AgentToolMessageItem) SetNestedTools

func (a *AgentToolMessageItem) SetNestedTools(tools []ToolMessageItem)

SetNestedTools sets the nested tools.

SetNestedTools always bumps the version. The previous design deduped when the slice's length and element pointers were unchanged, but the live update path in internal/ui/model/ui.go mutates existing children in place (SetToolCall / SetResult on the same pointers) and then calls SetNestedTools with the same slice. Pointer-equality dedupe in that case skips the parent Bump even though the parent's rendered output (which embeds the children inline) has changed, leaving a stale parent entry in the list cache. Always bumping is cheap (one uint64 increment) and called at most once per agent event; in the rare case the slice is truly unchanged the worst case is one extra parent re-render while every child cache hit stays warm.

func (AgentToolMessageItem) SetResult

func (t AgentToolMessageItem) SetResult(res *message.ToolResult)

SetResult sets the tool result associated with this message item.

func (AgentToolMessageItem) SetSpinningFunc

func (t AgentToolMessageItem) SetSpinningFunc(fn SpinningFunc)

SetSpinningFunc sets a custom function to determine if the tool should spin.

func (AgentToolMessageItem) SetStatus

func (t AgentToolMessageItem) SetStatus(status ToolStatus)

SetStatus sets the tool status.

func (*AgentToolMessageItem) SetSubAgentStreaming

func (a *AgentToolMessageItem) SetSubAgentStreaming(reasoning, content string)

func (AgentToolMessageItem) SetToolCall

func (t AgentToolMessageItem) SetToolCall(tc message.ToolCall)

SetToolCall sets the tool call associated with this message item.

func (AgentToolMessageItem) StartAnimation

func (t AgentToolMessageItem) StartAnimation() tea.Cmd

StartAnimation starts the assistant message animation if it should be spinning.

func (AgentToolMessageItem) Status

func (t AgentToolMessageItem) Status() ToolStatus

Status returns the current tool status.

func (*AgentToolMessageItem) SubAgentStreaming

func (a *AgentToolMessageItem) SubAgentStreaming() (reasoning, content string)

func (AgentToolMessageItem) ToggleExpanded

func (t AgentToolMessageItem) ToggleExpanded() bool

ToggleExpanded toggles the expanded state of the thinking box.

func (AgentToolMessageItem) ToolCall

func (t AgentToolMessageItem) ToolCall() message.ToolCall

ToolCall returns the tool call associated with this message item.

type AgentToolRenderContext

type AgentToolRenderContext struct {
	// contains filtered or unexported fields
}

AgentToolRenderContext renders agent tool messages.

func (*AgentToolRenderContext) RenderTool

func (r *AgentToolRenderContext) RenderTool(sty *styles.Styles, width int, opts *ToolRenderOpts) string

RenderTool implements the ToolRenderer interface.

type AgenticFetchToolMessageItem

type AgenticFetchToolMessageItem struct {
	// contains filtered or unexported fields
}

AgenticFetchToolMessageItem is a message item that represents an agentic fetch tool call.

func NewAgenticFetchToolMessageItem

func NewAgenticFetchToolMessageItem(
	sty *styles.Styles,
	toolCall message.ToolCall,
	result *message.ToolResult,
	canceled bool,
) *AgenticFetchToolMessageItem

NewAgenticFetchToolMessageItem creates a new AgenticFetchToolMessageItem.

func (*AgenticFetchToolMessageItem) AddNestedTool

func (a *AgenticFetchToolMessageItem) AddNestedTool(tool ToolMessageItem)

AddNestedTool adds a nested tool.

func (*AgenticFetchToolMessageItem) Animate

Animate progresses the message animation if it should be spinning. See AgentToolMessageItem.Animate for the parent-bump rationale — without an override, the embedded base.Animate would (a) drop StepMsgs whose ID matches a nested child instead of the parent (anim.Animate's ID check at internal/ui/anim/anim.go:326-329 silently returns nil), and (b) never invalidate the parent's list-cache entry on a parent tick.

func (AgenticFetchToolMessageItem) Finished

func (t AgenticFetchToolMessageItem) Finished() bool

Finished implements list.Item. A tool call is freezable once the tool call itself is marked finished AND a result has been recorded (or it has been canceled). Tools that override the spinning logic via spinningFunc would short-circuit live ticks; we still gate freezing on isSpinning to keep the contract conservative.

func (AgenticFetchToolMessageItem) HandleKeyEvent

func (t AgenticFetchToolMessageItem) HandleKeyEvent(key tea.KeyMsg) (bool, tea.Cmd)

HandleKeyEvent implements KeyEventHandler.

func (AgenticFetchToolMessageItem) HandleMouseClick

func (t AgenticFetchToolMessageItem) HandleMouseClick(btn ansi.MouseButton, x, y int) bool

HandleMouseClick implements MouseClickable.

func (AgenticFetchToolMessageItem) ID

func (t AgenticFetchToolMessageItem) ID() string

ID returns the unique identifier for this tool message item.

func (AgenticFetchToolMessageItem) MessageID

func (t AgenticFetchToolMessageItem) MessageID() string

MessageID returns the ID of the message containing this tool call.

func (*AgenticFetchToolMessageItem) NestedTools

func (a *AgenticFetchToolMessageItem) NestedTools() []ToolMessageItem

NestedTools returns the nested tools.

func (AgenticFetchToolMessageItem) RawRender

func (t AgenticFetchToolMessageItem) RawRender(width int) string

RawRender implements MessageItem.

func (AgenticFetchToolMessageItem) Render

func (t AgenticFetchToolMessageItem) Render(width int) string

Render renders the tool message item at the given width.

func (AgenticFetchToolMessageItem) RenderPreview

func (t AgenticFetchToolMessageItem) RenderPreview(width int) string

RenderPreview renders the tool non-compact without cache or prefix. Bypasses isCompact so the caller gets the full content view regardless of the tool's stored compact state. The caller is responsible for passing the correct available width — no additional capping is applied here.

func (AgenticFetchToolMessageItem) SetCompact

func (t AgenticFetchToolMessageItem) SetCompact(compact bool)

SetCompact implements the Compactable interface.

func (AgenticFetchToolMessageItem) SetMessageID

func (t AgenticFetchToolMessageItem) SetMessageID(id string)

SetMessageID sets the ID of the message containing this tool call. MessageID is metadata only and does not affect the rendered output, so we deliberately do not bump the version here.

func (*AgenticFetchToolMessageItem) SetNestedTools

func (a *AgenticFetchToolMessageItem) SetNestedTools(tools []ToolMessageItem)

SetNestedTools sets the nested tools. Always bumps the version; see AgentToolMessageItem.SetNestedTools for the rationale.

func (AgenticFetchToolMessageItem) SetResult

func (t AgenticFetchToolMessageItem) SetResult(res *message.ToolResult)

SetResult sets the tool result associated with this message item.

func (AgenticFetchToolMessageItem) SetSpinningFunc

func (t AgenticFetchToolMessageItem) SetSpinningFunc(fn SpinningFunc)

SetSpinningFunc sets a custom function to determine if the tool should spin.

func (AgenticFetchToolMessageItem) SetStatus

func (t AgenticFetchToolMessageItem) SetStatus(status ToolStatus)

SetStatus sets the tool status.

func (*AgenticFetchToolMessageItem) SetSubAgentStreaming

func (a *AgenticFetchToolMessageItem) SetSubAgentStreaming(reasoning, content string)

func (AgenticFetchToolMessageItem) SetToolCall

func (t AgenticFetchToolMessageItem) SetToolCall(tc message.ToolCall)

SetToolCall sets the tool call associated with this message item.

func (AgenticFetchToolMessageItem) StartAnimation

func (t AgenticFetchToolMessageItem) StartAnimation() tea.Cmd

StartAnimation starts the assistant message animation if it should be spinning.

func (AgenticFetchToolMessageItem) Status

func (t AgenticFetchToolMessageItem) Status() ToolStatus

Status returns the current tool status.

func (*AgenticFetchToolMessageItem) SubAgentStreaming

func (a *AgenticFetchToolMessageItem) SubAgentStreaming() (reasoning, content string)

func (AgenticFetchToolMessageItem) ToggleExpanded

func (t AgenticFetchToolMessageItem) ToggleExpanded() bool

ToggleExpanded toggles the expanded state of the thinking box.

func (AgenticFetchToolMessageItem) ToolCall

func (t AgenticFetchToolMessageItem) ToolCall() message.ToolCall

ToolCall returns the tool call associated with this message item.

type AgenticFetchToolRenderContext

type AgenticFetchToolRenderContext struct {
	// contains filtered or unexported fields
}

AgenticFetchToolRenderContext renders agentic fetch tool messages.

func (*AgenticFetchToolRenderContext) RenderTool

func (r *AgenticFetchToolRenderContext) RenderTool(sty *styles.Styles, width int, opts *ToolRenderOpts) string

RenderTool implements the ToolRenderer interface.

type Animatable

type Animatable interface {
	StartAnimation() tea.Cmd
	Animate(msg anim.StepMsg) tea.Cmd
}

Animatable is an interface for items that support animation.

type AnswerAskUserMsg

type AnswerAskUserMsg struct {
	ID    string
	Value string
}

AnswerAskUserMsg is sent when the user completes an ask_user_question bubble. ui.go handles this by calling Workspace.AnswerAskUser.

type ApplyPatchToolMessageItem

type ApplyPatchToolMessageItem struct {
	// contains filtered or unexported fields
}

ApplyPatchToolMessageItem is a message item that represents an apply_patch tool call.

func (ApplyPatchToolMessageItem) Animate

func (t ApplyPatchToolMessageItem) Animate(msg anim.StepMsg) tea.Cmd

Animate progresses the assistant message animation if it should be spinning.

Bumps the F6 list-cache version so the next draw re-renders this item: a spinner tick mutates anim's internal frame counter, which changes the rendered output but is invisible to the per-item caches. Without the bump the list cache would serve the previously rendered frame indefinitely and the spinner would appear frozen. The ID gate keeps unrelated ticks (routed here by a future change to chat.Animate's dispatch) from churning the cache.

func (ApplyPatchToolMessageItem) Finished

func (t ApplyPatchToolMessageItem) Finished() bool

Finished implements list.Item. A tool call is freezable once the tool call itself is marked finished AND a result has been recorded (or it has been canceled). Tools that override the spinning logic via spinningFunc would short-circuit live ticks; we still gate freezing on isSpinning to keep the contract conservative.

func (ApplyPatchToolMessageItem) HandleKeyEvent

func (t ApplyPatchToolMessageItem) HandleKeyEvent(key tea.KeyMsg) (bool, tea.Cmd)

HandleKeyEvent implements KeyEventHandler.

func (ApplyPatchToolMessageItem) HandleMouseClick

func (t ApplyPatchToolMessageItem) HandleMouseClick(btn ansi.MouseButton, x, y int) bool

HandleMouseClick implements MouseClickable.

func (ApplyPatchToolMessageItem) ID

func (t ApplyPatchToolMessageItem) ID() string

ID returns the unique identifier for this tool message item.

func (ApplyPatchToolMessageItem) MessageID

func (t ApplyPatchToolMessageItem) MessageID() string

MessageID returns the ID of the message containing this tool call.

func (ApplyPatchToolMessageItem) RawRender

func (t ApplyPatchToolMessageItem) RawRender(width int) string

RawRender implements MessageItem.

func (ApplyPatchToolMessageItem) Render

func (t ApplyPatchToolMessageItem) Render(width int) string

Render renders the tool message item at the given width.

func (ApplyPatchToolMessageItem) RenderPreview

func (t ApplyPatchToolMessageItem) RenderPreview(width int) string

RenderPreview renders the tool non-compact without cache or prefix. Bypasses isCompact so the caller gets the full content view regardless of the tool's stored compact state. The caller is responsible for passing the correct available width — no additional capping is applied here.

func (ApplyPatchToolMessageItem) SetCompact

func (t ApplyPatchToolMessageItem) SetCompact(compact bool)

SetCompact implements the Compactable interface.

func (ApplyPatchToolMessageItem) SetMessageID

func (t ApplyPatchToolMessageItem) SetMessageID(id string)

SetMessageID sets the ID of the message containing this tool call. MessageID is metadata only and does not affect the rendered output, so we deliberately do not bump the version here.

func (ApplyPatchToolMessageItem) SetResult

func (t ApplyPatchToolMessageItem) SetResult(res *message.ToolResult)

SetResult sets the tool result associated with this message item.

func (ApplyPatchToolMessageItem) SetSpinningFunc

func (t ApplyPatchToolMessageItem) SetSpinningFunc(fn SpinningFunc)

SetSpinningFunc sets a custom function to determine if the tool should spin.

func (ApplyPatchToolMessageItem) SetStatus

func (t ApplyPatchToolMessageItem) SetStatus(status ToolStatus)

SetStatus sets the tool status.

func (ApplyPatchToolMessageItem) SetToolCall

func (t ApplyPatchToolMessageItem) SetToolCall(tc message.ToolCall)

SetToolCall sets the tool call associated with this message item.

func (ApplyPatchToolMessageItem) StartAnimation

func (t ApplyPatchToolMessageItem) StartAnimation() tea.Cmd

StartAnimation starts the assistant message animation if it should be spinning.

func (ApplyPatchToolMessageItem) Status

func (t ApplyPatchToolMessageItem) Status() ToolStatus

Status returns the current tool status.

func (ApplyPatchToolMessageItem) ToggleExpanded

func (t ApplyPatchToolMessageItem) ToggleExpanded() bool

ToggleExpanded toggles the expanded state of the thinking box.

func (ApplyPatchToolMessageItem) ToolCall

func (t ApplyPatchToolMessageItem) ToolCall() message.ToolCall

ToolCall returns the tool call associated with this message item.

type ApplyPatchToolRenderContext

type ApplyPatchToolRenderContext struct{}

ApplyPatchToolRenderContext renders apply_patch tool messages.

func (*ApplyPatchToolRenderContext) RenderTool

func (a *ApplyPatchToolRenderContext) RenderTool(sty *styles.Styles, width int, opts *ToolRenderOpts) string

RenderTool implements the ToolRenderer interface.

type AskUserActivatable

type AskUserActivatable interface {
	MessageItem
	ActivateQuestion(req tools.AskUserRequest)
}

AskUserActivatable is implemented by items that can receive ask_user_question prompts.

type AskUserToolMessageItem

type AskUserToolMessageItem struct {
	// contains filtered or unexported fields
}

AskUserToolMessageItem renders an ask_user_question tool call as a paged survey.

func NewAskUserToolMessageItem

func NewAskUserToolMessageItem(
	sty *styles.Styles,
	toolCall message.ToolCall,
	result *message.ToolResult,
	canceled bool,
) *AskUserToolMessageItem

NewAskUserToolMessageItem creates a new AskUserToolMessageItem.

func (*AskUserToolMessageItem) ActivateQuestion

func (a *AskUserToolMessageItem) ActivateQuestion(req tools.AskUserRequest)

ActivateQuestion switches the item into interactive mode for the given question set.

func (AskUserToolMessageItem) Animate

func (t AskUserToolMessageItem) Animate(msg anim.StepMsg) tea.Cmd

Animate progresses the assistant message animation if it should be spinning.

Bumps the F6 list-cache version so the next draw re-renders this item: a spinner tick mutates anim's internal frame counter, which changes the rendered output but is invisible to the per-item caches. Without the bump the list cache would serve the previously rendered frame indefinitely and the spinner would appear frozen. The ID gate keeps unrelated ticks (routed here by a future change to chat.Animate's dispatch) from churning the cache.

func (AskUserToolMessageItem) Finished

func (t AskUserToolMessageItem) Finished() bool

Finished implements list.Item. A tool call is freezable once the tool call itself is marked finished AND a result has been recorded (or it has been canceled). Tools that override the spinning logic via spinningFunc would short-circuit live ticks; we still gate freezing on isSpinning to keep the contract conservative.

func (*AskUserToolMessageItem) HandleKeyEvent

func (a *AskUserToolMessageItem) HandleKeyEvent(key tea.KeyMsg) (bool, tea.Cmd)

HandleKeyEvent overrides the base handler to provide survey navigation.

func (*AskUserToolMessageItem) HandleMouseClick

func (a *AskUserToolMessageItem) HandleMouseClick(btn ansi.MouseButton, x, y int) bool

HandleMouseClick overrides the base handler for interactive survey mode. It maps the click Y position to an option and toggles/selects it.

func (AskUserToolMessageItem) ID

func (t AskUserToolMessageItem) ID() string

ID returns the unique identifier for this tool message item.

func (AskUserToolMessageItem) MessageID

func (t AskUserToolMessageItem) MessageID() string

MessageID returns the ID of the message containing this tool call.

func (AskUserToolMessageItem) RawRender

func (t AskUserToolMessageItem) RawRender(width int) string

RawRender implements MessageItem.

func (AskUserToolMessageItem) Render

func (t AskUserToolMessageItem) Render(width int) string

Render renders the tool message item at the given width.

func (AskUserToolMessageItem) RenderPreview

func (t AskUserToolMessageItem) RenderPreview(width int) string

RenderPreview renders the tool non-compact without cache or prefix. Bypasses isCompact so the caller gets the full content view regardless of the tool's stored compact state. The caller is responsible for passing the correct available width — no additional capping is applied here.

func (AskUserToolMessageItem) SetCompact

func (t AskUserToolMessageItem) SetCompact(compact bool)

SetCompact implements the Compactable interface.

func (AskUserToolMessageItem) SetMessageID

func (t AskUserToolMessageItem) SetMessageID(id string)

SetMessageID sets the ID of the message containing this tool call. MessageID is metadata only and does not affect the rendered output, so we deliberately do not bump the version here.

func (AskUserToolMessageItem) SetResult

func (t AskUserToolMessageItem) SetResult(res *message.ToolResult)

SetResult sets the tool result associated with this message item.

func (AskUserToolMessageItem) SetSpinningFunc

func (t AskUserToolMessageItem) SetSpinningFunc(fn SpinningFunc)

SetSpinningFunc sets a custom function to determine if the tool should spin.

func (AskUserToolMessageItem) SetStatus

func (t AskUserToolMessageItem) SetStatus(status ToolStatus)

SetStatus sets the tool status.

func (AskUserToolMessageItem) SetToolCall

func (t AskUserToolMessageItem) SetToolCall(tc message.ToolCall)

SetToolCall sets the tool call associated with this message item.

func (AskUserToolMessageItem) StartAnimation

func (t AskUserToolMessageItem) StartAnimation() tea.Cmd

StartAnimation starts the assistant message animation if it should be spinning.

func (AskUserToolMessageItem) Status

func (t AskUserToolMessageItem) Status() ToolStatus

Status returns the current tool status.

func (*AskUserToolMessageItem) ToggleExpanded

func (a *AskUserToolMessageItem) ToggleExpanded() bool

ToggleExpanded is a no-op while the survey is waiting for user input so that a click on the bubble does not collapse the question.

func (AskUserToolMessageItem) ToolCall

func (t AskUserToolMessageItem) ToolCall() message.ToolCall

ToolCall returns the tool call associated with this message item.

type AssistantInfoItem

type AssistantInfoItem struct {
	*list.Versioned
	// contains filtered or unexported fields
}

AssistantInfoItem renders model info and response time after assistant completes.

func (*AssistantInfoItem) Finished

func (a *AssistantInfoItem) Finished() bool

Finished implements list.Item. Assistant info blocks render a fixed model/duration footer once the assistant turn finishes; the data is immutable after construction so the entry is safe to freeze.

func (*AssistantInfoItem) ID

func (a *AssistantInfoItem) ID() string

ID implements MessageItem.

func (*AssistantInfoItem) RawRender

func (a *AssistantInfoItem) RawRender(width int) string

RawRender implements MessageItem.

func (*AssistantInfoItem) Render

func (a *AssistantInfoItem) Render(width int) string

Render implements MessageItem.

type AssistantMessageItem

type AssistantMessageItem struct {
	*list.Versioned
	// contains filtered or unexported fields
}

AssistantMessageItem represents an assistant message in the chat UI.

This item includes thinking, and the content but does not include the tool calls.

func (*AssistantMessageItem) Animate

func (a *AssistantMessageItem) Animate(msg anim.StepMsg) tea.Cmd

Animate progresses the assistant message animation if it should be spinning.

func (*AssistantMessageItem) Finished

func (a *AssistantMessageItem) Finished() bool

Finished implements list.Item. The assistant message is freezable once the message reports IsFinished() and is no longer spinning (no animation tick remains pending). Streaming tail animation is caught by isSpinning, so freezing only kicks in once the turn is fully terminal. The list cache invalidates the entry on the next version bump if anything (focus, highlight, expansion) changes.

func (*AssistantMessageItem) HandleKeyEvent

func (a *AssistantMessageItem) HandleKeyEvent(key tea.KeyMsg) (bool, tea.Cmd)

HandleKeyEvent implements KeyEventHandler.

func (*AssistantMessageItem) HandleMouseClick

func (a *AssistantMessageItem) HandleMouseClick(btn ansi.MouseButton, x, y int) bool

HandleMouseClick implements MouseClickable. It signals (via a true return) that the click lies on the thinking box so the caller can invoke AssistantMessageItem.ToggleExpanded through the generic Expandable path. Toggling here directly would double-toggle because the caller always runs the generic path after a handled click.

func (AssistantMessageItem) Highlight

func (h AssistantMessageItem) Highlight() (startLine int, startCol int, endLine int, endCol int)

Highlight implements list.Highlightable.

func (*AssistantMessageItem) ID

func (a *AssistantMessageItem) ID() string

ID implements MessageItem.

func (*AssistantMessageItem) RawRender

func (a *AssistantMessageItem) RawRender(width int) string

RawRender implements MessageItem.

func (*AssistantMessageItem) Render

func (a *AssistantMessageItem) Render(width int) string

Render implements MessageItem.

func (AssistantMessageItem) SetFocused

func (f AssistantMessageItem) SetFocused(focused bool)

SetFocused implements MessageItem.

func (AssistantMessageItem) SetHighlight

func (h AssistantMessageItem) SetHighlight(startLine int, startCol int, endLine int, endCol int)

SetHighlight implements list.Highlightable.

func (*AssistantMessageItem) SetMessage

func (a *AssistantMessageItem) SetMessage(msg *message.Message) tea.Cmd

SetMessage is used to update the underlying message. Only the sub-section caches whose source text or extras changed are invalidated; the others survive and serve cache hits on the next RawRender.

func (*AssistantMessageItem) StartAnimation

func (a *AssistantMessageItem) StartAnimation() tea.Cmd

StartAnimation starts the assistant message animation if it should be spinning.

func (*AssistantMessageItem) ToggleExpanded

func (a *AssistantMessageItem) ToggleExpanded() bool

ToggleExpanded advances the F5 thinking view-mode cycle and returns whether the item is now in any expanded state (tail-window or full). The cycle is collapsed → tail-window → full → collapsed, with the tail-window step skipped when the rendered thinking fits within maxExpandedThinkingTailLines so short blocks remain a two-click toggle. Both the thinking section cache and the F3 prefix cache fold thinkingViewMode into their keys, so no explicit invalidation is required here.

When the message carries no thinking text the toggle is a no-op: there is nothing to expand, and mutating the view mode would thrash the thinking-section cache key for no visible benefit.

type BashToolMessageItem

type BashToolMessageItem struct {
	// contains filtered or unexported fields
}

BashToolMessageItem is a message item that represents a bash tool call.

func (BashToolMessageItem) Animate

func (t BashToolMessageItem) Animate(msg anim.StepMsg) tea.Cmd

Animate progresses the assistant message animation if it should be spinning.

Bumps the F6 list-cache version so the next draw re-renders this item: a spinner tick mutates anim's internal frame counter, which changes the rendered output but is invisible to the per-item caches. Without the bump the list cache would serve the previously rendered frame indefinitely and the spinner would appear frozen. The ID gate keeps unrelated ticks (routed here by a future change to chat.Animate's dispatch) from churning the cache.

func (BashToolMessageItem) Finished

func (t BashToolMessageItem) Finished() bool

Finished implements list.Item. A tool call is freezable once the tool call itself is marked finished AND a result has been recorded (or it has been canceled). Tools that override the spinning logic via spinningFunc would short-circuit live ticks; we still gate freezing on isSpinning to keep the contract conservative.

func (BashToolMessageItem) HandleKeyEvent

func (t BashToolMessageItem) HandleKeyEvent(key tea.KeyMsg) (bool, tea.Cmd)

HandleKeyEvent implements KeyEventHandler.

func (BashToolMessageItem) HandleMouseClick

func (t BashToolMessageItem) HandleMouseClick(btn ansi.MouseButton, x, y int) bool

HandleMouseClick implements MouseClickable.

func (BashToolMessageItem) ID

func (t BashToolMessageItem) ID() string

ID returns the unique identifier for this tool message item.

func (BashToolMessageItem) MessageID

func (t BashToolMessageItem) MessageID() string

MessageID returns the ID of the message containing this tool call.

func (BashToolMessageItem) RawRender

func (t BashToolMessageItem) RawRender(width int) string

RawRender implements MessageItem.

func (BashToolMessageItem) Render

func (t BashToolMessageItem) Render(width int) string

Render renders the tool message item at the given width.

func (BashToolMessageItem) RenderPreview

func (t BashToolMessageItem) RenderPreview(width int) string

RenderPreview renders the tool non-compact without cache or prefix. Bypasses isCompact so the caller gets the full content view regardless of the tool's stored compact state. The caller is responsible for passing the correct available width — no additional capping is applied here.

func (BashToolMessageItem) SetCompact

func (t BashToolMessageItem) SetCompact(compact bool)

SetCompact implements the Compactable interface.

func (BashToolMessageItem) SetMessageID

func (t BashToolMessageItem) SetMessageID(id string)

SetMessageID sets the ID of the message containing this tool call. MessageID is metadata only and does not affect the rendered output, so we deliberately do not bump the version here.

func (BashToolMessageItem) SetResult

func (t BashToolMessageItem) SetResult(res *message.ToolResult)

SetResult sets the tool result associated with this message item.

func (BashToolMessageItem) SetSpinningFunc

func (t BashToolMessageItem) SetSpinningFunc(fn SpinningFunc)

SetSpinningFunc sets a custom function to determine if the tool should spin.

func (BashToolMessageItem) SetStatus

func (t BashToolMessageItem) SetStatus(status ToolStatus)

SetStatus sets the tool status.

func (BashToolMessageItem) SetToolCall

func (t BashToolMessageItem) SetToolCall(tc message.ToolCall)

SetToolCall sets the tool call associated with this message item.

func (BashToolMessageItem) StartAnimation

func (t BashToolMessageItem) StartAnimation() tea.Cmd

StartAnimation starts the assistant message animation if it should be spinning.

func (BashToolMessageItem) Status

func (t BashToolMessageItem) Status() ToolStatus

Status returns the current tool status.

func (BashToolMessageItem) ToggleExpanded

func (t BashToolMessageItem) ToggleExpanded() bool

ToggleExpanded toggles the expanded state of the thinking box.

func (BashToolMessageItem) ToolCall

func (t BashToolMessageItem) ToolCall() message.ToolCall

ToolCall returns the tool call associated with this message item.

type BashToolRenderContext

type BashToolRenderContext struct{}

BashToolRenderContext renders bash tool messages.

func (*BashToolRenderContext) RenderTool

func (b *BashToolRenderContext) RenderTool(sty *styles.Styles, width int, opts *ToolRenderOpts) string

RenderTool implements the ToolRenderer interface.

type BrowserToolMessageItem

type BrowserToolMessageItem struct {
	// contains filtered or unexported fields
}

BrowserToolMessageItem represents any browser_* tool call.

func (BrowserToolMessageItem) Animate

func (t BrowserToolMessageItem) Animate(msg anim.StepMsg) tea.Cmd

Animate progresses the assistant message animation if it should be spinning.

Bumps the F6 list-cache version so the next draw re-renders this item: a spinner tick mutates anim's internal frame counter, which changes the rendered output but is invisible to the per-item caches. Without the bump the list cache would serve the previously rendered frame indefinitely and the spinner would appear frozen. The ID gate keeps unrelated ticks (routed here by a future change to chat.Animate's dispatch) from churning the cache.

func (BrowserToolMessageItem) Finished

func (t BrowserToolMessageItem) Finished() bool

Finished implements list.Item. A tool call is freezable once the tool call itself is marked finished AND a result has been recorded (or it has been canceled). Tools that override the spinning logic via spinningFunc would short-circuit live ticks; we still gate freezing on isSpinning to keep the contract conservative.

func (BrowserToolMessageItem) HandleKeyEvent

func (t BrowserToolMessageItem) HandleKeyEvent(key tea.KeyMsg) (bool, tea.Cmd)

HandleKeyEvent implements KeyEventHandler.

func (BrowserToolMessageItem) HandleMouseClick

func (t BrowserToolMessageItem) HandleMouseClick(btn ansi.MouseButton, x, y int) bool

HandleMouseClick implements MouseClickable.

func (BrowserToolMessageItem) ID

func (t BrowserToolMessageItem) ID() string

ID returns the unique identifier for this tool message item.

func (BrowserToolMessageItem) MessageID

func (t BrowserToolMessageItem) MessageID() string

MessageID returns the ID of the message containing this tool call.

func (BrowserToolMessageItem) RawRender

func (t BrowserToolMessageItem) RawRender(width int) string

RawRender implements MessageItem.

func (BrowserToolMessageItem) Render

func (t BrowserToolMessageItem) Render(width int) string

Render renders the tool message item at the given width.

func (BrowserToolMessageItem) RenderPreview

func (t BrowserToolMessageItem) RenderPreview(width int) string

RenderPreview renders the tool non-compact without cache or prefix. Bypasses isCompact so the caller gets the full content view regardless of the tool's stored compact state. The caller is responsible for passing the correct available width — no additional capping is applied here.

func (BrowserToolMessageItem) SetCompact

func (t BrowserToolMessageItem) SetCompact(compact bool)

SetCompact implements the Compactable interface.

func (BrowserToolMessageItem) SetMessageID

func (t BrowserToolMessageItem) SetMessageID(id string)

SetMessageID sets the ID of the message containing this tool call. MessageID is metadata only and does not affect the rendered output, so we deliberately do not bump the version here.

func (BrowserToolMessageItem) SetResult

func (t BrowserToolMessageItem) SetResult(res *message.ToolResult)

SetResult sets the tool result associated with this message item.

func (BrowserToolMessageItem) SetSpinningFunc

func (t BrowserToolMessageItem) SetSpinningFunc(fn SpinningFunc)

SetSpinningFunc sets a custom function to determine if the tool should spin.

func (BrowserToolMessageItem) SetStatus

func (t BrowserToolMessageItem) SetStatus(status ToolStatus)

SetStatus sets the tool status.

func (BrowserToolMessageItem) SetToolCall

func (t BrowserToolMessageItem) SetToolCall(tc message.ToolCall)

SetToolCall sets the tool call associated with this message item.

func (BrowserToolMessageItem) StartAnimation

func (t BrowserToolMessageItem) StartAnimation() tea.Cmd

StartAnimation starts the assistant message animation if it should be spinning.

func (BrowserToolMessageItem) Status

func (t BrowserToolMessageItem) Status() ToolStatus

Status returns the current tool status.

func (BrowserToolMessageItem) ToggleExpanded

func (t BrowserToolMessageItem) ToggleExpanded() bool

ToggleExpanded toggles the expanded state of the thinking box.

func (BrowserToolMessageItem) ToolCall

func (t BrowserToolMessageItem) ToolCall() message.ToolCall

ToolCall returns the tool call associated with this message item.

type BrowserToolRenderContext

type BrowserToolRenderContext struct{}

BrowserToolRenderContext renders browser_* tool messages.

func (*BrowserToolRenderContext) RenderTool

func (b *BrowserToolRenderContext) RenderTool(sty *styles.Styles, width int, opts *ToolRenderOpts) string

RenderTool implements the ToolRenderer interface.

type CloseAgentToolMessageItem

type CloseAgentToolMessageItem struct {
	// contains filtered or unexported fields
}

CloseAgentToolMessageItem represents a close_agent tool call.

func (CloseAgentToolMessageItem) Animate

func (t CloseAgentToolMessageItem) Animate(msg anim.StepMsg) tea.Cmd

Animate progresses the assistant message animation if it should be spinning.

Bumps the F6 list-cache version so the next draw re-renders this item: a spinner tick mutates anim's internal frame counter, which changes the rendered output but is invisible to the per-item caches. Without the bump the list cache would serve the previously rendered frame indefinitely and the spinner would appear frozen. The ID gate keeps unrelated ticks (routed here by a future change to chat.Animate's dispatch) from churning the cache.

func (CloseAgentToolMessageItem) Finished

func (t CloseAgentToolMessageItem) Finished() bool

Finished implements list.Item. A tool call is freezable once the tool call itself is marked finished AND a result has been recorded (or it has been canceled). Tools that override the spinning logic via spinningFunc would short-circuit live ticks; we still gate freezing on isSpinning to keep the contract conservative.

func (CloseAgentToolMessageItem) HandleKeyEvent

func (t CloseAgentToolMessageItem) HandleKeyEvent(key tea.KeyMsg) (bool, tea.Cmd)

HandleKeyEvent implements KeyEventHandler.

func (CloseAgentToolMessageItem) HandleMouseClick

func (t CloseAgentToolMessageItem) HandleMouseClick(btn ansi.MouseButton, x, y int) bool

HandleMouseClick implements MouseClickable.

func (CloseAgentToolMessageItem) ID

func (t CloseAgentToolMessageItem) ID() string

ID returns the unique identifier for this tool message item.

func (CloseAgentToolMessageItem) MessageID

func (t CloseAgentToolMessageItem) MessageID() string

MessageID returns the ID of the message containing this tool call.

func (CloseAgentToolMessageItem) RawRender

func (t CloseAgentToolMessageItem) RawRender(width int) string

RawRender implements MessageItem.

func (CloseAgentToolMessageItem) Render

func (t CloseAgentToolMessageItem) Render(width int) string

Render renders the tool message item at the given width.

func (CloseAgentToolMessageItem) RenderPreview

func (t CloseAgentToolMessageItem) RenderPreview(width int) string

RenderPreview renders the tool non-compact without cache or prefix. Bypasses isCompact so the caller gets the full content view regardless of the tool's stored compact state. The caller is responsible for passing the correct available width — no additional capping is applied here.

func (CloseAgentToolMessageItem) SetCompact

func (t CloseAgentToolMessageItem) SetCompact(compact bool)

SetCompact implements the Compactable interface.

func (CloseAgentToolMessageItem) SetMessageID

func (t CloseAgentToolMessageItem) SetMessageID(id string)

SetMessageID sets the ID of the message containing this tool call. MessageID is metadata only and does not affect the rendered output, so we deliberately do not bump the version here.

func (CloseAgentToolMessageItem) SetResult

func (t CloseAgentToolMessageItem) SetResult(res *message.ToolResult)

SetResult sets the tool result associated with this message item.

func (CloseAgentToolMessageItem) SetSpinningFunc

func (t CloseAgentToolMessageItem) SetSpinningFunc(fn SpinningFunc)

SetSpinningFunc sets a custom function to determine if the tool should spin.

func (CloseAgentToolMessageItem) SetStatus

func (t CloseAgentToolMessageItem) SetStatus(status ToolStatus)

SetStatus sets the tool status.

func (CloseAgentToolMessageItem) SetToolCall

func (t CloseAgentToolMessageItem) SetToolCall(tc message.ToolCall)

SetToolCall sets the tool call associated with this message item.

func (CloseAgentToolMessageItem) StartAnimation

func (t CloseAgentToolMessageItem) StartAnimation() tea.Cmd

StartAnimation starts the assistant message animation if it should be spinning.

func (CloseAgentToolMessageItem) Status

func (t CloseAgentToolMessageItem) Status() ToolStatus

Status returns the current tool status.

func (CloseAgentToolMessageItem) ToggleExpanded

func (t CloseAgentToolMessageItem) ToggleExpanded() bool

ToggleExpanded toggles the expanded state of the thinking box.

func (CloseAgentToolMessageItem) ToolCall

func (t CloseAgentToolMessageItem) ToolCall() message.ToolCall

ToolCall returns the tool call associated with this message item.

type CloseAgentToolRenderContext

type CloseAgentToolRenderContext struct{}

CloseAgentToolRenderContext renders close_agent tool messages.

func (*CloseAgentToolRenderContext) RenderTool

func (c *CloseAgentToolRenderContext) RenderTool(sty *styles.Styles, width int, opts *ToolRenderOpts) string

RenderTool implements the ToolRenderer interface.

type Compactable

type Compactable interface {
	SetCompact(compact bool)
}

Compactable is an interface for tool items that can render in a compacted mode. When compact mode is enabled, tools render as a compact single-line header.

type CreateDirectoryToolMessageItem

type CreateDirectoryToolMessageItem struct {
	// contains filtered or unexported fields
}

CreateDirectoryToolMessageItem is a message item that represents a create_directory tool call.

func (CreateDirectoryToolMessageItem) Animate

func (t CreateDirectoryToolMessageItem) Animate(msg anim.StepMsg) tea.Cmd

Animate progresses the assistant message animation if it should be spinning.

Bumps the F6 list-cache version so the next draw re-renders this item: a spinner tick mutates anim's internal frame counter, which changes the rendered output but is invisible to the per-item caches. Without the bump the list cache would serve the previously rendered frame indefinitely and the spinner would appear frozen. The ID gate keeps unrelated ticks (routed here by a future change to chat.Animate's dispatch) from churning the cache.

func (CreateDirectoryToolMessageItem) Finished

func (t CreateDirectoryToolMessageItem) Finished() bool

Finished implements list.Item. A tool call is freezable once the tool call itself is marked finished AND a result has been recorded (or it has been canceled). Tools that override the spinning logic via spinningFunc would short-circuit live ticks; we still gate freezing on isSpinning to keep the contract conservative.

func (CreateDirectoryToolMessageItem) HandleKeyEvent

func (t CreateDirectoryToolMessageItem) HandleKeyEvent(key tea.KeyMsg) (bool, tea.Cmd)

HandleKeyEvent implements KeyEventHandler.

func (CreateDirectoryToolMessageItem) HandleMouseClick

func (t CreateDirectoryToolMessageItem) HandleMouseClick(btn ansi.MouseButton, x, y int) bool

HandleMouseClick implements MouseClickable.

func (CreateDirectoryToolMessageItem) ID

func (t CreateDirectoryToolMessageItem) ID() string

ID returns the unique identifier for this tool message item.

func (CreateDirectoryToolMessageItem) MessageID

func (t CreateDirectoryToolMessageItem) MessageID() string

MessageID returns the ID of the message containing this tool call.

func (CreateDirectoryToolMessageItem) RawRender

func (t CreateDirectoryToolMessageItem) RawRender(width int) string

RawRender implements MessageItem.

func (CreateDirectoryToolMessageItem) Render

func (t CreateDirectoryToolMessageItem) Render(width int) string

Render renders the tool message item at the given width.

func (CreateDirectoryToolMessageItem) RenderPreview

func (t CreateDirectoryToolMessageItem) RenderPreview(width int) string

RenderPreview renders the tool non-compact without cache or prefix. Bypasses isCompact so the caller gets the full content view regardless of the tool's stored compact state. The caller is responsible for passing the correct available width — no additional capping is applied here.

func (CreateDirectoryToolMessageItem) SetCompact

func (t CreateDirectoryToolMessageItem) SetCompact(compact bool)

SetCompact implements the Compactable interface.

func (CreateDirectoryToolMessageItem) SetMessageID

func (t CreateDirectoryToolMessageItem) SetMessageID(id string)

SetMessageID sets the ID of the message containing this tool call. MessageID is metadata only and does not affect the rendered output, so we deliberately do not bump the version here.

func (CreateDirectoryToolMessageItem) SetResult

func (t CreateDirectoryToolMessageItem) SetResult(res *message.ToolResult)

SetResult sets the tool result associated with this message item.

func (CreateDirectoryToolMessageItem) SetSpinningFunc

func (t CreateDirectoryToolMessageItem) SetSpinningFunc(fn SpinningFunc)

SetSpinningFunc sets a custom function to determine if the tool should spin.

func (CreateDirectoryToolMessageItem) SetStatus

func (t CreateDirectoryToolMessageItem) SetStatus(status ToolStatus)

SetStatus sets the tool status.

func (CreateDirectoryToolMessageItem) SetToolCall

func (t CreateDirectoryToolMessageItem) SetToolCall(tc message.ToolCall)

SetToolCall sets the tool call associated with this message item.

func (CreateDirectoryToolMessageItem) StartAnimation

func (t CreateDirectoryToolMessageItem) StartAnimation() tea.Cmd

StartAnimation starts the assistant message animation if it should be spinning.

func (CreateDirectoryToolMessageItem) Status

func (t CreateDirectoryToolMessageItem) Status() ToolStatus

Status returns the current tool status.

func (CreateDirectoryToolMessageItem) ToggleExpanded

func (t CreateDirectoryToolMessageItem) ToggleExpanded() bool

ToggleExpanded toggles the expanded state of the thinking box.

func (CreateDirectoryToolMessageItem) ToolCall

func (t CreateDirectoryToolMessageItem) ToolCall() message.ToolCall

ToolCall returns the tool call associated with this message item.

type CreateDirectoryToolRenderContext

type CreateDirectoryToolRenderContext struct{}

CreateDirectoryToolRenderContext renders create_directory tool messages.

func (*CreateDirectoryToolRenderContext) RenderTool

func (c *CreateDirectoryToolRenderContext) RenderTool(sty *styles.Styles, width int, opts *ToolRenderOpts) string

RenderTool implements the ToolRenderer interface.

type CreateGoalRenderContext

type CreateGoalRenderContext struct{}

func (*CreateGoalRenderContext) RenderTool

func (c *CreateGoalRenderContext) RenderTool(sty *styles.Styles, width int, opts *ToolRenderOpts) string

type CreateGoalToolMessageItem

type CreateGoalToolMessageItem struct {
	// contains filtered or unexported fields
}

func (CreateGoalToolMessageItem) Animate

func (t CreateGoalToolMessageItem) Animate(msg anim.StepMsg) tea.Cmd

Animate progresses the assistant message animation if it should be spinning.

Bumps the F6 list-cache version so the next draw re-renders this item: a spinner tick mutates anim's internal frame counter, which changes the rendered output but is invisible to the per-item caches. Without the bump the list cache would serve the previously rendered frame indefinitely and the spinner would appear frozen. The ID gate keeps unrelated ticks (routed here by a future change to chat.Animate's dispatch) from churning the cache.

func (CreateGoalToolMessageItem) Finished

func (t CreateGoalToolMessageItem) Finished() bool

Finished implements list.Item. A tool call is freezable once the tool call itself is marked finished AND a result has been recorded (or it has been canceled). Tools that override the spinning logic via spinningFunc would short-circuit live ticks; we still gate freezing on isSpinning to keep the contract conservative.

func (CreateGoalToolMessageItem) HandleKeyEvent

func (t CreateGoalToolMessageItem) HandleKeyEvent(key tea.KeyMsg) (bool, tea.Cmd)

HandleKeyEvent implements KeyEventHandler.

func (CreateGoalToolMessageItem) HandleMouseClick

func (t CreateGoalToolMessageItem) HandleMouseClick(btn ansi.MouseButton, x, y int) bool

HandleMouseClick implements MouseClickable.

func (CreateGoalToolMessageItem) ID

func (t CreateGoalToolMessageItem) ID() string

ID returns the unique identifier for this tool message item.

func (CreateGoalToolMessageItem) MessageID

func (t CreateGoalToolMessageItem) MessageID() string

MessageID returns the ID of the message containing this tool call.

func (CreateGoalToolMessageItem) RawRender

func (t CreateGoalToolMessageItem) RawRender(width int) string

RawRender implements MessageItem.

func (CreateGoalToolMessageItem) Render

func (t CreateGoalToolMessageItem) Render(width int) string

Render renders the tool message item at the given width.

func (CreateGoalToolMessageItem) RenderPreview

func (t CreateGoalToolMessageItem) RenderPreview(width int) string

RenderPreview renders the tool non-compact without cache or prefix. Bypasses isCompact so the caller gets the full content view regardless of the tool's stored compact state. The caller is responsible for passing the correct available width — no additional capping is applied here.

func (CreateGoalToolMessageItem) SetCompact

func (t CreateGoalToolMessageItem) SetCompact(compact bool)

SetCompact implements the Compactable interface.

func (CreateGoalToolMessageItem) SetMessageID

func (t CreateGoalToolMessageItem) SetMessageID(id string)

SetMessageID sets the ID of the message containing this tool call. MessageID is metadata only and does not affect the rendered output, so we deliberately do not bump the version here.

func (CreateGoalToolMessageItem) SetResult

func (t CreateGoalToolMessageItem) SetResult(res *message.ToolResult)

SetResult sets the tool result associated with this message item.

func (CreateGoalToolMessageItem) SetSpinningFunc

func (t CreateGoalToolMessageItem) SetSpinningFunc(fn SpinningFunc)

SetSpinningFunc sets a custom function to determine if the tool should spin.

func (CreateGoalToolMessageItem) SetStatus

func (t CreateGoalToolMessageItem) SetStatus(status ToolStatus)

SetStatus sets the tool status.

func (CreateGoalToolMessageItem) SetToolCall

func (t CreateGoalToolMessageItem) SetToolCall(tc message.ToolCall)

SetToolCall sets the tool call associated with this message item.

func (CreateGoalToolMessageItem) StartAnimation

func (t CreateGoalToolMessageItem) StartAnimation() tea.Cmd

StartAnimation starts the assistant message animation if it should be spinning.

func (CreateGoalToolMessageItem) Status

func (t CreateGoalToolMessageItem) Status() ToolStatus

Status returns the current tool status.

func (CreateGoalToolMessageItem) ToggleExpanded

func (t CreateGoalToolMessageItem) ToggleExpanded() bool

ToggleExpanded toggles the expanded state of the thinking box.

func (CreateGoalToolMessageItem) ToolCall

func (t CreateGoalToolMessageItem) ToolCall() message.ToolCall

ToolCall returns the tool call associated with this message item.

type DefaultToolRenderContext

type DefaultToolRenderContext struct{}

DefaultToolRenderContext implements the default ToolRenderer interface.

func (*DefaultToolRenderContext) RenderTool

func (d *DefaultToolRenderContext) RenderTool(sty *styles.Styles, width int, opts *ToolRenderOpts) string

RenderTool implements the ToolRenderer interface.

type DiagnosticsToolMessageItem

type DiagnosticsToolMessageItem struct {
	// contains filtered or unexported fields
}

DiagnosticsToolMessageItem is a message item that represents a diagnostics tool call.

func (DiagnosticsToolMessageItem) Animate

func (t DiagnosticsToolMessageItem) Animate(msg anim.StepMsg) tea.Cmd

Animate progresses the assistant message animation if it should be spinning.

Bumps the F6 list-cache version so the next draw re-renders this item: a spinner tick mutates anim's internal frame counter, which changes the rendered output but is invisible to the per-item caches. Without the bump the list cache would serve the previously rendered frame indefinitely and the spinner would appear frozen. The ID gate keeps unrelated ticks (routed here by a future change to chat.Animate's dispatch) from churning the cache.

func (DiagnosticsToolMessageItem) Finished

func (t DiagnosticsToolMessageItem) Finished() bool

Finished implements list.Item. A tool call is freezable once the tool call itself is marked finished AND a result has been recorded (or it has been canceled). Tools that override the spinning logic via spinningFunc would short-circuit live ticks; we still gate freezing on isSpinning to keep the contract conservative.

func (DiagnosticsToolMessageItem) HandleKeyEvent

func (t DiagnosticsToolMessageItem) HandleKeyEvent(key tea.KeyMsg) (bool, tea.Cmd)

HandleKeyEvent implements KeyEventHandler.

func (DiagnosticsToolMessageItem) HandleMouseClick

func (t DiagnosticsToolMessageItem) HandleMouseClick(btn ansi.MouseButton, x, y int) bool

HandleMouseClick implements MouseClickable.

func (DiagnosticsToolMessageItem) ID

func (t DiagnosticsToolMessageItem) ID() string

ID returns the unique identifier for this tool message item.

func (DiagnosticsToolMessageItem) MessageID

func (t DiagnosticsToolMessageItem) MessageID() string

MessageID returns the ID of the message containing this tool call.

func (DiagnosticsToolMessageItem) RawRender

func (t DiagnosticsToolMessageItem) RawRender(width int) string

RawRender implements MessageItem.

func (DiagnosticsToolMessageItem) Render

func (t DiagnosticsToolMessageItem) Render(width int) string

Render renders the tool message item at the given width.

func (DiagnosticsToolMessageItem) RenderPreview

func (t DiagnosticsToolMessageItem) RenderPreview(width int) string

RenderPreview renders the tool non-compact without cache or prefix. Bypasses isCompact so the caller gets the full content view regardless of the tool's stored compact state. The caller is responsible for passing the correct available width — no additional capping is applied here.

func (DiagnosticsToolMessageItem) SetCompact

func (t DiagnosticsToolMessageItem) SetCompact(compact bool)

SetCompact implements the Compactable interface.

func (DiagnosticsToolMessageItem) SetMessageID

func (t DiagnosticsToolMessageItem) SetMessageID(id string)

SetMessageID sets the ID of the message containing this tool call. MessageID is metadata only and does not affect the rendered output, so we deliberately do not bump the version here.

func (DiagnosticsToolMessageItem) SetResult

func (t DiagnosticsToolMessageItem) SetResult(res *message.ToolResult)

SetResult sets the tool result associated with this message item.

func (DiagnosticsToolMessageItem) SetSpinningFunc

func (t DiagnosticsToolMessageItem) SetSpinningFunc(fn SpinningFunc)

SetSpinningFunc sets a custom function to determine if the tool should spin.

func (DiagnosticsToolMessageItem) SetStatus

func (t DiagnosticsToolMessageItem) SetStatus(status ToolStatus)

SetStatus sets the tool status.

func (DiagnosticsToolMessageItem) SetToolCall

func (t DiagnosticsToolMessageItem) SetToolCall(tc message.ToolCall)

SetToolCall sets the tool call associated with this message item.

func (DiagnosticsToolMessageItem) StartAnimation

func (t DiagnosticsToolMessageItem) StartAnimation() tea.Cmd

StartAnimation starts the assistant message animation if it should be spinning.

func (DiagnosticsToolMessageItem) Status

func (t DiagnosticsToolMessageItem) Status() ToolStatus

Status returns the current tool status.

func (DiagnosticsToolMessageItem) ToggleExpanded

func (t DiagnosticsToolMessageItem) ToggleExpanded() bool

ToggleExpanded toggles the expanded state of the thinking box.

func (DiagnosticsToolMessageItem) ToolCall

func (t DiagnosticsToolMessageItem) ToolCall() message.ToolCall

ToolCall returns the tool call associated with this message item.

type DiagnosticsToolRenderContext

type DiagnosticsToolRenderContext struct{}

DiagnosticsToolRenderContext renders diagnostics tool messages.

func (*DiagnosticsToolRenderContext) RenderTool

func (d *DiagnosticsToolRenderContext) RenderTool(sty *styles.Styles, width int, opts *ToolRenderOpts) string

RenderTool implements the ToolRenderer interface.

type DockerMCPToolMessageItem

type DockerMCPToolMessageItem struct {
	// contains filtered or unexported fields
}

DockerMCPToolMessageItem is a message item that represents a Docker MCP tool call.

func (DockerMCPToolMessageItem) Animate

func (t DockerMCPToolMessageItem) Animate(msg anim.StepMsg) tea.Cmd

Animate progresses the assistant message animation if it should be spinning.

Bumps the F6 list-cache version so the next draw re-renders this item: a spinner tick mutates anim's internal frame counter, which changes the rendered output but is invisible to the per-item caches. Without the bump the list cache would serve the previously rendered frame indefinitely and the spinner would appear frozen. The ID gate keeps unrelated ticks (routed here by a future change to chat.Animate's dispatch) from churning the cache.

func (DockerMCPToolMessageItem) Finished

func (t DockerMCPToolMessageItem) Finished() bool

Finished implements list.Item. A tool call is freezable once the tool call itself is marked finished AND a result has been recorded (or it has been canceled). Tools that override the spinning logic via spinningFunc would short-circuit live ticks; we still gate freezing on isSpinning to keep the contract conservative.

func (DockerMCPToolMessageItem) HandleKeyEvent

func (t DockerMCPToolMessageItem) HandleKeyEvent(key tea.KeyMsg) (bool, tea.Cmd)

HandleKeyEvent implements KeyEventHandler.

func (DockerMCPToolMessageItem) HandleMouseClick

func (t DockerMCPToolMessageItem) HandleMouseClick(btn ansi.MouseButton, x, y int) bool

HandleMouseClick implements MouseClickable.

func (DockerMCPToolMessageItem) ID

func (t DockerMCPToolMessageItem) ID() string

ID returns the unique identifier for this tool message item.

func (DockerMCPToolMessageItem) MessageID

func (t DockerMCPToolMessageItem) MessageID() string

MessageID returns the ID of the message containing this tool call.

func (DockerMCPToolMessageItem) RawRender

func (t DockerMCPToolMessageItem) RawRender(width int) string

RawRender implements MessageItem.

func (DockerMCPToolMessageItem) Render

func (t DockerMCPToolMessageItem) Render(width int) string

Render renders the tool message item at the given width.

func (DockerMCPToolMessageItem) RenderPreview

func (t DockerMCPToolMessageItem) RenderPreview(width int) string

RenderPreview renders the tool non-compact without cache or prefix. Bypasses isCompact so the caller gets the full content view regardless of the tool's stored compact state. The caller is responsible for passing the correct available width — no additional capping is applied here.

func (DockerMCPToolMessageItem) SetCompact

func (t DockerMCPToolMessageItem) SetCompact(compact bool)

SetCompact implements the Compactable interface.

func (DockerMCPToolMessageItem) SetMessageID

func (t DockerMCPToolMessageItem) SetMessageID(id string)

SetMessageID sets the ID of the message containing this tool call. MessageID is metadata only and does not affect the rendered output, so we deliberately do not bump the version here.

func (DockerMCPToolMessageItem) SetResult

func (t DockerMCPToolMessageItem) SetResult(res *message.ToolResult)

SetResult sets the tool result associated with this message item.

func (DockerMCPToolMessageItem) SetSpinningFunc

func (t DockerMCPToolMessageItem) SetSpinningFunc(fn SpinningFunc)

SetSpinningFunc sets a custom function to determine if the tool should spin.

func (DockerMCPToolMessageItem) SetStatus

func (t DockerMCPToolMessageItem) SetStatus(status ToolStatus)

SetStatus sets the tool status.

func (DockerMCPToolMessageItem) SetToolCall

func (t DockerMCPToolMessageItem) SetToolCall(tc message.ToolCall)

SetToolCall sets the tool call associated with this message item.

func (DockerMCPToolMessageItem) StartAnimation

func (t DockerMCPToolMessageItem) StartAnimation() tea.Cmd

StartAnimation starts the assistant message animation if it should be spinning.

func (DockerMCPToolMessageItem) Status

func (t DockerMCPToolMessageItem) Status() ToolStatus

Status returns the current tool status.

func (DockerMCPToolMessageItem) ToggleExpanded

func (t DockerMCPToolMessageItem) ToggleExpanded() bool

ToggleExpanded toggles the expanded state of the thinking box.

func (DockerMCPToolMessageItem) ToolCall

func (t DockerMCPToolMessageItem) ToolCall() message.ToolCall

ToolCall returns the tool call associated with this message item.

type DockerMCPToolRenderContext

type DockerMCPToolRenderContext struct{}

DockerMCPToolRenderContext renders Docker MCP tool messages.

func (*DockerMCPToolRenderContext) RenderTool

func (d *DockerMCPToolRenderContext) RenderTool(sty *styles.Styles, width int, opts *ToolRenderOpts) string

RenderTool implements the ToolRenderer interface.

type DocxRenderContext

type DocxRenderContext struct{}

func (*DocxRenderContext) RenderTool

func (d *DocxRenderContext) RenderTool(sty *styles.Styles, width int, opts *ToolRenderOpts) string

type DocxToolMessageItem

type DocxToolMessageItem struct {
	// contains filtered or unexported fields
}

DocxToolMessageItem represents a docx tool call.

func (DocxToolMessageItem) Animate

func (t DocxToolMessageItem) Animate(msg anim.StepMsg) tea.Cmd

Animate progresses the assistant message animation if it should be spinning.

Bumps the F6 list-cache version so the next draw re-renders this item: a spinner tick mutates anim's internal frame counter, which changes the rendered output but is invisible to the per-item caches. Without the bump the list cache would serve the previously rendered frame indefinitely and the spinner would appear frozen. The ID gate keeps unrelated ticks (routed here by a future change to chat.Animate's dispatch) from churning the cache.

func (DocxToolMessageItem) Finished

func (t DocxToolMessageItem) Finished() bool

Finished implements list.Item. A tool call is freezable once the tool call itself is marked finished AND a result has been recorded (or it has been canceled). Tools that override the spinning logic via spinningFunc would short-circuit live ticks; we still gate freezing on isSpinning to keep the contract conservative.

func (DocxToolMessageItem) HandleKeyEvent

func (t DocxToolMessageItem) HandleKeyEvent(key tea.KeyMsg) (bool, tea.Cmd)

HandleKeyEvent implements KeyEventHandler.

func (DocxToolMessageItem) HandleMouseClick

func (t DocxToolMessageItem) HandleMouseClick(btn ansi.MouseButton, x, y int) bool

HandleMouseClick implements MouseClickable.

func (DocxToolMessageItem) ID

func (t DocxToolMessageItem) ID() string

ID returns the unique identifier for this tool message item.

func (DocxToolMessageItem) MessageID

func (t DocxToolMessageItem) MessageID() string

MessageID returns the ID of the message containing this tool call.

func (DocxToolMessageItem) RawRender

func (t DocxToolMessageItem) RawRender(width int) string

RawRender implements MessageItem.

func (DocxToolMessageItem) Render

func (t DocxToolMessageItem) Render(width int) string

Render renders the tool message item at the given width.

func (DocxToolMessageItem) RenderPreview

func (t DocxToolMessageItem) RenderPreview(width int) string

RenderPreview renders the tool non-compact without cache or prefix. Bypasses isCompact so the caller gets the full content view regardless of the tool's stored compact state. The caller is responsible for passing the correct available width — no additional capping is applied here.

func (DocxToolMessageItem) SetCompact

func (t DocxToolMessageItem) SetCompact(compact bool)

SetCompact implements the Compactable interface.

func (DocxToolMessageItem) SetMessageID

func (t DocxToolMessageItem) SetMessageID(id string)

SetMessageID sets the ID of the message containing this tool call. MessageID is metadata only and does not affect the rendered output, so we deliberately do not bump the version here.

func (DocxToolMessageItem) SetResult

func (t DocxToolMessageItem) SetResult(res *message.ToolResult)

SetResult sets the tool result associated with this message item.

func (DocxToolMessageItem) SetSpinningFunc

func (t DocxToolMessageItem) SetSpinningFunc(fn SpinningFunc)

SetSpinningFunc sets a custom function to determine if the tool should spin.

func (DocxToolMessageItem) SetStatus

func (t DocxToolMessageItem) SetStatus(status ToolStatus)

SetStatus sets the tool status.

func (DocxToolMessageItem) SetToolCall

func (t DocxToolMessageItem) SetToolCall(tc message.ToolCall)

SetToolCall sets the tool call associated with this message item.

func (DocxToolMessageItem) StartAnimation

func (t DocxToolMessageItem) StartAnimation() tea.Cmd

StartAnimation starts the assistant message animation if it should be spinning.

func (DocxToolMessageItem) Status

func (t DocxToolMessageItem) Status() ToolStatus

Status returns the current tool status.

func (DocxToolMessageItem) ToggleExpanded

func (t DocxToolMessageItem) ToggleExpanded() bool

ToggleExpanded toggles the expanded state of the thinking box.

func (DocxToolMessageItem) ToolCall

func (t DocxToolMessageItem) ToolCall() message.ToolCall

ToolCall returns the tool call associated with this message item.

type DownloadToolMessageItem

type DownloadToolMessageItem struct {
	// contains filtered or unexported fields
}

DownloadToolMessageItem is a message item that represents a download tool call.

func (DownloadToolMessageItem) Animate

func (t DownloadToolMessageItem) Animate(msg anim.StepMsg) tea.Cmd

Animate progresses the assistant message animation if it should be spinning.

Bumps the F6 list-cache version so the next draw re-renders this item: a spinner tick mutates anim's internal frame counter, which changes the rendered output but is invisible to the per-item caches. Without the bump the list cache would serve the previously rendered frame indefinitely and the spinner would appear frozen. The ID gate keeps unrelated ticks (routed here by a future change to chat.Animate's dispatch) from churning the cache.

func (DownloadToolMessageItem) Finished

func (t DownloadToolMessageItem) Finished() bool

Finished implements list.Item. A tool call is freezable once the tool call itself is marked finished AND a result has been recorded (or it has been canceled). Tools that override the spinning logic via spinningFunc would short-circuit live ticks; we still gate freezing on isSpinning to keep the contract conservative.

func (DownloadToolMessageItem) HandleKeyEvent

func (t DownloadToolMessageItem) HandleKeyEvent(key tea.KeyMsg) (bool, tea.Cmd)

HandleKeyEvent implements KeyEventHandler.

func (DownloadToolMessageItem) HandleMouseClick

func (t DownloadToolMessageItem) HandleMouseClick(btn ansi.MouseButton, x, y int) bool

HandleMouseClick implements MouseClickable.

func (DownloadToolMessageItem) ID

func (t DownloadToolMessageItem) ID() string

ID returns the unique identifier for this tool message item.

func (DownloadToolMessageItem) MessageID

func (t DownloadToolMessageItem) MessageID() string

MessageID returns the ID of the message containing this tool call.

func (DownloadToolMessageItem) RawRender

func (t DownloadToolMessageItem) RawRender(width int) string

RawRender implements MessageItem.

func (DownloadToolMessageItem) Render

func (t DownloadToolMessageItem) Render(width int) string

Render renders the tool message item at the given width.

func (DownloadToolMessageItem) RenderPreview

func (t DownloadToolMessageItem) RenderPreview(width int) string

RenderPreview renders the tool non-compact without cache or prefix. Bypasses isCompact so the caller gets the full content view regardless of the tool's stored compact state. The caller is responsible for passing the correct available width — no additional capping is applied here.

func (DownloadToolMessageItem) SetCompact

func (t DownloadToolMessageItem) SetCompact(compact bool)

SetCompact implements the Compactable interface.

func (DownloadToolMessageItem) SetMessageID

func (t DownloadToolMessageItem) SetMessageID(id string)

SetMessageID sets the ID of the message containing this tool call. MessageID is metadata only and does not affect the rendered output, so we deliberately do not bump the version here.

func (DownloadToolMessageItem) SetResult

func (t DownloadToolMessageItem) SetResult(res *message.ToolResult)

SetResult sets the tool result associated with this message item.

func (DownloadToolMessageItem) SetSpinningFunc

func (t DownloadToolMessageItem) SetSpinningFunc(fn SpinningFunc)

SetSpinningFunc sets a custom function to determine if the tool should spin.

func (DownloadToolMessageItem) SetStatus

func (t DownloadToolMessageItem) SetStatus(status ToolStatus)

SetStatus sets the tool status.

func (DownloadToolMessageItem) SetToolCall

func (t DownloadToolMessageItem) SetToolCall(tc message.ToolCall)

SetToolCall sets the tool call associated with this message item.

func (DownloadToolMessageItem) StartAnimation

func (t DownloadToolMessageItem) StartAnimation() tea.Cmd

StartAnimation starts the assistant message animation if it should be spinning.

func (DownloadToolMessageItem) Status

func (t DownloadToolMessageItem) Status() ToolStatus

Status returns the current tool status.

func (DownloadToolMessageItem) ToggleExpanded

func (t DownloadToolMessageItem) ToggleExpanded() bool

ToggleExpanded toggles the expanded state of the thinking box.

func (DownloadToolMessageItem) ToolCall

func (t DownloadToolMessageItem) ToolCall() message.ToolCall

ToolCall returns the tool call associated with this message item.

type DownloadToolRenderContext

type DownloadToolRenderContext struct{}

DownloadToolRenderContext renders download tool messages.

func (*DownloadToolRenderContext) RenderTool

func (d *DownloadToolRenderContext) RenderTool(sty *styles.Styles, width int, opts *ToolRenderOpts) string

RenderTool implements the ToolRenderer interface.

type EditToolMessageItem

type EditToolMessageItem struct {
	// contains filtered or unexported fields
}

EditToolMessageItem is a message item that represents an edit tool call.

func (EditToolMessageItem) Animate

func (t EditToolMessageItem) Animate(msg anim.StepMsg) tea.Cmd

Animate progresses the assistant message animation if it should be spinning.

Bumps the F6 list-cache version so the next draw re-renders this item: a spinner tick mutates anim's internal frame counter, which changes the rendered output but is invisible to the per-item caches. Without the bump the list cache would serve the previously rendered frame indefinitely and the spinner would appear frozen. The ID gate keeps unrelated ticks (routed here by a future change to chat.Animate's dispatch) from churning the cache.

func (EditToolMessageItem) Finished

func (t EditToolMessageItem) Finished() bool

Finished implements list.Item. A tool call is freezable once the tool call itself is marked finished AND a result has been recorded (or it has been canceled). Tools that override the spinning logic via spinningFunc would short-circuit live ticks; we still gate freezing on isSpinning to keep the contract conservative.

func (EditToolMessageItem) HandleKeyEvent

func (t EditToolMessageItem) HandleKeyEvent(key tea.KeyMsg) (bool, tea.Cmd)

HandleKeyEvent implements KeyEventHandler.

func (EditToolMessageItem) HandleMouseClick

func (t EditToolMessageItem) HandleMouseClick(btn ansi.MouseButton, x, y int) bool

HandleMouseClick implements MouseClickable.

func (EditToolMessageItem) ID

func (t EditToolMessageItem) ID() string

ID returns the unique identifier for this tool message item.

func (EditToolMessageItem) MessageID

func (t EditToolMessageItem) MessageID() string

MessageID returns the ID of the message containing this tool call.

func (EditToolMessageItem) RawRender

func (t EditToolMessageItem) RawRender(width int) string

RawRender implements MessageItem.

func (EditToolMessageItem) Render

func (t EditToolMessageItem) Render(width int) string

Render renders the tool message item at the given width.

func (EditToolMessageItem) RenderPreview

func (t EditToolMessageItem) RenderPreview(width int) string

RenderPreview renders the tool non-compact without cache or prefix. Bypasses isCompact so the caller gets the full content view regardless of the tool's stored compact state. The caller is responsible for passing the correct available width — no additional capping is applied here.

func (EditToolMessageItem) SetCompact

func (t EditToolMessageItem) SetCompact(compact bool)

SetCompact implements the Compactable interface.

func (EditToolMessageItem) SetMessageID

func (t EditToolMessageItem) SetMessageID(id string)

SetMessageID sets the ID of the message containing this tool call. MessageID is metadata only and does not affect the rendered output, so we deliberately do not bump the version here.

func (EditToolMessageItem) SetResult

func (t EditToolMessageItem) SetResult(res *message.ToolResult)

SetResult sets the tool result associated with this message item.

func (EditToolMessageItem) SetSpinningFunc

func (t EditToolMessageItem) SetSpinningFunc(fn SpinningFunc)

SetSpinningFunc sets a custom function to determine if the tool should spin.

func (EditToolMessageItem) SetStatus

func (t EditToolMessageItem) SetStatus(status ToolStatus)

SetStatus sets the tool status.

func (EditToolMessageItem) SetToolCall

func (t EditToolMessageItem) SetToolCall(tc message.ToolCall)

SetToolCall sets the tool call associated with this message item.

func (EditToolMessageItem) StartAnimation

func (t EditToolMessageItem) StartAnimation() tea.Cmd

StartAnimation starts the assistant message animation if it should be spinning.

func (EditToolMessageItem) Status

func (t EditToolMessageItem) Status() ToolStatus

Status returns the current tool status.

func (EditToolMessageItem) ToggleExpanded

func (t EditToolMessageItem) ToggleExpanded() bool

ToggleExpanded toggles the expanded state of the thinking box.

func (EditToolMessageItem) ToolCall

func (t EditToolMessageItem) ToolCall() message.ToolCall

ToolCall returns the tool call associated with this message item.

type EditToolRenderContext

type EditToolRenderContext struct{}

EditToolRenderContext renders edit tool messages.

func (*EditToolRenderContext) RenderTool

func (e *EditToolRenderContext) RenderTool(sty *styles.Styles, width int, opts *ToolRenderOpts) string

RenderTool implements the ToolRenderer interface.

type Expandable

type Expandable interface {
	// ToggleExpanded toggles the expanded state of the item. It returns
	// whether the item is now expanded.
	ToggleExpanded() bool
}

Expandable is an interface for items that can be expanded or collapsed.

type FIMRenderContext

type FIMRenderContext struct{}

func (*FIMRenderContext) RenderTool

func (f *FIMRenderContext) RenderTool(sty *styles.Styles, width int, opts *ToolRenderOpts) string

type FIMToolMessageItem

type FIMToolMessageItem struct {
	// contains filtered or unexported fields
}

FIMToolMessageItem represents a code_complete (FIM) tool call.

func (FIMToolMessageItem) Animate

func (t FIMToolMessageItem) Animate(msg anim.StepMsg) tea.Cmd

Animate progresses the assistant message animation if it should be spinning.

Bumps the F6 list-cache version so the next draw re-renders this item: a spinner tick mutates anim's internal frame counter, which changes the rendered output but is invisible to the per-item caches. Without the bump the list cache would serve the previously rendered frame indefinitely and the spinner would appear frozen. The ID gate keeps unrelated ticks (routed here by a future change to chat.Animate's dispatch) from churning the cache.

func (FIMToolMessageItem) Finished

func (t FIMToolMessageItem) Finished() bool

Finished implements list.Item. A tool call is freezable once the tool call itself is marked finished AND a result has been recorded (or it has been canceled). Tools that override the spinning logic via spinningFunc would short-circuit live ticks; we still gate freezing on isSpinning to keep the contract conservative.

func (FIMToolMessageItem) HandleKeyEvent

func (t FIMToolMessageItem) HandleKeyEvent(key tea.KeyMsg) (bool, tea.Cmd)

HandleKeyEvent implements KeyEventHandler.

func (FIMToolMessageItem) HandleMouseClick

func (t FIMToolMessageItem) HandleMouseClick(btn ansi.MouseButton, x, y int) bool

HandleMouseClick implements MouseClickable.

func (FIMToolMessageItem) ID

func (t FIMToolMessageItem) ID() string

ID returns the unique identifier for this tool message item.

func (FIMToolMessageItem) MessageID

func (t FIMToolMessageItem) MessageID() string

MessageID returns the ID of the message containing this tool call.

func (FIMToolMessageItem) RawRender

func (t FIMToolMessageItem) RawRender(width int) string

RawRender implements MessageItem.

func (FIMToolMessageItem) Render

func (t FIMToolMessageItem) Render(width int) string

Render renders the tool message item at the given width.

func (FIMToolMessageItem) RenderPreview

func (t FIMToolMessageItem) RenderPreview(width int) string

RenderPreview renders the tool non-compact without cache or prefix. Bypasses isCompact so the caller gets the full content view regardless of the tool's stored compact state. The caller is responsible for passing the correct available width — no additional capping is applied here.

func (FIMToolMessageItem) SetCompact

func (t FIMToolMessageItem) SetCompact(compact bool)

SetCompact implements the Compactable interface.

func (FIMToolMessageItem) SetMessageID

func (t FIMToolMessageItem) SetMessageID(id string)

SetMessageID sets the ID of the message containing this tool call. MessageID is metadata only and does not affect the rendered output, so we deliberately do not bump the version here.

func (FIMToolMessageItem) SetResult

func (t FIMToolMessageItem) SetResult(res *message.ToolResult)

SetResult sets the tool result associated with this message item.

func (FIMToolMessageItem) SetSpinningFunc

func (t FIMToolMessageItem) SetSpinningFunc(fn SpinningFunc)

SetSpinningFunc sets a custom function to determine if the tool should spin.

func (FIMToolMessageItem) SetStatus

func (t FIMToolMessageItem) SetStatus(status ToolStatus)

SetStatus sets the tool status.

func (FIMToolMessageItem) SetToolCall

func (t FIMToolMessageItem) SetToolCall(tc message.ToolCall)

SetToolCall sets the tool call associated with this message item.

func (FIMToolMessageItem) StartAnimation

func (t FIMToolMessageItem) StartAnimation() tea.Cmd

StartAnimation starts the assistant message animation if it should be spinning.

func (FIMToolMessageItem) Status

func (t FIMToolMessageItem) Status() ToolStatus

Status returns the current tool status.

func (FIMToolMessageItem) ToggleExpanded

func (t FIMToolMessageItem) ToggleExpanded() bool

ToggleExpanded toggles the expanded state of the thinking box.

func (FIMToolMessageItem) ToolCall

func (t FIMToolMessageItem) ToolCall() message.ToolCall

ToolCall returns the tool call associated with this message item.

type FetchToolMessageItem

type FetchToolMessageItem struct {
	// contains filtered or unexported fields
}

FetchToolMessageItem is a message item that represents a fetch tool call.

func (FetchToolMessageItem) Animate

func (t FetchToolMessageItem) Animate(msg anim.StepMsg) tea.Cmd

Animate progresses the assistant message animation if it should be spinning.

Bumps the F6 list-cache version so the next draw re-renders this item: a spinner tick mutates anim's internal frame counter, which changes the rendered output but is invisible to the per-item caches. Without the bump the list cache would serve the previously rendered frame indefinitely and the spinner would appear frozen. The ID gate keeps unrelated ticks (routed here by a future change to chat.Animate's dispatch) from churning the cache.

func (FetchToolMessageItem) Finished

func (t FetchToolMessageItem) Finished() bool

Finished implements list.Item. A tool call is freezable once the tool call itself is marked finished AND a result has been recorded (or it has been canceled). Tools that override the spinning logic via spinningFunc would short-circuit live ticks; we still gate freezing on isSpinning to keep the contract conservative.

func (FetchToolMessageItem) HandleKeyEvent

func (t FetchToolMessageItem) HandleKeyEvent(key tea.KeyMsg) (bool, tea.Cmd)

HandleKeyEvent implements KeyEventHandler.

func (FetchToolMessageItem) HandleMouseClick

func (t FetchToolMessageItem) HandleMouseClick(btn ansi.MouseButton, x, y int) bool

HandleMouseClick implements MouseClickable.

func (FetchToolMessageItem) ID

func (t FetchToolMessageItem) ID() string

ID returns the unique identifier for this tool message item.

func (FetchToolMessageItem) MessageID

func (t FetchToolMessageItem) MessageID() string

MessageID returns the ID of the message containing this tool call.

func (FetchToolMessageItem) RawRender

func (t FetchToolMessageItem) RawRender(width int) string

RawRender implements MessageItem.

func (FetchToolMessageItem) Render

func (t FetchToolMessageItem) Render(width int) string

Render renders the tool message item at the given width.

func (FetchToolMessageItem) RenderPreview

func (t FetchToolMessageItem) RenderPreview(width int) string

RenderPreview renders the tool non-compact without cache or prefix. Bypasses isCompact so the caller gets the full content view regardless of the tool's stored compact state. The caller is responsible for passing the correct available width — no additional capping is applied here.

func (FetchToolMessageItem) SetCompact

func (t FetchToolMessageItem) SetCompact(compact bool)

SetCompact implements the Compactable interface.

func (FetchToolMessageItem) SetMessageID

func (t FetchToolMessageItem) SetMessageID(id string)

SetMessageID sets the ID of the message containing this tool call. MessageID is metadata only and does not affect the rendered output, so we deliberately do not bump the version here.

func (FetchToolMessageItem) SetResult

func (t FetchToolMessageItem) SetResult(res *message.ToolResult)

SetResult sets the tool result associated with this message item.

func (FetchToolMessageItem) SetSpinningFunc

func (t FetchToolMessageItem) SetSpinningFunc(fn SpinningFunc)

SetSpinningFunc sets a custom function to determine if the tool should spin.

func (FetchToolMessageItem) SetStatus

func (t FetchToolMessageItem) SetStatus(status ToolStatus)

SetStatus sets the tool status.

func (FetchToolMessageItem) SetToolCall

func (t FetchToolMessageItem) SetToolCall(tc message.ToolCall)

SetToolCall sets the tool call associated with this message item.

func (FetchToolMessageItem) StartAnimation

func (t FetchToolMessageItem) StartAnimation() tea.Cmd

StartAnimation starts the assistant message animation if it should be spinning.

func (FetchToolMessageItem) Status

func (t FetchToolMessageItem) Status() ToolStatus

Status returns the current tool status.

func (FetchToolMessageItem) ToggleExpanded

func (t FetchToolMessageItem) ToggleExpanded() bool

ToggleExpanded toggles the expanded state of the thinking box.

func (FetchToolMessageItem) ToolCall

func (t FetchToolMessageItem) ToolCall() message.ToolCall

ToolCall returns the tool call associated with this message item.

type FetchToolRenderContext

type FetchToolRenderContext struct{}

FetchToolRenderContext renders fetch tool messages.

func (*FetchToolRenderContext) RenderTool

func (f *FetchToolRenderContext) RenderTool(sty *styles.Styles, width int, opts *ToolRenderOpts) string

RenderTool implements the ToolRenderer interface.

type FindMCPResponse

type FindMCPResponse struct {
	Servers []struct {
		Name        string `json:"name"`
		Description string `json:"description"`
	} `json:"servers"`
}

FindMCPResponse represents the response from mcp-find.

type FocusableMessageItem

type FocusableMessageItem interface {
	MessageItem
	list.Focusable
}

FocusableMessageItem is a message item that supports focus.

type GenericToolMessageItem

type GenericToolMessageItem struct {
	// contains filtered or unexported fields
}

GenericToolMessageItem is a message item that represents an unknown tool call.

func (GenericToolMessageItem) Animate

func (t GenericToolMessageItem) Animate(msg anim.StepMsg) tea.Cmd

Animate progresses the assistant message animation if it should be spinning.

Bumps the F6 list-cache version so the next draw re-renders this item: a spinner tick mutates anim's internal frame counter, which changes the rendered output but is invisible to the per-item caches. Without the bump the list cache would serve the previously rendered frame indefinitely and the spinner would appear frozen. The ID gate keeps unrelated ticks (routed here by a future change to chat.Animate's dispatch) from churning the cache.

func (GenericToolMessageItem) Finished

func (t GenericToolMessageItem) Finished() bool

Finished implements list.Item. A tool call is freezable once the tool call itself is marked finished AND a result has been recorded (or it has been canceled). Tools that override the spinning logic via spinningFunc would short-circuit live ticks; we still gate freezing on isSpinning to keep the contract conservative.

func (GenericToolMessageItem) HandleKeyEvent

func (t GenericToolMessageItem) HandleKeyEvent(key tea.KeyMsg) (bool, tea.Cmd)

HandleKeyEvent implements KeyEventHandler.

func (GenericToolMessageItem) HandleMouseClick

func (t GenericToolMessageItem) HandleMouseClick(btn ansi.MouseButton, x, y int) bool

HandleMouseClick implements MouseClickable.

func (GenericToolMessageItem) ID

func (t GenericToolMessageItem) ID() string

ID returns the unique identifier for this tool message item.

func (GenericToolMessageItem) MessageID

func (t GenericToolMessageItem) MessageID() string

MessageID returns the ID of the message containing this tool call.

func (GenericToolMessageItem) RawRender

func (t GenericToolMessageItem) RawRender(width int) string

RawRender implements MessageItem.

func (GenericToolMessageItem) Render

func (t GenericToolMessageItem) Render(width int) string

Render renders the tool message item at the given width.

func (GenericToolMessageItem) RenderPreview

func (t GenericToolMessageItem) RenderPreview(width int) string

RenderPreview renders the tool non-compact without cache or prefix. Bypasses isCompact so the caller gets the full content view regardless of the tool's stored compact state. The caller is responsible for passing the correct available width — no additional capping is applied here.

func (GenericToolMessageItem) SetCompact

func (t GenericToolMessageItem) SetCompact(compact bool)

SetCompact implements the Compactable interface.

func (GenericToolMessageItem) SetMessageID

func (t GenericToolMessageItem) SetMessageID(id string)

SetMessageID sets the ID of the message containing this tool call. MessageID is metadata only and does not affect the rendered output, so we deliberately do not bump the version here.

func (GenericToolMessageItem) SetResult

func (t GenericToolMessageItem) SetResult(res *message.ToolResult)

SetResult sets the tool result associated with this message item.

func (GenericToolMessageItem) SetSpinningFunc

func (t GenericToolMessageItem) SetSpinningFunc(fn SpinningFunc)

SetSpinningFunc sets a custom function to determine if the tool should spin.

func (GenericToolMessageItem) SetStatus

func (t GenericToolMessageItem) SetStatus(status ToolStatus)

SetStatus sets the tool status.

func (GenericToolMessageItem) SetToolCall

func (t GenericToolMessageItem) SetToolCall(tc message.ToolCall)

SetToolCall sets the tool call associated with this message item.

func (GenericToolMessageItem) StartAnimation

func (t GenericToolMessageItem) StartAnimation() tea.Cmd

StartAnimation starts the assistant message animation if it should be spinning.

func (GenericToolMessageItem) Status

func (t GenericToolMessageItem) Status() ToolStatus

Status returns the current tool status.

func (GenericToolMessageItem) ToggleExpanded

func (t GenericToolMessageItem) ToggleExpanded() bool

ToggleExpanded toggles the expanded state of the thinking box.

func (GenericToolMessageItem) ToolCall

func (t GenericToolMessageItem) ToolCall() message.ToolCall

ToolCall returns the tool call associated with this message item.

type GenericToolRenderContext

type GenericToolRenderContext struct{}

GenericToolRenderContext renders unknown/generic tool messages.

func (*GenericToolRenderContext) RenderTool

func (g *GenericToolRenderContext) RenderTool(sty *styles.Styles, width int, opts *ToolRenderOpts) string

RenderTool implements the ToolRenderer interface.

type GetFileMetadataToolMessageItem

type GetFileMetadataToolMessageItem struct {
	// contains filtered or unexported fields
}

GetFileMetadataToolMessageItem is a message item that represents a get_file_metadata tool call.

func (GetFileMetadataToolMessageItem) Animate

func (t GetFileMetadataToolMessageItem) Animate(msg anim.StepMsg) tea.Cmd

Animate progresses the assistant message animation if it should be spinning.

Bumps the F6 list-cache version so the next draw re-renders this item: a spinner tick mutates anim's internal frame counter, which changes the rendered output but is invisible to the per-item caches. Without the bump the list cache would serve the previously rendered frame indefinitely and the spinner would appear frozen. The ID gate keeps unrelated ticks (routed here by a future change to chat.Animate's dispatch) from churning the cache.

func (GetFileMetadataToolMessageItem) Finished

func (t GetFileMetadataToolMessageItem) Finished() bool

Finished implements list.Item. A tool call is freezable once the tool call itself is marked finished AND a result has been recorded (or it has been canceled). Tools that override the spinning logic via spinningFunc would short-circuit live ticks; we still gate freezing on isSpinning to keep the contract conservative.

func (GetFileMetadataToolMessageItem) HandleKeyEvent

func (t GetFileMetadataToolMessageItem) HandleKeyEvent(key tea.KeyMsg) (bool, tea.Cmd)

HandleKeyEvent implements KeyEventHandler.

func (GetFileMetadataToolMessageItem) HandleMouseClick

func (t GetFileMetadataToolMessageItem) HandleMouseClick(btn ansi.MouseButton, x, y int) bool

HandleMouseClick implements MouseClickable.

func (GetFileMetadataToolMessageItem) ID

func (t GetFileMetadataToolMessageItem) ID() string

ID returns the unique identifier for this tool message item.

func (GetFileMetadataToolMessageItem) MessageID

func (t GetFileMetadataToolMessageItem) MessageID() string

MessageID returns the ID of the message containing this tool call.

func (GetFileMetadataToolMessageItem) RawRender

func (t GetFileMetadataToolMessageItem) RawRender(width int) string

RawRender implements MessageItem.

func (GetFileMetadataToolMessageItem) Render

func (t GetFileMetadataToolMessageItem) Render(width int) string

Render renders the tool message item at the given width.

func (GetFileMetadataToolMessageItem) RenderPreview

func (t GetFileMetadataToolMessageItem) RenderPreview(width int) string

RenderPreview renders the tool non-compact without cache or prefix. Bypasses isCompact so the caller gets the full content view regardless of the tool's stored compact state. The caller is responsible for passing the correct available width — no additional capping is applied here.

func (GetFileMetadataToolMessageItem) SetCompact

func (t GetFileMetadataToolMessageItem) SetCompact(compact bool)

SetCompact implements the Compactable interface.

func (GetFileMetadataToolMessageItem) SetMessageID

func (t GetFileMetadataToolMessageItem) SetMessageID(id string)

SetMessageID sets the ID of the message containing this tool call. MessageID is metadata only and does not affect the rendered output, so we deliberately do not bump the version here.

func (GetFileMetadataToolMessageItem) SetResult

func (t GetFileMetadataToolMessageItem) SetResult(res *message.ToolResult)

SetResult sets the tool result associated with this message item.

func (GetFileMetadataToolMessageItem) SetSpinningFunc

func (t GetFileMetadataToolMessageItem) SetSpinningFunc(fn SpinningFunc)

SetSpinningFunc sets a custom function to determine if the tool should spin.

func (GetFileMetadataToolMessageItem) SetStatus

func (t GetFileMetadataToolMessageItem) SetStatus(status ToolStatus)

SetStatus sets the tool status.

func (GetFileMetadataToolMessageItem) SetToolCall

func (t GetFileMetadataToolMessageItem) SetToolCall(tc message.ToolCall)

SetToolCall sets the tool call associated with this message item.

func (GetFileMetadataToolMessageItem) StartAnimation

func (t GetFileMetadataToolMessageItem) StartAnimation() tea.Cmd

StartAnimation starts the assistant message animation if it should be spinning.

func (GetFileMetadataToolMessageItem) Status

func (t GetFileMetadataToolMessageItem) Status() ToolStatus

Status returns the current tool status.

func (GetFileMetadataToolMessageItem) ToggleExpanded

func (t GetFileMetadataToolMessageItem) ToggleExpanded() bool

ToggleExpanded toggles the expanded state of the thinking box.

func (GetFileMetadataToolMessageItem) ToolCall

func (t GetFileMetadataToolMessageItem) ToolCall() message.ToolCall

ToolCall returns the tool call associated with this message item.

type GetFileMetadataToolRenderContext

type GetFileMetadataToolRenderContext struct{}

GetFileMetadataToolRenderContext renders get_file_metadata tool messages.

func (*GetFileMetadataToolRenderContext) RenderTool

func (g *GetFileMetadataToolRenderContext) RenderTool(sty *styles.Styles, width int, opts *ToolRenderOpts) string

RenderTool implements the ToolRenderer interface.

type GetGoalRenderContext

type GetGoalRenderContext struct{}

func (*GetGoalRenderContext) RenderTool

func (g *GetGoalRenderContext) RenderTool(sty *styles.Styles, width int, opts *ToolRenderOpts) string

type GetGoalToolMessageItem

type GetGoalToolMessageItem struct {
	// contains filtered or unexported fields
}

func (GetGoalToolMessageItem) Animate

func (t GetGoalToolMessageItem) Animate(msg anim.StepMsg) tea.Cmd

Animate progresses the assistant message animation if it should be spinning.

Bumps the F6 list-cache version so the next draw re-renders this item: a spinner tick mutates anim's internal frame counter, which changes the rendered output but is invisible to the per-item caches. Without the bump the list cache would serve the previously rendered frame indefinitely and the spinner would appear frozen. The ID gate keeps unrelated ticks (routed here by a future change to chat.Animate's dispatch) from churning the cache.

func (GetGoalToolMessageItem) Finished

func (t GetGoalToolMessageItem) Finished() bool

Finished implements list.Item. A tool call is freezable once the tool call itself is marked finished AND a result has been recorded (or it has been canceled). Tools that override the spinning logic via spinningFunc would short-circuit live ticks; we still gate freezing on isSpinning to keep the contract conservative.

func (GetGoalToolMessageItem) HandleKeyEvent

func (t GetGoalToolMessageItem) HandleKeyEvent(key tea.KeyMsg) (bool, tea.Cmd)

HandleKeyEvent implements KeyEventHandler.

func (GetGoalToolMessageItem) HandleMouseClick

func (t GetGoalToolMessageItem) HandleMouseClick(btn ansi.MouseButton, x, y int) bool

HandleMouseClick implements MouseClickable.

func (GetGoalToolMessageItem) ID

func (t GetGoalToolMessageItem) ID() string

ID returns the unique identifier for this tool message item.

func (GetGoalToolMessageItem) MessageID

func (t GetGoalToolMessageItem) MessageID() string

MessageID returns the ID of the message containing this tool call.

func (GetGoalToolMessageItem) RawRender

func (t GetGoalToolMessageItem) RawRender(width int) string

RawRender implements MessageItem.

func (GetGoalToolMessageItem) Render

func (t GetGoalToolMessageItem) Render(width int) string

Render renders the tool message item at the given width.

func (GetGoalToolMessageItem) RenderPreview

func (t GetGoalToolMessageItem) RenderPreview(width int) string

RenderPreview renders the tool non-compact without cache or prefix. Bypasses isCompact so the caller gets the full content view regardless of the tool's stored compact state. The caller is responsible for passing the correct available width — no additional capping is applied here.

func (GetGoalToolMessageItem) SetCompact

func (t GetGoalToolMessageItem) SetCompact(compact bool)

SetCompact implements the Compactable interface.

func (GetGoalToolMessageItem) SetMessageID

func (t GetGoalToolMessageItem) SetMessageID(id string)

SetMessageID sets the ID of the message containing this tool call. MessageID is metadata only and does not affect the rendered output, so we deliberately do not bump the version here.

func (GetGoalToolMessageItem) SetResult

func (t GetGoalToolMessageItem) SetResult(res *message.ToolResult)

SetResult sets the tool result associated with this message item.

func (GetGoalToolMessageItem) SetSpinningFunc

func (t GetGoalToolMessageItem) SetSpinningFunc(fn SpinningFunc)

SetSpinningFunc sets a custom function to determine if the tool should spin.

func (GetGoalToolMessageItem) SetStatus

func (t GetGoalToolMessageItem) SetStatus(status ToolStatus)

SetStatus sets the tool status.

func (GetGoalToolMessageItem) SetToolCall

func (t GetGoalToolMessageItem) SetToolCall(tc message.ToolCall)

SetToolCall sets the tool call associated with this message item.

func (GetGoalToolMessageItem) StartAnimation

func (t GetGoalToolMessageItem) StartAnimation() tea.Cmd

StartAnimation starts the assistant message animation if it should be spinning.

func (GetGoalToolMessageItem) Status

func (t GetGoalToolMessageItem) Status() ToolStatus

Status returns the current tool status.

func (GetGoalToolMessageItem) ToggleExpanded

func (t GetGoalToolMessageItem) ToggleExpanded() bool

ToggleExpanded toggles the expanded state of the thinking box.

func (GetGoalToolMessageItem) ToolCall

func (t GetGoalToolMessageItem) ToolCall() message.ToolCall

ToolCall returns the tool call associated with this message item.

type GlobToolMessageItem

type GlobToolMessageItem struct {
	// contains filtered or unexported fields
}

GlobToolMessageItem is a message item that represents a glob tool call.

func (GlobToolMessageItem) Animate

func (t GlobToolMessageItem) Animate(msg anim.StepMsg) tea.Cmd

Animate progresses the assistant message animation if it should be spinning.

Bumps the F6 list-cache version so the next draw re-renders this item: a spinner tick mutates anim's internal frame counter, which changes the rendered output but is invisible to the per-item caches. Without the bump the list cache would serve the previously rendered frame indefinitely and the spinner would appear frozen. The ID gate keeps unrelated ticks (routed here by a future change to chat.Animate's dispatch) from churning the cache.

func (GlobToolMessageItem) Finished

func (t GlobToolMessageItem) Finished() bool

Finished implements list.Item. A tool call is freezable once the tool call itself is marked finished AND a result has been recorded (or it has been canceled). Tools that override the spinning logic via spinningFunc would short-circuit live ticks; we still gate freezing on isSpinning to keep the contract conservative.

func (GlobToolMessageItem) HandleKeyEvent

func (t GlobToolMessageItem) HandleKeyEvent(key tea.KeyMsg) (bool, tea.Cmd)

HandleKeyEvent implements KeyEventHandler.

func (GlobToolMessageItem) HandleMouseClick

func (t GlobToolMessageItem) HandleMouseClick(btn ansi.MouseButton, x, y int) bool

HandleMouseClick implements MouseClickable.

func (GlobToolMessageItem) ID

func (t GlobToolMessageItem) ID() string

ID returns the unique identifier for this tool message item.

func (GlobToolMessageItem) MessageID

func (t GlobToolMessageItem) MessageID() string

MessageID returns the ID of the message containing this tool call.

func (GlobToolMessageItem) RawRender

func (t GlobToolMessageItem) RawRender(width int) string

RawRender implements MessageItem.

func (GlobToolMessageItem) Render

func (t GlobToolMessageItem) Render(width int) string

Render renders the tool message item at the given width.

func (GlobToolMessageItem) RenderPreview

func (t GlobToolMessageItem) RenderPreview(width int) string

RenderPreview renders the tool non-compact without cache or prefix. Bypasses isCompact so the caller gets the full content view regardless of the tool's stored compact state. The caller is responsible for passing the correct available width — no additional capping is applied here.

func (GlobToolMessageItem) SetCompact

func (t GlobToolMessageItem) SetCompact(compact bool)

SetCompact implements the Compactable interface.

func (GlobToolMessageItem) SetMessageID

func (t GlobToolMessageItem) SetMessageID(id string)

SetMessageID sets the ID of the message containing this tool call. MessageID is metadata only and does not affect the rendered output, so we deliberately do not bump the version here.

func (GlobToolMessageItem) SetResult

func (t GlobToolMessageItem) SetResult(res *message.ToolResult)

SetResult sets the tool result associated with this message item.

func (GlobToolMessageItem) SetSpinningFunc

func (t GlobToolMessageItem) SetSpinningFunc(fn SpinningFunc)

SetSpinningFunc sets a custom function to determine if the tool should spin.

func (GlobToolMessageItem) SetStatus

func (t GlobToolMessageItem) SetStatus(status ToolStatus)

SetStatus sets the tool status.

func (GlobToolMessageItem) SetToolCall

func (t GlobToolMessageItem) SetToolCall(tc message.ToolCall)

SetToolCall sets the tool call associated with this message item.

func (GlobToolMessageItem) StartAnimation

func (t GlobToolMessageItem) StartAnimation() tea.Cmd

StartAnimation starts the assistant message animation if it should be spinning.

func (GlobToolMessageItem) Status

func (t GlobToolMessageItem) Status() ToolStatus

Status returns the current tool status.

func (GlobToolMessageItem) ToggleExpanded

func (t GlobToolMessageItem) ToggleExpanded() bool

ToggleExpanded toggles the expanded state of the thinking box.

func (GlobToolMessageItem) ToolCall

func (t GlobToolMessageItem) ToolCall() message.ToolCall

ToolCall returns the tool call associated with this message item.

type GlobToolRenderContext

type GlobToolRenderContext struct{}

GlobToolRenderContext renders glob tool messages.

func (*GlobToolRenderContext) RenderTool

func (g *GlobToolRenderContext) RenderTool(sty *styles.Styles, width int, opts *ToolRenderOpts) string

RenderTool implements the ToolRenderer interface.

type GrepToolMessageItem

type GrepToolMessageItem struct {
	// contains filtered or unexported fields
}

GrepToolMessageItem is a message item that represents a grep tool call.

func (GrepToolMessageItem) Animate

func (t GrepToolMessageItem) Animate(msg anim.StepMsg) tea.Cmd

Animate progresses the assistant message animation if it should be spinning.

Bumps the F6 list-cache version so the next draw re-renders this item: a spinner tick mutates anim's internal frame counter, which changes the rendered output but is invisible to the per-item caches. Without the bump the list cache would serve the previously rendered frame indefinitely and the spinner would appear frozen. The ID gate keeps unrelated ticks (routed here by a future change to chat.Animate's dispatch) from churning the cache.

func (GrepToolMessageItem) Finished

func (t GrepToolMessageItem) Finished() bool

Finished implements list.Item. A tool call is freezable once the tool call itself is marked finished AND a result has been recorded (or it has been canceled). Tools that override the spinning logic via spinningFunc would short-circuit live ticks; we still gate freezing on isSpinning to keep the contract conservative.

func (GrepToolMessageItem) HandleKeyEvent

func (t GrepToolMessageItem) HandleKeyEvent(key tea.KeyMsg) (bool, tea.Cmd)

HandleKeyEvent implements KeyEventHandler.

func (GrepToolMessageItem) HandleMouseClick

func (t GrepToolMessageItem) HandleMouseClick(btn ansi.MouseButton, x, y int) bool

HandleMouseClick implements MouseClickable.

func (GrepToolMessageItem) ID

func (t GrepToolMessageItem) ID() string

ID returns the unique identifier for this tool message item.

func (GrepToolMessageItem) MessageID

func (t GrepToolMessageItem) MessageID() string

MessageID returns the ID of the message containing this tool call.

func (GrepToolMessageItem) RawRender

func (t GrepToolMessageItem) RawRender(width int) string

RawRender implements MessageItem.

func (GrepToolMessageItem) Render

func (t GrepToolMessageItem) Render(width int) string

Render renders the tool message item at the given width.

func (GrepToolMessageItem) RenderPreview

func (t GrepToolMessageItem) RenderPreview(width int) string

RenderPreview renders the tool non-compact without cache or prefix. Bypasses isCompact so the caller gets the full content view regardless of the tool's stored compact state. The caller is responsible for passing the correct available width — no additional capping is applied here.

func (GrepToolMessageItem) SetCompact

func (t GrepToolMessageItem) SetCompact(compact bool)

SetCompact implements the Compactable interface.

func (GrepToolMessageItem) SetMessageID

func (t GrepToolMessageItem) SetMessageID(id string)

SetMessageID sets the ID of the message containing this tool call. MessageID is metadata only and does not affect the rendered output, so we deliberately do not bump the version here.

func (GrepToolMessageItem) SetResult

func (t GrepToolMessageItem) SetResult(res *message.ToolResult)

SetResult sets the tool result associated with this message item.

func (GrepToolMessageItem) SetSpinningFunc

func (t GrepToolMessageItem) SetSpinningFunc(fn SpinningFunc)

SetSpinningFunc sets a custom function to determine if the tool should spin.

func (GrepToolMessageItem) SetStatus

func (t GrepToolMessageItem) SetStatus(status ToolStatus)

SetStatus sets the tool status.

func (GrepToolMessageItem) SetToolCall

func (t GrepToolMessageItem) SetToolCall(tc message.ToolCall)

SetToolCall sets the tool call associated with this message item.

func (GrepToolMessageItem) StartAnimation

func (t GrepToolMessageItem) StartAnimation() tea.Cmd

StartAnimation starts the assistant message animation if it should be spinning.

func (GrepToolMessageItem) Status

func (t GrepToolMessageItem) Status() ToolStatus

Status returns the current tool status.

func (GrepToolMessageItem) ToggleExpanded

func (t GrepToolMessageItem) ToggleExpanded() bool

ToggleExpanded toggles the expanded state of the thinking box.

func (GrepToolMessageItem) ToolCall

func (t GrepToolMessageItem) ToolCall() message.ToolCall

ToolCall returns the tool call associated with this message item.

type GrepToolRenderContext

type GrepToolRenderContext struct{}

GrepToolRenderContext renders grep tool messages.

func (*GrepToolRenderContext) RenderTool

func (g *GrepToolRenderContext) RenderTool(sty *styles.Styles, width int, opts *ToolRenderOpts) string

RenderTool implements the ToolRenderer interface.

type HighlightableMessageItem

type HighlightableMessageItem interface {
	MessageItem
	list.Highlightable
}

HighlightableMessageItem is a message item that supports highlighting.

type Identifiable

type Identifiable interface {
	ID() string
}

Identifiable is an interface for items that can provide a unique identifier.

type JobKillToolMessageItem

type JobKillToolMessageItem struct {
	// contains filtered or unexported fields
}

JobKillToolMessageItem is a message item for job_kill tool calls.

func (JobKillToolMessageItem) Animate

func (t JobKillToolMessageItem) Animate(msg anim.StepMsg) tea.Cmd

Animate progresses the assistant message animation if it should be spinning.

Bumps the F6 list-cache version so the next draw re-renders this item: a spinner tick mutates anim's internal frame counter, which changes the rendered output but is invisible to the per-item caches. Without the bump the list cache would serve the previously rendered frame indefinitely and the spinner would appear frozen. The ID gate keeps unrelated ticks (routed here by a future change to chat.Animate's dispatch) from churning the cache.

func (JobKillToolMessageItem) Finished

func (t JobKillToolMessageItem) Finished() bool

Finished implements list.Item. A tool call is freezable once the tool call itself is marked finished AND a result has been recorded (or it has been canceled). Tools that override the spinning logic via spinningFunc would short-circuit live ticks; we still gate freezing on isSpinning to keep the contract conservative.

func (JobKillToolMessageItem) HandleKeyEvent

func (t JobKillToolMessageItem) HandleKeyEvent(key tea.KeyMsg) (bool, tea.Cmd)

HandleKeyEvent implements KeyEventHandler.

func (JobKillToolMessageItem) HandleMouseClick

func (t JobKillToolMessageItem) HandleMouseClick(btn ansi.MouseButton, x, y int) bool

HandleMouseClick implements MouseClickable.

func (JobKillToolMessageItem) ID

func (t JobKillToolMessageItem) ID() string

ID returns the unique identifier for this tool message item.

func (JobKillToolMessageItem) MessageID

func (t JobKillToolMessageItem) MessageID() string

MessageID returns the ID of the message containing this tool call.

func (JobKillToolMessageItem) RawRender

func (t JobKillToolMessageItem) RawRender(width int) string

RawRender implements MessageItem.

func (JobKillToolMessageItem) Render

func (t JobKillToolMessageItem) Render(width int) string

Render renders the tool message item at the given width.

func (JobKillToolMessageItem) RenderPreview

func (t JobKillToolMessageItem) RenderPreview(width int) string

RenderPreview renders the tool non-compact without cache or prefix. Bypasses isCompact so the caller gets the full content view regardless of the tool's stored compact state. The caller is responsible for passing the correct available width — no additional capping is applied here.

func (JobKillToolMessageItem) SetCompact

func (t JobKillToolMessageItem) SetCompact(compact bool)

SetCompact implements the Compactable interface.

func (JobKillToolMessageItem) SetMessageID

func (t JobKillToolMessageItem) SetMessageID(id string)

SetMessageID sets the ID of the message containing this tool call. MessageID is metadata only and does not affect the rendered output, so we deliberately do not bump the version here.

func (JobKillToolMessageItem) SetResult

func (t JobKillToolMessageItem) SetResult(res *message.ToolResult)

SetResult sets the tool result associated with this message item.

func (JobKillToolMessageItem) SetSpinningFunc

func (t JobKillToolMessageItem) SetSpinningFunc(fn SpinningFunc)

SetSpinningFunc sets a custom function to determine if the tool should spin.

func (JobKillToolMessageItem) SetStatus

func (t JobKillToolMessageItem) SetStatus(status ToolStatus)

SetStatus sets the tool status.

func (JobKillToolMessageItem) SetToolCall

func (t JobKillToolMessageItem) SetToolCall(tc message.ToolCall)

SetToolCall sets the tool call associated with this message item.

func (JobKillToolMessageItem) StartAnimation

func (t JobKillToolMessageItem) StartAnimation() tea.Cmd

StartAnimation starts the assistant message animation if it should be spinning.

func (JobKillToolMessageItem) Status

func (t JobKillToolMessageItem) Status() ToolStatus

Status returns the current tool status.

func (JobKillToolMessageItem) ToggleExpanded

func (t JobKillToolMessageItem) ToggleExpanded() bool

ToggleExpanded toggles the expanded state of the thinking box.

func (JobKillToolMessageItem) ToolCall

func (t JobKillToolMessageItem) ToolCall() message.ToolCall

ToolCall returns the tool call associated with this message item.

type JobKillToolRenderContext

type JobKillToolRenderContext struct{}

JobKillToolRenderContext renders job_kill tool messages.

func (*JobKillToolRenderContext) RenderTool

func (j *JobKillToolRenderContext) RenderTool(sty *styles.Styles, width int, opts *ToolRenderOpts) string

RenderTool implements the ToolRenderer interface.

type JobOutputToolMessageItem

type JobOutputToolMessageItem struct {
	// contains filtered or unexported fields
}

JobOutputToolMessageItem is a message item for job_output tool calls.

func (JobOutputToolMessageItem) Animate

func (t JobOutputToolMessageItem) Animate(msg anim.StepMsg) tea.Cmd

Animate progresses the assistant message animation if it should be spinning.

Bumps the F6 list-cache version so the next draw re-renders this item: a spinner tick mutates anim's internal frame counter, which changes the rendered output but is invisible to the per-item caches. Without the bump the list cache would serve the previously rendered frame indefinitely and the spinner would appear frozen. The ID gate keeps unrelated ticks (routed here by a future change to chat.Animate's dispatch) from churning the cache.

func (JobOutputToolMessageItem) Finished

func (t JobOutputToolMessageItem) Finished() bool

Finished implements list.Item. A tool call is freezable once the tool call itself is marked finished AND a result has been recorded (or it has been canceled). Tools that override the spinning logic via spinningFunc would short-circuit live ticks; we still gate freezing on isSpinning to keep the contract conservative.

func (JobOutputToolMessageItem) HandleKeyEvent

func (t JobOutputToolMessageItem) HandleKeyEvent(key tea.KeyMsg) (bool, tea.Cmd)

HandleKeyEvent implements KeyEventHandler.

func (JobOutputToolMessageItem) HandleMouseClick

func (t JobOutputToolMessageItem) HandleMouseClick(btn ansi.MouseButton, x, y int) bool

HandleMouseClick implements MouseClickable.

func (JobOutputToolMessageItem) ID

func (t JobOutputToolMessageItem) ID() string

ID returns the unique identifier for this tool message item.

func (JobOutputToolMessageItem) MessageID

func (t JobOutputToolMessageItem) MessageID() string

MessageID returns the ID of the message containing this tool call.

func (JobOutputToolMessageItem) RawRender

func (t JobOutputToolMessageItem) RawRender(width int) string

RawRender implements MessageItem.

func (JobOutputToolMessageItem) Render

func (t JobOutputToolMessageItem) Render(width int) string

Render renders the tool message item at the given width.

func (JobOutputToolMessageItem) RenderPreview

func (t JobOutputToolMessageItem) RenderPreview(width int) string

RenderPreview renders the tool non-compact without cache or prefix. Bypasses isCompact so the caller gets the full content view regardless of the tool's stored compact state. The caller is responsible for passing the correct available width — no additional capping is applied here.

func (JobOutputToolMessageItem) SetCompact

func (t JobOutputToolMessageItem) SetCompact(compact bool)

SetCompact implements the Compactable interface.

func (JobOutputToolMessageItem) SetMessageID

func (t JobOutputToolMessageItem) SetMessageID(id string)

SetMessageID sets the ID of the message containing this tool call. MessageID is metadata only and does not affect the rendered output, so we deliberately do not bump the version here.

func (JobOutputToolMessageItem) SetResult

func (t JobOutputToolMessageItem) SetResult(res *message.ToolResult)

SetResult sets the tool result associated with this message item.

func (JobOutputToolMessageItem) SetSpinningFunc

func (t JobOutputToolMessageItem) SetSpinningFunc(fn SpinningFunc)

SetSpinningFunc sets a custom function to determine if the tool should spin.

func (JobOutputToolMessageItem) SetStatus

func (t JobOutputToolMessageItem) SetStatus(status ToolStatus)

SetStatus sets the tool status.

func (JobOutputToolMessageItem) SetToolCall

func (t JobOutputToolMessageItem) SetToolCall(tc message.ToolCall)

SetToolCall sets the tool call associated with this message item.

func (JobOutputToolMessageItem) StartAnimation

func (t JobOutputToolMessageItem) StartAnimation() tea.Cmd

StartAnimation starts the assistant message animation if it should be spinning.

func (JobOutputToolMessageItem) Status

func (t JobOutputToolMessageItem) Status() ToolStatus

Status returns the current tool status.

func (JobOutputToolMessageItem) ToggleExpanded

func (t JobOutputToolMessageItem) ToggleExpanded() bool

ToggleExpanded toggles the expanded state of the thinking box.

func (JobOutputToolMessageItem) ToolCall

func (t JobOutputToolMessageItem) ToolCall() message.ToolCall

ToolCall returns the tool call associated with this message item.

type JobOutputToolRenderContext

type JobOutputToolRenderContext struct{}

JobOutputToolRenderContext renders job_output tool messages.

func (*JobOutputToolRenderContext) RenderTool

func (j *JobOutputToolRenderContext) RenderTool(sty *styles.Styles, width int, opts *ToolRenderOpts) string

RenderTool implements the ToolRenderer interface.

type KeyEventHandler

type KeyEventHandler interface {
	HandleKeyEvent(key tea.KeyMsg) (bool, tea.Cmd)
}

KeyEventHandler is an interface for items that can handle key events.

type LSPRenderContext

type LSPRenderContext struct{}

func (*LSPRenderContext) RenderTool

func (l *LSPRenderContext) RenderTool(sty *styles.Styles, width int, opts *ToolRenderOpts) string

type LSPRestartToolMessageItem

type LSPRestartToolMessageItem struct {
	// contains filtered or unexported fields
}

LSPRestartToolMessageItem is a message item that represents a lsprestart tool call.

func (LSPRestartToolMessageItem) Animate

func (t LSPRestartToolMessageItem) Animate(msg anim.StepMsg) tea.Cmd

Animate progresses the assistant message animation if it should be spinning.

Bumps the F6 list-cache version so the next draw re-renders this item: a spinner tick mutates anim's internal frame counter, which changes the rendered output but is invisible to the per-item caches. Without the bump the list cache would serve the previously rendered frame indefinitely and the spinner would appear frozen. The ID gate keeps unrelated ticks (routed here by a future change to chat.Animate's dispatch) from churning the cache.

func (LSPRestartToolMessageItem) Finished

func (t LSPRestartToolMessageItem) Finished() bool

Finished implements list.Item. A tool call is freezable once the tool call itself is marked finished AND a result has been recorded (or it has been canceled). Tools that override the spinning logic via spinningFunc would short-circuit live ticks; we still gate freezing on isSpinning to keep the contract conservative.

func (LSPRestartToolMessageItem) HandleKeyEvent

func (t LSPRestartToolMessageItem) HandleKeyEvent(key tea.KeyMsg) (bool, tea.Cmd)

HandleKeyEvent implements KeyEventHandler.

func (LSPRestartToolMessageItem) HandleMouseClick

func (t LSPRestartToolMessageItem) HandleMouseClick(btn ansi.MouseButton, x, y int) bool

HandleMouseClick implements MouseClickable.

func (LSPRestartToolMessageItem) ID

func (t LSPRestartToolMessageItem) ID() string

ID returns the unique identifier for this tool message item.

func (LSPRestartToolMessageItem) MessageID

func (t LSPRestartToolMessageItem) MessageID() string

MessageID returns the ID of the message containing this tool call.

func (LSPRestartToolMessageItem) RawRender

func (t LSPRestartToolMessageItem) RawRender(width int) string

RawRender implements MessageItem.

func (LSPRestartToolMessageItem) Render

func (t LSPRestartToolMessageItem) Render(width int) string

Render renders the tool message item at the given width.

func (LSPRestartToolMessageItem) RenderPreview

func (t LSPRestartToolMessageItem) RenderPreview(width int) string

RenderPreview renders the tool non-compact without cache or prefix. Bypasses isCompact so the caller gets the full content view regardless of the tool's stored compact state. The caller is responsible for passing the correct available width — no additional capping is applied here.

func (LSPRestartToolMessageItem) SetCompact

func (t LSPRestartToolMessageItem) SetCompact(compact bool)

SetCompact implements the Compactable interface.

func (LSPRestartToolMessageItem) SetMessageID

func (t LSPRestartToolMessageItem) SetMessageID(id string)

SetMessageID sets the ID of the message containing this tool call. MessageID is metadata only and does not affect the rendered output, so we deliberately do not bump the version here.

func (LSPRestartToolMessageItem) SetResult

func (t LSPRestartToolMessageItem) SetResult(res *message.ToolResult)

SetResult sets the tool result associated with this message item.

func (LSPRestartToolMessageItem) SetSpinningFunc

func (t LSPRestartToolMessageItem) SetSpinningFunc(fn SpinningFunc)

SetSpinningFunc sets a custom function to determine if the tool should spin.

func (LSPRestartToolMessageItem) SetStatus

func (t LSPRestartToolMessageItem) SetStatus(status ToolStatus)

SetStatus sets the tool status.

func (LSPRestartToolMessageItem) SetToolCall

func (t LSPRestartToolMessageItem) SetToolCall(tc message.ToolCall)

SetToolCall sets the tool call associated with this message item.

func (LSPRestartToolMessageItem) StartAnimation

func (t LSPRestartToolMessageItem) StartAnimation() tea.Cmd

StartAnimation starts the assistant message animation if it should be spinning.

func (LSPRestartToolMessageItem) Status

func (t LSPRestartToolMessageItem) Status() ToolStatus

Status returns the current tool status.

func (LSPRestartToolMessageItem) ToggleExpanded

func (t LSPRestartToolMessageItem) ToggleExpanded() bool

ToggleExpanded toggles the expanded state of the thinking box.

func (LSPRestartToolMessageItem) ToolCall

func (t LSPRestartToolMessageItem) ToolCall() message.ToolCall

ToolCall returns the tool call associated with this message item.

type LSPRestartToolRenderContext

type LSPRestartToolRenderContext struct{}

LSPRestartToolRenderContext renders lsprestart tool messages.

func (*LSPRestartToolRenderContext) RenderTool

func (r *LSPRestartToolRenderContext) RenderTool(sty *styles.Styles, width int, opts *ToolRenderOpts) string

RenderTool implements the ToolRenderer interface.

type LSPToolMessageItem

type LSPToolMessageItem struct {
	// contains filtered or unexported fields
}

LSPToolMessageItem represents an lsp tool call.

func (LSPToolMessageItem) Animate

func (t LSPToolMessageItem) Animate(msg anim.StepMsg) tea.Cmd

Animate progresses the assistant message animation if it should be spinning.

Bumps the F6 list-cache version so the next draw re-renders this item: a spinner tick mutates anim's internal frame counter, which changes the rendered output but is invisible to the per-item caches. Without the bump the list cache would serve the previously rendered frame indefinitely and the spinner would appear frozen. The ID gate keeps unrelated ticks (routed here by a future change to chat.Animate's dispatch) from churning the cache.

func (LSPToolMessageItem) Finished

func (t LSPToolMessageItem) Finished() bool

Finished implements list.Item. A tool call is freezable once the tool call itself is marked finished AND a result has been recorded (or it has been canceled). Tools that override the spinning logic via spinningFunc would short-circuit live ticks; we still gate freezing on isSpinning to keep the contract conservative.

func (LSPToolMessageItem) HandleKeyEvent

func (t LSPToolMessageItem) HandleKeyEvent(key tea.KeyMsg) (bool, tea.Cmd)

HandleKeyEvent implements KeyEventHandler.

func (LSPToolMessageItem) HandleMouseClick

func (t LSPToolMessageItem) HandleMouseClick(btn ansi.MouseButton, x, y int) bool

HandleMouseClick implements MouseClickable.

func (LSPToolMessageItem) ID

func (t LSPToolMessageItem) ID() string

ID returns the unique identifier for this tool message item.

func (LSPToolMessageItem) MessageID

func (t LSPToolMessageItem) MessageID() string

MessageID returns the ID of the message containing this tool call.

func (LSPToolMessageItem) RawRender

func (t LSPToolMessageItem) RawRender(width int) string

RawRender implements MessageItem.

func (LSPToolMessageItem) Render

func (t LSPToolMessageItem) Render(width int) string

Render renders the tool message item at the given width.

func (LSPToolMessageItem) RenderPreview

func (t LSPToolMessageItem) RenderPreview(width int) string

RenderPreview renders the tool non-compact without cache or prefix. Bypasses isCompact so the caller gets the full content view regardless of the tool's stored compact state. The caller is responsible for passing the correct available width — no additional capping is applied here.

func (LSPToolMessageItem) SetCompact

func (t LSPToolMessageItem) SetCompact(compact bool)

SetCompact implements the Compactable interface.

func (LSPToolMessageItem) SetMessageID

func (t LSPToolMessageItem) SetMessageID(id string)

SetMessageID sets the ID of the message containing this tool call. MessageID is metadata only and does not affect the rendered output, so we deliberately do not bump the version here.

func (LSPToolMessageItem) SetResult

func (t LSPToolMessageItem) SetResult(res *message.ToolResult)

SetResult sets the tool result associated with this message item.

func (LSPToolMessageItem) SetSpinningFunc

func (t LSPToolMessageItem) SetSpinningFunc(fn SpinningFunc)

SetSpinningFunc sets a custom function to determine if the tool should spin.

func (LSPToolMessageItem) SetStatus

func (t LSPToolMessageItem) SetStatus(status ToolStatus)

SetStatus sets the tool status.

func (LSPToolMessageItem) SetToolCall

func (t LSPToolMessageItem) SetToolCall(tc message.ToolCall)

SetToolCall sets the tool call associated with this message item.

func (LSPToolMessageItem) StartAnimation

func (t LSPToolMessageItem) StartAnimation() tea.Cmd

StartAnimation starts the assistant message animation if it should be spinning.

func (LSPToolMessageItem) Status

func (t LSPToolMessageItem) Status() ToolStatus

Status returns the current tool status.

func (LSPToolMessageItem) ToggleExpanded

func (t LSPToolMessageItem) ToggleExpanded() bool

ToggleExpanded toggles the expanded state of the thinking box.

func (LSPToolMessageItem) ToolCall

func (t LSPToolMessageItem) ToolCall() message.ToolCall

ToolCall returns the tool call associated with this message item.

type LSToolMessageItem

type LSToolMessageItem struct {
	// contains filtered or unexported fields
}

LSToolMessageItem is a message item that represents an ls tool call.

func (LSToolMessageItem) Animate

func (t LSToolMessageItem) Animate(msg anim.StepMsg) tea.Cmd

Animate progresses the assistant message animation if it should be spinning.

Bumps the F6 list-cache version so the next draw re-renders this item: a spinner tick mutates anim's internal frame counter, which changes the rendered output but is invisible to the per-item caches. Without the bump the list cache would serve the previously rendered frame indefinitely and the spinner would appear frozen. The ID gate keeps unrelated ticks (routed here by a future change to chat.Animate's dispatch) from churning the cache.

func (LSToolMessageItem) Finished

func (t LSToolMessageItem) Finished() bool

Finished implements list.Item. A tool call is freezable once the tool call itself is marked finished AND a result has been recorded (or it has been canceled). Tools that override the spinning logic via spinningFunc would short-circuit live ticks; we still gate freezing on isSpinning to keep the contract conservative.

func (LSToolMessageItem) HandleKeyEvent

func (t LSToolMessageItem) HandleKeyEvent(key tea.KeyMsg) (bool, tea.Cmd)

HandleKeyEvent implements KeyEventHandler.

func (LSToolMessageItem) HandleMouseClick

func (t LSToolMessageItem) HandleMouseClick(btn ansi.MouseButton, x, y int) bool

HandleMouseClick implements MouseClickable.

func (LSToolMessageItem) ID

func (t LSToolMessageItem) ID() string

ID returns the unique identifier for this tool message item.

func (LSToolMessageItem) MessageID

func (t LSToolMessageItem) MessageID() string

MessageID returns the ID of the message containing this tool call.

func (LSToolMessageItem) RawRender

func (t LSToolMessageItem) RawRender(width int) string

RawRender implements MessageItem.

func (LSToolMessageItem) Render

func (t LSToolMessageItem) Render(width int) string

Render renders the tool message item at the given width.

func (LSToolMessageItem) RenderPreview

func (t LSToolMessageItem) RenderPreview(width int) string

RenderPreview renders the tool non-compact without cache or prefix. Bypasses isCompact so the caller gets the full content view regardless of the tool's stored compact state. The caller is responsible for passing the correct available width — no additional capping is applied here.

func (LSToolMessageItem) SetCompact

func (t LSToolMessageItem) SetCompact(compact bool)

SetCompact implements the Compactable interface.

func (LSToolMessageItem) SetMessageID

func (t LSToolMessageItem) SetMessageID(id string)

SetMessageID sets the ID of the message containing this tool call. MessageID is metadata only and does not affect the rendered output, so we deliberately do not bump the version here.

func (LSToolMessageItem) SetResult

func (t LSToolMessageItem) SetResult(res *message.ToolResult)

SetResult sets the tool result associated with this message item.

func (LSToolMessageItem) SetSpinningFunc

func (t LSToolMessageItem) SetSpinningFunc(fn SpinningFunc)

SetSpinningFunc sets a custom function to determine if the tool should spin.

func (LSToolMessageItem) SetStatus

func (t LSToolMessageItem) SetStatus(status ToolStatus)

SetStatus sets the tool status.

func (LSToolMessageItem) SetToolCall

func (t LSToolMessageItem) SetToolCall(tc message.ToolCall)

SetToolCall sets the tool call associated with this message item.

func (LSToolMessageItem) StartAnimation

func (t LSToolMessageItem) StartAnimation() tea.Cmd

StartAnimation starts the assistant message animation if it should be spinning.

func (LSToolMessageItem) Status

func (t LSToolMessageItem) Status() ToolStatus

Status returns the current tool status.

func (LSToolMessageItem) ToggleExpanded

func (t LSToolMessageItem) ToggleExpanded() bool

ToggleExpanded toggles the expanded state of the thinking box.

func (LSToolMessageItem) ToolCall

func (t LSToolMessageItem) ToolCall() message.ToolCall

ToolCall returns the tool call associated with this message item.

type LSToolRenderContext

type LSToolRenderContext struct{}

LSToolRenderContext renders ls tool messages.

func (*LSToolRenderContext) RenderTool

func (l *LSToolRenderContext) RenderTool(sty *styles.Styles, width int, opts *ToolRenderOpts) string

RenderTool implements the ToolRenderer interface.

type ListAgentsToolMessageItem

type ListAgentsToolMessageItem struct {
	// contains filtered or unexported fields
}

ListAgentsToolMessageItem represents a list_agents tool call.

func (ListAgentsToolMessageItem) Animate

func (t ListAgentsToolMessageItem) Animate(msg anim.StepMsg) tea.Cmd

Animate progresses the assistant message animation if it should be spinning.

Bumps the F6 list-cache version so the next draw re-renders this item: a spinner tick mutates anim's internal frame counter, which changes the rendered output but is invisible to the per-item caches. Without the bump the list cache would serve the previously rendered frame indefinitely and the spinner would appear frozen. The ID gate keeps unrelated ticks (routed here by a future change to chat.Animate's dispatch) from churning the cache.

func (ListAgentsToolMessageItem) Finished

func (t ListAgentsToolMessageItem) Finished() bool

Finished implements list.Item. A tool call is freezable once the tool call itself is marked finished AND a result has been recorded (or it has been canceled). Tools that override the spinning logic via spinningFunc would short-circuit live ticks; we still gate freezing on isSpinning to keep the contract conservative.

func (ListAgentsToolMessageItem) HandleKeyEvent

func (t ListAgentsToolMessageItem) HandleKeyEvent(key tea.KeyMsg) (bool, tea.Cmd)

HandleKeyEvent implements KeyEventHandler.

func (ListAgentsToolMessageItem) HandleMouseClick

func (t ListAgentsToolMessageItem) HandleMouseClick(btn ansi.MouseButton, x, y int) bool

HandleMouseClick implements MouseClickable.

func (ListAgentsToolMessageItem) ID

func (t ListAgentsToolMessageItem) ID() string

ID returns the unique identifier for this tool message item.

func (ListAgentsToolMessageItem) MessageID

func (t ListAgentsToolMessageItem) MessageID() string

MessageID returns the ID of the message containing this tool call.

func (ListAgentsToolMessageItem) RawRender

func (t ListAgentsToolMessageItem) RawRender(width int) string

RawRender implements MessageItem.

func (ListAgentsToolMessageItem) Render

func (t ListAgentsToolMessageItem) Render(width int) string

Render renders the tool message item at the given width.

func (ListAgentsToolMessageItem) RenderPreview

func (t ListAgentsToolMessageItem) RenderPreview(width int) string

RenderPreview renders the tool non-compact without cache or prefix. Bypasses isCompact so the caller gets the full content view regardless of the tool's stored compact state. The caller is responsible for passing the correct available width — no additional capping is applied here.

func (ListAgentsToolMessageItem) SetCompact

func (t ListAgentsToolMessageItem) SetCompact(compact bool)

SetCompact implements the Compactable interface.

func (ListAgentsToolMessageItem) SetMessageID

func (t ListAgentsToolMessageItem) SetMessageID(id string)

SetMessageID sets the ID of the message containing this tool call. MessageID is metadata only and does not affect the rendered output, so we deliberately do not bump the version here.

func (ListAgentsToolMessageItem) SetResult

func (t ListAgentsToolMessageItem) SetResult(res *message.ToolResult)

SetResult sets the tool result associated with this message item.

func (ListAgentsToolMessageItem) SetSpinningFunc

func (t ListAgentsToolMessageItem) SetSpinningFunc(fn SpinningFunc)

SetSpinningFunc sets a custom function to determine if the tool should spin.

func (ListAgentsToolMessageItem) SetStatus

func (t ListAgentsToolMessageItem) SetStatus(status ToolStatus)

SetStatus sets the tool status.

func (ListAgentsToolMessageItem) SetToolCall

func (t ListAgentsToolMessageItem) SetToolCall(tc message.ToolCall)

SetToolCall sets the tool call associated with this message item.

func (ListAgentsToolMessageItem) StartAnimation

func (t ListAgentsToolMessageItem) StartAnimation() tea.Cmd

StartAnimation starts the assistant message animation if it should be spinning.

func (ListAgentsToolMessageItem) Status

func (t ListAgentsToolMessageItem) Status() ToolStatus

Status returns the current tool status.

func (ListAgentsToolMessageItem) ToggleExpanded

func (t ListAgentsToolMessageItem) ToggleExpanded() bool

ToggleExpanded toggles the expanded state of the thinking box.

func (ListAgentsToolMessageItem) ToolCall

func (t ListAgentsToolMessageItem) ToolCall() message.ToolCall

ToolCall returns the tool call associated with this message item.

type ListAgentsToolRenderContext

type ListAgentsToolRenderContext struct{}

ListAgentsToolRenderContext renders list_agents tool messages.

func (*ListAgentsToolRenderContext) RenderTool

func (l *ListAgentsToolRenderContext) RenderTool(sty *styles.Styles, width int, opts *ToolRenderOpts) string

RenderTool implements the ToolRenderer interface.

type MCPListResourcesToolMessageItem

type MCPListResourcesToolMessageItem struct {
	// contains filtered or unexported fields
}

MCPListResourcesToolMessageItem represents a mcp_list_resources tool call.

func (MCPListResourcesToolMessageItem) Animate

func (t MCPListResourcesToolMessageItem) Animate(msg anim.StepMsg) tea.Cmd

Animate progresses the assistant message animation if it should be spinning.

Bumps the F6 list-cache version so the next draw re-renders this item: a spinner tick mutates anim's internal frame counter, which changes the rendered output but is invisible to the per-item caches. Without the bump the list cache would serve the previously rendered frame indefinitely and the spinner would appear frozen. The ID gate keeps unrelated ticks (routed here by a future change to chat.Animate's dispatch) from churning the cache.

func (MCPListResourcesToolMessageItem) Finished

func (t MCPListResourcesToolMessageItem) Finished() bool

Finished implements list.Item. A tool call is freezable once the tool call itself is marked finished AND a result has been recorded (or it has been canceled). Tools that override the spinning logic via spinningFunc would short-circuit live ticks; we still gate freezing on isSpinning to keep the contract conservative.

func (MCPListResourcesToolMessageItem) HandleKeyEvent

func (t MCPListResourcesToolMessageItem) HandleKeyEvent(key tea.KeyMsg) (bool, tea.Cmd)

HandleKeyEvent implements KeyEventHandler.

func (MCPListResourcesToolMessageItem) HandleMouseClick

func (t MCPListResourcesToolMessageItem) HandleMouseClick(btn ansi.MouseButton, x, y int) bool

HandleMouseClick implements MouseClickable.

func (MCPListResourcesToolMessageItem) ID

func (t MCPListResourcesToolMessageItem) ID() string

ID returns the unique identifier for this tool message item.

func (MCPListResourcesToolMessageItem) MessageID

func (t MCPListResourcesToolMessageItem) MessageID() string

MessageID returns the ID of the message containing this tool call.

func (MCPListResourcesToolMessageItem) RawRender

func (t MCPListResourcesToolMessageItem) RawRender(width int) string

RawRender implements MessageItem.

func (MCPListResourcesToolMessageItem) Render

func (t MCPListResourcesToolMessageItem) Render(width int) string

Render renders the tool message item at the given width.

func (MCPListResourcesToolMessageItem) RenderPreview

func (t MCPListResourcesToolMessageItem) RenderPreview(width int) string

RenderPreview renders the tool non-compact without cache or prefix. Bypasses isCompact so the caller gets the full content view regardless of the tool's stored compact state. The caller is responsible for passing the correct available width — no additional capping is applied here.

func (MCPListResourcesToolMessageItem) SetCompact

func (t MCPListResourcesToolMessageItem) SetCompact(compact bool)

SetCompact implements the Compactable interface.

func (MCPListResourcesToolMessageItem) SetMessageID

func (t MCPListResourcesToolMessageItem) SetMessageID(id string)

SetMessageID sets the ID of the message containing this tool call. MessageID is metadata only and does not affect the rendered output, so we deliberately do not bump the version here.

func (MCPListResourcesToolMessageItem) SetResult

func (t MCPListResourcesToolMessageItem) SetResult(res *message.ToolResult)

SetResult sets the tool result associated with this message item.

func (MCPListResourcesToolMessageItem) SetSpinningFunc

func (t MCPListResourcesToolMessageItem) SetSpinningFunc(fn SpinningFunc)

SetSpinningFunc sets a custom function to determine if the tool should spin.

func (MCPListResourcesToolMessageItem) SetStatus

func (t MCPListResourcesToolMessageItem) SetStatus(status ToolStatus)

SetStatus sets the tool status.

func (MCPListResourcesToolMessageItem) SetToolCall

func (t MCPListResourcesToolMessageItem) SetToolCall(tc message.ToolCall)

SetToolCall sets the tool call associated with this message item.

func (MCPListResourcesToolMessageItem) StartAnimation

func (t MCPListResourcesToolMessageItem) StartAnimation() tea.Cmd

StartAnimation starts the assistant message animation if it should be spinning.

func (MCPListResourcesToolMessageItem) Status

func (t MCPListResourcesToolMessageItem) Status() ToolStatus

Status returns the current tool status.

func (MCPListResourcesToolMessageItem) ToggleExpanded

func (t MCPListResourcesToolMessageItem) ToggleExpanded() bool

ToggleExpanded toggles the expanded state of the thinking box.

func (MCPListResourcesToolMessageItem) ToolCall

func (t MCPListResourcesToolMessageItem) ToolCall() message.ToolCall

ToolCall returns the tool call associated with this message item.

type MCPListResourcesToolRenderContext

type MCPListResourcesToolRenderContext struct{}

MCPListResourcesToolRenderContext renders mcp_list_resources tool messages.

func (*MCPListResourcesToolRenderContext) RenderTool

func (m *MCPListResourcesToolRenderContext) RenderTool(sty *styles.Styles, width int, opts *ToolRenderOpts) string

RenderTool implements the ToolRenderer interface.

type MCPReadResourceToolMessageItem

type MCPReadResourceToolMessageItem struct {
	// contains filtered or unexported fields
}

MCPReadResourceToolMessageItem represents a mcp_read_resource tool call.

func (MCPReadResourceToolMessageItem) Animate

func (t MCPReadResourceToolMessageItem) Animate(msg anim.StepMsg) tea.Cmd

Animate progresses the assistant message animation if it should be spinning.

Bumps the F6 list-cache version so the next draw re-renders this item: a spinner tick mutates anim's internal frame counter, which changes the rendered output but is invisible to the per-item caches. Without the bump the list cache would serve the previously rendered frame indefinitely and the spinner would appear frozen. The ID gate keeps unrelated ticks (routed here by a future change to chat.Animate's dispatch) from churning the cache.

func (MCPReadResourceToolMessageItem) Finished

func (t MCPReadResourceToolMessageItem) Finished() bool

Finished implements list.Item. A tool call is freezable once the tool call itself is marked finished AND a result has been recorded (or it has been canceled). Tools that override the spinning logic via spinningFunc would short-circuit live ticks; we still gate freezing on isSpinning to keep the contract conservative.

func (MCPReadResourceToolMessageItem) HandleKeyEvent

func (t MCPReadResourceToolMessageItem) HandleKeyEvent(key tea.KeyMsg) (bool, tea.Cmd)

HandleKeyEvent implements KeyEventHandler.

func (MCPReadResourceToolMessageItem) HandleMouseClick

func (t MCPReadResourceToolMessageItem) HandleMouseClick(btn ansi.MouseButton, x, y int) bool

HandleMouseClick implements MouseClickable.

func (MCPReadResourceToolMessageItem) ID

func (t MCPReadResourceToolMessageItem) ID() string

ID returns the unique identifier for this tool message item.

func (MCPReadResourceToolMessageItem) MessageID

func (t MCPReadResourceToolMessageItem) MessageID() string

MessageID returns the ID of the message containing this tool call.

func (MCPReadResourceToolMessageItem) RawRender

func (t MCPReadResourceToolMessageItem) RawRender(width int) string

RawRender implements MessageItem.

func (MCPReadResourceToolMessageItem) Render

func (t MCPReadResourceToolMessageItem) Render(width int) string

Render renders the tool message item at the given width.

func (MCPReadResourceToolMessageItem) RenderPreview

func (t MCPReadResourceToolMessageItem) RenderPreview(width int) string

RenderPreview renders the tool non-compact without cache or prefix. Bypasses isCompact so the caller gets the full content view regardless of the tool's stored compact state. The caller is responsible for passing the correct available width — no additional capping is applied here.

func (MCPReadResourceToolMessageItem) SetCompact

func (t MCPReadResourceToolMessageItem) SetCompact(compact bool)

SetCompact implements the Compactable interface.

func (MCPReadResourceToolMessageItem) SetMessageID

func (t MCPReadResourceToolMessageItem) SetMessageID(id string)

SetMessageID sets the ID of the message containing this tool call. MessageID is metadata only and does not affect the rendered output, so we deliberately do not bump the version here.

func (MCPReadResourceToolMessageItem) SetResult

func (t MCPReadResourceToolMessageItem) SetResult(res *message.ToolResult)

SetResult sets the tool result associated with this message item.

func (MCPReadResourceToolMessageItem) SetSpinningFunc

func (t MCPReadResourceToolMessageItem) SetSpinningFunc(fn SpinningFunc)

SetSpinningFunc sets a custom function to determine if the tool should spin.

func (MCPReadResourceToolMessageItem) SetStatus

func (t MCPReadResourceToolMessageItem) SetStatus(status ToolStatus)

SetStatus sets the tool status.

func (MCPReadResourceToolMessageItem) SetToolCall

func (t MCPReadResourceToolMessageItem) SetToolCall(tc message.ToolCall)

SetToolCall sets the tool call associated with this message item.

func (MCPReadResourceToolMessageItem) StartAnimation

func (t MCPReadResourceToolMessageItem) StartAnimation() tea.Cmd

StartAnimation starts the assistant message animation if it should be spinning.

func (MCPReadResourceToolMessageItem) Status

func (t MCPReadResourceToolMessageItem) Status() ToolStatus

Status returns the current tool status.

func (MCPReadResourceToolMessageItem) ToggleExpanded

func (t MCPReadResourceToolMessageItem) ToggleExpanded() bool

ToggleExpanded toggles the expanded state of the thinking box.

func (MCPReadResourceToolMessageItem) ToolCall

func (t MCPReadResourceToolMessageItem) ToolCall() message.ToolCall

ToolCall returns the tool call associated with this message item.

type MCPReadResourceToolRenderContext

type MCPReadResourceToolRenderContext struct{}

MCPReadResourceToolRenderContext renders mcp_read_resource tool messages.

func (*MCPReadResourceToolRenderContext) RenderTool

func (m *MCPReadResourceToolRenderContext) RenderTool(sty *styles.Styles, width int, opts *ToolRenderOpts) string

RenderTool implements the ToolRenderer interface.

type MCPToolMessageItem

type MCPToolMessageItem struct {
	// contains filtered or unexported fields
}

MCPToolMessageItem is a message item that represents an MCP tool call.

func (MCPToolMessageItem) Animate

func (t MCPToolMessageItem) Animate(msg anim.StepMsg) tea.Cmd

Animate progresses the assistant message animation if it should be spinning.

Bumps the F6 list-cache version so the next draw re-renders this item: a spinner tick mutates anim's internal frame counter, which changes the rendered output but is invisible to the per-item caches. Without the bump the list cache would serve the previously rendered frame indefinitely and the spinner would appear frozen. The ID gate keeps unrelated ticks (routed here by a future change to chat.Animate's dispatch) from churning the cache.

func (MCPToolMessageItem) Finished

func (t MCPToolMessageItem) Finished() bool

Finished implements list.Item. A tool call is freezable once the tool call itself is marked finished AND a result has been recorded (or it has been canceled). Tools that override the spinning logic via spinningFunc would short-circuit live ticks; we still gate freezing on isSpinning to keep the contract conservative.

func (MCPToolMessageItem) HandleKeyEvent

func (t MCPToolMessageItem) HandleKeyEvent(key tea.KeyMsg) (bool, tea.Cmd)

HandleKeyEvent implements KeyEventHandler.

func (MCPToolMessageItem) HandleMouseClick

func (t MCPToolMessageItem) HandleMouseClick(btn ansi.MouseButton, x, y int) bool

HandleMouseClick implements MouseClickable.

func (MCPToolMessageItem) ID

func (t MCPToolMessageItem) ID() string

ID returns the unique identifier for this tool message item.

func (MCPToolMessageItem) MessageID

func (t MCPToolMessageItem) MessageID() string

MessageID returns the ID of the message containing this tool call.

func (MCPToolMessageItem) RawRender

func (t MCPToolMessageItem) RawRender(width int) string

RawRender implements MessageItem.

func (MCPToolMessageItem) Render

func (t MCPToolMessageItem) Render(width int) string

Render renders the tool message item at the given width.

func (MCPToolMessageItem) RenderPreview

func (t MCPToolMessageItem) RenderPreview(width int) string

RenderPreview renders the tool non-compact without cache or prefix. Bypasses isCompact so the caller gets the full content view regardless of the tool's stored compact state. The caller is responsible for passing the correct available width — no additional capping is applied here.

func (MCPToolMessageItem) SetCompact

func (t MCPToolMessageItem) SetCompact(compact bool)

SetCompact implements the Compactable interface.

func (MCPToolMessageItem) SetMessageID

func (t MCPToolMessageItem) SetMessageID(id string)

SetMessageID sets the ID of the message containing this tool call. MessageID is metadata only and does not affect the rendered output, so we deliberately do not bump the version here.

func (MCPToolMessageItem) SetResult

func (t MCPToolMessageItem) SetResult(res *message.ToolResult)

SetResult sets the tool result associated with this message item.

func (MCPToolMessageItem) SetSpinningFunc

func (t MCPToolMessageItem) SetSpinningFunc(fn SpinningFunc)

SetSpinningFunc sets a custom function to determine if the tool should spin.

func (MCPToolMessageItem) SetStatus

func (t MCPToolMessageItem) SetStatus(status ToolStatus)

SetStatus sets the tool status.

func (MCPToolMessageItem) SetToolCall

func (t MCPToolMessageItem) SetToolCall(tc message.ToolCall)

SetToolCall sets the tool call associated with this message item.

func (MCPToolMessageItem) StartAnimation

func (t MCPToolMessageItem) StartAnimation() tea.Cmd

StartAnimation starts the assistant message animation if it should be spinning.

func (MCPToolMessageItem) Status

func (t MCPToolMessageItem) Status() ToolStatus

Status returns the current tool status.

func (MCPToolMessageItem) ToggleExpanded

func (t MCPToolMessageItem) ToggleExpanded() bool

ToggleExpanded toggles the expanded state of the thinking box.

func (MCPToolMessageItem) ToolCall

func (t MCPToolMessageItem) ToolCall() message.ToolCall

ToolCall returns the tool call associated with this message item.

type MCPToolRenderContext

type MCPToolRenderContext struct{}

MCPToolRenderContext renders generic MCP tool messages.

func (*MCPToolRenderContext) RenderTool

func (b *MCPToolRenderContext) RenderTool(sty *styles.Styles, width int, opts *ToolRenderOpts) string

RenderTool implements the ToolRenderer interface.

type MemoryAddObservationsRenderContext

type MemoryAddObservationsRenderContext struct{}

MemoryAddObservationsRenderContext renders memory_add_observations tool messages.

func (*MemoryAddObservationsRenderContext) RenderTool

func (m *MemoryAddObservationsRenderContext) RenderTool(sty *styles.Styles, width int, opts *ToolRenderOpts) string

RenderTool implements ToolRenderer.

type MemoryAddObservationsToolMessageItem

type MemoryAddObservationsToolMessageItem struct {
	// contains filtered or unexported fields
}

MemoryAddObservationsToolMessageItem represents a memory_add_observations tool call.

func (MemoryAddObservationsToolMessageItem) Animate

func (t MemoryAddObservationsToolMessageItem) Animate(msg anim.StepMsg) tea.Cmd

Animate progresses the assistant message animation if it should be spinning.

Bumps the F6 list-cache version so the next draw re-renders this item: a spinner tick mutates anim's internal frame counter, which changes the rendered output but is invisible to the per-item caches. Without the bump the list cache would serve the previously rendered frame indefinitely and the spinner would appear frozen. The ID gate keeps unrelated ticks (routed here by a future change to chat.Animate's dispatch) from churning the cache.

func (MemoryAddObservationsToolMessageItem) Finished

func (t MemoryAddObservationsToolMessageItem) Finished() bool

Finished implements list.Item. A tool call is freezable once the tool call itself is marked finished AND a result has been recorded (or it has been canceled). Tools that override the spinning logic via spinningFunc would short-circuit live ticks; we still gate freezing on isSpinning to keep the contract conservative.

func (MemoryAddObservationsToolMessageItem) HandleKeyEvent

func (t MemoryAddObservationsToolMessageItem) HandleKeyEvent(key tea.KeyMsg) (bool, tea.Cmd)

HandleKeyEvent implements KeyEventHandler.

func (MemoryAddObservationsToolMessageItem) HandleMouseClick

func (t MemoryAddObservationsToolMessageItem) HandleMouseClick(btn ansi.MouseButton, x, y int) bool

HandleMouseClick implements MouseClickable.

func (MemoryAddObservationsToolMessageItem) ID

func (t MemoryAddObservationsToolMessageItem) ID() string

ID returns the unique identifier for this tool message item.

func (MemoryAddObservationsToolMessageItem) MessageID

func (t MemoryAddObservationsToolMessageItem) MessageID() string

MessageID returns the ID of the message containing this tool call.

func (MemoryAddObservationsToolMessageItem) RawRender

func (t MemoryAddObservationsToolMessageItem) RawRender(width int) string

RawRender implements MessageItem.

func (MemoryAddObservationsToolMessageItem) Render

func (t MemoryAddObservationsToolMessageItem) Render(width int) string

Render renders the tool message item at the given width.

func (MemoryAddObservationsToolMessageItem) RenderPreview

func (t MemoryAddObservationsToolMessageItem) RenderPreview(width int) string

RenderPreview renders the tool non-compact without cache or prefix. Bypasses isCompact so the caller gets the full content view regardless of the tool's stored compact state. The caller is responsible for passing the correct available width — no additional capping is applied here.

func (MemoryAddObservationsToolMessageItem) SetCompact

func (t MemoryAddObservationsToolMessageItem) SetCompact(compact bool)

SetCompact implements the Compactable interface.

func (MemoryAddObservationsToolMessageItem) SetMessageID

func (t MemoryAddObservationsToolMessageItem) SetMessageID(id string)

SetMessageID sets the ID of the message containing this tool call. MessageID is metadata only and does not affect the rendered output, so we deliberately do not bump the version here.

func (MemoryAddObservationsToolMessageItem) SetResult

func (t MemoryAddObservationsToolMessageItem) SetResult(res *message.ToolResult)

SetResult sets the tool result associated with this message item.

func (MemoryAddObservationsToolMessageItem) SetSpinningFunc

func (t MemoryAddObservationsToolMessageItem) SetSpinningFunc(fn SpinningFunc)

SetSpinningFunc sets a custom function to determine if the tool should spin.

func (MemoryAddObservationsToolMessageItem) SetStatus

func (t MemoryAddObservationsToolMessageItem) SetStatus(status ToolStatus)

SetStatus sets the tool status.

func (MemoryAddObservationsToolMessageItem) SetToolCall

func (t MemoryAddObservationsToolMessageItem) SetToolCall(tc message.ToolCall)

SetToolCall sets the tool call associated with this message item.

func (MemoryAddObservationsToolMessageItem) StartAnimation

func (t MemoryAddObservationsToolMessageItem) StartAnimation() tea.Cmd

StartAnimation starts the assistant message animation if it should be spinning.

func (MemoryAddObservationsToolMessageItem) Status

func (t MemoryAddObservationsToolMessageItem) Status() ToolStatus

Status returns the current tool status.

func (MemoryAddObservationsToolMessageItem) ToggleExpanded

func (t MemoryAddObservationsToolMessageItem) ToggleExpanded() bool

ToggleExpanded toggles the expanded state of the thinking box.

func (MemoryAddObservationsToolMessageItem) ToolCall

func (t MemoryAddObservationsToolMessageItem) ToolCall() message.ToolCall

ToolCall returns the tool call associated with this message item.

type MemoryCreateEntitiesRenderContext

type MemoryCreateEntitiesRenderContext struct{}

MemoryCreateEntitiesRenderContext renders memory_create_entities tool messages.

func (*MemoryCreateEntitiesRenderContext) RenderTool

func (m *MemoryCreateEntitiesRenderContext) RenderTool(sty *styles.Styles, width int, opts *ToolRenderOpts) string

RenderTool implements ToolRenderer.

type MemoryCreateEntitiesToolMessageItem

type MemoryCreateEntitiesToolMessageItem struct {
	// contains filtered or unexported fields
}

MemoryCreateEntitiesToolMessageItem represents a memory_create_entities tool call.

func (MemoryCreateEntitiesToolMessageItem) Animate

func (t MemoryCreateEntitiesToolMessageItem) Animate(msg anim.StepMsg) tea.Cmd

Animate progresses the assistant message animation if it should be spinning.

Bumps the F6 list-cache version so the next draw re-renders this item: a spinner tick mutates anim's internal frame counter, which changes the rendered output but is invisible to the per-item caches. Without the bump the list cache would serve the previously rendered frame indefinitely and the spinner would appear frozen. The ID gate keeps unrelated ticks (routed here by a future change to chat.Animate's dispatch) from churning the cache.

func (MemoryCreateEntitiesToolMessageItem) Finished

func (t MemoryCreateEntitiesToolMessageItem) Finished() bool

Finished implements list.Item. A tool call is freezable once the tool call itself is marked finished AND a result has been recorded (or it has been canceled). Tools that override the spinning logic via spinningFunc would short-circuit live ticks; we still gate freezing on isSpinning to keep the contract conservative.

func (MemoryCreateEntitiesToolMessageItem) HandleKeyEvent

func (t MemoryCreateEntitiesToolMessageItem) HandleKeyEvent(key tea.KeyMsg) (bool, tea.Cmd)

HandleKeyEvent implements KeyEventHandler.

func (MemoryCreateEntitiesToolMessageItem) HandleMouseClick

func (t MemoryCreateEntitiesToolMessageItem) HandleMouseClick(btn ansi.MouseButton, x, y int) bool

HandleMouseClick implements MouseClickable.

func (MemoryCreateEntitiesToolMessageItem) ID

func (t MemoryCreateEntitiesToolMessageItem) ID() string

ID returns the unique identifier for this tool message item.

func (MemoryCreateEntitiesToolMessageItem) MessageID

func (t MemoryCreateEntitiesToolMessageItem) MessageID() string

MessageID returns the ID of the message containing this tool call.

func (MemoryCreateEntitiesToolMessageItem) RawRender

func (t MemoryCreateEntitiesToolMessageItem) RawRender(width int) string

RawRender implements MessageItem.

func (MemoryCreateEntitiesToolMessageItem) Render

func (t MemoryCreateEntitiesToolMessageItem) Render(width int) string

Render renders the tool message item at the given width.

func (MemoryCreateEntitiesToolMessageItem) RenderPreview

func (t MemoryCreateEntitiesToolMessageItem) RenderPreview(width int) string

RenderPreview renders the tool non-compact without cache or prefix. Bypasses isCompact so the caller gets the full content view regardless of the tool's stored compact state. The caller is responsible for passing the correct available width — no additional capping is applied here.

func (MemoryCreateEntitiesToolMessageItem) SetCompact

func (t MemoryCreateEntitiesToolMessageItem) SetCompact(compact bool)

SetCompact implements the Compactable interface.

func (MemoryCreateEntitiesToolMessageItem) SetMessageID

func (t MemoryCreateEntitiesToolMessageItem) SetMessageID(id string)

SetMessageID sets the ID of the message containing this tool call. MessageID is metadata only and does not affect the rendered output, so we deliberately do not bump the version here.

func (MemoryCreateEntitiesToolMessageItem) SetResult

func (t MemoryCreateEntitiesToolMessageItem) SetResult(res *message.ToolResult)

SetResult sets the tool result associated with this message item.

func (MemoryCreateEntitiesToolMessageItem) SetSpinningFunc

func (t MemoryCreateEntitiesToolMessageItem) SetSpinningFunc(fn SpinningFunc)

SetSpinningFunc sets a custom function to determine if the tool should spin.

func (MemoryCreateEntitiesToolMessageItem) SetStatus

func (t MemoryCreateEntitiesToolMessageItem) SetStatus(status ToolStatus)

SetStatus sets the tool status.

func (MemoryCreateEntitiesToolMessageItem) SetToolCall

func (t MemoryCreateEntitiesToolMessageItem) SetToolCall(tc message.ToolCall)

SetToolCall sets the tool call associated with this message item.

func (MemoryCreateEntitiesToolMessageItem) StartAnimation

func (t MemoryCreateEntitiesToolMessageItem) StartAnimation() tea.Cmd

StartAnimation starts the assistant message animation if it should be spinning.

func (MemoryCreateEntitiesToolMessageItem) Status

func (t MemoryCreateEntitiesToolMessageItem) Status() ToolStatus

Status returns the current tool status.

func (MemoryCreateEntitiesToolMessageItem) ToggleExpanded

func (t MemoryCreateEntitiesToolMessageItem) ToggleExpanded() bool

ToggleExpanded toggles the expanded state of the thinking box.

func (MemoryCreateEntitiesToolMessageItem) ToolCall

func (t MemoryCreateEntitiesToolMessageItem) ToolCall() message.ToolCall

ToolCall returns the tool call associated with this message item.

type MemoryOpenNodesRenderContext

type MemoryOpenNodesRenderContext struct{}

MemoryOpenNodesRenderContext renders memory_open_nodes tool messages.

func (*MemoryOpenNodesRenderContext) RenderTool

func (m *MemoryOpenNodesRenderContext) RenderTool(sty *styles.Styles, width int, opts *ToolRenderOpts) string

RenderTool implements ToolRenderer.

type MemoryOpenNodesToolMessageItem

type MemoryOpenNodesToolMessageItem struct {
	// contains filtered or unexported fields
}

MemoryOpenNodesToolMessageItem represents a memory_open_nodes tool call.

func (MemoryOpenNodesToolMessageItem) Animate

func (t MemoryOpenNodesToolMessageItem) Animate(msg anim.StepMsg) tea.Cmd

Animate progresses the assistant message animation if it should be spinning.

Bumps the F6 list-cache version so the next draw re-renders this item: a spinner tick mutates anim's internal frame counter, which changes the rendered output but is invisible to the per-item caches. Without the bump the list cache would serve the previously rendered frame indefinitely and the spinner would appear frozen. The ID gate keeps unrelated ticks (routed here by a future change to chat.Animate's dispatch) from churning the cache.

func (MemoryOpenNodesToolMessageItem) Finished

func (t MemoryOpenNodesToolMessageItem) Finished() bool

Finished implements list.Item. A tool call is freezable once the tool call itself is marked finished AND a result has been recorded (or it has been canceled). Tools that override the spinning logic via spinningFunc would short-circuit live ticks; we still gate freezing on isSpinning to keep the contract conservative.

func (MemoryOpenNodesToolMessageItem) HandleKeyEvent

func (t MemoryOpenNodesToolMessageItem) HandleKeyEvent(key tea.KeyMsg) (bool, tea.Cmd)

HandleKeyEvent implements KeyEventHandler.

func (MemoryOpenNodesToolMessageItem) HandleMouseClick

func (t MemoryOpenNodesToolMessageItem) HandleMouseClick(btn ansi.MouseButton, x, y int) bool

HandleMouseClick implements MouseClickable.

func (MemoryOpenNodesToolMessageItem) ID

func (t MemoryOpenNodesToolMessageItem) ID() string

ID returns the unique identifier for this tool message item.

func (MemoryOpenNodesToolMessageItem) MessageID

func (t MemoryOpenNodesToolMessageItem) MessageID() string

MessageID returns the ID of the message containing this tool call.

func (MemoryOpenNodesToolMessageItem) RawRender

func (t MemoryOpenNodesToolMessageItem) RawRender(width int) string

RawRender implements MessageItem.

func (MemoryOpenNodesToolMessageItem) Render

func (t MemoryOpenNodesToolMessageItem) Render(width int) string

Render renders the tool message item at the given width.

func (MemoryOpenNodesToolMessageItem) RenderPreview

func (t MemoryOpenNodesToolMessageItem) RenderPreview(width int) string

RenderPreview renders the tool non-compact without cache or prefix. Bypasses isCompact so the caller gets the full content view regardless of the tool's stored compact state. The caller is responsible for passing the correct available width — no additional capping is applied here.

func (MemoryOpenNodesToolMessageItem) SetCompact

func (t MemoryOpenNodesToolMessageItem) SetCompact(compact bool)

SetCompact implements the Compactable interface.

func (MemoryOpenNodesToolMessageItem) SetMessageID

func (t MemoryOpenNodesToolMessageItem) SetMessageID(id string)

SetMessageID sets the ID of the message containing this tool call. MessageID is metadata only and does not affect the rendered output, so we deliberately do not bump the version here.

func (MemoryOpenNodesToolMessageItem) SetResult

func (t MemoryOpenNodesToolMessageItem) SetResult(res *message.ToolResult)

SetResult sets the tool result associated with this message item.

func (MemoryOpenNodesToolMessageItem) SetSpinningFunc

func (t MemoryOpenNodesToolMessageItem) SetSpinningFunc(fn SpinningFunc)

SetSpinningFunc sets a custom function to determine if the tool should spin.

func (MemoryOpenNodesToolMessageItem) SetStatus

func (t MemoryOpenNodesToolMessageItem) SetStatus(status ToolStatus)

SetStatus sets the tool status.

func (MemoryOpenNodesToolMessageItem) SetToolCall

func (t MemoryOpenNodesToolMessageItem) SetToolCall(tc message.ToolCall)

SetToolCall sets the tool call associated with this message item.

func (MemoryOpenNodesToolMessageItem) StartAnimation

func (t MemoryOpenNodesToolMessageItem) StartAnimation() tea.Cmd

StartAnimation starts the assistant message animation if it should be spinning.

func (MemoryOpenNodesToolMessageItem) Status

func (t MemoryOpenNodesToolMessageItem) Status() ToolStatus

Status returns the current tool status.

func (MemoryOpenNodesToolMessageItem) ToggleExpanded

func (t MemoryOpenNodesToolMessageItem) ToggleExpanded() bool

ToggleExpanded toggles the expanded state of the thinking box.

func (MemoryOpenNodesToolMessageItem) ToolCall

func (t MemoryOpenNodesToolMessageItem) ToolCall() message.ToolCall

ToolCall returns the tool call associated with this message item.

type MemorySearchNodesRenderContext

type MemorySearchNodesRenderContext struct{}

MemorySearchNodesRenderContext renders memory_search_nodes tool messages.

func (*MemorySearchNodesRenderContext) RenderTool

func (m *MemorySearchNodesRenderContext) RenderTool(sty *styles.Styles, width int, opts *ToolRenderOpts) string

RenderTool implements ToolRenderer.

type MemorySearchNodesToolMessageItem

type MemorySearchNodesToolMessageItem struct {
	// contains filtered or unexported fields
}

MemorySearchNodesToolMessageItem represents a memory_search_nodes tool call.

func (MemorySearchNodesToolMessageItem) Animate

func (t MemorySearchNodesToolMessageItem) Animate(msg anim.StepMsg) tea.Cmd

Animate progresses the assistant message animation if it should be spinning.

Bumps the F6 list-cache version so the next draw re-renders this item: a spinner tick mutates anim's internal frame counter, which changes the rendered output but is invisible to the per-item caches. Without the bump the list cache would serve the previously rendered frame indefinitely and the spinner would appear frozen. The ID gate keeps unrelated ticks (routed here by a future change to chat.Animate's dispatch) from churning the cache.

func (MemorySearchNodesToolMessageItem) Finished

func (t MemorySearchNodesToolMessageItem) Finished() bool

Finished implements list.Item. A tool call is freezable once the tool call itself is marked finished AND a result has been recorded (or it has been canceled). Tools that override the spinning logic via spinningFunc would short-circuit live ticks; we still gate freezing on isSpinning to keep the contract conservative.

func (MemorySearchNodesToolMessageItem) HandleKeyEvent

func (t MemorySearchNodesToolMessageItem) HandleKeyEvent(key tea.KeyMsg) (bool, tea.Cmd)

HandleKeyEvent implements KeyEventHandler.

func (MemorySearchNodesToolMessageItem) HandleMouseClick

func (t MemorySearchNodesToolMessageItem) HandleMouseClick(btn ansi.MouseButton, x, y int) bool

HandleMouseClick implements MouseClickable.

func (MemorySearchNodesToolMessageItem) ID

func (t MemorySearchNodesToolMessageItem) ID() string

ID returns the unique identifier for this tool message item.

func (MemorySearchNodesToolMessageItem) MessageID

func (t MemorySearchNodesToolMessageItem) MessageID() string

MessageID returns the ID of the message containing this tool call.

func (MemorySearchNodesToolMessageItem) RawRender

func (t MemorySearchNodesToolMessageItem) RawRender(width int) string

RawRender implements MessageItem.

func (MemorySearchNodesToolMessageItem) Render

func (t MemorySearchNodesToolMessageItem) Render(width int) string

Render renders the tool message item at the given width.

func (MemorySearchNodesToolMessageItem) RenderPreview

func (t MemorySearchNodesToolMessageItem) RenderPreview(width int) string

RenderPreview renders the tool non-compact without cache or prefix. Bypasses isCompact so the caller gets the full content view regardless of the tool's stored compact state. The caller is responsible for passing the correct available width — no additional capping is applied here.

func (MemorySearchNodesToolMessageItem) SetCompact

func (t MemorySearchNodesToolMessageItem) SetCompact(compact bool)

SetCompact implements the Compactable interface.

func (MemorySearchNodesToolMessageItem) SetMessageID

func (t MemorySearchNodesToolMessageItem) SetMessageID(id string)

SetMessageID sets the ID of the message containing this tool call. MessageID is metadata only and does not affect the rendered output, so we deliberately do not bump the version here.

func (MemorySearchNodesToolMessageItem) SetResult

func (t MemorySearchNodesToolMessageItem) SetResult(res *message.ToolResult)

SetResult sets the tool result associated with this message item.

func (MemorySearchNodesToolMessageItem) SetSpinningFunc

func (t MemorySearchNodesToolMessageItem) SetSpinningFunc(fn SpinningFunc)

SetSpinningFunc sets a custom function to determine if the tool should spin.

func (MemorySearchNodesToolMessageItem) SetStatus

func (t MemorySearchNodesToolMessageItem) SetStatus(status ToolStatus)

SetStatus sets the tool status.

func (MemorySearchNodesToolMessageItem) SetToolCall

func (t MemorySearchNodesToolMessageItem) SetToolCall(tc message.ToolCall)

SetToolCall sets the tool call associated with this message item.

func (MemorySearchNodesToolMessageItem) StartAnimation

func (t MemorySearchNodesToolMessageItem) StartAnimation() tea.Cmd

StartAnimation starts the assistant message animation if it should be spinning.

func (MemorySearchNodesToolMessageItem) Status

func (t MemorySearchNodesToolMessageItem) Status() ToolStatus

Status returns the current tool status.

func (MemorySearchNodesToolMessageItem) ToggleExpanded

func (t MemorySearchNodesToolMessageItem) ToggleExpanded() bool

ToggleExpanded toggles the expanded state of the thinking box.

func (MemorySearchNodesToolMessageItem) ToolCall

func (t MemorySearchNodesToolMessageItem) ToolCall() message.ToolCall

ToolCall returns the tool call associated with this message item.

type MessageItem

type MessageItem interface {
	list.Item
	list.RawRenderable
	Identifiable
}

MessageItem represents a message.Message item that can be displayed in the UI and be part of a list.List identifiable by a unique ID.

func ExtractMessageItems

func ExtractMessageItems(sty *styles.Styles, msg *message.Message, toolResults map[string]message.ToolResult) []MessageItem

ExtractMessageItems extracts [MessageItem]s from a message.Message. It returns all parts of the message as [MessageItem]s.

For assistant messages with tool calls, pass a toolResults map to link results. Use BuildToolResultMap to create this map from all messages in a session.

func NewAssistantInfoItem

func NewAssistantInfoItem(sty *styles.Styles, message *message.Message, cfg *config.Config, lastUserMessageTime time.Time) MessageItem

NewAssistantInfoItem creates a new AssistantInfoItem.

func NewAssistantMessageItem

func NewAssistantMessageItem(sty *styles.Styles, message *message.Message) MessageItem

NewAssistantMessageItem creates a new AssistantMessageItem.

func NewUserMessageItem

func NewUserMessageItem(sty *styles.Styles, message *message.Message, attachments *attachments.Renderer) MessageItem

NewUserMessageItem creates a new UserMessageItem.

type MonitorRenderContext

type MonitorRenderContext struct{}

func (*MonitorRenderContext) RenderTool

func (m *MonitorRenderContext) RenderTool(sty *styles.Styles, width int, opts *ToolRenderOpts) string

type MonitorToolMessageItem

type MonitorToolMessageItem struct {
	// contains filtered or unexported fields
}

MonitorToolMessageItem represents a monitor tool call.

func (MonitorToolMessageItem) Animate

func (t MonitorToolMessageItem) Animate(msg anim.StepMsg) tea.Cmd

Animate progresses the assistant message animation if it should be spinning.

Bumps the F6 list-cache version so the next draw re-renders this item: a spinner tick mutates anim's internal frame counter, which changes the rendered output but is invisible to the per-item caches. Without the bump the list cache would serve the previously rendered frame indefinitely and the spinner would appear frozen. The ID gate keeps unrelated ticks (routed here by a future change to chat.Animate's dispatch) from churning the cache.

func (MonitorToolMessageItem) Finished

func (t MonitorToolMessageItem) Finished() bool

Finished implements list.Item. A tool call is freezable once the tool call itself is marked finished AND a result has been recorded (or it has been canceled). Tools that override the spinning logic via spinningFunc would short-circuit live ticks; we still gate freezing on isSpinning to keep the contract conservative.

func (MonitorToolMessageItem) HandleKeyEvent

func (t MonitorToolMessageItem) HandleKeyEvent(key tea.KeyMsg) (bool, tea.Cmd)

HandleKeyEvent implements KeyEventHandler.

func (MonitorToolMessageItem) HandleMouseClick

func (t MonitorToolMessageItem) HandleMouseClick(btn ansi.MouseButton, x, y int) bool

HandleMouseClick implements MouseClickable.

func (MonitorToolMessageItem) ID

func (t MonitorToolMessageItem) ID() string

ID returns the unique identifier for this tool message item.

func (MonitorToolMessageItem) MessageID

func (t MonitorToolMessageItem) MessageID() string

MessageID returns the ID of the message containing this tool call.

func (MonitorToolMessageItem) RawRender

func (t MonitorToolMessageItem) RawRender(width int) string

RawRender implements MessageItem.

func (MonitorToolMessageItem) Render

func (t MonitorToolMessageItem) Render(width int) string

Render renders the tool message item at the given width.

func (MonitorToolMessageItem) RenderPreview

func (t MonitorToolMessageItem) RenderPreview(width int) string

RenderPreview renders the tool non-compact without cache or prefix. Bypasses isCompact so the caller gets the full content view regardless of the tool's stored compact state. The caller is responsible for passing the correct available width — no additional capping is applied here.

func (MonitorToolMessageItem) SetCompact

func (t MonitorToolMessageItem) SetCompact(compact bool)

SetCompact implements the Compactable interface.

func (MonitorToolMessageItem) SetMessageID

func (t MonitorToolMessageItem) SetMessageID(id string)

SetMessageID sets the ID of the message containing this tool call. MessageID is metadata only and does not affect the rendered output, so we deliberately do not bump the version here.

func (MonitorToolMessageItem) SetResult

func (t MonitorToolMessageItem) SetResult(res *message.ToolResult)

SetResult sets the tool result associated with this message item.

func (MonitorToolMessageItem) SetSpinningFunc

func (t MonitorToolMessageItem) SetSpinningFunc(fn SpinningFunc)

SetSpinningFunc sets a custom function to determine if the tool should spin.

func (MonitorToolMessageItem) SetStatus

func (t MonitorToolMessageItem) SetStatus(status ToolStatus)

SetStatus sets the tool status.

func (MonitorToolMessageItem) SetToolCall

func (t MonitorToolMessageItem) SetToolCall(tc message.ToolCall)

SetToolCall sets the tool call associated with this message item.

func (MonitorToolMessageItem) StartAnimation

func (t MonitorToolMessageItem) StartAnimation() tea.Cmd

StartAnimation starts the assistant message animation if it should be spinning.

func (MonitorToolMessageItem) Status

func (t MonitorToolMessageItem) Status() ToolStatus

Status returns the current tool status.

func (MonitorToolMessageItem) ToggleExpanded

func (t MonitorToolMessageItem) ToggleExpanded() bool

ToggleExpanded toggles the expanded state of the thinking box.

func (MonitorToolMessageItem) ToolCall

func (t MonitorToolMessageItem) ToolCall() message.ToolCall

ToolCall returns the tool call associated with this message item.

type MultiEditToolMessageItem

type MultiEditToolMessageItem struct {
	// contains filtered or unexported fields
}

MultiEditToolMessageItem is a message item that represents a multi-edit tool call.

func (MultiEditToolMessageItem) Animate

func (t MultiEditToolMessageItem) Animate(msg anim.StepMsg) tea.Cmd

Animate progresses the assistant message animation if it should be spinning.

Bumps the F6 list-cache version so the next draw re-renders this item: a spinner tick mutates anim's internal frame counter, which changes the rendered output but is invisible to the per-item caches. Without the bump the list cache would serve the previously rendered frame indefinitely and the spinner would appear frozen. The ID gate keeps unrelated ticks (routed here by a future change to chat.Animate's dispatch) from churning the cache.

func (MultiEditToolMessageItem) Finished

func (t MultiEditToolMessageItem) Finished() bool

Finished implements list.Item. A tool call is freezable once the tool call itself is marked finished AND a result has been recorded (or it has been canceled). Tools that override the spinning logic via spinningFunc would short-circuit live ticks; we still gate freezing on isSpinning to keep the contract conservative.

func (MultiEditToolMessageItem) HandleKeyEvent

func (t MultiEditToolMessageItem) HandleKeyEvent(key tea.KeyMsg) (bool, tea.Cmd)

HandleKeyEvent implements KeyEventHandler.

func (MultiEditToolMessageItem) HandleMouseClick

func (t MultiEditToolMessageItem) HandleMouseClick(btn ansi.MouseButton, x, y int) bool

HandleMouseClick implements MouseClickable.

func (MultiEditToolMessageItem) ID

func (t MultiEditToolMessageItem) ID() string

ID returns the unique identifier for this tool message item.

func (MultiEditToolMessageItem) MessageID

func (t MultiEditToolMessageItem) MessageID() string

MessageID returns the ID of the message containing this tool call.

func (MultiEditToolMessageItem) RawRender

func (t MultiEditToolMessageItem) RawRender(width int) string

RawRender implements MessageItem.

func (MultiEditToolMessageItem) Render

func (t MultiEditToolMessageItem) Render(width int) string

Render renders the tool message item at the given width.

func (MultiEditToolMessageItem) RenderPreview

func (t MultiEditToolMessageItem) RenderPreview(width int) string

RenderPreview renders the tool non-compact without cache or prefix. Bypasses isCompact so the caller gets the full content view regardless of the tool's stored compact state. The caller is responsible for passing the correct available width — no additional capping is applied here.

func (MultiEditToolMessageItem) SetCompact

func (t MultiEditToolMessageItem) SetCompact(compact bool)

SetCompact implements the Compactable interface.

func (MultiEditToolMessageItem) SetMessageID

func (t MultiEditToolMessageItem) SetMessageID(id string)

SetMessageID sets the ID of the message containing this tool call. MessageID is metadata only and does not affect the rendered output, so we deliberately do not bump the version here.

func (MultiEditToolMessageItem) SetResult

func (t MultiEditToolMessageItem) SetResult(res *message.ToolResult)

SetResult sets the tool result associated with this message item.

func (MultiEditToolMessageItem) SetSpinningFunc

func (t MultiEditToolMessageItem) SetSpinningFunc(fn SpinningFunc)

SetSpinningFunc sets a custom function to determine if the tool should spin.

func (MultiEditToolMessageItem) SetStatus

func (t MultiEditToolMessageItem) SetStatus(status ToolStatus)

SetStatus sets the tool status.

func (MultiEditToolMessageItem) SetToolCall

func (t MultiEditToolMessageItem) SetToolCall(tc message.ToolCall)

SetToolCall sets the tool call associated with this message item.

func (MultiEditToolMessageItem) StartAnimation

func (t MultiEditToolMessageItem) StartAnimation() tea.Cmd

StartAnimation starts the assistant message animation if it should be spinning.

func (MultiEditToolMessageItem) Status

func (t MultiEditToolMessageItem) Status() ToolStatus

Status returns the current tool status.

func (MultiEditToolMessageItem) ToggleExpanded

func (t MultiEditToolMessageItem) ToggleExpanded() bool

ToggleExpanded toggles the expanded state of the thinking box.

func (MultiEditToolMessageItem) ToolCall

func (t MultiEditToolMessageItem) ToolCall() message.ToolCall

ToolCall returns the tool call associated with this message item.

type MultiEditToolRenderContext

type MultiEditToolRenderContext struct{}

MultiEditToolRenderContext renders multi-edit tool messages.

func (*MultiEditToolRenderContext) RenderTool

func (m *MultiEditToolRenderContext) RenderTool(sty *styles.Styles, width int, opts *ToolRenderOpts) string

RenderTool implements the ToolRenderer interface.

type NestedToolContainer

type NestedToolContainer interface {
	NestedTools() []ToolMessageItem
	SetNestedTools(tools []ToolMessageItem)
	AddNestedTool(tool ToolMessageItem)
}

NestedToolContainer is an interface for tool items that can contain nested tool calls.

type NotebookCreateToolMessageItem

type NotebookCreateToolMessageItem struct {
	// contains filtered or unexported fields
}

NotebookCreateToolMessageItem represents a notebook_create tool call.

func (NotebookCreateToolMessageItem) Animate

func (t NotebookCreateToolMessageItem) Animate(msg anim.StepMsg) tea.Cmd

Animate progresses the assistant message animation if it should be spinning.

Bumps the F6 list-cache version so the next draw re-renders this item: a spinner tick mutates anim's internal frame counter, which changes the rendered output but is invisible to the per-item caches. Without the bump the list cache would serve the previously rendered frame indefinitely and the spinner would appear frozen. The ID gate keeps unrelated ticks (routed here by a future change to chat.Animate's dispatch) from churning the cache.

func (NotebookCreateToolMessageItem) Finished

func (t NotebookCreateToolMessageItem) Finished() bool

Finished implements list.Item. A tool call is freezable once the tool call itself is marked finished AND a result has been recorded (or it has been canceled). Tools that override the spinning logic via spinningFunc would short-circuit live ticks; we still gate freezing on isSpinning to keep the contract conservative.

func (NotebookCreateToolMessageItem) HandleKeyEvent

func (t NotebookCreateToolMessageItem) HandleKeyEvent(key tea.KeyMsg) (bool, tea.Cmd)

HandleKeyEvent implements KeyEventHandler.

func (NotebookCreateToolMessageItem) HandleMouseClick

func (t NotebookCreateToolMessageItem) HandleMouseClick(btn ansi.MouseButton, x, y int) bool

HandleMouseClick implements MouseClickable.

func (NotebookCreateToolMessageItem) ID

func (t NotebookCreateToolMessageItem) ID() string

ID returns the unique identifier for this tool message item.

func (NotebookCreateToolMessageItem) MessageID

func (t NotebookCreateToolMessageItem) MessageID() string

MessageID returns the ID of the message containing this tool call.

func (NotebookCreateToolMessageItem) RawRender

func (t NotebookCreateToolMessageItem) RawRender(width int) string

RawRender implements MessageItem.

func (NotebookCreateToolMessageItem) Render

func (t NotebookCreateToolMessageItem) Render(width int) string

Render renders the tool message item at the given width.

func (NotebookCreateToolMessageItem) RenderPreview

func (t NotebookCreateToolMessageItem) RenderPreview(width int) string

RenderPreview renders the tool non-compact without cache or prefix. Bypasses isCompact so the caller gets the full content view regardless of the tool's stored compact state. The caller is responsible for passing the correct available width — no additional capping is applied here.

func (NotebookCreateToolMessageItem) SetCompact

func (t NotebookCreateToolMessageItem) SetCompact(compact bool)

SetCompact implements the Compactable interface.

func (NotebookCreateToolMessageItem) SetMessageID

func (t NotebookCreateToolMessageItem) SetMessageID(id string)

SetMessageID sets the ID of the message containing this tool call. MessageID is metadata only and does not affect the rendered output, so we deliberately do not bump the version here.

func (NotebookCreateToolMessageItem) SetResult

func (t NotebookCreateToolMessageItem) SetResult(res *message.ToolResult)

SetResult sets the tool result associated with this message item.

func (NotebookCreateToolMessageItem) SetSpinningFunc

func (t NotebookCreateToolMessageItem) SetSpinningFunc(fn SpinningFunc)

SetSpinningFunc sets a custom function to determine if the tool should spin.

func (NotebookCreateToolMessageItem) SetStatus

func (t NotebookCreateToolMessageItem) SetStatus(status ToolStatus)

SetStatus sets the tool status.

func (NotebookCreateToolMessageItem) SetToolCall

func (t NotebookCreateToolMessageItem) SetToolCall(tc message.ToolCall)

SetToolCall sets the tool call associated with this message item.

func (NotebookCreateToolMessageItem) StartAnimation

func (t NotebookCreateToolMessageItem) StartAnimation() tea.Cmd

StartAnimation starts the assistant message animation if it should be spinning.

func (NotebookCreateToolMessageItem) Status

func (t NotebookCreateToolMessageItem) Status() ToolStatus

Status returns the current tool status.

func (NotebookCreateToolMessageItem) ToggleExpanded

func (t NotebookCreateToolMessageItem) ToggleExpanded() bool

ToggleExpanded toggles the expanded state of the thinking box.

func (NotebookCreateToolMessageItem) ToolCall

func (t NotebookCreateToolMessageItem) ToolCall() message.ToolCall

ToolCall returns the tool call associated with this message item.

type NotebookCreateToolRenderContext

type NotebookCreateToolRenderContext struct{}

NotebookCreateToolRenderContext renders notebook_create tool messages.

func (*NotebookCreateToolRenderContext) RenderTool

func (n *NotebookCreateToolRenderContext) RenderTool(sty *styles.Styles, width int, opts *ToolRenderOpts) string

type NotebookEditToolMessageItem

type NotebookEditToolMessageItem struct {
	// contains filtered or unexported fields
}

NotebookEditToolMessageItem represents a notebook_edit tool call.

func (NotebookEditToolMessageItem) Animate

func (t NotebookEditToolMessageItem) Animate(msg anim.StepMsg) tea.Cmd

Animate progresses the assistant message animation if it should be spinning.

Bumps the F6 list-cache version so the next draw re-renders this item: a spinner tick mutates anim's internal frame counter, which changes the rendered output but is invisible to the per-item caches. Without the bump the list cache would serve the previously rendered frame indefinitely and the spinner would appear frozen. The ID gate keeps unrelated ticks (routed here by a future change to chat.Animate's dispatch) from churning the cache.

func (NotebookEditToolMessageItem) Finished

func (t NotebookEditToolMessageItem) Finished() bool

Finished implements list.Item. A tool call is freezable once the tool call itself is marked finished AND a result has been recorded (or it has been canceled). Tools that override the spinning logic via spinningFunc would short-circuit live ticks; we still gate freezing on isSpinning to keep the contract conservative.

func (NotebookEditToolMessageItem) HandleKeyEvent

func (t NotebookEditToolMessageItem) HandleKeyEvent(key tea.KeyMsg) (bool, tea.Cmd)

HandleKeyEvent implements KeyEventHandler.

func (NotebookEditToolMessageItem) HandleMouseClick

func (t NotebookEditToolMessageItem) HandleMouseClick(btn ansi.MouseButton, x, y int) bool

HandleMouseClick implements MouseClickable.

func (NotebookEditToolMessageItem) ID

func (t NotebookEditToolMessageItem) ID() string

ID returns the unique identifier for this tool message item.

func (NotebookEditToolMessageItem) MessageID

func (t NotebookEditToolMessageItem) MessageID() string

MessageID returns the ID of the message containing this tool call.

func (NotebookEditToolMessageItem) RawRender

func (t NotebookEditToolMessageItem) RawRender(width int) string

RawRender implements MessageItem.

func (NotebookEditToolMessageItem) Render

func (t NotebookEditToolMessageItem) Render(width int) string

Render renders the tool message item at the given width.

func (NotebookEditToolMessageItem) RenderPreview

func (t NotebookEditToolMessageItem) RenderPreview(width int) string

RenderPreview renders the tool non-compact without cache or prefix. Bypasses isCompact so the caller gets the full content view regardless of the tool's stored compact state. The caller is responsible for passing the correct available width — no additional capping is applied here.

func (NotebookEditToolMessageItem) SetCompact

func (t NotebookEditToolMessageItem) SetCompact(compact bool)

SetCompact implements the Compactable interface.

func (NotebookEditToolMessageItem) SetMessageID

func (t NotebookEditToolMessageItem) SetMessageID(id string)

SetMessageID sets the ID of the message containing this tool call. MessageID is metadata only and does not affect the rendered output, so we deliberately do not bump the version here.

func (NotebookEditToolMessageItem) SetResult

func (t NotebookEditToolMessageItem) SetResult(res *message.ToolResult)

SetResult sets the tool result associated with this message item.

func (NotebookEditToolMessageItem) SetSpinningFunc

func (t NotebookEditToolMessageItem) SetSpinningFunc(fn SpinningFunc)

SetSpinningFunc sets a custom function to determine if the tool should spin.

func (NotebookEditToolMessageItem) SetStatus

func (t NotebookEditToolMessageItem) SetStatus(status ToolStatus)

SetStatus sets the tool status.

func (NotebookEditToolMessageItem) SetToolCall

func (t NotebookEditToolMessageItem) SetToolCall(tc message.ToolCall)

SetToolCall sets the tool call associated with this message item.

func (NotebookEditToolMessageItem) StartAnimation

func (t NotebookEditToolMessageItem) StartAnimation() tea.Cmd

StartAnimation starts the assistant message animation if it should be spinning.

func (NotebookEditToolMessageItem) Status

func (t NotebookEditToolMessageItem) Status() ToolStatus

Status returns the current tool status.

func (NotebookEditToolMessageItem) ToggleExpanded

func (t NotebookEditToolMessageItem) ToggleExpanded() bool

ToggleExpanded toggles the expanded state of the thinking box.

func (NotebookEditToolMessageItem) ToolCall

func (t NotebookEditToolMessageItem) ToolCall() message.ToolCall

ToolCall returns the tool call associated with this message item.

type NotebookEditToolRenderContext

type NotebookEditToolRenderContext struct{}

NotebookEditToolRenderContext renders notebook_edit tool messages.

func (*NotebookEditToolRenderContext) RenderTool

func (n *NotebookEditToolRenderContext) RenderTool(sty *styles.Styles, width int, opts *ToolRenderOpts) string

RenderTool implements the ToolRenderer interface.

type NotebookWriteToolMessageItem

type NotebookWriteToolMessageItem struct {
	// contains filtered or unexported fields
}

NotebookWriteToolMessageItem represents a notebook_write tool call.

func (NotebookWriteToolMessageItem) Animate

func (t NotebookWriteToolMessageItem) Animate(msg anim.StepMsg) tea.Cmd

Animate progresses the assistant message animation if it should be spinning.

Bumps the F6 list-cache version so the next draw re-renders this item: a spinner tick mutates anim's internal frame counter, which changes the rendered output but is invisible to the per-item caches. Without the bump the list cache would serve the previously rendered frame indefinitely and the spinner would appear frozen. The ID gate keeps unrelated ticks (routed here by a future change to chat.Animate's dispatch) from churning the cache.

func (NotebookWriteToolMessageItem) Finished

func (t NotebookWriteToolMessageItem) Finished() bool

Finished implements list.Item. A tool call is freezable once the tool call itself is marked finished AND a result has been recorded (or it has been canceled). Tools that override the spinning logic via spinningFunc would short-circuit live ticks; we still gate freezing on isSpinning to keep the contract conservative.

func (NotebookWriteToolMessageItem) HandleKeyEvent

func (t NotebookWriteToolMessageItem) HandleKeyEvent(key tea.KeyMsg) (bool, tea.Cmd)

HandleKeyEvent implements KeyEventHandler.

func (NotebookWriteToolMessageItem) HandleMouseClick

func (t NotebookWriteToolMessageItem) HandleMouseClick(btn ansi.MouseButton, x, y int) bool

HandleMouseClick implements MouseClickable.

func (NotebookWriteToolMessageItem) ID

func (t NotebookWriteToolMessageItem) ID() string

ID returns the unique identifier for this tool message item.

func (NotebookWriteToolMessageItem) MessageID

func (t NotebookWriteToolMessageItem) MessageID() string

MessageID returns the ID of the message containing this tool call.

func (NotebookWriteToolMessageItem) RawRender

func (t NotebookWriteToolMessageItem) RawRender(width int) string

RawRender implements MessageItem.

func (NotebookWriteToolMessageItem) Render

func (t NotebookWriteToolMessageItem) Render(width int) string

Render renders the tool message item at the given width.

func (NotebookWriteToolMessageItem) RenderPreview

func (t NotebookWriteToolMessageItem) RenderPreview(width int) string

RenderPreview renders the tool non-compact without cache or prefix. Bypasses isCompact so the caller gets the full content view regardless of the tool's stored compact state. The caller is responsible for passing the correct available width — no additional capping is applied here.

func (NotebookWriteToolMessageItem) SetCompact

func (t NotebookWriteToolMessageItem) SetCompact(compact bool)

SetCompact implements the Compactable interface.

func (NotebookWriteToolMessageItem) SetMessageID

func (t NotebookWriteToolMessageItem) SetMessageID(id string)

SetMessageID sets the ID of the message containing this tool call. MessageID is metadata only and does not affect the rendered output, so we deliberately do not bump the version here.

func (NotebookWriteToolMessageItem) SetResult

func (t NotebookWriteToolMessageItem) SetResult(res *message.ToolResult)

SetResult sets the tool result associated with this message item.

func (NotebookWriteToolMessageItem) SetSpinningFunc

func (t NotebookWriteToolMessageItem) SetSpinningFunc(fn SpinningFunc)

SetSpinningFunc sets a custom function to determine if the tool should spin.

func (NotebookWriteToolMessageItem) SetStatus

func (t NotebookWriteToolMessageItem) SetStatus(status ToolStatus)

SetStatus sets the tool status.

func (NotebookWriteToolMessageItem) SetToolCall

func (t NotebookWriteToolMessageItem) SetToolCall(tc message.ToolCall)

SetToolCall sets the tool call associated with this message item.

func (NotebookWriteToolMessageItem) StartAnimation

func (t NotebookWriteToolMessageItem) StartAnimation() tea.Cmd

StartAnimation starts the assistant message animation if it should be spinning.

func (NotebookWriteToolMessageItem) Status

func (t NotebookWriteToolMessageItem) Status() ToolStatus

Status returns the current tool status.

func (NotebookWriteToolMessageItem) ToggleExpanded

func (t NotebookWriteToolMessageItem) ToggleExpanded() bool

ToggleExpanded toggles the expanded state of the thinking box.

func (NotebookWriteToolMessageItem) ToolCall

func (t NotebookWriteToolMessageItem) ToolCall() message.ToolCall

ToolCall returns the tool call associated with this message item.

type NotebookWriteToolRenderContext

type NotebookWriteToolRenderContext struct{}

NotebookWriteToolRenderContext renders notebook_write tool messages.

func (*NotebookWriteToolRenderContext) RenderTool

func (n *NotebookWriteToolRenderContext) RenderTool(sty *styles.Styles, width int, opts *ToolRenderOpts) string

type ReadDocumentURLToolMessageItem

type ReadDocumentURLToolMessageItem struct {
	// contains filtered or unexported fields
}

ReadDocumentURLToolMessageItem represents a read_document_url tool call.

func (ReadDocumentURLToolMessageItem) Animate

func (t ReadDocumentURLToolMessageItem) Animate(msg anim.StepMsg) tea.Cmd

Animate progresses the assistant message animation if it should be spinning.

Bumps the F6 list-cache version so the next draw re-renders this item: a spinner tick mutates anim's internal frame counter, which changes the rendered output but is invisible to the per-item caches. Without the bump the list cache would serve the previously rendered frame indefinitely and the spinner would appear frozen. The ID gate keeps unrelated ticks (routed here by a future change to chat.Animate's dispatch) from churning the cache.

func (ReadDocumentURLToolMessageItem) Finished

func (t ReadDocumentURLToolMessageItem) Finished() bool

Finished implements list.Item. A tool call is freezable once the tool call itself is marked finished AND a result has been recorded (or it has been canceled). Tools that override the spinning logic via spinningFunc would short-circuit live ticks; we still gate freezing on isSpinning to keep the contract conservative.

func (ReadDocumentURLToolMessageItem) HandleKeyEvent

func (t ReadDocumentURLToolMessageItem) HandleKeyEvent(key tea.KeyMsg) (bool, tea.Cmd)

HandleKeyEvent implements KeyEventHandler.

func (ReadDocumentURLToolMessageItem) HandleMouseClick

func (t ReadDocumentURLToolMessageItem) HandleMouseClick(btn ansi.MouseButton, x, y int) bool

HandleMouseClick implements MouseClickable.

func (ReadDocumentURLToolMessageItem) ID

func (t ReadDocumentURLToolMessageItem) ID() string

ID returns the unique identifier for this tool message item.

func (ReadDocumentURLToolMessageItem) MessageID

func (t ReadDocumentURLToolMessageItem) MessageID() string

MessageID returns the ID of the message containing this tool call.

func (ReadDocumentURLToolMessageItem) RawRender

func (t ReadDocumentURLToolMessageItem) RawRender(width int) string

RawRender implements MessageItem.

func (ReadDocumentURLToolMessageItem) Render

func (t ReadDocumentURLToolMessageItem) Render(width int) string

Render renders the tool message item at the given width.

func (ReadDocumentURLToolMessageItem) RenderPreview

func (t ReadDocumentURLToolMessageItem) RenderPreview(width int) string

RenderPreview renders the tool non-compact without cache or prefix. Bypasses isCompact so the caller gets the full content view regardless of the tool's stored compact state. The caller is responsible for passing the correct available width — no additional capping is applied here.

func (ReadDocumentURLToolMessageItem) SetCompact

func (t ReadDocumentURLToolMessageItem) SetCompact(compact bool)

SetCompact implements the Compactable interface.

func (ReadDocumentURLToolMessageItem) SetMessageID

func (t ReadDocumentURLToolMessageItem) SetMessageID(id string)

SetMessageID sets the ID of the message containing this tool call. MessageID is metadata only and does not affect the rendered output, so we deliberately do not bump the version here.

func (ReadDocumentURLToolMessageItem) SetResult

func (t ReadDocumentURLToolMessageItem) SetResult(res *message.ToolResult)

SetResult sets the tool result associated with this message item.

func (ReadDocumentURLToolMessageItem) SetSpinningFunc

func (t ReadDocumentURLToolMessageItem) SetSpinningFunc(fn SpinningFunc)

SetSpinningFunc sets a custom function to determine if the tool should spin.

func (ReadDocumentURLToolMessageItem) SetStatus

func (t ReadDocumentURLToolMessageItem) SetStatus(status ToolStatus)

SetStatus sets the tool status.

func (ReadDocumentURLToolMessageItem) SetToolCall

func (t ReadDocumentURLToolMessageItem) SetToolCall(tc message.ToolCall)

SetToolCall sets the tool call associated with this message item.

func (ReadDocumentURLToolMessageItem) StartAnimation

func (t ReadDocumentURLToolMessageItem) StartAnimation() tea.Cmd

StartAnimation starts the assistant message animation if it should be spinning.

func (ReadDocumentURLToolMessageItem) Status

func (t ReadDocumentURLToolMessageItem) Status() ToolStatus

Status returns the current tool status.

func (ReadDocumentURLToolMessageItem) ToggleExpanded

func (t ReadDocumentURLToolMessageItem) ToggleExpanded() bool

ToggleExpanded toggles the expanded state of the thinking box.

func (ReadDocumentURLToolMessageItem) ToolCall

func (t ReadDocumentURLToolMessageItem) ToolCall() message.ToolCall

ToolCall returns the tool call associated with this message item.

type ReadDocumentURLToolRenderContext

type ReadDocumentURLToolRenderContext struct{}

ReadDocumentURLToolRenderContext renders read_document_url tool messages.

func (*ReadDocumentURLToolRenderContext) RenderTool

func (r *ReadDocumentURLToolRenderContext) RenderTool(sty *styles.Styles, width int, opts *ToolRenderOpts) string

RenderTool implements the ToolRenderer interface.

type ReferencesToolMessageItem

type ReferencesToolMessageItem struct {
	// contains filtered or unexported fields
}

ReferencesToolMessageItem is a message item that represents a references tool call.

func (ReferencesToolMessageItem) Animate

func (t ReferencesToolMessageItem) Animate(msg anim.StepMsg) tea.Cmd

Animate progresses the assistant message animation if it should be spinning.

Bumps the F6 list-cache version so the next draw re-renders this item: a spinner tick mutates anim's internal frame counter, which changes the rendered output but is invisible to the per-item caches. Without the bump the list cache would serve the previously rendered frame indefinitely and the spinner would appear frozen. The ID gate keeps unrelated ticks (routed here by a future change to chat.Animate's dispatch) from churning the cache.

func (ReferencesToolMessageItem) Finished

func (t ReferencesToolMessageItem) Finished() bool

Finished implements list.Item. A tool call is freezable once the tool call itself is marked finished AND a result has been recorded (or it has been canceled). Tools that override the spinning logic via spinningFunc would short-circuit live ticks; we still gate freezing on isSpinning to keep the contract conservative.

func (ReferencesToolMessageItem) HandleKeyEvent

func (t ReferencesToolMessageItem) HandleKeyEvent(key tea.KeyMsg) (bool, tea.Cmd)

HandleKeyEvent implements KeyEventHandler.

func (ReferencesToolMessageItem) HandleMouseClick

func (t ReferencesToolMessageItem) HandleMouseClick(btn ansi.MouseButton, x, y int) bool

HandleMouseClick implements MouseClickable.

func (ReferencesToolMessageItem) ID

func (t ReferencesToolMessageItem) ID() string

ID returns the unique identifier for this tool message item.

func (ReferencesToolMessageItem) MessageID

func (t ReferencesToolMessageItem) MessageID() string

MessageID returns the ID of the message containing this tool call.

func (ReferencesToolMessageItem) RawRender

func (t ReferencesToolMessageItem) RawRender(width int) string

RawRender implements MessageItem.

func (ReferencesToolMessageItem) Render

func (t ReferencesToolMessageItem) Render(width int) string

Render renders the tool message item at the given width.

func (ReferencesToolMessageItem) RenderPreview

func (t ReferencesToolMessageItem) RenderPreview(width int) string

RenderPreview renders the tool non-compact without cache or prefix. Bypasses isCompact so the caller gets the full content view regardless of the tool's stored compact state. The caller is responsible for passing the correct available width — no additional capping is applied here.

func (ReferencesToolMessageItem) SetCompact

func (t ReferencesToolMessageItem) SetCompact(compact bool)

SetCompact implements the Compactable interface.

func (ReferencesToolMessageItem) SetMessageID

func (t ReferencesToolMessageItem) SetMessageID(id string)

SetMessageID sets the ID of the message containing this tool call. MessageID is metadata only and does not affect the rendered output, so we deliberately do not bump the version here.

func (ReferencesToolMessageItem) SetResult

func (t ReferencesToolMessageItem) SetResult(res *message.ToolResult)

SetResult sets the tool result associated with this message item.

func (ReferencesToolMessageItem) SetSpinningFunc

func (t ReferencesToolMessageItem) SetSpinningFunc(fn SpinningFunc)

SetSpinningFunc sets a custom function to determine if the tool should spin.

func (ReferencesToolMessageItem) SetStatus

func (t ReferencesToolMessageItem) SetStatus(status ToolStatus)

SetStatus sets the tool status.

func (ReferencesToolMessageItem) SetToolCall

func (t ReferencesToolMessageItem) SetToolCall(tc message.ToolCall)

SetToolCall sets the tool call associated with this message item.

func (ReferencesToolMessageItem) StartAnimation

func (t ReferencesToolMessageItem) StartAnimation() tea.Cmd

StartAnimation starts the assistant message animation if it should be spinning.

func (ReferencesToolMessageItem) Status

func (t ReferencesToolMessageItem) Status() ToolStatus

Status returns the current tool status.

func (ReferencesToolMessageItem) ToggleExpanded

func (t ReferencesToolMessageItem) ToggleExpanded() bool

ToggleExpanded toggles the expanded state of the thinking box.

func (ReferencesToolMessageItem) ToolCall

func (t ReferencesToolMessageItem) ToolCall() message.ToolCall

ToolCall returns the tool call associated with this message item.

type ReferencesToolRenderContext

type ReferencesToolRenderContext struct{}

ReferencesToolRenderContext renders references tool messages.

func (*ReferencesToolRenderContext) RenderTool

func (r *ReferencesToolRenderContext) RenderTool(sty *styles.Styles, width int, opts *ToolRenderOpts) string

RenderTool implements the ToolRenderer interface.

type RemoveFileToolMessageItem

type RemoveFileToolMessageItem struct {
	// contains filtered or unexported fields
}

RemoveFileToolMessageItem is a message item that represents a remove_file tool call.

func (RemoveFileToolMessageItem) Animate

func (t RemoveFileToolMessageItem) Animate(msg anim.StepMsg) tea.Cmd

Animate progresses the assistant message animation if it should be spinning.

Bumps the F6 list-cache version so the next draw re-renders this item: a spinner tick mutates anim's internal frame counter, which changes the rendered output but is invisible to the per-item caches. Without the bump the list cache would serve the previously rendered frame indefinitely and the spinner would appear frozen. The ID gate keeps unrelated ticks (routed here by a future change to chat.Animate's dispatch) from churning the cache.

func (RemoveFileToolMessageItem) Finished

func (t RemoveFileToolMessageItem) Finished() bool

Finished implements list.Item. A tool call is freezable once the tool call itself is marked finished AND a result has been recorded (or it has been canceled). Tools that override the spinning logic via spinningFunc would short-circuit live ticks; we still gate freezing on isSpinning to keep the contract conservative.

func (RemoveFileToolMessageItem) HandleKeyEvent

func (t RemoveFileToolMessageItem) HandleKeyEvent(key tea.KeyMsg) (bool, tea.Cmd)

HandleKeyEvent implements KeyEventHandler.

func (RemoveFileToolMessageItem) HandleMouseClick

func (t RemoveFileToolMessageItem) HandleMouseClick(btn ansi.MouseButton, x, y int) bool

HandleMouseClick implements MouseClickable.

func (RemoveFileToolMessageItem) ID

func (t RemoveFileToolMessageItem) ID() string

ID returns the unique identifier for this tool message item.

func (RemoveFileToolMessageItem) MessageID

func (t RemoveFileToolMessageItem) MessageID() string

MessageID returns the ID of the message containing this tool call.

func (RemoveFileToolMessageItem) RawRender

func (t RemoveFileToolMessageItem) RawRender(width int) string

RawRender implements MessageItem.

func (RemoveFileToolMessageItem) Render

func (t RemoveFileToolMessageItem) Render(width int) string

Render renders the tool message item at the given width.

func (RemoveFileToolMessageItem) RenderPreview

func (t RemoveFileToolMessageItem) RenderPreview(width int) string

RenderPreview renders the tool non-compact without cache or prefix. Bypasses isCompact so the caller gets the full content view regardless of the tool's stored compact state. The caller is responsible for passing the correct available width — no additional capping is applied here.

func (RemoveFileToolMessageItem) SetCompact

func (t RemoveFileToolMessageItem) SetCompact(compact bool)

SetCompact implements the Compactable interface.

func (RemoveFileToolMessageItem) SetMessageID

func (t RemoveFileToolMessageItem) SetMessageID(id string)

SetMessageID sets the ID of the message containing this tool call. MessageID is metadata only and does not affect the rendered output, so we deliberately do not bump the version here.

func (RemoveFileToolMessageItem) SetResult

func (t RemoveFileToolMessageItem) SetResult(res *message.ToolResult)

SetResult sets the tool result associated with this message item.

func (RemoveFileToolMessageItem) SetSpinningFunc

func (t RemoveFileToolMessageItem) SetSpinningFunc(fn SpinningFunc)

SetSpinningFunc sets a custom function to determine if the tool should spin.

func (RemoveFileToolMessageItem) SetStatus

func (t RemoveFileToolMessageItem) SetStatus(status ToolStatus)

SetStatus sets the tool status.

func (RemoveFileToolMessageItem) SetToolCall

func (t RemoveFileToolMessageItem) SetToolCall(tc message.ToolCall)

SetToolCall sets the tool call associated with this message item.

func (RemoveFileToolMessageItem) StartAnimation

func (t RemoveFileToolMessageItem) StartAnimation() tea.Cmd

StartAnimation starts the assistant message animation if it should be spinning.

func (RemoveFileToolMessageItem) Status

func (t RemoveFileToolMessageItem) Status() ToolStatus

Status returns the current tool status.

func (RemoveFileToolMessageItem) ToggleExpanded

func (t RemoveFileToolMessageItem) ToggleExpanded() bool

ToggleExpanded toggles the expanded state of the thinking box.

func (RemoveFileToolMessageItem) ToolCall

func (t RemoveFileToolMessageItem) ToolCall() message.ToolCall

ToolCall returns the tool call associated with this message item.

type RemoveFileToolRenderContext

type RemoveFileToolRenderContext struct{}

RemoveFileToolRenderContext renders remove_file tool messages.

func (*RemoveFileToolRenderContext) RenderTool

func (r *RemoveFileToolRenderContext) RenderTool(sty *styles.Styles, width int, opts *ToolRenderOpts) string

RenderTool implements the ToolRenderer interface.

type ResumeAgentToolMessageItem

type ResumeAgentToolMessageItem struct {
	// contains filtered or unexported fields
}

ResumeAgentToolMessageItem represents a resume_agent tool call.

func (ResumeAgentToolMessageItem) Animate

func (t ResumeAgentToolMessageItem) Animate(msg anim.StepMsg) tea.Cmd

Animate progresses the assistant message animation if it should be spinning.

Bumps the F6 list-cache version so the next draw re-renders this item: a spinner tick mutates anim's internal frame counter, which changes the rendered output but is invisible to the per-item caches. Without the bump the list cache would serve the previously rendered frame indefinitely and the spinner would appear frozen. The ID gate keeps unrelated ticks (routed here by a future change to chat.Animate's dispatch) from churning the cache.

func (ResumeAgentToolMessageItem) Finished

func (t ResumeAgentToolMessageItem) Finished() bool

Finished implements list.Item. A tool call is freezable once the tool call itself is marked finished AND a result has been recorded (or it has been canceled). Tools that override the spinning logic via spinningFunc would short-circuit live ticks; we still gate freezing on isSpinning to keep the contract conservative.

func (ResumeAgentToolMessageItem) HandleKeyEvent

func (t ResumeAgentToolMessageItem) HandleKeyEvent(key tea.KeyMsg) (bool, tea.Cmd)

HandleKeyEvent implements KeyEventHandler.

func (ResumeAgentToolMessageItem) HandleMouseClick

func (t ResumeAgentToolMessageItem) HandleMouseClick(btn ansi.MouseButton, x, y int) bool

HandleMouseClick implements MouseClickable.

func (ResumeAgentToolMessageItem) ID

func (t ResumeAgentToolMessageItem) ID() string

ID returns the unique identifier for this tool message item.

func (ResumeAgentToolMessageItem) MessageID

func (t ResumeAgentToolMessageItem) MessageID() string

MessageID returns the ID of the message containing this tool call.

func (ResumeAgentToolMessageItem) RawRender

func (t ResumeAgentToolMessageItem) RawRender(width int) string

RawRender implements MessageItem.

func (ResumeAgentToolMessageItem) Render

func (t ResumeAgentToolMessageItem) Render(width int) string

Render renders the tool message item at the given width.

func (ResumeAgentToolMessageItem) RenderPreview

func (t ResumeAgentToolMessageItem) RenderPreview(width int) string

RenderPreview renders the tool non-compact without cache or prefix. Bypasses isCompact so the caller gets the full content view regardless of the tool's stored compact state. The caller is responsible for passing the correct available width — no additional capping is applied here.

func (ResumeAgentToolMessageItem) SetCompact

func (t ResumeAgentToolMessageItem) SetCompact(compact bool)

SetCompact implements the Compactable interface.

func (ResumeAgentToolMessageItem) SetMessageID

func (t ResumeAgentToolMessageItem) SetMessageID(id string)

SetMessageID sets the ID of the message containing this tool call. MessageID is metadata only and does not affect the rendered output, so we deliberately do not bump the version here.

func (ResumeAgentToolMessageItem) SetResult

func (t ResumeAgentToolMessageItem) SetResult(res *message.ToolResult)

SetResult sets the tool result associated with this message item.

func (ResumeAgentToolMessageItem) SetSpinningFunc

func (t ResumeAgentToolMessageItem) SetSpinningFunc(fn SpinningFunc)

SetSpinningFunc sets a custom function to determine if the tool should spin.

func (ResumeAgentToolMessageItem) SetStatus

func (t ResumeAgentToolMessageItem) SetStatus(status ToolStatus)

SetStatus sets the tool status.

func (ResumeAgentToolMessageItem) SetToolCall

func (t ResumeAgentToolMessageItem) SetToolCall(tc message.ToolCall)

SetToolCall sets the tool call associated with this message item.

func (ResumeAgentToolMessageItem) StartAnimation

func (t ResumeAgentToolMessageItem) StartAnimation() tea.Cmd

StartAnimation starts the assistant message animation if it should be spinning.

func (ResumeAgentToolMessageItem) Status

func (t ResumeAgentToolMessageItem) Status() ToolStatus

Status returns the current tool status.

func (ResumeAgentToolMessageItem) ToggleExpanded

func (t ResumeAgentToolMessageItem) ToggleExpanded() bool

ToggleExpanded toggles the expanded state of the thinking box.

func (ResumeAgentToolMessageItem) ToolCall

func (t ResumeAgentToolMessageItem) ToolCall() message.ToolCall

ToolCall returns the tool call associated with this message item.

type ResumeAgentToolRenderContext

type ResumeAgentToolRenderContext struct{}

ResumeAgentToolRenderContext renders resume_agent tool messages.

func (*ResumeAgentToolRenderContext) RenderTool

func (r *ResumeAgentToolRenderContext) RenderTool(sty *styles.Styles, width int, opts *ToolRenderOpts) string

RenderTool implements the ToolRenderer interface.

type SendAgentMessageToolMessageItem

type SendAgentMessageToolMessageItem struct {
	// contains filtered or unexported fields
}

SendAgentMessageToolMessageItem represents a send_agent_message tool call.

func (SendAgentMessageToolMessageItem) Animate

func (t SendAgentMessageToolMessageItem) Animate(msg anim.StepMsg) tea.Cmd

Animate progresses the assistant message animation if it should be spinning.

Bumps the F6 list-cache version so the next draw re-renders this item: a spinner tick mutates anim's internal frame counter, which changes the rendered output but is invisible to the per-item caches. Without the bump the list cache would serve the previously rendered frame indefinitely and the spinner would appear frozen. The ID gate keeps unrelated ticks (routed here by a future change to chat.Animate's dispatch) from churning the cache.

func (SendAgentMessageToolMessageItem) Finished

func (t SendAgentMessageToolMessageItem) Finished() bool

Finished implements list.Item. A tool call is freezable once the tool call itself is marked finished AND a result has been recorded (or it has been canceled). Tools that override the spinning logic via spinningFunc would short-circuit live ticks; we still gate freezing on isSpinning to keep the contract conservative.

func (SendAgentMessageToolMessageItem) HandleKeyEvent

func (t SendAgentMessageToolMessageItem) HandleKeyEvent(key tea.KeyMsg) (bool, tea.Cmd)

HandleKeyEvent implements KeyEventHandler.

func (SendAgentMessageToolMessageItem) HandleMouseClick

func (t SendAgentMessageToolMessageItem) HandleMouseClick(btn ansi.MouseButton, x, y int) bool

HandleMouseClick implements MouseClickable.

func (SendAgentMessageToolMessageItem) ID

func (t SendAgentMessageToolMessageItem) ID() string

ID returns the unique identifier for this tool message item.

func (SendAgentMessageToolMessageItem) MessageID

func (t SendAgentMessageToolMessageItem) MessageID() string

MessageID returns the ID of the message containing this tool call.

func (SendAgentMessageToolMessageItem) RawRender

func (t SendAgentMessageToolMessageItem) RawRender(width int) string

RawRender implements MessageItem.

func (SendAgentMessageToolMessageItem) Render

func (t SendAgentMessageToolMessageItem) Render(width int) string

Render renders the tool message item at the given width.

func (SendAgentMessageToolMessageItem) RenderPreview

func (t SendAgentMessageToolMessageItem) RenderPreview(width int) string

RenderPreview renders the tool non-compact without cache or prefix. Bypasses isCompact so the caller gets the full content view regardless of the tool's stored compact state. The caller is responsible for passing the correct available width — no additional capping is applied here.

func (SendAgentMessageToolMessageItem) SetCompact

func (t SendAgentMessageToolMessageItem) SetCompact(compact bool)

SetCompact implements the Compactable interface.

func (SendAgentMessageToolMessageItem) SetMessageID

func (t SendAgentMessageToolMessageItem) SetMessageID(id string)

SetMessageID sets the ID of the message containing this tool call. MessageID is metadata only and does not affect the rendered output, so we deliberately do not bump the version here.

func (SendAgentMessageToolMessageItem) SetResult

func (t SendAgentMessageToolMessageItem) SetResult(res *message.ToolResult)

SetResult sets the tool result associated with this message item.

func (SendAgentMessageToolMessageItem) SetSpinningFunc

func (t SendAgentMessageToolMessageItem) SetSpinningFunc(fn SpinningFunc)

SetSpinningFunc sets a custom function to determine if the tool should spin.

func (SendAgentMessageToolMessageItem) SetStatus

func (t SendAgentMessageToolMessageItem) SetStatus(status ToolStatus)

SetStatus sets the tool status.

func (SendAgentMessageToolMessageItem) SetToolCall

func (t SendAgentMessageToolMessageItem) SetToolCall(tc message.ToolCall)

SetToolCall sets the tool call associated with this message item.

func (SendAgentMessageToolMessageItem) StartAnimation

func (t SendAgentMessageToolMessageItem) StartAnimation() tea.Cmd

StartAnimation starts the assistant message animation if it should be spinning.

func (SendAgentMessageToolMessageItem) Status

func (t SendAgentMessageToolMessageItem) Status() ToolStatus

Status returns the current tool status.

func (SendAgentMessageToolMessageItem) ToggleExpanded

func (t SendAgentMessageToolMessageItem) ToggleExpanded() bool

ToggleExpanded toggles the expanded state of the thinking box.

func (SendAgentMessageToolMessageItem) ToolCall

func (t SendAgentMessageToolMessageItem) ToolCall() message.ToolCall

ToolCall returns the tool call associated with this message item.

type SendAgentMessageToolRenderContext

type SendAgentMessageToolRenderContext struct{}

SendAgentMessageToolRenderContext renders send_agent_message tool messages.

func (*SendAgentMessageToolRenderContext) RenderTool

func (s *SendAgentMessageToolRenderContext) RenderTool(sty *styles.Styles, width int, opts *ToolRenderOpts) string

RenderTool implements the ToolRenderer interface.

type SendMsg

type SendMsg struct {
	Text        string
	Attachments []message.Attachment
}

SendMsg represents a message to send a chat message.

type SeshatListSkillsToolMessageItem

type SeshatListSkillsToolMessageItem struct {
	// contains filtered or unexported fields
}

SeshatListSkillsToolMessageItem represents a seshat_list_skills tool call.

func (SeshatListSkillsToolMessageItem) Animate

func (t SeshatListSkillsToolMessageItem) Animate(msg anim.StepMsg) tea.Cmd

Animate progresses the assistant message animation if it should be spinning.

Bumps the F6 list-cache version so the next draw re-renders this item: a spinner tick mutates anim's internal frame counter, which changes the rendered output but is invisible to the per-item caches. Without the bump the list cache would serve the previously rendered frame indefinitely and the spinner would appear frozen. The ID gate keeps unrelated ticks (routed here by a future change to chat.Animate's dispatch) from churning the cache.

func (SeshatListSkillsToolMessageItem) Finished

func (t SeshatListSkillsToolMessageItem) Finished() bool

Finished implements list.Item. A tool call is freezable once the tool call itself is marked finished AND a result has been recorded (or it has been canceled). Tools that override the spinning logic via spinningFunc would short-circuit live ticks; we still gate freezing on isSpinning to keep the contract conservative.

func (SeshatListSkillsToolMessageItem) HandleKeyEvent

func (t SeshatListSkillsToolMessageItem) HandleKeyEvent(key tea.KeyMsg) (bool, tea.Cmd)

HandleKeyEvent implements KeyEventHandler.

func (SeshatListSkillsToolMessageItem) HandleMouseClick

func (t SeshatListSkillsToolMessageItem) HandleMouseClick(btn ansi.MouseButton, x, y int) bool

HandleMouseClick implements MouseClickable.

func (SeshatListSkillsToolMessageItem) ID

func (t SeshatListSkillsToolMessageItem) ID() string

ID returns the unique identifier for this tool message item.

func (SeshatListSkillsToolMessageItem) MessageID

func (t SeshatListSkillsToolMessageItem) MessageID() string

MessageID returns the ID of the message containing this tool call.

func (SeshatListSkillsToolMessageItem) RawRender

func (t SeshatListSkillsToolMessageItem) RawRender(width int) string

RawRender implements MessageItem.

func (SeshatListSkillsToolMessageItem) Render

func (t SeshatListSkillsToolMessageItem) Render(width int) string

Render renders the tool message item at the given width.

func (SeshatListSkillsToolMessageItem) RenderPreview

func (t SeshatListSkillsToolMessageItem) RenderPreview(width int) string

RenderPreview renders the tool non-compact without cache or prefix. Bypasses isCompact so the caller gets the full content view regardless of the tool's stored compact state. The caller is responsible for passing the correct available width — no additional capping is applied here.

func (SeshatListSkillsToolMessageItem) SetCompact

func (t SeshatListSkillsToolMessageItem) SetCompact(compact bool)

SetCompact implements the Compactable interface.

func (SeshatListSkillsToolMessageItem) SetMessageID

func (t SeshatListSkillsToolMessageItem) SetMessageID(id string)

SetMessageID sets the ID of the message containing this tool call. MessageID is metadata only and does not affect the rendered output, so we deliberately do not bump the version here.

func (SeshatListSkillsToolMessageItem) SetResult

func (t SeshatListSkillsToolMessageItem) SetResult(res *message.ToolResult)

SetResult sets the tool result associated with this message item.

func (SeshatListSkillsToolMessageItem) SetSpinningFunc

func (t SeshatListSkillsToolMessageItem) SetSpinningFunc(fn SpinningFunc)

SetSpinningFunc sets a custom function to determine if the tool should spin.

func (SeshatListSkillsToolMessageItem) SetStatus

func (t SeshatListSkillsToolMessageItem) SetStatus(status ToolStatus)

SetStatus sets the tool status.

func (SeshatListSkillsToolMessageItem) SetToolCall

func (t SeshatListSkillsToolMessageItem) SetToolCall(tc message.ToolCall)

SetToolCall sets the tool call associated with this message item.

func (SeshatListSkillsToolMessageItem) StartAnimation

func (t SeshatListSkillsToolMessageItem) StartAnimation() tea.Cmd

StartAnimation starts the assistant message animation if it should be spinning.

func (SeshatListSkillsToolMessageItem) Status

func (t SeshatListSkillsToolMessageItem) Status() ToolStatus

Status returns the current tool status.

func (SeshatListSkillsToolMessageItem) ToggleExpanded

func (t SeshatListSkillsToolMessageItem) ToggleExpanded() bool

ToggleExpanded toggles the expanded state of the thinking box.

func (SeshatListSkillsToolMessageItem) ToolCall

func (t SeshatListSkillsToolMessageItem) ToolCall() message.ToolCall

ToolCall returns the tool call associated with this message item.

type SeshatListSkillsToolRenderContext

type SeshatListSkillsToolRenderContext struct{}

SeshatListSkillsToolRenderContext renders seshat_list_skills tool messages.

func (*SeshatListSkillsToolRenderContext) RenderTool

func (n *SeshatListSkillsToolRenderContext) RenderTool(sty *styles.Styles, width int, opts *ToolRenderOpts) string

RenderTool implements the ToolRenderer interface.

type SeshatReadSkillToolMessageItem

type SeshatReadSkillToolMessageItem struct {
	// contains filtered or unexported fields
}

SeshatReadSkillToolMessageItem represents a seshat_read_skill tool call.

func (SeshatReadSkillToolMessageItem) Animate

func (t SeshatReadSkillToolMessageItem) Animate(msg anim.StepMsg) tea.Cmd

Animate progresses the assistant message animation if it should be spinning.

Bumps the F6 list-cache version so the next draw re-renders this item: a spinner tick mutates anim's internal frame counter, which changes the rendered output but is invisible to the per-item caches. Without the bump the list cache would serve the previously rendered frame indefinitely and the spinner would appear frozen. The ID gate keeps unrelated ticks (routed here by a future change to chat.Animate's dispatch) from churning the cache.

func (SeshatReadSkillToolMessageItem) Finished

func (t SeshatReadSkillToolMessageItem) Finished() bool

Finished implements list.Item. A tool call is freezable once the tool call itself is marked finished AND a result has been recorded (or it has been canceled). Tools that override the spinning logic via spinningFunc would short-circuit live ticks; we still gate freezing on isSpinning to keep the contract conservative.

func (SeshatReadSkillToolMessageItem) HandleKeyEvent

func (t SeshatReadSkillToolMessageItem) HandleKeyEvent(key tea.KeyMsg) (bool, tea.Cmd)

HandleKeyEvent implements KeyEventHandler.

func (SeshatReadSkillToolMessageItem) HandleMouseClick

func (t SeshatReadSkillToolMessageItem) HandleMouseClick(btn ansi.MouseButton, x, y int) bool

HandleMouseClick implements MouseClickable.

func (SeshatReadSkillToolMessageItem) ID

func (t SeshatReadSkillToolMessageItem) ID() string

ID returns the unique identifier for this tool message item.

func (SeshatReadSkillToolMessageItem) MessageID

func (t SeshatReadSkillToolMessageItem) MessageID() string

MessageID returns the ID of the message containing this tool call.

func (SeshatReadSkillToolMessageItem) RawRender

func (t SeshatReadSkillToolMessageItem) RawRender(width int) string

RawRender implements MessageItem.

func (SeshatReadSkillToolMessageItem) Render

func (t SeshatReadSkillToolMessageItem) Render(width int) string

Render renders the tool message item at the given width.

func (SeshatReadSkillToolMessageItem) RenderPreview

func (t SeshatReadSkillToolMessageItem) RenderPreview(width int) string

RenderPreview renders the tool non-compact without cache or prefix. Bypasses isCompact so the caller gets the full content view regardless of the tool's stored compact state. The caller is responsible for passing the correct available width — no additional capping is applied here.

func (SeshatReadSkillToolMessageItem) SetCompact

func (t SeshatReadSkillToolMessageItem) SetCompact(compact bool)

SetCompact implements the Compactable interface.

func (SeshatReadSkillToolMessageItem) SetMessageID

func (t SeshatReadSkillToolMessageItem) SetMessageID(id string)

SetMessageID sets the ID of the message containing this tool call. MessageID is metadata only and does not affect the rendered output, so we deliberately do not bump the version here.

func (SeshatReadSkillToolMessageItem) SetResult

func (t SeshatReadSkillToolMessageItem) SetResult(res *message.ToolResult)

SetResult sets the tool result associated with this message item.

func (SeshatReadSkillToolMessageItem) SetSpinningFunc

func (t SeshatReadSkillToolMessageItem) SetSpinningFunc(fn SpinningFunc)

SetSpinningFunc sets a custom function to determine if the tool should spin.

func (SeshatReadSkillToolMessageItem) SetStatus

func (t SeshatReadSkillToolMessageItem) SetStatus(status ToolStatus)

SetStatus sets the tool status.

func (SeshatReadSkillToolMessageItem) SetToolCall

func (t SeshatReadSkillToolMessageItem) SetToolCall(tc message.ToolCall)

SetToolCall sets the tool call associated with this message item.

func (SeshatReadSkillToolMessageItem) StartAnimation

func (t SeshatReadSkillToolMessageItem) StartAnimation() tea.Cmd

StartAnimation starts the assistant message animation if it should be spinning.

func (SeshatReadSkillToolMessageItem) Status

func (t SeshatReadSkillToolMessageItem) Status() ToolStatus

Status returns the current tool status.

func (SeshatReadSkillToolMessageItem) ToggleExpanded

func (t SeshatReadSkillToolMessageItem) ToggleExpanded() bool

ToggleExpanded toggles the expanded state of the thinking box.

func (SeshatReadSkillToolMessageItem) ToolCall

func (t SeshatReadSkillToolMessageItem) ToolCall() message.ToolCall

ToolCall returns the tool call associated with this message item.

type SeshatReadSkillToolRenderContext

type SeshatReadSkillToolRenderContext struct{}

SeshatReadSkillToolRenderContext renders seshat_read_skill tool messages.

func (*SeshatReadSkillToolRenderContext) RenderTool

func (n *SeshatReadSkillToolRenderContext) RenderTool(sty *styles.Styles, width int, opts *ToolRenderOpts) string

RenderTool implements the ToolRenderer interface.

type SeshatValidateSkillToolMessageItem

type SeshatValidateSkillToolMessageItem struct {
	// contains filtered or unexported fields
}

SeshatValidateSkillToolMessageItem represents a seshat_validate_skill tool call.

func (SeshatValidateSkillToolMessageItem) Animate

func (t SeshatValidateSkillToolMessageItem) Animate(msg anim.StepMsg) tea.Cmd

Animate progresses the assistant message animation if it should be spinning.

Bumps the F6 list-cache version so the next draw re-renders this item: a spinner tick mutates anim's internal frame counter, which changes the rendered output but is invisible to the per-item caches. Without the bump the list cache would serve the previously rendered frame indefinitely and the spinner would appear frozen. The ID gate keeps unrelated ticks (routed here by a future change to chat.Animate's dispatch) from churning the cache.

func (SeshatValidateSkillToolMessageItem) Finished

func (t SeshatValidateSkillToolMessageItem) Finished() bool

Finished implements list.Item. A tool call is freezable once the tool call itself is marked finished AND a result has been recorded (or it has been canceled). Tools that override the spinning logic via spinningFunc would short-circuit live ticks; we still gate freezing on isSpinning to keep the contract conservative.

func (SeshatValidateSkillToolMessageItem) HandleKeyEvent

func (t SeshatValidateSkillToolMessageItem) HandleKeyEvent(key tea.KeyMsg) (bool, tea.Cmd)

HandleKeyEvent implements KeyEventHandler.

func (SeshatValidateSkillToolMessageItem) HandleMouseClick

func (t SeshatValidateSkillToolMessageItem) HandleMouseClick(btn ansi.MouseButton, x, y int) bool

HandleMouseClick implements MouseClickable.

func (SeshatValidateSkillToolMessageItem) ID

func (t SeshatValidateSkillToolMessageItem) ID() string

ID returns the unique identifier for this tool message item.

func (SeshatValidateSkillToolMessageItem) MessageID

func (t SeshatValidateSkillToolMessageItem) MessageID() string

MessageID returns the ID of the message containing this tool call.

func (SeshatValidateSkillToolMessageItem) RawRender

func (t SeshatValidateSkillToolMessageItem) RawRender(width int) string

RawRender implements MessageItem.

func (SeshatValidateSkillToolMessageItem) Render

func (t SeshatValidateSkillToolMessageItem) Render(width int) string

Render renders the tool message item at the given width.

func (SeshatValidateSkillToolMessageItem) RenderPreview

func (t SeshatValidateSkillToolMessageItem) RenderPreview(width int) string

RenderPreview renders the tool non-compact without cache or prefix. Bypasses isCompact so the caller gets the full content view regardless of the tool's stored compact state. The caller is responsible for passing the correct available width — no additional capping is applied here.

func (SeshatValidateSkillToolMessageItem) SetCompact

func (t SeshatValidateSkillToolMessageItem) SetCompact(compact bool)

SetCompact implements the Compactable interface.

func (SeshatValidateSkillToolMessageItem) SetMessageID

func (t SeshatValidateSkillToolMessageItem) SetMessageID(id string)

SetMessageID sets the ID of the message containing this tool call. MessageID is metadata only and does not affect the rendered output, so we deliberately do not bump the version here.

func (SeshatValidateSkillToolMessageItem) SetResult

func (t SeshatValidateSkillToolMessageItem) SetResult(res *message.ToolResult)

SetResult sets the tool result associated with this message item.

func (SeshatValidateSkillToolMessageItem) SetSpinningFunc

func (t SeshatValidateSkillToolMessageItem) SetSpinningFunc(fn SpinningFunc)

SetSpinningFunc sets a custom function to determine if the tool should spin.

func (SeshatValidateSkillToolMessageItem) SetStatus

func (t SeshatValidateSkillToolMessageItem) SetStatus(status ToolStatus)

SetStatus sets the tool status.

func (SeshatValidateSkillToolMessageItem) SetToolCall

func (t SeshatValidateSkillToolMessageItem) SetToolCall(tc message.ToolCall)

SetToolCall sets the tool call associated with this message item.

func (SeshatValidateSkillToolMessageItem) StartAnimation

func (t SeshatValidateSkillToolMessageItem) StartAnimation() tea.Cmd

StartAnimation starts the assistant message animation if it should be spinning.

func (SeshatValidateSkillToolMessageItem) Status

func (t SeshatValidateSkillToolMessageItem) Status() ToolStatus

Status returns the current tool status.

func (SeshatValidateSkillToolMessageItem) ToggleExpanded

func (t SeshatValidateSkillToolMessageItem) ToggleExpanded() bool

ToggleExpanded toggles the expanded state of the thinking box.

func (SeshatValidateSkillToolMessageItem) ToolCall

func (t SeshatValidateSkillToolMessageItem) ToolCall() message.ToolCall

ToolCall returns the tool call associated with this message item.

type SeshatValidateSkillToolRenderContext

type SeshatValidateSkillToolRenderContext struct{}

SeshatValidateSkillToolRenderContext renders seshat_validate_skill tool messages.

func (*SeshatValidateSkillToolRenderContext) RenderTool

func (n *SeshatValidateSkillToolRenderContext) RenderTool(sty *styles.Styles, width int, opts *ToolRenderOpts) string

RenderTool implements the ToolRenderer interface.

type SkillToolMessageItem

type SkillToolMessageItem struct {
	// contains filtered or unexported fields
}

SkillToolMessageItem represents a skill tool call.

func (SkillToolMessageItem) Animate

func (t SkillToolMessageItem) Animate(msg anim.StepMsg) tea.Cmd

Animate progresses the assistant message animation if it should be spinning.

Bumps the F6 list-cache version so the next draw re-renders this item: a spinner tick mutates anim's internal frame counter, which changes the rendered output but is invisible to the per-item caches. Without the bump the list cache would serve the previously rendered frame indefinitely and the spinner would appear frozen. The ID gate keeps unrelated ticks (routed here by a future change to chat.Animate's dispatch) from churning the cache.

func (SkillToolMessageItem) Finished

func (t SkillToolMessageItem) Finished() bool

Finished implements list.Item. A tool call is freezable once the tool call itself is marked finished AND a result has been recorded (or it has been canceled). Tools that override the spinning logic via spinningFunc would short-circuit live ticks; we still gate freezing on isSpinning to keep the contract conservative.

func (SkillToolMessageItem) HandleKeyEvent

func (t SkillToolMessageItem) HandleKeyEvent(key tea.KeyMsg) (bool, tea.Cmd)

HandleKeyEvent implements KeyEventHandler.

func (SkillToolMessageItem) HandleMouseClick

func (t SkillToolMessageItem) HandleMouseClick(btn ansi.MouseButton, x, y int) bool

HandleMouseClick implements MouseClickable.

func (SkillToolMessageItem) ID

func (t SkillToolMessageItem) ID() string

ID returns the unique identifier for this tool message item.

func (SkillToolMessageItem) MessageID

func (t SkillToolMessageItem) MessageID() string

MessageID returns the ID of the message containing this tool call.

func (SkillToolMessageItem) RawRender

func (t SkillToolMessageItem) RawRender(width int) string

RawRender implements MessageItem.

func (SkillToolMessageItem) Render

func (t SkillToolMessageItem) Render(width int) string

Render renders the tool message item at the given width.

func (SkillToolMessageItem) RenderPreview

func (t SkillToolMessageItem) RenderPreview(width int) string

RenderPreview renders the tool non-compact without cache or prefix. Bypasses isCompact so the caller gets the full content view regardless of the tool's stored compact state. The caller is responsible for passing the correct available width — no additional capping is applied here.

func (SkillToolMessageItem) SetCompact

func (t SkillToolMessageItem) SetCompact(compact bool)

SetCompact implements the Compactable interface.

func (SkillToolMessageItem) SetMessageID

func (t SkillToolMessageItem) SetMessageID(id string)

SetMessageID sets the ID of the message containing this tool call. MessageID is metadata only and does not affect the rendered output, so we deliberately do not bump the version here.

func (SkillToolMessageItem) SetResult

func (t SkillToolMessageItem) SetResult(res *message.ToolResult)

SetResult sets the tool result associated with this message item.

func (SkillToolMessageItem) SetSpinningFunc

func (t SkillToolMessageItem) SetSpinningFunc(fn SpinningFunc)

SetSpinningFunc sets a custom function to determine if the tool should spin.

func (SkillToolMessageItem) SetStatus

func (t SkillToolMessageItem) SetStatus(status ToolStatus)

SetStatus sets the tool status.

func (SkillToolMessageItem) SetToolCall

func (t SkillToolMessageItem) SetToolCall(tc message.ToolCall)

SetToolCall sets the tool call associated with this message item.

func (SkillToolMessageItem) StartAnimation

func (t SkillToolMessageItem) StartAnimation() tea.Cmd

StartAnimation starts the assistant message animation if it should be spinning.

func (SkillToolMessageItem) Status

func (t SkillToolMessageItem) Status() ToolStatus

Status returns the current tool status.

func (SkillToolMessageItem) ToggleExpanded

func (t SkillToolMessageItem) ToggleExpanded() bool

ToggleExpanded toggles the expanded state of the thinking box.

func (SkillToolMessageItem) ToolCall

func (t SkillToolMessageItem) ToolCall() message.ToolCall

ToolCall returns the tool call associated with this message item.

type SkillToolRenderContext

type SkillToolRenderContext struct{}

SkillToolRenderContext renders skill tool messages.

func (*SkillToolRenderContext) RenderTool

func (s *SkillToolRenderContext) RenderTool(sty *styles.Styles, width int, opts *ToolRenderOpts) string

RenderTool implements the ToolRenderer interface.

type SourcegraphToolMessageItem

type SourcegraphToolMessageItem struct {
	// contains filtered or unexported fields
}

SourcegraphToolMessageItem is a message item that represents a sourcegraph tool call.

func (SourcegraphToolMessageItem) Animate

func (t SourcegraphToolMessageItem) Animate(msg anim.StepMsg) tea.Cmd

Animate progresses the assistant message animation if it should be spinning.

Bumps the F6 list-cache version so the next draw re-renders this item: a spinner tick mutates anim's internal frame counter, which changes the rendered output but is invisible to the per-item caches. Without the bump the list cache would serve the previously rendered frame indefinitely and the spinner would appear frozen. The ID gate keeps unrelated ticks (routed here by a future change to chat.Animate's dispatch) from churning the cache.

func (SourcegraphToolMessageItem) Finished

func (t SourcegraphToolMessageItem) Finished() bool

Finished implements list.Item. A tool call is freezable once the tool call itself is marked finished AND a result has been recorded (or it has been canceled). Tools that override the spinning logic via spinningFunc would short-circuit live ticks; we still gate freezing on isSpinning to keep the contract conservative.

func (SourcegraphToolMessageItem) HandleKeyEvent

func (t SourcegraphToolMessageItem) HandleKeyEvent(key tea.KeyMsg) (bool, tea.Cmd)

HandleKeyEvent implements KeyEventHandler.

func (SourcegraphToolMessageItem) HandleMouseClick

func (t SourcegraphToolMessageItem) HandleMouseClick(btn ansi.MouseButton, x, y int) bool

HandleMouseClick implements MouseClickable.

func (SourcegraphToolMessageItem) ID

func (t SourcegraphToolMessageItem) ID() string

ID returns the unique identifier for this tool message item.

func (SourcegraphToolMessageItem) MessageID

func (t SourcegraphToolMessageItem) MessageID() string

MessageID returns the ID of the message containing this tool call.

func (SourcegraphToolMessageItem) RawRender

func (t SourcegraphToolMessageItem) RawRender(width int) string

RawRender implements MessageItem.

func (SourcegraphToolMessageItem) Render

func (t SourcegraphToolMessageItem) Render(width int) string

Render renders the tool message item at the given width.

func (SourcegraphToolMessageItem) RenderPreview

func (t SourcegraphToolMessageItem) RenderPreview(width int) string

RenderPreview renders the tool non-compact without cache or prefix. Bypasses isCompact so the caller gets the full content view regardless of the tool's stored compact state. The caller is responsible for passing the correct available width — no additional capping is applied here.

func (SourcegraphToolMessageItem) SetCompact

func (t SourcegraphToolMessageItem) SetCompact(compact bool)

SetCompact implements the Compactable interface.

func (SourcegraphToolMessageItem) SetMessageID

func (t SourcegraphToolMessageItem) SetMessageID(id string)

SetMessageID sets the ID of the message containing this tool call. MessageID is metadata only and does not affect the rendered output, so we deliberately do not bump the version here.

func (SourcegraphToolMessageItem) SetResult

func (t SourcegraphToolMessageItem) SetResult(res *message.ToolResult)

SetResult sets the tool result associated with this message item.

func (SourcegraphToolMessageItem) SetSpinningFunc

func (t SourcegraphToolMessageItem) SetSpinningFunc(fn SpinningFunc)

SetSpinningFunc sets a custom function to determine if the tool should spin.

func (SourcegraphToolMessageItem) SetStatus

func (t SourcegraphToolMessageItem) SetStatus(status ToolStatus)

SetStatus sets the tool status.

func (SourcegraphToolMessageItem) SetToolCall

func (t SourcegraphToolMessageItem) SetToolCall(tc message.ToolCall)

SetToolCall sets the tool call associated with this message item.

func (SourcegraphToolMessageItem) StartAnimation

func (t SourcegraphToolMessageItem) StartAnimation() tea.Cmd

StartAnimation starts the assistant message animation if it should be spinning.

func (SourcegraphToolMessageItem) Status

func (t SourcegraphToolMessageItem) Status() ToolStatus

Status returns the current tool status.

func (SourcegraphToolMessageItem) ToggleExpanded

func (t SourcegraphToolMessageItem) ToggleExpanded() bool

ToggleExpanded toggles the expanded state of the thinking box.

func (SourcegraphToolMessageItem) ToolCall

func (t SourcegraphToolMessageItem) ToolCall() message.ToolCall

ToolCall returns the tool call associated with this message item.

type SourcegraphToolRenderContext

type SourcegraphToolRenderContext struct{}

SourcegraphToolRenderContext renders sourcegraph tool messages.

func (*SourcegraphToolRenderContext) RenderTool

func (s *SourcegraphToolRenderContext) RenderTool(sty *styles.Styles, width int, opts *ToolRenderOpts) string

RenderTool implements the ToolRenderer interface.

type SpawnAgentToolMessageItem

type SpawnAgentToolMessageItem struct {
	// contains filtered or unexported fields
}

SpawnAgentToolMessageItem represents a spawn_agent tool call.

func (SpawnAgentToolMessageItem) Animate

func (t SpawnAgentToolMessageItem) Animate(msg anim.StepMsg) tea.Cmd

Animate progresses the assistant message animation if it should be spinning.

Bumps the F6 list-cache version so the next draw re-renders this item: a spinner tick mutates anim's internal frame counter, which changes the rendered output but is invisible to the per-item caches. Without the bump the list cache would serve the previously rendered frame indefinitely and the spinner would appear frozen. The ID gate keeps unrelated ticks (routed here by a future change to chat.Animate's dispatch) from churning the cache.

func (SpawnAgentToolMessageItem) Finished

func (t SpawnAgentToolMessageItem) Finished() bool

Finished implements list.Item. A tool call is freezable once the tool call itself is marked finished AND a result has been recorded (or it has been canceled). Tools that override the spinning logic via spinningFunc would short-circuit live ticks; we still gate freezing on isSpinning to keep the contract conservative.

func (SpawnAgentToolMessageItem) HandleKeyEvent

func (t SpawnAgentToolMessageItem) HandleKeyEvent(key tea.KeyMsg) (bool, tea.Cmd)

HandleKeyEvent implements KeyEventHandler.

func (SpawnAgentToolMessageItem) HandleMouseClick

func (t SpawnAgentToolMessageItem) HandleMouseClick(btn ansi.MouseButton, x, y int) bool

HandleMouseClick implements MouseClickable.

func (SpawnAgentToolMessageItem) ID

func (t SpawnAgentToolMessageItem) ID() string

ID returns the unique identifier for this tool message item.

func (SpawnAgentToolMessageItem) MessageID

func (t SpawnAgentToolMessageItem) MessageID() string

MessageID returns the ID of the message containing this tool call.

func (SpawnAgentToolMessageItem) RawRender

func (t SpawnAgentToolMessageItem) RawRender(width int) string

RawRender implements MessageItem.

func (SpawnAgentToolMessageItem) Render

func (t SpawnAgentToolMessageItem) Render(width int) string

Render renders the tool message item at the given width.

func (SpawnAgentToolMessageItem) RenderPreview

func (t SpawnAgentToolMessageItem) RenderPreview(width int) string

RenderPreview renders the tool non-compact without cache or prefix. Bypasses isCompact so the caller gets the full content view regardless of the tool's stored compact state. The caller is responsible for passing the correct available width — no additional capping is applied here.

func (SpawnAgentToolMessageItem) SetCompact

func (t SpawnAgentToolMessageItem) SetCompact(compact bool)

SetCompact implements the Compactable interface.

func (SpawnAgentToolMessageItem) SetMessageID

func (t SpawnAgentToolMessageItem) SetMessageID(id string)

SetMessageID sets the ID of the message containing this tool call. MessageID is metadata only and does not affect the rendered output, so we deliberately do not bump the version here.

func (SpawnAgentToolMessageItem) SetResult

func (t SpawnAgentToolMessageItem) SetResult(res *message.ToolResult)

SetResult sets the tool result associated with this message item.

func (SpawnAgentToolMessageItem) SetSpinningFunc

func (t SpawnAgentToolMessageItem) SetSpinningFunc(fn SpinningFunc)

SetSpinningFunc sets a custom function to determine if the tool should spin.

func (SpawnAgentToolMessageItem) SetStatus

func (t SpawnAgentToolMessageItem) SetStatus(status ToolStatus)

SetStatus sets the tool status.

func (SpawnAgentToolMessageItem) SetToolCall

func (t SpawnAgentToolMessageItem) SetToolCall(tc message.ToolCall)

SetToolCall sets the tool call associated with this message item.

func (SpawnAgentToolMessageItem) StartAnimation

func (t SpawnAgentToolMessageItem) StartAnimation() tea.Cmd

StartAnimation starts the assistant message animation if it should be spinning.

func (SpawnAgentToolMessageItem) Status

func (t SpawnAgentToolMessageItem) Status() ToolStatus

Status returns the current tool status.

func (SpawnAgentToolMessageItem) ToggleExpanded

func (t SpawnAgentToolMessageItem) ToggleExpanded() bool

ToggleExpanded toggles the expanded state of the thinking box.

func (SpawnAgentToolMessageItem) ToolCall

func (t SpawnAgentToolMessageItem) ToolCall() message.ToolCall

ToolCall returns the tool call associated with this message item.

type SpawnAgentToolRenderContext

type SpawnAgentToolRenderContext struct{}

SpawnAgentToolRenderContext renders spawn_agent tool messages.

func (*SpawnAgentToolRenderContext) RenderTool

func (s *SpawnAgentToolRenderContext) RenderTool(sty *styles.Styles, width int, opts *ToolRenderOpts) string

RenderTool implements the ToolRenderer interface.

type SpinningFunc

type SpinningFunc func(state SpinningState) bool

SpinningFunc is a function type for custom spinning logic. Returns true if the tool should show the spinning animation.

type SpinningState

type SpinningState struct {
	ToolCall message.ToolCall
	Result   *message.ToolResult
	Status   ToolStatus
}

SpinningState contains the state passed to SpinningFunc for custom spinning logic.

func (*SpinningState) HasResult

func (s *SpinningState) HasResult() bool

HasResult returns true if the result is not nil.

func (*SpinningState) IsCanceled

func (s *SpinningState) IsCanceled() bool

IsCanceled returns true if the tool status is canceled.

type SubAgentLiveReporter

type SubAgentLiveReporter interface {
	SetSubAgentStreaming(reasoning, content string)
	SubAgentStreaming() (reasoning, content string)
}

SubAgentLiveReporter is an interface for tool items that can report live streaming reasoning and content of their sub-agent.

type TaskGetToolMessageItem

type TaskGetToolMessageItem struct {
	// contains filtered or unexported fields
}

func (TaskGetToolMessageItem) Animate

func (t TaskGetToolMessageItem) Animate(msg anim.StepMsg) tea.Cmd

Animate progresses the assistant message animation if it should be spinning.

Bumps the F6 list-cache version so the next draw re-renders this item: a spinner tick mutates anim's internal frame counter, which changes the rendered output but is invisible to the per-item caches. Without the bump the list cache would serve the previously rendered frame indefinitely and the spinner would appear frozen. The ID gate keeps unrelated ticks (routed here by a future change to chat.Animate's dispatch) from churning the cache.

func (TaskGetToolMessageItem) Finished

func (t TaskGetToolMessageItem) Finished() bool

Finished implements list.Item. A tool call is freezable once the tool call itself is marked finished AND a result has been recorded (or it has been canceled). Tools that override the spinning logic via spinningFunc would short-circuit live ticks; we still gate freezing on isSpinning to keep the contract conservative.

func (TaskGetToolMessageItem) HandleKeyEvent

func (t TaskGetToolMessageItem) HandleKeyEvent(key tea.KeyMsg) (bool, tea.Cmd)

HandleKeyEvent implements KeyEventHandler.

func (TaskGetToolMessageItem) HandleMouseClick

func (t TaskGetToolMessageItem) HandleMouseClick(btn ansi.MouseButton, x, y int) bool

HandleMouseClick implements MouseClickable.

func (TaskGetToolMessageItem) ID

func (t TaskGetToolMessageItem) ID() string

ID returns the unique identifier for this tool message item.

func (TaskGetToolMessageItem) MessageID

func (t TaskGetToolMessageItem) MessageID() string

MessageID returns the ID of the message containing this tool call.

func (TaskGetToolMessageItem) RawRender

func (t TaskGetToolMessageItem) RawRender(width int) string

RawRender implements MessageItem.

func (TaskGetToolMessageItem) Render

func (t TaskGetToolMessageItem) Render(width int) string

Render renders the tool message item at the given width.

func (TaskGetToolMessageItem) RenderPreview

func (t TaskGetToolMessageItem) RenderPreview(width int) string

RenderPreview renders the tool non-compact without cache or prefix. Bypasses isCompact so the caller gets the full content view regardless of the tool's stored compact state. The caller is responsible for passing the correct available width — no additional capping is applied here.

func (TaskGetToolMessageItem) SetCompact

func (t TaskGetToolMessageItem) SetCompact(compact bool)

SetCompact implements the Compactable interface.

func (TaskGetToolMessageItem) SetMessageID

func (t TaskGetToolMessageItem) SetMessageID(id string)

SetMessageID sets the ID of the message containing this tool call. MessageID is metadata only and does not affect the rendered output, so we deliberately do not bump the version here.

func (TaskGetToolMessageItem) SetResult

func (t TaskGetToolMessageItem) SetResult(res *message.ToolResult)

SetResult sets the tool result associated with this message item.

func (TaskGetToolMessageItem) SetSpinningFunc

func (t TaskGetToolMessageItem) SetSpinningFunc(fn SpinningFunc)

SetSpinningFunc sets a custom function to determine if the tool should spin.

func (TaskGetToolMessageItem) SetStatus

func (t TaskGetToolMessageItem) SetStatus(status ToolStatus)

SetStatus sets the tool status.

func (TaskGetToolMessageItem) SetToolCall

func (t TaskGetToolMessageItem) SetToolCall(tc message.ToolCall)

SetToolCall sets the tool call associated with this message item.

func (TaskGetToolMessageItem) StartAnimation

func (t TaskGetToolMessageItem) StartAnimation() tea.Cmd

StartAnimation starts the assistant message animation if it should be spinning.

func (TaskGetToolMessageItem) Status

func (t TaskGetToolMessageItem) Status() ToolStatus

Status returns the current tool status.

func (TaskGetToolMessageItem) ToggleExpanded

func (t TaskGetToolMessageItem) ToggleExpanded() bool

ToggleExpanded toggles the expanded state of the thinking box.

func (TaskGetToolMessageItem) ToolCall

func (t TaskGetToolMessageItem) ToolCall() message.ToolCall

ToolCall returns the tool call associated with this message item.

type TaskGetToolRenderContext

type TaskGetToolRenderContext struct{}

func (*TaskGetToolRenderContext) RenderTool

func (t *TaskGetToolRenderContext) RenderTool(sty *styles.Styles, width int, opts *ToolRenderOpts) string

type TaskListToolMessageItem

type TaskListToolMessageItem struct {
	// contains filtered or unexported fields
}

func (TaskListToolMessageItem) Animate

func (t TaskListToolMessageItem) Animate(msg anim.StepMsg) tea.Cmd

Animate progresses the assistant message animation if it should be spinning.

Bumps the F6 list-cache version so the next draw re-renders this item: a spinner tick mutates anim's internal frame counter, which changes the rendered output but is invisible to the per-item caches. Without the bump the list cache would serve the previously rendered frame indefinitely and the spinner would appear frozen. The ID gate keeps unrelated ticks (routed here by a future change to chat.Animate's dispatch) from churning the cache.

func (TaskListToolMessageItem) Finished

func (t TaskListToolMessageItem) Finished() bool

Finished implements list.Item. A tool call is freezable once the tool call itself is marked finished AND a result has been recorded (or it has been canceled). Tools that override the spinning logic via spinningFunc would short-circuit live ticks; we still gate freezing on isSpinning to keep the contract conservative.

func (TaskListToolMessageItem) HandleKeyEvent

func (t TaskListToolMessageItem) HandleKeyEvent(key tea.KeyMsg) (bool, tea.Cmd)

HandleKeyEvent implements KeyEventHandler.

func (TaskListToolMessageItem) HandleMouseClick

func (t TaskListToolMessageItem) HandleMouseClick(btn ansi.MouseButton, x, y int) bool

HandleMouseClick implements MouseClickable.

func (TaskListToolMessageItem) ID

func (t TaskListToolMessageItem) ID() string

ID returns the unique identifier for this tool message item.

func (TaskListToolMessageItem) MessageID

func (t TaskListToolMessageItem) MessageID() string

MessageID returns the ID of the message containing this tool call.

func (TaskListToolMessageItem) RawRender

func (t TaskListToolMessageItem) RawRender(width int) string

RawRender implements MessageItem.

func (TaskListToolMessageItem) Render

func (t TaskListToolMessageItem) Render(width int) string

Render renders the tool message item at the given width.

func (TaskListToolMessageItem) RenderPreview

func (t TaskListToolMessageItem) RenderPreview(width int) string

RenderPreview renders the tool non-compact without cache or prefix. Bypasses isCompact so the caller gets the full content view regardless of the tool's stored compact state. The caller is responsible for passing the correct available width — no additional capping is applied here.

func (TaskListToolMessageItem) SetCompact

func (t TaskListToolMessageItem) SetCompact(compact bool)

SetCompact implements the Compactable interface.

func (TaskListToolMessageItem) SetMessageID

func (t TaskListToolMessageItem) SetMessageID(id string)

SetMessageID sets the ID of the message containing this tool call. MessageID is metadata only and does not affect the rendered output, so we deliberately do not bump the version here.

func (TaskListToolMessageItem) SetResult

func (t TaskListToolMessageItem) SetResult(res *message.ToolResult)

SetResult sets the tool result associated with this message item.

func (TaskListToolMessageItem) SetSpinningFunc

func (t TaskListToolMessageItem) SetSpinningFunc(fn SpinningFunc)

SetSpinningFunc sets a custom function to determine if the tool should spin.

func (TaskListToolMessageItem) SetStatus

func (t TaskListToolMessageItem) SetStatus(status ToolStatus)

SetStatus sets the tool status.

func (TaskListToolMessageItem) SetToolCall

func (t TaskListToolMessageItem) SetToolCall(tc message.ToolCall)

SetToolCall sets the tool call associated with this message item.

func (TaskListToolMessageItem) StartAnimation

func (t TaskListToolMessageItem) StartAnimation() tea.Cmd

StartAnimation starts the assistant message animation if it should be spinning.

func (TaskListToolMessageItem) Status

func (t TaskListToolMessageItem) Status() ToolStatus

Status returns the current tool status.

func (TaskListToolMessageItem) ToggleExpanded

func (t TaskListToolMessageItem) ToggleExpanded() bool

ToggleExpanded toggles the expanded state of the thinking box.

func (TaskListToolMessageItem) ToolCall

func (t TaskListToolMessageItem) ToolCall() message.ToolCall

ToolCall returns the tool call associated with this message item.

type TaskListToolRenderContext

type TaskListToolRenderContext struct{}

func (*TaskListToolRenderContext) RenderTool

func (t *TaskListToolRenderContext) RenderTool(sty *styles.Styles, width int, opts *ToolRenderOpts) string

type TaskStopToolMessageItem

type TaskStopToolMessageItem struct {
	// contains filtered or unexported fields
}

func (TaskStopToolMessageItem) Animate

func (t TaskStopToolMessageItem) Animate(msg anim.StepMsg) tea.Cmd

Animate progresses the assistant message animation if it should be spinning.

Bumps the F6 list-cache version so the next draw re-renders this item: a spinner tick mutates anim's internal frame counter, which changes the rendered output but is invisible to the per-item caches. Without the bump the list cache would serve the previously rendered frame indefinitely and the spinner would appear frozen. The ID gate keeps unrelated ticks (routed here by a future change to chat.Animate's dispatch) from churning the cache.

func (TaskStopToolMessageItem) Finished

func (t TaskStopToolMessageItem) Finished() bool

Finished implements list.Item. A tool call is freezable once the tool call itself is marked finished AND a result has been recorded (or it has been canceled). Tools that override the spinning logic via spinningFunc would short-circuit live ticks; we still gate freezing on isSpinning to keep the contract conservative.

func (TaskStopToolMessageItem) HandleKeyEvent

func (t TaskStopToolMessageItem) HandleKeyEvent(key tea.KeyMsg) (bool, tea.Cmd)

HandleKeyEvent implements KeyEventHandler.

func (TaskStopToolMessageItem) HandleMouseClick

func (t TaskStopToolMessageItem) HandleMouseClick(btn ansi.MouseButton, x, y int) bool

HandleMouseClick implements MouseClickable.

func (TaskStopToolMessageItem) ID

func (t TaskStopToolMessageItem) ID() string

ID returns the unique identifier for this tool message item.

func (TaskStopToolMessageItem) MessageID

func (t TaskStopToolMessageItem) MessageID() string

MessageID returns the ID of the message containing this tool call.

func (TaskStopToolMessageItem) RawRender

func (t TaskStopToolMessageItem) RawRender(width int) string

RawRender implements MessageItem.

func (TaskStopToolMessageItem) Render

func (t TaskStopToolMessageItem) Render(width int) string

Render renders the tool message item at the given width.

func (TaskStopToolMessageItem) RenderPreview

func (t TaskStopToolMessageItem) RenderPreview(width int) string

RenderPreview renders the tool non-compact without cache or prefix. Bypasses isCompact so the caller gets the full content view regardless of the tool's stored compact state. The caller is responsible for passing the correct available width — no additional capping is applied here.

func (TaskStopToolMessageItem) SetCompact

func (t TaskStopToolMessageItem) SetCompact(compact bool)

SetCompact implements the Compactable interface.

func (TaskStopToolMessageItem) SetMessageID

func (t TaskStopToolMessageItem) SetMessageID(id string)

SetMessageID sets the ID of the message containing this tool call. MessageID is metadata only and does not affect the rendered output, so we deliberately do not bump the version here.

func (TaskStopToolMessageItem) SetResult

func (t TaskStopToolMessageItem) SetResult(res *message.ToolResult)

SetResult sets the tool result associated with this message item.

func (TaskStopToolMessageItem) SetSpinningFunc

func (t TaskStopToolMessageItem) SetSpinningFunc(fn SpinningFunc)

SetSpinningFunc sets a custom function to determine if the tool should spin.

func (TaskStopToolMessageItem) SetStatus

func (t TaskStopToolMessageItem) SetStatus(status ToolStatus)

SetStatus sets the tool status.

func (TaskStopToolMessageItem) SetToolCall

func (t TaskStopToolMessageItem) SetToolCall(tc message.ToolCall)

SetToolCall sets the tool call associated with this message item.

func (TaskStopToolMessageItem) StartAnimation

func (t TaskStopToolMessageItem) StartAnimation() tea.Cmd

StartAnimation starts the assistant message animation if it should be spinning.

func (TaskStopToolMessageItem) Status

func (t TaskStopToolMessageItem) Status() ToolStatus

Status returns the current tool status.

func (TaskStopToolMessageItem) ToggleExpanded

func (t TaskStopToolMessageItem) ToggleExpanded() bool

ToggleExpanded toggles the expanded state of the thinking box.

func (TaskStopToolMessageItem) ToolCall

func (t TaskStopToolMessageItem) ToolCall() message.ToolCall

ToolCall returns the tool call associated with this message item.

type TaskStopToolRenderContext

type TaskStopToolRenderContext struct{}

func (*TaskStopToolRenderContext) RenderTool

func (t *TaskStopToolRenderContext) RenderTool(sty *styles.Styles, width int, opts *ToolRenderOpts) string

type ToolMessageItem

type ToolMessageItem interface {
	MessageItem

	ToolCall() message.ToolCall
	SetToolCall(tc message.ToolCall)
	SetResult(res *message.ToolResult)
	MessageID() string
	SetMessageID(id string)
	SetStatus(status ToolStatus)
	Status() ToolStatus
	// RenderPreview renders the tool non-compact without cache or prefix.
	// Used by agent renderers to embed a live output section.
	RenderPreview(width int) string
}

ToolMessageItem represents a tool call message in the chat UI.

func NewApplyPatchToolMessageItem

func NewApplyPatchToolMessageItem(
	sty *styles.Styles,
	toolCall message.ToolCall,
	result *message.ToolResult,
	canceled bool,
) ToolMessageItem

NewApplyPatchToolMessageItem creates a new ApplyPatchToolMessageItem.

func NewBashToolMessageItem

func NewBashToolMessageItem(
	sty *styles.Styles,
	toolCall message.ToolCall,
	result *message.ToolResult,
	canceled bool,
) ToolMessageItem

NewBashToolMessageItem creates a new BashToolMessageItem.

func NewBrowserToolMessageItem

func NewBrowserToolMessageItem(
	sty *styles.Styles,
	toolCall message.ToolCall,
	result *message.ToolResult,
	canceled bool,
) ToolMessageItem

NewBrowserToolMessageItem creates a new BrowserToolMessageItem.

func NewCloseAgentToolMessageItem

func NewCloseAgentToolMessageItem(
	sty *styles.Styles,
	toolCall message.ToolCall,
	result *message.ToolResult,
	canceled bool,
) ToolMessageItem

NewCloseAgentToolMessageItem creates a new CloseAgentToolMessageItem.

func NewCreateDirectoryToolMessageItem

func NewCreateDirectoryToolMessageItem(
	sty *styles.Styles,
	toolCall message.ToolCall,
	result *message.ToolResult,
	canceled bool,
) ToolMessageItem

NewCreateDirectoryToolMessageItem creates a new CreateDirectoryToolMessageItem.

func NewCreateGoalToolMessageItem

func NewCreateGoalToolMessageItem(sty *styles.Styles, toolCall message.ToolCall, result *message.ToolResult, canceled bool) ToolMessageItem

func NewDiagnosticsToolMessageItem

func NewDiagnosticsToolMessageItem(
	sty *styles.Styles,
	toolCall message.ToolCall,
	result *message.ToolResult,
	canceled bool,
) ToolMessageItem

NewDiagnosticsToolMessageItem creates a new DiagnosticsToolMessageItem.

func NewDockerMCPToolMessageItem

func NewDockerMCPToolMessageItem(
	sty *styles.Styles,
	toolCall message.ToolCall,
	result *message.ToolResult,
	canceled bool,
) ToolMessageItem

NewDockerMCPToolMessageItem creates a new DockerMCPToolMessageItem.

func NewDocxToolMessageItem

func NewDocxToolMessageItem(sty *styles.Styles, toolCall message.ToolCall, result *message.ToolResult, canceled bool) ToolMessageItem

func NewDownloadToolMessageItem

func NewDownloadToolMessageItem(
	sty *styles.Styles,
	toolCall message.ToolCall,
	result *message.ToolResult,
	canceled bool,
) ToolMessageItem

NewDownloadToolMessageItem creates a new DownloadToolMessageItem.

func NewEditToolMessageItem

func NewEditToolMessageItem(
	sty *styles.Styles,
	toolCall message.ToolCall,
	result *message.ToolResult,
	canceled bool,
) ToolMessageItem

NewEditToolMessageItem creates a new EditToolMessageItem.

func NewFIMToolMessageItem

func NewFIMToolMessageItem(sty *styles.Styles, toolCall message.ToolCall, result *message.ToolResult, canceled bool) ToolMessageItem

func NewFetchToolMessageItem

func NewFetchToolMessageItem(
	sty *styles.Styles,
	toolCall message.ToolCall,
	result *message.ToolResult,
	canceled bool,
) ToolMessageItem

NewFetchToolMessageItem creates a new FetchToolMessageItem.

func NewGenericToolMessageItem

func NewGenericToolMessageItem(
	sty *styles.Styles,
	toolCall message.ToolCall,
	result *message.ToolResult,
	canceled bool,
) ToolMessageItem

NewGenericToolMessageItem creates a new GenericToolMessageItem.

func NewGetFileMetadataToolMessageItem

func NewGetFileMetadataToolMessageItem(
	sty *styles.Styles,
	toolCall message.ToolCall,
	result *message.ToolResult,
	canceled bool,
) ToolMessageItem

NewGetFileMetadataToolMessageItem creates a new GetFileMetadataToolMessageItem.

func NewGetGoalToolMessageItem

func NewGetGoalToolMessageItem(sty *styles.Styles, toolCall message.ToolCall, result *message.ToolResult, canceled bool) ToolMessageItem

func NewGlobToolMessageItem

func NewGlobToolMessageItem(
	sty *styles.Styles,
	toolCall message.ToolCall,
	result *message.ToolResult,
	canceled bool,
) ToolMessageItem

NewGlobToolMessageItem creates a new GlobToolMessageItem.

func NewGrepToolMessageItem

func NewGrepToolMessageItem(
	sty *styles.Styles,
	toolCall message.ToolCall,
	result *message.ToolResult,
	canceled bool,
) ToolMessageItem

NewGrepToolMessageItem creates a new GrepToolMessageItem.

func NewJobKillToolMessageItem

func NewJobKillToolMessageItem(
	sty *styles.Styles,
	toolCall message.ToolCall,
	result *message.ToolResult,
	canceled bool,
) ToolMessageItem

NewJobKillToolMessageItem creates a new JobKillToolMessageItem.

func NewJobOutputToolMessageItem

func NewJobOutputToolMessageItem(
	sty *styles.Styles,
	toolCall message.ToolCall,
	result *message.ToolResult,
	canceled bool,
) ToolMessageItem

NewJobOutputToolMessageItem creates a new JobOutputToolMessageItem.

func NewLSPRestartToolMessageItem

func NewLSPRestartToolMessageItem(
	sty *styles.Styles,
	toolCall message.ToolCall,
	result *message.ToolResult,
	canceled bool,
) ToolMessageItem

NewLSPRestartToolMessageItem creates a new LSPRestartToolMessageItem.

func NewLSPToolMessageItem

func NewLSPToolMessageItem(sty *styles.Styles, toolCall message.ToolCall, result *message.ToolResult, canceled bool) ToolMessageItem

func NewLSToolMessageItem

func NewLSToolMessageItem(
	sty *styles.Styles,
	toolCall message.ToolCall,
	result *message.ToolResult,
	canceled bool,
) ToolMessageItem

NewLSToolMessageItem creates a new LSToolMessageItem.

func NewListAgentsToolMessageItem

func NewListAgentsToolMessageItem(
	sty *styles.Styles,
	toolCall message.ToolCall,
	result *message.ToolResult,
	canceled bool,
) ToolMessageItem

NewListAgentsToolMessageItem creates a new ListAgentsToolMessageItem.

func NewMCPListResourcesToolMessageItem

func NewMCPListResourcesToolMessageItem(
	sty *styles.Styles,
	toolCall message.ToolCall,
	result *message.ToolResult,
	canceled bool,
) ToolMessageItem

NewMCPListResourcesToolMessageItem creates a new MCPListResourcesToolMessageItem.

func NewMCPReadResourceToolMessageItem

func NewMCPReadResourceToolMessageItem(
	sty *styles.Styles,
	toolCall message.ToolCall,
	result *message.ToolResult,
	canceled bool,
) ToolMessageItem

NewMCPReadResourceToolMessageItem creates a new MCPReadResourceToolMessageItem.

func NewMCPToolMessageItem

func NewMCPToolMessageItem(
	sty *styles.Styles,
	toolCall message.ToolCall,
	result *message.ToolResult,
	canceled bool,
) ToolMessageItem

NewMCPToolMessageItem creates a new MCPToolMessageItem.

func NewMemoryAddObservationsToolMessageItem

func NewMemoryAddObservationsToolMessageItem(
	sty *styles.Styles,
	toolCall message.ToolCall,
	result *message.ToolResult,
	canceled bool,
) ToolMessageItem

NewMemoryAddObservationsToolMessageItem creates a new MemoryAddObservationsToolMessageItem.

func NewMemoryCreateEntitiesToolMessageItem

func NewMemoryCreateEntitiesToolMessageItem(
	sty *styles.Styles,
	toolCall message.ToolCall,
	result *message.ToolResult,
	canceled bool,
) ToolMessageItem

NewMemoryCreateEntitiesToolMessageItem creates a new MemoryCreateEntitiesToolMessageItem.

func NewMemoryOpenNodesToolMessageItem

func NewMemoryOpenNodesToolMessageItem(
	sty *styles.Styles,
	toolCall message.ToolCall,
	result *message.ToolResult,
	canceled bool,
) ToolMessageItem

NewMemoryOpenNodesToolMessageItem creates a new MemoryOpenNodesToolMessageItem.

func NewMemorySearchNodesToolMessageItem

func NewMemorySearchNodesToolMessageItem(
	sty *styles.Styles,
	toolCall message.ToolCall,
	result *message.ToolResult,
	canceled bool,
) ToolMessageItem

NewMemorySearchNodesToolMessageItem creates a new MemorySearchNodesToolMessageItem.

func NewMonitorToolMessageItem

func NewMonitorToolMessageItem(sty *styles.Styles, toolCall message.ToolCall, result *message.ToolResult, canceled bool) ToolMessageItem

func NewMultiEditToolMessageItem

func NewMultiEditToolMessageItem(
	sty *styles.Styles,
	toolCall message.ToolCall,
	result *message.ToolResult,
	canceled bool,
) ToolMessageItem

NewMultiEditToolMessageItem creates a new MultiEditToolMessageItem.

func NewNotebookCreateToolMessageItem

func NewNotebookCreateToolMessageItem(sty *styles.Styles, toolCall message.ToolCall, result *message.ToolResult, canceled bool) ToolMessageItem

func NewNotebookEditToolMessageItem

func NewNotebookEditToolMessageItem(sty *styles.Styles, toolCall message.ToolCall, result *message.ToolResult, canceled bool) ToolMessageItem

func NewNotebookWriteToolMessageItem

func NewNotebookWriteToolMessageItem(sty *styles.Styles, toolCall message.ToolCall, result *message.ToolResult, canceled bool) ToolMessageItem

func NewReadDocumentURLToolMessageItem

func NewReadDocumentURLToolMessageItem(
	sty *styles.Styles,
	toolCall message.ToolCall,
	result *message.ToolResult,
	canceled bool,
) ToolMessageItem

NewReadDocumentURLToolMessageItem creates a new ReadDocumentURLToolMessageItem.

func NewReferencesToolMessageItem

func NewReferencesToolMessageItem(
	sty *styles.Styles,
	toolCall message.ToolCall,
	result *message.ToolResult,
	canceled bool,
) ToolMessageItem

NewReferencesToolMessageItem creates a new ReferencesToolMessageItem.

func NewRemoveFileToolMessageItem

func NewRemoveFileToolMessageItem(
	sty *styles.Styles,
	toolCall message.ToolCall,
	result *message.ToolResult,
	canceled bool,
) ToolMessageItem

NewRemoveFileToolMessageItem creates a new RemoveFileToolMessageItem.

func NewResumeAgentToolMessageItem

func NewResumeAgentToolMessageItem(
	sty *styles.Styles,
	toolCall message.ToolCall,
	result *message.ToolResult,
	canceled bool,
) ToolMessageItem

NewResumeAgentToolMessageItem creates a new ResumeAgentToolMessageItem.

func NewSendAgentMessageToolMessageItem

func NewSendAgentMessageToolMessageItem(
	sty *styles.Styles,
	toolCall message.ToolCall,
	result *message.ToolResult,
	canceled bool,
) ToolMessageItem

NewSendAgentMessageToolMessageItem creates a new SendAgentMessageToolMessageItem.

func NewSeshatListSkillsToolMessageItem

func NewSeshatListSkillsToolMessageItem(
	sty *styles.Styles,
	toolCall message.ToolCall,
	result *message.ToolResult,
	canceled bool,
) ToolMessageItem

NewSeshatListSkillsToolMessageItem creates a new SeshatListSkillsToolMessageItem.

func NewSeshatReadSkillToolMessageItem

func NewSeshatReadSkillToolMessageItem(
	sty *styles.Styles,
	toolCall message.ToolCall,
	result *message.ToolResult,
	canceled bool,
) ToolMessageItem

NewSeshatReadSkillToolMessageItem creates a new SeshatReadSkillToolMessageItem.

func NewSeshatValidateSkillToolMessageItem

func NewSeshatValidateSkillToolMessageItem(
	sty *styles.Styles,
	toolCall message.ToolCall,
	result *message.ToolResult,
	canceled bool,
) ToolMessageItem

NewSeshatValidateSkillToolMessageItem creates a new SeshatValidateSkillToolMessageItem.

func NewSkillToolMessageItem

func NewSkillToolMessageItem(
	sty *styles.Styles,
	toolCall message.ToolCall,
	result *message.ToolResult,
	canceled bool,
) ToolMessageItem

NewSkillToolMessageItem creates a new SkillToolMessageItem.

func NewSourcegraphToolMessageItem

func NewSourcegraphToolMessageItem(
	sty *styles.Styles,
	toolCall message.ToolCall,
	result *message.ToolResult,
	canceled bool,
) ToolMessageItem

NewSourcegraphToolMessageItem creates a new SourcegraphToolMessageItem.

func NewSpawnAgentToolMessageItem

func NewSpawnAgentToolMessageItem(
	sty *styles.Styles,
	toolCall message.ToolCall,
	result *message.ToolResult,
	canceled bool,
) ToolMessageItem

NewSpawnAgentToolMessageItem creates a new SpawnAgentToolMessageItem.

func NewTaskGetToolMessageItem

func NewTaskGetToolMessageItem(sty *styles.Styles, toolCall message.ToolCall, result *message.ToolResult, canceled bool) ToolMessageItem

func NewTaskListToolMessageItem

func NewTaskListToolMessageItem(sty *styles.Styles, toolCall message.ToolCall, result *message.ToolResult, canceled bool) ToolMessageItem

func NewTaskStopToolMessageItem

func NewTaskStopToolMessageItem(sty *styles.Styles, toolCall message.ToolCall, result *message.ToolResult, canceled bool) ToolMessageItem

func NewToolMessageItem

func NewToolMessageItem(
	sty *styles.Styles,
	messageID string,
	toolCall message.ToolCall,
	result *message.ToolResult,
	canceled bool,
) ToolMessageItem

NewToolMessageItem creates a new ToolMessageItem based on the tool call name.

It returns a specific tool message item type if implemented, otherwise it returns a generic tool message item. The messageID is the ID of the assistant message containing this tool call.

func NewToolSearchToolMessageItem

func NewToolSearchToolMessageItem(
	sty *styles.Styles,
	toolCall message.ToolCall,
	result *message.ToolResult,
	canceled bool,
) ToolMessageItem

NewToolSearchToolMessageItem creates a new ToolSearchToolMessageItem.

func NewUpdateGoalToolMessageItem

func NewUpdateGoalToolMessageItem(sty *styles.Styles, toolCall message.ToolCall, result *message.ToolResult, canceled bool) ToolMessageItem

func NewViewToolMessageItem

func NewViewToolMessageItem(
	sty *styles.Styles,
	toolCall message.ToolCall,
	result *message.ToolResult,
	canceled bool,
) ToolMessageItem

NewViewToolMessageItem creates a new ViewToolMessageItem.

func NewWaitAgentToolMessageItem

func NewWaitAgentToolMessageItem(
	sty *styles.Styles,
	toolCall message.ToolCall,
	result *message.ToolResult,
	canceled bool,
) ToolMessageItem

NewWaitAgentToolMessageItem creates a new WaitAgentToolMessageItem.

func NewWebFetchToolMessageItem

func NewWebFetchToolMessageItem(
	sty *styles.Styles,
	toolCall message.ToolCall,
	result *message.ToolResult,
	canceled bool,
) ToolMessageItem

NewWebFetchToolMessageItem creates a new WebFetchToolMessageItem.

func NewWebSearchToolMessageItem

func NewWebSearchToolMessageItem(
	sty *styles.Styles,
	toolCall message.ToolCall,
	result *message.ToolResult,
	canceled bool,
) ToolMessageItem

NewWebSearchToolMessageItem creates a new WebSearchToolMessageItem.

func NewWriteToolMessageItem

func NewWriteToolMessageItem(
	sty *styles.Styles,
	toolCall message.ToolCall,
	result *message.ToolResult,
	canceled bool,
) ToolMessageItem

NewWriteToolMessageItem creates a new WriteToolMessageItem.

type ToolRenderOpts

type ToolRenderOpts struct {
	ToolCall        message.ToolCall
	Result          *message.ToolResult
	Anim            *anim.Anim
	ExpandedContent bool
	Compact         bool
	IsSpinning      bool
	Status          ToolStatus
}

ToolRenderOpts contains the data needed to render a tool call.

func (*ToolRenderOpts) HasEmptyResult

func (o *ToolRenderOpts) HasEmptyResult() bool

HasEmptyResult returns true if the result is nil or has empty content.

func (*ToolRenderOpts) HasResult

func (o *ToolRenderOpts) HasResult() bool

HasResult returns true if the result is not nil.

func (*ToolRenderOpts) IsCanceled

func (o *ToolRenderOpts) IsCanceled() bool

IsCanceled returns true if the tool status is canceled.

func (*ToolRenderOpts) IsPending

func (o *ToolRenderOpts) IsPending() bool

IsPending returns true if the tool call is still pending (not finished and not canceled).

type ToolRenderer

type ToolRenderer interface {
	RenderTool(sty *styles.Styles, width int, opts *ToolRenderOpts) string
}

ToolRenderer represents an interface for rendering tool calls.

type ToolRendererFunc

type ToolRendererFunc func(sty *styles.Styles, width int, opts *ToolRenderOpts) string

ToolRendererFunc is a function type that implements the ToolRenderer interface.

func (ToolRendererFunc) RenderTool

func (f ToolRendererFunc) RenderTool(sty *styles.Styles, width int, opts *ToolRenderOpts) string

RenderTool implements the ToolRenderer interface.

type ToolSearchToolMessageItem

type ToolSearchToolMessageItem struct {
	// contains filtered or unexported fields
}

ToolSearchToolMessageItem represents a tool_search tool call.

func (ToolSearchToolMessageItem) Animate

func (t ToolSearchToolMessageItem) Animate(msg anim.StepMsg) tea.Cmd

Animate progresses the assistant message animation if it should be spinning.

Bumps the F6 list-cache version so the next draw re-renders this item: a spinner tick mutates anim's internal frame counter, which changes the rendered output but is invisible to the per-item caches. Without the bump the list cache would serve the previously rendered frame indefinitely and the spinner would appear frozen. The ID gate keeps unrelated ticks (routed here by a future change to chat.Animate's dispatch) from churning the cache.

func (ToolSearchToolMessageItem) Finished

func (t ToolSearchToolMessageItem) Finished() bool

Finished implements list.Item. A tool call is freezable once the tool call itself is marked finished AND a result has been recorded (or it has been canceled). Tools that override the spinning logic via spinningFunc would short-circuit live ticks; we still gate freezing on isSpinning to keep the contract conservative.

func (ToolSearchToolMessageItem) HandleKeyEvent

func (t ToolSearchToolMessageItem) HandleKeyEvent(key tea.KeyMsg) (bool, tea.Cmd)

HandleKeyEvent implements KeyEventHandler.

func (ToolSearchToolMessageItem) HandleMouseClick

func (t ToolSearchToolMessageItem) HandleMouseClick(btn ansi.MouseButton, x, y int) bool

HandleMouseClick implements MouseClickable.

func (ToolSearchToolMessageItem) ID

func (t ToolSearchToolMessageItem) ID() string

ID returns the unique identifier for this tool message item.

func (ToolSearchToolMessageItem) MessageID

func (t ToolSearchToolMessageItem) MessageID() string

MessageID returns the ID of the message containing this tool call.

func (ToolSearchToolMessageItem) RawRender

func (t ToolSearchToolMessageItem) RawRender(width int) string

RawRender implements MessageItem.

func (ToolSearchToolMessageItem) Render

func (t ToolSearchToolMessageItem) Render(width int) string

Render renders the tool message item at the given width.

func (ToolSearchToolMessageItem) RenderPreview

func (t ToolSearchToolMessageItem) RenderPreview(width int) string

RenderPreview renders the tool non-compact without cache or prefix. Bypasses isCompact so the caller gets the full content view regardless of the tool's stored compact state. The caller is responsible for passing the correct available width — no additional capping is applied here.

func (ToolSearchToolMessageItem) SetCompact

func (t ToolSearchToolMessageItem) SetCompact(compact bool)

SetCompact implements the Compactable interface.

func (ToolSearchToolMessageItem) SetMessageID

func (t ToolSearchToolMessageItem) SetMessageID(id string)

SetMessageID sets the ID of the message containing this tool call. MessageID is metadata only and does not affect the rendered output, so we deliberately do not bump the version here.

func (ToolSearchToolMessageItem) SetResult

func (t ToolSearchToolMessageItem) SetResult(res *message.ToolResult)

SetResult sets the tool result associated with this message item.

func (ToolSearchToolMessageItem) SetSpinningFunc

func (t ToolSearchToolMessageItem) SetSpinningFunc(fn SpinningFunc)

SetSpinningFunc sets a custom function to determine if the tool should spin.

func (ToolSearchToolMessageItem) SetStatus

func (t ToolSearchToolMessageItem) SetStatus(status ToolStatus)

SetStatus sets the tool status.

func (ToolSearchToolMessageItem) SetToolCall

func (t ToolSearchToolMessageItem) SetToolCall(tc message.ToolCall)

SetToolCall sets the tool call associated with this message item.

func (ToolSearchToolMessageItem) StartAnimation

func (t ToolSearchToolMessageItem) StartAnimation() tea.Cmd

StartAnimation starts the assistant message animation if it should be spinning.

func (ToolSearchToolMessageItem) Status

func (t ToolSearchToolMessageItem) Status() ToolStatus

Status returns the current tool status.

func (ToolSearchToolMessageItem) ToggleExpanded

func (t ToolSearchToolMessageItem) ToggleExpanded() bool

ToggleExpanded toggles the expanded state of the thinking box.

func (ToolSearchToolMessageItem) ToolCall

func (t ToolSearchToolMessageItem) ToolCall() message.ToolCall

ToolCall returns the tool call associated with this message item.

type ToolSearchToolRenderContext

type ToolSearchToolRenderContext struct{}

ToolSearchToolRenderContext renders tool_search tool messages.

func (*ToolSearchToolRenderContext) RenderTool

func (t *ToolSearchToolRenderContext) RenderTool(sty *styles.Styles, width int, opts *ToolRenderOpts) string

RenderTool implements the ToolRenderer interface.

type ToolStatus

type ToolStatus int

ToolStatus represents the current state of a tool call.

const (
	ToolStatusAwaitingPermission ToolStatus = iota
	ToolStatusRunning
	ToolStatusSuccess
	ToolStatusError
	ToolStatusCanceled
)

type UpdateGoalRenderContext

type UpdateGoalRenderContext struct{}

func (*UpdateGoalRenderContext) RenderTool

func (u *UpdateGoalRenderContext) RenderTool(sty *styles.Styles, width int, opts *ToolRenderOpts) string

type UpdateGoalToolMessageItem

type UpdateGoalToolMessageItem struct {
	// contains filtered or unexported fields
}

func (UpdateGoalToolMessageItem) Animate

func (t UpdateGoalToolMessageItem) Animate(msg anim.StepMsg) tea.Cmd

Animate progresses the assistant message animation if it should be spinning.

Bumps the F6 list-cache version so the next draw re-renders this item: a spinner tick mutates anim's internal frame counter, which changes the rendered output but is invisible to the per-item caches. Without the bump the list cache would serve the previously rendered frame indefinitely and the spinner would appear frozen. The ID gate keeps unrelated ticks (routed here by a future change to chat.Animate's dispatch) from churning the cache.

func (UpdateGoalToolMessageItem) Finished

func (t UpdateGoalToolMessageItem) Finished() bool

Finished implements list.Item. A tool call is freezable once the tool call itself is marked finished AND a result has been recorded (or it has been canceled). Tools that override the spinning logic via spinningFunc would short-circuit live ticks; we still gate freezing on isSpinning to keep the contract conservative.

func (UpdateGoalToolMessageItem) HandleKeyEvent

func (t UpdateGoalToolMessageItem) HandleKeyEvent(key tea.KeyMsg) (bool, tea.Cmd)

HandleKeyEvent implements KeyEventHandler.

func (UpdateGoalToolMessageItem) HandleMouseClick

func (t UpdateGoalToolMessageItem) HandleMouseClick(btn ansi.MouseButton, x, y int) bool

HandleMouseClick implements MouseClickable.

func (UpdateGoalToolMessageItem) ID

func (t UpdateGoalToolMessageItem) ID() string

ID returns the unique identifier for this tool message item.

func (UpdateGoalToolMessageItem) MessageID

func (t UpdateGoalToolMessageItem) MessageID() string

MessageID returns the ID of the message containing this tool call.

func (UpdateGoalToolMessageItem) RawRender

func (t UpdateGoalToolMessageItem) RawRender(width int) string

RawRender implements MessageItem.

func (UpdateGoalToolMessageItem) Render

func (t UpdateGoalToolMessageItem) Render(width int) string

Render renders the tool message item at the given width.

func (UpdateGoalToolMessageItem) RenderPreview

func (t UpdateGoalToolMessageItem) RenderPreview(width int) string

RenderPreview renders the tool non-compact without cache or prefix. Bypasses isCompact so the caller gets the full content view regardless of the tool's stored compact state. The caller is responsible for passing the correct available width — no additional capping is applied here.

func (UpdateGoalToolMessageItem) SetCompact

func (t UpdateGoalToolMessageItem) SetCompact(compact bool)

SetCompact implements the Compactable interface.

func (UpdateGoalToolMessageItem) SetMessageID

func (t UpdateGoalToolMessageItem) SetMessageID(id string)

SetMessageID sets the ID of the message containing this tool call. MessageID is metadata only and does not affect the rendered output, so we deliberately do not bump the version here.

func (UpdateGoalToolMessageItem) SetResult

func (t UpdateGoalToolMessageItem) SetResult(res *message.ToolResult)

SetResult sets the tool result associated with this message item.

func (UpdateGoalToolMessageItem) SetSpinningFunc

func (t UpdateGoalToolMessageItem) SetSpinningFunc(fn SpinningFunc)

SetSpinningFunc sets a custom function to determine if the tool should spin.

func (UpdateGoalToolMessageItem) SetStatus

func (t UpdateGoalToolMessageItem) SetStatus(status ToolStatus)

SetStatus sets the tool status.

func (UpdateGoalToolMessageItem) SetToolCall

func (t UpdateGoalToolMessageItem) SetToolCall(tc message.ToolCall)

SetToolCall sets the tool call associated with this message item.

func (UpdateGoalToolMessageItem) StartAnimation

func (t UpdateGoalToolMessageItem) StartAnimation() tea.Cmd

StartAnimation starts the assistant message animation if it should be spinning.

func (UpdateGoalToolMessageItem) Status

func (t UpdateGoalToolMessageItem) Status() ToolStatus

Status returns the current tool status.

func (UpdateGoalToolMessageItem) ToggleExpanded

func (t UpdateGoalToolMessageItem) ToggleExpanded() bool

ToggleExpanded toggles the expanded state of the thinking box.

func (UpdateGoalToolMessageItem) ToolCall

func (t UpdateGoalToolMessageItem) ToolCall() message.ToolCall

ToolCall returns the tool call associated with this message item.

type UserMessageItem

type UserMessageItem struct {
	*list.Versioned
	// contains filtered or unexported fields
}

UserMessageItem represents a user message in the chat UI.

func (*UserMessageItem) Finished

func (m *UserMessageItem) Finished() bool

Finished implements list.Item. User messages are immutable once submitted, so the entry is always safe to freeze.

func (*UserMessageItem) HandleKeyEvent

func (m *UserMessageItem) HandleKeyEvent(key tea.KeyMsg) (bool, tea.Cmd)

HandleKeyEvent implements KeyEventHandler.

func (UserMessageItem) Highlight

func (h UserMessageItem) Highlight() (startLine int, startCol int, endLine int, endCol int)

Highlight implements list.Highlightable.

func (*UserMessageItem) ID

func (m *UserMessageItem) ID() string

ID implements MessageItem.

func (*UserMessageItem) RawRender

func (m *UserMessageItem) RawRender(width int) string

RawRender implements MessageItem.

func (*UserMessageItem) Render

func (m *UserMessageItem) Render(width int) string

Render implements MessageItem.

func (UserMessageItem) SetFocused

func (f UserMessageItem) SetFocused(focused bool)

SetFocused implements MessageItem.

func (UserMessageItem) SetHighlight

func (h UserMessageItem) SetHighlight(startLine int, startCol int, endLine int, endCol int)

SetHighlight implements list.Highlightable.

type ViewToolMessageItem

type ViewToolMessageItem struct {
	// contains filtered or unexported fields
}

ViewToolMessageItem is a message item that represents a view tool call.

func (ViewToolMessageItem) Animate

func (t ViewToolMessageItem) Animate(msg anim.StepMsg) tea.Cmd

Animate progresses the assistant message animation if it should be spinning.

Bumps the F6 list-cache version so the next draw re-renders this item: a spinner tick mutates anim's internal frame counter, which changes the rendered output but is invisible to the per-item caches. Without the bump the list cache would serve the previously rendered frame indefinitely and the spinner would appear frozen. The ID gate keeps unrelated ticks (routed here by a future change to chat.Animate's dispatch) from churning the cache.

func (ViewToolMessageItem) Finished

func (t ViewToolMessageItem) Finished() bool

Finished implements list.Item. A tool call is freezable once the tool call itself is marked finished AND a result has been recorded (or it has been canceled). Tools that override the spinning logic via spinningFunc would short-circuit live ticks; we still gate freezing on isSpinning to keep the contract conservative.

func (ViewToolMessageItem) HandleKeyEvent

func (t ViewToolMessageItem) HandleKeyEvent(key tea.KeyMsg) (bool, tea.Cmd)

HandleKeyEvent implements KeyEventHandler.

func (ViewToolMessageItem) HandleMouseClick

func (t ViewToolMessageItem) HandleMouseClick(btn ansi.MouseButton, x, y int) bool

HandleMouseClick implements MouseClickable.

func (ViewToolMessageItem) ID

func (t ViewToolMessageItem) ID() string

ID returns the unique identifier for this tool message item.

func (ViewToolMessageItem) MessageID

func (t ViewToolMessageItem) MessageID() string

MessageID returns the ID of the message containing this tool call.

func (ViewToolMessageItem) RawRender

func (t ViewToolMessageItem) RawRender(width int) string

RawRender implements MessageItem.

func (ViewToolMessageItem) Render

func (t ViewToolMessageItem) Render(width int) string

Render renders the tool message item at the given width.

func (ViewToolMessageItem) RenderPreview

func (t ViewToolMessageItem) RenderPreview(width int) string

RenderPreview renders the tool non-compact without cache or prefix. Bypasses isCompact so the caller gets the full content view regardless of the tool's stored compact state. The caller is responsible for passing the correct available width — no additional capping is applied here.

func (ViewToolMessageItem) SetCompact

func (t ViewToolMessageItem) SetCompact(compact bool)

SetCompact implements the Compactable interface.

func (ViewToolMessageItem) SetMessageID

func (t ViewToolMessageItem) SetMessageID(id string)

SetMessageID sets the ID of the message containing this tool call. MessageID is metadata only and does not affect the rendered output, so we deliberately do not bump the version here.

func (ViewToolMessageItem) SetResult

func (t ViewToolMessageItem) SetResult(res *message.ToolResult)

SetResult sets the tool result associated with this message item.

func (ViewToolMessageItem) SetSpinningFunc

func (t ViewToolMessageItem) SetSpinningFunc(fn SpinningFunc)

SetSpinningFunc sets a custom function to determine if the tool should spin.

func (ViewToolMessageItem) SetStatus

func (t ViewToolMessageItem) SetStatus(status ToolStatus)

SetStatus sets the tool status.

func (ViewToolMessageItem) SetToolCall

func (t ViewToolMessageItem) SetToolCall(tc message.ToolCall)

SetToolCall sets the tool call associated with this message item.

func (ViewToolMessageItem) StartAnimation

func (t ViewToolMessageItem) StartAnimation() tea.Cmd

StartAnimation starts the assistant message animation if it should be spinning.

func (ViewToolMessageItem) Status

func (t ViewToolMessageItem) Status() ToolStatus

Status returns the current tool status.

func (ViewToolMessageItem) ToggleExpanded

func (t ViewToolMessageItem) ToggleExpanded() bool

ToggleExpanded toggles the expanded state of the thinking box.

func (ViewToolMessageItem) ToolCall

func (t ViewToolMessageItem) ToolCall() message.ToolCall

ToolCall returns the tool call associated with this message item.

type ViewToolRenderContext

type ViewToolRenderContext struct{}

ViewToolRenderContext renders view tool messages.

func (*ViewToolRenderContext) RenderTool

func (v *ViewToolRenderContext) RenderTool(sty *styles.Styles, width int, opts *ToolRenderOpts) string

RenderTool implements the ToolRenderer interface.

type WaitAgentToolMessageItem

type WaitAgentToolMessageItem struct {
	// contains filtered or unexported fields
}

WaitAgentToolMessageItem represents a wait_agent tool call.

func (WaitAgentToolMessageItem) Animate

func (t WaitAgentToolMessageItem) Animate(msg anim.StepMsg) tea.Cmd

Animate progresses the assistant message animation if it should be spinning.

Bumps the F6 list-cache version so the next draw re-renders this item: a spinner tick mutates anim's internal frame counter, which changes the rendered output but is invisible to the per-item caches. Without the bump the list cache would serve the previously rendered frame indefinitely and the spinner would appear frozen. The ID gate keeps unrelated ticks (routed here by a future change to chat.Animate's dispatch) from churning the cache.

func (WaitAgentToolMessageItem) Finished

func (t WaitAgentToolMessageItem) Finished() bool

Finished implements list.Item. A tool call is freezable once the tool call itself is marked finished AND a result has been recorded (or it has been canceled). Tools that override the spinning logic via spinningFunc would short-circuit live ticks; we still gate freezing on isSpinning to keep the contract conservative.

func (WaitAgentToolMessageItem) HandleKeyEvent

func (t WaitAgentToolMessageItem) HandleKeyEvent(key tea.KeyMsg) (bool, tea.Cmd)

HandleKeyEvent implements KeyEventHandler.

func (WaitAgentToolMessageItem) HandleMouseClick

func (t WaitAgentToolMessageItem) HandleMouseClick(btn ansi.MouseButton, x, y int) bool

HandleMouseClick implements MouseClickable.

func (WaitAgentToolMessageItem) ID

func (t WaitAgentToolMessageItem) ID() string

ID returns the unique identifier for this tool message item.

func (WaitAgentToolMessageItem) MessageID

func (t WaitAgentToolMessageItem) MessageID() string

MessageID returns the ID of the message containing this tool call.

func (WaitAgentToolMessageItem) RawRender

func (t WaitAgentToolMessageItem) RawRender(width int) string

RawRender implements MessageItem.

func (WaitAgentToolMessageItem) Render

func (t WaitAgentToolMessageItem) Render(width int) string

Render renders the tool message item at the given width.

func (WaitAgentToolMessageItem) RenderPreview

func (t WaitAgentToolMessageItem) RenderPreview(width int) string

RenderPreview renders the tool non-compact without cache or prefix. Bypasses isCompact so the caller gets the full content view regardless of the tool's stored compact state. The caller is responsible for passing the correct available width — no additional capping is applied here.

func (WaitAgentToolMessageItem) SetCompact

func (t WaitAgentToolMessageItem) SetCompact(compact bool)

SetCompact implements the Compactable interface.

func (WaitAgentToolMessageItem) SetMessageID

func (t WaitAgentToolMessageItem) SetMessageID(id string)

SetMessageID sets the ID of the message containing this tool call. MessageID is metadata only and does not affect the rendered output, so we deliberately do not bump the version here.

func (WaitAgentToolMessageItem) SetResult

func (t WaitAgentToolMessageItem) SetResult(res *message.ToolResult)

SetResult sets the tool result associated with this message item.

func (WaitAgentToolMessageItem) SetSpinningFunc

func (t WaitAgentToolMessageItem) SetSpinningFunc(fn SpinningFunc)

SetSpinningFunc sets a custom function to determine if the tool should spin.

func (WaitAgentToolMessageItem) SetStatus

func (t WaitAgentToolMessageItem) SetStatus(status ToolStatus)

SetStatus sets the tool status.

func (WaitAgentToolMessageItem) SetToolCall

func (t WaitAgentToolMessageItem) SetToolCall(tc message.ToolCall)

SetToolCall sets the tool call associated with this message item.

func (WaitAgentToolMessageItem) StartAnimation

func (t WaitAgentToolMessageItem) StartAnimation() tea.Cmd

StartAnimation starts the assistant message animation if it should be spinning.

func (WaitAgentToolMessageItem) Status

func (t WaitAgentToolMessageItem) Status() ToolStatus

Status returns the current tool status.

func (WaitAgentToolMessageItem) ToggleExpanded

func (t WaitAgentToolMessageItem) ToggleExpanded() bool

ToggleExpanded toggles the expanded state of the thinking box.

func (WaitAgentToolMessageItem) ToolCall

func (t WaitAgentToolMessageItem) ToolCall() message.ToolCall

ToolCall returns the tool call associated with this message item.

type WaitAgentToolRenderContext

type WaitAgentToolRenderContext struct{}

WaitAgentToolRenderContext renders wait_agent tool messages.

func (*WaitAgentToolRenderContext) RenderTool

func (w *WaitAgentToolRenderContext) RenderTool(sty *styles.Styles, width int, opts *ToolRenderOpts) string

RenderTool implements the ToolRenderer interface.

type WebFetchToolMessageItem

type WebFetchToolMessageItem struct {
	// contains filtered or unexported fields
}

WebFetchToolMessageItem is a message item that represents a web_fetch tool call.

func (WebFetchToolMessageItem) Animate

func (t WebFetchToolMessageItem) Animate(msg anim.StepMsg) tea.Cmd

Animate progresses the assistant message animation if it should be spinning.

Bumps the F6 list-cache version so the next draw re-renders this item: a spinner tick mutates anim's internal frame counter, which changes the rendered output but is invisible to the per-item caches. Without the bump the list cache would serve the previously rendered frame indefinitely and the spinner would appear frozen. The ID gate keeps unrelated ticks (routed here by a future change to chat.Animate's dispatch) from churning the cache.

func (WebFetchToolMessageItem) Finished

func (t WebFetchToolMessageItem) Finished() bool

Finished implements list.Item. A tool call is freezable once the tool call itself is marked finished AND a result has been recorded (or it has been canceled). Tools that override the spinning logic via spinningFunc would short-circuit live ticks; we still gate freezing on isSpinning to keep the contract conservative.

func (WebFetchToolMessageItem) HandleKeyEvent

func (t WebFetchToolMessageItem) HandleKeyEvent(key tea.KeyMsg) (bool, tea.Cmd)

HandleKeyEvent implements KeyEventHandler.

func (WebFetchToolMessageItem) HandleMouseClick

func (t WebFetchToolMessageItem) HandleMouseClick(btn ansi.MouseButton, x, y int) bool

HandleMouseClick implements MouseClickable.

func (WebFetchToolMessageItem) ID

func (t WebFetchToolMessageItem) ID() string

ID returns the unique identifier for this tool message item.

func (WebFetchToolMessageItem) MessageID

func (t WebFetchToolMessageItem) MessageID() string

MessageID returns the ID of the message containing this tool call.

func (WebFetchToolMessageItem) RawRender

func (t WebFetchToolMessageItem) RawRender(width int) string

RawRender implements MessageItem.

func (WebFetchToolMessageItem) Render

func (t WebFetchToolMessageItem) Render(width int) string

Render renders the tool message item at the given width.

func (WebFetchToolMessageItem) RenderPreview

func (t WebFetchToolMessageItem) RenderPreview(width int) string

RenderPreview renders the tool non-compact without cache or prefix. Bypasses isCompact so the caller gets the full content view regardless of the tool's stored compact state. The caller is responsible for passing the correct available width — no additional capping is applied here.

func (WebFetchToolMessageItem) SetCompact

func (t WebFetchToolMessageItem) SetCompact(compact bool)

SetCompact implements the Compactable interface.

func (WebFetchToolMessageItem) SetMessageID

func (t WebFetchToolMessageItem) SetMessageID(id string)

SetMessageID sets the ID of the message containing this tool call. MessageID is metadata only and does not affect the rendered output, so we deliberately do not bump the version here.

func (WebFetchToolMessageItem) SetResult

func (t WebFetchToolMessageItem) SetResult(res *message.ToolResult)

SetResult sets the tool result associated with this message item.

func (WebFetchToolMessageItem) SetSpinningFunc

func (t WebFetchToolMessageItem) SetSpinningFunc(fn SpinningFunc)

SetSpinningFunc sets a custom function to determine if the tool should spin.

func (WebFetchToolMessageItem) SetStatus

func (t WebFetchToolMessageItem) SetStatus(status ToolStatus)

SetStatus sets the tool status.

func (WebFetchToolMessageItem) SetToolCall

func (t WebFetchToolMessageItem) SetToolCall(tc message.ToolCall)

SetToolCall sets the tool call associated with this message item.

func (WebFetchToolMessageItem) StartAnimation

func (t WebFetchToolMessageItem) StartAnimation() tea.Cmd

StartAnimation starts the assistant message animation if it should be spinning.

func (WebFetchToolMessageItem) Status

func (t WebFetchToolMessageItem) Status() ToolStatus

Status returns the current tool status.

func (WebFetchToolMessageItem) ToggleExpanded

func (t WebFetchToolMessageItem) ToggleExpanded() bool

ToggleExpanded toggles the expanded state of the thinking box.

func (WebFetchToolMessageItem) ToolCall

func (t WebFetchToolMessageItem) ToolCall() message.ToolCall

ToolCall returns the tool call associated with this message item.

type WebFetchToolRenderContext

type WebFetchToolRenderContext struct{}

WebFetchToolRenderContext renders web_fetch tool messages.

func (*WebFetchToolRenderContext) RenderTool

func (w *WebFetchToolRenderContext) RenderTool(sty *styles.Styles, width int, opts *ToolRenderOpts) string

RenderTool implements the ToolRenderer interface.

type WebSearchToolMessageItem

type WebSearchToolMessageItem struct {
	// contains filtered or unexported fields
}

WebSearchToolMessageItem is a message item that represents a web_search tool call.

func (WebSearchToolMessageItem) Animate

func (t WebSearchToolMessageItem) Animate(msg anim.StepMsg) tea.Cmd

Animate progresses the assistant message animation if it should be spinning.

Bumps the F6 list-cache version so the next draw re-renders this item: a spinner tick mutates anim's internal frame counter, which changes the rendered output but is invisible to the per-item caches. Without the bump the list cache would serve the previously rendered frame indefinitely and the spinner would appear frozen. The ID gate keeps unrelated ticks (routed here by a future change to chat.Animate's dispatch) from churning the cache.

func (WebSearchToolMessageItem) Finished

func (t WebSearchToolMessageItem) Finished() bool

Finished implements list.Item. A tool call is freezable once the tool call itself is marked finished AND a result has been recorded (or it has been canceled). Tools that override the spinning logic via spinningFunc would short-circuit live ticks; we still gate freezing on isSpinning to keep the contract conservative.

func (WebSearchToolMessageItem) HandleKeyEvent

func (t WebSearchToolMessageItem) HandleKeyEvent(key tea.KeyMsg) (bool, tea.Cmd)

HandleKeyEvent implements KeyEventHandler.

func (WebSearchToolMessageItem) HandleMouseClick

func (t WebSearchToolMessageItem) HandleMouseClick(btn ansi.MouseButton, x, y int) bool

HandleMouseClick implements MouseClickable.

func (WebSearchToolMessageItem) ID

func (t WebSearchToolMessageItem) ID() string

ID returns the unique identifier for this tool message item.

func (WebSearchToolMessageItem) MessageID

func (t WebSearchToolMessageItem) MessageID() string

MessageID returns the ID of the message containing this tool call.

func (WebSearchToolMessageItem) RawRender

func (t WebSearchToolMessageItem) RawRender(width int) string

RawRender implements MessageItem.

func (WebSearchToolMessageItem) Render

func (t WebSearchToolMessageItem) Render(width int) string

Render renders the tool message item at the given width.

func (WebSearchToolMessageItem) RenderPreview

func (t WebSearchToolMessageItem) RenderPreview(width int) string

RenderPreview renders the tool non-compact without cache or prefix. Bypasses isCompact so the caller gets the full content view regardless of the tool's stored compact state. The caller is responsible for passing the correct available width — no additional capping is applied here.

func (WebSearchToolMessageItem) SetCompact

func (t WebSearchToolMessageItem) SetCompact(compact bool)

SetCompact implements the Compactable interface.

func (WebSearchToolMessageItem) SetMessageID

func (t WebSearchToolMessageItem) SetMessageID(id string)

SetMessageID sets the ID of the message containing this tool call. MessageID is metadata only and does not affect the rendered output, so we deliberately do not bump the version here.

func (WebSearchToolMessageItem) SetResult

func (t WebSearchToolMessageItem) SetResult(res *message.ToolResult)

SetResult sets the tool result associated with this message item.

func (WebSearchToolMessageItem) SetSpinningFunc

func (t WebSearchToolMessageItem) SetSpinningFunc(fn SpinningFunc)

SetSpinningFunc sets a custom function to determine if the tool should spin.

func (WebSearchToolMessageItem) SetStatus

func (t WebSearchToolMessageItem) SetStatus(status ToolStatus)

SetStatus sets the tool status.

func (WebSearchToolMessageItem) SetToolCall

func (t WebSearchToolMessageItem) SetToolCall(tc message.ToolCall)

SetToolCall sets the tool call associated with this message item.

func (WebSearchToolMessageItem) StartAnimation

func (t WebSearchToolMessageItem) StartAnimation() tea.Cmd

StartAnimation starts the assistant message animation if it should be spinning.

func (WebSearchToolMessageItem) Status

func (t WebSearchToolMessageItem) Status() ToolStatus

Status returns the current tool status.

func (WebSearchToolMessageItem) ToggleExpanded

func (t WebSearchToolMessageItem) ToggleExpanded() bool

ToggleExpanded toggles the expanded state of the thinking box.

func (WebSearchToolMessageItem) ToolCall

func (t WebSearchToolMessageItem) ToolCall() message.ToolCall

ToolCall returns the tool call associated with this message item.

type WebSearchToolRenderContext

type WebSearchToolRenderContext struct{}

WebSearchToolRenderContext renders web_search tool messages.

func (*WebSearchToolRenderContext) RenderTool

func (w *WebSearchToolRenderContext) RenderTool(sty *styles.Styles, width int, opts *ToolRenderOpts) string

RenderTool implements the ToolRenderer interface.

type WriteToolMessageItem

type WriteToolMessageItem struct {
	// contains filtered or unexported fields
}

WriteToolMessageItem is a message item that represents a write tool call.

func (WriteToolMessageItem) Animate

func (t WriteToolMessageItem) Animate(msg anim.StepMsg) tea.Cmd

Animate progresses the assistant message animation if it should be spinning.

Bumps the F6 list-cache version so the next draw re-renders this item: a spinner tick mutates anim's internal frame counter, which changes the rendered output but is invisible to the per-item caches. Without the bump the list cache would serve the previously rendered frame indefinitely and the spinner would appear frozen. The ID gate keeps unrelated ticks (routed here by a future change to chat.Animate's dispatch) from churning the cache.

func (WriteToolMessageItem) Finished

func (t WriteToolMessageItem) Finished() bool

Finished implements list.Item. A tool call is freezable once the tool call itself is marked finished AND a result has been recorded (or it has been canceled). Tools that override the spinning logic via spinningFunc would short-circuit live ticks; we still gate freezing on isSpinning to keep the contract conservative.

func (WriteToolMessageItem) HandleKeyEvent

func (t WriteToolMessageItem) HandleKeyEvent(key tea.KeyMsg) (bool, tea.Cmd)

HandleKeyEvent implements KeyEventHandler.

func (WriteToolMessageItem) HandleMouseClick

func (t WriteToolMessageItem) HandleMouseClick(btn ansi.MouseButton, x, y int) bool

HandleMouseClick implements MouseClickable.

func (WriteToolMessageItem) ID

func (t WriteToolMessageItem) ID() string

ID returns the unique identifier for this tool message item.

func (WriteToolMessageItem) MessageID

func (t WriteToolMessageItem) MessageID() string

MessageID returns the ID of the message containing this tool call.

func (WriteToolMessageItem) RawRender

func (t WriteToolMessageItem) RawRender(width int) string

RawRender implements MessageItem.

func (WriteToolMessageItem) Render

func (t WriteToolMessageItem) Render(width int) string

Render renders the tool message item at the given width.

func (WriteToolMessageItem) RenderPreview

func (t WriteToolMessageItem) RenderPreview(width int) string

RenderPreview renders the tool non-compact without cache or prefix. Bypasses isCompact so the caller gets the full content view regardless of the tool's stored compact state. The caller is responsible for passing the correct available width — no additional capping is applied here.

func (WriteToolMessageItem) SetCompact

func (t WriteToolMessageItem) SetCompact(compact bool)

SetCompact implements the Compactable interface.

func (WriteToolMessageItem) SetMessageID

func (t WriteToolMessageItem) SetMessageID(id string)

SetMessageID sets the ID of the message containing this tool call. MessageID is metadata only and does not affect the rendered output, so we deliberately do not bump the version here.

func (WriteToolMessageItem) SetResult

func (t WriteToolMessageItem) SetResult(res *message.ToolResult)

SetResult sets the tool result associated with this message item.

func (WriteToolMessageItem) SetSpinningFunc

func (t WriteToolMessageItem) SetSpinningFunc(fn SpinningFunc)

SetSpinningFunc sets a custom function to determine if the tool should spin.

func (WriteToolMessageItem) SetStatus

func (t WriteToolMessageItem) SetStatus(status ToolStatus)

SetStatus sets the tool status.

func (WriteToolMessageItem) SetToolCall

func (t WriteToolMessageItem) SetToolCall(tc message.ToolCall)

SetToolCall sets the tool call associated with this message item.

func (WriteToolMessageItem) StartAnimation

func (t WriteToolMessageItem) StartAnimation() tea.Cmd

StartAnimation starts the assistant message animation if it should be spinning.

func (WriteToolMessageItem) Status

func (t WriteToolMessageItem) Status() ToolStatus

Status returns the current tool status.

func (WriteToolMessageItem) ToggleExpanded

func (t WriteToolMessageItem) ToggleExpanded() bool

ToggleExpanded toggles the expanded state of the thinking box.

func (WriteToolMessageItem) ToolCall

func (t WriteToolMessageItem) ToolCall() message.ToolCall

ToolCall returns the tool call associated with this message item.

type WriteToolRenderContext

type WriteToolRenderContext struct{}

WriteToolRenderContext renders write tool messages.

func (*WriteToolRenderContext) RenderTool

func (w *WriteToolRenderContext) RenderTool(sty *styles.Styles, width int, opts *ToolRenderOpts) string

RenderTool implements the ToolRenderer interface.

Jump to

Keyboard shortcuts

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