@myun/gimi-chat 0.0.5 → 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 (49) hide show
  1. package/dist/components/ai-chat-dialogue/index.js +181 -135
  2. package/dist/components/ai-correction/index.js +38 -25
  3. package/dist/components/ai-loading/index.js +12 -8
  4. package/dist/components/answer-item/index.js +135 -113
  5. package/dist/components/ask-card/index.js +42 -33
  6. package/dist/components/chat-input/index.js +135 -114
  7. package/dist/components/chat-voice/VoiceCommunication.js +23 -21
  8. package/dist/components/chat-voice/VoiceRecord.js +24 -21
  9. package/dist/components/conversation-delete/index.js +10 -8
  10. package/dist/components/dots-loading/index.js +10 -7
  11. package/dist/components/empty/index.js +12 -7
  12. package/dist/components/excel-components/ExcelCard.js +7 -3
  13. package/dist/components/excel-components/ExcelExcuting.js +60 -43
  14. package/dist/components/excel-components/ExcelFailCard.js +15 -10
  15. package/dist/components/excel-components/ExcelSuccessCard.js +3 -2
  16. package/dist/components/file-card/fileCardSidebar.js +23 -16
  17. package/dist/components/file-card/index.js +68 -49
  18. package/dist/components/file-preview/index.js +36 -29
  19. package/dist/components/file-upload/index.js +10 -7
  20. package/dist/components/file-upload/uploadV1.js +33 -27
  21. package/dist/components/gimi-sidebar/index.js +20 -13
  22. package/dist/components/header/index.js +18 -11
  23. package/dist/components/iconfont-com/index.js +2 -1
  24. package/dist/components/knowledge-trace/KnowledgeIconComponent.js +28 -22
  25. package/dist/components/knowledge-trace/classList.js +37 -28
  26. package/dist/components/knowledge-trace/documentList.js +36 -27
  27. package/dist/components/knowledge-trace/index.js +28 -21
  28. package/dist/components/knowledge-trace/videoList.js +46 -36
  29. package/dist/components/lottie-img/index.js +10 -8
  30. package/dist/components/message-actions/CopyButton.js +25 -22
  31. package/dist/components/message-actions/LikeButton.js +25 -22
  32. package/dist/components/message-actions/RegenerateButton.js +21 -18
  33. package/dist/components/message-actions/UnLikeButton.js +25 -22
  34. package/dist/components/message-actions/VoicePlay.js +25 -22
  35. package/dist/components/message-list/index.js +85 -72
  36. package/dist/components/no-microphone-root/index.js +39 -29
  37. package/dist/components/preset-agent-content/index.js +20 -15
  38. package/dist/components/reasoning-content/index.js +55 -42
  39. package/dist/components/reference-content/index.js +72 -63
  40. package/dist/components/templates/CommonChat.js +78 -64
  41. package/dist/components/templates/GimiChatComponent.js +13 -6
  42. package/dist/components/templates/demo/demo.js +104 -102
  43. package/dist/components/upload-list/index.js +56 -41
  44. package/dist/components/voice-bars/index.js +22 -19
  45. package/dist/components/voice-check-dialog/index.js +24 -17
  46. package/dist/components/voice-recording/index.js +57 -42
  47. package/dist/components/work-flow-content/demo.js +2 -1
  48. package/dist/components/work-flow-content/index.js +12 -9
  49. package/package.json +6 -5
@@ -1,5 +1,9 @@
1
1
  function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
2
- function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
2
+ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
3
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
4
+ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
5
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
6
+ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
3
7
  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; }
4
8
  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); } }
5
9
  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); }); }; }
@@ -29,6 +33,9 @@ import UploadList from "../upload-list";
29
33
  import { FileStatus } from "../../interfaces/fileInterface";
30
34
  import LottieImg from "../lottie-img";
31
35
  import AIChatDialogue from "../ai-chat-dialogue";
