From 88023f34baefddf4f2af533974771b58da1dec63 Mon Sep 17 00:00:00 2001 From: shaohuzhang1 <80892890+shaohuzhang1@users.noreply.github.com> Date: Fri, 26 Sep 2025 14:11:10 +0800 Subject: [PATCH] fix: Infinite cycle, maximum number of cycles failed and page scaling (#4121) --- .../flow/step_node/loop_node/impl/base_loop_node.py | 5 +++-- ui/admin.html | 6 +++++- ui/chat.html | 2 +- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/apps/application/flow/step_node/loop_node/impl/base_loop_node.py b/apps/application/flow/step_node/loop_node/impl/base_loop_node.py index fe68d3265..7622e1b00 100644 --- a/apps/application/flow/step_node/loop_node/impl/base_loop_node.py +++ b/apps/application/flow/step_node/loop_node/impl/base_loop_node.py @@ -129,7 +129,8 @@ def loop(workflow_manage_new_instance, node: INode, generate_loop): is_interrupt_exec = False loop_node_data = node.context.get('loop_node_data') or [] loop_answer_data = node.context.get("loop_answer_data") or [] - current_index = node.context.get("current_index") or 0 + start_index = node.context.get("current_index") or 0 + current_index = start_index node_params = node.node_params start_node_id = node_params.get('child_node', {}).get('runtime_node_id') loop_type = node_params.get('loop_type') @@ -144,7 +145,7 @@ def loop(workflow_manage_new_instance, node: INode, generate_loop): details=loop_node_data[current_index]) for item, index in generate_loop(current_index): - if 0 < max_loop_count <= index - current_index and loop_type == 'LOOP': + if 0 < max_loop_count <= index - start_index and loop_type == 'LOOP': raise Exception(_('Exceeding the maximum number of cycles')) """ 指定次数循环 diff --git a/ui/admin.html b/ui/admin.html index 91c08a7fb..2ed8675c3 100644 --- a/ui/admin.html +++ b/ui/admin.html @@ -3,7 +3,11 @@
- +