export type AiContentType = string; export type AiChatTheme = 'dark' | 'light'; export type AiChatToolStatus = 'thinking' | 'calling' | 'success' | 'error'; export interface AiChatTool { id: string; name: string; status: AiChatToolStatus; arguments?: any; result?: any; content?: string; rawStatus?: 'TOOL_CALL' | 'TOOL_RESULT'; } export type AiChatResourceType = 'image' | 'video' | 'audio' | 'doc' | 'other'; export interface AiChatResource { resourceId: string; resourceType: AiChatResourceType; resourceName: string; resourceUrl: string; coverUrl?: string; } export type AiChatBlockType = 'markdown' | 'text' | 'table' | 'echarts' | 'image' | 'list' | 'fileList' | 'thinking' | 'file'; export interface AiChatFileItem { name: string; url: string; size?: string; ext?: string; description?: string; } export interface AiChatTableColumn { key: string; title: string; align?: 'left' | 'center' | 'right'; } export interface AiChatStep { type: 'text' | 'markdown' | 'table' | 'image' | 'echarts' | 'tool'; content?: string; columns?: AiChatTableColumn[]; data?: Record[]; url?: string; caption?: string; option?: any; tool?: AiChatTool; delay?: number; } export interface AiChatBlock { sort: number; type: AiChatBlockType; title?: string; content?: string; steps?: AiChatStep[]; columns?: AiChatTableColumn[]; data?: Record[]; option?: any; url?: string; caption?: string; items?: string[]; files?: AiChatFileItem[]; fileUrl?: string; name?: string; ext?: string; } export interface AiChatMessageAi { role: 'ai'; type: AiContentType; content?: string; blocks?: AiChatBlock[]; resources?: AiChatResource[]; tools?: AiChatTool[]; reasoning_content?: string; thinkingStatus?: 'thinking' | 'end' | 'error'; structuredData?: any; audioUrl?: string; thinkCollapse?: boolean; time: string; }