bhd-components 0.10.28 → 0.10.30
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.
- package/dist/index.esm.es5.development.js +21 -17
- package/dist/index.esm.es5.production.js +1 -1
- package/dist/vendor.esm.es5.development.js +1 -1
- package/dist/vendor.esm.es5.production.js +1 -1
- package/es2017/AIMessageList/components/footer/index.js +19 -16
- package/es2017/AIMessageList/components/virtuosoList/index.js +1 -0
- package/es2017/customerService/index.js +1 -1
- package/esm/AIMessageList/components/footer/index.js +19 -16
- package/esm/AIMessageList/components/virtuosoList/index.js +1 -0
- package/esm/customerService/index.js +1 -1
- package/package.json +1 -1
|
@@ -8688,7 +8688,7 @@ var CustomerService = function(props) {
|
|
|
8688
8688
|
roomId: roomId,
|
|
8689
8689
|
sender: "AI",
|
|
8690
8690
|
recevier: mid,
|
|
8691
|
-
message: "Hi,我是智能学习助手,你遇到了什么问题?
|
|
8691
|
+
message: "Hi,我是智能学习助手,你遇到了什么问题?",
|
|
8692
8692
|
extraInfos: questionsList == null ? null : questionsList
|
|
8693
8693
|
};
|
|
8694
8694
|
if (pageNumHistory <= 1) {
|
|
@@ -14990,6 +14990,7 @@ var VirtuosoList = /*#__PURE__*/ forwardRef(function(props, ref) {
|
|
|
14990
14990
|
ref: wrapperRef,
|
|
14991
14991
|
children: /*#__PURE__*/ jsx(cn, {
|
|
14992
14992
|
ref: virtuosoRef,
|
|
14993
|
+
totalCount: dataSource.length,
|
|
14993
14994
|
style: {
|
|
14994
14995
|
height: "100%"
|
|
14995
14996
|
},
|
|
@@ -15864,26 +15865,29 @@ var Footer = /*#__PURE__*/ forwardRef(function(props, ref) {
|
|
|
15864
15865
|
},
|
|
15865
15866
|
onmessage: function(ev) {
|
|
15866
15867
|
var data = onMessage(ev, closeCallback, bodyParams, msgId);
|
|
15867
|
-
if (recordObj) {
|
|
15868
|
-
data.id = recordObj.id;
|
|
15869
|
-
}
|
|
15870
15868
|
msgContent += data.content;
|
|
15871
15869
|
var str = msgContent.replace(/\\n/g, "\n");
|
|
15872
15870
|
str = conversionContent(str);
|
|
15873
15871
|
delete data.content;
|
|
15874
|
-
|
|
15875
|
-
|
|
15876
|
-
|
|
15877
|
-
|
|
15878
|
-
|
|
15879
|
-
|
|
15880
|
-
|
|
15881
|
-
|
|
15882
|
-
|
|
15883
|
-
|
|
15884
|
-
|
|
15885
|
-
|
|
15886
|
-
|
|
15872
|
+
// 有内容返回再去填充 因为onmessage存在空内容的心跳维持
|
|
15873
|
+
if (str) {
|
|
15874
|
+
if (recordObj) {
|
|
15875
|
+
data.id = recordObj.id;
|
|
15876
|
+
}
|
|
15877
|
+
recordMsgObj = _object_spread({
|
|
15878
|
+
createTime: createTime,
|
|
15879
|
+
content: str,
|
|
15880
|
+
location: "left",
|
|
15881
|
+
reference: null,
|
|
15882
|
+
source: null
|
|
15883
|
+
}, data);
|
|
15884
|
+
apiRef.contentApi.setSendingId(data.id);
|
|
15885
|
+
apiRef.contentApi.updateMsg(msgId, recordMsgObj);
|
|
15886
|
+
msgId = data.id;
|
|
15887
|
+
// updateMsgRef.current = setTimeout(function () {
|
|
15888
|
+
apiRef.contentApi.scrollToBottom();
|
|
15889
|
+
// }, 100);
|
|
15890
|
+
}
|
|
15887
15891
|
},
|
|
15888
15892
|
onclose: function() {
|
|
15889
15893
|
closeCallback();
|