Module tui

Module tui 

Source
Expand description

Terminal UI components and application framework. LLM TUI Components

Reusable Ratatui components for LLM-powered terminal applications.

This module provides:

  • App - Complete TUI application with chat, input, and command handling
  • ChatView - Chat message display with streaming support
  • Layout system - 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 commands::CommandContext;
pub use commands::CommandRegistry;
pub use commands::CommandResult;
pub use commands::CustomCommand;
pub use commands::SlashCommand;
pub use commands::ClearCommand;
pub use commands::CompactCommand;
pub use commands::HelpCommand;
pub use commands::NewSessionCommand;
pub use commands::QuitCommand;
pub use commands::SessionsCommand;
pub use commands::StatusCommand;
pub use commands::ThemesCommand;
pub use commands::VersionCommand;
pub use commands::default_commands;
pub use commands::filter_commands;
pub use commands::generate_help_message;
pub use commands::get_command_by_name;
pub use commands::is_slash_command;
pub use commands::parse_command;
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::ConversationView;
pub use widgets::ConversationViewFactory;
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::SlashCommandDisplay;
pub use widgets::SlashPopupState;
pub use widgets::StatusBar;
pub use widgets::StatusBarConfig;
pub use widgets::StatusBarData;
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 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§

commands
Slash command system. Slash command system for the TUI.
keys
Key handling and bindings. Customizable key handling for LLM TUI applications.
layout
Layout templates and providers. Layout system for TUI widgets
markdown
Markdown rendering utilities. Markdown parsing utilities for TUI rendering
table
Table rendering utilities. Table rendering utilities for TUI
themes
Theme system and built-in themes. Application-level TUI components
widgets
TUI widgets (chat, input, panels). TUI Widgets

Structs§

App
Terminal UI application with chat, input, and command handling.
AppConfig
Configuration for the App