Repository navigation
Expand file tree
/
Copy pathmod.rs
More file actions
42 lines (38 loc) · 1.42 KB
/
Copy pathmod.rs
File metadata and controls
42 lines (38 loc) · 1.42 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
//! Debug commands for Cortex CLI.
//!
//! Provides diagnostic and debugging functionality:
//! - Configuration inspection
//! - File metadata and MIME detection
//! - LSP server status
//! - Ripgrep availability
//! - Skill validation
//! - Snapshot inspection
//! - Path inspection
//! - System information (OS, arch, shell, etc.)
//! - Wait for conditions
mod commands;
mod handlers;
mod types;
pub mod utils;
pub use commands::{
ConfigArgs, DebugCli, DebugSubcommand, FileArgs, LspArgs, PathsArgs, RipgrepArgs, SkillArgs,
SnapshotArgs, SystemArgs, WaitArgs,
};
pub use types::*;
use anyhow::Result;
impl DebugCli {
/// Run the debug command.
pub async fn run(self) -> Result<()> {
match self.subcommand {
DebugSubcommand::Config(args) => handlers::run_config(args).await,
DebugSubcommand::File(args) => handlers::run_file(args).await,
DebugSubcommand::Lsp(args) => handlers::run_lsp(args).await,
DebugSubcommand::Ripgrep(args) => handlers::run_ripgrep(args).await,
DebugSubcommand::Skill(args) => handlers::run_skill(args).await,
DebugSubcommand::Snapshot(args) => handlers::run_snapshot(args).await,
DebugSubcommand::Paths(args) => handlers::run_paths(args).await,
DebugSubcommand::System(args) => handlers::run_system(args).await,
DebugSubcommand::Wait(args) => handlers::run_wait(args).await,
}
}
}