@glodon-aiot/agent-cli-ui 3.3.7-beta.2 → 3.3.8-alpha.1
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 +107 -94
- package/dist/es/Dialog/AgentChat/HistoryItem/SessionRefer/index.mjs +46 -59
- package/dist/es/Dialog/AgentChat/HistoryItem/index.mjs +46 -47
- package/dist/es/Dialog/AgentChat/index.mjs +378 -376
- package/dist/es/Dialog/SessionList/index.mjs +115 -119
- package/dist/es/Dialog/index.mjs +26 -30
- package/dist/es/QuillEditor/index.mjs +59 -70
- package/dist/es/components/Recommend/index.mjs +34 -52
- package/dist/es/constant.mjs +3 -11
- package/dist/es/index.mjs +293 -285
- package/dist/es/packages/agent-cli-ui/package.json.mjs +23 -25
- package/dist/es/packages/react-components/dist/es/index.mjs +1 -1
- package/dist/es/src/style.css +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/style17.css +1 -1
- package/dist/es/src/style18.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/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/style8.css +1 -1
- package/dist/es/src/style9.css +1 -1
- package/dist/lib/index.css +1 -1
- package/dist/lib/index.js +54 -54
- package/dist/src/AgentClientUI.d.ts +1 -1
- package/dist/src/Dialog/AgentChat/HistoryItem/SessionRefer/index.d.ts +0 -2
- package/dist/src/Dialog/index.d.ts +1 -1
- package/dist/src/Footer/index.d.ts +1 -2
- package/dist/src/QuillEditor/index.d.ts +1 -1
- package/dist/src/components/Greeting/index.d.ts +1 -2
- package/dist/src/components/Header/index.d.ts +1 -2
- package/dist/src/components/Recommend/index.d.ts +0 -1
- package/dist/src/constant.d.ts +0 -4
- package/dist/src/index.d.ts +1 -5
- package/dist/src/types.d.ts +2 -3
- package/dist/src/utils/antdConfig.d.ts +7 -0
- package/dist/src/utils/testAntdPrefix.d.ts +3 -0
- package/package.json +11 -13
|
@@ -2,17 +2,17 @@ var ue = Object.defineProperty, he = Object.defineProperties;
|
|
|
2
2
|
var ge = Object.getOwnPropertyDescriptors;
|
|
3
3
|
var K = Object.getOwnPropertySymbols;
|
|
4
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,
|
|
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
6
|
for (var i in l || (l = {}))
|
|
7
7
|
Ne.call(l, i) && X(s, i, l[i]);
|
|
8
8
|
if (K)
|
|
9
9
|
for (var i of K(l))
|
|
10
10
|
fe.call(l, i) && X(s, i, l[i]);
|
|
11
11
|
return s;
|
|
12
|
-
},
|
|
12
|
+
}, c = (s, l) => he(s, ge(l));
|
|
13
13
|
import { jsxs as o, jsx as e } from "react/jsx-runtime";
|
|
14
|
-
import { memo as
|
|
15
|
-
import
|
|
14
|
+
import { memo as g, useContext as Ce, useState as Le } from "react";
|
|
15
|
+
import p from "./InputProgress/index.mjs";
|
|
16
16
|
import ye from "./SessionRefer/index.mjs";
|
|
17
17
|
import ve from "./SessionAction/index.mjs";
|
|
18
18
|
import { IHistoryRole as Y, IThinkingStatus as Z } from "@glodon-aiot/apis";
|
|
@@ -21,9 +21,9 @@ import { Popover as Se, Space as $, Button as ee, Row as be, Col as Ee, Collapse
|
|
|
21
21
|
import Te from "./SearchReference/index.mjs";
|
|
22
22
|
/* empty css */import "../../../packages/react-components/dist/es/index.mjs";
|
|
23
23
|
import Ae from "classnames";
|
|
24
|
-
import
|
|
24
|
+
import m from "../../../components/Iconfont/index.mjs";
|
|
25
25
|
import { CheckOutlined as te, CloseOutlined as le, LoadingOutlined as Oe } from "@ant-design/icons";
|
|
26
|
-
import
|
|
26
|
+
import u from "../../../components/JsonDisplay/index.mjs";
|
|
27
27
|
import xe from "../../../context.mjs";
|
|
28
28
|
import Fe from "./SessionRelated/index.mjs";
|
|
29
29
|
import _e from "copy-to-clipboard";
|
|
@@ -38,7 +38,7 @@ const je = (s) => {
|
|
|
38
38
|
} catch (l) {
|
|
39
39
|
return s;
|
|
40
40
|
}
|
|
41
|
-
}, Be =
|
|
41
|
+
}, Be = g(Te), ie = g(ye), S = g(ze), we = g(Re), h = (s) => {
|
|
42
42
|
if (!s)
|
|
43
43
|
return !1;
|
|
44
44
|
try {
|
|
@@ -57,23 +57,23 @@ const je = (s) => {
|
|
|
57
57
|
application: l,
|
|
58
58
|
currentSession: i,
|
|
59
59
|
history: n,
|
|
60
|
-
isLastHistory:
|
|
60
|
+
isLastHistory: N,
|
|
61
61
|
onRelatedClick: re,
|
|
62
62
|
onAgainClick: ae,
|
|
63
63
|
isLoading: Me,
|
|
64
|
-
docViewerUrl:
|
|
65
|
-
onEditClick:
|
|
64
|
+
docViewerUrl: f,
|
|
65
|
+
onEditClick: C,
|
|
66
66
|
actions: oe = !0,
|
|
67
|
-
markdown:
|
|
67
|
+
markdown: L
|
|
68
68
|
} = s, {
|
|
69
69
|
debug: b,
|
|
70
70
|
transform: r,
|
|
71
|
-
popupContainer:
|
|
71
|
+
popupContainer: y
|
|
72
72
|
} = Ce(xe), E = n.role === Y.User, k = n.role === Y.Robot, {
|
|
73
73
|
Panel: de
|
|
74
|
-
} = ne, [
|
|
74
|
+
} = ne, [v, ce] = Le(!0), pe = () => {
|
|
75
75
|
R.config({
|
|
76
|
-
getContainer: () => (
|
|
76
|
+
getContainer: () => (y == null ? void 0 : y.current) || document.body
|
|
77
77
|
}), _e(n.content), R.success("复制成功"), R.config({
|
|
78
78
|
getContainer: void 0
|
|
79
79
|
});
|
|
@@ -100,11 +100,11 @@ const je = (s) => {
|
|
|
100
100
|
size: 4,
|
|
101
101
|
children: [(r == null ? void 0 : r.userEdit) && /* @__PURE__ */ e("div", {
|
|
102
102
|
className: "user-pannel-item",
|
|
103
|
-
onClick: () =>
|
|
103
|
+
onClick: () => C == null ? void 0 : C(n.content),
|
|
104
104
|
children: /* @__PURE__ */ e(ee, {
|
|
105
105
|
type: "link",
|
|
106
106
|
size: "small",
|
|
107
|
-
icon: /* @__PURE__ */ e(
|
|
107
|
+
icon: /* @__PURE__ */ e(m, {
|
|
108
108
|
type: "icon-bianji2"
|
|
109
109
|
})
|
|
110
110
|
})
|
|
@@ -114,7 +114,7 @@ const je = (s) => {
|
|
|
114
114
|
children: /* @__PURE__ */ e(ee, {
|
|
115
115
|
type: "link",
|
|
116
116
|
size: "small",
|
|
117
|
-
icon: /* @__PURE__ */ e(
|
|
117
|
+
icon: /* @__PURE__ */ e(m, {
|
|
118
118
|
type: "icon-fuzhi",
|
|
119
119
|
style: {
|
|
120
120
|
fontSize: "16px"
|
|
@@ -127,10 +127,11 @@ const je = (s) => {
|
|
|
127
127
|
className: "user-panel-main",
|
|
128
128
|
children: /* @__PURE__ */ e("span", {
|
|
129
129
|
className: "item-user-content",
|
|
130
|
-
children: /* @__PURE__ */ e(S, {
|
|
131
|
-
showLatex: !1
|
|
130
|
+
children: /* @__PURE__ */ e(S, c(d({
|
|
131
|
+
showLatex: !1
|
|
132
|
+
}, L), {
|
|
132
133
|
children: Ie(n.content)
|
|
133
|
-
})
|
|
134
|
+
}))
|
|
134
135
|
})
|
|
135
136
|
})
|
|
136
137
|
})
|
|
@@ -143,7 +144,7 @@ const je = (s) => {
|
|
|
143
144
|
children: (T = n.files) == null ? void 0 : T.map((t) => /* @__PURE__ */ e(Ee, {
|
|
144
145
|
className: "user-file-col",
|
|
145
146
|
children: /* @__PURE__ */ e(we, {
|
|
146
|
-
docViewerUrl:
|
|
147
|
+
docViewerUrl: f,
|
|
147
148
|
currentSession: i,
|
|
148
149
|
file: t
|
|
149
150
|
})
|
|
@@ -171,13 +172,13 @@ const je = (s) => {
|
|
|
171
172
|
},
|
|
172
173
|
children: [/* @__PURE__ */ o("span", {
|
|
173
174
|
className: "bot-plugin-status",
|
|
174
|
-
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", {
|
|
175
176
|
className: "plugin-status-success",
|
|
176
177
|
children: /* @__PURE__ */ e(te, {})
|
|
177
178
|
}), t[t.length - 1].type === "ABORT" && /* @__PURE__ */ e("span", {
|
|
178
179
|
className: "plugin-status-error",
|
|
179
180
|
children: /* @__PURE__ */ e(le, {})
|
|
180
|
-
}), (t[t.length - 1].type === "RESULT" || t[t.length - 1].type === "AFTER_CALL") && !
|
|
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", {
|
|
181
182
|
className: "plugin-status-error",
|
|
182
183
|
children: /* @__PURE__ */ e(le, {})
|
|
183
184
|
}), (t[t.length - 1].type === "BEFORE_CALL" || t[t.length - 1].type === "FUNCTION_CALL") && /* @__PURE__ */ e("span", {
|
|
@@ -193,10 +194,10 @@ const je = (s) => {
|
|
|
193
194
|
}), (t[t.length - 1].type === "BEFORE_CALL" || t[t.length - 1].type === "FUNCTION_CALL") && /* @__PURE__ */ e("span", {
|
|
194
195
|
className: "bot-plugin-result",
|
|
195
196
|
children: "执行中"
|
|
196
|
-
}), (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", {
|
|
197
198
|
className: "bot-plugin-result",
|
|
198
199
|
children: "执行成功"
|
|
199
|
-
}), (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", {
|
|
200
201
|
className: "bot-plugin-result",
|
|
201
202
|
children: "执行失败"
|
|
202
203
|
}), t[t.length - 1].type === "ABORT" && /* @__PURE__ */ e("span", {
|
|
@@ -209,7 +210,7 @@ const je = (s) => {
|
|
|
209
210
|
children: "thought"
|
|
210
211
|
}), /* @__PURE__ */ e("div", {
|
|
211
212
|
className: "bot-plugin-json",
|
|
212
|
-
children: /* @__PURE__ */ e(
|
|
213
|
+
children: /* @__PURE__ */ e(u, {
|
|
213
214
|
josn: (D = t.find((a) => a.type === "BEFORE_CALL")) == null ? void 0 : D.data.thought
|
|
214
215
|
})
|
|
215
216
|
}), /* @__PURE__ */ e("div", {
|
|
@@ -217,7 +218,7 @@ const je = (s) => {
|
|
|
217
218
|
children: "parameters"
|
|
218
219
|
}), /* @__PURE__ */ e("div", {
|
|
219
220
|
className: "bot-plugin-json",
|
|
220
|
-
children: /* @__PURE__ */ e(
|
|
221
|
+
children: /* @__PURE__ */ e(u, {
|
|
221
222
|
josn: (V = t.find((a) => a.type === "BEFORE_CALL")) == null ? void 0 : V.data.parameters
|
|
222
223
|
})
|
|
223
224
|
}), /* @__PURE__ */ e("div", {
|
|
@@ -225,7 +226,7 @@ const je = (s) => {
|
|
|
225
226
|
children: "requestBody"
|
|
226
227
|
}), /* @__PURE__ */ e("div", {
|
|
227
228
|
className: "bot-plugin-json",
|
|
228
|
-
children: /* @__PURE__ */ e(
|
|
229
|
+
children: /* @__PURE__ */ e(u, {
|
|
229
230
|
josn: (W = t.find((a) => a.type === "BEFORE_CALL")) == null ? void 0 : W.data.requestBody
|
|
230
231
|
})
|
|
231
232
|
}), /* @__PURE__ */ e("div", {
|
|
@@ -233,7 +234,7 @@ const je = (s) => {
|
|
|
233
234
|
children: "Response"
|
|
234
235
|
}), /* @__PURE__ */ e("div", {
|
|
235
236
|
className: "bot-plugin-json",
|
|
236
|
-
children: /* @__PURE__ */ e(
|
|
237
|
+
children: /* @__PURE__ */ e(u, {
|
|
237
238
|
josn: je((G = t.find((a) => a.type === "RESULT")) == null ? void 0 : G.data.result)
|
|
238
239
|
})
|
|
239
240
|
})]
|
|
@@ -244,7 +245,7 @@ const je = (s) => {
|
|
|
244
245
|
style: {
|
|
245
246
|
padding: "4px 0"
|
|
246
247
|
},
|
|
247
|
-
children: n.content || se(n.actions) ? null : /* @__PURE__ */ e(
|
|
248
|
+
children: n.content || se(n.actions) ? null : /* @__PURE__ */ e(p, {
|
|
248
249
|
size: 4,
|
|
249
250
|
text: "思考中"
|
|
250
251
|
})
|
|
@@ -256,8 +257,7 @@ const je = (s) => {
|
|
|
256
257
|
})
|
|
257
258
|
}), (x = n == null ? void 0 : n.reference) != null && x.length && ((F = r == null ? void 0 : r.reference) != null && F.referenceFirst) ? /* @__PURE__ */ e(ie, {
|
|
258
259
|
history: n,
|
|
259
|
-
docViewerUrl:
|
|
260
|
-
markdown: d
|
|
260
|
+
docViewerUrl: f
|
|
261
261
|
}) : null, /* @__PURE__ */ o("div", {
|
|
262
262
|
className: "item-bot-content",
|
|
263
263
|
children: [(n == null ? void 0 : n.reasoningContent) && /* @__PURE__ */ o("div", {
|
|
@@ -265,7 +265,7 @@ const je = (s) => {
|
|
|
265
265
|
children: [(n == null ? void 0 : n.reasoningContent) && /* @__PURE__ */ o("div", {
|
|
266
266
|
className: "think-top",
|
|
267
267
|
onClick: () => {
|
|
268
|
-
ce(!
|
|
268
|
+
ce(!v);
|
|
269
269
|
},
|
|
270
270
|
children: [/* @__PURE__ */ e("img", {
|
|
271
271
|
src: Ue,
|
|
@@ -276,19 +276,19 @@ const je = (s) => {
|
|
|
276
276
|
children: ["已完成推理(用时 ", (n == null ? void 0 : n.thinkingSecs) || 0, " 秒)"]
|
|
277
277
|
}), /* @__PURE__ */ e("span", {
|
|
278
278
|
className: "think-action",
|
|
279
|
-
children:
|
|
279
|
+
children: v ? /* @__PURE__ */ e(m, {
|
|
280
280
|
type: "icon-zhankai",
|
|
281
281
|
style: {
|
|
282
282
|
fontSize: 16
|
|
283
283
|
}
|
|
284
|
-
}) : /* @__PURE__ */ e(
|
|
284
|
+
}) : /* @__PURE__ */ e(m, {
|
|
285
285
|
type: "icon-shouqi",
|
|
286
286
|
style: {
|
|
287
287
|
fontSize: 16
|
|
288
288
|
}
|
|
289
289
|
})
|
|
290
290
|
})]
|
|
291
|
-
}), !!((_ = n == null ? void 0 : n.reasoningContent) != null && _.trim()) &&
|
|
291
|
+
}), !!((_ = n == null ? void 0 : n.reasoningContent) != null && _.trim()) && v && /* @__PURE__ */ o("div", {
|
|
292
292
|
className: "think-bottom",
|
|
293
293
|
children: [/* @__PURE__ */ o("div", {
|
|
294
294
|
className: "bottom-left",
|
|
@@ -300,23 +300,22 @@ const je = (s) => {
|
|
|
300
300
|
})]
|
|
301
301
|
}), /* @__PURE__ */ e("div", {
|
|
302
302
|
className: "bottom-right",
|
|
303
|
-
children: /* @__PURE__ */ e(S,
|
|
303
|
+
children: /* @__PURE__ */ e(S, c(d({}, L), {
|
|
304
304
|
children: (n == null ? void 0 : n.reasoningContent) || ""
|
|
305
305
|
}))
|
|
306
306
|
})]
|
|
307
307
|
})]
|
|
308
|
-
}), /* @__PURE__ */ e(S,
|
|
308
|
+
}), /* @__PURE__ */ e(S, c(d({}, L), {
|
|
309
309
|
children: n.content
|
|
310
310
|
}))]
|
|
311
311
|
}), (I = n == null ? void 0 : n.reference) != null && I.length && !((U = r == null ? void 0 : r.reference) != null && U.referenceFirst) ? /* @__PURE__ */ e(ie, {
|
|
312
312
|
history: n,
|
|
313
|
-
docViewerUrl:
|
|
314
|
-
|
|
315
|
-
}) : null, n.isRelatedQuestion && g ? /* @__PURE__ */ e("div", {
|
|
313
|
+
docViewerUrl: f
|
|
314
|
+
}) : null, n.isRelatedQuestion && N ? /* @__PURE__ */ e("div", {
|
|
316
315
|
style: {
|
|
317
316
|
paddingBottom: 12
|
|
318
317
|
},
|
|
319
|
-
children: /* @__PURE__ */ e(
|
|
318
|
+
children: /* @__PURE__ */ e(p, {
|
|
320
319
|
size: 4
|
|
321
320
|
})
|
|
322
321
|
}) : null, n.isRelateLoading && /* @__PURE__ */ e("div", {
|
|
@@ -324,11 +323,11 @@ const je = (s) => {
|
|
|
324
323
|
style: {
|
|
325
324
|
padding: "4px 0"
|
|
326
325
|
},
|
|
327
|
-
children: se(n.actions) ? null : /* @__PURE__ */ e(
|
|
326
|
+
children: se(n.actions) ? null : /* @__PURE__ */ e(p, {
|
|
328
327
|
size: 4,
|
|
329
328
|
text: "思考中"
|
|
330
329
|
})
|
|
331
|
-
}), l.arrange[0].recommendQuestionOpen && (r == null ? void 0 : r.relate) &&
|
|
330
|
+
}), l.arrange[0].recommendQuestionOpen && (r == null ? void 0 : r.relate) && N && !!((z = n.relatedQuesion) != null && z.length) && /* @__PURE__ */ e(Fe, {
|
|
332
331
|
relatedQuesion: n.relatedQuesion,
|
|
333
332
|
onRelatedClick: re
|
|
334
333
|
}), oe && !n.isSensitive && !!n.messageId && /* @__PURE__ */ e(ve, {
|
|
@@ -336,7 +335,7 @@ const je = (s) => {
|
|
|
336
335
|
history: n,
|
|
337
336
|
sessionId: (j = i == null ? void 0 : i.data) == null ? void 0 : j.id,
|
|
338
337
|
onAgainClick: ae,
|
|
339
|
-
isLastHistory:
|
|
338
|
+
isLastHistory: N,
|
|
340
339
|
currentSession: i
|
|
341
340
|
})]
|
|
342
341
|
})
|
|
@@ -350,7 +349,7 @@ const je = (s) => {
|
|
|
350
349
|
}), " "]
|
|
351
350
|
}), n.isWaiting && /* @__PURE__ */ e("div", {
|
|
352
351
|
className: "history-input-progress",
|
|
353
|
-
children: /* @__PURE__ */ e(
|
|
352
|
+
children: /* @__PURE__ */ e(p, {
|
|
354
353
|
size: 4,
|
|
355
354
|
text: "思考中"
|
|
356
355
|
})
|
|
@@ -359,5 +358,5 @@ const je = (s) => {
|
|
|
359
358
|
};
|
|
360
359
|
export {
|
|
361
360
|
dn as default,
|
|
362
|
-
|
|
361
|
+
h as isResultExec
|
|
363
362
|
};
|