bhd-components 0.10.28 → 0.10.29

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.
@@ -8688,7 +8688,7 @@ var CustomerService = function(props) {
8688
8688
  roomId: roomId,
8689
8689
  sender: "AI",
8690
8690
  recevier: mid,
8691
- message: "Hi,我是智能学习助手,你遇到了什么问题?1",
8691
+ message: "Hi,我是智能学习助手,你遇到了什么问题?",
8692
8692
  extraInfos: questionsList == null ? null : questionsList
8693
8693
  };
8694
8694
  if (pageNumHistory <= 1) {
@@ -15864,26 +15864,29 @@ var Footer = /*#__PURE__*/ forwardRef(function(props, ref) {
15864
15864
  },
15865
15865
  onmessage: function(ev) {
15866
15866
  var data = onMessage(ev, closeCallback, bodyParams, msgId);
15867
- if (recordObj) {
15868
- data.id = recordObj.id;
15869
- }
15870
15867
  msgContent += data.content;
15871
15868
  var str = msgContent.replace(/\\n/g, "\n");
15872
15869
  str = conversionContent(str);
15873
15870
  delete data.content;
15874
- recordMsgObj = _object_spread({
15875
- createTime: createTime,
15876
- content: str || "正在输入...",
15877
- location: "left",
15878
- reference: null,
15879
- source: null
15880
- }, data);
15881
- apiRef.contentApi.setSendingId(data.id);
15882
- apiRef.contentApi.updateMsg(msgId, recordMsgObj);
15883
- msgId = data.id;
15884
- // updateMsgRef.current = setTimeout(function () {
15885
- apiRef.contentApi.scrollToBottom();
15886
- // }, 100);
15871
+ // 有内容返回再去填充 因为onmessage存在空内容的心跳维持
15872
+ if (str) {
15873
+ if (recordObj) {
15874
+ data.id = recordObj.id;
15875
+ }
15876
+ recordMsgObj = _object_spread({
15877
+ createTime: createTime,
15878
+ content: str,
15879
+ location: "left",
15880
+ reference: null,
15881
+ source: null
15882
+ }, data);
15883
+ apiRef.contentApi.setSendingId(data.id);
15884
+ apiRef.contentApi.updateMsg(msgId, recordMsgObj);
15885
+ msgId = data.id;
15886
+ // updateMsgRef.current = setTimeout(function () {
15887
+ apiRef.contentApi.scrollToBottom();
15888
+ // }, 100);
15889
+ }
15887
15890
  },
15888
15891
  onclose: function() {
15889
15892
  closeCallback();