ai-chat-bot-interface 1.4.8 → 1.4.9

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.4.8",
4
+ "version": "1.4.9",
5
5
  "type": "module",
6
6
  "main": "index.js",
7
7
  "description": "A AI chat bot interface. (private)",
package/src/ChatUi.vue CHANGED
@@ -14,7 +14,7 @@
14
14
  <div class="btn_group">
15
15
  <button class="btn" @click.stop="createConv">
16
16
  <new-chat class="icon" />
17
- <span style="font-size: 14px">新對話</span>
17
+ <span style="font-size: 14px">{{ finalDefMsg.newChat }}</span>
18
18
  </button>
19
19
  <template v-show="false">
20
20
  <button class="btn">
@@ -64,10 +64,12 @@
64
64
  <div class="box">
65
65
  <template v-if="conv.reasoning_content">
66
66
  <div v-if="conv.status === 'thinking'" class="think_status">
67
- <thinking-icon class="icon" /> 思考中...
67
+ <thinking-icon class="icon" />
68
+ {{ finalDefMsg.thinking }}
68
69
  </div>
69
70
  <div v-else class="think_status">
70
- <ok-icon class="icon" /> 思考完成
71
+ <ok-icon class="icon" />
72
+ {{ finalDefMsg.thinkCompleted }}
71
73
  </div>
72
74
 
73
75
  <p class="think_text">
@@ -90,6 +92,7 @@
90
92
  v-if="comp.showType === 'card'"
91
93
  :sku-list="comp.skuList"
92
94
  :is-mini="!showHeader"
95
+ :def-msg="finalDefMsg"
93
96
  @select="(data) => handleCardTap(data, comp)"
94
97
  />
95
98
  <plan-card
@@ -109,9 +112,7 @@
109
112
  <div
110
113
  class="cui_btn cui_btn_2"
111
114
  @click.stop="handleCardTap({ type: 'match' }, {})"
112
- >
113
- 用該方案配餐
114
- </div>
115
+ >{{finalDefMsg.useSolution}}</div>
115
116
  </div>
116
117
  </template>
117
118
  </template>
@@ -190,6 +191,14 @@ const msgObj = {
190
191
  uploadingTips: '文件正在上傳,請稍候...',
191
192
  matchText: '請用以上方案為我配餐',
192
193
  matchContent: '請用以上方案為我配餐',
194
+ energy: '熱量',
195
+ protein: '蛋白質',
196
+ fat: '脂肪',
197
+ carbonwater: '碳水',
198
+ newChat: '新對話',
199
+ thinking: '思考中...',
200
+ thinkCompleted: '思考完成',
201
+ useSolution: '用該方案配餐'
193
202
  };
194
203
 
195
204
  const props = defineProps({
@@ -26,10 +26,14 @@ const props = defineProps({
26
26
  type: Object,
27
27
  required: true,
28
28
  },
29
+ defMsg: {
30
+ type: Object,
31
+ default: () => ({})
32
+ }
29
33
  });
30
34
 
31
35
  const subStr = computed(() => {
32
- return `熱量${props.info.energy}kcal,蛋白質${props.info.protein}g,脂肪${props.info.fat}g,碳水${props.info.carbonwater}g`;
36
+ return `${props.defMsg.energy}${props.info.energy}kcal,${props.defMsg.protein}${props.info.protein}g,${props.defMsg.fat}${props.info.fat}g,${props.defMsg.carbonwater}${props.info.carbonwater}g`;
33
37
  });
34
38
 
35
39
  const previewImg = (url) => {
@@ -15,6 +15,7 @@
15
15
  v-for="(info, idx) in dList.getCategoryList"
16
16
  :key="idx"
17
17
  :info="info"
18
+ :def-msg="defMsg"
18
19
  />
19
20
  </template>
20
21
  </div>
@@ -51,6 +52,10 @@ const props = defineProps({
51
52
  type: Boolean,
52
53
  default: false,
53
54
  },
55
+ defMsg: {
56
+ type: Object,
57
+ default: () => ({})
58
+ }
54
59
  });
55
60
  const Emits = defineEmits(['select']);
56
61