返回 CodeWhale
mod.rs
根目录 / crates / tui / src / commands / groups / skills / mod.rs
1 //! Skills command area: listing and running skills, review, and restore.
2
3 mod restore;
4 mod review;
5 // This group dir intentionally has a `skills.rs` child module with the same
6 // name. The module_inception allow is a permanent structure rationale, not
7 // migration scaffolding; see docs/architecture/command-dispatch.md.
8 #[allow(clippy::module_inception)]
9 mod skills;
10
11 pub(in crate::commands) use self::skills::run_skill_by_name;
12
13 use crate::commands::traits::{Command, CommandGroup, ContextualCommand};
14
15 pub struct SkillsCommands;
16
17 impl CommandGroup for SkillsCommands {
18 fn commands(&self) -> &'static [Box<dyn Command>] {
19 cached_command_list!(vec![
20 Box::new(
21 ContextualCommand::from_contract::<skills::SkillsCmd>()
22 .expect("skills registration")
23 ),
24 Box::new(
25 ContextualCommand::from_contract::<skills::SkillCmd>().expect("skill registration")
26 ),
27 Box::new(
28 ContextualCommand::from_contract::<review::ReviewCmd>()
29 .expect("review registration")
30 ),
31 Box::new(
32 ContextualCommand::from_contract::<restore::RestoreCmd>()
33 .expect("restore registration")
34 ),
35 ])
36 }
37 }
38
38 lines RUST