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 remote-tracking branch 'upstream/main' into feat/status-command
robbyczgw-cla43475ed67cba
diff --cc nanobot/channels/telegram.pyindex d04205297,a5942dade..cdf4a5a12--- a/nanobot/channels/telegram.py+++ b/nanobot/channels/telegram.py@@@ -165,10 -178,15 +178,16 @@@ class TelegramChannel(BaseChannel)BotCommand("stop", "Stop the current task"),BotCommand("help", "Show available commands"),BotCommand("restart", "Restart the bot"),+ BotCommand("status", "Show bot status"),]- def __init__(self, config: TelegramConfig, bus: MessageBus):+ @classmethod+ def default_config(cls) -> dict[str, Any]:+ return TelegramConfig().model_dump(by_alias=True)++ def __init__(self, config: Any, bus: MessageBus):+ if isinstance(config, dict):+ config = TelegramConfig.model_validate(config)super().__init__(config, bus)self.config: TelegramConfig = configself._app: Application | None = None@@@ -359,11 -376,11 +378,8 @@@is_progress = msg.metadata.get("_progress", False)for chunk in split_message(msg.content, TELEGRAM_MAX_MESSAGE_LEN):-- # Final response: simulate streaming via draft, then persist-- if not is_progress:-- await self._send_with_streaming(chat_id, chunk, reply_params, thread_kwargs)-- else:-- await self._send_text(chat_id, chunk, reply_params, thread_kwargs)++ # Use plain send for final responses too; draft streaming can create duplicates.++ await self._send_text(chat_id, chunk, reply_params, thread_kwargs)async def _send_text(self,@@@ -436,7 -453,7 +452,8 @@@"π nanobot commands:\n""/new β Start a new conversation\n""/stop β Stop the current task\n"+ "/restart β Restart the bot\n"+ "/status β Show bot status\n""/help β Show available commands")