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