mirror of
https://github.com/shareAI-lab/analysis_claude_code.git
synced 2026-08-06 12:03:37 +08:00
Merge pull request #461 from ggttyy1/fix/rounds-since-todo
fix: reset rounds_since_todo on each session
This commit is contained in:
@@ -232,10 +232,8 @@ register_hook("Stop", summary_hook)
|
|||||||
# agent_loop — same as s04 + nag reminder counter
|
# agent_loop — same as s04 + nag reminder counter
|
||||||
# ═══════════════════════════════════════════════════════════
|
# ═══════════════════════════════════════════════════════════
|
||||||
|
|
||||||
rounds_since_todo = 0
|
|
||||||
|
|
||||||
def agent_loop(messages: list):
|
def agent_loop(messages: list):
|
||||||
global rounds_since_todo
|
rounds_since_todo = 0
|
||||||
while True:
|
while True:
|
||||||
# s05: nag reminder — inject if model hasn't updated todos for 3 rounds
|
# s05: nag reminder — inject if model hasn't updated todos for 3 rounds
|
||||||
if rounds_since_todo >= 3 and messages:
|
if rounds_since_todo >= 3 and messages:
|
||||||
|
|||||||
@@ -312,10 +312,8 @@ register_hook("Stop", summary_hook)
|
|||||||
# agent_loop — same as s05 + nag reminder, task auto-dispatches
|
# agent_loop — same as s05 + nag reminder, task auto-dispatches
|
||||||
# ═══════════════════════════════════════════════════════════
|
# ═══════════════════════════════════════════════════════════
|
||||||
|
|
||||||
rounds_since_todo = 0
|
|
||||||
|
|
||||||
def agent_loop(messages: list):
|
def agent_loop(messages: list):
|
||||||
global rounds_since_todo
|
rounds_since_todo = 0
|
||||||
while True:
|
while True:
|
||||||
# s05: nag reminder
|
# s05: nag reminder
|
||||||
if rounds_since_todo >= 3 and messages:
|
if rounds_since_todo >= 3 and messages:
|
||||||
|
|||||||
@@ -356,10 +356,8 @@ register_hook("Stop", summary_hook)
|
|||||||
# agent_loop — same as s05-s06 + nag reminder
|
# agent_loop — same as s05-s06 + nag reminder
|
||||||
# ═══════════════════════════════════════════════════════════
|
# ═══════════════════════════════════════════════════════════
|
||||||
|
|
||||||
rounds_since_todo = 0
|
|
||||||
|
|
||||||
def agent_loop(messages: list):
|
def agent_loop(messages: list):
|
||||||
global rounds_since_todo
|
rounds_since_todo = 0
|
||||||
while True:
|
while True:
|
||||||
if rounds_since_todo >= 3 and messages:
|
if rounds_since_todo >= 3 and messages:
|
||||||
messages.append({"role": "user",
|
messages.append({"role": "user",
|
||||||
|
|||||||
Reference in New Issue
Block a user