Expand description
LLM TUI Components
Reusable Ratatui components for LLM-powered terminal applications.
This module provides:
App- Complete TUI application with chat, input, and command handlingChatView- Chat message display with streaming supportlayout- Flexible layout system with templates and custom layouts- Permission and question panels for tool interactions
- Markdown rendering with theming support
- Table rendering
- Session pickers
- Slash command system
- Text input with cursor management
- Theme system with 45+ built-in themes
Re-exports§
pub use widgets::ChatView;pub use widgets::MessageRole;pub use widgets::TextInput;pub use widgets::ToolMessageData;pub use widgets::ToolStatus;pub use widgets::RenderFn;pub use widgets::centered_text;pub use widgets::title_bar;pub use widgets::welcome_art;pub use widgets::welcome_art_styled;pub use widgets::AnswerState;pub use widgets::EnterAction;pub use widgets::FocusItem;pub use widgets::PermissionKeyAction;pub use widgets::PermissionOption;pub use widgets::PermissionPanel;pub use widgets::QuestionKeyAction;pub use widgets::QuestionPanel;pub use widgets::SessionInfo;pub use widgets::SessionPickerState;pub use widgets::SimpleCommand;pub use widgets::SlashCommandTrait;pub use widgets::SlashPopupState;pub use widgets::render_session_picker;pub use widgets::render_slash_popup;pub use markdown::parse_to_spans;pub use markdown::parse_to_styled_words;pub use markdown::render_markdown_with_prefix;pub use markdown::split_content_segments;pub use markdown::wrap_with_prefix;pub use markdown::ContentSegment;pub use table::is_table_line;pub use table::is_table_separator;pub use table::render_table;pub use table::PulldownRenderer;pub use table::TableRenderer;pub use messages::different_random_index;pub use messages::random_message_index;pub use messages::FUNNY_MESSAGES;pub use themes::current_theme_name;pub use themes::default_theme_name;pub use themes::get_theme;pub use themes::init_theme;pub use themes::list_themes;pub use themes::render_theme_picker;pub use themes::set_theme;pub use themes::theme as app_theme;pub use themes::theme as app_theme;pub use themes::Theme;pub use themes::ThemeInfo;pub use themes::ThemePickerState;pub use themes::THEMES;pub use layout::LayoutContext;pub use layout::LayoutProvider;pub use layout::LayoutResult;pub use layout::LayoutTemplate;pub use layout::MinimalOptions;pub use layout::SidebarOptions;pub use layout::SidebarPosition;pub use layout::SidebarWidth;pub use layout::SplitOptions;pub use layout::SplitRatio;pub use layout::StandardOptions;pub use layout::WidgetSizes;pub use layout::helpers as layout_helpers;pub use keys::AppKeyAction;pub use keys::AppKeyResult;pub use keys::DefaultKeyHandler;pub use keys::ExitHandler;pub use keys::ExitState;pub use keys::KeyBindings;pub use keys::KeyCombo;pub use keys::KeyContext;pub use keys::KeyHandler;
Modules§
- keys
- Customizable key handling for LLM TUI applications.
- layout
- Layout system for TUI widgets
- markdown
- Markdown parsing utilities for TUI rendering
- messages
- table
- Table rendering utilities for TUI
- themes
- Application-level TUI components
- widgets
- TUI Widgets
Structs§
- App
- AppConfig
- Configuration for the App
- Slash
Command - A slash command with its name and description
Statics§
- DEFAULT_
COMMANDS - Default commands available in all agents
Functions§
- filter_
commands - Returns commands that match the given input prefix. Input should include the leading slash (e.g., “/he” to match “/help”)
- generate_
help_ message - Generate help message with all available commands
- get_
command_ by_ name - Returns a command by its name, or None if not found
- get_
default_ commands - Returns all default slash commands
- is_
slash_ command - Check if input is a slash command
- parse_
command - Parse slash command from input, returning (command_name, args)