ai-chat-bot-interface 1.4.8 → 1.4.10

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.10",
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,8 @@
90
92
  v-if="comp.showType === 'card'"
91
93
  :sku-list="comp.skuList"
92
94
  :is-mini="!showHeader"
95
+ :def-msg="finalDefMsg"
96
+ :channel="channel"
93
97
  @select="(data) => handleCardTap(data, comp)"
94
98
  />
95
99
  <plan-card
@@ -109,9 +113,7 @@
109
113
  <div
110
114
  class="cui_btn cui_btn_2"
111
115
  @click.stop="handleCardTap({ type: 'match' }, {})"
112
- >
113
- 用該方案配餐
114
- </div>
116
+ >{{finalDefMsg.useSolution}}</div>
115
117
  </div>
116
118
  </template>
117
119
  </template>
@@ -190,6 +192,14 @@ const msgObj = {
190
192
  uploadingTips: '文件正在上傳,請稍候...',
191
193
  matchText: '請用以上方案為我配餐',
192
194
  matchContent: '請用以上方案為我配餐',
195
+ energy: '熱量',
196
+ protein: '蛋白質',
197
+ fat: '脂肪',
198
+ carbonwater: '碳水',
199
+ newChat: '新對話',
200
+ thinking: '思考中...',
201
+ thinkCompleted: '思考完成',
202
+ useSolution: '用該方案配餐'
193
203
  };
194
204
 
195
205
  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>
@@ -26,7 +27,7 @@
26
27
  </div>
27
28
  </div>
28
29
  <div v-else class="btn_group">
29
- <div class="btn btn_1" @click.stop="handleBtn('ship_order')">
30
+ <div v-if="!channel !== 'hft'" class="btn btn_1" @click.stop="handleBtn('ship_order')">
30
31
  <span class="name">配送下單</span>
31
32
  <span class="sub">(直送到府)</span>
32
33
  </div>
@@ -51,6 +52,14 @@ const props = defineProps({
51
52
  type: Boolean,
52
53
  default: false,
53
54
  },
55
+ channel: {
56
+ type: String,
57
+ default: 'web'
58
+ },
59
+ defMsg: {
60
+ type: Object,
61
+ default: () => ({})
62
+ }
54
63
  });
55
64
  const Emits = defineEmits(['select']);
56
65