36
+ import { jsx as _jsx } from "react/jsx-runtime";
37
+ import { Fragment as _Fragment } from "react/jsx-runtime";
38
+ import { jsxs as _jsxs } from "react/jsx-runtime";
32
39
  var extractText = function extractText() {
33
40
  var content = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
34
41
  return content.map(function (item) {
@@ -158,24 +165,28 @@ var ChatInput = /*#__PURE__*/React.forwardRef(function (props, ref) {
158
165
  if (!props.enableFileUpload || messageList.length > 0) {
159
166
  return null;
160
167
  }
161
- return /*#__PURE__*/React.createElement(FileUpload, {
168
+ return /*#__PURE__*/_jsx(FileUpload, {
162
169
  ref: uploadFileRef,
163
170
  accept: props.accept,
164
- disabled: props.disabled
165
- }, /*#__PURE__*/React.createElement(Tooltip, {
166
- content: '上传文件'
167
- }, (fileList === null || fileList === void 0 ? void 0 : fileList.length) === 0 ? /*#__PURE__*/React.createElement("div", {
168
- className: styles.uploadIcon
169
- }, /*#__PURE__*/React.createElement("img", {
170
- src: 'https://simg01.gaodunwangxiao.com/uploadimgs/tmp/upload/202509/11/83ad4_20250911153220.png',
171
- alt: ""
172
- })) : /*#__PURE__*/React.createElement("div", {
173
- className: styles.uploadIcon,
174
- onClick: handleTip
175
- }, /*#__PURE__*/React.createElement("img", {
176
- src: 'https://simg01.gaodunwangxiao.com/uploadimgs/tmp/upload/202509/24/6726e_20250924141448.png',
177
- alt: ""
178
- }))));
171
+ disabled: props.disabled,
172
+ children: /*#__PURE__*/_jsx(Tooltip, {
173
+ content: '上传文件',
174
+ children: (fileList === null || fileList === void 0 ? void 0 : fileList.length) === 0 ? /*#__PURE__*/_jsx("div", {
175
+ className: styles.uploadIcon,
176
+ children: /*#__PURE__*/_jsx("img", {
177
+ src: 'https://simg01.gaodunwangxiao.com/uploadimgs/tmp/upload/202509/11/83ad4_20250911153220.png',
178
+ alt: ""
179
+ })
180
+ }) : /*#__PURE__*/_jsx("div", {
181
+ className: styles.uploadIcon,
182
+ onClick: handleTip,
183
+ children: /*#__PURE__*/_jsx("img", {
184
+ src: 'https://simg01.gaodunwangxiao.com/uploadimgs/tmp/upload/202509/24/6726e_20250924141448.png',
185
+ alt: ""
186
+ })
187
+ })
188
+ })
189
+ });
179
190
  }, [props.enableFileUpload, messageList]);
180
191
  var openChatCommunication = React.useCallback( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
181
192
  var params, res;
@@ -269,31 +280,34 @@ var ChatInput = /*#__PURE__*/React.forwardRef(function (props, ref) {
269
280
  if (!props.enableVoiceChat && !props.enableVoiceRecord) {
270
281
  return null;
271
282
  }
272
- return /*#__PURE__*/React.createElement(VoiceCheckDialog, {
273
- trigger: /*#__PURE__*/React.createElement(React.Fragment, null, props.enableVoiceChat && ((_agentObjRef$current = agentObjRef.current) === null || _agentObjRef$current === void 0 ? void 0 : _agentObjRef$current.isEnableVoiceCall) === 1 && /*#__PURE__*/React.createElement(VoiceCommunication, {
274
- disabled: props.disabled || props.disableVoiceCommunication || props.isVoiceGetting || isMsgRecieving,
275
- onClick: openChatCommunication
276
- }), props.enableVoiceRecord && /*#__PURE__*/React.createElement(VoiceRecord, {
277
- onClick: props.shortAsrClick,
278
- disabled: props.disabled || isMsgRecieving || props.isVoiceGetting
279
- }))
283
+ return /*#__PURE__*/_jsx(VoiceCheckDialog, {
284
+ trigger: /*#__PURE__*/_jsxs(_Fragment, {
285
+ children: [props.enableVoiceChat && ((_agentObjRef$current = agentObjRef.current) === null || _agentObjRef$current === void 0 ? void 0 : _agentObjRef$current.isEnableVoiceCall) === 1 && /*#__PURE__*/_jsx(VoiceCommunication, {
286
+ disabled: props.disabled || props.disableVoiceCommunication || props.isVoiceGetting || isMsgRecieving,
287
+ onClick: openChatCommunication
288
+ }), props.enableVoiceRecord && /*#__PURE__*/_jsx(VoiceRecord, {
289
+ onClick: props.shortAsrClick,
290
+ disabled: props.disabled || isMsgRecieving || props.isVoiceGetting
291
+ })]
292
+ })
280
293
  });
281
294
  }, [props.enableVoiceChat, props.enableVoiceRecord, props.disabled, props.disableVoiceCommunication, props.isVoiceGetting, isMsgRecieving, openChatCommunication, props.shortAsrClick]);
282
295
  var renderActionArea = React.useCallback(function (renderProps) {
283
- return /*#__PURE__*/React.createElement("div", {
296
+ return /*#__PURE__*/_jsxs("div", {
284
297
  className: renderProps.className,
285
- key: "action_area"
286
- }, /*#__PURE__*/React.createElement("div", {
287
- style: {
288
- display: 'flex',
289
- alignItems: 'center'
290
- }
291
- }, VoiceTools, UploadFileTool, /*#__PURE__*/React.createElement(Divider, {
292
- layout: "vertical",
293
- style: {
294
- marginLeft: 8
295
- }
296
- })), renderProps.menuItem);
298
+ children: [/*#__PURE__*/_jsxs("div", {
299
+ style: {
300
+ display: 'flex',
301
+ alignItems: 'center'
302
+ },
303
+ children: [VoiceTools, UploadFileTool, /*#__PURE__*/_jsx(Divider, {
304
+ layout: "vertical",
305
+ style: {
306
+ marginLeft: 8
307
+ }
308
+ })]
309
+ }), renderProps.menuItem]
310
+ }, 'action_area');
297
311
  }, [VoiceTools, UploadFileTool]);
298
312
  var onMessageSend = React.useCallback(function (content) {
299
313
  var _props$onSend;
@@ -302,17 +316,21 @@ var ChatInput = /*#__PURE__*/React.forwardRef(function (props, ref) {
302
316
  (_props$onSend = props.onSend) === null || _props$onSend === void 0 || _props$onSend.call(props, text);
303
317
  }, []);
304
318
  var renderConfigureArea = React.useCallback(function () {
305
- return /*#__PURE__*/React.createElement(Tooltip, {
319
+ return /*#__PURE__*/_jsx(Tooltip, {
306
320
  trigger: 'click',
307
- content: "\u7CFB\u7EDF\u667A\u80FD\u5207\u6362\u601D\u8003\u6A21\u5F0F"
308
- }, /*#__PURE__*/React.createElement("div", {
309
- className: styles.deepthink
310
- }, /*#__PURE__*/React.createElement("img", {
311
- width: 14,
312
- src: deepThinkActive,
313
- className: styles.imgs,
314
- alt: ""
315
- }), /*#__PURE__*/React.createElement("span", null, "\u6DF1\u5EA6\u601D\u8003:\xA0\xA0\u81EA\u52A8")));
321
+ content: "\u7CFB\u7EDF\u667A\u80FD\u5207\u6362\u601D\u8003\u6A21\u5F0F",
322
+ children: /*#__PURE__*/_jsxs("div", {
323
+ className: styles.deepthink,
324
+ children: [/*#__PURE__*/_jsx("img", {
325
+ width: 14,
326
+ src: deepThinkActive,
327
+ className: styles.imgs,
328
+ alt: ""
329
+ }), /*#__PURE__*/_jsx("span", {
330
+ children: "\u6DF1\u5EA6\u601D\u8003:\xA0\xA0\u81EA\u52A8"
331
+ })]
332
+ })
333
+ });
316
334
  }, []);
317
335
  var stopSSe = function stopSSe() {
318
336
  if (uploadFileRef.current) {
@@ -340,27 +358,29 @@ var ChatInput = /*#__PURE__*/React.forwardRef(function (props, ref) {
340
358
  }
341
359
  };
342
360
  var renderReference = React.useCallback(function () {
343
- return /*#__PURE__*/React.createElement("div", {
361
+ return /*#__PURE__*/_jsxs("div", {
344
362
  className: styles.reference,
345
- key: "reference"
346
- }, !props.isRecording && (fileList === null || fileList === void 0 ? void 0 : fileList.length) > 0 && messageList.length === 0 && /*#__PURE__*/React.createElement(UploadList, {
347
- file: fileList[0],
348
- handleReTry: handleReTry,
349
- handleDelFile: handleDelFile
350
- }), props.isVoiceGetting && /*#__PURE__*/React.createElement("div", {
351
- style: {
352
- display: 'flex',
353
- alignItems: 'start',
354
- height: '60px'
355
- }
356
- }, /*#__PURE__*/React.createElement(LottieImg, {
357
- name: "aiLoading",
358
- size: [20, 40]
359
- }), /*#__PURE__*/React.createElement("span", {
360
- style: {
361
- flex: 1
362
- }
363
- }, "\u6B63\u5728\u83B7\u53D6\u8BED\u97F3\u5185\u5BB9...")));
363
+ children: [!props.isRecording && (fileList === null || fileList === void 0 ? void 0 : fileList.length) > 0 && messageList.length === 0 && /*#__PURE__*/_jsx(UploadList, {
364
+ file: fileList[0],
365
+ handleReTry: handleReTry,
366
+ handleDelFile: handleDelFile
367
+ }), props.isVoiceGetting && /*#__PURE__*/_jsxs("div", {
368
+ style: {
369
+ display: 'flex',
370
+ alignItems: 'start',
371
+ height: '60px'
372
+ },
373
+ children: [/*#__PURE__*/_jsx(LottieImg, {
374
+ name: "aiLoading",
375
+ size: [20, 40]
376
+ }), /*#__PURE__*/_jsx("span", {
377
+ style: {
378
+ flex: 1
379
+ },
380
+ children: "\u6B63\u5728\u83B7\u53D6\u8BED\u97F3\u5185\u5BB9..."
381
+ })]
382
+ })]
383
+ }, 'reference');
364
384
  }, [fileList, props.isRecording, props.isVoiceGetting, messageList]);
365
385
  var handleHangUp = function handleHangUp() {
366
386
  var _props$onHistoryReloa;
@@ -382,52 +402,53 @@ var ChatInput = /*#__PURE__*/React.forwardRef(function (props, ref) {
382
402
  setHasContent(false);
383
403
  }
384
404
  }, [props.defaultPrompt, messageList.length]);
385
- return /*#__PURE__*/React.createElement("div", {
405
+ return /*#__PURE__*/_jsxs("div", {
386
406
  className: styles.inputWrap,
387
- ref: inputWrapRef
388
- }, props.isRecording ? /*#__PURE__*/React.createElement(VoiceRecording, {
389
- recordingCount: props.recordingCount,
390
- stopRecording: stopRecording,
391
- containerWidth: inputWidth
392
- }) : /*#__PURE__*/React.createElement(AIChatInput, _extends({}, props, {
393
- ref: inputRef,
394
- style: {
395
- width: '100%'
396
- },
397
- placeholder: props.placeholder || '',
398
- references: [{
399
- type: 'text',
400
- id: '123'
401
- }],
402
- defaultContent: props.showDefaultPrompt ? transformToInputSlots(props.defaultPrompt || '') : '',
403
- onContentChange: onContentChange
404
- // 输入框底部右侧操作区域
405
- ,
406
- renderActionArea: renderActionArea
407
- // 输入框底部左侧操作区域
408
- ,
409
- renderConfigureArea: renderConfigureArea
410
- // 自定义引用区域
411
- ,
412
- renderReference: renderReference,
413
- onStopGenerate: props.onInterrupt
414
- // 上传文件配置开始
415
- ,
416
- showUploadButton: false,
417
- showUploadFile: false
418
- // 上传文件配置结束
419
- ,
420
- canSend: !props.disabled && hasContent,
421
- onMessageSend: onMessageSend,
422
- generating: isMsgRecieving
423
- })), showChatCommunication && /*#__PURE__*/React.createElement(AIChatDialogue, {
424
- paper: {
425
- enableCaptions: false,
426
- conversationId: conversationId,
427
- botId: agentObj.botId
428
- },
429
- setSpeech: setShowChatCommunication,
430
- handleHangUp: handleHangUp
431
- }));
407
+ ref: inputWrapRef,
408
+ children: [props.isRecording ? /*#__PURE__*/_jsx(VoiceRecording, {
409
+ recordingCount: props.recordingCount,
410
+ stopRecording: stopRecording,
411
+ containerWidth: inputWidth
412
+ }) : /*#__PURE__*/_jsx(AIChatInput, _objectSpread(_objectSpread({}, props), {}, {
413
+ ref: inputRef,
414
+ style: {
415
+ width: '100%'
416
+ },
417
+ placeholder: props.placeholder || '',
418
+ references: [{
419
+ type: 'text',
420
+ id: '123'
421
+ }],
422
+ defaultContent: props.showDefaultPrompt ? transformToInputSlots(props.defaultPrompt || '') : '',
423
+ onContentChange: onContentChange
424
+ // 输入框底部右侧操作区域
425
+ ,
426
+ renderActionArea: renderActionArea
427
+ // 输入框底部左侧操作区域
428
+ ,
429
+ renderConfigureArea: renderConfigureArea
430
+ // 自定义引用区域
431
+ ,
432
+ renderReference: renderReference,
433
+ onStopGenerate: props.onInterrupt
434
+ // 上传文件配置开始
435
+ ,
436
+ showUploadButton: false,
437
+ showUploadFile: false
438
+ // 上传文件配置结束
439
+ ,
440
+ canSend: !props.disabled && hasContent,
441
+ onMessageSend: onMessageSend,
442
+ generating: isMsgRecieving
443
+ })), showChatCommunication && /*#__PURE__*/_jsx(AIChatDialogue, {
444
+ paper: {
445
+ enableCaptions: false,
446
+ conversationId: conversationId,
447
+ botId: agentObj.botId
448
+ },
449
+ setSpeech: setShowChatCommunication,
450
+ handleHangUp: handleHangUp
451
+ })]
452
+ });
432
453
  });
433
454
  export default ChatInput;
@@ -7,7 +7,7 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
7
7
  import React from 'react';
8
8
  import { Toast, Tooltip } from '@douyinfe/semi-ui';
9
9
  // import useVoiceFirstUse from '@/hooks/useVoiceFirstUse';
10
-
10
+ import { jsx as _jsx } from "react/jsx-runtime";
11
11
  var ICON_ADDRESS = 'https://simg01.gaodunwangxiao.com/uploadimgs/tmp/upload/202601/12/0812c_20260112171004.png';
12
12
  var VoiceCommunication = function VoiceCommunication(props) {
13
13
  var _React$useState = React.useState(false),
@@ -40,30 +40,32 @@ var VoiceCommunication = function VoiceCommunication(props) {
40
40
  }
41
41
  props.onClick();
42
42
  };
43
- return /*#__PURE__*/React.createElement(Tooltip, {
43
+ return /*#__PURE__*/_jsx(Tooltip, {
44
44
  content: '语音通话',
45
45
  visible: showToast,
46
46
  onVisibleChange: function onVisibleChange(isVisible) {
47
47
  return setShowToast(isVisible);
48
- }
49
- }, /*#__PURE__*/React.createElement("div", {
50
- style: {
51
- display: 'flex',
52
- alignItems: 'center',
53
- justifyContent: 'center',
54
- width: '32px',
55
- height: '32px',
56
- cursor: props.disabled ? 'not-allowed' : 'pointer',
57
- fontSize: '20px'
58
- },
59
- onClick: handleClick
60
- }, /*#__PURE__*/React.createElement("img", {
61
- style: {
62
- width: '32px',
63
- height: '32px'
64
48
  },
65
- src: ICON_ADDRESS,
66
- alt: "\u8BED\u97F3\u901A\u8BDD"
67
- })));
49
+ children: /*#__PURE__*/_jsx("div", {
50
+ style: {
51
+ display: 'flex',
52
+ alignItems: 'center',
53
+ justifyContent: 'center',
54
+ width: '32px',
55
+ height: '32px',
56
+ cursor: props.disabled ? 'not-allowed' : 'pointer',
57
+ fontSize: '20px'
58
+ },
59
+ onClick: handleClick,
60
+ children: /*#__PURE__*/_jsx("img", {
61
+ style: {
62
+ width: '32px',
63
+ height: '32px'
64
+ },
65
+ src: ICON_ADDRESS,
66
+ alt: "\u8BED\u97F3\u901A\u8BDD"
67
+ })
68
+ })
69
+ });
68
70
  };
69
71
  export default VoiceCommunication;
@@ -1,5 +1,6 @@
1
1
  import React from 'react';
2
2
  import { Tooltip, Toast } from '@douyinfe/semi-ui';
3
+ import { jsx as _jsx } from "react/jsx-runtime";
3
4
  var ICON_ADDRESS = 'https://simg01.gaodunwangxiao.com/uploadimgs/tmp/upload/202601/04/be8de_20260104155638.png';
4
5
  var VoiceRecord = function VoiceRecord(props) {
5
6
  var handleClick = function handleClick() {
@@ -9,26 +10,28 @@ var VoiceRecord = function VoiceRecord(props) {
9
10
  }
10
11
  props.onClick();
11
12
  };
12
- return /*#__PURE__*/React.createElement(Tooltip, {
13
- content: '语音输入'
14
- }, /*#__PURE__*/React.createElement("div", {
15
- style: {
16
- display: 'flex',
17
- alignItems: 'center',
18
- justifyContent: 'center',
19
- width: '32px',
20
- height: '32px',
21
- cursor: props.disabled ? 'not-allowed' : 'pointer',
22
- fontSize: '20px'
23
- },
24
- onClick: handleClick
25
- }, /*#__PURE__*/React.createElement("img", {
26
- style: {
27
- width: '32px',
28
- height: '32px'
29
- },
30
- src: ICON_ADDRESS,
31
- alt: "\u8BED\u97F3\u8F93\u5165"
32
- })));
13
+ return /*#__PURE__*/_jsx(Tooltip, {
14
+ content: '语音输入',
15
+ children: /*#__PURE__*/_jsx("div", {
16
+ style: {
17
+ display: 'flex',
18
+ alignItems: 'center',
19
+ justifyContent: 'center',
20
+ width: '32px',
21
+ height: '32px',
22
+ cursor: props.disabled ? 'not-allowed' : 'pointer',
23
+ fontSize: '20px'
24
+ },
25
+ onClick: handleClick,
26
+ children: /*#__PURE__*/_jsx("img", {
27
+ style: {
28
+ width: '32px',
29
+ height: '32px'
30
+ },
31
+ src: ICON_ADDRESS,
32
+ alt: "\u8BED\u97F3\u8F93\u5165"
33
+ })
34
+ })
35
+ });
33
36
  };
34
37
  export default VoiceRecord;
@@ -1,6 +1,7 @@
1
1
  import React from 'react';
2
2
  import { Popconfirm, Button } from '@douyinfe/semi-ui';
3
3
  import { IconDeleteStroked } from '@douyinfe/semi-icons';
4
+ import { jsx as _jsx } from "react/jsx-runtime";
4
5
  var ConversationDelete = function ConversationDelete(_ref) {
5
6
  var onDelete = _ref.onDelete;
6
7
  var onConfirm = function onConfirm() {
@@ -9,16 +10,17 @@ var ConversationDelete = function ConversationDelete(_ref) {
9
10
  var onCancel = function onCancel() {
10
11
  // 取消删除
11
12
  };
12
- return /*#__PURE__*/React.createElement(Popconfirm, {
13
+ return /*#__PURE__*/_jsx(Popconfirm, {
13
14
  title: "\u786E\u5B9A\u662F\u5426\u8981\u5220\u9664\u4F1A\u8BDD\uFF1F",
14
15
  content: "\u6B64\u64CD\u4F5C\u5C06\u4E0D\u53EF\u9006",
15
16
  onConfirm: onConfirm,
16
- onCancel: onCancel
17
- }, /*#__PURE__*/React.createElement(Button, {
18
- icon: /*#__PURE__*/React.createElement(IconDeleteStroked, {
19
- size: "large"
20
- }),
21
- theme: "borderless"
22
- }));
17
+ onCancel: onCancel,
18
+ children: /*#__PURE__*/_jsx(Button, {
19
+ icon: /*#__PURE__*/_jsx(IconDeleteStroked, {
20
+ size: "large"
21
+ }),
22
+ theme: "borderless"
23
+ })
24
+ });
23
25
  };
24
26
  export default ConversationDelete;
@@ -1,11 +1,14 @@
1
1
  import styles from "./index.module.css";
2
2
  import React from 'react';
3
+ import { jsx as _jsx } from "react/jsx-runtime";
4
+ import { jsxs as _jsxs } from "react/jsx-runtime";
3
5
  export default function LoadingDots() {
4
- return /*#__PURE__*/React.createElement("div", {
5
- className: styles.loading_dots
6
- }, /*#__PURE__*/React.createElement("div", {
7
- className: styles.loading_dots__dot
8
- }), /*#__PURE__*/React.createElement("div", {
9
- className: styles.loading_dots__dot
10
- }));
6
+ return /*#__PURE__*/_jsxs("div", {
7
+ className: styles.loading_dots,
8
+ children: [/*#__PURE__*/_jsx("div", {
9
+ className: styles.loading_dots__dot
10
+ }), /*#__PURE__*/_jsx("div", {
11
+ className: styles.loading_dots__dot
12
+ })]
13
+ });
11
14
  }
@@ -13,6 +13,8 @@ import EmptyImg from "../../assets/image/empty-img.png";
13
13
  import EmptyImgDark from "../../assets/image/empty-img-dark.png";
14
14
  import classNames from 'classnames';
15
15
  import React from 'react';
16
+ import { jsx as _jsx } from "react/jsx-runtime";
17
+ import { jsxs as _jsxs } from "react/jsx-runtime";
16
18
  var EmptyShow = function EmptyShow(_ref) {
17
19
  var style = _ref.style,
18
20
  _ref$imgStyle = _ref.imgStyle,
@@ -20,13 +22,16 @@ var EmptyShow = function EmptyShow(_ref) {
20
22
  title = _ref.title,
21
23
  _ref$dark = _ref.dark,
22
24
  dark = _ref$dark === void 0 ? false : _ref$dark;
23
- return /*#__PURE__*/React.createElement("div", {
25
+ return /*#__PURE__*/_jsxs("div", {
24
26
  className: classNames(styles.emptyShow, _defineProperty({}, styles.dark, dark)),
25
- style: style
26
- }, /*#__PURE__*/React.createElement("img", {
27
- src: dark ? EmptyImgDark : EmptyImg,
28
- style: imgStyle,
29
- alt: ""
30
- }), /*#__PURE__*/React.createElement("p", null, title || '暂无内容'));
27
+ style: style,
28
+ children: [/*#__PURE__*/_jsx("img", {
29
+ src: dark ? EmptyImgDark : EmptyImg,
30
+ style: imgStyle,
31
+ alt: ""
32
+ }), /*#__PURE__*/_jsx("p", {
33
+ children: title || '暂无内容'
34
+ })]
35
+ });
31
36
  };
32
37
  export default EmptyShow;
@@ -1,6 +1,8 @@
1
1
  import React from 'react';
2
2
  import ExcelFailCard from "./ExcelFailCard";
3
3
  import { ExcelExcutingSteps } from "./ExcelExcuting";
4
+ import { jsx as _jsx } from "react/jsx-runtime";
5
+ import { Fragment as _Fragment } from "react/jsx-runtime";
4
6
  var ExcelCard = function ExcelCard(_ref) {
5
7
  var item = _ref.item,
6
8
  moduleInfo = _ref.moduleInfo,
@@ -15,14 +17,14 @@ var ExcelCard = function ExcelCard(_ref) {
15
17
  return null;
16
18
  case 2:
17
19
  // 失败
18
- return /*#__PURE__*/React.createElement(ExcelFailCard, {
20
+ return /*#__PURE__*/_jsx(ExcelFailCard, {
19
21
  skillDetail: skillDetail,
20
22
  item: item,
21
23
  onRetry: onRetry
22
24
  });
23
25
  default:
24
26
  // 执行中
25
- return /*#__PURE__*/React.createElement(ExcelExcutingSteps, {
27
+ return /*#__PURE__*/_jsx(ExcelExcutingSteps, {
26
28
  item: item,
27
29
  skillDetail: skillDetail,
28
30
  onSucess: onSucess,
@@ -30,6 +32,8 @@ var ExcelCard = function ExcelCard(_ref) {
30
32
  });
31
33
  }
32
34
  }, [moduleInfo, item, onRetry, onFailure, onSucess]);
33
- return /*#__PURE__*/React.createElement(React.Fragment, null, renderContent);
35
+ return /*#__PURE__*/_jsx(_Fragment, {
36
+ children: renderContent
37
+ });
34
38
  };
35
39
  export default ExcelCard;