/* ================================================================ R.A.D.H.A Frontend — Main Application Logic ================================================================ ARCHITECTURE OVERVIEW --------------------- This file powers the entire frontend of the R.A.D.H.A AI assistant. It handles: 1. CHAT MESSAGING — The user types (or speaks) a message, which is sent to the backend via a POST request. The backend responds using Server-Sent Events (SSE), allowing the reply to stream in token-by-token (like ChatGPT's typing effect). 2. TEXT-TO-SPEECH (TTS) — When TTS is enabled, the backend also sends base64-encoded audio chunks inside the SSE stream. These are queued up and played sequentially through a single