feat: 修改 SessionCommandHandler 的构造函数为公有可见性,优化代码可读性;更新 WebSocket 处理逻辑以简化模式匹配

This commit is contained in:
oudecheng 2026-05-13 18:01:08 +08:00
parent aace4eaa14
commit 73faaa95e4
2 changed files with 2 additions and 2 deletions

View File

@ -17,7 +17,7 @@ impl SessionCommandHandler {
/// ///
/// # Arguments /// # Arguments
/// * `cli_sessions` - CLI 会话服务 /// * `cli_sessions` - CLI 会话服务
pub fn new(cli_sessions: CliSessionService) -> Self { pub(crate) fn new(cli_sessions: CliSessionService) -> Self {
Self { cli_sessions } Self { cli_sessions }
} }
} }

View File

@ -224,7 +224,7 @@ async fn handle_inbound(
// 处理响应 // 处理响应
for msg in outbounds { for msg in outbounds {
if let WsOutbound::SessionCreated { session_id, title } = &msg { if let WsOutbound::SessionCreated { session_id, title: _ } = &msg {
*current_session_id = session_id.clone(); *current_session_id = session_id.clone();
state state
.channel_manager .channel_manager