fix(ga): only treat short </summary>-only replies as incomplete

Long replies ending with </summary> were false-positive retried.
Also relax L1 insight RULES: drop hard es/win32gui/git-loop mandates.
This commit is contained in:
Liang Jiaqing committed 2026-08-13 10:19:48 +08:00
1 parent e519734ab0
commit f06d550380
3 files changed
+6 -6

No files matched your search

+3 -3
View File
@@ -13,11 +13,11 @@ UI操作/截图/视觉: computer_use.md | vision_sop | 窗口截图必用ljqCtrl
手机:adb_ui.py
[RULES]
1. 搜索先行: 搜文件名严禁不用es(禁PS递归/禁dir遍历), 搜索一定优先使用web工具的google(严禁duckduckgo等), 优先看cwd,禁猜路径
1. 搜索先行: 搜文件名禁长时间递归, 网络搜索一定优先使用web工具的google, 优先看cwd,禁猜路径
2. 交叉验证: 禁信摘要, 数值进详情页核实
3. 编码安全: 禁PS cat/type用file_read; 改前必读; memory模块直接import(已在PATH,禁加虚假前缀)
4. 闭环: 物理模拟后确认; 3次失败请求干预; Git完整闭环
4. 闭环: 物理模拟后确认; 3次失败请求干预
5. 进程: 禁无条件杀python(杀自己), 精确PID, 禁os.kill判活
6. 窗口: GUI状态优先win32gui枚举标题
6. 窗口: GUI状态优先枚举标题
7. web JS: 输入用原生setter+事件链, 点击前检disabled, 注意引号转义; scan空/不全先稍等再scan, 禁首扫定论
8. SOP: 读SOP禁凭印象,有utils必用
+2 -2
View File
@@ -13,10 +13,10 @@ Scheduling: scheduled_task_sop | Autonomous: autonomous_operation_sop | watchdog
Mobile: adb_ui.py
[RULES]
1. Search first: must use es for filename search (no PS recursion/no dir traversal), always prefer Google for web search (no duckduckgo etc), check cwd first, no guessing paths
1. Search first: no huge PS recursion/no dir traversal for file search, prefer Google for web search, check cwd first, no guessing paths
2. Cross-verify: never trust summaries, verify numbers on detail pages
3. Encoding safety: use file_read not PS cat/type; read before modify; import memory modules directly (already in PATH, no fake prefixes)
4. Close the loop: confirm after physical simulation; request intervention after 3 failures; complete Git workflow
4. Close the loop: confirm after physical simulation; request intervention after 3 failures
5. Processes: never kill python unconditionally (kills self), use exact PID, no os.kill for liveness check
6. Windows: prefer win32gui title enumeration for GUI state
7. Web JS: use native setter + event chain for input, check disabled before click, mind quote escaping; if scan empty/incomplete wait then rescan, no conclusions from first scan
+1 -1
View File
@@ -483,7 +483,7 @@ class GenericAgentHandler(BaseHandler):
if not response or (not content.strip() and not thinking.strip()):
yield "[Warn] LLM returned an empty response. Retrying...\n"
return self._retry_or_exit("[ERROR] Blank response, regenerate and tooluse")
if '[!!! 流异常中断' in content[-100:] or '!!!Error:' in content[-100:] or content.endswith('</summary>'):
if '[!!! 流异常中断' in content[-100:] or '!!!Error:' in content[-100:] or (content.endswith('</summary>') and len(content) < 100):
return self._retry_or_exit("[ERROR] Incomplete response. Regenerate and tooluse.")
if 'max_tokens !!!]' in content[-100:]:
return self._retry_or_exit("[ERROR] max_tokens limit reached. Use multi small steps to do it.")