export type MessagePartType = 'text' | 'reasoning' | 'tool-call' | 'tool-result' | 'tool-approval' | 'image' export interface MessagePart { id: string type: MessagePartType text?: string toolName?: string toolCallId?: string args?: unknown result?: unknown state?: 'preparing' | 'call' | 'result' | 'approval-requested' | 'approval-responded' | 'interrupted' approvalId?: string approved?: boolean approvalReason?: string isAutomaticApproval?: boolean reasoningLoading?: boolean reasoningDuration?: number image?: { url: string mimeType: string name?: string } } export interface ContentTextPart { type: 'text' text: string } export interface ContentImagePart { type: 'image' image: string mimeType: string name?: string } export type ContentPart = ContentTextPart | ContentImagePart