ai-chat-bot-interface 1.7.7 → 1.7.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.
Files changed (55) hide show
  1. package/dist/assets/index-DQulfwi9.css +9 -0
  2. package/dist/assets/index-Dkddqe_3.js +123 -0
  3. package/{index.html → dist/index.html} +2 -1
  4. package/dist/src/index.d.ts +0 -0
  5. package/package.json +26 -5
  6. package/.prettierignore +0 -5
  7. package/.prettierrc.cjs +0 -37
  8. package/.vscode/extensions.json +0 -3
  9. package/index.js +0 -11
  10. package/src/App.vue +0 -39
  11. package/src/ChatUi.less +0 -301
  12. package/src/ChatUi.vue +0 -1087
  13. package/src/assets/styles/public.less +0 -152
  14. package/src/assets/vue.svg +0 -1
  15. package/src/components/DishesCard.vue +0 -369
  16. package/src/components/DishesList.vue +0 -207
  17. package/src/components/MarkdownPlan/MarkdownViewer.vue +0 -34
  18. package/src/components/OperateModule.less +0 -186
  19. package/src/components/OperateModule.vue +0 -392
  20. package/src/components/PlanCard.vue +0 -114
  21. package/src/components/StoreList/StoreCard.vue +0 -72
  22. package/src/components/StoreList/StoreList.vue +0 -27
  23. package/src/components/StoreList/mock.js +0 -411
  24. package/src/components/assistantReplay/assistantReplay.vue +0 -78
  25. package/src/components/icons/ArrowDown.vue +0 -26
  26. package/src/components/icons/ArrowRight.vue +0 -19
  27. package/src/components/icons/BackIcon.vue +0 -19
  28. package/src/components/icons/ClearIcon.vue +0 -18
  29. package/src/components/icons/CloseIcon.vue +0 -17
  30. package/src/components/icons/NewSessionIcon.vue +0 -20
  31. package/src/components/icons/OkIcon.vue +0 -26
  32. package/src/components/icons/SendIcon.vue +0 -22
  33. package/src/components/icons/ThinkingIcon.vue +0 -28
  34. package/src/components/icons/addIcon.vue +0 -18
  35. package/src/components/icons/cameraIcon.vue +0 -22
  36. package/src/components/icons/closeBorderIcon.vue +0 -35
  37. package/src/components/icons/fileIcon.vue +0 -18
  38. package/src/components/icons/loadingIcon.vue +0 -76
  39. package/src/components/icons/loadingIcon2.vue +0 -88
  40. package/src/components/icons/newChat.vue +0 -18
  41. package/src/components/icons/pictureIcon.vue +0 -22
  42. package/src/components/icons/processBar.vue +0 -115
  43. package/src/components/icons/progressRing.vue +0 -63
  44. package/src/components/icons/sendLoadingIcon.vue +0 -35
  45. package/src/components/icons/tagIcon.vue +0 -18
  46. package/src/components/imgeList.vue +0 -63
  47. package/src/components/personalForm/personalForm.vue +0 -634
  48. package/src/components/popup/popup.vue +0 -178
  49. package/src/main.js +0 -26
  50. package/src/style.css +0 -4
  51. package/src/utils/imagesViewer.js +0 -8
  52. package/src/utils/request.js +0 -52
  53. package/src/utils/tools.js +0 -20
  54. package/vite.config.js +0 -33
  55. /package/{public → dist}/vite.svg +0 -0
@@ -5,9 +5,10 @@
5
5
  <link rel="icon" type="image/svg+xml" href="/vite.svg" />
6
6
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
7
7
  <title>Chat ui</title>
8
+ <script type="module" crossorigin src="/assets/index-Dkddqe_3.js"></script>
9
+ <link rel="stylesheet" crossorigin href="/assets/index-DQulfwi9.css">
8
10
  </head>
9
11
  <body>
10
12
  <div id="app"></div>
11
- <script type="module" src="/src/main.js"></script>
12
13
  </body>
13
14
  </html>
