ref: simplify feishu history injection, tune web_scan/plan_sop/driver

This commit is contained in:
Liang Jiaqing
2026-03-09 08:55:22 +08:00
parent 378799f8ea
commit 2b387f2dcf
6 changed files with 69 additions and 36 deletions

4
ga.py
View File

@@ -135,7 +135,7 @@ def web_scan(tabs_only=False, switch_tab_id=None):
"active_tab": driver.default_session_id
}
}
if not tabs_only: result["content"] = get_html(driver, cutlist=True, maxchars=23000)
if not tabs_only: result["content"] = get_html(driver, cutlist=True, maxchars=28000)
return result
except Exception as e:
return {"status": "error", "msg": format_error(e)}
@@ -485,7 +485,7 @@ class GenericAgentHandler(BaseHandler):
return prompt
def next_prompt_patcher(self, next_prompt, outcome, turn):
if turn % 30 == 0:
if turn % 35 == 0 and 'plan' not in str(self.related_sop):
next_prompt += f"\n\n[DANGER] 已连续执行第 {turn} 轮。你必须总结情况进行ask_user不允许继续重试。"
elif turn % 7 == 0:
next_prompt += f"\n\n[DANGER] 已连续执行第 {turn} 轮。禁止无效重试。若无有效进展必须切换策略1. 探测物理边界 2. 请求用户协助。如有需要,可调用 update_working_checkpoint 保存关键上下文。"