docs/proxy-monitor-technical.md
This document provides a detailed technical overview of the Proxy Monitor feature in Antigravity Manager, covering its implementation, data structures, and usage.
When the proxy service is running, an entry button to the monitor dashboard appears.
Note: Button appears next to the service status indicator.
A full-screen dashboard showing real-time traffic, including quick filters and recording controls.
Note: Displays real-time request logs with status, model, and token usage.
Clicking on any record opens a high-contrast modal showing the full request and response payloads.
Note: Formatted JSON view for deep analysis.
Client Request -> Axum Middleware -> ProxyMonitor (Internal) -> SQLite DB & Frontend (Tauri Event)
Persistence is handled via SQLite, stored in proxy_logs.db within the application data directory.
request_logsid: Primary Key (UUID v4)timestamp: Millisecond timestampmodel: Target model IDrequest_body / response_body: Original JSON payloadsinput_tokens / output_tokens: Token usage statisticsTo ensure the "typewriter effect" of AI responses remains smooth, the middleware uses a non-destructive stream wrapper:
Body::into_data_stream.data: block containing usage info.