|
|
|
@ -371,7 +371,7 @@ class ToolNode(BaseNode[ToolNodeData]):
|
|
|
|
yield agent_log
|
|
|
|
yield agent_log
|
|
|
|
|
|
|
|
|
|
|
|
# Add agent_logs to outputs['json'] to ensure frontend can access thinking process
|
|
|
|
# Add agent_logs to outputs['json'] to ensure frontend can access thinking process
|
|
|
|
json_output = json.copy()
|
|
|
|
json_output: dict[str, Any] | list[dict[str, Any]] = json.copy()
|
|
|
|
if agent_logs:
|
|
|
|
if agent_logs:
|
|
|
|
if not json_output:
|
|
|
|
if not json_output:
|
|
|
|
json_output = {}
|
|
|
|
json_output = {}
|
|
|
|
@ -387,6 +387,7 @@ class ToolNode(BaseNode[ToolNodeData]):
|
|
|
|
json_output = {"data": json_output}
|
|
|
|
json_output = {"data": json_output}
|
|
|
|
|
|
|
|
|
|
|
|
# Add agent_logs to json output
|
|
|
|
# Add agent_logs to json output
|
|
|
|
|
|
|
|
if isinstance(json_output, dict):
|
|
|
|
json_output["agent_logs"] = [
|
|
|
|
json_output["agent_logs"] = [
|
|
|
|
{
|
|
|
|
{
|
|
|
|
"id": log.id,
|
|
|
|
"id": log.id,
|
|
|
|
|