import 'package:meta/meta.dart'; /// 语音交互事件基类 abstract class VoiceInteractionEvent { final int timestamp; VoiceInteractionEvent({required this.timestamp}); } /// 聊天历史事件 class ChatHistoryEvent extends VoiceInteractionEvent { final String agentId; final String userMessage; final String assistantMessage; ChatHistoryEvent({ required this.agentId, required this.userMessage, required this.assistantMessage, required int timestamp, }) : super(timestamp: timestamp); } /// 语音识别开始事件 class RecognitionStartedEvent extends VoiceInteractionEvent { RecognitionStartedEvent({ required int timestamp, }) : super(timestamp: timestamp); } /// 通用语音交互事件 /// 用于处理其他类型的事件 class GenericVoiceInteractionEvent extends VoiceInteractionEvent { final String type; final Map? data; GenericVoiceInteractionEvent({ required this.type, this.data, required int timestamp, }) : super(timestamp: timestamp); }