fix: make rounds_since_todo a local variable

This commit is contained in:
ggttyy1
2026-07-11 19:47:55 +08:00
parent 4faf3e4c52
commit ffe1fef0b5
3 changed files with 3 additions and 12 deletions

View File

@@ -312,11 +312,8 @@ register_hook("Stop", summary_hook)
# agent_loop — same as s05 + nag reminder, task auto-dispatches
# ═══════════════════════════════════════════════════════════
rounds_since_todo = 0
def agent_loop(messages: list):
global rounds_since_todo
rounds_since_todo = 0 # 每轮新对话从0开始计数
rounds_since_todo = 0
while True:
# s05: nag reminder
if rounds_since_todo >= 3 and messages: