import { useState } from 'react' import { Button } from '@/client/components/ui/button' import { FIXTURE_CWD, liveToolCalls, multipleToolCalls, singleToolCall, subagentDoneTrace, subagentTrace, ToolCallGroup } from '@/client/features/chat/tool-group' const VARIANTS = [ { value: 'single', label: 'Single' }, { value: 'multiple', label: 'Multiple' }, { value: 'live', label: 'Live' }, { value: 'subagent', label: 'Subagent' }, { value: 'subagent-done', label: 'Subagent done' } ] as const type Variant = (typeof VARIANTS)[number]['value'] type SegmentedProps = { value: Variant onChange: (value: Variant) => void } function Segmented({ value, onChange }: SegmentedProps) { return (
{VARIANTS.map(o => ( ))}
) } // Scratch route for iterating on in isolation. Renders the // group inside a chat-width card so it reads like the real transcript. const FIXTURES: Record = { single: singleToolCall, multiple: multipleToolCalls, live: liveToolCalls, subagent: subagentTrace, 'subagent-done': subagentDoneTrace } export function ToolCallsPage() { const [variant, setVariant] = useState('multiple') return (
Playground / Tool calls
{/* `processing` only matters for the live variant — it turns the trailing reasoning into "Thinking" and shows the live running tool spinning. */}
) }