File without changes
package/package.json CHANGED
@@ -1,15 +1,30 @@
1
1
  {
2
2
  "name": "ai-chat-bot-interface",
3
3
  "private": false,
4
- "version": "1.7.7",
4
+ "version": "1.7.9",
5
5
  "type": "module",
6
- "main": "index.js",
6
+ "main": "./dist/ai-chat-bot-interface.umd.js",
7
+ "module": "./dist/ai-chat-bot-interface.es.js",
8
+ "types": "./dist/index.d.ts",
9
+ "exports": {
10
+ ".": {
11
+ "import": "./dist/ai-chat-bot-interface.es.js",
12
+ "require": "./dist/ai-chat-bot-interface.umd.js"
13
+ },
14
+ "./dist/style.css": "./dist/style.css"
15
+ },
16
+ "files": [
17
+ "dist",
18
+ "package.json",
19
+ "README.md"
20
+ ],
7
21
  "description": "A AI chat bot interface. (private)",
8
22
  "scripts": {
9
23
  "dev": "vite",
10
- "build": "vite build",
24
+ "build": "vite build && cpy src/index.d.ts dist/",
11
25
  "preview": "vite preview",
12
- "prettier:write": "prettier --write src"
26
+ "prettier:write": "prettier --write src",
27
+ "prepublishOnly": "npm run build"
13
28
  },
14
29
  "keywords": [
15
30
  "vue3",
@@ -20,14 +35,20 @@
20
35
  "markdown-it": "^14.1.0",
21
36
  "v-viewer": "^3.0.21",
22
37
  "vant": "^4.9.21",
23
- "vue": "^3.5.13"
38
+ "vue": "^3.5.13",
39
+ "vue-i18n": "^9.6.2"
24
40
  },
25
41
  "devDependencies": {
26
42
  "@vitejs/plugin-vue": "^5.2.1",
43
+ "cpy-cli": "^7.0.0",
27
44
  "less": "^4.2.2",
28
45
  "prettier": "^2.6.2",
29
46
  "vite": "^6.1.0"
30
47
  },
48
+ "engines": {
49
+ "node": ">=16.0.0",
50
+ "npm": ">=7.0.0"
51
+ },
31
52
  "author": "lin_26",
32
53
  "license": "MIT"
33
54
  }
