@glodon-aiot/agent-cli-ui 3.6.1-alpha.14 → 3.6.2-alpha.16
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/Dialog/AgentChat/Tools/PromptManager/PromptList/PromptListItem.mjs +16 -16
- package/dist/es/Dialog/AgentChat/index.mjs +294 -285
- package/dist/es/packages/agent-cli-ui/package.json.mjs +3 -3
- package/dist/es/packages/react-components/dist/es/index.mjs +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/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/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/style30.css +1 -1
- package/dist/es/src/style32.css +1 -1
- package/dist/es/src/style5.css +1 -1
- package/dist/es/src/style6.css +1 -1
- package/dist/lib/index.js +52 -52
- package/package.json +3 -3
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { jsx as t, jsxs as
|
|
2
|
-
import { Button as y, Typography as
|
|
3
|
-
import { useContext as
|
|
4
|
-
import { LoadingOutlined as
|
|
1
|
+
import { jsx as t, jsxs as c } from "react/jsx-runtime";
|
|
2
|
+
import { Button as y, Typography as j, Space as E, Spin as I } from "antd";
|
|
3
|
+
import { useContext as L, useState as m, useEffect as l } from "react";
|
|
4
|
+
import { LoadingOutlined as $ } from "@ant-design/icons";
|
|
5
5
|
import R from "../../../../../context.mjs";
|
|
6
6
|
import N from "../../../../../components/Iconfont/index.mjs";
|
|
7
7
|
const {
|
|
8
8
|
Text: w
|
|
9
|
-
} =
|
|
10
|
-
children: [/* @__PURE__ */ t(
|
|
11
|
-
indicator: /* @__PURE__ */ t(
|
|
9
|
+
} = j, z = () => /* @__PURE__ */ c(E, {
|
|
10
|
+
children: [/* @__PURE__ */ t(I, {
|
|
11
|
+
indicator: /* @__PURE__ */ t($, {
|
|
12
12
|
style: {
|
|
13
13
|
fontSize: 12
|
|
14
14
|
}
|
|
@@ -25,15 +25,15 @@ const {
|
|
|
25
25
|
onClick: f,
|
|
26
26
|
onStatusChange: u
|
|
27
27
|
} = k, {
|
|
28
|
-
service:
|
|
29
|
-
} =
|
|
28
|
+
service: r
|
|
29
|
+
} = L(R), [n, a] = m(e.status !== "finish"), [i, g] = m(e), [T, x] = m(e.title);
|
|
30
30
|
l(() => {
|
|
31
31
|
i.status !== "finish" && a(!0);
|
|
32
32
|
}, [i.status, n]), l(() => {
|
|
33
33
|
g(e);
|
|
34
34
|
}, [e]);
|
|
35
35
|
const C = () => {
|
|
36
|
-
|
|
36
|
+
r == null || r.getPrompt(S, i.id).then((s) => {
|
|
37
37
|
g(s), u && u(s.status, s), s.status === "finish" ? a(!1) : (a(!0), setTimeout(() => C(), 2e3));
|
|
38
38
|
});
|
|
39
39
|
};
|
|
@@ -41,17 +41,17 @@ const {
|
|
|
41
41
|
n && C();
|
|
42
42
|
}, [n]), l(() => {
|
|
43
43
|
if (o) {
|
|
44
|
-
const s = new RegExp(`(${
|
|
45
|
-
x(
|
|
44
|
+
const s = o.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), b = new RegExp(`(${s})`, "g"), v = i.title.split(b);
|
|
45
|
+
x(v.map((p, P) => o === p ? /* @__PURE__ */ t("span", {
|
|
46
46
|
className: "hightlight",
|
|
47
47
|
children: p
|
|
48
|
-
},
|
|
48
|
+
}, P) : p));
|
|
49
49
|
} else
|
|
50
50
|
x(i.title);
|
|
51
|
-
}, [o, i.title]), /* @__PURE__ */
|
|
51
|
+
}, [o, i.title]), /* @__PURE__ */ c("div", {
|
|
52
52
|
className: "prompt-list-item",
|
|
53
53
|
onClick: () => f && f(e),
|
|
54
|
-
children: [/* @__PURE__ */
|
|
54
|
+
children: [/* @__PURE__ */ c("div", {
|
|
55
55
|
className: "prompt-list-item-body",
|
|
56
56
|
children: [/* @__PURE__ */ t("div", {
|
|
57
57
|
className: "prompt-list-item-title",
|
|
@@ -63,7 +63,7 @@ const {
|
|
|
63
63
|
children: i.context
|
|
64
64
|
})
|
|
65
65
|
})]
|
|
66
|
-
}), /* @__PURE__ */
|
|
66
|
+
}), /* @__PURE__ */ c("div", {
|
|
67
67
|
className: "prompt-list-item-actions",
|
|
68
68
|
onClick: (s) => s.stopPropagation(),
|
|
69
69
|
children: [d && /* @__PURE__ */ t(y, {
|