feat: add web gateway — browser-based chat UI over WebSocket

New platform adapter that serves a full-featured chat interface via HTTP.
Enables access from any device on the network (phone, tablet, desktop).

Features:
- aiohttp server with WebSocket real-time messaging
- Token-based authentication
- Markdown rendering (marked.js) + code highlighting (highlight.js)
- Voice recording via MediaRecorder API + STT transcription
- Image, voice, and document display
- Typing indicator + message editing (streaming support)
- Mobile responsive dark theme
- Auto-reconnect on disconnect
- Media file cleanup (24h TTL)

Config: WEB_UI_ENABLED=true, WEB_UI_PORT=8765, WEB_UI_TOKEN=<token>
No new dependencies — uses aiohttp already in [messaging] extra.
This commit is contained in:
0xbyt4 2026-03-11 18:53:23 +03:00
parent e50323f730
commit a3905ef289
3 changed files with 1219 additions and 0 deletions

1191
gateway/platforms/web.py Normal file

File diff suppressed because it is too large Load diff