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 browser;
6mod builtin;
7mod registry;
8mod session;
9mod share;
10
11pub use browser::BrowserCommand;
12pub use builtin::{ClearCommand, ExitCommand, HelpCommand};
13pub use registry::{Command, CommandContext, CommandRegistry, CommandResult};
14pub use session::SessionCommand;
15pub use share::ShareCommand;
16
17/// Create the default command registry with all built-in commands
18pub fn create_default_registry() -> CommandRegistry {
19    let mut registry = CommandRegistry::new();
20
21    registry.register(Box::new(HelpCommand));
22    registry.register(Box::new(ClearCommand));
23    registry.register(Box::new(ExitCommand));
24    registry.register(Box::new(SessionCommand::new()));
25    registry.register(Box::new(ShareCommand::new()));
26    registry.register(Box::new(BrowserCommand::new()));
27
28    registry
29}