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(utils): remove unreachable dead code in find_legal_message_start
chengyongru73a8d8a8755a
diff --git a/nanobot/utils/helpers.py b/nanobot/utils/helpers.pyindex b047e24d2..0655b4439 100644--- a/nanobot/utils/helpers.py+++ b/nanobot/utils/helpers.py@@ -165,11 +165,6 @@ def find_legal_message_start(messages: list[dict[str, Any]]) -> int:if tid and str(tid) not in declared:start = i + 1declared.clear()- for prev in messages[start : i + 1]:- if prev.get("role") == "assistant":- for tc in prev.get("tool_calls") or []:- if isinstance(tc, dict) and tc.get("id"):- declared.add(str(tc["id"]))return start