@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.
- package/dist/es/AgentClientUI.mjs +32 -34
- package/dist/es/Dialog/AgentChat/HistoryItem/index.mjs +142 -156
- package/dist/es/Dialog/AgentChat/index.mjs +147 -150
- package/dist/es/index.mjs +95 -101
- package/dist/es/packages/react-components/dist/es/components/Markdown/ATag/index.mjs +25 -27
- package/dist/es/packages/react-components/dist/es/components/Markdown/Image/index.mjs +27 -29
- package/dist/es/packages/react-components/dist/es/components/Markdown/index.mjs +48 -58
- package/dist/es/packages/react-components/dist/es/index.mjs +1 -1
- package/dist/es/src/style10.css +1 -1
- package/dist/es/src/style11.css +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/style19.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/style23.css +1 -1
- package/dist/es/src/style24.css +1 -1
- package/dist/es/src/style3.css +1 -1
- package/dist/es/src/style4.css +1 -1
- package/dist/es/src/style5.css +1 -1
- package/dist/es/src/style6.css +1 -1
- package/dist/es/src/style7.css +1 -1
- package/dist/es/src/style9.css +1 -1
- package/dist/lib/index.js +51 -51
- package/dist/src/Dialog/AgentChat/HistoryItem/index.d.ts +0 -2
- package/dist/src/ReactTextGenerationUI/components/TextSiders/index.d.ts +22 -0
- package/dist/src/ReactTextGenerationUI/components/fetchEventSource/fetch.d.ts +44 -0
- package/dist/src/ReactTextGenerationUI/components/fetchEventSource/index.d.ts +1 -0
- package/dist/src/ReactTextGenerationUI/components/fetchEventSource/parse.d.ts +36 -0
- package/dist/src/ReactTextGenerationUI/components/fetchEventSourcea/fetch.d.ts +44 -0
- package/dist/src/ReactTextGenerationUI/components/fetchEventSourcea/index.d.ts +1 -0
- package/dist/src/ReactTextGenerationUI/components/fetchEventSourcea/parse.d.ts +36 -0
- package/dist/src/ReactTextGenerationUI/index.d.ts +4 -0
- package/dist/src/index.d.ts +0 -1
- package/dist/src/types.d.ts +0 -3
- package/dist/src/utils/reactCompatibility.d.ts +27 -0
- package/package.json +3 -3
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
1
|
+
var Y = Object.defineProperty, Z = Object.defineProperties;
|
|
2
|
+
var _ = Object.getOwnPropertyDescriptors;
|
|
3
3
|
var N = Object.getOwnPropertySymbols;
|
|
4
|
-
var
|
|
5
|
-
var y = (n, e, o) => e in n ?
|
|
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
|
-
|
|
7
|
+
B.call(e, o) && y(n, o, e[o]);
|
|
8
8
|
if (N)
|
|
9
9
|
for (var o of N(e))
|
|
10
|
-
|
|
10
|
+
z.call(e, o) && y(n, o, e[o]);
|
|
11
11
|
return n;
|
|
12
|
-
}, m = (n, 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
|
|
15
|
-
/* empty css */import { AgentClientProvider as
|
|
16
|
-
import { Resizable as
|
|
17
|
-
import
|
|
18
|
-
import { configure as
|
|
19
|
-
import { JWT as
|
|
20
|
-
import { ConfigProvider as R, Spin as
|
|
21
|
-
import
|
|
22
|
-
const
|
|
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
|
-
|
|
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 =
|
|
54
|
-
|
|
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
|
|
58
|
+
const w = new se(a, {
|
|
60
59
|
plugins: j,
|
|
61
|
-
mcp: H
|
|
62
|
-
stream: K
|
|
60
|
+
mcp: H
|
|
63
61
|
});
|
|
64
|
-
|
|
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
|
|
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:
|
|
81
|
-
children: /* @__PURE__ */ x(
|
|
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(
|
|
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:
|
|
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: [
|
|
114
|
+
children: [K ? /* @__PURE__ */ s("div", {
|
|
117
115
|
className: "loading",
|
|
118
|
-
children: /* @__PURE__ */ s(
|
|
119
|
-
}) : f && p ? /* @__PURE__ */ s(
|
|
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
|
-
|
|
142
|
+
Ne as default
|
|
145
143
|
};
|
|
@@ -1,120 +1,107 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
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
|
|
24
|
-
import
|
|
25
|
-
import { CheckOutlined as
|
|
26
|
-
import
|
|
27
|
-
import
|
|
28
|
-
import
|
|
29
|
-
import
|
|
30
|
-
import { escapeSlash as
|
|
31
|
-
import
|
|
32
|
-
import { Markdown as
|
|
33
|
-
const
|
|
34
|
-
if (!
|
|
35
|
-
return
|
|
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(
|
|
25
|
+
return JSON.parse(o);
|
|
38
26
|
} catch (l) {
|
|
39
|
-
return
|
|
27
|
+
return o;
|
|
40
28
|
}
|
|
41
|
-
},
|
|
42
|
-
if (!
|
|
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(
|
|
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
|
-
},
|
|
38
|
+
}, Z = (o) => {
|
|
51
39
|
var n;
|
|
52
|
-
const l = JSON.parse(JSON.stringify(
|
|
53
|
-
return
|
|
54
|
-
},
|
|
55
|
-
var T, A, O, x, F, _, I
|
|
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:
|
|
46
|
+
currentSession: a,
|
|
59
47
|
history: n,
|
|
60
|
-
isLastHistory:
|
|
61
|
-
onRelatedClick:
|
|
62
|
-
onAgainClick:
|
|
63
|
-
isLoading:
|
|
64
|
-
docViewerUrl:
|
|
65
|
-
onEditClick:
|
|
66
|
-
actions:
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
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__ */
|
|
82
|
-
className:
|
|
68
|
+
return /* @__PURE__ */ r("div", {
|
|
69
|
+
className: Ne({
|
|
83
70
|
"history-item": !0,
|
|
84
|
-
"history-item__user":
|
|
85
|
-
"history-item__bot":
|
|
71
|
+
"history-item__user": R,
|
|
72
|
+
"history-item__bot": S
|
|
86
73
|
}),
|
|
87
|
-
children: [
|
|
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(
|
|
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:
|
|
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: [(
|
|
88
|
+
children: [(i == null ? void 0 : i.userEdit) && /* @__PURE__ */ e("div", {
|
|
102
89
|
className: "user-pannel-item",
|
|
103
|
-
onClick: () =>
|
|
104
|
-
children: /* @__PURE__ */ e(
|
|
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(
|
|
94
|
+
icon: /* @__PURE__ */ e(c, {
|
|
108
95
|
type: "icon-bianji2"
|
|
109
96
|
})
|
|
110
97
|
})
|
|
111
|
-
}), (
|
|
98
|
+
}), (i == null ? void 0 : i.userCopy) && /* @__PURE__ */ e("div", {
|
|
112
99
|
className: "user-pannel-item",
|
|
113
|
-
onClick:
|
|
114
|
-
children: /* @__PURE__ */ e(
|
|
100
|
+
onClick: le,
|
|
101
|
+
children: /* @__PURE__ */ e(W, {
|
|
115
102
|
type: "link",
|
|
116
103
|
size: "small",
|
|
117
|
-
icon: /* @__PURE__ */ e(
|
|
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(
|
|
131
|
-
showLatex: !1
|
|
132
|
-
|
|
133
|
-
|
|
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(
|
|
126
|
+
children: /* @__PURE__ */ e(me, {
|
|
141
127
|
gutter: [12, 12],
|
|
142
128
|
justify: "end",
|
|
143
129
|
wrap: !0,
|
|
144
|
-
children: (
|
|
130
|
+
children: (b = n.files) == null ? void 0 : b.map((t) => /* @__PURE__ */ e(ue, {
|
|
145
131
|
className: "user-file-col",
|
|
146
|
-
children: /* @__PURE__ */ e(
|
|
147
|
-
docViewerUrl:
|
|
148
|
-
currentSession:
|
|
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
|
-
}),
|
|
140
|
+
}), S && /* @__PURE__ */ e("div", {
|
|
155
141
|
className: "history-item-bot",
|
|
156
|
-
children: /* @__PURE__ */
|
|
142
|
+
children: /* @__PURE__ */ r("div", {
|
|
157
143
|
className: "bot-content-wrapper",
|
|
158
|
-
children: [l.type === 2 && /* @__PURE__ */
|
|
144
|
+
children: [l.type === 2 && /* @__PURE__ */ r("div", {
|
|
159
145
|
className: "item-bot-plugin",
|
|
160
|
-
children: [/* @__PURE__ */ e(
|
|
146
|
+
children: [/* @__PURE__ */ e(G, {
|
|
161
147
|
ghost: !0,
|
|
162
148
|
expandIconPosition: "right",
|
|
163
|
-
children: (
|
|
164
|
-
var B, w, M, J, P, Q, q
|
|
165
|
-
return /* @__PURE__ */
|
|
166
|
-
collapsible:
|
|
167
|
-
showArrow:
|
|
168
|
-
header: /* @__PURE__ */
|
|
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__ */
|
|
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") &&
|
|
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(
|
|
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(
|
|
181
|
-
}), (t[t.length - 1].type === "RESULT" || t[t.length - 1].type === "AFTER_CALL") && !
|
|
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(
|
|
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(
|
|
172
|
+
children: /* @__PURE__ */ e(fe, {})
|
|
187
173
|
})]
|
|
188
174
|
}), /* @__PURE__ */ e("span", {
|
|
189
175
|
className: "bot-plugin-title",
|
|
190
|
-
children: (
|
|
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: (
|
|
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") &&
|
|
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") && !
|
|
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(
|
|
214
|
-
josn: (
|
|
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(
|
|
222
|
-
josn: (
|
|
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(
|
|
230
|
-
josn: (
|
|
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(
|
|
238
|
-
josn:
|
|
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
|
-
},
|
|
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:
|
|
234
|
+
children: Z(n.actions) ? null : /* @__PURE__ */ e(d, {
|
|
249
235
|
size: 4,
|
|
250
236
|
text: "思考中"
|
|
251
237
|
})
|
|
252
238
|
})]
|
|
253
|
-
}), !!((
|
|
239
|
+
}), !!((k = n.searchReference) != null && k.length) && /* @__PURE__ */ e("div", {
|
|
254
240
|
className: "item-bot-net",
|
|
255
|
-
children: /* @__PURE__ */ e(
|
|
241
|
+
children: /* @__PURE__ */ e(Ee, {
|
|
256
242
|
history: n
|
|
257
243
|
})
|
|
258
|
-
}), (
|
|
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:
|
|
261
|
-
}) : null, /* @__PURE__ */
|
|
246
|
+
docViewerUrl: g
|
|
247
|
+
}) : null, /* @__PURE__ */ r("div", {
|
|
262
248
|
className: "item-bot-content",
|
|
263
|
-
children: [(n == null ? void 0 : n.reasoningContent) && /* @__PURE__ */
|
|
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__ */
|
|
251
|
+
children: [(n == null ? void 0 : n.reasoningContent) && /* @__PURE__ */ r("div", {
|
|
266
252
|
className: "think-top",
|
|
267
253
|
onClick: () => {
|
|
268
|
-
|
|
254
|
+
ie(!L);
|
|
269
255
|
},
|
|
270
256
|
children: [/* @__PURE__ */ e("img", {
|
|
271
|
-
src:
|
|
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__ */
|
|
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:
|
|
265
|
+
children: L ? /* @__PURE__ */ e(c, {
|
|
280
266
|
type: "icon-zhankai",
|
|
281
267
|
style: {
|
|
282
268
|
fontSize: 16
|
|
283
269
|
}
|
|
284
|
-
}) : /* @__PURE__ */ e(
|
|
270
|
+
}) : /* @__PURE__ */ e(c, {
|
|
285
271
|
type: "icon-shouqi",
|
|
286
272
|
style: {
|
|
287
273
|
fontSize: 16
|
|
288
274
|
}
|
|
289
275
|
})
|
|
290
276
|
})]
|
|
291
|
-
}), !!((
|
|
277
|
+
}), !!((O = n == null ? void 0 : n.reasoningContent) != null && O.trim()) && L && /* @__PURE__ */ r("div", {
|
|
292
278
|
className: "think-bottom",
|
|
293
|
-
children: [/* @__PURE__ */
|
|
279
|
+
children: [/* @__PURE__ */ r("div", {
|
|
294
280
|
className: "bottom-left",
|
|
295
|
-
children: [(n == null ? void 0 : n.thinkingStatus) ===
|
|
281
|
+
children: [(n == null ? void 0 : n.thinkingStatus) === D.Start && /* @__PURE__ */ e("div", {
|
|
296
282
|
className: "thinking"
|
|
297
|
-
}), (n == null ? void 0 : n.thinkingStatus) ===
|
|
283
|
+
}), (n == null ? void 0 : n.thinkingStatus) === D.End && /* @__PURE__ */ e("div", {
|
|
298
284
|
className: "thinked",
|
|
299
|
-
children: /* @__PURE__ */ e(
|
|
285
|
+
children: /* @__PURE__ */ e(K, {})
|
|
300
286
|
})]
|
|
301
287
|
}), /* @__PURE__ */ e("div", {
|
|
302
288
|
className: "bottom-right",
|
|
303
|
-
children: /* @__PURE__ */ e(
|
|
289
|
+
children: /* @__PURE__ */ e(C, {
|
|
304
290
|
children: (n == null ? void 0 : n.reasoningContent) || ""
|
|
305
|
-
})
|
|
291
|
+
})
|
|
306
292
|
})]
|
|
307
293
|
})]
|
|
308
|
-
}), /* @__PURE__ */ e(
|
|
294
|
+
}), /* @__PURE__ */ e(C, {
|
|
309
295
|
children: n.content
|
|
310
|
-
})
|
|
311
|
-
}), (
|
|
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:
|
|
314
|
-
}) : null, n.isRelatedQuestion &&
|
|
299
|
+
docViewerUrl: g
|
|
300
|
+
}) : null, n.isRelatedQuestion && h ? /* @__PURE__ */ e("div", {
|
|
315
301
|
style: {
|
|
316
302
|
paddingBottom: 12
|
|
317
303
|
},
|
|
318
|
-
children: /* @__PURE__ */ e(
|
|
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:
|
|
312
|
+
children: Z(n.actions) ? null : /* @__PURE__ */ e(d, {
|
|
327
313
|
size: 4,
|
|
328
314
|
text: "思考中"
|
|
329
315
|
})
|
|
330
|
-
}), l.arrange[0].recommendQuestionOpen && (
|
|
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:
|
|
333
|
-
}),
|
|
318
|
+
onRelatedClick: $
|
|
319
|
+
}), ne && !n.isSensitive && !!n.messageId && /* @__PURE__ */ e(de, {
|
|
334
320
|
appId: l.id,
|
|
335
321
|
history: n,
|
|
336
|
-
sessionId: (
|
|
337
|
-
onAgainClick:
|
|
338
|
-
isLastHistory:
|
|
339
|
-
currentSession:
|
|
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__ */
|
|
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(
|
|
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
|
-
|
|
361
|
-
|
|
346
|
+
Ke as default,
|
|
347
|
+
m as isResultExec
|
|
362
348
|
};
|