storkit: merge 383_refactor_reorganize_chat_system_into_chat_module_with_transport_submodules
This commit is contained in:
@@ -10,7 +10,7 @@
|
||||
//! (it clears local session state and message history) and is not routed here.
|
||||
|
||||
use crate::http::context::{AppContext, OpenApiResult};
|
||||
use crate::matrix::commands::CommandDispatch;
|
||||
use crate::chat::transport::matrix::commands::CommandDispatch;
|
||||
use poem::http::StatusCode;
|
||||
use poem_openapi::{Object, OpenApi, Tags, payload::Json};
|
||||
use serde::{Deserialize, Serialize};
|
||||
@@ -112,7 +112,7 @@ fn dispatch_sync(
|
||||
format!("{bot_name} {cmd} {args}")
|
||||
};
|
||||
|
||||
match crate::matrix::commands::try_handle_command(&dispatch, &synthetic) {
|
||||
match crate::chat::transport::matrix::commands::try_handle_command(&dispatch, &synthetic) {
|
||||
Some(response) => response,
|
||||
None => {
|
||||
// Command exists in the registry but its fallback handler returns None
|
||||
@@ -138,7 +138,7 @@ async fn dispatch_assign(
|
||||
return "Usage: `/assign <number> <model>` (e.g. `/assign 42 opus`)".to_string();
|
||||
}
|
||||
|
||||
crate::matrix::assign::handle_assign("web-ui", number_str, model_str, project_root, agents)
|
||||
crate::chat::transport::matrix::assign::handle_assign("web-ui", number_str, model_str, project_root, agents)
|
||||
.await
|
||||
}
|
||||
|
||||
@@ -163,7 +163,7 @@ async fn dispatch_start(
|
||||
Some(hint_str)
|
||||
};
|
||||
|
||||
crate::matrix::start::handle_start("web-ui", number_str, agent_hint, project_root, agents)
|
||||
crate::chat::transport::matrix::start::handle_start("web-ui", number_str, agent_hint, project_root, agents)
|
||||
.await
|
||||
}
|
||||
|
||||
@@ -176,14 +176,14 @@ async fn dispatch_delete(
|
||||
if number_str.is_empty() || !number_str.chars().all(|c| c.is_ascii_digit()) {
|
||||
return "Usage: `/delete <number>` (e.g. `/delete 42`)".to_string();
|
||||
}
|
||||
crate::matrix::delete::handle_delete("web-ui", number_str, project_root, agents).await
|
||||
crate::chat::transport::matrix::delete::handle_delete("web-ui", number_str, project_root, agents).await
|
||||
}
|
||||
|
||||
async fn dispatch_rebuild(
|
||||
project_root: &std::path::Path,
|
||||
agents: &Arc<crate::agents::AgentPool>,
|
||||
) -> String {
|
||||
crate::matrix::rebuild::handle_rebuild("web-ui", project_root, agents).await
|
||||
crate::chat::transport::matrix::rebuild::handle_rebuild("web-ui", project_root, agents).await
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user