mirror of
https://github.com/shareAI-lab/analysis_claude_code.git
synced 2026-05-06 16:26:16 +08:00
fix: append nag reminder instead of inserting at front (#142)
The reminder was inserted at index 0, placing a text block before tool_result blocks in the user message content array. Use append to keep the reminder at the end, consistent with message ordering. Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -187,7 +187,7 @@ def agent_loop(messages: list):
|
|||||||
used_todo = True
|
used_todo = True
|
||||||
rounds_since_todo = 0 if used_todo else rounds_since_todo + 1
|
rounds_since_todo = 0 if used_todo else rounds_since_todo + 1
|
||||||
if rounds_since_todo >= 3:
|
if rounds_since_todo >= 3:
|
||||||
results.insert(0, {"type": "text", "text": "<reminder>Update your todos.</reminder>"})
|
results.append({"type": "text", "text": "<reminder>Update your todos.</reminder>"})
|
||||||
messages.append({"role": "user", "content": results})
|
messages.append({"role": "user", "content": results})
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user