From bd6c50de330309e1c10df7f681db53a3d566a4cc Mon Sep 17 00:00:00 2001 From: zhangga <88526483+ryan-gz@users.noreply.github.com> Date: Thu, 4 Dec 2025 23:04:29 +0800 Subject: [PATCH] feat:Strip code blocks in plan data. (#738) * feat:Strip code blocks in plan data. * feat: add repair_json_output for current_plan_content --------- Co-authored-by: ryan-gz --- src/graph/nodes.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/graph/nodes.py b/src/graph/nodes.py index ab77a6d..ed7584d 100644 --- a/src/graph/nodes.py +++ b/src/graph/nodes.py @@ -468,7 +468,7 @@ def human_feedback_node( # increment the plan iterations plan_iterations += 1 # parse the plan - new_plan = json.loads(current_plan_content) + new_plan = json.loads(repair_json_output(current_plan_content)) # Validate and fix plan to ensure web search requirements are met configurable = Configuration.from_runnable_config(config) new_plan = validate_and_fix_plan(new_plan, configurable.enforce_web_search) @@ -1233,4 +1233,4 @@ async def analyst_node( config, "analyst", [], # No tools - pure reasoning - ) + ) \ No newline at end of file