AI Agents Fancy Stable

ToolCall

.md

One tool invocation in a disclosure card: status dot, tool name, duration, and the request and result payloads pretty-printed on expand

Preview

Installation

pnpm add fancy-ui-svelte
import { ToolCall } from 'fancy-ui-svelte'

Usage

svelte
<script lang="ts">
  import { ToolCall } from 'fancy-ui-svelte';
</script>

<ToolCall />

Examples

Basic Usage

Props

PropTypeDefaultDescription
call *ToolCallData-The invocation to render: id, name, status, and whatever payloads exist so far
open boolean-Expanded state (bindable). Left undefined the card stays collapsed, except that a call with status "error" opens itself — until the reader toggles it by hand
onToggle (open: boolean) => void-Called on every open/close, by click or on the card's own initiative
sound booleanfalsePlays open or close when the reader toggles the payloads, once the user has enabled sound

Slots

SlotDescription
inputReplaces the default request rendering; receives call.input
outputReplaces the default result rendering; receives call.output
iconLeading icon, replacing the default wrench