@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,169 @@
|
|
|
1
|
+
@charset "UTF-8";
|
|
2
|
+
.container {
|
|
3
|
+
max-width: clamp(380px, 60vw, 800px);
|
|
4
|
+
padding: 0 20px;
|
|
5
|
+
border-left: 2px solid #d9dce5;
|
|
6
|
+
margin-bottom: 16px;
|
|
7
|
+
user-select: none;
|
|
8
|
+
}
|
|
9
|
+
.container .header {
|
|
10
|
+
width: 100%;
|
|
11
|
+
height: 22px;
|
|
12
|
+
display: flex;
|
|
13
|
+
align-items: center;
|
|
14
|
+
cursor: pointer;
|
|
15
|
+
}
|
|
16
|
+
.container .header .title {
|
|
17
|
+
height: 16px;
|
|
18
|
+
font-family: PingFangSC, PingFang SC;
|
|
19
|
+
font-weight: 600;
|
|
20
|
+
font-size: 16px;
|
|
21
|
+
color: #2e394c;
|
|
22
|
+
line-height: 16px;
|
|
23
|
+
text-align: left;
|
|
24
|
+
font-style: normal;
|
|
25
|
+
display: flex;
|
|
26
|
+
margin-right: 4px;
|
|
27
|
+
}
|
|
28
|
+
.container .thinkQuery {
|
|
29
|
+
width: 100%;
|
|
30
|
+
}
|
|
31
|
+
.container .thinkQuery .queryTitle {
|
|
32
|
+
margin-top: 8px;
|
|
33
|
+
min-height: 26px;
|
|
34
|
+
font-family: PingFangSC, PingFang SC;
|
|
35
|
+
font-weight: 400;
|
|
36
|
+
font-size: 14px;
|
|
37
|
+
color: #7d91b3;
|
|
38
|
+
line-height: 26px;
|
|
39
|
+
text-align: left;
|
|
40
|
+
font-style: normal;
|
|
41
|
+
}
|
|
42
|
+
.container .deepThink {
|
|
43
|
+
width: 100%;
|
|
44
|
+
}
|
|
45
|
+
.container .deepThink .deepThink_content {
|
|
46
|
+
margin-top: 4px;
|
|
47
|
+
}
|
|
48
|
+
.container .deeping {
|
|
49
|
+
margin-top: 8px;
|
|
50
|
+
overflow-y: scroll;
|
|
51
|
+
}
|
|
52
|
+
.container .deepThinkPack {
|
|
53
|
+
width: 100%;
|
|
54
|
+
position: relative;
|
|
55
|
+
}
|
|
56
|
+
.container .deepThinkPack .deepThink_content_pack {
|
|
57
|
+
margin-top: 13px;
|
|
58
|
+
display: flex;
|
|
59
|
+
}
|
|
60
|
+
.container .deepThinkPack .text_shanow_up {
|
|
61
|
+
z-index: 2;
|
|
62
|
+
pointer-events: none;
|
|
63
|
+
background: #ffffff;
|
|
64
|
+
filter: blur(10px);
|
|
65
|
+
width: 97%;
|
|
66
|
+
height: 25px;
|
|
67
|
+
position: absolute;
|
|
68
|
+
top: -6px;
|
|
69
|
+
}
|
|
70
|
+
.container .deepThinkPack .text_shanow_down {
|
|
71
|
+
z-index: 2;
|
|
72
|
+
pointer-events: none;
|
|
73
|
+
background: #ffffff;
|
|
74
|
+
filter: blur(10px);
|
|
75
|
+
width: 97%;
|
|
76
|
+
height: 25px;
|
|
77
|
+
position: absolute;
|
|
78
|
+
bottom: 1px;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
.deeping::-webkit-scrollbar-track {
|
|
82
|
+
background-color: transparent;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
.deeping::-webkit-scrollbar {
|
|
86
|
+
width: 6px;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
.deeping::-webkit-scrollbar-thumb {
|
|
90
|
+
border-radius: 8px;
|
|
91
|
+
background: #d9d9d9;
|
|
92
|
+
opacity: 0;
|
|
93
|
+
display: none;
|
|
94
|
+
transition: opacity 0.3s ease;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
.deeping::-webkit-scrollbar-thumb:hover {
|
|
98
|
+
border-radius: 8px;
|
|
99
|
+
background: rgba(0, 0, 0, 0.15);
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
.expand {
|
|
103
|
+
padding-bottom: 20px;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
.label {
|
|
107
|
+
margin-top: 20px;
|
|
108
|
+
height: 26px;
|
|
109
|
+
font-family: PingFangSC, PingFang SC;
|
|
110
|
+
font-weight: 400;
|
|
111
|
+
font-size: 14px;
|
|
112
|
+
color: #2e394c;
|
|
113
|
+
line-height: 26px;
|
|
114
|
+
text-align: left;
|
|
115
|
+
font-style: normal;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
.icon {
|
|
119
|
+
display: flex;
|
|
120
|
+
align-items: center;
|
|
121
|
+
justify-self: center;
|
|
122
|
+
margin-right: 4px;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
.answerLoading {
|
|
126
|
+
width: 40px;
|
|
127
|
+
margin-left: -10px;
|
|
128
|
+
margin-bottom: 20px;
|
|
129
|
+
margin: 10px 0 10px -10px;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
.loadingContainer {
|
|
133
|
+
display: flex;
|
|
134
|
+
justify-content: center;
|
|
135
|
+
align-items: center;
|
|
136
|
+
margin-left: 8px;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
.loadingDots {
|
|
140
|
+
display: flex;
|
|
141
|
+
gap: 3px; /* 减小间距 */
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
.dot {
|
|
145
|
+
width: 8px; /* 减小大小 */
|
|
146
|
+
height: 8px; /* 减小大小 */
|
|
147
|
+
background-color: #4086ff; /* 换成antd主题浅蓝色 */
|
|
148
|
+
border-radius: 50%;
|
|
149
|
+
will-change: transform; /* 告诉浏览器提前优化动画 */
|
|
150
|
+
animation: bounce 0.8s infinite ease-in-out both; /* 减小动画变化幅度 */
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
.dot:nth-child(1) {
|
|
154
|
+
animation-delay: -0.24s; /* 调整延迟 */
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
.dot:nth-child(2) {
|
|
158
|
+
animation-delay: -0.12s; /* 调整延迟 */
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
@keyframes bounce {
|
|
162
|
+
0%, 85%, 100% {
|
|
163
|
+
/* 减小动画变化幅度 */
|
|
164
|
+
transform: scale(0.6);
|
|
165
|
+
}
|
|
166
|
+
40% {
|
|
167
|
+
transform: scale(1);
|
|
168
|
+
}
|
|
169
|
+
}
|
|
@@ -7,12 +7,14 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
|
|
|
7
7
|
import React from 'react';
|
|
8
8
|
import { knowledgeConstants } from "../../constants";
|
|
9
9
|
import { Tooltip } from '@douyinfe/semi-ui';
|
|
10
|
-
import styles from "./index.module.
|
|
11
|
-
import {
|
|
10
|
+
import styles from "./index.module.css";
|
|
11
|
+
import { IconClear } from '@douyinfe/semi-icons';
|
|
12
12
|
import { useAppSelector, useAppDispatch } from "../../store/hooks";
|
|
13
13
|
import { setQuoteTeachModelList, setQuoteProductList } from "../../store/slices/gimiMenuSlice";
|
|
14
14
|
import { formatSecondsToChinese } from "../../utils/tools";
|
|
15
15
|
import classNames from 'classnames';
|
|
16
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
17
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
16
18
|
export var TeachModelReferenceContent = function TeachModelReferenceContent(_ref) {
|
|
17
19
|
var item = _ref.item,
|
|
18
20
|
showDuration = _ref.showDuration;
|
|
@@ -27,24 +29,29 @@ export var TeachModelReferenceContent = function TeachModelReferenceContent(_ref
|
|
|
27
29
|
})
|
|
28
30
|
}));
|
|
29
31
|
};
|
|
30
|
-
return /*#__PURE__*/
|
|
31
|
-
className: styles.main
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
32
|
+
return /*#__PURE__*/_jsxs("div", {
|
|
33
|
+
className: styles.main,
|
|
34
|
+
children: [item.canCancel && /*#__PURE__*/_jsx(IconClear, {
|
|
35
|
+
className: styles.closeIcon,
|
|
36
|
+
onClick: onCancel
|
|
37
|
+
}), /*#__PURE__*/_jsx("img", {
|
|
38
|
+
alt: "\u8D44\u6599\u5F15\u7528\u56FE\u7247",
|
|
39
|
+
className: styles.img,
|
|
40
|
+
src: knowledgeConstants.VIDEO_ICON_ADDRESS
|
|
41
|
+
}), /*#__PURE__*/_jsxs("div", {
|
|
42
|
+
className: styles.description,
|
|
43
|
+
children: [/*#__PURE__*/_jsx(Tooltip, {
|
|
44
|
+
content: item.teachModelName,
|
|
45
|
+
children: /*#__PURE__*/_jsx("div", {
|
|
46
|
+
className: classNames(item.canCancel ? styles.text_oneline : styles.text_twoline),
|
|
47
|
+
children: item.teachModelName
|
|
48
|
+
})
|
|
49
|
+
}), item.duration > 0 && showDuration && /*#__PURE__*/_jsx("div", {
|
|
50
|
+
className: styles.duration,
|
|
51
|
+
children: "\u65F6\u957F".concat(formatSecondsToChinese(item.duration), "\u5206\u949F")
|
|
52
|
+
})]
|
|
53
|
+
})]
|
|
54
|
+
});
|
|
48
55
|
};
|
|
49
56
|
export var ProductReferenceContent = function ProductReferenceContent(_ref2) {
|
|
50
57
|
var item = _ref2.item;
|
|
@@ -59,22 +66,26 @@ export var ProductReferenceContent = function ProductReferenceContent(_ref2) {
|
|
|
59
66
|
})
|
|
60
67
|
}));
|
|
61
68
|
};
|
|
62
|
-
return /*#__PURE__*/
|
|
63
|
-
className: styles.main
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
69
|
+
return /*#__PURE__*/_jsxs("div", {
|
|
70
|
+
className: styles.main,
|
|
71
|
+
children: [item.canCancel && /*#__PURE__*/_jsx(IconClear, {
|
|
72
|
+
className: styles.closeIcon,
|
|
73
|
+
onClick: onCancel
|
|
74
|
+
}), /*#__PURE__*/_jsx("img", {
|
|
75
|
+
alt: "\u8D44\u6599\u5F15\u7528\u56FE\u7247",
|
|
76
|
+
className: styles.img,
|
|
77
|
+
src: knowledgeConstants.CLASS_ICON_BIG_ADDRESS
|
|
78
|
+
}), /*#__PURE__*/_jsx("div", {
|
|
79
|
+
className: styles.description,
|
|
80
|
+
children: /*#__PURE__*/_jsx(Tooltip, {
|
|
81
|
+
content: item.productName,
|
|
82
|
+
children: /*#__PURE__*/_jsx("div", {
|
|
83
|
+
className: styles.product_text,
|
|
84
|
+
children: item.productName
|
|
85
|
+
})
|
|
86
|
+
})
|
|
87
|
+
})]
|
|
88
|
+
});
|
|
78
89
|
};
|
|
79
90
|
export var ReferencesEdit = function ReferencesEdit(_ref3) {
|
|
80
91
|
var quoteTeachModelList = _ref3.quoteTeachModelList,
|
|
@@ -90,36 +101,34 @@ export var ReferencesEdit = function ReferencesEdit(_ref3) {
|
|
|
90
101
|
canCancel: true
|
|
91
102
|
});
|
|
92
103
|
});
|
|
93
|
-
return /*#__PURE__*/
|
|
94
|
-
className: styles.list
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
})
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
}));
|
|
104
|
+
return /*#__PURE__*/_jsxs("div", {
|
|
105
|
+
className: styles.list,
|
|
106
|
+
children: [newQuoteTeachModelList.map(function (item) {
|
|
107
|
+
return /*#__PURE__*/_jsx(TeachModelReferenceContent, {
|
|
108
|
+
item: item,
|
|
109
|
+
showDuration: true
|
|
110
|
+
}, item.teachModelId);
|
|
111
|
+
}), newQuoteProductList.map(function (item) {
|
|
112
|
+
return /*#__PURE__*/_jsx(ProductReferenceContent, {
|
|
113
|
+
item: item
|
|
114
|
+
}, item.productId);
|
|
115
|
+
})]
|
|
116
|
+
});
|
|
107
117
|
};
|
|
108
118
|
export var References = function References(_ref4) {
|
|
109
119
|
var quoteTeachModelList = _ref4.quoteTeachModelList,
|
|
110
120
|
quoteProductList = _ref4.quoteProductList;
|
|
111
|
-
return /*#__PURE__*/
|
|
112
|
-
className: styles.list
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
})
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
}));
|
|
121
|
+
return /*#__PURE__*/_jsxs("div", {
|
|
122
|
+
className: styles.list,
|
|
123
|
+
children: [quoteTeachModelList === null || quoteTeachModelList === void 0 ? void 0 : quoteTeachModelList.filter(Boolean).map(function (item) {
|
|
124
|
+
return /*#__PURE__*/_jsx(TeachModelReferenceContent, {
|
|
125
|
+
item: item,
|
|
126
|
+
showDuration: false
|
|
127
|
+
}, item.teachModelId);
|
|
128
|
+
}), quoteProductList === null || quoteProductList === void 0 ? void 0 : quoteProductList.filter(Boolean).map(function (item) {
|
|
129
|
+
return /*#__PURE__*/_jsx(ProductReferenceContent, {
|
|
130
|
+
item: item
|
|
131
|
+
}, item.productId);
|
|
132
|
+
})]
|
|
133
|
+
});
|
|
125
134
|
};
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
.list {
|
|
2
|
+
display: flex;
|
|
3
|
+
flex-direction: column;
|
|
4
|
+
align-items: end;
|
|
5
|
+
gap: 10px;
|
|
6
|
+
margin-bottom: 10px;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.main {
|
|
10
|
+
background-color: #f7f8fa;
|
|
11
|
+
border-radius: 12px;
|
|
12
|
+
display: flex;
|
|
13
|
+
align-items: center;
|
|
14
|
+
gap: 10px;
|
|
15
|
+
padding: 10px;
|
|
16
|
+
position: relative;
|
|
17
|
+
min-height: 60px;
|
|
18
|
+
}
|
|
19
|
+
.main .img {
|
|
20
|
+
height: 28px;
|
|
21
|
+
width: 28px;
|
|
22
|
+
}
|
|
23
|
+
.main .description {
|
|
24
|
+
display: flex;
|
|
25
|
+
flex-direction: column;
|
|
26
|
+
gap: 5px;
|
|
27
|
+
}
|
|
28
|
+
.main .description .text_oneline {
|
|
29
|
+
text-overflow: ellipsis;
|
|
30
|
+
display: -webkit-box;
|
|
31
|
+
-webkit-line-clamp: 1;
|
|
32
|
+
-webkit-box-orient: vertical;
|
|
33
|
+
overflow: hidden;
|
|
34
|
+
width: 200px;
|
|
35
|
+
font-family: "PingFang SC";
|
|
36
|
+
font-weight: 500;
|
|
37
|
+
font-size: 14px;
|
|
38
|
+
line-height: 150%;
|
|
39
|
+
letter-spacing: 0px;
|
|
40
|
+
color: #2e394c;
|
|
41
|
+
}
|
|
42
|
+
.main .description .text_twoline {
|
|
43
|
+
text-overflow: ellipsis;
|
|
44
|
+
display: -webkit-box;
|
|
45
|
+
-webkit-line-clamp: 2;
|
|
46
|
+
-webkit-box-orient: vertical;
|
|
47
|
+
overflow: hidden;
|
|
48
|
+
width: 200px;
|
|
49
|
+
font-family: "PingFang SC";
|
|
50
|
+
font-weight: 500;
|
|
51
|
+
font-size: 14px;
|
|
52
|
+
line-height: 150%;
|
|
53
|
+
letter-spacing: 0px;
|
|
54
|
+
color: #2e394c;
|
|
55
|
+
}
|
|
56
|
+
.main .description .product_text {
|
|
57
|
+
text-overflow: ellipsis;
|
|
58
|
+
display: -webkit-box;
|
|
59
|
+
-webkit-line-clamp: 2;
|
|
60
|
+
-webkit-box-orient: vertical;
|
|
61
|
+
overflow: hidden;
|
|
62
|
+
width: 200px;
|
|
63
|
+
font-family: "PingFang SC";
|
|
64
|
+
font-weight: 500;
|
|
65
|
+
font-size: 14px;
|
|
66
|
+
line-height: 150%;
|
|
67
|
+
letter-spacing: 0px;
|
|
68
|
+
color: #2e394c;
|
|
69
|
+
}
|
|
70
|
+
.main .description .duration {
|
|
71
|
+
color: #717f94;
|
|
72
|
+
font-family: "PingFang SC";
|
|
73
|
+
font-weight: 400;
|
|
74
|
+
font-style: Regular;
|
|
75
|
+
font-size: 12px;
|
|
76
|
+
line-height: 150%;
|
|
77
|
+
letter-spacing: 0px;
|
|
78
|
+
}
|
|
79
|
+
.main .closeIcon {
|
|
80
|
+
position: absolute;
|
|
81
|
+
top: 0;
|
|
82
|
+
right: 0;
|
|
83
|
+
transform: translate(5px, -5px);
|
|
84
|
+
}
|
|
@@ -1,11 +1,16 @@
|
|
|
1
|
-
function
|
|
1
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
3
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
4
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
5
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
6
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
2
7
|
import React from 'react';
|
|
3
8
|
import { store } from "../../store";
|
|
4
9
|
import { useAppDispatch, useAppSelector } from "../../store/hooks";
|
|
5
10
|
import { setBaseUrl, setToken, setPlatform, setConversationId, setAgentDetail, setBussinessParams } from "../../store/slices/gimiMenuSlice";
|
|
6
11
|
import useCommonChatAPI from "../../hooks/useCommonChatAPI";
|
|
7
12
|
import { replaceBraces } from "../../utils/tools";
|
|
8
|
-
import styles from "./index.module.
|
|
13
|
+
import styles from "./index.module.css";
|
|
9
14
|
import ChatInput from "../chat-input";
|
|
10
15
|
import MessageList from "../message-list";
|
|
11
16
|
import PresetAgentContent from "../preset-agent-content";
|
|
@@ -16,6 +21,8 @@ import KonwledgeTrace from "../knowledge-trace";
|
|
|
16
21
|
import FileCardSideBar from "../file-card/fileCardSidebar";
|
|
17
22
|
import OfficeFilePreviewPanel from "../file-preview";
|
|
18
23
|
import AiLoading from "../ai-loading";
|
|
24
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
25
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
19
26
|
var CommonChat = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
20
27
|
var _props$businessType = props.businessType,
|
|
21
28
|
businessType = _props$businessType === void 0 ? 'chat' : _props$businessType,
|
|
@@ -150,69 +157,76 @@ var CommonChat = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
150
157
|
}
|
|
151
158
|
handleSend(val, agent, isSystemAuto);
|
|
152
159
|
}, [handleSend, startConversationAndChat, conversationId]);
|
|
153
|
-
return /*#__PURE__*/
|
|
160
|
+
return /*#__PURE__*/_jsxs("div", {
|
|
154
161
|
className: styles.main,
|
|
155
|
-
id: "myun_gimi_design_chat"
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
162
|
+
id: "myun_gimi_design_chat",
|
|
163
|
+
children: [/*#__PURE__*/_jsxs("div", {
|
|
164
|
+
className: styles.chat_content,
|
|
165
|
+
children: [showHeader && headerValue && /*#__PURE__*/_jsx("div", {
|
|
166
|
+
className: styles.content_header,
|
|
167
|
+
children: replaceBraces(headerValue)
|
|
168
|
+
}), /*#__PURE__*/_jsxs("div", {
|
|
169
|
+
className: styles.scroll_wrapper,
|
|
170
|
+
children: [/*#__PURE__*/_jsxs("div", {
|
|
171
|
+
className: "".concat(styles.scroll_container, " ").concat(isScrolling ? styles.scrolling : ''),
|
|
172
|
+
ref: containerRef,
|
|
173
|
+
children: [showPrologue && messageList.length === 0 && !isMoreLoading && /*#__PURE__*/_jsx(PresetAgentContent, {
|
|
174
|
+
prologue: (agentObj === null || agentObj === void 0 ? void 0 : agentObj.prologue) || '',
|
|
175
|
+
questionList: (agentObj === null || agentObj === void 0 ? void 0 : agentObj.questionList) || [],
|
|
176
|
+
setInputValue: setInputValue
|
|
177
|
+
}), isMoreLoading ? /*#__PURE__*/_jsx("div", {
|
|
178
|
+
style: {
|
|
179
|
+
height: '100%'
|
|
180
|
+
},
|
|
181
|
+
children: /*#__PURE__*/_jsx(AiLoading, {})
|
|
182
|
+
}) : /*#__PURE__*/_jsx(MessageList, _objectSpread({
|
|
183
|
+
chatList: messageList || defaultMessages,
|
|
184
|
+
handleSend: handleSend,
|
|
185
|
+
inputModelRef: inputModelRef,
|
|
186
|
+
msgLoading: msgLoading,
|
|
187
|
+
onSucessExcel: onSucessExcel,
|
|
188
|
+
onFailureExcel: onFailureExcel,
|
|
189
|
+
onRegenerateClick: regenerate,
|
|
190
|
+
onRetryExcel: onRetryExcel,
|
|
191
|
+
chatUI: chatUI,
|
|
192
|
+
model: model,
|
|
193
|
+
isPlaying: isPlaying,
|
|
194
|
+
playTTSByText: playTTSByText,
|
|
195
|
+
stopTTSByText: stopTTSByText
|
|
196
|
+
}, props.messageConfig))]
|
|
197
|
+
}), showBackBottom && /*#__PURE__*/_jsx("div", {
|
|
198
|
+
className: styles.backBottomBtn,
|
|
199
|
+
onClick: function onClick() {
|
|
200
|
+
return scrollBottomForce(true);
|
|
201
|
+
},
|
|
202
|
+
children: /*#__PURE__*/_jsx(IconChevronDown, {
|
|
203
|
+
size: "large"
|
|
204
|
+
})
|
|
205
|
+
})]
|
|
206
|
+
}), showInput && /*#__PURE__*/_jsx(ChatInput, _objectSpread(_objectSpread({
|
|
207
|
+
ref: chatInputRef
|
|
208
|
+
}, chatInputConfig), {}, {
|
|
209
|
+
onSend: handleInputSend,
|
|
210
|
+
disabled: disableSend || isMoreLoading,
|
|
211
|
+
showDefaultPrompt: messageList.length === 0,
|
|
212
|
+
defaultPrompt: (agentObj === null || agentObj === void 0 ? void 0 : agentObj.defaultPrompt) || ''
|
|
213
|
+
// onContentChange={onInputValueChange}
|
|
214
|
+
,
|
|
215
|
+
onInterrupt: handleInterrupt,
|
|
216
|
+
isRecording: isRecording,
|
|
217
|
+
isVoiceGetting: isExecuting,
|
|
218
|
+
recordingCount: recordingCount,
|
|
219
|
+
asrText: asrText,
|
|
220
|
+
shortAsrClick: shortAsrClick,
|
|
221
|
+
disableVoiceCommunication: disableVoiceCommunication,
|
|
222
|
+
onHistoryReload: onHistoryReload
|
|
223
|
+
}, props.chatInputConfig))]
|
|
224
|
+
}), /*#__PURE__*/_jsx(KonwledgeTrace, _objectSpread(_objectSpread({}, props.sidebarConfig), {}, {
|
|
225
|
+
chatList: messageList || defaultMessages,
|
|
226
|
+
isOverFlow: model === 'fullscreen' ? false : true
|
|
227
|
+
})), /*#__PURE__*/_jsx(FileCardSideBar, _objectSpread(_objectSpread({}, props.sidebarConfig), {}, {
|
|
228
|
+
isOverFlow: model === 'fullscreen' ? false : true
|
|
229
|
+
})), /*#__PURE__*/_jsx(OfficeFilePreviewPanel, {})]
|
|
230
|
+
});
|
|
217
231
|
});
|
|
218
232
|
export default CommonChat;
|
|
@@ -1,8 +1,14 @@
|
|
|
1
|
-
function
|
|
1
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
3
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
4
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
5
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
6
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
2
7
|
import { store } from "../../store";
|
|
3
8
|
import CommonChat from "./CommonChat";
|
|
4
9
|
import React from 'react';
|
|
5
10
|
import { Provider } from 'react-redux';
|
|
11
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
6
12
|
var GimiChatComponent = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
7
13
|
var commonChatRef = React.useRef(null);
|
|
8
14
|
React.useImperativeHandle(ref, function () {
|
|
@@ -14,10 +20,11 @@ var GimiChatComponent = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
14
20
|
inputEditor: ((_commonChatRef$curren4 = commonChatRef.current) === null || _commonChatRef$curren4 === void 0 ? void 0 : _commonChatRef$curren4.inputEditor) || null
|
|
15
21
|
};
|
|
16
22
|
});
|
|
17
|
-
return /*#__PURE__*/
|
|
18
|
-
store: store
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
23
|
+
return /*#__PURE__*/_jsx(Provider, {
|
|
24
|
+
store: store,
|
|
25
|
+
children: /*#__PURE__*/_jsx(CommonChat, _objectSpread(_objectSpread({}, props), {}, {
|
|
26
|
+
ref: commonChatRef
|
|
27
|
+
}))
|
|
28
|
+
});
|
|
22
29
|
});
|
|
23
30
|
export default GimiChatComponent;
|