@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.
Files changed (98) hide show
  1. package/dist/components/ai-chat-dialogue/index.js +182 -136
  2. package/dist/components/ai-chat-dialogue/index.module.css +230 -0
  3. package/dist/components/ai-correction/index.js +38 -25
  4. package/dist/components/ai-loading/index.js +13 -9
  5. package/dist/components/ai-loading/index.module.css +11 -0
  6. package/dist/components/answer-item/index.js +136 -114
  7. package/dist/components/answer-item/index.module.css +266 -0
  8. package/dist/components/ask-card/index.js +43 -34
  9. package/dist/components/ask-card/index.module.css +122 -0
  10. package/dist/components/chat-input/index.js +136 -115
  11. package/dist/components/chat-input/index.module.css +42 -0
  12. package/dist/components/chat-voice/VoiceCommunication.js +23 -21
  13. package/dist/components/chat-voice/VoiceRecord.js +24 -21
  14. package/dist/components/conversation-delete/index.js +10 -8
  15. package/dist/components/dots-loading/index.js +11 -8
  16. package/dist/components/dots-loading/index.module.css +41 -0
  17. package/dist/components/empty/index.js +13 -8
  18. package/dist/components/empty/index.module.css +24 -0
  19. package/dist/components/excel-components/ExcelCard.js +7 -3
  20. package/dist/components/excel-components/ExcelExcuting.js +61 -44
  21. package/dist/components/excel-components/ExcelFailCard.js +16 -11
  22. package/dist/components/excel-components/ExcelSuccessCard.js +3 -2
  23. package/dist/components/excel-components/index.module.css +212 -0
  24. package/dist/components/excel-components/styles.module.css +178 -0
  25. package/dist/components/file-card/fileCardSidebar.js +24 -17
  26. package/dist/components/file-card/index.js +69 -50
  27. package/dist/components/file-card/index.module.css +139 -0
  28. package/dist/components/file-preview/index.js +39 -34
  29. package/dist/components/file-preview/index.module.css +83 -0
  30. package/dist/components/file-upload/index.js +10 -7
  31. package/dist/components/file-upload/uploadV1.js +33 -27
  32. package/dist/components/gimi-sidebar/index.js +21 -14
  33. package/dist/components/gimi-sidebar/index.module.css +118 -0
  34. package/dist/components/header/index.js +19 -12
  35. package/dist/components/header/index.module.css +19 -0
  36. package/dist/components/iconfont-com/index.js +2 -1
  37. package/dist/components/knowledge-trace/KnowledgeIconComponent.js +29 -23
  38. package/dist/components/knowledge-trace/classList.js +38 -29
  39. package/dist/components/knowledge-trace/documentList.js +37 -28
  40. package/dist/components/knowledge-trace/index.js +29 -22
  41. package/dist/components/knowledge-trace/index.module.css +254 -0
  42. package/dist/components/knowledge-trace/videoList.js +47 -37
  43. package/dist/components/lottie-img/index.js +10 -8
  44. package/dist/components/message-actions/CopyButton.js +25 -22
  45. package/dist/components/message-actions/LikeButton.js +25 -22
  46. package/dist/components/message-actions/RegenerateButton.js +21 -18
  47. package/dist/components/message-actions/UnLikeButton.js +25 -22
  48. package/dist/components/message-actions/VoicePlay.js +25 -22
  49. package/dist/components/message-list/index.js +86 -76
  50. package/dist/components/message-list/index.module.css +261 -0
  51. package/dist/components/no-microphone-root/index.js +40 -30
  52. package/dist/components/no-microphone-root/index.module.css +48 -0
  53. package/dist/components/preset-agent-content/index.js +21 -16
  54. package/dist/components/preset-agent-content/index.module.css +46 -0
  55. package/dist/components/quoted-content/index.module.css +80 -0
  56. package/dist/components/reasoning-content/index.js +56 -43
  57. package/dist/components/reasoning-content/index.module.css +169 -0
  58. package/dist/components/reference-content/index.js +73 -64
  59. package/dist/components/reference-content/index.module.css +84 -0
  60. package/dist/components/templates/CommonChat.js +79 -65
  61. package/dist/components/templates/GimiChatComponent.js +13 -6
  62. package/dist/components/templates/demo/demo.js +104 -103
  63. package/dist/components/templates/index.module.css +109 -0
  64. package/dist/components/upload-list/index.js +57 -42
  65. package/dist/components/upload-list/index.module.css +119 -0
  66. package/dist/components/voice-bars/index.js +22 -19
  67. package/dist/components/voice-check-dialog/index.js +25 -18
  68. package/dist/components/voice-check-dialog/{index.module.scss → index.module.css} +2 -2
  69. package/dist/components/voice-recording/index.js +58 -43
  70. package/dist/components/voice-recording/index.module.css +41 -0
  71. package/dist/components/work-flow-content/demo.js +2 -1
  72. package/dist/components/work-flow-content/index.js +13 -10
  73. package/dist/components/work-flow-content/index.module.css +24 -0
  74. package/package.json +7 -6
  75. package/dist/components/ai-chat-dialogue/index.module.scss +0 -272
  76. package/dist/components/ai-loading/index.module.scss +0 -11
  77. package/dist/components/answer-item/index.module.scss +0 -295
  78. package/dist/components/ask-card/index.module.scss +0 -125
  79. package/dist/components/chat-input/index.module.scss +0 -44
  80. package/dist/components/dots-loading/index.module.scss +0 -45
  81. package/dist/components/empty/index.module.scss +0 -27
  82. package/dist/components/excel-components/index.module.scss +0 -210
  83. package/dist/components/excel-components/styles.module.scss +0 -186
  84. package/dist/components/file-card/index.module.scss +0 -139
  85. package/dist/components/file-preview/index.module.scss +0 -120
  86. package/dist/components/gimi-sidebar/index.module.scss +0 -136
  87. package/dist/components/header/index.module.scss +0 -26
  88. package/dist/components/knowledge-trace/index.module.scss +0 -262
  89. package/dist/components/message-list/index.module.scss +0 -304
  90. package/dist/components/no-microphone-root/index.module.scss +0 -42
  91. package/dist/components/preset-agent-content/index.module.scss +0 -48
  92. package/dist/components/quoted-content/index.module.scss +0 -76
  93. package/dist/components/reasoning-content/index.module.scss +0 -164
  94. package/dist/components/reference-content/index.module.scss +0 -73
  95. package/dist/components/templates/index.module.scss +0 -119
  96. package/dist/components/upload-list/index.module.scss +0 -119
  97. package/dist/components/voice-recording/index.module.scss +0 -41
  98. package/dist/components/work-flow-content/index.module.scss +0 -23
