@yuku123/z-agent-frontend-component 0.1.1 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import tl, { useRef as Oe, useState as i, useEffect as ae, useCallback as Ie } from "react";
|
|
2
|
-
import { message as y, Space as ie, Tooltip as se, Button as j, Tag as V, Modal as xe, Input as $, Typography as Ze, Form as f, Alert as qe, Card as Z, Select as X, Tabs as Ce, Row as de, Col as q, InputNumber as We, Switch as zt, Tree as cs, Table as ve, Popconfirm as He, TreeSelect as sl, Divider as lt, Drawer as
|
|
3
|
-
import { UndoOutlined as ol, RedoOutlined as dl, DeleteOutlined as je, SaveOutlined as mn, CloudUploadOutlined as
|
|
4
|
-
import { createRequest as Ps, ErrorBoundary as
|
|
5
|
-
import Ct, { CircleNode as En, RectNode as Ot, PolygonNode as
|
|
6
|
-
import { Control as
|
|
2
|
+
import { message as y, Space as ie, Tooltip as se, Button as j, Tag as V, Modal as xe, Input as $, Typography as Ze, Form as f, Alert as qe, Card as Z, Select as X, Tabs as Ce, Row as de, Col as q, InputNumber as We, Switch as zt, Tree as cs, Table as ve, Popconfirm as He, TreeSelect as sl, Divider as lt, Drawer as ut, Avatar as Ge, Empty as me, QRCode as nl, Spin as Ve, List as Ut, Statistic as he, Radio as Zt, Descriptions as Pe, Dropdown as vs, Breadcrumb as ll, Upload as ps, Steps as gn, Progress as il, Pagination as al, Timeline as rl, Badge as Vt } from "antd";
|
|
3
|
+
import { UndoOutlined as ol, RedoOutlined as dl, DeleteOutlined as je, SaveOutlined as mn, CloudUploadOutlined as yt, ArrowLeftOutlined as yn, DiffOutlined as Cs, RocketOutlined as Qt, EyeOutlined as et, MessageOutlined as jn, RobotOutlined as Re, ApartmentOutlined as Ss, ThunderboltOutlined as it, DatabaseOutlined as bn, BookOutlined as vn, ReloadOutlined as tt, AppstoreFilled as cl, UnorderedListOutlined as pl, PlusOutlined as Se, LoadingOutlined as Kt, EditOutlined as $e, FolderOpenOutlined as Cn, FolderOutlined as Xe, GlobalOutlined as xt, LockOutlined as Et, SettingOutlined as Sn, CheckCircleFilled as dt, CopyOutlined as Be, LinkOutlined as ws, StarOutlined as wn, ExclamationCircleFilled as kn, ClearOutlined as Tn, SendOutlined as In, ClockCircleOutlined as ks, UserOutlined as Ts, ApiOutlined as ht, BranchesOutlined as ul, PictureOutlined as xl, AudioOutlined as hl, NodeIndexOutlined as pt, DollarOutlined as Gt, BarChartOutlined as An, KeyOutlined as es, CheckCircleOutlined as bt, AppstoreOutlined as qt, StopOutlined as Is, PlayCircleOutlined as ct, CloudOutlined as Ht, MoreOutlined as As, TeamOutlined as fl, FolderAddOutlined as gl, UploadOutlined as Pn, DownloadOutlined as mt, FileZipOutlined as zn, FileImageOutlined as ml, FileTextOutlined as jt, FileOutlined as yl, ArrowUpOutlined as jl, ArrowDownOutlined as bl, CodeOutlined as $t, ExperimentOutlined as vl, ImportOutlined as Cl, CloudServerOutlined as Sl, CloudDownloadOutlined as wl, SearchOutlined as kl, FireOutlined as Gs, InfoCircleOutlined as Tl, HistoryOutlined as Jt, ShopOutlined as Yt, ExclamationCircleOutlined as Il, TagOutlined as Al, CloseCircleOutlined as Pl } from "@ant-design/icons";
|
|
4
|
+
import { createRequest as Ps, ErrorBoundary as zl } from "@yuku123/z-frontend-common";
|
|
5
|
+
import Ct, { CircleNode as En, RectNode as Ot, PolygonNode as El, h as Ol, CircleNodeModel as qs, RectNodeModel as kt, PolygonNodeModel as Rl } from "@logicflow/core";
|
|
6
|
+
import { Control as Nl, MiniMap as Ll, Menu as Dl, DndPanel as Bl, SelectionSelect as Fl } from "@logicflow/extension";
|
|
7
7
|
import { useParams as On, useNavigate as Rn } from "react-router-dom";
|
|
8
8
|
import Nn from "react-markdown";
|
|
9
|
-
import
|
|
9
|
+
import Ml from "remark-gfm";
|
|
10
10
|
import Ln from "echarts-for-react";
|
|
11
11
|
var Lt = { exports: {} }, Tt = {};
|
|
12
12
|
/**
|
|
@@ -19,7 +19,7 @@ var Lt = { exports: {} }, Tt = {};
|
|
|
19
19
|
* LICENSE file in the root directory of this source tree.
|
|
20
20
|
*/
|
|
21
21
|
var Hs;
|
|
22
|
-
function
|
|
22
|
+
function _l() {
|
|
23
23
|
if (Hs) return Tt;
|
|
24
24
|
Hs = 1;
|
|
25
25
|
var t = Symbol.for("react.transitional.element"), s = Symbol.for("react.fragment");
|
|
@@ -51,7 +51,7 @@ var It = {};
|
|
|
51
51
|
* LICENSE file in the root directory of this source tree.
|
|
52
52
|
*/
|
|
53
53
|
var $s;
|
|
54
|
-
function
|
|
54
|
+
function Ul() {
|
|
55
55
|
return $s || ($s = 1, process.env.NODE_ENV !== "production" && (function() {
|
|
56
56
|
function t(l) {
|
|
57
57
|
if (l == null) return null;
|
|
@@ -282,11 +282,11 @@ React keys must be passed directly to JSX without using spread:
|
|
|
282
282
|
})()), It;
|
|
283
283
|
}
|
|
284
284
|
var Js;
|
|
285
|
-
function
|
|
286
|
-
return Js || (Js = 1, process.env.NODE_ENV === "production" ? Lt.exports =
|
|
285
|
+
function Wl() {
|
|
286
|
+
return Js || (Js = 1, process.env.NODE_ENV === "production" ? Lt.exports = _l() : Lt.exports = Ul()), Lt.exports;
|
|
287
287
|
}
|
|
288
|
-
var e =
|
|
289
|
-
const
|
|
288
|
+
var e = Wl();
|
|
289
|
+
const Vl = Ps({ baseURL: "/api", timeout: 15e3 }), Dn = Ps({ baseURL: "/api", timeout: 15e3 }), Bn = Ps({ baseURL: "/api", timeout: 15e3 });
|
|
290
290
|
function zs(t) {
|
|
291
291
|
const s = function(n, k = {}) {
|
|
292
292
|
const o = { ...k };
|
|
@@ -296,18 +296,18 @@ function zs(t) {
|
|
|
296
296
|
typeof t[n] == "function" ? s[n] = t[n].bind(t) : s[n] = t[n];
|
|
297
297
|
}), s;
|
|
298
298
|
}
|
|
299
|
-
const ue = zs(
|
|
299
|
+
const ue = zs(Vl);
|
|
300
300
|
zs(Dn);
|
|
301
301
|
zs(Bn);
|
|
302
302
|
const Ys = { GET: "GET", POST: "POST", PUT: "PUT", DELETE: "DELETE" }, Wt = {};
|
|
303
303
|
function D(t, s, a, n, k) {
|
|
304
304
|
Wt[t] || (Wt[t] = {}), Wt[t][s] = { verb: a, path: n, transform: k };
|
|
305
305
|
}
|
|
306
|
-
function
|
|
306
|
+
function Kl(t, s) {
|
|
307
307
|
let a = 0;
|
|
308
308
|
return t.replace(/\{(\w+)\}/g, () => String(s[a++] ?? ""));
|
|
309
309
|
}
|
|
310
|
-
function
|
|
310
|
+
function Gl(t, s) {
|
|
311
311
|
return s.startsWith("/ctc/ac") || s.startsWith("/ctc/authorization") || s.startsWith("/ctc/surl") ? Bn : s.startsWith("/auth/") ? Dn : ue;
|
|
312
312
|
}
|
|
313
313
|
function st(t) {
|
|
@@ -320,7 +320,7 @@ function st(t) {
|
|
|
320
320
|
if (!k)
|
|
321
321
|
return { code: 200, message: "ok", data: [], total: 0 };
|
|
322
322
|
try {
|
|
323
|
-
const v =
|
|
323
|
+
const v = Kl(k.path, n), g = Gl(k.verb, v), b = {};
|
|
324
324
|
k.verb === Ys.GET || k.verb === Ys.DELETE ? n.length > 0 && typeof n[0] == "object" && n[0] !== null && (b.params = n[0]) : n.length === 1 ? b.data = n[0] : n.length > 1 && (typeof n[0] == "object" && n[0] !== null && (b.data = n[0]), typeof n[1] == "object" && n[1] !== null && (b.params = n[1]));
|
|
325
325
|
const T = await g.request({
|
|
326
326
|
method: k.verb,
|
|
@@ -431,7 +431,7 @@ D("sceneApi", "canvasGet", "GET", "/v1/scenes/{id}/canvas");
|
|
|
431
431
|
D("sceneApi", "configGet", "GET", "/v1/scenes/{id}/config");
|
|
432
432
|
D("sceneApi", "nodes", "GET", "/v1/scenes/{id}/nodes");
|
|
433
433
|
D("sceneApi", "chatHistory", "GET", "/v1/scenes/{id}/chat-history");
|
|
434
|
-
const be = st("agentApi"), Dt = st("flowApi"),
|
|
434
|
+
const be = st("agentApi"), Dt = st("flowApi"), ft = st("llmApi"), at = st("mcpApi"), _e = st("scriptApi"), Me = st("skillApi"), Ue = st("productApi"), Ee = st("sceneApi"), De = st("ossApi"), Es = class Es extends En {
|
|
435
435
|
getNodeStyle() {
|
|
436
436
|
const s = super.getNodeStyle();
|
|
437
437
|
return s.fill = "#52c41a", s.stroke = "#52c41a", s.strokeWidth = 2, s;
|
|
@@ -467,7 +467,7 @@ const Rs = class Rs extends Ot {
|
|
|
467
467
|
};
|
|
468
468
|
Rs.extendKey = "agent";
|
|
469
469
|
let hs = Rs;
|
|
470
|
-
const Ns = class Ns extends
|
|
470
|
+
const Ns = class Ns extends El {
|
|
471
471
|
getNodeStyle() {
|
|
472
472
|
const s = super.getNodeStyle();
|
|
473
473
|
return s.fill = "#fff7e6", s.stroke = "#fa8c16", s.strokeWidth = 2, s;
|
|
@@ -523,7 +523,7 @@ const Bs = class Bs extends Ot {
|
|
|
523
523
|
}
|
|
524
524
|
getShape() {
|
|
525
525
|
const { x: s, y: a, width: n, height: k } = this.getAttributes(), o = n / 2, v = k / 2, g = 12;
|
|
526
|
-
return
|
|
526
|
+
return Ol("polygon", {
|
|
527
527
|
points: [
|
|
528
528
|
[s - o + g, a - v],
|
|
529
529
|
[s + o - g, a - v],
|
|
@@ -549,8 +549,8 @@ const Fs = class Fs extends En {
|
|
|
549
549
|
};
|
|
550
550
|
Fs.extendKey = "end";
|
|
551
551
|
let js = Fs;
|
|
552
|
-
function
|
|
553
|
-
t.register({ type: "start", view: us, model: qs }), t.register({ type: "llm", view: xs, model: kt }), t.register({ type: "agent", view: hs, model: kt }), t.register({ type: "condition", view: fs, model:
|
|
552
|
+
function ql(t) {
|
|
553
|
+
t.register({ type: "start", view: us, model: qs }), t.register({ type: "llm", view: xs, model: kt }), t.register({ type: "agent", view: hs, model: kt }), t.register({ type: "condition", view: fs, model: Rl }), t.register({ type: "http", view: gs, model: kt }), t.register({ type: "template", view: ms, model: kt }), t.register({ type: "parallel", view: ys, model: kt }), t.register({ type: "end", view: js, model: qs });
|
|
554
554
|
}
|
|
555
555
|
const bs = [
|
|
556
556
|
{ type: "start", label: "开始", icon: "https://cdn.jsdelivr.net/gh/LogicFlow/static@latest/docs/static/start.png" },
|
|
@@ -566,11 +566,11 @@ const bs = [
|
|
|
566
566
|
{ type: "parallel", label: "并行执行", icon: "⚡" },
|
|
567
567
|
{ type: "end", label: "结束", icon: "https://cdn.jsdelivr.net/gh/LogicFlow/static@latest/docs/static/end.png" }
|
|
568
568
|
];
|
|
569
|
+
Ct.use(Nl);
|
|
569
570
|
Ct.use(Ll);
|
|
570
571
|
Ct.use(Dl);
|
|
571
572
|
Ct.use(Bl);
|
|
572
573
|
Ct.use(Fl);
|
|
573
|
-
Ct.use(Ml);
|
|
574
574
|
const Qs = {
|
|
575
575
|
nodes: [
|
|
576
576
|
{ id: "start_1", type: "start", x: 150, y: 280, text: "开始" },
|
|
@@ -581,7 +581,7 @@ const Qs = {
|
|
|
581
581
|
{ id: "e1", type: "polyline", sourceNodeId: "start_1", targetNodeId: "llm_1", text: "" },
|
|
582
582
|
{ id: "e2", type: "polyline", sourceNodeId: "llm_1", targetNodeId: "end_1", text: "" }
|
|
583
583
|
]
|
|
584
|
-
},
|
|
584
|
+
}, Hl = ({ node: t, onChange: s, onClose: a }) => {
|
|
585
585
|
var k, o, v, g, b;
|
|
586
586
|
if (!t) return null;
|
|
587
587
|
const n = ((k = bs.find((T) => T.type === t.type)) == null ? void 0 : k.label) || t.type;
|
|
@@ -718,7 +718,7 @@ const Qs = {
|
|
|
718
718
|
)
|
|
719
719
|
] })
|
|
720
720
|
] });
|
|
721
|
-
},
|
|
721
|
+
}, $l = ({ readOnly: t = !1, value: s, onChange: a, appCode: n, flowName: k }) => {
|
|
722
722
|
const o = Oe(null), v = Oe(null), [g, b] = i(null), [T, u] = i(s || Qs), [x, R] = i(null), [L, B] = i(!1), [c, w] = i(!1);
|
|
723
723
|
ae(() => {
|
|
724
724
|
if (!o.current) return;
|
|
@@ -742,7 +742,7 @@ const Qs = {
|
|
|
742
742
|
// Default edge type
|
|
743
743
|
edgeType: "polyline"
|
|
744
744
|
});
|
|
745
|
-
|
|
745
|
+
ql(P), P.extension.dndPanel.setPatternItems(
|
|
746
746
|
bs.map((W) => ({
|
|
747
747
|
type: W.type,
|
|
748
748
|
label: W.label,
|
|
@@ -912,7 +912,7 @@ const Qs = {
|
|
|
912
912
|
size: "small",
|
|
913
913
|
type: "primary",
|
|
914
914
|
ghost: !0,
|
|
915
|
-
icon: /* @__PURE__ */ e.jsx(
|
|
915
|
+
icon: /* @__PURE__ */ e.jsx(yt, {}),
|
|
916
916
|
loading: L,
|
|
917
917
|
disabled: !n,
|
|
918
918
|
onClick: S,
|
|
@@ -962,7 +962,7 @@ const Qs = {
|
|
|
962
962
|
),
|
|
963
963
|
/* @__PURE__ */ e.jsx("div", { ref: o, style: { width: "100%", height: "100%" } }),
|
|
964
964
|
g && !t && /* @__PURE__ */ e.jsx(
|
|
965
|
-
|
|
965
|
+
Hl,
|
|
966
966
|
{
|
|
967
967
|
node: g,
|
|
968
968
|
onChange: C,
|
|
@@ -981,7 +981,7 @@ const Qs = {
|
|
|
981
981
|
fontSize: 12
|
|
982
982
|
}, children: "只读模式" })
|
|
983
983
|
] });
|
|
984
|
-
}, { TextArea: rt } = $, { Text: Je, Title:
|
|
984
|
+
}, { TextArea: rt } = $, { Text: Je, Title: Jl } = Ze, Xs = {
|
|
985
985
|
ollama: [
|
|
986
986
|
{ code: "qwen2.5:7b-instruct-q4_K_M", name: "Qwen 2.5 7B" },
|
|
987
987
|
{ code: "qwen3:8b", name: "Qwen3 8B" },
|
|
@@ -1041,7 +1041,7 @@ const Qs = {
|
|
|
1041
1041
|
workflow: "流程编排"
|
|
1042
1042
|
}
|
|
1043
1043
|
}
|
|
1044
|
-
},
|
|
1044
|
+
}, Yl = ({ app: t, onBack: s, onSaved: a }) => {
|
|
1045
1045
|
const [n, k] = i(t), o = n.status === "PUBLISHED", v = n.agentMode || "chat", g = Zs[v] || Zs.chat, [b, T] = i(!1), [u, x] = i(!1), [R, L] = i(g.tabs[0]), [B] = f.useForm(), [c, w] = i(null);
|
|
1046
1046
|
ae(() => {
|
|
1047
1047
|
R && !g.tabs.includes(R) && L(g.tabs[0]);
|
|
@@ -1085,7 +1085,7 @@ const Qs = {
|
|
|
1085
1085
|
flexShrink: 0
|
|
1086
1086
|
}, children: [
|
|
1087
1087
|
/* @__PURE__ */ e.jsx(j, { type: "text", icon: /* @__PURE__ */ e.jsx(yn, {}), onClick: s }),
|
|
1088
|
-
/* @__PURE__ */ e.jsxs(
|
|
1088
|
+
/* @__PURE__ */ e.jsxs(Jl, { level: 5, style: { margin: 0, flex: 1, minWidth: 0 }, children: [
|
|
1089
1089
|
/* @__PURE__ */ e.jsx("span", { style: { marginRight: 8 }, children: n.appName }),
|
|
1090
1090
|
/* @__PURE__ */ e.jsxs(V, { color: g.color, style: { borderRadius: 20, marginRight: 4 }, children: [
|
|
1091
1091
|
g.icon,
|
|
@@ -1428,13 +1428,13 @@ const Qs = {
|
|
|
1428
1428
|
}
|
|
1429
1429
|
),
|
|
1430
1430
|
/* @__PURE__ */ e.jsx(
|
|
1431
|
-
|
|
1431
|
+
zl,
|
|
1432
1432
|
{
|
|
1433
1433
|
fallbackTitle: "流程编辑器加载失败",
|
|
1434
1434
|
fallbackDescription: "LogicFlow 初始化异常。请重试,或切换到「对话」/「智能体」模式后重新切回工作流。",
|
|
1435
1435
|
onReset: () => w(null),
|
|
1436
1436
|
children: /* @__PURE__ */ e.jsx(
|
|
1437
|
-
|
|
1437
|
+
$l,
|
|
1438
1438
|
{
|
|
1439
1439
|
readOnly: o,
|
|
1440
1440
|
value: c,
|
|
@@ -1452,7 +1452,7 @@ const Qs = {
|
|
|
1452
1452
|
}) }) })
|
|
1453
1453
|
] })
|
|
1454
1454
|
] });
|
|
1455
|
-
}, { TextArea:
|
|
1455
|
+
}, { TextArea: Ql } = $, { Option: Ye } = X, { TabPane: ts } = Ce, { Text: ze, Title: vt } = Ze, Qi = () => {
|
|
1456
1456
|
const [t, s] = i(""), [a, n] = i(""), [k, o] = i(0), [v, g] = i(null), b = () => o((T) => T + 1);
|
|
1457
1457
|
return v ? /* @__PURE__ */ e.jsx("div", { style: {
|
|
1458
1458
|
flex: 1,
|
|
@@ -1461,7 +1461,7 @@ const Qs = {
|
|
|
1461
1461
|
background: "#fff",
|
|
1462
1462
|
boxShadow: "0 1px 4px rgba(0,0,0,0.06)"
|
|
1463
1463
|
}, children: /* @__PURE__ */ e.jsx(
|
|
1464
|
-
|
|
1464
|
+
Yl,
|
|
1465
1465
|
{
|
|
1466
1466
|
app: v,
|
|
1467
1467
|
onBack: () => {
|
|
@@ -1480,7 +1480,7 @@ const Qs = {
|
|
|
1480
1480
|
title: "分组",
|
|
1481
1481
|
extra: /* @__PURE__ */ e.jsx(j, { size: "small", icon: /* @__PURE__ */ e.jsx(tt, {}), onClick: b }),
|
|
1482
1482
|
children: /* @__PURE__ */ e.jsx(
|
|
1483
|
-
|
|
1483
|
+
Zl,
|
|
1484
1484
|
{
|
|
1485
1485
|
selectedGroupCode: t,
|
|
1486
1486
|
onGroupSelect: (T, u) => {
|
|
@@ -1498,7 +1498,7 @@ const Qs = {
|
|
|
1498
1498
|
size: "small",
|
|
1499
1499
|
style: { flex: 1, overflow: "auto" },
|
|
1500
1500
|
title: a || void 0,
|
|
1501
|
-
children: /* @__PURE__ */ e.jsx(
|
|
1501
|
+
children: /* @__PURE__ */ e.jsx(ni, { selectedGroupCode: t, onEditApp: g })
|
|
1502
1502
|
}
|
|
1503
1503
|
)
|
|
1504
1504
|
] });
|
|
@@ -1519,7 +1519,7 @@ const Qs = {
|
|
|
1519
1519
|
{ code: "qwen-plus", name: "Qwen Plus" },
|
|
1520
1520
|
{ code: "qwen-turbo", name: "Qwen Turbo" }
|
|
1521
1521
|
]
|
|
1522
|
-
},
|
|
1522
|
+
}, Xl = (t) => {
|
|
1523
1523
|
const s = {};
|
|
1524
1524
|
t.forEach((n) => {
|
|
1525
1525
|
s[n.groupCode] = {
|
|
@@ -1533,7 +1533,7 @@ const Qs = {
|
|
|
1533
1533
|
const k = s[n.groupCode];
|
|
1534
1534
|
n.parentCode && s[n.parentCode] ? s[n.parentCode].children.push(k) : n.parentCode || a.push(k);
|
|
1535
1535
|
}), a;
|
|
1536
|
-
},
|
|
1536
|
+
}, Zl = ({ selectedGroupCode: t, onGroupSelect: s, onGroupRefresh: a }) => {
|
|
1537
1537
|
const [n, k] = i([]), [o, v] = i(!1), [g, b] = i(!1), [T, u] = i(null), [x, R] = i(null), [L] = f.useForm(), B = Oe(null), c = (h) => {
|
|
1538
1538
|
s(h === t ? "" : h, "");
|
|
1539
1539
|
}, w = () => {
|
|
@@ -1671,7 +1671,7 @@ const Qs = {
|
|
|
1671
1671
|
}
|
|
1672
1672
|
)
|
|
1673
1673
|
] });
|
|
1674
|
-
},
|
|
1674
|
+
}, ei = ({
|
|
1675
1675
|
record: t,
|
|
1676
1676
|
onEdit: s,
|
|
1677
1677
|
onView: a,
|
|
@@ -1710,7 +1710,7 @@ const Qs = {
|
|
|
1710
1710
|
j,
|
|
1711
1711
|
{
|
|
1712
1712
|
type: "text",
|
|
1713
|
-
icon: R ? /* @__PURE__ */ e.jsx(
|
|
1713
|
+
icon: R ? /* @__PURE__ */ e.jsx(xt, { style: { color: "#52c41a" } }) : /* @__PURE__ */ e.jsx(Et, {}),
|
|
1714
1714
|
onClick: () => o == null ? void 0 : o(t),
|
|
1715
1715
|
children: "分享"
|
|
1716
1716
|
}
|
|
@@ -1770,7 +1770,7 @@ const Qs = {
|
|
|
1770
1770
|
V,
|
|
1771
1771
|
{
|
|
1772
1772
|
color: "green",
|
|
1773
|
-
icon: /* @__PURE__ */ e.jsx(
|
|
1773
|
+
icon: /* @__PURE__ */ e.jsx(xt, {}),
|
|
1774
1774
|
style: { borderRadius: 20, fontSize: 11, margin: 0 },
|
|
1775
1775
|
children: "已分享"
|
|
1776
1776
|
}
|
|
@@ -1796,7 +1796,7 @@ const Qs = {
|
|
|
1796
1796
|
] })
|
|
1797
1797
|
}
|
|
1798
1798
|
);
|
|
1799
|
-
},
|
|
1799
|
+
}, ti = ({ app: t, onEnable: s }) => {
|
|
1800
1800
|
const [a, n] = i(!1);
|
|
1801
1801
|
return /* @__PURE__ */ e.jsxs("div", { style: { padding: "24px 0", textAlign: "center" }, children: [
|
|
1802
1802
|
/* @__PURE__ */ e.jsx("div", { style: {
|
|
@@ -1820,7 +1820,7 @@ const Qs = {
|
|
|
1820
1820
|
{
|
|
1821
1821
|
type: "primary",
|
|
1822
1822
|
size: "large",
|
|
1823
|
-
icon: /* @__PURE__ */ e.jsx(
|
|
1823
|
+
icon: /* @__PURE__ */ e.jsx(xt, {}),
|
|
1824
1824
|
loading: a,
|
|
1825
1825
|
onClick: async () => {
|
|
1826
1826
|
n(!0);
|
|
@@ -1851,7 +1851,7 @@ const Qs = {
|
|
|
1851
1851
|
o
|
|
1852
1852
|
)) })
|
|
1853
1853
|
] });
|
|
1854
|
-
},
|
|
1854
|
+
}, si = ({ app: t, onDisable: s, onRefresh: a }) => {
|
|
1855
1855
|
var u, x;
|
|
1856
1856
|
const n = t.shareCode ? `${window.location.origin}/share/${t.shareCode}` : "", [k, o] = i(!1), [v, g] = i(!1), b = async () => {
|
|
1857
1857
|
if (n)
|
|
@@ -1987,7 +1987,7 @@ const Qs = {
|
|
|
1987
1987
|
}
|
|
1988
1988
|
)
|
|
1989
1989
|
] });
|
|
1990
|
-
},
|
|
1990
|
+
}, ni = ({ selectedGroupCode: t, onEditApp: s }) => {
|
|
1991
1991
|
const [a, n] = i([]), [k, o] = i(!1), [v, g] = i(""), [b, T] = i(""), [u, x] = i(1), [R] = i(12), [L, B] = i(0), [c, w] = i(!1), [C, p] = i([]), [F, J] = i(!1), [h, S] = i(null), [E, H] = i(!1), [P, G] = i(null), [W, z] = i("card"), [I, U] = i(ss.ollama), [d, m] = i(!1), [_] = f.useForm(), [O, te] = i([]);
|
|
1992
1992
|
ae(() => {
|
|
1993
1993
|
r(), l();
|
|
@@ -2173,7 +2173,7 @@ const Qs = {
|
|
|
2173
2173
|
gap: 16,
|
|
2174
2174
|
marginBottom: 16
|
|
2175
2175
|
}, children: a.map((Y) => /* @__PURE__ */ e.jsx(
|
|
2176
|
-
|
|
2176
|
+
ei,
|
|
2177
2177
|
{
|
|
2178
2178
|
record: Y,
|
|
2179
2179
|
onEdit: N,
|
|
@@ -2341,14 +2341,14 @@ const Qs = {
|
|
|
2341
2341
|
{
|
|
2342
2342
|
allowClear: !0,
|
|
2343
2343
|
placeholder: "默认",
|
|
2344
|
-
treeData:
|
|
2344
|
+
treeData: Xl(O),
|
|
2345
2345
|
treeDefaultExpandAll: !0,
|
|
2346
2346
|
onChange: (Y) => _.setFieldsValue({ groupCode: Y || "" }),
|
|
2347
2347
|
style: { width: "100%" }
|
|
2348
2348
|
}
|
|
2349
2349
|
) })
|
|
2350
2350
|
] }),
|
|
2351
|
-
/* @__PURE__ */ e.jsx(f.Item, { name: "description", label: "应用描述", children: /* @__PURE__ */ e.jsx(
|
|
2351
|
+
/* @__PURE__ */ e.jsx(f.Item, { name: "description", label: "应用描述", children: /* @__PURE__ */ e.jsx(Ql, { rows: 2, placeholder: "简短描述这个应用的能力和使用场景" }) }),
|
|
2352
2352
|
/* @__PURE__ */ e.jsx(lt, { style: { margin: "12px 0", fontSize: 12, color: "#8c8c8c" }, children: "应用类型" }),
|
|
2353
2353
|
/* @__PURE__ */ e.jsx(
|
|
2354
2354
|
f.Item,
|
|
@@ -2379,17 +2379,17 @@ const Qs = {
|
|
|
2379
2379
|
}
|
|
2380
2380
|
),
|
|
2381
2381
|
/* @__PURE__ */ e.jsx(
|
|
2382
|
-
|
|
2382
|
+
ut,
|
|
2383
2383
|
{
|
|
2384
2384
|
title: h ? `${h.appName} - 工具配置` : "工具配置",
|
|
2385
2385
|
width: 560,
|
|
2386
2386
|
open: F,
|
|
2387
2387
|
onClose: () => J(!1),
|
|
2388
|
-
children: h && /* @__PURE__ */ e.jsx(
|
|
2388
|
+
children: h && /* @__PURE__ */ e.jsx(li, { appCode: h.appCode })
|
|
2389
2389
|
}
|
|
2390
2390
|
),
|
|
2391
2391
|
/* @__PURE__ */ e.jsx(
|
|
2392
|
-
|
|
2392
|
+
ut,
|
|
2393
2393
|
{
|
|
2394
2394
|
title: P ? `${P.appName} · 分享` : "分享",
|
|
2395
2395
|
width: 520,
|
|
@@ -2408,14 +2408,14 @@ const Qs = {
|
|
|
2408
2408
|
)
|
|
2409
2409
|
] }),
|
|
2410
2410
|
children: P && (P.shareEnabled ? /* @__PURE__ */ e.jsx(
|
|
2411
|
-
|
|
2411
|
+
si,
|
|
2412
2412
|
{
|
|
2413
2413
|
app: P,
|
|
2414
2414
|
onDisable: () => oe(P, !1),
|
|
2415
2415
|
onRefresh: () => oe(P, !0)
|
|
2416
2416
|
}
|
|
2417
2417
|
) : /* @__PURE__ */ e.jsx(
|
|
2418
|
-
|
|
2418
|
+
ti,
|
|
2419
2419
|
{
|
|
2420
2420
|
app: P,
|
|
2421
2421
|
onEnable: () => oe(P, !0)
|
|
@@ -2424,7 +2424,7 @@ const Qs = {
|
|
|
2424
2424
|
}
|
|
2425
2425
|
)
|
|
2426
2426
|
] });
|
|
2427
|
-
},
|
|
2427
|
+
}, li = () => {
|
|
2428
2428
|
const [t, s] = i([]), [a, n] = i(null), [k, o] = i([]), [v, g] = i([]), [b, T] = i([]), [u, x] = i([]), [R, L] = i([]), [B, c] = i([]), [w, C] = i(!1), [p, F] = i(!1), [J, h] = i("tools"), [S, E] = i(!1);
|
|
2429
2429
|
ae(() => {
|
|
2430
2430
|
E(!0), be.appPage({ id: 1, pageSize: 100 }).then((I) => {
|
|
@@ -2432,15 +2432,15 @@ const Qs = {
|
|
|
2432
2432
|
}).finally(() => E(!1));
|
|
2433
2433
|
}, []), ae(() => {
|
|
2434
2434
|
a && (C(!0), Promise.all([
|
|
2435
|
-
|
|
2436
|
-
|
|
2437
|
-
|
|
2435
|
+
ft.toolTemplateList(),
|
|
2436
|
+
ft.skillTemplateList(),
|
|
2437
|
+
ft.knowledgeList()
|
|
2438
2438
|
]).then(([I, U, d]) => {
|
|
2439
2439
|
o((I == null ? void 0 : I.data) || I || []), g((U == null ? void 0 : U.data) || U || []), T((d == null ? void 0 : d.data) || d || []), H(a.appCode);
|
|
2440
2440
|
}).finally(() => C(!1)));
|
|
2441
2441
|
}, [a]);
|
|
2442
2442
|
const H = (I) => {
|
|
2443
|
-
|
|
2443
|
+
ft.appConfig(I).then((U) => {
|
|
2444
2444
|
const d = (U == null ? void 0 : U.data) || U || {};
|
|
2445
2445
|
x(d.tools || []), L(d.skills || []), c(d.knowledgeBases || []);
|
|
2446
2446
|
}).catch(() => {
|
|
@@ -2451,12 +2451,12 @@ const Qs = {
|
|
|
2451
2451
|
if (a) {
|
|
2452
2452
|
F(!0);
|
|
2453
2453
|
try {
|
|
2454
|
-
for (const I of u) await
|
|
2454
|
+
for (const I of u) await ft.appToolAdd({
|
|
2455
2455
|
appCode: a.appCode,
|
|
2456
2456
|
toolCode: I
|
|
2457
2457
|
}).catch(() => {
|
|
2458
2458
|
});
|
|
2459
|
-
for (const I of R) await
|
|
2459
|
+
for (const I of R) await ft.appSkillAdd({
|
|
2460
2460
|
appCode: a.appCode,
|
|
2461
2461
|
skillId: Number(I)
|
|
2462
2462
|
}).catch(() => {
|
|
@@ -2647,7 +2647,7 @@ const Qs = {
|
|
|
2647
2647
|
/* @__PURE__ */ e.jsx("div", { style: { marginTop: 16, color: "#8c8c8c" }, children: "请从左侧选择一个应用" })
|
|
2648
2648
|
] }) })
|
|
2649
2649
|
] }) });
|
|
2650
|
-
}, { TextArea:
|
|
2650
|
+
}, { TextArea: ii } = $, ai = ({ children: t, className: s }) => {
|
|
2651
2651
|
const a = String(t).replace(/\n$/, ""), [n, k] = i(!1), o = () => {
|
|
2652
2652
|
navigator.clipboard.writeText(a).then(() => {
|
|
2653
2653
|
k(!0), setTimeout(() => k(!1), 2e3);
|
|
@@ -2675,7 +2675,7 @@ const Qs = {
|
|
|
2675
2675
|
fontFamily: 'Consolas, Monaco, "Courier New", monospace'
|
|
2676
2676
|
}, children: /* @__PURE__ */ e.jsx("code", { className: s, children: a }) })
|
|
2677
2677
|
] });
|
|
2678
|
-
},
|
|
2678
|
+
}, ri = ({ msg: t }) => {
|
|
2679
2679
|
const s = t.role === "user", a = t.status === "FAILED";
|
|
2680
2680
|
return /* @__PURE__ */ e.jsxs("div", { style: {
|
|
2681
2681
|
display: "flex",
|
|
@@ -2718,7 +2718,7 @@ const Qs = {
|
|
|
2718
2718
|
}, children: /* @__PURE__ */ e.jsx(
|
|
2719
2719
|
Nn,
|
|
2720
2720
|
{
|
|
2721
|
-
remarkPlugins: [
|
|
2721
|
+
remarkPlugins: [Ml],
|
|
2722
2722
|
components: {
|
|
2723
2723
|
code({ node: n, inline: k, className: o, children: v, ...g }) {
|
|
2724
2724
|
return k ? /* @__PURE__ */ e.jsx("code", { style: {
|
|
@@ -2728,7 +2728,7 @@ const Qs = {
|
|
|
2728
2728
|
fontFamily: "monospace",
|
|
2729
2729
|
fontSize: "0.9em",
|
|
2730
2730
|
color: "#c7254e"
|
|
2731
|
-
}, ...g, children: v }) : /* @__PURE__ */ e.jsx(
|
|
2731
|
+
}, ...g, children: v }) : /* @__PURE__ */ e.jsx(ai, { className: o, children: v });
|
|
2732
2732
|
},
|
|
2733
2733
|
p({ children: n }) {
|
|
2734
2734
|
return /* @__PURE__ */ e.jsx("p", { style: { margin: "0 0 8px 0" }, children: n });
|
|
@@ -2781,7 +2781,7 @@ const Qs = {
|
|
|
2781
2781
|
}
|
|
2782
2782
|
)
|
|
2783
2783
|
] });
|
|
2784
|
-
},
|
|
2784
|
+
}, oi = ({ appName: t, appDesc: s }) => /* @__PURE__ */ e.jsxs("div", { style: {
|
|
2785
2785
|
display: "flex",
|
|
2786
2786
|
flexDirection: "column",
|
|
2787
2787
|
alignItems: "center",
|
|
@@ -2816,7 +2816,7 @@ const Qs = {
|
|
|
2816
2816
|
},
|
|
2817
2817
|
n
|
|
2818
2818
|
)) })
|
|
2819
|
-
] }),
|
|
2819
|
+
] }), Xi = () => {
|
|
2820
2820
|
const { shareCode: t } = On(), [s, a] = i(!0), [n, k] = i(""), [o, v] = i(""), [g, b] = i(""), [T, u] = i([]), [x, R] = i(""), [L, B] = i(!1), [c, w] = i(!1), [C, p] = i(""), [F, J] = i(!1), h = Oe(null), S = Oe(null);
|
|
2821
2821
|
Oe(null), ae(() => {
|
|
2822
2822
|
E();
|
|
@@ -2965,11 +2965,11 @@ const Qs = {
|
|
|
2965
2965
|
] })
|
|
2966
2966
|
] }),
|
|
2967
2967
|
/* @__PURE__ */ e.jsxs("div", { style: { flex: 1, overflowY: "auto", padding: "16px 24px" }, children: [
|
|
2968
|
-
T.length === 0 ? /* @__PURE__ */ e.jsx(
|
|
2968
|
+
T.length === 0 ? /* @__PURE__ */ e.jsx(oi, { appName: o, appDesc: g }) : /* @__PURE__ */ e.jsx(e.Fragment, { children: /* @__PURE__ */ e.jsx(
|
|
2969
2969
|
Ut,
|
|
2970
2970
|
{
|
|
2971
2971
|
dataSource: T,
|
|
2972
|
-
renderItem: (W) => /* @__PURE__ */ e.jsx(
|
|
2972
|
+
renderItem: (W) => /* @__PURE__ */ e.jsx(ri, { msg: W }),
|
|
2973
2973
|
locale: { emptyText: "" }
|
|
2974
2974
|
}
|
|
2975
2975
|
) }),
|
|
@@ -2984,7 +2984,7 @@ const Qs = {
|
|
|
2984
2984
|
}, children: [
|
|
2985
2985
|
/* @__PURE__ */ e.jsxs("div", { style: { display: "flex", gap: 12, alignItems: "flex-end" }, children: [
|
|
2986
2986
|
/* @__PURE__ */ e.jsx(
|
|
2987
|
-
|
|
2987
|
+
ii,
|
|
2988
2988
|
{
|
|
2989
2989
|
ref: S,
|
|
2990
2990
|
value: x,
|
|
@@ -3014,7 +3014,7 @@ const Qs = {
|
|
|
3014
3014
|
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
|
|
3015
3015
|
` })
|
|
3016
3016
|
] });
|
|
3017
|
-
}, { confirm:
|
|
3017
|
+
}, { confirm: di } = xe, ns = [
|
|
3018
3018
|
{
|
|
3019
3019
|
providerCode: "ollama",
|
|
3020
3020
|
providerName: "Ollama",
|
|
@@ -3157,19 +3157,19 @@ const Qs = {
|
|
|
3157
3157
|
{
|
|
3158
3158
|
key: "embedding",
|
|
3159
3159
|
title: "嵌入/向量",
|
|
3160
|
-
icon: /* @__PURE__ */ e.jsx(
|
|
3160
|
+
icon: /* @__PURE__ */ e.jsx(pt, {}),
|
|
3161
3161
|
color: "#52c41a",
|
|
3162
3162
|
bg: "#f6ffed",
|
|
3163
3163
|
border: "#52c41a"
|
|
3164
3164
|
}
|
|
3165
|
-
],
|
|
3165
|
+
], ci = [
|
|
3166
3166
|
{ value: "ollama", label: "Ollama" },
|
|
3167
3167
|
{ value: "openai", label: "OpenAI" },
|
|
3168
3168
|
{ value: "dashscope", label: "阿里通义" },
|
|
3169
3169
|
{ value: "azure", label: "Azure OpenAI" },
|
|
3170
3170
|
{ value: "anthropic", label: "Anthropic" },
|
|
3171
3171
|
{ value: "custom", label: "自定义" }
|
|
3172
|
-
],
|
|
3172
|
+
], Zi = () => {
|
|
3173
3173
|
const [t, s] = i([]), [a, n] = i([]), [k, o] = i(!1), [v, g] = i("chat"), [b, T] = i(null), [u, x] = i(!1), [R, L] = i(null), [B] = f.useForm(), [c, w] = i(!1), [C, p] = i(null), [F] = f.useForm(), J = async () => {
|
|
3174
3174
|
o(!0);
|
|
3175
3175
|
try {
|
|
@@ -3206,7 +3206,7 @@ const Qs = {
|
|
|
3206
3206
|
}, P = (d) => {
|
|
3207
3207
|
L(d), B.setFieldsValue(d), x(!0);
|
|
3208
3208
|
}, G = (d) => {
|
|
3209
|
-
|
|
3209
|
+
di({
|
|
3210
3210
|
title: "确认删除",
|
|
3211
3211
|
content: `删除模型 ${d.modelName} ?`,
|
|
3212
3212
|
onOk: async () => {
|
|
@@ -3367,7 +3367,7 @@ const Qs = {
|
|
|
3367
3367
|
children: "新增模型"
|
|
3368
3368
|
}
|
|
3369
3369
|
),
|
|
3370
|
-
/* @__PURE__ */ e.jsx(j, { size: "small", icon: /* @__PURE__ */ e.jsx(
|
|
3370
|
+
/* @__PURE__ */ e.jsx(j, { size: "small", icon: /* @__PURE__ */ e.jsx(ht, {}), onClick: z, children: "新增供应商" }),
|
|
3371
3371
|
/* @__PURE__ */ e.jsx(j, { size: "small", icon: /* @__PURE__ */ e.jsx(tt, {}), onClick: J })
|
|
3372
3372
|
] }) }),
|
|
3373
3373
|
/* @__PURE__ */ e.jsx("div", { style: { flex: 1, overflow: "auto" }, children: k ? /* @__PURE__ */ e.jsx("div", { style: { textAlign: "center", padding: 80 }, children: /* @__PURE__ */ e.jsx(Ve, { size: "large" }) }) : S.length === 0 ? /* @__PURE__ */ e.jsx("div", { style: { textAlign: "center", padding: 80 }, children: /* @__PURE__ */ e.jsx(me, { description: "暂无匹配的模型" }) }) : /* @__PURE__ */ e.jsx("div", { style: {
|
|
@@ -3409,7 +3409,7 @@ const Qs = {
|
|
|
3409
3409
|
alignItems: "center",
|
|
3410
3410
|
justifyContent: "center",
|
|
3411
3411
|
flexShrink: 0
|
|
3412
|
-
}, children: _ ? /* @__PURE__ */ e.jsx("span", { style: { color: "#fff", fontSize: 20 }, children: _.icon }) : /* @__PURE__ */ e.jsx(
|
|
3412
|
+
}, children: _ ? /* @__PURE__ */ e.jsx("span", { style: { color: "#fff", fontSize: 20 }, children: _.icon }) : /* @__PURE__ */ e.jsx(xt, { style: { fontSize: 20, color: "#fff" } }) }),
|
|
3413
3413
|
/* @__PURE__ */ e.jsxs("div", { style: { flex: 1, minWidth: 0 }, children: [
|
|
3414
3414
|
/* @__PURE__ */ e.jsxs("div", { style: {
|
|
3415
3415
|
display: "flex",
|
|
@@ -3442,7 +3442,7 @@ const Qs = {
|
|
|
3442
3442
|
color: E[m == null ? void 0 : m.providerType] || "default",
|
|
3443
3443
|
style: { fontSize: 11, borderRadius: 4 },
|
|
3444
3444
|
children: [
|
|
3445
|
-
/* @__PURE__ */ e.jsx(
|
|
3445
|
+
/* @__PURE__ */ e.jsx(xt, { style: { marginRight: 4 } }),
|
|
3446
3446
|
(m == null ? void 0 : m.providerName) || d.providerCode
|
|
3447
3447
|
]
|
|
3448
3448
|
}
|
|
@@ -3522,7 +3522,7 @@ const Qs = {
|
|
|
3522
3522
|
/* @__PURE__ */ e.jsx(q, { span: 12, children: /* @__PURE__ */ e.jsx(f.Item, { name: "providerName", label: "供应商名称", rules: [{ required: !0 }], children: /* @__PURE__ */ e.jsx($, { placeholder: "如: Ollama, OpenAI" }) }) })
|
|
3523
3523
|
] }),
|
|
3524
3524
|
/* @__PURE__ */ e.jsxs(de, { gutter: 16, children: [
|
|
3525
|
-
/* @__PURE__ */ e.jsx(q, { span: 12, children: /* @__PURE__ */ e.jsx(f.Item, { name: "providerType", label: "类型", rules: [{ required: !0 }], children: /* @__PURE__ */ e.jsx(X, { placeholder: "选择类型", children:
|
|
3525
|
+
/* @__PURE__ */ e.jsx(q, { span: 12, children: /* @__PURE__ */ e.jsx(f.Item, { name: "providerType", label: "类型", rules: [{ required: !0 }], children: /* @__PURE__ */ e.jsx(X, { placeholder: "选择类型", children: ci.map((d) => /* @__PURE__ */ e.jsx(X.Option, { value: d.value, children: d.label }, d.value)) }) }) }),
|
|
3526
3526
|
/* @__PURE__ */ e.jsx(q, { span: 12, children: /* @__PURE__ */ e.jsx(f.Item, { name: "status", label: "状态", initialValue: "ACTIVE", children: /* @__PURE__ */ e.jsxs(X, { children: [
|
|
3527
3527
|
/* @__PURE__ */ e.jsx(X.Option, { value: "ACTIVE", children: "正常" }),
|
|
3528
3528
|
/* @__PURE__ */ e.jsx(X.Option, { value: "INACTIVE", children: "禁用" })
|
|
@@ -3552,7 +3552,7 @@ const Qs = {
|
|
|
3552
3552
|
}
|
|
3553
3553
|
)
|
|
3554
3554
|
] });
|
|
3555
|
-
}, { confirm:
|
|
3555
|
+
}, { confirm: pi } = xe, ea = () => {
|
|
3556
3556
|
const [t, s] = i([]), [a, n] = i(!1), [k, o] = i(!1), [v, g] = i(null), [b] = f.useForm(), T = async () => {
|
|
3557
3557
|
n(!0);
|
|
3558
3558
|
try {
|
|
@@ -3572,7 +3572,7 @@ const Qs = {
|
|
|
3572
3572
|
}, x = (w) => {
|
|
3573
3573
|
g(w), b.setFieldsValue(w), o(!0);
|
|
3574
3574
|
}, R = async (w) => {
|
|
3575
|
-
|
|
3575
|
+
pi({
|
|
3576
3576
|
title: "确认删除",
|
|
3577
3577
|
content: `删除供应商 ${w.providerName} ?`,
|
|
3578
3578
|
onOk: async () => {
|
|
@@ -3597,7 +3597,7 @@ const Qs = {
|
|
|
3597
3597
|
{
|
|
3598
3598
|
title: "供应商",
|
|
3599
3599
|
render: (w, C) => /* @__PURE__ */ e.jsxs(ie, { children: [
|
|
3600
|
-
/* @__PURE__ */ e.jsx(
|
|
3600
|
+
/* @__PURE__ */ e.jsx(xt, { style: { fontSize: 20, color: B[C.providerCode] || "blue" } }),
|
|
3601
3601
|
/* @__PURE__ */ e.jsxs("div", { children: [
|
|
3602
3602
|
/* @__PURE__ */ e.jsx("div", { children: /* @__PURE__ */ e.jsx("strong", { children: C.providerName }) }),
|
|
3603
3603
|
/* @__PURE__ */ e.jsx("div", { style: { fontSize: 12, color: "#999" }, children: C.providerCode })
|
|
@@ -3674,7 +3674,7 @@ const Qs = {
|
|
|
3674
3674
|
}
|
|
3675
3675
|
)
|
|
3676
3676
|
] });
|
|
3677
|
-
}, { confirm:
|
|
3677
|
+
}, { confirm: ui } = xe, ta = () => {
|
|
3678
3678
|
const [t, s] = i([]), [a, n] = i([]), [k, o] = i(!1), [v, g] = i(!1), [b, T] = i(null), [u] = f.useForm(), x = async () => {
|
|
3679
3679
|
o(!0);
|
|
3680
3680
|
try {
|
|
@@ -3700,7 +3700,7 @@ const Qs = {
|
|
|
3700
3700
|
}, B = (p) => {
|
|
3701
3701
|
T(p), u.setFieldsValue(p), g(!0);
|
|
3702
3702
|
}, c = async (p) => {
|
|
3703
|
-
|
|
3703
|
+
ui({
|
|
3704
3704
|
title: "确认删除",
|
|
3705
3705
|
content: `删除模型 ${p.modelName} ?`,
|
|
3706
3706
|
onOk: async () => {
|
|
@@ -3810,7 +3810,7 @@ const Qs = {
|
|
|
3810
3810
|
}
|
|
3811
3811
|
)
|
|
3812
3812
|
] });
|
|
3813
|
-
}, { Text: en } = Ze, tn = (t) => t ? Number(t).toFixed(4) : "0.0000",
|
|
3813
|
+
}, { Text: en } = Ze, tn = (t) => t ? Number(t).toFixed(4) : "0.0000", xi = ({ open: t, ak: s, onClose: a }) => {
|
|
3814
3814
|
const [n, k] = i(null), [o, v] = i([]), [g, b] = i([]), [T, u] = i(!1);
|
|
3815
3815
|
ae(() => {
|
|
3816
3816
|
!t || !s || x();
|
|
@@ -3871,7 +3871,7 @@ const Qs = {
|
|
|
3871
3871
|
] }) }
|
|
3872
3872
|
];
|
|
3873
3873
|
return /* @__PURE__ */ e.jsx(
|
|
3874
|
-
|
|
3874
|
+
ut,
|
|
3875
3875
|
{
|
|
3876
3876
|
title: /* @__PURE__ */ e.jsxs(ie, { children: [
|
|
3877
3877
|
/* @__PURE__ */ e.jsx("span", { children: "用量详情 ·" }),
|
|
@@ -3941,7 +3941,7 @@ const Qs = {
|
|
|
3941
3941
|
/* @__PURE__ */ e.jsx(lt, { style: { margin: "12px 0" } }),
|
|
3942
3942
|
/* @__PURE__ */ e.jsxs(Ce, { defaultActiveKey: "trend", size: "small", children: [
|
|
3943
3943
|
/* @__PURE__ */ e.jsx(Ce.TabPane, { tab: "用量趋势", icon: /* @__PURE__ */ e.jsx(An, {}), children: /* @__PURE__ */ e.jsx(Z, { size: "small", bodyStyle: { padding: 12 }, children: o.length > 0 ? /* @__PURE__ */ e.jsx(Ln, { option: L, style: { height: 300 } }) : /* @__PURE__ */ e.jsx(me, { description: "该 AK 暂无用量数据", style: { padding: "40px 0" } }) }) }, "trend"),
|
|
3944
|
-
/* @__PURE__ */ e.jsx(Ce.TabPane, { tab: "调用明细", icon: /* @__PURE__ */ e.jsx(
|
|
3944
|
+
/* @__PURE__ */ e.jsx(Ce.TabPane, { tab: "调用明细", icon: /* @__PURE__ */ e.jsx(ht, {}), children: /* @__PURE__ */ e.jsx(
|
|
3945
3945
|
ve,
|
|
3946
3946
|
{
|
|
3947
3947
|
columns: B,
|
|
@@ -3956,7 +3956,7 @@ const Qs = {
|
|
|
3956
3956
|
] })
|
|
3957
3957
|
}
|
|
3958
3958
|
);
|
|
3959
|
-
}, { confirm:
|
|
3959
|
+
}, { confirm: hi } = xe, sn = "http://localhost:8888", nn = (t) => t ? t >= 1e6 ? (t / 1e6).toFixed(1) + "M" : t >= 1e3 ? (t / 1e3).toFixed(1) + "K" : Number(t).toLocaleString() : "0", sa = () => {
|
|
3960
3960
|
const [t, s] = i("PERSONAL"), [a, n] = i([]), [k, o] = i(!1), [v, g] = i(!1), [b, T] = i(null), [u] = f.useForm(), [x, R] = i(null), [L, B] = i(null), [c, w] = i([]), C = async () => {
|
|
3961
3961
|
o(!0);
|
|
3962
3962
|
try {
|
|
@@ -3993,7 +3993,7 @@ const Qs = {
|
|
|
3993
3993
|
appName: z.appName
|
|
3994
3994
|
}), g(!0);
|
|
3995
3995
|
}, h = (z) => {
|
|
3996
|
-
|
|
3996
|
+
hi({
|
|
3997
3997
|
title: "确认删除",
|
|
3998
3998
|
content: `删除 AK「${z.akName}」?此操作不可恢复。`,
|
|
3999
3999
|
okText: "删除",
|
|
@@ -4123,7 +4123,7 @@ const Qs = {
|
|
|
4123
4123
|
{
|
|
4124
4124
|
type: "info",
|
|
4125
4125
|
showIcon: !0,
|
|
4126
|
-
icon: /* @__PURE__ */ e.jsx(
|
|
4126
|
+
icon: /* @__PURE__ */ e.jsx(ht, {}),
|
|
4127
4127
|
message: /* @__PURE__ */ e.jsxs(ie, { children: [
|
|
4128
4128
|
/* @__PURE__ */ e.jsx("span", { style: { fontWeight: 500 }, children: "API 接入地址:" }),
|
|
4129
4129
|
/* @__PURE__ */ e.jsx("code", { style: {
|
|
@@ -4359,7 +4359,7 @@ const Qs = {
|
|
|
4359
4359
|
}
|
|
4360
4360
|
),
|
|
4361
4361
|
/* @__PURE__ */ e.jsx(
|
|
4362
|
-
|
|
4362
|
+
xi,
|
|
4363
4363
|
{
|
|
4364
4364
|
open: !!L,
|
|
4365
4365
|
ak: L,
|
|
@@ -4368,7 +4368,7 @@ const Qs = {
|
|
|
4368
4368
|
)
|
|
4369
4369
|
] });
|
|
4370
4370
|
}, { TextArea: ln } = $, { Text: nt } = Ze;
|
|
4371
|
-
function
|
|
4371
|
+
function na() {
|
|
4372
4372
|
var O, te;
|
|
4373
4373
|
const [t, s] = i("servers"), [a, n] = i([]), [k, o] = i(!1), [v, g] = i(!1), [b, T] = i(null), [u] = f.useForm(), [x, R] = i(null), [L, B] = i([]), [c, w] = i(null), [C, p] = i("{}"), [F, J] = i(""), [h, S] = i(!1), [E, H] = i(null);
|
|
4374
4374
|
ae(() => {
|
|
@@ -4460,7 +4460,7 @@ function la() {
|
|
|
4460
4460
|
key: "actions",
|
|
4461
4461
|
width: 260,
|
|
4462
4462
|
render: (r, l) => /* @__PURE__ */ e.jsxs(ie, { size: "small", children: [
|
|
4463
|
-
/* @__PURE__ */ e.jsx(j, { size: "small", icon: /* @__PURE__ */ e.jsx(
|
|
4463
|
+
/* @__PURE__ */ e.jsx(j, { size: "small", icon: /* @__PURE__ */ e.jsx(ht, {}), onClick: () => U(l), children: "工具" }),
|
|
4464
4464
|
/* @__PURE__ */ e.jsx(j, { size: "small", icon: /* @__PURE__ */ e.jsx(ws, {}), onClick: () => I(l), children: "测试" }),
|
|
4465
4465
|
/* @__PURE__ */ e.jsx(j, { size: "small", onClick: () => W(l), children: "编辑" }),
|
|
4466
4466
|
/* @__PURE__ */ e.jsx(He, { title: "确认删除?", onConfirm: () => z(l.id), children: /* @__PURE__ */ e.jsx(j, { size: "small", danger: !0, icon: /* @__PURE__ */ e.jsx(je, {}) }) })
|
|
@@ -4663,13 +4663,13 @@ function la() {
|
|
|
4663
4663
|
)
|
|
4664
4664
|
] });
|
|
4665
4665
|
}
|
|
4666
|
-
const
|
|
4666
|
+
const gt = {
|
|
4667
4667
|
private: { label: "私有", color: "default", icon: /* @__PURE__ */ e.jsx(Et, {}) },
|
|
4668
4668
|
"public-read": { label: "公共读", color: "blue", icon: /* @__PURE__ */ e.jsx(et, {}) },
|
|
4669
|
-
"public-read-write": { label: "公共读写", color: "orange", icon: /* @__PURE__ */ e.jsx(
|
|
4669
|
+
"public-read-write": { label: "公共读写", color: "orange", icon: /* @__PURE__ */ e.jsx(xt, {}) },
|
|
4670
4670
|
"authenticated-read": { label: "认证读", color: "purple", icon: /* @__PURE__ */ e.jsx(fl, {}) }
|
|
4671
4671
|
};
|
|
4672
|
-
function
|
|
4672
|
+
function la() {
|
|
4673
4673
|
const [t, s] = i([]), [a, n] = i(!1), [k, o] = i(!1), [v] = f.useForm(), [g, b] = i(!1), T = Rn(), u = Ie(async () => {
|
|
4674
4674
|
n(!0);
|
|
4675
4675
|
try {
|
|
@@ -4707,10 +4707,10 @@ function ia() {
|
|
|
4707
4707
|
y.error("设置 ACL 失败:" + ((C == null ? void 0 : C.message) || "未知错误"));
|
|
4708
4708
|
}
|
|
4709
4709
|
}, B = (c) => ({
|
|
4710
|
-
items: Object.keys(
|
|
4710
|
+
items: Object.keys(gt).map((w) => ({
|
|
4711
4711
|
key: w,
|
|
4712
|
-
label:
|
|
4713
|
-
icon:
|
|
4712
|
+
label: gt[w].label,
|
|
4713
|
+
icon: gt[w].icon
|
|
4714
4714
|
})),
|
|
4715
4715
|
onClick: ({ key: w }) => L(c, w)
|
|
4716
4716
|
});
|
|
@@ -4781,7 +4781,7 @@ function ia() {
|
|
|
4781
4781
|
}
|
|
4782
4782
|
) : /* @__PURE__ */ e.jsx(de, { gutter: [16, 16], children: t.map((c) => {
|
|
4783
4783
|
var C;
|
|
4784
|
-
const w =
|
|
4784
|
+
const w = gt[c.acl] || gt.private;
|
|
4785
4785
|
return /* @__PURE__ */ e.jsx(q, { xs: 24, sm: 12, md: 8, lg: 6, children: /* @__PURE__ */ e.jsxs(
|
|
4786
4786
|
Z,
|
|
4787
4787
|
{
|
|
@@ -4925,7 +4925,7 @@ function ia() {
|
|
|
4925
4925
|
/* @__PURE__ */ e.jsx(f.Item, { name: "acl", label: "访问权限", initialValue: "private", children: /* @__PURE__ */ e.jsx(
|
|
4926
4926
|
X,
|
|
4927
4927
|
{
|
|
4928
|
-
options: Object.entries(
|
|
4928
|
+
options: Object.entries(gt).map(([c, w]) => ({
|
|
4929
4929
|
value: c,
|
|
4930
4930
|
label: /* @__PURE__ */ e.jsxs(ie, { children: [
|
|
4931
4931
|
w.icon,
|
|
@@ -4946,7 +4946,7 @@ const an = (t) => {
|
|
|
4946
4946
|
for (; n >= 1024 && a < s.length - 1; )
|
|
4947
4947
|
n /= 1024, a++;
|
|
4948
4948
|
return n.toFixed(a === 0 ? 0 : 1) + " " + s[a];
|
|
4949
|
-
},
|
|
4949
|
+
}, fi = (t) => {
|
|
4950
4950
|
var a;
|
|
4951
4951
|
if (t.endsWith("/")) return /* @__PURE__ */ e.jsx(Xe, { style: { color: "#faad14" } });
|
|
4952
4952
|
const s = (a = t.split(".").pop()) == null ? void 0 : a.toLowerCase();
|
|
@@ -4956,13 +4956,13 @@ const an = (t) => {
|
|
|
4956
4956
|
style: { color: "#13c2c2" }
|
|
4957
4957
|
}
|
|
4958
4958
|
) : ["md", "txt", "log", "json", "xml", "yaml", "yml"].includes(s) ? /* @__PURE__ */ e.jsx(
|
|
4959
|
-
|
|
4959
|
+
jt,
|
|
4960
4960
|
{
|
|
4961
4961
|
style: { color: "#52c41a" }
|
|
4962
4962
|
}
|
|
4963
4963
|
) : /* @__PURE__ */ e.jsx(yl, { style: { color: "#8c8c8c" } });
|
|
4964
4964
|
};
|
|
4965
|
-
function
|
|
4965
|
+
function ia() {
|
|
4966
4966
|
const { bucketName: t } = On(), s = decodeURIComponent(t || ""), a = Rn(), [n, k] = i([]), [o, v] = i(!1), [g, b] = i(""), [T, u] = i({ objectCount: 0, totalSize: 0 }), [x, R] = i(""), [L, B] = i([]), [c, w] = i(!1), [C, p] = i(!1), [F] = f.useForm();
|
|
4967
4967
|
Oe(null);
|
|
4968
4968
|
const J = Ie(async (m = g) => {
|
|
@@ -5049,7 +5049,7 @@ function aa() {
|
|
|
5049
5049
|
style: { cursor: O ? "pointer" : "default", color: O ? "#faad14" : "#262626" },
|
|
5050
5050
|
onClick: () => O && S(m),
|
|
5051
5051
|
children: /* @__PURE__ */ e.jsxs(ie, { children: [
|
|
5052
|
-
|
|
5052
|
+
fi(m),
|
|
5053
5053
|
/* @__PURE__ */ e.jsx("span", { style: { fontWeight: O ? 500 : 400 }, children: te })
|
|
5054
5054
|
] })
|
|
5055
5055
|
}
|
|
@@ -5074,7 +5074,7 @@ function aa() {
|
|
|
5074
5074
|
{ key: "enter", icon: /* @__PURE__ */ e.jsx(Xe, {}), label: "进入" },
|
|
5075
5075
|
{ key: "delete", icon: /* @__PURE__ */ e.jsx(je, {}), label: "删除", danger: !0 }
|
|
5076
5076
|
] : [
|
|
5077
|
-
{ key: "download", icon: /* @__PURE__ */ e.jsx(
|
|
5077
|
+
{ key: "download", icon: /* @__PURE__ */ e.jsx(mt, {}), label: "下载" },
|
|
5078
5078
|
{ key: "copy", icon: /* @__PURE__ */ e.jsx(Be, {}), label: "复制" },
|
|
5079
5079
|
{ key: "delete", icon: /* @__PURE__ */ e.jsx(je, {}), label: "删除", danger: !0 }
|
|
5080
5080
|
];
|
|
@@ -5234,7 +5234,7 @@ function aa() {
|
|
|
5234
5234
|
)
|
|
5235
5235
|
] });
|
|
5236
5236
|
}
|
|
5237
|
-
const
|
|
5237
|
+
const gi = [
|
|
5238
5238
|
{ value: "string", label: "string" },
|
|
5239
5239
|
{ value: "number", label: "number" },
|
|
5240
5240
|
{ value: "boolean", label: "boolean" },
|
|
@@ -5280,7 +5280,7 @@ function Fn({ value: t = [], onChange: s, readonly: a = !1 }) {
|
|
|
5280
5280
|
size: "small",
|
|
5281
5281
|
value: b,
|
|
5282
5282
|
onChange: (x) => n(u, "type", x),
|
|
5283
|
-
options:
|
|
5283
|
+
options: gi,
|
|
5284
5284
|
style: { width: "100%" }
|
|
5285
5285
|
}
|
|
5286
5286
|
)
|
|
@@ -5375,8 +5375,8 @@ function Fn({ value: t = [], onChange: s, readonly: a = !1 }) {
|
|
|
5375
5375
|
t.length === 0 && !a && /* @__PURE__ */ e.jsx("div", { style: { textAlign: "center", color: "#999", padding: 12 }, children: "暂未配置输出字段映射。发布后 MCP 工具将返回原始响应体。" })
|
|
5376
5376
|
] });
|
|
5377
5377
|
}
|
|
5378
|
-
const { TextArea:
|
|
5379
|
-
function
|
|
5378
|
+
const { TextArea: mi } = $, { Step: ls } = gn;
|
|
5379
|
+
function yi({ open: t, onClose: s, onSuccess: a }) {
|
|
5380
5380
|
var G, W, z, I, U;
|
|
5381
5381
|
const [n, k] = i(0), [o, v] = i(!1), [g, b] = i(!1), [T, u] = i(""), [x, R] = i(null), [L, B] = i([]), [c, w] = i(null), [C, p] = i("mapping"), F = () => {
|
|
5382
5382
|
k(0), u(""), R(null), B([]), w(null), p("mapping");
|
|
@@ -5427,7 +5427,7 @@ function ji({ open: t, onClose: s, onSuccess: a }) {
|
|
|
5427
5427
|
xe,
|
|
5428
5428
|
{
|
|
5429
5429
|
title: /* @__PURE__ */ e.jsxs(ie, { children: [
|
|
5430
|
-
/* @__PURE__ */ e.jsx(
|
|
5430
|
+
/* @__PURE__ */ e.jsx(ht, {}),
|
|
5431
5431
|
"从 Curl 导入 API Bridge 脚本"
|
|
5432
5432
|
] }),
|
|
5433
5433
|
open: t,
|
|
@@ -5444,7 +5444,7 @@ function ji({ open: t, onClose: s, onSuccess: a }) {
|
|
|
5444
5444
|
n === 0 && /* @__PURE__ */ e.jsxs("div", { children: [
|
|
5445
5445
|
/* @__PURE__ */ e.jsx("p", { style: { color: "#666", marginBottom: 8 }, children: "粘贴任意 HTTP curl 命令,系统将自动解析并生成 API_BRIDGE 脚本" }),
|
|
5446
5446
|
/* @__PURE__ */ e.jsx(
|
|
5447
|
-
|
|
5447
|
+
mi,
|
|
5448
5448
|
{
|
|
5449
5449
|
rows: 8,
|
|
5450
5450
|
value: T,
|
|
@@ -5603,8 +5603,8 @@ function ji({ open: t, onClose: s, onSuccess: a }) {
|
|
|
5603
5603
|
}
|
|
5604
5604
|
);
|
|
5605
5605
|
}
|
|
5606
|
-
const { TextArea:
|
|
5607
|
-
function
|
|
5606
|
+
const { TextArea: ji } = $;
|
|
5607
|
+
function bi({ open: t, onClose: s, onSuccess: a }) {
|
|
5608
5608
|
const [n, k] = i(""), [o, v] = i(null), [g, b] = i(null), [T, u] = i(!1), x = () => {
|
|
5609
5609
|
k(""), v(null), b(null);
|
|
5610
5610
|
}, R = () => {
|
|
@@ -5714,7 +5714,7 @@ function vi({ open: t, onClose: s, onSuccess: a }) {
|
|
|
5714
5714
|
xe,
|
|
5715
5715
|
{
|
|
5716
5716
|
title: /* @__PURE__ */ e.jsxs(ie, { children: [
|
|
5717
|
-
/* @__PURE__ */ e.jsx(
|
|
5717
|
+
/* @__PURE__ */ e.jsx(ht, {}),
|
|
5718
5718
|
"从 OpenAPI 批量导入脚本"
|
|
5719
5719
|
] }),
|
|
5720
5720
|
open: t,
|
|
@@ -5726,7 +5726,7 @@ function vi({ open: t, onClose: s, onSuccess: a }) {
|
|
|
5726
5726
|
!o && !g && /* @__PURE__ */ e.jsxs("div", { children: [
|
|
5727
5727
|
/* @__PURE__ */ e.jsx("p", { style: { color: "#666", marginBottom: 8 }, children: "粘贴 OpenAPI 3.0 / Swagger 2.0 规范的 JSON 内容,系统将自动为每个端点生成 API_BRIDGE 脚本。" }),
|
|
5728
5728
|
/* @__PURE__ */ e.jsx(
|
|
5729
|
-
|
|
5729
|
+
ji,
|
|
5730
5730
|
{
|
|
5731
5731
|
rows: 12,
|
|
5732
5732
|
value: n,
|
|
@@ -5747,7 +5747,7 @@ function vi({ open: t, onClose: s, onSuccess: a }) {
|
|
|
5747
5747
|
style: { fontFamily: "monospace", fontSize: 13, marginBottom: 12 }
|
|
5748
5748
|
}
|
|
5749
5749
|
),
|
|
5750
|
-
/* @__PURE__ */ e.jsx(j, { type: "primary", icon: /* @__PURE__ */ e.jsx(
|
|
5750
|
+
/* @__PURE__ */ e.jsx(j, { type: "primary", icon: /* @__PURE__ */ e.jsx(jt, {}), onClick: L, block: !0, children: "解析预览" })
|
|
5751
5751
|
] }),
|
|
5752
5752
|
o && !g && /* @__PURE__ */ e.jsxs("div", { children: [
|
|
5753
5753
|
/* @__PURE__ */ e.jsx(
|
|
@@ -5809,7 +5809,7 @@ function vi({ open: t, onClose: s, onSuccess: a }) {
|
|
|
5809
5809
|
}
|
|
5810
5810
|
);
|
|
5811
5811
|
}
|
|
5812
|
-
const { Text: Ft, Paragraph:
|
|
5812
|
+
const { Text: Ft, Paragraph: aa } = Ze, vi = [
|
|
5813
5813
|
{ value: "GET", label: "GET" },
|
|
5814
5814
|
{ value: "POST", label: "POST" },
|
|
5815
5815
|
{ value: "PUT", label: "PUT" },
|
|
@@ -5817,13 +5817,13 @@ const { Text: Ft, Paragraph: ra } = Ze, Ci = [
|
|
|
5817
5817
|
{ value: "PATCH", label: "PATCH" },
|
|
5818
5818
|
{ value: "HEAD", label: "HEAD" },
|
|
5819
5819
|
{ value: "OPTIONS", label: "OPTIONS" }
|
|
5820
|
-
],
|
|
5820
|
+
], Ci = [
|
|
5821
5821
|
{ value: "path", label: "path" },
|
|
5822
5822
|
{ value: "query", label: "query" },
|
|
5823
5823
|
{ value: "header", label: "header" },
|
|
5824
5824
|
{ value: "body", label: "body" }
|
|
5825
5825
|
];
|
|
5826
|
-
function
|
|
5826
|
+
function Si({ value: t, onChange: s, readonly: a = !1 }) {
|
|
5827
5827
|
var C, p, F, J, h;
|
|
5828
5828
|
const [n, k] = i(null), [o, v] = i(null);
|
|
5829
5829
|
ae(() => {
|
|
@@ -5898,7 +5898,7 @@ function wi({ value: t, onChange: s, readonly: a = !1 }) {
|
|
|
5898
5898
|
size: "small",
|
|
5899
5899
|
value: S,
|
|
5900
5900
|
onChange: (P) => R(H, "in", P),
|
|
5901
|
-
options:
|
|
5901
|
+
options: Ci,
|
|
5902
5902
|
style: { width: "100%" }
|
|
5903
5903
|
}
|
|
5904
5904
|
)
|
|
@@ -5958,7 +5958,7 @@ function wi({ value: t, onChange: s, readonly: a = !1 }) {
|
|
|
5958
5958
|
{
|
|
5959
5959
|
value: b.requestMethod || "GET",
|
|
5960
5960
|
onChange: u,
|
|
5961
|
-
options:
|
|
5961
|
+
options: vi,
|
|
5962
5962
|
style: { width: 120 }
|
|
5963
5963
|
}
|
|
5964
5964
|
),
|
|
@@ -6011,14 +6011,14 @@ function wi({ value: t, onChange: s, readonly: a = !1 }) {
|
|
|
6011
6011
|
) })
|
|
6012
6012
|
] });
|
|
6013
6013
|
}
|
|
6014
|
-
const { TextArea: is } = $, { Text: as, Paragraph: rn } = Ze,
|
|
6014
|
+
const { TextArea: is } = $, { Text: as, Paragraph: rn } = Ze, wi = [
|
|
6015
6015
|
{ value: "EL", label: "EL (SpEL)" },
|
|
6016
6016
|
{ value: "GROOVY", label: "Groovy" },
|
|
6017
6017
|
{ value: "LUA", label: "Lua" },
|
|
6018
6018
|
{ value: "SQL", label: "SQL" },
|
|
6019
6019
|
{ value: "MOCK", label: "Mock Template" },
|
|
6020
6020
|
{ value: "API_BRIDGE", label: "API Bridge" }
|
|
6021
|
-
],
|
|
6021
|
+
], ki = [
|
|
6022
6022
|
{ value: "NONE", label: "None" },
|
|
6023
6023
|
{ value: "HTTP", label: "HTTP" },
|
|
6024
6024
|
{ value: "MCP", label: "MCP" },
|
|
@@ -6027,12 +6027,12 @@ const { TextArea: is } = $, { Text: as, Paragraph: rn } = Ze, ki = [
|
|
|
6027
6027
|
0: { text: "Draft", color: "default" },
|
|
6028
6028
|
1: { text: "Active", color: "green" },
|
|
6029
6029
|
2: { text: "Disabled", color: "red" }
|
|
6030
|
-
},
|
|
6030
|
+
}, Ti = {
|
|
6031
6031
|
NONE: "default",
|
|
6032
6032
|
HTTP: "blue",
|
|
6033
6033
|
MCP: "purple",
|
|
6034
6034
|
BOTH: "cyan"
|
|
6035
|
-
},
|
|
6035
|
+
}, Ii = [
|
|
6036
6036
|
{
|
|
6037
6037
|
id: 1,
|
|
6038
6038
|
scriptCode: "hello-el",
|
|
@@ -6099,7 +6099,7 @@ return result`
|
|
|
6099
6099
|
method: GET`
|
|
6100
6100
|
}
|
|
6101
6101
|
];
|
|
6102
|
-
function
|
|
6102
|
+
function ra() {
|
|
6103
6103
|
const [t, s] = i([]), [a, n] = i(!1), [k, o] = i(!1), [v, g] = i(!1), [b, T] = i(null), [u] = f.useForm(), [x, R] = i(!1), [L, B] = i(null), [c, w] = i("{}"), [C, p] = i(""), [F, J] = i(!1), [h, S] = i(!1), [E, H] = i(!1), [P, G] = i(null), z = f.useWatch("dslType", u) === "API_BRIDGE";
|
|
6104
6104
|
ae(() => {
|
|
6105
6105
|
I();
|
|
@@ -6110,7 +6110,7 @@ function oa() {
|
|
|
6110
6110
|
const N = await _e.list();
|
|
6111
6111
|
s(Array.isArray(N) ? N : (N == null ? void 0 : N.data) || N || []), o(!1);
|
|
6112
6112
|
} catch (N) {
|
|
6113
|
-
console.warn("Script API unavailable:", N == null ? void 0 : N.message), s(
|
|
6113
|
+
console.warn("Script API unavailable:", N == null ? void 0 : N.message), s(Ii), o(!0), y.warning("后端未连接,显示模拟数据");
|
|
6114
6114
|
} finally {
|
|
6115
6115
|
n(!1);
|
|
6116
6116
|
}
|
|
@@ -6198,7 +6198,7 @@ function oa() {
|
|
|
6198
6198
|
dataIndex: "exposeAs",
|
|
6199
6199
|
key: "exposeAs",
|
|
6200
6200
|
width: 120,
|
|
6201
|
-
render: (N) => /* @__PURE__ */ e.jsx(V, { color:
|
|
6201
|
+
render: (N) => /* @__PURE__ */ e.jsx(V, { color: Ti[N] || "default", children: N })
|
|
6202
6202
|
},
|
|
6203
6203
|
{
|
|
6204
6204
|
title: "状态",
|
|
@@ -6247,7 +6247,7 @@ function oa() {
|
|
|
6247
6247
|
{
|
|
6248
6248
|
size: "small",
|
|
6249
6249
|
type: "link",
|
|
6250
|
-
icon: /* @__PURE__ */ e.jsx(
|
|
6250
|
+
icon: /* @__PURE__ */ e.jsx(yt, {}),
|
|
6251
6251
|
onClick: () => l(ce, "HTTP"),
|
|
6252
6252
|
children: "发布"
|
|
6253
6253
|
}
|
|
@@ -6345,13 +6345,13 @@ function oa() {
|
|
|
6345
6345
|
) })
|
|
6346
6346
|
] }),
|
|
6347
6347
|
/* @__PURE__ */ e.jsxs(de, { gutter: 16, children: [
|
|
6348
|
-
/* @__PURE__ */ e.jsx(q, { span: 8, children: /* @__PURE__ */ e.jsx(f.Item, { name: "dslType", label: "DSL类型", children: /* @__PURE__ */ e.jsx(X, { options:
|
|
6349
|
-
/* @__PURE__ */ e.jsx(q, { span: 8, children: /* @__PURE__ */ e.jsx(f.Item, { name: "exposeAs", label: "暴露方式", children: /* @__PURE__ */ e.jsx(X, { options:
|
|
6348
|
+
/* @__PURE__ */ e.jsx(q, { span: 8, children: /* @__PURE__ */ e.jsx(f.Item, { name: "dslType", label: "DSL类型", children: /* @__PURE__ */ e.jsx(X, { options: wi, onChange: d }) }) }),
|
|
6349
|
+
/* @__PURE__ */ e.jsx(q, { span: 8, children: /* @__PURE__ */ e.jsx(f.Item, { name: "exposeAs", label: "暴露方式", children: /* @__PURE__ */ e.jsx(X, { options: ki }) }) }),
|
|
6350
6350
|
/* @__PURE__ */ e.jsx(q, { span: 8, children: /* @__PURE__ */ e.jsx(f.Item, { name: "version", label: "版本", children: /* @__PURE__ */ e.jsx($, { placeholder: "1.0.0" }) }) })
|
|
6351
6351
|
] }),
|
|
6352
6352
|
/* @__PURE__ */ e.jsx(f.Item, { name: "description", label: "描述", children: /* @__PURE__ */ e.jsx($, { placeholder: "脚本描述" }) }),
|
|
6353
6353
|
z ? /* @__PURE__ */ e.jsx(f.Item, { label: "API Bridge 配置", children: /* @__PURE__ */ e.jsx(
|
|
6354
|
-
|
|
6354
|
+
Si,
|
|
6355
6355
|
{
|
|
6356
6356
|
value: P,
|
|
6357
6357
|
onChange: G
|
|
@@ -6385,7 +6385,7 @@ function oa() {
|
|
|
6385
6385
|
}
|
|
6386
6386
|
),
|
|
6387
6387
|
/* @__PURE__ */ e.jsx(
|
|
6388
|
-
|
|
6388
|
+
ut,
|
|
6389
6389
|
{
|
|
6390
6390
|
title: /* @__PURE__ */ e.jsxs(ie, { children: [
|
|
6391
6391
|
/* @__PURE__ */ e.jsx(ct, {}),
|
|
@@ -6440,7 +6440,7 @@ function oa() {
|
|
|
6440
6440
|
}
|
|
6441
6441
|
),
|
|
6442
6442
|
/* @__PURE__ */ e.jsx(
|
|
6443
|
-
|
|
6443
|
+
yi,
|
|
6444
6444
|
{
|
|
6445
6445
|
open: h,
|
|
6446
6446
|
onClose: () => S(!1),
|
|
@@ -6448,7 +6448,7 @@ function oa() {
|
|
|
6448
6448
|
}
|
|
6449
6449
|
),
|
|
6450
6450
|
/* @__PURE__ */ e.jsx(
|
|
6451
|
-
|
|
6451
|
+
bi,
|
|
6452
6452
|
{
|
|
6453
6453
|
open: E,
|
|
6454
6454
|
onClose: () => H(!1),
|
|
@@ -6809,7 +6809,7 @@ components:
|
|
|
6809
6809
|
{ categoryCode: "testing", categoryName: "测试", parentCode: "", skillCount: 1 },
|
|
6810
6810
|
{ categoryCode: "ai-agent", categoryName: "AI Agent", parentCode: "", skillCount: 1 },
|
|
6811
6811
|
{ categoryCode: "doc", categoryName: "文档", parentCode: "", skillCount: 1 }
|
|
6812
|
-
], cn = { total: 8, published: 7 }, { TextArea:
|
|
6812
|
+
], cn = { total: 8, published: 7 }, { TextArea: Ai } = $, { Title: oa, Paragraph: Pi, Text: zi } = Ze, pn = {
|
|
6813
6813
|
backend: "linear-gradient(135deg, #667eea 0%, #764ba2 100%)",
|
|
6814
6814
|
frontend: "linear-gradient(135deg, #f093fb 0%, #f5576c 100%)",
|
|
6815
6815
|
devops: "linear-gradient(135deg, #4facfe 0%, #00f2fe 100%)",
|
|
@@ -6817,7 +6817,7 @@ components:
|
|
|
6817
6817
|
"ai-agent": "linear-gradient(135deg, #fa709a 0%, #fee140 100%)",
|
|
6818
6818
|
doc: "linear-gradient(135deg, #a8edea 0%, #fed6e3 100%)",
|
|
6819
6819
|
default: "linear-gradient(135deg, #667eea 0%, #764ba2 100%)"
|
|
6820
|
-
}, At = (t) => pn[t] || pn.default, un = { PUBLISHED: "已发布", DRAFT: "草稿", ARCHIVED: "已归档" }, Mt = ["blue", "green", "cyan", "purple", "orange", "red"],
|
|
6820
|
+
}, At = (t) => pn[t] || pn.default, un = { PUBLISHED: "已发布", DRAFT: "草稿", ARCHIVED: "已归档" }, Mt = ["blue", "green", "cyan", "purple", "orange", "red"], Ei = (t) => {
|
|
6821
6821
|
const s = {};
|
|
6822
6822
|
t.forEach((n) => {
|
|
6823
6823
|
s[n.categoryCode] = {
|
|
@@ -6851,7 +6851,7 @@ components:
|
|
|
6851
6851
|
};
|
|
6852
6852
|
return t != null && t.length && a(t, ""), s;
|
|
6853
6853
|
};
|
|
6854
|
-
function
|
|
6854
|
+
function Oi(t) {
|
|
6855
6855
|
const s = { key: "__root__", children: [] }, a = { "": s };
|
|
6856
6856
|
return t.forEach((n) => {
|
|
6857
6857
|
const k = n.path.split("/");
|
|
@@ -6871,7 +6871,7 @@ function Ri(t) {
|
|
|
6871
6871
|
});
|
|
6872
6872
|
}), s.children;
|
|
6873
6873
|
}
|
|
6874
|
-
function
|
|
6874
|
+
function da() {
|
|
6875
6875
|
const [t, s] = i([]), [a, n] = i(!1), [k, o] = i(0), [v, g] = i(1), b = Oe(12), [T, u] = i(""), [x, R] = i(void 0), [L, B] = i("download_count"), [c, w] = i([]), [C, p] = i([]), [F, J] = i(!1), [h, S] = i(null), [E, H] = i(""), [P, G] = i([]), [W, z] = i(!1), [I, U] = i("overview"), [d, m] = i(null), [_, O] = i([]), [te, r] = i(!1), [l] = f.useForm(), [M, re] = i(!1), [N, ce] = i(!1), [Fe, pe] = i({ total: 0, published: 0 }), [Ne, K] = i(!1), [oe, we] = i(null), [Y, ne] = i(null), [ge, Ae] = i(!1), [ye] = f.useForm(), [Le, St] = i(220), Un = Oe(null), Rt = Oe(!1), Ms = Oe(0), _s = Oe(0), Xt = async () => {
|
|
6876
6876
|
try {
|
|
6877
6877
|
const A = await Me.stats();
|
|
@@ -7164,7 +7164,7 @@ function ca() {
|
|
|
7164
7164
|
cs,
|
|
7165
7165
|
{
|
|
7166
7166
|
showIcon: !1,
|
|
7167
|
-
treeData:
|
|
7167
|
+
treeData: Ei(c),
|
|
7168
7168
|
defaultExpandAll: !0,
|
|
7169
7169
|
showLine: !0,
|
|
7170
7170
|
titleRender: Qn,
|
|
@@ -7248,7 +7248,7 @@ function ca() {
|
|
|
7248
7248
|
j,
|
|
7249
7249
|
{
|
|
7250
7250
|
type: "primary",
|
|
7251
|
-
icon: /* @__PURE__ */ e.jsx(
|
|
7251
|
+
icon: /* @__PURE__ */ e.jsx(yt, {}),
|
|
7252
7252
|
onClick: () => r(!0),
|
|
7253
7253
|
style: {
|
|
7254
7254
|
borderRadius: 8,
|
|
@@ -7328,7 +7328,7 @@ function ca() {
|
|
|
7328
7328
|
}, children: un[A.status] })
|
|
7329
7329
|
] }) }),
|
|
7330
7330
|
/* @__PURE__ */ e.jsxs("div", { style: { padding: "12px 14px 14px" }, children: [
|
|
7331
|
-
/* @__PURE__ */ e.jsx(
|
|
7331
|
+
/* @__PURE__ */ e.jsx(Pi, { ellipsis: { rows: 2 }, style: {
|
|
7332
7332
|
fontSize: 12,
|
|
7333
7333
|
color: "#666",
|
|
7334
7334
|
marginBottom: 10,
|
|
@@ -7359,7 +7359,7 @@ function ca() {
|
|
|
7359
7359
|
/* @__PURE__ */ e.jsx(se, { title: "安装次数", children: /* @__PURE__ */ e.jsxs("div", { style: { display: "flex", alignItems: "center", gap: 3 }, children: [
|
|
7360
7360
|
/* @__PURE__ */ e.jsx(Gs, { style: { color: "#ff4d4f", fontSize: 12 } }),
|
|
7361
7361
|
/* @__PURE__ */ e.jsx(
|
|
7362
|
-
|
|
7362
|
+
zi,
|
|
7363
7363
|
{
|
|
7364
7364
|
type: "secondary",
|
|
7365
7365
|
style: { fontSize: 12 },
|
|
@@ -7372,7 +7372,7 @@ function ca() {
|
|
|
7372
7372
|
{
|
|
7373
7373
|
type: "primary",
|
|
7374
7374
|
size: "small",
|
|
7375
|
-
icon: /* @__PURE__ */ e.jsx(
|
|
7375
|
+
icon: /* @__PURE__ */ e.jsx(mt, {}),
|
|
7376
7376
|
onClick: (ee) => {
|
|
7377
7377
|
ee.stopPropagation(), Vs(A.skillCode);
|
|
7378
7378
|
},
|
|
@@ -7405,7 +7405,7 @@ function ca() {
|
|
|
7405
7405
|
) })
|
|
7406
7406
|
] }),
|
|
7407
7407
|
/* @__PURE__ */ e.jsx(
|
|
7408
|
-
|
|
7408
|
+
ut,
|
|
7409
7409
|
{
|
|
7410
7410
|
title: /* @__PURE__ */ e.jsxs("div", { style: { display: "flex", alignItems: "center", gap: 12 }, children: [
|
|
7411
7411
|
/* @__PURE__ */ e.jsx("div", { style: {
|
|
@@ -7448,7 +7448,7 @@ function ca() {
|
|
|
7448
7448
|
{
|
|
7449
7449
|
type: "primary",
|
|
7450
7450
|
size: "large",
|
|
7451
|
-
icon: /* @__PURE__ */ e.jsx(
|
|
7451
|
+
icon: /* @__PURE__ */ e.jsx(mt, {}),
|
|
7452
7452
|
onClick: () => Ws(h),
|
|
7453
7453
|
style: {
|
|
7454
7454
|
borderRadius: 8,
|
|
@@ -7477,11 +7477,11 @@ function ca() {
|
|
|
7477
7477
|
},
|
|
7478
7478
|
children: "复制技能内容"
|
|
7479
7479
|
}
|
|
7480
|
-
) : /* @__PURE__ */ e.jsx(j, { size: "large", disabled: !0, icon: /* @__PURE__ */ e.jsx(
|
|
7480
|
+
) : /* @__PURE__ */ e.jsx(j, { size: "large", disabled: !0, icon: /* @__PURE__ */ e.jsx(mt, {}), style: { height: 40 }, children: "暂无下载包" }),
|
|
7481
7481
|
/* @__PURE__ */ e.jsx(
|
|
7482
7482
|
j,
|
|
7483
7483
|
{
|
|
7484
|
-
icon: /* @__PURE__ */ e.jsx(
|
|
7484
|
+
icon: /* @__PURE__ */ e.jsx(mt, {}),
|
|
7485
7485
|
onClick: () => Vs(h.skillCode),
|
|
7486
7486
|
style: { borderRadius: 8, height: 40 },
|
|
7487
7487
|
children: "安装此技能"
|
|
@@ -7642,7 +7642,7 @@ function ca() {
|
|
|
7642
7642
|
{
|
|
7643
7643
|
key: "files",
|
|
7644
7644
|
label: /* @__PURE__ */ e.jsxs("span", { children: [
|
|
7645
|
-
/* @__PURE__ */ e.jsx(
|
|
7645
|
+
/* @__PURE__ */ e.jsx(jt, {}),
|
|
7646
7646
|
" 文件"
|
|
7647
7647
|
] }),
|
|
7648
7648
|
children: /* @__PURE__ */ e.jsxs("div", { style: { padding: "20px 24px" }, children: [
|
|
@@ -7657,7 +7657,7 @@ function ca() {
|
|
|
7657
7657
|
}, children: /* @__PURE__ */ e.jsx(
|
|
7658
7658
|
cs,
|
|
7659
7659
|
{
|
|
7660
|
-
treeData:
|
|
7660
|
+
treeData: Oi(h.files),
|
|
7661
7661
|
defaultExpandAll: !0,
|
|
7662
7662
|
showIcon: !0,
|
|
7663
7663
|
selectedKeys: d ? [d.path] : [],
|
|
@@ -7672,7 +7672,7 @@ function ca() {
|
|
|
7672
7672
|
}
|
|
7673
7673
|
),
|
|
7674
7674
|
icon: (A) => A.isLeaf ? /* @__PURE__ */ e.jsx(
|
|
7675
|
-
|
|
7675
|
+
jt,
|
|
7676
7676
|
{
|
|
7677
7677
|
style: { fontSize: 13, color: "#8c8c8c" }
|
|
7678
7678
|
}
|
|
@@ -7742,7 +7742,7 @@ function ca() {
|
|
|
7742
7742
|
j,
|
|
7743
7743
|
{
|
|
7744
7744
|
type: "link",
|
|
7745
|
-
icon: /* @__PURE__ */ e.jsx(
|
|
7745
|
+
icon: /* @__PURE__ */ e.jsx(mt, {}),
|
|
7746
7746
|
onClick: () => Ws(h),
|
|
7747
7747
|
style: { marginTop: 12 },
|
|
7748
7748
|
children: "下载并解压查看文件"
|
|
@@ -7750,7 +7750,7 @@ function ca() {
|
|
|
7750
7750
|
)
|
|
7751
7751
|
] }) : /* @__PURE__ */ e.jsxs("div", { style: { textAlign: "center", padding: 40, color: "#999" }, children: [
|
|
7752
7752
|
/* @__PURE__ */ e.jsx(
|
|
7753
|
-
|
|
7753
|
+
jt,
|
|
7754
7754
|
{
|
|
7755
7755
|
style: { fontSize: 36, color: "#d9d9d9", marginBottom: 12 }
|
|
7756
7756
|
}
|
|
@@ -7784,7 +7784,7 @@ function ca() {
|
|
|
7784
7784
|
opacity: N ? 0.6 : 1
|
|
7785
7785
|
}, children: [
|
|
7786
7786
|
N ? /* @__PURE__ */ e.jsx(Ve, { size: "small" }) : /* @__PURE__ */ e.jsx(
|
|
7787
|
-
|
|
7787
|
+
yt,
|
|
7788
7788
|
{
|
|
7789
7789
|
style: { fontSize: 20, color: "#bfbfbf" }
|
|
7790
7790
|
}
|
|
@@ -7869,7 +7869,7 @@ function ca() {
|
|
|
7869
7869
|
display: "flex",
|
|
7870
7870
|
alignItems: "center",
|
|
7871
7871
|
justifyContent: "center"
|
|
7872
|
-
}, children: /* @__PURE__ */ e.jsx(
|
|
7872
|
+
}, children: /* @__PURE__ */ e.jsx(yt, { style: { fontSize: 16, color: "#fff" } }) }),
|
|
7873
7873
|
/* @__PURE__ */ e.jsx("span", { style: { fontSize: 16 }, children: "发布新技能" })
|
|
7874
7874
|
] }),
|
|
7875
7875
|
open: te,
|
|
@@ -7919,7 +7919,7 @@ function ca() {
|
|
|
7919
7919
|
}
|
|
7920
7920
|
)
|
|
7921
7921
|
] }),
|
|
7922
|
-
/* @__PURE__ */ e.jsx(f.Item, { name: "description", label: "描述", children: /* @__PURE__ */ e.jsx(
|
|
7922
|
+
/* @__PURE__ */ e.jsx(f.Item, { name: "description", label: "描述", children: /* @__PURE__ */ e.jsx(Ai, { rows: 3, placeholder: "简要描述技能功能...", style: { borderRadius: 8 } }) }),
|
|
7923
7923
|
/* @__PURE__ */ e.jsx(f.Item, { name: "tags", label: "标签", children: /* @__PURE__ */ e.jsx($, { placeholder: "用逗号分隔,如 java,entity,generator", style: { borderRadius: 8 } }) }),
|
|
7924
7924
|
/* @__PURE__ */ e.jsx(f.Item, { name: "author", label: "作者", children: /* @__PURE__ */ e.jsx($, { placeholder: "技能作者", style: { borderRadius: 8 } }) })
|
|
7925
7925
|
] })
|
|
@@ -7969,19 +7969,19 @@ function ca() {
|
|
|
7969
7969
|
)
|
|
7970
7970
|
] });
|
|
7971
7971
|
}
|
|
7972
|
-
const { TextArea: Mn } = $, { Option: Qe } = X, { TabPane: hn } = Ce,
|
|
7972
|
+
const { TextArea: Mn } = $, { Option: Qe } = X, { TabPane: hn } = Ce, ca = () => {
|
|
7973
7973
|
const [t, s] = i("list");
|
|
7974
7974
|
return /* @__PURE__ */ e.jsx(Z, { style: { minHeight: "calc(100vh - 140px)" }, children: /* @__PURE__ */ e.jsxs(Ce, { activeKey: t, onChange: s, children: [
|
|
7975
7975
|
/* @__PURE__ */ e.jsx(hn, { tab: /* @__PURE__ */ e.jsxs("span", { children: [
|
|
7976
7976
|
/* @__PURE__ */ e.jsx(Yt, {}),
|
|
7977
7977
|
" 产品管理"
|
|
7978
|
-
] }), children: /* @__PURE__ */ e.jsx(
|
|
7978
|
+
] }), children: /* @__PURE__ */ e.jsx(Ri, {}) }, "list"),
|
|
7979
7979
|
/* @__PURE__ */ e.jsx(hn, { tab: /* @__PURE__ */ e.jsxs("span", { children: [
|
|
7980
|
-
/* @__PURE__ */ e.jsx(
|
|
7980
|
+
/* @__PURE__ */ e.jsx(jt, {}),
|
|
7981
7981
|
" 产品配置"
|
|
7982
|
-
] }), children: /* @__PURE__ */ e.jsx(
|
|
7982
|
+
] }), children: /* @__PURE__ */ e.jsx(Ni, {}) }, "config")
|
|
7983
7983
|
] }) });
|
|
7984
|
-
},
|
|
7984
|
+
}, Ri = () => {
|
|
7985
7985
|
const [t, s] = i([]), [a, n] = i(!1), [k, o] = i(""), [v, g] = i(""), [b, T] = i(1), [u] = i(12), [x, R] = i(0), [L, B] = i(!1), [c] = f.useForm(), [w, C] = i(null), [p, F] = i(!1), [J, h] = i(!1), [S, E] = i(null);
|
|
7986
7986
|
ae(() => {
|
|
7987
7987
|
H();
|
|
@@ -8258,7 +8258,7 @@ const { TextArea: Mn } = $, { Option: Qe } = X, { TabPane: hn } = Ce, pa = () =>
|
|
|
8258
8258
|
}
|
|
8259
8259
|
),
|
|
8260
8260
|
/* @__PURE__ */ e.jsx(
|
|
8261
|
-
|
|
8261
|
+
ut,
|
|
8262
8262
|
{
|
|
8263
8263
|
title: "产品详情",
|
|
8264
8264
|
open: J,
|
|
@@ -8321,7 +8321,7 @@ const { TextArea: Mn } = $, { Option: Qe } = X, { TabPane: hn } = Ce, pa = () =>
|
|
|
8321
8321
|
}
|
|
8322
8322
|
)
|
|
8323
8323
|
] });
|
|
8324
|
-
},
|
|
8324
|
+
}, Ni = () => {
|
|
8325
8325
|
const [t, s] = i([]), [a, n] = i(null), [k, o] = i({ scenes: [], params: [] }), [v, g] = i(!1), [b, T] = i(!1), [u, x] = i(!1), [R] = f.useForm();
|
|
8326
8326
|
ae(() => {
|
|
8327
8327
|
Ue.page({ id: 1, pageSize: 100 }).then((p) => {
|
|
@@ -8421,7 +8421,7 @@ const { TextArea: Mn } = $, { Option: Qe } = X, { TabPane: hn } = Ce, pa = () =>
|
|
|
8421
8421
|
j,
|
|
8422
8422
|
{
|
|
8423
8423
|
type: "primary",
|
|
8424
|
-
icon: /* @__PURE__ */ e.jsx(
|
|
8424
|
+
icon: /* @__PURE__ */ e.jsx(yt, {}),
|
|
8425
8425
|
onClick: B,
|
|
8426
8426
|
disabled: !a,
|
|
8427
8427
|
loading: b,
|
|
@@ -8503,7 +8503,7 @@ const { TextArea: Mn } = $, { Option: Qe } = X, { TabPane: hn } = Ce, pa = () =>
|
|
|
8503
8503
|
}
|
|
8504
8504
|
)
|
|
8505
8505
|
] });
|
|
8506
|
-
}, { TextArea:
|
|
8506
|
+
}, { TextArea: Li } = $, { Text: Pt, Title: Di } = Ze, { Option: fn } = X, pa = () => {
|
|
8507
8507
|
var Fe, pe, Ne;
|
|
8508
8508
|
const t = new URLSearchParams(window.location.search), s = t.get("productCode") || "", a = t.get("sceneCode") || "", [n, k] = i(s), [o, v] = i(a), [g, b] = i([]), [T, u] = i([]), [x, R] = i([]), [L, B] = i(""), [c, w] = i(!1), [C, p] = i(!1), [F, J] = i(""), [h, S] = i(!1), [E, H] = i([]), [P, G] = i(!1), [W] = f.useForm(), [z, I] = i({ temperature: 0.7, maxTokens: 2048, topP: 1 }), [U, d] = i(null), m = Oe(null), _ = Oe(null), O = Oe(null);
|
|
8509
8509
|
ae(() => {
|
|
@@ -8712,7 +8712,7 @@ const { TextArea: Mn } = $, { Option: Qe } = X, { TabPane: hn } = Ce, pa = () =>
|
|
|
8712
8712
|
}
|
|
8713
8713
|
}
|
|
8714
8714
|
),
|
|
8715
|
-
/* @__PURE__ */ e.jsx(
|
|
8715
|
+
/* @__PURE__ */ e.jsx(Di, { level: 5, style: { marginTop: 12, marginBottom: 4 }, children: ((pe = T.find((K) => K.sceneCode === o)) == null ? void 0 : pe.sceneName) || "场景助手" }),
|
|
8716
8716
|
/* @__PURE__ */ e.jsx(Pt, { type: "secondary", children: (U == null ? void 0 : U.description) || ((Ne = T.find((K) => K.sceneCode === o)) == null ? void 0 : Ne.description) || "开始对话吧!" })
|
|
8717
8717
|
] }),
|
|
8718
8718
|
/* @__PURE__ */ e.jsxs("div", { style: { display: "flex", flexDirection: "column", gap: 16 }, children: [
|
|
@@ -8860,7 +8860,7 @@ const { TextArea: Mn } = $, { Option: Qe } = X, { TabPane: hn } = Ce, pa = () =>
|
|
|
8860
8860
|
alignItems: "flex-end"
|
|
8861
8861
|
}, children: [
|
|
8862
8862
|
/* @__PURE__ */ e.jsx(
|
|
8863
|
-
|
|
8863
|
+
Li,
|
|
8864
8864
|
{
|
|
8865
8865
|
ref: O,
|
|
8866
8866
|
value: L,
|
|
@@ -8930,7 +8930,7 @@ const { TextArea: Mn } = $, { Option: Qe } = X, { TabPane: hn } = Ce, pa = () =>
|
|
|
8930
8930
|
children: /* @__PURE__ */ e.jsx(
|
|
8931
8931
|
Ut.Item.Meta,
|
|
8932
8932
|
{
|
|
8933
|
-
avatar: /* @__PURE__ */ e.jsx(Ge, { icon: /* @__PURE__ */ e.jsx(
|
|
8933
|
+
avatar: /* @__PURE__ */ e.jsx(Ge, { icon: /* @__PURE__ */ e.jsx(Bi, {}), style: { background: "#667eea" } }),
|
|
8934
8934
|
title: `会话 ${oe + 1} — ${K.startTime || ""}`,
|
|
8935
8935
|
description: /* @__PURE__ */ e.jsxs(
|
|
8936
8936
|
Pt,
|
|
@@ -8981,23 +8981,23 @@ const { TextArea: Mn } = $, { Option: Qe } = X, { TabPane: hn } = Ce, pa = () =>
|
|
|
8981
8981
|
}
|
|
8982
8982
|
` })
|
|
8983
8983
|
] });
|
|
8984
|
-
},
|
|
8984
|
+
}, Bi = () => /* @__PURE__ */ e.jsx(Re, {}), { TextArea: _n } = $, { Option: Te } = X, { TabPane: os } = Ce, ua = () => {
|
|
8985
8985
|
const [t, s] = i("list");
|
|
8986
8986
|
return /* @__PURE__ */ e.jsx(Z, { style: { minHeight: "calc(100vh - 140px)" }, children: /* @__PURE__ */ e.jsxs(Ce, { activeKey: t, onChange: s, children: [
|
|
8987
8987
|
/* @__PURE__ */ e.jsx(os, { tab: /* @__PURE__ */ e.jsxs("span", { children: [
|
|
8988
|
-
/* @__PURE__ */ e.jsx(
|
|
8988
|
+
/* @__PURE__ */ e.jsx(pt, {}),
|
|
8989
8989
|
" 场景管理"
|
|
8990
|
-
] }), children: /* @__PURE__ */ e.jsx(
|
|
8990
|
+
] }), children: /* @__PURE__ */ e.jsx(Fi, {}) }, "list"),
|
|
8991
8991
|
/* @__PURE__ */ e.jsx(os, { tab: /* @__PURE__ */ e.jsxs("span", { children: [
|
|
8992
8992
|
/* @__PURE__ */ e.jsx(Sn, {}),
|
|
8993
8993
|
" 节点配置"
|
|
8994
|
-
] }), children: /* @__PURE__ */ e.jsx(
|
|
8994
|
+
] }), children: /* @__PURE__ */ e.jsx(Mi, {}) }, "nodes"),
|
|
8995
8995
|
/* @__PURE__ */ e.jsx(os, { tab: /* @__PURE__ */ e.jsxs("span", { children: [
|
|
8996
|
-
/* @__PURE__ */ e.jsx(
|
|
8996
|
+
/* @__PURE__ */ e.jsx(ht, {}),
|
|
8997
8997
|
" 场景编排"
|
|
8998
|
-
] }), children: /* @__PURE__ */ e.jsx(
|
|
8998
|
+
] }), children: /* @__PURE__ */ e.jsx(_i, {}) }, "canvas")
|
|
8999
8999
|
] }) });
|
|
9000
|
-
},
|
|
9000
|
+
}, Fi = () => {
|
|
9001
9001
|
const [t, s] = i([]), [a, n] = i(!1), [k, o] = i(""), [v, g] = i(""), [b, T] = i(1), [u] = i(12), [x, R] = i(0), [L, B] = i(!1), [c] = f.useForm(), [w, C] = i(null), [p, F] = i(!1), [J, h] = i(!1), [S, E] = i(null), [H, P] = i([]);
|
|
9002
9002
|
ae(() => {
|
|
9003
9003
|
Ue.page({ id: 1, pageSize: 100 }).then((l) => {
|
|
@@ -9081,7 +9081,7 @@ const { TextArea: Mn } = $, { Option: Qe } = X, { TabPane: hn } = Ce, pa = () =>
|
|
|
9081
9081
|
display: "flex",
|
|
9082
9082
|
alignItems: "center",
|
|
9083
9083
|
justifyContent: "center"
|
|
9084
|
-
}, children: /* @__PURE__ */ e.jsx(
|
|
9084
|
+
}, children: /* @__PURE__ */ e.jsx(pt, { style: { fontSize: 18, color: "#fff" } }) }),
|
|
9085
9085
|
/* @__PURE__ */ e.jsxs("div", { children: [
|
|
9086
9086
|
/* @__PURE__ */ e.jsx("div", { style: { fontWeight: 500 }, children: M.sceneName }),
|
|
9087
9087
|
/* @__PURE__ */ e.jsxs("div", { style: { fontSize: 12, color: "#999" }, children: [
|
|
@@ -9112,7 +9112,7 @@ const { TextArea: Mn } = $, { Option: Qe } = X, { TabPane: hn } = Ce, pa = () =>
|
|
|
9112
9112
|
width: 100,
|
|
9113
9113
|
render: (l) => {
|
|
9114
9114
|
const M = { CONVERSATION: "对话", TASK: "任务", WORKFLOW: "工作流" };
|
|
9115
|
-
return /* @__PURE__ */ e.jsx(V, { icon: /* @__PURE__ */ e.jsx(
|
|
9115
|
+
return /* @__PURE__ */ e.jsx(V, { icon: /* @__PURE__ */ e.jsx(pt, {}), children: M[l] || l });
|
|
9116
9116
|
}
|
|
9117
9117
|
},
|
|
9118
9118
|
{
|
|
@@ -9317,7 +9317,7 @@ const { TextArea: Mn } = $, { Option: Qe } = X, { TabPane: hn } = Ce, pa = () =>
|
|
|
9317
9317
|
}
|
|
9318
9318
|
),
|
|
9319
9319
|
/* @__PURE__ */ e.jsx(
|
|
9320
|
-
|
|
9320
|
+
ut,
|
|
9321
9321
|
{
|
|
9322
9322
|
title: "场景详情",
|
|
9323
9323
|
open: J,
|
|
@@ -9333,7 +9333,7 @@ const { TextArea: Mn } = $, { Option: Qe } = X, { TabPane: hn } = Ce, pa = () =>
|
|
|
9333
9333
|
display: "flex",
|
|
9334
9334
|
alignItems: "center",
|
|
9335
9335
|
justifyContent: "center"
|
|
9336
|
-
}, children: /* @__PURE__ */ e.jsx(
|
|
9336
|
+
}, children: /* @__PURE__ */ e.jsx(pt, { style: { fontSize: 22, color: "#fff" } }) }),
|
|
9337
9337
|
/* @__PURE__ */ e.jsxs("div", { children: [
|
|
9338
9338
|
/* @__PURE__ */ e.jsx("div", { style: { fontSize: 16, fontWeight: 600 }, children: S.sceneName }),
|
|
9339
9339
|
/* @__PURE__ */ e.jsx("div", { style: { fontSize: 12, color: "#999" }, children: S.sceneCode })
|
|
@@ -9362,7 +9362,7 @@ const { TextArea: Mn } = $, { Option: Qe } = X, { TabPane: hn } = Ce, pa = () =>
|
|
|
9362
9362
|
}
|
|
9363
9363
|
)
|
|
9364
9364
|
] });
|
|
9365
|
-
},
|
|
9365
|
+
}, Mi = () => {
|
|
9366
9366
|
const [t, s] = i([]), [a, n] = i(null), [k, o] = i([]), [v, g] = i(!1), [b, T] = i(!1), [u] = f.useForm();
|
|
9367
9367
|
ae(() => {
|
|
9368
9368
|
Ee.page({ id: 1, pageSize: 100 }).then((C) => {
|
|
@@ -9415,7 +9415,7 @@ const { TextArea: Mn } = $, { Option: Qe } = X, { TabPane: hn } = Ce, pa = () =>
|
|
|
9415
9415
|
{
|
|
9416
9416
|
size: "small",
|
|
9417
9417
|
title: /* @__PURE__ */ e.jsxs("span", { style: { fontWeight: 600 }, children: [
|
|
9418
|
-
/* @__PURE__ */ e.jsx(
|
|
9418
|
+
/* @__PURE__ */ e.jsx(pt, { style: { color: "#4facfe", marginRight: 6 } }),
|
|
9419
9419
|
"选择场景"
|
|
9420
9420
|
] }),
|
|
9421
9421
|
style: { width: 260, flexShrink: 0, borderRadius: 10 },
|
|
@@ -9510,7 +9510,7 @@ const { TextArea: Mn } = $, { Option: Qe } = X, { TabPane: hn } = Ce, pa = () =>
|
|
|
9510
9510
|
}
|
|
9511
9511
|
)
|
|
9512
9512
|
] });
|
|
9513
|
-
},
|
|
9513
|
+
}, _i = () => {
|
|
9514
9514
|
const [t, s] = i([]), [a, n] = i(null), [k, o] = i([]), [v, g] = i([]);
|
|
9515
9515
|
ae(() => {
|
|
9516
9516
|
Ee.page({ id: 1, pageSize: 100 }).then((u) => {
|
|
@@ -9547,7 +9547,7 @@ const { TextArea: Mn } = $, { Option: Qe } = X, { TabPane: hn } = Ce, pa = () =>
|
|
|
9547
9547
|
{
|
|
9548
9548
|
size: "small",
|
|
9549
9549
|
title: /* @__PURE__ */ e.jsxs("span", { style: { fontWeight: 600 }, children: [
|
|
9550
|
-
/* @__PURE__ */ e.jsx(
|
|
9550
|
+
/* @__PURE__ */ e.jsx(pt, { style: { color: "#4facfe", marginRight: 6 } }),
|
|
9551
9551
|
"场景列表"
|
|
9552
9552
|
] }),
|
|
9553
9553
|
style: { width: 240, flexShrink: 0, borderRadius: 10 },
|
|
@@ -9637,7 +9637,7 @@ const { TextArea: Mn } = $, { Option: Qe } = X, { TabPane: hn } = Ce, pa = () =>
|
|
|
9637
9637
|
}
|
|
9638
9638
|
)
|
|
9639
9639
|
] });
|
|
9640
|
-
}, { Text: ds } = Ze, { TabPane: _t } = Ce,
|
|
9640
|
+
}, { Text: ds } = Ze, { TabPane: _t } = Ce, xa = () => {
|
|
9641
9641
|
const [t, s] = i(null), [a, n] = i([]), [k, o] = i([]), [v, g] = i([]), [b, T] = i([]), [u, x] = i(!1), [R, L] = i(null), [B, c] = i(null), [w, C] = i(null), [p, F] = i([]), [J, h] = i([]), [S, E] = i([]);
|
|
9642
9642
|
ae(() => {
|
|
9643
9643
|
ue("/llm-center/provider/list").then((r) => {
|
|
@@ -9918,34 +9918,34 @@ const { TextArea: Mn } = $, { Option: Qe } = X, { TabPane: hn } = Ce, pa = () =>
|
|
|
9918
9918
|
] });
|
|
9919
9919
|
};
|
|
9920
9920
|
export {
|
|
9921
|
-
|
|
9922
|
-
|
|
9923
|
-
|
|
9924
|
-
|
|
9925
|
-
|
|
9926
|
-
|
|
9927
|
-
|
|
9928
|
-
|
|
9929
|
-
|
|
9921
|
+
Yl as AgentAppEditor,
|
|
9922
|
+
Qi as AgentAppList,
|
|
9923
|
+
Qi as AgentAppPage,
|
|
9924
|
+
Xi as AgentSharePage,
|
|
9925
|
+
sa as AkManage,
|
|
9926
|
+
xi as AkUsageDrawer,
|
|
9927
|
+
Si as ApiBridgeEditor,
|
|
9928
|
+
la as BucketList,
|
|
9929
|
+
yi as CurlImportModal,
|
|
9930
9930
|
Fn as FieldMappingEditor,
|
|
9931
|
-
|
|
9932
|
-
|
|
9933
|
-
|
|
9934
|
-
|
|
9935
|
-
|
|
9936
|
-
|
|
9937
|
-
|
|
9938
|
-
|
|
9939
|
-
|
|
9940
|
-
|
|
9941
|
-
|
|
9942
|
-
|
|
9943
|
-
|
|
9931
|
+
ta as LlmModel,
|
|
9932
|
+
ea as LlmProvider,
|
|
9933
|
+
na as McpPage,
|
|
9934
|
+
Zi as ModelManage,
|
|
9935
|
+
ia as ObjectBrowser,
|
|
9936
|
+
bi as OpenApiImportModal,
|
|
9937
|
+
pa as ProductExecute,
|
|
9938
|
+
ca as ProductList,
|
|
9939
|
+
ua as ProductScene,
|
|
9940
|
+
ra as ScriptCenterPage,
|
|
9941
|
+
da as SkillMarket,
|
|
9942
|
+
xa as UsageDashboard,
|
|
9943
|
+
$l as WorkflowEditor,
|
|
9944
9944
|
be as agentApi,
|
|
9945
9945
|
Dn as authRequest,
|
|
9946
9946
|
Bn as ctcRequest,
|
|
9947
9947
|
Dt as flowApi,
|
|
9948
|
-
|
|
9948
|
+
ft as llmApi,
|
|
9949
9949
|
at as mcpApi,
|
|
9950
9950
|
De as ossApi,
|
|
9951
9951
|
Ue as productApi,
|