Usage
state takes a ToolState member or its string, so the state of a streamed tool part needs no conversion: input-streaming, input-available, output-available and output-error.statusLabels holds the badge label for every state. Define it once and reuse it for every tool. The badge intent follows the state: informative, neutral, success and destructive.input and output print as formatted JSON when they are not null or undefined; 0, false and "" are values. inputLabel and outputLabel are the headings above them.errorText shows in the destructive color.name is an identifier. It renders as code and reads left to right.defaultOpen, open and onOpenChange control the state; details.cancel() keeps the current state.