@glodon-aiot/agent-cli-ui 3.3.0-beta.13 → 3.3.0-beta.15

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 (146) hide show
  1. package/dist/es/AgentClientUI.mjs +17 -17
  2. package/dist/es/{FileItem → Dialog/AgentChat/HistoryItem/FileItem}/index.mjs +34 -40
  3. package/dist/es/Dialog/{SearchReference → AgentChat/HistoryItem/SearchReference}/index.mjs +7 -7
  4. package/dist/es/Dialog/{SessionAction → AgentChat/HistoryItem/SessionAction}/index.mjs +11 -12
  5. package/dist/es/Dialog/{SessionRefer → AgentChat/HistoryItem/SessionRefer}/ReferItem/index.mjs +19 -19
  6. package/dist/es/Dialog/{SessionRefer → AgentChat/HistoryItem/SessionRefer}/index.mjs +3 -3
  7. package/dist/es/Dialog/{SessionRelated → AgentChat/HistoryItem/SessionRelated}/index.mjs +3 -3
  8. package/dist/es/Dialog/{HistoryItem → AgentChat/HistoryItem}/index.mjs +56 -62
  9. package/dist/es/Dialog/{PromptSetting → AgentChat/PromptSetting}/index.mjs +2 -2
  10. package/dist/es/Dialog/{ConnectToNetwork → AgentChat/Tools/ConnectToNetwork}/index.mjs +1 -1
  11. package/dist/es/Dialog/{PromptManager → AgentChat/Tools/PromptManager}/PromptList/PromptListItem.mjs +2 -2
  12. package/dist/es/Dialog/{PromptManager → AgentChat/Tools/PromptManager}/index.mjs +4 -4
  13. package/dist/es/Dialog/{SessionListDrawer → AgentChat/Tools/SessionListDrawer}/HistorySessionList/SessionItem.mjs +24 -30
  14. package/dist/es/Dialog/{SessionListDrawer → AgentChat/Tools/SessionListDrawer}/HistorySessionList/index.mjs +1 -1
  15. package/dist/es/Dialog/{SessionListDrawer → AgentChat/Tools/SessionListDrawer}/index.mjs +1 -1
  16. package/dist/es/Dialog/AgentChat/Tools/UploadKnowledgeFiles/FileCard/index.mjs +128 -0
  17. package/dist/es/Dialog/{UploadKnowledgeFiles → AgentChat/Tools/UploadKnowledgeFiles}/index.mjs +5 -5
  18. package/dist/es/Dialog/AgentChat/index.mjs +24 -24
  19. package/dist/es/Dialog/SessionList/index.mjs +1 -1
  20. package/dist/es/Dialog/index.mjs +109 -118
  21. package/dist/es/Footer/FooterWarning.mjs +3 -3
  22. package/dist/es/Footer/index.mjs +3 -3
  23. package/dist/es/QuillEditor/index.mjs +11 -11
  24. package/dist/es/components/Copy/index.mjs +1 -1
  25. package/dist/es/{Dialog → components}/FilePreview/index.mjs +16 -16
  26. package/dist/es/{Dialog → components}/KnowledgeList/KnowledgeSelect/index.mjs +1 -1
  27. package/dist/es/{Dialog → components}/KnowledgeList/index.mjs +21 -23
  28. package/dist/es/{Dialog → components}/Recommend/RecommendItem.mjs +31 -37
  29. package/dist/es/{Dialog → components}/Recommend/index.mjs +0 -1
  30. package/dist/es/constant.mjs +16 -8
  31. package/dist/es/index.mjs +26 -33
  32. package/dist/es/src/style10.css +1 -1
  33. package/dist/es/src/style11.css +1 -1
  34. package/dist/es/src/style12.css +1 -1
  35. package/dist/es/src/style13.css +1 -1
  36. package/dist/es/src/style15.css +1 -1
  37. package/dist/es/src/style17.css +1 -1
  38. package/dist/es/src/style20.css +1 -1
  39. package/dist/es/src/style21.css +1 -1
  40. package/dist/es/src/style23.css +1 -0
  41. package/dist/es/src/style25.css +1 -1
  42. package/dist/es/src/style26.css +1 -1
  43. package/dist/es/src/style27.css +1 -1
  44. package/dist/es/src/style28.css +1 -1
  45. package/dist/es/src/style29.css +1 -1
  46. package/dist/es/src/style30.css +1 -1
  47. package/dist/es/src/style31.css +1 -1
  48. package/dist/es/src/style4.css +1 -1
  49. package/dist/es/src/style5.css +1 -1
  50. package/dist/es/src/style7.css +1 -1
  51. package/dist/es/src/style8.css +1 -1
  52. package/dist/es/src/style9.css +1 -1
  53. package/dist/lib/index.css +1 -1
  54. package/dist/lib/index.js +5 -5
  55. package/dist/src/ConnectToNetwork_bac/index.d.ts +13 -0
  56. package/dist/src/Dialog/AgentChat/HistoryItem/FileItem/index.d.ts +11 -0
  57. package/dist/src/Dialog/AgentChat/HistoryItem/InputProgress/index.d.ts +7 -0
  58. package/dist/src/Dialog/AgentChat/HistoryItem/SearchReference/index.d.ts +10 -0
  59. package/dist/src/Dialog/AgentChat/HistoryItem/SessionAction/index.d.ts +13 -0
  60. package/dist/src/Dialog/AgentChat/HistoryItem/SessionRefer/ReferItem/index.d.ts +9 -0
  61. package/dist/src/Dialog/AgentChat/HistoryItem/SessionRefer/index.d.ts +8 -0
  62. package/dist/src/Dialog/AgentChat/HistoryItem/SessionRelated/index.d.ts +9 -0
  63. package/dist/src/Dialog/AgentChat/HistoryItem/index.d.ts +18 -0
  64. package/dist/src/Dialog/AgentChat/PromptSetting/index.d.ts +15 -0
  65. package/dist/src/Dialog/AgentChat/Tools/ConnectToNetwork/index.d.ts +14 -0
  66. package/dist/src/Dialog/AgentChat/Tools/PromptManager/PromptList/EditPromptModal/index.d.ts +11 -0
  67. package/dist/src/Dialog/AgentChat/Tools/PromptManager/PromptList/PrivatePromptList.d.ts +12 -0
  68. package/dist/src/Dialog/AgentChat/Tools/PromptManager/PromptList/PromptListItem.d.ts +13 -0
  69. package/dist/src/Dialog/AgentChat/Tools/PromptManager/PromptList/PublicPromptList.d.ts +12 -0
  70. package/dist/src/Dialog/AgentChat/Tools/PromptManager/index.d.ts +13 -0
  71. package/dist/src/Dialog/AgentChat/Tools/SessionListDrawer/HistorySessionList/NameEditPanel.d.ts +9 -0
  72. package/dist/src/Dialog/AgentChat/Tools/SessionListDrawer/HistorySessionList/SessionItem.d.ts +16 -0
  73. package/dist/src/Dialog/AgentChat/Tools/SessionListDrawer/HistorySessionList/index.d.ts +9 -0
  74. package/dist/src/Dialog/AgentChat/Tools/SessionListDrawer/index.d.ts +9 -0
  75. package/dist/src/Dialog/AgentChat/Tools/UploadKnowledgeFiles/ClearModal/index.d.ts +7 -0
  76. package/dist/src/Dialog/AgentChat/Tools/UploadKnowledgeFiles/FileCard/index.d.ts +22 -0
  77. package/dist/src/Dialog/AgentChat/Tools/UploadKnowledgeFiles/index.d.ts +22 -0
  78. package/dist/src/Dialog/AgentChat/index.d.ts +1 -1
  79. package/dist/src/Dialog/FileItem/index.d.ts +11 -0
  80. package/dist/src/Dialog/HistoryItem/FileItem/index.d.ts +11 -0
  81. package/dist/src/Dialog/HistoryItem/InputProgress/index.d.ts +7 -0
  82. package/dist/src/Dialog/HistoryItem/ReferCollapse/index.d.ts +8 -0
  83. package/dist/src/Dialog/HistoryItem/ReferCollapsea/index.d.ts +8 -0
  84. package/dist/src/Dialog/HistoryItem/SearchReference/index.d.ts +10 -0
  85. package/dist/src/Dialog/HistoryItem/SessionAction/index.d.ts +13 -0
  86. package/dist/src/Dialog/HistoryItem/SessionRefer/ReferItem/index.d.ts +9 -0
  87. package/dist/src/Dialog/HistoryItem/SessionRefer/index.d.ts +8 -0
  88. package/dist/src/Dialog/HistoryItem/SessionRelated/index.d.ts +9 -0
  89. package/dist/src/Dialog/InputProgress/index.d.ts +7 -0
  90. package/dist/src/Dialog/SessionList/index.d.ts +1 -1
  91. package/dist/src/Dialog/Tools/ConnectToNetwork/index.d.ts +14 -0
  92. package/dist/src/Dialog/Tools/PromptManager/PromptList/EditPromptModal/index.d.ts +11 -0
  93. package/dist/src/Dialog/Tools/PromptManager/PromptList/PrivatePromptList.d.ts +12 -0
  94. package/dist/src/Dialog/Tools/PromptManager/PromptList/PromptListItem.d.ts +13 -0
  95. package/dist/src/Dialog/Tools/PromptManager/PromptList/PublicPromptList.d.ts +12 -0
  96. package/dist/src/Dialog/Tools/PromptManager/index.d.ts +13 -0
  97. package/dist/src/Dialog/Tools/SessionListDrawer/HistorySessionList/NameEditPanel.d.ts +9 -0
  98. package/dist/src/Dialog/Tools/SessionListDrawer/HistorySessionList/SessionItem.d.ts +16 -0
  99. package/dist/src/Dialog/Tools/SessionListDrawer/HistorySessionList/index.d.ts +9 -0
  100. package/dist/src/Dialog/Tools/SessionListDrawer/index.d.ts +9 -0
  101. package/dist/src/Dialog/Tools/UploadKnowledgeFiles/ClearModal/index.d.ts +7 -0
  102. package/dist/src/Dialog/Tools/UploadKnowledgeFiles/FileCard/index.d.ts +22 -0
  103. package/dist/src/Dialog/Tools/UploadKnowledgeFiles/index.d.ts +22 -0
  104. package/dist/src/Dialog/UploadFilesa/ClearModal/index.d.ts +7 -0
  105. package/dist/src/Dialog/UploadFilesa/index.d.ts +21 -0
  106. package/dist/src/FileCard-bac/index.d.ts +21 -0
  107. package/dist/src/Footer/FooterWarning.d.ts +2 -2
  108. package/dist/src/Greeting-bac/index.d.ts +7 -0
  109. package/dist/src/components/FilePreview/index.d.ts +20 -0
  110. package/dist/src/components/Greeting/index.d.ts +7 -0
  111. package/dist/src/components/Iconfont/font_4108228_z72fskklg2.d.ts +0 -0
  112. package/dist/src/components/Iconfont/font_4439177_7rytwlvbmjj.d.ts +0 -0
  113. package/dist/src/components/Iconfont/index.d.ts +2 -0
  114. package/dist/src/components/KnowledgeDoc/index.d.ts +9 -0
  115. package/dist/src/components/KnowledgeList/KnowledgeSelect/index.d.ts +12 -0
  116. package/dist/src/components/KnowledgeList/index.d.ts +10 -0
  117. package/dist/src/components/Recommend/RecommendItem.d.ts +12 -0
  118. package/dist/src/components/Recommend/index.d.ts +14 -0
  119. package/dist/src/constant.d.ts +7 -1
  120. package/dist/src/index.d.ts +3 -3
  121. package/dist/src/types.d.ts +4 -4
  122. package/dist/src/utils/index.d.ts +0 -6
  123. package/package.json +3 -3
  124. package/dist/es/Dialog/FileCard/index.mjs +0 -134
  125. package/dist/es/Dialog/HistoryContent/index.mjs +0 -13
  126. package/dist/es/Dialog/KnowledgeDoc/index.mjs +0 -45
  127. package/dist/es/Dialog/ReferCollapse/index.mjs +0 -64
  128. package/dist/es/Dialog/SessionListDrawer/HistorySessionList/doc-icons/doc.svg.mjs +0 -4
  129. package/dist/es/Dialog/SessionListDrawer/HistorySessionList/doc-icons/docx.svg.mjs +0 -4
  130. package/dist/es/Dialog/SessionListDrawer/HistorySessionList/doc-icons/pdf.svg.mjs +0 -4
  131. package/dist/es/FileCard/doc-icons/doc.svg.mjs +0 -4
  132. package/dist/es/FileCard/doc-icons/docx.svg.mjs +0 -4
  133. package/dist/es/FileCard/doc-icons/pdf.svg.mjs +0 -4
  134. package/dist/es/src/style32.css +0 -1
  135. package/dist/es/src/style33.css +0 -1
  136. /package/dist/es/{InputProgress → Dialog/AgentChat/HistoryItem/InputProgress}/index.mjs +0 -0
  137. /package/dist/es/Dialog/{PromptManager → AgentChat/Tools/PromptManager}/PromptList/PublicPromptList.mjs +0 -0
  138. /package/dist/es/Dialog/{PromptManager → AgentChat/Tools/PromptManager}/PromptList/access/empty.svg.mjs +0 -0
  139. /package/dist/es/Dialog/{SessionListDrawer → AgentChat/Tools/SessionListDrawer}/HistorySessionList/NameEditPanel.mjs +0 -0
  140. /package/dist/es/Dialog/{UploadKnowledgeFiles → AgentChat/Tools/UploadKnowledgeFiles}/ClearModal/index.mjs +0 -0
  141. /package/dist/es/{Dialog/FileCard → assets}/doc-icons/doc.svg.mjs +0 -0
  142. /package/dist/es/{Dialog/FileCard → assets}/doc-icons/docx.svg.mjs +0 -0
  143. /package/dist/es/{Dialog/FileCard → assets}/doc-icons/pdf.svg.mjs +0 -0
  144. /package/dist/es/{Dialog → components}/Greeting/index.mjs +0 -0
  145. /package/dist/es/{Iconfont → components/Iconfont}/index.mjs +0 -0
  146. /package/dist/es/{Dialog → components}/Recommend/tip.svg.mjs +0 -0
