Skip to content

Commit 53907af

Browse files
authored
fix: loop interactive (#5714)
* fix: loop interactive * add buffer time
1 parent c66c2ad commit 53907af

File tree

6 files changed

+29
-5
lines changed

6 files changed

+29
-5
lines changed

document/content/docs/toc.mdx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,7 @@ description: FastGPT 文档目录
108108
- [/docs/upgrading/4-12/4123](/docs/upgrading/4-12/4123)
109109
- [/docs/upgrading/4-12/4124](/docs/upgrading/4-12/4124)
110110
- [/docs/upgrading/4-13/4130](/docs/upgrading/4-13/4130)
111+
- [/docs/upgrading/4-13/4131](/docs/upgrading/4-13/4131)
111112
- [/docs/upgrading/4-8/40](/docs/upgrading/4-8/40)
112113
- [/docs/upgrading/4-8/41](/docs/upgrading/4-8/41)
113114
- [/docs/upgrading/4-8/42](/docs/upgrading/4-8/42)
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
---
2+
title: 'V4.13.1(进行中)'
3+
description: 'FastGPT V4.13.1 更新说明'
4+
---
5+
6+
7+
8+
## 🚀 新增内容
9+
10+
11+
## ⚙️ 优化
12+
13+
14+
## 🐛 修复
15+
16+
1. 循环节点中,每轮结束,未清除上一轮交互响应值。
17+
18+
## 🔨 插件更新
19+
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
22
"title": "4.13.x",
33
"description": "",
4-
"pages": ["4130"]
4+
"pages": ["4131", "4130"]
55
}

document/data/doc-last-modified.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@
111111
"document/content/docs/upgrading/4-12/4122.mdx": "2025-09-07T14:41:48+08:00",
112112
"document/content/docs/upgrading/4-12/4123.mdx": "2025-09-07T20:55:14+08:00",
113113
"document/content/docs/upgrading/4-12/4124.mdx": "2025-09-17T22:29:56+08:00",
114-
"document/content/docs/upgrading/4-13/4130.mdx": "2025-09-25T21:02:34+08:00",
114+
"document/content/docs/upgrading/4-13/4130.mdx": "2025-09-26T13:23:01+08:00",
115115
"document/content/docs/upgrading/4-8/40.mdx": "2025-08-02T19:38:37+08:00",
116116
"document/content/docs/upgrading/4-8/41.mdx": "2025-08-02T19:38:37+08:00",
117117
"document/content/docs/upgrading/4-8/42.mdx": "2025-08-02T19:38:37+08:00",

packages/service/core/workflow/dispatch/loop/runLoop.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,9 @@ export const dispatchLoop = async (props: Props): Promise<Response> => {
4444
return Promise.reject(`Input array length cannot be greater than ${maxLength}`);
4545
}
4646

47-
const interactiveData =
47+
let interactiveData =
4848
lastInteractive?.type === 'loopInteractive' ? lastInteractive?.params : undefined;
49-
const lastIndex = interactiveData?.currentIndex;
49+
let lastIndex = interactiveData?.currentIndex;
5050

5151
const outputValueArr = interactiveData ? interactiveData.loopResult : [];
5252
const loopResponseDetail: ChatHistoryItemResType[] = [];
@@ -127,6 +127,10 @@ export const dispatchLoop = async (props: Props): Promise<Response> => {
127127
interactiveResponse = response.workflowInteractiveResponse;
128128
break;
129129
}
130+
131+
// Clear last interactive data, avoid being influenced by the previous round of interaction
132+
interactiveData = undefined;
133+
lastIndex = undefined;
130134
}
131135

132136
return {

projects/app/src/components/core/chat/ChatContainer/ChatBox/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -926,7 +926,7 @@ const ChatBox = ({
926926
chatBoxData?.app?.chatConfig?.autoExecute
927927
],
928928
{
929-
wait: 500
929+
wait: 1000
930930
}
931931
);
932932

0 commit comments

Comments
 (0)