mirror of
https://github.com/HKUDS/DeepTutor.git
synced 2026-12-02 07:10:15 +08:00
When TutorBot is connected to IM channels (e.g. Feishu, WeChat), users can send images and other multimedia messages. These messages are stored with content as an array of content-part objects rather than a plain string. The frontend assumes content is always a string, causing React Error #31 (Objects are not valid as a React child) and rendering the chat page unusable. Changes: - Add normalizeMessageContent() utility to safely convert array/object content to displayable strings - Fix BotChatPage history parsing to handle non-string content - Fix UnifiedChatContext hydrateMessages for non-string content - Fix last_message display with truncation and type safety in SessionList and HistorySessionPicker - Normalize content to string and strip reasoning_content in backend get_bot_history and get_recent_active_bots