This commit is contained in:
Quanzheng Long
2026-03-13 15:46:07 -07:00
parent 7c0a9275f9
commit 9e723642c0
2 changed files with 2 additions and 5 deletions
@@ -269,9 +269,6 @@ class _GraphEngineRun:
update = result
sends = _normalize_result_to_sends(result, default_input=node_input)
if update is None and isinstance(state, dict):
# Preserve in-place state mutations for prototype nodes like wait_node.
update = state
if isinstance(update, dict):
update = _reduce_update_to_changed_fields(before_state_snapshot, update)
@@ -109,11 +109,11 @@ def build_main_agent(planner: MockLLM, sub_agent: Any) -> Any:
elif channel == "user_input_channel":
state["output"].append(f"user_input: {payload}")
# State changed -> ask planner what to do next.
return Command(goto=Send("llm_node", None))
return Command(update=state, goto=Send("llm_node", None))
else:
state["output"].append("timer: no updates yet")
# No meaningful state change -> keep waiting without calling planner.
return Command(goto=Send("wait_node", None))
return Command(update=state, goto=Send("wait_node", None))
async def tool_node(ctx: Context, tool_input: str) -> None:
await asyncio.sleep(0.1)