Your lightweight open-source personal agent.
Python agent-frameworkai-agentai-agentschatbotchatopsdiscord-botllm-agentsllmslocal-llmmcpmodel-context-protocolmulti-agentopenai-compatibleopenclawpersonal-ai-assistantpythonself-hostedtelegram-bot-ai-assistantwebuiworkflow-automation
merge origin/main into pr-1567
Re-bin7e9616cbd377
diff --cc nanobot/channels/telegram.pyindex 274218125,884b2d0a5..9097496f3--- a/nanobot/channels/telegram.py+++ b/nanobot/channels/telegram.py@@@ -252,23 -271,41 +254,41 @@@ class TelegramChannel(BaseChannel)# Send text contentif msg.content and msg.content != "[empty message]":+ is_progress = msg.metadata.get("_progress", False)+ draft_id = msg.metadata.get("message_id")-- for chunk in _split_message(msg.content):+++ for chunk in split_message(msg.content, TELEGRAM_MAX_MESSAGE_LEN):try:html = _markdown_to_telegram_html(chunk)- await self._app.bot.send_message(- chat_id=chat_id,- text=html,- parse_mode="HTML",- reply_parameters=reply_params- )- except Exception as e:- logger.warning("HTML parse failed, falling back to plain text: {}", e)- try:+ if is_progress and draft_id:+ await self._app.bot.send_message_draft(+ chat_id=chat_id,+ draft_id=draft_id,+ text=html,+ parse_mode="HTML"+ )+ else:await self._app.bot.send_message(chat_id=chat_id,- text=chunk,+ text=html,+ parse_mode="HTML",reply_parameters=reply_params)+ except Exception as e:+ logger.warning("HTML parse failed, falling back to plain text: {}", e)+ try:+ if is_progress and draft_id:+ await self._app.bot.send_message_draft(+ chat_id=chat_id,+ draft_id=draft_id,+ text=chunk+ )+ else:+ await self._app.bot.send_message(+ chat_id=chat_id,+ text=chunk,+ reply_parameters=reply_params+ )except Exception as e2:logger.error("Error sending Telegram message: {}", e2)