Mini-Code features a modern terminal-based interface built with Ink (React for CLI). The UI provides real-time interaction with the AI assistant through streaming responses, tool execution visualization, and intuitive controls for conversation management.
- Streaming Responses: See AI responses appear progressively as they're generated
- Tool Visualization: Watch tool calls execute with live status updates
- Permission Prompts: Interactive permission requests for sensitive operations
- Message Feed: Complete conversation history with formatting and syntax highlighting
- @ Mentions: Type
@to quickly select and reference files and folders in your project - Slash Commands: Special commands starting with
/for system control - Keyboard Shortcuts: Efficient keyboard navigation and controls
- Auto-compaction: Automatic conversation management to prevent token limits
- Token Usage: Real-time display of conversation token consumption
- Approval Modes: Visual indicators for current permission settings
- Help System: Contextual help and keyboard shortcuts
The interface maintains a structured state that tracks all conversation and system activity:
The primary message store containing different message types:
LLMMessage: OpenAI API messages with status tracking
- Wrapper around OpenAI
ChatCompletionMessageParam - Tracks message status (streaming, complete, error)
- Includes system, user, assistant, and tool role messages
- Handles errors and streaming state for UI display
CommandMessage: Slash command executions
- Command calls (
/clear,/compact,/init) - Execution status (executing → success | error)
- Command results and error messages
- Auto-triggered commands (like auto-compaction)
Detailed tracking of all tool executions:
- Request ID: Unique identifier for each tool call
- Tool Name: Which tool is being executed (fileRead, fileEdit, etc.)
- Status: Current execution state (pending, executing, completed, failed)
- Input Parameters: What arguments were passed to the tool
- Results: Tool output and metadata
- Timing: Start and end timestamps
- Permission Info: Whether approval was required/granted
Type @ in the input to:
- Search and select files from your project
- Search and select folders from your project
- Quickly reference file and folder paths in conversation
- Filter by file extensions with
@.tsor@.json
Special commands for system control:
Clears all messages from the current session and starts fresh.
Reduces conversation history by creating a summary and keeping only essential context.
Creates or updates AGENTS.md file to establish long-term project memory.
The system automatically manages long conversations to prevent token limit issues:
Trigger: When conversation token usage exceeds 115,000 tokens (90% of 128K limit)
Process:
- System automatically detects high token usage after LLM responses
- Creates a
/compact_auto_*command call (marked as auto-triggered) - Generates comprehensive summary using the same process as
/compact - Replaces conversation history with system message + summary
- Continues the conversation seamlessly
The bottom status bar shows:
- Approval Mode Status: Current permission setting with color coding
- Token Usage: Real-time token consumption with color warnings
- Contextual Help: Keyboard shortcuts and usage tips
- Detailed Help: Expandable help section with all shortcuts
- User Messages: Plain text with full formatting
- AI Responses: Streaming text with markdown support
- Tool Calls: Structured display with status indicators
- Command Results: Formatted output with success/error states
- Permission Prompts: Interactive approval requests
| Shortcut | Function |
|---|---|
Ctrl+A |
Toggle help panel |
Shift+Tab |
Cycle approval modes |
Ctrl+C (twice) |
Exit application |
Option+Enter |
Insert line break |
Double Esc |
Clear input |
Ctrl+E |
Open external editor |
The UI is built with React components using Ink:
- App: Main orchestrator connecting all layers
- MessageFeed: Displays conversation history with streaming
- InputBar: Handles user input with @ mentions and slash commands
- HelpBar: Status bar with help and monitoring
- ToolViews: Specialized displays for different tool types
- PermissionPrompts: Interactive permission requests
- System Architecture - How UI integrates with the agent layer
- LLM Tool Integration - Message processing in the agent loop
- Permission System - Security model and approval modes