package/.prettierignore DELETED
@@ -1,5 +0,0 @@
1
- node_modules
2
- dist
3
- .git
4
- .idea
5
- .vscode
package/.prettierrc.cjs DELETED
@@ -1,37 +0,0 @@
1
- module.exports = {
2
- // 一行最多 80 字符
3
- printWidth: 80,
4
- // 使用 4 个空格缩进
5
- tabWidth: 2,
6
- // 不使用 tab 缩进,而使用空格
7
- useTabs: false,
8
- // 行尾需要有分号
9
- semi: true,
10
- // 使用单引号代替双引号
11
- singleQuote: true,
12
- // 对象的 key 仅在必要时用引号
13
- quoteProps: 'as-needed',
14
- // jsx 不使用单引号,而使用双引号
15
- jsxSingleQuote: false,
16
- // 末尾使用逗号
17
- trailingComma: 'all',
18
- // 大括号内的首尾需要空格 { foo: bar }
19
- bracketSpacing: true,
20
- // jsx 标签的反尖括号需要换行
21
- jsxBracketSameLine: false,
22
- // 箭头函数,只有一个参数的时候,也需要括号
23
- arrowParens: 'always',
24
- // 每个文件格式化的范围是文件的全部内容
25
- rangeStart: 0,
26
- rangeEnd: Infinity,
27
- // 不需要写文件开头的 @prettier
28
- requirePragma: false,
29
- // 不需要自动在文件开头插入 @prettier
30
- insertPragma: false,
31
- // 使用默认的折行标准
32
- proseWrap: 'preserve',
33
- // 根据显示样式决定 html 要不要折行
34
- htmlWhitespaceSensitivity: 'css',
35
- // 换行符使用 lf
36
- endOfLine: 'auto'
37
- }
@@ -1,3 +0,0 @@
1
- {
2
- "recommendations": ["Vue.volar"]
3
- }
package/index.js DELETED
@@ -1,11 +0,0 @@
1
- import ChatUi from './src/ChatUi.vue';
2
-
3
- const install = (app) => {
4
- app.component('ChatUi', ChatUi);
5
- };
6
-
7
- export default {
8
- install,
9
- };
10
-
11
- export {ChatUi};
package/src/App.vue DELETED
@@ -1,39 +0,0 @@
1
- <script setup>
2
- import ChatUi from './ChatUi.vue';
3
- const handleLog = (log) => {
4
- console.log('== message log ==', log);
5
- };
6
- </script>
7
-
8
- <template>
9
- <div style="width: 100vw; height: 100vh">
10
- <chat-ui
11
- bot-id="7602196347097366547"
12
- token="sat_cSmj7ZyuePbkEpOKR7F259YuIfp2fjX9rJ3Om2O0gB9JzrGjAk8pSL269rbu8kzr"
13
- uid="0"
14
- :def-msg="{ placeholder: '发消息...' }"
15
- :show-header="false"
16
- :card-list="{ dishes: true, personalForm: true }"
17
- :tag-list="[
18
- {
19
- name: '用户信息',
20
- value: 'personalForm',
21
- type: 'simulate',
22
- msg: '请为我生成一份个性化的健康的食谱。',
23
- },
24
- {
25
- name: '人工客服',
26
- value: 'contactKF',
27
- type: 'simulate',
28
- msg: '联系人工客服',
29
- },
30
- ]"
31
- :need-log="true"
32
- post-token="CE73EA32DA06F05C3F522FE8E5E1420399E9C8433CD4932C"
33
- first-msg="减脂减重"
34
- content-tye="markdown"
35
- @log="handleLog"
36
- />
37
- </div>
38
- </template>
39
- <style></style>
package/src/ChatUi.less DELETED
@@ -1,301 +0,0 @@
1
- @import './assets/styles/public';
2
-
3
- .btn {
4
- background-color: #fff;
5
- padding: 8px;
6
- outline: none;
7
-
8
- &:hover {
9
- border-color: transparent;
10
- }
11
- }
12
- .board {
13
- &_name {
14
- font-size: 20px;
15
- font-weight: 500;
16
- margin: 10px 0;
17
- }
18
- &_desc {
19
- display: inline-block;
20
- font-size: 14px;
21
- text-align: left;
22
- padding: 12px 16px;
23
- background-color: #fff;
24
- border-radius: 8px;
25
- margin-bottom: 10px;
26
- }
27
- &_sug {
28
- cursor: pointer;
29
- font-size: 14px;
30
- margin-bottom: 8px;
31
- padding: 6px 16px;
32
- border-radius: 8px;
33
- border: 1px solid rgba(68, 83, 130, 0.25);
34
- &:hover {
35
- background-color: #eaeaea;
36
- }
37
- }
38
- }
39
- .cui {
40
- &_btn {
41
- cursor: pointer;
42
- width: 100%;
43
- height: 38px;
44
- line-height: 38px;
45
- box-sizing: border-box;
46
- background-color: #e6f5eb;
47
- border-radius: 19px;
48
- text-align: center;
49
- font-weight: 600;
50
- font-size: 13px;
51
- color: #039938;
52
- margin-top: 15px;
53
-
54
- &_2 {
55
- color: #fff;
56
- background-color: #039938;
57
- }
58
-
59
- &_group {
60
- display: grid;
61
- grid-template-columns: 1fr;
62
- grid-column-gap: 10px;
63
- margin-top: 20px;
64
- }
65
- }
66
- &_box {
67
- width: 100%;
68
- height: 100%;
69
- font-size: 14px;
70
- background-color: @bg-color;
71
- .btn {
72
- border: none;
73
- }
74
- }
75
-
76
- &_wrap {
77
- display: flex;
78
- flex-direction: column;
79
- justify-content: flex-start;
80
- align-items: center;
81
- width: 100%;
82
- max-width: @max-width;
83
- height: 100%;
84
- margin: 0 auto;
85
- background-color: @bg-color;
86
- }
87
-
88
- &_header {
89
- .flexrbc();
90
- box-sizing: border-box;
91
- padding: 0 16px;
92
- height: 56px;
93
- width: 100%;
94
- line-height: 56px;
95
- background-color: @bg-color;
96
- border-bottom: 1px solid #1d1c2314;
97
-
98
- .title {
99
- .flexrsc();
100
- gap: 10px;
101
- .logo {
102
- width: 32px;
103
- height: 32px;
104
- border-radius: 50%;
105
- margin-right: 16px;
106
- }
107
- .back {
108
- .flexrcc();
109
- cursor: pointer;
110
- font-size: 24px;
111
- width: 32px;
112
- height: 32px;
113
- gap: 15px;
114
- }
115
- .name {
116
- font-weight: 600;
117
- font-size: 14px;
118
- color: #000;
119
- line-height: 16px;
120
- &_box {
121
- }
122
- &_sub {
123
- font-weight: 400;
124
- font-size: 10px;
125
- color: #666;
126
- line-height: 12px;
127
- }
128
- }
129
- }
130
-
131
- .btn {
132
- .flexrcc();
133
- cursor: pointer;
134
- font-size: 32px;
135
- background-color: @bg-color;
136
-
137
- &_group {
138
- .flexrec();
139
- }
140
- }
141
- }
142
-
143
- &_content {
144
- flex: 1;
145
- width: 100%;
146
- padding: 0 20px;
147
- box-sizing: border-box;
148
- background-color: @bg-color;
149
- overflow-y: auto;
150
-
151
- .replay {
152
- margin: 20px 0;
153
-
154
- .name {
155
- .flexrsc();
156
- width: 100%;
157
- text-align: left;
158
- font-size: 10px;
159
- padding-bottom: 10px;
160
- gap: 5px;
161
- }
162
-
163
- .time {
164
- font-size: 12px;
165
- color: #999;
166
- }
167
-
168
- .avatar {
169
- width: 20px;
170
- height: 20px;
171
- border-radius: 10px;
172
- }
173
-
174
- .box {
175
- color: #000;
176
- font-size: 14px;
177
- line-height: 24px;
178
- font-weight: 400;
179
- text-align: left;
180
- background-color: @sys-bg;
181
- padding: 12px 16px;
182
- border-radius: @border-radius;
183
- border-top-left-radius: 2px;
184
-
185
- /deep/ .text {
186
- word-break: break-all;
187
- white-space: pre-wrap;
188
- margin: 0;
189
-
190
- a {
191
- color: #039938;
192
- }
193
- }
194
- .think {
195
- &_status {
196
- .flexrsc();
197
- gap: 5px;
198
- font-size: 14px;
199
- font-weight: 500;
200
- .icon {
201
- color: #999;
202
- font-size: 24px;
203
- }
204
- }
205
- &_text {
206
- word-break: break-all;
207
- white-space: pre-wrap;
208
- color: #666;
209
- font-size: 12px;
210
- font-weight: 400;
211
- line-height: 18px;
212
- padding-left: 8px;
213
- margin: 15px 0 20px;
214
- border-left: 4px solid #dadada;
215
- }
216
- }
217
- }
218
-
219
- .recm {
220
- cursor: pointer;
221
- padding: 6px 16px;
222
- border: 1px solid @border-color;
223
- border-radius: @border-radius;
224
- margin: 8px 0;
225
- }
226
-
227
- &_content {
228
- .flexcss();
229
- }
230
-
231
- &.role_user {
232
- .flexres();
233
- .name {
234
- .flexrec();
235
- text-align: right;
236
- }
237
- .box {
238
- border-radius: @border-radius;
239
- border-top-right-radius: 2px;
240
- background-color: @user-bg;
241
- }
242
- }
243
- }
244
- }
245
-
246
- &_operate {
247
- .flexrsc();
248
- width: 100%;
249
- padding: 10px 16px;
250
- box-sizing: border-box;
251
-
252
- .btn {
253
- font-size: 16px;
254
- }
255
-
256
- .input {
257
- flex: 1;
258
- height: 38px;
259
- line-height: 38px;
260
- border: none;
261
- font-size: 16px;
262
- background-color: @bg-color;
263
-
264
- &:focus-visible {
265
- outline: none;
266
- }
267
-
268
- &_group {
269
- .flexrec();
270
- flex: 1;
271
- margin-left: 10px;
272
- box-sizing: border-box;
273
- height: 48px;
274
- padding: 4px 16px;
275
- border-radius: 24px;
276
- border: 1px solid @border-color;
277
- }
278
- }
279
-
280
- .send {
281
- .flexrcc();
282
- width: 38px;
283
- }
284
- }
285
-
286
- &_footer {
287
- width: 100%;
288
- height: 32px;
289
- line-height: 32px;
290
- color: #1d1c2359;
291
- background-color: #2e2e380a;
292
- font-size: 12px;
293
- text-align: center;
294
- }
295
- }
296
- .loading_row {
297
- .flexrsc();
298
- gap: 5px;
299
- font-size: 10px;
300
- margin-top: 8px;
301
- }