debug: trace auto-inject behavior
This commit is contained in:
parent
23ff786c92
commit
0e94c230ee
@ -136,6 +136,14 @@ class AgentExecutor:
|
|||||||
action_type = act.get("action", "")
|
action_type = act.get("action", "")
|
||||||
|
|
||||||
if action_type == "reply":
|
if action_type == "reply":
|
||||||
|
# debug: always emit count
|
||||||
|
yield json.dumps({
|
||||||
|
"type": "debug",
|
||||||
|
"tool_call_count": self._tool_call_count,
|
||||||
|
"turn": self._turn_count,
|
||||||
|
"action": action_type,
|
||||||
|
}, ensure_ascii=False) + "\n"
|
||||||
|
|
||||||
# 任何轮次,只要没成功调过工具就 reply → 强制注入工具调用
|
# 任何轮次,只要没成功调过工具就 reply → 强制注入工具调用
|
||||||
if self._tool_call_count == 0:
|
if self._tool_call_count == 0:
|
||||||
hint_tool = "diagnose_project"
|
hint_tool = "diagnose_project"
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user