ai-chat-bot-interface 1.6.4 → 1.6.7

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
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "ai-chat-bot-interface",
3
3
  "private": false,
4
- "version": "1.6.4",
4
+ "version": "1.6.7",
5
5
  "type": "module",
6
6
  "main": "index.js",
7
7
  "description": "A AI chat bot interface. (private)",
package/src/App.vue CHANGED
@@ -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
- historyList.value[idx].extra.push({ showType: 'personalForm' });
537
+ if (
538
+ historyList.value[idx].extra.findIndex((item) =>
539
+ item.hasOwnProperty('showType'),
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
  };
@@ -351,7 +351,7 @@ const selectTag = (item, type) => {
351
351
  justify-content: space-between;
352
352
  border-bottom: 1px solid #dadada;
353
353
  height: 54px;
354
- line-height: 54px;
354
+ line-height: 24px;
355
355
 
356
356
  &:last-child {
357
357
  border-bottom: none;