Module widgets

Module widgets 

Source
Expand description

TUI Widgets

Reusable widget components for LLM-powered terminal applications.

§Core Widgets (always present)

  • ChatView - Chat message display with streaming support
  • TextInput - Text input buffer with cursor management

§Registerable Widgets

§Widget System

Widgets can be registered with the App via the Widget trait. This allows agents to customize which widgets are available.

Re-exports§

pub use chat::ChatView;
pub use chat::MessageRole;
pub use chat::ToolMessageData;
pub use chat::ToolStatus;
pub use chat_helpers::centered_text;
pub use chat_helpers::title_bar;
pub use chat_helpers::welcome_art;
pub use chat_helpers::welcome_art_styled;
pub use chat_helpers::RenderFn;
pub use input::TextInput;
pub use permission_panel::KeyAction as PermissionKeyAction;
pub use permission_panel::PermissionOption;
pub use permission_panel::PermissionPanel;
pub use question_panel::AnswerState;
pub use question_panel::EnterAction;
pub use question_panel::FocusItem;
pub use question_panel::KeyAction as QuestionKeyAction;
pub use question_panel::QuestionPanel;
pub use session_picker::render_session_picker;
pub use session_picker::SessionInfo;
pub use session_picker::SessionPickerState;
pub use slash_popup::render_slash_popup;
pub use slash_popup::SimpleCommand;
pub use slash_popup::SlashCommand as SlashCommandTrait;
pub use slash_popup::SlashPopupState;

Modules§

chat
chat_helpers
Helper functions for ChatView rendering customization
input
Text input buffer with cursor management
permission_panel
Permission panel widget for AskForPermissions tool
question_panel
Question panel widget for AskUserQuestions tool
session_picker
Session picker widget for viewing and switching between sessions
slash_popup
Slash command popup widget and state
widget_ids
Standard widget IDs for built-in widgets

Enums§

WidgetAction
Actions that widgets can request from the App
WidgetKeyResult
Result of a widget handling a key event

Traits§

Widget
Trait for registerable TUI widgets