mirror of
https://github.com/HKUDS/DeepTutor.git
synced 2026-12-05 00:29:50 +08:00
Add Zulip as a new messaging channel for DeepTutor tutorbot. Features: - Private message and stream message support - Event queue API (register/get_events/deregister) for reliable message listening - Three-layer infinite loop protection (max_message_id, own message filter, dedup) - File upload/download with configurable timeout and retry - Permission control via allow_from (supports both user_id and email) - Stream group policy: mention (respond only when mentioned) / open (respond to all) - KaTeX/LaTeX bidirectional conversion for math formulas - Typing indicator support for private chats (Zulip native API) Technical highlights: - Uses call_endpoint with custom timeout instead of send_message/upload_file (default 15s timeout causes ReadTimeout on file uploads) - Sync-async bridging via run_in_executor and run_coroutine_threadsafe - Automatic event queue re-registration on BAD_EVENT_QUEUE_ID error Tests: 88 unit tests covering all core functionality