refactor: consolidate CLI command definitions to lib.rs
- Move all CLI command enums (ChannelCommands, SkillCommands, CronCommands, IntegrationCommands, MigrateCommands, ServiceCommands) to lib.rs - Add clap derives for use in main.rs CLI parsing - Update all modules to use crate:: prefix instead of super:: for command types - Add mod util; to main.rs for binary compilation - Export Config type from lib.rs for main.rs This refactoring eliminates code duplication between library modules and binary, centralizing all CLI command definitions in one place. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
9aaa5bfef1
commit
085b57aa30
7 changed files with 131 additions and 18 deletions
|
|
@ -67,9 +67,9 @@ pub struct IntegrationEntry {
|
|||
}
|
||||
|
||||
/// Handle the `integrations` CLI command
|
||||
pub fn handle_command(command: super::IntegrationCommands, config: &Config) -> Result<()> {
|
||||
pub fn handle_command(command: crate::IntegrationCommands, config: &Config) -> Result<()> {
|
||||
match command {
|
||||
super::IntegrationCommands::Info { name } => show_integration_info(config, &name),
|
||||
crate::IntegrationCommands::Info { name } => show_integration_info(config, &name),
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue