mirror of
https://github.com/shareAI-lab/analysis_claude_code.git
synced 2026-08-06 12:03:37 +08:00
fix: reset rounds_since_todo on each session
This commit is contained in:
@@ -236,6 +236,7 @@ rounds_since_todo = 0
|
|||||||
|
|
||||||
def agent_loop(messages: list):
|
def agent_loop(messages: list):
|
||||||
global rounds_since_todo
|
global rounds_since_todo
|
||||||
|
rounds_since_todo = 0 # 每轮新对话从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:
|
||||||
|
|||||||
@@ -316,6 +316,7 @@ rounds_since_todo = 0
|
|||||||
|
|
||||||
def agent_loop(messages: list):
|
def agent_loop(messages: list):
|
||||||
global rounds_since_todo
|
global rounds_since_todo
|
||||||
|
rounds_since_todo = 0 # 每轮新对话从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:
|
||||||
|
|||||||
@@ -360,6 +360,7 @@ rounds_since_todo = 0
|
|||||||
|
|
||||||
def agent_loop(messages: list):
|
def agent_loop(messages: list):
|
||||||
global rounds_since_todo
|
global rounds_since_todo
|
||||||
|
rounds_since_todo = 0 # 每轮新对话从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