@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.
- package/dist/es/AgentClientUI.mjs +17 -17
- package/dist/es/{FileItem → Dialog/AgentChat/HistoryItem/FileItem}/index.mjs +34 -40
- package/dist/es/Dialog/{SearchReference → AgentChat/HistoryItem/SearchReference}/index.mjs +7 -7
- package/dist/es/Dialog/{SessionAction → AgentChat/HistoryItem/SessionAction}/index.mjs +11 -12
- package/dist/es/Dialog/{SessionRefer → AgentChat/HistoryItem/SessionRefer}/ReferItem/index.mjs +19 -19
- package/dist/es/Dialog/{SessionRefer → AgentChat/HistoryItem/SessionRefer}/index.mjs +3 -3
- package/dist/es/Dialog/{SessionRelated → AgentChat/HistoryItem/SessionRelated}/index.mjs +3 -3
- package/dist/es/Dialog/{HistoryItem → AgentChat/HistoryItem}/index.mjs +56 -62
- package/dist/es/Dialog/{PromptSetting → AgentChat/PromptSetting}/index.mjs +2 -2
- package/dist/es/Dialog/{ConnectToNetwork → AgentChat/Tools/ConnectToNetwork}/index.mjs +1 -1
- package/dist/es/Dialog/{PromptManager → AgentChat/Tools/PromptManager}/PromptList/PromptListItem.mjs +2 -2
- package/dist/es/Dialog/{PromptManager → AgentChat/Tools/PromptManager}/index.mjs +4 -4
- package/dist/es/Dialog/{SessionListDrawer → AgentChat/Tools/SessionListDrawer}/HistorySessionList/SessionItem.mjs +24 -30
- package/dist/es/Dialog/{SessionListDrawer → AgentChat/Tools/SessionListDrawer}/HistorySessionList/index.mjs +1 -1
- package/dist/es/Dialog/{SessionListDrawer → AgentChat/Tools/SessionListDrawer}/index.mjs +1 -1
- package/dist/es/Dialog/AgentChat/Tools/UploadKnowledgeFiles/FileCard/index.mjs +128 -0
- package/dist/es/Dialog/{UploadKnowledgeFiles → AgentChat/Tools/UploadKnowledgeFiles}/index.mjs +5 -5
- package/dist/es/Dialog/AgentChat/index.mjs +24 -24
- package/dist/es/Dialog/SessionList/index.mjs +1 -1
- package/dist/es/Dialog/index.mjs +109 -118
- package/dist/es/Footer/FooterWarning.mjs +3 -3
- package/dist/es/Footer/index.mjs +3 -3
- package/dist/es/QuillEditor/index.mjs +11 -11
- package/dist/es/components/Copy/index.mjs +1 -1
- package/dist/es/{Dialog → components}/FilePreview/index.mjs +16 -16
- package/dist/es/{Dialog → components}/KnowledgeList/KnowledgeSelect/index.mjs +1 -1
- package/dist/es/{Dialog → components}/KnowledgeList/index.mjs +21 -23
- package/dist/es/{Dialog → components}/Recommend/RecommendItem.mjs +31 -37
- package/dist/es/{Dialog → components}/Recommend/index.mjs +0 -1
- package/dist/es/constant.mjs +16 -8
- package/dist/es/index.mjs +26 -33
- package/dist/es/src/style10.css +1 -1
- package/dist/es/src/style11.css +1 -1
- package/dist/es/src/style12.css +1 -1
- package/dist/es/src/style13.css +1 -1
- package/dist/es/src/style15.css +1 -1
- package/dist/es/src/style17.css +1 -1
- package/dist/es/src/style20.css +1 -1
- package/dist/es/src/style21.css +1 -1
- package/dist/es/src/style23.css +1 -0
- package/dist/es/src/style25.css +1 -1
- package/dist/es/src/style26.css +1 -1
- package/dist/es/src/style27.css +1 -1
- package/dist/es/src/style28.css +1 -1
- package/dist/es/src/style29.css +1 -1
- package/dist/es/src/style30.css +1 -1
- package/dist/es/src/style31.css +1 -1
- package/dist/es/src/style4.css +1 -1
- package/dist/es/src/style5.css +1 -1
- package/dist/es/src/style7.css +1 -1
- package/dist/es/src/style8.css +1 -1
- package/dist/es/src/style9.css +1 -1
- package/dist/lib/index.css +1 -1
- package/dist/lib/index.js +5 -5
- package/dist/src/ConnectToNetwork_bac/index.d.ts +13 -0
- package/dist/src/Dialog/AgentChat/HistoryItem/FileItem/index.d.ts +11 -0
- package/dist/src/Dialog/AgentChat/HistoryItem/InputProgress/index.d.ts +7 -0
- package/dist/src/Dialog/AgentChat/HistoryItem/SearchReference/index.d.ts +10 -0
- package/dist/src/Dialog/AgentChat/HistoryItem/SessionAction/index.d.ts +13 -0
- package/dist/src/Dialog/AgentChat/HistoryItem/SessionRefer/ReferItem/index.d.ts +9 -0
- package/dist/src/Dialog/AgentChat/HistoryItem/SessionRefer/index.d.ts +8 -0
- package/dist/src/Dialog/AgentChat/HistoryItem/SessionRelated/index.d.ts +9 -0
- package/dist/src/Dialog/AgentChat/HistoryItem/index.d.ts +18 -0
- package/dist/src/Dialog/AgentChat/PromptSetting/index.d.ts +15 -0
- package/dist/src/Dialog/AgentChat/Tools/ConnectToNetwork/index.d.ts +14 -0
- package/dist/src/Dialog/AgentChat/Tools/PromptManager/PromptList/EditPromptModal/index.d.ts +11 -0
- package/dist/src/Dialog/AgentChat/Tools/PromptManager/PromptList/PrivatePromptList.d.ts +12 -0
- package/dist/src/Dialog/AgentChat/Tools/PromptManager/PromptList/PromptListItem.d.ts +13 -0
- package/dist/src/Dialog/AgentChat/Tools/PromptManager/PromptList/PublicPromptList.d.ts +12 -0
- package/dist/src/Dialog/AgentChat/Tools/PromptManager/index.d.ts +13 -0
- package/dist/src/Dialog/AgentChat/Tools/SessionListDrawer/HistorySessionList/NameEditPanel.d.ts +9 -0
- package/dist/src/Dialog/AgentChat/Tools/SessionListDrawer/HistorySessionList/SessionItem.d.ts +16 -0
- package/dist/src/Dialog/AgentChat/Tools/SessionListDrawer/HistorySessionList/index.d.ts +9 -0
- package/dist/src/Dialog/AgentChat/Tools/SessionListDrawer/index.d.ts +9 -0
- package/dist/src/Dialog/AgentChat/Tools/UploadKnowledgeFiles/ClearModal/index.d.ts +7 -0
- package/dist/src/Dialog/AgentChat/Tools/UploadKnowledgeFiles/FileCard/index.d.ts +22 -0
- package/dist/src/Dialog/AgentChat/Tools/UploadKnowledgeFiles/index.d.ts +22 -0
- package/dist/src/Dialog/AgentChat/index.d.ts +1 -1
- package/dist/src/Dialog/FileItem/index.d.ts +11 -0
- package/dist/src/Dialog/HistoryItem/FileItem/index.d.ts +11 -0
- package/dist/src/Dialog/HistoryItem/InputProgress/index.d.ts +7 -0
- package/dist/src/Dialog/HistoryItem/ReferCollapse/index.d.ts +8 -0
- package/dist/src/Dialog/HistoryItem/ReferCollapsea/index.d.ts +8 -0
- package/dist/src/Dialog/HistoryItem/SearchReference/index.d.ts +10 -0
- package/dist/src/Dialog/HistoryItem/SessionAction/index.d.ts +13 -0
- package/dist/src/Dialog/HistoryItem/SessionRefer/ReferItem/index.d.ts +9 -0
- package/dist/src/Dialog/HistoryItem/SessionRefer/index.d.ts +8 -0
- package/dist/src/Dialog/HistoryItem/SessionRelated/index.d.ts +9 -0
- package/dist/src/Dialog/InputProgress/index.d.ts +7 -0
- package/dist/src/Dialog/SessionList/index.d.ts +1 -1
- package/dist/src/Dialog/Tools/ConnectToNetwork/index.d.ts +14 -0
- package/dist/src/Dialog/Tools/PromptManager/PromptList/EditPromptModal/index.d.ts +11 -0
- package/dist/src/Dialog/Tools/PromptManager/PromptList/PrivatePromptList.d.ts +12 -0
- package/dist/src/Dialog/Tools/PromptManager/PromptList/PromptListItem.d.ts +13 -0
- package/dist/src/Dialog/Tools/PromptManager/PromptList/PublicPromptList.d.ts +12 -0
- package/dist/src/Dialog/Tools/PromptManager/index.d.ts +13 -0
- package/dist/src/Dialog/Tools/SessionListDrawer/HistorySessionList/NameEditPanel.d.ts +9 -0
- package/dist/src/Dialog/Tools/SessionListDrawer/HistorySessionList/SessionItem.d.ts +16 -0
- package/dist/src/Dialog/Tools/SessionListDrawer/HistorySessionList/index.d.ts +9 -0
- package/dist/src/Dialog/Tools/SessionListDrawer/index.d.ts +9 -0
- package/dist/src/Dialog/Tools/UploadKnowledgeFiles/ClearModal/index.d.ts +7 -0
- package/dist/src/Dialog/Tools/UploadKnowledgeFiles/FileCard/index.d.ts +22 -0
- package/dist/src/Dialog/Tools/UploadKnowledgeFiles/index.d.ts +22 -0
- package/dist/src/Dialog/UploadFilesa/ClearModal/index.d.ts +7 -0
- package/dist/src/Dialog/UploadFilesa/index.d.ts +21 -0
- package/dist/src/FileCard-bac/index.d.ts +21 -0
- package/dist/src/Footer/FooterWarning.d.ts +2 -2
- package/dist/src/Greeting-bac/index.d.ts +7 -0
- package/dist/src/components/FilePreview/index.d.ts +20 -0
- package/dist/src/components/Greeting/index.d.ts +7 -0
- package/dist/src/components/Iconfont/font_4108228_z72fskklg2.d.ts +0 -0
- package/dist/src/components/Iconfont/font_4439177_7rytwlvbmjj.d.ts +0 -0
- package/dist/src/components/Iconfont/index.d.ts +2 -0
- package/dist/src/components/KnowledgeDoc/index.d.ts +9 -0
- package/dist/src/components/KnowledgeList/KnowledgeSelect/index.d.ts +12 -0
- package/dist/src/components/KnowledgeList/index.d.ts +10 -0
- package/dist/src/components/Recommend/RecommendItem.d.ts +12 -0
- package/dist/src/components/Recommend/index.d.ts +14 -0
- package/dist/src/constant.d.ts +7 -1
- package/dist/src/index.d.ts +3 -3
- package/dist/src/types.d.ts +4 -4
- package/dist/src/utils/index.d.ts +0 -6
- package/package.json +3 -3
- package/dist/es/Dialog/FileCard/index.mjs +0 -134
- package/dist/es/Dialog/HistoryContent/index.mjs +0 -13
- package/dist/es/Dialog/KnowledgeDoc/index.mjs +0 -45
- package/dist/es/Dialog/ReferCollapse/index.mjs +0 -64
- package/dist/es/Dialog/SessionListDrawer/HistorySessionList/doc-icons/doc.svg.mjs +0 -4
- package/dist/es/Dialog/SessionListDrawer/HistorySessionList/doc-icons/docx.svg.mjs +0 -4
- package/dist/es/Dialog/SessionListDrawer/HistorySessionList/doc-icons/pdf.svg.mjs +0 -4
- package/dist/es/FileCard/doc-icons/doc.svg.mjs +0 -4
- package/dist/es/FileCard/doc-icons/docx.svg.mjs +0 -4
- package/dist/es/FileCard/doc-icons/pdf.svg.mjs +0 -4
- package/dist/es/src/style32.css +0 -1
- package/dist/es/src/style33.css +0 -1
- /package/dist/es/{InputProgress → Dialog/AgentChat/HistoryItem/InputProgress}/index.mjs +0 -0
- /package/dist/es/Dialog/{PromptManager → AgentChat/Tools/PromptManager}/PromptList/PublicPromptList.mjs +0 -0
- /package/dist/es/Dialog/{PromptManager → AgentChat/Tools/PromptManager}/PromptList/access/empty.svg.mjs +0 -0
- /package/dist/es/Dialog/{SessionListDrawer → AgentChat/Tools/SessionListDrawer}/HistorySessionList/NameEditPanel.mjs +0 -0
- /package/dist/es/Dialog/{UploadKnowledgeFiles → AgentChat/Tools/UploadKnowledgeFiles}/ClearModal/index.mjs +0 -0
- /package/dist/es/{Dialog/FileCard → assets}/doc-icons/doc.svg.mjs +0 -0
- /package/dist/es/{Dialog/FileCard → assets}/doc-icons/docx.svg.mjs +0 -0
- /package/dist/es/{Dialog/FileCard → assets}/doc-icons/pdf.svg.mjs +0 -0
- /package/dist/es/{Dialog → components}/Greeting/index.mjs +0 -0
- /package/dist/es/{Iconfont → components/Iconfont}/index.mjs +0 -0
- /package/dist/es/{Dialog → components}/Recommend/tip.svg.mjs +0 -0
package/dist/es/Dialog/{UploadKnowledgeFiles → AgentChat/Tools/UploadKnowledgeFiles}/index.mjs
RENAMED
|
@@ -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 "
|
|
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 "
|
|
26
|
-
import ve from "
|
|
27
|
-
import { isValidImageUrlWithAnyExtension as Ie, extractFileName as Ee, FILE_NAME_MAX_LENGTH as X, fileTypes as ze } from "
|
|
28
|
-
import { MB as Ae } from "
|
|
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 "
|
|
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 "
|
|
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 "
|
|
44
|
-
import rn from "
|
|
45
|
-
import an from "
|
|
46
|
-
import ln from "
|
|
47
|
-
import
|
|
48
|
-
import fn from "../
|
|
49
|
-
import gn from "
|
|
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
|
|
53
|
-
import
|
|
54
|
-
import
|
|
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(
|
|
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(
|
|
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(
|
|
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(
|
|
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(
|
|
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(
|
|
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(
|
|
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(
|
|
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(
|
|
889
|
+
}), /* @__PURE__ */ d(an, {
|
|
890
890
|
tips: lt
|
|
891
|
-
}), He && /* @__PURE__ */ d(
|
|
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) => {
|
package/dist/es/Dialog/index.mjs
CHANGED
|
@@ -1,152 +1,143 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
var
|
|
6
|
-
for (var
|
|
7
|
-
|
|
8
|
-
if (
|
|
9
|
-
for (var
|
|
10
|
-
|
|
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
|
-
},
|
|
13
|
-
var
|
|
14
|
-
var
|
|
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
|
-
|
|
17
|
-
} catch (
|
|
18
|
-
|
|
16
|
+
e(n.next(c));
|
|
17
|
+
} catch (r) {
|
|
18
|
+
s(r);
|
|
19
19
|
}
|
|
20
|
-
},
|
|
20
|
+
}, p = (c) => {
|
|
21
21
|
try {
|
|
22
|
-
|
|
23
|
-
} catch (
|
|
24
|
-
|
|
22
|
+
e(n.throw(c));
|
|
23
|
+
} catch (r) {
|
|
24
|
+
s(r);
|
|
25
25
|
}
|
|
26
|
-
},
|
|
27
|
-
|
|
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
|
|
30
|
-
import { useState as
|
|
31
|
-
import
|
|
32
|
-
import
|
|
33
|
-
import
|
|
34
|
-
import
|
|
35
|
-
/* empty css */const
|
|
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:
|
|
38
|
-
appId:
|
|
39
|
-
docViewerUrl:
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
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
|
|
64
|
-
if (!(
|
|
55
|
+
const g = o == null ? void 0 : o.arrange;
|
|
56
|
+
if (!(g != null && g.length))
|
|
65
57
|
return;
|
|
66
|
-
const
|
|
67
|
-
D
|
|
58
|
+
const D = g[0].embeddingService;
|
|
59
|
+
R(D), A(o);
|
|
68
60
|
});
|
|
69
|
-
return
|
|
70
|
-
|
|
61
|
+
return e == null || e.addEventListener("ready", () => a()), () => {
|
|
62
|
+
e == null || e.removeEventListener("ready", a);
|
|
71
63
|
};
|
|
72
|
-
}, []),
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
})) :
|
|
76
|
-
|
|
77
|
-
|
|
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
|
-
}, [
|
|
81
|
-
if (!
|
|
82
|
-
|
|
83
|
-
applicationId:
|
|
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
|
-
|
|
91
|
-
applicationId:
|
|
92
|
-
sessionId:
|
|
93
|
-
session:
|
|
94
|
-
sessionInstance:
|
|
95
|
-
}),
|
|
96
|
-
|
|
97
|
-
applicationId:
|
|
98
|
-
sessionId:
|
|
99
|
-
session:
|
|
100
|
-
sessionInstance:
|
|
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
|
-
}, [
|
|
104
|
-
const
|
|
105
|
-
var
|
|
106
|
-
return (
|
|
107
|
-
knowledges:
|
|
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__ */
|
|
102
|
+
return /* @__PURE__ */ l("div", {
|
|
111
103
|
className: "dialog",
|
|
112
|
-
children: /* @__PURE__ */
|
|
104
|
+
children: /* @__PURE__ */ j("div", {
|
|
113
105
|
className: "dialog-pannel",
|
|
114
|
-
children: [/* @__PURE__ */
|
|
106
|
+
children: [/* @__PURE__ */ l("div", {
|
|
115
107
|
className: "dialog-sider",
|
|
116
|
-
children: /* @__PURE__ */
|
|
117
|
-
ref:
|
|
118
|
-
sider:
|
|
119
|
-
appId:
|
|
120
|
-
networkStatus:
|
|
121
|
-
currentSession:
|
|
122
|
-
application:
|
|
123
|
-
setCurrentSession:
|
|
124
|
-
checkKnowledges:
|
|
125
|
-
setCheckKnowledges:
|
|
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__ */
|
|
119
|
+
}), /* @__PURE__ */ l("div", {
|
|
128
120
|
className: "dialog-content",
|
|
129
|
-
children: /* @__PURE__ */
|
|
121
|
+
children: /* @__PURE__ */ j("div", {
|
|
130
122
|
className: "dialog-chat",
|
|
131
|
-
children: [
|
|
123
|
+
children: [p && /* @__PURE__ */ l("div", {
|
|
132
124
|
className: "dialog-chat-header",
|
|
133
|
-
children: /* @__PURE__ */
|
|
134
|
-
setCheckKnowledges:
|
|
135
|
-
application:
|
|
136
|
-
currentSession:
|
|
137
|
-
setCurrentSession: a
|
|
125
|
+
children: /* @__PURE__ */ l(M, {
|
|
126
|
+
setCheckKnowledges: k,
|
|
127
|
+
application: m,
|
|
128
|
+
currentSession: s
|
|
138
129
|
})
|
|
139
|
-
}), /* @__PURE__ */
|
|
130
|
+
}), /* @__PURE__ */ l("div", {
|
|
140
131
|
className: "dialog-chat-content",
|
|
141
|
-
children: (
|
|
142
|
-
setNetworkStatus:
|
|
143
|
-
networkStatus:
|
|
144
|
-
application:
|
|
145
|
-
currentSession:
|
|
146
|
-
onCreateSession:
|
|
147
|
-
docViewerUrl:
|
|
148
|
-
embeddingService:
|
|
149
|
-
setCurrentSession:
|
|
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
|
-
|
|
149
|
+
ee as default
|
|
159
150
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as o } from "react/jsx-runtime";
|
|
2
|
-
import { useRef as
|
|
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 =
|
|
11
|
-
return
|
|
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", {
|
package/dist/es/Footer/index.mjs
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { jsxs as t, jsx as
|
|
2
|
-
/* empty css */import
|
|
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
|
|
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 "
|
|
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
|
|
6
|
-
import
|
|
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
|
-
|
|
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(
|
|
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(
|
|
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(
|
|
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(
|
|
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(
|
|
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 "
|
|
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
|
|
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
|
-
|
|
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
|
|
8
|
-
|
|
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:
|
|
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), [
|
|
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 [
|
|
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
|
|
38
|
-
|
|
39
|
-
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
|
-
|
|
44
|
-
}, [
|
|
45
|
-
|
|
43
|
+
x();
|
|
44
|
+
}, [r, c, a]), n(() => {
|
|
45
|
+
P(e).then((t) => {
|
|
46
46
|
d(t);
|
|
47
47
|
});
|
|
48
|
-
}, [e]), e ? /* @__PURE__ */
|
|
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,
|
|
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 "
|
|
4
|
+
/* empty css */import f from "../../Iconfont/index.mjs";
|
|
5
5
|
const S = (r) => {
|
|
6
6
|
const {
|
|
7
7
|
disabled: c,
|