ai-chat-bot-interface 1.6.4 → 1.6.6
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
package/src/App.vue
CHANGED
|
@@ -8,8 +8,8 @@ const handleLog = (log) => {
|
|
|
8
8
|
<template>
|
|
9
9
|
<div style="width: 100vw; height: 100vh">
|
|
10
10
|
<chat-ui
|
|
11
|
-
bot-id="
|
|
12
|
-
token="
|
|
11
|
+
bot-id="555"
|
|
12
|
+
token="2222"
|
|
13
13
|
uid="262598"
|
|
14
14
|
:def-msg="{ placeholder: '发消息...' }"
|
|
15
15
|
:show-header="false"
|
|
@@ -19,12 +19,11 @@ const handleLog = (log) => {
|
|
|
19
19
|
name: '用户信息',
|
|
20
20
|
value: 'personalForm',
|
|
21
21
|
type: 'chat',
|
|
22
|
-
msg: '
|
|
22
|
+
msg: '请为我生成一份个性化的健康的食谱。',
|
|
23
23
|
},
|
|
24
24
|
]"
|
|
25
25
|
:need-log="true"
|
|
26
26
|
content-type="markdown"
|
|
27
|
-
first-msg="你好"
|
|
28
27
|
@log="handleLog"
|
|
29
28
|
/>
|
|
30
29
|
</div>
|
package/src/ChatUi.vue
CHANGED
|
@@ -534,9 +534,14 @@ const chatConv = async (data) => {
|
|
|
534
534
|
const handlePersonalForm = () => {
|
|
535
535
|
console.log('======= End ======', historyList.value, isFirst.value);
|
|
536
536
|
if (isFirst.value) {
|
|
537
|
-
|
|
537
|
+
if (
|
|
538
|
+
historyList.value[idx].extra.findIndex(
|
|
539
|
+
(item) => item.showType === 'personalForm',
|
|
540
|
+
) === -1
|
|
541
|
+
) {
|
|
542
|
+
historyList.value[idx].extra.push({ showType: 'personalForm' });
|
|
543
|
+
}
|
|
538
544
|
isFirst.value = false;
|
|
539
|
-
|
|
540
545
|
console.log('===============', historyList.value[idx]);
|
|
541
546
|
}
|
|
542
547
|
};
|