@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.
@@ -1,15 +1,16 @@
1
1
  var rl = Object.defineProperty;
2
2
  var ol = (t, s, n) => s in t ? rl(t, s, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[s] = n;
3
3
  var Xs = (t, s, n) => ol(t, typeof s != "symbol" ? s + "" : s, n);
4
- import { f as $t, j as e, a as me, t as Lt, l as dl, R as Qt, b as Ot, u as pe, m as as, o as De, p as qe, s as Ae, g as $e, h as _e, c as en } from "./echarts-DGCy0J8X.js";
5
- import { UndoOutlined as cl, RedoOutlined as pl, DeleteOutlined as je, SaveOutlined as In, CloudUploadOutlined as gt, BugOutlined as xl, ReloadOutlined as Ie, ArrowLeftOutlined as zn, DiffOutlined as Rs, RocketOutlined as At, EyeOutlined as Ze, MessageOutlined as An, RobotOutlined as Se, ApartmentOutlined as Os, ThunderboltOutlined as lt, DatabaseOutlined as Pn, BookOutlined as hl, CalendarOutlined as ul, PlusOutlined as Ce, FileTextOutlined as ot, InboxOutlined as gl, SearchOutlined as Ns, AppstoreFilled as ml, UnorderedListOutlined as yl, LoadingOutlined as Yt, EditOutlined as Ge, FolderOpenOutlined as fl, FolderOutlined as dt, GlobalOutlined as yt, LockOutlined as Pt, SettingOutlined as Es, CheckCircleFilled as Dt, CopyOutlined as Ee, LinkOutlined as Rn, LineChartOutlined as On, DollarOutlined as Ft, ClockCircleOutlined as ts, AppstoreOutlined as Mt, ExclamationCircleFilled as Nn, ClearOutlined as En, SendOutlined as _n, UserOutlined as ss, BarChartOutlined as _s, ApiOutlined as jt, KeyOutlined as Bt, CheckCircleOutlined as kt, StopOutlined as Ls, BranchesOutlined as jl, PictureOutlined as bl, AudioOutlined as Cl, NodeIndexOutlined as nt, PlayCircleOutlined as ut, CloudOutlined as wt, FolderAddOutlined as vl, UploadOutlined as Ln, MoreOutlined as Bn, DownloadOutlined as St, FileZipOutlined as Dn, FileImageOutlined as Sl, FileOutlined as kl, TeamOutlined as wl, ShopOutlined as Zt, ExclamationCircleOutlined as Tl, TagOutlined as Il, HistoryOutlined as Xt, CloseCircleOutlined as zl, ArrowUpOutlined as Al, ArrowDownOutlined as Pl, CodeOutlined as Tt, ExperimentOutlined as Rl, ImportOutlined as Ol, CloudServerOutlined as Nl, CloudDownloadOutlined as Fn, NumberOutlined as El, TagsOutlined as _l, FireOutlined as Ll, StarOutlined as Mn, InfoCircleOutlined as Bl, HomeOutlined as Dl, DashboardOutlined as Fl, ShareAltOutlined as Ml, ClusterOutlined as Kl, ShoppingOutlined as is, DeploymentUnitOutlined as Ul } from "@ant-design/icons";
6
- import Wl, { useRef as Be, useState as l, useEffect as se, useCallback as we, useMemo as tn } from "react";
7
- import { message as k, Space as ee, Tooltip as ne, Button as j, Tag as F, Modal as xe, Alert as Pe, Input as Q, Typography as Fe, Form as w, Card as W, Select as J, Tabs as be, Row as re, Col as $, InputNumber as Le, Switch as Ut, Breadcrumb as Kn, Tree as Un, Table as ue, Popconfirm as it, TreeSelect as $l, Divider as ct, Drawer as ft, Avatar as Ye, Empty as de, QRCode as Vl, Statistic as ie, Progress as Bs, Spin as He, List as Jt, Radio as rs, Upload as Cs, Dropdown as Ds, Badge as es, Steps as Wn, Descriptions as Ve, App as ql, Segmented as Hl, Pagination as Gl, Timeline as Jl } from "antd";
8
- import Rt, { CircleNode as $n, RectNode as Wt, PolygonNode as Ql, h as Yl, CircleNodeModel as sn, RectNodeModel as Nt, PolygonNodeModel as Zl } from "@logicflow/core";
9
- import { Control as Xl, MiniMap as ea, Menu as ta, DndPanel as sa, SelectionSelect as na } from "@logicflow/extension";
4
+ import { f as $t, j as e, a as me, l as dl, R as Qt, b as Ot, u as pe, m as as, o as De, p as qe, s as Ae, d as $e, e as _e, t as en } from "./echarts-BRUNUPov.js";
5
+ import { UndoOutlined as cl, RedoOutlined as pl, DeleteOutlined as je, SaveOutlined as In, CloudUploadOutlined as gt, BugOutlined as xl, ReloadOutlined as Ie, ArrowLeftOutlined as zn, DiffOutlined as Rs, RocketOutlined as At, EyeOutlined as Ze, MessageOutlined as An, RobotOutlined as Se, ApartmentOutlined as Os, ThunderboltOutlined as lt, DatabaseOutlined as Pn, BookOutlined as hl, CalendarOutlined as ul, PlusOutlined as Ce, FileTextOutlined as ot, InboxOutlined as gl, SearchOutlined as Ns, AppstoreFilled as ml, UnorderedListOutlined as yl, LoadingOutlined as Yt, EditOutlined as Ge, FolderOpenOutlined as fl, FolderOutlined as dt, GlobalOutlined as yt, LockOutlined as Pt, SettingOutlined as Es, CheckCircleFilled as Dt, CopyOutlined as Ee, LinkOutlined as Rn, ToolOutlined as jl, LineChartOutlined as On, DollarOutlined as Ft, ClockCircleOutlined as ts, AppstoreOutlined as Mt, ExclamationCircleFilled as Nn, ClearOutlined as En, SendOutlined as _n, UserOutlined as ss, BarChartOutlined as _s, ApiOutlined as jt, KeyOutlined as Lt, CheckCircleOutlined as kt, StopOutlined as Ls, BranchesOutlined as bl, PictureOutlined as Cl, AudioOutlined as vl, NodeIndexOutlined as nt, PlayCircleOutlined as ut, CloudOutlined as wt, FolderAddOutlined as Sl, UploadOutlined as Ln, MoreOutlined as Bn, DownloadOutlined as St, FileZipOutlined as Dn, FileImageOutlined as kl, FileOutlined as wl, TeamOutlined as Tl, ShopOutlined as Zt, ExclamationCircleOutlined as Il, TagOutlined as zl, HistoryOutlined as Xt, CloseCircleOutlined as Al, ArrowUpOutlined as Pl, ArrowDownOutlined as Rl, CodeOutlined as Tt, ExperimentOutlined as Ol, ImportOutlined as Nl, CloudServerOutlined as El, CloudDownloadOutlined as Fn, NumberOutlined as _l, TagsOutlined as Ll, FireOutlined as Bl, StarOutlined as Mn, InfoCircleOutlined as Dl, HomeOutlined as Fl, DashboardOutlined as Ml, ShareAltOutlined as Kl, ClusterOutlined as Ul, ShoppingOutlined as is, DeploymentUnitOutlined as Wl } from "@ant-design/icons";
6
+ import $l, { useRef as Be, useState as l, useEffect as se, useCallback as we, useMemo as tn } from "react";
7
+ import { message as k, Space as ee, Tooltip as ne, Button as j, Tag as F, Modal as xe, Alert as Pe, Input as Q, Typography as Fe, Form as w, Card as W, Select as J, Tabs as be, Row as re, Col as $, InputNumber as Le, Switch as Ut, Breadcrumb as Kn, Tree as Un, Table as ue, Popconfirm as it, TreeSelect as Vl, Divider as ct, Drawer as ft, Avatar as Ye, Empty as de, QRCode as ql, Statistic as ie, Progress as Bs, Spin as He, List as Jt, Radio as rs, Upload as Cs, Dropdown as Ds, Badge as es, Steps as Wn, Descriptions as Ve, App as Hl, Segmented as Gl, Pagination as Jl, Timeline as Ql } from "antd";
8
+ import Rt, { CircleNode as $n, RectNode as Wt, PolygonNode as Yl, h as Zl, CircleNodeModel as sn, RectNodeModel as Nt, PolygonNodeModel as Xl } from "@logicflow/core";
9
+ import { Control as ea, MiniMap as ta, Menu as sa, DndPanel as na, SelectionSelect as la } from "@logicflow/extension";
10
10
  import { useNavigate as ns, useParams as Vn } from "react-router-dom";
11
+ import { ErrorState as Bt } from "@yuku123/z-frontend-common/ui";
11
12
  import qn from "react-markdown";
12
- import la from "remark-gfm";
13
+ import aa from "remark-gfm";
13
14
  const Ks = class Ks extends $n {
14
15
  getNodeStyle() {
15
16
  const s = super.getNodeStyle();
@@ -46,7 +47,7 @@ const Ws = class Ws extends Wt {
46
47
  };
47
48
  Ws.extendKey = "agent";
48
49
  let ks = Ws;
49
- const $s = class $s extends Ql {
50
+ const $s = class $s extends Yl {
50
51
  getNodeStyle() {
51
52
  const s = super.getNodeStyle();
52
53
  return s.fill = "#fff7e6", s.stroke = "#fa8c16", s.strokeWidth = 2, s;
@@ -102,7 +103,7 @@ const Hs = class Hs extends Wt {
102
103
  }
103
104
  getShape() {
104
105
  const { x: s, y: n, width: a, height: f } = this.getAttributes(), r = a / 2, d = f / 2, h = 12;
105
- return Yl("polygon", {
106
+ return Zl("polygon", {
106
107
  points: [
107
108
  [s - r + h, n - d],
108
109
  [s + r - h, n - d],
@@ -128,8 +129,8 @@ const Gs = class Gs extends $n {
128
129
  };
129
130
  Gs.extendKey = "end";
130
131
  let As = Gs;
131
- function aa(t) {
132
- t.register({ type: "start", view: vs, model: sn }), t.register({ type: "llm", view: Ss, model: Nt }), t.register({ type: "agent", view: ks, model: Nt }), t.register({ type: "condition", view: ws, model: Zl }), t.register({ type: "http", view: Ts, model: Nt }), t.register({ type: "template", view: Is, model: Nt }), t.register({ type: "parallel", view: zs, model: Nt }), t.register({ type: "end", view: As, model: sn });
132
+ function ia(t) {
133
+ t.register({ type: "start", view: vs, model: sn }), t.register({ type: "llm", view: Ss, model: Nt }), t.register({ type: "agent", view: ks, model: Nt }), t.register({ type: "condition", view: ws, model: Xl }), t.register({ type: "http", view: Ts, model: Nt }), t.register({ type: "template", view: Is, model: Nt }), t.register({ type: "parallel", view: zs, model: Nt }), t.register({ type: "end", view: As, model: sn });
133
134
  }
134
135
  const Ps = [
135
136
  { type: "start", label: "开始", icon: "https://cdn.jsdelivr.net/gh/LogicFlow/static@latest/docs/static/start.png" },
@@ -145,11 +146,11 @@ const Ps = [
145
146
  { type: "parallel", label: "并行执行", icon: "⚡" },
146
147
  { type: "end", label: "结束", icon: "https://cdn.jsdelivr.net/gh/LogicFlow/static@latest/docs/static/end.png" }
147
148
  ];
148
- Rt.use(Xl);
149
149
  Rt.use(ea);
150
150
  Rt.use(ta);
151
151
  Rt.use(sa);
152
152
  Rt.use(na);
153
+ Rt.use(la);
153
154
  const nn = {
154
155
  nodes: [
155
156
  { id: "start_1", type: "start", x: 150, y: 280, text: "开始" },
@@ -160,7 +161,7 @@ const nn = {
160
161
  { id: "e1", type: "polyline", sourceNodeId: "start_1", targetNodeId: "llm_1", text: "" },
161
162
  { id: "e2", type: "polyline", sourceNodeId: "llm_1", targetNodeId: "end_1", text: "" }
162
163
  ]
163
- }, ia = ({ node: t, onChange: s, onClose: n }) => {
164
+ }, ra = ({ node: t, onChange: s, onClose: n }) => {
164
165
  var f, r, d, h, g;
165
166
  if (!t) return null;
166
167
  const a = ((f = Ps.find((o) => o.type === t.type)) == null ? void 0 : f.label) || t.type;
@@ -297,7 +298,7 @@ const nn = {
297
298
  )
298
299
  ] })
299
300
  ] });
300
- }, ra = ({ readOnly: t = !1, value: s, onChange: n, appCode: a, flowName: f }) => {
301
+ }, oa = ({ readOnly: t = !1, value: s, onChange: n, appCode: a, flowName: f }) => {
301
302
  const r = Be(null), d = Be(null), [h, g] = l(null), [o, i] = l(s || nn), [c, N] = l(null), [B, M] = l(!1), [x, T] = l(!1);
302
303
  se(() => {
303
304
  if (!r.current) return;
@@ -321,7 +322,7 @@ const nn = {
321
322
  // Default edge type
322
323
  edgeType: "polyline"
323
324
  });
324
- aa(R), R.extension.dndPanel.setPatternItems(
325
+ ia(R), R.extension.dndPanel.setPatternItems(
325
326
  Ps.map((_) => ({
326
327
  type: _.type,
327
328
  label: _.label,
@@ -541,7 +542,7 @@ const nn = {
541
542
  ),
542
543
  /* @__PURE__ */ e.jsx("div", { ref: r, style: { width: "100%", height: "100%" } }),
543
544
  h && !t && /* @__PURE__ */ e.jsx(
544
- ia,
545
+ ra,
545
546
  {
546
547
  node: h,
547
548
  onChange: v,
@@ -561,7 +562,7 @@ const nn = {
561
562
  }, children: "只读模式" })
562
563
  ] });
563
564
  };
564
- class oa extends Wl.Component {
565
+ class da extends $l.Component {
565
566
  constructor(n) {
566
567
  super(n);
567
568
  Xs(this, "handleReset", () => {
@@ -625,7 +626,7 @@ class oa extends Wl.Component {
625
626
  );
626
627
  }
627
628
  }
628
- const { TextArea: pt } = Q, { Text: We, Title: da } = Fe, ln = {
629
+ const { TextArea: pt } = Q, { Text: We, Title: ca } = Fe, ln = {
629
630
  ollama: [
630
631
  { code: "qwen2.5:7b-instruct-q4_K_M", name: "Qwen 2.5 7B" },
631
632
  { code: "qwen3:8b", name: "Qwen3 8B" },
@@ -744,7 +745,7 @@ const { TextArea: pt } = Q, { Text: We, Title: da } = Fe, ln = {
744
745
  flexShrink: 0
745
746
  }, children: [
746
747
  /* @__PURE__ */ e.jsx(j, { type: "text", icon: /* @__PURE__ */ e.jsx(zn, {}), onClick: s }),
747
- /* @__PURE__ */ e.jsxs(da, { level: 5, style: { margin: 0, flex: 1, minWidth: 0 }, children: [
748
+ /* @__PURE__ */ e.jsxs(ca, { level: 5, style: { margin: 0, flex: 1, minWidth: 0 }, children: [
748
749
  /* @__PURE__ */ e.jsx("span", { style: { marginRight: 8 }, children: a.appName }),
749
750
  /* @__PURE__ */ e.jsxs(F, { color: h.color, style: { borderRadius: 20, marginRight: 4 }, children: [
750
751
  h.icon,
@@ -1145,13 +1146,13 @@ const { TextArea: pt } = Q, { Text: We, Title: da } = Fe, ln = {
1145
1146
  }
1146
1147
  ),
1147
1148
  /* @__PURE__ */ e.jsx(
1148
- oa,
1149
+ da,
1149
1150
  {
1150
1151
  fallbackTitle: "流程编辑器加载失败",
1151
1152
  fallbackDescription: "LogicFlow 初始化异常。请重试,或切换到「对话」/「智能体」模式后重新切回工作流。",
1152
1153
  onReset: () => T(null),
1153
1154
  children: /* @__PURE__ */ e.jsx(
1154
- ra,
1155
+ oa,
1155
1156
  {
1156
1157
  readOnly: r,
1157
1158
  value: x,
@@ -1394,7 +1395,7 @@ function ls({
1394
1395
  }
1395
1396
  );
1396
1397
  }
1397
- const { TextArea: ca } = Q, { Option: tt } = J, { TabPane: ds } = be, { Text: Te, Title: It } = Fe, rn = () => {
1398
+ const { TextArea: pa } = Q, { Option: tt } = J, { TabPane: ds } = be, { Text: Te, Title: It } = Fe, rn = () => {
1398
1399
  const [t, s] = l(""), [n, a] = l(""), [f, r] = l(0), [d, h] = l(null), g = () => r((o) => o + 1);
1399
1400
  return d ? /* @__PURE__ */ e.jsx("div", { style: {
1400
1401
  flex: 1,
@@ -1422,7 +1423,7 @@ const { TextArea: ca } = Q, { Option: tt } = J, { TabPane: ds } = be, { Text: Te
1422
1423
  title: "分组",
1423
1424
  extra: /* @__PURE__ */ e.jsx(j, { size: "small", icon: /* @__PURE__ */ e.jsx(Ie, {}), onClick: g }),
1424
1425
  children: /* @__PURE__ */ e.jsx(
1425
- xa,
1426
+ ha,
1426
1427
  {
1427
1428
  selectedGroupCode: t,
1428
1429
  onGroupSelect: (o, i) => {
@@ -1440,7 +1441,7 @@ const { TextArea: ca } = Q, { Option: tt } = J, { TabPane: ds } = be, { Text: Te
1440
1441
  size: "small",
1441
1442
  style: { flex: 1, overflow: "auto" },
1442
1443
  title: n || void 0,
1443
- children: /* @__PURE__ */ e.jsx(ma, { selectedGroupCode: t, onEditApp: h })
1444
+ children: /* @__PURE__ */ e.jsx(ya, { selectedGroupCode: t, onEditApp: h })
1444
1445
  }
1445
1446
  )
1446
1447
  ] });
@@ -1461,7 +1462,7 @@ const { TextArea: ca } = Q, { Option: tt } = J, { TabPane: ds } = be, { Text: Te
1461
1462
  { code: "qwen-plus", name: "Qwen Plus" },
1462
1463
  { code: "qwen-turbo", name: "Qwen Turbo" }
1463
1464
  ]
1464
- }, pa = (t) => {
1465
+ }, xa = (t) => {
1465
1466
  const s = {};
1466
1467
  t.forEach((a) => {
1467
1468
  s[a.group_code] = {
@@ -1475,7 +1476,7 @@ const { TextArea: ca } = Q, { Option: tt } = J, { TabPane: ds } = be, { Text: Te
1475
1476
  const f = s[a.group_code];
1476
1477
  a.parent_code && s[a.parent_code] ? s[a.parent_code].children.push(f) : a.parent_code || n.push(f);
1477
1478
  }), n;
1478
- }, xa = ({ selectedGroupCode: t, onGroupSelect: s, onGroupRefresh: n }) => {
1479
+ }, ha = ({ selectedGroupCode: t, onGroupSelect: s, onGroupRefresh: n }) => {
1479
1480
  const [a, f] = l([]), [r, d] = l(!1), [h, g] = l(!1), [o, i] = l(null), [c, N] = l(null), [B] = w.useForm(), M = Be(null), x = (P) => {
1480
1481
  s(P === t ? "" : P, "");
1481
1482
  }, T = () => {
@@ -1613,7 +1614,7 @@ const { TextArea: ca } = Q, { Option: tt } = J, { TabPane: ds } = be, { Text: Te
1613
1614
  }
1614
1615
  )
1615
1616
  ] });
1616
- }, ha = ({
1617
+ }, ua = ({
1617
1618
  record: t,
1618
1619
  onEdit: s,
1619
1620
  onView: n,
@@ -1738,7 +1739,7 @@ const { TextArea: ca } = Q, { Option: tt } = J, { TabPane: ds } = be, { Text: Te
1738
1739
  ] })
1739
1740
  }
1740
1741
  );
1741
- }, ua = ({ app: t, onEnable: s }) => {
1742
+ }, ga = ({ app: t, onEnable: s }) => {
1742
1743
  const [n, a] = l(!1);
1743
1744
  return /* @__PURE__ */ e.jsxs("div", { style: { padding: "24px 0", textAlign: "center" }, children: [
1744
1745
  /* @__PURE__ */ e.jsx("div", { style: {
@@ -1793,7 +1794,7 @@ const { TextArea: ca } = Q, { Option: tt } = J, { TabPane: ds } = be, { Text: Te
1793
1794
  r
1794
1795
  )) })
1795
1796
  ] });
1796
- }, ga = ({ app: t, onDisable: s, onRefresh: n }) => {
1797
+ }, ma = ({ app: t, onDisable: s, onRefresh: n }) => {
1797
1798
  var i, c;
1798
1799
  const a = t.share_code ? `${window.location.origin}/share/${t.share_code}` : "", [f, r] = l(!1), [d, h] = l(!1), g = async () => {
1799
1800
  if (a)
@@ -1837,7 +1838,7 @@ const { TextArea: ca } = Q, { Option: tt } = J, { TabPane: ds } = be, { Text: Te
1837
1838
  borderRadius: 8,
1838
1839
  boxShadow: "0 1px 3px rgba(0,0,0,0.06)",
1839
1840
  flexShrink: 0
1840
- }, children: a ? /* @__PURE__ */ e.jsx(Vl, { value: a, size: 140, bordered: !1 }) : /* @__PURE__ */ e.jsx("div", { style: {
1841
+ }, children: a ? /* @__PURE__ */ e.jsx(ql, { value: a, size: 140, bordered: !1 }) : /* @__PURE__ */ e.jsx("div", { style: {
1841
1842
  width: 140,
1842
1843
  height: 140,
1843
1844
  display: "flex",
@@ -1929,7 +1930,7 @@ const { TextArea: ca } = Q, { Option: tt } = J, { TabPane: ds } = be, { Text: Te
1929
1930
  }
1930
1931
  )
1931
1932
  ] });
1932
- }, ma = ({ selectedGroupCode: t, onEditApp: s }) => {
1933
+ }, ya = ({ selectedGroupCode: t, onEditApp: s }) => {
1933
1934
  var ze;
1934
1935
  const [n, a] = l([]), [f, r] = l(!1), [d, h] = l(null), [g, o] = l(""), [i, c] = l(""), [N, B] = l(1), [M] = l(12), [x, T] = l(0), [v, m] = l(!1), [u, L] = l([]), [P, b] = l(!1), [S, K] = l(null), [R, y] = l(!1), [_, O] = l(null), [V, X] = l("card"), [C, I] = l(cs.ollama), [E, z] = l(!1), [q] = w.useForm(), [p, D] = l([]);
1935
1936
  se(() => {
@@ -2096,7 +2097,7 @@ const { TextArea: ca } = Q, { Option: tt } = J, { TabPane: ds } = be, { Text: Te
2096
2097
  /* @__PURE__ */ e.jsx("div", { style: { marginTop: 16, color: "#8c8c8c" }, children: "加载中..." })
2097
2098
  ] }),
2098
2099
  !f && d && /* @__PURE__ */ e.jsx(
2099
- Lt,
2100
+ Bt,
2100
2101
  {
2101
2102
  error: d,
2102
2103
  title: "应用列表加载失败",
@@ -2135,7 +2136,7 @@ const { TextArea: ca } = Q, { Option: tt } = J, { TabPane: ds } = be, { Text: Te
2135
2136
  gap: 16,
2136
2137
  marginBottom: 16
2137
2138
  }, children: n.map((U) => /* @__PURE__ */ e.jsx(
2138
- ha,
2139
+ ua,
2139
2140
  {
2140
2141
  record: U,
2141
2142
  onEdit: Xe,
@@ -2299,18 +2300,18 @@ const { TextArea: ca } = Q, { Option: tt } = J, { TabPane: ds } = be, { Text: Te
2299
2300
  }
2300
2301
  ),
2301
2302
  /* @__PURE__ */ e.jsx(w.Item, { name: "groupCode", label: "分组", style: { width: 160 }, children: /* @__PURE__ */ e.jsx(
2302
- $l,
2303
+ Vl,
2303
2304
  {
2304
2305
  allowClear: !0,
2305
2306
  placeholder: "默认",
2306
- treeData: pa(p),
2307
+ treeData: xa(p),
2307
2308
  treeDefaultExpandAll: !0,
2308
2309
  onChange: (U) => q.setFieldsValue({ groupCode: U || "" }),
2309
2310
  style: { width: "100%" }
2310
2311
  }
2311
2312
  ) })
2312
2313
  ] }),
2313
- /* @__PURE__ */ e.jsx(w.Item, { name: "description", label: "应用描述", children: /* @__PURE__ */ e.jsx(ca, { rows: 2, placeholder: "简短描述这个应用的能力和使用场景" }) }),
2314
+ /* @__PURE__ */ e.jsx(w.Item, { name: "description", label: "应用描述", children: /* @__PURE__ */ e.jsx(pa, { rows: 2, placeholder: "简短描述这个应用的能力和使用场景" }) }),
2314
2315
  /* @__PURE__ */ e.jsx(ct, { style: { margin: "12px 0", fontSize: 12, color: "#8c8c8c" }, children: "应用类型" }),
2315
2316
  /* @__PURE__ */ e.jsx(
2316
2317
  w.Item,
@@ -2347,7 +2348,7 @@ const { TextArea: ca } = Q, { Option: tt } = J, { TabPane: ds } = be, { Text: Te
2347
2348
  size: "large",
2348
2349
  open: P,
2349
2350
  onClose: () => b(!1),
2350
- children: S && /* @__PURE__ */ e.jsx(ba, { appCode: S.app_code })
2351
+ children: S && /* @__PURE__ */ e.jsx(Ca, { appCode: S.app_code })
2351
2352
  }
2352
2353
  ),
2353
2354
  /* @__PURE__ */ e.jsx(
@@ -2370,14 +2371,14 @@ const { TextArea: ca } = Q, { Option: tt } = J, { TabPane: ds } = be, { Text: Te
2370
2371
  )
2371
2372
  ] }),
2372
2373
  children: _ && (_.share_enabled ? /* @__PURE__ */ e.jsx(
2373
- ga,
2374
+ ma,
2374
2375
  {
2375
2376
  app: _,
2376
2377
  onDisable: () => et(_, !1),
2377
2378
  onRefresh: () => et(_, !0)
2378
2379
  }
2379
2380
  ) : /* @__PURE__ */ e.jsx(
2380
- ua,
2381
+ ga,
2381
2382
  {
2382
2383
  app: _,
2383
2384
  onEnable: () => et(_, !0)
@@ -2386,7 +2387,7 @@ const { TextArea: ca } = Q, { Option: tt } = J, { TabPane: ds } = be, { Text: Te
2386
2387
  }
2387
2388
  )
2388
2389
  ] });
2389
- }, ya = "本 JVM 未装配 z-llm 技能目录:/api/llm-gateway/skill/template-list 实测 404,当前进程路由表(1377 条)里没有任何技能模板端点。已绑定技能仍取自应用记录(skill_codes),但「可选技能清单」要等 z-llm 侧补出 /api/z-llm/config/skill-template/list 之后才能孵化。", fa = "本 JVM 未装配 z-llm 知识库目录:/api/llm-gateway/knowledge/list 实测 404,当前进程路由表里没有任何知识库目录端点;/api/knowledge-search/list 虽在册,但后端源码自述是兜底实现(固定返回 1 行 hitCount=0 的假数据),按 004「宁占位不接假数据」不接。", ps = (t) => {
2390
+ }, fa = "本 JVM 未装配 z-llm 技能目录:/api/llm-gateway/skill/template-list 实测 404,当前进程路由表(1377 条)里没有任何技能模板端点。已绑定技能仍取自应用记录(skill_codes),但「可选技能清单」要等 z-llm 侧补出 /api/z-llm/config/skill-template/list 之后才能孵化。", ja = "本 JVM 未装配 z-llm 知识库目录:/api/llm-gateway/knowledge/list 实测 404,当前进程路由表里没有任何知识库目录端点;/api/knowledge-search/list 虽在册,但后端源码自述是兜底实现(固定返回 1 行 hitCount=0 的假数据),按 004「宁占位不接假数据」不接。", ps = (t) => {
2390
2391
  if (t == null || t === "") return [];
2391
2392
  if (Array.isArray(t)) return t;
2392
2393
  if (typeof t == "string")
@@ -2397,12 +2398,12 @@ const { TextArea: ca } = Q, { Option: tt } = J, { TabPane: ds } = be, { Text: Te
2397
2398
  return [];
2398
2399
  }
2399
2400
  return [];
2400
- }, ja = (t) => t == null ? "" : typeof t == "string" ? t : t.toolCode ?? t.tool_code ?? "", ba = () => {
2401
+ }, ba = (t) => t == null ? "" : typeof t == "string" ? t : t.toolCode ?? t.tool_code ?? "", Ca = () => {
2401
2402
  var C, I;
2402
2403
  const [t, s] = l([]), [n, a] = l(null), [f, r] = l([]), [d, h] = l([]), [g, o] = l([]), [i, c] = l([]), [N, B] = l(!1), [M, x] = l(!1), [T, v] = l("tools"), [m, u] = l(!1), [L, P] = l(null), [b, S] = l(null), [K, R] = l(null), y = (E) => {
2403
2404
  E && (B(!0), S(null), R(null), me.appGet({ params: { appCode: E } }).then((z) => {
2404
2405
  const q = (z == null ? void 0 : z.data) || z || {};
2405
- h(ps(q.tools).map(ja).filter(Boolean)), o(ps(q.skill_codes ?? q.skillCodes).map(String)), c(ps(q.knowledge_ids ?? q.knowledgeIds).map(String));
2406
+ h(ps(q.tools).map(ba).filter(Boolean)), o(ps(q.skill_codes ?? q.skillCodes).map(String)), c(ps(q.knowledge_ids ?? q.knowledgeIds).map(String));
2406
2407
  }).catch((z) => {
2407
2408
  R(z), h([]), o([]), c([]);
2408
2409
  }), dl.toolTemplateList().then((z) => {
@@ -2452,7 +2453,7 @@ const { TextArea: ca } = Q, { Option: tt } = J, { TabPane: ds } = be, { Text: Te
2452
2453
  q.length === 0 ? /* @__PURE__ */ e.jsx(de, { description: "暂无可用项", image: de.PRESENTED_IMAGE_SIMPLE }) : /* @__PURE__ */ e.jsx("div", { style: { display: "flex", flexDirection: "column", gap: 8 }, children: q.map(Y) })
2453
2454
  ] });
2454
2455
  return L ? /* @__PURE__ */ e.jsx("div", { style: { padding: 24 }, children: /* @__PURE__ */ e.jsx(
2455
- Lt,
2456
+ Bt,
2456
2457
  {
2457
2458
  error: L,
2458
2459
  title: "应用列表加载失败",
@@ -2515,7 +2516,7 @@ const { TextArea: ca } = Q, { Option: tt } = J, { TabPane: ds } = be, { Text: Te
2515
2516
  )
2516
2517
  ] }),
2517
2518
  K && /* @__PURE__ */ e.jsx(
2518
- Lt,
2519
+ Bt,
2519
2520
  {
2520
2521
  error: K,
2521
2522
  title: "读取已绑定配置失败",
@@ -2530,14 +2531,14 @@ const { TextArea: ca } = Q, { Option: tt } = J, { TabPane: ds } = be, { Text: Te
2530
2531
  background: "#fafafa",
2531
2532
  borderRadius: 8
2532
2533
  }, children: b ? /* @__PURE__ */ e.jsx(
2533
- Lt,
2534
+ Bt,
2534
2535
  {
2535
2536
  error: b,
2536
2537
  title: "工具目录加载失败",
2537
2538
  description: `GET /api/z-llm/config/tool-template/list 失败(${(I = b == null ? void 0 : b.response) != null && I.status ? "HTTP " + b.response.status : "请求失败"})。这里显示的是失败,不是"暂无可用项"。`,
2538
2539
  onRetry: () => y(n.app_code)
2539
2540
  }
2540
- ) : X("可用工具", /* @__PURE__ */ e.jsx(ToolOutlined, {}), f, d, "tool", (E) => /* @__PURE__ */ e.jsxs("div", { onClick: () => O("tool", E.toolCode), style: {
2541
+ ) : X("可用工具", /* @__PURE__ */ e.jsx(jl, {}), f, d, "tool", (E) => /* @__PURE__ */ e.jsxs("div", { onClick: () => O("tool", E.toolCode), style: {
2541
2542
  padding: "10px 14px",
2542
2543
  background: _(d, E.toolCode) ? "#e6f7ff" : "#fff",
2543
2544
  border: `1px solid ${_(d, E.toolCode) ? "#91d5ff" : "#f0f0f0"}`,
@@ -2574,7 +2575,7 @@ const { TextArea: ca } = Q, { Option: tt } = J, { TabPane: ds } = be, { Text: Te
2574
2575
  type: "warning",
2575
2576
  showIcon: !0,
2576
2577
  title: "本 JVM 未装配 z-llm 技能目录",
2577
- description: ya
2578
+ description: fa
2578
2579
  }
2579
2580
  ),
2580
2581
  g.length > 0 && /* @__PURE__ */ e.jsxs("div", { style: { marginTop: 12, fontSize: 12, color: "#8c8c8c" }, children: [
@@ -2589,7 +2590,7 @@ const { TextArea: ca } = Q, { Option: tt } = J, { TabPane: ds } = be, { Text: Te
2589
2590
  type: "warning",
2590
2591
  showIcon: !0,
2591
2592
  title: "本 JVM 未装配 z-llm 知识库目录",
2592
- description: fa
2593
+ description: ja
2593
2594
  }
2594
2595
  ),
2595
2596
  i.length > 0 && /* @__PURE__ */ e.jsxs("div", { style: { marginTop: 12, fontSize: 12, color: "#8c8c8c" }, children: [
@@ -2603,7 +2604,7 @@ const { TextArea: ca } = Q, { Option: tt } = J, { TabPane: ds } = be, { Text: Te
2603
2604
  /* @__PURE__ */ e.jsx("div", { style: { marginTop: 16, color: "#8c8c8c" }, children: "请从左侧选择一个应用" })
2604
2605
  ] }) })
2605
2606
  ] }) });
2606
- }, { Text: Et } = Fe, { TabPane: Vt } = be, Ca = () => {
2607
+ }, { Text: Et } = Fe, { TabPane: Vt } = be, va = () => {
2607
2608
  const [t, s] = l(null), [n, a] = l([]), [f, r] = l([]), [d, h] = l([]), [g, o] = l([]), [i, c] = l(!1), [N, B] = l(null), [M, x] = l([]), [T, v] = l(7), [m, u] = l([]);
2608
2609
  se(() => {
2609
2610
  me.appPage({ id: 1 }).then((y) => {
@@ -2798,7 +2799,7 @@ const { TextArea: ca } = Q, { Option: tt } = J, { TabPane: ds } = be, { Text: Te
2798
2799
  }
2799
2800
  ),
2800
2801
  m.length > 0 && /* @__PURE__ */ e.jsx(
2801
- Lt,
2802
+ Bt,
2802
2803
  {
2803
2804
  error: m[0].reason,
2804
2805
  title: `${m.length} 个统计接口失败,下面的数字不能当读数用`,
@@ -3034,7 +3035,7 @@ const { TextArea: ca } = Q, { Option: tt } = J, { TabPane: ds } = be, { Text: Te
3034
3035
  ) }, "byUser")
3035
3036
  ] })
3036
3037
  ] });
3037
- }, { TextArea: va } = Q, Sa = ({ children: t, className: s }) => {
3038
+ }, { TextArea: Sa } = Q, ka = ({ children: t, className: s }) => {
3038
3039
  const n = String(t).replace(/\n$/, ""), [a, f] = l(!1), r = () => {
3039
3040
  navigator.clipboard.writeText(n).then(() => {
3040
3041
  f(!0), setTimeout(() => f(!1), 2e3);
@@ -3062,7 +3063,7 @@ const { TextArea: ca } = Q, { Option: tt } = J, { TabPane: ds } = be, { Text: Te
3062
3063
  fontFamily: 'Consolas, Monaco, "Courier New", monospace'
3063
3064
  }, children: /* @__PURE__ */ e.jsx("code", { className: s, children: n }) })
3064
3065
  ] });
3065
- }, ka = ({ msg: t }) => {
3066
+ }, wa = ({ msg: t }) => {
3066
3067
  const s = t.role === "user", n = t.status === "FAILED";
3067
3068
  return /* @__PURE__ */ e.jsxs("div", { style: {
3068
3069
  display: "flex",
@@ -3105,7 +3106,7 @@ const { TextArea: ca } = Q, { Option: tt } = J, { TabPane: ds } = be, { Text: Te
3105
3106
  }, children: /* @__PURE__ */ e.jsx(
3106
3107
  qn,
3107
3108
  {
3108
- remarkPlugins: [la],
3109
+ remarkPlugins: [aa],
3109
3110
  components: {
3110
3111
  code({ node: a, inline: f, className: r, children: d, ...h }) {
3111
3112
  return f ? /* @__PURE__ */ e.jsx("code", { style: {
@@ -3115,7 +3116,7 @@ const { TextArea: ca } = Q, { Option: tt } = J, { TabPane: ds } = be, { Text: Te
3115
3116
  fontFamily: "monospace",
3116
3117
  fontSize: "0.9em",
3117
3118
  color: "#c7254e"
3118
- }, ...h, children: d }) : /* @__PURE__ */ e.jsx(Sa, { className: r, children: d });
3119
+ }, ...h, children: d }) : /* @__PURE__ */ e.jsx(ka, { className: r, children: d });
3119
3120
  },
3120
3121
  p({ children: a }) {
3121
3122
  return /* @__PURE__ */ e.jsx("p", { style: { margin: "0 0 8px 0" }, children: a });
@@ -3168,7 +3169,7 @@ const { TextArea: ca } = Q, { Option: tt } = J, { TabPane: ds } = be, { Text: Te
3168
3169
  }
3169
3170
  )
3170
3171
  ] });
3171
- }, wa = ({ appName: t, appDesc: s }) => /* @__PURE__ */ e.jsxs("div", { style: {
3172
+ }, Ta = ({ appName: t, appDesc: s }) => /* @__PURE__ */ e.jsxs("div", { style: {
3172
3173
  display: "flex",
3173
3174
  flexDirection: "column",
3174
3175
  alignItems: "center",
@@ -3203,7 +3204,7 @@ const { TextArea: ca } = Q, { Option: tt } = J, { TabPane: ds } = be, { Text: Te
3203
3204
  },
3204
3205
  a
3205
3206
  )) })
3206
- ] }), Ta = () => {
3207
+ ] }), Ia = () => {
3207
3208
  const { shareCode: t } = Vn(), [s, n] = l(!0), [a, f] = l(""), [r, d] = l(""), [h, g] = l(""), [o, i] = l([]), [c, N] = l(""), [B, M] = l(!1), [x, T] = l(!1), [v, m] = l(""), [u, L] = l(!1), P = Be(null), b = Be(null);
3208
3209
  Be(null), se(() => {
3209
3210
  S();
@@ -3352,11 +3353,11 @@ const { TextArea: ca } = Q, { Option: tt } = J, { TabPane: ds } = be, { Text: Te
3352
3353
  ] })
3353
3354
  ] }),
3354
3355
  /* @__PURE__ */ e.jsxs("div", { style: { flex: 1, overflowY: "auto", padding: "16px 24px" }, children: [
3355
- o.length === 0 ? /* @__PURE__ */ e.jsx(wa, { appName: r, appDesc: h }) : /* @__PURE__ */ e.jsx(e.Fragment, { children: /* @__PURE__ */ e.jsx(
3356
+ o.length === 0 ? /* @__PURE__ */ e.jsx(Ta, { appName: r, appDesc: h }) : /* @__PURE__ */ e.jsx(e.Fragment, { children: /* @__PURE__ */ e.jsx(
3356
3357
  Jt,
3357
3358
  {
3358
3359
  dataSource: o,
3359
- renderItem: (_) => /* @__PURE__ */ e.jsx(ka, { msg: _ }),
3360
+ renderItem: (_) => /* @__PURE__ */ e.jsx(wa, { msg: _ }),
3360
3361
  locale: { emptyText: "" }
3361
3362
  }
3362
3363
  ) }),
@@ -3371,7 +3372,7 @@ const { TextArea: ca } = Q, { Option: tt } = J, { TabPane: ds } = be, { Text: Te
3371
3372
  }, children: [
3372
3373
  /* @__PURE__ */ e.jsxs("div", { style: { display: "flex", gap: 12, alignItems: "flex-end" }, children: [
3373
3374
  /* @__PURE__ */ e.jsx(
3374
- va,
3375
+ Sa,
3375
3376
  {
3376
3377
  ref: b,
3377
3378
  value: c,
@@ -3401,7 +3402,7 @@ const { TextArea: ca } = Q, { Option: tt } = J, { TabPane: ds } = be, { Text: Te
3401
3402
  @keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
3402
3403
  ` })
3403
3404
  ] });
3404
- }, { Text: on } = Fe, dn = (t) => t ? Number(t).toFixed(4) : "0.0000", Ia = ({ open: t, ak: s, onClose: n }) => {
3405
+ }, { Text: on } = Fe, dn = (t) => t ? Number(t).toFixed(4) : "0.0000", za = ({ open: t, ak: s, onClose: n }) => {
3405
3406
  const [a, f] = l(null), [r, d] = l([]), [h, g] = l([]), [o, i] = l(!1);
3406
3407
  se(() => {
3407
3408
  !t || !s || c();
@@ -3547,7 +3548,7 @@ const { TextArea: ca } = Q, { Option: tt } = J, { TabPane: ds } = be, { Text: Te
3547
3548
  ] })
3548
3549
  }
3549
3550
  );
3550
- }, { confirm: za } = xe, cn = "http://localhost:8888", pn = (t) => t ? t >= 1e6 ? (t / 1e6).toFixed(1) + "M" : t >= 1e3 ? (t / 1e3).toFixed(1) + "K" : Number(t).toLocaleString() : "0", Aa = () => {
3551
+ }, { confirm: Aa } = xe, cn = "http://localhost:8888", pn = (t) => t ? t >= 1e6 ? (t / 1e6).toFixed(1) + "M" : t >= 1e3 ? (t / 1e3).toFixed(1) + "K" : Number(t).toLocaleString() : "0", Pa = () => {
3551
3552
  const [t, s] = l("PERSONAL"), [n, a] = l([]), [f, r] = l(!1), [d, h] = l(!1), [g, o] = l(null), [i] = w.useForm(), [c, N] = l(null), [B, M] = l(null), [x, T] = l([]), v = async () => {
3552
3553
  r(!0);
3553
3554
  try {
@@ -3584,7 +3585,7 @@ const { TextArea: ca } = Q, { Option: tt } = J, { TabPane: ds } = be, { Text: Te
3584
3585
  appName: O.appName
3585
3586
  }), h(!0);
3586
3587
  }, P = (O) => {
3587
- za({
3588
+ Aa({
3588
3589
  title: "确认删除",
3589
3590
  content: `删除 AK「${O.akName}」?此操作不可恢复。`,
3590
3591
  okText: "删除",
@@ -3620,7 +3621,7 @@ const { TextArea: ca } = Q, { Option: tt } = J, { TabPane: ds } = be, { Text: Te
3620
3621
  key: "akName",
3621
3622
  width: 160,
3622
3623
  render: (O, V) => /* @__PURE__ */ e.jsxs(ee, { children: [
3623
- /* @__PURE__ */ e.jsx(Bt, { style: { color: "#1677ff" } }),
3624
+ /* @__PURE__ */ e.jsx(Lt, { style: { color: "#1677ff" } }),
3624
3625
  /* @__PURE__ */ e.jsx("span", { style: { fontWeight: 500 }, children: O }),
3625
3626
  V.akType === "APP" && V.appName && /* @__PURE__ */ e.jsx(F, { color: "purple", style: { borderRadius: 10, fontSize: 11 }, children: V.appName })
3626
3627
  ] })
@@ -3695,7 +3696,7 @@ const { TextArea: ca } = Q, { Option: tt } = J, { TabPane: ds } = be, { Text: Te
3695
3696
  onClick: () => b(V)
3696
3697
  }
3697
3698
  ) }),
3698
- /* @__PURE__ */ e.jsx(ne, { title: "编辑", children: /* @__PURE__ */ e.jsx(j, { size: "small", type: "text", icon: /* @__PURE__ */ e.jsx(Bt, {}), onClick: () => L(V) }) }),
3699
+ /* @__PURE__ */ e.jsx(ne, { title: "编辑", children: /* @__PURE__ */ e.jsx(j, { size: "small", type: "text", icon: /* @__PURE__ */ e.jsx(Lt, {}), onClick: () => L(V) }) }),
3699
3700
  /* @__PURE__ */ e.jsx(ne, { title: "删除", children: /* @__PURE__ */ e.jsx(
3700
3701
  j,
3701
3702
  {
@@ -3751,7 +3752,7 @@ const { TextArea: ca } = Q, { Option: tt } = J, { TabPane: ds } = be, { Text: Te
3751
3752
  {
3752
3753
  title: "AK 总数",
3753
3754
  value: n.length,
3754
- prefix: /* @__PURE__ */ e.jsx(Bt, {}),
3755
+ prefix: /* @__PURE__ */ e.jsx(Lt, {}),
3755
3756
  styles: { content: { fontSize: 18 } }
3756
3757
  }
3757
3758
  ) }) }),
@@ -3957,7 +3958,7 @@ const { TextArea: ca } = Q, { Option: tt } = J, { TabPane: ds } = be, { Text: Te
3957
3958
  }
3958
3959
  ),
3959
3960
  /* @__PURE__ */ e.jsx(
3960
- Ia,
3961
+ za,
3961
3962
  {
3962
3963
  open: !!B,
3963
3964
  ak: B,
@@ -3965,7 +3966,7 @@ const { TextArea: ca } = Q, { Option: tt } = J, { TabPane: ds } = be, { Text: Te
3965
3966
  }
3966
3967
  )
3967
3968
  ] });
3968
- }, { confirm: Pa } = xe, xs = [
3969
+ }, { confirm: Ra } = xe, xs = [
3969
3970
  {
3970
3971
  providerCode: "ollama",
3971
3972
  providerName: "Ollama",
@@ -4100,11 +4101,11 @@ const { TextArea: ca } = Q, { Option: tt } = J, { TabPane: ds } = be, { Text: Te
4100
4101
  outputPrice: 0
4101
4102
  }
4102
4103
  ], xt = [
4103
- { key: "chat", title: "文本生成", icon: /* @__PURE__ */ e.jsx(jl, {}), color: "#1677ff", bg: "#e6f4ff", border: "#1677ff" },
4104
+ { key: "chat", title: "文本生成", icon: /* @__PURE__ */ e.jsx(bl, {}), color: "#1677ff", bg: "#e6f4ff", border: "#1677ff" },
4104
4105
  { key: "code", title: "代码生成", icon: /* @__PURE__ */ e.jsx(lt, {}), color: "#722ed1", bg: "#f9f0ff", border: "#722ed1" },
4105
- { key: "image", title: "图像生成", icon: /* @__PURE__ */ e.jsx(bl, {}), color: "#13c2c2", bg: "#e6fffb", border: "#13c2c2" },
4106
+ { key: "image", title: "图像生成", icon: /* @__PURE__ */ e.jsx(Cl, {}), color: "#13c2c2", bg: "#e6fffb", border: "#13c2c2" },
4106
4107
  { key: "vision", title: "视觉理解", icon: /* @__PURE__ */ e.jsx(Ze, {}), color: "#fa8c16", bg: "#fff7e6", border: "#fa8c16" },
4107
- { key: "audio", title: "语音", icon: /* @__PURE__ */ e.jsx(Cl, {}), color: "#eb2f96", bg: "#fff0f6", border: "#eb2f96" },
4108
+ { key: "audio", title: "语音", icon: /* @__PURE__ */ e.jsx(vl, {}), color: "#eb2f96", bg: "#fff0f6", border: "#eb2f96" },
4108
4109
  {
4109
4110
  key: "embedding",
4110
4111
  title: "嵌入/向量",
@@ -4113,14 +4114,14 @@ const { TextArea: ca } = Q, { Option: tt } = J, { TabPane: ds } = be, { Text: Te
4113
4114
  bg: "#f6ffed",
4114
4115
  border: "#52c41a"
4115
4116
  }
4116
- ], Ra = [
4117
+ ], Oa = [
4117
4118
  { value: "ollama", label: "Ollama" },
4118
4119
  { value: "openai", label: "OpenAI" },
4119
4120
  { value: "dashscope", label: "阿里通义" },
4120
4121
  { value: "azure", label: "Azure OpenAI" },
4121
4122
  { value: "anthropic", label: "Anthropic" },
4122
4123
  { value: "custom", label: "自定义" }
4123
- ], Oa = () => {
4124
+ ], Na = () => {
4124
4125
  const [t, s] = l([]), [n, a] = l([]), [f, r] = l(!1), [d, h] = l("chat"), [g, o] = l(null), [i, c] = l(!1), [N, B] = l(null), [M] = w.useForm(), [x, T] = l(!1), [v, m] = l(null), [u] = w.useForm(), L = async () => {
4125
4126
  r(!0);
4126
4127
  try {
@@ -4157,7 +4158,7 @@ const { TextArea: ca } = Q, { Option: tt } = J, { TabPane: ds } = be, { Text: Te
4157
4158
  }, R = (C) => {
4158
4159
  B(C), M.setFieldsValue(C), c(!0);
4159
4160
  }, y = (C) => {
4160
- Pa({
4161
+ Ra({
4161
4162
  title: "确认删除",
4162
4163
  content: `删除模型 ${C.modelName} ?`,
4163
4164
  onOk: async () => {
@@ -4503,7 +4504,7 @@ const { TextArea: ca } = Q, { Option: tt } = J, { TabPane: ds } = be, { Text: Te
4503
4504
  /* @__PURE__ */ e.jsx($, { span: 12, children: /* @__PURE__ */ e.jsx(w.Item, { name: "providerName", label: "供应商名称", rules: [{ required: !0 }], children: /* @__PURE__ */ e.jsx(Q, { placeholder: "如: Ollama, OpenAI" }) }) })
4504
4505
  ] }),
4505
4506
  /* @__PURE__ */ e.jsxs(re, { gutter: 16, children: [
4506
- /* @__PURE__ */ e.jsx($, { span: 12, children: /* @__PURE__ */ e.jsx(w.Item, { name: "providerType", label: "类型", rules: [{ required: !0 }], children: /* @__PURE__ */ e.jsx(J, { placeholder: "选择类型", children: Ra.map((C) => /* @__PURE__ */ e.jsx(J.Option, { value: C.value, children: C.label }, C.value)) }) }) }),
4507
+ /* @__PURE__ */ e.jsx($, { span: 12, children: /* @__PURE__ */ e.jsx(w.Item, { name: "providerType", label: "类型", rules: [{ required: !0 }], children: /* @__PURE__ */ e.jsx(J, { placeholder: "选择类型", children: Oa.map((C) => /* @__PURE__ */ e.jsx(J.Option, { value: C.value, children: C.label }, C.value)) }) }) }),
4507
4508
  /* @__PURE__ */ e.jsx($, { span: 12, children: /* @__PURE__ */ e.jsx(w.Item, { name: "status", label: "状态", initialValue: "ACTIVE", children: /* @__PURE__ */ e.jsxs(J, { children: [
4508
4509
  /* @__PURE__ */ e.jsx(J.Option, { value: "ACTIVE", children: "正常" }),
4509
4510
  /* @__PURE__ */ e.jsx(J.Option, { value: "INACTIVE", children: "禁用" })
@@ -4533,7 +4534,7 @@ const { TextArea: ca } = Q, { Option: tt } = J, { TabPane: ds } = be, { Text: Te
4533
4534
  }
4534
4535
  )
4535
4536
  ] });
4536
- }, { confirm: Na } = xe, Ea = () => {
4537
+ }, { confirm: Ea } = xe, _a = () => {
4537
4538
  const [t, s] = l([]), [n, a] = l([]), [f, r] = l(!1), [d, h] = l(!1), [g, o] = l(null), [i] = w.useForm(), c = async () => {
4538
4539
  r(!0);
4539
4540
  try {
@@ -4559,7 +4560,7 @@ const { TextArea: ca } = Q, { Option: tt } = J, { TabPane: ds } = be, { Text: Te
4559
4560
  }, M = (m) => {
4560
4561
  o(m), i.setFieldsValue(m), h(!0);
4561
4562
  }, x = async (m) => {
4562
- Na({
4563
+ Ea({
4563
4564
  title: "确认删除",
4564
4565
  content: `删除模型 ${m.modelName} ?`,
4565
4566
  onOk: async () => {
@@ -4664,7 +4665,7 @@ const { TextArea: ca } = Q, { Option: tt } = J, { TabPane: ds } = be, { Text: Te
4664
4665
  }
4665
4666
  )
4666
4667
  ] });
4667
- }, { confirm: _a } = xe, La = () => {
4668
+ }, { confirm: La } = xe, Ba = () => {
4668
4669
  const [t, s] = l([]), [n, a] = l(!1), [f, r] = l(!1), [d, h] = l(null), [g] = w.useForm(), o = async () => {
4669
4670
  a(!0);
4670
4671
  try {
@@ -4684,7 +4685,7 @@ const { TextArea: ca } = Q, { Option: tt } = J, { TabPane: ds } = be, { Text: Te
4684
4685
  }, c = (T) => {
4685
4686
  h(T), g.setFieldsValue(T), r(!0);
4686
4687
  }, N = async (T) => {
4687
- _a({
4688
+ La({
4688
4689
  title: "确认删除",
4689
4690
  content: `删除供应商 ${T.providerName} ?`,
4690
4691
  onOk: async () => {
@@ -4793,8 +4794,8 @@ const { TextArea: ca } = Q, { Option: tt } = J, { TabPane: ds } = be, { Text: Te
4793
4794
  }
4794
4795
  )
4795
4796
  ] });
4796
- }, { TextArea: Ba } = Q, { Text: ht } = Fe;
4797
- function Da() {
4797
+ }, { TextArea: Da } = Q, { Text: ht } = Fe;
4798
+ function Fa() {
4798
4799
  const [t, s] = l("servers"), [n, a] = l([]), [f, r] = l(!1), [d, h] = l(null), [g, o] = l([]), [i, c] = l(null), [N, B] = l("{}"), [M, x] = l(""), [T, v] = l(!1);
4799
4800
  se(() => {
4800
4801
  m();
@@ -4988,7 +4989,7 @@ function Da() {
4988
4989
  ] }),
4989
4990
  /* @__PURE__ */ e.jsx(ht, { type: "secondary", style: { marginBottom: 4 }, children: "参数 (JSON):" }),
4990
4991
  /* @__PURE__ */ e.jsx(
4991
- Ba,
4992
+ Da,
4992
4993
  {
4993
4994
  rows: 8,
4994
4995
  value: N,
@@ -5032,12 +5033,12 @@ const xn = (t) => {
5032
5033
  for (; a >= 1024 && n < s.length - 1; )
5033
5034
  a /= 1024, n++;
5034
5035
  return a.toFixed(n === 0 ? 0 : 1) + " " + s[n];
5035
- }, Fa = (t) => {
5036
+ }, Ma = (t) => {
5036
5037
  var n;
5037
5038
  if (t.endsWith("/")) return /* @__PURE__ */ e.jsx(dt, { style: { color: "#faad14" } });
5038
5039
  const s = (n = t.split(".").pop()) == null ? void 0 : n.toLowerCase();
5039
5040
  return ["zip", "tar", "gz", "rar", "7z"].includes(s) ? /* @__PURE__ */ e.jsx(Dn, { style: { color: "#722ed1" } }) : ["png", "jpg", "jpeg", "gif", "svg", "webp"].includes(s) ? /* @__PURE__ */ e.jsx(
5040
- Sl,
5041
+ kl,
5041
5042
  {
5042
5043
  style: { color: "#13c2c2" }
5043
5044
  }
@@ -5046,9 +5047,9 @@ const xn = (t) => {
5046
5047
  {
5047
5048
  style: { color: "#52c41a" }
5048
5049
  }
5049
- ) : /* @__PURE__ */ e.jsx(kl, { style: { color: "#8c8c8c" } });
5050
+ ) : /* @__PURE__ */ e.jsx(wl, { style: { color: "#8c8c8c" } });
5050
5051
  };
5051
- function Ma() {
5052
+ function Ka() {
5052
5053
  const { bucketName: t } = Vn(), s = decodeURIComponent(t || ""), n = ns(), [a, f] = l([]), [r, d] = l(!1), [h, g] = l(""), [o, i] = l({ objectCount: 0, totalSize: 0 }), [c, N] = l(""), [B, M] = l([]), [x, T] = l(!1), [v, m] = l(!1), [u] = w.useForm();
5053
5054
  Be(null);
5054
5055
  const L = we(async (I = h) => {
@@ -5147,7 +5148,7 @@ function Ma() {
5147
5148
  style: { cursor: z ? "pointer" : "default", color: z ? "#faad14" : "#262626" },
5148
5149
  onClick: () => z && b(I),
5149
5150
  children: /* @__PURE__ */ e.jsxs(ee, { children: [
5150
- Fa(I),
5151
+ Ma(I),
5151
5152
  /* @__PURE__ */ e.jsx("span", { style: { fontWeight: z ? 500 : 400 }, children: q })
5152
5153
  ] })
5153
5154
  }
@@ -5267,7 +5268,7 @@ function Ma() {
5267
5268
  ] })
5268
5269
  }
5269
5270
  ),
5270
- /* @__PURE__ */ e.jsx(j, { size: "small", icon: /* @__PURE__ */ e.jsx(vl, {}), onClick: () => m(!0), children: "新建文件夹" }),
5271
+ /* @__PURE__ */ e.jsx(j, { size: "small", icon: /* @__PURE__ */ e.jsx(Sl, {}), onClick: () => m(!0), children: "新建文件夹" }),
5271
5272
  /* @__PURE__ */ e.jsx(Cs, { beforeUpload: K, showUploadList: !1, disabled: x, children: /* @__PURE__ */ e.jsx(j, { size: "small", type: "primary", icon: /* @__PURE__ */ e.jsx(Ln, {}), loading: x, children: "上传文件" }) })
5272
5273
  ] }),
5273
5274
  /* @__PURE__ */ e.jsx(W, { styles: { body: { padding: 0 } }, children: r ? /* @__PURE__ */ e.jsx("div", { style: { textAlign: "center", padding: 60 }, children: /* @__PURE__ */ e.jsx(He, { size: "large" }) }) : V.length === 0 ? /* @__PURE__ */ e.jsx(
@@ -5336,7 +5337,7 @@ const Ct = {
5336
5337
  private: { label: "私有", color: "default", icon: /* @__PURE__ */ e.jsx(Pt, {}) },
5337
5338
  "public-read": { label: "公共读", color: "blue", icon: /* @__PURE__ */ e.jsx(Ze, {}) },
5338
5339
  "public-read-write": { label: "公共读写", color: "orange", icon: /* @__PURE__ */ e.jsx(yt, {}) },
5339
- "authenticated-read": { label: "认证读", color: "purple", icon: /* @__PURE__ */ e.jsx(wl, {}) }
5340
+ "authenticated-read": { label: "认证读", color: "purple", icon: /* @__PURE__ */ e.jsx(Tl, {}) }
5340
5341
  };
5341
5342
  function hn() {
5342
5343
  const [t, s] = l([]), [n, a] = l(!1), [f, r] = l(!1), [d] = w.useForm(), [h, g] = l(!1), o = ns(), i = we(async () => {
@@ -5608,7 +5609,7 @@ function hn() {
5608
5609
  )
5609
5610
  ] });
5610
5611
  }
5611
- const { TextArea: Jn } = Q, { Option: st } = J, { TabPane: un } = be, Ka = () => {
5612
+ const { TextArea: Jn } = Q, { Option: st } = J, { TabPane: un } = be, Ua = () => {
5612
5613
  const [t, s] = l("list");
5613
5614
  return /* @__PURE__ */ e.jsxs("div", { children: [
5614
5615
  /* @__PURE__ */ e.jsx(
@@ -5622,14 +5623,14 @@ const { TextArea: Jn } = Q, { Option: st } = J, { TabPane: un } = be, Ka = () =>
5622
5623
  /* @__PURE__ */ e.jsx(un, { tab: /* @__PURE__ */ e.jsxs("span", { children: [
5623
5624
  /* @__PURE__ */ e.jsx(Zt, {}),
5624
5625
  " 产品管理"
5625
- ] }), children: /* @__PURE__ */ e.jsx(Ua, {}) }, "list"),
5626
+ ] }), children: /* @__PURE__ */ e.jsx(Wa, {}) }, "list"),
5626
5627
  /* @__PURE__ */ e.jsx(un, { tab: /* @__PURE__ */ e.jsxs("span", { children: [
5627
5628
  /* @__PURE__ */ e.jsx(ot, {}),
5628
5629
  " 产品配置"
5629
- ] }), children: /* @__PURE__ */ e.jsx(Wa, {}) }, "config")
5630
+ ] }), children: /* @__PURE__ */ e.jsx($a, {}) }, "config")
5630
5631
  ] }) })
5631
5632
  ] });
5632
- }, Ua = () => {
5633
+ }, Wa = () => {
5633
5634
  const [t, s] = l([]), [n, a] = l(!1), [f, r] = l(""), [d, h] = l(""), [g, o] = l(1), [i] = l(12), [c, N] = l(0), [B, M] = l(!1), [x] = w.useForm(), [T, v] = l(null), [m, u] = l(!1), [L, P] = l(!1), [b, S] = l(null);
5634
5635
  se(() => {
5635
5636
  K();
@@ -5727,7 +5728,7 @@ const { TextArea: Jn } = Q, { Option: st } = J, { TabPane: un } = be, Ka = () =>
5727
5728
  title: "分类",
5728
5729
  dataIndex: "category",
5729
5730
  width: 120,
5730
- render: (z) => z ? /* @__PURE__ */ e.jsx(F, { icon: /* @__PURE__ */ e.jsx(Il, {}), children: z }) : /* @__PURE__ */ e.jsx("span", { style: { color: "#ccc" }, children: "未分类" })
5731
+ render: (z) => z ? /* @__PURE__ */ e.jsx(F, { icon: /* @__PURE__ */ e.jsx(zl, {}), children: z }) : /* @__PURE__ */ e.jsx("span", { style: { color: "#ccc" }, children: "未分类" })
5731
5732
  },
5732
5733
  {
5733
5734
  title: "状态",
@@ -5969,7 +5970,7 @@ const { TextArea: Jn } = Q, { Option: st } = J, { TabPane: un } = be, Ka = () =>
5969
5970
  }
5970
5971
  )
5971
5972
  ] });
5972
- }, Wa = () => {
5973
+ }, $a = () => {
5973
5974
  const [t, s] = l([]), [n, a] = l(null), [f, r] = l({ scenes: [], params: [] }), [d, h] = l(!1), [g, o] = l(!1), [i, c] = l(!1), [N] = w.useForm();
5974
5975
  se(() => {
5975
5976
  qe.page({ id: 1, pageSize: 100 }).then((m) => {
@@ -6094,7 +6095,7 @@ const { TextArea: Jn } = Q, { Option: st } = J, { TabPane: un } = be, Ka = () =>
6094
6095
  background: "#fafafa",
6095
6096
  borderRadius: 8
6096
6097
  }, children: [
6097
- /* @__PURE__ */ e.jsx(Tl, { style: { marginRight: 6 } }),
6098
+ /* @__PURE__ */ e.jsx(Il, { style: { marginRight: 6 } }),
6098
6099
  "暂无关联场景"
6099
6100
  ] }) : /* @__PURE__ */ e.jsx("div", { style: { display: "flex", flexDirection: "column", gap: 8 }, children: (f.scenes || []).map((m, u) => /* @__PURE__ */ e.jsx(
6100
6101
  W,
@@ -6151,23 +6152,23 @@ const { TextArea: Jn } = Q, { Option: st } = J, { TabPane: un } = be, Ka = () =>
6151
6152
  }
6152
6153
  )
6153
6154
  ] });
6154
- }, { TextArea: Qn } = Q, { Option: ke } = J, { TabPane: hs } = be, $a = () => {
6155
+ }, { TextArea: Qn } = Q, { Option: ke } = J, { TabPane: hs } = be, Va = () => {
6155
6156
  const [t, s] = l("list");
6156
6157
  return /* @__PURE__ */ e.jsx(W, { style: { minHeight: "calc(100vh - 140px)" }, children: /* @__PURE__ */ e.jsxs(be, { activeKey: t, onChange: s, children: [
6157
6158
  /* @__PURE__ */ e.jsx(hs, { tab: /* @__PURE__ */ e.jsxs("span", { children: [
6158
6159
  /* @__PURE__ */ e.jsx(nt, {}),
6159
6160
  " 场景管理"
6160
- ] }), children: /* @__PURE__ */ e.jsx(Va, {}) }, "list"),
6161
+ ] }), children: /* @__PURE__ */ e.jsx(qa, {}) }, "list"),
6161
6162
  /* @__PURE__ */ e.jsx(hs, { tab: /* @__PURE__ */ e.jsxs("span", { children: [
6162
6163
  /* @__PURE__ */ e.jsx(Es, {}),
6163
6164
  " 节点配置"
6164
- ] }), children: /* @__PURE__ */ e.jsx(qa, {}) }, "nodes"),
6165
+ ] }), children: /* @__PURE__ */ e.jsx(Ha, {}) }, "nodes"),
6165
6166
  /* @__PURE__ */ e.jsx(hs, { tab: /* @__PURE__ */ e.jsxs("span", { children: [
6166
6167
  /* @__PURE__ */ e.jsx(jt, {}),
6167
6168
  " 场景编排"
6168
- ] }), children: /* @__PURE__ */ e.jsx(Ha, {}) }, "canvas")
6169
+ ] }), children: /* @__PURE__ */ e.jsx(Ga, {}) }, "canvas")
6169
6170
  ] }) });
6170
- }, Va = () => {
6171
+ }, qa = () => {
6171
6172
  const [t, s] = l([]), [n, a] = l(!1), [f, r] = l(""), [d, h] = l(""), [g, o] = l(1), [i] = l(12), [c, N] = l(0), [B, M] = l(!1), [x] = w.useForm(), [T, v] = l(null), [m, u] = l(!1), [L, P] = l(!1), [b, S] = l(null), [K, R] = l([]);
6172
6173
  se(() => {
6173
6174
  qe.page({ id: 1, pageSize: 100 }).then((D) => {
@@ -6532,7 +6533,7 @@ const { TextArea: Jn } = Q, { Option: st } = J, { TabPane: un } = be, Ka = () =>
6532
6533
  }
6533
6534
  )
6534
6535
  ] });
6535
- }, qa = () => {
6536
+ }, Ha = () => {
6536
6537
  const [t, s] = l([]), [n, a] = l(null), [f, r] = l([]), [d, h] = l(!1), [g, o] = l(!1), [i] = w.useForm();
6537
6538
  se(() => {
6538
6539
  Ae.page({ id: 1, pageSize: 100 }).then((v) => {
@@ -6680,7 +6681,7 @@ const { TextArea: Jn } = Q, { Option: st } = J, { TabPane: un } = be, Ka = () =>
6680
6681
  }
6681
6682
  )
6682
6683
  ] });
6683
- }, Ha = () => {
6684
+ }, Ga = () => {
6684
6685
  const [t, s] = l([]), [n, a] = l(null), [f, r] = l([]), [d, h] = l([]);
6685
6686
  se(() => {
6686
6687
  Ae.page({ id: 1, pageSize: 100 }).then((i) => {
@@ -6807,7 +6808,7 @@ const { TextArea: Jn } = Q, { Option: st } = J, { TabPane: un } = be, Ka = () =>
6807
6808
  }
6808
6809
  )
6809
6810
  ] });
6810
- }, { TextArea: Ga } = Q, { Text: _t, Title: Ja } = Fe, { Option: gn } = J, Qa = () => {
6811
+ }, { TextArea: Ja } = Q, { Text: _t, Title: Qa } = Fe, { Option: gn } = J, Ya = () => {
6811
6812
  var Xe, Ke, Re;
6812
6813
  const t = new URLSearchParams(window.location.search), s = t.get("productCode") || "", n = t.get("sceneCode") || "", [a, f] = l(s), [r, d] = l(n), [h, g] = l([]), [o, i] = l([]), [c, N] = l([]), [B, M] = l(""), [x, T] = l(!1), [v, m] = l(!1), [u, L] = l(""), [P, b] = l(!1), [S, K] = l([]), [R, y] = l(!1), [_] = w.useForm(), [O, V] = l({ temperature: 0.7, maxTokens: 2048, topP: 1 }), [X, C] = l(null), I = Be(null), E = Be(null), z = Be(null);
6813
6814
  se(() => {
@@ -7016,7 +7017,7 @@ const { TextArea: Jn } = Q, { Option: st } = J, { TabPane: un } = be, Ka = () =>
7016
7017
  }
7017
7018
  }
7018
7019
  ),
7019
- /* @__PURE__ */ e.jsx(Ja, { level: 5, style: { marginTop: 12, marginBottom: 4 }, children: ((Ke = o.find((G) => G.sceneCode === r)) == null ? void 0 : Ke.sceneName) || "场景助手" }),
7020
+ /* @__PURE__ */ e.jsx(Qa, { level: 5, style: { marginTop: 12, marginBottom: 4 }, children: ((Ke = o.find((G) => G.sceneCode === r)) == null ? void 0 : Ke.sceneName) || "场景助手" }),
7020
7021
  /* @__PURE__ */ e.jsx(_t, { type: "secondary", children: (X == null ? void 0 : X.description) || ((Re = o.find((G) => G.sceneCode === r)) == null ? void 0 : Re.description) || "开始对话吧!" })
7021
7022
  ] }),
7022
7023
  /* @__PURE__ */ e.jsxs("div", { style: { display: "flex", flexDirection: "column", gap: 16 }, children: [
@@ -7164,7 +7165,7 @@ const { TextArea: Jn } = Q, { Option: st } = J, { TabPane: un } = be, Ka = () =>
7164
7165
  alignItems: "flex-end"
7165
7166
  }, children: [
7166
7167
  /* @__PURE__ */ e.jsx(
7167
- Ga,
7168
+ Ja,
7168
7169
  {
7169
7170
  ref: z,
7170
7171
  value: B,
@@ -7180,7 +7181,7 @@ const { TextArea: Jn } = Q, { Option: st } = J, { TabPane: un } = be, Ka = () =>
7180
7181
  j,
7181
7182
  {
7182
7183
  danger: !0,
7183
- icon: /* @__PURE__ */ e.jsx(zl, {}),
7184
+ icon: /* @__PURE__ */ e.jsx(Al, {}),
7184
7185
  onClick: Y,
7185
7186
  style: { borderRadius: 20 }
7186
7187
  }
@@ -7234,7 +7235,7 @@ const { TextArea: Jn } = Q, { Option: st } = J, { TabPane: un } = be, Ka = () =>
7234
7235
  children: /* @__PURE__ */ e.jsx(
7235
7236
  Jt.Item.Meta,
7236
7237
  {
7237
- avatar: /* @__PURE__ */ e.jsx(Ye, { icon: /* @__PURE__ */ e.jsx(Ya, {}), style: { background: "#667eea" } }),
7238
+ avatar: /* @__PURE__ */ e.jsx(Ye, { icon: /* @__PURE__ */ e.jsx(Za, {}), style: { background: "#667eea" } }),
7238
7239
  title: `会话 ${ge + 1} — ${G.startTime || ""}`,
7239
7240
  description: /* @__PURE__ */ e.jsxs(
7240
7241
  _t,
@@ -7285,7 +7286,7 @@ const { TextArea: Jn } = Q, { Option: st } = J, { TabPane: un } = be, Ka = () =>
7285
7286
  }
7286
7287
  ` })
7287
7288
  ] });
7288
- }, Ya = () => /* @__PURE__ */ e.jsx(Se, {}), Za = [
7289
+ }, Za = () => /* @__PURE__ */ e.jsx(Se, {}), Xa = [
7289
7290
  { value: "string", label: "string" },
7290
7291
  { value: "number", label: "number" },
7291
7292
  { value: "boolean", label: "boolean" },
@@ -7331,7 +7332,7 @@ function Yn({ value: t = [], onChange: s, readonly: n = !1 }) {
7331
7332
  size: "small",
7332
7333
  value: g,
7333
7334
  onChange: (c) => a(i, "type", c),
7334
- options: Za,
7335
+ options: Xa,
7335
7336
  style: { width: "100%" }
7336
7337
  }
7337
7338
  )
@@ -7381,7 +7382,7 @@ function Yn({ value: t = [], onChange: s, readonly: n = !1 }) {
7381
7382
  {
7382
7383
  size: "small",
7383
7384
  type: "text",
7384
- icon: /* @__PURE__ */ e.jsx(Al, {}),
7385
+ icon: /* @__PURE__ */ e.jsx(Pl, {}),
7385
7386
  disabled: i === 0,
7386
7387
  onClick: () => r(i, -1)
7387
7388
  }
@@ -7391,7 +7392,7 @@ function Yn({ value: t = [], onChange: s, readonly: n = !1 }) {
7391
7392
  {
7392
7393
  size: "small",
7393
7394
  type: "text",
7394
- icon: /* @__PURE__ */ e.jsx(Pl, {}),
7395
+ icon: /* @__PURE__ */ e.jsx(Rl, {}),
7395
7396
  disabled: i === t.length - 1,
7396
7397
  onClick: () => r(i, 1)
7397
7398
  }
@@ -7426,8 +7427,8 @@ function Yn({ value: t = [], onChange: s, readonly: n = !1 }) {
7426
7427
  t.length === 0 && !n && /* @__PURE__ */ e.jsx("div", { style: { textAlign: "center", color: "#999", padding: 12 }, children: "暂未配置输出字段映射。发布后 MCP 工具将返回原始响应体。" })
7427
7428
  ] });
7428
7429
  }
7429
- const { TextArea: Xa } = Q, { Text: ei } = Fe, { Step: us } = Wn;
7430
- function ti({ open: t, onClose: s, onSuccess: n }) {
7430
+ const { TextArea: ei } = Q, { Text: ti } = Fe, { Step: us } = Wn;
7431
+ function si({ open: t, onClose: s, onSuccess: n }) {
7431
7432
  var y, _, O, V, X;
7432
7433
  const [a, f] = l(0), [r, d] = l(!1), [h, g] = l(!1), [o, i] = l(""), [c, N] = l(null), [B, M] = l([]), [x, T] = l(null), [v, m] = l("mapping"), u = () => {
7433
7434
  f(0), i(""), N(null), M([]), T(null), m("mapping");
@@ -7495,7 +7496,7 @@ function ti({ open: t, onClose: s, onSuccess: n }) {
7495
7496
  a === 0 && /* @__PURE__ */ e.jsxs("div", { children: [
7496
7497
  /* @__PURE__ */ e.jsx("p", { style: { color: "#666", marginBottom: 8 }, children: "粘贴任意 HTTP curl 命令,系统将自动解析并生成 API_BRIDGE 脚本" }),
7497
7498
  /* @__PURE__ */ e.jsx(
7498
- Xa,
7499
+ ei,
7499
7500
  {
7500
7501
  rows: 8,
7501
7502
  value: o,
@@ -7520,7 +7521,7 @@ function ti({ open: t, onClose: s, onSuccess: n }) {
7520
7521
  }
7521
7522
  ) }),
7522
7523
  /* @__PURE__ */ e.jsx(Ve.Item, { label: "URL", span: 2, children: /* @__PURE__ */ e.jsx(
7523
- ei,
7524
+ ti,
7524
7525
  {
7525
7526
  copyable: !0,
7526
7527
  style: { fontFamily: "monospace", fontSize: 12 },
@@ -7576,7 +7577,7 @@ function ti({ open: t, onClose: s, onSuccess: n }) {
7576
7577
  /* @__PURE__ */ e.jsx(
7577
7578
  j,
7578
7579
  {
7579
- icon: /* @__PURE__ */ e.jsx(Rl, {}),
7580
+ icon: /* @__PURE__ */ e.jsx(Ol, {}),
7580
7581
  onClick: b,
7581
7582
  loading: h,
7582
7583
  style: { marginBottom: 12 },
@@ -7654,8 +7655,8 @@ function ti({ open: t, onClose: s, onSuccess: n }) {
7654
7655
  }
7655
7656
  );
7656
7657
  }
7657
- const { TextArea: si } = Q;
7658
- function ni({ open: t, onClose: s, onSuccess: n }) {
7658
+ const { TextArea: ni } = Q;
7659
+ function li({ open: t, onClose: s, onSuccess: n }) {
7659
7660
  const [a, f] = l(""), [r, d] = l(null), [h, g] = l(null), [o, i] = l(!1), c = () => {
7660
7661
  f(""), d(null), g(null);
7661
7662
  }, N = () => {
@@ -7777,7 +7778,7 @@ function ni({ open: t, onClose: s, onSuccess: n }) {
7777
7778
  !r && !h && /* @__PURE__ */ e.jsxs("div", { children: [
7778
7779
  /* @__PURE__ */ e.jsx("p", { style: { color: "#666", marginBottom: 8 }, children: "粘贴 OpenAPI 3.0 / Swagger 2.0 规范的 JSON 内容,系统将自动为每个端点生成 API_BRIDGE 脚本。" }),
7779
7780
  /* @__PURE__ */ e.jsx(
7780
- si,
7781
+ ni,
7781
7782
  {
7782
7783
  rows: 12,
7783
7784
  value: a,
@@ -7860,7 +7861,7 @@ function ni({ open: t, onClose: s, onSuccess: n }) {
7860
7861
  }
7861
7862
  );
7862
7863
  }
7863
- const { Text: Ht, Paragraph: er } = Fe, li = [
7864
+ const { Text: Ht, Paragraph: sr } = Fe, ai = [
7864
7865
  { value: "GET", label: "GET" },
7865
7866
  { value: "POST", label: "POST" },
7866
7867
  { value: "PUT", label: "PUT" },
@@ -7868,13 +7869,13 @@ const { Text: Ht, Paragraph: er } = Fe, li = [
7868
7869
  { value: "PATCH", label: "PATCH" },
7869
7870
  { value: "HEAD", label: "HEAD" },
7870
7871
  { value: "OPTIONS", label: "OPTIONS" }
7871
- ], ai = [
7872
+ ], ii = [
7872
7873
  { value: "path", label: "path" },
7873
7874
  { value: "query", label: "query" },
7874
7875
  { value: "header", label: "header" },
7875
7876
  { value: "body", label: "body" }
7876
7877
  ];
7877
- function ii({ value: t, onChange: s, readonly: n = !1 }) {
7878
+ function ri({ value: t, onChange: s, readonly: n = !1 }) {
7878
7879
  var v, m, u, L, P;
7879
7880
  const [a, f] = l(null), [r, d] = l(null);
7880
7881
  se(() => {
@@ -7949,7 +7950,7 @@ function ii({ value: t, onChange: s, readonly: n = !1 }) {
7949
7950
  size: "small",
7950
7951
  value: b,
7951
7952
  onChange: (R) => N(K, "in", R),
7952
- options: ai,
7953
+ options: ii,
7953
7954
  style: { width: "100%" }
7954
7955
  }
7955
7956
  )
@@ -8009,7 +8010,7 @@ function ii({ value: t, onChange: s, readonly: n = !1 }) {
8009
8010
  {
8010
8011
  value: g.requestMethod || "GET",
8011
8012
  onChange: i,
8012
- options: li,
8013
+ options: ai,
8013
8014
  style: { width: 120 }
8014
8015
  }
8015
8016
  ),
@@ -8062,14 +8063,14 @@ function ii({ value: t, onChange: s, readonly: n = !1 }) {
8062
8063
  ) })
8063
8064
  ] });
8064
8065
  }
8065
- const { TextArea: gs } = Q, { Text: ms, Paragraph: mn } = Fe, ri = [
8066
+ const { TextArea: gs } = Q, { Text: ms, Paragraph: mn } = Fe, oi = [
8066
8067
  { value: "EL", label: "EL (SpEL)" },
8067
8068
  { value: "GROOVY", label: "Groovy" },
8068
8069
  { value: "LUA", label: "Lua" },
8069
8070
  { value: "SQL", label: "SQL" },
8070
8071
  { value: "MOCK", label: "Mock Template" },
8071
8072
  { value: "API_BRIDGE", label: "API Bridge" }
8072
- ], oi = [
8073
+ ], di = [
8073
8074
  { value: "NONE", label: "None" },
8074
8075
  { value: "HTTP", label: "HTTP" },
8075
8076
  { value: "MCP", label: "MCP" },
@@ -8078,13 +8079,13 @@ const { TextArea: gs } = Q, { Text: ms, Paragraph: mn } = Fe, ri = [
8078
8079
  0: { text: "Draft", color: "default" },
8079
8080
  1: { text: "Active", color: "green" },
8080
8081
  2: { text: "Disabled", color: "red" }
8081
- }, di = {
8082
+ }, ci = {
8082
8083
  NONE: "default",
8083
8084
  HTTP: "blue",
8084
8085
  MCP: "purple",
8085
8086
  BOTH: "cyan"
8086
8087
  };
8087
- function ci() {
8088
+ function pi() {
8088
8089
  const [t, s] = l([]), [n, a] = l(!1), [f, r] = l(null), [d, h] = l(!1), [g, o] = l(null), [i] = w.useForm(), [c, N] = l(!1), [B, M] = l(null), [x, T] = l("{}"), [v, m] = l(""), [u, L] = l(!1), [P, b] = l(!1), [S, K] = l(!1), [R, y] = l(null), O = w.useWatch("dslType", i) === "API_BRIDGE";
8089
8090
  se(() => {
8090
8091
  V();
@@ -8183,7 +8184,7 @@ function ci() {
8183
8184
  dataIndex: "exposeAs",
8184
8185
  key: "exposeAs",
8185
8186
  width: 120,
8186
- render: (H) => /* @__PURE__ */ e.jsx(F, { color: di[H] || "default", children: H })
8187
+ render: (H) => /* @__PURE__ */ e.jsx(F, { color: ci[H] || "default", children: H })
8187
8188
  },
8188
8189
  {
8189
8190
  title: "状态",
@@ -8271,8 +8272,8 @@ function ci() {
8271
8272
  }
8272
8273
  ),
8273
8274
  /* @__PURE__ */ e.jsxs(W, { extra: /* @__PURE__ */ e.jsxs(ee, { children: [
8274
- /* @__PURE__ */ e.jsx(j, { icon: /* @__PURE__ */ e.jsx(Ol, {}), onClick: () => b(!0), children: "导入 Curl" }),
8275
- /* @__PURE__ */ e.jsx(j, { icon: /* @__PURE__ */ e.jsx(Nl, {}), onClick: () => K(!0), children: "导入 OpenAPI" }),
8275
+ /* @__PURE__ */ e.jsx(j, { icon: /* @__PURE__ */ e.jsx(Nl, {}), onClick: () => b(!0), children: "导入 Curl" }),
8276
+ /* @__PURE__ */ e.jsx(j, { icon: /* @__PURE__ */ e.jsx(El, {}), onClick: () => K(!0), children: "导入 OpenAPI" }),
8276
8277
  /* @__PURE__ */ e.jsx(j, { icon: /* @__PURE__ */ e.jsx(ut, {}), onClick: V, children: "刷新" }),
8277
8278
  /* @__PURE__ */ e.jsx(j, { type: "primary", icon: /* @__PURE__ */ e.jsx(Ce, {}), onClick: X, children: "新建脚本" })
8278
8279
  ] }), children: [
@@ -8339,13 +8340,13 @@ function ci() {
8339
8340
  ) })
8340
8341
  ] }),
8341
8342
  /* @__PURE__ */ e.jsxs(re, { gutter: 16, children: [
8342
- /* @__PURE__ */ e.jsx($, { span: 8, children: /* @__PURE__ */ e.jsx(w.Item, { name: "dslType", label: "DSL类型", children: /* @__PURE__ */ e.jsx(J, { options: ri, onChange: C }) }) }),
8343
- /* @__PURE__ */ e.jsx($, { span: 8, children: /* @__PURE__ */ e.jsx(w.Item, { name: "exposeAs", label: "暴露方式", children: /* @__PURE__ */ e.jsx(J, { options: oi }) }) }),
8343
+ /* @__PURE__ */ e.jsx($, { span: 8, children: /* @__PURE__ */ e.jsx(w.Item, { name: "dslType", label: "DSL类型", children: /* @__PURE__ */ e.jsx(J, { options: oi, onChange: C }) }) }),
8344
+ /* @__PURE__ */ e.jsx($, { span: 8, children: /* @__PURE__ */ e.jsx(w.Item, { name: "exposeAs", label: "暴露方式", children: /* @__PURE__ */ e.jsx(J, { options: di }) }) }),
8344
8345
  /* @__PURE__ */ e.jsx($, { span: 8, children: /* @__PURE__ */ e.jsx(w.Item, { name: "version", label: "版本", children: /* @__PURE__ */ e.jsx(Q, { placeholder: "1.0.0" }) }) })
8345
8346
  ] }),
8346
8347
  /* @__PURE__ */ e.jsx(w.Item, { name: "description", label: "描述", children: /* @__PURE__ */ e.jsx(Q, { placeholder: "脚本描述" }) }),
8347
8348
  O ? /* @__PURE__ */ e.jsx(w.Item, { label: "API Bridge 配置", children: /* @__PURE__ */ e.jsx(
8348
- ii,
8349
+ ri,
8349
8350
  {
8350
8351
  value: R,
8351
8352
  onChange: y
@@ -8434,7 +8435,7 @@ function ci() {
8434
8435
  }
8435
8436
  ),
8436
8437
  /* @__PURE__ */ e.jsx(
8437
- ti,
8438
+ si,
8438
8439
  {
8439
8440
  open: P,
8440
8441
  onClose: () => b(!1),
@@ -8442,7 +8443,7 @@ function ci() {
8442
8443
  }
8443
8444
  ),
8444
8445
  /* @__PURE__ */ e.jsx(
8445
- ni,
8446
+ li,
8446
8447
  {
8447
8448
  open: S,
8448
8449
  onClose: () => K(!1),
@@ -8451,7 +8452,7 @@ function ci() {
8451
8452
  )
8452
8453
  ] });
8453
8454
  }
8454
- const Zn = () => ql.useApp().message, pi = "/api", zt = (t) => t ? String(t).replace("T", " ").slice(0, 19) : "-", mt = (t) => t == null || t === "" ? 0 : Number(t) || 0, fe = (t) => t == null || t === "" ? "-" : String(t), Fs = (t) => t && t.data && Array.isArray(t.data.records) ? t.data.records : [], Ms = (t) => {
8455
+ const Zn = () => Hl.useApp().message, xi = "/api", zt = (t) => t ? String(t).replace("T", " ").slice(0, 19) : "-", mt = (t) => t == null || t === "" ? 0 : Number(t) || 0, fe = (t) => t == null || t === "" ? "-" : String(t), Fs = (t) => t && t.data && Array.isArray(t.data.records) ? t.data.records : [], Ms = (t) => {
8455
8456
  const s = t && t.data ? t.data.total : void 0;
8456
8457
  if (typeof s == "number")
8457
8458
  return Number.isFinite(s) ? s : null;
@@ -8461,7 +8462,7 @@ const Zn = () => ql.useApp().message, pi = "/api", zt = (t) => t ? String(t).rep
8461
8462
  }
8462
8463
  return null;
8463
8464
  };
8464
- async function xi(t, s = 50) {
8465
+ async function hi(t, s = 50) {
8465
8466
  const n = [];
8466
8467
  let a = 1;
8467
8468
  for (; ; ) {
@@ -8480,13 +8481,13 @@ async function xi(t, s = 50) {
8480
8481
  return n;
8481
8482
  }
8482
8483
  async function at(t, s, n) {
8483
- return (await fetch(pi + s, {
8484
+ return (await fetch(xi + s, {
8484
8485
  method: t,
8485
8486
  headers: { "Content-Type": "application/json", "X-User-Id": localStorage.getItem("userId") || "admin" },
8486
8487
  body: n ? JSON.stringify(n) : void 0
8487
8488
  })).json();
8488
8489
  }
8489
- function hi() {
8490
+ function ui() {
8490
8491
  const [t, s] = l([]), [n, a] = l(null), [f, r] = l({ current: 1, size: 10 }), [d, h] = l(!1), g = async (o) => {
8491
8492
  h(!0);
8492
8493
  try {
@@ -8543,7 +8544,7 @@ function hi() {
8543
8544
  )
8544
8545
  ] });
8545
8546
  }
8546
- function ui() {
8547
+ function gi() {
8547
8548
  const [t, s] = l([]), [n, a] = l(null), [f, r] = l({ current: 1, size: 20 }), [d, h] = l({ page: 0, success: 0, failed: 0 }), [g, o] = l(!1), [i, c] = l({ apiKeyId: void 0, success: void 0 }), [N, B] = l([]), [M, x] = l(7), T = async (u) => {
8548
8549
  o(!0);
8549
8550
  try {
@@ -8756,7 +8757,7 @@ function ui() {
8756
8757
  )
8757
8758
  ] });
8758
8759
  }
8759
- function gi() {
8760
+ function mi() {
8760
8761
  const [t, s] = l([]), [n, a] = l(!1), [f, r] = l(null), [d, h] = l([]);
8761
8762
  se(() => {
8762
8763
  (async () => {
@@ -8824,7 +8825,7 @@ function gi() {
8824
8825
  )
8825
8826
  ] });
8826
8827
  }
8827
- function mi() {
8828
+ function yi() {
8828
8829
  const t = Zn(), [s, n] = l([]), [a, f] = l(!1), [r, d] = l(""), [h, g] = l("biz"), o = async () => {
8829
8830
  f(!0);
8830
8831
  try {
@@ -8872,12 +8873,12 @@ function mi() {
8872
8873
  )
8873
8874
  ] });
8874
8875
  }
8875
- function yi() {
8876
+ function fi() {
8876
8877
  Zn();
8877
8878
  const [t, s] = l([]), [n, a] = l(!1), f = async () => {
8878
8879
  a(!0);
8879
8880
  try {
8880
- const r = await xi("/script/api-key/page"), d = await Promise.all(r.map(async (h) => {
8881
+ const r = await hi("/script/api-key/page"), d = await Promise.all(r.map(async (h) => {
8881
8882
  const g = await at("GET", "/script/quota/by-api-key/" + h.id);
8882
8883
  return { ...h, quota: g.data };
8883
8884
  }));
@@ -8936,7 +8937,7 @@ function yi() {
8936
8937
  )
8937
8938
  ] });
8938
8939
  }
8939
- function fi({ initialTab: t = "apikey" }) {
8940
+ function ji({ initialTab: t = "apikey" }) {
8940
8941
  const [s, n] = l(t);
8941
8942
  return se(() => n(t), [t]), /* @__PURE__ */ e.jsxs("div", { style: { padding: 16 }, children: [
8942
8943
  /* @__PURE__ */ e.jsx(
@@ -8948,41 +8949,41 @@ function fi({ initialTab: t = "apikey" }) {
8948
8949
  ),
8949
8950
  /* @__PURE__ */ e.jsx(be, { activeKey: s, onChange: n, items: [
8950
8951
  { key: "apikey", label: /* @__PURE__ */ e.jsxs("span", { children: [
8951
- /* @__PURE__ */ e.jsx(Bt, {}),
8952
+ /* @__PURE__ */ e.jsx(Lt, {}),
8952
8953
  " API Key 管理"
8953
- ] }), children: /* @__PURE__ */ e.jsx(hi, {}) },
8954
+ ] }), children: /* @__PURE__ */ e.jsx(ui, {}) },
8954
8955
  { key: "monitor", label: /* @__PURE__ */ e.jsxs("span", { children: [
8955
8956
  /* @__PURE__ */ e.jsx(On, {}),
8956
8957
  " 调用监控"
8957
- ] }), children: /* @__PURE__ */ e.jsx(ui, {}) },
8958
+ ] }), children: /* @__PURE__ */ e.jsx(gi, {}) },
8958
8959
  { key: "quota", label: /* @__PURE__ */ e.jsxs("span", { children: [
8959
- /* @__PURE__ */ e.jsx(El, {}),
8960
+ /* @__PURE__ */ e.jsx(_l, {}),
8960
8961
  " 配额管理"
8961
- ] }), children: /* @__PURE__ */ e.jsx(yi, {}) },
8962
+ ] }), children: /* @__PURE__ */ e.jsx(fi, {}) },
8962
8963
  { key: "version", label: /* @__PURE__ */ e.jsxs("span", { children: [
8963
8964
  /* @__PURE__ */ e.jsx(gt, {}),
8964
8965
  " 版本管理"
8965
- ] }), children: /* @__PURE__ */ e.jsx(gi, {}) },
8966
+ ] }), children: /* @__PURE__ */ e.jsx(mi, {}) },
8966
8967
  { key: "tag", label: /* @__PURE__ */ e.jsxs("span", { children: [
8967
- /* @__PURE__ */ e.jsx(_l, {}),
8968
+ /* @__PURE__ */ e.jsx(Ll, {}),
8968
8969
  " 标签管理"
8969
- ] }), children: /* @__PURE__ */ e.jsx(mi, {}) }
8970
+ ] }), children: /* @__PURE__ */ e.jsx(yi, {}) }
8970
8971
  ] })
8971
8972
  ] });
8972
8973
  }
8973
- const ji = "_marketRoot_1ca3h_2", bi = "_topRow_1ca3h_10", Ci = "_tabs_1ca3h_17", vi = "_tab_1ca3h_17", Si = "_tabActive_1ca3h_48", ki = "_card_1ca3h_54", wi = "_cardIcon_1ca3h_72", Ti = "_cardBody_1ca3h_82", Ii = "_cardTitleRow_1ca3h_87", zi = "_cardTitle_1ca3h_87", Ai = "_cardDesc_1ca3h_104", Pi = "_installBtn_1ca3h_113", Ne = {
8974
- marketRoot: ji,
8975
- topRow: bi,
8976
- tabs: Ci,
8977
- tab: vi,
8978
- tabActive: Si,
8979
- card: ki,
8980
- cardIcon: wi,
8981
- cardBody: Ti,
8982
- cardTitleRow: Ii,
8983
- cardTitle: zi,
8984
- cardDesc: Ai,
8985
- installBtn: Pi
8974
+ const bi = "_marketRoot_1ca3h_2", Ci = "_topRow_1ca3h_10", vi = "_tabs_1ca3h_17", Si = "_tab_1ca3h_17", ki = "_tabActive_1ca3h_48", wi = "_card_1ca3h_54", Ti = "_cardIcon_1ca3h_72", Ii = "_cardBody_1ca3h_82", zi = "_cardTitleRow_1ca3h_87", Ai = "_cardTitle_1ca3h_87", Pi = "_cardDesc_1ca3h_104", Ri = "_installBtn_1ca3h_113", Ne = {
8975
+ marketRoot: bi,
8976
+ topRow: Ci,
8977
+ tabs: vi,
8978
+ tab: Si,
8979
+ tabActive: ki,
8980
+ card: wi,
8981
+ cardIcon: Ti,
8982
+ cardBody: Ii,
8983
+ cardTitleRow: zi,
8984
+ cardTitle: Ai,
8985
+ cardDesc: Pi,
8986
+ installBtn: Ri
8986
8987
  }, fn = [
8987
8988
  {
8988
8989
  id: 1,
@@ -9335,7 +9336,7 @@ components:
9335
9336
  { categoryCode: "testing", categoryName: "测试", parentCode: "", skillCount: 1 },
9336
9337
  { categoryCode: "ai-agent", categoryName: "AI Agent", parentCode: "", skillCount: 1 },
9337
9338
  { categoryCode: "doc", categoryName: "文档", parentCode: "", skillCount: 1 }
9338
- ], jn = { total: 8, published: 7 }, { TextArea: Ri } = Q, bn = {
9339
+ ], jn = { total: 8, published: 7 }, { TextArea: Oi } = Q, bn = {
9339
9340
  backend: "linear-gradient(135deg, #667eea 0%, #764ba2 100%)",
9340
9341
  frontend: "linear-gradient(135deg, #f093fb 0%, #f5576c 100%)",
9341
9342
  devops: "linear-gradient(135deg, #4facfe 0%, #00f2fe 100%)",
@@ -9343,7 +9344,7 @@ components:
9343
9344
  "ai-agent": "linear-gradient(135deg, #fa709a 0%, #fee140 100%)",
9344
9345
  doc: "linear-gradient(135deg, #a8edea 0%, #fed6e3 100%)",
9345
9346
  default: "linear-gradient(135deg, #667eea 0%, #764ba2 100%)"
9346
- }, fs = (t) => bn[t] || bn.default, Cn = { PUBLISHED: "已发布", DRAFT: "草稿", ARCHIVED: "已归档" }, Oi = (t) => ({
9347
+ }, fs = (t) => bn[t] || bn.default, Cn = { PUBLISHED: "已发布", DRAFT: "草稿", ARCHIVED: "已归档" }, Ni = (t) => ({
9347
9348
  ...t,
9348
9349
  skillCode: t.skillCode || t.skill_code,
9349
9350
  skillName: t.skillName || t.skill_name,
@@ -9374,7 +9375,7 @@ components:
9374
9375
  };
9375
9376
  return t != null && t.length && n(t, ""), s;
9376
9377
  };
9377
- function Ni(t) {
9378
+ function Ei(t) {
9378
9379
  const s = { key: "__root__", children: [] }, n = { "": s };
9379
9380
  return t.forEach((a) => {
9380
9381
  const f = a.path.split("/");
@@ -9394,7 +9395,7 @@ function Ni(t) {
9394
9395
  });
9395
9396
  }), s.children;
9396
9397
  }
9397
- function Ei() {
9398
+ function _i() {
9398
9399
  const [t, s] = l([]), [n, a] = l(!1), [f, r] = l(0), [d, h] = l(1), g = Be(12), [o, i] = l(""), [c, N] = l(void 0), [B, M] = l("download_count"), [x, T] = l([]), [v, m] = l(!1), [u, L] = l(null), [P, b] = l(""), [S, K] = l([]), [R, y] = l(!1), [_, O] = l("overview"), [V, X] = l(null), [C, I] = l([]), [E, z] = l(!1), [q] = w.useForm(), [p, D] = l(!1), [Y, Me] = l(!1), [H, he] = l({ total: 0, published: 0 }), [Xe, Ke] = l(!1), [Re, G] = l(null), [ge, ve] = l(null), [et, Ue] = l(!1), [ze] = w.useForm(), U = async () => {
9399
9400
  try {
9400
9401
  const A = await _e.stats();
@@ -9408,7 +9409,7 @@ function Ei() {
9408
9409
  try {
9409
9410
  const ae = { current: A, size: g.current, sortBy: B };
9410
9411
  o && (ae.keyword = o), c && (ae.categoryCode = c), (o || c) && (ae.status = "PUBLISHED");
9411
- const le = await _e.page(ae), oe = (ye) => (ye || []).map(Oi);
9412
+ const le = await _e.page(ae), oe = (ye) => (ye || []).map(Ni);
9412
9413
  if (le && le.records)
9413
9414
  s(oe(le.records)), r(Number(le.total) || le.records.length);
9414
9415
  else if (Array.isArray(le))
@@ -9628,7 +9629,7 @@ function Ei() {
9628
9629
  }
9629
9630
  ),
9630
9631
  /* @__PURE__ */ e.jsx(
9631
- Hl,
9632
+ Gl,
9632
9633
  {
9633
9634
  value: B,
9634
9635
  onChange: bt,
@@ -9747,7 +9748,7 @@ function Ei() {
9747
9748
  ] }) }, A.id);
9748
9749
  }) }),
9749
9750
  f > g.current && /* @__PURE__ */ e.jsx("div", { style: { textAlign: "right", padding: "8px 0" }, children: /* @__PURE__ */ e.jsx(
9750
- Gl,
9751
+ Jl,
9751
9752
  {
9752
9753
  current: d,
9753
9754
  pageSize: g.current,
@@ -9852,7 +9853,7 @@ function Ei() {
9852
9853
  "v",
9853
9854
  u.version
9854
9855
  ] }),
9855
- /* @__PURE__ */ e.jsxs(F, { icon: /* @__PURE__ */ e.jsx(Ll, {}), color: "red", children: [
9856
+ /* @__PURE__ */ e.jsxs(F, { icon: /* @__PURE__ */ e.jsx(Bl, {}), color: "red", children: [
9856
9857
  u.downloadCount || 0,
9857
9858
  " 次安装"
9858
9859
  ] }),
@@ -9871,7 +9872,7 @@ function Ei() {
9871
9872
  {
9872
9873
  key: "overview",
9873
9874
  label: /* @__PURE__ */ e.jsxs("span", { children: [
9874
- /* @__PURE__ */ e.jsx(Bl, {}),
9875
+ /* @__PURE__ */ e.jsx(Dl, {}),
9875
9876
  " 概述"
9876
9877
  ] }),
9877
9878
  children: /* @__PURE__ */ e.jsx("div", { style: { padding: "20px 24px" }, children: R ? /* @__PURE__ */ e.jsx("div", { style: { textAlign: "center", padding: 40 }, children: /* @__PURE__ */ e.jsx(He, {}) }) : /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
@@ -10011,7 +10012,7 @@ function Ei() {
10011
10012
  }, children: /* @__PURE__ */ e.jsx(
10012
10013
  Un,
10013
10014
  {
10014
- treeData: Ni(u.files),
10015
+ treeData: Ei(u.files),
10015
10016
  defaultExpandAll: !0,
10016
10017
  showIcon: !0,
10017
10018
  selectedKeys: V ? [V.path] : [],
@@ -10158,7 +10159,7 @@ function Ei() {
10158
10159
  S.length > 0 && `(${S.length})`
10159
10160
  ] }),
10160
10161
  children: /* @__PURE__ */ e.jsx("div", { style: { padding: "20px 24px" }, children: S.length > 0 ? /* @__PURE__ */ e.jsx(
10161
- Jl,
10162
+ Ql,
10162
10163
  {
10163
10164
  items: S.map((A, Z) => ({
10164
10165
  color: Z === 0 ? "green" : "gray",
@@ -10273,7 +10274,7 @@ function Ei() {
10273
10274
  }
10274
10275
  )
10275
10276
  ] }),
10276
- /* @__PURE__ */ e.jsx(w.Item, { name: "description", label: "描述", children: /* @__PURE__ */ e.jsx(Ri, { rows: 3, placeholder: "简要描述技能功能...", style: { borderRadius: 8 } }) }),
10277
+ /* @__PURE__ */ e.jsx(w.Item, { name: "description", label: "描述", children: /* @__PURE__ */ e.jsx(Oi, { rows: 3, placeholder: "简要描述技能功能...", style: { borderRadius: 8 } }) }),
10277
10278
  /* @__PURE__ */ e.jsx(w.Item, { name: "tags", label: "标签", children: /* @__PURE__ */ e.jsx(Q, { placeholder: "用逗号分隔,如 java,entity,generator", style: { borderRadius: 8 } }) }),
10278
10279
  /* @__PURE__ */ e.jsx(w.Item, { name: "author", label: "作者", children: /* @__PURE__ */ e.jsx(Q, { placeholder: "技能作者", style: { borderRadius: 8 } }) })
10279
10280
  ] })
@@ -10323,7 +10324,7 @@ function Ei() {
10323
10324
  )
10324
10325
  ] });
10325
10326
  }
10326
- const { Text: wn, Paragraph: js, Title: _i } = Fe, Tn = {
10327
+ const { Text: wn, Paragraph: js, Title: Li } = Fe, Tn = {
10327
10328
  GENERAL: "通用",
10328
10329
  CUSTOMER_SERVICE: "客服",
10329
10330
  CODE: "代码",
@@ -10333,7 +10334,7 @@ const { Text: wn, Paragraph: js, Title: _i } = Fe, Tn = {
10333
10334
  HEALTHCARE: "医疗",
10334
10335
  FINANCE: "金融",
10335
10336
  HR: "人力资源"
10336
- }, Li = (t) => ({
10337
+ }, Bi = (t) => ({
10337
10338
  GENERAL: "default",
10338
10339
  CUSTOMER_SERVICE: "blue",
10339
10340
  CODE: "cyan",
@@ -10343,7 +10344,7 @@ const { Text: wn, Paragraph: js, Title: _i } = Fe, Tn = {
10343
10344
  HEALTHCARE: "red",
10344
10345
  FINANCE: "gold",
10345
10346
  HR: "magenta"
10346
- })[t] || "default", Bi = () => {
10347
+ })[t] || "default", Di = () => {
10347
10348
  const [t, s] = l([]), [n, a] = l(!1), [f, r] = l(null), [d, h] = l(null), g = async () => {
10348
10349
  a(!0);
10349
10350
  try {
@@ -10437,12 +10438,12 @@ const { Text: wn, Paragraph: js, Title: _i } = Fe, Tn = {
10437
10438
  ],
10438
10439
  children: [
10439
10440
  /* @__PURE__ */ e.jsx("div", { style: { textAlign: "center", marginBottom: 8 }, children: /* @__PURE__ */ e.jsx("span", { style: { fontSize: 40 }, children: i.icon || "📋" }) }),
10440
- /* @__PURE__ */ e.jsx(_i, { level: 5, style: { textAlign: "center", marginBottom: 4 }, children: i.name }),
10441
+ /* @__PURE__ */ e.jsx(Li, { level: 5, style: { textAlign: "center", marginBottom: 4 }, children: i.name }),
10441
10442
  /* @__PURE__ */ e.jsxs("div", { style: { textAlign: "center", marginBottom: 8 }, children: [
10442
10443
  /* @__PURE__ */ e.jsx(
10443
10444
  F,
10444
10445
  {
10445
- color: Li(i.category),
10446
+ color: Bi(i.category),
10446
10447
  children: Tn[i.category] || i.category
10447
10448
  }
10448
10449
  ),
@@ -10498,7 +10499,7 @@ const { Text: wn, Paragraph: js, Title: _i } = Fe, Tn = {
10498
10499
  }
10499
10500
  )
10500
10501
  ] });
10501
- }, Di = () => /* @__PURE__ */ e.jsx("div", { style: { padding: 48, textAlign: "center" }, children: /* @__PURE__ */ e.jsx(de, { description: "调用追踪尚未孵化:宿主没有 /api/agent/trace/* 端点(本页不接假数据)" }) }), { Text: bs } = Fe, { TabPane: Gt } = be, Fi = () => {
10502
+ }, Fi = () => /* @__PURE__ */ e.jsx("div", { style: { padding: 48, textAlign: "center" }, children: /* @__PURE__ */ e.jsx(de, { description: "调用追踪尚未孵化:宿主没有 /api/agent/trace/* 端点(本页不接假数据)" }) }), { Text: bs } = Fe, { TabPane: Gt } = be, Mi = () => {
10502
10503
  const [t, s] = l(null), [n, a] = l([]), [f, r] = l([]), [d, h] = l([]), [g, o] = l([]), [i, c] = l(!1), [N, B] = l(null), [M, x] = l(null), [T, v] = l(null), [m, u] = l([]), [L, P] = l([]), [b, S] = l([]);
10503
10504
  se(() => {
10504
10505
  pe("/llm-center/provider/list").then((p) => {
@@ -10784,8 +10785,8 @@ const { Text: wn, Paragraph: js, Title: _i } = Fe, Tn = {
10784
10785
  ) }) }, "records")
10785
10786
  ] })
10786
10787
  ] });
10787
- }, { Title: Mi, Paragraph: Ki } = Fe;
10788
- function Ui() {
10788
+ }, { Title: Ki, Paragraph: Ui } = Fe;
10789
+ function Wi() {
10789
10790
  const t = ns(), [s, n] = l(null);
10790
10791
  se(() => {
10791
10792
  const f = localStorage.getItem("userInfo");
@@ -10796,14 +10797,14 @@ function Ui() {
10796
10797
  n({ name: f });
10797
10798
  }
10798
10799
  }, []);
10799
- const a = Wi.filter((f) => f.key !== "/z-agent/home");
10800
+ const a = $i.filter((f) => f.key !== "/z-agent/home");
10800
10801
  return /* @__PURE__ */ e.jsxs("div", { children: [
10801
10802
  /* @__PURE__ */ e.jsx(W, { style: { marginBottom: 16, background: "linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%)", border: "none" }, children: /* @__PURE__ */ e.jsxs(ee, { direction: "vertical", size: 4, style: { color: "#fff" }, children: [
10802
- /* @__PURE__ */ e.jsxs(Mi, { level: 3, style: { color: "#fff", margin: 0 }, children: [
10803
+ /* @__PURE__ */ e.jsxs(Ki, { level: 3, style: { color: "#fff", margin: 0 }, children: [
10803
10804
  "欢迎",
10804
10805
  s != null && s.name ? `,${s.name}` : ""
10805
10806
  ] }),
10806
- /* @__PURE__ */ e.jsx(Ki, { style: { color: "rgba(255,255,255,0.85)", margin: 0 }, children: "z-agent 智能体工作台 管理台" }),
10807
+ /* @__PURE__ */ e.jsx(Ui, { style: { color: "rgba(255,255,255,0.85)", margin: 0 }, children: "z-agent 智能体工作台 管理台" }),
10807
10808
  (s == null ? void 0 : s.role) && /* @__PURE__ */ e.jsx(F, { style: { marginTop: 8, background: "rgba(255,255,255,0.2)", color: "#fff", border: "none" }, children: s.role })
10808
10809
  ] }) }),
10809
10810
  /* @__PURE__ */ e.jsx(re, { gutter: [16, 16], children: a.map((f) => /* @__PURE__ */ e.jsx($, { xs: 24, sm: 12, md: 12, lg: 8, children: /* @__PURE__ */ e.jsx(W, { hoverable: !0, onClick: () => t(f.key), style: { borderTop: "3px solid #7c3aed" }, children: /* @__PURE__ */ e.jsxs(ee, { align: "start", size: 12, children: [
@@ -10827,7 +10828,7 @@ function Ui() {
10827
10828
  ] });
10828
10829
  }
10829
10830
  const vt = { username: "admin", password: "123456", user: { name: "admin", role: "管理员" } };
10830
- function tr() {
10831
+ function nr() {
10831
10832
  const [t, s] = l(!1), n = async (a) => {
10832
10833
  s(!0);
10833
10834
  try {
@@ -10882,18 +10883,18 @@ function tr() {
10882
10883
  ] })
10883
10884
  ] }) });
10884
10885
  }
10885
- const sr = { title: "z-agent 智能体工作台", short: "z-agent" }, Wi = [
10886
- { key: "/z-agent/home", label: "首页", icon: /* @__PURE__ */ e.jsx(Dl, {}) },
10886
+ const lr = { title: "z-agent 智能体工作台", short: "z-agent" }, $i = [
10887
+ { key: "/z-agent/home", label: "首页", icon: /* @__PURE__ */ e.jsx(Fl, {}) },
10887
10888
  { key: "/z-agent/overview", label: "应用总览", icon: /* @__PURE__ */ e.jsx(Mt, {}) },
10888
- { key: "/z-agent/agent/dashboard", label: "运行看板", icon: /* @__PURE__ */ e.jsx(Fl, {}) },
10889
+ { key: "/z-agent/agent/dashboard", label: "运行看板", icon: /* @__PURE__ */ e.jsx(Ml, {}) },
10889
10890
  { key: "/z-agent/agent/editor", label: "应用编辑器", icon: /* @__PURE__ */ e.jsx(Ge, {}) },
10890
- { key: "/z-agent/agent/share", label: "分享页", icon: /* @__PURE__ */ e.jsx(Ml, {}) },
10891
+ { key: "/z-agent/agent/share", label: "分享页", icon: /* @__PURE__ */ e.jsx(Kl, {}) },
10891
10892
  { key: "/z-agent/agent/app", label: "应用实例", icon: /* @__PURE__ */ e.jsx(nt, {}) },
10892
10893
  { key: "/z-agent/llm", label: "LLM 管理", icon: /* @__PURE__ */ e.jsx(Se, {}) },
10893
10894
  { key: "/z-agent/llm/model", label: "模型管理", icon: /* @__PURE__ */ e.jsx(Se, {}) },
10894
10895
  { key: "/z-agent/llm/provider", label: "供应商", icon: /* @__PURE__ */ e.jsx(Se, {}) },
10895
- { key: "/z-agent/ak", label: "AK 管理", icon: /* @__PURE__ */ e.jsx(Bt, {}) },
10896
- { key: "/z-agent/mcp", label: "MCP 工具", icon: /* @__PURE__ */ e.jsx(Kl, {}) },
10896
+ { key: "/z-agent/ak", label: "AK 管理", icon: /* @__PURE__ */ e.jsx(Lt, {}) },
10897
+ { key: "/z-agent/mcp", label: "MCP 工具", icon: /* @__PURE__ */ e.jsx(Ul, {}) },
10897
10898
  { key: "/z-agent/oss", label: "OSS 浏览", icon: /* @__PURE__ */ e.jsx(wt, {}) },
10898
10899
  { key: "/z-agent/oss/bucket", label: "存储桶", icon: /* @__PURE__ */ e.jsx(wt, {}) },
10899
10900
  { key: "/z-agent/product", label: "产品管理", icon: /* @__PURE__ */ e.jsx(is, {}) },
@@ -10901,60 +10902,60 @@ const sr = { title: "z-agent 智能体工作台", short: "z-agent" }, Wi = [
10901
10902
  { key: "/z-agent/product/execute", label: "产品执行", icon: /* @__PURE__ */ e.jsx(is, {}) },
10902
10903
  { key: "/z-agent/script", label: "脚本", icon: /* @__PURE__ */ e.jsx(Tt, {}) },
10903
10904
  { key: "/z-agent/script/productization", label: "脚本产品化", icon: /* @__PURE__ */ e.jsx(Tt, {}) },
10904
- { key: "/z-agent/skill", label: "技能", icon: /* @__PURE__ */ e.jsx(Ul, {}) },
10905
+ { key: "/z-agent/skill", label: "技能", icon: /* @__PURE__ */ e.jsx(Wl, {}) },
10905
10906
  { key: "/z-agent/template", label: "模板", icon: /* @__PURE__ */ e.jsx(ot, {}) },
10906
10907
  { key: "/z-agent/trace", label: "调用追踪", icon: /* @__PURE__ */ e.jsx(nt, {}) },
10907
10908
  { key: "/z-agent/usage", label: "用量统计", icon: /* @__PURE__ */ e.jsx(_s, {}) }
10908
- ], nr = [
10909
- { path: "/z-agent/home", Component: Ui },
10909
+ ], ar = [
10910
+ { path: "/z-agent/home", Component: Wi },
10910
10911
  { path: "/z-agent/overview", Component: rn },
10911
- { path: "/z-agent/agent/dashboard", Component: Ca },
10912
+ { path: "/z-agent/agent/dashboard", Component: va },
10912
10913
  { path: "/z-agent/agent/editor", Component: Hn },
10913
- { path: "/z-agent/agent/share", Component: Ta },
10914
+ { path: "/z-agent/agent/share", Component: Ia },
10914
10915
  { path: "/z-agent/agent/app", Component: rn },
10915
- { path: "/z-agent/llm", Component: Oa },
10916
- { path: "/z-agent/llm/model", Component: Ea },
10917
- { path: "/z-agent/llm/provider", Component: La },
10918
- { path: "/z-agent/ak", Component: Aa },
10919
- { path: "/z-agent/mcp", Component: Da },
10916
+ { path: "/z-agent/llm", Component: Na },
10917
+ { path: "/z-agent/llm/model", Component: _a },
10918
+ { path: "/z-agent/llm/provider", Component: Ba },
10919
+ { path: "/z-agent/ak", Component: Pa },
10920
+ { path: "/z-agent/mcp", Component: Fa },
10920
10921
  { path: "/z-agent/oss", Component: hn },
10921
10922
  { path: "/z-agent/oss/bucket", Component: hn },
10922
- { path: "/z-agent/oss/bucket/:bucketName", Component: Ma },
10923
- { path: "/z-agent/product", Component: Ka },
10924
- { path: "/z-agent/product/scene", Component: $a },
10925
- { path: "/z-agent/product/execute", Component: Qa },
10926
- { path: "/z-agent/script", Component: ci },
10927
- { path: "/z-agent/script/productization", Component: fi },
10928
- { path: "/z-agent/skill", Component: Ei },
10929
- { path: "/z-agent/template", Component: Bi },
10930
- { path: "/z-agent/trace", Component: Di },
10931
- { path: "/z-agent/usage", Component: Fi }
10923
+ { path: "/z-agent/oss/bucket/:bucketName", Component: Ka },
10924
+ { path: "/z-agent/product", Component: Ua },
10925
+ { path: "/z-agent/product/scene", Component: Va },
10926
+ { path: "/z-agent/product/execute", Component: Ya },
10927
+ { path: "/z-agent/script", Component: pi },
10928
+ { path: "/z-agent/script/productization", Component: ji },
10929
+ { path: "/z-agent/skill", Component: _i },
10930
+ { path: "/z-agent/template", Component: Di },
10931
+ { path: "/z-agent/trace", Component: Fi },
10932
+ { path: "/z-agent/usage", Component: Mi }
10932
10933
  ];
10933
10934
  export {
10934
10935
  Hn as AgentAppEditor,
10935
10936
  rn as AgentAppPage,
10936
- Ca as AgentDashboard,
10937
+ va as AgentDashboard,
10937
10938
  rn as AgentHome,
10938
- Ta as AgentShare,
10939
- Aa as AkManage,
10939
+ Ia as AgentShare,
10940
+ Pa as AkManage,
10940
10941
  hn as BucketList,
10941
- Ui as HomePage,
10942
- Oa as LlmHome,
10943
- Ea as LlmModel,
10944
- La as LlmProvider,
10945
- tr as LoginPage,
10946
- Da as McpManage,
10947
- Ma as OssBrowser,
10948
- Qa as ProductExecute,
10949
- Ka as ProductManage,
10950
- $a as ProductScene,
10951
- ci as ScriptHome,
10952
- fi as ScriptProductization,
10953
- Ei as SkillManage,
10954
- Bi as TemplateManage,
10955
- Di as TraceHome,
10956
- Fi as UsageHome,
10957
- sr as appMeta,
10958
- Wi as menuItems,
10959
- nr as routes
10942
+ Wi as HomePage,
10943
+ Na as LlmHome,
10944
+ _a as LlmModel,
10945
+ Ba as LlmProvider,
10946
+ nr as LoginPage,
10947
+ Fa as McpManage,
10948
+ Ka as OssBrowser,
10949
+ Ya as ProductExecute,
10950
+ Ua as ProductManage,
10951
+ Va as ProductScene,
10952
+ pi as ScriptHome,
10953
+ ji as ScriptProductization,
10954
+ _i as SkillManage,
10955
+ Di as TemplateManage,
10956
+ Fi as TraceHome,
10957
+ Mi as UsageHome,
10958
+ lr as appMeta,
10959
+ $i as menuItems,
10960
+ ar as routes
10960
10961
  };