@glodon-aiot/agent-cli-ui 3.3.3 → 3.3.4-beta.2

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.
Files changed (58) hide show
  1. package/dist/es/AgentClientUI.mjs +121 -109
  2. package/dist/es/Dialog/AgentChat/HistoryItem/index.mjs +156 -142
  3. package/dist/es/Dialog/AgentChat/PromptSetting/index.mjs +83 -98
  4. package/dist/es/Dialog/AgentChat/index.mjs +331 -314
  5. package/dist/es/Dialog/SessionList/index.mjs +35 -34
  6. package/dist/es/Dialog/index.mjs +101 -94
  7. package/dist/es/ReactTextGenerationUI/components/TextSiders/index.mjs +394 -0
  8. package/dist/es/ReactTextGenerationUI/components/fetchEventSource/fetch.mjs +112 -0
  9. package/dist/es/ReactTextGenerationUI/components/fetchEventSource/parse.mjs +97 -0
  10. package/dist/es/ReactTextGenerationUI/index.mjs +81 -0
  11. package/dist/es/components/FilePreview/index.mjs +26 -25
  12. package/dist/es/index.mjs +402 -217
  13. package/dist/es/node_modules/moment/dist/moment.mjs +2301 -0
  14. package/dist/es/packages/agent-cli-ui/package.json.mjs +162 -0
  15. package/dist/es/packages/react-components/dist/es/components/Markdown/ATag/index.mjs +27 -25
  16. package/dist/es/packages/react-components/dist/es/components/Markdown/Image/index.mjs +29 -27
  17. package/dist/es/packages/react-components/dist/es/components/Markdown/index.mjs +58 -48
  18. package/dist/es/packages/react-components/dist/es/index.mjs +1 -1
  19. package/dist/es/src/style.css +1 -1
  20. package/dist/es/src/style10.css +1 -1
  21. package/dist/es/src/style11.css +1 -1
  22. package/dist/es/src/style12.css +1 -1
  23. package/dist/es/src/style13.css +1 -1
  24. package/dist/es/src/style14.css +1 -1
  25. package/dist/es/src/style15.css +1 -1
  26. package/dist/es/src/style16.css +1 -1
  27. package/dist/es/src/style17.css +1 -1
  28. package/dist/es/src/style18.css +1 -1
  29. package/dist/es/src/style19.css +1 -1
  30. package/dist/es/src/style2.css +1 -1
  31. package/dist/es/src/style20.css +1 -1
  32. package/dist/es/src/style21.css +1 -1
  33. package/dist/es/src/style22.css +1 -1
  34. package/dist/es/src/style23.css +1 -1
  35. package/dist/es/src/style24.css +1 -1
  36. package/dist/es/src/style25.css +1 -1
  37. package/dist/es/src/style26.css +1 -1
  38. package/dist/es/src/style27.css +1 -1
  39. package/dist/es/src/style28.css +1 -1
  40. package/dist/es/src/style29.css +1 -1
  41. package/dist/es/src/style3.css +1 -1
  42. package/dist/es/src/style30.css +1 -0
  43. package/dist/es/src/style31.css +1 -0
  44. package/dist/es/src/style4.css +1 -1
  45. package/dist/es/src/style5.css +1 -1
  46. package/dist/es/src/style6.css +1 -1
  47. package/dist/es/src/style7.css +1 -1
  48. package/dist/es/src/style8.css +1 -1
  49. package/dist/es/src/style9.css +1 -1
  50. package/dist/lib/index.css +1 -1
  51. package/dist/lib/index.js +69 -58
  52. package/dist/src/AgentClientUI.d.ts +10 -2
  53. package/dist/src/Dialog/AgentChat/HistoryItem/index.d.ts +2 -0
  54. package/dist/src/Dialog/SessionList/index.d.ts +1 -0
  55. package/dist/src/Dialog/index.d.ts +9 -1
  56. package/dist/src/index.d.ts +11 -2
  57. package/dist/src/types.d.ts +8 -3
  58. package/package.json +3 -3
@@ -1,22 +1,22 @@
1
- import { jsxs as C, jsx as o, Fragment as U } from "react/jsx-runtime";
1
+ import { jsxs as x, jsx as o, Fragment as U } from "react/jsx-runtime";
2
2
  import { useState as s, useEffect as n } from "react";
