Skip to main content

Module interactive

Module interactive 

Source
Expand description

Interactive TUI mode using charmed_rust (bubbletea/lipgloss/bubbles/glamour).

This module provides the full interactive terminal interface for Pi, implementing the Elm Architecture for state management.

§Features

  • Multi-line editor: Full text area with line wrapping and history
  • Viewport scrolling: Scrollable conversation history with keyboard navigation
  • Slash commands: Built-in commands like /help, /clear, /model, /exit
  • Token tracking: Real-time cost and token usage display
  • Markdown rendering: Assistant responses rendered with syntax highlighting

Structs§

ConversationMessage
A message in the conversation history.
PiApp
The main interactive TUI application model.

Enums§

AgentState
State of the agent processing.
InputMode
Input mode for the TUI.
MessageRole
Role of a message.
PendingInput
PiMsg
Custom message types for async agent events.
SlashCommand
Available slash commands.

Functions§

format_extension_ui_prompt
model_entry_matches
parse_extension_ui_response
parse_scoped_model_patterns
resolve_scoped_model_entries
run_interactive
Run the interactive mode.
strip_thinking_level_suffix