import type { SetStateAction } from 'react'; import type { UIBlock } from './block'; import { FileIcon, LoaderIcon, MessageIcon, PencilEditIcon } from './icons'; const getActionText = (type: 'create' | 'update' | 'request-suggestions') => { switch (type) { case 'create': return 'Creating'; case 'update': return 'Updating'; case 'request-suggestions': return 'Adding suggestions'; default: return null; } }; interface DocumentToolResultProps { type: 'create' | 'update' | 'request-suggestions'; result: { id: string; title: string }; block: UIBlock; setBlock: (value: SetStateAction) => void; } export function DocumentToolResult({ type, result, block, setBlock, }: DocumentToolResultProps) { return ( ); } interface DocumentToolCallProps { type: 'create' | 'update' | 'request-suggestions'; args: { title: string }; } export function DocumentToolCall({ type, args }: DocumentToolCallProps) { return (
{type === 'create' ? ( ) : type === 'update' ? ( ) : type === 'request-suggestions' ? ( ) : null}
{getActionText(type)} {args.title}
{}
); }