3
- import { Image as k, Spin as E, Tooltip as j, Button as z } from "antd";
4
- import { LoadingOutlined as B } from "@ant-design/icons";
3
+ import { Image as k, Spin as E, Tooltip as P, Button as j } from "antd";
4
+ import { LoadingOutlined as z } from "@ant-design/icons";
5
5
  import { AecKnowledgeFileStatus as F } from "@glodon-aiot/apis";
6
- import I from "../Iconfont/index.mjs";
7
- import { getBase64 as P } from "../../utils/index.mjs";
6
+ import B from "../Iconfont/index.mjs";
7
+ import { getBase64 as I } from "../../utils/index.mjs";
8
8
  /* empty css */const D = (i) => {
9
9
  const {
10
- className: y,
11
- style: N,
10
+ className: N,
11
+ style: y,
12
12
  id: r,
13
13
  file: e,
14
14
  actions: {
15
15
  upload: l,
16
- remove: h,
16
+ remove: g,
17
17
  checkStatus: c
18
18
  } = {},
19
- onUrlChange: p,
19
+ onUrlChange: h,
20
20
  onStatusChange: v
21
21
  } = i, [f, u] = s(i.uploading), [w, S] = s(!1);
22
22
  n(() => {
@@ -27,51 +27,52 @@ import { getBase64 as P } from "../../utils/index.mjs";
27
27
  d(i.url);
28
28
  }, [i.url]), n(() => {
29
29
  l && e instanceof File && (m || f || (u(!0), l(e).then((t) => {
30
- d(t), p && p(t);
30
+ d(t), h && h(t);
31
31
  }).catch((t) => S(t)).finally(() => u(!1))));
32
32
  }, [l, m, e]);
33
- const [a, g] = s(e instanceof File || e == null ? void 0 : e.status);
33
+ const [a, p] = s(e instanceof File || e == null ? void 0 : e.status);
34
34
  n(() => {
35
- g(e instanceof File || e == null ? void 0 : e.status);
35
+ p(e instanceof File || e == null ? void 0 : e.status);
36
36
  }, [e]);
37
- const x = () => {
37
+ const C = () => {
38
38
  r && c && a === F.Processing && c(r).then((t) => {
39
- t !== a && (a !== void 0 && v && v(t), g(t));
40
- }).catch((t) => g(F.Failed));
39
+ t !== a && (a !== void 0 && v && v(t), p(t));
40
+ }).catch((t) => p(F.Failed));
41
41
  };
42
42
  return n(() => {
43
- x();
43
+ C();
44
44
  }, [r, c, a]), n(() => {
45
- P(e).then((t) => {
45
+ I(e).then((t) => {
46
46
  d(t);
47
47
  });
48
- }, [e]), e ? /* @__PURE__ */ C("div", {
49
- className: `file-preview ${y}`,
50
- style: N,
48
+ }, [e]), e ? /* @__PURE__ */ x("div", {
49
+ className: `file-preview ${N}`,
50
+ style: y,
51
51
  children: [/* @__PURE__ */ o(k, {
52
52
  src: m,
53
53
  className: "file-icon"
54
54
  }), f && /* @__PURE__ */ o(E, {
55
55
  className: "file-action file-process",
56
- indicator: /* @__PURE__ */ o(B, {
56
+ indicator: /* @__PURE__ */ o(z, {
57
57
  style: {
58
58
  fontSize: 16
59
59
  },
60
60
  spin: !0
61
61
  })
62
- }), !f && h && /* @__PURE__ */ o(j, {
62
+ }), !f && g && /* @__PURE__ */ o(P, {
63
63
  overlayClassName: "file-remove-tooltip",
64
64
  title: "删除文件",
65
- children: /* @__PURE__ */ o(z, {
65
+ getPopupContainer: (t) => t.parentNode,
66
+ children: /* @__PURE__ */ o(j, {
66
67
  className: "file-action file-remove",
67
- icon: /* @__PURE__ */ o(I, {
68
+ icon: /* @__PURE__ */ o(B, {
68
69
  style: {
69
70
  fontSize: "10px"
70
71
  },
71
72
  type: "icon-shanchu"
72
73
  }),
73
74
  onClick: () => {
74
- h(e, r);
75
+ g(e, r);
75
76
  }
76
77
  })
77
78
  })]