Expand description
TUI (Terminal User Interface) module for limit-cli
This module provides a rich terminal interface for interacting with the Limit AI agent.
§Architecture
The TUI system is organized into several components:
- State: Core state types (
TuiState,FileAutocompleteState) - Bridge: Connection between agent and UI (
TuiBridge) - App: Main application loop (
TuiApp) - Input: Input handling (
InputHandler,InputEditor,ClipboardHandler) - Activity: Activity message formatting
- Autocomplete: File autocomplete management
§Example
use limit_cli::tui::app::{TuiBridge, TuiApp};
use limit_cli::agent_bridge::{AgentBridge, AgentEvent};
use tokio::sync::mpsc;
// Create agent bridge and event channel
let (tx, rx) = mpsc::unbounded_channel();
let bridge = AgentBridge::new(config)?;
// Create TUI bridge
let tui_bridge = TuiBridge::new(bridge, rx)?;
// Run TUI app
let app = TuiApp::new(tui_bridge)?;
app.run()?;Re-exports§
pub use input::InputHandler;
Modules§
- activity
- Activity message formatting for TUI
- app
- TUI Application module
- autocomplete
- File autocomplete manager for TUI
- bridge
- TUI Bridge module
- commands
- Command system for TUI
- input
- Input handling module for TUI
- ui
- UI rendering module
Structs§
- File
Autocomplete State - State for file autocomplete popup
Enums§
- TuiState
- TUI state for displaying agent events
Constants§
- MAX_
PASTE_ SIZE - Maximum paste size to prevent memory issues (100KB)