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 supportTextInput- Text input buffer with cursor management
§Registerable Widgets
PermissionPanel- Permission request panel for tool interactionsQuestionPanel- Question panel for user input collectionSessionPickerState- Session picker for viewing/switching sessionsSlashPopupState- Slash command popup
§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§
- Batch
Permission Panel - State for the batch permission panel
- Batch
Permission Panel Config - Configuration for BatchPermissionPanel widget
- Chat
View - Chat message display widget with streaming and tool execution support.
- Chat
View Config - Configuration for ChatView widget
- Permission
Panel - State for the permission panel
- Permission
Panel Config - Configuration for PermissionPanel widget
- Question
Panel - State for the question panel overlay
- Question
Panel Config - Configuration for QuestionPanel widget
- Session
Info - Information about a session for display purposes Information about an LLM session for display in the session picker.
- Session
Picker Config - Configuration for SessionPicker widget
- Session
Picker State - State for the session picker
- Simple
Command - A simple command implementation for testing
- Slash
Popup Config - Configuration for SlashPopup widget
- Slash
Popup State - State for the slash command popup
- Status
Bar - Status bar widget implementation
- Status
BarConfig - Configuration for the status bar widget
- Status
BarData - Data required for rendering the status bar
- Text
Input - Text input buffer with cursor management
- Tool
Message Data - Data for tool execution messages Display data for tool execution messages.
- Widget
KeyContext - Context provided to widgets when handling key events.
Enums§
- Answer
State - Answer state for a single question
- Batch
KeyAction - Result of handling a key event
- Batch
Permission Option - Options available for batch permission decisions
- Enter
Action - Result of pressing Enter
- Focus
Item - Represents a focusable item in the panel
- Message
Role - Role of a chat message
- Permission
KeyAction - Result of handling a key event
- Permission
Option - Options available for the user to select
- Question
KeyAction - Result of handling a key event
- Tool
Status - Status of a tool execution
- Widget
Action - Actions that widgets can request from the App
- Widget
KeyResult - Result of a widget handling a key event
Traits§
- Conversation
View - Trait for conversation/chat display widgets.
- Slash
Command Display - 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§
- Conversation
View Factory - Type alias for conversation view factory functions.
- Render
Fn - Type alias for render callbacks used by ChatView