The Two Modes
- AI Terminal
- Command Terminal
Main Window in AI ModeWhen in AI mode, your input goes to the AI assistant. You can:
- Ask coding questions
- Request file edits
- Generate code
- Review changes
- Use AI-specific commands
src/renderer/components/MainPanel.tsx (AI mode)Switching Modes
The Magic Keyboard Shortcut
PressCmd+J to toggle between AI and terminal modes instantly.
Why This Matters: Both processes stay running. Switching modes just changes which process receives your input - no startup delays!
How It Works Internally
Dual-Process Architecture
Each agent maintains two active processes:Process Management
AI Processes: Spawned viachild_process.spawn() with shell: false for security.
Terminal Processes: Spawned via node-pty with full shell emulation.
Source: src/main/process-manager.ts
Input Routing
When you type in the input field, Maestro routes your text based oninputMode:
Mode-Specific Features
AI Mode Features
Multi-Tab Support
Multi-Tab Support
Create multiple AI conversation tabs within a single agent. Each tab can have its own provider session.Interface:
src/renderer/types/index.ts:AITab@-Mentions for Files
@-Mentions for Files
Reference files directly in your prompts:Maestro auto-completes file paths as you type
@.Hook: src/renderer/hooks/useAtMentionCompletion.tsRead-Only Mode
Read-Only Mode
Toggle read-only mode per tab to prevent accidental writes:Read-only operations can run in parallel without queueing.
Tool Call Cards
Tool Call Cards
AI tool executions appear as interactive cards showing:
- Command executed
- Working directory
- Exit code
- Output preview
src/renderer/components/ToolCallCard.tsxTerminal Mode Features
Tab Completion
Tab Completion
Full shell tab completion support (files, commands, git branches).Hook:
src/renderer/hooks/useTabCompletion.tsCommand History
Command History
Navigate your command history with arrow keys:
↑Previous command↓Next commandCmd+FSearch history
maestro-history.json.ANSI Escape Codes
ANSI Escape Codes
Full support for terminal colors, cursor positioning, and text formatting.Filter:
src/main/utils/terminalFilter.tsPTY Resize
PTY Resize
Terminal auto-resizes when you change window dimensions.
Mode Indicators
The active mode is clearly indicated in the UI:Visual Indicators
- Tab Bar: Shows “AI” or “Terminal” badge
- Input Placeholder: Changes based on mode
- AI: “Ask Claude Code…”
- Terminal: ”$ command”
- Right Panel: Different content (Files/History in AI, output in terminal)
Status Icon
The agent icon in the Left Bar shows current mode:- AI Mode: Wand icon (🪄)
- Terminal Mode: Command prompt icon ($)
Custom AI Commands
Define custom slash commands that work only in AI mode:Smart Mode Switching
Context-Aware Defaults
When you create a new agent, Maestro defaults to:- AI Mode: If the agent is an AI assistant (Claude Code, OpenCode, etc.)
- Terminal Mode: If the agent is a plain terminal session
Mode Persistence
Your mode choice persists across app restarts:Advanced: Mode-Specific Behavior
Enter-to-Send Settings
Configure how the Enter key behaves in each mode: Settings → Interface-
AI Mode:
Entersends (default)Shift+Enternew line- OR reverse this behavior
-
Terminal Mode:
Enteralways sends (standard shell behavior)
src/renderer/hooks/useSettings.ts
Output Filtering
Different search/filter capabilities per mode:| Feature | AI Mode | Terminal Mode |
|---|---|---|
| Search output | Cmd+F | Cmd+F |
| Filter by regex | ✅ | ✅ |
| Jump to bottom | Cmd+Shift+J | Cmd+Shift+J |
| Auto-scroll | Toggle with Alt+Cmd+S | Always on |
Keyboard Shortcuts
Next Steps
Keyboard Shortcuts
Master all keyboard shortcuts
Output Filtering
Search and filter AI responses
File Explorer
Browse files and use @-mentions
Git Integration
Git features and diff viewer