@myun/gimi-chat 0.0.8 → 0.1.0
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/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/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/index.d.ts +2 -0
- package/dist/index.js +3 -1
- package/dist/interfaces/index.d.ts +3 -0
- package/dist/interfaces/index.js +3 -0
- package/dist/types/answer.d.ts +16 -0
- package/dist/types/chat.d.ts +124 -0
- package/dist/types/file.d.ts +20 -0
- package/dist/types/index.d.ts +3 -0
- package/dist/types/index.js +3 -0
- package/dist/types/modules.d.ts +36 -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
- package/dist/components/templates/demo/demo.d.ts +0 -2
- package/dist/components/templates/demo/demo.js +0 -111
- package/dist/components/work-flow-content/demo.d.ts +0 -3
- package/dist/components/work-flow-content/demo.js +0 -12
package/dist/apis/useApi.d.ts
CHANGED
|
@@ -53,5 +53,7 @@ declare const useApi: () => {
|
|
|
53
53
|
answerId: number;
|
|
54
54
|
questionId: number;
|
|
55
55
|
}) => Promise<FetchResponse<any>>;
|
|
56
|
+
getReferenceVideoList: (params: any) => Promise<FetchResponse<any>>;
|
|
57
|
+
getReferenceCourseList: (params: any) => Promise<FetchResponse<any>>;
|
|
56
58
|
};
|
|
57
59
|
export default useApi;
|
package/dist/apis/useApi.js
CHANGED
|
@@ -48,6 +48,8 @@ var useApi = function useApi() {
|
|
|
48
48
|
return _ref.apply(this, arguments);
|
|
49
49
|
};
|
|
50
50
|
}();
|
|
51
|
+
|
|
52
|
+
// 删除会话
|
|
51
53
|
var deleteConversationById = /*#__PURE__*/function () {
|
|
52
54
|
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(conversationId) {
|
|
53
55
|
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
@@ -68,6 +70,8 @@ var useApi = function useApi() {
|
|
|
68
70
|
return _ref2.apply(this, arguments);
|
|
69
71
|
};
|
|
70
72
|
}();
|
|
73
|
+
|
|
74
|
+
// 获取智能体详情
|
|
71
75
|
var getAgentDetail = /*#__PURE__*/function () {
|
|
72
76
|
var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(agentId) {
|
|
73
77
|
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
|
|
@@ -88,6 +92,8 @@ var useApi = function useApi() {
|
|
|
88
92
|
return _ref3.apply(this, arguments);
|
|
89
93
|
};
|
|
90
94
|
}();
|
|
95
|
+
|
|
96
|
+
// 点赞/点踩
|
|
91
97
|
var handleMark = /*#__PURE__*/function () {
|
|
92
98
|
var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(params) {
|
|
93
99
|
return _regeneratorRuntime().wrap(function _callee4$(_context4) {
|
|
@@ -104,6 +110,8 @@ var useApi = function useApi() {
|
|
|
104
110
|
return _ref4.apply(this, arguments);
|
|
105
111
|
};
|
|
106
112
|
}();
|
|
113
|
+
|
|
114
|
+
// 停止流式输出
|
|
107
115
|
var stopStreamOut = /*#__PURE__*/function () {
|
|
108
116
|
var _ref5 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5(params) {
|
|
109
117
|
return _regeneratorRuntime().wrap(function _callee5$(_context5) {
|
|
@@ -122,6 +130,8 @@ var useApi = function useApi() {
|
|
|
122
130
|
return _ref5.apply(this, arguments);
|
|
123
131
|
};
|
|
124
132
|
}();
|
|
133
|
+
|
|
134
|
+
// 获取历史会话消息列表
|
|
125
135
|
var getMessageList = /*#__PURE__*/function () {
|
|
126
136
|
var _ref6 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6(params) {
|
|
127
137
|
return _regeneratorRuntime().wrap(function _callee6$(_context6) {
|
|
@@ -235,7 +245,7 @@ var useApi = function useApi() {
|
|
|
235
245
|
};
|
|
236
246
|
}();
|
|
237
247
|
|
|
238
|
-
//
|
|
248
|
+
// 搜索 - 视频切片
|
|
239
249
|
var getVideoSliceList = /*#__PURE__*/function () {
|
|
240
250
|
var _ref12 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee12(params) {
|
|
241
251
|
return _regeneratorRuntime().wrap(function _callee12$(_context12) {
|
|
@@ -355,6 +365,42 @@ var useApi = function useApi() {
|
|
|
355
365
|
return _ref18.apply(this, arguments);
|
|
356
366
|
};
|
|
357
367
|
}();
|
|
368
|
+
|
|
369
|
+
// 搜索 - 视频引用列表
|
|
370
|
+
var getReferenceVideoList = /*#__PURE__*/function () {
|
|
371
|
+
var _ref19 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee18(params) {
|
|
372
|
+
return _regeneratorRuntime().wrap(function _callee18$(_context18) {
|
|
373
|
+
while (1) switch (_context18.prev = _context18.next) {
|
|
374
|
+
case 0:
|
|
375
|
+
return _context18.abrupt("return", apiRef.current.post('/mcourse/web/wisdomClass/quote/getVideoList', params));
|
|
376
|
+
case 1:
|
|
377
|
+
case "end":
|
|
378
|
+
return _context18.stop();
|
|
379
|
+
}
|
|
380
|
+
}, _callee18);
|
|
381
|
+
}));
|
|
382
|
+
return function getReferenceVideoList(_x17) {
|
|
383
|
+
return _ref19.apply(this, arguments);
|
|
384
|
+
};
|
|
385
|
+
}();
|
|
386
|
+
|
|
387
|
+
// 搜索 - 课程引用列表
|
|
388
|
+
var getReferenceCourseList = /*#__PURE__*/function () {
|
|
389
|
+
var _ref20 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee19(params) {
|
|
390
|
+
return _regeneratorRuntime().wrap(function _callee19$(_context19) {
|
|
391
|
+
while (1) switch (_context19.prev = _context19.next) {
|
|
392
|
+
case 0:
|
|
393
|
+
return _context19.abrupt("return", apiRef.current.post('/mcourse/web/wisdomClass/quote/getProductList', params));
|
|
394
|
+
case 1:
|
|
395
|
+
case "end":
|
|
396
|
+
return _context19.stop();
|
|
397
|
+
}
|
|
398
|
+
}, _callee19);
|
|
399
|
+
}));
|
|
400
|
+
return function getReferenceCourseList(_x18) {
|
|
401
|
+
return _ref20.apply(this, arguments);
|
|
402
|
+
};
|
|
403
|
+
}();
|
|
358
404
|
return {
|
|
359
405
|
getSkillData: getSkillData,
|
|
360
406
|
getProductList: getProductList,
|
|
@@ -372,7 +418,9 @@ var useApi = function useApi() {
|
|
|
372
418
|
handleMark: handleMark,
|
|
373
419
|
getAgentDetail: getAgentDetail,
|
|
374
420
|
deleteConversationById: deleteConversationById,
|
|
375
|
-
getAiCorrection: getAiCorrection
|
|
421
|
+
getAiCorrection: getAiCorrection,
|
|
422
|
+
getReferenceVideoList: getReferenceVideoList,
|
|
423
|
+
getReferenceCourseList: getReferenceCourseList
|
|
376
424
|
};
|
|
377
425
|
};
|
|
378
426
|
export default useApi;
|
|
@@ -36,9 +36,7 @@ import { createPortal } from 'react-dom';
|
|
|
36
36
|
import { useDispatch } from 'react-redux';
|
|
37
37
|
|
|
38
38
|
// 2. 定义组件完整的 Props 接口
|
|
39
|
-
|
|
40
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
41
|
-
import { Fragment as _Fragment } from "react/jsx-runtime";
|
|
39
|
+
|
|
42
40
|
var AiExplain = /*#__PURE__*/forwardRef(function (_ref) {
|
|
43
41
|
var paper = _ref.paper,
|
|
44
42
|
setSpeech = _ref.setSpeech,
|
|
@@ -107,81 +105,59 @@ var AiExplain = /*#__PURE__*/forwardRef(function (_ref) {
|
|
|
107
105
|
var unsupportedShownRef = useRef(false);
|
|
108
106
|
var renderStatus = useMemo(function () {
|
|
109
107
|
if (!audioEnabled) {
|
|
110
|
-
if (isThinking) return /*#__PURE__*/
|
|
111
|
-
className: styles.statusText
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
children: '你已静音'
|
|
117
|
-
});
|
|
108
|
+
if (isThinking) return /*#__PURE__*/React.createElement("div", {
|
|
109
|
+
className: styles.statusText
|
|
110
|
+
}, '你已静音(正在思考中)', " ");
|
|
111
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
112
|
+
className: styles.statusText
|
|
113
|
+
}, '你已静音');
|
|
118
114
|
}
|
|
119
115
|
switch (status) {
|
|
120
116
|
case 0:
|
|
121
|
-
return /*#__PURE__*/
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
children: "\u6B63\u5728\u8FDE\u63A5"
|
|
128
|
-
})]
|
|
129
|
-
});
|
|
117
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(LottieImg, {
|
|
118
|
+
name: "aiLoading",
|
|
119
|
+
size: [30, 50]
|
|
120
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
121
|
+
className: styles.statusText
|
|
122
|
+
}, "\u6B63\u5728\u8FDE\u63A5"));
|
|
130
123
|
case 1:
|
|
131
124
|
case 6:
|
|
132
|
-
return /*#__PURE__*/
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
children: "\u6B63\u5728\u8046\u542C"
|
|
139
|
-
})]
|
|
140
|
-
});
|
|
125
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(LottieImg, {
|
|
126
|
+
name: "aiOutputLoading",
|
|
127
|
+
size: [34, 60]
|
|
128
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
129
|
+
className: styles.statusText
|
|
130
|
+
}, "\u6B63\u5728\u8046\u542C"));
|
|
141
131
|
case 2:
|
|
142
|
-
return /*#__PURE__*/
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
}), /*#__PURE__*/_jsx("div", {
|
|
152
|
-
className: styles.statusText,
|
|
153
|
-
children: "\u8BF4\u8BDD\u6216\u70B9\u51FB\u53EF\u4EE5\u6253\u65AD\u6211"
|
|
154
|
-
})]
|
|
155
|
-
});
|
|
132
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
|
|
133
|
+
className: styles.statusImg
|
|
134
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
135
|
+
className: styles.iconOutside
|
|
136
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
137
|
+
className: styles.iconInside
|
|
138
|
+
}))), /*#__PURE__*/React.createElement("div", {
|
|
139
|
+
className: styles.statusText
|
|
140
|
+
}, "\u8BF4\u8BDD\u6216\u70B9\u51FB\u53EF\u4EE5\u6253\u65AD\u6211"));
|
|
156
141
|
case 4:
|
|
157
142
|
// 网络错误状态打断TextLoading
|
|
158
143
|
setIsTextLoading(false);
|
|
159
|
-
return /*#__PURE__*/
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
children: "\u70B9\u51FB\u91CD\u65B0\u8FDE\u63A5"
|
|
163
|
-
})
|
|
164
|
-
});
|
|
144
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
|
|
145
|
+
className: classNames(styles.statusText, styles.danger, styles.pointer)
|
|
146
|
+
}, "\u70B9\u51FB\u91CD\u65B0\u8FDE\u63A5"));
|
|
165
147
|
case 5:
|
|
166
|
-
return /*#__PURE__*/
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
children: "\u4F60\u53EF\u4EE5\u5F00\u59CB\u8BF4\u8BDD"
|
|
173
|
-
})]
|
|
174
|
-
});
|
|
148
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(LottieImg, {
|
|
149
|
+
name: "aiOutputLoading",
|
|
150
|
+
size: [34, 60]
|
|
151
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
152
|
+
className: styles.statusText
|
|
153
|
+
}, "\u4F60\u53EF\u4EE5\u5F00\u59CB\u8BF4\u8BDD"));
|
|
175
154
|
case 7:
|
|
176
|
-
return /*#__PURE__*/
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
children: "\u6B63\u5728\u601D\u8003"
|
|
183
|
-
})]
|
|
184
|
-
});
|
|
155
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(LottieImg, {
|
|
156
|
+
name: "aiOutputLoading",
|
|
157
|
+
size: [34, 60]
|
|
158
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
159
|
+
className: styles.statusText
|
|
160
|
+
}, "\u6B63\u5728\u601D\u8003"));
|
|
185
161
|
default:
|
|
186
162
|
return null;
|
|
187
163
|
}
|
|
@@ -984,119 +960,97 @@ var AiExplain = /*#__PURE__*/forwardRef(function (_ref) {
|
|
|
984
960
|
clearTimeout(timer.current);
|
|
985
961
|
};
|
|
986
962
|
}, []);
|
|
987
|
-
return /*#__PURE__*/createPortal( /*#__PURE__*/
|
|
988
|
-
className: styles.aiChat
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
overlayClassName: "ai-chat-tooltip",
|
|
1080
|
-
children: /*#__PURE__*/_jsx(Tooltip, {
|
|
1081
|
-
placement: "top",
|
|
1082
|
-
title: '挂断电话',
|
|
1083
|
-
overlayClassName: "ai-chat-tooltip",
|
|
1084
|
-
children: /*#__PURE__*/_jsx("div", {
|
|
1085
|
-
className: styles.btnItem,
|
|
1086
|
-
onClick: function onClick() {
|
|
1087
|
-
return handleBack();
|
|
1088
|
-
},
|
|
1089
|
-
children: /*#__PURE__*/_jsx(IconFontCom, {
|
|
1090
|
-
type: "icon-a-mti-guaduanshi",
|
|
1091
|
-
size: 34
|
|
1092
|
-
})
|
|
1093
|
-
})
|
|
1094
|
-
})
|
|
1095
|
-
})]
|
|
1096
|
-
})]
|
|
1097
|
-
})]
|
|
1098
|
-
})]
|
|
1099
|
-
})]
|
|
1100
|
-
}), document.body);
|
|
963
|
+
return /*#__PURE__*/createPortal( /*#__PURE__*/React.createElement("div", {
|
|
964
|
+
className: styles.aiChat
|
|
965
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
966
|
+
className: styles.bgImg
|
|
967
|
+
}, /*#__PURE__*/React.createElement(LottieImg, {
|
|
968
|
+
name: "aiBg",
|
|
969
|
+
size: ['100%', '100%']
|
|
970
|
+
})), /*#__PURE__*/React.createElement(Tooltip, {
|
|
971
|
+
placement: "bottomRight",
|
|
972
|
+
overlayClassName: "out-tooltip ai-chat-tooltip",
|
|
973
|
+
visible: isFirstUse,
|
|
974
|
+
title: showCaptions ? '点击可关闭字幕' : '点击可开启字幕'
|
|
975
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
976
|
+
className: styles.rightWrap
|
|
977
|
+
}, /*#__PURE__*/React.createElement(Tooltip, {
|
|
978
|
+
placement: "bottom",
|
|
979
|
+
title: showCaptions ? '关闭字幕' : '打开字幕',
|
|
980
|
+
overlayClassName: "ai-chat-tooltip"
|
|
981
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
982
|
+
className: styles.iconWrap
|
|
983
|
+
}, /*#__PURE__*/React.createElement(IconFontCom, {
|
|
984
|
+
type: !showCaptions ? 'icon-a-tongyong-zhankaibeifen1' : 'icon-tongyong-zhankaibeifen1',
|
|
985
|
+
size: 20,
|
|
986
|
+
extraStyle: {
|
|
987
|
+
cursor: 'pointer'
|
|
988
|
+
},
|
|
989
|
+
onClick: function onClick() {
|
|
990
|
+
return setShowCaptions(!showCaptions);
|
|
991
|
+
}
|
|
992
|
+
}))))), /*#__PURE__*/React.createElement("div", {
|
|
993
|
+
className: classNames(styles.main)
|
|
994
|
+
}, /*#__PURE__*/React.createElement(Header, {
|
|
995
|
+
title: headerTitle
|
|
996
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
997
|
+
className: classNames(styles.content, 'scrollBar'),
|
|
998
|
+
ref: containerRef
|
|
999
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
1000
|
+
className: styles.container
|
|
1001
|
+
}, showCaptions ? status === 5 || status === 6 ? /*#__PURE__*/React.createElement("div", {
|
|
1002
|
+
className: styles.tips
|
|
1003
|
+
}, status === 5 ? '请说话' : '正在听...') : /*#__PURE__*/React.createElement("div", null, messageList.map(function (item) {
|
|
1004
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
1005
|
+
className: classNames(styles.item, _defineProperty({}, styles.answer, item.type === 'answer')),
|
|
1006
|
+
key: item.id
|
|
1007
|
+
}, item.content);
|
|
1008
|
+
}), isTextLoading ? /*#__PURE__*/React.createElement(Spin, null) : null) : /*#__PURE__*/React.createElement("div", {
|
|
1009
|
+
className: styles.voiceWrap
|
|
1010
|
+
}, /*#__PURE__*/React.createElement(LottieImg, {
|
|
1011
|
+
name: status === 2 ? 'aiOutputStrengthen' : 'aiOutputNormal',
|
|
1012
|
+
size: [242, 235]
|
|
1013
|
+
}))), /*#__PURE__*/React.createElement("div", {
|
|
1014
|
+
className: styles.bottom
|
|
1015
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
1016
|
+
className: classNames(styles.status, _defineProperty({}, styles.pointer, status === 2)),
|
|
1017
|
+
onClick: clickInterrupt
|
|
1018
|
+
}, renderStatus), /*#__PURE__*/React.createElement("div", {
|
|
1019
|
+
className: styles.btnWrap
|
|
1020
|
+
}, /*#__PURE__*/React.createElement(Tooltip, {
|
|
1021
|
+
placement: "top",
|
|
1022
|
+
visible: isFirstUse,
|
|
1023
|
+
title: audioEnabled ? '关闭麦克风' : '打开麦克风',
|
|
1024
|
+
overlayClassName: "ai-chat-tooltip"
|
|
1025
|
+
}, /*#__PURE__*/React.createElement(Tooltip, {
|
|
1026
|
+
placement: "top",
|
|
1027
|
+
title: audioEnabled ? '关闭麦克风' : '打开麦克风',
|
|
1028
|
+
overlayClassName: "ai-chat-tooltip"
|
|
1029
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
1030
|
+
className: classNames(styles.btnItem, isDisable ? styles.disable : ''),
|
|
1031
|
+
onClick: function onClick() {
|
|
1032
|
+
return handleVoice();
|
|
1033
|
+
}
|
|
1034
|
+
}, /*#__PURE__*/React.createElement(IconFontCom, {
|
|
1035
|
+
type: audioEnabled ? 'icon-voice' : 'icon-a-voice1',
|
|
1036
|
+
size: 34
|
|
1037
|
+
})))), /*#__PURE__*/React.createElement(Tooltip, {
|
|
1038
|
+
placement: "top",
|
|
1039
|
+
visible: isFirstUse,
|
|
1040
|
+
title: '挂断电话',
|
|
1041
|
+
overlayClassName: "ai-chat-tooltip"
|
|
1042
|
+
}, /*#__PURE__*/React.createElement(Tooltip, {
|
|
1043
|
+
placement: "top",
|
|
1044
|
+
title: '挂断电话',
|
|
1045
|
+
overlayClassName: "ai-chat-tooltip"
|
|
1046
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
1047
|
+
className: styles.btnItem,
|
|
1048
|
+
onClick: function onClick() {
|
|
1049
|
+
return handleBack();
|
|
1050
|
+
}
|
|
1051
|
+
}, /*#__PURE__*/React.createElement(IconFontCom, {
|
|
1052
|
+
type: "icon-a-mti-guaduanshi",
|
|
1053
|
+
size: 34
|
|
1054
|
+
}))))))))), document.body);
|
|
1101
1055
|
});
|
|
1102
1056
|
export default AiExplain;
|
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
-
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
4
2
|
var AICorrection = function AICorrection(_ref) {
|
|
5
3
|
var value = _ref.value;
|
|
6
4
|
var data = {
|
|
@@ -14,45 +12,34 @@ var AICorrection = function AICorrection(_ref) {
|
|
|
14
12
|
// console.error(error);
|
|
15
13
|
return null;
|
|
16
14
|
}
|
|
17
|
-
return /*#__PURE__*/
|
|
15
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
18
16
|
style: {
|
|
19
17
|
display: 'flex',
|
|
20
18
|
flexDirection: 'column',
|
|
21
19
|
gap: '20px'
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
children: [/*#__PURE__*/_jsx("span", {
|
|
47
|
-
style: {
|
|
48
|
-
fontSize: '18px',
|
|
49
|
-
fontWeight: 600
|
|
50
|
-
},
|
|
51
|
-
children: "\u8BC4\u8BED"
|
|
52
|
-
}), /*#__PURE__*/_jsx("span", {
|
|
53
|
-
children: data.comment
|
|
54
|
-
})]
|
|
55
|
-
})]
|
|
56
|
-
});
|
|
20
|
+
}
|
|
21
|
+
}, /*#__PURE__*/React.createElement("span", null, "\u6839\u636E\u8003\u751F\u7684\u56DE\u7B54\uFF0C\u7ED9\u51FA\u4EE5\u4E0B\u5F97\u5206\u53CA\u8BC4\u8BED\uFF1A"), /*#__PURE__*/React.createElement("div", {
|
|
22
|
+
style: {
|
|
23
|
+
display: 'flex',
|
|
24
|
+
flexDirection: 'column',
|
|
25
|
+
gap: '10px'
|
|
26
|
+
}
|
|
27
|
+
}, /*#__PURE__*/React.createElement("span", {
|
|
28
|
+
style: {
|
|
29
|
+
fontSize: '18px',
|
|
30
|
+
fontWeight: 600
|
|
31
|
+
}
|
|
32
|
+
}, "\u5F97\u5206"), /*#__PURE__*/React.createElement("span", null, data.score, "\u5206")), /*#__PURE__*/React.createElement("div", {
|
|
33
|
+
style: {
|
|
34
|
+
display: 'flex',
|
|
35
|
+
flexDirection: 'column',
|
|
36
|
+
gap: '10px'
|
|
37
|
+
}
|
|
38
|
+
}, /*#__PURE__*/React.createElement("span", {
|
|
39
|
+
style: {
|
|
40
|
+
fontSize: '18px',
|
|
41
|
+
fontWeight: 600
|
|
42
|
+
}
|
|
43
|
+
}, "\u8BC4\u8BED"), /*#__PURE__*/React.createElement("span", null, data.comment)));
|
|
57
44
|
};
|
|
58
45
|
export default AICorrection;
|
|
@@ -1,18 +1,14 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import styles from "./index.module.css";
|
|
3
3
|
import LottieImg from "../lottie-img";
|
|
4
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
5
|
-
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
6
4
|
var AiLoading = function AiLoading() {
|
|
7
|
-
return /*#__PURE__*/
|
|
8
|
-
className: styles.aiLoading
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
})]
|
|
16
|
-
});
|
|
5
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
6
|
+
className: styles.aiLoading
|
|
7
|
+
}, /*#__PURE__*/React.createElement(LottieImg, {
|
|
8
|
+
name: "aiLoading",
|
|
9
|
+
size: [30, 50]
|
|
10
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
11
|
+
className: styles.text
|
|
12
|
+
}, "\u6570\u636E\u52A0\u8F7D\u4E2D~"));
|
|
17
13
|
};
|
|
18
14
|
export default AiLoading;
|
|
@@ -22,6 +22,9 @@ interface AnswerItemProps {
|
|
|
22
22
|
enableUnLike?: boolean;
|
|
23
23
|
enableRegenerate?: boolean;
|
|
24
24
|
enableVoicePlay?: boolean;
|
|
25
|
+
onDownloadCallback?: () => void;
|
|
26
|
+
reasoningTitle?: string;
|
|
27
|
+
model: 'fullscreen' | 'sidebar';
|
|
25
28
|
}
|
|
26
29
|
declare const AnswerItem: React.FC<AnswerItemProps>;
|
|
27
30
|
export default AnswerItem;
|