@glodon-aiot/agent-cli-ui 2.4.7 → 3.0.4
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 +97 -110
- package/dist/es/Dialog/AgentChat/index.mjs +516 -467
- package/dist/es/Dialog/ConnectToNetwork/index.mjs +25 -24
- package/dist/es/Dialog/FileCard/index.mjs +48 -55
- package/dist/es/Dialog/FilePreview/index.mjs +35 -42
- package/dist/es/Dialog/HistoryItem/index.mjs +48 -53
- package/dist/es/Dialog/KnowledgeList/index.mjs +55 -48
- package/dist/es/Dialog/PromptManager/index.mjs +29 -36
- package/dist/es/Dialog/PromptSetting/index.mjs +53 -66
- package/dist/es/Dialog/SessionAction/index.mjs +92 -91
- package/dist/es/Dialog/SessionList/index.mjs +135 -121
- package/dist/es/Dialog/SessionListDrawer/index.mjs +8 -7
- package/dist/es/Dialog/SessionRefer/ReferItem/index.mjs +29 -36
- package/dist/es/Dialog/SessionRefer/index.mjs +29 -36
- package/dist/es/Dialog/SessionRelated/index.mjs +17 -14
- package/dist/es/Dialog/UploadKnowledgeFiles/index.mjs +125 -132
- package/dist/es/Dialog/index.mjs +125 -93
- package/dist/es/QuillEditor/index.mjs +91 -86
- package/dist/es/_virtual/index.mjs +2 -2
- package/dist/es/components/Markdown/Image/index.mjs +20 -20
- package/dist/es/components/Markdown/index.mjs +27 -22
- package/dist/es/constant.mjs +8 -5
- package/dist/es/index.mjs +178 -152
- package/dist/es/node_modules/classnames/index.mjs +1 -1
- package/dist/es/node_modules/comma-separated-tokens/index.mjs +13 -0
- package/dist/es/node_modules/devlop/lib/default.mjs +5 -0
- package/dist/es/node_modules/hast-util-from-dom/lib/index.mjs +93 -0
- package/dist/es/node_modules/hast-util-from-dom/node_modules/hastscript/lib/create-h.mjs +126 -0
- package/dist/es/node_modules/hast-util-from-dom/node_modules/hastscript/lib/index.mjs +8 -0
- package/dist/es/node_modules/hast-util-from-dom/node_modules/hastscript/lib/svg-case-sensitive-tag-names.mjs +4 -0
- package/dist/es/node_modules/hast-util-from-dom/node_modules/property-information/index.mjs +12 -0
- package/dist/es/node_modules/hast-util-from-dom/node_modules/property-information/lib/aria.mjs +61 -0
- package/dist/es/node_modules/hast-util-from-dom/node_modules/property-information/lib/find.mjs +33 -0
- package/dist/es/node_modules/hast-util-from-dom/node_modules/property-information/lib/html.mjs +368 -0
- package/dist/es/node_modules/hast-util-from-dom/node_modules/property-information/lib/normalize.mjs +6 -0
- package/dist/es/node_modules/hast-util-from-dom/node_modules/property-information/lib/svg.mjs +566 -0
- package/dist/es/node_modules/hast-util-from-dom/node_modules/property-information/lib/util/case-insensitive-transform.mjs +7 -0
- package/dist/es/node_modules/hast-util-from-dom/node_modules/property-information/lib/util/case-sensitive-transform.mjs +6 -0
- package/dist/es/node_modules/hast-util-from-dom/node_modules/property-information/lib/util/create.mjs +14 -0
- package/dist/es/node_modules/hast-util-from-dom/node_modules/property-information/lib/util/defined-info.mjs +36 -0
- package/dist/es/node_modules/hast-util-from-dom/node_modules/property-information/lib/util/info.mjs +28 -0
- package/dist/es/node_modules/hast-util-from-dom/node_modules/property-information/lib/util/merge.mjs +10 -0
- package/dist/es/node_modules/hast-util-from-dom/node_modules/property-information/lib/util/schema.mjs +21 -0
- package/dist/es/node_modules/hast-util-from-dom/node_modules/property-information/lib/util/types.mjs +15 -0
- package/dist/es/node_modules/hast-util-from-dom/node_modules/property-information/lib/xlink.mjs +19 -0
- package/dist/es/node_modules/hast-util-from-dom/node_modules/property-information/lib/xml.mjs +15 -0
- package/dist/es/node_modules/hast-util-from-dom/node_modules/property-information/lib/xmlns.mjs +16 -0
- package/dist/es/node_modules/hast-util-from-html-isomorphic/lib/browser.mjs +16 -0
- package/dist/es/node_modules/hast-util-is-element/lib/index.mjs +61 -0
- package/dist/es/node_modules/hast-util-parse-selector/lib/index.mjs +20 -0
- package/dist/es/node_modules/hast-util-to-text/lib/index.mjs +223 -0
- package/dist/es/node_modules/katex/dist/katex.min.css.mjs +4 -0
- package/dist/es/node_modules/katex/dist/katex.mjs +11700 -0
- package/dist/es/node_modules/longest-streak/index.mjs +12 -0
- package/dist/es/node_modules/mdast-util-math/lib/index.mjs +170 -0
- package/dist/es/node_modules/micromark-extension-math/lib/math-flow.mjs +76 -0
- package/dist/es/node_modules/micromark-extension-math/lib/math-text.mjs +48 -0
- package/dist/es/node_modules/micromark-extension-math/lib/syntax.mjs +15 -0
- package/dist/es/node_modules/micromark-factory-space/index.mjs +15 -0
- package/dist/es/node_modules/micromark-util-character/index.mjs +10 -0
- package/dist/es/node_modules/rehype-katex/lib/index.mjs +83 -0
- package/dist/es/node_modules/remark-math/lib/index.mjs +13 -0
- package/dist/es/node_modules/space-separated-tokens/index.mjs +7 -0
- package/dist/es/node_modules/unist-util-find-after/lib/index.mjs +32 -0
- package/dist/es/node_modules/unist-util-is/lib/index.mjs +81 -0
- package/dist/es/node_modules/unist-util-visit-parents/lib/color.mjs +6 -0
- package/dist/es/node_modules/unist-util-visit-parents/lib/index.mjs +56 -0
- package/dist/es/node_modules/web-namespaces/index.mjs +11 -0
- package/dist/es/utils/index.mjs +44 -27
- package/dist/lib/index.js +278 -138
- package/dist/src/Dialog/AgentChat/index.d.ts +4 -2
- package/dist/src/Dialog/ConnectToNetwork/index.d.ts +1 -0
- package/dist/src/Dialog/KnowledgeList/KnowledgeSelect/index.d.ts +1 -1
- package/dist/src/Dialog/KnowledgeList/index.d.ts +2 -3
- package/dist/src/Dialog/PromptSetting/index.d.ts +1 -0
- package/dist/src/Dialog/SessionAction/index.d.ts +2 -0
- package/dist/src/Dialog/SessionList/index.d.ts +5 -4
- package/dist/src/QuillEditor/index.d.ts +1 -0
- package/dist/src/components/Markdown/Text/index.d.ts +8 -0
- package/dist/src/components/MathJaxLoader/index.d.ts +7 -0
- package/dist/src/components/MathJaxRender/index.d.ts +6 -0
- package/dist/src/constant.d.ts +1 -1
- package/dist/src/contexts/MathJaxContext.d.ts +12 -0
- package/dist/src/index.d.ts +4 -1
- package/dist/src/types.d.ts +26 -6
- package/dist/src/utils/index.d.ts +15 -0
- package/package.json +18 -17
- package/dist/es/_virtual/index2.mjs +0 -4
- package/dist/es/_virtual/index3.mjs +0 -4
- package/dist/es/_virtual/index4.mjs +0 -4
- package/dist/es/_virtual/minio-zj.mjs +0 -4
- package/dist/es/node_modules/@glodon-aiot/minio/dist/minio-zj.mjs +0 -26485
- package/dist/es/node_modules/@socket.io/component-emitter/lib/esm/index.mjs +0 -54
- package/dist/es/node_modules/base64-js/index.mjs +0 -47
- package/dist/es/node_modules/buffer/index.mjs +0 -927
- package/dist/es/node_modules/engine.io-client/build/esm/contrib/has-cors.mjs +0 -9
- package/dist/es/node_modules/engine.io-client/build/esm/contrib/parseqs.mjs +0 -18
- package/dist/es/node_modules/engine.io-client/build/esm/contrib/parseuri.mjs +0 -24
- package/dist/es/node_modules/engine.io-client/build/esm/contrib/yeast.mjs +0 -19
- package/dist/es/node_modules/engine.io-client/build/esm/globalThis.browser.mjs +0 -4
- package/dist/es/node_modules/engine.io-client/build/esm/socket.mjs +0 -317
- package/dist/es/node_modules/engine.io-client/build/esm/transport.mjs +0 -113
- package/dist/es/node_modules/engine.io-client/build/esm/transports/index.mjs +0 -11
- package/dist/es/node_modules/engine.io-client/build/esm/transports/polling.mjs +0 -273
- package/dist/es/node_modules/engine.io-client/build/esm/transports/websocket-constructor.browser.mjs +0 -8
- package/dist/es/node_modules/engine.io-client/build/esm/transports/websocket.mjs +0 -87
- package/dist/es/node_modules/engine.io-client/build/esm/transports/webtransport.mjs +0 -52
- package/dist/es/node_modules/engine.io-client/build/esm/transports/xmlhttprequest.browser.mjs +0 -21
- package/dist/es/node_modules/engine.io-client/build/esm/util.mjs +0 -23
- package/dist/es/node_modules/engine.io-parser/build/esm/commons.mjs +0 -21
- package/dist/es/node_modules/engine.io-parser/build/esm/contrib/base64-arraybuffer.mjs +0 -14
- package/dist/es/node_modules/engine.io-parser/build/esm/decodePacket.browser.mjs +0 -39
- package/dist/es/node_modules/engine.io-parser/build/esm/encodePacket.browser.mjs +0 -28
- package/dist/es/node_modules/engine.io-parser/build/esm/index.mjs +0 -105
- package/dist/es/node_modules/ieee754/index.mjs +0 -28
- package/dist/es/node_modules/js-base64/base64.mjs +0 -31
- package/dist/es/node_modules/socket.io-client/build/esm/contrib/backo2.mjs +0 -26
- package/dist/es/node_modules/socket.io-client/build/esm/index.mjs +0 -25
- package/dist/es/node_modules/socket.io-client/build/esm/manager.mjs +0 -242
- package/dist/es/node_modules/socket.io-client/build/esm/on.mjs +0 -8
- package/dist/es/node_modules/socket.io-client/build/esm/socket.mjs +0 -608
- package/dist/es/node_modules/socket.io-client/build/esm/url.mjs +0 -19
- package/dist/es/node_modules/socket.io-parser/build/esm/binary.mjs +0 -52
- package/dist/es/node_modules/socket.io-parser/build/esm/index.mjs +0 -203
- package/dist/es/node_modules/socket.io-parser/build/esm/is-binary.mjs +0 -26
- package/dist/es/packages/agent-cli-sdk/src/AgentSession.mjs +0 -243
- package/dist/es/packages/agent-cli-sdk/src/BotClient.mjs +0 -242
- package/dist/es/packages/agent-cli-sdk/src/Config.mjs +0 -34
- package/dist/es/packages/agent-cli-sdk/src/DialogSession.mjs +0 -281
- package/dist/es/packages/agent-cli-sdk/src/EventBus.mjs +0 -64
- package/dist/es/packages/agent-cli-sdk/src/Logger.mjs +0 -31
- package/dist/es/packages/agent-cli-sdk/src/PayloadTypes.mjs +0 -4
- package/dist/es/packages/agent-cli-sdk/src/Session.mjs +0 -527
- package/dist/es/packages/agent-cli-sdk/src/api/fetchEventSource/fetch.mjs +0 -112
- package/dist/es/packages/agent-cli-sdk/src/api/fetchEventSource/parse.mjs +0 -97
- package/dist/es/packages/agent-cli-sdk/src/api/index.mjs +0 -48
- package/dist/es/packages/agent-cli-sdk/src/utils.mjs +0 -11
- package/dist/es/packages/apis/dist/es/aecpilot/cosntant.mjs +0 -5
- package/dist/es/packages/apis/dist/es/aecpilot/model.mjs +0 -9
- package/dist/es/packages/apis/dist/es/aecpilotui/index.mjs +0 -8
- package/dist/es/packages/apis/dist/es/agentcliui/index.mjs +0 -414
- package/dist/es/packages/apis/dist/es/base/index.mjs +0 -154
- package/dist/es/packages/apis/dist/es/cvforce/index.mjs +0 -431
- package/dist/es/packages/apis/dist/es/cvforce/model.mjs +0 -6
- package/dist/es/packages/apis/dist/es/node_modules/uuid/dist/esm-browser/native.mjs +0 -6
- package/dist/es/packages/apis/dist/es/node_modules/uuid/dist/esm-browser/rng.mjs +0 -10
- package/dist/es/packages/apis/dist/es/node_modules/uuid/dist/esm-browser/stringify.mjs +0 -9
- package/dist/es/packages/apis/dist/es/node_modules/uuid/dist/esm-browser/v4.mjs +0 -19
- package/dist/es/packages/apis/dist/es/utils/fetchEventSource/fetch.mjs +0 -106
- package/dist/es/packages/apis/dist/es/utils/fetchEventSource/parse.mjs +0 -97
|
@@ -1,106 +0,0 @@
|
|
|
1
|
-
import { getBytes as k, getLines as B, getMessages as D } from "./parse.mjs";
|
|
2
|
-
var H = Object.defineProperty, I = Object.defineProperties, q = Object.getOwnPropertyDescriptors, f = Object.getOwnPropertySymbols, T = Object.prototype.hasOwnProperty, W = Object.prototype.propertyIsEnumerable, x = (n, e, t) => e in n ? H(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t, j = (n, e) => {
|
|
3
|
-
for (var t in e || (e = {}))
|
|
4
|
-
T.call(e, t) && x(n, t, e[t]);
|
|
5
|
-
if (f)
|
|
6
|
-
for (var t of f(e))
|
|
7
|
-
W.call(e, t) && x(n, t, e[t]);
|
|
8
|
-
return n;
|
|
9
|
-
}, J = (n, e) => I(n, q(e)), K = (n, e) => {
|
|
10
|
-
var t = {};
|
|
11
|
-
for (var r in n)
|
|
12
|
-
T.call(n, r) && e.indexOf(r) < 0 && (t[r] = n[r]);
|
|
13
|
-
if (n != null && f)
|
|
14
|
-
for (var r of f(n))
|
|
15
|
-
e.indexOf(r) < 0 && W.call(n, r) && (t[r] = n[r]);
|
|
16
|
-
return t;
|
|
17
|
-
}, M = (n, e, t) => new Promise((r, d) => {
|
|
18
|
-
var u = (o) => {
|
|
19
|
-
try {
|
|
20
|
-
i(t.next(o));
|
|
21
|
-
} catch (l) {
|
|
22
|
-
d(l);
|
|
23
|
-
}
|
|
24
|
-
}, p = (o) => {
|
|
25
|
-
try {
|
|
26
|
-
i(t.throw(o));
|
|
27
|
-
} catch (l) {
|
|
28
|
-
d(l);
|
|
29
|
-
}
|
|
30
|
-
}, i = (o) => o.done ? r(o.value) : Promise.resolve(o.value).then(u, p);
|
|
31
|
-
i((t = t.apply(n, e)).next());
|
|
32
|
-
});
|
|
33
|
-
const m = "text/event-stream", R = 1e3, $ = "last-event-id";
|
|
34
|
-
function z(n, e) {
|
|
35
|
-
var t = e, {
|
|
36
|
-
signal: r,
|
|
37
|
-
headers: d,
|
|
38
|
-
onopen: u,
|
|
39
|
-
onmessage: p,
|
|
40
|
-
onclose: i,
|
|
41
|
-
onerror: o,
|
|
42
|
-
openWhenHidden: l,
|
|
43
|
-
fetch: g
|
|
44
|
-
} = t, A = K(t, [
|
|
45
|
-
"signal",
|
|
46
|
-
"headers",
|
|
47
|
-
"onopen",
|
|
48
|
-
"onmessage",
|
|
49
|
-
"onclose",
|
|
50
|
-
"onerror",
|
|
51
|
-
"openWhenHidden",
|
|
52
|
-
"fetch"
|
|
53
|
-
]);
|
|
54
|
-
return new Promise((w, C) => {
|
|
55
|
-
const c = j({}, d);
|
|
56
|
-
c.accept || (c.accept = m);
|
|
57
|
-
let s;
|
|
58
|
-
function O() {
|
|
59
|
-
s.abort(), document.hidden || b();
|
|
60
|
-
}
|
|
61
|
-
l || document.addEventListener("visibilitychange", O);
|
|
62
|
-
let E = R, h = 0;
|
|
63
|
-
function y() {
|
|
64
|
-
document.removeEventListener("visibilitychange", O), window.clearTimeout(h), s.abort();
|
|
65
|
-
}
|
|
66
|
-
r == null || r.addEventListener("abort", () => {
|
|
67
|
-
y(), w();
|
|
68
|
-
});
|
|
69
|
-
const L = g != null ? g : window.fetch, S = u != null ? u : V;
|
|
70
|
-
function b() {
|
|
71
|
-
return M(this, null, function* () {
|
|
72
|
-
var P;
|
|
73
|
-
s = new AbortController();
|
|
74
|
-
try {
|
|
75
|
-
const v = yield L(n, J(j({}, A), {
|
|
76
|
-
headers: c,
|
|
77
|
-
signal: s.signal
|
|
78
|
-
}));
|
|
79
|
-
yield S(v), yield k(v.body, B(D((a) => {
|
|
80
|
-
a ? c[$] = a : delete c[$];
|
|
81
|
-
}, (a) => {
|
|
82
|
-
E = a;
|
|
83
|
-
}, p))), i == null || i(), y(), w();
|
|
84
|
-
} catch (v) {
|
|
85
|
-
if (!s.signal.aborted)
|
|
86
|
-
try {
|
|
87
|
-
const a = (P = o == null ? void 0 : o(v)) != null ? P : E;
|
|
88
|
-
window.clearTimeout(h), h = window.setTimeout(b, a);
|
|
89
|
-
} catch (a) {
|
|
90
|
-
y(), C(a);
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
});
|
|
94
|
-
}
|
|
95
|
-
b();
|
|
96
|
-
});
|
|
97
|
-
}
|
|
98
|
-
function V(n) {
|
|
99
|
-
const e = n.headers.get("content-type");
|
|
100
|
-
if (!(e != null && e.startsWith(m)))
|
|
101
|
-
throw new Error(`Expected content-type to be ${m}, Actual: ${e}`);
|
|
102
|
-
}
|
|
103
|
-
export {
|
|
104
|
-
m as EventStreamContentType,
|
|
105
|
-
z as fetchEventSource
|
|
106
|
-
};
|
|
@@ -1,97 +0,0 @@
|
|
|
1
|
-
var y = (r, t, e) => new Promise((a, i) => {
|
|
2
|
-
var s = (n) => {
|
|
3
|
-
try {
|
|
4
|
-
o(e.next(n));
|
|
5
|
-
} catch (c) {
|
|
6
|
-
i(c);
|
|
7
|
-
}
|
|
8
|
-
}, u = (n) => {
|
|
9
|
-
try {
|
|
10
|
-
o(e.throw(n));
|
|
11
|
-
} catch (c) {
|
|
12
|
-
i(c);
|
|
13
|
-
}
|
|
14
|
-
}, o = (n) => n.done ? a(n.value) : Promise.resolve(n.value).then(s, u);
|
|
15
|
-
o((e = e.apply(r, t)).next());
|
|
16
|
-
});
|
|
17
|
-
function b(r, t) {
|
|
18
|
-
return y(this, null, function* () {
|
|
19
|
-
const e = r.getReader();
|
|
20
|
-
let a;
|
|
21
|
-
for (; !(a = yield e.read()).done; )
|
|
22
|
-
t(a.value);
|
|
23
|
-
});
|
|
24
|
-
}
|
|
25
|
-
function v(r) {
|
|
26
|
-
let t, e, a, i = !1, s;
|
|
27
|
-
return function(u) {
|
|
28
|
-
t === void 0 ? (t = u, e = 0, a = -1, s = !1) : t = h(t, u);
|
|
29
|
-
const o = t.length;
|
|
30
|
-
let n = 0;
|
|
31
|
-
for (; e < o; ) {
|
|
32
|
-
i && (t[e] === 10 && (n = ++e), i = !1);
|
|
33
|
-
let c = -1;
|
|
34
|
-
for (; e < o && c === -1; ++e)
|
|
35
|
-
switch (t[e]) {
|
|
36
|
-
case 58:
|
|
37
|
-
a === -1 && (a = e - n);
|
|
38
|
-
break;
|
|
39
|
-
case 13:
|
|
40
|
-
i = !1, e + 4 < o && t[e + 1] === 10 && t[e + 2] !== 13 && t[e - 1] !== 10 && t[e - 2] !== 13 && (s = !0);
|
|
41
|
-
case 10:
|
|
42
|
-
c = e;
|
|
43
|
-
break;
|
|
44
|
-
}
|
|
45
|
-
if (c === -1)
|
|
46
|
-
break;
|
|
47
|
-
r(t.subarray(n, c), a, s), n = e, a = -1, s = !1;
|
|
48
|
-
}
|
|
49
|
-
n === o ? t = void 0 : n !== 0 && (t = t.subarray(n), e -= n);
|
|
50
|
-
};
|
|
51
|
-
}
|
|
52
|
-
function g(r, t, e) {
|
|
53
|
-
let a = f();
|
|
54
|
-
const i = new TextDecoder();
|
|
55
|
-
return function(s, u, o) {
|
|
56
|
-
if (s.length === 0)
|
|
57
|
-
e == null || e(a), a = f();
|
|
58
|
-
else if (u > 0) {
|
|
59
|
-
const n = i.decode(s.subarray(0, u)), c = u + (s[u + 1] === 32 ? 2 : 1);
|
|
60
|
-
let d = i.decode(s.subarray(c));
|
|
61
|
-
switch (o && (d += `
|
|
62
|
-
`), n) {
|
|
63
|
-
case "data":
|
|
64
|
-
a.data = a.data ? a.data + `
|
|
65
|
-
` + d : d;
|
|
66
|
-
break;
|
|
67
|
-
case "event":
|
|
68
|
-
a.event = d;
|
|
69
|
-
break;
|
|
70
|
-
case "id":
|
|
71
|
-
r(a.id = d);
|
|
72
|
-
break;
|
|
73
|
-
case "retry":
|
|
74
|
-
const l = parseInt(d, 10);
|
|
75
|
-
isNaN(l) || t(a.retry = l);
|
|
76
|
-
break;
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
};
|
|
80
|
-
}
|
|
81
|
-
function h(r, t) {
|
|
82
|
-
const e = new Uint8Array(r.length + t.length);
|
|
83
|
-
return e.set(r), e.set(t, r.length), e;
|
|
84
|
-
}
|
|
85
|
-
function f() {
|
|
86
|
-
return {
|
|
87
|
-
data: "",
|
|
88
|
-
event: "",
|
|
89
|
-
id: "",
|
|
90
|
-
retry: void 0
|
|
91
|
-
};
|
|
92
|
-
}
|
|
93
|
-
export {
|
|
94
|
-
b as getBytes,
|
|
95
|
-
v as getLines,
|
|
96
|
-
g as getMessages
|
|
97
|
-
};
|