@@ -19,13 +19,13 @@ import { Upload as W, Button as M, message as i, Badge as ue, Spin as fe, Popove
19
19
  import { forwardRef as he, useState as E, useRef as G, useContext as pe, useEffect as z, useImperativeHandle as ye } from "react";
20
20
  import { LoadingOutlined as xe, CloseCircleFilled as Se, CloudUploadOutlined as be } from "@ant-design/icons";
21
21
  /* empty css */import Ce from "lodash/debounce";
22
- import Ne from "../FileCard/index.mjs";
22
+ import Ne from "./FileCard/index.mjs";
23
23
  import { IFileOrigin as Fe } from "@glodon-aiot/apis";
24
24
  import we from "./ClearModal/index.mjs";
25
- import j from "../../Iconfont/index.mjs";
26
- import ve from "../../context.mjs";
27
- import { isValidImageUrlWithAnyExtension as Ie, extractFileName as Ee, FILE_NAME_MAX_LENGTH as X, fileTypes as ze } from "../../utils/index.mjs";
28
- import { MB as Ae } from "../../constant.mjs";
25
+ import j from "../../../../components/Iconfont/index.mjs";
26
+ import ve from "../../../../context.mjs";
27
+ import { isValidImageUrlWithAnyExtension as Ie, extractFileName as Ee, FILE_NAME_MAX_LENGTH as X, fileTypes as ze } from "../../../../utils/index.mjs";
28
+ import { MB as Ae } from "../../../../constant.mjs";
29
29
  const Ue = he((L, P) => {
30
30
  const {
31
31
  appId: g,
@@ -30,28 +30,28 @@ var z = (L, o, v) => new Promise((e, x) => {
30
30
  import { jsx as d, jsxs as A } from "react/jsx-runtime";
31
31
  import { memo as Kt, useState as m, useRef as B, useContext as Wt, useEffect as T, useMemo as Qt } from "react";
32
32
  /* empty css */import { Divider as _t, Spin as Gt, Button as _, Space as le, Upload as Xt, Tooltip as Zt, message as u, notification as Jt } from "antd";
33
- import de from "../../Iconfont/index.mjs";
33
+ import de from "../../components/Iconfont/index.mjs";
34
34
  import { IHistoryRole as G, ChatMessageRole as tt } from "@glodon-aiot/apis";
35
- import it from "../HistoryItem/index.mjs";
35
+ import it from "./HistoryItem/index.mjs";
36
36
  import ot from "dayjs";
37
37
  import { v4 as st } from "uuid";
38
38
  import St from "../../context.mjs";
39
39
  import { MB as en } from "../../constant.mjs";
40
- import tn from "../FilePreview/index.mjs";
40
+ import tn from "../../components/FilePreview/index.mjs";
41
41
  import { getImageExtension as nn } from "../../utils/index.mjs";
42
42
  import on from "../../QuillEditor/index.mjs";
43
- import sn from "../Recommend/index.mjs";
44
- import rn from "../Greeting/index.mjs";
45
- import an from "../PromptManager/index.mjs";
46
- import ln from "../../Footer/index.mjs";
47
- import { CameraOutlined as dn, PlusOutlined as cn } from "@ant-design/icons";
48
- import fn from "../UploadKnowledgeFiles/index.mjs";
49
- import gn from "../UploadingPrompt/index.mjs";
50
- import un from "../PromptSetting/index.mjs";
43
+ import sn from "../../components/Recommend/index.mjs";
44
+ import rn from "../../components/Greeting/index.mjs";
45
+ import an from "../../Footer/index.mjs";
46
+ import { CameraOutlined as ln, PlusOutlined as dn } from "@ant-design/icons";
47
+ import cn from "./Tools/UploadKnowledgeFiles/index.mjs";
48
+ import fn from "../UploadingPrompt/index.mjs";
49
+ import gn from "./PromptSetting/index.mjs";
51
50
  import { useMemoizedFn as Ie } from "ahooks";
52
- import hn from "../SessionListDrawer/index.mjs";
53
- import mn from "react-infinite-scroll-component";
54
- import yn from "../ConnectToNetwork/index.mjs";
51
+ import un from "./Tools/SessionListDrawer/index.mjs";
52
+ import hn from "react-infinite-scroll-component";
53
+ import mn from "./Tools/ConnectToNetwork/index.mjs";
54
+ import yn from "./Tools/PromptManager/index.mjs";
55
55
  import pn from "../../assets/icon.svg.mjs";
56
56
  const vn = Kt(it), bn = {
57
57
  icon: pn,
@@ -584,7 +584,7 @@ ${t}` : t, a = new J(i, r, G.User, n);
584
584
  }, [o == null ? void 0 : o.arrange, h]);
585
585
  return /* @__PURE__ */ A("div", {
586
586
  className: "agent-chat",
587
- children: [(c == null ? void 0 : c.promptVariables) && /* @__PURE__ */ d(un, {
587
+ children: [(c == null ? void 0 : c.promptVariables) && /* @__PURE__ */ d(gn, {
588
588
  ref: De,
589
589
  appId: o.id,
590
590
  currentSession: e,
@@ -606,7 +606,7 @@ ${t}` : t, a = new J(i, r, G.User, n);
606
606
  },
607
607
  ref: P,
608
608
  onScroll: Mt,
609
- children: (Ye = e == null ? void 0 : e.data) != null && Ye.id && (h != null && h.length) ? /* @__PURE__ */ A(mn, {
609
+ children: (Ye = e == null ? void 0 : e.data) != null && Ye.id && (h != null && h.length) ? /* @__PURE__ */ A(hn, {
610
610
  dataLength: h.length,
611
611
  next: jt,
612
612
  style: {
@@ -739,7 +739,7 @@ ${t}` : t, a = new J(i, r, G.User, n);
739
739
  bottom: "-2px"
740
740
  },
741
741
  disabled: !!X || M,
742
- icon: /* @__PURE__ */ d(dn, {
742
+ icon: /* @__PURE__ */ d(ln, {
743
743
  className: "icon-tianjia",
744
744
  style: {
745
745
  fontSize: "22px"
@@ -768,7 +768,7 @@ ${t}` : t, a = new J(i, r, G.User, n);
768
768
  })
769
769
  })
770
770
  })
771
- }), ce && (c != null && c.fileUpload) && (o != null && o.id) ? /* @__PURE__ */ d(fn, {
771
+ }), ce && (c != null && c.fileUpload) && (o != null && o.id) ? /* @__PURE__ */ d(cn, {
772
772
  appId: o == null ? void 0 : o.id,
773
773
  ref: oe,
774
774
  isFirstSession: Ue,
@@ -817,7 +817,7 @@ ${t}` : t, a = new J(i, r, G.User, n);
817
817
  [t]: []
818
818
  }), be());
819
819
  }
820
- }) : null, (c == null ? void 0 : c.prompt) && (o == null ? void 0 : o.id) && /* @__PURE__ */ d(an, {
820
+ }) : null, (c == null ? void 0 : c.prompt) && (o == null ? void 0 : o.id) && /* @__PURE__ */ d(yn, {
821
821
  appId: o.id,
822
822
  list: [],
823
823
  search: Re ? ht : "",
@@ -827,7 +827,7 @@ ${t}` : t, a = new J(i, r, G.User, n);
827
827
  disabled: M
828
828
  })]
829
829
  }), /* @__PURE__ */ A(le, {
830
- children: [(c == null ? void 0 : c.connectNetwork) && o.type === 0 && ((Ge = o.arrange) == null ? void 0 : Ge.length) && !!o.arrange[0].enableNetOpen && /* @__PURE__ */ d(yn, {
830
+ children: [(c == null ? void 0 : c.connectNetwork) && o.type === 0 && ((Ge = o.arrange) == null ? void 0 : Ge.length) && !!o.arrange[0].enableNetOpen && /* @__PURE__ */ d(mn, {
831
831
  sessionId: (Xe = e == null ? void 0 : e.data) == null ? void 0 : Xe.id,
832
832
  netStatus: H,
833
833
  enable: typeof (f == null ? void 0 : f.connectNetwork) == "object" && typeof (f == null ? void 0 : f.connectNetwork.diabled) == "boolean" ? !(f != null && f.connectNetwork.diabled) : Nt,
@@ -835,14 +835,14 @@ ${t}` : t, a = new J(i, r, G.User, n);
835
835
  onNetStatusChange: (t) => {
836
836
  Vt(t);
837
837
  }
838
- }), (c == null ? void 0 : c.sessionList) && /* @__PURE__ */ d(hn, {
838
+ }), (c == null ? void 0 : c.sessionList) && /* @__PURE__ */ d(un, {
839
839
  currentSessionId: (Ze = e == null ? void 0 : e.data) == null ? void 0 : Ze.id,
840
840
  onSessionChange: (t, n) => {
841
841
  W(void 0), k == null || k(n);
842
842
  },
843
843
  disabled: M
844
844
  }), (c == null ? void 0 : c.sessionOpen) && /* @__PURE__ */ d(_, {
845
- icon: /* @__PURE__ */ d(cn, {}),
845
+ icon: /* @__PURE__ */ d(dn, {}),
846
846
  className: "add-btn",
847
847
  type: "primary",
848
848
  disabled: Me || !e || !h.length || M,
@@ -886,9 +886,9 @@ ${t}` : t, a = new J(i, r, G.User, n);
886
886
  })
887
887
  })]
888
888
  })
889
- }), /* @__PURE__ */ d(ln, {
889
+ }), /* @__PURE__ */ d(an, {
890
890
  tips: lt
891
- }), He && /* @__PURE__ */ d(gn, {
891
+ }), He && /* @__PURE__ */ d(fn, {
892
892
  isvisible: He,
893
893
  files: vt,
894
894
  sessionId: (Je = e == null ? void 0 : e.data) == null ? void 0 : Je.id,
@@ -19,7 +19,7 @@ import { forwardRef as U, useState as L, useContext as q, useEffect as x, useImp
19
19
  import { Button as J, Popconfirm as H, Input as Q, Space as T } from "antd";
20
20
  import W from "dayjs";
21
21
  import X from "classnames";
22
- import O from "../../Iconfont/index.mjs";
22
+ import O from "../../components/Iconfont/index.mjs";
23
23
  import Y from "../../context.mjs";
24
24
  /* empty css */import { useMemoizedFn as Z } from "ahooks";
25
25
  const $ = U((V, E) => {
@@ -1,152 +1,143 @@
1
- var q = Object.defineProperty, z = Object.defineProperties;
2
- var B = Object.getOwnPropertyDescriptors;
3
- var L = Object.getOwnPropertySymbols;
4
- var F = Object.prototype.hasOwnProperty, G = Object.prototype.propertyIsEnumerable;
5
- var x = (t, o, s) => o in t ? q(t, o, { enumerable: !0, configurable: !0, writable: !0, value: s }) : t[o] = s, j = (t, o) => {
6
- for (var s in o || (o = {}))
7
- F.call(o, s) && x(t, s, o[s]);
8
- if (L)
9
- for (var s of L(o))
10
- G.call(o, s) && x(t, s, o[s]);
1
+ var O = Object.defineProperty, U = Object.defineProperties;
2
+ var V = Object.getOwnPropertyDescriptors;
3
+ var b = Object.getOwnPropertySymbols;
4
+ var q = Object.prototype.hasOwnProperty, z = Object.prototype.propertyIsEnumerable;
5
+ var E = (t, d, n) => d in t ? O(t, d, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[d] = n, L = (t, d) => {
6
+ for (var n in d || (d = {}))
7
+ q.call(d, n) && E(t, n, d[n]);
8
+ if (b)
9
+ for (var n of b(d))
10
+ z.call(d, n) && E(t, n, d[n]);
11
11
  return t;
12
- }, A = (t, o) => z(t, B(o));
13
- var v = (t, o, s) => new Promise((I, w) => {
14
- var e = (r) => {
12
+ }, x = (t, d) => U(t, V(d));
13
+ var h = (t, d, n) => new Promise((w, s) => {
14
+ var i = (c) => {
15
15
  try {
16
- g(s.next(r));
17
- } catch (f) {
18
- w(f);
16
+ e(n.next(c));
17
+ } catch (r) {
18
+ s(r);
19
19
  }
20
- }, a = (r) => {
20
+ }, p = (c) => {
21
21
  try {
22
- g(s.throw(r));
23
- } catch (f) {
24
- w(f);
22
+ e(n.throw(c));
23
+ } catch (r) {
24
+ s(r);
25
25
  }
26
- }, g = (r) => r.done ? I(r.value) : Promise.resolve(r.value).then(e, a);
27
- g((s = s.apply(t, o)).next());
26
+ }, e = (c) => c.done ? w(c.value) : Promise.resolve(c.value).then(i, p);
27
+ e((n = n.apply(t, d)).next());
28
28
  });
29
- import { jsx as c, jsxs as K } from "react/jsx-runtime";
30
- import { useState as p, useContext as J, useRef as M, useEffect as y } from "react";
31
- import P from "../context.mjs";
32
- import Q from "./AgentChat/index.mjs";
33
- import T from "./KnowledgeList/index.mjs";
34
- import W from "./SessionList/index.mjs";
35
- /* empty css */const re = (t) => {
29
+ import { jsx as l, jsxs as j } from "react/jsx-runtime";
30
+ import { useState as v, useContext as B, useRef as F, useEffect as u } from "react";
31
+ import G from "../context.mjs";
32
+ import J from "./AgentChat/index.mjs";
33
+ import M from "../components/KnowledgeList/index.mjs";
34
+ import P from "./SessionList/index.mjs";
35
+ /* empty css */const ee = (t) => {
36
36
  const {
37
- sessionId: o,
38
- appId: s,
39
- docViewerUrl: I,
40
- bodyStyle: w
41
- } = t, [e, a] = p(), {
42
- service: g,
43
- mode: r,
44
- showHeader: f,
45
- token: X,
46
- agentClient: n,
47
- sider: R,
48
- onSessionLoad: m,
49
- onSessionUnload: Y,
50
- footer: Z,
51
- transform: _,
52
- depId: $,
53
- features: l
54
- } = J(P), [h, H] = p(), S = M(null), [U, D] = p(""), [k, b] = p(), [E, N] = p(!1);
55
- y(() => {
56
- var i;
57
- N(e ? !!((i = e.data) != null && i.netOpen) : typeof (l == null ? void 0 : l.connectNetwork) == "object" && typeof (l == null ? void 0 : l.connectNetwork.default) == "boolean" ? l.connectNetwork.default : !1);
58
- }, [e]), y(() => {
59
- const i = () => v(void 0, null, function* () {
60
- const d = n == null ? void 0 : n.application;
61
- if (!(d != null && d.id))
37
+ sessionId: d,
38
+ appId: n,
39
+ docViewerUrl: w
40
+ } = t, [s, i] = v(), {
41
+ showHeader: p,
42
+ agentClient: e,
43
+ sider: c,
44
+ onSessionLoad: r,
45
+ features: f
46
+ } = B(G), [m, A] = v(), I = F(null), [K, R] = v(""), [N, k] = v(), [S, y] = v(!1);
47
+ u(() => {
48
+ var a;
49
+ y(s ? !!((a = s.data) != null && a.netOpen) : typeof (f == null ? void 0 : f.connectNetwork) == "object" && typeof (f == null ? void 0 : f.connectNetwork.default) == "boolean" ? f.connectNetwork.default : !1);
50
+ }, [s]), u(() => {
51
+ const a = () => h(void 0, null, function* () {
52
+ const o = e == null ? void 0 : e.application;
53
+ if (!(o != null && o.id))
62
54
  return;
63
- const u = d == null ? void 0 : d.arrange;
64
- if (!(u != null && u.length))
55
+ const g = o == null ? void 0 : o.arrange;
56
+ if (!(g != null && g.length))
65
57
  return;
66
- const V = u[0].embeddingService;
67
- D(V), H(d);
58
+ const D = g[0].embeddingService;
59
+ R(D), A(o);
68
60
  });
69
- return n == null || n.addEventListener("ready", () => i()), () => {
70
- n == null || n.removeEventListener("ready", i);
61
+ return e == null || e.addEventListener("ready", () => a()), () => {
62
+ e == null || e.removeEventListener("ready", a);
71
63
  };
72
- }, []), y(() => {
73
- n && o && (n.ready ? n == null || n.getSessions().then((i) => v(void 0, null, function* () {
74
- a == null || a(i.find((d) => d.id === o));
75
- })) : n.addEventListener("ready", () => v(void 0, null, function* () {
76
- n == null || n.getSessions().then((i) => v(void 0, null, function* () {
77
- a == null || a(i.find((d) => d.id === o));
64
+ }, []), u(() => {
65
+ e && d && (e.ready ? e == null || e.getSessions().then((a) => h(void 0, null, function* () {
66
+ i == null || i(a.find((o) => o.id === d));
67
+ })) : e.addEventListener("ready", () => h(void 0, null, function* () {
68
+ e == null || e.getSessions().then((a) => h(void 0, null, function* () {
69
+ i == null || i(a.find((o) => o.id === d));
78
70
  }));
79
71
  }), !0));
80
- }, [n, o]), y(() => {
81
- if (!e) {
82
- m && m({
83
- applicationId: s,
72
+ }, [e, d]), u(() => {
73
+ if (!s) {
74
+ r && r({
75
+ applicationId: n,
84
76
  sessionId: "",
85
77
  session: null,
86
78
  sessionInstance: null
87
79
  });
88
80
  return;
89
81
  }
90
- e.data && m && m({
91
- applicationId: s,
92
- sessionId: e.data.id,
93
- session: e.data,
94
- sessionInstance: e
95
- }), e.addEventListener("data:loaded", () => {
96
- e != null && e.data && m && m({
97
- applicationId: s,
98
- sessionId: e.data.id,
99
- session: e.data,
100
- sessionInstance: e
82
+ s.data && r && r({
83
+ applicationId: n,
84
+ sessionId: s.data.id,
85
+ session: s.data,
86
+ sessionInstance: s
87
+ }), s.addEventListener("data:loaded", () => {
88
+ s != null && s.data && r && r({
89
+ applicationId: n,
90
+ sessionId: s.data.id,
91
+ session: s.data,
92
+ sessionInstance: s
101
93
  });
102
94
  }, !0);
103
- }, [e]);
104
- const O = (i) => {
105
- var d;
106
- return (d = S.current) == null ? void 0 : d.create(A(j({}, i), {
107
- knowledges: k
95
+ }, [s]);
96
+ const H = (a) => {
97
+ var o;
98
+ return (o = I.current) == null ? void 0 : o.create(x(L({}, a), {
99
+ knowledges: N
108
100
  }));
109
101
  };
110
- return /* @__PURE__ */ c("div", {
102
+ return /* @__PURE__ */ l("div", {
111
103
  className: "dialog",
112
- children: /* @__PURE__ */ K("div", {
104
+ children: /* @__PURE__ */ j("div", {
113
105
  className: "dialog-pannel",
114
- children: [/* @__PURE__ */ c("div", {
106
+ children: [/* @__PURE__ */ l("div", {
115
107
  className: "dialog-sider",
116
- children: /* @__PURE__ */ c(W, {
117
- ref: S,
118
- sider: R,
119
- appId: s,
120
- networkStatus: E,
121
- currentSession: e,
122
- application: h,
123
- setCurrentSession: a,
124
- checkKnowledges: k,
125
- setCheckKnowledges: f ? b : void 0
108
+ children: /* @__PURE__ */ l(P, {
109
+ ref: I,
110
+ sider: c,
111
+ appId: n,
112
+ networkStatus: S,
113
+ currentSession: s,
114
+ application: m,
115
+ setCurrentSession: i,
116
+ checkKnowledges: N,
117
+ setCheckKnowledges: p ? k : void 0
126
118
  })
127
- }), /* @__PURE__ */ c("div", {
119
+ }), /* @__PURE__ */ l("div", {
128
120
  className: "dialog-content",
129
- children: /* @__PURE__ */ K("div", {
121
+ children: /* @__PURE__ */ j("div", {
130
122
  className: "dialog-chat",
131
- children: [f && /* @__PURE__ */ c("div", {
123
+ children: [p && /* @__PURE__ */ l("div", {
132
124
  className: "dialog-chat-header",
133
- children: /* @__PURE__ */ c(T, {
134
- setCheckKnowledges: b,
135
- application: h,
136
- currentSession: e,
137
- setCurrentSession: a
125
+ children: /* @__PURE__ */ l(M, {
126
+ setCheckKnowledges: k,
127
+ application: m,
128
+ currentSession: s
138
129
  })
139
- }), /* @__PURE__ */ c("div", {
130
+ }), /* @__PURE__ */ l("div", {
140
131
  className: "dialog-chat-content",
141
- children: (h == null ? void 0 : h.id) && /* @__PURE__ */ c(Q, {
142
- setNetworkStatus: N,
143
- networkStatus: E,
144
- application: h,
145
- currentSession: e,
146
- onCreateSession: O,
147
- docViewerUrl: I,
148
- embeddingService: U,
149
- setCurrentSession: a
132
+ children: (m == null ? void 0 : m.id) && /* @__PURE__ */ l(J, {
133
+ setNetworkStatus: y,
134
+ networkStatus: S,
135
+ application: m,
136
+ currentSession: s,
137
+ onCreateSession: H,
138
+ docViewerUrl: w,
139
+ embeddingService: K,
140
+ setCurrentSession: i
150
141
  })
151
142
  })]
152
143
  })
@@ -155,5 +146,5 @@ import W from "./SessionList/index.mjs";
155
146
  });
156
147
  };
157
148
  export {
158
- re as default
149
+ ee as default
159
150
  };
@@ -1,5 +1,5 @@
1
1
  import { jsx as o } from "react/jsx-runtime";
2
- import { useRef as u, useEffect as n } from "react";
2
+ import { useRef as n, useEffect as u } from "react";
3
3
  /* empty css */const l = ({
4
4
  visible: e = !0,
5
5
  text: f = "所有内容均由 AecGPT 人工智能模型生成,请仔细甄别。",
@@ -7,8 +7,8 @@ import { useRef as u, useEffect as n } from "react";
7
7
  }) => {
8
8
  if (!e)
9
9
  return null;
10
- const t = u(null);
11
- return n(() => {
10
+ const t = n(null);
11
+ return u(() => {
12
12
  var i;
13
13
  r && ((i = t.current) == null || i.replaceWith(r));
14
14
  }, [r]), r ? /* @__PURE__ */ o("div", {
@@ -1,12 +1,12 @@
1
- import { jsxs as t, jsx as f } from "react/jsx-runtime";
2
- /* empty css */import m from "./FooterWarning.mjs";
1
+ import { jsxs as t, jsx as n } from "react/jsx-runtime";
2
+ /* empty css */import f from "./FooterWarning.mjs";
3
3
  const l = ({
4
4
  className: e,
5
5
  tips: o,
6
6
  children: r
7
7
  }) => /* @__PURE__ */ t("div", {
8
8
  className: `home-footer ${e || ""}`,
9
- children: [r, /* @__PURE__ */ f(m, {
9
+ children: [r, /* @__PURE__ */ n(f, {
10
10
  visible: o !== !1,
11
11
  text: typeof o == "string" ? o : void 0,
12
12
  element: typeof o != "string" && typeof o != "boolean" ? o : void 0
@@ -1,13 +1,13 @@
1
1
  import { jsxs as s, jsx as r } from "react/jsx-runtime";
2
2
  import { forwardRef as X, useState as o, useRef as O, useImperativeHandle as Y, useEffect as g } from "react";
3
- import Z from "react-quill";
3
+ import { Popover as Z, Space as ee, Button as te } from "antd";
4
+ import { useKeyPress as P } from "ahooks";
4
5
  import T from "classnames";
5
- import ee from "../Iconfont/index.mjs";
6
- import { Popover as te, Space as ne, Button as re } from "antd";
7
- import "react-quill/dist/quill.snow.css";
8
- /* empty css */import { useKeyPress as P } from "ahooks";
6
+ import ne from "react-quill";
7
+ import re from "../components/Iconfont/index.mjs";
9
8
  import { shortCutEnum as p } from "../utils/index.mjs";
10
- const ie = X((z, F) => {
9
+ import "react-quill/dist/quill.snow.css";
10
+ /* empty css */const ie = X((z, F) => {
11
11
  var D, q, B;
12
12
  const {
13
13
  text: N,
@@ -101,7 +101,7 @@ const ie = X((z, F) => {
101
101
  onKeyDownCapture: (e) => {
102
102
  !e.shiftKey && e.code === "Enter" && e.preventDefault();
103
103
  },
104
- children: [/* @__PURE__ */ r(Z, {
104
+ children: [/* @__PURE__ */ r(ne, {
105
105
  theme: "snow",
106
106
  placeholder: "输入你想问的,shift+enter 换行。",
107
107
  ref: n,
@@ -134,7 +134,7 @@ const ie = X((z, F) => {
134
134
  cursor: "pointer",
135
135
  visibility: G() ? "visible" : "hidden"
136
136
  },
137
- children: /* @__PURE__ */ r(te, {
137
+ children: /* @__PURE__ */ r(Z, {
138
138
  autoAdjustOverflow: !0,
139
139
  placement: "top",
140
140
  trigger: "hover",
@@ -184,7 +184,7 @@ const ie = X((z, F) => {
184
184
  display: "flex",
185
185
  alignItems: "center"
186
186
  },
187
- children: [/* @__PURE__ */ s(ne, {
187
+ children: [/* @__PURE__ */ s(ee, {
188
188
  size: 2,
189
189
  style: {
190
190
  color: "#84868C"
@@ -196,12 +196,12 @@ const ie = X((z, F) => {
196
196
  }), /* @__PURE__ */ r("span", {
197
197
  children: c
198
198
  })]
199
- }), /* @__PURE__ */ r(re, {
199
+ }), /* @__PURE__ */ r(te, {
200
200
  type: "link",
201
201
  ghost: !0,
202
202
  disabled: j || !v,
203
203
  loading: m,
204
- icon: /* @__PURE__ */ r(ee, {
204
+ icon: /* @__PURE__ */ r(re, {
205
205
  className: "icon-sendMsg",
206
206
  style: {
207
207
  fontSize: 24
@@ -1,6 +1,6 @@
1
1
  import { jsx as e } from "react/jsx-runtime";
2
2
  import { useState as r, useEffect as c } from "react";
3
- import l from "../../Iconfont/index.mjs";
3
+ import l from "../Iconfont/index.mjs";
4
4
  import { copyToClipboard as m } from "../../utils/clipboard.mjs";
5
5
  /* empty css */import { CheckOutlined as p, CloseOutlined as f } from "@ant-design/icons";
6
6
  import { Tooltip as n } from "antd";
@@ -1,15 +1,15 @@
1
- import { jsxs as x, jsx as o, Fragment as U } from "react/jsx-runtime";
1
+ import { jsxs as C, jsx as o, Fragment as U } from "react/jsx-runtime";
2
2
  import { useState as s, useEffect as n } from "react";
3
- /* empty css */import { Image as k, Spin as E, Tooltip as j, Button as z } from "antd";
3
+ import { Image as k, Spin as E, Tooltip as j, Button as z } from "antd";
4
4
  import { LoadingOutlined as B } from "@ant-design/icons";
5
- import I from "../../Iconfont/index.mjs";
6
5
  import { AecKnowledgeFileStatus as F } from "@glodon-aiot/apis";
7
- import { getBase64 as A } from "../../utils/index.mjs";
8
- const D = (i) => {
6
+ import I from "../Iconfont/index.mjs";
7
+ import { getBase64 as P } from "../../utils/index.mjs";
8
+ /* empty css */const D = (i) => {
9
9
  const {
10
10
  className: y,
11
11
  style: N,
12
- id: a,
12
+ id: r,
13
13
  file: e,
14
14
  actions: {
15
15
  upload: l,
@@ -18,7 +18,7 @@ const D = (i) => {
18
18
  } = {},
19
19
  onUrlChange: p,
20
20
  onStatusChange: v
21
- } = i, [f, u] = s(i.uploading), [K, S] = s(!1);
21
+ } = i, [f, u] = s(i.uploading), [w, S] = s(!1);
22
22
  n(() => {
23
23
  u(i.uploading);
24
24
  }, [i.uploading]);
@@ -30,22 +30,22 @@ const D = (i) => {
30
30
  d(t), p && p(t);
31
31
  }).catch((t) => S(t)).finally(() => u(!1))));
32
32
  }, [l, m, e]);
33
- const [r, g] = s(e instanceof File || e == null ? void 0 : e.status);
33
+ const [a, g] = s(e instanceof File || e == null ? void 0 : e.status);
34
34
  n(() => {
35
35
  g(e instanceof File || e == null ? void 0 : e.status);
36
36
  }, [e]);
37
- const C = () => {
38
- a && c && r === F.Processing && c(a).then((t) => {
39
- t !== r && (r !== void 0 && v && v(t), g(t));
37
+ const x = () => {
38
+ r && c && a === F.Processing && c(r).then((t) => {
39
+ t !== a && (a !== void 0 && v && v(t), g(t));
40
40
  }).catch((t) => g(F.Failed));
41
41
  };
42
42
  return n(() => {
43
- C();
44
- }, [a, c, r]), n(() => {
45
- A(e).then((t) => {
43
+ x();
44
+ }, [r, c, a]), n(() => {
45
+ P(e).then((t) => {
46
46
  d(t);
47
47
  });
48
- }, [e]), e ? /* @__PURE__ */ x("div", {
48
+ }, [e]), e ? /* @__PURE__ */ C("div", {
49
49
  className: `file-preview ${y}`,
50
50
  style: N,
51
51
  children: [/* @__PURE__ */ o(k, {
@@ -71,7 +71,7 @@ const D = (i) => {
71
71
  type: "icon-shanchu"
72
72
  }),
73
73
  onClick: () => {
74
- h(e, a);
74
+ h(e, r);
75
75
  }
76
76
  })
77
77
  })]
@@ -1,7 +1,7 @@
1
1
  import { jsx as n, jsxs as o } from "react/jsx-runtime";
2
2
  import { Checkbox as l, Row as m, Col as u, Popover as C } from "antd";
3
3
  import { useState as v } from "react";
4
- /* empty css */import f from "../../../Iconfont/index.mjs";
4
+ /* empty css */import f from "../../Iconfont/index.mjs";
5
5
  const S = (r) => {
6
6
  const {
7
7
  disabled: c,