Skip to content

Commit f36cc9b

Browse files
committed
Merge branch '1.2.x'
2 parents 52a53c0 + ef611b5 commit f36cc9b

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

frontend/src/pages/addFlow/components/flow-test.tsx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ const Index = (props) => {
6262
const dispatch = useAppDispatch();
6363
const runningAippId = useRef();
6464
const runningVersion = useRef();
65+
const chatIdRef = useRef<string | undefined>();
6566

6667
// 关闭测试抽屉
6768
const handleCloseDebug = () => {
@@ -118,6 +119,9 @@ const Index = (props) => {
118119
'dimension': values.dimension
119120
}
120121
};
122+
if (chatIdRef.current) {
123+
chatParams['chat_id'] = chatIdRef.current;
124+
}
121125
handleRun(chatParams);
122126
};
123127

@@ -149,6 +153,7 @@ const Index = (props) => {
149153
if (!getReady && receiveData.status === 'ERROR') {
150154
setLoading(false);
151155
Message({ type: 'error', content: t('startDebugFail') });
156+
chatIdRef.current = receiveData.chat_id;
152157
break;
153158
}
154159
if (receiveData.status === 'READY' && !getReady) {
@@ -192,6 +197,7 @@ const Index = (props) => {
192197
setChatConfig(obj);
193198
setOpen(true);
194199
}
200+
chatIdRef.current = messageData.chat_id;
195201
});
196202
} catch (err) {
197203
console.info(err);

0 commit comments

Comments
 (0)