From b3ddb59e2ed1913a75771cab556c8ee0b9dd461a Mon Sep 17 00:00:00 2001 From: p
Date: Fri, 14 Aug 2026 11:27:02 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E8=A7=92=E8=89=B2agent=E8=BD=AE?= =?UTF-8?q?=E6=95=B015=E2=86=9230=20+=20read=5Ffile=E6=88=AA=E6=96=AD8000?= =?UTF-8?q?=E2=86=9230000=EF=BC=88=E5=87=8F=E5=B0=91=E5=88=86=E6=AE=B5?= =?UTF-8?q?=E8=AF=BB=E6=B5=AA=E8=B4=B9=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pipeline_service/agent_loop.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pipeline_service/agent_loop.py b/pipeline_service/agent_loop.py index 682b96d..2a84f31 100644 --- a/pipeline_service/agent_loop.py +++ b/pipeline_service/agent_loop.py @@ -543,7 +543,7 @@ async def _exec_agent_tool(tool, params, workspace_dir): if not _is_safe_workdir(full): return 'FAIL: 路径不在允许范围' if not os.path.isfile(full): return f'FAIL: 文件不存在 {path}' with open(full, encoding='utf-8') as f: - return f.read()[:8000] + return f.read()[:30000] elif tool == 'write_file': path = p.get('path', '') content = p.get('content', '') @@ -649,7 +649,7 @@ async def role_agent_run(project_id, role, agent_id=None, model_name=None): ask_question = None # ── Tool Loop(原生 function calling)── - for turn in range(15): + for turn in range(30): try: resp = await llm_call_msgs_native(msgs, tools=tools_schema, model=model_name, temperature=0.4) except Exception as e: