bhd-components 0.10.27 → 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.
- package/dist/index.esm.es5.development.js +21 -18
- 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 -1
- package/es2017/customerService/index.js +1 -1
- package/esm/AIMessageList/components/footer/index.js +19 -16
- package/esm/AIMessageList/components/virtuosoList/index.js +1 -1
- package/esm/customerService/index.js +1 -1
- package/package.json +1 -1
|
@@ -321,26 +321,29 @@ const Footer = /*#__PURE__*/ forwardRef((props, ref)=>{
|
|
|
321
321
|
},
|
|
322
322
|
onmessage: (ev)=>{
|
|
323
323
|
let data = onMessage(ev, closeCallback, bodyParams, msgId);
|
|
324
|
-
if (recordObj) {
|
|
325
|
-
data.id = recordObj.id;
|
|
326
|
-
}
|
|
327
324
|
msgContent += data.content;
|
|
328
325
|
let str = msgContent.replace(/\\n/g, "\n");
|
|
329
326
|
str = conversionContent(str);
|
|
330
327
|
delete data.content;
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
328
|
+
// 有内容返回再去填充 因为onmessage存在空内容的心跳维持
|
|
329
|
+
if (str) {
|
|
330
|
+
if (recordObj) {
|
|
331
|
+
data.id = recordObj.id;
|
|
332
|
+
}
|
|
333
|
+
recordMsgObj = _object_spread({
|
|
334
|
+
createTime: createTime,
|
|
335
|
+
content: str,
|
|
336
|
+
location: "left",
|
|
337
|
+
reference: null,
|
|
338
|
+
source: null
|
|
339
|
+
}, data);
|
|
340
|
+
apiRef.contentApi.setSendingId(data.id);
|
|
341
|
+
apiRef.contentApi.updateMsg(msgId, recordMsgObj);
|
|
342
|
+
msgId = data.id;
|
|
343
|
+
// updateMsgRef.current = setTimeout(function () {
|
|
344
|
+
apiRef.contentApi.scrollToBottom();
|
|
345
|
+
// }, 100);
|
|
346
|
+
}
|
|
344
347
|
},
|
|
345
348
|
onclose: ()=>{
|
|
346
349
|
closeCallback();
|
|
@@ -397,7 +397,7 @@ const VirtuosoList = /*#__PURE__*/ forwardRef((props, ref)=>{
|
|
|
397
397
|
};
|
|
398
398
|
const renderAction = (location, item)=>{
|
|
399
399
|
if (item.id === "inputing" || item.id === "helloMsg" || item.id === recordRef.current.sendingId || item.hideAction) {
|
|
400
|
-
if (location === "floatBottom") {
|
|
400
|
+
if (location === "floatBottom" || location === "floatTop") {
|
|
401
401
|
return /*#__PURE__*/ _jsx("div", {
|
|
402
402
|
className: `${getCls("msgItem-action-empty")}`
|
|
403
403
|
});
|
|
@@ -581,7 +581,7 @@ const CustomerService = (props)=>{
|
|
|
581
581
|
roomId: roomId,
|
|
582
582
|
sender: "AI",
|
|
583
583
|
recevier: mid,
|
|
584
|
-
message: `Hi
|
|
584
|
+
message: `Hi,我是智能学习助手,你遇到了什么问题?`,
|
|
585
585
|
extraInfos: questionsList == null ? null : questionsList
|
|
586
586
|
};
|
|
587
587
|
if (pageNumHistory <= 1) {
|
|
@@ -335,26 +335,29 @@ var Footer = /*#__PURE__*/ forwardRef(function(props, ref) {
|
|
|
335
335
|
},
|
|
336
336
|
onmessage: function(ev) {
|
|
337
337
|
var data = onMessage(ev, closeCallback, bodyParams, msgId);
|
|
338
|
-
if (recordObj) {
|
|
339
|
-
data.id = recordObj.id;
|
|
340
|
-
}
|
|
341
338
|
msgContent += data.content;
|
|
342
339
|
var str = msgContent.replace(/\\n/g, "\n");
|
|
343
340
|
str = conversionContent(str);
|
|
344
341
|
delete data.content;
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
342
|
+
// 有内容返回再去填充 因为onmessage存在空内容的心跳维持
|
|
343
|
+
if (str) {
|
|
344
|
+
if (recordObj) {
|
|
345
|
+
data.id = recordObj.id;
|
|
346
|
+
}
|
|
347
|
+
recordMsgObj = _object_spread({
|
|
348
|
+
createTime: createTime,
|
|
349
|
+
content: str,
|
|
350
|
+
location: "left",
|
|
351
|
+
reference: null,
|
|
352
|
+
source: null
|
|
353
|
+
}, data);
|
|
354
|
+
apiRef.contentApi.setSendingId(data.id);
|
|
355
|
+
apiRef.contentApi.updateMsg(msgId, recordMsgObj);
|
|
356
|
+
msgId = data.id;
|
|
357
|
+
// updateMsgRef.current = setTimeout(function () {
|
|
358
|
+
apiRef.contentApi.scrollToBottom();
|
|
359
|
+
// }, 100);
|
|
360
|
+
}
|
|
358
361
|
},
|
|
359
362
|
onclose: function() {
|
|
360
363
|
closeCallback();
|
|
@@ -405,7 +405,7 @@ var VirtuosoList = /*#__PURE__*/ forwardRef(function(props, ref) {
|
|
|
405
405
|
};
|
|
406
406
|
var renderAction = function(location, item) {
|
|
407
407
|
if (item.id === "inputing" || item.id === "helloMsg" || item.id === recordRef.current.sendingId || item.hideAction) {
|
|
408
|
-
if (location === "floatBottom") {
|
|
408
|
+
if (location === "floatBottom" || location === "floatTop") {
|
|
409
409
|
return /*#__PURE__*/ _jsx("div", {
|
|
410
410
|
className: "".concat(getCls("msgItem-action-empty"))
|
|
411
411
|
});
|
|
@@ -592,7 +592,7 @@ var CustomerService = function(props) {
|
|
|
592
592
|
roomId: roomId,
|
|
593
593
|
sender: "AI",
|
|
594
594
|
recevier: mid,
|
|
595
|
-
message: "Hi,我是智能学习助手,你遇到了什么问题?
|
|
595
|
+
message: "Hi,我是智能学习助手,你遇到了什么问题?",
|
|
596
596
|
extraInfos: questionsList == null ? null : questionsList
|
|
597
597
|
};
|
|
598
598
|
if (pageNumHistory <= 1) {
|