@myun/gimi-chat 0.5.2 → 0.5.3
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.
|
@@ -357,7 +357,6 @@ var useCommonChatAPI = function useCommonChatAPI(props) {
|
|
|
357
357
|
// }
|
|
358
358
|
},
|
|
359
359
|
onDataReceived: function onDataReceived(response, type) {
|
|
360
|
-
setMsgLoading(false);
|
|
361
360
|
if (type === 'content') {
|
|
362
361
|
fullResponse = response;
|
|
363
362
|
moduleInfoRef.current = null;
|
|
@@ -430,7 +429,7 @@ var useCommonChatAPI = function useCommonChatAPI(props) {
|
|
|
430
429
|
}));
|
|
431
430
|
}
|
|
432
431
|
}, function (response, type) {
|
|
433
|
-
|
|
432
|
+
setMsgLoading(false);
|
|
434
433
|
setStatus(2);
|
|
435
434
|
var currentMessageList = messageListRef.current;
|
|
436
435
|
var newMessageList = [].concat(_toConsumableArray(currentMessageList.slice(0, -1)), [_objectSpread(_objectSpread({}, currentMessageList[currentMessageList.length - 1]), {}, _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, type, response || ''), "loading", again ? false : true), "msgLoading", false), "vipLevel", vipLevelRef.current), "reasoningLoading", type === 'content' ? false : again ? false : true), "reasoningStatus", type === 'content' ? 2 : 1), "moduleInfo", null), "moduleType", 'end'), "mcp", null))]);
|
|
@@ -876,7 +875,7 @@ var useCommonChatAPI = function useCommonChatAPI(props) {
|
|
|
876
875
|
return function (_x14) {
|
|
877
876
|
return _ref11.apply(this, arguments);
|
|
878
877
|
};
|
|
879
|
-
}(), [dispatch, startChat, chatInputConfig, createUserChat, fillInputModel, isPlaying, status, stopTTSByText]);
|
|
878
|
+
}(), [dispatch, startChat, chatInputConfig, createUserChat, fillInputModel, isPlaying, status, stopTTSByText, msgLoading]);
|
|
880
879
|
|
|
881
880
|
// 获取对话标题
|
|
882
881
|
var getHeaderValue = React.useCallback( /*#__PURE__*/function () {
|
|
@@ -1239,7 +1238,7 @@ var useCommonChatAPI = function useCommonChatAPI(props) {
|
|
|
1239
1238
|
onSendEnd === null || onSendEnd === void 0 || onSendEnd(messageList[messageList.length - 1]);
|
|
1240
1239
|
}
|
|
1241
1240
|
}
|
|
1242
|
-
}, [interruptKey, onSendEnd, handleInterrupt, messageList, dispatch, streamEsAbortRef]);
|
|
1241
|
+
}, [interruptKey, onSendEnd, handleInterrupt, messageList, dispatch, streamEsAbortRef, inputValue]);
|
|
1243
1242
|
return {
|
|
1244
1243
|
headerValue: headerValue,
|
|
1245
1244
|
getHeaderValue: getHeaderValue,
|