返回 CodeWhale
mod.rs
根目录 / crates / tui / src / commands / groups / utility / mod.rs
1 //! Utility command area: attachments, background tasks, jobs, MCP, network
2 //! inspection, and self-update.
3
4 mod attachment;
5 mod automation;
6 mod jobs;
7 mod mcp;
8 mod network;
9 mod task;
10 mod update;
11
12 use crate::commands::traits::{Command, CommandGroup, ContextualCommand};
13
14 pub struct UtilityCommands;
15
16 impl CommandGroup for UtilityCommands {
17 fn commands(&self) -> &'static [Box<dyn Command>] {
18 cached_command_list!(vec![
19 Box::new(
20 ContextualCommand::from_contract::<attachment::AttachCmd>()
21 .expect("attach registration"),
22 ),
23 Box::new(
24 ContextualCommand::from_contract::<automation::AutomationCmd>()
25 .expect("automation registration"),
26 ),
27 Box::new(
28 ContextualCommand::from_contract::<task::TaskCmd>().expect("task registration"),
29 ),
30 Box::new(
31 ContextualCommand::from_contract::<jobs::JobsCmd>().expect("jobs registration"),
32 ),
33 Box::new(ContextualCommand::from_contract::<mcp::McpCmd>().expect("mcp registration"),),
34 Box::new(
35 ContextualCommand::from_contract::<network::NetworkCmd>()
36 .expect("network registration"),
37 ),
38 Box::new(
39 ContextualCommand::from_contract::<update::UpdateCmd>()
40 .expect("update registration"),
41 ),
42 ])
43 }
44 }
45
45 lines RUST