Skip to main content

Module widgets

Module widgets 

Source
Expand description

TUI widgets (chat, input, panels). 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.

Modules§

batch_permission_panel
Batch permission panel widget for parallel tool permissions
chat
chat_helpers
Helper types for ChatView rendering customization
conversation
ConversationView trait for conversation/chat display widgets.
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
status_bar
Status bar widget for displaying application state
widget_ids
Standard widget IDs for built-in widgets

Structs§

BatchPermissionPanel
State for the batch permission panel
BatchPermissionPanelConfig
Configuration for BatchPermissionPanel widget
ChatView
Chat message display widget with streaming and tool execution support.
ChatViewConfig
Configuration for ChatView widget
PermissionPanel
State for the permission panel
PermissionPanelConfig
Configuration for PermissionPanel widget
QuestionPanel
State for the question panel overlay
QuestionPanelConfig
Configuration for QuestionPanel widget
SessionInfo
Information about a session for display purposes Information about an LLM session for display in the session picker.
SessionPickerConfig
Configuration for SessionPicker widget
SessionPickerState
State for the session picker
SimpleCommand
A simple command implementation for testing
SlashPopupConfig
Configuration for SlashPopup widget
SlashPopupState
State for the slash command popup
StatusBar
Status bar widget implementation
StatusBarConfig
Configuration for the status bar widget
StatusBarData
Data required for rendering the status bar
TextInput
Text input buffer with cursor management
ToolMessageData
Data for tool execution messages Display data for tool execution messages.
WidgetKeyContext
Context provided to widgets when handling key events.

Enums§

AnswerState
Answer state for a single question
BatchKeyAction
Result of handling a key event
BatchPermissionOption
Options available for batch permission decisions
EnterAction
Result of pressing Enter
FocusItem
Represents a focusable item in the panel
MessageRole
Role of a chat message
PermissionKeyAction
Result of handling a key event
PermissionOption
Options available for the user to select
QuestionKeyAction
Result of handling a key event
ToolStatus
Status of a tool execution
WidgetAction
Actions that widgets can request from the App
WidgetKeyResult
Result of a widget handling a key event

Traits§

ConversationView
Trait for conversation/chat display widgets.
SlashCommandDisplay
Trait for displaying slash commands in the popup.
Widget
Trait for registerable TUI widgets

Functions§

render_session_picker
Render the session picker
render_slash_popup
Render the slash command popup

Type Aliases§

ConversationViewFactory
Type alias for conversation view factory functions.
RenderFn
Type alias for render callbacks used by ChatView