@yuku123/z-agent-component 0.1.3 → 0.1.4
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/echarts-BRUNUPov.js +556 -0
- package/dist/z-agent-component.js +268 -267
- package/dist/z-agent-pages.js +240 -239
- package/package.json +1 -1
- package/dist/echarts-DGCy0J8X.js +0 -861
|
@@ -1,15 +1,16 @@
|
|
|
1
|
-
import { j as e,
|
|
2
|
-
import {
|
|
1
|
+
import { j as e, u as pt, R as ls, p as Nn, s as Le, a as yl, b as Dt, t as rn } from "./echarts-BRUNUPov.js";
|
|
2
|
+
import { c as Tr } from "./echarts-BRUNUPov.js";
|
|
3
3
|
import { useRef as $e, useState as l, useEffect as ae, useCallback as Ee, useMemo as on } from "react";
|
|
4
|
-
import { message as C, Space as se, Tooltip as ie, Button as j, Tag as D, Modal as ye, Input as Z, Typography as He, Form as T, Alert as Oe, Card as H, Select as Y, Tabs as be, Row as pe, Col as J, InputNumber as Ke, Switch as
|
|
5
|
-
import { UndoOutlined as Al, RedoOutlined as Il, DeleteOutlined as Te, SaveOutlined as Dn, CloudUploadOutlined as kt, ArrowLeftOutlined as Fn, DiffOutlined as Bs, RocketOutlined as yt, EyeOutlined as lt, MessageOutlined as Mn, RobotOutlined as _e, ApartmentOutlined as Ds, ThunderboltOutlined as st, DatabaseOutlined as Un, BookOutlined as zl, CalendarOutlined as Pl, PlusOutlined as we, FileTextOutlined as wt, ReloadOutlined as ze, AppstoreFilled as El, UnorderedListOutlined as Ol, LoadingOutlined as as, EditOutlined as at, FolderOpenOutlined as Rl, FolderOutlined as ut, GlobalOutlined as It, LockOutlined as
|
|
6
|
-
import { createRequest as $s, ErrorBoundary as
|
|
7
|
-
import Bt, { CircleNode as Xn, RectNode as
|
|
8
|
-
import { Control as
|
|
4
|
+
import { message as C, Space as se, Tooltip as ie, Button as j, Tag as D, Modal as ye, Input as Z, Typography as He, Form as T, Alert as Oe, Card as H, Select as Y, Tabs as be, Row as pe, Col as J, InputNumber as Ke, Switch as qt, Tree as Ln, Table as fe, Popconfirm as nt, TreeSelect as fl, Divider as ht, Drawer as gt, Avatar as tt, Empty as he, QRCode as jl, Spin as Ze, List as vt, Statistic as ce, Radio as ps, Dropdown as Ns, Breadcrumb as bl, Upload as ws, Steps as Bn, Descriptions as Qe, Progress as Ls, App as Cl, Segmented as Sl, Pagination as vl, Timeline as kl, Badge as Rt, Skeleton as wl, Checkbox as Tl } from "antd";
|
|
5
|
+
import { UndoOutlined as Al, RedoOutlined as Il, DeleteOutlined as Te, SaveOutlined as Dn, CloudUploadOutlined as kt, ArrowLeftOutlined as Fn, DiffOutlined as Bs, RocketOutlined as yt, EyeOutlined as lt, MessageOutlined as Mn, RobotOutlined as _e, ApartmentOutlined as Ds, ThunderboltOutlined as st, DatabaseOutlined as Un, BookOutlined as zl, CalendarOutlined as Pl, PlusOutlined as we, FileTextOutlined as wt, ReloadOutlined as ze, AppstoreFilled as El, UnorderedListOutlined as Ol, LoadingOutlined as as, EditOutlined as at, FolderOpenOutlined as Rl, FolderOutlined as ut, GlobalOutlined as It, LockOutlined as Ht, SettingOutlined as Fs, CheckCircleFilled as $t, CopyOutlined as Fe, LinkOutlined as Ms, ToolOutlined as _l, ExclamationCircleFilled as Gn, ClearOutlined as Kn, SendOutlined as $n, ClockCircleOutlined as cs, UserOutlined as Us, ApiOutlined as ft, BranchesOutlined as Nl, PictureOutlined as Ll, AudioOutlined as Bl, NodeIndexOutlined as Tt, DollarOutlined as Vt, BarChartOutlined as Gs, KeyOutlined as ns, CheckCircleOutlined as mt, AppstoreOutlined as is, StopOutlined as Ks, PlayCircleOutlined as St, CloudOutlined as rs, MoreOutlined as Vn, TeamOutlined as Dl, FolderAddOutlined as Fl, UploadOutlined as Wn, DownloadOutlined as Ot, FileZipOutlined as qn, FileImageOutlined as Ml, FileOutlined as Ul, ArrowUpOutlined as Gl, ArrowDownOutlined as Kl, CodeOutlined as _t, ExperimentOutlined as $l, ImportOutlined as Vl, CloudServerOutlined as Wl, CloudDownloadOutlined as Hn, LineChartOutlined as Jn, NumberOutlined as ql, TagsOutlined as Hl, SearchOutlined as Qn, FireOutlined as Jl, StarOutlined as Yn, InfoCircleOutlined as Ql, HistoryOutlined as os, ShopOutlined as ds, ExclamationCircleOutlined as Yl, TagOutlined as Zl, CloseCircleOutlined as Zn, DesktopOutlined as Xl, ContainerOutlined as ea } from "@ant-design/icons";
|
|
6
|
+
import { createRequest as $s, ErrorBoundary as ta, request as Ae } from "@yuku123/z-frontend-common";
|
|
7
|
+
import Bt, { CircleNode as Xn, RectNode as Jt, PolygonNode as sa, h as na, CircleNodeModel as dn, RectNodeModel as Ft, PolygonNodeModel as la } from "@logicflow/core";
|
|
8
|
+
import { Control as aa, MiniMap as ia, Menu as ra, DndPanel as oa, SelectionSelect as da } from "@logicflow/extension";
|
|
9
|
+
import { SearchInput as Qt, ErrorState as Gt, PageHeader as Ve, EmptyState as Wt } from "@yuku123/z-frontend-common/ui";
|
|
9
10
|
import { useParams as el, useNavigate as tl } from "react-router-dom";
|
|
10
11
|
import sl from "react-markdown";
|
|
11
|
-
import
|
|
12
|
-
const
|
|
12
|
+
import ca from "remark-gfm";
|
|
13
|
+
const pa = $s({ baseURL: "/api", timeout: 15e3 }), nl = $s({ baseURL: "/api", timeout: 15e3 }), ll = $s({ baseURL: "/api", timeout: 15e3 });
|
|
13
14
|
function Vs(t) {
|
|
14
15
|
const s = function(a, m = {}) {
|
|
15
16
|
const i = { ...m };
|
|
@@ -19,31 +20,31 @@ function Vs(t) {
|
|
|
19
20
|
typeof t[a] == "function" ? s[a] = t[a].bind(t) : s[a] = t[a];
|
|
20
21
|
}), s;
|
|
21
22
|
}
|
|
22
|
-
const je = Vs(
|
|
23
|
+
const je = Vs(pa);
|
|
23
24
|
Vs(nl);
|
|
24
25
|
Vs(ll);
|
|
25
26
|
const cn = { GET: "GET", DELETE: "DELETE" }, Kt = {};
|
|
26
27
|
function P(t, s, n, a, m) {
|
|
27
28
|
Kt[t] || (Kt[t] = {}), Kt[t][s] = { verb: n, path: a, transform: m };
|
|
28
29
|
}
|
|
29
|
-
function
|
|
30
|
+
function xa(t, s) {
|
|
30
31
|
let n = 0;
|
|
31
32
|
return t.replace(/\{(\w+)\}/g, () => String(s[n++] ?? ""));
|
|
32
33
|
}
|
|
33
|
-
class
|
|
34
|
+
class ua extends Error {
|
|
34
35
|
constructor(s, n, a) {
|
|
35
36
|
super(`[apiRouter] ${s}.${n}() 未注册路由(${a}):本次没有发出任何请求。若该端点本应存在,请先在 agent/api/routes.js 里 reg('${s}', '${n}', ...)。`), this.name = "ApiRouteError", this.__missing_route = !0, this.api = s, this.method = n;
|
|
36
37
|
}
|
|
37
38
|
}
|
|
38
|
-
class
|
|
39
|
+
class ha extends Error {
|
|
39
40
|
constructor(s, n, a) {
|
|
40
41
|
super(`[apiRouter] ${s}.${n}() 参数形状不对:${a}`), this.name = "ApiParamError", this.__param_shape = !0, this.api = s, this.method = n;
|
|
41
42
|
}
|
|
42
43
|
}
|
|
43
|
-
function
|
|
44
|
+
function ga(t, s) {
|
|
44
45
|
return s.startsWith("/ctc/ac") || s.startsWith("/ctc/authorization") || s.startsWith("/ctc/surl") ? ll : s.startsWith("/auth/") ? nl : je;
|
|
45
46
|
}
|
|
46
|
-
function
|
|
47
|
+
function ma(t) {
|
|
47
48
|
const s = { data: void 0, params: void 0 };
|
|
48
49
|
if (!t.length) return s;
|
|
49
50
|
const n = t[0];
|
|
@@ -53,13 +54,13 @@ function ga(t) {
|
|
|
53
54
|
}
|
|
54
55
|
return s;
|
|
55
56
|
}
|
|
56
|
-
function
|
|
57
|
+
function ya(t, s, n, a) {
|
|
57
58
|
const m = {};
|
|
58
59
|
if (t === cn.GET || t === cn.DELETE) {
|
|
59
60
|
const o = s[0];
|
|
60
61
|
if (o != null) {
|
|
61
62
|
if (typeof o != "object" || Array.isArray(o))
|
|
62
|
-
throw new
|
|
63
|
+
throw new ha(
|
|
63
64
|
n,
|
|
64
65
|
a,
|
|
65
66
|
`GET/DELETE 端点收到标量参数 ${JSON.stringify(o)},query 参数名未知,请改用 {params:{<参数名>: 值}}`
|
|
@@ -68,7 +69,7 @@ function ma(t, s, n, a) {
|
|
|
68
69
|
}
|
|
69
70
|
return m;
|
|
70
71
|
}
|
|
71
|
-
const { data: i, params: d } =
|
|
72
|
+
const { data: i, params: d } = ma(s);
|
|
72
73
|
return i !== void 0 && (m.data = i), d !== void 0 && (m.params = d), m;
|
|
73
74
|
}
|
|
74
75
|
function Ne(t) {
|
|
@@ -79,11 +80,11 @@ function Ne(t) {
|
|
|
79
80
|
var i, d;
|
|
80
81
|
const m = (i = Kt[t]) == null ? void 0 : i[n];
|
|
81
82
|
if (!m) {
|
|
82
|
-
const o = Kt[t] ? "方法名未注册" : "api key 未注册", y = new
|
|
83
|
+
const o = Kt[t] ? "方法名未注册" : "api key 未注册", y = new ua(t, n, o);
|
|
83
84
|
throw console.error(y.message), y;
|
|
84
85
|
}
|
|
85
86
|
try {
|
|
86
|
-
const o =
|
|
87
|
+
const o = xa(m.path, a), y = ga(m.verb, o), c = ya(m.verb, a, t, n), r = await y.request({
|
|
87
88
|
method: m.verb,
|
|
88
89
|
url: o,
|
|
89
90
|
...c
|
|
@@ -238,7 +239,7 @@ P("sceneApi", "canvasGet", "GET", "/v1/scenes/canvas");
|
|
|
238
239
|
P("sceneApi", "configGet", "GET", "/v1/scenes/config");
|
|
239
240
|
P("sceneApi", "nodes", "GET", "/v1/scenes/nodes");
|
|
240
241
|
P("sceneApi", "chatHistory", "GET", "/v1/scenes/chat-history");
|
|
241
|
-
const ve = Ne("agentApi"), Yt = Ne("flowApi"),
|
|
242
|
+
const ve = Ne("agentApi"), Yt = Ne("flowApi"), Yi = Ne("statsApi"), Zi = Ne("pluginApi"), Xi = Ne("memoryApi"), er = Ne("triggerApi"), tr = Ne("templateApi"), sr = Ne("textGenApi"), nr = Ne("humanInputApi"), fa = Ne("llmApi"), xs = Ne("mcpApi"), Ye = Ne("scriptApi"), Ge = Ne("skillApi"), rt = Ne("productApi"), lr = Ne("sceneApi"), qe = Ne("ossApi"), Hs = class Hs extends Xn {
|
|
242
243
|
getNodeStyle() {
|
|
243
244
|
const s = super.getNodeStyle();
|
|
244
245
|
return s.fill = "#52c41a", s.stroke = "#52c41a", s.strokeWidth = 2, s;
|
|
@@ -250,7 +251,7 @@ const ve = Ne("agentApi"), Yt = Ne("flowApi"), Ji = Ne("statsApi"), Qi = Ne("plu
|
|
|
250
251
|
};
|
|
251
252
|
Hs.extendKey = "start";
|
|
252
253
|
let Ts = Hs;
|
|
253
|
-
const Js = class Js extends
|
|
254
|
+
const Js = class Js extends Jt {
|
|
254
255
|
getNodeStyle() {
|
|
255
256
|
const s = super.getNodeStyle();
|
|
256
257
|
return s.fill = "#e6f4ff", s.stroke = "#1677ff", s.strokeWidth = 2, s;
|
|
@@ -262,7 +263,7 @@ const Js = class Js extends Qt {
|
|
|
262
263
|
};
|
|
263
264
|
Js.extendKey = "llm";
|
|
264
265
|
let As = Js;
|
|
265
|
-
const Qs = class Qs extends
|
|
266
|
+
const Qs = class Qs extends Jt {
|
|
266
267
|
getNodeStyle() {
|
|
267
268
|
const s = super.getNodeStyle();
|
|
268
269
|
return s.fill = "#f0f5ff", s.stroke = "#2f54eb", s.strokeWidth = 2, s;
|
|
@@ -274,7 +275,7 @@ const Qs = class Qs extends Qt {
|
|
|
274
275
|
};
|
|
275
276
|
Qs.extendKey = "agent";
|
|
276
277
|
let Is = Qs;
|
|
277
|
-
const Ys = class Ys extends
|
|
278
|
+
const Ys = class Ys extends sa {
|
|
278
279
|
getNodeStyle() {
|
|
279
280
|
const s = super.getNodeStyle();
|
|
280
281
|
return s.fill = "#fff7e6", s.stroke = "#fa8c16", s.strokeWidth = 2, s;
|
|
@@ -295,7 +296,7 @@ const Ys = class Ys extends ta {
|
|
|
295
296
|
};
|
|
296
297
|
Ys.extendKey = "condition";
|
|
297
298
|
let zs = Ys;
|
|
298
|
-
const Zs = class Zs extends
|
|
299
|
+
const Zs = class Zs extends Jt {
|
|
299
300
|
getNodeStyle() {
|
|
300
301
|
const s = super.getNodeStyle();
|
|
301
302
|
return s.fill = "#fff7e6", s.stroke = "#fa8c16", s.strokeWidth = 2, s;
|
|
@@ -307,7 +308,7 @@ const Zs = class Zs extends Qt {
|
|
|
307
308
|
};
|
|
308
309
|
Zs.extendKey = "http";
|
|
309
310
|
let Ps = Zs;
|
|
310
|
-
const Xs = class Xs extends
|
|
311
|
+
const Xs = class Xs extends Jt {
|
|
311
312
|
getNodeStyle() {
|
|
312
313
|
const s = super.getNodeStyle();
|
|
313
314
|
return s.fill = "#f6ffed", s.stroke = "#13c2c2", s.strokeWidth = 2, s;
|
|
@@ -319,7 +320,7 @@ const Xs = class Xs extends Qt {
|
|
|
319
320
|
};
|
|
320
321
|
Xs.extendKey = "template";
|
|
321
322
|
let Es = Xs;
|
|
322
|
-
const en = class en extends
|
|
323
|
+
const en = class en extends Jt {
|
|
323
324
|
getNodeStyle() {
|
|
324
325
|
const s = super.getNodeStyle();
|
|
325
326
|
return s.fill = "#f9f0ff", s.stroke = "#722ed1", s.strokeWidth = 2, s;
|
|
@@ -330,7 +331,7 @@ const en = class en extends Qt {
|
|
|
330
331
|
}
|
|
331
332
|
getShape() {
|
|
332
333
|
const { x: s, y: n, width: a, height: m } = this.getAttributes(), i = a / 2, d = m / 2, o = 12;
|
|
333
|
-
return
|
|
334
|
+
return na("polygon", {
|
|
334
335
|
points: [
|
|
335
336
|
[s - i + o, n - d],
|
|
336
337
|
[s + i - o, n - d],
|
|
@@ -356,8 +357,8 @@ const tn = class tn extends Xn {
|
|
|
356
357
|
};
|
|
357
358
|
tn.extendKey = "end";
|
|
358
359
|
let Rs = tn;
|
|
359
|
-
function
|
|
360
|
-
t.register({ type: "start", view: Ts, model: dn }), t.register({ type: "llm", view: As, model: Ft }), t.register({ type: "agent", view: Is, model: Ft }), t.register({ type: "condition", view: zs, model:
|
|
360
|
+
function ja(t) {
|
|
361
|
+
t.register({ type: "start", view: Ts, model: dn }), t.register({ type: "llm", view: As, model: Ft }), t.register({ type: "agent", view: Is, model: Ft }), t.register({ type: "condition", view: zs, model: la }), t.register({ type: "http", view: Ps, model: Ft }), t.register({ type: "template", view: Es, model: Ft }), t.register({ type: "parallel", view: Os, model: Ft }), t.register({ type: "end", view: Rs, model: dn });
|
|
361
362
|
}
|
|
362
363
|
const _s = [
|
|
363
364
|
{ type: "start", label: "开始", icon: "https://cdn.jsdelivr.net/gh/LogicFlow/static@latest/docs/static/start.png" },
|
|
@@ -373,11 +374,11 @@ const _s = [
|
|
|
373
374
|
{ type: "parallel", label: "并行执行", icon: "⚡" },
|
|
374
375
|
{ type: "end", label: "结束", icon: "https://cdn.jsdelivr.net/gh/LogicFlow/static@latest/docs/static/end.png" }
|
|
375
376
|
];
|
|
376
|
-
Bt.use(la);
|
|
377
377
|
Bt.use(aa);
|
|
378
378
|
Bt.use(ia);
|
|
379
379
|
Bt.use(ra);
|
|
380
380
|
Bt.use(oa);
|
|
381
|
+
Bt.use(da);
|
|
381
382
|
const pn = {
|
|
382
383
|
nodes: [
|
|
383
384
|
{ id: "start_1", type: "start", x: 150, y: 280, text: "开始" },
|
|
@@ -388,7 +389,7 @@ const pn = {
|
|
|
388
389
|
{ id: "e1", type: "polyline", sourceNodeId: "start_1", targetNodeId: "llm_1", text: "" },
|
|
389
390
|
{ id: "e2", type: "polyline", sourceNodeId: "llm_1", targetNodeId: "end_1", text: "" }
|
|
390
391
|
]
|
|
391
|
-
},
|
|
392
|
+
}, ba = ({ node: t, onChange: s, onClose: n }) => {
|
|
392
393
|
var m, i, d, o, y;
|
|
393
394
|
if (!t) return null;
|
|
394
395
|
const a = ((m = _s.find((c) => c.type === t.type)) == null ? void 0 : m.label) || t.type;
|
|
@@ -525,7 +526,7 @@ const pn = {
|
|
|
525
526
|
)
|
|
526
527
|
] })
|
|
527
528
|
] });
|
|
528
|
-
},
|
|
529
|
+
}, Ca = ({ readOnly: t = !1, value: s, onChange: n, appCode: a, flowName: m }) => {
|
|
529
530
|
const i = $e(null), d = $e(null), [o, y] = l(null), [c, r] = l(s || pn), [x, L] = l(null), [G, U] = l(!1), [u, A] = l(!1);
|
|
530
531
|
ae(() => {
|
|
531
532
|
if (!i.current) return;
|
|
@@ -549,7 +550,7 @@ const pn = {
|
|
|
549
550
|
// Default edge type
|
|
550
551
|
edgeType: "polyline"
|
|
551
552
|
});
|
|
552
|
-
|
|
553
|
+
ja(_), _.extension.dndPanel.setPatternItems(
|
|
553
554
|
_s.map((B) => ({
|
|
554
555
|
type: B.type,
|
|
555
556
|
label: B.label,
|
|
@@ -769,7 +770,7 @@ const pn = {
|
|
|
769
770
|
),
|
|
770
771
|
/* @__PURE__ */ e.jsx("div", { ref: i, style: { width: "100%", height: "100%" } }),
|
|
771
772
|
o && !t && /* @__PURE__ */ e.jsx(
|
|
772
|
-
|
|
773
|
+
ba,
|
|
773
774
|
{
|
|
774
775
|
node: o,
|
|
775
776
|
onChange: k,
|
|
@@ -788,7 +789,7 @@ const pn = {
|
|
|
788
789
|
fontSize: 12
|
|
789
790
|
}, children: "只读模式" })
|
|
790
791
|
] });
|
|
791
|
-
}, { TextArea: jt } = Z, { Text: Je, Title:
|
|
792
|
+
}, { TextArea: jt } = Z, { Text: Je, Title: Sa } = He, xn = {
|
|
792
793
|
ollama: [
|
|
793
794
|
{ code: "qwen2.5:7b-instruct-q4_K_M", name: "Qwen 2.5 7B" },
|
|
794
795
|
{ code: "qwen3:8b", name: "Qwen3 8B" },
|
|
@@ -863,7 +864,7 @@ const pn = {
|
|
|
863
864
|
trigger: "定时触发"
|
|
864
865
|
}
|
|
865
866
|
}
|
|
866
|
-
},
|
|
867
|
+
}, va = ({ app: t, onBack: s, onSaved: n }) => {
|
|
867
868
|
const [a, m] = l(t), i = a.status === "PUBLISHED", d = a.agentMode || "chat", o = un[d] || un.chat, [y, c] = l(!1), [r, x] = l(!1), [L, G] = l(o.tabs[0]), [U] = T.useForm(), [u, A] = l(null);
|
|
868
869
|
ae(() => {
|
|
869
870
|
L && !o.tabs.includes(L) && G(o.tabs[0]);
|
|
@@ -907,7 +908,7 @@ const pn = {
|
|
|
907
908
|
flexShrink: 0
|
|
908
909
|
}, children: [
|
|
909
910
|
/* @__PURE__ */ e.jsx(j, { type: "text", icon: /* @__PURE__ */ e.jsx(Fn, {}), onClick: s }),
|
|
910
|
-
/* @__PURE__ */ e.jsxs(
|
|
911
|
+
/* @__PURE__ */ e.jsxs(Sa, { level: 5, style: { margin: 0, flex: 1, minWidth: 0 }, children: [
|
|
911
912
|
/* @__PURE__ */ e.jsx("span", { style: { marginRight: 8 }, children: a.appName }),
|
|
912
913
|
/* @__PURE__ */ e.jsxs(D, { color: o.color, style: { borderRadius: 20, marginRight: 4 }, children: [
|
|
913
914
|
o.icon,
|
|
@@ -1186,7 +1187,7 @@ const pn = {
|
|
|
1186
1187
|
name: "enableLongMemory",
|
|
1187
1188
|
label: "启用长期记忆",
|
|
1188
1189
|
valuePropName: "checked",
|
|
1189
|
-
children: /* @__PURE__ */ e.jsx(
|
|
1190
|
+
children: /* @__PURE__ */ e.jsx(qt, { disabled: i })
|
|
1190
1191
|
}
|
|
1191
1192
|
),
|
|
1192
1193
|
/* @__PURE__ */ e.jsx(
|
|
@@ -1308,13 +1309,13 @@ const pn = {
|
|
|
1308
1309
|
}
|
|
1309
1310
|
),
|
|
1310
1311
|
/* @__PURE__ */ e.jsx(
|
|
1311
|
-
|
|
1312
|
+
ta,
|
|
1312
1313
|
{
|
|
1313
1314
|
fallbackTitle: "流程编辑器加载失败",
|
|
1314
1315
|
fallbackDescription: "LogicFlow 初始化异常。请重试,或切换到「对话」/「智能体」模式后重新切回工作流。",
|
|
1315
1316
|
onReset: () => A(null),
|
|
1316
1317
|
children: /* @__PURE__ */ e.jsx(
|
|
1317
|
-
|
|
1318
|
+
Ca,
|
|
1318
1319
|
{
|
|
1319
1320
|
readOnly: i,
|
|
1320
1321
|
value: u,
|
|
@@ -1332,7 +1333,7 @@ const pn = {
|
|
|
1332
1333
|
}) }) })
|
|
1333
1334
|
] })
|
|
1334
1335
|
] });
|
|
1335
|
-
}, { TextArea:
|
|
1336
|
+
}, { TextArea: ka } = Z, { Option: it } = Y, { TabPane: us } = be, { Text: Re, Title: Nt } = He, ar = () => {
|
|
1336
1337
|
const [t, s] = l(""), [n, a] = l(""), [m, i] = l(0), [d, o] = l(null), y = () => i((c) => c + 1);
|
|
1337
1338
|
return d ? /* @__PURE__ */ e.jsx("div", { style: {
|
|
1338
1339
|
flex: 1,
|
|
@@ -1341,7 +1342,7 @@ const pn = {
|
|
|
1341
1342
|
background: "#fff",
|
|
1342
1343
|
boxShadow: "0 1px 4px rgba(0,0,0,0.06)"
|
|
1343
1344
|
}, children: /* @__PURE__ */ e.jsx(
|
|
1344
|
-
|
|
1345
|
+
va,
|
|
1345
1346
|
{
|
|
1346
1347
|
app: d,
|
|
1347
1348
|
onBack: () => {
|
|
@@ -1360,7 +1361,7 @@ const pn = {
|
|
|
1360
1361
|
title: "分组",
|
|
1361
1362
|
extra: /* @__PURE__ */ e.jsx(j, { size: "small", icon: /* @__PURE__ */ e.jsx(ze, {}), onClick: y }),
|
|
1362
1363
|
children: /* @__PURE__ */ e.jsx(
|
|
1363
|
-
|
|
1364
|
+
Ta,
|
|
1364
1365
|
{
|
|
1365
1366
|
selectedGroupCode: t,
|
|
1366
1367
|
onGroupSelect: (c, r) => {
|
|
@@ -1378,7 +1379,7 @@ const pn = {
|
|
|
1378
1379
|
size: "small",
|
|
1379
1380
|
style: { flex: 1, overflow: "auto" },
|
|
1380
1381
|
title: n || void 0,
|
|
1381
|
-
children: /* @__PURE__ */ e.jsx(
|
|
1382
|
+
children: /* @__PURE__ */ e.jsx(Pa, { selectedGroupCode: t, onEditApp: o })
|
|
1382
1383
|
}
|
|
1383
1384
|
)
|
|
1384
1385
|
] });
|
|
@@ -1399,7 +1400,7 @@ const pn = {
|
|
|
1399
1400
|
{ code: "qwen-plus", name: "Qwen Plus" },
|
|
1400
1401
|
{ code: "qwen-turbo", name: "Qwen Turbo" }
|
|
1401
1402
|
]
|
|
1402
|
-
},
|
|
1403
|
+
}, wa = (t) => {
|
|
1403
1404
|
const s = {};
|
|
1404
1405
|
t.forEach((a) => {
|
|
1405
1406
|
s[a.group_code] = {
|
|
@@ -1413,7 +1414,7 @@ const pn = {
|
|
|
1413
1414
|
const m = s[a.group_code];
|
|
1414
1415
|
a.parent_code && s[a.parent_code] ? s[a.parent_code].children.push(m) : a.parent_code || n.push(m);
|
|
1415
1416
|
}), n;
|
|
1416
|
-
},
|
|
1417
|
+
}, Ta = ({ selectedGroupCode: t, onGroupSelect: s, onGroupRefresh: n }) => {
|
|
1417
1418
|
const [a, m] = l([]), [i, d] = l(!1), [o, y] = l(!1), [c, r] = l(null), [x, L] = l(null), [G] = T.useForm(), U = $e(null), u = (E) => {
|
|
1418
1419
|
s(E === t ? "" : E, "");
|
|
1419
1420
|
}, A = () => {
|
|
@@ -1551,7 +1552,7 @@ const pn = {
|
|
|
1551
1552
|
}
|
|
1552
1553
|
)
|
|
1553
1554
|
] });
|
|
1554
|
-
},
|
|
1555
|
+
}, Aa = ({
|
|
1555
1556
|
record: t,
|
|
1556
1557
|
onEdit: s,
|
|
1557
1558
|
onView: n,
|
|
@@ -1590,7 +1591,7 @@ const pn = {
|
|
|
1590
1591
|
j,
|
|
1591
1592
|
{
|
|
1592
1593
|
type: "text",
|
|
1593
|
-
icon: L ? /* @__PURE__ */ e.jsx(It, { style: { color: "#52c41a" } }) : /* @__PURE__ */ e.jsx(
|
|
1594
|
+
icon: L ? /* @__PURE__ */ e.jsx(It, { style: { color: "#52c41a" } }) : /* @__PURE__ */ e.jsx(Ht, {}),
|
|
1594
1595
|
onClick: () => i == null ? void 0 : i(t),
|
|
1595
1596
|
children: "分享"
|
|
1596
1597
|
}
|
|
@@ -1676,7 +1677,7 @@ const pn = {
|
|
|
1676
1677
|
] })
|
|
1677
1678
|
}
|
|
1678
1679
|
);
|
|
1679
|
-
},
|
|
1680
|
+
}, Ia = ({ app: t, onEnable: s }) => {
|
|
1680
1681
|
const [n, a] = l(!1);
|
|
1681
1682
|
return /* @__PURE__ */ e.jsxs("div", { style: { padding: "24px 0", textAlign: "center" }, children: [
|
|
1682
1683
|
/* @__PURE__ */ e.jsx("div", { style: {
|
|
@@ -1688,7 +1689,7 @@ const pn = {
|
|
|
1688
1689
|
display: "flex",
|
|
1689
1690
|
alignItems: "center",
|
|
1690
1691
|
justifyContent: "center"
|
|
1691
|
-
}, children: /* @__PURE__ */ e.jsx(
|
|
1692
|
+
}, children: /* @__PURE__ */ e.jsx(Ht, { style: { fontSize: 40, color: "#52c41a" } }) }),
|
|
1692
1693
|
/* @__PURE__ */ e.jsx(Nt, { level: 5, style: { marginTop: 8 }, children: "该应用尚未开启分享" }),
|
|
1693
1694
|
/* @__PURE__ */ e.jsxs(Re, { type: "secondary", style: { display: "block", marginBottom: 24, fontSize: 13 }, children: [
|
|
1694
1695
|
"开启后,任何人都可通过专属链接访问该 Agent",
|
|
@@ -1731,7 +1732,7 @@ const pn = {
|
|
|
1731
1732
|
i
|
|
1732
1733
|
)) })
|
|
1733
1734
|
] });
|
|
1734
|
-
},
|
|
1735
|
+
}, za = ({ app: t, onDisable: s, onRefresh: n }) => {
|
|
1735
1736
|
var r, x;
|
|
1736
1737
|
const a = t.share_code ? `${window.location.origin}/share/${t.share_code}` : "", [m, i] = l(!1), [d, o] = l(!1), y = async () => {
|
|
1737
1738
|
if (a)
|
|
@@ -1800,7 +1801,7 @@ const pn = {
|
|
|
1800
1801
|
{
|
|
1801
1802
|
type: "primary",
|
|
1802
1803
|
size: "small",
|
|
1803
|
-
icon: m ? /* @__PURE__ */ e.jsx(
|
|
1804
|
+
icon: m ? /* @__PURE__ */ e.jsx($t, {}) : /* @__PURE__ */ e.jsx(Fe, {}),
|
|
1804
1805
|
onClick: y,
|
|
1805
1806
|
disabled: !a,
|
|
1806
1807
|
children: m ? "已复制" : "复制链接"
|
|
@@ -1863,11 +1864,11 @@ const pn = {
|
|
|
1863
1864
|
okButtonProps: { danger: !0 },
|
|
1864
1865
|
cancelText: "取消",
|
|
1865
1866
|
onConfirm: s,
|
|
1866
|
-
children: /* @__PURE__ */ e.jsx(j, { block: !0, danger: !0, icon: /* @__PURE__ */ e.jsx(
|
|
1867
|
+
children: /* @__PURE__ */ e.jsx(j, { block: !0, danger: !0, icon: /* @__PURE__ */ e.jsx(Ht, {}), children: "关闭分享" })
|
|
1867
1868
|
}
|
|
1868
1869
|
)
|
|
1869
1870
|
] });
|
|
1870
|
-
},
|
|
1871
|
+
}, Pa = ({ selectedGroupCode: t, onEditApp: s }) => {
|
|
1871
1872
|
var Ce;
|
|
1872
1873
|
const [n, a] = l([]), [m, i] = l(!1), [d, o] = l(null), [y, c] = l(""), [r, x] = l(""), [L, G] = l(1), [U] = l(12), [u, A] = l(0), [k, f] = l(!1), [h, F] = l([]), [E, b] = l(!1), [w, $] = l(null), [_, g] = l(!1), [B, O] = l(null), [V, ee] = l("card"), [S, I] = l(hs.ollama), [N, z] = l(!1), [q] = T.useForm(), [p, M] = l([]);
|
|
1873
1874
|
ae(() => {
|
|
@@ -1967,7 +1968,7 @@ const pn = {
|
|
|
1967
1968
|
borderRadius: 8
|
|
1968
1969
|
}, children: [
|
|
1969
1970
|
/* @__PURE__ */ e.jsxs(se, { wrap: !0, children: [
|
|
1970
|
-
/* @__PURE__ */ e.jsx(
|
|
1971
|
+
/* @__PURE__ */ e.jsx(Qt, { placeholder: "搜索应用名称/编码", onSearch: (W) => {
|
|
1971
1972
|
c(W), G(1);
|
|
1972
1973
|
}, size: "large", allowClear: !0, enterButton: !0 }),
|
|
1973
1974
|
/* @__PURE__ */ e.jsxs(Y, { placeholder: "状态筛选", allowClear: !0, style: { width: 140 }, onChange: (W) => {
|
|
@@ -2073,7 +2074,7 @@ const pn = {
|
|
|
2073
2074
|
gap: 16,
|
|
2074
2075
|
marginBottom: 16
|
|
2075
2076
|
}, children: n.map((W) => /* @__PURE__ */ e.jsx(
|
|
2076
|
-
|
|
2077
|
+
Aa,
|
|
2077
2078
|
{
|
|
2078
2079
|
record: W,
|
|
2079
2080
|
onEdit: We,
|
|
@@ -2241,14 +2242,14 @@ const pn = {
|
|
|
2241
2242
|
{
|
|
2242
2243
|
allowClear: !0,
|
|
2243
2244
|
placeholder: "默认",
|
|
2244
|
-
treeData:
|
|
2245
|
+
treeData: wa(p),
|
|
2245
2246
|
treeDefaultExpandAll: !0,
|
|
2246
2247
|
onChange: (W) => q.setFieldsValue({ groupCode: W || "" }),
|
|
2247
2248
|
style: { width: "100%" }
|
|
2248
2249
|
}
|
|
2249
2250
|
) })
|
|
2250
2251
|
] }),
|
|
2251
|
-
/* @__PURE__ */ e.jsx(T.Item, { name: "description", label: "应用描述", children: /* @__PURE__ */ e.jsx(
|
|
2252
|
+
/* @__PURE__ */ e.jsx(T.Item, { name: "description", label: "应用描述", children: /* @__PURE__ */ e.jsx(ka, { rows: 2, placeholder: "简短描述这个应用的能力和使用场景" }) }),
|
|
2252
2253
|
/* @__PURE__ */ e.jsx(ht, { style: { margin: "12px 0", fontSize: 12, color: "#8c8c8c" }, children: "应用类型" }),
|
|
2253
2254
|
/* @__PURE__ */ e.jsx(
|
|
2254
2255
|
T.Item,
|
|
@@ -2285,7 +2286,7 @@ const pn = {
|
|
|
2285
2286
|
size: "large",
|
|
2286
2287
|
open: E,
|
|
2287
2288
|
onClose: () => b(!1),
|
|
2288
|
-
children: w && /* @__PURE__ */ e.jsx(
|
|
2289
|
+
children: w && /* @__PURE__ */ e.jsx(_a, { appCode: w.app_code })
|
|
2289
2290
|
}
|
|
2290
2291
|
),
|
|
2291
2292
|
/* @__PURE__ */ e.jsx(
|
|
@@ -2299,7 +2300,7 @@ const pn = {
|
|
|
2299
2300
|
extra: B && /* @__PURE__ */ e.jsxs(se, { children: [
|
|
2300
2301
|
/* @__PURE__ */ e.jsx(Re, { type: "secondary", style: { fontSize: 12 }, children: "分享" }),
|
|
2301
2302
|
/* @__PURE__ */ e.jsx(
|
|
2302
|
-
|
|
2303
|
+
qt,
|
|
2303
2304
|
{
|
|
2304
2305
|
size: "small",
|
|
2305
2306
|
checked: !!B.share_enabled,
|
|
@@ -2308,14 +2309,14 @@ const pn = {
|
|
|
2308
2309
|
)
|
|
2309
2310
|
] }),
|
|
2310
2311
|
children: B && (B.share_enabled ? /* @__PURE__ */ e.jsx(
|
|
2311
|
-
|
|
2312
|
+
za,
|
|
2312
2313
|
{
|
|
2313
2314
|
app: B,
|
|
2314
2315
|
onDisable: () => oe(B, !1),
|
|
2315
2316
|
onRefresh: () => oe(B, !0)
|
|
2316
2317
|
}
|
|
2317
2318
|
) : /* @__PURE__ */ e.jsx(
|
|
2318
|
-
|
|
2319
|
+
Ia,
|
|
2319
2320
|
{
|
|
2320
2321
|
app: B,
|
|
2321
2322
|
onEnable: () => oe(B, !0)
|
|
@@ -2324,7 +2325,7 @@ const pn = {
|
|
|
2324
2325
|
}
|
|
2325
2326
|
)
|
|
2326
2327
|
] });
|
|
2327
|
-
},
|
|
2328
|
+
}, Ea = "本 JVM 未装配 z-llm 技能目录:/api/llm-gateway/skill/template-list 实测 404,当前进程路由表(1377 条)里没有任何技能模板端点。已绑定技能仍取自应用记录(skill_codes),但「可选技能清单」要等 z-llm 侧补出 /api/z-llm/config/skill-template/list 之后才能孵化。", Oa = "本 JVM 未装配 z-llm 知识库目录:/api/llm-gateway/knowledge/list 实测 404,当前进程路由表里没有任何知识库目录端点;/api/knowledge-search/list 虽在册,但后端源码自述是兜底实现(固定返回 1 行 hitCount=0 的假数据),按 004「宁占位不接假数据」不接。", gs = (t) => {
|
|
2328
2329
|
if (t == null || t === "") return [];
|
|
2329
2330
|
if (Array.isArray(t)) return t;
|
|
2330
2331
|
if (typeof t == "string")
|
|
@@ -2335,15 +2336,15 @@ const pn = {
|
|
|
2335
2336
|
return [];
|
|
2336
2337
|
}
|
|
2337
2338
|
return [];
|
|
2338
|
-
},
|
|
2339
|
+
}, Ra = (t) => t == null ? "" : typeof t == "string" ? t : t.toolCode ?? t.tool_code ?? "", _a = () => {
|
|
2339
2340
|
var S, I;
|
|
2340
2341
|
const [t, s] = l([]), [n, a] = l(null), [m, i] = l([]), [d, o] = l([]), [y, c] = l([]), [r, x] = l([]), [L, G] = l(!1), [U, u] = l(!1), [A, k] = l("tools"), [f, h] = l(!1), [F, E] = l(null), [b, w] = l(null), [$, _] = l(null), g = (N) => {
|
|
2341
2342
|
N && (G(!0), w(null), _(null), ve.appGet({ params: { appCode: N } }).then((z) => {
|
|
2342
2343
|
const q = (z == null ? void 0 : z.data) || z || {};
|
|
2343
|
-
o(gs(q.tools).map(
|
|
2344
|
+
o(gs(q.tools).map(Ra).filter(Boolean)), c(gs(q.skill_codes ?? q.skillCodes).map(String)), x(gs(q.knowledge_ids ?? q.knowledgeIds).map(String));
|
|
2344
2345
|
}).catch((z) => {
|
|
2345
2346
|
_(z), o([]), c([]), x([]);
|
|
2346
|
-
}),
|
|
2347
|
+
}), fa.toolTemplateList().then((z) => {
|
|
2347
2348
|
const q = Array.isArray(z) ? z : (z == null ? void 0 : z.data) || [];
|
|
2348
2349
|
i(q.map((p) => ({
|
|
2349
2350
|
toolCode: p.tool_code ?? p.toolCode ?? "",
|
|
@@ -2445,7 +2446,7 @@ const pn = {
|
|
|
2445
2446
|
j,
|
|
2446
2447
|
{
|
|
2447
2448
|
type: "primary",
|
|
2448
|
-
icon: /* @__PURE__ */ e.jsx(
|
|
2449
|
+
icon: /* @__PURE__ */ e.jsx($t, {}),
|
|
2449
2450
|
onClick: V,
|
|
2450
2451
|
loading: U,
|
|
2451
2452
|
children: "保存配置"
|
|
@@ -2475,7 +2476,7 @@ const pn = {
|
|
|
2475
2476
|
description: `GET /api/z-llm/config/tool-template/list 失败(${(I = b == null ? void 0 : b.response) != null && I.status ? "HTTP " + b.response.status : "请求失败"})。这里显示的是失败,不是"暂无可用项"。`,
|
|
2476
2477
|
onRetry: () => g(n.app_code)
|
|
2477
2478
|
}
|
|
2478
|
-
) : ee("可用工具", /* @__PURE__ */ e.jsx(
|
|
2479
|
+
) : ee("可用工具", /* @__PURE__ */ e.jsx(_l, {}), m, d, "tool", (N) => /* @__PURE__ */ e.jsxs("div", { onClick: () => O("tool", N.toolCode), style: {
|
|
2479
2480
|
padding: "10px 14px",
|
|
2480
2481
|
background: B(d, N.toolCode) ? "#e6f7ff" : "#fff",
|
|
2481
2482
|
border: `1px solid ${B(d, N.toolCode) ? "#91d5ff" : "#f0f0f0"}`,
|
|
@@ -2493,7 +2494,7 @@ const pn = {
|
|
|
2493
2494
|
display: "flex",
|
|
2494
2495
|
alignItems: "center",
|
|
2495
2496
|
justifyContent: "center"
|
|
2496
|
-
}, children: B(d, N.toolCode) && /* @__PURE__ */ e.jsx(
|
|
2497
|
+
}, children: B(d, N.toolCode) && /* @__PURE__ */ e.jsx($t, { style: { color: "#fff", fontSize: 12 } }) }),
|
|
2497
2498
|
/* @__PURE__ */ e.jsxs("div", { children: [
|
|
2498
2499
|
/* @__PURE__ */ e.jsx("div", { style: {
|
|
2499
2500
|
fontWeight: 500,
|
|
@@ -2512,7 +2513,7 @@ const pn = {
|
|
|
2512
2513
|
type: "warning",
|
|
2513
2514
|
showIcon: !0,
|
|
2514
2515
|
title: "本 JVM 未装配 z-llm 技能目录",
|
|
2515
|
-
description:
|
|
2516
|
+
description: Ea
|
|
2516
2517
|
}
|
|
2517
2518
|
),
|
|
2518
2519
|
y.length > 0 && /* @__PURE__ */ e.jsxs("div", { style: { marginTop: 12, fontSize: 12, color: "#8c8c8c" }, children: [
|
|
@@ -2527,7 +2528,7 @@ const pn = {
|
|
|
2527
2528
|
type: "warning",
|
|
2528
2529
|
showIcon: !0,
|
|
2529
2530
|
title: "本 JVM 未装配 z-llm 知识库目录",
|
|
2530
|
-
description:
|
|
2531
|
+
description: Oa
|
|
2531
2532
|
}
|
|
2532
2533
|
),
|
|
2533
2534
|
r.length > 0 && /* @__PURE__ */ e.jsxs("div", { style: { marginTop: 12, fontSize: 12, color: "#8c8c8c" }, children: [
|
|
@@ -2541,7 +2542,7 @@ const pn = {
|
|
|
2541
2542
|
/* @__PURE__ */ e.jsx("div", { style: { marginTop: 16, color: "#8c8c8c" }, children: "请从左侧选择一个应用" })
|
|
2542
2543
|
] }) })
|
|
2543
2544
|
] }) });
|
|
2544
|
-
}, { TextArea:
|
|
2545
|
+
}, { TextArea: Na } = Z, La = ({ children: t, className: s }) => {
|
|
2545
2546
|
const n = String(t).replace(/\n$/, ""), [a, m] = l(!1), i = () => {
|
|
2546
2547
|
navigator.clipboard.writeText(n).then(() => {
|
|
2547
2548
|
m(!0), setTimeout(() => m(!1), 2e3);
|
|
@@ -2552,7 +2553,7 @@ const pn = {
|
|
|
2552
2553
|
j,
|
|
2553
2554
|
{
|
|
2554
2555
|
size: "small",
|
|
2555
|
-
icon: a ? /* @__PURE__ */ e.jsx(
|
|
2556
|
+
icon: a ? /* @__PURE__ */ e.jsx($t, {}) : /* @__PURE__ */ e.jsx(Fe, {}),
|
|
2556
2557
|
onClick: i,
|
|
2557
2558
|
style: { position: "absolute", right: 8, top: 8, opacity: 0.7 },
|
|
2558
2559
|
children: a ? "已复制" : "复制"
|
|
@@ -2569,7 +2570,7 @@ const pn = {
|
|
|
2569
2570
|
fontFamily: 'Consolas, Monaco, "Courier New", monospace'
|
|
2570
2571
|
}, children: /* @__PURE__ */ e.jsx("code", { className: s, children: n }) })
|
|
2571
2572
|
] });
|
|
2572
|
-
},
|
|
2573
|
+
}, Ba = ({ msg: t }) => {
|
|
2573
2574
|
const s = t.role === "user", n = t.status === "FAILED";
|
|
2574
2575
|
return /* @__PURE__ */ e.jsxs("div", { style: {
|
|
2575
2576
|
display: "flex",
|
|
@@ -2612,7 +2613,7 @@ const pn = {
|
|
|
2612
2613
|
}, children: /* @__PURE__ */ e.jsx(
|
|
2613
2614
|
sl,
|
|
2614
2615
|
{
|
|
2615
|
-
remarkPlugins: [
|
|
2616
|
+
remarkPlugins: [ca],
|
|
2616
2617
|
components: {
|
|
2617
2618
|
code({ node: a, inline: m, className: i, children: d, ...o }) {
|
|
2618
2619
|
return m ? /* @__PURE__ */ e.jsx("code", { style: {
|
|
@@ -2622,7 +2623,7 @@ const pn = {
|
|
|
2622
2623
|
fontFamily: "monospace",
|
|
2623
2624
|
fontSize: "0.9em",
|
|
2624
2625
|
color: "#c7254e"
|
|
2625
|
-
}, ...o, children: d }) : /* @__PURE__ */ e.jsx(
|
|
2626
|
+
}, ...o, children: d }) : /* @__PURE__ */ e.jsx(La, { className: i, children: d });
|
|
2626
2627
|
},
|
|
2627
2628
|
p({ children: a }) {
|
|
2628
2629
|
return /* @__PURE__ */ e.jsx("p", { style: { margin: "0 0 8px 0" }, children: a });
|
|
@@ -2675,7 +2676,7 @@ const pn = {
|
|
|
2675
2676
|
}
|
|
2676
2677
|
)
|
|
2677
2678
|
] });
|
|
2678
|
-
},
|
|
2679
|
+
}, Da = ({ appName: t, appDesc: s }) => /* @__PURE__ */ e.jsxs("div", { style: {
|
|
2679
2680
|
display: "flex",
|
|
2680
2681
|
flexDirection: "column",
|
|
2681
2682
|
alignItems: "center",
|
|
@@ -2710,7 +2711,7 @@ const pn = {
|
|
|
2710
2711
|
},
|
|
2711
2712
|
a
|
|
2712
2713
|
)) })
|
|
2713
|
-
] }),
|
|
2714
|
+
] }), ir = () => {
|
|
2714
2715
|
const { shareCode: t } = el(), [s, n] = l(!0), [a, m] = l(""), [i, d] = l(""), [o, y] = l(""), [c, r] = l([]), [x, L] = l(""), [G, U] = l(!1), [u, A] = l(!1), [k, f] = l(""), [h, F] = l(!1), E = $e(null), b = $e(null);
|
|
2715
2716
|
$e(null), ae(() => {
|
|
2716
2717
|
w();
|
|
@@ -2843,7 +2844,7 @@ const pn = {
|
|
|
2843
2844
|
] }),
|
|
2844
2845
|
/* @__PURE__ */ e.jsxs("div", { style: { display: "flex", alignItems: "center", gap: 8 }, children: [
|
|
2845
2846
|
/* @__PURE__ */ e.jsxs("span", { style: { fontSize: 12, color: u ? "#52c41a" : "#ff4d4f" }, children: [
|
|
2846
|
-
/* @__PURE__ */ e.jsx(
|
|
2847
|
+
/* @__PURE__ */ e.jsx($t, { style: { marginRight: 4 } }),
|
|
2847
2848
|
u ? "已连接" : "未连接"
|
|
2848
2849
|
] }),
|
|
2849
2850
|
/* @__PURE__ */ e.jsx(ie, { title: "清空对话", children: /* @__PURE__ */ e.jsx(
|
|
@@ -2859,11 +2860,11 @@ const pn = {
|
|
|
2859
2860
|
] })
|
|
2860
2861
|
] }),
|
|
2861
2862
|
/* @__PURE__ */ e.jsxs("div", { style: { flex: 1, overflowY: "auto", padding: "16px 24px" }, children: [
|
|
2862
|
-
c.length === 0 ? /* @__PURE__ */ e.jsx(
|
|
2863
|
+
c.length === 0 ? /* @__PURE__ */ e.jsx(Da, { appName: i, appDesc: o }) : /* @__PURE__ */ e.jsx(e.Fragment, { children: /* @__PURE__ */ e.jsx(
|
|
2863
2864
|
vt,
|
|
2864
2865
|
{
|
|
2865
2866
|
dataSource: c,
|
|
2866
|
-
renderItem: (B) => /* @__PURE__ */ e.jsx(
|
|
2867
|
+
renderItem: (B) => /* @__PURE__ */ e.jsx(Ba, { msg: B }),
|
|
2867
2868
|
locale: { emptyText: "" }
|
|
2868
2869
|
}
|
|
2869
2870
|
) }),
|
|
@@ -2878,7 +2879,7 @@ const pn = {
|
|
|
2878
2879
|
}, children: [
|
|
2879
2880
|
/* @__PURE__ */ e.jsxs("div", { style: { display: "flex", gap: 12, alignItems: "flex-end" }, children: [
|
|
2880
2881
|
/* @__PURE__ */ e.jsx(
|
|
2881
|
-
|
|
2882
|
+
Na,
|
|
2882
2883
|
{
|
|
2883
2884
|
ref: b,
|
|
2884
2885
|
value: x,
|
|
@@ -2908,7 +2909,7 @@ const pn = {
|
|
|
2908
2909
|
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
|
|
2909
2910
|
` })
|
|
2910
2911
|
] });
|
|
2911
|
-
}, { confirm:
|
|
2912
|
+
}, { confirm: Fa } = ye, ms = [
|
|
2912
2913
|
{
|
|
2913
2914
|
providerCode: "ollama",
|
|
2914
2915
|
providerName: "Ollama",
|
|
@@ -3043,11 +3044,11 @@ const pn = {
|
|
|
3043
3044
|
outputPrice: 0
|
|
3044
3045
|
}
|
|
3045
3046
|
], bt = [
|
|
3046
|
-
{ key: "chat", title: "文本生成", icon: /* @__PURE__ */ e.jsx(
|
|
3047
|
+
{ key: "chat", title: "文本生成", icon: /* @__PURE__ */ e.jsx(Nl, {}), color: "#1677ff", bg: "#e6f4ff", border: "#1677ff" },
|
|
3047
3048
|
{ key: "code", title: "代码生成", icon: /* @__PURE__ */ e.jsx(st, {}), color: "#722ed1", bg: "#f9f0ff", border: "#722ed1" },
|
|
3048
|
-
{ key: "image", title: "图像生成", icon: /* @__PURE__ */ e.jsx(
|
|
3049
|
+
{ key: "image", title: "图像生成", icon: /* @__PURE__ */ e.jsx(Ll, {}), color: "#13c2c2", bg: "#e6fffb", border: "#13c2c2" },
|
|
3049
3050
|
{ key: "vision", title: "视觉理解", icon: /* @__PURE__ */ e.jsx(lt, {}), color: "#fa8c16", bg: "#fff7e6", border: "#fa8c16" },
|
|
3050
|
-
{ key: "audio", title: "语音", icon: /* @__PURE__ */ e.jsx(
|
|
3051
|
+
{ key: "audio", title: "语音", icon: /* @__PURE__ */ e.jsx(Bl, {}), color: "#eb2f96", bg: "#fff0f6", border: "#eb2f96" },
|
|
3051
3052
|
{
|
|
3052
3053
|
key: "embedding",
|
|
3053
3054
|
title: "嵌入/向量",
|
|
@@ -3056,14 +3057,14 @@ const pn = {
|
|
|
3056
3057
|
bg: "#f6ffed",
|
|
3057
3058
|
border: "#52c41a"
|
|
3058
3059
|
}
|
|
3059
|
-
],
|
|
3060
|
+
], Ma = [
|
|
3060
3061
|
{ value: "ollama", label: "Ollama" },
|
|
3061
3062
|
{ value: "openai", label: "OpenAI" },
|
|
3062
3063
|
{ value: "dashscope", label: "阿里通义" },
|
|
3063
3064
|
{ value: "azure", label: "Azure OpenAI" },
|
|
3064
3065
|
{ value: "anthropic", label: "Anthropic" },
|
|
3065
3066
|
{ value: "custom", label: "自定义" }
|
|
3066
|
-
],
|
|
3067
|
+
], rr = () => {
|
|
3067
3068
|
const [t, s] = l([]), [n, a] = l([]), [m, i] = l(!1), [d, o] = l("chat"), [y, c] = l(null), [r, x] = l(!1), [L, G] = l(null), [U] = T.useForm(), [u, A] = l(!1), [k, f] = l(null), [h] = T.useForm(), F = async () => {
|
|
3068
3069
|
i(!0);
|
|
3069
3070
|
try {
|
|
@@ -3100,7 +3101,7 @@ const pn = {
|
|
|
3100
3101
|
}, _ = (S) => {
|
|
3101
3102
|
G(S), U.setFieldsValue(S), x(!0);
|
|
3102
3103
|
}, g = (S) => {
|
|
3103
|
-
|
|
3104
|
+
Fa({
|
|
3104
3105
|
title: "确认删除",
|
|
3105
3106
|
content: `删除模型 ${S.modelName} ?`,
|
|
3106
3107
|
onOk: async () => {
|
|
@@ -3446,7 +3447,7 @@ const pn = {
|
|
|
3446
3447
|
/* @__PURE__ */ e.jsx(J, { span: 12, children: /* @__PURE__ */ e.jsx(T.Item, { name: "providerName", label: "供应商名称", rules: [{ required: !0 }], children: /* @__PURE__ */ e.jsx(Z, { placeholder: "如: Ollama, OpenAI" }) }) })
|
|
3447
3448
|
] }),
|
|
3448
3449
|
/* @__PURE__ */ e.jsxs(pe, { gutter: 16, children: [
|
|
3449
|
-
/* @__PURE__ */ e.jsx(J, { span: 12, children: /* @__PURE__ */ e.jsx(T.Item, { name: "providerType", label: "类型", rules: [{ required: !0 }], children: /* @__PURE__ */ e.jsx(Y, { placeholder: "选择类型", children:
|
|
3450
|
+
/* @__PURE__ */ e.jsx(J, { span: 12, children: /* @__PURE__ */ e.jsx(T.Item, { name: "providerType", label: "类型", rules: [{ required: !0 }], children: /* @__PURE__ */ e.jsx(Y, { placeholder: "选择类型", children: Ma.map((S) => /* @__PURE__ */ e.jsx(Y.Option, { value: S.value, children: S.label }, S.value)) }) }) }),
|
|
3450
3451
|
/* @__PURE__ */ e.jsx(J, { span: 12, children: /* @__PURE__ */ e.jsx(T.Item, { name: "status", label: "状态", initialValue: "ACTIVE", children: /* @__PURE__ */ e.jsxs(Y, { children: [
|
|
3451
3452
|
/* @__PURE__ */ e.jsx(Y.Option, { value: "ACTIVE", children: "正常" }),
|
|
3452
3453
|
/* @__PURE__ */ e.jsx(Y.Option, { value: "INACTIVE", children: "禁用" })
|
|
@@ -3476,7 +3477,7 @@ const pn = {
|
|
|
3476
3477
|
}
|
|
3477
3478
|
)
|
|
3478
3479
|
] });
|
|
3479
|
-
}, { confirm:
|
|
3480
|
+
}, { confirm: Ua } = ye, Ga = () => {
|
|
3480
3481
|
const [t, s] = l([]), [n, a] = l(!1), [m, i] = l(!1), [d, o] = l(null), [y] = T.useForm(), c = async () => {
|
|
3481
3482
|
a(!0);
|
|
3482
3483
|
try {
|
|
@@ -3496,7 +3497,7 @@ const pn = {
|
|
|
3496
3497
|
}, x = (A) => {
|
|
3497
3498
|
o(A), y.setFieldsValue(A), i(!0);
|
|
3498
3499
|
}, L = async (A) => {
|
|
3499
|
-
|
|
3500
|
+
Ua({
|
|
3500
3501
|
title: "确认删除",
|
|
3501
3502
|
content: `删除供应商 ${A.providerName} ?`,
|
|
3502
3503
|
onOk: async () => {
|
|
@@ -3577,7 +3578,7 @@ const pn = {
|
|
|
3577
3578
|
) }) })
|
|
3578
3579
|
] }),
|
|
3579
3580
|
/* @__PURE__ */ e.jsx("div", { style: { marginBottom: 16 }, children: /* @__PURE__ */ e.jsx(j, { type: "primary", icon: /* @__PURE__ */ e.jsx(we, {}), onClick: r, children: "添加供应商" }) }),
|
|
3580
|
-
t.length === 0 && !n ? /* @__PURE__ */ e.jsx(
|
|
3581
|
+
t.length === 0 && !n ? /* @__PURE__ */ e.jsx(Wt, { title: "暂无供应商", description: "点击上方按钮添加第一个供应商" }) : /* @__PURE__ */ e.jsx(fe, { columns: u, dataSource: t, loading: n, rowKey: "id" }),
|
|
3581
3582
|
/* @__PURE__ */ e.jsx(
|
|
3582
3583
|
ye,
|
|
3583
3584
|
{
|
|
@@ -3605,7 +3606,7 @@ const pn = {
|
|
|
3605
3606
|
}
|
|
3606
3607
|
)
|
|
3607
3608
|
] });
|
|
3608
|
-
}, { confirm:
|
|
3609
|
+
}, { confirm: Ka } = ye, $a = () => {
|
|
3609
3610
|
const [t, s] = l([]), [n, a] = l([]), [m, i] = l(!1), [d, o] = l(!1), [y, c] = l(null), [r] = T.useForm(), x = async () => {
|
|
3610
3611
|
i(!0);
|
|
3611
3612
|
try {
|
|
@@ -3631,7 +3632,7 @@ const pn = {
|
|
|
3631
3632
|
}, U = (f) => {
|
|
3632
3633
|
c(f), r.setFieldsValue(f), o(!0);
|
|
3633
3634
|
}, u = async (f) => {
|
|
3634
|
-
|
|
3635
|
+
Ka({
|
|
3635
3636
|
title: "确认删除",
|
|
3636
3637
|
content: `删除模型 ${f.modelName} ?`,
|
|
3637
3638
|
onOk: async () => {
|
|
@@ -3698,7 +3699,7 @@ const pn = {
|
|
|
3698
3699
|
}
|
|
3699
3700
|
),
|
|
3700
3701
|
/* @__PURE__ */ e.jsx("div", { style: { marginBottom: 16 }, children: /* @__PURE__ */ e.jsx(j, { type: "primary", icon: /* @__PURE__ */ e.jsx(we, {}), onClick: G, children: "添加模型" }) }),
|
|
3701
|
-
t.length === 0 && !m ? /* @__PURE__ */ e.jsx(
|
|
3702
|
+
t.length === 0 && !m ? /* @__PURE__ */ e.jsx(Wt, { title: "暂无模型", description: "点击上方按钮添加第一个模型" }) : /* @__PURE__ */ e.jsx(fe, { columns: k, dataSource: t, loading: m, rowKey: "id" }),
|
|
3702
3703
|
/* @__PURE__ */ e.jsx(
|
|
3703
3704
|
ye,
|
|
3704
3705
|
{
|
|
@@ -3736,7 +3737,7 @@ const pn = {
|
|
|
3736
3737
|
}
|
|
3737
3738
|
)
|
|
3738
3739
|
] });
|
|
3739
|
-
}, { Text: ys } = He, { TabPane: Xt } = be,
|
|
3740
|
+
}, { Text: ys } = He, { TabPane: Xt } = be, Va = () => {
|
|
3740
3741
|
const [t, s] = l(null), [n, a] = l([]), [m, i] = l([]), [d, o] = l([]), [y, c] = l([]), [r, x] = l(!1), [L, G] = l(null), [U, u] = l(null), [A, k] = l(null), [f, h] = l([]), [F, E] = l([]), [b, w] = l([]);
|
|
3741
3742
|
ae(() => {
|
|
3742
3743
|
pt("/llm-center/provider/list").then((p) => {
|
|
@@ -3961,7 +3962,7 @@ const pn = {
|
|
|
3961
3962
|
{
|
|
3962
3963
|
title: /* @__PURE__ */ e.jsx("span", { style: { color: "#666", fontSize: 13 }, children: "累计费用" }),
|
|
3963
3964
|
value: (t == null ? void 0 : t.totalCost) || 0,
|
|
3964
|
-
prefix: /* @__PURE__ */ e.jsx(
|
|
3965
|
+
prefix: /* @__PURE__ */ e.jsx(Vt, { style: { color: "#faad14" } }),
|
|
3965
3966
|
styles: { content: { color: "#333", fontSize: 22, fontWeight: 700 } }
|
|
3966
3967
|
}
|
|
3967
3968
|
) }) }),
|
|
@@ -3980,7 +3981,7 @@ const pn = {
|
|
|
3980
3981
|
{
|
|
3981
3982
|
title: /* @__PURE__ */ e.jsx("span", { style: { color: "#666", fontSize: 13 }, children: "今日费用" }),
|
|
3982
3983
|
value: (t == null ? void 0 : t.todayCost) || 0,
|
|
3983
|
-
prefix: /* @__PURE__ */ e.jsx(
|
|
3984
|
+
prefix: /* @__PURE__ */ e.jsx(Vt, { style: { color: "#faad14" } }),
|
|
3984
3985
|
precision: 4,
|
|
3985
3986
|
suffix: "元",
|
|
3986
3987
|
styles: { content: { color: "#333", fontSize: 22, fontWeight: 700 } }
|
|
@@ -4022,7 +4023,7 @@ const pn = {
|
|
|
4022
4023
|
) }) }, "records")
|
|
4023
4024
|
] })
|
|
4024
4025
|
] });
|
|
4025
|
-
},
|
|
4026
|
+
}, or = () => {
|
|
4026
4027
|
const [t, s] = l("model");
|
|
4027
4028
|
return /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
4028
4029
|
/* @__PURE__ */ e.jsx(
|
|
@@ -4047,7 +4048,7 @@ const pn = {
|
|
|
4047
4048
|
/* @__PURE__ */ e.jsx(_e, { style: { color: "#1677ff" } }),
|
|
4048
4049
|
" 模型"
|
|
4049
4050
|
] }),
|
|
4050
|
-
children: /* @__PURE__ */ e.jsx("div", { style: { paddingTop: 8 }, children: /* @__PURE__ */ e.jsx(
|
|
4051
|
+
children: /* @__PURE__ */ e.jsx("div", { style: { paddingTop: 8 }, children: /* @__PURE__ */ e.jsx($a, {}) })
|
|
4051
4052
|
},
|
|
4052
4053
|
{
|
|
4053
4054
|
key: "provider",
|
|
@@ -4055,7 +4056,7 @@ const pn = {
|
|
|
4055
4056
|
/* @__PURE__ */ e.jsx(ft, { style: { color: "#722ed1" } }),
|
|
4056
4057
|
" 供应商"
|
|
4057
4058
|
] }),
|
|
4058
|
-
children: /* @__PURE__ */ e.jsx("div", { style: { paddingTop: 8 }, children: /* @__PURE__ */ e.jsx(
|
|
4059
|
+
children: /* @__PURE__ */ e.jsx("div", { style: { paddingTop: 8 }, children: /* @__PURE__ */ e.jsx(Ga, {}) })
|
|
4059
4060
|
},
|
|
4060
4061
|
{
|
|
4061
4062
|
key: "usage",
|
|
@@ -4063,13 +4064,13 @@ const pn = {
|
|
|
4063
4064
|
/* @__PURE__ */ e.jsx(Gs, { style: { color: "#13c2c2" } }),
|
|
4064
4065
|
" 用量统计"
|
|
4065
4066
|
] }),
|
|
4066
|
-
children: /* @__PURE__ */ e.jsx("div", { style: { paddingTop: 8 }, children: /* @__PURE__ */ e.jsx(
|
|
4067
|
+
children: /* @__PURE__ */ e.jsx("div", { style: { paddingTop: 8 }, children: /* @__PURE__ */ e.jsx(Va, {}) })
|
|
4067
4068
|
}
|
|
4068
4069
|
]
|
|
4069
4070
|
}
|
|
4070
4071
|
)
|
|
4071
4072
|
] });
|
|
4072
|
-
}, { Text: hn } = He, gn = (t) => t ? Number(t).toFixed(4) : "0.0000",
|
|
4073
|
+
}, { Text: hn } = He, gn = (t) => t ? Number(t).toFixed(4) : "0.0000", Wa = ({ open: t, ak: s, onClose: n }) => {
|
|
4073
4074
|
const [a, m] = l(null), [i, d] = l([]), [o, y] = l([]), [c, r] = l(!1);
|
|
4074
4075
|
ae(() => {
|
|
4075
4076
|
!t || !s || x();
|
|
@@ -4173,7 +4174,7 @@ const pn = {
|
|
|
4173
4174
|
{
|
|
4174
4175
|
title: "累计费用",
|
|
4175
4176
|
value: gn(a == null ? void 0 : a.totalCost),
|
|
4176
|
-
prefix: /* @__PURE__ */ e.jsx(
|
|
4177
|
+
prefix: /* @__PURE__ */ e.jsx(Vt, { style: { color: "#faad14" } }),
|
|
4177
4178
|
styles: { content: { fontSize: 18 } }
|
|
4178
4179
|
}
|
|
4179
4180
|
) }) }),
|
|
@@ -4192,7 +4193,7 @@ const pn = {
|
|
|
4192
4193
|
{
|
|
4193
4194
|
title: "今日费用",
|
|
4194
4195
|
value: gn(a == null ? void 0 : a.todayCost),
|
|
4195
|
-
prefix: /* @__PURE__ */ e.jsx(
|
|
4196
|
+
prefix: /* @__PURE__ */ e.jsx(Vt, { style: { color: "#faad14" } }),
|
|
4196
4197
|
styles: { content: { fontSize: 18 } }
|
|
4197
4198
|
}
|
|
4198
4199
|
) }) })
|
|
@@ -4215,7 +4216,7 @@ const pn = {
|
|
|
4215
4216
|
] })
|
|
4216
4217
|
}
|
|
4217
4218
|
);
|
|
4218
|
-
}, { confirm:
|
|
4219
|
+
}, { confirm: qa } = ye, mn = "http://localhost:8888", yn = (t) => t ? t >= 1e6 ? (t / 1e6).toFixed(1) + "M" : t >= 1e3 ? (t / 1e3).toFixed(1) + "K" : Number(t).toLocaleString() : "0", dr = () => {
|
|
4219
4220
|
const [t, s] = l("PERSONAL"), [n, a] = l([]), [m, i] = l(!1), [d, o] = l(!1), [y, c] = l(null), [r] = T.useForm(), [x, L] = l(null), [G, U] = l(null), [u, A] = l([]), k = async () => {
|
|
4220
4221
|
i(!0);
|
|
4221
4222
|
try {
|
|
@@ -4252,7 +4253,7 @@ const pn = {
|
|
|
4252
4253
|
appName: O.appName
|
|
4253
4254
|
}), o(!0);
|
|
4254
4255
|
}, E = (O) => {
|
|
4255
|
-
|
|
4256
|
+
qa({
|
|
4256
4257
|
title: "确认删除",
|
|
4257
4258
|
content: `删除 AK「${O.akName}」?此操作不可恢复。`,
|
|
4258
4259
|
okText: "删除",
|
|
@@ -4625,7 +4626,7 @@ const pn = {
|
|
|
4625
4626
|
}
|
|
4626
4627
|
),
|
|
4627
4628
|
/* @__PURE__ */ e.jsx(
|
|
4628
|
-
|
|
4629
|
+
Wa,
|
|
4629
4630
|
{
|
|
4630
4631
|
open: !!G,
|
|
4631
4632
|
ak: G,
|
|
@@ -4633,8 +4634,8 @@ const pn = {
|
|
|
4633
4634
|
}
|
|
4634
4635
|
)
|
|
4635
4636
|
] });
|
|
4636
|
-
}, { TextArea:
|
|
4637
|
-
function
|
|
4637
|
+
}, { TextArea: Ha } = Z, { Text: Ct } = He;
|
|
4638
|
+
function cr() {
|
|
4638
4639
|
const [t, s] = l("servers"), [n, a] = l([]), [m, i] = l(!1), [d, o] = l(null), [y, c] = l([]), [r, x] = l(null), [L, G] = l("{}"), [U, u] = l(""), [A, k] = l(!1);
|
|
4639
4640
|
ae(() => {
|
|
4640
4641
|
f();
|
|
@@ -4725,7 +4726,7 @@ function or() {
|
|
|
4725
4726
|
] }),
|
|
4726
4727
|
t === "servers" && /* @__PURE__ */ e.jsxs("div", { style: { flex: 1, display: "flex", gap: 16, overflow: "hidden" }, children: [
|
|
4727
4728
|
/* @__PURE__ */ e.jsx("div", { style: { flex: d ? "0 0 50%" : 1, overflow: "auto" }, children: n.length === 0 && !m ? /* @__PURE__ */ e.jsx(
|
|
4728
|
-
|
|
4729
|
+
Wt,
|
|
4729
4730
|
{
|
|
4730
4731
|
title: "暂无 MCP server",
|
|
4731
4732
|
description: "z.mcp.enabled=false,或还没配 z.mcp.servers[*] 上游"
|
|
@@ -4774,7 +4775,7 @@ function or() {
|
|
|
4774
4775
|
}
|
|
4775
4776
|
)
|
|
4776
4777
|
] }),
|
|
4777
|
-
y.length === 0 ? /* @__PURE__ */ e.jsx(
|
|
4778
|
+
y.length === 0 ? /* @__PURE__ */ e.jsx(Wt, { title: "暂无工具", description: "该服务未暴露可用工具", size: "sm" }) : y.map((w) => /* @__PURE__ */ e.jsx(
|
|
4778
4779
|
H,
|
|
4779
4780
|
{
|
|
4780
4781
|
size: "small",
|
|
@@ -4828,7 +4829,7 @@ function or() {
|
|
|
4828
4829
|
] }),
|
|
4829
4830
|
/* @__PURE__ */ e.jsx(Ct, { type: "secondary", style: { marginBottom: 4 }, children: "参数 (JSON):" }),
|
|
4830
4831
|
/* @__PURE__ */ e.jsx(
|
|
4831
|
-
|
|
4832
|
+
Ha,
|
|
4832
4833
|
{
|
|
4833
4834
|
rows: 8,
|
|
4834
4835
|
value: L,
|
|
@@ -4866,12 +4867,12 @@ function or() {
|
|
|
4866
4867
|
] });
|
|
4867
4868
|
}
|
|
4868
4869
|
const Pt = {
|
|
4869
|
-
private: { label: "私有", color: "default", icon: /* @__PURE__ */ e.jsx(
|
|
4870
|
+
private: { label: "私有", color: "default", icon: /* @__PURE__ */ e.jsx(Ht, {}) },
|
|
4870
4871
|
"public-read": { label: "公共读", color: "blue", icon: /* @__PURE__ */ e.jsx(lt, {}) },
|
|
4871
4872
|
"public-read-write": { label: "公共读写", color: "orange", icon: /* @__PURE__ */ e.jsx(It, {}) },
|
|
4872
|
-
"authenticated-read": { label: "认证读", color: "purple", icon: /* @__PURE__ */ e.jsx(
|
|
4873
|
+
"authenticated-read": { label: "认证读", color: "purple", icon: /* @__PURE__ */ e.jsx(Dl, {}) }
|
|
4873
4874
|
};
|
|
4874
|
-
function
|
|
4875
|
+
function pr() {
|
|
4875
4876
|
const [t, s] = l([]), [n, a] = l(!1), [m, i] = l(!1), [d] = T.useForm(), [o, y] = l(!1), c = tl(), r = Ee(async () => {
|
|
4876
4877
|
a(!0);
|
|
4877
4878
|
try {
|
|
@@ -4966,7 +4967,7 @@ function dr() {
|
|
|
4966
4967
|
title: "私有",
|
|
4967
4968
|
value: t.filter((u) => !u.acl || u.acl === "private").length,
|
|
4968
4969
|
styles: { content: { color: "#999" } },
|
|
4969
|
-
prefix: /* @__PURE__ */ e.jsx(
|
|
4970
|
+
prefix: /* @__PURE__ */ e.jsx(Ht, {})
|
|
4970
4971
|
}
|
|
4971
4972
|
) }) })
|
|
4972
4973
|
] }),
|
|
@@ -5148,12 +5149,12 @@ const fn = (t) => {
|
|
|
5148
5149
|
for (; a >= 1024 && n < s.length - 1; )
|
|
5149
5150
|
a /= 1024, n++;
|
|
5150
5151
|
return a.toFixed(n === 0 ? 0 : 1) + " " + s[n];
|
|
5151
|
-
},
|
|
5152
|
+
}, Ja = (t) => {
|
|
5152
5153
|
var n;
|
|
5153
5154
|
if (t.endsWith("/")) return /* @__PURE__ */ e.jsx(ut, { style: { color: "#faad14" } });
|
|
5154
5155
|
const s = (n = t.split(".").pop()) == null ? void 0 : n.toLowerCase();
|
|
5155
5156
|
return ["zip", "tar", "gz", "rar", "7z"].includes(s) ? /* @__PURE__ */ e.jsx(qn, { style: { color: "#722ed1" } }) : ["png", "jpg", "jpeg", "gif", "svg", "webp"].includes(s) ? /* @__PURE__ */ e.jsx(
|
|
5156
|
-
|
|
5157
|
+
Ml,
|
|
5157
5158
|
{
|
|
5158
5159
|
style: { color: "#13c2c2" }
|
|
5159
5160
|
}
|
|
@@ -5162,9 +5163,9 @@ const fn = (t) => {
|
|
|
5162
5163
|
{
|
|
5163
5164
|
style: { color: "#52c41a" }
|
|
5164
5165
|
}
|
|
5165
|
-
) : /* @__PURE__ */ e.jsx(
|
|
5166
|
+
) : /* @__PURE__ */ e.jsx(Ul, { style: { color: "#8c8c8c" } });
|
|
5166
5167
|
};
|
|
5167
|
-
function
|
|
5168
|
+
function xr() {
|
|
5168
5169
|
const { bucketName: t } = el(), s = decodeURIComponent(t || ""), n = tl(), [a, m] = l([]), [i, d] = l(!1), [o, y] = l(""), [c, r] = l({ objectCount: 0, totalSize: 0 }), [x, L] = l(""), [G, U] = l([]), [u, A] = l(!1), [k, f] = l(!1), [h] = T.useForm();
|
|
5169
5170
|
$e(null);
|
|
5170
5171
|
const F = Ee(async (I = o) => {
|
|
@@ -5263,7 +5264,7 @@ function cr() {
|
|
|
5263
5264
|
style: { cursor: z ? "pointer" : "default", color: z ? "#faad14" : "#262626" },
|
|
5264
5265
|
onClick: () => z && b(I),
|
|
5265
5266
|
children: /* @__PURE__ */ e.jsxs(se, { children: [
|
|
5266
|
-
|
|
5267
|
+
Ja(I),
|
|
5267
5268
|
/* @__PURE__ */ e.jsx("span", { style: { fontWeight: z ? 500 : 400 }, children: q })
|
|
5268
5269
|
] })
|
|
5269
5270
|
}
|
|
@@ -5331,7 +5332,7 @@ function cr() {
|
|
|
5331
5332
|
/* @__PURE__ */ e.jsx("span", { style: { fontSize: 16, fontWeight: 600 }, children: s }),
|
|
5332
5333
|
/* @__PURE__ */ e.jsx("div", { style: { flex: 1 } }),
|
|
5333
5334
|
/* @__PURE__ */ e.jsx(
|
|
5334
|
-
|
|
5335
|
+
Qt,
|
|
5335
5336
|
{
|
|
5336
5337
|
placeholder: "搜索对象名...",
|
|
5337
5338
|
value: x,
|
|
@@ -5383,7 +5384,7 @@ function cr() {
|
|
|
5383
5384
|
] })
|
|
5384
5385
|
}
|
|
5385
5386
|
),
|
|
5386
|
-
/* @__PURE__ */ e.jsx(j, { size: "small", icon: /* @__PURE__ */ e.jsx(
|
|
5387
|
+
/* @__PURE__ */ e.jsx(j, { size: "small", icon: /* @__PURE__ */ e.jsx(Fl, {}), onClick: () => f(!0), children: "新建文件夹" }),
|
|
5387
5388
|
/* @__PURE__ */ e.jsx(ws, { beforeUpload: $, showUploadList: !1, disabled: u, children: /* @__PURE__ */ e.jsx(j, { size: "small", type: "primary", icon: /* @__PURE__ */ e.jsx(Wn, {}), loading: u, children: "上传文件" }) })
|
|
5388
5389
|
] }),
|
|
5389
5390
|
/* @__PURE__ */ e.jsx(H, { styles: { body: { padding: 0 } }, children: i ? /* @__PURE__ */ e.jsx("div", { style: { textAlign: "center", padding: 60 }, children: /* @__PURE__ */ e.jsx(Ze, { size: "large" }) }) : V.length === 0 ? /* @__PURE__ */ e.jsx(
|
|
@@ -5448,7 +5449,7 @@ function cr() {
|
|
|
5448
5449
|
)
|
|
5449
5450
|
] });
|
|
5450
5451
|
}
|
|
5451
|
-
const
|
|
5452
|
+
const Qa = [
|
|
5452
5453
|
{ value: "string", label: "string" },
|
|
5453
5454
|
{ value: "number", label: "number" },
|
|
5454
5455
|
{ value: "boolean", label: "boolean" },
|
|
@@ -5494,7 +5495,7 @@ function al({ value: t = [], onChange: s, readonly: n = !1 }) {
|
|
|
5494
5495
|
size: "small",
|
|
5495
5496
|
value: y,
|
|
5496
5497
|
onChange: (x) => a(r, "type", x),
|
|
5497
|
-
options:
|
|
5498
|
+
options: Qa,
|
|
5498
5499
|
style: { width: "100%" }
|
|
5499
5500
|
}
|
|
5500
5501
|
)
|
|
@@ -5518,7 +5519,7 @@ function al({ value: t = [], onChange: s, readonly: n = !1 }) {
|
|
|
5518
5519
|
title: "必填",
|
|
5519
5520
|
dataIndex: "required",
|
|
5520
5521
|
width: 60,
|
|
5521
|
-
render: (y, c, r) => n ? /* @__PURE__ */ e.jsx("span", { style: { color: y ? "#ff4d4f" : "#999" }, children: y ? "是" : "否" }) : /* @__PURE__ */ e.jsx(
|
|
5522
|
+
render: (y, c, r) => n ? /* @__PURE__ */ e.jsx("span", { style: { color: y ? "#ff4d4f" : "#999" }, children: y ? "是" : "否" }) : /* @__PURE__ */ e.jsx(qt, { size: "small", checked: y, onChange: (x) => a(r, "required", x) })
|
|
5522
5523
|
},
|
|
5523
5524
|
{
|
|
5524
5525
|
title: "描述",
|
|
@@ -5544,7 +5545,7 @@ function al({ value: t = [], onChange: s, readonly: n = !1 }) {
|
|
|
5544
5545
|
{
|
|
5545
5546
|
size: "small",
|
|
5546
5547
|
type: "text",
|
|
5547
|
-
icon: /* @__PURE__ */ e.jsx(
|
|
5548
|
+
icon: /* @__PURE__ */ e.jsx(Gl, {}),
|
|
5548
5549
|
disabled: r === 0,
|
|
5549
5550
|
onClick: () => i(r, -1)
|
|
5550
5551
|
}
|
|
@@ -5554,7 +5555,7 @@ function al({ value: t = [], onChange: s, readonly: n = !1 }) {
|
|
|
5554
5555
|
{
|
|
5555
5556
|
size: "small",
|
|
5556
5557
|
type: "text",
|
|
5557
|
-
icon: /* @__PURE__ */ e.jsx(
|
|
5558
|
+
icon: /* @__PURE__ */ e.jsx(Kl, {}),
|
|
5558
5559
|
disabled: r === t.length - 1,
|
|
5559
5560
|
onClick: () => i(r, 1)
|
|
5560
5561
|
}
|
|
@@ -5589,8 +5590,8 @@ function al({ value: t = [], onChange: s, readonly: n = !1 }) {
|
|
|
5589
5590
|
t.length === 0 && !n && /* @__PURE__ */ e.jsx("div", { style: { textAlign: "center", color: "#999", padding: 12 }, children: "暂未配置输出字段映射。发布后 MCP 工具将返回原始响应体。" })
|
|
5590
5591
|
] });
|
|
5591
5592
|
}
|
|
5592
|
-
const { TextArea:
|
|
5593
|
-
function
|
|
5593
|
+
const { TextArea: Ya } = Z, { Text: Za } = He, { Step: fs } = Bn;
|
|
5594
|
+
function Xa({ open: t, onClose: s, onSuccess: n }) {
|
|
5594
5595
|
var g, B, O, V, ee;
|
|
5595
5596
|
const [a, m] = l(0), [i, d] = l(!1), [o, y] = l(!1), [c, r] = l(""), [x, L] = l(null), [G, U] = l([]), [u, A] = l(null), [k, f] = l("mapping"), h = () => {
|
|
5596
5597
|
m(0), r(""), L(null), U([]), A(null), f("mapping");
|
|
@@ -5658,7 +5659,7 @@ function Za({ open: t, onClose: s, onSuccess: n }) {
|
|
|
5658
5659
|
a === 0 && /* @__PURE__ */ e.jsxs("div", { children: [
|
|
5659
5660
|
/* @__PURE__ */ e.jsx("p", { style: { color: "#666", marginBottom: 8 }, children: "粘贴任意 HTTP curl 命令,系统将自动解析并生成 API_BRIDGE 脚本" }),
|
|
5660
5661
|
/* @__PURE__ */ e.jsx(
|
|
5661
|
-
|
|
5662
|
+
Ya,
|
|
5662
5663
|
{
|
|
5663
5664
|
rows: 8,
|
|
5664
5665
|
value: c,
|
|
@@ -5683,7 +5684,7 @@ function Za({ open: t, onClose: s, onSuccess: n }) {
|
|
|
5683
5684
|
}
|
|
5684
5685
|
) }),
|
|
5685
5686
|
/* @__PURE__ */ e.jsx(Qe.Item, { label: "URL", span: 2, children: /* @__PURE__ */ e.jsx(
|
|
5686
|
-
|
|
5687
|
+
Za,
|
|
5687
5688
|
{
|
|
5688
5689
|
copyable: !0,
|
|
5689
5690
|
style: { fontFamily: "monospace", fontSize: 12 },
|
|
@@ -5739,7 +5740,7 @@ function Za({ open: t, onClose: s, onSuccess: n }) {
|
|
|
5739
5740
|
/* @__PURE__ */ e.jsx(
|
|
5740
5741
|
j,
|
|
5741
5742
|
{
|
|
5742
|
-
icon: /* @__PURE__ */ e.jsx(
|
|
5743
|
+
icon: /* @__PURE__ */ e.jsx($l, {}),
|
|
5743
5744
|
onClick: b,
|
|
5744
5745
|
loading: o,
|
|
5745
5746
|
style: { marginBottom: 12 },
|
|
@@ -5817,8 +5818,8 @@ function Za({ open: t, onClose: s, onSuccess: n }) {
|
|
|
5817
5818
|
}
|
|
5818
5819
|
);
|
|
5819
5820
|
}
|
|
5820
|
-
const { TextArea:
|
|
5821
|
-
function
|
|
5821
|
+
const { TextArea: ei } = Z;
|
|
5822
|
+
function ti({ open: t, onClose: s, onSuccess: n }) {
|
|
5822
5823
|
const [a, m] = l(""), [i, d] = l(null), [o, y] = l(null), [c, r] = l(!1), x = () => {
|
|
5823
5824
|
m(""), d(null), y(null);
|
|
5824
5825
|
}, L = () => {
|
|
@@ -5940,7 +5941,7 @@ function ei({ open: t, onClose: s, onSuccess: n }) {
|
|
|
5940
5941
|
!i && !o && /* @__PURE__ */ e.jsxs("div", { children: [
|
|
5941
5942
|
/* @__PURE__ */ e.jsx("p", { style: { color: "#666", marginBottom: 8 }, children: "粘贴 OpenAPI 3.0 / Swagger 2.0 规范的 JSON 内容,系统将自动为每个端点生成 API_BRIDGE 脚本。" }),
|
|
5942
5943
|
/* @__PURE__ */ e.jsx(
|
|
5943
|
-
|
|
5944
|
+
ei,
|
|
5944
5945
|
{
|
|
5945
5946
|
rows: 12,
|
|
5946
5947
|
value: a,
|
|
@@ -6023,7 +6024,7 @@ function ei({ open: t, onClose: s, onSuccess: n }) {
|
|
|
6023
6024
|
}
|
|
6024
6025
|
);
|
|
6025
6026
|
}
|
|
6026
|
-
const { Text: es, Paragraph:
|
|
6027
|
+
const { Text: es, Paragraph: ur } = He, si = [
|
|
6027
6028
|
{ value: "GET", label: "GET" },
|
|
6028
6029
|
{ value: "POST", label: "POST" },
|
|
6029
6030
|
{ value: "PUT", label: "PUT" },
|
|
@@ -6031,13 +6032,13 @@ const { Text: es, Paragraph: pr } = He, ti = [
|
|
|
6031
6032
|
{ value: "PATCH", label: "PATCH" },
|
|
6032
6033
|
{ value: "HEAD", label: "HEAD" },
|
|
6033
6034
|
{ value: "OPTIONS", label: "OPTIONS" }
|
|
6034
|
-
],
|
|
6035
|
+
], ni = [
|
|
6035
6036
|
{ value: "path", label: "path" },
|
|
6036
6037
|
{ value: "query", label: "query" },
|
|
6037
6038
|
{ value: "header", label: "header" },
|
|
6038
6039
|
{ value: "body", label: "body" }
|
|
6039
6040
|
];
|
|
6040
|
-
function
|
|
6041
|
+
function li({ value: t, onChange: s, readonly: n = !1 }) {
|
|
6041
6042
|
var k, f, h, F, E;
|
|
6042
6043
|
const [a, m] = l(null), [i, d] = l(null);
|
|
6043
6044
|
ae(() => {
|
|
@@ -6112,7 +6113,7 @@ function ni({ value: t, onChange: s, readonly: n = !1 }) {
|
|
|
6112
6113
|
size: "small",
|
|
6113
6114
|
value: b,
|
|
6114
6115
|
onChange: (_) => L($, "in", _),
|
|
6115
|
-
options:
|
|
6116
|
+
options: ni,
|
|
6116
6117
|
style: { width: "100%" }
|
|
6117
6118
|
}
|
|
6118
6119
|
)
|
|
@@ -6121,7 +6122,7 @@ function ni({ value: t, onChange: s, readonly: n = !1 }) {
|
|
|
6121
6122
|
title: "必填",
|
|
6122
6123
|
dataIndex: "required",
|
|
6123
6124
|
width: 70,
|
|
6124
|
-
render: (b, w, $) => n ? /* @__PURE__ */ e.jsx("span", { style: { color: b ? "#ff4d4f" : "#999" }, children: b ? "是" : "否" }) : /* @__PURE__ */ e.jsx(
|
|
6125
|
+
render: (b, w, $) => n ? /* @__PURE__ */ e.jsx("span", { style: { color: b ? "#ff4d4f" : "#999" }, children: b ? "是" : "否" }) : /* @__PURE__ */ e.jsx(qt, { size: "small", checked: b, onChange: (_) => L($, "required", _) })
|
|
6125
6126
|
},
|
|
6126
6127
|
{
|
|
6127
6128
|
title: "默认值",
|
|
@@ -6172,7 +6173,7 @@ function ni({ value: t, onChange: s, readonly: n = !1 }) {
|
|
|
6172
6173
|
{
|
|
6173
6174
|
value: y.requestMethod || "GET",
|
|
6174
6175
|
onChange: r,
|
|
6175
|
-
options:
|
|
6176
|
+
options: si,
|
|
6176
6177
|
style: { width: 120 }
|
|
6177
6178
|
}
|
|
6178
6179
|
),
|
|
@@ -6225,14 +6226,14 @@ function ni({ value: t, onChange: s, readonly: n = !1 }) {
|
|
|
6225
6226
|
) })
|
|
6226
6227
|
] });
|
|
6227
6228
|
}
|
|
6228
|
-
const { TextArea: js } = Z, { Text: bs, Paragraph: jn } = He,
|
|
6229
|
+
const { TextArea: js } = Z, { Text: bs, Paragraph: jn } = He, ai = [
|
|
6229
6230
|
{ value: "EL", label: "EL (SpEL)" },
|
|
6230
6231
|
{ value: "GROOVY", label: "Groovy" },
|
|
6231
6232
|
{ value: "LUA", label: "Lua" },
|
|
6232
6233
|
{ value: "SQL", label: "SQL" },
|
|
6233
6234
|
{ value: "MOCK", label: "Mock Template" },
|
|
6234
6235
|
{ value: "API_BRIDGE", label: "API Bridge" }
|
|
6235
|
-
],
|
|
6236
|
+
], ii = [
|
|
6236
6237
|
{ value: "NONE", label: "None" },
|
|
6237
6238
|
{ value: "HTTP", label: "HTTP" },
|
|
6238
6239
|
{ value: "MCP", label: "MCP" },
|
|
@@ -6241,13 +6242,13 @@ const { TextArea: js } = Z, { Text: bs, Paragraph: jn } = He, li = [
|
|
|
6241
6242
|
0: { text: "Draft", color: "default" },
|
|
6242
6243
|
1: { text: "Active", color: "green" },
|
|
6243
6244
|
2: { text: "Disabled", color: "red" }
|
|
6244
|
-
},
|
|
6245
|
+
}, ri = {
|
|
6245
6246
|
NONE: "default",
|
|
6246
6247
|
HTTP: "blue",
|
|
6247
6248
|
MCP: "purple",
|
|
6248
6249
|
BOTH: "cyan"
|
|
6249
6250
|
};
|
|
6250
|
-
function
|
|
6251
|
+
function hr() {
|
|
6251
6252
|
const [t, s] = l([]), [n, a] = l(!1), [m, i] = l(null), [d, o] = l(!1), [y, c] = l(null), [r] = T.useForm(), [x, L] = l(!1), [G, U] = l(null), [u, A] = l("{}"), [k, f] = l(""), [h, F] = l(!1), [E, b] = l(!1), [w, $] = l(!1), [_, g] = l(null), O = T.useWatch("dslType", r) === "API_BRIDGE";
|
|
6252
6253
|
ae(() => {
|
|
6253
6254
|
V();
|
|
@@ -6346,7 +6347,7 @@ function xr() {
|
|
|
6346
6347
|
dataIndex: "exposeAs",
|
|
6347
6348
|
key: "exposeAs",
|
|
6348
6349
|
width: 120,
|
|
6349
|
-
render: (Q) => /* @__PURE__ */ e.jsx(D, { color:
|
|
6350
|
+
render: (Q) => /* @__PURE__ */ e.jsx(D, { color: ri[Q] || "default", children: Q })
|
|
6350
6351
|
},
|
|
6351
6352
|
{
|
|
6352
6353
|
title: "状态",
|
|
@@ -6434,8 +6435,8 @@ function xr() {
|
|
|
6434
6435
|
}
|
|
6435
6436
|
),
|
|
6436
6437
|
/* @__PURE__ */ e.jsxs(H, { extra: /* @__PURE__ */ e.jsxs(se, { children: [
|
|
6437
|
-
/* @__PURE__ */ e.jsx(j, { icon: /* @__PURE__ */ e.jsx(
|
|
6438
|
-
/* @__PURE__ */ e.jsx(j, { icon: /* @__PURE__ */ e.jsx(
|
|
6438
|
+
/* @__PURE__ */ e.jsx(j, { icon: /* @__PURE__ */ e.jsx(Vl, {}), onClick: () => b(!0), children: "导入 Curl" }),
|
|
6439
|
+
/* @__PURE__ */ e.jsx(j, { icon: /* @__PURE__ */ e.jsx(Wl, {}), onClick: () => $(!0), children: "导入 OpenAPI" }),
|
|
6439
6440
|
/* @__PURE__ */ e.jsx(j, { icon: /* @__PURE__ */ e.jsx(St, {}), onClick: V, children: "刷新" }),
|
|
6440
6441
|
/* @__PURE__ */ e.jsx(j, { type: "primary", icon: /* @__PURE__ */ e.jsx(we, {}), onClick: ee, children: "新建脚本" })
|
|
6441
6442
|
] }), children: [
|
|
@@ -6502,13 +6503,13 @@ function xr() {
|
|
|
6502
6503
|
) })
|
|
6503
6504
|
] }),
|
|
6504
6505
|
/* @__PURE__ */ e.jsxs(pe, { gutter: 16, children: [
|
|
6505
|
-
/* @__PURE__ */ e.jsx(J, { span: 8, children: /* @__PURE__ */ e.jsx(T.Item, { name: "dslType", label: "DSL类型", children: /* @__PURE__ */ e.jsx(Y, { options:
|
|
6506
|
-
/* @__PURE__ */ e.jsx(J, { span: 8, children: /* @__PURE__ */ e.jsx(T.Item, { name: "exposeAs", label: "暴露方式", children: /* @__PURE__ */ e.jsx(Y, { options:
|
|
6506
|
+
/* @__PURE__ */ e.jsx(J, { span: 8, children: /* @__PURE__ */ e.jsx(T.Item, { name: "dslType", label: "DSL类型", children: /* @__PURE__ */ e.jsx(Y, { options: ai, onChange: S }) }) }),
|
|
6507
|
+
/* @__PURE__ */ e.jsx(J, { span: 8, children: /* @__PURE__ */ e.jsx(T.Item, { name: "exposeAs", label: "暴露方式", children: /* @__PURE__ */ e.jsx(Y, { options: ii }) }) }),
|
|
6507
6508
|
/* @__PURE__ */ e.jsx(J, { span: 8, children: /* @__PURE__ */ e.jsx(T.Item, { name: "version", label: "版本", children: /* @__PURE__ */ e.jsx(Z, { placeholder: "1.0.0" }) }) })
|
|
6508
6509
|
] }),
|
|
6509
6510
|
/* @__PURE__ */ e.jsx(T.Item, { name: "description", label: "描述", children: /* @__PURE__ */ e.jsx(Z, { placeholder: "脚本描述" }) }),
|
|
6510
6511
|
O ? /* @__PURE__ */ e.jsx(T.Item, { label: "API Bridge 配置", children: /* @__PURE__ */ e.jsx(
|
|
6511
|
-
|
|
6512
|
+
li,
|
|
6512
6513
|
{
|
|
6513
6514
|
value: _,
|
|
6514
6515
|
onChange: g
|
|
@@ -6597,7 +6598,7 @@ function xr() {
|
|
|
6597
6598
|
}
|
|
6598
6599
|
),
|
|
6599
6600
|
/* @__PURE__ */ e.jsx(
|
|
6600
|
-
|
|
6601
|
+
Xa,
|
|
6601
6602
|
{
|
|
6602
6603
|
open: E,
|
|
6603
6604
|
onClose: () => b(!1),
|
|
@@ -6605,7 +6606,7 @@ function xr() {
|
|
|
6605
6606
|
}
|
|
6606
6607
|
),
|
|
6607
6608
|
/* @__PURE__ */ e.jsx(
|
|
6608
|
-
|
|
6609
|
+
ti,
|
|
6609
6610
|
{
|
|
6610
6611
|
open: w,
|
|
6611
6612
|
onClose: () => $(!1),
|
|
@@ -6614,7 +6615,7 @@ function xr() {
|
|
|
6614
6615
|
)
|
|
6615
6616
|
] });
|
|
6616
6617
|
}
|
|
6617
|
-
const il = () => Cl.useApp().message,
|
|
6618
|
+
const il = () => Cl.useApp().message, oi = "/api", Lt = (t) => t ? String(t).replace("T", " ").slice(0, 19) : "-", At = (t) => t == null || t === "" ? 0 : Number(t) || 0, ke = (t) => t == null || t === "" ? "-" : String(t), Ws = (t) => t && t.data && Array.isArray(t.data.records) ? t.data.records : [], qs = (t) => {
|
|
6618
6619
|
const s = t && t.data ? t.data.total : void 0;
|
|
6619
6620
|
if (typeof s == "number")
|
|
6620
6621
|
return Number.isFinite(s) ? s : null;
|
|
@@ -6624,7 +6625,7 @@ const il = () => Cl.useApp().message, ri = "/api", Lt = (t) => t ? String(t).rep
|
|
|
6624
6625
|
}
|
|
6625
6626
|
return null;
|
|
6626
6627
|
};
|
|
6627
|
-
async function
|
|
6628
|
+
async function di(t, s = 50) {
|
|
6628
6629
|
const n = [];
|
|
6629
6630
|
let a = 1;
|
|
6630
6631
|
for (; ; ) {
|
|
@@ -6643,13 +6644,13 @@ async function oi(t, s = 50) {
|
|
|
6643
6644
|
return n;
|
|
6644
6645
|
}
|
|
6645
6646
|
async function dt(t, s, n) {
|
|
6646
|
-
return (await fetch(
|
|
6647
|
+
return (await fetch(oi + s, {
|
|
6647
6648
|
method: t,
|
|
6648
6649
|
headers: { "Content-Type": "application/json", "X-User-Id": localStorage.getItem("userId") || "admin" },
|
|
6649
6650
|
body: n ? JSON.stringify(n) : void 0
|
|
6650
6651
|
})).json();
|
|
6651
6652
|
}
|
|
6652
|
-
function
|
|
6653
|
+
function ci() {
|
|
6653
6654
|
const [t, s] = l([]), [n, a] = l(null), [m, i] = l({ current: 1, size: 10 }), [d, o] = l(!1), y = async (c) => {
|
|
6654
6655
|
o(!0);
|
|
6655
6656
|
try {
|
|
@@ -6706,7 +6707,7 @@ function di() {
|
|
|
6706
6707
|
)
|
|
6707
6708
|
] });
|
|
6708
6709
|
}
|
|
6709
|
-
function
|
|
6710
|
+
function pi() {
|
|
6710
6711
|
const [t, s] = l([]), [n, a] = l(null), [m, i] = l({ current: 1, size: 20 }), [d, o] = l({ page: 0, success: 0, failed: 0 }), [y, c] = l(!1), [r, x] = l({ apiKeyId: void 0, success: void 0 }), [L, G] = l([]), [U, u] = l(7), A = async (h) => {
|
|
6711
6712
|
c(!0);
|
|
6712
6713
|
try {
|
|
@@ -6919,7 +6920,7 @@ function ci() {
|
|
|
6919
6920
|
)
|
|
6920
6921
|
] });
|
|
6921
6922
|
}
|
|
6922
|
-
function
|
|
6923
|
+
function xi() {
|
|
6923
6924
|
const [t, s] = l([]), [n, a] = l(!1), [m, i] = l(null), [d, o] = l([]);
|
|
6924
6925
|
ae(() => {
|
|
6925
6926
|
(async () => {
|
|
@@ -6987,7 +6988,7 @@ function pi() {
|
|
|
6987
6988
|
)
|
|
6988
6989
|
] });
|
|
6989
6990
|
}
|
|
6990
|
-
function
|
|
6991
|
+
function ui() {
|
|
6991
6992
|
const t = il(), [s, n] = l([]), [a, m] = l(!1), [i, d] = l(""), [o, y] = l("biz"), c = async () => {
|
|
6992
6993
|
m(!0);
|
|
6993
6994
|
try {
|
|
@@ -7035,12 +7036,12 @@ function xi() {
|
|
|
7035
7036
|
)
|
|
7036
7037
|
] });
|
|
7037
7038
|
}
|
|
7038
|
-
function
|
|
7039
|
+
function hi() {
|
|
7039
7040
|
il();
|
|
7040
7041
|
const [t, s] = l([]), [n, a] = l(!1), m = async () => {
|
|
7041
7042
|
a(!0);
|
|
7042
7043
|
try {
|
|
7043
|
-
const i = await
|
|
7044
|
+
const i = await di("/script/api-key/page"), d = await Promise.all(i.map(async (o) => {
|
|
7044
7045
|
const y = await dt("GET", "/script/quota/by-api-key/" + o.id);
|
|
7045
7046
|
return { ...o, quota: y.data };
|
|
7046
7047
|
}));
|
|
@@ -7099,7 +7100,7 @@ function ui() {
|
|
|
7099
7100
|
)
|
|
7100
7101
|
] });
|
|
7101
7102
|
}
|
|
7102
|
-
function
|
|
7103
|
+
function gr({ initialTab: t = "apikey" }) {
|
|
7103
7104
|
const [s, n] = l(t);
|
|
7104
7105
|
return ae(() => n(t), [t]), /* @__PURE__ */ e.jsxs("div", { style: { padding: 16 }, children: [
|
|
7105
7106
|
/* @__PURE__ */ e.jsx(
|
|
@@ -7113,39 +7114,39 @@ function ur({ initialTab: t = "apikey" }) {
|
|
|
7113
7114
|
{ key: "apikey", label: /* @__PURE__ */ e.jsxs("span", { children: [
|
|
7114
7115
|
/* @__PURE__ */ e.jsx(ns, {}),
|
|
7115
7116
|
" API Key 管理"
|
|
7116
|
-
] }), children: /* @__PURE__ */ e.jsx(
|
|
7117
|
+
] }), children: /* @__PURE__ */ e.jsx(ci, {}) },
|
|
7117
7118
|
{ key: "monitor", label: /* @__PURE__ */ e.jsxs("span", { children: [
|
|
7118
7119
|
/* @__PURE__ */ e.jsx(Jn, {}),
|
|
7119
7120
|
" 调用监控"
|
|
7120
|
-
] }), children: /* @__PURE__ */ e.jsx(
|
|
7121
|
+
] }), children: /* @__PURE__ */ e.jsx(pi, {}) },
|
|
7121
7122
|
{ key: "quota", label: /* @__PURE__ */ e.jsxs("span", { children: [
|
|
7122
|
-
/* @__PURE__ */ e.jsx(
|
|
7123
|
+
/* @__PURE__ */ e.jsx(ql, {}),
|
|
7123
7124
|
" 配额管理"
|
|
7124
|
-
] }), children: /* @__PURE__ */ e.jsx(
|
|
7125
|
+
] }), children: /* @__PURE__ */ e.jsx(hi, {}) },
|
|
7125
7126
|
{ key: "version", label: /* @__PURE__ */ e.jsxs("span", { children: [
|
|
7126
7127
|
/* @__PURE__ */ e.jsx(kt, {}),
|
|
7127
7128
|
" 版本管理"
|
|
7128
|
-
] }), children: /* @__PURE__ */ e.jsx(
|
|
7129
|
+
] }), children: /* @__PURE__ */ e.jsx(xi, {}) },
|
|
7129
7130
|
{ key: "tag", label: /* @__PURE__ */ e.jsxs("span", { children: [
|
|
7130
|
-
/* @__PURE__ */ e.jsx(
|
|
7131
|
+
/* @__PURE__ */ e.jsx(Hl, {}),
|
|
7131
7132
|
" 标签管理"
|
|
7132
|
-
] }), children: /* @__PURE__ */ e.jsx(
|
|
7133
|
+
] }), children: /* @__PURE__ */ e.jsx(ui, {}) }
|
|
7133
7134
|
] })
|
|
7134
7135
|
] });
|
|
7135
7136
|
}
|
|
7136
|
-
const
|
|
7137
|
-
marketRoot:
|
|
7138
|
-
topRow:
|
|
7139
|
-
tabs:
|
|
7140
|
-
tab:
|
|
7141
|
-
tabActive:
|
|
7142
|
-
card:
|
|
7143
|
-
cardIcon:
|
|
7144
|
-
cardBody:
|
|
7145
|
-
cardTitleRow:
|
|
7146
|
-
cardTitle:
|
|
7147
|
-
cardDesc:
|
|
7148
|
-
installBtn:
|
|
7137
|
+
const gi = "_marketRoot_1ca3h_2", mi = "_topRow_1ca3h_10", yi = "_tabs_1ca3h_17", fi = "_tab_1ca3h_17", ji = "_tabActive_1ca3h_48", bi = "_card_1ca3h_54", Ci = "_cardIcon_1ca3h_72", Si = "_cardBody_1ca3h_82", vi = "_cardTitleRow_1ca3h_87", ki = "_cardTitle_1ca3h_87", wi = "_cardDesc_1ca3h_104", Ti = "_installBtn_1ca3h_113", De = {
|
|
7138
|
+
marketRoot: gi,
|
|
7139
|
+
topRow: mi,
|
|
7140
|
+
tabs: yi,
|
|
7141
|
+
tab: fi,
|
|
7142
|
+
tabActive: ji,
|
|
7143
|
+
card: bi,
|
|
7144
|
+
cardIcon: Ci,
|
|
7145
|
+
cardBody: Si,
|
|
7146
|
+
cardTitleRow: vi,
|
|
7147
|
+
cardTitle: ki,
|
|
7148
|
+
cardDesc: wi,
|
|
7149
|
+
installBtn: Ti
|
|
7149
7150
|
}, Cn = [
|
|
7150
7151
|
{
|
|
7151
7152
|
id: 1,
|
|
@@ -7498,7 +7499,7 @@ components:
|
|
|
7498
7499
|
{ categoryCode: "testing", categoryName: "测试", parentCode: "", skillCount: 1 },
|
|
7499
7500
|
{ categoryCode: "ai-agent", categoryName: "AI Agent", parentCode: "", skillCount: 1 },
|
|
7500
7501
|
{ categoryCode: "doc", categoryName: "文档", parentCode: "", skillCount: 1 }
|
|
7501
|
-
], Sn = { total: 8, published: 7 }, { TextArea:
|
|
7502
|
+
], Sn = { total: 8, published: 7 }, { TextArea: Ai } = Z, vn = {
|
|
7502
7503
|
backend: "linear-gradient(135deg, #667eea 0%, #764ba2 100%)",
|
|
7503
7504
|
frontend: "linear-gradient(135deg, #f093fb 0%, #f5576c 100%)",
|
|
7504
7505
|
devops: "linear-gradient(135deg, #4facfe 0%, #00f2fe 100%)",
|
|
@@ -7506,7 +7507,7 @@ components:
|
|
|
7506
7507
|
"ai-agent": "linear-gradient(135deg, #fa709a 0%, #fee140 100%)",
|
|
7507
7508
|
doc: "linear-gradient(135deg, #a8edea 0%, #fed6e3 100%)",
|
|
7508
7509
|
default: "linear-gradient(135deg, #667eea 0%, #764ba2 100%)"
|
|
7509
|
-
}, Ss = (t) => vn[t] || vn.default, kn = { PUBLISHED: "已发布", DRAFT: "草稿", ARCHIVED: "已归档" },
|
|
7510
|
+
}, Ss = (t) => vn[t] || vn.default, kn = { PUBLISHED: "已发布", DRAFT: "草稿", ARCHIVED: "已归档" }, Ii = (t) => ({
|
|
7510
7511
|
...t,
|
|
7511
7512
|
skillCode: t.skillCode || t.skill_code,
|
|
7512
7513
|
skillName: t.skillName || t.skill_name,
|
|
@@ -7537,7 +7538,7 @@ components:
|
|
|
7537
7538
|
};
|
|
7538
7539
|
return t != null && t.length && n(t, ""), s;
|
|
7539
7540
|
};
|
|
7540
|
-
function
|
|
7541
|
+
function zi(t) {
|
|
7541
7542
|
const s = { key: "__root__", children: [] }, n = { "": s };
|
|
7542
7543
|
return t.forEach((a) => {
|
|
7543
7544
|
const m = a.path.split("/");
|
|
@@ -7557,7 +7558,7 @@ function Ii(t) {
|
|
|
7557
7558
|
});
|
|
7558
7559
|
}), s.children;
|
|
7559
7560
|
}
|
|
7560
|
-
function
|
|
7561
|
+
function mr() {
|
|
7561
7562
|
const [t, s] = l([]), [n, a] = l(!1), [m, i] = l(0), [d, o] = l(1), y = $e(12), [c, r] = l(""), [x, L] = l(void 0), [G, U] = l("download_count"), [u, A] = l([]), [k, f] = l(!1), [h, F] = l(null), [E, b] = l(""), [w, $] = l([]), [_, g] = l(!1), [B, O] = l("overview"), [V, ee] = l(null), [S, I] = l([]), [N, z] = l(!1), [q] = T.useForm(), [p, M] = l(!1), [X, Me] = l(!1), [Q, ge] = l({ total: 0, published: 0 }), [We, Ue] = l(!1), [Pe, v] = l(null), [K, ne] = l(null), [oe, xe] = l(!1), [Ce] = T.useForm(), W = async () => {
|
|
7562
7563
|
try {
|
|
7563
7564
|
const R = await Ge.stats();
|
|
@@ -7571,7 +7572,7 @@ function hr() {
|
|
|
7571
7572
|
try {
|
|
7572
7573
|
const de = { current: R, size: y.current, sortBy: G };
|
|
7573
7574
|
c && (de.keyword = c), x && (de.categoryCode = x), (c || x) && (de.status = "PUBLISHED");
|
|
7574
|
-
const re = await Ge.page(de), ue = (Se) => (Se || []).map(
|
|
7575
|
+
const re = await Ge.page(de), ue = (Se) => (Se || []).map(Ii);
|
|
7575
7576
|
if (re && re.records)
|
|
7576
7577
|
s(ue(re.records)), i(Number(re.total) || re.records.length);
|
|
7577
7578
|
else if (Array.isArray(re))
|
|
@@ -8015,7 +8016,7 @@ function hr() {
|
|
|
8015
8016
|
"v",
|
|
8016
8017
|
h.version
|
|
8017
8018
|
] }),
|
|
8018
|
-
/* @__PURE__ */ e.jsxs(D, { icon: /* @__PURE__ */ e.jsx(
|
|
8019
|
+
/* @__PURE__ */ e.jsxs(D, { icon: /* @__PURE__ */ e.jsx(Jl, {}), color: "red", children: [
|
|
8019
8020
|
h.downloadCount || 0,
|
|
8020
8021
|
" 次安装"
|
|
8021
8022
|
] }),
|
|
@@ -8034,7 +8035,7 @@ function hr() {
|
|
|
8034
8035
|
{
|
|
8035
8036
|
key: "overview",
|
|
8036
8037
|
label: /* @__PURE__ */ e.jsxs("span", { children: [
|
|
8037
|
-
/* @__PURE__ */ e.jsx(
|
|
8038
|
+
/* @__PURE__ */ e.jsx(Ql, {}),
|
|
8038
8039
|
" 概述"
|
|
8039
8040
|
] }),
|
|
8040
8041
|
children: /* @__PURE__ */ e.jsx("div", { style: { padding: "20px 24px" }, children: _ ? /* @__PURE__ */ e.jsx("div", { style: { textAlign: "center", padding: 40 }, children: /* @__PURE__ */ e.jsx(Ze, {}) }) : /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
@@ -8174,7 +8175,7 @@ function hr() {
|
|
|
8174
8175
|
}, children: /* @__PURE__ */ e.jsx(
|
|
8175
8176
|
Ln,
|
|
8176
8177
|
{
|
|
8177
|
-
treeData:
|
|
8178
|
+
treeData: zi(h.files),
|
|
8178
8179
|
defaultExpandAll: !0,
|
|
8179
8180
|
showIcon: !0,
|
|
8180
8181
|
selectedKeys: V ? [V.path] : [],
|
|
@@ -8436,7 +8437,7 @@ function hr() {
|
|
|
8436
8437
|
}
|
|
8437
8438
|
)
|
|
8438
8439
|
] }),
|
|
8439
|
-
/* @__PURE__ */ e.jsx(T.Item, { name: "description", label: "描述", children: /* @__PURE__ */ e.jsx(
|
|
8440
|
+
/* @__PURE__ */ e.jsx(T.Item, { name: "description", label: "描述", children: /* @__PURE__ */ e.jsx(Ai, { rows: 3, placeholder: "简要描述技能功能...", style: { borderRadius: 8 } }) }),
|
|
8440
8441
|
/* @__PURE__ */ e.jsx(T.Item, { name: "tags", label: "标签", children: /* @__PURE__ */ e.jsx(Z, { placeholder: "用逗号分隔,如 java,entity,generator", style: { borderRadius: 8 } }) }),
|
|
8441
8442
|
/* @__PURE__ */ e.jsx(T.Item, { name: "author", label: "作者", children: /* @__PURE__ */ e.jsx(Z, { placeholder: "技能作者", style: { borderRadius: 8 } }) })
|
|
8442
8443
|
] })
|
|
@@ -8486,7 +8487,7 @@ function hr() {
|
|
|
8486
8487
|
)
|
|
8487
8488
|
] });
|
|
8488
8489
|
}
|
|
8489
|
-
const { TextArea: rl } = Z, { Option: ot } = Y, { TabPane: In } = be,
|
|
8490
|
+
const { TextArea: rl } = Z, { Option: ot } = Y, { TabPane: In } = be, yr = () => {
|
|
8490
8491
|
const [t, s] = l("list");
|
|
8491
8492
|
return /* @__PURE__ */ e.jsxs("div", { children: [
|
|
8492
8493
|
/* @__PURE__ */ e.jsx(
|
|
@@ -8500,14 +8501,14 @@ const { TextArea: rl } = Z, { Option: ot } = Y, { TabPane: In } = be, gr = () =>
|
|
|
8500
8501
|
/* @__PURE__ */ e.jsx(In, { tab: /* @__PURE__ */ e.jsxs("span", { children: [
|
|
8501
8502
|
/* @__PURE__ */ e.jsx(ds, {}),
|
|
8502
8503
|
" 产品管理"
|
|
8503
|
-
] }), children: /* @__PURE__ */ e.jsx(
|
|
8504
|
+
] }), children: /* @__PURE__ */ e.jsx(Pi, {}) }, "list"),
|
|
8504
8505
|
/* @__PURE__ */ e.jsx(In, { tab: /* @__PURE__ */ e.jsxs("span", { children: [
|
|
8505
8506
|
/* @__PURE__ */ e.jsx(wt, {}),
|
|
8506
8507
|
" 产品配置"
|
|
8507
|
-
] }), children: /* @__PURE__ */ e.jsx(
|
|
8508
|
+
] }), children: /* @__PURE__ */ e.jsx(Ei, {}) }, "config")
|
|
8508
8509
|
] }) })
|
|
8509
8510
|
] });
|
|
8510
|
-
},
|
|
8511
|
+
}, Pi = () => {
|
|
8511
8512
|
const [t, s] = l([]), [n, a] = l(!1), [m, i] = l(""), [d, o] = l(""), [y, c] = l(1), [r] = l(12), [x, L] = l(0), [G, U] = l(!1), [u] = T.useForm(), [A, k] = l(null), [f, h] = l(!1), [F, E] = l(!1), [b, w] = l(null);
|
|
8512
8513
|
ae(() => {
|
|
8513
8514
|
$();
|
|
@@ -8605,7 +8606,7 @@ const { TextArea: rl } = Z, { Option: ot } = Y, { TabPane: In } = be, gr = () =>
|
|
|
8605
8606
|
title: "分类",
|
|
8606
8607
|
dataIndex: "category",
|
|
8607
8608
|
width: 120,
|
|
8608
|
-
render: (z) => z ? /* @__PURE__ */ e.jsx(D, { icon: /* @__PURE__ */ e.jsx(
|
|
8609
|
+
render: (z) => z ? /* @__PURE__ */ e.jsx(D, { icon: /* @__PURE__ */ e.jsx(Zl, {}), children: z }) : /* @__PURE__ */ e.jsx("span", { style: { color: "#ccc" }, children: "未分类" })
|
|
8609
8610
|
},
|
|
8610
8611
|
{
|
|
8611
8612
|
title: "状态",
|
|
@@ -8702,7 +8703,7 @@ const { TextArea: rl } = Z, { Option: ot } = Y, { TabPane: In } = be, gr = () =>
|
|
|
8702
8703
|
style: { display: "flex", justifyContent: "space-between", marginBottom: 16, gap: 12, flexWrap: "wrap" },
|
|
8703
8704
|
children: [
|
|
8704
8705
|
/* @__PURE__ */ e.jsxs(se, { children: [
|
|
8705
|
-
/* @__PURE__ */ e.jsx(
|
|
8706
|
+
/* @__PURE__ */ e.jsx(Qt, { placeholder: "搜索产品名称/编码", onSearch: (z) => {
|
|
8706
8707
|
i(z), c(1);
|
|
8707
8708
|
}, size: "large", allowClear: !0 }),
|
|
8708
8709
|
/* @__PURE__ */ e.jsxs(Y, { placeholder: "状态筛选", allowClear: !0, style: { width: 120 }, onChange: (z) => {
|
|
@@ -8847,7 +8848,7 @@ const { TextArea: rl } = Z, { Option: ot } = Y, { TabPane: In } = be, gr = () =>
|
|
|
8847
8848
|
}
|
|
8848
8849
|
)
|
|
8849
8850
|
] });
|
|
8850
|
-
},
|
|
8851
|
+
}, Ei = () => {
|
|
8851
8852
|
const [t, s] = l([]), [n, a] = l(null), [m, i] = l({ scenes: [], params: [] }), [d, o] = l(!1), [y, c] = l(!1), [r, x] = l(!1), [L] = T.useForm();
|
|
8852
8853
|
ae(() => {
|
|
8853
8854
|
rt.page({ id: 1, pageSize: 100 }).then((f) => {
|
|
@@ -8972,7 +8973,7 @@ const { TextArea: rl } = Z, { Option: ot } = Y, { TabPane: In } = be, gr = () =>
|
|
|
8972
8973
|
background: "#fafafa",
|
|
8973
8974
|
borderRadius: 8
|
|
8974
8975
|
}, children: [
|
|
8975
|
-
/* @__PURE__ */ e.jsx(
|
|
8976
|
+
/* @__PURE__ */ e.jsx(Yl, { style: { marginRight: 6 } }),
|
|
8976
8977
|
"暂无关联场景"
|
|
8977
8978
|
] }) : /* @__PURE__ */ e.jsx("div", { style: { display: "flex", flexDirection: "column", gap: 8 }, children: (m.scenes || []).map((f, h) => /* @__PURE__ */ e.jsx(
|
|
8978
8979
|
H,
|
|
@@ -9029,7 +9030,7 @@ const { TextArea: rl } = Z, { Option: ot } = Y, { TabPane: In } = be, gr = () =>
|
|
|
9029
9030
|
}
|
|
9030
9031
|
)
|
|
9031
9032
|
] });
|
|
9032
|
-
}, { TextArea:
|
|
9033
|
+
}, { TextArea: Oi } = Z, { Text: Mt, Title: Ri } = He, { Option: zn } = Y, fr = () => {
|
|
9033
9034
|
var We, Ue, Pe;
|
|
9034
9035
|
const t = new URLSearchParams(window.location.search), s = t.get("productCode") || "", n = t.get("sceneCode") || "", [a, m] = l(s), [i, d] = l(n), [o, y] = l([]), [c, r] = l([]), [x, L] = l([]), [G, U] = l(""), [u, A] = l(!1), [k, f] = l(!1), [h, F] = l(""), [E, b] = l(!1), [w, $] = l([]), [_, g] = l(!1), [B] = T.useForm(), [O, V] = l({ temperature: 0.7, maxTokens: 2048, topP: 1 }), [ee, S] = l(null), I = $e(null), N = $e(null), z = $e(null);
|
|
9035
9036
|
ae(() => {
|
|
@@ -9238,7 +9239,7 @@ const { TextArea: rl } = Z, { Option: ot } = Y, { TabPane: In } = be, gr = () =>
|
|
|
9238
9239
|
}
|
|
9239
9240
|
}
|
|
9240
9241
|
),
|
|
9241
|
-
/* @__PURE__ */ e.jsx(
|
|
9242
|
+
/* @__PURE__ */ e.jsx(Ri, { level: 5, style: { marginTop: 12, marginBottom: 4 }, children: ((Ue = c.find((v) => v.sceneCode === i)) == null ? void 0 : Ue.sceneName) || "场景助手" }),
|
|
9242
9243
|
/* @__PURE__ */ e.jsx(Mt, { type: "secondary", children: (ee == null ? void 0 : ee.description) || ((Pe = c.find((v) => v.sceneCode === i)) == null ? void 0 : Pe.description) || "开始对话吧!" })
|
|
9243
9244
|
] }),
|
|
9244
9245
|
/* @__PURE__ */ e.jsxs("div", { style: { display: "flex", flexDirection: "column", gap: 16 }, children: [
|
|
@@ -9386,7 +9387,7 @@ const { TextArea: rl } = Z, { Option: ot } = Y, { TabPane: In } = be, gr = () =>
|
|
|
9386
9387
|
alignItems: "flex-end"
|
|
9387
9388
|
}, children: [
|
|
9388
9389
|
/* @__PURE__ */ e.jsx(
|
|
9389
|
-
|
|
9390
|
+
Oi,
|
|
9390
9391
|
{
|
|
9391
9392
|
ref: z,
|
|
9392
9393
|
value: G,
|
|
@@ -9456,7 +9457,7 @@ const { TextArea: rl } = Z, { Option: ot } = Y, { TabPane: In } = be, gr = () =>
|
|
|
9456
9457
|
children: /* @__PURE__ */ e.jsx(
|
|
9457
9458
|
vt.Item.Meta,
|
|
9458
9459
|
{
|
|
9459
|
-
avatar: /* @__PURE__ */ e.jsx(tt, { icon: /* @__PURE__ */ e.jsx(
|
|
9460
|
+
avatar: /* @__PURE__ */ e.jsx(tt, { icon: /* @__PURE__ */ e.jsx(_i, {}), style: { background: "#667eea" } }),
|
|
9460
9461
|
title: `会话 ${K + 1} — ${v.startTime || ""}`,
|
|
9461
9462
|
description: /* @__PURE__ */ e.jsxs(
|
|
9462
9463
|
Mt,
|
|
@@ -9507,23 +9508,23 @@ const { TextArea: rl } = Z, { Option: ot } = Y, { TabPane: In } = be, gr = () =>
|
|
|
9507
9508
|
}
|
|
9508
9509
|
` })
|
|
9509
9510
|
] });
|
|
9510
|
-
},
|
|
9511
|
+
}, _i = () => /* @__PURE__ */ e.jsx(_e, {}), { TextArea: ol } = Z, { Option: Ie } = Y, { TabPane: vs } = be, jr = () => {
|
|
9511
9512
|
const [t, s] = l("list");
|
|
9512
9513
|
return /* @__PURE__ */ e.jsx(H, { style: { minHeight: "calc(100vh - 140px)" }, children: /* @__PURE__ */ e.jsxs(be, { activeKey: t, onChange: s, children: [
|
|
9513
9514
|
/* @__PURE__ */ e.jsx(vs, { tab: /* @__PURE__ */ e.jsxs("span", { children: [
|
|
9514
9515
|
/* @__PURE__ */ e.jsx(Tt, {}),
|
|
9515
9516
|
" 场景管理"
|
|
9516
|
-
] }), children: /* @__PURE__ */ e.jsx(
|
|
9517
|
+
] }), children: /* @__PURE__ */ e.jsx(Ni, {}) }, "list"),
|
|
9517
9518
|
/* @__PURE__ */ e.jsx(vs, { tab: /* @__PURE__ */ e.jsxs("span", { children: [
|
|
9518
9519
|
/* @__PURE__ */ e.jsx(Fs, {}),
|
|
9519
9520
|
" 节点配置"
|
|
9520
|
-
] }), children: /* @__PURE__ */ e.jsx(
|
|
9521
|
+
] }), children: /* @__PURE__ */ e.jsx(Li, {}) }, "nodes"),
|
|
9521
9522
|
/* @__PURE__ */ e.jsx(vs, { tab: /* @__PURE__ */ e.jsxs("span", { children: [
|
|
9522
9523
|
/* @__PURE__ */ e.jsx(ft, {}),
|
|
9523
9524
|
" 场景编排"
|
|
9524
|
-
] }), children: /* @__PURE__ */ e.jsx(
|
|
9525
|
+
] }), children: /* @__PURE__ */ e.jsx(Bi, {}) }, "canvas")
|
|
9525
9526
|
] }) });
|
|
9526
|
-
},
|
|
9527
|
+
}, Ni = () => {
|
|
9527
9528
|
const [t, s] = l([]), [n, a] = l(!1), [m, i] = l(""), [d, o] = l(""), [y, c] = l(1), [r] = l(12), [x, L] = l(0), [G, U] = l(!1), [u] = T.useForm(), [A, k] = l(null), [f, h] = l(!1), [F, E] = l(!1), [b, w] = l(null), [$, _] = l([]);
|
|
9528
9529
|
ae(() => {
|
|
9529
9530
|
Nn.page({ id: 1, pageSize: 100 }).then((M) => {
|
|
@@ -9745,7 +9746,7 @@ const { TextArea: rl } = Z, { Option: ot } = Y, { TabPane: In } = be, gr = () =>
|
|
|
9745
9746
|
style: { display: "flex", justifyContent: "space-between", marginBottom: 16, gap: 12, flexWrap: "wrap" },
|
|
9746
9747
|
children: [
|
|
9747
9748
|
/* @__PURE__ */ e.jsxs(se, { children: [
|
|
9748
|
-
/* @__PURE__ */ e.jsx(
|
|
9749
|
+
/* @__PURE__ */ e.jsx(Qt, { placeholder: "搜索场景名称/编码", onSearch: (M) => {
|
|
9749
9750
|
i(M), c(1);
|
|
9750
9751
|
}, size: "large", allowClear: !0 }),
|
|
9751
9752
|
/* @__PURE__ */ e.jsxs(Y, { placeholder: "状态筛选", allowClear: !0, style: { width: 120 }, onChange: (M) => {
|
|
@@ -9888,7 +9889,7 @@ const { TextArea: rl } = Z, { Option: ot } = Y, { TabPane: In } = be, gr = () =>
|
|
|
9888
9889
|
}
|
|
9889
9890
|
)
|
|
9890
9891
|
] });
|
|
9891
|
-
},
|
|
9892
|
+
}, Li = () => {
|
|
9892
9893
|
const [t, s] = l([]), [n, a] = l(null), [m, i] = l([]), [d, o] = l(!1), [y, c] = l(!1), [r] = T.useForm();
|
|
9893
9894
|
ae(() => {
|
|
9894
9895
|
Le.page({ id: 1, pageSize: 100 }).then((k) => {
|
|
@@ -9927,7 +9928,7 @@ const { TextArea: rl } = Z, { Option: ot } = Y, { TabPane: In } = be, gr = () =>
|
|
|
9927
9928
|
title: "启用",
|
|
9928
9929
|
dataIndex: "isEnabled",
|
|
9929
9930
|
key: "isEnabled",
|
|
9930
|
-
render: (k, f) => /* @__PURE__ */ e.jsx(
|
|
9931
|
+
render: (k, f) => /* @__PURE__ */ e.jsx(qt, { checked: k, onChange: () => u(f.id) })
|
|
9931
9932
|
},
|
|
9932
9933
|
{
|
|
9933
9934
|
title: "操作",
|
|
@@ -10036,7 +10037,7 @@ const { TextArea: rl } = Z, { Option: ot } = Y, { TabPane: In } = be, gr = () =>
|
|
|
10036
10037
|
}
|
|
10037
10038
|
)
|
|
10038
10039
|
] });
|
|
10039
|
-
},
|
|
10040
|
+
}, Bi = () => {
|
|
10040
10041
|
const [t, s] = l([]), [n, a] = l(null), [m, i] = l([]), [d, o] = l([]);
|
|
10041
10042
|
ae(() => {
|
|
10042
10043
|
Le.page({ id: 1, pageSize: 100 }).then((r) => {
|
|
@@ -10163,7 +10164,7 @@ const { TextArea: rl } = Z, { Option: ot } = Y, { TabPane: In } = be, gr = () =>
|
|
|
10163
10164
|
}
|
|
10164
10165
|
)
|
|
10165
10166
|
] });
|
|
10166
|
-
}, { Text: Ut } = He, { TabPane: ts } = be,
|
|
10167
|
+
}, { Text: Ut } = He, { TabPane: ts } = be, br = () => {
|
|
10167
10168
|
const [t, s] = l(null), [n, a] = l([]), [m, i] = l([]), [d, o] = l([]), [y, c] = l([]), [r, x] = l(!1), [L, G] = l(null), [U, u] = l([]), [A, k] = l(7), [f, h] = l([]);
|
|
10168
10169
|
ae(() => {
|
|
10169
10170
|
yl.appPage({ id: 1 }).then((g) => {
|
|
@@ -10439,7 +10440,7 @@ const { TextArea: rl } = Z, { Option: ot } = Y, { TabPane: In } = be, gr = () =>
|
|
|
10439
10440
|
{
|
|
10440
10441
|
title: /* @__PURE__ */ e.jsx("span", { style: { color: "#666", fontSize: 13 }, children: "累计 Token" }),
|
|
10441
10442
|
value: (t == null ? void 0 : t.total_tokens) || 0,
|
|
10442
|
-
prefix: /* @__PURE__ */ e.jsx(
|
|
10443
|
+
prefix: /* @__PURE__ */ e.jsx(Vt, { style: { color: "#52c41a" } }),
|
|
10443
10444
|
formatter: (g) => Number(g).toLocaleString(),
|
|
10444
10445
|
styles: { content: { color: "#333", fontSize: 22, fontWeight: 700 } }
|
|
10445
10446
|
}
|
|
@@ -10594,7 +10595,7 @@ const { TextArea: rl } = Z, { Option: ot } = Y, { TabPane: In } = be, gr = () =>
|
|
|
10594
10595
|
) }, "byUser")
|
|
10595
10596
|
] })
|
|
10596
10597
|
] });
|
|
10597
|
-
}, { Text: Pn, Paragraph: ks, Title:
|
|
10598
|
+
}, { Text: Pn, Paragraph: ks, Title: Di } = He, En = {
|
|
10598
10599
|
GENERAL: "通用",
|
|
10599
10600
|
CUSTOMER_SERVICE: "客服",
|
|
10600
10601
|
CODE: "代码",
|
|
@@ -10604,7 +10605,7 @@ const { TextArea: rl } = Z, { Option: ot } = Y, { TabPane: In } = be, gr = () =>
|
|
|
10604
10605
|
HEALTHCARE: "医疗",
|
|
10605
10606
|
FINANCE: "金融",
|
|
10606
10607
|
HR: "人力资源"
|
|
10607
|
-
},
|
|
10608
|
+
}, Fi = (t) => ({
|
|
10608
10609
|
GENERAL: "default",
|
|
10609
10610
|
CUSTOMER_SERVICE: "blue",
|
|
10610
10611
|
CODE: "cyan",
|
|
@@ -10614,7 +10615,7 @@ const { TextArea: rl } = Z, { Option: ot } = Y, { TabPane: In } = be, gr = () =>
|
|
|
10614
10615
|
HEALTHCARE: "red",
|
|
10615
10616
|
FINANCE: "gold",
|
|
10616
10617
|
HR: "magenta"
|
|
10617
|
-
})[t] || "default",
|
|
10618
|
+
})[t] || "default", Cr = () => {
|
|
10618
10619
|
const [t, s] = l([]), [n, a] = l(!1), [m, i] = l(null), [d, o] = l(null), y = async () => {
|
|
10619
10620
|
a(!0);
|
|
10620
10621
|
try {
|
|
@@ -10685,7 +10686,7 @@ const { TextArea: rl } = Z, { Option: ot } = Y, { TabPane: In } = be, gr = () =>
|
|
|
10685
10686
|
/* @__PURE__ */ e.jsx(Pn, { type: "secondary", style: { fontSize: 12 }, children: "FEATURE013 T3.3 · Agent 模板市场" })
|
|
10686
10687
|
] }),
|
|
10687
10688
|
/* @__PURE__ */ e.jsxs(pe, { gutter: [16, 16], children: [
|
|
10688
|
-
t.length === 0 && !n && /* @__PURE__ */ e.jsx(J, { span: 24, children: /* @__PURE__ */ e.jsx(
|
|
10689
|
+
t.length === 0 && !n && /* @__PURE__ */ e.jsx(J, { span: 24, children: /* @__PURE__ */ e.jsx(Wt, { title: "暂无模板", description: "当前分类下没有可用模板" }) }),
|
|
10689
10690
|
t.map((r) => {
|
|
10690
10691
|
var x;
|
|
10691
10692
|
return /* @__PURE__ */ e.jsx(J, { xs: 24, sm: 12, md: 8, lg: 6, children: /* @__PURE__ */ e.jsxs(
|
|
@@ -10708,12 +10709,12 @@ const { TextArea: rl } = Z, { Option: ot } = Y, { TabPane: In } = be, gr = () =>
|
|
|
10708
10709
|
],
|
|
10709
10710
|
children: [
|
|
10710
10711
|
/* @__PURE__ */ e.jsx("div", { style: { textAlign: "center", marginBottom: 8 }, children: /* @__PURE__ */ e.jsx("span", { style: { fontSize: 40 }, children: r.icon || "📋" }) }),
|
|
10711
|
-
/* @__PURE__ */ e.jsx(
|
|
10712
|
+
/* @__PURE__ */ e.jsx(Di, { level: 5, style: { textAlign: "center", marginBottom: 4 }, children: r.name }),
|
|
10712
10713
|
/* @__PURE__ */ e.jsxs("div", { style: { textAlign: "center", marginBottom: 8 }, children: [
|
|
10713
10714
|
/* @__PURE__ */ e.jsx(
|
|
10714
10715
|
D,
|
|
10715
10716
|
{
|
|
10716
|
-
color:
|
|
10717
|
+
color: Fi(r.category),
|
|
10717
10718
|
children: En[r.category] || r.category
|
|
10718
10719
|
}
|
|
10719
10720
|
),
|
|
@@ -10829,10 +10830,10 @@ const { TextArea: rl } = Z, { Option: ot } = Y, { TabPane: In } = be, gr = () =>
|
|
|
10829
10830
|
}),
|
|
10830
10831
|
/** 取单个 skill 的完整元数据 */
|
|
10831
10832
|
get: (t) => Ae.get("/skill/get", { params: { skillCode: t } })
|
|
10832
|
-
}, { Text: xt, Title:
|
|
10833
|
+
}, { Text: xt, Title: Sr } = He, Rn = {
|
|
10833
10834
|
ZBOT: /* @__PURE__ */ e.jsx(yt, {}),
|
|
10834
|
-
HERMES_CONTAINER: /* @__PURE__ */ e.jsx(
|
|
10835
|
-
HERMES_LOCAL: /* @__PURE__ */ e.jsx(
|
|
10835
|
+
HERMES_CONTAINER: /* @__PURE__ */ e.jsx(ea, {}),
|
|
10836
|
+
HERMES_LOCAL: /* @__PURE__ */ e.jsx(Xl, {}),
|
|
10836
10837
|
CLAUDE_CODE: /* @__PURE__ */ e.jsx(_t, {}),
|
|
10837
10838
|
OPENCODE: /* @__PURE__ */ e.jsx(_t, {}),
|
|
10838
10839
|
CUSTOM: /* @__PURE__ */ e.jsx(st, {})
|
|
@@ -10843,7 +10844,7 @@ const { TextArea: rl } = Z, { Option: ot } = Y, { TabPane: In } = be, gr = () =>
|
|
|
10843
10844
|
CLAUDE_CODE: "本机 Claude Code CLI(需要 `claude` 在 PATH 中)",
|
|
10844
10845
|
OPENCODE: "本机 OpenCode CLI(需要 `opencode` 在 PATH 中)",
|
|
10845
10846
|
CUSTOM: '用户自定义命令(bash -c "{customCommand} --port {port}")'
|
|
10846
|
-
},
|
|
10847
|
+
}, vr = () => {
|
|
10847
10848
|
const [t, s] = l({}), [n, a] = l([]), [m, i] = l(!1), [d, o] = l(!1), [y, c] = l(!1), [r, x] = l("ZBOT"), [L, G] = l(!1), [U, u] = l(null), [A, k] = l([]), [f, h] = l([]), [F, E] = l({}), [b, w] = l([]), [$, _] = l(!1), [g, B] = l(""), [O, V] = l([]), [ee, S] = l(!1), [I] = T.useForm(), N = $e(null), z = $e(null);
|
|
10848
10849
|
ae(() => {
|
|
10849
10850
|
q();
|
|
@@ -11225,7 +11226,7 @@ const { TextArea: rl } = Z, { Option: ot } = Y, { TabPane: In } = be, gr = () =>
|
|
|
11225
11226
|
children: /* @__PURE__ */ e.jsxs("div", { children: [
|
|
11226
11227
|
/* @__PURE__ */ e.jsxs(se, { style: { marginBottom: 12, width: "100%" }, children: [
|
|
11227
11228
|
/* @__PURE__ */ e.jsx(
|
|
11228
|
-
|
|
11229
|
+
Qt,
|
|
11229
11230
|
{
|
|
11230
11231
|
placeholder: "按名称/编码搜索 Skill",
|
|
11231
11232
|
value: g,
|
|
@@ -11350,52 +11351,52 @@ const { TextArea: rl } = Z, { Option: ot } = Y, { TabPane: In } = be, gr = () =>
|
|
|
11350
11351
|
] });
|
|
11351
11352
|
};
|
|
11352
11353
|
export {
|
|
11353
|
-
|
|
11354
|
-
|
|
11355
|
-
|
|
11356
|
-
|
|
11357
|
-
|
|
11358
|
-
|
|
11359
|
-
|
|
11360
|
-
|
|
11361
|
-
|
|
11362
|
-
|
|
11363
|
-
|
|
11354
|
+
va as AgentAppEditor,
|
|
11355
|
+
ar as AgentAppList,
|
|
11356
|
+
ar as AgentAppPage,
|
|
11357
|
+
br as AgentDashboard,
|
|
11358
|
+
vr as AgentInstanceManager,
|
|
11359
|
+
ir as AgentSharePage,
|
|
11360
|
+
dr as AkManage,
|
|
11361
|
+
Wa as AkUsageDrawer,
|
|
11362
|
+
li as ApiBridgeEditor,
|
|
11363
|
+
pr as BucketList,
|
|
11364
|
+
Xa as CurlImportModal,
|
|
11364
11365
|
al as FieldMappingEditor,
|
|
11365
|
-
|
|
11366
|
-
|
|
11367
|
-
|
|
11368
|
-
|
|
11369
|
-
|
|
11370
|
-
|
|
11371
|
-
|
|
11372
|
-
|
|
11373
|
-
|
|
11374
|
-
|
|
11375
|
-
|
|
11376
|
-
|
|
11377
|
-
|
|
11378
|
-
|
|
11379
|
-
|
|
11380
|
-
|
|
11366
|
+
or as LlmManage,
|
|
11367
|
+
$a as LlmModel,
|
|
11368
|
+
Ga as LlmProvider,
|
|
11369
|
+
cr as McpPage,
|
|
11370
|
+
rr as ModelManage,
|
|
11371
|
+
xr as ObjectBrowser,
|
|
11372
|
+
ti as OpenApiImportModal,
|
|
11373
|
+
fr as ProductExecute,
|
|
11374
|
+
yr as ProductList,
|
|
11375
|
+
jr as ProductScene,
|
|
11376
|
+
hr as ScriptCenterPage,
|
|
11377
|
+
gr as ScriptProductizationPage,
|
|
11378
|
+
mr as SkillMarket,
|
|
11379
|
+
Cr as TemplateMarket,
|
|
11380
|
+
Va as UsageDashboard,
|
|
11381
|
+
Ca as WorkflowEditor,
|
|
11381
11382
|
ve as agentApi,
|
|
11382
11383
|
nl as authRequest,
|
|
11383
|
-
|
|
11384
|
+
Tr as configureAgent,
|
|
11384
11385
|
ll as ctcRequest,
|
|
11385
11386
|
Yt as flowApi,
|
|
11386
|
-
|
|
11387
|
-
|
|
11387
|
+
nr as humanInputApi,
|
|
11388
|
+
fa as llmApi,
|
|
11388
11389
|
xs as mcpApi,
|
|
11389
|
-
|
|
11390
|
+
Xi as memoryApi,
|
|
11390
11391
|
qe as ossApi,
|
|
11391
|
-
|
|
11392
|
+
Zi as pluginApi,
|
|
11392
11393
|
rt as productApi,
|
|
11393
11394
|
je as request,
|
|
11394
|
-
|
|
11395
|
+
lr as sceneApi,
|
|
11395
11396
|
Ye as scriptApi,
|
|
11396
11397
|
Ge as skillApi,
|
|
11397
|
-
|
|
11398
|
-
|
|
11399
|
-
|
|
11400
|
-
|
|
11398
|
+
Yi as statsApi,
|
|
11399
|
+
tr as templateApi,
|
|
11400
|
+
sr as textGenApi,
|
|
11401
|
+
er as triggerApi
|
|
11401
11402
|
};
|