index.md 1.4 KB

Files

  • AI chat-completions client - The OpenAI-compatible HTTP client in src/ai.rs — text completions offering the no_reply tool, image descriptions with the vision model (request text from VISION.md), image validation, timeouts, retries with linear backoff, error handling, the optional request log and reply parsing — plus the OpenAI-compatible audio transcription client in src/transcribe.rs.
  • Web control panel - The optional HTTP control panel in src/web.rs and src/web_page.html, enabled by web_port — routes (including POST /api/relink), the custom-header guard on POST, the request/reply bridge to App through AppEvent::Web, the state with screen, pairing QR as SVG and per-chat profile picture URLs, the lazy avatar fetch, the quit and relink flows, the browser page with its pairing card and round avatars, and its security caveats.
  • WhatsApp client integration - How src/whatsapp.rs wraps whatsapp-rust — the replaceable session behind WaHandle, session startup and relink (logout, session database reset, new unpaired client), translation of raw events into WaEvent, the scheduled "unavailable" presence that keeps phone notifications working, JID canonicalization, contact names, history sync, message rendering (including voice-note placeholders and audio references), image/audio download, profile picture URLs and sending.