From: Anderson A. Giacomolli Date: Sat, 7 Nov 2026 14:43:10 +0000 (-0300) Subject: Send the replies to Telegram with their formats X-Git-Url: https://git.giacomolli.uk/onechat/commitdiff_plain/f80b058ae0550a56b4e62f8e65c2a74349b970e4?hp=f80b058ae0550a56b4e62f8e65c2a74349b970e4 Send the replies to Telegram with their formats The bot converts the Markdown of each model reply to text and message entities, and sends them with the entities field of sendMessage, with no parse mode. The phone then shows bold text, code and code blocks formatted, not their marks. A reply longer than 4096 UTF-16 units is split as before, and an entity that crosses a cut becomes one entity in each part, with offsets from the start of its part. When Telegram refuses a part with entities with HTTP 400, the bot sends the same text again once with no entities and logs one line without the text, so a bad entity does not lose a reply. Other failures wait and try again as before. Only the replies get entities. The notices of the bot get their own event kind, so they stay plain text with the errors and the messages typed in the terminal. A reply with no text left after the conversion goes as its Markdown. The log and the terminal client do not change. Issue: 3309f9b ---