askbot-dragon 88.1.3 → 88.1.5
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/package.json
CHANGED
|
@@ -8,8 +8,8 @@ if (localStorage.getItem('VUE_APP_SOURCE' == 'libang_production')) {
|
|
|
8
8
|
accessKeyId = "XsVgbg1mDU/xiVxPeNsaIwGmhF+jSZ0ep79YuqOjHk8=";
|
|
9
9
|
accessKeySecret = "nBcMSflABN+A5bsaoaeVVI8FeYRaVXkCVZl2m/aC89Q/0uuWEP1f47W/i1jvNXBF";
|
|
10
10
|
} else {
|
|
11
|
-
accessKeyId = "
|
|
12
|
-
accessKeySecret = "
|
|
11
|
+
accessKeyId = "ErivR+YlsAryJl+gJmBKLpQFRW/hRre9JeS+VpbixTY=";
|
|
12
|
+
accessKeySecret = "qAHB0qmrOyTOiaOch8GyweGTmCx06QVtYOupvb1lUL0prxDuGBMt85VHCjg5/aU8";
|
|
13
13
|
}
|
|
14
14
|
|
|
15
15
|
async function getDecryptedKeys() {
|
|
@@ -14,16 +14,16 @@
|
|
|
14
14
|
<div class="think_content" :class="showThink ? '' : 'hide_think'" v-html="parseThinkVal">
|
|
15
15
|
</div>
|
|
16
16
|
</div>
|
|
17
|
-
<!-- <vue-markdown
|
|
18
|
-
class="mark_down"
|
|
19
|
-
:source="typedContent"
|
|
20
|
-
:ref="'markdown' + msgId"
|
|
17
|
+
<!-- <vue-markdown
|
|
18
|
+
class="mark_down"
|
|
19
|
+
:source="typedContent"
|
|
20
|
+
:ref="'markdown' + msgId"
|
|
21
21
|
@click.native="clickMarkDown"
|
|
22
22
|
:plugins="plugins"
|
|
23
23
|
>
|
|
24
24
|
</vue-markdown> -->
|
|
25
25
|
<!-- v-show="hasContent" -->
|
|
26
|
-
<div
|
|
26
|
+
<div
|
|
27
27
|
class="mark_down"
|
|
28
28
|
v-html="markParseText"
|
|
29
29
|
ref="markDown"
|
|
@@ -39,8 +39,8 @@
|
|
|
39
39
|
|
|
40
40
|
<script>
|
|
41
41
|
/* eslint-disable */
|
|
42
|
-
import VueMarkdown from 'vue-markdown';
|
|
43
|
-
import ImgView from "./imgView";
|
|
42
|
+
// import VueMarkdown from 'vue-markdown';
|
|
43
|
+
import ImgView from "./imgView.vue";
|
|
44
44
|
// import Typed from "typed.js";
|
|
45
45
|
import hljs from 'highlight.js';
|
|
46
46
|
import 'highlight.js/styles/default.css';
|
|
@@ -128,8 +128,7 @@ export default {
|
|
|
128
128
|
}
|
|
129
129
|
},
|
|
130
130
|
components: {
|
|
131
|
-
ImgView
|
|
132
|
-
VueMarkdown
|
|
131
|
+
ImgView
|
|
133
132
|
},
|
|
134
133
|
mounted() {
|
|
135
134
|
this.$nextTick(() => {
|
|
@@ -182,7 +181,9 @@ export default {
|
|
|
182
181
|
clearInterval(this.thinkTimer)
|
|
183
182
|
this.thinkTimer = null
|
|
184
183
|
this.thinkEnd = true
|
|
185
|
-
|
|
184
|
+
setTimeout(() => {
|
|
185
|
+
this.removeLoadingNode()
|
|
186
|
+
}, 200)
|
|
186
187
|
this.$emit("streamCallback", this.typedContent)
|
|
187
188
|
this.$emit("sseOtherInfo", this.msgId, "start", "");
|
|
188
189
|
}, 200);
|
|
@@ -282,7 +283,7 @@ export default {
|
|
|
282
283
|
this.$emit("answerDocKnowledgeFn");
|
|
283
284
|
this.eventSource = new EventSource(url);
|
|
284
285
|
this.$emit("streamStatus", true, this.msgId);
|
|
285
|
-
this.$set(this, 'showThink', true);
|
|
286
|
+
// this.$set(this, 'showThink', true);
|
|
286
287
|
this.signSetFlag = false;
|
|
287
288
|
this.thinkEnd = false
|
|
288
289
|
let tempString = "";
|
|
@@ -343,7 +344,9 @@ export default {
|
|
|
343
344
|
this.$emit("streamCallback", this.typedContent)
|
|
344
345
|
this.$emit("streamStatus", false, this.msgId);
|
|
345
346
|
this.appendCopyBtn()
|
|
346
|
-
|
|
347
|
+
setTimeout(() => {
|
|
348
|
+
this.removeLoadingNode()
|
|
349
|
+
}, 200);
|
|
347
350
|
this.$emit("sseOtherInfo", this.msgId, "start", "");
|
|
348
351
|
}
|
|
349
352
|
|
|
@@ -366,6 +369,22 @@ export default {
|
|
|
366
369
|
recommendItems = data;
|
|
367
370
|
} else if (event.lastEventId === 'retry') {
|
|
368
371
|
this.retryUrl = data.content;
|
|
372
|
+
} else if (event.lastEventId === 'generated_image') {
|
|
373
|
+
let imgs = JSON.parse(data.content);
|
|
374
|
+
let imgsStr = "";
|
|
375
|
+
for (let i = 0; i < imgs.length; i++) {
|
|
376
|
+
imgsStr += ``;
|
|
377
|
+
}
|
|
378
|
+
this.$set(this, "typedContent", this.typedContent + imgsStr);
|
|
379
|
+
|
|
380
|
+
// 模拟图片推送
|
|
381
|
+
// let imgs = JSON.parse('[{"oss_url":"https://guoranopen-zjk.oss-cn-zhangjiakou.aliyuncs.com/generated-img/generated_img_865652a94b374337b2ac703466cdea94.png"}]');
|
|
382
|
+
// let imgsStr = "";
|
|
383
|
+
// for (let i = 0; i < imgs.length; i++) {
|
|
384
|
+
// imgsStr += ``;
|
|
385
|
+
// }
|
|
386
|
+
// this.$set(this, "typedContent", this.typedContent + imgsStr);
|
|
387
|
+
|
|
369
388
|
} else if (event.lastEventId === 'source') {
|
|
370
389
|
this.$emit("changedHeadStatusValue", this.msgId, data);
|
|
371
390
|
} else {
|
|
@@ -534,7 +553,7 @@ export default {
|
|
|
534
553
|
this.imgList.splice(index, 1);
|
|
535
554
|
this.imgList.unshift(previewImageUrl);
|
|
536
555
|
}
|
|
537
|
-
|
|
556
|
+
|
|
538
557
|
},
|
|
539
558
|
closeViewer() {
|
|
540
559
|
this.showPreview = false;
|
|
@@ -591,7 +610,7 @@ export default {
|
|
|
591
610
|
let codeList = doc.querySelectorAll('pre code')
|
|
592
611
|
codeList.forEach(ele =>{
|
|
593
612
|
let list = ele.getElementsByClassName("code_copy_btn")
|
|
594
|
-
if(list.length == 0 && ele.classList.contains("hljs")) {
|
|
613
|
+
if(list.length == 0 && ele.classList.contains("hljs") && !ele.classList.contains("hljs-undefined")) {
|
|
595
614
|
let text = ele.innerText
|
|
596
615
|
let btnId = uuidv4();
|
|
597
616
|
let copy = document.createElement('div')
|