mirror of
https://github.com/memohai/Memoh.git
synced 2026-04-27 07:16:19 +09:00
b1925bf2be
* feat(telegram): use sendMessageDraft for streaming in private chats Use Telegram Bot API 9.3's sendMessageDraft to stream partial messages with smooth animation in private chats, replacing the sendMessage + editMessageText approach. Group/channel chats keep the existing edit-based streaming. - Add sendTelegramDraft() for the sendMessageDraft API - Detect private chats via conversation_type metadata in OpenStream - Use 300ms throttle for drafts (vs 5s for edits) - Send permanent messages at tool call boundaries and on final event - Reset buffer atomically in StreamEventFinal to prevent duplicate messages when multiple final events fire (one per assistant output) * test(telegram): improve draft mode test assertions Add sendTextForTest hook for sendTelegramTextReturnMessage to enable direct assertion of send calls. Clean up residual unused variables and replace indirect assertions with explicit mock-based verification.