pub mod adapter; pub mod adapters; pub mod context; pub mod handler; pub mod handlers; pub mod response; use serde::{Deserialize, Serialize}; /// 统一命令枚举 - 与渠道无关 #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(tag = "type", rename_all = "snake_case")] pub enum Command { /// 创建新会话 CreateSession { title: Option }, /// 保存会话内容到 Markdown 文件 SaveSession { filepath: Option }, } impl Command { /// 获取命令名称(用于日志和调试) pub fn name(&self) -> &'static str { match self { Command::CreateSession { .. } => "create_session", Command::SaveSession { .. } => "save_session", } } }