import { BubbleProps } from 'vue-element-plus-x/types/Bubble' // 类型定义 interface MessageItem extends BubbleProps { role: 'ai' | 'user' content: string messageType?: 'history' | 'realtime' messageStatus?: 'failed' | 'success' thinkingStatus?: 'thinking' | 'end' | 'none' | 'error' thinkingContent?: string | null | undefined showThinkingContent?: boolean isRecommend?: boolean sendTime?: string question?: string additionalData?: any[] additionalDataLabel?: string menuName?: string menuCode?: string askAdditionalData?: any[] recommendations?: any[] key: number | string loading: boolean isMarkdown: boolean typing: boolean avatar: string avatarSize: string noStyle: boolean statusValue: string placement: 'start' | 'end' isInteraction?: boolean // 是否是交互类型的消息,还是ai思考回答型 [otherProp: string]: any link?: string linkTitle?: string } interface SubmitData { question: string | null | undefined additionalData?: any[] additionalDataLabel?: string menuName?: string menuCode?: string aiModel?: string fileId?: string // 上传文件id,多个逗号分隔 fileInfos?: any systemCode?: string | null ragflowFileTag?: any enableThinking?: boolean agentCode?: string | null | undefined } // 常量定义 const AI_MODELS = { DEEPSEEK: 'deepseek', RAGFLOW: 'ragflow', DATABASE: 'database', INTERACTION: 'interaction', PPT_GENERATION: 'ppt_generation', QMS_REPORT: 'qms_report' } as const const MESSAGE_STATUS = { THINKING: 'thinking', END: 'end', ERROR: 'error', FAILED: 'failed', NONE: 'none' } as const interface AiUploadFile { id: string | number uid: string | number name: string percent: number status: 'uploading' | 'done' | 'error' showDelIcon?: boolean maxWidth?: string } export { MessageItem, SubmitData, AI_MODELS, MESSAGE_STATUS, AiUploadFile }