@glodon-aiot/agent-cli-ui 3.2.10-beta.9 → 3.3.0-beta.13
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 +70 -68
- package/dist/es/Dialog/AgentChat/index.mjs +159 -159
- package/dist/es/Dialog/HistoryItem/index.mjs +12 -12
- package/dist/es/Dialog/Recommend/RecommendItem.mjs +1 -1
- package/dist/es/Dialog/SessionAction/index.mjs +13 -13
- package/dist/es/Dialog/SessionListDrawer/HistorySessionList/index.mjs +57 -57
- package/dist/es/Dialog/UploadKnowledgeFiles/index.mjs +127 -127
- package/dist/es/FileItem/index.mjs +28 -28
- package/dist/es/index.mjs +20 -19
- 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/style14.css +1 -1
- package/dist/es/src/style15.css +1 -1
- package/dist/es/src/style16.css +1 -1
- package/dist/es/src/style18.css +1 -1
- package/dist/es/src/style19.css +1 -1
- package/dist/es/src/style20.css +1 -1
- package/dist/es/src/style24.css +1 -1
- package/dist/es/src/style26.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/style32.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.js +5 -5
- package/dist/src/types.d.ts +3 -1
- package/package.json +3 -3
|
@@ -1,101 +1,103 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
1
|
+
var Y = Object.defineProperty, Z = Object.defineProperties;
|
|
2
|
+
var _ = Object.getOwnPropertyDescriptors;
|
|
3
3
|
var N = Object.getOwnPropertySymbols;
|
|
4
|
-
var
|
|
5
|
-
var y = (n, e, o) => e in n ?
|
|
4
|
+
var B = Object.prototype.hasOwnProperty, z = Object.prototype.propertyIsEnumerable;
|
|
5
|
+
var y = (n, e, o) => e in n ? Y(n, e, { enumerable: !0, configurable: !0, writable: !0, value: o }) : n[e] = o, d = (n, e) => {
|
|
6
6
|
for (var o in e || (e = {}))
|
|
7
|
-
|
|
7
|
+
B.call(e, o) && y(n, o, e[o]);
|
|
8
8
|
if (N)
|
|
9
9
|
for (var o of N(e))
|
|
10
|
-
|
|
10
|
+
z.call(e, o) && y(n, o, e[o]);
|
|
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
|
|
15
|
-
import { useRef as
|
|
16
|
-
/* empty css */import { AgentClientProvider as
|
|
17
|
-
import { Resizable as
|
|
18
|
-
import
|
|
19
|
-
import { configure as
|
|
20
|
-
import { JWT as
|
|
21
|
-
import { ConfigProvider as R, Spin as
|
|
22
|
-
const
|
|
14
|
+
import ee from "antd/es/locale/zh_CN";
|
|
15
|
+
import { useRef as oe, useState as l, useEffect as I } from "react";
|
|
16
|
+
/* empty css */import { AgentClientProvider as te } from "./context.mjs";
|
|
17
|
+
import { Resizable as ne } from "react-resizable";
|
|
18
|
+
import ie from "./Dialog/index.mjs";
|
|
19
|
+
import { configure as se, BotClient as le } from "@glodon-aiot/agent-cli-sdk";
|
|
20
|
+
import { JWT as ae } from "./utils/index.mjs";
|
|
21
|
+
import { ConfigProvider as R, Spin as de, Button as k } from "antd";
|
|
22
|
+
const Ne = (n) => {
|
|
23
23
|
const {
|
|
24
24
|
className: e,
|
|
25
25
|
triggerButton: o,
|
|
26
26
|
size: t,
|
|
27
27
|
theme: A,
|
|
28
|
-
icon:
|
|
28
|
+
icon: r,
|
|
29
29
|
docViewerUrl: U,
|
|
30
30
|
token: a,
|
|
31
31
|
debug: $,
|
|
32
32
|
env: W,
|
|
33
33
|
plugins: j,
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
34
|
+
mcp: H,
|
|
35
|
+
footer: L,
|
|
36
|
+
defaultInput: M,
|
|
37
|
+
onComment: P,
|
|
38
|
+
onSessionLoad: T,
|
|
39
|
+
onSessionUnload: D,
|
|
40
|
+
onMessage: E,
|
|
41
|
+
beforeMessageSend: J,
|
|
42
|
+
bodyStyle: c,
|
|
43
|
+
apiUrl: O,
|
|
44
|
+
sessionId: V,
|
|
45
|
+
disabled: q,
|
|
46
|
+
transform: F,
|
|
47
|
+
features: G
|
|
48
|
+
} = n, h = oe(null), [K, me] = l(!1), [f, Q] = l(), [p, S] = l(), [i, g] = l(t), [b, C] = l(n.open);
|
|
48
49
|
I(() => {
|
|
49
50
|
if (!a)
|
|
50
51
|
return;
|
|
51
|
-
const u =
|
|
52
|
-
|
|
52
|
+
const u = ae(a);
|
|
53
|
+
Q(u.rid), se({
|
|
53
54
|
debug: $,
|
|
54
55
|
env: W,
|
|
55
|
-
apiRoot:
|
|
56
|
+
apiRoot: O
|
|
56
57
|
});
|
|
57
|
-
const w = new
|
|
58
|
-
plugins: j
|
|
58
|
+
const w = new le(a, {
|
|
59
|
+
plugins: j,
|
|
60
|
+
mcp: H
|
|
59
61
|
});
|
|
60
|
-
|
|
62
|
+
S(w);
|
|
61
63
|
}, [a]), R.config({
|
|
62
64
|
theme: A
|
|
63
65
|
}), I(() => {
|
|
64
|
-
t &&
|
|
66
|
+
t && g(t);
|
|
65
67
|
}, [t]);
|
|
66
|
-
const
|
|
68
|
+
const X = (u, {
|
|
67
69
|
element: w,
|
|
68
70
|
size: v
|
|
69
71
|
}) => {
|
|
70
|
-
|
|
72
|
+
g({
|
|
71
73
|
width: Number(v.width),
|
|
72
74
|
height: v.height
|
|
73
75
|
});
|
|
74
76
|
};
|
|
75
77
|
return /* @__PURE__ */ s(R, {
|
|
76
|
-
locale:
|
|
77
|
-
children: /* @__PURE__ */ x(
|
|
78
|
-
value:
|
|
79
|
-
popupContainer:
|
|
80
|
-
agentClient:
|
|
81
|
-
footer:
|
|
82
|
-
defaultInput:
|
|
83
|
-
onComment:
|
|
84
|
-
onSessionLoad:
|
|
85
|
-
onSessionUnload:
|
|
86
|
-
onMessage:
|
|
87
|
-
beforeMessageSend:
|
|
88
|
-
bodyStyle:
|
|
89
|
-
disabled:
|
|
90
|
-
transform:
|
|
91
|
-
features:
|
|
78
|
+
locale: ee,
|
|
79
|
+
children: /* @__PURE__ */ x(te, {
|
|
80
|
+
value: m(d({}, n), {
|
|
81
|
+
popupContainer: h,
|
|
82
|
+
agentClient: p,
|
|
83
|
+
footer: L,
|
|
84
|
+
defaultInput: M,
|
|
85
|
+
onComment: P,
|
|
86
|
+
onSessionLoad: T,
|
|
87
|
+
onSessionUnload: D,
|
|
88
|
+
onMessage: E,
|
|
89
|
+
beforeMessageSend: J,
|
|
90
|
+
bodyStyle: c,
|
|
91
|
+
disabled: q,
|
|
92
|
+
transform: F,
|
|
93
|
+
features: G
|
|
92
94
|
}),
|
|
93
|
-
children: [/* @__PURE__ */ s(
|
|
95
|
+
children: [/* @__PURE__ */ s(ne, {
|
|
94
96
|
height: i == null ? void 0 : i.height,
|
|
95
97
|
width: i == null ? void 0 : i.width,
|
|
96
98
|
maxConstraints: [document.body.clientWidth - 45],
|
|
97
99
|
minConstraints: [Number(t == null ? void 0 : t.minWidth)],
|
|
98
|
-
onResize:
|
|
100
|
+
onResize: X,
|
|
99
101
|
handle: /* @__PURE__ */ s("span", {
|
|
100
102
|
className: "resize-handle-ew"
|
|
101
103
|
}),
|
|
@@ -103,24 +105,24 @@ const ve = (n) => {
|
|
|
103
105
|
children: /* @__PURE__ */ x("div", {
|
|
104
106
|
id: "dialog-modal",
|
|
105
107
|
className: `gbot-dialog-modal ${e} ${b ? "opened" : "closed"}`,
|
|
106
|
-
style:
|
|
108
|
+
style: m(d({}, t), {
|
|
107
109
|
width: e == "float" ? i == null ? void 0 : i.width : t == null ? void 0 : t.width,
|
|
108
110
|
height: e === "float" ? i == null ? void 0 : i.height : t == null ? void 0 : t.height,
|
|
109
111
|
maxHeight: "100vh"
|
|
110
112
|
}),
|
|
111
|
-
ref:
|
|
112
|
-
children: [
|
|
113
|
+
ref: h,
|
|
114
|
+
children: [K ? /* @__PURE__ */ s("div", {
|
|
113
115
|
className: "loading",
|
|
114
|
-
children: /* @__PURE__ */ s(
|
|
115
|
-
}) : f &&
|
|
116
|
+
children: /* @__PURE__ */ s(de, {})
|
|
117
|
+
}) : f && p ? /* @__PURE__ */ s(ie, {
|
|
116
118
|
appId: f,
|
|
117
119
|
docViewerUrl: U,
|
|
118
|
-
bodyStyle:
|
|
119
|
-
sessionId:
|
|
120
|
+
bodyStyle: c,
|
|
121
|
+
sessionId: V
|
|
120
122
|
}) : null, (o == null ? void 0 : o.visible) && /* @__PURE__ */ s(k, {
|
|
121
123
|
className: "trigger-btn close-btn",
|
|
122
124
|
icon: /* @__PURE__ */ s("img", {
|
|
123
|
-
src:
|
|
125
|
+
src: r
|
|
124
126
|
}),
|
|
125
127
|
onClick: () => C(!1)
|
|
126
128
|
})]
|
|
@@ -129,7 +131,7 @@ const ve = (n) => {
|
|
|
129
131
|
className: `${e}-trigger-btn open-btn`,
|
|
130
132
|
style: o.style,
|
|
131
133
|
icon: /* @__PURE__ */ s("img", {
|
|
132
|
-
src:
|
|
134
|
+
src: r
|
|
133
135
|
}),
|
|
134
136
|
onClick: () => C(!0)
|
|
135
137
|
})]
|
|
@@ -137,5 +139,5 @@ const ve = (n) => {
|
|
|
137
139
|
});
|
|
138
140
|
};
|
|
139
141
|
export {
|
|
140
|
-
|
|
142
|
+
Ne as default
|
|
141
143
|
};
|