@myun/gimi-chat 0.0.8 → 0.0.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/dist/apis/useApi.d.ts +2 -0
- package/dist/apis/useApi.js +50 -2
- package/dist/components/ai-chat-dialogue/index.js +135 -181
- package/dist/components/ai-correction/index.js +25 -38
- package/dist/components/ai-loading/index.js +8 -12
- package/dist/components/answer-item/index.d.ts +3 -0
- package/dist/components/answer-item/index.js +126 -135
- package/dist/components/ask-card/index.js +33 -42
- package/dist/components/chat-input/extension/index.d.ts +2 -0
- package/dist/components/chat-input/extension/index.js +2 -0
- package/dist/components/chat-input/extension/keydown/index.d.ts +3 -0
- package/dist/components/chat-input/extension/keydown/index.js +37 -0
- package/dist/components/chat-input/extension/title-slot/Component.d.ts +4 -0
- package/dist/components/chat-input/extension/title-slot/Component.js +18 -0
- package/dist/components/chat-input/extension/title-slot/index.d.ts +3 -0
- package/dist/components/chat-input/extension/title-slot/index.js +47 -0
- package/dist/components/chat-input/extension/title-slot/index.less +22 -0
- package/dist/components/chat-input/index.d.ts +4 -0
- package/dist/components/chat-input/index.js +144 -145
- package/dist/components/chat-input/index.module.css +7 -0
- package/dist/components/chat-voice/VoiceCommunication.js +21 -23
- package/dist/components/chat-voice/VoiceRecord.js +21 -24
- package/dist/components/conversation-delete/index.js +8 -10
- package/dist/components/dots-loading/index.js +7 -10
- package/dist/components/empty/index.js +7 -12
- package/dist/components/excel-components/ExcelCard.js +3 -7
- package/dist/components/excel-components/ExcelExcuting.js +43 -60
- package/dist/components/excel-components/ExcelFailCard.js +10 -15
- package/dist/components/excel-components/ExcelSuccessCard.d.ts +5 -1
- package/dist/components/excel-components/ExcelSuccessCard.js +13 -6
- package/dist/components/file-card/fileCardSidebar.js +17 -23
- package/dist/components/file-card/index.d.ts +3 -0
- package/dist/components/file-card/index.js +59 -69
- package/dist/components/file-card/index.module.css +1 -1
- package/dist/components/file-preview/index.js +62 -37
- package/dist/components/file-preview/index.module.css +33 -0
- package/dist/components/file-upload/index.js +7 -10
- package/dist/components/file-upload/uploadV1.js +27 -33
- package/dist/components/gimi-sidebar/index.js +13 -20
- package/dist/components/header/index.js +11 -18
- package/dist/components/iconfont-com/index.js +33 -12
- package/dist/components/index.d.ts +1 -1
- package/dist/components/index.js +1 -1
- package/dist/components/knowledge-trace/KnowledgeIconComponent.js +22 -28
- package/dist/components/knowledge-trace/classList.js +28 -37
- package/dist/components/knowledge-trace/documentList.js +27 -36
- package/dist/components/knowledge-trace/index.js +21 -28
- package/dist/components/knowledge-trace/videoList.js +36 -46
- package/dist/components/lottie-img/index.js +8 -10
- package/dist/components/message-actions/CopyButton.d.ts +1 -1
- package/dist/components/message-actions/CopyButton.js +22 -25
- package/dist/components/message-actions/LikeButton.js +22 -25
- package/dist/components/message-actions/RegenerateButton.js +18 -21
- package/dist/components/message-actions/UnLikeButton.js +22 -25
- package/dist/components/message-actions/VoicePlay.js +22 -25
- package/dist/components/message-list/index.js +83 -87
- package/dist/components/no-microphone-root/index.js +29 -39
- package/dist/components/preset-agent-content/index.d.ts +1 -0
- package/dist/components/preset-agent-content/index.js +27 -20
- package/dist/components/quoted-content/index.d.ts +3 -0
- package/dist/components/quoted-content/index.js +271 -163
- package/dist/components/quoted-content/index.module.css +20 -0
- package/dist/components/reasoning-content/index.d.ts +3 -2
- package/dist/components/reasoning-content/index.js +50 -61
- package/dist/components/reference-content/index.js +62 -71
- package/dist/components/reference-content/index.module.css +1 -0
- package/dist/components/search-result/index.d.ts +7 -0
- package/dist/components/search-result/index.js +182 -0
- package/dist/components/search-result/index.module.css +235 -0
- package/dist/components/templates/CommonChat.js +75 -79
- package/dist/components/templates/GimiChatComponent.js +6 -13
- package/dist/components/templates/demo/demo.js +109 -103
- package/dist/components/upload-list/index.js +41 -56
- package/dist/components/voice-bars/index.js +19 -22
- package/dist/components/voice-check-dialog/index.js +17 -24
- package/dist/components/voice-recording/index.js +42 -57
- package/dist/components/work-flow-content/demo.js +1 -2
- package/dist/components/work-flow-content/index.js +8 -11
- package/dist/hooks/useChatActions.d.ts +1 -1
- package/dist/hooks/useChatActions.js +3 -1
- package/dist/hooks/useCommonChatAPI.d.ts +2 -1
- package/dist/hooks/useCommonChatAPI.js +10 -8
- package/dist/hooks/useQuoted.d.ts +12 -0
- package/dist/hooks/useQuoted.js +202 -0
- package/dist/utils/aes.d.ts +21 -0
- package/dist/utils/aes.js +61 -0
- package/dist/utils/chatInputUtil.d.ts +1 -1
- package/dist/utils/chatInputUtil.js +4 -3
- package/package.json +1 -1
|
@@ -0,0 +1,235 @@
|
|
|
1
|
+
@charset "UTF-8";
|
|
2
|
+
.search .search_cards {
|
|
3
|
+
margin-top: 12px;
|
|
4
|
+
display: flex;
|
|
5
|
+
flex-wrap: wrap;
|
|
6
|
+
gap: 20px 0;
|
|
7
|
+
}
|
|
8
|
+
.search .search_cards .courseItem {
|
|
9
|
+
width: 305px;
|
|
10
|
+
display: flex;
|
|
11
|
+
align-items: center;
|
|
12
|
+
background: #f7f8fa;
|
|
13
|
+
padding: 16px;
|
|
14
|
+
border-radius: 8px;
|
|
15
|
+
margin-right: 10px;
|
|
16
|
+
}
|
|
17
|
+
.search .search_cards .courseItem .cover {
|
|
18
|
+
border-radius: 4px;
|
|
19
|
+
overflow: hidden;
|
|
20
|
+
width: 90px;
|
|
21
|
+
height: 51px;
|
|
22
|
+
border-radius: 4px;
|
|
23
|
+
}
|
|
24
|
+
.search .search_cards .courseItem .cover img {
|
|
25
|
+
width: 100%;
|
|
26
|
+
height: 100%;
|
|
27
|
+
object-fit: cover;
|
|
28
|
+
}
|
|
29
|
+
.search .search_cards .courseItem .courseTitle {
|
|
30
|
+
flex: 1;
|
|
31
|
+
height: 51px;
|
|
32
|
+
font-family: PingFangSC, PingFang SC;
|
|
33
|
+
font-family: PingFangSC, PingFang SC;
|
|
34
|
+
font-weight: 500;
|
|
35
|
+
font-size: 12px;
|
|
36
|
+
color: #2e394c;
|
|
37
|
+
text-align: left;
|
|
38
|
+
font-style: normal;
|
|
39
|
+
display: -webkit-box;
|
|
40
|
+
-webkit-line-clamp: 3; /* 限制行数 */
|
|
41
|
+
-webkit-box-orient: vertical;
|
|
42
|
+
overflow: hidden;
|
|
43
|
+
text-overflow: ellipsis;
|
|
44
|
+
margin-left: 10px;
|
|
45
|
+
line-height: 17px;
|
|
46
|
+
}
|
|
47
|
+
.search .search_cards .courseItem .courseTitle .newEquityLabel {
|
|
48
|
+
display: inline-block !important;
|
|
49
|
+
margin-right: 8px;
|
|
50
|
+
padding: 0 4px;
|
|
51
|
+
color: #e68845;
|
|
52
|
+
font-size: 10px;
|
|
53
|
+
font-weight: 600;
|
|
54
|
+
line-height: 18px;
|
|
55
|
+
border-radius: 4px;
|
|
56
|
+
background: #ffecd9;
|
|
57
|
+
position: relative;
|
|
58
|
+
bottom: 2px;
|
|
59
|
+
font-weight: 400;
|
|
60
|
+
}
|
|
61
|
+
.search .search_cards .courseItem .courseTitle .newEquityLabel-1 {
|
|
62
|
+
color: #3d996b;
|
|
63
|
+
background: #ccffe6;
|
|
64
|
+
}
|
|
65
|
+
.search .search_cards .courseItem .courseTitle .newEquityLabel-3 {
|
|
66
|
+
color: #fff;
|
|
67
|
+
background: #7d91b3;
|
|
68
|
+
}
|
|
69
|
+
.search .search_cards .courseItem .infoTitle {
|
|
70
|
+
width: 100%;
|
|
71
|
+
font-family: PingFangSC, PingFang SC;
|
|
72
|
+
font-weight: 400;
|
|
73
|
+
font-size: 12px;
|
|
74
|
+
color: #7d91b3;
|
|
75
|
+
line-height: 12px;
|
|
76
|
+
text-align: left;
|
|
77
|
+
font-style: normal;
|
|
78
|
+
overflow: hidden; /* 隐藏溢出内容 */
|
|
79
|
+
white-space: nowrap; /* 禁止文本换行 */
|
|
80
|
+
text-overflow: ellipsis; /* 显示省略号 */
|
|
81
|
+
line-height: 17px;
|
|
82
|
+
}
|
|
83
|
+
.search .search_cards .newsItem {
|
|
84
|
+
background: #f7f8fa;
|
|
85
|
+
padding: 16px;
|
|
86
|
+
border-radius: 8px;
|
|
87
|
+
margin-right: 10px;
|
|
88
|
+
width: 305px;
|
|
89
|
+
display: flex;
|
|
90
|
+
flex-direction: column;
|
|
91
|
+
align-items: flex-start;
|
|
92
|
+
justify-content: flex-start;
|
|
93
|
+
}
|
|
94
|
+
.search .search_cards .newsItem .cover {
|
|
95
|
+
border-radius: 4px;
|
|
96
|
+
overflow: hidden;
|
|
97
|
+
width: 90px;
|
|
98
|
+
height: 51px;
|
|
99
|
+
border-radius: 4px;
|
|
100
|
+
}
|
|
101
|
+
.search .search_cards .newsItem .cover img {
|
|
102
|
+
width: 100%;
|
|
103
|
+
height: 100%;
|
|
104
|
+
object-fit: cover;
|
|
105
|
+
}
|
|
106
|
+
.search .search_cards .newsItem .courseTitle {
|
|
107
|
+
width: 100%;
|
|
108
|
+
height: 34px;
|
|
109
|
+
margin-left: 0px;
|
|
110
|
+
font-family: PingFangSC, PingFang SC;
|
|
111
|
+
font-family: PingFangSC, PingFang SC;
|
|
112
|
+
font-weight: 500;
|
|
113
|
+
font-size: 12px;
|
|
114
|
+
color: #2e394c;
|
|
115
|
+
text-align: left;
|
|
116
|
+
font-style: normal;
|
|
117
|
+
display: -webkit-box;
|
|
118
|
+
-webkit-line-clamp: 2; /* 限制行数 */
|
|
119
|
+
-webkit-box-orient: vertical;
|
|
120
|
+
overflow: hidden;
|
|
121
|
+
text-overflow: ellipsis;
|
|
122
|
+
line-height: 17px;
|
|
123
|
+
}
|
|
124
|
+
.search .search_cards .newsItem .courseTitle .newEquityLabel {
|
|
125
|
+
display: inline-block !important;
|
|
126
|
+
margin-right: 8px;
|
|
127
|
+
padding: 0 4px;
|
|
128
|
+
color: #e68845;
|
|
129
|
+
font-size: 10px;
|
|
130
|
+
font-weight: 600;
|
|
131
|
+
line-height: 18px;
|
|
132
|
+
border-radius: 4px;
|
|
133
|
+
background: #ffecd9;
|
|
134
|
+
position: relative;
|
|
135
|
+
bottom: 2px;
|
|
136
|
+
font-weight: 400;
|
|
137
|
+
}
|
|
138
|
+
.search .search_cards .newsItem .courseTitle .newEquityLabel-1 {
|
|
139
|
+
color: #3d996b;
|
|
140
|
+
background: #ccffe6;
|
|
141
|
+
}
|
|
142
|
+
.search .search_cards .newsItem .courseTitle .newEquityLabel-3 {
|
|
143
|
+
color: #fff;
|
|
144
|
+
background: #7d91b3;
|
|
145
|
+
}
|
|
146
|
+
.search .search_cards .newsItem .infoTitle {
|
|
147
|
+
width: 100%;
|
|
148
|
+
font-family: PingFangSC, PingFang SC;
|
|
149
|
+
font-weight: 400;
|
|
150
|
+
font-size: 12px;
|
|
151
|
+
color: #7d91b3;
|
|
152
|
+
line-height: 12px;
|
|
153
|
+
text-align: left;
|
|
154
|
+
font-style: normal;
|
|
155
|
+
overflow: hidden; /* 隐藏溢出内容 */
|
|
156
|
+
white-space: nowrap; /* 禁止文本换行 */
|
|
157
|
+
text-overflow: ellipsis; /* 显示省略号 */
|
|
158
|
+
line-height: 17px;
|
|
159
|
+
}
|
|
160
|
+
.search .emptybtn {
|
|
161
|
+
width: fit-content;
|
|
162
|
+
height: 40px;
|
|
163
|
+
background: #ffffff;
|
|
164
|
+
border-radius: 8px;
|
|
165
|
+
border: 1px solid #cfd7e6;
|
|
166
|
+
display: flex;
|
|
167
|
+
justify-content: center;
|
|
168
|
+
align-items: center;
|
|
169
|
+
}
|
|
170
|
+
.search .emptybtn .icon {
|
|
171
|
+
display: flex;
|
|
172
|
+
align-items: center;
|
|
173
|
+
justify-self: center;
|
|
174
|
+
margin-right: 12px;
|
|
175
|
+
}
|
|
176
|
+
.search .emptybtn .search_icon {
|
|
177
|
+
display: flex;
|
|
178
|
+
align-items: center;
|
|
179
|
+
justify-self: center;
|
|
180
|
+
margin-left: 16px;
|
|
181
|
+
}
|
|
182
|
+
.search .emptybtn .emptycontent {
|
|
183
|
+
height: 20px;
|
|
184
|
+
font-family: PingFangSC, PingFang SC;
|
|
185
|
+
font-weight: 400;
|
|
186
|
+
font-size: 14px;
|
|
187
|
+
color: #2e394c;
|
|
188
|
+
line-height: 20px;
|
|
189
|
+
text-align: left;
|
|
190
|
+
font-style: normal;
|
|
191
|
+
margin-left: 4px;
|
|
192
|
+
margin-right: 16px;
|
|
193
|
+
}
|
|
194
|
+
.search .searchAll {
|
|
195
|
+
width: 78px;
|
|
196
|
+
height: 83px;
|
|
197
|
+
background: #f7f8fa;
|
|
198
|
+
border-radius: 8px;
|
|
199
|
+
display: flex;
|
|
200
|
+
align-items: center;
|
|
201
|
+
justify-content: center;
|
|
202
|
+
font-family: PingFangSC, PingFang SC;
|
|
203
|
+
font-weight: 400;
|
|
204
|
+
font-size: 14px;
|
|
205
|
+
color: #2e394c;
|
|
206
|
+
line-height: 14px;
|
|
207
|
+
text-align: left;
|
|
208
|
+
font-style: normal;
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
.label {
|
|
212
|
+
margin-top: 20px;
|
|
213
|
+
height: 26px;
|
|
214
|
+
font-family: PingFangSC, PingFang SC;
|
|
215
|
+
font-weight: 400;
|
|
216
|
+
font-size: 14px;
|
|
217
|
+
color: #2e394c;
|
|
218
|
+
line-height: 26px;
|
|
219
|
+
text-align: left;
|
|
220
|
+
font-style: normal;
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
.icon {
|
|
224
|
+
display: flex;
|
|
225
|
+
align-items: center;
|
|
226
|
+
justify-self: center;
|
|
227
|
+
margin-right: 4px;
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
@media (max-width: 1440px) {
|
|
231
|
+
.courseItem,
|
|
232
|
+
.newsItem {
|
|
233
|
+
width: 255px !important;
|
|
234
|
+
}
|
|
235
|
+
}
|
|
@@ -1,9 +1,4 @@
|
|
|
1
|
-
function
|
|
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); }
|
|
1
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
7
2
|
import React from 'react';
|
|
8
3
|
import { store } from "../../store";
|
|
9
4
|
import { useAppDispatch, useAppSelector } from "../../store/hooks";
|
|
@@ -21,9 +16,8 @@ import KonwledgeTrace from "../knowledge-trace";
|
|
|
21
16
|
import FileCardSideBar from "../file-card/fileCardSidebar";
|
|
22
17
|
import OfficeFilePreviewPanel from "../file-preview";
|
|
23
18
|
import AiLoading from "../ai-loading";
|
|
24
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
25
|
-
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
26
19
|
var CommonChat = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
20
|
+
var _props$chatInputConfi2, _props$chatInputConfi3;
|
|
27
21
|
var _props$businessType = props.businessType,
|
|
28
22
|
businessType = _props$businessType === void 0 ? 'chat' : _props$businessType,
|
|
29
23
|
_props$showInput = props.showInput,
|
|
@@ -46,6 +40,8 @@ var CommonChat = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
46
40
|
agentId = props.agentId,
|
|
47
41
|
_props$showPrologue = props.showPrologue,
|
|
48
42
|
showPrologue = _props$showPrologue === void 0 ? true : _props$showPrologue,
|
|
43
|
+
_props$quickQuestionL = props.quickQuestionListPosition,
|
|
44
|
+
quickQuestionListPosition = _props$quickQuestionL === void 0 ? 'top' : _props$quickQuestionL,
|
|
49
45
|
_props$model = props.model,
|
|
50
46
|
model = _props$model === void 0 ? 'fullscreen' : _props$model,
|
|
51
47
|
conversationId = props.conversationId,
|
|
@@ -75,7 +71,7 @@ var CommonChat = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
75
71
|
playTTSByText = _useChatVoice.playTTSByText,
|
|
76
72
|
stopTTSByText = _useChatVoice.stopTTSByText,
|
|
77
73
|
isPlaying = _useChatVoice.isPlaying;
|
|
78
|
-
var _useCommonChatAPI = useCommonChatAPI(containerRef, businessType, stopTTSByText, isPlaying, agentId),
|
|
74
|
+
var _useCommonChatAPI = useCommonChatAPI(containerRef, businessType, stopTTSByText, isPlaying, agentId, (_props$chatInputConfi2 = props.chatInputConfig) === null || _props$chatInputConfi2 === void 0 ? void 0 : _props$chatInputConfi2.onConversationCreated, (_props$chatInputConfi3 = props.chatInputConfig) === null || _props$chatInputConfi3 === void 0 ? void 0 : _props$chatInputConfi3.onSendEnd),
|
|
79
75
|
headerValue = _useCommonChatAPI.headerValue,
|
|
80
76
|
msgLoading = _useCommonChatAPI.msgLoading,
|
|
81
77
|
onSucessExcel = _useCommonChatAPI.onSucessExcel,
|
|
@@ -157,76 +153,76 @@ var CommonChat = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
157
153
|
}
|
|
158
154
|
handleSend(val, agent, isSystemAuto);
|
|
159
155
|
}, [handleSend, startConversationAndChat, conversationId]);
|
|
160
|
-
return /*#__PURE__*/
|
|
156
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
161
157
|
className: styles.main,
|
|
162
|
-
id: "myun_gimi_design_chat"
|
|
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
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
});
|
|
158
|
+
id: "myun_gimi_design_chat"
|
|
159
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
160
|
+
className: styles.chat_content
|
|
161
|
+
}, showHeader && headerValue && /*#__PURE__*/React.createElement("div", {
|
|
162
|
+
className: styles.content_header
|
|
163
|
+
}, replaceBraces(headerValue)), /*#__PURE__*/React.createElement("div", {
|
|
164
|
+
className: styles.scroll_wrapper
|
|
165
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
166
|
+
className: "".concat(styles.scroll_container, " ").concat(isScrolling ? styles.scrolling : ''),
|
|
167
|
+
ref: containerRef
|
|
168
|
+
}, showPrologue && messageList.length === 0 && !isMoreLoading && quickQuestionListPosition === 'top' && /*#__PURE__*/React.createElement(PresetAgentContent, {
|
|
169
|
+
prologue: (agentObj === null || agentObj === void 0 ? void 0 : agentObj.prologue) || '',
|
|
170
|
+
questionList: (agentObj === null || agentObj === void 0 ? void 0 : agentObj.questionList) || [],
|
|
171
|
+
setInputValue: setInputValue,
|
|
172
|
+
layout: 'vertical'
|
|
173
|
+
}), isMoreLoading ? /*#__PURE__*/React.createElement("div", {
|
|
174
|
+
style: {
|
|
175
|
+
height: '100%'
|
|
176
|
+
}
|
|
177
|
+
}, /*#__PURE__*/React.createElement(AiLoading, null)) : /*#__PURE__*/React.createElement(MessageList, _extends({
|
|
178
|
+
chatList: messageList || defaultMessages,
|
|
179
|
+
handleSend: handleSend,
|
|
180
|
+
inputModelRef: inputModelRef,
|
|
181
|
+
msgLoading: msgLoading,
|
|
182
|
+
onSucessExcel: onSucessExcel,
|
|
183
|
+
onFailureExcel: onFailureExcel,
|
|
184
|
+
onRegenerateClick: regenerate,
|
|
185
|
+
onRetryExcel: onRetryExcel,
|
|
186
|
+
chatUI: chatUI,
|
|
187
|
+
model: model,
|
|
188
|
+
isPlaying: isPlaying,
|
|
189
|
+
playTTSByText: playTTSByText,
|
|
190
|
+
stopTTSByText: stopTTSByText
|
|
191
|
+
}, props.messageConfig))), showBackBottom && /*#__PURE__*/React.createElement("div", {
|
|
192
|
+
className: styles.backBottomBtn,
|
|
193
|
+
onClick: function onClick() {
|
|
194
|
+
return scrollBottomForce(true);
|
|
195
|
+
}
|
|
196
|
+
}, /*#__PURE__*/React.createElement(IconChevronDown, {
|
|
197
|
+
size: "large"
|
|
198
|
+
}))), showInput && !isMoreLoading && /*#__PURE__*/React.createElement(ChatInput, _extends({
|
|
199
|
+
ref: chatInputRef
|
|
200
|
+
}, chatInputConfig, {
|
|
201
|
+
onSend: handleInputSend,
|
|
202
|
+
disabled: disableSend || isMoreLoading,
|
|
203
|
+
defaultPrompt: messageList.length > 0 ? '' : (agentObj === null || agentObj === void 0 ? void 0 : agentObj.defaultPrompt) || '',
|
|
204
|
+
titleSlot: messageList.length > 0 ? '' : (agentObj === null || agentObj === void 0 ? void 0 : agentObj.agentName) || '',
|
|
205
|
+
showDefaultPrompt: messageList.length === 0
|
|
206
|
+
// onContentChange={onInputValueChange}
|
|
207
|
+
,
|
|
208
|
+
onInterrupt: handleInterrupt,
|
|
209
|
+
isRecording: isRecording,
|
|
210
|
+
isVoiceGetting: isExecuting,
|
|
211
|
+
recordingCount: recordingCount,
|
|
212
|
+
asrText: asrText,
|
|
213
|
+
shortAsrClick: shortAsrClick,
|
|
214
|
+
disableVoiceCommunication: disableVoiceCommunication,
|
|
215
|
+
onHistoryReload: onHistoryReload
|
|
216
|
+
}, props.chatInputConfig)), showPrologue && messageList.length === 0 && !isMoreLoading && quickQuestionListPosition === 'bottom' && /*#__PURE__*/React.createElement(PresetAgentContent, {
|
|
217
|
+
prologue: '',
|
|
218
|
+
questionList: (agentObj === null || agentObj === void 0 ? void 0 : agentObj.questionList) || [],
|
|
219
|
+
setInputValue: setInputValue,
|
|
220
|
+
layout: 'horizontal'
|
|
221
|
+
})), /*#__PURE__*/React.createElement(KonwledgeTrace, _extends({}, props.sidebarConfig, {
|
|
222
|
+
chatList: messageList || defaultMessages,
|
|
223
|
+
isOverFlow: model === 'fullscreen' ? false : true
|
|
224
|
+
})), /*#__PURE__*/React.createElement(FileCardSideBar, _extends({}, props.sidebarConfig, {
|
|
225
|
+
isOverFlow: model === 'fullscreen' ? false : true
|
|
226
|
+
})), /*#__PURE__*/React.createElement(OfficeFilePreviewPanel, null));
|
|
231
227
|
});
|
|
232
228
|
export default CommonChat;
|
|
@@ -1,14 +1,8 @@
|
|
|
1
|
-
function
|
|
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); }
|
|
1
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
7
2
|
import { store } from "../../store";
|
|
8
3
|
import CommonChat from "./CommonChat";
|
|
9
4
|
import React from 'react';
|
|
10
5
|
import { Provider } from 'react-redux';
|
|
11
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
12
6
|
var GimiChatComponent = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
13
7
|
var commonChatRef = React.useRef(null);
|
|
14
8
|
React.useImperativeHandle(ref, function () {
|
|
@@ -20,11 +14,10 @@ var GimiChatComponent = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
20
14
|
inputEditor: ((_commonChatRef$curren4 = commonChatRef.current) === null || _commonChatRef$curren4 === void 0 ? void 0 : _commonChatRef$curren4.inputEditor) || null
|
|
21
15
|
};
|
|
22
16
|
});
|
|
23
|
-
return /*#__PURE__*/
|
|
24
|
-
store: store
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
});
|
|
17
|
+
return /*#__PURE__*/React.createElement(Provider, {
|
|
18
|
+
store: store
|
|
19
|
+
}, /*#__PURE__*/React.createElement(CommonChat, _extends({}, props, {
|
|
20
|
+
ref: commonChatRef
|
|
21
|
+
})));
|
|
29
22
|
});
|
|
30
23
|
export default GimiChatComponent;
|