optimize: Enhanced session command processing logic

This commit is contained in:
xintaofei
2026-04-01 17:22:56 +08:00
parent adb5829613
commit d76dc716e4
15 changed files with 106 additions and 344 deletions

View File

@@ -170,7 +170,6 @@ async fn dispatch_command(
match command.as_str() {
// Existing commands
"recent" => command_handlers::handle_recent(db, lang).await,
"search" => {
if args.is_empty() {
super::types::RichMessage::info(i18n::search_usage(lang, prefix))
@@ -179,14 +178,6 @@ async fn dispatch_command(
command_handlers::handle_search(db, args, lang).await
}
}
"detail" => {
if let Ok(id) = args.parse::<i32>() {
command_handlers::handle_detail(db, id, lang).await
} else {
super::types::RichMessage::info(i18n::detail_usage(lang, prefix))
.with_title(i18n::invalid_args_title(lang))
}
}
"today" => command_handlers::handle_today(db, lang).await,
"status" => command_handlers::handle_status(manager, lang).await,
"help" | "start" => command_handlers::handle_help(prefix, lang),