@myun/gimi-chat 0.9.60 → 0.9.62
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -404,6 +404,7 @@ var useCommonChatAPI = function useCommonChatAPI(props) {
|
|
|
404
404
|
artifacts: dataObj.artifacts || []
|
|
405
405
|
})]);
|
|
406
406
|
console.log('handleArtifactStreamRs-----', newMessageList);
|
|
407
|
+
messageListRef.current = newMessageList;
|
|
407
408
|
dispatch(setMessageList({
|
|
408
409
|
messageList: newMessageList
|
|
409
410
|
}));
|
|
@@ -564,6 +565,7 @@ var useCommonChatAPI = function useCommonChatAPI(props) {
|
|
|
564
565
|
// if (isSystemAuto) return;
|
|
565
566
|
setIgnoreOnMessage(true);
|
|
566
567
|
currentMessageList = messageListRef.current;
|
|
568
|
+
console.log('currentMessageList-----', currentMessageList);
|
|
567
569
|
lastToolList = _toConsumableArray(currentMessageList[currentMessageList.length - 1].toolList || []);
|
|
568
570
|
newMessageList = [];
|
|
569
571
|
if (type === 'user_confirm') {
|
|
@@ -613,13 +615,13 @@ var useCommonChatAPI = function useCommonChatAPI(props) {
|
|
|
613
615
|
// 获取最新的agent详情,防止redux异步更新
|
|
614
616
|
agentDetail = agentInfo || agentObjRef.current; // 获取推荐追问
|
|
615
617
|
if (!((agentDetail === null || agentDetail === void 0 ? void 0 : agentDetail.isEnableRelated) === 1 && (type === 'end' || type === 'COMPLETED'))) {
|
|
616
|
-
_context5.next =
|
|
618
|
+
_context5.next = 14;
|
|
617
619
|
break;
|
|
618
620
|
}
|
|
619
621
|
setMsgLoading(true);
|
|
620
|
-
_context5.next =
|
|
622
|
+
_context5.next = 14;
|
|
621
623
|
return getRecommendList(newMessageList, lastId, statusRef.current);
|
|
622
|
-
case
|
|
624
|
+
case 14:
|
|
623
625
|
// 获取相关课程
|
|
624
626
|
userInput = newMessageList[newMessageList.length - 2].content;
|
|
625
627
|
getRelatedCourses(userInput || '');
|
|
@@ -630,7 +632,7 @@ var useCommonChatAPI = function useCommonChatAPI(props) {
|
|
|
630
632
|
}
|
|
631
633
|
setMsgLoading(false);
|
|
632
634
|
onSendEnd === null || onSendEnd === void 0 || onSendEnd(newMessageList[newMessageList.length - 1]);
|
|
633
|
-
case
|
|
635
|
+
case 19:
|
|
634
636
|
case "end":
|
|
635
637
|
return _context5.stop();
|
|
636
638
|
}
|