From 66b303f2e889e3ded983c9133df16850d80fbdd8 Mon Sep 17 00:00:00 2001 From: shaohuzhang1 Date: Fri, 26 Sep 2025 14:10:07 +0800 Subject: [PATCH] fix: Infinite cycle, maximum number of cycles failed and page scaling --- .../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 fe68d3265a1..7622e1b006b 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 91c08a7fbb2..2ed8675c3f1 100644 --- a/ui/admin.html +++ b/ui/admin.html @@ -3,7 +3,11 @@ - + %VITE_APP_TITLE%