@glodon-aiot/agent-cli-ui 3.11.1-shapshot.1765331459 → 3.13.0-alpha.28

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 (36) hide show
  1. package/dist/es/Dialog/AgentChat/HistoryItem/FileItem/index.mjs +12 -12
  2. package/dist/es/Dialog/AgentChat/HistoryItem/SessionRefer/ReferItem/index.mjs +28 -28
  3. package/dist/es/Dialog/AgentChat/HistoryItem/SessionRefer/index.mjs +1 -1
  4. package/dist/es/Dialog/AgentChat/Tools/UploadKnowledgeFiles/index.mjs +1 -1
  5. package/dist/es/Dialog/AgentChat/index.mjs +84 -84
  6. package/dist/es/constant.mjs +4 -4
  7. package/dist/es/packages/agent-cli-ui/package.json.mjs +15 -15
  8. package/dist/es/packages/react-components/dist/es/components/Markdown/Code/index.mjs +7 -7
  9. package/dist/es/packages/react-components/dist/es/index.mjs +1 -1
  10. package/dist/es/src/style11.css +1 -1
  11. package/dist/es/src/style12.css +1 -1
  12. package/dist/es/src/style15.css +1 -1
  13. package/dist/es/src/style16.css +1 -1
  14. package/dist/es/src/style17.css +1 -1
  15. package/dist/es/src/style18.css +1 -1
  16. package/dist/es/src/style19.css +1 -1
  17. package/dist/es/src/style20.css +1 -1
  18. package/dist/es/src/style21.css +1 -1
  19. package/dist/es/src/style22.css +1 -1
  20. package/dist/es/src/style23.css +1 -1
  21. package/dist/es/src/style26.css +1 -1
  22. package/dist/es/src/style27.css +1 -1
  23. package/dist/es/src/style28.css +1 -1
  24. package/dist/es/src/style29.css +1 -1
  25. package/dist/es/src/style30.css +1 -1
  26. package/dist/es/src/style31.css +1 -1
  27. package/dist/es/src/style32.css +1 -1
  28. package/dist/es/src/style33.css +1 -1
  29. package/dist/lib/index.js +37 -37
  30. package/dist/src/constant.d.ts +2 -2
  31. package/package.json +3 -3
  32. package/dist/src/ReactTextGenerationUI/components/fetchEventSourcea/fetch.d.ts +0 -44
  33. package/dist/src/ReactTextGenerationUI/components/fetchEventSourcea/index.d.ts +0 -1
  34. package/dist/src/ReactTextGenerationUI/components/fetchEventSourcea/parse.d.ts +0 -36
  35. package/dist/src/utils/reactCompatibility.d.ts +0 -27
  36. package/dist/src/utils/testAntdPrefix.d.ts +0 -3
@@ -1,4 +1,4 @@
1
- import { jsxs as g, jsx as r } from "react/jsx-runtime";
1
+ import { jsxs as g, jsx as o } from "react/jsx-runtime";
2
2
  import { useContext as b, useState as x, useEffect as v } from "react";
3
3
  /* empty css */import { Typography as w, message as m } from "antd";
4
4
  import { getFileExtension as C, formatFileSize as y, isValidImageUrlWithAnyExtension as I } from "../../../../utils/index.mjs";
@@ -12,7 +12,7 @@ const K = (u) => {
12
12
  docViewerUrl: f
13
13
  } = u, {
14
14
  service: l,
15
- popupContainer: o
15
+ popupContainer: r
16
16
  } = b(E), [e, h] = x(), [t, p] = x("");
