@glodon-aiot/agent-cli-ui 3.0.4 → 3.0.5-beta.0
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.
|
@@ -288,7 +288,7 @@ ${t}` : t, r = new _(i, l, W.User, n);
|
|
|
288
288
|
if (!t)
|
|
289
289
|
return;
|
|
290
290
|
const n = (i) => {
|
|
291
|
-
if (i.sessionId && i.sessionId !== Ne.current || i.role === W.User)
|
|
291
|
+
if (!i.sessionId || i.sessionId && i.sessionId !== Ne.current || i.role === W.User)
|
|
292
292
|
return;
|
|
293
293
|
if (i.index === -1 && i.code !== 200 && i.code !== 11915 && (H(!1), M(!1), h.current = h.current.filter((a) => !a.isWaiting), I([...h.current]), h.current = [...h.current], i.content))
|
|
294
294
|
return Qt.error({
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { jsx as
|
|
1
|
+
import { jsx as e, jsxs as p } from "../../_virtual/jsx-runtime.mjs";
|
|
2
2
|
import { ExclamationCircleFilled as f } from "@ant-design/icons";
|
|
3
3
|
import { Modal as u, Button as s } from "antd";
|
|
4
4
|
import { useContext as h } from "react";
|
|
@@ -14,28 +14,26 @@ const E = (r) => {
|
|
|
14
14
|
service: n
|
|
15
15
|
} = h(C), d = /* @__PURE__ */ p("div", {
|
|
16
16
|
className: "title",
|
|
17
|
-
children: [/* @__PURE__ */
|
|
17
|
+
children: [/* @__PURE__ */ e(f, {
|
|
18
18
|
style: {
|
|
19
19
|
color: "#FF9326",
|
|
20
20
|
fontSize: 20
|
|
21
21
|
}
|
|
22
|
-
}), /* @__PURE__ */
|
|
22
|
+
}), /* @__PURE__ */ e("span", {
|
|
23
23
|
children: "文件任务正在处理"
|
|
24
24
|
})]
|
|
25
25
|
}), m = () => {
|
|
26
26
|
if (!l)
|
|
27
27
|
return;
|
|
28
28
|
const i = [];
|
|
29
|
-
a.filter((
|
|
30
|
-
id:
|
|
31
|
-
status:
|
|
29
|
+
a.filter((o) => o.id).forEach((o) => i.push({
|
|
30
|
+
id: o.id,
|
|
31
|
+
status: o.status
|
|
32
32
|
})), n == null || n.deleteSessionKnowledgeFiles(l, {
|
|
33
33
|
files: i
|
|
34
|
-
}).then((e) => {
|
|
35
|
-
console.log(e);
|
|
36
34
|
}), t("abandon");
|
|
37
35
|
};
|
|
38
|
-
return /* @__PURE__ */
|
|
36
|
+
return /* @__PURE__ */ e(u, {
|
|
39
37
|
className: "prompt-modal",
|
|
40
38
|
width: 340,
|
|
41
39
|
open: c,
|
|
@@ -44,19 +42,19 @@ const E = (r) => {
|
|
|
44
42
|
maskClosable: !1,
|
|
45
43
|
onCancel: () => t("close"),
|
|
46
44
|
getContainer: document.getElementById("dialog-modal") || !1,
|
|
47
|
-
footer: [/* @__PURE__ */
|
|
45
|
+
footer: [/* @__PURE__ */ e(s, {
|
|
48
46
|
onClick: () => {
|
|
49
47
|
m();
|
|
50
48
|
},
|
|
51
49
|
children: "放弃文件"
|
|
52
|
-
}, "cancel"), /* @__PURE__ */
|
|
50
|
+
}, "cancel"), /* @__PURE__ */ e(s, {
|
|
53
51
|
type: "primary",
|
|
54
52
|
onClick: () => {
|
|
55
53
|
t("continue");
|
|
56
54
|
},
|
|
57
55
|
children: "继续上传"
|
|
58
56
|
}, "confirm")],
|
|
59
|
-
children: /* @__PURE__ */
|
|
57
|
+
children: /* @__PURE__ */ e("div", {
|
|
60
58
|
className: "content",
|
|
61
59
|
children: "你可以选择后台继续上传,也可以直接离开放弃上传中的文件。"
|
|
62
60
|
})
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsxs as s, jsx as r } from "../_virtual/jsx-runtime.mjs";
|
|
2
|
-
import { forwardRef as X, useState as o, useRef as O, useImperativeHandle as Y, useEffect as
|
|
2
|
+
import { forwardRef as X, useState as o, useRef as O, useImperativeHandle as Y, useEffect as g } from "react";
|
|
3
3
|
import Z from "react-quill";
|
|
4
4
|
import T from "../node_modules/classnames/index.mjs";
|
|
5
5
|
import ee from "../Iconfont/index.mjs";
|
|
@@ -25,15 +25,14 @@ const ie = X((z, F) => {
|
|
|
25
25
|
prevent: H,
|
|
26
26
|
focus: x,
|
|
27
27
|
update: W
|
|
28
|
-
})),
|
|
29
|
-
l(N), n.current && (
|
|
28
|
+
})), g(() => {
|
|
29
|
+
l(N), n.current && (f(), x());
|
|
30
30
|
}, [N]);
|
|
31
31
|
const W = (e) => {
|
|
32
32
|
l(e);
|
|
33
33
|
}, $ = () => {
|
|
34
34
|
l(void 0), w(void 0);
|
|
35
35
|
}, H = () => {
|
|
36
|
-
console.log("prevent");
|
|
37
36
|
}, x = () => {
|
|
38
37
|
if (!n.current || b)
|
|
39
38
|
return;
|
|
@@ -42,15 +41,15 @@ const ie = X((z, F) => {
|
|
|
42
41
|
e.getLength() > 0 && e.setSelection(e.getLength(), e.getLength());
|
|
43
42
|
});
|
|
44
43
|
};
|
|
45
|
-
|
|
44
|
+
g(() => {
|
|
46
45
|
if (!n.current)
|
|
47
46
|
return;
|
|
48
47
|
const e = n.current.getEditor();
|
|
49
48
|
c && (e.on("text-change", () => {
|
|
50
|
-
e.getLength() > c && e.deleteText(c, e.getLength()),
|
|
49
|
+
e.getLength() > c && e.deleteText(c, e.getLength()), f(), K(), x();
|
|
51
50
|
}), e.on("selection-change", K));
|
|
52
51
|
}, [n, c]);
|
|
53
|
-
const
|
|
52
|
+
const f = () => {
|
|
54
53
|
if (!n.current)
|
|
55
54
|
return;
|
|
56
55
|
const e = n.current.getEditor();
|
|
@@ -85,11 +84,11 @@ const ie = X((z, F) => {
|
|
|
85
84
|
const e = (t = n.current) == null ? void 0 : t.getEditor();
|
|
86
85
|
return e && (e == null ? void 0 : e.getLength()) > 2 && !((i = e.getText()) != null && i.includes(p.NETWORK)) && !((u = e.getText()) != null && u.includes(p.DOCUMENT));
|
|
87
86
|
};
|
|
88
|
-
return
|
|
87
|
+
return g(() => {
|
|
89
88
|
var e, t;
|
|
90
89
|
m ? (e = n.current) == null || e.getEditor().disable() : (t = n.current) == null || t.getEditor().enable();
|
|
91
|
-
}, [m]),
|
|
92
|
-
window.removeEventListener("resize",
|
|
90
|
+
}, [m]), g(() => (window.addEventListener("resize", f), () => {
|
|
91
|
+
window.removeEventListener("resize", f);
|
|
93
92
|
}), []), /* @__PURE__ */ s("div", {
|
|
94
93
|
className: T({
|
|
95
94
|
"quill-editor": !0,
|