ai-assistant-pro 0.0.9 → 0.0.11
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/components/demo/api/index.js +1 -0
- package/components/demo/src/chat.vue +9 -2
- package/components/demo/src/hot-search.vue +1 -0
- package/components/demo/src/main.vue +10 -1
- package/dist/ai-assistant-pro.common.js +8865 -10490
- package/dist/ai-assistant-pro.common.js.map +1 -1
- package/dist/ai-assistant-pro.css +1 -1
- package/dist/ai-assistant-pro.umd.js +8869 -10494
- package/dist/ai-assistant-pro.umd.js.map +1 -1
- package/dist/ai-assistant-pro.umd.min.js +14 -17
- package/dist/ai-assistant-pro.umd.min.js.map +1 -1
- package/package.json +4 -2
|
@@ -95,6 +95,10 @@ export default {
|
|
|
95
95
|
type: String,
|
|
96
96
|
default: undefined,
|
|
97
97
|
},
|
|
98
|
+
showMoreQA: {
|
|
99
|
+
type: Boolean,
|
|
100
|
+
default: false,
|
|
101
|
+
},
|
|
98
102
|
messageData: {
|
|
99
103
|
type: Array,
|
|
100
104
|
default: cacheMessageList
|
|
@@ -199,7 +203,9 @@ export default {
|
|
|
199
203
|
content: current.message || '正在思考中。',
|
|
200
204
|
});
|
|
201
205
|
}
|
|
202
|
-
this.
|
|
206
|
+
if (this.showMoreQA) {
|
|
207
|
+
this.makeAutoQuestioning(cacheMessage);
|
|
208
|
+
}
|
|
203
209
|
},
|
|
204
210
|
makeMessageLine(res, list) {
|
|
205
211
|
const { content, status, chatId, msgId, parentMsgId, reference, commonKey, connectUrl } = JSON.parse(res.data);
|
|
@@ -251,6 +257,7 @@ export default {
|
|
|
251
257
|
content: { followUps },
|
|
252
258
|
},
|
|
253
259
|
} = autoRes;
|
|
260
|
+
this.messageData[this.messageData.length - 1].followUps = [];
|
|
254
261
|
this.messageData[this.messageData.length - 1].followUps =
|
|
255
262
|
followUps.length > 3 ? followUps.splice(0, 3) : followUps;
|
|
256
263
|
},
|
|
@@ -377,7 +384,7 @@ export default {
|
|
|
377
384
|
|
|
378
385
|
.links {
|
|
379
386
|
position: relative;
|
|
380
|
-
height: 22px;
|
|
387
|
+
min-height: 22px;
|
|
381
388
|
line-height: 22px;
|
|
382
389
|
margin: 8px 0;
|
|
383
390
|
margin-left: 10px;
|
|
@@ -12,7 +12,10 @@
|
|
|
12
12
|
</div>
|
|
13
13
|
<template v-if="courseFlag">
|
|
14
14
|
<div class="ai-main-content">
|
|
15
|
-
<hot-search v-if="!chatShow"
|
|
15
|
+
<hot-search v-if="!chatShow"
|
|
16
|
+
:resId="resId"
|
|
17
|
+
@select-module="selectModule"
|
|
18
|
+
@init-info="initInfo"></hot-search>
|
|
16
19
|
<chat v-if="chatShow"
|
|
17
20
|
ref="chatRef"
|
|
18
21
|
:resId="resId"
|
|
@@ -21,6 +24,7 @@
|
|
|
21
24
|
:key-word="aiMessageKeyWord"
|
|
22
25
|
:message-data="messageList"
|
|
23
26
|
:chat-major-id="chatMajorId"
|
|
27
|
+
:show-more-q-a="showMoreQA"
|
|
24
28
|
@on-reanser="reanserMethod"
|
|
25
29
|
@on-message-finish="messageFinish"
|
|
26
30
|
/>
|
|
@@ -100,6 +104,7 @@ export default {
|
|
|
100
104
|
chatId: undefined, // 对话id
|
|
101
105
|
stop: false,
|
|
102
106
|
chatMajorId: '',
|
|
107
|
+
showMoreQA: false,
|
|
103
108
|
}
|
|
104
109
|
},
|
|
105
110
|
mounted() {
|
|
@@ -227,6 +232,10 @@ export default {
|
|
|
227
232
|
messageFinish(chatId) {
|
|
228
233
|
this.stop = false;
|
|
229
234
|
this.chatId = chatId;
|
|
235
|
+
},
|
|
236
|
+
initInfo(info) {
|
|
237
|
+
const { ifProbe } = info;
|
|
238
|
+
this.showMoreQA = !!ifProbe;
|
|
230
239
|
}
|
|
231
240
|
}
|
|
232
241
|
}
|