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
fix(log): only log auto-compact when messages are actually archived
chengyongrub3288fbc87e3
diff --git a/nanobot/agent/autocompact.py b/nanobot/agent/autocompact.pyindex 9d9c1e29c..eabd86155 100644--- a/nanobot/agent/autocompact.py+++ b/nanobot/agent/autocompact.py@@ -93,13 +93,14 @@ class AutoCompact:session.last_consolidated = 0session.updated_at = datetime.now()self.sessions.save(session)- logger.info(- "Auto-compact: archived {} (archived={}, kept={}, summary={})",- key,- len(archive_msgs),- len(kept_msgs),- bool(summary),- )+ if archive_msgs:+ logger.info(+ "Auto-compact: archived {} (archived={}, kept={}, summary={})",+ key,+ len(archive_msgs),+ len(kept_msgs),+ bool(summary),+ )except Exception:logger.exception("Auto-compact: failed for {}", key)finally: