Skip to main content

limit_cli/tui/commands/
mod.rs

1//! Command system for TUI
2//!
3//! Provides a plugin-like command architecture for handling user commands.
4
5mod builtin;
6mod registry;
7mod session;
8mod share;
9
10pub use builtin::{ClearCommand, ExitCommand, HelpCommand};
11pub use registry::{Command, CommandContext, CommandRegistry, CommandResult};
12pub use session::SessionCommand;
13pub use share::ShareCommand;
14
15/// Create the default command registry with all built-in commands
16pub fn create_default_registry() -> CommandRegistry {
17    let mut registry = CommandRegistry::new();
18
19    registry.register(Box::new(HelpCommand));
20    registry.register(Box::new(ClearCommand));
21    registry.register(Box::new(ExitCommand));
22    registry.register(Box::new(SessionCommand::new()));
23    registry.register(Box::new(ShareCommand::new()));
24
25    registry
26}