Overview
Autopilot is a native Rust + WGPU desktop application that provides a unified interface for AI coding agents. Codex is wired today; other adapters are present in the repo but not enabled by default.Architecture Layers
Core Event Flows
Unified Event Flow
- User sends a prompt in the UI.
- Desktop app forwards the message to Codex via the app‑server client.
- ACP/app events stream back from the agent.
- App core maps events into formatted UI state.
- WGPUI renders updated conversation items.
UI Event Flow
- Session starts and the app initializes UI state.
- Incoming events update the in‑memory view model.
- WGPUI re-renders the updated components immediately.
Key Components
App Core (Rust)
- autopilot_app: session lifecycle and event routing
- codex-client: app‑server client and ACP event parsing
- autopilot_ui: WGPUI view state + components
Desktop Host (Rust)
- apps/autopilot-desktop: winit + wgpu host, render loop, input routing
Session ID Management
Autopilot uses a two-phase session ID flow:- Temporary session ID from
connect_unified_agent - Actual ACP session ID emitted via
SessionStarted
Implementation Status
Completed:- Native WGPUI desktop host and pane system
- Codex app‑server integration and event stream handling
- Tool call cards and markdown rendering
- Additional pane types and tooling UI
- Improved event formatting and message history
- Agent selection UI
- Conversation persistence and search
File Map (High Level)
apps/autopilot-desktop/src/— desktop host (winit + wgpu)crates/autopilot_app/— app core + event routingcrates/autopilot_ui/— WGPUI views + componentscrates/codex-client/— Codex app‑server client + event parsing