@glodon-aiot/agent-cli-ui 3.3.2-beta.9 → 3.3.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 (42) hide show
  1. package/dist/es/AgentClientUI.mjs +32 -34
  2. package/dist/es/Dialog/AgentChat/HistoryItem/index.mjs +142 -156
  3. package/dist/es/Dialog/AgentChat/index.mjs +147 -150
  4. package/dist/es/index.mjs +95 -101
  5. package/dist/es/packages/react-components/dist/es/components/Markdown/ATag/index.mjs +25 -27
  6. package/dist/es/packages/react-components/dist/es/components/Markdown/Image/index.mjs +27 -29
  7. package/dist/es/packages/react-components/dist/es/components/Markdown/index.mjs +48 -58
  8. package/dist/es/packages/react-components/dist/es/index.mjs +1 -1
  9. package/dist/es/src/style10.css +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/style13.css +1 -1
  13. package/dist/es/src/style14.css +1 -1
  14. package/dist/es/src/style15.css +1 -1
  15. package/dist/es/src/style16.css +1 -1
  16. package/dist/es/src/style17.css +1 -1
  17. package/dist/es/src/style19.css +1 -1
  18. package/dist/es/src/style20.css +1 -1
  19. package/dist/es/src/style21.css +1 -1
  20. package/dist/es/src/style22.css +1 -1
  21. package/dist/es/src/style23.css +1 -1
  22. package/dist/es/src/style24.css +1 -1
  23. package/dist/es/src/style3.css +1 -1
  24. package/dist/es/src/style4.css +1 -1
  25. package/dist/es/src/style5.css +1 -1
  26. package/dist/es/src/style6.css +1 -1
  27. package/dist/es/src/style7.css +1 -1
  28. package/dist/es/src/style9.css +1 -1
  29. package/dist/lib/index.js +51 -51
  30. package/dist/src/Dialog/AgentChat/HistoryItem/index.d.ts +0 -2
  31. package/dist/src/ReactTextGenerationUI/components/TextSiders/index.d.ts +22 -0
  32. package/dist/src/ReactTextGenerationUI/components/fetchEventSource/fetch.d.ts +44 -0
  33. package/dist/src/ReactTextGenerationUI/components/fetchEventSource/index.d.ts +1 -0
  34. package/dist/src/ReactTextGenerationUI/components/fetchEventSource/parse.d.ts +36 -0
  35. package/dist/src/ReactTextGenerationUI/components/fetchEventSourcea/fetch.d.ts +44 -0
  36. package/dist/src/ReactTextGenerationUI/components/fetchEventSourcea/index.d.ts +1 -0
  37. package/dist/src/ReactTextGenerationUI/components/fetchEventSourcea/parse.d.ts +36 -0
  38. package/dist/src/ReactTextGenerationUI/index.d.ts +4 -0
  39. package/dist/src/index.d.ts +0 -1
  40. package/dist/src/types.d.ts +0 -3
  41. package/dist/src/utils/reactCompatibility.d.ts +27 -0
  42. package/package.json +3 -3
@@ -1,25 +1,25 @@
1
- var Z = Object.defineProperty, _ = Object.defineProperties;
2
- var B = Object.getOwnPropertyDescriptors;
1
+ var Y = Object.defineProperty, Z = Object.defineProperties;
2
+ var _ = Object.getOwnPropertyDescriptors;
3
3
  var N = Object.getOwnPropertySymbols;
4
- var z = Object.prototype.hasOwnProperty, ee = Object.prototype.propertyIsEnumerable;
5
- var y = (n, e, o) => e in n ? Z(n, e, { enumerable: !0, configurable: !0, writable: !0, value: o }) : n[e] = o, d = (n, e) => {
4
+ var B = Object.prototype.hasOwnProperty, z = Object.prototype.propertyIsEnumerable;
5
+ var y = (n, e, o) => e in n ? Y(n, e, { enumerable: !0, configurable: !0, writable: !0, value: o }) : n[e] = o, d = (n, e) => {
6
6
  for (var o in e || (e = {}))
7
- z.call(e, o) && y(n, o, e[o]);
7
+ B.call(e, o) && y(n, o, e[o]);
8
8
  if (N)
9
9
  for (var o of N(e))
10
- ee.call(e, o) && y(n, o, e[o]);
10
+ z.call(e, o) && y(n, o, e[o]);
11
11
  return n;
12
- }, m = (n, e) => _(n, B(e));
12
+ }, m = (n, e) => Z(n, _(e));
13
13
  import { jsx as s, jsxs as x } from "react/jsx-runtime";
