File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -206,15 +206,10 @@ async def planner_node(state: AgentState) -> dict[str, object]:
206206 }
207207
208208 if state ["current_task_idx" ] >= len (plan .tasks ):
209- completed = list (state ["completed_tasks" ])
210- if len (completed ) >= 10 :
209+ if len (state ["completed_tasks" ]) >= 10 :
211210 logger .warning ("Max completed tasks (10) reached. Finishing." )
212211 return {"plan" : plan , "done" : True , "retry_count" : 0 , "eval_result" : None }
213- has_results = any (t .result and t .result != "완료" for t in completed )
214- if has_results and len (completed ) >= 2 :
215- logger .info ("Tasks have meaningful results. Finishing without asking planner for more." )
216- return {"plan" : plan , "done" : True , "retry_count" : 0 , "eval_result" : None }
217- next_plan = await planner .next_tasks (plan , completed )
212+ next_plan = await planner .next_tasks (plan , state ["completed_tasks" ])
218213 if not next_plan .tasks :
219214 return {"plan" : next_plan , "done" : True , "retry_count" : 0 , "eval_result" : None }
220215 if _is_repeated_plan (next_plan .tasks , state ["completed_tasks" ]):
You can’t perform that action at this time.
0 commit comments