| 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, FunctionCommand, RegisterCommand}; |
| 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(FunctionCommand::new( |
| 21 | skills::SkillsCmd::info(), |
| 22 | skills::SkillsCmd::execute, |
| 23 | )), |
| 24 | Box::new(FunctionCommand::new( |
| 25 | skills::SkillCmd::info(), |
| 26 | skills::SkillCmd::execute, |
| 27 | )), |
| 28 | Box::new(FunctionCommand::new( |
| 29 | review::ReviewCmd::info(), |
| 30 | review::ReviewCmd::execute, |
| 31 | )), |
| 32 | Box::new(FunctionCommand::new( |
| 33 | restore::RestoreCmd::info(), |
| 34 | restore::RestoreCmd::execute, |
| 35 | )), |
| 36 | ]) |
| 37 | } |
| 38 | } |
| 39 |