bhd-components 0.10.37 → 0.10.39
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.css +1644 -1495
- package/dist/index.esm.es5.development.js +126 -48
- package/dist/index.esm.es5.production.css +1 -1
- package/dist/index.esm.es5.production.js +1 -1
- package/dist/vendor.esm.es5.development.js +316 -316
- package/dist/vendor.esm.es5.production.js +1 -1
- package/es2017/AIMessageList/components/footer/index.js +2 -2
- package/es2017/AIMessageList/components/virtuosoList/index.js +11 -2
- package/es2017/customerService/common.module.less +3 -0
- package/es2017/customerService/index.js +103 -32
- package/es2017/customerService/index.module.less +57 -1
- package/es2017/customerService/index2.module.less +58 -1
- package/esm/AIMessageList/components/footer/index.js +2 -2
- package/esm/AIMessageList/components/virtuosoList/index.js +11 -2
- package/esm/customerService/common.module.less +3 -0
- package/esm/customerService/index.js +104 -32
- package/esm/customerService/index.module.less +57 -1
- package/esm/customerService/index2.module.less +58 -1
- package/package.json +1 -1
|
@@ -2678,7 +2678,7 @@ function BhdAppLayout(props) {
|
|
|
2678
2678
|
});
|
|
2679
2679
|
}
|
|
2680
2680
|
|
|
2681
|
-
var modules_63b47c51$f = {"service_ChatWindow_Drawer":"
|
|
2681
|
+
var modules_63b47c51$f = {"service_ChatWindow_Drawer":"index_module_service_ChatWindow_Drawer__e488bd5b","ChatWindow_Modal":"index_module_ChatWindow_Modal__e488bd5b","ChatWindow_Drawer":"index_module_ChatWindow_Drawer__e488bd5b","header_wrap":"index_module_header_wrap__e488bd5b","top":"index_module_top__e488bd5b","user":"index_module_user__e488bd5b","count":"index_module_count__e488bd5b","operate":"index_module_operate__e488bd5b","line":"index_module_line__e488bd5b","popover_main":"index_module_popover_main__e488bd5b","popover":"index_module_popover__e488bd5b","header_wrap_newlabo":"index_module_header_wrap_newlabo__e488bd5b","Drawer_main":"index_module_Drawer_main__e488bd5b","loading":"index_module_loading__e488bd5b","message_con":"index_module_message_con__e488bd5b","left":"index_module_left__e488bd5b","head_sculpture":"index_module_head_sculpture__e488bd5b","main_content":"index_module_main_content__e488bd5b","right":"index_module_right__e488bd5b","itemcontent":"index_module_itemcontent__e488bd5b","main":"index_module_main__e488bd5b","main_content_flag":"index_module_main_content_flag__e488bd5b","operate_modal":"index_module_operate_modal__e488bd5b","operate_modal_showtop":"index_module_operate_modal_showtop__e488bd5b","operate_modal_bottom":"index_module_operate_modal_bottom__e488bd5b","active":"index_module_active__e488bd5b","stop_generate":"index_module_stop_generate__e488bd5b","icon":"index_module_icon__e488bd5b","find_teacher":"index_module_find_teacher__e488bd5b","stop_findTeacher":"index_module_stop_findTeacher__e488bd5b","content":"index_module_content__e488bd5b","content_child":"index_module_content_child__e488bd5b","mermaid":"index_module_mermaid__e488bd5b","maskZoomBox":"index_module_maskZoomBox__e488bd5b","zoomBox":"index_module_zoomBox__e488bd5b","find_teacher_con":"index_module_find_teacher_con__e488bd5b","sign":"index_module_sign__e488bd5b","ask_question":"index_module_ask_question__e488bd5b","bottom":"index_module_bottom__e488bd5b","association_problem":"index_module_association_problem__e488bd5b","association_problem_flag":"index_module_association_problem_flag__e488bd5b","related_issues_flag":"index_module_related_issues_flag__e488bd5b","img_con":"index_module_img_con__e488bd5b","mask_zoom":"index_module_mask_zoom__e488bd5b","img_con2":"index_module_img_con2__e488bd5b","copyCode":"index_module_copyCode__e488bd5b","time":"index_module_time__e488bd5b","citation_content":"index_module_citation_content__e488bd5b","text_exceed":"index_module_text_exceed__e488bd5b","popover_content":"index_module_popover_content__e488bd5b","Drawer_main_newlabo":"index_module_Drawer_main_newlabo__e488bd5b","Drawer_main_newlabo_no_pic":"index_module_Drawer_main_newlabo_no_pic__e488bd5b","Drawer_buttom_Issues_List":"index_module_Drawer_buttom_Issues_List__e488bd5b","issues_list_teacherList":"index_module_issues_list_teacherList__e488bd5b","item":"index_module_item__e488bd5b","issues_list":"index_module_issues_list__e488bd5b","issues_list_flag":"index_module_issues_list_flag__e488bd5b","Drawer_buttom":"index_module_Drawer_buttom__e488bd5b","input_wrap":"index_module_input_wrap__e488bd5b","input":"index_module_input__e488bd5b","picture_layout":"index_module_picture_layout__e488bd5b","icon_close":"index_module_icon_close__e488bd5b","icon_zoom":"index_module_icon_zoom__e488bd5b","anticon":"index_module_anticon__e488bd5b","no_AI":"index_module_no_AI__e488bd5b","screenshot":"index_module_screenshot__e488bd5b","disabled":"index_module_disabled__e488bd5b","content_main":"index_module_content_main__e488bd5b","content_con":"index_module_content_con__e488bd5b","delete_quote":"index_module_delete_quote__e488bd5b","sending":"index_module_sending__e488bd5b","Drawer_buttom_Issues_List_newlabo":"index_module_Drawer_buttom_Issues_List_newlabo__e488bd5b","main_list":"index_module_main_list__e488bd5b","chat_content":"index_module_chat_content__e488bd5b","popover_main_content":"index_module_popover_main_content__e488bd5b","popover_main_content_name":"index_module_popover_main_content_name__e488bd5b","teacher_layout":"index_module_teacher_layout__e488bd5b","delete":"index_module_delete__e488bd5b","num":"index_module_num__e488bd5b","shrink":"index_module_shrink__e488bd5b","teacher_layout_newlabo":"index_module_teacher_layout_newlabo__e488bd5b","teacher_layout_modal":"index_module_teacher_layout_modal__e488bd5b","ai":"index_module_ai__e488bd5b","user_info":"index_module_user_info__e488bd5b","message":"index_module_message__e488bd5b","con":"index_module_con__e488bd5b","teacher_layout_modal_newlabo":"index_module_teacher_layout_modal_newlabo__e488bd5b","history_list":"index_module_history_list__e488bd5b","search_layout":"index_module_search_layout__e488bd5b","mymove":"index_module_mymove__e488bd5b","title":"index_module_title__e488bd5b","search_top":"index_module_search_top__e488bd5b","list_item":"index_module_list_item__e488bd5b","list_summary":"index_module_list_summary__e488bd5b","head_img":"index_module_head_img__e488bd5b","list_desc":"index_module_list_desc__e488bd5b","name":"index_module_name__e488bd5b","decs":"index_module_decs__e488bd5b","open":"index_module_open__e488bd5b","list_summary_active":"index_module_list_summary_active__e488bd5b","list_detail":"index_module_list_detail__e488bd5b","list":"index_module_list__e488bd5b","list_more":"index_module_list_more__e488bd5b","no_data":"index_module_no_data__e488bd5b","history_list_broadside":"index_module_history_list_broadside__e488bd5b","teacher_list":"index_module_teacher_list__e488bd5b","screenshot_Modal":"index_module_screenshot_Modal__e488bd5b","ReactCrop":"index_module_ReactCrop__e488bd5b","screenshot_Modal_btn":"index_module_screenshot_Modal_btn__e488bd5b","viewMedia_Modal":"index_module_viewMedia_Modal__e488bd5b","viewMemaid":"index_module_viewMemaid__e488bd5b","content_put":"index_module_content_put__e488bd5b"};
|
|
2682
2682
|
|
|
2683
2683
|
function BaseHOC(key) {
|
|
2684
2684
|
return function(props) {
|
|
@@ -8184,6 +8184,16 @@ var ScreenShot = /*#__PURE__*/ function() {
|
|
|
8184
8184
|
return ScreenShot;
|
|
8185
8185
|
}();
|
|
8186
8186
|
|
|
8187
|
+
var guidGenerator = function() {
|
|
8188
|
+
var d = new Date().getTime();
|
|
8189
|
+
var uuid = "xxxxxxxxxxxx4xxxyxxxxxxxxxxxxxxx".replace(/[xy]/g, function(c) {
|
|
8190
|
+
var r = (d + Math.random() * 16) % 16 | 0;
|
|
8191
|
+
d = Math.floor(d / 16);
|
|
8192
|
+
return (c == "x" ? r : r & 3 | 8).toString(16);
|
|
8193
|
+
});
|
|
8194
|
+
return uuid;
|
|
8195
|
+
};
|
|
8196
|
+
|
|
8187
8197
|
var styles = modules_63b47c51$f;
|
|
8188
8198
|
var TextArea$1 = BhdEnterInput.TextArea;
|
|
8189
8199
|
/*
|
|
@@ -8205,6 +8215,12 @@ function escapeHtml(str) {
|
|
|
8205
8215
|
}
|
|
8206
8216
|
return str;
|
|
8207
8217
|
}
|
|
8218
|
+
var exactRegex = /class\s*=\s*["']think-block["']/;
|
|
8219
|
+
// 去掉think
|
|
8220
|
+
var replaceThinkAndYaml = function() {
|
|
8221
|
+
var text = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : "";
|
|
8222
|
+
return text.replace(/```(\s)?yaml(?:.|\n)*?```/ig, "").replace(/<thinking>([\s\S]*?)<\/thinking>/g, "").replace(RegExp('<div\\s+class="think-block">.*?<\\/div>', "gs"), "").replace(/^[ \n]+/g, "");
|
|
8223
|
+
};
|
|
8208
8224
|
r.initialize({
|
|
8209
8225
|
startOnLoad: false,
|
|
8210
8226
|
theme: "default",
|
|
@@ -8271,7 +8287,7 @@ var CustomerService = function(props) {
|
|
|
8271
8287
|
var ctrl = useRef(); //停止生成ai回答时使用
|
|
8272
8288
|
var childRef = useRef(null); //获取子组件方法
|
|
8273
8289
|
useRef(0);
|
|
8274
|
-
var _useState33 = _sliced_to_array(useState(true), 2)
|
|
8290
|
+
var _useState33 = _sliced_to_array(useState(true), 2); _useState33[0]; var setIsPositionState = _useState33[1];
|
|
8275
8291
|
var isPosition = useRef(true);
|
|
8276
8292
|
var recommendeQuestionID = useRef([]); //推荐问题id
|
|
8277
8293
|
var videoHotQuestionsList = useRef([]); //视频热门问题
|
|
@@ -8287,6 +8303,7 @@ var CustomerService = function(props) {
|
|
|
8287
8303
|
var getLisyFlagRef = useRef(0);
|
|
8288
8304
|
var _useState36 = _sliced_to_array(useState(false), 2); _useState36[0]; _useState36[1]; //是否显示mermaid弹窗
|
|
8289
8305
|
var _useState37 = _sliced_to_array(useState(""), 2); _useState37[0]; _useState37[1]; //mermaid内容
|
|
8306
|
+
var shouqiTimer = useRef(null);
|
|
8290
8307
|
var remarkable = new Remarkable({
|
|
8291
8308
|
html: true,
|
|
8292
8309
|
highlight: function highlight(str, lang) {
|
|
@@ -8373,6 +8390,7 @@ var CustomerService = function(props) {
|
|
|
8373
8390
|
// //获取热门推荐
|
|
8374
8391
|
// videoPageQuestiionsList(1);
|
|
8375
8392
|
// }
|
|
8393
|
+
console.log("initShowType", initShowType);
|
|
8376
8394
|
setShowType(initShowType);
|
|
8377
8395
|
}, [
|
|
8378
8396
|
initShowType
|
|
@@ -9542,6 +9560,7 @@ var CustomerService = function(props) {
|
|
|
9542
9560
|
//先请求问题列表
|
|
9543
9561
|
videoPageQuestiionsList(3);
|
|
9544
9562
|
}
|
|
9563
|
+
var tempMessageId = guidGenerator();
|
|
9545
9564
|
//使用fetchEventSource接收数据
|
|
9546
9565
|
fetchEventSource("".concat(urllocation, "/chat-service/public/v1.0/chat-with-ai/messages"), {
|
|
9547
9566
|
method: "POST",
|
|
@@ -9649,7 +9668,13 @@ var CustomerService = function(props) {
|
|
|
9649
9668
|
//识别的内容
|
|
9650
9669
|
// console.log("eventSource msg: ", event.data);
|
|
9651
9670
|
var msg = JSON.parse(event.data);
|
|
9652
|
-
|
|
9671
|
+
msg.tempMessageId = tempMessageId;
|
|
9672
|
+
if (msg.message) {
|
|
9673
|
+
// if (!hasYamlStarted && msg.message && /```\s*yaml/.test(content)) {
|
|
9674
|
+
// hasYamlStarted = true;
|
|
9675
|
+
// }
|
|
9676
|
+
msg.message = msg.message.replace(/<thinking>/g, '<div class="think-block">').replace(/<\/thinking>/g, "</div>\n");
|
|
9677
|
+
}
|
|
9653
9678
|
finishedRef.current = false;
|
|
9654
9679
|
setFinished(false);
|
|
9655
9680
|
msgStreamingCountRef.current = msgStreamingCountRef.current + 1;
|
|
@@ -9666,6 +9691,20 @@ var CustomerService = function(props) {
|
|
|
9666
9691
|
videoPageQuestiionsList(2);
|
|
9667
9692
|
}
|
|
9668
9693
|
testLabQuestion(JSON.parse(data).message, content, "");
|
|
9694
|
+
if (shouqiTimer.current) {
|
|
9695
|
+
clearTimeout(shouqiTimer.current);
|
|
9696
|
+
}
|
|
9697
|
+
shouqiTimer.current = setTimeout(function() {
|
|
9698
|
+
if ($(".think-block").last().css("display") === "block") {
|
|
9699
|
+
clearTimeout(shouqiTimer.current);
|
|
9700
|
+
$(".think-block").last().parent().find(".think-block").css({
|
|
9701
|
+
display: "none"
|
|
9702
|
+
});
|
|
9703
|
+
$(".think-block").last().parent().parent().find("i").css({
|
|
9704
|
+
transform: "rotate(180deg)"
|
|
9705
|
+
});
|
|
9706
|
+
}
|
|
9707
|
+
}, 1000);
|
|
9669
9708
|
}
|
|
9670
9709
|
},
|
|
9671
9710
|
onclose: function() {
|
|
@@ -9685,7 +9724,7 @@ var CustomerService = function(props) {
|
|
|
9685
9724
|
// console.log(aiSendQuestions().abort(),'slkdsdsdsd')
|
|
9686
9725
|
if (pageNumHistory > 1) return;
|
|
9687
9726
|
var obj = msg;
|
|
9688
|
-
var id = msg.
|
|
9727
|
+
var id = msg.tempMessageId;
|
|
9689
9728
|
setHistoryMessageList(function(prevHistoryMessageList) {
|
|
9690
9729
|
var list1 = prevHistoryMessageList;
|
|
9691
9730
|
//删除临时数据
|
|
@@ -9710,6 +9749,7 @@ var CustomerService = function(props) {
|
|
|
9710
9749
|
recevier: mid,
|
|
9711
9750
|
message: message,
|
|
9712
9751
|
id: id,
|
|
9752
|
+
messageId: msg.messageId,
|
|
9713
9753
|
upvoted: false,
|
|
9714
9754
|
downvoted: false,
|
|
9715
9755
|
createdAt: getDataTime(-1),
|
|
@@ -9740,6 +9780,7 @@ var CustomerService = function(props) {
|
|
|
9740
9780
|
if (item.id == id) {
|
|
9741
9781
|
return _object_spread_props(_object_spread({}, item), {
|
|
9742
9782
|
message: message,
|
|
9783
|
+
messageId: msg.messageId,
|
|
9743
9784
|
extraInfo: extraInfo == null ? item.extraInfo : JSON.stringify(extraInfo)
|
|
9744
9785
|
});
|
|
9745
9786
|
} else {
|
|
@@ -9859,6 +9900,14 @@ var CustomerService = function(props) {
|
|
|
9859
9900
|
// getHistoryMessage(page-1,5,'1',dataList);
|
|
9860
9901
|
// return;
|
|
9861
9902
|
// }
|
|
9903
|
+
dataList = dataList.map(function(ele, index) {
|
|
9904
|
+
if (ele.message.includes("<thinking>") && !ele.message.includes("</thinking>")) {
|
|
9905
|
+
ele.message = ele.message + "</thinking>";
|
|
9906
|
+
}
|
|
9907
|
+
return _object_spread_props(_object_spread({}, ele), {
|
|
9908
|
+
messageId: ele.id
|
|
9909
|
+
});
|
|
9910
|
+
});
|
|
9862
9911
|
setPageCount(Math.ceil(total / maxPageSize));
|
|
9863
9912
|
setFirstItemIndex(total - maxPageSize * (page - 1));
|
|
9864
9913
|
var newHistoryMessageList = [];
|
|
@@ -10050,7 +10099,7 @@ var CustomerService = function(props) {
|
|
|
10050
10099
|
} catch (error) {}
|
|
10051
10100
|
};
|
|
10052
10101
|
//点赞消息
|
|
10053
|
-
var likeMessage = function(
|
|
10102
|
+
var likeMessage = function(messageId, state, id) {
|
|
10054
10103
|
var url = "";
|
|
10055
10104
|
//点赞状态
|
|
10056
10105
|
if (!state) {
|
|
@@ -10059,7 +10108,7 @@ var CustomerService = function(props) {
|
|
|
10059
10108
|
url = "".concat(urllocation, "/chat-service/public/v1.0/history-messages:cancelUpvote");
|
|
10060
10109
|
}
|
|
10061
10110
|
http.post(url, {
|
|
10062
|
-
messageId:
|
|
10111
|
+
messageId: messageId
|
|
10063
10112
|
}).then(function(res) {
|
|
10064
10113
|
setHistoryMessageList(function(historyMessageList) {
|
|
10065
10114
|
var list = historyMessageList;
|
|
@@ -10074,7 +10123,7 @@ var CustomerService = function(props) {
|
|
|
10074
10123
|
});
|
|
10075
10124
|
};
|
|
10076
10125
|
//踩
|
|
10077
|
-
var disagreeMessage = function(
|
|
10126
|
+
var disagreeMessage = function(messageId, state, id) {
|
|
10078
10127
|
var url = "";
|
|
10079
10128
|
//点赞状态
|
|
10080
10129
|
if (!state) {
|
|
@@ -10083,7 +10132,7 @@ var CustomerService = function(props) {
|
|
|
10083
10132
|
url = "".concat(urllocation, "/chat-service/public/v1.0/history-messages:cancelDownvote");
|
|
10084
10133
|
}
|
|
10085
10134
|
http.post(url, {
|
|
10086
|
-
messageId:
|
|
10135
|
+
messageId: messageId
|
|
10087
10136
|
}).then(function(res) {
|
|
10088
10137
|
setHistoryMessageList(function(historyMessageList) {
|
|
10089
10138
|
var list = historyMessageList;
|
|
@@ -10691,6 +10740,9 @@ var CustomerService = function(props) {
|
|
|
10691
10740
|
message = removeMermaidBlockComments(message);
|
|
10692
10741
|
}
|
|
10693
10742
|
message = handleRenderSyntaxBlock(message, finishedRef.current || i != historyMessageList.length - 1);
|
|
10743
|
+
message = message.replace(/<thinking>([\s\S]*?)<\/thinking>/g, '<div class="think-block">$1</div>\n');
|
|
10744
|
+
message = message.replace(/```(\s)?yaml(?:.|\n)*?```/ig, "");
|
|
10745
|
+
message = message.replace(/```\s*yaml[\s\S]*/, "");
|
|
10694
10746
|
if (lastId == item.id && keyWordProblem != "") {
|
|
10695
10747
|
//点击历史记录时,找到关键字,防止关键字和标签名重复
|
|
10696
10748
|
// let key_sign = 'sign_'+new Date().getTime();+'sign';
|
|
@@ -10739,8 +10791,9 @@ var CustomerService = function(props) {
|
|
|
10739
10791
|
/*#__PURE__*/ jsx("i", {
|
|
10740
10792
|
className: "yinyong_quote1",
|
|
10741
10793
|
onClick: function() {
|
|
10794
|
+
// 问题的引用
|
|
10742
10795
|
setCitationContent({
|
|
10743
|
-
content: item.message,
|
|
10796
|
+
content: replaceThinkAndYaml(item.message),
|
|
10744
10797
|
id: item.id,
|
|
10745
10798
|
imageUrl: !item.quotedMessage && item.extraInfo && JSON.parse(item.extraInfo).length > 0 && JSON.parse(item.extraInfo)[0].key == "imageUrl" ? JSON.parse(item.extraInfo)[0].value : ""
|
|
10746
10799
|
});
|
|
@@ -10757,7 +10810,7 @@ var CustomerService = function(props) {
|
|
|
10757
10810
|
}) : /*#__PURE__*/ jsx("i", {
|
|
10758
10811
|
className: "fuzhi21",
|
|
10759
10812
|
onClick: function() {
|
|
10760
|
-
copyText(item.message);
|
|
10813
|
+
copyText(replaceThinkAndYaml(item.message));
|
|
10761
10814
|
{
|
|
10762
10815
|
var obj = copyTextOBJ;
|
|
10763
10816
|
obj = obj.filter(function(list) {
|
|
@@ -10820,14 +10873,14 @@ var CustomerService = function(props) {
|
|
|
10820
10873
|
item.quotedMessage && /*#__PURE__*/ jsxs("div", {
|
|
10821
10874
|
className: styles.citation_content,
|
|
10822
10875
|
children: [
|
|
10823
|
-
getByteLen(item.quotedMessage) > 120 ? /*#__PURE__*/ jsx(Tooltip, {
|
|
10876
|
+
getByteLen(replaceThinkAndYaml(item.quotedMessage)) > 120 ? /*#__PURE__*/ jsx(Tooltip, {
|
|
10824
10877
|
overlayClassName: styles.popover_main_content,
|
|
10825
|
-
title: item.quotedMessage,
|
|
10878
|
+
title: replaceThinkAndYaml(item.quotedMessage),
|
|
10826
10879
|
placement: "leftTop",
|
|
10827
10880
|
children: /*#__PURE__*/ jsxs("p", {
|
|
10828
10881
|
className: styles.text_exceed,
|
|
10829
10882
|
children: [
|
|
10830
|
-
item.quotedMessage,
|
|
10883
|
+
replaceThinkAndYaml(item.quotedMessage),
|
|
10831
10884
|
/*#__PURE__*/ jsx(RightOutlined, {})
|
|
10832
10885
|
]
|
|
10833
10886
|
})
|
|
@@ -10981,6 +11034,35 @@ var CustomerService = function(props) {
|
|
|
10981
11034
|
/*#__PURE__*/ jsxs("div", {
|
|
10982
11035
|
className: styles.content,
|
|
10983
11036
|
children: [
|
|
11037
|
+
!exactRegex.test(message) ? null : /*#__PURE__*/ jsxs("div", {
|
|
11038
|
+
id: "click_" + i,
|
|
11039
|
+
onClick: function() {
|
|
11040
|
+
if ($("#click_".concat(i, " + p .think-block")).css("display") === "inline-block" || $("#click_".concat(i, " + p .think-block")).css("display") === "block") {
|
|
11041
|
+
$("#click_".concat(i, " + p .think-block")).css({
|
|
11042
|
+
display: "none"
|
|
11043
|
+
});
|
|
11044
|
+
$("#click_".concat(i, " i")).css({
|
|
11045
|
+
transform: "rotate(180deg)"
|
|
11046
|
+
});
|
|
11047
|
+
} else {
|
|
11048
|
+
$("#click_".concat(i, " + p .think-block")).css({
|
|
11049
|
+
display: "block"
|
|
11050
|
+
});
|
|
11051
|
+
$("#click_".concat(i, " i")).css({
|
|
11052
|
+
transform: "rotate(0deg)"
|
|
11053
|
+
});
|
|
11054
|
+
}
|
|
11055
|
+
},
|
|
11056
|
+
className: styles.content_put,
|
|
11057
|
+
children: [
|
|
11058
|
+
/*#__PURE__*/ jsx("span", {
|
|
11059
|
+
children: "思考过程"
|
|
11060
|
+
}),
|
|
11061
|
+
/*#__PURE__*/ jsx("i", {
|
|
11062
|
+
className: "iconfont iconfangxiang-xiaxiao"
|
|
11063
|
+
})
|
|
11064
|
+
]
|
|
11065
|
+
}),
|
|
10984
11066
|
item.message != "AI助手繁忙,请稍后再提问或" && /*#__PURE__*/ jsx("p", {
|
|
10985
11067
|
dangerouslySetInnerHTML: {
|
|
10986
11068
|
__html: message
|
|
@@ -11065,14 +11147,14 @@ var CustomerService = function(props) {
|
|
|
11065
11147
|
item.quotedMessage && /*#__PURE__*/ jsxs("div", {
|
|
11066
11148
|
className: styles.citation_content,
|
|
11067
11149
|
children: [
|
|
11068
|
-
getByteLen(item.quotedMessage) > 120 ? /*#__PURE__*/ jsx(Tooltip, {
|
|
11150
|
+
getByteLen(replaceThinkAndYaml(item.quotedMessage)) > 120 ? /*#__PURE__*/ jsx(Tooltip, {
|
|
11069
11151
|
overlayClassName: styles.popover_main_content,
|
|
11070
|
-
title: item.quotedMessage,
|
|
11152
|
+
title: replaceThinkAndYaml(item.quotedMessage),
|
|
11071
11153
|
placement: "rightTop",
|
|
11072
11154
|
children: /*#__PURE__*/ jsxs("p", {
|
|
11073
11155
|
className: styles.text_exceed,
|
|
11074
11156
|
children: [
|
|
11075
|
-
item.quotedMessage,
|
|
11157
|
+
replaceThinkAndYaml(item.quotedMessage),
|
|
11076
11158
|
/*#__PURE__*/ jsx(RightOutlined, {})
|
|
11077
11159
|
]
|
|
11078
11160
|
})
|
|
@@ -11141,11 +11223,7 @@ var CustomerService = function(props) {
|
|
|
11141
11223
|
style: {
|
|
11142
11224
|
height: "100%"
|
|
11143
11225
|
},
|
|
11144
|
-
initialTopMostItemIndex
|
|
11145
|
-
index: "LAST",
|
|
11146
|
-
align: "end",
|
|
11147
|
-
offset: showType === 3 ? 58 : showType === 4 ? 144 : 58
|
|
11148
|
-
},
|
|
11226
|
+
// initialTopMostItemIndex={!finished&&isPositionState?undefined:{ index: "LAST", align: "end",offset:showType===3?58:showType===4?144:58 }}
|
|
11149
11227
|
initialItemCount: 10,
|
|
11150
11228
|
itemsRendered: function() {
|
|
11151
11229
|
renderMermaid();
|
|
@@ -11300,8 +11378,9 @@ var CustomerService = function(props) {
|
|
|
11300
11378
|
/*#__PURE__*/ jsx("i", {
|
|
11301
11379
|
className: "yinyong_quote1",
|
|
11302
11380
|
onClick: function() {
|
|
11381
|
+
// 答案的引用
|
|
11303
11382
|
setCitationContent({
|
|
11304
|
-
content: item.message,
|
|
11383
|
+
content: replaceThinkAndYaml(item.message),
|
|
11305
11384
|
imageUrl: item.extraInfo && JSON.parse(extraInfo).length > 0 && JSON.parse(extraInfo)[0].key == "imageUrl" && JSON.parse(extraInfo)[0].value,
|
|
11306
11385
|
id: item.id
|
|
11307
11386
|
});
|
|
@@ -11318,7 +11397,7 @@ var CustomerService = function(props) {
|
|
|
11318
11397
|
}) : /*#__PURE__*/ jsx("i", {
|
|
11319
11398
|
className: "fuzhi21",
|
|
11320
11399
|
onClick: function() {
|
|
11321
|
-
copyText(item.message);
|
|
11400
|
+
copyText(replaceThinkAndYaml(item.message));
|
|
11322
11401
|
{
|
|
11323
11402
|
var obj = copyTextOBJ;
|
|
11324
11403
|
obj = obj.filter(function(list) {
|
|
@@ -11344,7 +11423,7 @@ var CustomerService = function(props) {
|
|
|
11344
11423
|
/*#__PURE__*/ jsx("i", {
|
|
11345
11424
|
className: "Frame427319094 ".concat(item.upvoted ? styles.active : ""),
|
|
11346
11425
|
onClick: function() {
|
|
11347
|
-
likeMessage(item.id, item.upvoted);
|
|
11426
|
+
likeMessage(item.id, item.upvoted, item.id);
|
|
11348
11427
|
//老师的聊天窗口中不需要点赞和踩消息
|
|
11349
11428
|
if (!isAiChatWindow) return;
|
|
11350
11429
|
//只有最后一条回答,支持发送点赞或踩
|
|
@@ -11352,7 +11431,7 @@ var CustomerService = function(props) {
|
|
|
11352
11431
|
if (!item.extraInfo && item.sender == "AI") {
|
|
11353
11432
|
aiSendQuestions(1, {
|
|
11354
11433
|
roomId: roomId,
|
|
11355
|
-
message: "
|
|
11434
|
+
message: "\x03\x03\x03你给出的答案我非常满意,赞!\x03\x03\x03",
|
|
11356
11435
|
quotedMessage: "",
|
|
11357
11436
|
regenerate: false,
|
|
11358
11437
|
generateUpvoteOrDownvoteMessage: true
|
|
@@ -11367,7 +11446,7 @@ var CustomerService = function(props) {
|
|
|
11367
11446
|
/*#__PURE__*/ jsx("i", {
|
|
11368
11447
|
className: "Frame427319095 ".concat(item.downvoted ? styles.active : ""),
|
|
11369
11448
|
onClick: function() {
|
|
11370
|
-
disagreeMessage(item.id, item.downvoted);
|
|
11449
|
+
disagreeMessage(item.id, item.downvoted, item.id);
|
|
11371
11450
|
//老师的聊天窗口中不需要点赞和踩消息
|
|
11372
11451
|
if (!isAiChatWindow) return;
|
|
11373
11452
|
//只有最后一条回答,支持发送点赞或踩
|
|
@@ -11375,7 +11454,7 @@ var CustomerService = function(props) {
|
|
|
11375
11454
|
if (!item.extraInfo && item.sender == "AI") {
|
|
11376
11455
|
aiSendQuestions(1, {
|
|
11377
11456
|
roomId: roomId,
|
|
11378
|
-
message: "
|
|
11457
|
+
message: "\x03\x03\x03你给出的答案很糟糕,我不满意,踩!\x03\x03\x03",
|
|
11379
11458
|
quotedMessage: "",
|
|
11380
11459
|
regenerate: false,
|
|
11381
11460
|
generateUpvoteOrDownvoteMessage: true
|
|
@@ -11507,9 +11586,9 @@ var CustomerService = function(props) {
|
|
|
11507
11586
|
className: "yinyong_quote1",
|
|
11508
11587
|
onClick: function() {
|
|
11509
11588
|
setCitationContent({
|
|
11510
|
-
content: item.message,
|
|
11589
|
+
content: replaceThinkAndYaml(item.message),
|
|
11511
11590
|
imageUrl: item.extraInfo && JSON.parse(extraInfo).length > 0 && JSON.parse(extraInfo)[0].key == "imageUrl" && JSON.parse(extraInfo)[0].value,
|
|
11512
|
-
id: item.
|
|
11591
|
+
id: item.messageId
|
|
11513
11592
|
});
|
|
11514
11593
|
resettingBottomHei();
|
|
11515
11594
|
onEvent(serverName + serverUrl(), "click_智能问答_引用", "提交");
|
|
@@ -11524,7 +11603,7 @@ var CustomerService = function(props) {
|
|
|
11524
11603
|
}) : /*#__PURE__*/ jsx("i", {
|
|
11525
11604
|
className: "fuzhi21",
|
|
11526
11605
|
onClick: function() {
|
|
11527
|
-
copyText(item.message);
|
|
11606
|
+
copyText(replaceThinkAndYaml(item.message));
|
|
11528
11607
|
{
|
|
11529
11608
|
var obj = copyTextOBJ;
|
|
11530
11609
|
obj = obj.filter(function(list) {
|
|
@@ -11550,7 +11629,7 @@ var CustomerService = function(props) {
|
|
|
11550
11629
|
/*#__PURE__*/ jsx("i", {
|
|
11551
11630
|
className: "Frame427319094 ".concat(item.upvoted ? styles.active : ""),
|
|
11552
11631
|
onClick: function() {
|
|
11553
|
-
likeMessage(item.
|
|
11632
|
+
likeMessage(item.messageId, item.upvoted, item.id);
|
|
11554
11633
|
//老师的聊天窗口中不需要点赞和踩消息
|
|
11555
11634
|
if (!isAiChatWindow) return;
|
|
11556
11635
|
//只有最后一条回答,支持发送点赞或踩
|
|
@@ -11559,7 +11638,7 @@ var CustomerService = function(props) {
|
|
|
11559
11638
|
if (!item.extraInfo && item.sender == "AI") {
|
|
11560
11639
|
aiSendQuestions(1, {
|
|
11561
11640
|
roomId: roomId,
|
|
11562
|
-
message: "
|
|
11641
|
+
message: "\x03\x03\x03你给出的答案我非常满意,赞!\x03\x03\x03",
|
|
11563
11642
|
quotedMessage: "",
|
|
11564
11643
|
regenerate: false,
|
|
11565
11644
|
generateUpvoteOrDownvoteMessage: true
|
|
@@ -11575,7 +11654,7 @@ var CustomerService = function(props) {
|
|
|
11575
11654
|
/*#__PURE__*/ jsx("i", {
|
|
11576
11655
|
className: "Frame427319095 ".concat(item.downvoted ? styles.active : ""),
|
|
11577
11656
|
onClick: function() {
|
|
11578
|
-
disagreeMessage(item.
|
|
11657
|
+
disagreeMessage(item.messageId, item.downvoted, item.id);
|
|
11579
11658
|
//老师的聊天窗口中不需要点赞和踩消息
|
|
11580
11659
|
if (!isAiChatWindow) return;
|
|
11581
11660
|
//只有最后一条回答,支持发送点赞或踩
|
|
@@ -11586,7 +11665,7 @@ var CustomerService = function(props) {
|
|
|
11586
11665
|
//AI回答
|
|
11587
11666
|
aiSendQuestions(1, {
|
|
11588
11667
|
roomId: roomId,
|
|
11589
|
-
message: "
|
|
11668
|
+
message: "\x03\x03\x03你给出的答案很糟糕,我不满意,踩!\x03\x03\x03",
|
|
11590
11669
|
quotedMessage: "",
|
|
11591
11670
|
regenerate: false,
|
|
11592
11671
|
generateUpvoteOrDownvoteMessage: true
|
|
@@ -15341,8 +15420,17 @@ var VirtuosoList = /*#__PURE__*/ forwardRef(function(props, ref) {
|
|
|
15341
15420
|
} else {
|
|
15342
15421
|
// 没有跨天 判断是否相隔超过10分钟
|
|
15343
15422
|
if (timeObj.timestamp - beforeTimeObj.timestamp > 10 * 60 * 1000) {
|
|
15344
|
-
// 超过10分钟 显示
|
|
15345
|
-
|
|
15423
|
+
// 超过10分钟 显示
|
|
15424
|
+
var now = new Date();
|
|
15425
|
+
// 当天的日期
|
|
15426
|
+
var nowTimeStr = "".concat(now.getFullYear(), "-").concat(String(now.getMonth() + 1).padStart(2, "0"), "-").concat(String(now.getDate()).padStart(2, "0"));
|
|
15427
|
+
if (nowTimeStr === "".concat(timeObj.year, "-").concat(timeObj.month, "-").concat(timeObj.day)) {
|
|
15428
|
+
// 是当天 显示 时分
|
|
15429
|
+
time = "".concat(timeObj.hours, ":").concat(timeObj.minutes);
|
|
15430
|
+
} else {
|
|
15431
|
+
// 不是当天 显示 年月日 时分
|
|
15432
|
+
time = "".concat(timeObj.year, "-").concat(timeObj.month, "-").concat(timeObj.day, " ").concat(timeObj.hours, ":").concat(timeObj.minutes);
|
|
15433
|
+
}
|
|
15346
15434
|
}
|
|
15347
15435
|
}
|
|
15348
15436
|
}
|
|
@@ -15552,16 +15640,6 @@ var UploadFileBtn = SendBtn;
|
|
|
15552
15640
|
|
|
15553
15641
|
var modules_63b47c51$1 = {"footer-fileList-wrapper":"index_module_footerFileListWrapper__e818c28d","footer-fileList-list":"index_module_footerFileListList__e818c28d","footer-fileList-listItem":"index_module_footerFileListListItem__e818c28d","footer-fileList-listItem-icon":"index_module_footerFileListListItemIcon__e818c28d","footer-fileList-listItem-text":"index_module_footerFileListListItemText__e818c28d","footer-fileList-listItem-status":"index_module_footerFileListListItemStatus__e818c28d","footer-fileList-listItem-delete":"index_module_footerFileListListItemDelete__e818c28d","footer-fileList-pre":"index_module_footerFileListPre__e818c28d","footer-fileList-next":"index_module_footerFileListNext__e818c28d"};
|
|
15554
15642
|
|
|
15555
|
-
var guidGenerator = function() {
|
|
15556
|
-
var d = new Date().getTime();
|
|
15557
|
-
var uuid = "xxxxxxxxxxxx4xxxyxxxxxxxxxxxxxxx".replace(/[xy]/g, function(c) {
|
|
15558
|
-
var r = (d + Math.random() * 16) % 16 | 0;
|
|
15559
|
-
d = Math.floor(d / 16);
|
|
15560
|
-
return (c == "x" ? r : r & 3 | 8).toString(16);
|
|
15561
|
-
});
|
|
15562
|
-
return uuid;
|
|
15563
|
-
};
|
|
15564
|
-
|
|
15565
15643
|
// 通过文件名 获取文件后缀
|
|
15566
15644
|
var getSuffix = function(fileName) {
|
|
15567
15645
|
return fileName.split(".").pop().toLowerCase();
|
|
@@ -16207,7 +16285,7 @@ var Footer = /*#__PURE__*/ forwardRef(function(props, ref) {
|
|
|
16207
16285
|
apiRef.contentApi.addMsg({
|
|
16208
16286
|
id: msgId,
|
|
16209
16287
|
createTime: createTime,
|
|
16210
|
-
content: "
|
|
16288
|
+
content: "正在思考...",
|
|
16211
16289
|
location: "left",
|
|
16212
16290
|
reference: recordObj.reference || null,
|
|
16213
16291
|
source: null,
|
|
@@ -16217,7 +16295,7 @@ var Footer = /*#__PURE__*/ forwardRef(function(props, ref) {
|
|
|
16217
16295
|
apiRef.contentApi.addMsg({
|
|
16218
16296
|
id: msgId,
|
|
16219
16297
|
createTime: createTime,
|
|
16220
|
-
content: "
|
|
16298
|
+
content: "正在思考...",
|
|
16221
16299
|
location: "left",
|
|
16222
16300
|
reference: null,
|
|
16223
16301
|
source: null,
|