ToolCall
Description
Inline tool-call indicator that expands accordion-style to show the associated content. The content component is created lazily the first time the user expands the tool call. Used in chat / assistant UIs to surface tool invocations without taking up vertical space until expanded.
Usage
API reference
public sealed class ToolCall : ComponentBase<ToolCall, HTMLElement>Inline tool-call indicator that expands accordion-style to show the associated content. The content component is created lazily the first time the user expands the tool call.
Constructors
public ToolCall(UIcons icon, string text, Func<IComponent> contentFactory = null)Initializes a new instance of this class.
Properties
public bool IsExpandedGets or sets a value indicating whether the component is expanded.
Methods
public IComponent CreateContent()Returns a fresh IComponent built from the content factory, or null if no factory was provided. Used by to render the detail pane independently of this inline view.
public ToolCall SetContent(Func<IComponent> contentFactory)Sets the content of the component.
public ToolCall SetContent(IComponent content)Sets the content of the component.
public ToolCall NotExpandable()Configures the not expandable on the component.
public ToolCall OnToggle(Action<ToolCall> onToggle)Registers a callback invoked when the toggle event fires.
public sealed class ToolsUsed : ComponentBase<ToolsUsed, HTMLElement>Compact summary of multiple tool calls that opens a popup showing the list of tools on the left. Clicking a tool slides the list to the left and shows that tool's content on the right with a back button to return to the list.
Constructors
Methods
public ToolsUsed AddRange(IEnumerable<ToolCall> tools)Adds the given range to the component.
public ToolsUsed Add(UIcons icon, string text, Func<IComponent> contentFactory)Adds the given item to the component.
public ToolsUsed Add(UIcons icon, string text, IComponent content)Adds the given item to the component.
public ToolsUsed SetSummary(string label)Sets the summary of the component.