@myun/gimi-chat 0.0.4 → 0.0.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/dist/components/ai-chat-dialogue/index.js +182 -136
- package/dist/components/ai-chat-dialogue/index.module.css +230 -0
- package/dist/components/ai-correction/index.js +38 -25
- package/dist/components/ai-loading/index.js +13 -9
- package/dist/components/ai-loading/index.module.css +11 -0
- package/dist/components/answer-item/index.js +136 -114
- package/dist/components/answer-item/index.module.css +266 -0
- package/dist/components/ask-card/index.js +43 -34
- package/dist/components/ask-card/index.module.css +122 -0
- package/dist/components/chat-input/index.js +136 -115
- package/dist/components/chat-input/index.module.css +42 -0
- package/dist/components/chat-voice/VoiceCommunication.js +23 -21
- package/dist/components/chat-voice/VoiceRecord.js +24 -21
- package/dist/components/conversation-delete/index.js +10 -8
- package/dist/components/dots-loading/index.js +11 -8
- package/dist/components/dots-loading/index.module.css +41 -0
- package/dist/components/empty/index.js +13 -8
- package/dist/components/empty/index.module.css +24 -0
- package/dist/components/excel-components/ExcelCard.js +7 -3
- package/dist/components/excel-components/ExcelExcuting.js +61 -44
- package/dist/components/excel-components/ExcelFailCard.js +16 -11
- package/dist/components/excel-components/ExcelSuccessCard.js +3 -2
- package/dist/components/excel-components/index.module.css +212 -0
- package/dist/components/excel-components/styles.module.css +178 -0
- package/dist/components/file-card/fileCardSidebar.js +24 -17
- package/dist/components/file-card/index.js +69 -50
- package/dist/components/file-card/index.module.css +139 -0
- package/dist/components/file-preview/index.js +39 -34
- package/dist/components/file-preview/index.module.css +83 -0
- package/dist/components/file-upload/index.js +10 -7
- package/dist/components/file-upload/uploadV1.js +33 -27
- package/dist/components/gimi-sidebar/index.js +21 -14
- package/dist/components/gimi-sidebar/index.module.css +118 -0
- package/dist/components/header/index.js +19 -12
- package/dist/components/header/index.module.css +19 -0
- package/dist/components/iconfont-com/index.js +2 -1
- package/dist/components/knowledge-trace/KnowledgeIconComponent.js +29 -23
- package/dist/components/knowledge-trace/classList.js +38 -29
- package/dist/components/knowledge-trace/documentList.js +37 -28
- package/dist/components/knowledge-trace/index.js +29 -22
- package/dist/components/knowledge-trace/index.module.css +254 -0
- package/dist/components/knowledge-trace/videoList.js +47 -37
- package/dist/components/lottie-img/index.js +10 -8
- package/dist/components/message-actions/CopyButton.js +25 -22
- package/dist/components/message-actions/LikeButton.js +25 -22
- package/dist/components/message-actions/RegenerateButton.js +21 -18
- package/dist/components/message-actions/UnLikeButton.js +25 -22
- package/dist/components/message-actions/VoicePlay.js +25 -22
- package/dist/components/message-list/index.js +86 -76
- package/dist/components/message-list/index.module.css +261 -0
- package/dist/components/no-microphone-root/index.js +40 -30
- package/dist/components/no-microphone-root/index.module.css +48 -0
- package/dist/components/preset-agent-content/index.js +21 -16
- package/dist/components/preset-agent-content/index.module.css +46 -0
- package/dist/components/quoted-content/index.module.css +80 -0
- package/dist/components/reasoning-content/index.js +56 -43
- package/dist/components/reasoning-content/index.module.css +169 -0
- package/dist/components/reference-content/index.js +73 -64
- package/dist/components/reference-content/index.module.css +84 -0
- package/dist/components/templates/CommonChat.js +79 -65
- package/dist/components/templates/GimiChatComponent.js +13 -6
- package/dist/components/templates/demo/demo.js +104 -103
- package/dist/components/templates/index.module.css +109 -0
- package/dist/components/upload-list/index.js +57 -42
- package/dist/components/upload-list/index.module.css +119 -0
- package/dist/components/voice-bars/index.js +22 -19
- package/dist/components/voice-check-dialog/index.js +25 -18
- package/dist/components/voice-check-dialog/{index.module.scss → index.module.css} +2 -2
- package/dist/components/voice-recording/index.js +58 -43
- package/dist/components/voice-recording/index.module.css +41 -0
- package/dist/components/work-flow-content/demo.js +2 -1
- package/dist/components/work-flow-content/index.js +13 -10
- package/dist/components/work-flow-content/index.module.css +24 -0
- package/package.json +7 -6
- package/dist/components/ai-chat-dialogue/index.module.scss +0 -272
- package/dist/components/ai-loading/index.module.scss +0 -11
- package/dist/components/answer-item/index.module.scss +0 -295
- package/dist/components/ask-card/index.module.scss +0 -125
- package/dist/components/chat-input/index.module.scss +0 -44
- package/dist/components/dots-loading/index.module.scss +0 -45
- package/dist/components/empty/index.module.scss +0 -27
- package/dist/components/excel-components/index.module.scss +0 -210
- package/dist/components/excel-components/styles.module.scss +0 -186
- package/dist/components/file-card/index.module.scss +0 -139
- package/dist/components/file-preview/index.module.scss +0 -120
- package/dist/components/gimi-sidebar/index.module.scss +0 -136
- package/dist/components/header/index.module.scss +0 -26
- package/dist/components/knowledge-trace/index.module.scss +0 -262
- package/dist/components/message-list/index.module.scss +0 -304
- package/dist/components/no-microphone-root/index.module.scss +0 -42
- package/dist/components/preset-agent-content/index.module.scss +0 -48
- package/dist/components/quoted-content/index.module.scss +0 -76
- package/dist/components/reasoning-content/index.module.scss +0 -164
- package/dist/components/reference-content/index.module.scss +0 -73
- package/dist/components/templates/index.module.scss +0 -119
- package/dist/components/upload-list/index.module.scss +0 -119
- package/dist/components/voice-recording/index.module.scss +0 -41
- package/dist/components/work-flow-content/index.module.scss +0 -23
|
@@ -0,0 +1,261 @@
|
|
|
1
|
+
@charset "UTF-8";
|
|
2
|
+
.main {
|
|
3
|
+
position: relative;
|
|
4
|
+
width: 100%;
|
|
5
|
+
transition: all 0.3s ease;
|
|
6
|
+
flex: 1;
|
|
7
|
+
padding: 20px 0 0;
|
|
8
|
+
}
|
|
9
|
+
.main.translate {
|
|
10
|
+
transform: translateX(-320px);
|
|
11
|
+
}
|
|
12
|
+
.main .container {
|
|
13
|
+
width: 100%;
|
|
14
|
+
max-width: var(--container-max);
|
|
15
|
+
margin: 0 auto;
|
|
16
|
+
box-sizing: border-box;
|
|
17
|
+
padding: 0 10px;
|
|
18
|
+
}
|
|
19
|
+
.main .small_container {
|
|
20
|
+
width: min(100%, var(--container-max));
|
|
21
|
+
max-width: var(--container-max);
|
|
22
|
+
margin: 0 auto;
|
|
23
|
+
box-sizing: border-box;
|
|
24
|
+
padding: 0 16px;
|
|
25
|
+
}
|
|
26
|
+
.main .textWrap {
|
|
27
|
+
padding-bottom: 40px;
|
|
28
|
+
}
|
|
29
|
+
.main .textWrap .textItem {
|
|
30
|
+
width: 100%;
|
|
31
|
+
position: relative;
|
|
32
|
+
}
|
|
33
|
+
.main .textWrap .textItem.question {
|
|
34
|
+
width: 100%;
|
|
35
|
+
display: flex;
|
|
36
|
+
flex-direction: column;
|
|
37
|
+
margin-top: 22px;
|
|
38
|
+
}
|
|
39
|
+
.main .textWrap .textItem.question .title {
|
|
40
|
+
font-size: 15px;
|
|
41
|
+
line-height: 1.8;
|
|
42
|
+
display: inline-block;
|
|
43
|
+
max-width: 680px;
|
|
44
|
+
padding: 12px 16px;
|
|
45
|
+
background: #ebf2ff;
|
|
46
|
+
border-radius: 16px;
|
|
47
|
+
white-space: pre-wrap;
|
|
48
|
+
word-break: break-word;
|
|
49
|
+
align-self: flex-end;
|
|
50
|
+
overflow-x: auto;
|
|
51
|
+
}
|
|
52
|
+
.main .textWrap .textItem.question .listBox {
|
|
53
|
+
display: flex;
|
|
54
|
+
flex-direction: row-reverse;
|
|
55
|
+
margin-top: 16px;
|
|
56
|
+
}
|
|
57
|
+
.main .textWrap .textItem.question .opera {
|
|
58
|
+
left: unset;
|
|
59
|
+
right: 0;
|
|
60
|
+
}
|
|
61
|
+
.main .textWrap .textItem.question:first-child {
|
|
62
|
+
margin-top: 0;
|
|
63
|
+
}
|
|
64
|
+
.main .textWrap .textItem:last-child {
|
|
65
|
+
margin-bottom: 0;
|
|
66
|
+
}
|
|
67
|
+
.main .textWrap .textItem .title {
|
|
68
|
+
width: 100%;
|
|
69
|
+
display: flex;
|
|
70
|
+
align-items: center;
|
|
71
|
+
position: relative;
|
|
72
|
+
font-size: 16px;
|
|
73
|
+
color: #000000;
|
|
74
|
+
line-height: 24px;
|
|
75
|
+
width: fit-content;
|
|
76
|
+
text-align: left;
|
|
77
|
+
word-break: break-all;
|
|
78
|
+
/* 强制换行 */
|
|
79
|
+
overflow-wrap: break-word;
|
|
80
|
+
/* 在适当位置换行 */
|
|
81
|
+
}
|
|
82
|
+
.main .textWrap .textItem .title .qusetionOpera {
|
|
83
|
+
position: absolute;
|
|
84
|
+
top: 50%;
|
|
85
|
+
left: -30px;
|
|
86
|
+
transform: translateY(-50%);
|
|
87
|
+
}
|
|
88
|
+
.main .textWrap .textItem .title .answer {
|
|
89
|
+
width: 100%;
|
|
90
|
+
display: flex;
|
|
91
|
+
flex-direction: column;
|
|
92
|
+
justify-content: center;
|
|
93
|
+
margin-bottom: 20px;
|
|
94
|
+
}
|
|
95
|
+
.main .textWrap .textItem .title .answer .relevance {
|
|
96
|
+
width: fit-content;
|
|
97
|
+
height: 40px;
|
|
98
|
+
background: #ffffff;
|
|
99
|
+
border-radius: 16px;
|
|
100
|
+
border: 1px solid #cfd7e6;
|
|
101
|
+
display: flex;
|
|
102
|
+
justify-content: center;
|
|
103
|
+
align-items: center;
|
|
104
|
+
margin-bottom: 14px;
|
|
105
|
+
}
|
|
106
|
+
.main .textWrap .textItem .title .answer .relevance .icon {
|
|
107
|
+
display: flex;
|
|
108
|
+
align-items: center;
|
|
109
|
+
justify-self: center;
|
|
110
|
+
margin-right: 12px;
|
|
111
|
+
}
|
|
112
|
+
.main .textWrap .textItem .title .answer .relevance .search_icon {
|
|
113
|
+
display: flex;
|
|
114
|
+
align-items: center;
|
|
115
|
+
justify-self: center;
|
|
116
|
+
margin-left: 16px;
|
|
117
|
+
}
|
|
118
|
+
.main .textWrap .textItem .title .answer .relevance span {
|
|
119
|
+
height: 20px;
|
|
120
|
+
font-family: PingFangSC, PingFang SC;
|
|
121
|
+
font-weight: 400;
|
|
122
|
+
font-size: 14px;
|
|
123
|
+
color: #2e394c;
|
|
124
|
+
line-height: 20px;
|
|
125
|
+
text-align: left;
|
|
126
|
+
font-style: normal;
|
|
127
|
+
margin: 0 2px;
|
|
128
|
+
}
|
|
129
|
+
.main .textWrap .textItem .opera {
|
|
130
|
+
width: 100%;
|
|
131
|
+
height: 20px;
|
|
132
|
+
margin-top: 12px;
|
|
133
|
+
display: flex;
|
|
134
|
+
align-items: center;
|
|
135
|
+
}
|
|
136
|
+
.main .textWrap .textItem .opera .opera_item {
|
|
137
|
+
display: flex;
|
|
138
|
+
align-items: center;
|
|
139
|
+
}
|
|
140
|
+
.main .textWrap .textItem .opera .opera_item .unlove {
|
|
141
|
+
margin-left: 18px;
|
|
142
|
+
display: flex;
|
|
143
|
+
align-items: center;
|
|
144
|
+
cursor: pointer;
|
|
145
|
+
}
|
|
146
|
+
.main .textWrap .textItem .operaicon {
|
|
147
|
+
height: 20px;
|
|
148
|
+
margin-top: 12px;
|
|
149
|
+
text-align: end;
|
|
150
|
+
}
|
|
151
|
+
.main .textWrap .textItem .chatline {
|
|
152
|
+
margin: 40px 0;
|
|
153
|
+
width: 100%;
|
|
154
|
+
height: 1px;
|
|
155
|
+
background: #dfe8f7;
|
|
156
|
+
}
|
|
157
|
+
.main .textWrap .textItem .course_recommend .course_recommend_header {
|
|
158
|
+
width: 100%;
|
|
159
|
+
height: 28px;
|
|
160
|
+
display: flex;
|
|
161
|
+
align-items: center;
|
|
162
|
+
justify-content: space-between;
|
|
163
|
+
}
|
|
164
|
+
.main .textWrap .textItem .course_recommend .course_recommend_header .course_recommend_header_title {
|
|
165
|
+
font-family: PingFangSC, PingFang SC;
|
|
166
|
+
font-weight: 600;
|
|
167
|
+
font-size: 18px;
|
|
168
|
+
color: #2e394c;
|
|
169
|
+
line-height: 28px;
|
|
170
|
+
text-align: left;
|
|
171
|
+
font-style: normal;
|
|
172
|
+
}
|
|
173
|
+
.main .textWrap .textItem .course_recommend .course_recommend_header .course_recommend_header_more {
|
|
174
|
+
display: flex;
|
|
175
|
+
align-items: center;
|
|
176
|
+
}
|
|
177
|
+
.main .textWrap .textItem .course_recommend .course_recommend_header .course_recommend_header_more .all {
|
|
178
|
+
width: 56px;
|
|
179
|
+
height: 20px;
|
|
180
|
+
font-family: PingFangSC, PingFang SC;
|
|
181
|
+
font-weight: 500;
|
|
182
|
+
font-size: 14px;
|
|
183
|
+
color: #2e394c;
|
|
184
|
+
line-height: 20px;
|
|
185
|
+
text-align: left;
|
|
186
|
+
font-style: normal;
|
|
187
|
+
}
|
|
188
|
+
.main .textWrap .textItem .course_recommend .course_recommend_list {
|
|
189
|
+
margin-top: 12px;
|
|
190
|
+
margin-bottom: 30px;
|
|
191
|
+
display: flex;
|
|
192
|
+
flex-wrap: wrap;
|
|
193
|
+
gap: 20px;
|
|
194
|
+
}
|
|
195
|
+
.main .textWrap .textItem .course_recommend .course_recommend_list .courseItem {
|
|
196
|
+
width: 360px;
|
|
197
|
+
height: 68px;
|
|
198
|
+
display: flex;
|
|
199
|
+
align-items: center;
|
|
200
|
+
justify-content: space-between;
|
|
201
|
+
gap: 20;
|
|
202
|
+
}
|
|
203
|
+
.main .textWrap .textItem .course_recommend .course_recommend_list .courseItem .cover {
|
|
204
|
+
border-radius: 4px;
|
|
205
|
+
overflow: hidden;
|
|
206
|
+
width: 120px;
|
|
207
|
+
height: 68px;
|
|
208
|
+
border-radius: 4px;
|
|
209
|
+
}
|
|
210
|
+
.main .textWrap .textItem .course_recommend .course_recommend_list .courseItem .cover img {
|
|
211
|
+
width: 100%;
|
|
212
|
+
height: 100%;
|
|
213
|
+
object-fit: cover;
|
|
214
|
+
}
|
|
215
|
+
.main .textWrap .textItem .course_recommend .course_recommend_list .courseItem .courseTitle {
|
|
216
|
+
width: 228px;
|
|
217
|
+
height: 68px;
|
|
218
|
+
font-family: PingFangSC, PingFang SC;
|
|
219
|
+
font-weight: 400;
|
|
220
|
+
font-size: 14px;
|
|
221
|
+
color: #2e394c;
|
|
222
|
+
line-height: 20px;
|
|
223
|
+
text-align: left;
|
|
224
|
+
font-style: normal;
|
|
225
|
+
display: -webkit-box;
|
|
226
|
+
-webkit-line-clamp: 3;
|
|
227
|
+
/* 限制行数 */
|
|
228
|
+
-webkit-box-orient: vertical;
|
|
229
|
+
overflow: hidden;
|
|
230
|
+
text-overflow: ellipsis;
|
|
231
|
+
}
|
|
232
|
+
.main .textWrap .answerLoading {
|
|
233
|
+
width: 40px;
|
|
234
|
+
margin-top: 20px;
|
|
235
|
+
}
|
|
236
|
+
.main .emptyWrap {
|
|
237
|
+
text-align: center;
|
|
238
|
+
height: 100%;
|
|
239
|
+
display: flex;
|
|
240
|
+
flex-direction: column;
|
|
241
|
+
justify-content: center;
|
|
242
|
+
}
|
|
243
|
+
.main .emptyWrap .title {
|
|
244
|
+
font-weight: 600;
|
|
245
|
+
font-size: 20px;
|
|
246
|
+
color: #2e394c;
|
|
247
|
+
line-height: 28px;
|
|
248
|
+
margin-bottom: 12px;
|
|
249
|
+
}
|
|
250
|
+
.main .emptyWrap .tips {
|
|
251
|
+
font-size: 16px;
|
|
252
|
+
color: #54698c;
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
.copyBtn {
|
|
256
|
+
width: fit-content;
|
|
257
|
+
display: flex;
|
|
258
|
+
gap: 10px;
|
|
259
|
+
margin-left: auto;
|
|
260
|
+
margin-top: 10px;
|
|
261
|
+
}
|
|
@@ -1,36 +1,46 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { Button } from '@douyinfe/semi-ui';
|
|
3
|
-
import styles from "./index.module.
|
|
3
|
+
import styles from "./index.module.css";
|
|
4
4
|
import { IconClose, IconMicrophoneOffStroked } from '@douyinfe/semi-icons';
|
|
5
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
6
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
5
7
|
export default function NoMicrophoneModalContent(_ref) {
|
|
6
8
|
var onOk = _ref.onOk;
|
|
7
|
-
return /*#__PURE__*/
|
|
8
|
-
className: styles.root
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
9
|
+
return /*#__PURE__*/_jsxs("div", {
|
|
10
|
+
className: styles.root,
|
|
11
|
+
children: [/*#__PURE__*/_jsxs("div", {
|
|
12
|
+
className: styles.title,
|
|
13
|
+
children: [/*#__PURE__*/_jsx("span", {
|
|
14
|
+
children: "\u5C1A\u672A\u83B7\u5F97\u9EA6\u514B\u98CE\u6743\u9650"
|
|
15
|
+
}), /*#__PURE__*/_jsx(Button, {
|
|
16
|
+
theme: "borderless",
|
|
17
|
+
size: "small",
|
|
18
|
+
icon: /*#__PURE__*/_jsx(IconClose, {}),
|
|
19
|
+
onClick: onOk
|
|
20
|
+
})]
|
|
21
|
+
}), /*#__PURE__*/_jsx("div", {
|
|
22
|
+
className: styles.desc,
|
|
23
|
+
children: "\u8BED\u97F3\u901A\u8BDD\u9700\u8981\u5F00\u542F\u6D4F\u89C8\u5668\u7684\u9EA6\u514B\u98CE\u6743\u9650\uFF0C\u8BF7\u70B9\u51FB\u524D\u5F80\u8BBE\u7F6E\u8FDB\u884C\u5F00\u542F"
|
|
24
|
+
}), /*#__PURE__*/_jsx("div", {
|
|
25
|
+
className: styles.imgArea,
|
|
26
|
+
children: /*#__PURE__*/_jsx(IconMicrophoneOffStroked, {
|
|
27
|
+
style: {
|
|
28
|
+
fontSize: 40,
|
|
29
|
+
color: '#1478ddff'
|
|
30
|
+
}
|
|
31
|
+
})
|
|
32
|
+
}), /*#__PURE__*/_jsx("div", {
|
|
33
|
+
className: styles.footer,
|
|
34
|
+
children: /*#__PURE__*/_jsx(Button, {
|
|
35
|
+
type: "primary",
|
|
36
|
+
size: "small",
|
|
37
|
+
style: {
|
|
38
|
+
borderRadius: '24px',
|
|
39
|
+
padding: '10px'
|
|
40
|
+
},
|
|
41
|
+
onClick: onOk,
|
|
42
|
+
children: "\u6211\u77E5\u9053\u4E86"
|
|
43
|
+
})
|
|
44
|
+
})]
|
|
45
|
+
});
|
|
36
46
|
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
.root {
|
|
2
|
+
width: 240px;
|
|
3
|
+
display: flex;
|
|
4
|
+
flex-direction: column;
|
|
5
|
+
gap: 12px;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
.title {
|
|
9
|
+
font-size: 15px;
|
|
10
|
+
font-weight: 600;
|
|
11
|
+
color: #1f2d3d;
|
|
12
|
+
display: flex;
|
|
13
|
+
align-items: center;
|
|
14
|
+
justify-content: space-between;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.desc {
|
|
18
|
+
width: 240px;
|
|
19
|
+
font-size: 12px;
|
|
20
|
+
color: rgba(31, 45, 61, 0.55);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.imgArea {
|
|
24
|
+
height: 100px;
|
|
25
|
+
border-radius: 12px;
|
|
26
|
+
background: linear-gradient(90deg, #e9f0ff 0%, #d7f1ff 100%);
|
|
27
|
+
display: flex;
|
|
28
|
+
align-items: center;
|
|
29
|
+
justify-content: center;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.micIcon {
|
|
33
|
+
width: 56px;
|
|
34
|
+
height: 56px;
|
|
35
|
+
display: block;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.footer {
|
|
39
|
+
display: flex;
|
|
40
|
+
width: 100%;
|
|
41
|
+
justify-content: flex-end;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.okBtn {
|
|
45
|
+
height: 32px;
|
|
46
|
+
padding: 0 18px;
|
|
47
|
+
border-radius: 16px;
|
|
48
|
+
}
|
|
@@ -1,24 +1,29 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import styles from "./index.module.
|
|
2
|
+
import styles from "./index.module.css";
|
|
3
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
4
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
5
|
var PresetAgentContent = function PresetAgentContent(_ref) {
|
|
4
6
|
var prologue = _ref.prologue,
|
|
5
7
|
questionList = _ref.questionList,
|
|
6
8
|
setInputValue = _ref.setInputValue;
|
|
7
9
|
if (!questionList || questionList.length === 0) return null;
|
|
8
|
-
return /*#__PURE__*/
|
|
9
|
-
className: styles.container
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
10
|
+
return /*#__PURE__*/_jsxs("div", {
|
|
11
|
+
className: styles.container,
|
|
12
|
+
children: [prologue && /*#__PURE__*/_jsx("div", {
|
|
13
|
+
className: styles.prologue,
|
|
14
|
+
children: prologue
|
|
15
|
+
}), /*#__PURE__*/_jsx("div", {
|
|
16
|
+
className: styles.quickInputList,
|
|
17
|
+
children: questionList.map(function (item, index) {
|
|
18
|
+
return /*#__PURE__*/_jsx("div", {
|
|
19
|
+
className: styles.quickInputItem,
|
|
20
|
+
onClick: function onClick() {
|
|
21
|
+
return setInputValue(item.question);
|
|
22
|
+
},
|
|
23
|
+
children: item.question
|
|
24
|
+
}, index);
|
|
25
|
+
})
|
|
26
|
+
})]
|
|
27
|
+
});
|
|
23
28
|
};
|
|
24
29
|
export default PresetAgentContent;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
@charset "UTF-8";
|
|
2
|
+
.container {
|
|
3
|
+
display: flex;
|
|
4
|
+
flex-direction: column;
|
|
5
|
+
align-items: start;
|
|
6
|
+
padding: 14px 0px 20px 16px;
|
|
7
|
+
width: 100%;
|
|
8
|
+
}
|
|
9
|
+
.container .prologue {
|
|
10
|
+
font-family: PingFang SC;
|
|
11
|
+
font-weight: 400;
|
|
12
|
+
font-size: 16px;
|
|
13
|
+
line-height: 28px;
|
|
14
|
+
letter-spacing: 0px;
|
|
15
|
+
color: rgb(46, 57, 76);
|
|
16
|
+
}
|
|
17
|
+
.container .quickInputList {
|
|
18
|
+
width: 314px;
|
|
19
|
+
display: flex;
|
|
20
|
+
flex-direction: column;
|
|
21
|
+
gap: 10px;
|
|
22
|
+
flex-wrap: wrap;
|
|
23
|
+
margin-top: 10px;
|
|
24
|
+
}
|
|
25
|
+
.container .quickInputList .quickInputItem {
|
|
26
|
+
width: fit-content;
|
|
27
|
+
max-width: 314px;
|
|
28
|
+
padding: 5px 10px;
|
|
29
|
+
font-family: PingFangSC;
|
|
30
|
+
font-weight: 400;
|
|
31
|
+
font-size: 14px;
|
|
32
|
+
color: rgb(46, 57, 76);
|
|
33
|
+
line-height: 18px;
|
|
34
|
+
text-align: left;
|
|
35
|
+
font-style: normal;
|
|
36
|
+
border-radius: 8px;
|
|
37
|
+
border: 1px solid rgb(217, 220, 229);
|
|
38
|
+
flex-shrink: 0;
|
|
39
|
+
white-space: nowrap;
|
|
40
|
+
/* 禁止换行 */
|
|
41
|
+
overflow: hidden;
|
|
42
|
+
/* 隐藏溢出内容 */
|
|
43
|
+
text-overflow: ellipsis;
|
|
44
|
+
/* 显示省略号 */
|
|
45
|
+
cursor: pointer;
|
|
46
|
+
}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
.quotedContent {
|
|
2
|
+
flex: 1;
|
|
3
|
+
padding-top: 5px;
|
|
4
|
+
display: flex;
|
|
5
|
+
flex-direction: column;
|
|
6
|
+
height: 100%;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.searchInput {
|
|
10
|
+
line-height: 29px;
|
|
11
|
+
font-size: 12px;
|
|
12
|
+
padding: 0 10px;
|
|
13
|
+
border-radius: 8px;
|
|
14
|
+
}
|
|
15
|
+
.searchInput input::placeholder {
|
|
16
|
+
color: #7d91b3;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.content {
|
|
20
|
+
padding-top: 10px;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.newtab {
|
|
24
|
+
padding-bottom: 10px;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.tabItem {
|
|
28
|
+
font-size: 14px;
|
|
29
|
+
padding: 5px 10px;
|
|
30
|
+
margin: 0 8px;
|
|
31
|
+
border-radius: 8px;
|
|
32
|
+
cursor: pointer;
|
|
33
|
+
}
|
|
34
|
+
.tabItem:hover {
|
|
35
|
+
background-color: #f7f7fc;
|
|
36
|
+
color: #4086ff;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.active {
|
|
40
|
+
background-color: #f7f7fc;
|
|
41
|
+
color: #4086ff;
|
|
42
|
+
font-weight: 600;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.tabContent {
|
|
46
|
+
overflow: auto;
|
|
47
|
+
height: 200px;
|
|
48
|
+
}
|
|
49
|
+
.tabContent .table :global(.ant-table-content) {
|
|
50
|
+
font-size: 12px;
|
|
51
|
+
}
|
|
52
|
+
.tabContent .table :global(.ant-table-tbody > tr > td) {
|
|
53
|
+
border: none !important;
|
|
54
|
+
}
|
|
55
|
+
.tabContent .table .listItem {
|
|
56
|
+
display: flex;
|
|
57
|
+
align-items: center;
|
|
58
|
+
cursor: pointer;
|
|
59
|
+
}
|
|
60
|
+
.tabContent .table .listItem .img {
|
|
61
|
+
width: 16px;
|
|
62
|
+
margin-right: 5px;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.tabContent::-webkit-scrollbar {
|
|
66
|
+
width: 6px;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
.tabContent::-webkit-scrollbar-track {
|
|
70
|
+
background: #f1f1f1;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
.tabContent::-webkit-scrollbar-thumb {
|
|
74
|
+
background: #c1c1c1;
|
|
75
|
+
border-radius: 3px;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
.tabContent::-webkit-scrollbar-thumb:hover {
|
|
79
|
+
background: #a8a8a8;
|
|
80
|
+
}
|
|
@@ -14,7 +14,7 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
|
14
14
|
import React, { useEffect, useRef, useCallback } from 'react';
|
|
15
15
|
import { MMarkdown } from '@myun/gimi-design';
|
|
16
16
|
// import SearchResult from '../search-result';
|
|
17
|
-
import styles from "./index.module.
|
|
17
|
+
import styles from "./index.module.css";
|
|
18
18
|
import { processString } from "../../utils/tools";
|
|
19
19
|
import LottieImg from "../../components/lottie-img";
|
|
20
20
|
import useScroll from "../../hooks/useScroll";
|
|
@@ -22,6 +22,8 @@ import KnowledgeIconGroup from "../knowledge-trace/KnowledgeIconComponent";
|
|
|
22
22
|
import { IconChevronUp, IconChevronDown } from '@douyinfe/semi-icons';
|
|
23
23
|
import { useAppSelector, useAppDispatch } from "../../store/hooks";
|
|
24
24
|
import { setMessageList } from "../../store/slices/gimiMenuSlice";
|
|
25
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
26
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
25
27
|
var ResoningContent = function ResoningContent(_ref) {
|
|
26
28
|
var item = _ref.item;
|
|
27
29
|
var containerRef = useRef(null);
|
|
@@ -70,47 +72,58 @@ var ResoningContent = function ResoningContent(_ref) {
|
|
|
70
72
|
}
|
|
71
73
|
};
|
|
72
74
|
// item.expand ? styles.expand : ''
|
|
73
|
-
return /*#__PURE__*/
|
|
74
|
-
className: styles.container
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
75
|
+
return /*#__PURE__*/_jsxs("div", {
|
|
76
|
+
className: styles.container,
|
|
77
|
+
children: [/*#__PURE__*/_jsxs("div", {
|
|
78
|
+
className: styles.header,
|
|
79
|
+
onClick: handleClickExpand,
|
|
80
|
+
children: [/*#__PURE__*/_jsxs("div", {
|
|
81
|
+
className: styles.title,
|
|
82
|
+
children: ["GIMI", renderStatusText()]
|
|
83
|
+
}), item.expand ? /*#__PURE__*/_jsx(IconChevronUp, {}) : /*#__PURE__*/_jsx(IconChevronDown, {})]
|
|
84
|
+
}), item.expand ? /*#__PURE__*/_jsxs("div", {
|
|
85
|
+
className: styles.deeping,
|
|
86
|
+
ref: containerRef,
|
|
87
|
+
style: item.reasoningStatus === 1 ? {
|
|
88
|
+
maxHeight: 240
|
|
89
|
+
} : {},
|
|
90
|
+
children: [/*#__PURE__*/_jsxs("div", {
|
|
91
|
+
className: styles.thinkQuery,
|
|
92
|
+
children: [item.query && /*#__PURE__*/_jsx("div", {
|
|
93
|
+
className: styles.label,
|
|
94
|
+
style: {
|
|
95
|
+
marginTop: 0
|
|
96
|
+
},
|
|
97
|
+
children: "\u5F00\u59CB\u5206\u6790\u95EE\u9898"
|
|
98
|
+
}), item.query && /*#__PURE__*/_jsx("div", {
|
|
99
|
+
className: styles.queryTitle,
|
|
100
|
+
children: item.query
|
|
101
|
+
})]
|
|
102
|
+
}), /*#__PURE__*/_jsxs("div", {
|
|
103
|
+
className: styles.deepThink,
|
|
104
|
+
children: [item.query && /*#__PURE__*/_jsx("div", {
|
|
105
|
+
className: styles.label,
|
|
106
|
+
children: "\u8FDB\u884C\u6DF1\u5EA6\u601D\u8003"
|
|
107
|
+
}), item.reasoningContent && /*#__PURE__*/_jsx("div", {
|
|
108
|
+
className: styles.deepThink_content,
|
|
109
|
+
children: /*#__PURE__*/_jsx(MMarkdown, {
|
|
110
|
+
content: processString(item.reasoningContent),
|
|
111
|
+
isDeep: true,
|
|
112
|
+
customRender: [{
|
|
113
|
+
type: 'knowledge',
|
|
114
|
+
component: KnowledgeIconGroup
|
|
115
|
+
}],
|
|
116
|
+
showLoading: item.reasoningLoading
|
|
117
|
+
})
|
|
118
|
+
})]
|
|
119
|
+
}), item.msgLoading && /*#__PURE__*/_jsx("div", {
|
|
120
|
+
className: styles.answerLoading,
|
|
121
|
+
children: /*#__PURE__*/_jsx(LottieImg, {
|
|
122
|
+
name: "aiLoading",
|
|
123
|
+
size: [20, 40]
|
|
124
|
+
})
|
|
125
|
+
})]
|
|
126
|
+
}) : null]
|
|
127
|
+
});
|
|
115
128
|
};
|
|
116
129
|
export default ResoningContent;
|