@glodon-aiot/agent-cli-ui 3.3.2-beta.2 → 3.3.2-beta.3
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/Dialog/AgentChat/HistoryItem/index.mjs +161 -147
- package/dist/es/Dialog/AgentChat/index.mjs +41 -39
- package/dist/es/packages/react-components/dist/es/components/Markdown/ATag/index.mjs +27 -25
- package/dist/es/packages/react-components/dist/es/components/Markdown/Image/index.mjs +29 -27
- package/dist/es/packages/react-components/dist/es/components/Markdown/index.mjs +58 -47
- 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/style22.css +1 -1
- package/dist/es/src/style23.css +1 -1
- package/dist/es/src/style24.css +1 -1
- package/dist/es/src/style25.css +1 -1
- package/dist/es/src/style26.css +1 -1
- package/dist/es/src/style27.css +1 -1
- package/dist/es/src/style28.css +1 -1
- package/dist/es/src/style7.css +1 -1
- package/dist/es/src/style8.css +1 -1
- package/dist/es/src/style9.css +1 -1
- package/dist/lib/index.js +50 -50
- package/dist/src/Dialog/AgentChat/HistoryItem/index.d.ts +2 -0
- package/dist/src/types.d.ts +2 -0
- package/package.json +3 -3
|
@@ -1,107 +1,120 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
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";
|
|
10
22
|
/* empty css */import "../../../packages/react-components/dist/es/index.mjs";
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
import { CheckOutlined as
|
|
14
|
-
import
|
|
15
|
-
import
|
|
16
|
-
import
|
|
17
|
-
import
|
|
18
|
-
import { escapeSlash as
|
|
19
|
-
import
|
|
20
|
-
import { Markdown as
|
|
21
|
-
const
|
|
22
|
-
if (!
|
|
23
|
-
return
|
|
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;
|
|
24
36
|
try {
|
|
25
|
-
return JSON.parse(
|
|
26
|
-
} catch (
|
|
27
|
-
return
|
|
37
|
+
return JSON.parse(s);
|
|
38
|
+
} catch (l) {
|
|
39
|
+
return s;
|
|
28
40
|
}
|
|
29
|
-
},
|
|
30
|
-
if (!
|
|
41
|
+
}, Be = g(Te), ie = g(ye), S = g(ze), we = g(Re), h = (s) => {
|
|
42
|
+
if (!s)
|
|
31
43
|
return !1;
|
|
32
44
|
try {
|
|
33
|
-
const
|
|
34
|
-
return !(
|
|
35
|
-
} catch (
|
|
45
|
+
const l = JSON.parse(s);
|
|
46
|
+
return !(l != null && l.code && (l.code < 200 || l.code > 300));
|
|
47
|
+
} catch (l) {
|
|
36
48
|
return !0;
|
|
37
49
|
}
|
|
38
|
-
},
|
|
50
|
+
}, se = (s) => {
|
|
39
51
|
var n;
|
|
40
|
-
const
|
|
41
|
-
return
|
|
42
|
-
},
|
|
43
|
-
var
|
|
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;
|
|
44
56
|
const {
|
|
45
|
-
application:
|
|
46
|
-
currentSession:
|
|
57
|
+
application: l,
|
|
58
|
+
currentSession: i,
|
|
47
59
|
history: n,
|
|
48
|
-
isLastHistory:
|
|
49
|
-
onRelatedClick:
|
|
50
|
-
onAgainClick:
|
|
51
|
-
isLoading:
|
|
52
|
-
docViewerUrl:
|
|
53
|
-
onEditClick:
|
|
54
|
-
actions:
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
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({
|
|
65
78
|
getContainer: void 0
|
|
66
79
|
});
|
|
67
80
|
};
|
|
68
|
-
return /* @__PURE__ */
|
|
69
|
-
className:
|
|
81
|
+
return /* @__PURE__ */ o("div", {
|
|
82
|
+
className: Ae({
|
|
70
83
|
"history-item": !0,
|
|
71
|
-
"history-item__user":
|
|
72
|
-
"history-item__bot":
|
|
84
|
+
"history-item__user": E,
|
|
85
|
+
"history-item__bot": k
|
|
73
86
|
}),
|
|
74
|
-
children: [
|
|
87
|
+
children: [E && /* @__PURE__ */ o("div", {
|
|
75
88
|
className: "history-item-user",
|
|
76
89
|
children: [/* @__PURE__ */ e("div", {
|
|
77
90
|
className: "item-user-panel",
|
|
78
|
-
children: /* @__PURE__ */ e(
|
|
91
|
+
children: /* @__PURE__ */ e(Se, {
|
|
79
92
|
placement: "topLeft",
|
|
80
93
|
overlayStyle: {
|
|
81
94
|
padding: 4
|
|
82
95
|
},
|
|
83
96
|
overlayClassName: "session-item-overlay-popover",
|
|
84
97
|
getPopupContainer: (t) => t.parentNode,
|
|
85
|
-
content:
|
|
98
|
+
content: r != null && r.userEdit || r != null && r.userCopy ? /* @__PURE__ */ o($, {
|
|
86
99
|
className: "item-user-popover",
|
|
87
100
|
size: 4,
|
|
88
|
-
children: [(
|
|
101
|
+
children: [(r == null ? void 0 : r.userEdit) && /* @__PURE__ */ e("div", {
|
|
89
102
|
className: "user-pannel-item",
|
|
90
|
-
onClick: () =>
|
|
91
|
-
children: /* @__PURE__ */ e(
|
|
103
|
+
onClick: () => C == null ? void 0 : C(n.content),
|
|
104
|
+
children: /* @__PURE__ */ e(ee, {
|
|
92
105
|
type: "link",
|
|
93
106
|
size: "small",
|
|
94
|
-
icon: /* @__PURE__ */ e(
|
|
107
|
+
icon: /* @__PURE__ */ e(m, {
|
|
95
108
|
type: "icon-bianji2"
|
|
96
109
|
})
|
|
97
110
|
})
|
|
98
|
-
}), (
|
|
111
|
+
}), (r == null ? void 0 : r.userCopy) && /* @__PURE__ */ e("div", {
|
|
99
112
|
className: "user-pannel-item",
|
|
100
|
-
onClick:
|
|
101
|
-
children: /* @__PURE__ */ e(
|
|
113
|
+
onClick: pe,
|
|
114
|
+
children: /* @__PURE__ */ e(ee, {
|
|
102
115
|
type: "link",
|
|
103
116
|
size: "small",
|
|
104
|
-
icon: /* @__PURE__ */ e(
|
|
117
|
+
icon: /* @__PURE__ */ e(m, {
|
|
105
118
|
type: "icon-fuzhi",
|
|
106
119
|
style: {
|
|
107
120
|
fontSize: "16px"
|
|
@@ -114,76 +127,77 @@ const ke = (o) => {
|
|
|
114
127
|
className: "user-panel-main",
|
|
115
128
|
children: /* @__PURE__ */ e("span", {
|
|
116
129
|
className: "item-user-content",
|
|
117
|
-
children: /* @__PURE__ */ e(
|
|
118
|
-
showLatex: !1
|
|
119
|
-
|
|
120
|
-
|
|
130
|
+
children: /* @__PURE__ */ e(S, c(d({
|
|
131
|
+
showLatex: !1
|
|
132
|
+
}, L), {
|
|
133
|
+
children: Ie(n.content)
|
|
134
|
+
}))
|
|
121
135
|
})
|
|
122
136
|
})
|
|
123
137
|
})
|
|
124
138
|
}), /* @__PURE__ */ e("div", {
|
|
125
139
|
className: "item-user-file",
|
|
126
|
-
children: /* @__PURE__ */ e(
|
|
140
|
+
children: /* @__PURE__ */ e(be, {
|
|
127
141
|
gutter: [12, 12],
|
|
128
142
|
justify: "end",
|
|
129
143
|
wrap: !0,
|
|
130
|
-
children: (
|
|
144
|
+
children: (T = n.files) == null ? void 0 : T.map((t) => /* @__PURE__ */ e(Ee, {
|
|
131
145
|
className: "user-file-col",
|
|
132
|
-
children: /* @__PURE__ */ e(
|
|
133
|
-
docViewerUrl:
|
|
134
|
-
currentSession:
|
|
146
|
+
children: /* @__PURE__ */ e(we, {
|
|
147
|
+
docViewerUrl: f,
|
|
148
|
+
currentSession: i,
|
|
135
149
|
file: t
|
|
136
150
|
})
|
|
137
151
|
}, t.id))
|
|
138
152
|
})
|
|
139
153
|
})]
|
|
140
|
-
}),
|
|
154
|
+
}), k && /* @__PURE__ */ e("div", {
|
|
141
155
|
className: "history-item-bot",
|
|
142
|
-
children: /* @__PURE__ */
|
|
156
|
+
children: /* @__PURE__ */ o("div", {
|
|
143
157
|
className: "bot-content-wrapper",
|
|
144
|
-
children: [
|
|
158
|
+
children: [l.type === 2 && /* @__PURE__ */ o("div", {
|
|
145
159
|
className: "item-bot-plugin",
|
|
146
|
-
children: [/* @__PURE__ */ e(
|
|
160
|
+
children: [/* @__PURE__ */ e(ne, {
|
|
147
161
|
ghost: !0,
|
|
148
162
|
expandIconPosition: "right",
|
|
149
|
-
children: (
|
|
150
|
-
var
|
|
151
|
-
return /* @__PURE__ */
|
|
152
|
-
collapsible:
|
|
153
|
-
showArrow:
|
|
154
|
-
header: /* @__PURE__ */
|
|
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($, {
|
|
155
169
|
size: 8,
|
|
156
170
|
style: {
|
|
157
171
|
width: "100%"
|
|
158
172
|
},
|
|
159
|
-
children: [/* @__PURE__ */
|
|
173
|
+
children: [/* @__PURE__ */ o("span", {
|
|
160
174
|
className: "bot-plugin-status",
|
|
161
|
-
children: [(t[t.length - 1].type === "RESULT" || t[t.length - 1].type === "AFTER_CALL") &&
|
|
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", {
|
|
162
176
|
className: "plugin-status-success",
|
|
163
|
-
children: /* @__PURE__ */ e(
|
|
177
|
+
children: /* @__PURE__ */ e(te, {})
|
|
164
178
|
}), t[t.length - 1].type === "ABORT" && /* @__PURE__ */ e("span", {
|
|
165
179
|
className: "plugin-status-error",
|
|
166
|
-
children: /* @__PURE__ */ e(
|
|
167
|
-
}), (t[t.length - 1].type === "RESULT" || t[t.length - 1].type === "AFTER_CALL") && !
|
|
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", {
|
|
168
182
|
className: "plugin-status-error",
|
|
169
|
-
children: /* @__PURE__ */ e(
|
|
183
|
+
children: /* @__PURE__ */ e(le, {})
|
|
170
184
|
}), (t[t.length - 1].type === "BEFORE_CALL" || t[t.length - 1].type === "FUNCTION_CALL") && /* @__PURE__ */ e("span", {
|
|
171
185
|
className: "plugin-status-loading",
|
|
172
|
-
children: /* @__PURE__ */ e(
|
|
186
|
+
children: /* @__PURE__ */ e(Oe, {})
|
|
173
187
|
})]
|
|
174
188
|
}), /* @__PURE__ */ e("span", {
|
|
175
189
|
className: "bot-plugin-title",
|
|
176
|
-
children: ((
|
|
190
|
+
children: ((M = t[t.length - 1].data) == null ? void 0 : M.pluginName) || ((J = t[t.length - 1].data) == null ? void 0 : J.pluginCode)
|
|
177
191
|
}), /* @__PURE__ */ e("span", {
|
|
178
192
|
className: "bot-plugin-action",
|
|
179
|
-
children: ((
|
|
193
|
+
children: ((P = t[t.length - 1].data) == null ? void 0 : P.funcName) || ((Q = t[t.length - 1].data) == null ? void 0 : Q.funcCode)
|
|
180
194
|
}), (t[t.length - 1].type === "BEFORE_CALL" || t[t.length - 1].type === "FUNCTION_CALL") && /* @__PURE__ */ e("span", {
|
|
181
195
|
className: "bot-plugin-result",
|
|
182
196
|
children: "执行中"
|
|
183
|
-
}), (t[t.length - 1].type === "RESULT" || t[t.length - 1].type === "AFTER_CALL") &&
|
|
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", {
|
|
184
198
|
className: "bot-plugin-result",
|
|
185
199
|
children: "执行成功"
|
|
186
|
-
}), (t[t.length - 1].type === "RESULT" || t[t.length - 1].type === "AFTER_CALL") && !
|
|
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", {
|
|
187
201
|
className: "bot-plugin-result",
|
|
188
202
|
children: "执行失败"
|
|
189
203
|
}), t[t.length - 1].type === "ABORT" && /* @__PURE__ */ e("span", {
|
|
@@ -196,112 +210,112 @@ const ke = (o) => {
|
|
|
196
210
|
children: "thought"
|
|
197
211
|
}), /* @__PURE__ */ e("div", {
|
|
198
212
|
className: "bot-plugin-json",
|
|
199
|
-
children: /* @__PURE__ */ e(
|
|
200
|
-
josn: (
|
|
213
|
+
children: /* @__PURE__ */ e(u, {
|
|
214
|
+
josn: (D = t.find((a) => a.type === "BEFORE_CALL")) == null ? void 0 : D.data.thought
|
|
201
215
|
})
|
|
202
216
|
}), /* @__PURE__ */ e("div", {
|
|
203
217
|
className: "bot-plugin-content",
|
|
204
218
|
children: "parameters"
|
|
205
219
|
}), /* @__PURE__ */ e("div", {
|
|
206
220
|
className: "bot-plugin-json",
|
|
207
|
-
children: /* @__PURE__ */ e(
|
|
208
|
-
josn: (
|
|
221
|
+
children: /* @__PURE__ */ e(u, {
|
|
222
|
+
josn: (V = t.find((a) => a.type === "BEFORE_CALL")) == null ? void 0 : V.data.parameters
|
|
209
223
|
})
|
|
210
224
|
}), /* @__PURE__ */ e("div", {
|
|
211
225
|
className: "bot-plugin-content",
|
|
212
226
|
children: "requestBody"
|
|
213
227
|
}), /* @__PURE__ */ e("div", {
|
|
214
228
|
className: "bot-plugin-json",
|
|
215
|
-
children: /* @__PURE__ */ e(
|
|
216
|
-
josn: (
|
|
229
|
+
children: /* @__PURE__ */ e(u, {
|
|
230
|
+
josn: (W = t.find((a) => a.type === "BEFORE_CALL")) == null ? void 0 : W.data.requestBody
|
|
217
231
|
})
|
|
218
232
|
}), /* @__PURE__ */ e("div", {
|
|
219
233
|
className: "bot-plugin-content",
|
|
220
234
|
children: "Response"
|
|
221
235
|
}), /* @__PURE__ */ e("div", {
|
|
222
236
|
className: "bot-plugin-json",
|
|
223
|
-
children: /* @__PURE__ */ e(
|
|
224
|
-
josn:
|
|
237
|
+
children: /* @__PURE__ */ e(u, {
|
|
238
|
+
josn: je((G = t.find((a) => a.type === "RESULT")) == null ? void 0 : G.data.result)
|
|
225
239
|
})
|
|
226
240
|
})]
|
|
227
|
-
},
|
|
241
|
+
}, me);
|
|
228
242
|
})
|
|
229
243
|
}), n.isLoading && /* @__PURE__ */ e("div", {
|
|
230
244
|
className: "history-input-progress",
|
|
231
245
|
style: {
|
|
232
246
|
padding: "4px 0"
|
|
233
247
|
},
|
|
234
|
-
children:
|
|
248
|
+
children: se(n.actions) ? null : /* @__PURE__ */ e(p, {
|
|
235
249
|
size: 4,
|
|
236
250
|
text: "思考中"
|
|
237
251
|
})
|
|
238
252
|
})]
|
|
239
|
-
}), !!((
|
|
253
|
+
}), !!((O = n.searchReference) != null && O.length) && /* @__PURE__ */ e("div", {
|
|
240
254
|
className: "item-bot-net",
|
|
241
|
-
children: /* @__PURE__ */ e(
|
|
255
|
+
children: /* @__PURE__ */ e(Be, {
|
|
242
256
|
history: n
|
|
243
257
|
})
|
|
244
|
-
}), (
|
|
258
|
+
}), (x = n == null ? void 0 : n.reference) != null && x.length && ((F = r == null ? void 0 : r.reference) != null && F.referenceFirst) ? /* @__PURE__ */ e(ie, {
|
|
245
259
|
history: n,
|
|
246
|
-
docViewerUrl:
|
|
247
|
-
}) : null, /* @__PURE__ */
|
|
260
|
+
docViewerUrl: f
|
|
261
|
+
}) : null, /* @__PURE__ */ o("div", {
|
|
248
262
|
className: "item-bot-content",
|
|
249
|
-
children: [(n == null ? void 0 : n.reasoningContent) && /* @__PURE__ */
|
|
263
|
+
children: [(n == null ? void 0 : n.reasoningContent) && /* @__PURE__ */ o("div", {
|
|
250
264
|
className: "content-think",
|
|
251
|
-
children: [(n == null ? void 0 : n.reasoningContent) && /* @__PURE__ */
|
|
265
|
+
children: [(n == null ? void 0 : n.reasoningContent) && /* @__PURE__ */ o("div", {
|
|
252
266
|
className: "think-top",
|
|
253
267
|
onClick: () => {
|
|
254
|
-
|
|
268
|
+
ce(!v);
|
|
255
269
|
},
|
|
256
270
|
children: [/* @__PURE__ */ e("img", {
|
|
257
|
-
src:
|
|
271
|
+
src: Ue,
|
|
258
272
|
alt: ""
|
|
259
273
|
}), (n == null ? void 0 : n.reasoningContent) && !(n != null && n.content) && /* @__PURE__ */ e("span", {
|
|
260
274
|
children: "我正在推理思考…"
|
|
261
|
-
}), (n == null ? void 0 : n.reasoningContent) && n.content && /* @__PURE__ */
|
|
275
|
+
}), (n == null ? void 0 : n.reasoningContent) && n.content && /* @__PURE__ */ o("span", {
|
|
262
276
|
children: ["已完成推理(用时 ", (n == null ? void 0 : n.thinkingSecs) || 0, " 秒)"]
|
|
263
277
|
}), /* @__PURE__ */ e("span", {
|
|
264
278
|
className: "think-action",
|
|
265
|
-
children:
|
|
279
|
+
children: v ? /* @__PURE__ */ e(m, {
|
|
266
280
|
type: "icon-zhankai",
|
|
267
281
|
style: {
|
|
268
282
|
fontSize: 16
|
|
269
283
|
}
|
|
270
|
-
}) : /* @__PURE__ */ e(
|
|
284
|
+
}) : /* @__PURE__ */ e(m, {
|
|
271
285
|
type: "icon-shouqi",
|
|
272
286
|
style: {
|
|
273
287
|
fontSize: 16
|
|
274
288
|
}
|
|
275
289
|
})
|
|
276
290
|
})]
|
|
277
|
-
}), !!((
|
|
291
|
+
}), !!((_ = n == null ? void 0 : n.reasoningContent) != null && _.trim()) && v && /* @__PURE__ */ o("div", {
|
|
278
292
|
className: "think-bottom",
|
|
279
|
-
children: [/* @__PURE__ */
|
|
293
|
+
children: [/* @__PURE__ */ o("div", {
|
|
280
294
|
className: "bottom-left",
|
|
281
|
-
children: [(n == null ? void 0 : n.thinkingStatus) ===
|
|
295
|
+
children: [(n == null ? void 0 : n.thinkingStatus) === Z.Start && /* @__PURE__ */ e("div", {
|
|
282
296
|
className: "thinking"
|
|
283
|
-
}), (n == null ? void 0 : n.thinkingStatus) ===
|
|
297
|
+
}), (n == null ? void 0 : n.thinkingStatus) === Z.End && /* @__PURE__ */ e("div", {
|
|
284
298
|
className: "thinked",
|
|
285
|
-
children: /* @__PURE__ */ e(
|
|
299
|
+
children: /* @__PURE__ */ e(te, {})
|
|
286
300
|
})]
|
|
287
301
|
}), /* @__PURE__ */ e("div", {
|
|
288
302
|
className: "bottom-right",
|
|
289
|
-
children: /* @__PURE__ */ e(
|
|
303
|
+
children: /* @__PURE__ */ e(S, c(d({}, L), {
|
|
290
304
|
children: (n == null ? void 0 : n.reasoningContent) || ""
|
|
291
|
-
})
|
|
305
|
+
}))
|
|
292
306
|
})]
|
|
293
307
|
})]
|
|
294
|
-
}), /* @__PURE__ */ e(
|
|
308
|
+
}), /* @__PURE__ */ e(S, c(d({}, L), {
|
|
295
309
|
children: n.content
|
|
296
|
-
})]
|
|
297
|
-
}), (
|
|
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, {
|
|
298
312
|
history: n,
|
|
299
|
-
docViewerUrl:
|
|
300
|
-
}) : null, n.isRelatedQuestion &&
|
|
313
|
+
docViewerUrl: f
|
|
314
|
+
}) : null, n.isRelatedQuestion && N ? /* @__PURE__ */ e("div", {
|
|
301
315
|
style: {
|
|
302
316
|
paddingBottom: 12
|
|
303
317
|
},
|
|
304
|
-
children: /* @__PURE__ */ e(
|
|
318
|
+
children: /* @__PURE__ */ e(p, {
|
|
305
319
|
size: 4
|
|
306
320
|
})
|
|
307
321
|
}) : null, n.isRelateLoading && /* @__PURE__ */ e("div", {
|
|
@@ -309,23 +323,23 @@ const ke = (o) => {
|
|
|
309
323
|
style: {
|
|
310
324
|
padding: "4px 0"
|
|
311
325
|
},
|
|
312
|
-
children:
|
|
326
|
+
children: se(n.actions) ? null : /* @__PURE__ */ e(p, {
|
|
313
327
|
size: 4,
|
|
314
328
|
text: "思考中"
|
|
315
329
|
})
|
|
316
|
-
}),
|
|
330
|
+
}), l.arrange[0].recommendQuestionOpen && (r == null ? void 0 : r.relate) && N && !!((z = n.relatedQuesion) != null && z.length) && /* @__PURE__ */ e(Fe, {
|
|
317
331
|
relatedQuesion: n.relatedQuesion,
|
|
318
|
-
onRelatedClick:
|
|
319
|
-
}),
|
|
320
|
-
appId:
|
|
332
|
+
onRelatedClick: re
|
|
333
|
+
}), oe && !n.isSensitive && !!n.messageId && /* @__PURE__ */ e(ve, {
|
|
334
|
+
appId: l.id,
|
|
321
335
|
history: n,
|
|
322
|
-
sessionId: (
|
|
323
|
-
onAgainClick:
|
|
324
|
-
isLastHistory:
|
|
325
|
-
currentSession:
|
|
336
|
+
sessionId: (j = i == null ? void 0 : i.data) == null ? void 0 : j.id,
|
|
337
|
+
onAgainClick: ae,
|
|
338
|
+
isLastHistory: N,
|
|
339
|
+
currentSession: i
|
|
326
340
|
})]
|
|
327
341
|
})
|
|
328
|
-
}), n.isContext && /* @__PURE__ */
|
|
342
|
+
}), n.isContext && /* @__PURE__ */ o(ke, {
|
|
329
343
|
children: [/* @__PURE__ */ e("div", {
|
|
330
344
|
style: {
|
|
331
345
|
color: "#84868C",
|
|
@@ -335,7 +349,7 @@ const ke = (o) => {
|
|
|
335
349
|
}), " "]
|
|
336
350
|
}), n.isWaiting && /* @__PURE__ */ e("div", {
|
|
337
351
|
className: "history-input-progress",
|
|
338
|
-
children: /* @__PURE__ */ e(
|
|
352
|
+
children: /* @__PURE__ */ e(p, {
|
|
339
353
|
size: 4,
|
|
340
354
|
text: "思考中"
|
|
341
355
|
})
|
|
@@ -343,6 +357,6 @@ const ke = (o) => {
|
|
|
343
357
|
});
|
|
344
358
|
};
|
|
345
359
|
export {
|
|
346
|
-
|
|
347
|
-
|
|
360
|
+
dn as default,
|
|
361
|
+
h as isResultExec
|
|
348
362
|
};
|