返回 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 dispatch;
7 mod jobs;
8 mod mcp;
9 mod network;
10 mod task;
11 mod update;
12
13 use crate::commands::traits::{Command, CommandGroup, ContextualCommand};
14
15 pub struct UtilityCommands;
16
17 impl CommandGroup for UtilityCommands {
18 fn commands(&self) -> &'static [Box<dyn Command>] {
19 cached_command_list!(vec![
20 Box::new(
21 ContextualCommand::from_contract::<attachment::AttachCmd>()
22 .expect("attach registration"),
23 ),
24 Box::new(
25 ContextualCommand::from_contract::<automation::AutomationCmd>()
26 .expect("automation registration"),
27 ),
28 Box::new(
29 ContextualCommand::from_contract::<task::TaskCmd>().expect("task registration"),
30 ),
31 Box::new(
32 ContextualCommand::from_contract::<jobs::JobsCmd>().expect("jobs registration"),
33 ),
34 Box::new(
35 ContextualCommand::from_contract::<dispatch::DispatchCmd>()
36 .expect("dispatch registration"),
37 ),
38 Box::new(ContextualCommand::from_contract::<mcp::McpCmd>().expect("mcp registration"),),
39 Box::new(
40 ContextualCommand::from_contract::<network::NetworkCmd>()
41 .expect("network registration"),
42 ),
43 Box::new(
44 ContextualCommand::from_contract::<update::UpdateCmd>()
45 .expect("update registration"),
46 ),
47 ])
48 }
49 }
50
50 lines RUST