@glodon-aiot/agent-cli-ui 3.3.0-beta.13 → 3.3.0-beta.14
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/style12.css +1 -1
- package/dist/es/src/style13.css +1 -1
- package/dist/es/src/style14.css +1 -1
- package/dist/es/src/style15.css +1 -1
- package/dist/es/src/style17.css +1 -1
- package/dist/es/src/style18.css +1 -1
- package/dist/es/src/style20.css +1 -1
- package/dist/es/src/style21.css +1 -1
- package/dist/es/src/style22.css +1 -1
- package/dist/es/src/style23.css +1 -0
- package/dist/es/src/style24.css +1 -1
- 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/style6.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
|
@@ -11,14 +11,14 @@ var y = (n, e, o) => e in n ? Y(n, e, { enumerable: !0, configurable: !0, writab
|
|
|
11
11
|
return n;
|
|
12
12
|
}, m = (n, e) => Z(n, _(e));
|
|
13
13
|
import { jsx as s, jsxs as x } from "react/jsx-runtime";
|
|
14
|
-
import ee from "
|
|
15
|
-
import {
|
|
16
|
-
|
|
17
|
-
import
|
|
18
|
-
import ie from "
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import
|
|
14
|
+
import { useRef as ee, useState as l, useEffect as I } from "react";
|
|
15
|
+
/* empty css */import { AgentClientProvider as oe } from "./context.mjs";
|
|
16
|
+
import { Resizable as te } from "react-resizable";
|
|
17
|
+
import ne from "./Dialog/index.mjs";
|
|
18
|
+
import { configure as ie, BotClient as se } from "@glodon-aiot/bot-client-sdk";
|
|
19
|
+
import { JWT as le } from "./utils/index.mjs";
|
|
20
|
+
import { ConfigProvider as R, Spin as ae, Button as k } from "antd";
|
|
21
|
+
import de from "antd/es/locale/zh_CN";
|
|
22
22
|
const Ne = (n) => {
|
|
23
23
|
const {
|
|
24
24
|
className: e,
|
|
@@ -45,17 +45,17 @@ const Ne = (n) => {
|
|
|
45
45
|
disabled: q,
|
|
46
46
|
transform: F,
|
|
47
47
|
features: G
|
|
48
|
-
} = n, h =
|
|
48
|
+
} = n, h = ee(null), [K, me] = l(!1), [f, Q] = l(), [p, S] = l(), [i, g] = l(t), [b, C] = l(n.open);
|
|
49
49
|
I(() => {
|
|
50
50
|
if (!a)
|
|
51
51
|
return;
|
|
52
|
-
const u =
|
|
53
|
-
Q(u.rid),
|
|
52
|
+
const u = le(a);
|
|
53
|
+
Q(u.rid), ie({
|
|
54
54
|
debug: $,
|
|
55
55
|
env: W,
|
|
56
56
|
apiRoot: O
|
|
57
57
|
});
|
|
58
|
-
const w = new
|
|
58
|
+
const w = new se(a, {
|
|
59
59
|
plugins: j,
|
|
60
60
|
mcp: H
|
|
61
61
|
});
|
|
@@ -75,8 +75,8 @@ const Ne = (n) => {
|
|
|
75
75
|
});
|
|
76
76
|
};
|
|
77
77
|
return /* @__PURE__ */ s(R, {
|
|
78
|
-
locale:
|
|
79
|
-
children: /* @__PURE__ */ x(
|
|
78
|
+
locale: de,
|
|
79
|
+
children: /* @__PURE__ */ x(oe, {
|
|
80
80
|
value: m(d({}, n), {
|
|
81
81
|
popupContainer: h,
|
|
82
82
|
agentClient: p,
|
|
@@ -92,7 +92,7 @@ const Ne = (n) => {
|
|
|
92
92
|
transform: F,
|
|
93
93
|
features: G
|
|
94
94
|
}),
|
|
95
|
-
children: [/* @__PURE__ */ s(
|
|
95
|
+
children: [/* @__PURE__ */ s(te, {
|
|
96
96
|
height: i == null ? void 0 : i.height,
|
|
97
97
|
width: i == null ? void 0 : i.width,
|
|
98
98
|
maxConstraints: [document.body.clientWidth - 45],
|
|
@@ -113,8 +113,8 @@ const Ne = (n) => {
|
|
|
113
113
|
ref: h,
|
|
114
114
|
children: [K ? /* @__PURE__ */ s("div", {
|
|
115
115
|
className: "loading",
|
|
116
|
-
children: /* @__PURE__ */ s(
|
|
117
|
-
}) : f && p ? /* @__PURE__ */ s(
|
|
116
|
+
children: /* @__PURE__ */ s(ae, {})
|
|
117
|
+
}) : f && p ? /* @__PURE__ */ s(ne, {
|
|
118
118
|
appId: f,
|
|
119
119
|
docViewerUrl: U,
|
|
120
120
|
bodyStyle: c,
|
|
@@ -1,43 +1,37 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { useContext as
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import U from "
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
import k from "../context.mjs";
|
|
9
|
-
const z = {
|
|
10
|
-
doc: N,
|
|
11
|
-
docx: U,
|
|
12
|
-
pdf: y
|
|
13
|
-
}, q = (f) => {
|
|
1
|
+
import { jsxs as g, jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import { useContext as w, useState as p, useEffect as y } from "react";
|
|
3
|
+
/* empty css */import { Typography as I, message as c } from "antd";
|
|
4
|
+
import { getFileExtension as x, formatFileSize as f, isValidImageUrlWithAnyExtension as E } from "../../../../utils/index.mjs";
|
|
5
|
+
import U from "../../../../context.mjs";
|
|
6
|
+
import { FILE_ICONS as S } from "../../../../constant.mjs";
|
|
7
|
+
const K = (C) => {
|
|
14
8
|
const {
|
|
15
9
|
currentSession: m,
|
|
16
|
-
fileId:
|
|
17
|
-
file:
|
|
18
|
-
docViewerUrl:
|
|
19
|
-
} =
|
|
10
|
+
fileId: d,
|
|
11
|
+
file: o,
|
|
12
|
+
docViewerUrl: F
|
|
13
|
+
} = C, {
|
|
20
14
|
service: l,
|
|
21
15
|
popupContainer: i
|
|
22
|
-
} =
|
|
23
|
-
|
|
24
|
-
var
|
|
25
|
-
if (
|
|
26
|
-
h(
|
|
27
|
-
const s = x(
|
|
28
|
-
|
|
16
|
+
} = w(U), [n, h] = p(), [t, u] = p("");
|
|
17
|
+
y(() => {
|
|
18
|
+
var e;
|
|
19
|
+
if (o != null && o.id) {
|
|
20
|
+
h(o);
|
|
21
|
+
const s = x(o == null ? void 0 : o.name) || "";
|
|
22
|
+
u(s);
|
|
29
23
|
} else {
|
|
30
|
-
if (!
|
|
24
|
+
if (!d || !((e = m == null ? void 0 : m.data) != null && e.id))
|
|
31
25
|
return;
|
|
32
|
-
l == null || l.getSessionKnowledgeFile(m.data.id,
|
|
26
|
+
l == null || l.getSessionKnowledgeFile(m.data.id, d).then((s) => {
|
|
33
27
|
h(s);
|
|
34
|
-
const
|
|
35
|
-
|
|
28
|
+
const v = x(s == null ? void 0 : s.name) || "";
|
|
29
|
+
u(v);
|
|
36
30
|
});
|
|
37
31
|
}
|
|
38
32
|
}, []);
|
|
39
|
-
const
|
|
40
|
-
if (!(
|
|
33
|
+
const N = (e) => {
|
|
34
|
+
if (!(e != null && e.url)) {
|
|
41
35
|
c.config({
|
|
42
36
|
getContainer: () => (i == null ? void 0 : i.current) || document.body
|
|
43
37
|
}), c.error("链接不存在"), c.config({
|
|
@@ -45,7 +39,7 @@ const z = {
|
|
|
45
39
|
});
|
|
46
40
|
return;
|
|
47
41
|
}
|
|
48
|
-
if (!
|
|
42
|
+
if (!E(e.url)) {
|
|
49
43
|
c.config({
|
|
50
44
|
getContainer: () => (i == null ? void 0 : i.current) || document.body
|
|
51
45
|
}), c.error("链接格式不正确"), c.config({
|
|
@@ -53,22 +47,22 @@ const z = {
|
|
|
53
47
|
});
|
|
54
48
|
return;
|
|
55
49
|
}
|
|
56
|
-
window.open(`${
|
|
50
|
+
window.open(`${F}#/doc?url=${encodeURIComponent(e == null ? void 0 : e.url)}`);
|
|
57
51
|
};
|
|
58
|
-
return /* @__PURE__ */
|
|
52
|
+
return /* @__PURE__ */ g("div", {
|
|
59
53
|
className: "file-item",
|
|
60
|
-
onClick: () =>
|
|
54
|
+
onClick: () => N(n),
|
|
61
55
|
children: [/* @__PURE__ */ r("div", {
|
|
62
56
|
className: "item-left",
|
|
63
57
|
children: /* @__PURE__ */ r("img", {
|
|
64
58
|
className: "file-icon",
|
|
65
|
-
src:
|
|
59
|
+
src: S[t]
|
|
66
60
|
})
|
|
67
|
-
}), /* @__PURE__ */
|
|
61
|
+
}), /* @__PURE__ */ g("div", {
|
|
68
62
|
className: "item-main",
|
|
69
63
|
children: [/* @__PURE__ */ r("div", {
|
|
70
64
|
className: "file-name",
|
|
71
|
-
children: /* @__PURE__ */ r(
|
|
65
|
+
children: /* @__PURE__ */ r(I.Paragraph, {
|
|
72
66
|
style: {
|
|
73
67
|
margin: 0,
|
|
74
68
|
width: "100%"
|
|
@@ -79,19 +73,19 @@ const z = {
|
|
|
79
73
|
},
|
|
80
74
|
children: n == null ? void 0 : n.name
|
|
81
75
|
})
|
|
82
|
-
}), /* @__PURE__ */
|
|
76
|
+
}), /* @__PURE__ */ g("div", {
|
|
83
77
|
className: "file-desc",
|
|
84
78
|
children: [/* @__PURE__ */ r("span", {
|
|
85
79
|
children: t == null ? void 0 : t.toUpperCase()
|
|
86
80
|
}), /* @__PURE__ */ r("span", {
|
|
87
81
|
children: ","
|
|
88
82
|
}), /* @__PURE__ */ r("span", {
|
|
89
|
-
children:
|
|
83
|
+
children: f((n == null ? void 0 : n.size) || 0)
|
|
90
84
|
})]
|
|
91
85
|
})]
|
|
92
86
|
})]
|
|
93
87
|
});
|
|
94
88
|
};
|
|
95
89
|
export {
|
|
96
|
-
|
|
90
|
+
K as default
|
|
97
91
|
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { jsx as e, jsxs as n, Fragment as k } from "react/jsx-runtime";
|
|
2
2
|
import { useState as S } from "react";
|
|
3
|
-
import w from "
|
|
4
|
-
/* empty css */import { CheckOutlined as x, CloseOutlined as C } from "@ant-design/icons";
|
|
3
|
+
/* empty css */import { CheckOutlined as w, CloseOutlined as x } from "@ant-design/icons";
|
|
5
4
|
import { Collapse as g, Space as i } from "antd";
|
|
6
|
-
import
|
|
5
|
+
import C from "dayjs";
|
|
6
|
+
import I from "../../../../assets/think.svg.mjs";
|
|
7
7
|
const {
|
|
8
8
|
Panel: v
|
|
9
9
|
} = g, M = (u) => {
|
|
@@ -23,7 +23,7 @@ const {
|
|
|
23
23
|
},
|
|
24
24
|
children: [t === "start" && /* @__PURE__ */ n(k, {
|
|
25
25
|
children: [/* @__PURE__ */ e("img", {
|
|
26
|
-
src:
|
|
26
|
+
src: I,
|
|
27
27
|
alt: ""
|
|
28
28
|
}), /* @__PURE__ */ e("span", {
|
|
29
29
|
children: "正在搜索…"
|
|
@@ -46,10 +46,10 @@ const {
|
|
|
46
46
|
className: "bot-plugin-status",
|
|
47
47
|
children: [t === "end" && ((o = a.searchReference) == null ? void 0 : o.length) > 0 && /* @__PURE__ */ e("span", {
|
|
48
48
|
className: "plugin-status-success",
|
|
49
|
-
children: /* @__PURE__ */ e(
|
|
49
|
+
children: /* @__PURE__ */ e(w, {})
|
|
50
50
|
}), t === "end" && !((d = a.searchReference) != null && d.length) && /* @__PURE__ */ e("span", {
|
|
51
51
|
className: "plugin-status-error",
|
|
52
|
-
children: /* @__PURE__ */ e(
|
|
52
|
+
children: /* @__PURE__ */ e(x, {})
|
|
53
53
|
})]
|
|
54
54
|
}), t === "end" && /* @__PURE__ */ e("span", {
|
|
55
55
|
className: "bot-plugin-title",
|
|
@@ -86,7 +86,7 @@ const {
|
|
|
86
86
|
})]
|
|
87
87
|
}), /* @__PURE__ */ e("span", {
|
|
88
88
|
className: "time",
|
|
89
|
-
children:
|
|
89
|
+
children: C(s.ts || s.datePublished).format("YYYY-MM-DD")
|
|
90
90
|
})]
|
|
91
91
|
})]
|
|
92
92
|
}, s.link))
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { jsxs as r, jsx as n } from "react/jsx-runtime";
|
|
2
2
|
import { useState as l, useContext as O, useEffect as D } from "react";
|
|
3
|
-
import { Space as w, Popover as L, Popconfirm as M, Input as H, message as v, notification as
|
|
4
|
-
import m from "
|
|
3
|
+
import { Space as w, Popover as L, Popconfirm as M, Input as H, message as v, notification as g, Button as Q } from "antd";
|
|
4
|
+
import m from "../../../../components/Iconfont/index.mjs";
|
|
5
5
|
import $ from "copy-to-clipboard";
|
|
6
6
|
import F from "classnames";
|
|
7
|
-
/* empty css */import G from "
|
|
7
|
+
/* empty css */import G from "../../../../context.mjs";
|
|
8
8
|
const J = [{
|
|
9
9
|
id: 1,
|
|
10
10
|
name: "展示信息不正确"
|
|
@@ -17,7 +17,7 @@ const J = [{
|
|
|
17
17
|
}, {
|
|
18
18
|
id: 4,
|
|
19
19
|
name: "其他原因"
|
|
20
|
-
}],
|
|
20
|
+
}], ne = (P) => {
|
|
21
21
|
var z;
|
|
22
22
|
const {
|
|
23
23
|
appId: x,
|
|
@@ -25,12 +25,11 @@ const J = [{
|
|
|
25
25
|
isLastHistory: T = !1,
|
|
26
26
|
sessionId: d,
|
|
27
27
|
currentSession: s,
|
|
28
|
-
onAgainClick:
|
|
28
|
+
onAgainClick: u
|
|
29
29
|
} = P, [a, h] = l([]), [C, I] = l(), [_, b] = l(!1), [y, A] = l(!1), {
|
|
30
30
|
service: K,
|
|
31
31
|
popupContainer: o,
|
|
32
32
|
transform: N,
|
|
33
|
-
features: U,
|
|
34
33
|
onComment: p
|
|
35
34
|
} = O(G), [f, k] = l(() => {
|
|
36
35
|
var e;
|
|
@@ -82,22 +81,22 @@ const J = [{
|
|
|
82
81
|
isAgree: -1,
|
|
83
82
|
againstReason: e
|
|
84
83
|
};
|
|
85
|
-
|
|
84
|
+
g.config({
|
|
86
85
|
getContainer: () => (o == null ? void 0 : o.current) || document.body
|
|
87
86
|
}), s == null || s.postMessageComment(c).then(() => {
|
|
88
87
|
k(-1), t != null && t.comment && (t.comment.isAgree = -1);
|
|
89
88
|
const i = `open${Date.now()}`;
|
|
90
|
-
|
|
89
|
+
g.success({
|
|
91
90
|
message: "提交反馈成功",
|
|
92
91
|
description: "感谢您的参与,我们会认真评估每一条建议!",
|
|
93
92
|
duration: 2,
|
|
94
93
|
btn: /* @__PURE__ */ n(Q, {
|
|
95
94
|
type: "primary",
|
|
96
|
-
onClick: () =>
|
|
95
|
+
onClick: () => g.close(i),
|
|
97
96
|
children: "我知道了"
|
|
98
97
|
}),
|
|
99
98
|
key: i,
|
|
100
|
-
onClose: () =>
|
|
99
|
+
onClose: () => g.close(i)
|
|
101
100
|
});
|
|
102
101
|
}), p && p({
|
|
103
102
|
applicationId: x,
|
|
@@ -109,7 +108,7 @@ const J = [{
|
|
|
109
108
|
className: "session-action",
|
|
110
109
|
children: [N != null && N.again && T ? /* @__PURE__ */ r(w, {
|
|
111
110
|
className: "session-action-again",
|
|
112
|
-
onClick: () =>
|
|
111
|
+
onClick: () => u == null ? void 0 : u(),
|
|
113
112
|
children: [/* @__PURE__ */ n(m, {
|
|
114
113
|
type: "icon-zaicihuida"
|
|
115
114
|
}), /* @__PURE__ */ n("span", {
|
|
@@ -230,5 +229,5 @@ const J = [{
|
|
|
230
229
|
});
|
|
231
230
|
};
|
|
232
231
|
export {
|
|
233
|
-
|
|
232
|
+
ne as default
|
|
234
233
|
};
|
package/dist/es/Dialog/{SessionRefer → AgentChat/HistoryItem/SessionRefer}/ReferItem/index.mjs
RENAMED
|
@@ -1,35 +1,35 @@
|
|
|
1
|
-
var a = (p, e,
|
|
1
|
+
var a = (p, e, i) => new Promise((l, n) => {
|
|
2
2
|
var m = (o) => {
|
|
3
3
|
try {
|
|
4
|
-
r(
|
|
4
|
+
r(i.next(o));
|
|
5
5
|
} catch (c) {
|
|
6
|
-
|
|
6
|
+
n(c);
|
|
7
7
|
}
|
|
8
8
|
}, k = (o) => {
|
|
9
9
|
try {
|
|
10
|
-
r(
|
|
10
|
+
r(i.throw(o));
|
|
11
11
|
} catch (c) {
|
|
12
|
-
|
|
12
|
+
n(c);
|
|
13
13
|
}
|
|
14
14
|
}, r = (o) => o.done ? l(o.value) : Promise.resolve(o.value).then(m, k);
|
|
15
|
-
r((
|
|
15
|
+
r((i = i.apply(p, e)).next());
|
|
16
16
|
});
|
|
17
17
|
import { jsxs as g, jsx as t } from "react/jsx-runtime";
|
|
18
18
|
import { useContext as w } from "react";
|
|
19
19
|
import { Space as h, Tooltip as I, Button as y } from "antd";
|
|
20
20
|
import { ISourceType as f, IversionInfo as b } from "@glodon-aiot/apis";
|
|
21
|
-
import
|
|
22
|
-
|
|
23
|
-
import
|
|
24
|
-
const
|
|
21
|
+
import x from "../../../../../context.mjs";
|
|
22
|
+
import C from "../../../../../components/WebLink/index.mjs";
|
|
23
|
+
import d from "../../../../../components/Iconfont/index.mjs";
|
|
24
|
+
const j = (p) => {
|
|
25
25
|
var o, c;
|
|
26
26
|
const {
|
|
27
27
|
data: e,
|
|
28
|
-
onClick:
|
|
28
|
+
onClick: i,
|
|
29
29
|
loadPage: l
|
|
30
30
|
} = p, {
|
|
31
|
-
transform:
|
|
32
|
-
} = w(
|
|
31
|
+
transform: n
|
|
32
|
+
} = w(x), m = () => a(void 0, null, function* () {
|
|
33
33
|
return l ? yield l(e.knowledgeId, e.docId, e.textId) : 0;
|
|
34
34
|
}), k = e.sourceType === f.WebLink && !!e.webLink, r = (
|
|
35
35
|
// data?.origin === IFileOrigin.AECPILOT ||
|
|
@@ -41,11 +41,11 @@ const F = (p) => {
|
|
|
41
41
|
children: [/* @__PURE__ */ t("span", {
|
|
42
42
|
className: "refer-panel-item",
|
|
43
43
|
children: (e.knowledgeSourceName || "") + (e.knowledgeTitleName || "") || "-"
|
|
44
|
-
}), k && ((o =
|
|
44
|
+
}), k && ((o = n == null ? void 0 : n.reference) == null ? void 0 : o.iconVisible) && /* @__PURE__ */ t(I, {
|
|
45
45
|
overlayStyle: {
|
|
46
46
|
maxWidth: "90vw"
|
|
47
47
|
},
|
|
48
|
-
title: /* @__PURE__ */ t(
|
|
48
|
+
title: /* @__PURE__ */ t(C, {
|
|
49
49
|
href: e.webLink,
|
|
50
50
|
onClick: (s) => {
|
|
51
51
|
s.stopPropagation();
|
|
@@ -61,10 +61,10 @@ const F = (p) => {
|
|
|
61
61
|
type: "link",
|
|
62
62
|
size: "small",
|
|
63
63
|
onClick: (s) => a(void 0, null, function* () {
|
|
64
|
-
s.stopPropagation(),
|
|
64
|
+
s.stopPropagation(), i(e);
|
|
65
65
|
})
|
|
66
66
|
})
|
|
67
|
-
}), r && ((c =
|
|
67
|
+
}), r && ((c = n == null ? void 0 : n.reference) == null ? void 0 : c.iconVisible) && /* @__PURE__ */ t(y, {
|
|
68
68
|
icon: /* @__PURE__ */ t(d, {
|
|
69
69
|
type: "icon-doc-link",
|
|
70
70
|
style: {
|
|
@@ -76,11 +76,11 @@ const F = (p) => {
|
|
|
76
76
|
onClick: (s) => a(void 0, null, function* () {
|
|
77
77
|
s.stopPropagation();
|
|
78
78
|
const u = (yield m()) || 0;
|
|
79
|
-
|
|
79
|
+
i(e, u);
|
|
80
80
|
})
|
|
81
81
|
})]
|
|
82
82
|
});
|
|
83
83
|
};
|
|
84
84
|
export {
|
|
85
|
-
|
|
85
|
+
j as default
|
|
86
86
|
};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { jsxs as s, jsx as n } from "react/jsx-runtime";
|
|
2
2
|
import { useContext as x } from "react";
|
|
3
3
|
import { Space as p, Collapse as f } from "antd";
|
|
4
|
-
import S from "
|
|
4
|
+
import S from "../../../../components/Iconfont/index.mjs";
|
|
5
5
|
/* empty css */import { ISourceType as u } from "@glodon-aiot/apis";
|
|
6
|
-
import D from "
|
|
6
|
+
import D from "../../../../components/Markdown/index.mjs";
|
|
7
7
|
import y from "./ReferItem/index.mjs";
|
|
8
|
-
import F from "
|
|
8
|
+
import F from "../../../../context.mjs";
|
|
9
9
|
const {
|
|
10
10
|
Panel: R
|
|
11
11
|
} = f, E = (h) => {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsxs as o, jsx as e } from "react/jsx-runtime";
|
|
2
2
|
import { Space as r } from "antd";
|
|
3
|
-
/* empty css */import { removeNewlines as c } from "
|
|
4
|
-
import m from "
|
|
5
|
-
import l from "
|
|
3
|
+
/* empty css */import { removeNewlines as c } from "../../../../utils/index.mjs";
|
|
4
|
+
import m from "../../../../components/Iconfont/index.mjs";
|
|
5
|
+
import l from "../../../../components/Markdown/index.mjs";
|
|
6
6
|
const x = (n) => {
|
|
7
7
|
const {
|
|
8
8
|
history: d,
|