17
17
  v(() => {
18
18
  var n;
@@ -33,7 +33,7 @@ const K = (u) => {
33
33
  const F = (n) => {
34
34
  if (!(n != null && n.url)) {
35
35
  m.config({
36
- getContainer: () => (o == null ? void 0 : o.current) || document.body,
36
+ getContainer: () => (r == null ? void 0 : r.current) || document.body,
37
37
  prefixCls: "gbot-message"
38
38
  }), m.error("链接不存在"), m.config({
39
39
  getContainer: void 0,
@@ -43,7 +43,7 @@ const K = (u) => {
43
43
  }
44
44
  if (!I(n.url)) {
45
45
  m.config({
46
- getContainer: () => (o == null ? void 0 : o.current) || document.body,
46
+ getContainer: () => (r == null ? void 0 : r.current) || document.body,
47
47
  prefixCls: "gbot-message"
48
48
  }), m.error("链接格式不正确"), m.config({
49
49
  getContainer: void 0,
@@ -51,22 +51,22 @@ const K = (u) => {
51
51
  });
52
52
  return;
53
53
  }
54
- window.open(`${f}?url=${encodeURIComponent(n == null ? void 0 : n.url)}`);
54
+ window.open(`${f}#/doc?url=${encodeURIComponent(n == null ? void 0 : n.url)}`);
55
55
  };
56
56
  return /* @__PURE__ */ g("div", {
57
57
  className: "file-item",
58
58
  onClick: () => F(e),
59
- children: [/* @__PURE__ */ r("div", {
59
+ children: [/* @__PURE__ */ o("div", {
60
60
  className: "item-left",
61
- children: /* @__PURE__ */ r("img", {
61
+ children: /* @__PURE__ */ o("img", {
62
62
  className: "file-icon",
63
63
  src: U[t]
64
64
  })
65
65
  }), /* @__PURE__ */ g("div", {
66
66
  className: "item-main",
67
- children: [/* @__PURE__ */ r("div", {
67
+ children: [/* @__PURE__ */ o("div", {
68
68
  className: "file-name",
69
- children: /* @__PURE__ */ r(w.Paragraph, {
69
+ children: /* @__PURE__ */ o(w.Paragraph, {
70
70
  style: {
71
71
  margin: 0,
72
72
  width: "100%"
@@ -79,11 +79,11 @@ const K = (u) => {
79
79
  })
80
80
  }), /* @__PURE__ */ g("div", {
81
81
  className: "file-desc",
82
- children: [/* @__PURE__ */ r("span", {
82
+ children: [/* @__PURE__ */ o("span", {
83
83
  children: t == null ? void 0 : t.toUpperCase()
84
- }), /* @__PURE__ */ r("span", {
84
+ }), /* @__PURE__ */ o("span", {
85
85
  children: ","
86
- }), /* @__PURE__ */ r("span", {
86
+ }), /* @__PURE__ */ o("span", {
87
87
  children: y((e == null ? void 0 : e.size) || 0)
88
88
  })]
89
89
  })]
@@ -1,58 +1,58 @@
1
1
  var a = (p, e, i) => new Promise((l, n) => {
2
2
  var m = (o) => {
3
3
  try {
4
- s(i.next(o));
5
- } catch (r) {
6
- n(r);
4
+ r(i.next(o));
5
+ } catch (c) {
6
+ n(c);
7
7
  }
8
8
  }, k = (o) => {
9
9
  try {
10
- s(i.throw(o));
11
- } catch (r) {
12
- n(r);
10
+ r(i.throw(o));
11
+ } catch (c) {
12
+ n(c);
13
13
  }
14
- }, s = (o) => o.done ? l(o.value) : Promise.resolve(o.value).then(m, k);
15
- s((i = i.apply(p, e)).next());
14
+ }, r = (o) => o.done ? l(o.value) : Promise.resolve(o.value).then(m, k);
15
+ r((i = i.apply(p, e)).next());
16
16
  });
17
- import { jsxs as w, jsx as c } from "react/jsx-runtime";
18
- import { useContext as g } from "react";
17
+ import { jsxs as g, jsx as t } from "react/jsx-runtime";
18
+ import { useContext as w } from "react";
19
19
  import { Space as h, Tooltip as I, Button as y } from "antd";
20
20
  import { ISourceType as f, IversionInfo as b } from "@glodon-aiot/apis";
21
21
  import x from "../../../../../context.mjs";
22
22
  import C from "../../../../../components/WebLink/index.mjs";
23
23
  import d from "../../../../../components/Iconfont/index.mjs";
24
24
  const j = (p) => {
25
- var o, r;
25
+ var o, c;
26
26
  const {
27
27
  data: e,
28
28
  onClick: i,
29
29
  loadPage: l
30
30
  } = p, {
31
31
  transform: n
32
- } = g(x), m = () => a(void 0, null, function* () {
33
- return l ? yield l(e.knowledgeId, e.docId, e.textId).catch((t) => (console.warn("查询参考文件页码失败,即将打开首页", t), 0)) : 0;
34
- }), k = e.sourceType === f.WebLink && !!e.webLink, s = (
32
+ } = w(x), m = () => a(void 0, null, function* () {
33
+ return l ? yield l(e.knowledgeId, e.docId, e.textId) : 0;
34
+ }), k = e.sourceType === f.WebLink && !!e.webLink, r = (
35
35
  // data?.origin === IFileOrigin.AECPILOT ||
36
36
  e.sourceType === f.SourceFile && !!e.sourceFileName && // data.sourceFileName 标识参考文件存在与否,不能使用其他字段判断
37
37
  (e == null ? void 0 : e.versionInfo) !== b.ProtectUnauthorize
38
38
  );
39
- return /* @__PURE__ */ w(h, {
39
+ return /* @__PURE__ */ g(h, {
40
40
  className: "session-refer-panel",
41
- children: [/* @__PURE__ */ c("span", {
41
+ children: [/* @__PURE__ */ t("span", {
42
42
  className: "refer-panel-item",
43
43
  children: (e.knowledgeSourceName || "") + (e.knowledgeTitleName || "") || "-"
44
- }), k && ((o = n == null ? void 0 : n.reference) == null ? void 0 : o.iconVisible) && /* @__PURE__ */ c(I, {
44
+ }), k && ((o = n == null ? void 0 : n.reference) == null ? void 0 : o.iconVisible) && /* @__PURE__ */ t(I, {
45
45
  overlayStyle: {
46
46
  maxWidth: "90vw"
47
47
  },
48
- title: /* @__PURE__ */ c(C, {
48
+ title: /* @__PURE__ */ t(C, {
49
49
  href: e.webLink,
50
- onClick: (t) => {
51
- t.stopPropagation();
50
+ onClick: (s) => {
51
+ s.stopPropagation();
52
52
  }
53
53
  }),
54
- children: /* @__PURE__ */ c(y, {
55
- icon: /* @__PURE__ */ c(d, {
54
+ children: /* @__PURE__ */ t(y, {
55
+ icon: /* @__PURE__ */ t(d, {
56
56
  type: e.sourceType === f.WebLink ? "icon-lianjie" : "icon-doc-link",
57
57
  style: {
58
58
  fontSize: 16
@@ -60,12 +60,12 @@ const j = (p) => {
60
60
  }),
61
61
  type: "link",
62
62
  size: "small",
63
- onClick: (t) => a(void 0, null, function* () {
64
- t.stopPropagation(), i(e);
63
+ onClick: (s) => a(void 0, null, function* () {
64
+ s.stopPropagation(), i(e);
65
65
  })
66
66
  })
67
- }), s && ((r = n == null ? void 0 : n.reference) == null ? void 0 : r.iconVisible) && /* @__PURE__ */ c(y, {
68
- icon: /* @__PURE__ */ c(d, {
67
+ }), r && ((c = n == null ? void 0 : n.reference) == null ? void 0 : c.iconVisible) && /* @__PURE__ */ t(y, {
68
+ icon: /* @__PURE__ */ t(d, {
69
69
  type: "icon-doc-link",
70
70
  style: {
71
71
  fontSize: 16
@@ -73,8 +73,8 @@ const j = (p) => {
73
73
  }),
74
74
  type: "link",
75
75
  size: "small",
76
- onClick: (t) => a(void 0, null, function* () {
77
- t.stopPropagation();
76
+ onClick: (s) => a(void 0, null, function* () {
77
+ s.stopPropagation();
78
78
  const u = (yield m()) || 0;
79
79
  i(e, u);
80
80
  })
@@ -36,7 +36,7 @@ const {
36
36
  window.open(o.webLink);
37
37
  return;
38
38
  }
39
- o.sourceType === g.SourceFile && window.open(`${n}?page=${i || 0}&url=${encodeURIComponent(o.sourceFileUrl)}`);
39
+ o.sourceType === g.SourceFile && window.open(`${n}#/doc?url=${encodeURIComponent(o.sourceFileUrl)}&page=${i || 0}`);
40
40
  }
41
41
  };
42
42
  return /* @__PURE__ */ t("div", {
@@ -335,7 +335,7 @@ const Ae = he((L, P) => {
335
335
  });
336
336
  return;
337
337
  }
338
- window.open(`${q}?url=${encodeURIComponent(e == null ? void 0 : e.url)}`);
338
+ window.open(`${q}#/doc?url=${encodeURIComponent(e == null ? void 0 : e.url)}`);
339
339
  },
340
340
  remove: () => {
341
341
  ie(e);