@glodon-aiot/agent-cli-ui 3.0.5-beta.0 → 3.0.5

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.
@@ -46,7 +46,7 @@ const u = (o) => {
46
46
  const r = JSON.parse(JSON.stringify(o)) || [], a = (t = r == null ? void 0 : r.pop()) == null ? void 0 : t.pop();
47
47
  return a ? (a == null ? void 0 : a.type) === "BEFORE_CALL" || (a == null ? void 0 : a.type) === "FUNCTION_CALL" : !1;
48
48
  }, Ke = (o) => {
49
- var S, b, E, k, T, A, O, x, F;
49
+ var S, b, E, k, T, A, x, O, F;
50
50
  const {
51
51
  application: r,
52
52
  currentSession: a,
@@ -118,6 +118,7 @@ const u = (o) => {
118
118
  children: /* @__PURE__ */ e("span", {
119
119
  className: "item-user-content",
120
120
  children: /* @__PURE__ */ e(C, {
121
+ showLatex: !1,
121
122
  children: Se(t.content)
122
123
  })
123
124
  })
@@ -296,7 +297,7 @@ const u = (o) => {
296
297
  }), /* @__PURE__ */ e(C, {
297
298
  children: t.content
298
299
  })]
299
- }), (A = t == null ? void 0 : t.reference) != null && A.length && !((O = i == null ? void 0 : i.reference) != null && O.referenceFirst) ? /* @__PURE__ */ e(K, {
300
+ }), (A = t == null ? void 0 : t.reference) != null && A.length && !((x = i == null ? void 0 : i.reference) != null && x.referenceFirst) ? /* @__PURE__ */ e(K, {
300
301
  history: t,
301
302
  docViewerUrl: g
302
303
  }) : null, t.isRelatedQuestion && h ? /* @__PURE__ */ e("div", {
@@ -315,7 +316,7 @@ const u = (o) => {
315
316
  size: 4,
316
317
  text: "思考中"
317
318
  })
318
- }), (i == null ? void 0 : i.relate) && h && !!((x = t.relatedQuesion) != null && x.length) && /* @__PURE__ */ e(Ce, {
319
+ }), (i == null ? void 0 : i.relate) && h && !!((O = t.relatedQuesion) != null && O.length) && /* @__PURE__ */ e(Ce, {
319
320
  relatedQuesion: t.relatedQuesion,
320
321
  onRelatedClick: Y
321
322
  }), !t.isSensitive && !!t.messageId && /* @__PURE__ */ e(ae, {
@@ -1,53 +1,69 @@
1
- var f = Object.defineProperty, l = Object.defineProperties;
2
- var s = Object.getOwnPropertyDescriptors;
3
- var a = Object.getOwnPropertySymbols;
4
- var d = Object.prototype.hasOwnProperty, c = Object.prototype.propertyIsEnumerable;
5
- var n = (e, r, o) => r in e ? f(e, r, { enumerable: !0, configurable: !0, writable: !0, value: o }) : e[r] = o, m = (e, r) => {
6
- for (var o in r || (r = {}))
7
- d.call(r, o) && n(e, o, r[o]);
8
- if (a)
9
- for (var o of a(r))
10
- c.call(r, o) && n(e, o, r[o]);
11
- return e;
12
- }, p = (e, r) => l(e, s(r));
13
- import { jsx as t } from "../../_virtual/jsx-runtime.mjs";
14
- import { useRef as k } from "react";
15
- import h from "react-markdown";
16
- import u from "remark-gfm";
17
- import g from "rehype-raw";
18
- import w from "rehype-external-links";
1
+ var c = Object.defineProperty, g = Object.defineProperties;
2
+ var h = Object.getOwnPropertyDescriptors;
3
+ var t = Object.getOwnPropertySymbols;
4
+ var l = Object.prototype.hasOwnProperty, s = Object.prototype.propertyIsEnumerable;
5
+ var f = (r, e, o) => e in r ? c(r, e, { enumerable: !0, configurable: !0, writable: !0, value: o }) : r[e] = o, a = (r, e) => {
6
+ for (var o in e || (e = {}))
7
+ l.call(e, o) && f(r, o, e[o]);
8
+ if (t)
9
+ for (var o of t(e))
10
+ s.call(e, o) && f(r, o, e[o]);
11
+ return r;
12
+ }, d = (r, e) => g(r, h(e));
13
+ var k = (r, e) => {
14
+ var o = {};
15
+ for (var m in r)
16
+ l.call(r, m) && e.indexOf(m) < 0 && (o[m] = r[m]);
17
+ if (r != null && t)
18
+ for (var m of t(r))
19
+ e.indexOf(m) < 0 && s.call(r, m) && (o[m] = r[m]);
20
+ return o;
21
+ };
22
+ import { jsx as i } from "../../_virtual/jsx-runtime.mjs";
23
+ import { useRef as w } from "react";
24
+ import x from "react-markdown";
25
+ import M from "remark-gfm";
26
+ import y from "rehype-raw";
27
+ import R from "rehype-external-links";
19
28
  import "../../node_modules/katex/dist/katex.min.css.mjs";
20
29
  import "./style.less.mjs";
21
- import x from "./Image/index.mjs";
22
- import M from "./Code/index.mjs";
23
- import { replaceLatexDelimiters as y } from "../../utils/index.mjs";
24
- import R from "../../node_modules/rehype-katex/lib/index.mjs";
25
- import L from "../../node_modules/remark-math/lib/index.mjs";
26
- const z = (e) => {
27
- const r = k(null), o = y(e.children);
28
- return /* @__PURE__ */ t("div", {
29
- ref: r,
30
- children: /* @__PURE__ */ t(h, p(m({
30
+ import L from "./Image/index.mjs";
31
+ import P from "./Code/index.mjs";
32
+ import { replaceLatexDelimiters as b } from "../../utils/index.mjs";
33
+ import j from "../../node_modules/rehype-katex/lib/index.mjs";
34
+ import v from "../../node_modules/remark-math/lib/index.mjs";
35
+ const H = (m) => {
36
+ var p = m, {
37
+ showLatex: r = !0,
38
+ children: e
39
+ } = p, o = k(p, [
40
+ "showLatex",
41
+ "children"
42
+ ]);
43
+ const u = w(null);
44
+ return /* @__PURE__ */ i("div", {
45
+ ref: u,
46
+ children: /* @__PURE__ */ i(x, d(a({
31
47
  className: "markdown",
32
- rehypePlugins: [R, g, [w, {
48
+ rehypePlugins: [j, y, [R, {
33
49
  target: "_blank"
34
50
  }]],
35
- remarkPlugins: [L, [u, {
51
+ remarkPlugins: [v, [M, {
36
52
  singleTilde: !1
37
53
  }]]
38
- }, e), {
39
- children: o,
54
+ }, o), {
55
+ children: r ? b(e) : e,
40
56
  components: {
41
- img(i) {
42
- return /* @__PURE__ */ t(x, m({}, i));
57
+ img(n) {
58
+ return /* @__PURE__ */ i(L, a({}, n));
43
59
  },
44
- code(i) {
45
- return /* @__PURE__ */ t(M, m({}, i));
60
+ code(n) {
61
+ return /* @__PURE__ */ i(P, a({}, n));
46
62
  }
47
63
  }
48
64
  }))
49
65
  });
50
66
  };
51
67
  export {
52
- z as default
68
+ H as default
53
69
  };