mirror of
https://github.com/shareAI-lab/learn-claude-code.git
synced 2026-08-05 22:10:52 +00:00
fix: reset rounds_since_todo on each session
This commit is contained in:
parent
a9cafe953a
commit
4faf3e4c52
3 changed files with 3 additions and 0 deletions
|
|
@ -236,6 +236,7 @@ rounds_since_todo = 0
|
|||
|
||||
def agent_loop(messages: list):
|
||||
global rounds_since_todo
|
||||
rounds_since_todo = 0 # 每轮新对话从0开始计数
|
||||
while True:
|
||||
# s05: nag reminder — inject if model hasn't updated todos for 3 rounds
|
||||
if rounds_since_todo >= 3 and messages:
|
||||
|
|
|
|||
|
|
@ -316,6 +316,7 @@ rounds_since_todo = 0
|
|||
|
||||
def agent_loop(messages: list):
|
||||
global rounds_since_todo
|
||||
rounds_since_todo = 0 # 每轮新对话从0开始计数
|
||||
while True:
|
||||
# s05: nag reminder
|
||||
if rounds_since_todo >= 3 and messages:
|
||||
|
|
|
|||
|
|
@ -360,6 +360,7 @@ rounds_since_todo = 0
|
|||
|
||||
def agent_loop(messages: list):
|
||||
global rounds_since_todo
|
||||
rounds_since_todo = 0 # 每轮新对话从0开始计数
|
||||
while True:
|
||||
if rounds_since_todo >= 3 and messages:
|
||||
messages.append({"role": "user",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue