@myun/gimi-chat 0.0.7 → 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.
Files changed (89) hide show
  1. package/dist/apis/useApi.d.ts +2 -0
  2. package/dist/apis/useApi.js +50 -2
  3. package/dist/components/ai-chat-dialogue/index.js +135 -181
  4. package/dist/components/ai-correction/index.js +25 -38
  5. package/dist/components/ai-loading/index.js +8 -12
  6. package/dist/components/answer-item/index.d.ts +3 -0
  7. package/dist/components/answer-item/index.js +126 -135
  8. package/dist/components/ask-card/index.js +33 -42
  9. package/dist/components/chat-input/extension/index.d.ts +2 -0
  10. package/dist/components/chat-input/extension/index.js +2 -0
  11. package/dist/components/chat-input/extension/keydown/index.d.ts +3 -0
  12. package/dist/components/chat-input/extension/keydown/index.js +37 -0
  13. package/dist/components/chat-input/extension/title-slot/Component.d.ts +4 -0
  14. package/dist/components/chat-input/extension/title-slot/Component.js +18 -0
  15. package/dist/components/chat-input/extension/title-slot/index.d.ts +3 -0
  16. package/dist/components/chat-input/extension/title-slot/index.js +47 -0
  17. package/dist/components/chat-input/extension/title-slot/index.less +22 -0
  18. package/dist/components/chat-input/index.d.ts +4 -0
  19. package/dist/components/chat-input/index.js +144 -145
  20. package/dist/components/chat-input/index.module.css +7 -0
  21. package/dist/components/chat-voice/VoiceCommunication.js +21 -23
  22. package/dist/components/chat-voice/VoiceRecord.js +21 -24
  23. package/dist/components/conversation-delete/index.js +8 -10
  24. package/dist/components/dots-loading/index.js +7 -10
  25. package/dist/components/empty/index.js +7 -12
  26. package/dist/components/excel-components/ExcelCard.js +3 -7
  27. package/dist/components/excel-components/ExcelExcuting.js +43 -60
  28. package/dist/components/excel-components/ExcelFailCard.js +10 -15
  29. package/dist/components/excel-components/ExcelSuccessCard.d.ts +5 -1
  30. package/dist/components/excel-components/ExcelSuccessCard.js +13 -6
  31. package/dist/components/file-card/fileCardSidebar.js +17 -23
  32. package/dist/components/file-card/index.d.ts +3 -0
  33. package/dist/components/file-card/index.js +59 -69
  34. package/dist/components/file-card/index.module.css +1 -1
  35. package/dist/components/file-preview/index.js +62 -37
  36. package/dist/components/file-preview/index.module.css +33 -0
  37. package/dist/components/file-upload/index.js +7 -10
  38. package/dist/components/file-upload/uploadV1.js +27 -33
  39. package/dist/components/gimi-sidebar/index.js +13 -20
  40. package/dist/components/header/index.js +11 -18
  41. package/dist/components/iconfont-com/index.js +33 -12
  42. package/dist/components/index.d.ts +1 -1
  43. package/dist/components/index.js +1 -1
  44. package/dist/components/knowledge-trace/KnowledgeIconComponent.js +22 -28
  45. package/dist/components/knowledge-trace/classList.js +28 -37
  46. package/dist/components/knowledge-trace/documentList.js +27 -36
  47. package/dist/components/knowledge-trace/index.js +21 -28
  48. package/dist/components/knowledge-trace/videoList.js +36 -46
  49. package/dist/components/lottie-img/index.js +8 -10
  50. package/dist/components/message-actions/CopyButton.d.ts +1 -1
  51. package/dist/components/message-actions/CopyButton.js +22 -25
  52. package/dist/components/message-actions/LikeButton.js +22 -25
  53. package/dist/components/message-actions/RegenerateButton.js +18 -21
  54. package/dist/components/message-actions/UnLikeButton.js +22 -25
  55. package/dist/components/message-actions/VoicePlay.js +22 -25
  56. package/dist/components/message-list/index.js +83 -87
  57. package/dist/components/no-microphone-root/index.js +29 -39
  58. package/dist/components/preset-agent-content/index.d.ts +1 -0
  59. package/dist/components/preset-agent-content/index.js +27 -20
  60. package/dist/components/quoted-content/index.d.ts +3 -0
  61. package/dist/components/quoted-content/index.js +271 -163
  62. package/dist/components/quoted-content/index.module.css +20 -0
  63. package/dist/components/reasoning-content/index.d.ts +3 -2
  64. package/dist/components/reasoning-content/index.js +50 -61
  65. package/dist/components/reference-content/index.js +62 -71
  66. package/dist/components/reference-content/index.module.css +1 -0
  67. package/dist/components/search-result/index.d.ts +7 -0
  68. package/dist/components/search-result/index.js +182 -0
  69. package/dist/components/search-result/index.module.css +235 -0
  70. package/dist/components/templates/CommonChat.js +75 -79
  71. package/dist/components/templates/GimiChatComponent.js +6 -13
  72. package/dist/components/templates/demo/demo.js +109 -103
  73. package/dist/components/upload-list/index.js +41 -56
  74. package/dist/components/voice-bars/index.js +19 -22
  75. package/dist/components/voice-check-dialog/index.js +17 -24
  76. package/dist/components/voice-recording/index.js +42 -57
  77. package/dist/components/work-flow-content/demo.js +1 -2
  78. package/dist/components/work-flow-content/index.js +8 -11
  79. package/dist/hooks/useChatActions.d.ts +1 -1
  80. package/dist/hooks/useChatActions.js +3 -1
  81. package/dist/hooks/useCommonChatAPI.d.ts +2 -1
  82. package/dist/hooks/useCommonChatAPI.js +10 -8
  83. package/dist/hooks/useQuoted.d.ts +12 -0
  84. package/dist/hooks/useQuoted.js +202 -0
  85. package/dist/utils/aes.d.ts +21 -0
  86. package/dist/utils/aes.js +61 -0
  87. package/dist/utils/chatInputUtil.d.ts +1 -1
  88. package/dist/utils/chatInputUtil.js +4 -3
  89. package/package.json +6 -2
@@ -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 _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); }
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__*/_jsxs("div", {
156
+ return /*#__PURE__*/React.createElement("div", {
161
157
  className: styles.main,
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
- });
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 _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); }
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__*/_jsx(Provider, {
24
- store: store,
25
- children: /*#__PURE__*/_jsx(CommonChat, _objectSpread(_objectSpread({}, props), {}, {
26
- ref: commonChatRef
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;