@myun/gimi-chat 0.9.27 → 0.9.29
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/client/components/history-list/index.module.css +6 -6
- package/dist/client/components/new-main/index.css +1 -1
- package/dist/client/components/slider/index.css +7 -7
- package/dist/components/ai-chat-dialogue/index.js +4 -4
- package/dist/components/ai-chat-dialogue/index.module copy.css +7 -7
- package/dist/components/ai-chat-dialogue/index.module.css +16 -9
- package/dist/components/ai-loading/index.module.css +1 -1
- package/dist/components/answer-item/index.module.css +9 -9
- package/dist/components/ask-card/index.js +6 -4
- package/dist/components/ask-card/index.module.css +10 -10
- package/dist/components/chat-input/extension/title-slot/index.less +3 -2
- package/dist/components/chat-input/index.js +13 -9
- package/dist/components/chat-input/index.module.css +11 -7
- package/dist/components/chat-voice/VoiceCommunication.js +5 -8
- package/dist/components/chat-voice/VoiceRecord.js +5 -8
- package/dist/components/dots-loading/index.module.css +1 -1
- package/dist/components/empty/index.module.css +1 -1
- package/dist/components/excel-components/index.module.css +15 -15
- package/dist/components/excel-components/styles.module.css +2 -2
- package/dist/components/file-card/index.js +5 -4
- package/dist/components/file-card/index.module.css +7 -7
- package/dist/components/file-preview/index.module.css +6 -6
- package/dist/components/file-upload/index.js +35 -9
- package/dist/components/iconfont-com/index.js +1 -1
- package/dist/components/knowledge-trace/index.module.css +12 -12
- package/dist/components/message-actions/CopyButton.js +5 -9
- package/dist/components/message-actions/LikeButton.js +7 -11
- package/dist/components/message-actions/RegenerateButton.js +2 -1
- package/dist/components/message-actions/UnLikeButton.js +7 -11
- package/dist/components/message-actions/VoicePlay.js +5 -10
- package/dist/components/message-list/index.module.css +9 -9
- package/dist/components/product-tag/index.module.css +3 -3
- package/dist/components/quoted-content/index.js +5 -6
- package/dist/components/quoted-content/index.module.css +33 -8
- package/dist/components/reasoning-content/index.module.css +5 -5
- package/dist/components/reference-content/index.module.css +5 -5
- package/dist/components/search-course-list/index.module.css +4 -4
- package/dist/components/search-result/index.module.css +12 -12
- package/dist/components/templates/index.module.css +1 -1
- package/dist/components/upload-list/CustomFile.js +20 -10
- package/dist/components/upload-list/ImageFile.js +22 -16
- package/dist/components/upload-list/customFile.module.css +6 -6
- package/dist/components/upload-list/imageFile.module.css +7 -15
- package/dist/components/upload-list/index.module.css +1 -1
- package/dist/components/voice-bars/index.js +1 -1
- package/dist/components/work-flow-content/index.module.css +1 -1
- package/dist/hooks/useFile.d.ts +1 -0
- package/dist/hooks/useFile.js +51 -13
- package/dist/umd/index.min.js +1 -1
- package/package.json +1 -1
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
.excelSucess {
|
|
3
3
|
flex-shrink: 0;
|
|
4
4
|
border-radius: 12px;
|
|
5
|
-
border: 1px solid var(
|
|
6
|
-
background: var(
|
|
5
|
+
border: 1px solid var(--theme-lightNeutral, #E9EBF2);
|
|
6
|
+
background: var(--theme-paleNeutral, #F2F3F7);
|
|
7
7
|
display: flex;
|
|
8
8
|
align-items: center;
|
|
9
9
|
gap: 12px;
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
.excelSucess .left .iconName .nameSize .type {
|
|
46
46
|
width: fit-content;
|
|
47
47
|
text-align: center;
|
|
48
|
-
color: var(
|
|
48
|
+
color: var(--theme-dustyNeutral, #717F94);
|
|
49
49
|
font-family: "PingFang SC";
|
|
50
50
|
font-size: 14px;
|
|
51
51
|
font-style: normal;
|
|
@@ -57,7 +57,7 @@
|
|
|
57
57
|
}
|
|
58
58
|
.excelSucess .left .iconName .nameSize .name {
|
|
59
59
|
flex: 1;
|
|
60
|
-
color: var(
|
|
60
|
+
color: var(--theme-deepNeutral, #2E394C);
|
|
61
61
|
font-family: "PingFang SC";
|
|
62
62
|
font-size: 16px;
|
|
63
63
|
width: 190px;
|
|
@@ -88,7 +88,7 @@
|
|
|
88
88
|
margin-right: 12px;
|
|
89
89
|
}
|
|
90
90
|
.excelSucess .left .typeSize .size {
|
|
91
|
-
color: var(
|
|
91
|
+
color: var(--theme-dustyNeutral, #717F94);
|
|
92
92
|
font-family: "PingFang SC";
|
|
93
93
|
font-size: 14px;
|
|
94
94
|
font-style: normal;
|
|
@@ -103,7 +103,7 @@
|
|
|
103
103
|
flex-shrink: 0;
|
|
104
104
|
}
|
|
105
105
|
.excelSucess .right .text {
|
|
106
|
-
color: var(
|
|
106
|
+
color: var(--theme-primary, #4086FF);
|
|
107
107
|
text-align: right;
|
|
108
108
|
font-family: "PingFang SC";
|
|
109
109
|
font-size: 16px;
|
|
@@ -113,7 +113,7 @@
|
|
|
113
113
|
}
|
|
114
114
|
|
|
115
115
|
.failText {
|
|
116
|
-
color: #
|
|
116
|
+
color: var(--theme-deepNeutral, #2E394C);
|
|
117
117
|
font-family: "PingFang SC";
|
|
118
118
|
font-size: 16px;
|
|
119
119
|
font-style: normal;
|
|
@@ -125,7 +125,7 @@
|
|
|
125
125
|
}
|
|
126
126
|
|
|
127
127
|
.excelFail .failText {
|
|
128
|
-
color: #
|
|
128
|
+
color: var(--theme-deepNeutral, #2E394C);
|
|
129
129
|
font-family: "PingFang SC";
|
|
130
130
|
font-size: 16px;
|
|
131
131
|
font-style: normal;
|
|
@@ -143,9 +143,9 @@
|
|
|
143
143
|
height: 44px;
|
|
144
144
|
flex-shrink: 0;
|
|
145
145
|
border-radius: 22px;
|
|
146
|
-
border: 1px solid var(
|
|
146
|
+
border: 1px solid var(--theme-softNeutral, #D9DCE5);
|
|
147
147
|
background: #fff;
|
|
148
|
-
color: #
|
|
148
|
+
color: var(--theme-deepNeutral, #2E394C);
|
|
149
149
|
font-family: "PingFang SC";
|
|
150
150
|
font-size: 14px;
|
|
151
151
|
font-style: normal;
|
|
@@ -154,7 +154,7 @@
|
|
|
154
154
|
}
|
|
155
155
|
.excelFail .disablebox {
|
|
156
156
|
border-radius: 22px;
|
|
157
|
-
border: 1px solid var(
|
|
157
|
+
border: 1px solid var(--theme-softNeutral, #D9DCE5);
|
|
158
158
|
background: #fff;
|
|
159
159
|
color: #ced3d9;
|
|
160
160
|
font-family: "PingFang SC";
|
|
@@ -167,7 +167,7 @@
|
|
|
167
167
|
}
|
|
168
168
|
.excelFail .selectbox {
|
|
169
169
|
border-radius: 22px;
|
|
170
|
-
background: var(
|
|
170
|
+
background: var(--theme-deepNeutral, #2E394C);
|
|
171
171
|
color: #fff;
|
|
172
172
|
font-family: "PingFang SC";
|
|
173
173
|
font-size: 14px;
|
|
@@ -179,8 +179,8 @@
|
|
|
179
179
|
}
|
|
180
180
|
.excelFail .Retry:hover {
|
|
181
181
|
border-radius: 22px;
|
|
182
|
-
border: 1px solid var(
|
|
183
|
-
background: #
|
|
182
|
+
border: 1px solid var(--theme-softNeutral, #D9DCE5);
|
|
183
|
+
background: var(--theme-subtleNeutral, #F5F7FA);
|
|
184
184
|
}
|
|
185
185
|
|
|
186
186
|
.excelRunning {
|
|
@@ -197,7 +197,7 @@
|
|
|
197
197
|
object-fit: cover;
|
|
198
198
|
}
|
|
199
199
|
.excelRunning .running .runningText {
|
|
200
|
-
color: #
|
|
200
|
+
color: var(--theme-deepNeutral, #2E394C);
|
|
201
201
|
font-family: "PingFang SC";
|
|
202
202
|
font-size: 16px;
|
|
203
203
|
font-style: normal;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
}
|
|
4
4
|
|
|
5
5
|
.aiLoadingSteps {
|
|
6
|
-
background: linear-gradient(180deg, #
|
|
6
|
+
background: linear-gradient(180deg, var(--theme-primary-pale, #F0F8FF) 0%, #FFFFFF 100%);
|
|
7
7
|
border-radius: 16px;
|
|
8
8
|
padding: 16px;
|
|
9
9
|
width: clamp(360px, 90%, 680px);
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
|
|
32
32
|
.titleIcon {
|
|
33
33
|
font-size: 16px;
|
|
34
|
-
color: #
|
|
34
|
+
color: var(--theme-primary, #4086FF);
|
|
35
35
|
}
|
|
36
36
|
|
|
37
37
|
.description {
|
|
@@ -7,6 +7,7 @@ import { useAppDispatch } from "../../store/hooks";
|
|
|
7
7
|
import { setFilePreviewState, openSidebar } from "../../store/slices/gimiMenuSlice";
|
|
8
8
|
import classNames from 'classnames';
|
|
9
9
|
import { IconChevronRightStroked } from '@douyinfe/semi-icons';
|
|
10
|
+
import IconFontCom from "../iconfont-com";
|
|
10
11
|
export var FileCard = function FileCard(_ref) {
|
|
11
12
|
var fileName = _ref.fileName,
|
|
12
13
|
downloadUrl = _ref.downloadUrl,
|
|
@@ -70,10 +71,10 @@ export var FileCard = function FileCard(_ref) {
|
|
|
70
71
|
className: styles.text
|
|
71
72
|
}, downloadText), /*#__PURE__*/React.createElement(Tooltip, {
|
|
72
73
|
content: t('file.download')
|
|
73
|
-
}, /*#__PURE__*/React.createElement(
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
74
|
+
}, /*#__PURE__*/React.createElement(IconFontCom, {
|
|
75
|
+
type: "icon-xiazai2",
|
|
76
|
+
size: 20,
|
|
77
|
+
color: "var(--theme-deepNeutral, #2E394C)"
|
|
77
78
|
})))));
|
|
78
79
|
};
|
|
79
80
|
export var MultipleFileCard = function MultipleFileCard(_ref2) {
|
|
@@ -26,17 +26,17 @@
|
|
|
26
26
|
}
|
|
27
27
|
|
|
28
28
|
.card {
|
|
29
|
-
|
|
30
|
-
background: rgb(255, 255, 255) !important;
|
|
29
|
+
background: var(--theme-subtleNeutral, #F5F7FA) !important;
|
|
31
30
|
}
|
|
32
31
|
.card:hover {
|
|
33
|
-
background:
|
|
32
|
+
background: var(--theme-paleNeutral, #F2F3F7) !important;
|
|
34
33
|
}
|
|
35
34
|
|
|
36
35
|
.file_main {
|
|
36
|
+
max-width: 380px;
|
|
37
37
|
flex-shrink: 0;
|
|
38
38
|
border-radius: 12px;
|
|
39
|
-
border: 1px solid
|
|
39
|
+
border: 1px solid var(--theme-lightNeutral, #EDEDEB);
|
|
40
40
|
background: linear-gradient(90deg, #EAF2FF 0%, #FFFFFF 100%);
|
|
41
41
|
display: flex;
|
|
42
42
|
box-sizing: content-box;
|
|
@@ -81,7 +81,7 @@
|
|
|
81
81
|
.file_main .left .iconName .nameSize .type {
|
|
82
82
|
width: fit-content;
|
|
83
83
|
text-align: center;
|
|
84
|
-
color: var(
|
|
84
|
+
color: var(--theme-neutral, #626262);
|
|
85
85
|
font-family: "PingFang SC";
|
|
86
86
|
font-size: 14px;
|
|
87
87
|
font-style: normal;
|
|
@@ -93,7 +93,7 @@
|
|
|
93
93
|
}
|
|
94
94
|
.file_main .left .iconName .nameSize .name {
|
|
95
95
|
flex: 1;
|
|
96
|
-
color: var(
|
|
96
|
+
color: var(--theme-deepNeutral, #2E394C);
|
|
97
97
|
font-family: "PingFang SC";
|
|
98
98
|
font-size: 16px;
|
|
99
99
|
width: fit-content;
|
|
@@ -114,7 +114,7 @@
|
|
|
114
114
|
flex-shrink: 0;
|
|
115
115
|
}
|
|
116
116
|
.file_main .right .text {
|
|
117
|
-
color:
|
|
117
|
+
color: var(--theme-deepNeutral, #221713);
|
|
118
118
|
text-align: right;
|
|
119
119
|
font-family: "PingFang SC";
|
|
120
120
|
font-size: 16px;
|
|
@@ -55,21 +55,21 @@
|
|
|
55
55
|
font-family: "PingFang SC", sans-serif;
|
|
56
56
|
font-size: 16px;
|
|
57
57
|
font-weight: 600;
|
|
58
|
-
color: #
|
|
58
|
+
color: var(--theme-deepNeutral, #2E394C);
|
|
59
59
|
line-height: 22px;
|
|
60
60
|
}
|
|
61
61
|
.header :global(.ant-btn) {
|
|
62
62
|
color: #8c8c8c;
|
|
63
63
|
}
|
|
64
64
|
.header :global(.ant-btn):hover {
|
|
65
|
-
color: #
|
|
65
|
+
color: var(--theme-primary, #4086FF);
|
|
66
66
|
}
|
|
67
67
|
|
|
68
68
|
.iframeContainer {
|
|
69
69
|
flex: 1;
|
|
70
70
|
overflow: hidden;
|
|
71
71
|
position: relative;
|
|
72
|
-
background: #
|
|
72
|
+
background: var(--theme-subtleNeutral, #F5F7FA);
|
|
73
73
|
}
|
|
74
74
|
.iframeContainer iframe {
|
|
75
75
|
width: 100%;
|
|
@@ -89,7 +89,7 @@
|
|
|
89
89
|
width: 122px;
|
|
90
90
|
}
|
|
91
91
|
.iframeContainer .empty p {
|
|
92
|
-
color: #
|
|
92
|
+
color: var(--theme-mediumNeutral, #9AA7B7);
|
|
93
93
|
}
|
|
94
94
|
.iframeContainer .empty .retryButton {
|
|
95
95
|
display: flex;
|
|
@@ -101,14 +101,14 @@
|
|
|
101
101
|
background-color: #ffffff;
|
|
102
102
|
padding: 10px 20px;
|
|
103
103
|
font-size: 14px;
|
|
104
|
-
border: #
|
|
104
|
+
border: var(--theme-lightNeutral, #E9EBF2) 1px solid;
|
|
105
105
|
box-shadow: 0px 4px 20px 0px rgba(0, 0, 0, 0.0588235294);
|
|
106
106
|
}
|
|
107
107
|
.iframeContainer .empty .retryButton .replayIcon {
|
|
108
108
|
padding: 2px;
|
|
109
109
|
}
|
|
110
110
|
.iframeContainer .empty .retryButton:hover {
|
|
111
|
-
color: #
|
|
111
|
+
color: var(--theme-primary, #4086FF);
|
|
112
112
|
}
|
|
113
113
|
|
|
114
114
|
.mainHidden {
|
|
@@ -2,6 +2,11 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
|
|
|
2
2
|
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == _typeof(h) && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw new Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(_typeof(e) + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw new Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, catch: function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; }
|
|
3
3
|
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
|
|
4
4
|
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
|
|
5
|
+
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; }
|
|
6
|
+
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; }
|
|
7
|
+
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; }
|
|
8
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
9
|
+
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); }
|
|
5
10
|
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
6
11
|
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
7
12
|
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
@@ -13,6 +18,7 @@ import { useTranslation } from 'react-i18next';
|
|
|
13
18
|
import { Upload, Toast, Button } from '@douyinfe/semi-ui';
|
|
14
19
|
import { IconPaperclip } from '@douyinfe/semi-icons';
|
|
15
20
|
import { useAppDispatch, useAppSelector } from "../../store/hooks";
|
|
21
|
+
import { useStore } from 'react-redux';
|
|
16
22
|
import { setFileList } from "../../store/slices/gimiMenuSlice";
|
|
17
23
|
import { FileStatus } from "../../interfaces/fileInterface";
|
|
18
24
|
import { useGimiFileUpload } from "../../hooks/useFile";
|
|
@@ -52,16 +58,22 @@ var FileUpload = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
52
58
|
var fileList = useAppSelector(function (s) {
|
|
53
59
|
return s.gimiMenu.fileList;
|
|
54
60
|
});
|
|
61
|
+
var store = useStore();
|
|
55
62
|
var baseUrl = useAppSelector(function (s) {
|
|
56
63
|
return s.gimiMenu.baseUrl;
|
|
57
64
|
});
|
|
58
65
|
var token = useAppSelector(function (s) {
|
|
59
66
|
return s.gimiMenu.token;
|
|
60
67
|
});
|
|
68
|
+
|
|
69
|
+
/** 取 store 中最新的 fileList,避免闭包快照导致并发写入互相覆盖 */
|
|
70
|
+
var getLatestFileList = function getLatestFileList() {
|
|
71
|
+
return store.getState().gimiMenu.fileList || [];
|
|
72
|
+
};
|
|
61
73
|
var uploadUrl = "https://".concat(baseUrl, "/mfilesvc/agentMessage/uploadFile");
|
|
62
74
|
var _useGimiFileUpload = useGimiFileUpload(props.onFileUploaded),
|
|
63
75
|
handleSSEFileAnalyize = _useGimiFileUpload.handleSSEFileAnalyize,
|
|
64
|
-
|
|
76
|
+
abortAll = _useGimiFileUpload.abortAll;
|
|
65
77
|
|
|
66
78
|
/** 保存原始 File:uid -> File */
|
|
67
79
|
var rawFileMapRef = React.useRef(new Map());
|
|
@@ -69,9 +81,12 @@ var FileUpload = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
69
81
|
/** 重试次数:uid -> count */
|
|
70
82
|
var retryCountMapRef = React.useRef(new Map());
|
|
71
83
|
|
|
84
|
+
/** 上传请求 controller:uid -> controller(与解析 controller 分开管理) */
|
|
85
|
+
var uploadControllerMapRef = React.useRef(new Map());
|
|
86
|
+
|
|
72
87
|
/** 验证文件数量和大小限制 */
|
|
73
88
|
var validateFileCount = function validateFileCount(newFile) {
|
|
74
|
-
var currentList =
|
|
89
|
+
var currentList = getLatestFileList();
|
|
75
90
|
var imageCount = currentList.filter(function (f) {
|
|
76
91
|
return f.isImage;
|
|
77
92
|
}).length;
|
|
@@ -117,14 +132,15 @@ var FileUpload = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
117
132
|
|
|
118
133
|
/** 更新 Redux 中的文件状态 */
|
|
119
134
|
var updateFile = function updateFile(file) {
|
|
120
|
-
|
|
135
|
+
// 从 store 读取最新 fileList,避免闭包快照导致并发写入互相覆盖/丢项
|
|
136
|
+
var currentList = getLatestFileList();
|
|
121
137
|
var existingIndex = currentList.findIndex(function (f) {
|
|
122
138
|
return f.uid === file.uid;
|
|
123
139
|
});
|
|
124
140
|
if (existingIndex >= 0) {
|
|
125
|
-
//
|
|
141
|
+
// 更新现有文件:以 store 中的当前项为基底,再覆盖传入字段,保留并发写入的进度等
|
|
126
142
|
var newList = _toConsumableArray(currentList);
|
|
127
|
-
newList[existingIndex] = file;
|
|
143
|
+
newList[existingIndex] = _objectSpread(_objectSpread({}, currentList[existingIndex]), file);
|
|
128
144
|
dispatch(setFileList({
|
|
129
145
|
fileList: newList
|
|
130
146
|
}));
|
|
@@ -180,7 +196,7 @@ var FileUpload = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
180
196
|
retryCountMapRef.current.set(file.uid, 0);
|
|
181
197
|
}
|
|
182
198
|
controller = new AbortController();
|
|
183
|
-
|
|
199
|
+
uploadControllerMapRef.current.set(file.uid, controller);
|
|
184
200
|
isImage = isImageFile(rawFile);
|
|
185
201
|
updateFile({
|
|
186
202
|
uid: file.uid,
|
|
@@ -292,10 +308,15 @@ var FileUpload = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
292
308
|
retryUpload(file.uid);
|
|
293
309
|
}, 1000);
|
|
294
310
|
case 52:
|
|
311
|
+
_context.prev = 52;
|
|
312
|
+
// 本次上传请求结束(含成功/失败/重试前),清理其 controller
|
|
313
|
+
uploadControllerMapRef.current.delete(file.uid);
|
|
314
|
+
return _context.finish(52);
|
|
315
|
+
case 55:
|
|
295
316
|
case "end":
|
|
296
317
|
return _context.stop();
|
|
297
318
|
}
|
|
298
|
-
}, _callee, null, [[15, 32]]);
|
|
319
|
+
}, _callee, null, [[15, 32, 52, 55]]);
|
|
299
320
|
}));
|
|
300
321
|
return function customRequest(_x) {
|
|
301
322
|
return _ref.apply(this, arguments);
|
|
@@ -304,8 +325,13 @@ var FileUpload = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
304
325
|
React.useImperativeHandle(ref, function () {
|
|
305
326
|
return {
|
|
306
327
|
abortUpload: function abortUpload() {
|
|
307
|
-
|
|
308
|
-
|
|
328
|
+
// 中断所有正在进行的上传请求(按 uid 独立管理)
|
|
329
|
+
uploadControllerMapRef.current.forEach(function (controller) {
|
|
330
|
+
return controller.abort();
|
|
331
|
+
});
|
|
332
|
+
uploadControllerMapRef.current.clear();
|
|
333
|
+
// 中断所有正在进行的文件解析(按 uid 独立管理)
|
|
334
|
+
abortAll();
|
|
309
335
|
},
|
|
310
336
|
handleSSEFileAnalyize: handleSSEFileAnalyize,
|
|
311
337
|
retryUpload: retryUpload,
|
|
@@ -12,7 +12,7 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
|
|
|
12
12
|
*/
|
|
13
13
|
import React from 'react';
|
|
14
14
|
import Icon from '@douyinfe/semi-icons';
|
|
15
|
-
var scriptUrl = '//at.alicdn.com/t/c/
|
|
15
|
+
var scriptUrl = '//at.alicdn.com/t/c/font_3429456_unwbslgsra.js';
|
|
16
16
|
|
|
17
17
|
// Load iconfont script
|
|
18
18
|
if (typeof document !== 'undefined' && scriptUrl) {
|
|
@@ -63,7 +63,7 @@
|
|
|
63
63
|
font-size: 14px;
|
|
64
64
|
line-height: 150%;
|
|
65
65
|
letter-spacing: 0px;
|
|
66
|
-
color: #
|
|
66
|
+
color: var(--theme-neutral, #4C5A70);
|
|
67
67
|
}
|
|
68
68
|
.knowledgeList .resource_deactive {
|
|
69
69
|
cursor: not-allowed !important;
|
|
@@ -78,7 +78,7 @@
|
|
|
78
78
|
z-index: 2;
|
|
79
79
|
}
|
|
80
80
|
.knowledgeList .knowledge {
|
|
81
|
-
background-color: #
|
|
81
|
+
background-color: var(--theme-subtleNeutral, #F5F7FA);
|
|
82
82
|
border-radius: 12px;
|
|
83
83
|
display: flex;
|
|
84
84
|
align-items: center;
|
|
@@ -130,7 +130,7 @@
|
|
|
130
130
|
font-size: 14px;
|
|
131
131
|
line-height: 150%;
|
|
132
132
|
letter-spacing: 0px;
|
|
133
|
-
color: #
|
|
133
|
+
color: var(--theme-deepNeutral, #2E394C);
|
|
134
134
|
}
|
|
135
135
|
.knowledgeList .knowledge .description .timeTrace {
|
|
136
136
|
text-overflow: ellipsis;
|
|
@@ -138,7 +138,7 @@
|
|
|
138
138
|
-webkit-line-clamp: 2;
|
|
139
139
|
-webkit-box-orient: vertical;
|
|
140
140
|
overflow: hidden;
|
|
141
|
-
color: #
|
|
141
|
+
color: var(--theme-dustyNeutral, #717F94);
|
|
142
142
|
width: 200px;
|
|
143
143
|
font-family: "PingFang SC";
|
|
144
144
|
font-weight: 400;
|
|
@@ -195,7 +195,7 @@
|
|
|
195
195
|
border-radius: 4px;
|
|
196
196
|
float: left;
|
|
197
197
|
margin-right: 5px;
|
|
198
|
-
background-color: #
|
|
198
|
+
background-color: var(--theme-neutral, #4C5A70);
|
|
199
199
|
color: #ffffff;
|
|
200
200
|
}
|
|
201
201
|
.knowledgeList .knowledge .class_description .text {
|
|
@@ -212,7 +212,7 @@
|
|
|
212
212
|
font-size: 14px;
|
|
213
213
|
line-height: 150%;
|
|
214
214
|
letter-spacing: 0px;
|
|
215
|
-
color: #
|
|
215
|
+
color: var(--theme-deepNeutral, #2E394C);
|
|
216
216
|
}
|
|
217
217
|
.knowledgeList .knowledge .class_description .timeTrace {
|
|
218
218
|
text-overflow: ellipsis;
|
|
@@ -220,7 +220,7 @@
|
|
|
220
220
|
-webkit-line-clamp: 2;
|
|
221
221
|
-webkit-box-orient: vertical;
|
|
222
222
|
overflow: hidden;
|
|
223
|
-
color: #
|
|
223
|
+
color: var(--theme-dustyNeutral, #717F94);
|
|
224
224
|
width: 150px;
|
|
225
225
|
font-family: "PingFang SC";
|
|
226
226
|
font-weight: 400;
|
|
@@ -242,8 +242,8 @@
|
|
|
242
242
|
justify-content: center;
|
|
243
243
|
border-radius: 4px;
|
|
244
244
|
gap: 5px;
|
|
245
|
-
border:
|
|
246
|
-
background-color: #
|
|
245
|
+
border: 1px solid var(--theme-softNeutral, #D9DCE5);
|
|
246
|
+
background-color: var(--theme-subtleNeutral, #F5F7FA);
|
|
247
247
|
cursor: pointer;
|
|
248
248
|
}
|
|
249
249
|
.icon_btn span {
|
|
@@ -251,11 +251,11 @@
|
|
|
251
251
|
}
|
|
252
252
|
.icon_btn:hover {
|
|
253
253
|
background-color: #FFFFFF;
|
|
254
|
-
color: #4086FF;
|
|
254
|
+
color: var(--theme-primary, #4086FF);
|
|
255
255
|
}
|
|
256
256
|
|
|
257
257
|
.icon_btn_active {
|
|
258
|
-
background-color: #
|
|
258
|
+
background-color: var(--theme-primary, #4086FF);
|
|
259
259
|
color: #ffffff;
|
|
260
260
|
}
|
|
261
261
|
|
|
@@ -266,7 +266,7 @@
|
|
|
266
266
|
max-height: 388px;
|
|
267
267
|
padding: 16px 12px 0px 12px;
|
|
268
268
|
border-radius: 16px;
|
|
269
|
-
border: 1px solid #E9EBF2;
|
|
269
|
+
border: 1px solid var(--theme-lightNeutral, #E9EBF2);
|
|
270
270
|
background: #FFF;
|
|
271
271
|
box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.15);
|
|
272
272
|
z-index: 2;
|
|
@@ -2,7 +2,7 @@ import React from 'react';
|
|
|
2
2
|
import { useTranslation } from 'react-i18next';
|
|
3
3
|
import { Tooltip } from '@douyinfe/semi-ui';
|
|
4
4
|
import { usePureChatActions } from "../../hooks/useChatActions";
|
|
5
|
-
import
|
|
5
|
+
import IconFontCom from "../iconfont-com";
|
|
6
6
|
var CopyButton = function CopyButton(_ref) {
|
|
7
7
|
var item = _ref.item,
|
|
8
8
|
onCopyCallback = _ref.onCopyCallback;
|
|
@@ -19,14 +19,10 @@ var CopyButton = function CopyButton(_ref) {
|
|
|
19
19
|
justifyContent: 'center',
|
|
20
20
|
cursor: 'pointer'
|
|
21
21
|
}
|
|
22
|
-
}, /*#__PURE__*/React.createElement(
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
display: 'flex',
|
|
27
|
-
alignItems: 'center'
|
|
28
|
-
},
|
|
29
|
-
src: copyIcon,
|
|
22
|
+
}, /*#__PURE__*/React.createElement(IconFontCom, {
|
|
23
|
+
type: "icon-duihua-fuzhi",
|
|
24
|
+
size: 18,
|
|
25
|
+
color: "var(--theme-neutral, #4C5A70)",
|
|
30
26
|
onClick: function onClick() {
|
|
31
27
|
copyToClipboard(item);
|
|
32
28
|
onCopyCallback === null || onCopyCallback === void 0 || onCopyCallback();
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { usePureChatActions } from "../../hooks/useChatActions";
|
|
2
|
-
import likeIcon from "../../assets/image/like_active.png";
|
|
3
|
-
import love from "../../assets/image/love.png";
|
|
4
2
|
import { Tooltip } from '@douyinfe/semi-ui';
|
|
5
3
|
import React from 'react';
|
|
6
4
|
import { useTranslation } from 'react-i18next';
|
|
5
|
+
import IconFontCom from "../iconfont-com";
|
|
7
6
|
var LikeButton = function LikeButton(_ref) {
|
|
8
7
|
var item = _ref.item,
|
|
9
8
|
onLikeCallback = _ref.onLikeCallback;
|
|
@@ -11,8 +10,9 @@ var LikeButton = function LikeButton(_ref) {
|
|
|
11
10
|
t = _useTranslation.t;
|
|
12
11
|
var _usePureChatActions = usePureChatActions(),
|
|
13
12
|
handleUnlove = _usePureChatActions.handleUnlove;
|
|
13
|
+
var isLiked = item.mark === 2;
|
|
14
14
|
return /*#__PURE__*/React.createElement(Tooltip, {
|
|
15
|
-
content: "".concat(
|
|
15
|
+
content: "".concat(isLiked ? t('messageAction.likeDone') : t('messageAction.like'))
|
|
16
16
|
}, /*#__PURE__*/React.createElement("div", {
|
|
17
17
|
style: {
|
|
18
18
|
display: 'flex',
|
|
@@ -24,14 +24,10 @@ var LikeButton = function LikeButton(_ref) {
|
|
|
24
24
|
handleUnlove(item, 'love');
|
|
25
25
|
onLikeCallback === null || onLikeCallback === void 0 || onLikeCallback();
|
|
26
26
|
}
|
|
27
|
-
}, /*#__PURE__*/React.createElement(
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
display: 'flex',
|
|
32
|
-
alignItems: 'center'
|
|
33
|
-
},
|
|
34
|
-
src: item.mark === 2 ? likeIcon : love
|
|
27
|
+
}, /*#__PURE__*/React.createElement(IconFontCom, {
|
|
28
|
+
type: isLiked ? 'icon-duihua-dianzanxuanzhong' : 'icon-duihua-dianzan',
|
|
29
|
+
size: 18,
|
|
30
|
+
color: "var(--theme-neutral, #4C5A70)"
|
|
35
31
|
})));
|
|
36
32
|
};
|
|
37
33
|
export default LikeButton;
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { usePureChatActions } from "../../hooks/useChatActions";
|
|
2
|
-
import unloveActive from "../../assets/image/unlike_active.png";
|
|
3
|
-
import unlove from "../../assets/image/unlove.png";
|
|
4
2
|
import { Tooltip } from '@douyinfe/semi-ui';
|
|
5
3
|
import React from 'react';
|
|
6
4
|
import { useTranslation } from 'react-i18next';
|
|
5
|
+
import IconFontCom from "../iconfont-com";
|
|
7
6
|
var UnLikeButton = function UnLikeButton(_ref) {
|
|
8
7
|
var item = _ref.item,
|
|
9
8
|
onUnLikeCallback = _ref.onUnLikeCallback;
|
|
@@ -11,8 +10,9 @@ var UnLikeButton = function UnLikeButton(_ref) {
|
|
|
11
10
|
t = _useTranslation.t;
|
|
12
11
|
var _usePureChatActions = usePureChatActions(),
|
|
13
12
|
handleUnlove = _usePureChatActions.handleUnlove;
|
|
13
|
+
var isDisliked = item.mark === 1;
|
|
14
14
|
return /*#__PURE__*/React.createElement(Tooltip, {
|
|
15
|
-
content: "".concat(
|
|
15
|
+
content: "".concat(isDisliked ? t('messageAction.dislikeDone') : t('messageAction.dislike'))
|
|
16
16
|
}, /*#__PURE__*/React.createElement("div", {
|
|
17
17
|
style: {
|
|
18
18
|
display: 'flex',
|
|
@@ -24,14 +24,10 @@ var UnLikeButton = function UnLikeButton(_ref) {
|
|
|
24
24
|
handleUnlove(item, 'unlove');
|
|
25
25
|
onUnLikeCallback === null || onUnLikeCallback === void 0 || onUnLikeCallback();
|
|
26
26
|
}
|
|
27
|
-
}, /*#__PURE__*/React.createElement(
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
display: 'flex',
|
|
32
|
-
alignItems: 'center'
|
|
33
|
-
},
|
|
34
|
-
src: item.mark === 1 ? unloveActive : unlove
|
|
27
|
+
}, /*#__PURE__*/React.createElement(IconFontCom, {
|
|
28
|
+
type: isDisliked ? 'icon-duihua-diancaixuanzhong' : 'icon-duihua-diancai',
|
|
29
|
+
size: 18,
|
|
30
|
+
color: "var(--theme-neutral, #4C5A70)"
|
|
35
31
|
})));
|
|
36
32
|
};
|
|
37
33
|
export default UnLikeButton;
|
|
@@ -3,11 +3,11 @@ function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyri
|
|
|
3
3
|
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
|
|
4
4
|
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
|
|
5
5
|
import React from 'react';
|
|
6
|
-
import soundOutIcon from "../../assets/image/soundOut.png";
|
|
7
6
|
import { Tooltip } from '@douyinfe/semi-ui';
|
|
8
7
|
import { useAppSelector, useAppDispatch } from "../../store/hooks";
|
|
9
8
|
import { setCurrentMessageId } from "../../store/slices/gimiMenuSlice";
|
|
10
9
|
import LottieImg from "../lottie-img";
|
|
10
|
+
import IconFontCom from "../iconfont-com";
|
|
11
11
|
import { useTranslation } from 'react-i18next';
|
|
12
12
|
var getCleanReadText = function getCleanReadText(text) {
|
|
13
13
|
// 移除<knowledge>标签及内容
|
|
@@ -64,15 +64,10 @@ var VoicePlay = function VoicePlay(props) {
|
|
|
64
64
|
}, isActive ? /*#__PURE__*/React.createElement(LottieImg, {
|
|
65
65
|
name: "aiVoicePlay",
|
|
66
66
|
size: [30, 20]
|
|
67
|
-
}) : /*#__PURE__*/React.createElement(
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
display: 'flex',
|
|
72
|
-
alignItems: 'center'
|
|
73
|
-
},
|
|
74
|
-
src: soundOutIcon,
|
|
75
|
-
alt: t('voice.readAloud')
|
|
67
|
+
}) : /*#__PURE__*/React.createElement(IconFontCom, {
|
|
68
|
+
type: "icon-duihua-bobao",
|
|
69
|
+
size: 18,
|
|
70
|
+
color: "var(--theme-neutral, #4C5A70)"
|
|
76
71
|
})));
|
|
77
72
|
};
|
|
78
73
|
export default VoicePlay;
|