Mixins / foldkit-mixins-ui

ThinkingStepsSlots

const · packages/mixins-ui/src/thinkingSteps.ts:23

const ThinkingStepsSlots: Slots.Contract<{ readonly root: Slot.UnnamedSlot<Capability.Capability<"Container", readonly [Capability.Capability<"Interactive", readonly [Capability.Capability<"Base", readonly []>]>]>, readonly Slot.EventName[], readonly Slot.AttributeName[], readonly Slot.RequirementName[], boolean>; readonly trigger: Slot.UnnamedSlot<Capability.Capability<"Interactive", readonly [Capability.Capability<"Base", readonly []>]>, readonly [Event.EventToken<"click">], readonly [Attr.AttrToken<"aria-expanded">], readonly Slot.RequirementName[], boolean>; readonly summary: Slot.UnnamedSlot<Capability.Capability<"Container", readonly [Capability.Capability<"Interactive", readonly [Capability.Capability<"Base", readonly []>]>]>, readonly Slot.EventName[], readonly Slot.AttributeName[], readonly Slot.RequirementName[], boolean>; readonly chevron: Slot.UnnamedSlot<Capability.Capability<"Container", readonly [Capability.Capability<"Interactive", readonly [Capability.Capability<"Base", readonly []>]>]>, readonly Slot.EventName[], readonly Slot.AttributeName[], readonly Slot.RequirementName[], boolean>; readonly panel: Slot.UnnamedSlot<Capability.Capability<"Container", readonly [Capability.Capability<"Interactive", readonly [Capability.Capability<"Base", readonly []>]>]>, readonly Slot.EventName[], readonly Slot.AttributeName[], readonly Slot.RequirementName[], boolean>; readonly list: Slot.UnnamedSlot<Capability.Capability<"Container", readonly [Capability.Capability<"Interactive", readonly [Capabil …;

An assistant's reasoning and tool calls as a trace, ai-elements' Reasoning and Chain of Thought: a button that shows and hides the list of steps, saying Thinking (the running step's title) while it works and Thought for 4s once done, and the steps, each with a marker for its state, its title, how long it took, and detail and steps of its own.

Whether the trace is open is the application's, as an Option: none follows the work, open while it runs and shut once it is done, and the button sends the state the reader asked for, which the application keeps from then on. Given onToggleStep, a step with detail is a button that shows and hides it, the open ones the application's (Accordion.toggled applies a press); without it, every detail shows. A shut part stays drawn and inert, so its close can animate and aria-controls names a node. A step's state is said in words beside its title; the marker is hidden from assistive technology.