@@ -50,16 +50,16 @@ type Compactable interface {
5050 SetCompact(compact bool)
5151}
5252
53−// IsSpinningState contains the state passed to IsSpinningFn for custom spinning logic.
54−type IsSpinningState struct {
53+// SpinningState contains the state passed to SpinningFunc for custom spinning logic.
54+type SpinningState struct {
5555 ToolCall message.ToolCall
5656 Result *message.ToolResult
5757 Canceled bool
5858}
5959
60−// IsSpinningFn is a function type for custom spinning logic.
60+// SpinningFunc is a function type for custom spinning logic.
6161// Returns true if the tool should show the spinning animation.
62−type IsSpinningFn func(state IsSpinningState) bool
62+type SpinningFunc func(state SpinningState) bool
6363
6464// DefaultToolRenderContext implements the default [ToolRenderer] interface.
6565type DefaultToolRenderContext struct{}
@@ -130,9 +130,9 @@ type baseToolMessageItem struct {
130130 hasCappedWidth bool
131131 // isCompact indicates this tool should render in compact mode.
132132 isCompact bool
133− // isSpinningFn allows tools to override the default spinning logic.
133+ // spinningFunc allows tools to override the default spinning logic.
134134 // If nil, uses the default: !toolCall.Finished && !canceled.
135− isSpinningFn IsSpinningFn
135+ spinningFunc SpinningFunc
136136
137137 sty *styles.Styles
138138 anim *anim.Anim
@@ -349,8 +349,8 @@ func (t *baseToolMessageItem) SetPermissionGranted(granted bool) {
349349
350350// isSpinning returns true if the tool should show animation.
351351func (t *baseToolMessageItem) isSpinning() bool {
352− if t.isSpinningFn != nil {
353− return t.isSpinningFn(IsSpinningState{
352+ if t.spinningFunc != nil {
353+ return t.spinningFunc(SpinningState{
354354 ToolCall: t.toolCall,
355355 Result: t.result,
356356 Canceled: t.canceled,
@@ -359,9 +359,9 @@ func (t *baseToolMessageItem) isSpinning() bool {
359359 return !t.toolCall.Finished && !t.canceled
360360}
361361
362−// SetIsSpinningFn sets a custom function to determine if the tool should spin.
363−func (t *baseToolMessageItem) SetIsSpinningFn(fn IsSpinningFn) {
364− t.isSpinningFn = fn
362+// SetSpinningFunc sets a custom function to determine if the tool should spin.
363+func (t *baseToolMessageItem) SetSpinningFunc(fn SpinningFunc) {
364+ t.spinningFunc = fn
365365}
366366
367367// ToggleExpanded toggles the expanded state of the thinking box.