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(email): evict oldest half of dedup set instead of clearing entirely
andienguyen-ecoligoba66c6475025
diff --git a/nanobot/channels/email.py b/nanobot/channels/email.pyindex 1b6f46b05..c90a14d03 100644--- a/nanobot/channels/email.py+++ b/nanobot/channels/email.py@@ -304,7 +304,9 @@ class EmailChannel(BaseChannel):self._processed_uids.add(uid)# mark_seen is the primary dedup; this set is a safety netif len(self._processed_uids) > self._MAX_PROCESSED_UIDS:- self._processed_uids.clear()+ # Evict oldest half instead of clearing entirely+ to_keep = list(self._processed_uids)[len(self._processed_uids) // 2:]+ self._processed_uids = set(to_keep)if mark_seen:client.store(imap_id, "+FLAGS", "\\Seen")