To understand the inner workings of AI-powered apps like GitHub Copilot, the author explores the architecture of Electron-based applications. Since many AI tools like Claude and Notion are not open-source, the author utilizes reverse engineering by monitoring network traffic to uncover how these systems operate at runtime.
By using mitmproxy as a man-in-the-middle, the author intercepts HTTPS requests by configuring VS Code to route traffic through a local proxy. This process involves bypassing strict SSL verification to decrypt and inspect the data flowing between the application and remote backends.
The investigation reveals that VS Code uses a decoupled architecture where an extension host manages plugins. During the bootstrap stage, Copilot generates several categories of network requests, including Auth & Session, Config & Policy, and Repo & Session Context. These requests are essential for establishing the connection and gathering the necessary context for AI suggestions.
Source: Hacker News · Summarized by HeadlinesBriefing