import { Streamdown } from 'streamdown'; import { code } from '@streamdown/code'; interface Props { text: string; toolName?: string; } /** Friendly label for SDK tool names */ function toolLabel(name: string): string { const labels: Record = { Read: 'Reading file', Write: 'Writing file', Edit: 'Editing file', Bash: 'Running command', Grep: 'Searching code', Glob: 'Finding files', Task: 'Running task', WebFetch: 'Fetching URL', WebSearch: 'Searching web', }; return labels[name] || `Using ${name}`; } export default function TypingIndicator({ text, toolName }: Props) { // Dots-only indicator — small content-sized bubble if (!text) { return (
{/* Tool activity label — hidden for now (will be used for skill UI later) {toolName && (
{toolLabel(toolName)}...
)} */}
); } // Streaming text — full-width bubble matching assistant MessageBubble return (
{text} {/* Tool activity label — hidden for now (will be used for skill UI later) {toolName && (
{toolLabel(toolName)}...
)} */}
); }