Skip to content

Commit 6ab7ea2

Browse files
committed
fix:添加execution_count变量以确保异步任务执行时正确跳过思考步骤
1 parent d56b9ab commit 6ab7ea2

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

  • agents/matmaster_agent/flow_agents

agents/matmaster_agent/flow_agents/agent.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -878,9 +878,10 @@ async def _run_research_flow(
878878
):
879879
yield _scene_event
880880

881+
execution_count = 0
881882
while True:
882883
if not is_job_submitted_step(ctx):
883-
skip_thinking = scenes_contain_query_job_status(ctx)
884+
skip_thinking = scenes_contain_query_job_status(ctx) or execution_count
884885
async for _step_make_event in self._run_step_make_agent(
885886
ctx,
886887
UPDATE_USER_CONTENT,
@@ -891,6 +892,7 @@ async def _run_research_flow(
891892

892893
async for _plan_execute_event in self._run_plan_execute_agent(ctx):
893894
yield _plan_execute_event
895+
execution_count += 1
894896

895897
# 检查是否为等待异步任务执行完成的阶段
896898
if not is_job_submitted_step(ctx):

0 commit comments

Comments
 (0)