import { useState } from "react"; import { CaretDownIcon } from "@phosphor-icons/react"; interface ToolCallCardProps { part: { type: string; state?: string; input: unknown; output?: unknown; }; } export const ToolCallCard = ({ part }: ToolCallCardProps) => { const [isExpanded, setIsExpanded] = useState(true); const toolName = part.type.replace("tool-", ""); return (
{JSON.stringify(part.input, null, 2)}
{typeof part.output === "string"
? part.output
: JSON.stringify(part.output, null, 2)}