14
- import { useRef as oe, useState as l, useEffect as I } from "react";
15
- /* empty css */import { AgentClientProvider as te } from "./context.mjs";
16
- import { Resizable as ne } from "react-resizable";
17
- import ie from "./Dialog/index.mjs";
18
- import { configure as se, BotClient as le } from "@glodon-aiot/bot-client-sdk";
19
- import { JWT as ae } from "./utils/index.mjs";
20
- import { ConfigProvider as R, Spin as de, Button as k } from "antd";
21
- import me from "antd/es/locale/zh_CN";
22
- const ye = (n) => {
14
+ import { useRef as ee, useState as l, useEffect as I } from "react";
15
+ /* empty css */import { AgentClientProvider as oe } from "./context.mjs";
16
+ import { Resizable as te } from "react-resizable";
17
+ import ne from "./Dialog/index.mjs";
18
+ import { configure as ie, BotClient as se } from "@glodon-aiot/bot-client-sdk";
19
+ import { JWT as le } from "./utils/index.mjs";
20
+ import { ConfigProvider as R, Spin as ae, Button as k } from "antd";
21
+ import de from "antd/es/locale/zh_CN";
22
+ const Ne = (n) => {
23
23
  const {
24
24
  className: e,
25
25
  triggerButton: o,
@@ -44,30 +44,28 @@ const ye = (n) => {
44
44
  sessionId: V,
45
45
  disabled: q,
46
46
  transform: F,
47
- features: G,
48
- stream: K
49
- } = n, h = oe(null), [Q, re] = l(!1), [f, S] = l(), [p, X] = l(), [i, g] = l(t), [b, C] = l(n.open);
47
+ features: G
48
+ } = n, h = ee(null), [K, me] = l(!1), [f, Q] = l(), [p, S] = l(), [i, g] = l(t), [b, C] = l(n.open);
50
49
  I(() => {
51
50
  if (!a)
52
51
  return;
53
- const u = ae(a);
54
- S(u.rid), se({
52
+ const u = le(a);
53
+ Q(u.rid), ie({
55
54
  debug: $,
56
55
  env: W,
57
56
  apiRoot: O
58
57
  });
59
- const w = new le(a, {
58
+ const w = new se(a, {
60
59
  plugins: j,
61
- mcp: H,
62
- stream: K
60
+ mcp: H
63
61
  });
64
- X(w);
62
+ S(w);
65
63
  }, [a]), R.config({
66
64
  theme: A
67
65
  }), I(() => {
68
66
  t && g(t);
69
67
  }, [t]);
70
- const Y = (u, {
68
+ const X = (u, {
71
69
  element: w,
72
70
  size: v
73
71
  }) => {
@@ -77,8 +75,8 @@ const ye = (n) => {
77
75
  });
78
76
  };
79
77
  return /* @__PURE__ */ s(R, {
80
- locale: me,
81
- children: /* @__PURE__ */ x(te, {
78
+ locale: de,
79
+ children: /* @__PURE__ */ x(oe, {
82
80
  value: m(d({}, n), {
83
81
  popupContainer: h,
84
82
  agentClient: p,
@@ -94,12 +92,12 @@ const ye = (n) => {
94
92
  transform: F,
95
93
  features: G
96
94
  }),
97
- children: [/* @__PURE__ */ s(ne, {
95
+ children: [/* @__PURE__ */ s(te, {
98
96
  height: i == null ? void 0 : i.height,
99
97
  width: i == null ? void 0 : i.width,
100
98
  maxConstraints: [document.body.clientWidth - 45],
101
99
  minConstraints: [Number(t == null ? void 0 : t.minWidth)],
102
- onResize: Y,
100
+ onResize: X,
103
101
  handle: /* @__PURE__ */ s("span", {
104
102
  className: "resize-handle-ew"
105
103
  }),
@@ -113,10 +111,10 @@ const ye = (n) => {
113
111
  maxHeight: "100vh"
114
112
  }),
115
113
  ref: h,
116
- children: [Q ? /* @__PURE__ */ s("div", {
114
+ children: [K ? /* @__PURE__ */ s("div", {
117
115
  className: "loading",
118
- children: /* @__PURE__ */ s(de, {})
119
- }) : f && p ? /* @__PURE__ */ s(ie, {
116
+ children: /* @__PURE__ */ s(ae, {})
117
+ }) : f && p ? /* @__PURE__ */ s(ne, {
120
118
  appId: f,
121
119
  docViewerUrl: U,
122
120
  bodyStyle: c,
@@ -141,5 +139,5 @@ const ye = (n) => {
141
139
  });
142
140
  };
143
141
  export {
144
- ye as default
142
+ Ne as default
145
143
  };
@@ -1,120 +1,107 @@
1
- var ue = Object.defineProperty, he = Object.defineProperties;
2
- var ge = Object.getOwnPropertyDescriptors;
3
- var K = Object.getOwnPropertySymbols;
4
- var Ne = Object.prototype.hasOwnProperty, fe = Object.prototype.propertyIsEnumerable;
5
- var X = (s, l, i) => l in s ? ue(s, l, { enumerable: !0, configurable: !0, writable: !0, value: i }) : s[l] = i, d = (s, l) => {
6
- for (var i in l || (l = {}))
7
- Ne.call(l, i) && X(s, i, l[i]);
8
- if (K)
9
- for (var i of K(l))
10
- fe.call(l, i) && X(s, i, l[i]);
11
- return s;
12
- }, c = (s, l) => he(s, ge(l));
13
- import { jsxs as o, jsx as e } from "react/jsx-runtime";
14
- import { memo as g, useContext as Ce, useState as Le } from "react";
15
- import p from "./InputProgress/index.mjs";
16
- import ye from "./SessionRefer/index.mjs";
17
- import ve from "./SessionAction/index.mjs";
18
- import { IHistoryRole as Y, IThinkingStatus as Z } from "@glodon-aiot/apis";
19
- import Re from "./FileItem/index.mjs";
20
- import { Popover as Se, Space as $, Button as ee, Row as be, Col as Ee, Collapse as ne, Divider as ke, message as R } from "antd";
21
- import Te from "./SearchReference/index.mjs";
1
+ import { jsxs as r, jsx as e } from "react/jsx-runtime";
2
+ import { memo as u, useContext as re, useState as ae } from "react";
3
+ import d from "./InputProgress/index.mjs";
4
+ import oe from "./SessionRefer/index.mjs";
5
+ import de from "./SessionAction/index.mjs";
6
+ import { IHistoryRole as H, IThinkingStatus as D } from "@glodon-aiot/apis";
7
+ import ce from "./FileItem/index.mjs";
8
+ import { Popover as pe, Space as V, Button as W, Row as me, Col as ue, Collapse as G, Divider as he, message as y } from "antd";
9
+ import ge from "./SearchReference/index.mjs";
22
10
  /* empty css */import "../../../packages/react-components/dist/es/index.mjs";
23
- import Ae from "classnames";
24
- import m from "../../../components/Iconfont/index.mjs";
25
- import { CheckOutlined as te, CloseOutlined as le, LoadingOutlined as Oe } from "@ant-design/icons";
26
- import u from "../../../components/JsonDisplay/index.mjs";
27
- import xe from "../../../context.mjs";
28
- import Fe from "./SessionRelated/index.mjs";
29
- import _e from "copy-to-clipboard";
30
- import { escapeSlash as Ie } from "../../../utils/index.mjs";
31
- import Ue from "../../../assets/think.svg.mjs";
32
- import { Markdown as ze } from "../../../packages/react-components/dist/es/components/Markdown/index.mjs";
33
- const je = (s) => {
34
- if (!s)
35
- return s;
11
+ import Ne from "classnames";
12
+ import c from "../../../components/Iconfont/index.mjs";
13
+ import { CheckOutlined as K, CloseOutlined as X, LoadingOutlined as fe } from "@ant-design/icons";
14
+ import p from "../../../components/JsonDisplay/index.mjs";
15
+ import Le from "../../../context.mjs";
16
+ import ye from "./SessionRelated/index.mjs";
17
+ import Ce from "copy-to-clipboard";
18
+ import { escapeSlash as ve } from "../../../utils/index.mjs";
19
+ import Re from "../../../assets/think.svg.mjs";
20
+ import { Markdown as Se } from "../../../packages/react-components/dist/es/components/Markdown/index.mjs";
21
+ const be = (o) => {
22
+ if (!o)
23
+ return o;
36
24
  try {
37
- return JSON.parse(s);
25
+ return JSON.parse(o);
38
26
  } catch (l) {
39
- return s;
27
+ return o;
40
28
  }
41
- }, Be = g(Te), ie = g(ye), S = g(ze), we = g(Re), h = (s) => {
42
- if (!s)
29
+ }, Ee = u(ge), Y = u(oe), C = u(Se), ke = u(ce), m = (o) => {
30
+ if (!o)
43
31
  return !1;
44
32
  try {
45
- const l = JSON.parse(s);
33
+ const l = JSON.parse(o);
46
34
  return !(l != null && l.code && (l.code < 200 || l.code > 300));
47
35
  } catch (l) {
48
36
  return !0;
49
37
  }
50
- }, se = (s) => {
38
+ }, Z = (o) => {
51
39
  var n;
52
- const l = JSON.parse(JSON.stringify(s)) || [], i = (n = l == null ? void 0 : l.pop()) == null ? void 0 : n.pop();
53
- return i ? (i == null ? void 0 : i.type) === "BEFORE_CALL" || (i == null ? void 0 : i.type) === "FUNCTION_CALL" : !1;
54
- }, dn = (s) => {
55
- var T, A, O, x, F, _, I, U, z, j;
40
+ const l = JSON.parse(JSON.stringify(o)) || [], a = (n = l == null ? void 0 : l.pop()) == null ? void 0 : n.pop();
41
+ return a ? (a == null ? void 0 : a.type) === "BEFORE_CALL" || (a == null ? void 0 : a.type) === "FUNCTION_CALL" : !1;
42
+ }, Ke = (o) => {
43
+ var b, E, k, T, A, O, x, F, _, I;
56
44
  const {
57
45
  application: l,
58
- currentSession: i,
46
+ currentSession: a,
59
47
  history: n,
60
- isLastHistory: N,
61
- onRelatedClick: re,
62
- onAgainClick: ae,
63
- isLoading: Me,
64
- docViewerUrl: f,
65
- onEditClick: C,
66
- actions: oe = !0,
67
- markdown: L
68
- } = s, {
69
- debug: b,
70
- transform: r,
71
- popupContainer: y
72
- } = Ce(xe), E = n.role === Y.User, k = n.role === Y.Robot, {
73
- Panel: de
74
- } = ne, [v, ce] = Le(!0), pe = () => {
75
- R.config({
76
- getContainer: () => (y == null ? void 0 : y.current) || document.body
77
- }), _e(n.content), R.success("复制成功"), R.config({
48
+ isLastHistory: h,
49
+ onRelatedClick: $,
50
+ onAgainClick: ee,
51
+ isLoading: Te,
52
+ docViewerUrl: g,
53
+ onEditClick: N,
54
+ actions: ne = !0
55
+ } = o, {
56
+ debug: v,
57
+ transform: i,
58
+ popupContainer: f
59
+ } = re(Le), R = n.role === H.User, S = n.role === H.Robot, {
60
+ Panel: te
61
+ } = G, [L, ie] = ae(!0), le = () => {
62
+ y.config({
63
+ getContainer: () => (f == null ? void 0 : f.current) || document.body
64
+ }), Ce(n.content), y.success("复制成功"), y.config({
78
65
  getContainer: void 0
79
66
  });
80
67
  };
81
- return /* @__PURE__ */ o("div", {
82
- className: Ae({
68
+ return /* @__PURE__ */ r("div", {
69
+ className: Ne({
83
70
  "history-item": !0,
84
- "history-item__user": E,
85
- "history-item__bot": k
71
+ "history-item__user": R,
72
+ "history-item__bot": S
86
73
  }),
87
- children: [E && /* @__PURE__ */ o("div", {
74
+ children: [R && /* @__PURE__ */ r("div", {
88
75
  className: "history-item-user",
89
76
  children: [/* @__PURE__ */ e("div", {
90
77
  className: "item-user-panel",
91
- children: /* @__PURE__ */ e(Se, {
78
+ children: /* @__PURE__ */ e(pe, {
92
79
  placement: "topLeft",
93
80
  overlayStyle: {
94
81
  padding: 4
95
82
  },
96
83
  overlayClassName: "session-item-overlay-popover",
97
84
  getPopupContainer: (t) => t.parentNode,
98
- content: r != null && r.userEdit || r != null && r.userCopy ? /* @__PURE__ */ o($, {
85
+ content: i != null && i.userEdit || i != null && i.userCopy ? /* @__PURE__ */ r(V, {
99
86
  className: "item-user-popover",
100
87
  size: 4,
101
- children: [(r == null ? void 0 : r.userEdit) && /* @__PURE__ */ e("div", {
88
+ children: [(i == null ? void 0 : i.userEdit) && /* @__PURE__ */ e("div", {
102
89
  className: "user-pannel-item",
103
- onClick: () => C == null ? void 0 : C(n.content),
104
- children: /* @__PURE__ */ e(ee, {
90
+ onClick: () => N == null ? void 0 : N(n.content),
91
+ children: /* @__PURE__ */ e(W, {
105
92
  type: "link",
106
93
  size: "small",
107
- icon: /* @__PURE__ */ e(m, {
94
+ icon: /* @__PURE__ */ e(c, {
108
95
  type: "icon-bianji2"
109
96
  })
110
97
  })
111
- }), (r == null ? void 0 : r.userCopy) && /* @__PURE__ */ e("div", {
98
+ }), (i == null ? void 0 : i.userCopy) && /* @__PURE__ */ e("div", {
112
99
  className: "user-pannel-item",
113
- onClick: pe,
114
- children: /* @__PURE__ */ e(ee, {
100
+ onClick: le,
101
+ children: /* @__PURE__ */ e(W, {
115
102
  type: "link",
116
103
  size: "small",
117
- icon: /* @__PURE__ */ e(m, {
104
+ icon: /* @__PURE__ */ e(c, {
118
105
  type: "icon-fuzhi",
119
106
  style: {
120
107
  fontSize: "16px"
@@ -127,77 +114,76 @@ const je = (s) => {
127
114
  className: "user-panel-main",
128
115
  children: /* @__PURE__ */ e("span", {
129
116
  className: "item-user-content",
130
- children: /* @__PURE__ */ e(S, c(d({
131
- showLatex: !1
132
- }, L), {
133
- children: Ie(n.content)
134
- }))
117
+ children: /* @__PURE__ */ e(C, {
118
+ showLatex: !1,
119
+ children: ve(n.content)
120
+ })
135
121
  })
136
122
  })
137
123
  })
138
124
  }), /* @__PURE__ */ e("div", {
139
125
  className: "item-user-file",
140
- children: /* @__PURE__ */ e(be, {
126
+ children: /* @__PURE__ */ e(me, {
141
127
  gutter: [12, 12],
142
128
  justify: "end",
143
129
  wrap: !0,
144
- children: (T = n.files) == null ? void 0 : T.map((t) => /* @__PURE__ */ e(Ee, {
130
+ children: (b = n.files) == null ? void 0 : b.map((t) => /* @__PURE__ */ e(ue, {
145
131
  className: "user-file-col",
146
- children: /* @__PURE__ */ e(we, {
147
- docViewerUrl: f,
148
- currentSession: i,
132
+ children: /* @__PURE__ */ e(ke, {
133
+ docViewerUrl: g,
134
+ currentSession: a,
149
135
  file: t
150
136
  })
151
137
  }, t.id))
152
138
  })
153
139
  })]
154
- }), k && /* @__PURE__ */ e("div", {
140
+ }), S && /* @__PURE__ */ e("div", {
155
141
  className: "history-item-bot",
156
- children: /* @__PURE__ */ o("div", {
142
+ children: /* @__PURE__ */ r("div", {
157
143
  className: "bot-content-wrapper",
158
- children: [l.type === 2 && /* @__PURE__ */ o("div", {
144
+ children: [l.type === 2 && /* @__PURE__ */ r("div", {
159
145
  className: "item-bot-plugin",
160
- children: [/* @__PURE__ */ e(ne, {
146
+ children: [/* @__PURE__ */ e(G, {
161
147
  ghost: !0,
162
148
  expandIconPosition: "right",
163
- children: (A = n.actions) == null ? void 0 : A.map((t, me) => {
164
- var B, w, M, J, P, Q, q, H, D, V, W, G;
165
- return /* @__PURE__ */ o(de, {
166
- collapsible: b ? "header" : "icon",
167
- showArrow: b,
168
- header: /* @__PURE__ */ o($, {
149
+ children: (E = n.actions) == null ? void 0 : E.map((t, se) => {
150
+ var U, z, j, B, w, M, J, P, Q, q;
151
+ return /* @__PURE__ */ r(te, {
152
+ collapsible: v ? "header" : "icon",
153
+ showArrow: v,
154
+ header: /* @__PURE__ */ r(V, {
169
155
  size: 8,
170
156
  style: {
171
157
  width: "100%"
172
158
  },
173
- children: [/* @__PURE__ */ o("span", {
159
+ children: [/* @__PURE__ */ r("span", {
174
160
  className: "bot-plugin-status",
175
- children: [(t[t.length - 1].type === "RESULT" || t[t.length - 1].type === "AFTER_CALL") && h((B = t.find((a) => a.type === "RESULT")) == null ? void 0 : B.data.result) && /* @__PURE__ */ e("span", {
161
+ children: [(t[t.length - 1].type === "RESULT" || t[t.length - 1].type === "AFTER_CALL") && m((U = t.find((s) => s.type === "RESULT")) == null ? void 0 : U.data.result) && /* @__PURE__ */ e("span", {
176
162
  className: "plugin-status-success",
177
- children: /* @__PURE__ */ e(te, {})
163
+ children: /* @__PURE__ */ e(K, {})
178
164
  }), t[t.length - 1].type === "ABORT" && /* @__PURE__ */ e("span", {
179
165
  className: "plugin-status-error",
180
- children: /* @__PURE__ */ e(le, {})
181
- }), (t[t.length - 1].type === "RESULT" || t[t.length - 1].type === "AFTER_CALL") && !h((w = t.find((a) => a.type === "RESULT")) == null ? void 0 : w.data.result) && /* @__PURE__ */ e("span", {
166
+ children: /* @__PURE__ */ e(X, {})
167
+ }), (t[t.length - 1].type === "RESULT" || t[t.length - 1].type === "AFTER_CALL") && !m((z = t.find((s) => s.type === "RESULT")) == null ? void 0 : z.data.result) && /* @__PURE__ */ e("span", {
182
168
  className: "plugin-status-error",
183
- children: /* @__PURE__ */ e(le, {})
169
+ children: /* @__PURE__ */ e(X, {})
184
170
  }), (t[t.length - 1].type === "BEFORE_CALL" || t[t.length - 1].type === "FUNCTION_CALL") && /* @__PURE__ */ e("span", {
185
171
  className: "plugin-status-loading",
186
- children: /* @__PURE__ */ e(Oe, {})
172
+ children: /* @__PURE__ */ e(fe, {})
187
173
  })]
188
174
  }), /* @__PURE__ */ e("span", {
189
175
  className: "bot-plugin-title",
190
- children: ((M = t[t.length - 1].data) == null ? void 0 : M.pluginName) || ((J = t[t.length - 1].data) == null ? void 0 : J.pluginCode)
176
+ children: (j = t[t.length - 1].data) == null ? void 0 : j.pluginName
191
177
  }), /* @__PURE__ */ e("span", {
192
178
  className: "bot-plugin-action",
193
- children: ((P = t[t.length - 1].data) == null ? void 0 : P.funcName) || ((Q = t[t.length - 1].data) == null ? void 0 : Q.funcCode)
179
+ children: (B = t[t.length - 1].data) == null ? void 0 : B.funcName
194
180
  }), (t[t.length - 1].type === "BEFORE_CALL" || t[t.length - 1].type === "FUNCTION_CALL") && /* @__PURE__ */ e("span", {
195
181
  className: "bot-plugin-result",
196
182
  children: "执行中"
197
- }), (t[t.length - 1].type === "RESULT" || t[t.length - 1].type === "AFTER_CALL") && h((q = t.find((a) => a.type === "RESULT")) == null ? void 0 : q.data.result) && /* @__PURE__ */ e("span", {
183
+ }), (t[t.length - 1].type === "RESULT" || t[t.length - 1].type === "AFTER_CALL") && m((w = t.find((s) => s.type === "RESULT")) == null ? void 0 : w.data.result) && /* @__PURE__ */ e("span", {
198
184
  className: "bot-plugin-result",
199
185
  children: "执行成功"
200
- }), (t[t.length - 1].type === "RESULT" || t[t.length - 1].type === "AFTER_CALL") && !h((H = t.find((a) => a.type === "RESULT")) == null ? void 0 : H.data.result) && /* @__PURE__ */ e("span", {
186
+ }), (t[t.length - 1].type === "RESULT" || t[t.length - 1].type === "AFTER_CALL") && !m((M = t.find((s) => s.type === "RESULT")) == null ? void 0 : M.data.result) && /* @__PURE__ */ e("span", {
201
187
  className: "bot-plugin-result",
202
188
  children: "执行失败"
203
189
  }), t[t.length - 1].type === "ABORT" && /* @__PURE__ */ e("span", {
@@ -210,112 +196,112 @@ const je = (s) => {
210
196
  children: "thought"
211
197
  }), /* @__PURE__ */ e("div", {
212
198
  className: "bot-plugin-json",
213
- children: /* @__PURE__ */ e(u, {
214
- josn: (D = t.find((a) => a.type === "BEFORE_CALL")) == null ? void 0 : D.data.thought
199
+ children: /* @__PURE__ */ e(p, {
200
+ josn: (J = t.find((s) => s.type === "BEFORE_CALL")) == null ? void 0 : J.data.thought
215
201
  })
216
202
  }), /* @__PURE__ */ e("div", {
217
203
  className: "bot-plugin-content",
218
204
  children: "parameters"
219
205
  }), /* @__PURE__ */ e("div", {
220
206
  className: "bot-plugin-json",
221
- children: /* @__PURE__ */ e(u, {
222
- josn: (V = t.find((a) => a.type === "BEFORE_CALL")) == null ? void 0 : V.data.parameters
207
+ children: /* @__PURE__ */ e(p, {
208
+ josn: (P = t.find((s) => s.type === "BEFORE_CALL")) == null ? void 0 : P.data.parameters
223
209
  })
224
210
  }), /* @__PURE__ */ e("div", {
225
211
  className: "bot-plugin-content",
226
212
  children: "requestBody"
227
213
  }), /* @__PURE__ */ e("div", {
228
214
  className: "bot-plugin-json",
229
- children: /* @__PURE__ */ e(u, {
230
- josn: (W = t.find((a) => a.type === "BEFORE_CALL")) == null ? void 0 : W.data.requestBody
215
+ children: /* @__PURE__ */ e(p, {
216
+ josn: (Q = t.find((s) => s.type === "BEFORE_CALL")) == null ? void 0 : Q.data.requestBody
231
217
  })
232
218
  }), /* @__PURE__ */ e("div", {
233
219
  className: "bot-plugin-content",
234
220
  children: "Response"
235
221
  }), /* @__PURE__ */ e("div", {
236
222
  className: "bot-plugin-json",
237
- children: /* @__PURE__ */ e(u, {
238
- josn: je((G = t.find((a) => a.type === "RESULT")) == null ? void 0 : G.data.result)
223
+ children: /* @__PURE__ */ e(p, {
224
+ josn: be((q = t.find((s) => s.type === "RESULT")) == null ? void 0 : q.data.result)
239
225
  })
240
226
  })]
241
- }, me);
227
+ }, se);
242
228
  })
243
229
  }), n.isLoading && /* @__PURE__ */ e("div", {
244
230
  className: "history-input-progress",
245
231
  style: {
246
232
  padding: "4px 0"
247
233
  },
248
- children: se(n.actions) ? null : /* @__PURE__ */ e(p, {
234
+ children: Z(n.actions) ? null : /* @__PURE__ */ e(d, {
249
235
  size: 4,
250
236
  text: "思考中"
251
237
  })
252
238
  })]
253
- }), !!((O = n.searchReference) != null && O.length) && /* @__PURE__ */ e("div", {
239
+ }), !!((k = n.searchReference) != null && k.length) && /* @__PURE__ */ e("div", {
254
240
  className: "item-bot-net",
255
- children: /* @__PURE__ */ e(Be, {
241
+ children: /* @__PURE__ */ e(Ee, {
256
242
  history: n
257
243
  })
258
- }), (x = n == null ? void 0 : n.reference) != null && x.length && ((F = r == null ? void 0 : r.reference) != null && F.referenceFirst) ? /* @__PURE__ */ e(ie, {
244
+ }), (T = n == null ? void 0 : n.reference) != null && T.length && ((A = i == null ? void 0 : i.reference) != null && A.referenceFirst) ? /* @__PURE__ */ e(Y, {
259
245
  history: n,
260
- docViewerUrl: f
261
- }) : null, /* @__PURE__ */ o("div", {
246
+ docViewerUrl: g
247
+ }) : null, /* @__PURE__ */ r("div", {
262
248
  className: "item-bot-content",
263
- children: [(n == null ? void 0 : n.reasoningContent) && /* @__PURE__ */ o("div", {
249
+ children: [(n == null ? void 0 : n.reasoningContent) && /* @__PURE__ */ r("div", {
264
250
  className: "content-think",
265
- children: [(n == null ? void 0 : n.reasoningContent) && /* @__PURE__ */ o("div", {
251
+ children: [(n == null ? void 0 : n.reasoningContent) && /* @__PURE__ */ r("div", {
266
252
  className: "think-top",
267
253
  onClick: () => {
268
- ce(!v);
254
+ ie(!L);
269
255
  },
270
256
  children: [/* @__PURE__ */ e("img", {
271
- src: Ue,
257
+ src: Re,
272
258
  alt: ""
273
259
  }), (n == null ? void 0 : n.reasoningContent) && !(n != null && n.content) && /* @__PURE__ */ e("span", {
274
260
  children: "我正在推理思考…"
275
- }), (n == null ? void 0 : n.reasoningContent) && n.content && /* @__PURE__ */ o("span", {
261
+ }), (n == null ? void 0 : n.reasoningContent) && n.content && /* @__PURE__ */ r("span", {
276
262
  children: ["已完成推理(用时 ", (n == null ? void 0 : n.thinkingSecs) || 0, " 秒)"]
277
263
  }), /* @__PURE__ */ e("span", {
278
264
  className: "think-action",
279
- children: v ? /* @__PURE__ */ e(m, {
265
+ children: L ? /* @__PURE__ */ e(c, {
280
266
  type: "icon-zhankai",
281
267
  style: {
282
268
  fontSize: 16
283
269
  }
284
- }) : /* @__PURE__ */ e(m, {
270
+ }) : /* @__PURE__ */ e(c, {
285
271
  type: "icon-shouqi",
286
272
  style: {
287
273
  fontSize: 16
288
274
  }
289
275
  })
290
276
  })]
291
- }), !!((_ = n == null ? void 0 : n.reasoningContent) != null && _.trim()) && v && /* @__PURE__ */ o("div", {
277
+ }), !!((O = n == null ? void 0 : n.reasoningContent) != null && O.trim()) && L && /* @__PURE__ */ r("div", {
292
278
  className: "think-bottom",
293
- children: [/* @__PURE__ */ o("div", {
279
+ children: [/* @__PURE__ */ r("div", {
294
280
  className: "bottom-left",
295
- children: [(n == null ? void 0 : n.thinkingStatus) === Z.Start && /* @__PURE__ */ e("div", {
281
+ children: [(n == null ? void 0 : n.thinkingStatus) === D.Start && /* @__PURE__ */ e("div", {
296
282
  className: "thinking"
297
- }), (n == null ? void 0 : n.thinkingStatus) === Z.End && /* @__PURE__ */ e("div", {
283
+ }), (n == null ? void 0 : n.thinkingStatus) === D.End && /* @__PURE__ */ e("div", {
298
284
  className: "thinked",
299
- children: /* @__PURE__ */ e(te, {})
285
+ children: /* @__PURE__ */ e(K, {})
300
286
  })]
301
287
  }), /* @__PURE__ */ e("div", {
302
288
  className: "bottom-right",
303
- children: /* @__PURE__ */ e(S, c(d({}, L), {
289
+ children: /* @__PURE__ */ e(C, {
304
290
  children: (n == null ? void 0 : n.reasoningContent) || ""
305
- }))
291
+ })
306
292
  })]
307
293
  })]
308
- }), /* @__PURE__ */ e(S, c(d({}, L), {
294
+ }), /* @__PURE__ */ e(C, {
309
295
  children: n.content
310
- }))]
311
- }), (I = n == null ? void 0 : n.reference) != null && I.length && !((U = r == null ? void 0 : r.reference) != null && U.referenceFirst) ? /* @__PURE__ */ e(ie, {
296
+ })]
297
+ }), (x = n == null ? void 0 : n.reference) != null && x.length && !((F = i == null ? void 0 : i.reference) != null && F.referenceFirst) ? /* @__PURE__ */ e(Y, {
312
298
  history: n,
313
- docViewerUrl: f
314
- }) : null, n.isRelatedQuestion && N ? /* @__PURE__ */ e("div", {
299
+ docViewerUrl: g
300
+ }) : null, n.isRelatedQuestion && h ? /* @__PURE__ */ e("div", {
315
301
  style: {
316
302
  paddingBottom: 12
317
303
  },
318
- children: /* @__PURE__ */ e(p, {
304
+ children: /* @__PURE__ */ e(d, {
319
305
  size: 4
320
306
  })
321
307
  }) : null, n.isRelateLoading && /* @__PURE__ */ e("div", {
@@ -323,23 +309,23 @@ const je = (s) => {
323
309
  style: {
324
310
  padding: "4px 0"
325
311
  },
326
- children: se(n.actions) ? null : /* @__PURE__ */ e(p, {
312
+ children: Z(n.actions) ? null : /* @__PURE__ */ e(d, {
327
313
  size: 4,
328
314
  text: "思考中"
329
315
  })
330
- }), l.arrange[0].recommendQuestionOpen && (r == null ? void 0 : r.relate) && N && !!((z = n.relatedQuesion) != null && z.length) && /* @__PURE__ */ e(Fe, {
316
+ }), l.arrange[0].recommendQuestionOpen && (i == null ? void 0 : i.relate) && h && !!((_ = n.relatedQuesion) != null && _.length) && /* @__PURE__ */ e(ye, {
331
317
  relatedQuesion: n.relatedQuesion,
332
- onRelatedClick: re
333
- }), oe && !n.isSensitive && !!n.messageId && /* @__PURE__ */ e(ve, {
318
+ onRelatedClick: $
319
+ }), ne && !n.isSensitive && !!n.messageId && /* @__PURE__ */ e(de, {
334
320
  appId: l.id,
335
321
  history: n,
336
- sessionId: (j = i == null ? void 0 : i.data) == null ? void 0 : j.id,
337
- onAgainClick: ae,
338
- isLastHistory: N,
339
- currentSession: i
322
+ sessionId: (I = a == null ? void 0 : a.data) == null ? void 0 : I.id,
323
+ onAgainClick: ee,
324
+ isLastHistory: h,
325
+ currentSession: a
340
326
  })]
341
327
  })
342
- }), n.isContext && /* @__PURE__ */ o(ke, {
328
+ }), n.isContext && /* @__PURE__ */ r(he, {
343
329
  children: [/* @__PURE__ */ e("div", {
344
330
  style: {
345
331
  color: "#84868C",
@@ -349,7 +335,7 @@ const je = (s) => {
349
335
  }), " "]
350
336
  }), n.isWaiting && /* @__PURE__ */ e("div", {
351
337
  className: "history-input-progress",
352
- children: /* @__PURE__ */ e(p, {
338
+ children: /* @__PURE__ */ e(d, {
353
339
  size: 4,
354
340
  text: "思考中"
355
341
  })
@@ -357,6 +343,6 @@ const je = (s) => {
357
343
  });
358
344
  };
359
345
  export {
360
- dn as default,
361
- h as isResultExec
346
+ Ke as default,
347
+ m as isResultExec
362
348
  };