@@ -20,7 +20,7 @@ function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" !=
20
20
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
21
21
  import React, { forwardRef, useEffect, useMemo, useRef, useState } from 'react';
22
22
  import LottieImg from "../lottie-img";
23
- import styles from "./index.module.scss";
23
+ import styles from "./index.module.css";
24
24
  import classNames from 'classnames';
25
25
  import { Toast, Tooltip } from '@douyinfe/semi-ui';
26
26
  import Header from "../header";
@@ -36,7 +36,9 @@ import { createPortal } from 'react-dom';
36
36
  import { useDispatch } from 'react-redux';
37
37
 
38
38
  // 2. 定义组件完整的 Props 接口
39
-
39
+ import { jsxs as _jsxs } from "react/jsx-runtime";
40
+ import { jsx as _jsx } from "react/jsx-runtime";
41
+ import { Fragment as _Fragment } from "react/jsx-runtime";
40
42
  var AiExplain = /*#__PURE__*/forwardRef(function (_ref) {
41
43
  var paper = _ref.paper,
42
44
  setSpeech = _ref.setSpeech,
@@ -105,59 +107,81 @@ var AiExplain = /*#__PURE__*/forwardRef(function (_ref) {
105
107
  var unsupportedShownRef = useRef(false);
106
108
  var renderStatus = useMemo(function () {
107
109
  if (!audioEnabled) {
108
- if (isThinking) return /*#__PURE__*/React.createElement("div", {
109
- className: styles.statusText
110
- }, '你已静音(正在思考中)', " ");
111
- return /*#__PURE__*/React.createElement("div", {
112
- className: styles.statusText
113
- }, '你已静音');
110
+ if (isThinking) return /*#__PURE__*/_jsxs("div", {
111
+ className: styles.statusText,
112
+ children: ['你已静音(正在思考中)', " "]
113
+ });
114
+ return /*#__PURE__*/_jsx("div", {
115
+ className: styles.statusText,
116
+ children: '你已静音'
117
+ });
114
118
  }
115
119
  switch (status) {
116
120
  case 0:
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"));
121
+ return /*#__PURE__*/_jsxs(_Fragment, {
122
+ children: [/*#__PURE__*/_jsx(LottieImg, {
123
+ name: "aiLoading",
124
+ size: [30, 50]
125
+ }), /*#__PURE__*/_jsx("div", {
126
+ className: styles.statusText,
127
+ children: "\u6B63\u5728\u8FDE\u63A5"
128
+ })]
129
+ });
123
130
  case 1:
124
131
  case 6:
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"));
132
+ return /*#__PURE__*/_jsxs(_Fragment, {
133
+ children: [/*#__PURE__*/_jsx(LottieImg, {
134
+ name: "aiOutputLoading",
135
+ size: [34, 60]
136
+ }), /*#__PURE__*/_jsx("div", {
137
+ className: styles.statusText,
138
+ children: "\u6B63\u5728\u8046\u542C"
139
+ })]
140
+ });
131
141
  case 2:
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"));
142
+ return /*#__PURE__*/_jsxs(_Fragment, {
143
+ children: [/*#__PURE__*/_jsx("div", {
144
+ className: styles.statusImg,
145
+ children: /*#__PURE__*/_jsx("div", {
146
+ className: styles.iconOutside,
147
+ children: /*#__PURE__*/_jsx("div", {
148
+ className: styles.iconInside
149
+ })
150
+ })
151
+ }), /*#__PURE__*/_jsx("div", {
152
+ className: styles.statusText,
153
+ children: "\u8BF4\u8BDD\u6216\u70B9\u51FB\u53EF\u4EE5\u6253\u65AD\u6211"
154
+ })]
155
+ });
141
156
  case 4:
142
157
  // 网络错误状态打断TextLoading
143
158
  setIsTextLoading(false);
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"));
159
+ return /*#__PURE__*/_jsx(_Fragment, {
160
+ children: /*#__PURE__*/_jsx("div", {
161
+ className: classNames(styles.statusText, styles.danger, styles.pointer),
162
+ children: "\u70B9\u51FB\u91CD\u65B0\u8FDE\u63A5"
163
+ })
164
+ });
147
165
  case 5:
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"));
166
+ return /*#__PURE__*/_jsxs(_Fragment, {
167
+ children: [/*#__PURE__*/_jsx(LottieImg, {
168
+ name: "aiOutputLoading",
169
+ size: [34, 60]
170
+ }), /*#__PURE__*/_jsx("div", {
171
+ className: styles.statusText,
172
+ children: "\u4F60\u53EF\u4EE5\u5F00\u59CB\u8BF4\u8BDD"
173
+ })]
174
+ });
154
175
  case 7:
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"));
176
+ return /*#__PURE__*/_jsxs(_Fragment, {
177
+ children: [/*#__PURE__*/_jsx(LottieImg, {
178
+ name: "aiOutputLoading",
179
+ size: [34, 60]
180
+ }), /*#__PURE__*/_jsx("div", {
181
+ className: styles.statusText,
182
+ children: "\u6B63\u5728\u601D\u8003"
183
+ })]
184
+ });
161
185
  default:
162
186
  return null;
163
187
  }
@@ -960,97 +984,119 @@ var AiExplain = /*#__PURE__*/forwardRef(function (_ref) {
960
984
  clearTimeout(timer.current);
961
985
  };
962
986
  }, []);
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);
987
+ return /*#__PURE__*/createPortal( /*#__PURE__*/_jsxs("div", {
988
+ className: styles.aiChat,
989
+ children: [/*#__PURE__*/_jsx("div", {
990
+ className: styles.bgImg,
991
+ children: /*#__PURE__*/_jsx(LottieImg, {
992
+ name: "aiBg",
993
+ size: ['100%', '100%']
994
+ })
995
+ }), /*#__PURE__*/_jsx(Tooltip, {
996
+ placement: "bottomRight",
997
+ overlayClassName: "out-tooltip ai-chat-tooltip",
998
+ visible: isFirstUse,
999
+ title: showCaptions ? '点击可关闭字幕' : '点击可开启字幕',
1000
+ children: /*#__PURE__*/_jsx("div", {
1001
+ className: styles.rightWrap,
1002
+ children: /*#__PURE__*/_jsx(Tooltip, {
1003
+ placement: "bottom",
1004
+ title: showCaptions ? '关闭字幕' : '打开字幕',
1005
+ overlayClassName: "ai-chat-tooltip",
1006
+ children: /*#__PURE__*/_jsx("div", {
1007
+ className: styles.iconWrap,
1008
+ children: /*#__PURE__*/_jsx(IconFontCom, {
1009
+ type: !showCaptions ? 'icon-a-tongyong-zhankaibeifen1' : 'icon-tongyong-zhankaibeifen1',
1010
+ size: 20,
1011
+ extraStyle: {
1012
+ cursor: 'pointer'
1013
+ },
1014
+ onClick: function onClick() {
1015
+ return setShowCaptions(!showCaptions);
1016
+ }
1017
+ })
1018
+ })
1019
+ })
1020
+ })
1021
+ }), /*#__PURE__*/_jsxs("div", {
1022
+ className: classNames(styles.main),
1023
+ children: [/*#__PURE__*/_jsx(Header, {
1024
+ title: headerTitle
1025
+ }), /*#__PURE__*/_jsxs("div", {
1026
+ className: classNames(styles.content, 'scrollBar'),
1027
+ ref: containerRef,
1028
+ children: [/*#__PURE__*/_jsx("div", {
1029
+ className: styles.container,
1030
+ children: showCaptions ? status === 5 || status === 6 ? /*#__PURE__*/_jsx("div", {
1031
+ className: styles.tips,
1032
+ children: status === 5 ? '请说话' : '正在听...'
1033
+ }) : /*#__PURE__*/_jsxs("div", {
1034
+ children: [messageList.map(function (item) {
1035
+ return /*#__PURE__*/_jsx("div", {
1036
+ className: classNames(styles.item, _defineProperty({}, styles.answer, item.type === 'answer')),
1037
+ children: item.content
1038
+ }, item.id);
1039
+ }), isTextLoading ? /*#__PURE__*/_jsx(Spin, {}) : null]
1040
+ }) : /*#__PURE__*/_jsx("div", {
1041
+ className: styles.voiceWrap,
1042
+ children: /*#__PURE__*/_jsx(LottieImg, {
1043
+ name: status === 2 ? 'aiOutputStrengthen' : 'aiOutputNormal',
1044
+ size: [242, 235]
1045
+ })
1046
+ })
1047
+ }), /*#__PURE__*/_jsxs("div", {
1048
+ className: styles.bottom,
1049
+ children: [/*#__PURE__*/_jsx("div", {
1050
+ className: classNames(styles.status, _defineProperty({}, styles.pointer, status === 2)),
1051
+ onClick: clickInterrupt,
1052
+ children: renderStatus
1053
+ }), /*#__PURE__*/_jsxs("div", {
1054
+ className: styles.btnWrap,
1055
+ children: [/*#__PURE__*/_jsx(Tooltip, {
1056
+ placement: "top",
1057
+ visible: isFirstUse,
1058
+ title: audioEnabled ? '关闭麦克风' : '打开麦克风',
1059
+ overlayClassName: "ai-chat-tooltip",
1060
+ children: /*#__PURE__*/_jsx(Tooltip, {
1061
+ placement: "top",
1062
+ title: audioEnabled ? '关闭麦克风' : '打开麦克风',
1063
+ overlayClassName: "ai-chat-tooltip",
1064
+ children: /*#__PURE__*/_jsx("div", {
1065
+ className: classNames(styles.btnItem, isDisable ? styles.disable : ''),
1066
+ onClick: function onClick() {
1067
+ return handleVoice();
1068
+ },
1069
+ children: /*#__PURE__*/_jsx(IconFontCom, {
1070
+ type: audioEnabled ? 'icon-voice' : 'icon-a-voice1',
1071
+ size: 34
1072
+ })
1073
+ })
1074
+ })
1075
+ }), /*#__PURE__*/_jsx(Tooltip, {
1076
+ placement: "top",
1077
+ visible: isFirstUse,
1078
+ title: '挂断电话',
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);
1055
1101
  });
1056
1102
  export default AiExplain;
@@ -0,0 +1,230 @@
1
+ @charset "UTF-8";
2
+ .aiChat {
3
+ z-index: 99999;
4
+ position: fixed;
5
+ inset: 0;
6
+ }
7
+ .aiChat .bgImg {
8
+ position: absolute;
9
+ top: 0;
10
+ left: 0;
11
+ right: 0;
12
+ bottom: 0;
13
+ }
14
+ .aiChat .back {
15
+ position: absolute;
16
+ top: 30px;
17
+ left: 20px;
18
+ z-index: 2;
19
+ display: flex;
20
+ align-items: center;
21
+ justify-content: center;
22
+ width: 30px;
23
+ height: 30px;
24
+ border-radius: 50%;
25
+ background: #ffffff;
26
+ box-shadow: 0px 0px 10px 0px rgba(153, 167, 191, 0.2);
27
+ border: 1px solid #ebf2ff;
28
+ cursor: pointer;
29
+ }
30
+ .aiChat .rightWrap {
31
+ position: absolute;
32
+ right: 20px;
33
+ top: 30px;
34
+ z-index: 3;
35
+ display: flex;
36
+ align-items: center;
37
+ }
38
+ .aiChat .rightWrap .iconWrap {
39
+ margin-right: 40px;
40
+ }
41
+ .aiChat .introWrap {
42
+ position: absolute;
43
+ top: 60px;
44
+ right: -420px;
45
+ width: 400px;
46
+ height: calc(100vh - 100px);
47
+ padding: 20px 20px 15px;
48
+ background: #f7faff;
49
+ box-shadow: -6px 2px 20px 0px rgba(153, 167, 191, 0.15);
50
+ border-radius: 12px;
51
+ z-index: 2;
52
+ transition: all 0.3s ease;
53
+ }
54
+ .aiChat .introWrap.block {
55
+ right: 20px;
56
+ }
57
+ .aiChat .introWrap .loading {
58
+ display: flex;
59
+ flex-direction: column;
60
+ justify-content: center;
61
+ height: 80%;
62
+ text-align: center;
63
+ }
64
+ .aiChat .introWrap .introHeader {
65
+ display: flex;
66
+ justify-content: space-between;
67
+ align-items: center;
68
+ margin-bottom: 20px;
69
+ }
70
+ .aiChat .introWrap .introHeader .title {
71
+ font-size: 18px;
72
+ font-weight: 600;
73
+ }
74
+ .aiChat .introWrap .introContent {
75
+ height: calc(100% - 60px);
76
+ overflow-y: scroll;
77
+ padding-right: 10px;
78
+ }
79
+ .aiChat .main {
80
+ position: relative;
81
+ height: 100%;
82
+ display: flex;
83
+ flex-direction: column;
84
+ transition: all 0.3s ease;
85
+ }
86
+ .aiChat .main.translate {
87
+ transform: translateX(-160px);
88
+ }
89
+ .aiChat .main .content {
90
+ height: calc(100% - 380px);
91
+ overflow-y: scroll;
92
+ overflow-x: hidden;
93
+ }
94
+ .aiChat .main .content .container {
95
+ width: 800px;
96
+ margin: 0 auto;
97
+ height: 100%;
98
+ }
99
+ .aiChat .main .header {
100
+ display: flex;
101
+ justify-content: center;
102
+ margin-bottom: 30px;
103
+ height: 26px;
104
+ }
105
+ .aiChat .main .header .logo {
106
+ width: 18px;
107
+ height: 18px;
108
+ margin-right: 8px;
109
+ flex-shrink: 0;
110
+ margin-top: 3px;
111
+ }
112
+ .aiChat .main .header .title {
113
+ font-size: 18px;
114
+ text-align: center;
115
+ }
116
+ .aiChat .main .tips {
117
+ font-weight: 400;
118
+ color: #54698c;
119
+ font-size: 17px;
120
+ }
121
+ .aiChat .main .item {
122
+ margin-bottom: 10px;
123
+ font-weight: 400;
124
+ color: #333;
125
+ font-size: 17px;
126
+ line-height: 28px;
127
+ word-break: break-all;
128
+ /* 强制换行 */
129
+ overflow-wrap: break-word;
130
+ /* 在适当位置换行 */
131
+ white-space: pre-wrap;
132
+ }
133
+ .aiChat .main .item.answer {
134
+ font-size: 16;
135
+ color: #b0b0b0;
136
+ }
137
+ .aiChat .main .voiceWrap {
138
+ height: 100%;
139
+ display: flex;
140
+ align-items: center;
141
+ }
142
+ .aiChat .main .bottom {
143
+ display: flex;
144
+ flex-direction: column;
145
+ align-items: center;
146
+ position: absolute;
147
+ bottom: 60px;
148
+ left: 50%;
149
+ transform: translateX(-50%);
150
+ text-align: center;
151
+ }
152
+ .aiChat .main .bottom .pointer {
153
+ cursor: pointer;
154
+ }
155
+ .aiChat .main .bottom .status {
156
+ display: flex;
157
+ flex-direction: column;
158
+ width: 220px;
159
+ margin-bottom: 30px;
160
+ }
161
+ .aiChat .main .bottom .status .iconOutside {
162
+ width: 30px;
163
+ height: 30px;
164
+ display: flex;
165
+ justify-content: center;
166
+ align-items: center;
167
+ border: 3px solid #000000;
168
+ border-radius: 50%;
169
+ }
170
+ .aiChat .main .bottom .status .iconInside {
171
+ width: 13px;
172
+ height: 13px;
173
+ background-color: #000000;
174
+ }
175
+ .aiChat .main .bottom .status .statusImg {
176
+ width: 24px;
177
+ height: 24px;
178
+ border-radius: 8px;
179
+ margin: 0 auto;
180
+ margin-bottom: 15px;
181
+ }
182
+ .aiChat .main .bottom .status .statusText {
183
+ font-size: 16px;
184
+ color: #7d91b3;
185
+ }
186
+ .aiChat .main .bottom .status .statusText.danger {
187
+ color: red;
188
+ }
189
+ .aiChat .main .bottom .btnWrap {
190
+ display: flex;
191
+ justify-content: center;
192
+ }
193
+ .aiChat .main .bottom .btnWrap .btnItem {
194
+ display: flex;
195
+ align-items: center;
196
+ justify-content: center;
197
+ width: 76px;
198
+ height: 76px;
199
+ border-radius: 50%;
200
+ margin-right: 118px;
201
+ background: #ffffff;
202
+ box-shadow: 0px 2px 10px 0px rgba(153, 167, 191, 0.1);
203
+ cursor: pointer;
204
+ }
205
+ .aiChat .main .bottom .btnWrap .btnItem.disable {
206
+ pointer-events: none;
207
+ opacity: 0.5;
208
+ cursor: not-allowed;
209
+ }
210
+ .aiChat .main .bottom .btnWrap .btnItem:last-child {
211
+ margin-right: 0;
212
+ }
213
+
214
+ :global .out-tooltip .ant-tooltip-content .ant-tooltip-arrow {
215
+ left: 55px;
216
+ }
217
+ :global .ai-chat-tooltip {
218
+ z-index: 100000 !important;
219
+ }
220
+
221
+ :global(.ant-message) {
222
+ position: fixed !important;
223
+ z-index: 99999999 !important;
224
+ }
225
+
226
+ .disable {
227
+ opacity: 0.4;
228
+ pointer-events: none;
229
+ cursor: not-allowed;
230
+ }
@@ -1,4 +1,6 @@
1
1
  import React from "react";
2
+ import { jsx as _jsx } from "react/jsx-runtime";
3
+ import { jsxs as _jsxs } from "react/jsx-runtime";
2
4
  var AICorrection = function AICorrection(_ref) {
3
5
  var value = _ref.value;
4
6
  var data = {
@@ -12,34 +14,45 @@ var AICorrection = function AICorrection(_ref) {
12
14
  // console.error(error);
13
15
  return null;
14
16
  }
15
- return /*#__PURE__*/React.createElement("div", {
17
+ return /*#__PURE__*/_jsxs("div", {
16
18
  style: {
17
19
  display: 'flex',
18
20
  flexDirection: 'column',
19
21
  gap: '20px'
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)));
22
+ },
23
+ children: [/*#__PURE__*/_jsx("span", {
24
+ children: "\u6839\u636E\u8003\u751F\u7684\u56DE\u7B54\uFF0C\u7ED9\u51FA\u4EE5\u4E0B\u5F97\u5206\u53CA\u8BC4\u8BED\uFF1A"
25
+ }), /*#__PURE__*/_jsxs("div", {
26
+ style: {
27
+ display: 'flex',
28
+ flexDirection: 'column',
29
+ gap: '10px'
30
+ },
31
+ children: [/*#__PURE__*/_jsx("span", {
32
+ style: {
33
+ fontSize: '18px',
34
+ fontWeight: 600
35
+ },
36
+ children: "\u5F97\u5206"
37
+ }), /*#__PURE__*/_jsxs("span", {
38
+ children: [data.score, "\u5206"]
39
+ })]
40
+ }), /*#__PURE__*/_jsxs("div", {
41
+ style: {
42
+ display: 'flex',
43
+ flexDirection: 'column',
44
+ gap: '10px'
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
+ });
44
57
  };
45
58
  export default AICorrection;