import type { SetStateAction } from 'react'; import type { UIBlock } from './block'; import { FileIcon, LoaderIcon, MessageIcon, PencilEditIcon } from './icons'; const getActionText = ( type: 'create' | 'update' | 'request-suggestions', tense: 'present' | 'past', ) => { switch (type) { case 'create': return tense === 'present' ? 'Creating' : 'Created'; case 'update': return tense === 'present' ? 'Updating' : 'Updated'; case 'request-suggestions': return tense === 'present' ? 'Adding suggestions' : 'Added suggestions to'; 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, setBlock, }: DocumentToolResultProps) { return ( ); } interface DocumentToolCallProps { type: 'create' | 'update' | 'request-suggestions'; args: { title: string }; setBlock: (value: SetStateAction) => void; } export function DocumentToolCall({ type, args, setBlock, }: DocumentToolCallProps) { return ( ); }