@yuku123/z-team-component 0.2.132 → 0.2.134
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{index-BkzBYfhO.js → AdminModuleContent-DjEqlai_.js} +13552 -14053
- package/dist/{ChangeLogView-SwacGpsw.js → ChangeLogView-BQCxD0g7.js} +1 -1
- package/dist/{ComponentDoc-Dh5YhLCI.js → ComponentDoc-C1yrRq6Y.js} +707 -713
- package/dist/{InvitationManagementPage-CjEcLOGB.js → InvitationManagementPage-Bbl_HXlG.js} +1 -1
- package/dist/{OnboardingPage-DvNt71kX.js → OnboardingPage-BoYhlfWE.js} +2 -2
- package/dist/{ScheduledTasks-COgb4MZJ.js → ScheduledTasks-0FX6xhIs.js} +6 -6
- package/dist/SystemShell-DNRHYsgT.js +978 -0
- package/dist/{admin-logs-CExsxQ5h.js → admin-logs-OZ3s7ssr.js} +1 -1
- package/dist/{api-DXw93E7c.js → api-B0ComkTL.js} +1 -1
- package/dist/{api-C9kTgVc2.js → api-BgrPNvTB.js} +1 -1
- package/dist/{createWorkspaceWsHandler-BwDUTYXH.js → createWorkspaceWsHandler-CkgJR6Oo.js} +3 -3
- package/dist/{index-D2DFKRUf.js → index-9fGksFL5.js} +1 -1
- package/dist/{index-mEgmHNRO.js → index-Bbs7DMqZ.js} +1 -1
- package/dist/{index-CF3xDZ7q.js → index-Bf-Az5am.js} +4 -4
- package/dist/index-Bf57pWxm.js +311 -0
- package/dist/{index-D_J1ZCy8.js → index-BiCIEDbX.js} +3 -3
- package/dist/{index-DmV6xR7C.js → index-BtCyMeHe.js} +3 -3
- package/dist/{index-9rfSVSTh.js → index-C1sQehbP.js} +2 -2
- package/dist/index-CHLZ4xCe.js +1176 -0
- package/dist/{index-B3uLo8-F.js → index-CM6iVhI3.js} +3 -3
- package/dist/{index-DLK7DuCr.js → index-Cg88iPqc.js} +3 -3
- package/dist/{index-CXEYA7rt.js → index-Cn2CVr2m.js} +2 -2
- package/dist/{index-Ci6_CBwE.js → index-DTKd1x9H.js} +3 -3
- package/dist/{index-DM6XeWFk.js → index-DXvw5NUH.js} +2383 -2416
- package/dist/{index-ftuPuj0s.js → index-Dg_qr92O.js} +1 -1
- package/dist/{index-DMfYPIkB.js → index-Dj88QNYQ.js} +2 -2
- package/dist/{index-t2nMJUPu.js → index-Dx6dKBLL.js} +1 -1
- package/dist/{index-Bs9odXxd.js → index-DxH2PsDU.js} +6 -6
- package/dist/{index-DZ0fYNO9.js → index-Dy5HesOM.js} +11 -11
- package/dist/{index-Ceu-yckM.js → index-M_hPRTgh.js} +12 -12
- package/dist/{index-BoY7L8C4.js → index-TaAkEm82.js} +3 -2
- package/dist/{index-B2Dfbi8J.js → index-dti6XFQV.js} +2 -2
- package/dist/{index-BNPq7yBg.js → index-glQgW-8f.js} +2 -2
- package/dist/{index-CntZHojY.js → index-mHqvjT5a.js} +2 -2
- package/dist/{index-COobH4Vi.js → index-vqAJt3qL.js} +1 -1
- package/dist/index.js +1 -1
- package/dist/{instance-DD3kbAUh.js → instance-BXN17-Ol.js} +1 -1
- package/dist/{menuPermission-v0881tid.js → menuPermission-Bw3hPi8i.js} +3 -3
- package/dist/menuTree-Ctcz41N8.js +303 -0
- package/dist/pages.js +1 -1
- package/dist/{send-default-agent-team-message-Cug0T_7J.js → send-default-agent-team-message-DM0C9VL-.js} +1 -1
- package/dist/{sso-user-CnVXqYR7.js → sso-user-F62YVj4w.js} +1 -1
- package/dist/{training-BS23m-yy.js → training-Df00Ilsm.js} +1 -1
- package/dist/{webide-BPJ1IpZq.js → webide-Iw2coFFL.js} +3 -3
- package/dist/z-team-component.css +1 -1
- package/package.json +2 -1
- package/dist/SystemShell-CSXcsiNp.js +0 -752
- package/dist/index-BTJ83JLl.js +0 -1073
- package/dist/index-CU6jFFl5.js +0 -112
- package/dist/index-CZCKpsry.js +0 -607
- package/dist/useSidebarResize--Avuabb1.js +0 -46
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { configureTodoStore as
|
|
2
|
-
import { create as
|
|
3
|
-
import { message as v, Row as se, Col as D, Typography as pe, Alert as ee, Card as F, Space as U, Input as B, Button as j, Table as ie, Drawer as We, Descriptions as z, Tag as E, Tooltip as Oe, Modal as Ne, Statistic as X, Select as te, Tabs as Ze, Form as N, Upload as
|
|
1
|
+
import { configureTodoStore as fr } from "@yuku123/z-task-component";
|
|
2
|
+
import { create as yr } from "zustand";
|
|
3
|
+
import { message as v, Row as se, Col as D, Typography as pe, Alert as ee, Card as F, Space as U, Input as B, Button as j, Table as ie, Drawer as We, Descriptions as z, Tag as E, Tooltip as Oe, Modal as Ne, Statistic as X, Select as te, Tabs as Ze, Form as N, Upload as gr, Popconfirm as Zt, Spin as bt, Radio as de, InputNumber as Ct, Empty as br } from "antd";
|
|
4
4
|
import { jsx as a, jsxs as p, Fragment as zt } from "react/jsx-runtime";
|
|
5
|
-
import { lazy as
|
|
6
|
-
import { useLocation as
|
|
7
|
-
import { SettingOutlined as
|
|
5
|
+
import { lazy as Sr, Suspense as wr, useState as $, useEffect as Y, useRef as Dn } from "react";
|
|
6
|
+
import { useLocation as _r, useNavigate as Xe, useParams as Fn, Routes as qn, Route as ue, Navigate as Bn, useSearchParams as Tr } from "react-router-dom";
|
|
7
|
+
import { SettingOutlined as kr, ProjectOutlined as St, UserOutlined as Hn, AuditOutlined as Lt, RobotOutlined as Dt, ApiOutlined as Xt, AppstoreOutlined as Ir, ThunderboltOutlined as He, BarChartOutlined as Cr, ScheduleOutlined as Ar, FileTextOutlined as Yt, ReloadOutlined as ce, ExperimentOutlined as $r, PlayCircleOutlined as wt, CopyOutlined as Kn, GlobalOutlined as Gn, NodeIndexOutlined as xr, UndoOutlined as vr, FileSearchOutlined as Pr, VideoCameraOutlined as on, SearchOutlined as Jn, EyeOutlined as Er, CodeOutlined as Fe, InfoCircleOutlined as Rr, FunctionOutlined as tt, ImportOutlined as Ft, CloudUploadOutlined as cn, FileAddOutlined as Or, PlusOutlined as Vn, EditOutlined as Mr, PauseCircleOutlined as jr, CheckCircleOutlined as Qt, DeleteOutlined as Nr, ExclamationCircleOutlined as Ur, SaveOutlined as Wn, ArrowLeftOutlined as Zn, SendOutlined as zr } from "@ant-design/icons";
|
|
8
8
|
import "@yuku123/z-frontend-common";
|
|
9
|
-
import { PageHeader as Ue, GradientStatCard as nt, SectionHeader as
|
|
9
|
+
import { PageHeader as Ue, GradientStatCard as nt, SectionHeader as Lr, FeatureCard as Dr, DarkBanner as Fr, ListTable as ye, TableToolbar as qr, ErrorState as Br, ComponentDoc as Hr } from "@yuku123/z-frontend-common/ui";
|
|
10
10
|
import en from "axios";
|
|
11
11
|
function q(e) {
|
|
12
12
|
return e == null || e === "" ? "" : typeof e == "string" ? e : String(e);
|
|
@@ -41,7 +41,7 @@ function Tt(e, t) {
|
|
|
41
41
|
return n < r ? -1 : 1;
|
|
42
42
|
}
|
|
43
43
|
}
|
|
44
|
-
const
|
|
44
|
+
const Xn = `[[REASONING:正在分析…]]
|
|
45
45
|
正在分析…
|
|
46
46
|
[[/REASONING]]
|
|
47
47
|
|
|
@@ -50,7 +50,7 @@ function dn(e) {
|
|
|
50
50
|
const t = e.trim();
|
|
51
51
|
return t === "正在分析…" || t === "正在分析...";
|
|
52
52
|
}
|
|
53
|
-
function
|
|
53
|
+
function zo(e) {
|
|
54
54
|
var n;
|
|
55
55
|
if (e.type != null && e.type !== "reasoning")
|
|
56
56
|
return !1;
|
|
@@ -63,22 +63,22 @@ function qt(e) {
|
|
|
63
63
|
if (e === "处理中..." || e === "🔄 正在处理中...")
|
|
64
64
|
return !0;
|
|
65
65
|
const t = e.trim();
|
|
66
|
-
return t ? t ===
|
|
66
|
+
return t ? t === Xn.trim() ? !0 : /^\[\[REASONING:正在分析[\s\S]*?\[\[\/REASONING\]\]\s*$/u.test(
|
|
67
67
|
t
|
|
68
68
|
) : !1;
|
|
69
69
|
}
|
|
70
|
-
function
|
|
71
|
-
return e === "处理中..." || e === "🔄 正在处理中..." ? !0 : e.trim() ===
|
|
70
|
+
function Lo(e) {
|
|
71
|
+
return e === "处理中..." || e === "🔄 正在处理中..." ? !0 : e.trim() === Xn.trim();
|
|
72
72
|
}
|
|
73
|
-
const
|
|
74
|
-
function
|
|
73
|
+
const Kr = 101012001;
|
|
74
|
+
function Gr() {
|
|
75
75
|
const e = typeof window < "u" && window.ZTEAM_SSO_BASE || "";
|
|
76
76
|
return e ? e.replace(/\/+$/, "") : typeof window > "u" ? "http://localhost" : window.location.origin;
|
|
77
77
|
}
|
|
78
|
-
function
|
|
78
|
+
function Jr() {
|
|
79
79
|
const e = new URL(window.location.href);
|
|
80
80
|
e.searchParams.has("_from_login") || e.searchParams.set("_from_login", "1");
|
|
81
|
-
const t = `${
|
|
81
|
+
const t = `${Gr()}/login?redirect=${encodeURIComponent(
|
|
82
82
|
e.toString()
|
|
83
83
|
)}`;
|
|
84
84
|
window.location.href = t;
|
|
@@ -96,9 +96,9 @@ typeof window < "u" && window.addEventListener(
|
|
|
96
96
|
);
|
|
97
97
|
let un = !1;
|
|
98
98
|
const pn = "登录已失效,请重新登录";
|
|
99
|
-
function
|
|
99
|
+
function Vr(e) {
|
|
100
100
|
if (!e) return !1;
|
|
101
|
-
if (Number(e.code) ===
|
|
101
|
+
if (Number(e.code) === Kr) return !0;
|
|
102
102
|
const t = typeof e.message == "string" ? e.message : "";
|
|
103
103
|
return /登录(?:已)?(?:失效|过期)|重新登录|未登录/.test(t);
|
|
104
104
|
}
|
|
@@ -113,7 +113,7 @@ function mn() {
|
|
|
113
113
|
localStorage.removeItem("ft_token"), localStorage.removeItem("USER_INFO"), delete window.USER_INFO;
|
|
114
114
|
} catch {
|
|
115
115
|
}
|
|
116
|
-
|
|
116
|
+
Jr();
|
|
117
117
|
}
|
|
118
118
|
throw {
|
|
119
119
|
_apiUserError: !0,
|
|
@@ -124,9 +124,9 @@ function mn() {
|
|
|
124
124
|
function hn(e, t) {
|
|
125
125
|
return e.status === 401 ? "登录已失效,请重新登录" : e.status === 403 ? "没有权限访问该资源" : e.status === 404 ? "接口不存在,请确认后端已启动且路径为 /z-team" : e.status >= 500 ? "服务暂时不可用,请稍后重试" : (e.status >= 400, t);
|
|
126
126
|
}
|
|
127
|
-
const
|
|
127
|
+
const Yn = "/z-team", Wr = typeof window < "u" && /(zteam[-.]ft\.(zteam\.local|zteam\.local)|team\.zteam\.local)/i.test(
|
|
128
128
|
window.location.hostname
|
|
129
|
-
), kt =
|
|
129
|
+
), kt = Wr, Zr = `${kt ? "/kapi" : ""}${Yn}/api`, Xr = `${kt ? "/kapi" : ""}${Yn}`, Yr = `${Xr}/v1/scenario-instances`, Qr = window.ENV_TYPE || window.envType || "", Te = Zr, Do = `${kt ? "/kapi" : ""}/z-team-evolution/api`, Fo = `${kt ? "/kapi" : ""}/z-team-bench/api`, es = Qr || "local";
|
|
130
130
|
async function ke(e, t) {
|
|
131
131
|
try {
|
|
132
132
|
const n = {
|
|
@@ -135,7 +135,7 @@ async function ke(e, t) {
|
|
|
135
135
|
// 302 分支(跳登录页 ⇒ 200 + text/html ⇒ res.json() 抛错)。
|
|
136
136
|
// init?.headers 在最后 ⇒ 调用方仍可用自己的 Accept 覆盖(如 SSE 的 text/event-stream)。
|
|
137
137
|
Accept: "application/json",
|
|
138
|
-
"project-env":
|
|
138
|
+
"project-env": es,
|
|
139
139
|
...t == null ? void 0 : t.headers
|
|
140
140
|
};
|
|
141
141
|
return await fetch(e, { ...ge, ...t, headers: n });
|
|
@@ -164,7 +164,7 @@ async function Ie(e, t) {
|
|
|
164
164
|
}
|
|
165
165
|
return n;
|
|
166
166
|
}
|
|
167
|
-
if (
|
|
167
|
+
if (Vr(r) && mn(), typeof r.success == "boolean") {
|
|
168
168
|
if (r.success)
|
|
169
169
|
return r.data !== void 0 ? r.data : !0;
|
|
170
170
|
const s = r.message || // z-team 另有 7 个 admin controller 挂 bench Result({code,msg,data,success})
|
|
@@ -185,24 +185,24 @@ async function Ie(e, t) {
|
|
|
185
185
|
}
|
|
186
186
|
return r;
|
|
187
187
|
}
|
|
188
|
-
const
|
|
189
|
-
function
|
|
190
|
-
return e.replace(
|
|
188
|
+
const ts = /_+([a-z0-9])/gi;
|
|
189
|
+
function ns(e) {
|
|
190
|
+
return e.replace(ts, (t, n) => n.toUpperCase());
|
|
191
191
|
}
|
|
192
192
|
function Bt(e) {
|
|
193
193
|
if (Array.isArray(e)) return e.map((t) => Bt(t));
|
|
194
194
|
if (e && typeof e == "object" && !(e instanceof Date)) {
|
|
195
195
|
const t = {};
|
|
196
196
|
for (const [n, r] of Object.entries(e))
|
|
197
|
-
t[
|
|
197
|
+
t[ns(n)] = Bt(r);
|
|
198
198
|
return t;
|
|
199
199
|
}
|
|
200
200
|
return e;
|
|
201
201
|
}
|
|
202
|
-
async function
|
|
202
|
+
async function qo(e, t) {
|
|
203
203
|
return Bt(await Ie(e, t));
|
|
204
204
|
}
|
|
205
|
-
async function
|
|
205
|
+
async function rs() {
|
|
206
206
|
try {
|
|
207
207
|
const e = await ke(`${Te}/sso/attach-ctc-token`, {
|
|
208
208
|
...ge,
|
|
@@ -216,7 +216,7 @@ async function ss() {
|
|
|
216
216
|
return !1;
|
|
217
217
|
}
|
|
218
218
|
}
|
|
219
|
-
async function
|
|
219
|
+
async function Bo(e, t) {
|
|
220
220
|
const n = t != null && t.trim() !== "" ? { result: t } : void 0, r = await ke(`${Te}/tasks/${e}/complete`, {
|
|
221
221
|
...ge,
|
|
222
222
|
method: "POST",
|
|
@@ -225,7 +225,7 @@ async function Ko(e, t) {
|
|
|
225
225
|
});
|
|
226
226
|
return Ie(r, "完成任务失败");
|
|
227
227
|
}
|
|
228
|
-
async function
|
|
228
|
+
async function Ho(e, t) {
|
|
229
229
|
const n = await ke(`${Te}/tasks/${e}/suspend`, {
|
|
230
230
|
...ge,
|
|
231
231
|
method: "POST",
|
|
@@ -234,7 +234,7 @@ async function Go(e, t) {
|
|
|
234
234
|
});
|
|
235
235
|
return Ie(n, "挂起任务失败");
|
|
236
236
|
}
|
|
237
|
-
async function
|
|
237
|
+
async function Ko(e, t) {
|
|
238
238
|
const n = await ke(`${Te}/tasks/${e}/cancel`, {
|
|
239
239
|
...ge,
|
|
240
240
|
method: "POST",
|
|
@@ -243,7 +243,7 @@ async function Jo(e, t) {
|
|
|
243
243
|
});
|
|
244
244
|
return Ie(n, "取消任务失败");
|
|
245
245
|
}
|
|
246
|
-
async function
|
|
246
|
+
async function Go(e) {
|
|
247
247
|
const t = await ke(`${Te}/tasks/${e}/continue`, {
|
|
248
248
|
...ge,
|
|
249
249
|
method: "POST",
|
|
@@ -251,7 +251,7 @@ async function Vo(e) {
|
|
|
251
251
|
});
|
|
252
252
|
return Ie(t, "继续执行失败");
|
|
253
253
|
}
|
|
254
|
-
async function
|
|
254
|
+
async function Jo(e) {
|
|
255
255
|
const t = await ke(`${Te}/tasks/${e}/reset`, {
|
|
256
256
|
...ge,
|
|
257
257
|
method: "POST",
|
|
@@ -259,32 +259,32 @@ async function Wo(e) {
|
|
|
259
259
|
});
|
|
260
260
|
return Ie(t, "重置执行失败");
|
|
261
261
|
}
|
|
262
|
-
async function
|
|
262
|
+
async function Vo(e) {
|
|
263
263
|
const t = await ke(`${Te}/tasks/${e}`, ge);
|
|
264
264
|
return Ie(t, "加载任务失败");
|
|
265
265
|
}
|
|
266
|
-
const
|
|
267
|
-
let V = null, qe = [], Be = [], Me = 0, fn = "", rt = null, De = 0, fe = null,
|
|
266
|
+
const Wo = "http://127.0.0.1/kapi/z-webide/inspect";
|
|
267
|
+
let V = null, qe = [], Be = [], Me = 0, fn = "", rt = null, De = 0, fe = null, Qn = "disconnected";
|
|
268
268
|
function yt(e) {
|
|
269
|
-
|
|
269
|
+
Qn = e, Be.forEach((t) => t(e));
|
|
270
270
|
}
|
|
271
271
|
function yn() {
|
|
272
272
|
return Me !== 0 && Me !== "";
|
|
273
273
|
}
|
|
274
|
-
function
|
|
274
|
+
function ss(e, t = "") {
|
|
275
275
|
const n = window.location.protocol === "https:" ? "wss:" : "ws:", r = window.location.host, s = t ? `?token=${encodeURIComponent(t)}` : "";
|
|
276
|
-
return `${n}//${r}${
|
|
276
|
+
return `${n}//${r}${Yr}/${e}/ws${s}`;
|
|
277
277
|
}
|
|
278
|
-
function
|
|
279
|
-
return Be.push(e), e(
|
|
278
|
+
function Zo(e) {
|
|
279
|
+
return Be.push(e), e(Qn), () => {
|
|
280
280
|
Be = Be.filter((t) => t !== e);
|
|
281
281
|
};
|
|
282
282
|
}
|
|
283
|
-
function
|
|
283
|
+
function as(e, t = "", n) {
|
|
284
284
|
if (V && (V.readyState === WebSocket.CONNECTING || V.readyState === WebSocket.OPEN) && Me === e)
|
|
285
285
|
return;
|
|
286
286
|
V && (V.onclose = null, V.close(), V = null), fe != null && (clearTimeout(fe), fe = null);
|
|
287
|
-
const r =
|
|
287
|
+
const r = ss(e, t);
|
|
288
288
|
Me = e, fn = t, n && (rt = n), yt("connecting"), V = new WebSocket(r), V.onopen = () => {
|
|
289
289
|
De = 0, yt("connected"), console.log("[WS] connected");
|
|
290
290
|
}, V.onmessage = (s) => {
|
|
@@ -303,17 +303,17 @@ function os(e, t = "", n) {
|
|
|
303
303
|
console.warn(
|
|
304
304
|
`[WS] closed (clean=${o}), reconnect #${De} in ${i}ms`
|
|
305
305
|
), fe = setTimeout(() => {
|
|
306
|
-
fe = null, yn() && (
|
|
306
|
+
fe = null, yn() && (as(Me, fn), rt == null || rt());
|
|
307
307
|
}, i);
|
|
308
308
|
};
|
|
309
309
|
}
|
|
310
|
-
function
|
|
310
|
+
function Xo(e) {
|
|
311
311
|
return qe.push(e), () => {
|
|
312
312
|
qe = qe.filter((t) => t !== e);
|
|
313
313
|
};
|
|
314
314
|
}
|
|
315
|
-
async function
|
|
316
|
-
await
|
|
315
|
+
async function os(e) {
|
|
316
|
+
await rs().catch(() => {
|
|
317
317
|
}), V && V.readyState === WebSocket.OPEN && V.send(JSON.stringify(e));
|
|
318
318
|
}
|
|
319
319
|
function Ht() {
|
|
@@ -325,10 +325,10 @@ const g = {
|
|
|
325
325
|
// 而不是返回 302 跳到 SSO 登录页(避免 fetch follow redirect 后拿到 SPA HTML 导致解析失败)
|
|
326
326
|
headers: { Accept: "application/json" }
|
|
327
327
|
}, Ke = "zindexer_admin_token";
|
|
328
|
-
function
|
|
328
|
+
function Yo() {
|
|
329
329
|
return typeof localStorage > "u" ? "" : localStorage.getItem(Ke) || "";
|
|
330
330
|
}
|
|
331
|
-
function
|
|
331
|
+
function Qo(e) {
|
|
332
332
|
if (typeof localStorage > "u") return;
|
|
333
333
|
const t = (e || "").trim();
|
|
334
334
|
if (!t) {
|
|
@@ -337,7 +337,7 @@ function ti(e) {
|
|
|
337
337
|
}
|
|
338
338
|
localStorage.setItem(Ke, t), localStorage.setItem("zindexer_token", t);
|
|
339
339
|
}
|
|
340
|
-
function
|
|
340
|
+
function ei() {
|
|
341
341
|
typeof localStorage > "u" || localStorage.removeItem(Ke);
|
|
342
342
|
}
|
|
343
343
|
function Ce(e = {}) {
|
|
@@ -352,13 +352,13 @@ function Ce(e = {}) {
|
|
|
352
352
|
}
|
|
353
353
|
};
|
|
354
354
|
}
|
|
355
|
-
class
|
|
355
|
+
class is extends Error {
|
|
356
356
|
constructor(t) {
|
|
357
357
|
super(t), this._apiUserError = !0, this.name = "ApiUserError", this.userMessage = t;
|
|
358
358
|
}
|
|
359
359
|
}
|
|
360
360
|
function At(e) {
|
|
361
|
-
return e instanceof
|
|
361
|
+
return e instanceof is ? !0 : !!(e && typeof e == "object" && e._apiUserError);
|
|
362
362
|
}
|
|
363
363
|
function _e(e, t = "error") {
|
|
364
364
|
console[t === "warning" ? "warn" : "error"]("[api]", e);
|
|
@@ -373,8 +373,8 @@ typeof window < "u" && window.addEventListener(
|
|
|
373
373
|
function gn(e, t) {
|
|
374
374
|
return e.status === 401 ? "登录已失效,请重新登录" : e.status === 403 ? "没有权限访问该资源" : e.status === 404 ? "接口不存在,请确认后端已启动且路径为 /z-team" : e.status >= 500 ? "服务暂时不可用,请稍后重试" : (e.status >= 400, t);
|
|
375
375
|
}
|
|
376
|
-
const
|
|
377
|
-
async function
|
|
376
|
+
const cs = "/z-team", ls = typeof window < "u" && window.ZTEAM_USE_KAPI === !0, er = ls, tr = `${er ? "/kapi" : ""}${cs}/api`, ds = window.ENV_TYPE || window.envType || "", b = tr, us = `${er ? "/kapi" : ""}/z-team-evolution/api`;
|
|
377
|
+
async function ps(e) {
|
|
378
378
|
const t = new FormData();
|
|
379
379
|
t.append("file", e);
|
|
380
380
|
const n = await S(`${b}/common/upload-image`, {
|
|
@@ -387,10 +387,10 @@ async function ms(e) {
|
|
|
387
387
|
}
|
|
388
388
|
return s;
|
|
389
389
|
}
|
|
390
|
-
async function
|
|
391
|
-
return Promise.all(e.map((t) =>
|
|
390
|
+
async function ti(e) {
|
|
391
|
+
return Promise.all(e.map((t) => ps(t)));
|
|
392
392
|
}
|
|
393
|
-
const
|
|
393
|
+
const ms = ds || "local";
|
|
394
394
|
async function S(e, t) {
|
|
395
395
|
try {
|
|
396
396
|
const n = {
|
|
@@ -400,7 +400,7 @@ async function S(e, t) {
|
|
|
400
400
|
// init?.headers 在最后 ⇒ 调用方仍可用自己的 Accept 覆盖(如 SSE 的 text/event-stream)。
|
|
401
401
|
Accept: "application/json",
|
|
402
402
|
...g.headers,
|
|
403
|
-
"project-env":
|
|
403
|
+
"project-env": ms,
|
|
404
404
|
...t == null ? void 0 : t.headers
|
|
405
405
|
};
|
|
406
406
|
return await fetch(e, { ...g, ...t, headers: n });
|
|
@@ -409,7 +409,7 @@ async function S(e, t) {
|
|
|
409
409
|
throw _e(n), { _apiUserError: !0, userMessage: n, message: n };
|
|
410
410
|
}
|
|
411
411
|
}
|
|
412
|
-
function
|
|
412
|
+
function nr(e) {
|
|
413
413
|
const t = e.id ?? e.staff_id ?? e.staffId ?? e.user_id ?? e.userId;
|
|
414
414
|
return {
|
|
415
415
|
// FE-PRECISION-FIX: 雪花 ID 保持字符串,禁止走 Number()
|
|
@@ -461,17 +461,17 @@ async function f(e, t) {
|
|
|
461
461
|
}
|
|
462
462
|
return r;
|
|
463
463
|
}
|
|
464
|
-
async function
|
|
464
|
+
async function hs(e, t) {
|
|
465
465
|
const n = await fetch("/kapi/z-ctc/api/ctc/authn/login", {
|
|
466
466
|
...g,
|
|
467
467
|
method: "POST",
|
|
468
468
|
headers: { Accept: "application/json", "Content-Type": "application/json" },
|
|
469
469
|
credentials: "include",
|
|
470
470
|
body: JSON.stringify({ identifier: e, password: t })
|
|
471
|
-
}), r = await f(n, "登录失败"), s = (r == null ? void 0 : r.userInfo) ?? (r == null ? void 0 : r.user_info) ?? (r == null ? void 0 : r.user) ?? r, o =
|
|
471
|
+
}), r = await f(n, "登录失败"), s = (r == null ? void 0 : r.userInfo) ?? (r == null ? void 0 : r.user_info) ?? (r == null ? void 0 : r.user) ?? r, o = nr(s);
|
|
472
472
|
return { token: (r == null ? void 0 : r.token) ?? "", user: o };
|
|
473
473
|
}
|
|
474
|
-
async function
|
|
474
|
+
async function ni(e) {
|
|
475
475
|
const t = await fetch("/kapi/z-ctc/api/ctc/authn/whoami", {
|
|
476
476
|
headers: { Accept: "application/json" },
|
|
477
477
|
...g,
|
|
@@ -480,9 +480,9 @@ async function si(e) {
|
|
|
480
480
|
t,
|
|
481
481
|
"获取用户信息失败"
|
|
482
482
|
);
|
|
483
|
-
return
|
|
483
|
+
return nr(n);
|
|
484
484
|
}
|
|
485
|
-
async function
|
|
485
|
+
async function ri() {
|
|
486
486
|
const e = await fetch("/kapi/z-ctc/api/ctc/authn/my-tenants", {
|
|
487
487
|
...g,
|
|
488
488
|
headers: { Accept: "application/json" },
|
|
@@ -498,7 +498,7 @@ async function ai() {
|
|
|
498
498
|
isOrphan: !!((t == null ? void 0 : t.isOrphan) ?? (t == null ? void 0 : t.orphan) ?? (t == null ? void 0 : t.is_orphan) ?? s.length === 0)
|
|
499
499
|
};
|
|
500
500
|
}
|
|
501
|
-
async function
|
|
501
|
+
async function si(e) {
|
|
502
502
|
const t = e ? `?tenantCode=${encodeURIComponent(e)}` : "", n = await fetch(`/kapi/z-ctc/api/ctc/ac/domains/list${t}`, {
|
|
503
503
|
...g,
|
|
504
504
|
headers: { Accept: "application/json" },
|
|
@@ -512,7 +512,7 @@ async function oi(e) {
|
|
|
512
512
|
status: s(i, "status", "status")
|
|
513
513
|
})).filter((i) => i.domainCode);
|
|
514
514
|
}
|
|
515
|
-
async function
|
|
515
|
+
async function ai(e, t) {
|
|
516
516
|
const n = await fetch("/kapi/z-ctc/api/ctc/authn/select-tenant", {
|
|
517
517
|
...g,
|
|
518
518
|
method: "POST",
|
|
@@ -522,7 +522,7 @@ async function ii(e, t) {
|
|
|
522
522
|
}), r = await f(n, "切换租户失败");
|
|
523
523
|
return { token: (r == null ? void 0 : r.token) ?? "", account: (r == null ? void 0 : r.account) ?? null };
|
|
524
524
|
}
|
|
525
|
-
async function
|
|
525
|
+
async function fs(e) {
|
|
526
526
|
await f(
|
|
527
527
|
await fetch("/kapi/z-ctc/api/ctc/authn/logout", {
|
|
528
528
|
headers: { Accept: "application/json" },
|
|
@@ -537,11 +537,11 @@ async function ys(e) {
|
|
|
537
537
|
} catch {
|
|
538
538
|
}
|
|
539
539
|
}
|
|
540
|
-
const $e = /* @__PURE__ */ new Map(),
|
|
541
|
-
async function
|
|
540
|
+
const $e = /* @__PURE__ */ new Map(), ys = 300 * 1e3, gs = 30 * 1e3;
|
|
541
|
+
async function oi(e, t) {
|
|
542
542
|
const n = `${e}`, r = $e.get(n);
|
|
543
543
|
if (r) {
|
|
544
|
-
const s = r.failed ?
|
|
544
|
+
const s = r.failed ? gs : ys;
|
|
545
545
|
if (Date.now() - r.at < s)
|
|
546
546
|
return { codes: r.codes, failed: r.failed };
|
|
547
547
|
$e.delete(n);
|
|
@@ -567,7 +567,7 @@ async function ci(e, t) {
|
|
|
567
567
|
return $e.set(n, { codes: [], failed: !0, at: Date.now() }), { codes: [], failed: !0 };
|
|
568
568
|
}
|
|
569
569
|
}
|
|
570
|
-
async function
|
|
570
|
+
async function bs(e = "", t) {
|
|
571
571
|
const n = new URLSearchParams();
|
|
572
572
|
e && n.set("token", e), t && n.set("create_time_start", t);
|
|
573
573
|
const r = n.toString(), s = await S(
|
|
@@ -576,11 +576,11 @@ async function Ss(e = "", t) {
|
|
|
576
576
|
);
|
|
577
577
|
return f(s, "获取项目列表失败");
|
|
578
578
|
}
|
|
579
|
-
async function
|
|
579
|
+
async function ii(e = "") {
|
|
580
580
|
const t = e ? `?token=${encodeURIComponent(e)}` : "", n = await S(`${b}/scenarios${t}`, g);
|
|
581
581
|
return f(n, "获取场景列表失败");
|
|
582
582
|
}
|
|
583
|
-
async function
|
|
583
|
+
async function rr(e, t = "") {
|
|
584
584
|
const n = t ? `?token=${encodeURIComponent(t)}` : "", r = {
|
|
585
585
|
...e,
|
|
586
586
|
extend_params: { ...e.extend_params, skip_init_task: "true" }
|
|
@@ -592,7 +592,7 @@ async function sr(e, t = "") {
|
|
|
592
592
|
}), o = await f(s, "创建项目失败");
|
|
593
593
|
return Ae(o);
|
|
594
594
|
}
|
|
595
|
-
const
|
|
595
|
+
const ci = rr;
|
|
596
596
|
function Ae(e) {
|
|
597
597
|
return {
|
|
598
598
|
// FE-PRECISION-FIX: 雪花 ID 是 19 位 bigint, Number() 会丢末位精度
|
|
@@ -615,7 +615,7 @@ function Ae(e) {
|
|
|
615
615
|
close_time: st(e, "close_time"),
|
|
616
616
|
close_user: st(e, "close_user"),
|
|
617
617
|
members: Array.isArray(e.members) ? e.members.map((t) => String(t)) : void 0,
|
|
618
|
-
parent_id:
|
|
618
|
+
parent_id: Ss(e)
|
|
619
619
|
};
|
|
620
620
|
}
|
|
621
621
|
function st(e, t) {
|
|
@@ -633,7 +633,7 @@ function st(e, t) {
|
|
|
633
633
|
if (o)
|
|
634
634
|
return o[t] ?? void 0;
|
|
635
635
|
}
|
|
636
|
-
function
|
|
636
|
+
function Ss(e) {
|
|
637
637
|
const t = e.ext;
|
|
638
638
|
if (!t) return;
|
|
639
639
|
const n = t.params;
|
|
@@ -643,7 +643,7 @@ function ws(e) {
|
|
|
643
643
|
const s = q(r);
|
|
644
644
|
return s === "" ? void 0 : s;
|
|
645
645
|
}
|
|
646
|
-
async function
|
|
646
|
+
async function li(e, t) {
|
|
647
647
|
const n = await S(
|
|
648
648
|
`${b}/scenario-instances/${e}/llm-code`,
|
|
649
649
|
{
|
|
@@ -655,12 +655,12 @@ async function ui(e, t) {
|
|
|
655
655
|
), r = await f(n, "设置模型失败");
|
|
656
656
|
return Ae(r);
|
|
657
657
|
}
|
|
658
|
-
const
|
|
659
|
-
function
|
|
658
|
+
const ws = "qa_support";
|
|
659
|
+
function di(e) {
|
|
660
660
|
const t = e.futureTeamProjectId ?? e.future_team_project_id ?? "", n = q(String(t).trim());
|
|
661
661
|
return we(n) ? n : null;
|
|
662
662
|
}
|
|
663
|
-
async function
|
|
663
|
+
async function ui(e, t, n) {
|
|
664
664
|
const r = new URLSearchParams({
|
|
665
665
|
ticketId: e,
|
|
666
666
|
futureTeamProjectId: String(t),
|
|
@@ -674,14 +674,14 @@ async function mi(e, t, n) {
|
|
|
674
674
|
});
|
|
675
675
|
await f(s, "回写工单关联工程失败");
|
|
676
676
|
}
|
|
677
|
-
async function
|
|
677
|
+
async function _s(e) {
|
|
678
678
|
const t = await S(
|
|
679
679
|
`${b}/scenario-instances/${e}/team/`,
|
|
680
680
|
g
|
|
681
681
|
);
|
|
682
682
|
return f(t, "获取团队成员失败");
|
|
683
683
|
}
|
|
684
|
-
async function
|
|
684
|
+
async function Ts(e, t) {
|
|
685
685
|
const n = await S(`${b}/scenario-instances/${e}/team/`, {
|
|
686
686
|
...g,
|
|
687
687
|
method: "POST",
|
|
@@ -690,7 +690,7 @@ async function ks(e, t) {
|
|
|
690
690
|
});
|
|
691
691
|
return f(n, "添加成员失败");
|
|
692
692
|
}
|
|
693
|
-
async function
|
|
693
|
+
async function ks(e, t) {
|
|
694
694
|
const n = await S(
|
|
695
695
|
`${b}/scenario-instances/${e}/team/${t}`,
|
|
696
696
|
{
|
|
@@ -700,35 +700,35 @@ async function Is(e, t) {
|
|
|
700
700
|
);
|
|
701
701
|
return f(n, "移除成员失败");
|
|
702
702
|
}
|
|
703
|
-
async function
|
|
703
|
+
async function Is(e) {
|
|
704
704
|
const t = await S(
|
|
705
705
|
`${b}/scenario-instances/${e}/team/available-agents`,
|
|
706
706
|
g
|
|
707
707
|
);
|
|
708
708
|
return f(t, "获取Agent列表失败");
|
|
709
709
|
}
|
|
710
|
-
async function
|
|
710
|
+
async function Cs(e) {
|
|
711
711
|
const t = await S(
|
|
712
712
|
`${b}/scenario-instances/${e}/team/available-humans`,
|
|
713
713
|
g
|
|
714
714
|
);
|
|
715
715
|
return f(t, "获取用户列表失败");
|
|
716
716
|
}
|
|
717
|
-
async function
|
|
717
|
+
async function As(e) {
|
|
718
718
|
const t = await S(
|
|
719
719
|
`${b}/scenario-instances/${e}/skills`,
|
|
720
720
|
g
|
|
721
721
|
);
|
|
722
722
|
return f(t, "获取技能列表失败");
|
|
723
723
|
}
|
|
724
|
-
async function
|
|
724
|
+
async function $s(e) {
|
|
725
725
|
const t = await S(
|
|
726
726
|
`${b}/scenario-instances/${e}/all-skills`,
|
|
727
727
|
g
|
|
728
728
|
);
|
|
729
729
|
return f(t, "获取全部技能列表失败");
|
|
730
730
|
}
|
|
731
|
-
async function
|
|
731
|
+
async function xs(e, t) {
|
|
732
732
|
const n = await S(`${b}/scenario-instances/${e}/skills`, {
|
|
733
733
|
...g,
|
|
734
734
|
method: "POST",
|
|
@@ -737,7 +737,7 @@ async function vs(e, t) {
|
|
|
737
737
|
});
|
|
738
738
|
return f(n, "添加技能失败");
|
|
739
739
|
}
|
|
740
|
-
async function
|
|
740
|
+
async function vs(e, t) {
|
|
741
741
|
const n = await S(
|
|
742
742
|
`${b}/scenario-instances/${e}/skills/${t}`,
|
|
743
743
|
{
|
|
@@ -747,7 +747,7 @@ async function Ps(e, t) {
|
|
|
747
747
|
);
|
|
748
748
|
return f(n, "移除技能失败");
|
|
749
749
|
}
|
|
750
|
-
async function
|
|
750
|
+
async function Ps(e, t) {
|
|
751
751
|
const n = await S(
|
|
752
752
|
`${b}/scenario-instances/${e}/agent-skills/refresh`,
|
|
753
753
|
{
|
|
@@ -759,7 +759,7 @@ async function Es(e, t) {
|
|
|
759
759
|
);
|
|
760
760
|
return f(n, "刷新技能失败");
|
|
761
761
|
}
|
|
762
|
-
async function
|
|
762
|
+
async function Es(e) {
|
|
763
763
|
const t = await S(
|
|
764
764
|
`${b}/scenario-instances/${e}/all-agent-skills/refresh`,
|
|
765
765
|
{
|
|
@@ -775,7 +775,7 @@ async function bn(e, t = 50, n) {
|
|
|
775
775
|
const s = await S(r, g);
|
|
776
776
|
return f(s, "加载聊天记录失败,请稍后重试");
|
|
777
777
|
}
|
|
778
|
-
async function
|
|
778
|
+
async function Rs(e, t, n = "") {
|
|
779
779
|
const r = n ? `?token=${encodeURIComponent(n)}` : "", s = await S(
|
|
780
780
|
`${b}/scenario-instances/${e}/messages/${t}/read${r}`,
|
|
781
781
|
{
|
|
@@ -797,7 +797,7 @@ async function at(e, t, n = "") {
|
|
|
797
797
|
);
|
|
798
798
|
return f(s, "发送消息失败");
|
|
799
799
|
}
|
|
800
|
-
async function
|
|
800
|
+
async function Os(e, t) {
|
|
801
801
|
const n = await S(
|
|
802
802
|
`${b}/scenario-instances/${e}/cancel/${t}`,
|
|
803
803
|
{ ...g, method: "POST" }
|
|
@@ -806,14 +806,14 @@ async function Ms(e, t) {
|
|
|
806
806
|
throw new Error(String(r.warning));
|
|
807
807
|
return r;
|
|
808
808
|
}
|
|
809
|
-
async function
|
|
809
|
+
async function Ms(e, t) {
|
|
810
810
|
const n = await S(
|
|
811
811
|
`${b}/scenario-instances/${e}/cancel/${t}/queue`,
|
|
812
812
|
{ ...g, method: "POST" }
|
|
813
813
|
);
|
|
814
814
|
return f(n, "停止队列失败");
|
|
815
815
|
}
|
|
816
|
-
async function
|
|
816
|
+
async function js(e) {
|
|
817
817
|
const t = await S(
|
|
818
818
|
`${b}/scenario-instances/${e}/executions`,
|
|
819
819
|
g
|
|
@@ -827,11 +827,11 @@ async function Sn(e, t = "") {
|
|
|
827
827
|
);
|
|
828
828
|
return f(r, "获取文件树失败");
|
|
829
829
|
}
|
|
830
|
-
async function
|
|
830
|
+
async function Ns() {
|
|
831
831
|
const e = await S(`${b}/workspace/env`, g);
|
|
832
832
|
return f(e, "获取环境信息失败");
|
|
833
833
|
}
|
|
834
|
-
async function
|
|
834
|
+
async function Us(e) {
|
|
835
835
|
const t = await S(
|
|
836
836
|
`${b}/scenario-instances/${e}/workspace/sync-from-prod`,
|
|
837
837
|
{
|
|
@@ -842,7 +842,7 @@ async function zs(e) {
|
|
|
842
842
|
);
|
|
843
843
|
return f(t, "同步失败");
|
|
844
844
|
}
|
|
845
|
-
async function
|
|
845
|
+
async function zs(e, t) {
|
|
846
846
|
const n = await S(
|
|
847
847
|
`${b}/scenario-instances/${e}/workspace/file?file_path=${encodeURIComponent(
|
|
848
848
|
t
|
|
@@ -851,7 +851,7 @@ async function Ls(e, t) {
|
|
|
851
851
|
);
|
|
852
852
|
return f(n, "获取文件内容失败");
|
|
853
853
|
}
|
|
854
|
-
async function
|
|
854
|
+
async function Ls(e, t, n) {
|
|
855
855
|
const r = await S(
|
|
856
856
|
`${b}/scenario-instances/${e}/workspace/file?file_path=${encodeURIComponent(
|
|
857
857
|
t
|
|
@@ -865,7 +865,7 @@ async function Ds(e, t, n) {
|
|
|
865
865
|
);
|
|
866
866
|
return f(r, "保存文件失败");
|
|
867
867
|
}
|
|
868
|
-
async function
|
|
868
|
+
async function Ds(e, t, n) {
|
|
869
869
|
const r = await S(
|
|
870
870
|
`${b}/scenario-instances/${e}/workspace/rename`,
|
|
871
871
|
{
|
|
@@ -877,7 +877,7 @@ async function Fs(e, t, n) {
|
|
|
877
877
|
);
|
|
878
878
|
return f(r, "重命名失败");
|
|
879
879
|
}
|
|
880
|
-
async function
|
|
880
|
+
async function Fs(e, t, n) {
|
|
881
881
|
const r = await S(
|
|
882
882
|
`${b}/scenario-instances/${e}/workspace/new-file`,
|
|
883
883
|
{
|
|
@@ -889,7 +889,7 @@ async function qs(e, t, n) {
|
|
|
889
889
|
);
|
|
890
890
|
return f(r, "新建文件失败");
|
|
891
891
|
}
|
|
892
|
-
async function
|
|
892
|
+
async function qs(e, t, n) {
|
|
893
893
|
const r = await S(
|
|
894
894
|
`${b}/scenario-instances/${e}/workspace/new-folder`,
|
|
895
895
|
{
|
|
@@ -901,7 +901,7 @@ async function Bs(e, t, n) {
|
|
|
901
901
|
);
|
|
902
902
|
return f(r, "新建文件夹失败");
|
|
903
903
|
}
|
|
904
|
-
async function
|
|
904
|
+
async function Bs(e, t) {
|
|
905
905
|
const n = await S(
|
|
906
906
|
`${b}/scenario-instances/${e}/workspace/delete`,
|
|
907
907
|
{
|
|
@@ -913,7 +913,7 @@ async function Hs(e, t) {
|
|
|
913
913
|
);
|
|
914
914
|
return f(n, "删除失败");
|
|
915
915
|
}
|
|
916
|
-
async function
|
|
916
|
+
async function Hs(e, t, n) {
|
|
917
917
|
const r = new FormData();
|
|
918
918
|
r.append("file", n), r.append("parent_path", t);
|
|
919
919
|
const s = await S(
|
|
@@ -926,7 +926,7 @@ async function Ks(e, t, n) {
|
|
|
926
926
|
);
|
|
927
927
|
return f(s, "上传文件失败");
|
|
928
928
|
}
|
|
929
|
-
async function
|
|
929
|
+
async function Ks(e, t, n) {
|
|
930
930
|
const r = new FormData();
|
|
931
931
|
n.forEach((o) => r.append("files", o)), r.append("parent_path", t);
|
|
932
932
|
const s = await S(
|
|
@@ -939,7 +939,7 @@ async function Gs(e, t, n) {
|
|
|
939
939
|
);
|
|
940
940
|
return f(s, "上传文件夹失败");
|
|
941
941
|
}
|
|
942
|
-
async function
|
|
942
|
+
async function Gs(e, t) {
|
|
943
943
|
const n = await S(
|
|
944
944
|
`${b}/scenario-instances/${e}/workspace/download?file_path=${encodeURIComponent(
|
|
945
945
|
t
|
|
@@ -949,7 +949,7 @@ async function Js(e, t) {
|
|
|
949
949
|
if (!n.ok) throw new Error("下载失败");
|
|
950
950
|
return n.blob();
|
|
951
951
|
}
|
|
952
|
-
async function
|
|
952
|
+
async function Js(e, t = "") {
|
|
953
953
|
const n = t ? `?token=${encodeURIComponent(t)}` : "", r = await S(
|
|
954
954
|
`${b}/scenario-instances/${e}${n}`,
|
|
955
955
|
g
|
|
@@ -959,8 +959,8 @@ async function Vs(e, t = "") {
|
|
|
959
959
|
scenarioInstance: i ? Ae(i) : null
|
|
960
960
|
};
|
|
961
961
|
}
|
|
962
|
-
async function
|
|
963
|
-
const n = await
|
|
962
|
+
async function Vs(e, t = "") {
|
|
963
|
+
const n = await Js(e, t);
|
|
964
964
|
if (n.status === "NOT_FOUND" || !n.scenarioInstance)
|
|
965
965
|
throw {
|
|
966
966
|
_apiUserError: !0,
|
|
@@ -969,7 +969,7 @@ async function Ws(e, t = "") {
|
|
|
969
969
|
};
|
|
970
970
|
return n.scenarioInstance;
|
|
971
971
|
}
|
|
972
|
-
async function
|
|
972
|
+
async function Ws(e, t = "") {
|
|
973
973
|
const n = t ? `?token=${encodeURIComponent(t)}` : "", r = await S(
|
|
974
974
|
`${b}/scenario-instances/${e}/join-self${n}`,
|
|
975
975
|
{
|
|
@@ -979,17 +979,17 @@ async function Zs(e, t = "") {
|
|
|
979
979
|
), s = await f(r, "加入工程失败");
|
|
980
980
|
return Ae(s);
|
|
981
981
|
}
|
|
982
|
-
async function
|
|
983
|
-
return await
|
|
982
|
+
async function Zs(e, t = "") {
|
|
983
|
+
return await Vs(e, t), Ws(e, t);
|
|
984
984
|
}
|
|
985
|
-
async function
|
|
985
|
+
async function Xs(e) {
|
|
986
986
|
const t = await S(`${b}/scenario-instances/${e}`, {
|
|
987
987
|
...g,
|
|
988
988
|
method: "DELETE"
|
|
989
989
|
});
|
|
990
990
|
return f(t, "删除项目失败");
|
|
991
991
|
}
|
|
992
|
-
async function
|
|
992
|
+
async function Ys(e, t, n = "") {
|
|
993
993
|
const r = n ? `?token=${encodeURIComponent(n)}` : "", s = await S(
|
|
994
994
|
`${b}/scenario-instances/${e}/fork${r}`,
|
|
995
995
|
{
|
|
@@ -1001,7 +1001,7 @@ async function Qs(e, t, n = "") {
|
|
|
1001
1001
|
), o = await f(s, "Fork 项目失败");
|
|
1002
1002
|
return Ae(o);
|
|
1003
1003
|
}
|
|
1004
|
-
async function
|
|
1004
|
+
async function Qs(e, t) {
|
|
1005
1005
|
const n = await S(`${b}/scenario-instances/${e}`, {
|
|
1006
1006
|
...g,
|
|
1007
1007
|
method: "PATCH",
|
|
@@ -1010,7 +1010,7 @@ async function ea(e, t) {
|
|
|
1010
1010
|
}), r = await f(n, "更新项目失败");
|
|
1011
1011
|
return Ae(r);
|
|
1012
1012
|
}
|
|
1013
|
-
async function
|
|
1013
|
+
async function pi(e) {
|
|
1014
1014
|
const t = await S(
|
|
1015
1015
|
`${b}/scenario-instances/${e}/retry-image-parse`,
|
|
1016
1016
|
{
|
|
@@ -1024,7 +1024,7 @@ async function hi(e) {
|
|
|
1024
1024
|
message: r.message
|
|
1025
1025
|
};
|
|
1026
1026
|
}
|
|
1027
|
-
async function
|
|
1027
|
+
async function ea(e, t, n = "") {
|
|
1028
1028
|
const r = n ? `?token=${encodeURIComponent(n)}` : "", s = await S(
|
|
1029
1029
|
`${b}/scenario-instances/${e}/task-sessions/${t}${r}`,
|
|
1030
1030
|
{
|
|
@@ -1035,13 +1035,13 @@ async function ta(e, t, n = "") {
|
|
|
1035
1035
|
);
|
|
1036
1036
|
return f(s, "创建任务会话失败");
|
|
1037
1037
|
}
|
|
1038
|
-
async function
|
|
1038
|
+
async function ta(e, t, n = 50, r, s = "") {
|
|
1039
1039
|
let o = `${b}/scenario-instances/${e}/task-sessions/${t}/messages?limit=${n}`;
|
|
1040
1040
|
r && (o += `&before=${r}`), s && (o += `&token=${encodeURIComponent(s)}`);
|
|
1041
1041
|
const i = await S(o, g);
|
|
1042
1042
|
return f(i, "获取任务消息失败");
|
|
1043
1043
|
}
|
|
1044
|
-
async function
|
|
1044
|
+
async function na(e, t, n, r = "", s) {
|
|
1045
1045
|
const o = r ? `?token=${encodeURIComponent(r)}` : "", i = { content: n };
|
|
1046
1046
|
s && s.length > 0 && (i.image_urls = s);
|
|
1047
1047
|
const c = await S(
|
|
@@ -1055,11 +1055,11 @@ async function ra(e, t, n, r = "", s) {
|
|
|
1055
1055
|
);
|
|
1056
1056
|
return f(c, "发送任务消息失败");
|
|
1057
1057
|
}
|
|
1058
|
-
async function
|
|
1058
|
+
async function mi(e = "") {
|
|
1059
1059
|
const t = e ? `?token=${encodeURIComponent(e)}` : "", n = await S(`${b}/admin/scenarios${t}`, g);
|
|
1060
1060
|
return f(n, "获取场景列表失败");
|
|
1061
1061
|
}
|
|
1062
|
-
async function
|
|
1062
|
+
async function hi(e, t, n = "") {
|
|
1063
1063
|
const r = n ? `?token=${encodeURIComponent(n)}` : "", s = await S(
|
|
1064
1064
|
`${b}/admin/agents/${encodeURIComponent(
|
|
1065
1065
|
e
|
|
@@ -1073,14 +1073,14 @@ async function yi(e, t, n = "") {
|
|
|
1073
1073
|
);
|
|
1074
1074
|
return f(s, "测试登录失败");
|
|
1075
1075
|
}
|
|
1076
|
-
async function
|
|
1076
|
+
async function fi(e = "") {
|
|
1077
1077
|
const t = e ? `?token=${encodeURIComponent(e)}` : "", n = await S(
|
|
1078
1078
|
`${b}/admin/agents/identity-envs${t}`,
|
|
1079
1079
|
g
|
|
1080
1080
|
);
|
|
1081
1081
|
return f(n, "获取身份绑定环境列表失败");
|
|
1082
1082
|
}
|
|
1083
|
-
async function
|
|
1083
|
+
async function yi(e, t = "") {
|
|
1084
1084
|
const n = new URLSearchParams();
|
|
1085
1085
|
e && n.set("envCode", e), t && n.set("token", t);
|
|
1086
1086
|
const r = n.toString() ? `?${n.toString()}` : "", s = await S(
|
|
@@ -1089,7 +1089,7 @@ async function bi(e, t = "") {
|
|
|
1089
1089
|
);
|
|
1090
1090
|
return f(s, "获取成员列表失败") ?? [];
|
|
1091
1091
|
}
|
|
1092
|
-
async function
|
|
1092
|
+
async function gi(e, t, n = "") {
|
|
1093
1093
|
const r = n ? `?token=${encodeURIComponent(n)}` : "", s = await S(`${b}/admin/agents/${e}/move${r}`, {
|
|
1094
1094
|
...g,
|
|
1095
1095
|
method: "POST",
|
|
@@ -1098,7 +1098,7 @@ async function Si(e, t, n = "") {
|
|
|
1098
1098
|
});
|
|
1099
1099
|
return f(s, "移动 Agent 分类失败");
|
|
1100
1100
|
}
|
|
1101
|
-
async function
|
|
1101
|
+
async function bi(e = "") {
|
|
1102
1102
|
const t = e ? `?token=${encodeURIComponent(e)}` : "", n = await S(`${b}/admin/agents/models${t}`, g);
|
|
1103
1103
|
return f(n, "获取模型列表失败");
|
|
1104
1104
|
}
|
|
@@ -1106,7 +1106,7 @@ function tn(e) {
|
|
|
1106
1106
|
const t = Object.entries(e).filter(([, n]) => n !== void 0 && n !== "").map(([n, r]) => `${n}=${encodeURIComponent(r)}`);
|
|
1107
1107
|
return t.length ? `?${t.join("&")}` : "";
|
|
1108
1108
|
}
|
|
1109
|
-
async function
|
|
1109
|
+
async function Si(e, t = "") {
|
|
1110
1110
|
const n = await S(
|
|
1111
1111
|
`${b}/admin/agents/${encodeURIComponent(
|
|
1112
1112
|
e
|
|
@@ -1121,7 +1121,7 @@ async function _i(e, t = "") {
|
|
|
1121
1121
|
nodeInfo: { ...s.nodeInfo, dataPrepareEnabled: !1 }
|
|
1122
1122
|
}));
|
|
1123
1123
|
}
|
|
1124
|
-
async function
|
|
1124
|
+
async function wi(e, t = "") {
|
|
1125
1125
|
const n = await S(
|
|
1126
1126
|
`${b}/admin/agents/ontology/ontologies${tn({
|
|
1127
1127
|
ontologyType: e,
|
|
@@ -1131,7 +1131,7 @@ async function Ti(e, t = "") {
|
|
|
1131
1131
|
);
|
|
1132
1132
|
return f(n, "获取本体列表失败") ?? [];
|
|
1133
1133
|
}
|
|
1134
|
-
async function
|
|
1134
|
+
async function _i(e, t = "") {
|
|
1135
1135
|
const n = await S(
|
|
1136
1136
|
`${b}/admin/agents/ontology/knowledges${tn({
|
|
1137
1137
|
ontologyCode: e,
|
|
@@ -1141,7 +1141,7 @@ async function ki(e, t = "") {
|
|
|
1141
1141
|
);
|
|
1142
1142
|
return f(n, "获取知识列表失败") ?? [];
|
|
1143
1143
|
}
|
|
1144
|
-
async function
|
|
1144
|
+
async function Ti(e, t, n = "") {
|
|
1145
1145
|
const r = n ? `?token=${encodeURIComponent(n)}` : "", s = await S(`${b}/admin/skills/${e}/move${r}`, {
|
|
1146
1146
|
...g,
|
|
1147
1147
|
method: "POST",
|
|
@@ -1150,7 +1150,7 @@ async function Ii(e, t, n = "") {
|
|
|
1150
1150
|
});
|
|
1151
1151
|
return f(s, "移动 Skill 分类失败");
|
|
1152
1152
|
}
|
|
1153
|
-
async function
|
|
1153
|
+
async function ki(e = "", t = "") {
|
|
1154
1154
|
const n = new URLSearchParams();
|
|
1155
1155
|
e && n.append("keyword", e), t && n.append("token", t);
|
|
1156
1156
|
const r = n.toString() ? `?${n.toString()}` : "", s = await S(
|
|
@@ -1159,13 +1159,13 @@ async function Ci(e = "", t = "") {
|
|
|
1159
1159
|
);
|
|
1160
1160
|
return f(s, "获取员工列表失败");
|
|
1161
1161
|
}
|
|
1162
|
-
async function
|
|
1162
|
+
async function Ii(e, t, n = "", r = "") {
|
|
1163
1163
|
const s = new URLSearchParams();
|
|
1164
1164
|
s.append("profileScope", e), s.append("memberType", t), n && s.append("scenarioCode", n), r && s.append("token", r);
|
|
1165
1165
|
const o = s.toString() ? `?${s.toString()}` : "", i = await S(`${b}/admin/profiles${o}`, g);
|
|
1166
1166
|
return f(i, "获取画像列表失败");
|
|
1167
1167
|
}
|
|
1168
|
-
async function
|
|
1168
|
+
async function Ci(e, t = "") {
|
|
1169
1169
|
const n = t ? `?token=${encodeURIComponent(t)}` : "", r = await S(`${b}/admin/profiles${n}`, {
|
|
1170
1170
|
...g,
|
|
1171
1171
|
method: "POST",
|
|
@@ -1174,7 +1174,7 @@ async function $i(e, t = "") {
|
|
|
1174
1174
|
});
|
|
1175
1175
|
return f(r, "保存画像失败");
|
|
1176
1176
|
}
|
|
1177
|
-
async function
|
|
1177
|
+
async function Ai(e, t, n, r = "", s = "") {
|
|
1178
1178
|
const o = new URLSearchParams();
|
|
1179
1179
|
r && o.append("scenarioCode", r), s && o.append("token", s);
|
|
1180
1180
|
const i = o.toString() ? `?${o.toString()}` : "", c = await S(
|
|
@@ -1188,13 +1188,13 @@ async function xi(e, t, n, r = "", s = "") {
|
|
|
1188
1188
|
);
|
|
1189
1189
|
return f(c, "删除画像失败");
|
|
1190
1190
|
}
|
|
1191
|
-
async function
|
|
1191
|
+
async function $i(e = "", t = "") {
|
|
1192
1192
|
const n = new URLSearchParams();
|
|
1193
1193
|
e && n.append("scenarioCode", e), t && n.append("token", t);
|
|
1194
1194
|
const r = n.toString() ? `?${n.toString()}` : "", s = await S(`${b}/admin/human-on-calls${r}`, g);
|
|
1195
1195
|
return f(s, "获取值班信息失败");
|
|
1196
1196
|
}
|
|
1197
|
-
async function
|
|
1197
|
+
async function xi(e, t, n, r = "") {
|
|
1198
1198
|
const s = r ? `?token=${encodeURIComponent(r)}` : "", o = await S(`${b}/admin/human-on-calls/batch${s}`, {
|
|
1199
1199
|
...g,
|
|
1200
1200
|
method: "POST",
|
|
@@ -1203,7 +1203,7 @@ async function Pi(e, t, n, r = "") {
|
|
|
1203
1203
|
});
|
|
1204
1204
|
return f(o, "保存值班信息失败");
|
|
1205
1205
|
}
|
|
1206
|
-
async function
|
|
1206
|
+
async function vi(e, t, n, r = "") {
|
|
1207
1207
|
const s = r ? `?token=${encodeURIComponent(r)}` : "", o = await S(
|
|
1208
1208
|
`${b}/admin/human-on-calls/${encodeURIComponent(
|
|
1209
1209
|
e
|
|
@@ -1212,7 +1212,7 @@ async function Ei(e, t, n, r = "") {
|
|
|
1212
1212
|
);
|
|
1213
1213
|
return f(o, "删除值班信息失败");
|
|
1214
1214
|
}
|
|
1215
|
-
async function
|
|
1215
|
+
async function Pi(e = {}, t = "") {
|
|
1216
1216
|
const n = [];
|
|
1217
1217
|
e.scenarioCode && n.push(`scenario_code=${encodeURIComponent(e.scenarioCode)}`), e.status && n.push(`status=${encodeURIComponent(e.status)}`), t && n.push(`token=${encodeURIComponent(t)}`);
|
|
1218
1218
|
const r = n.length > 0 ? `?${n.join("&")}` : "", s = await S(
|
|
@@ -1224,7 +1224,7 @@ async function Ri(e = {}, t = "") {
|
|
|
1224
1224
|
);
|
|
1225
1225
|
return f(s, "全量刷新技能失败");
|
|
1226
1226
|
}
|
|
1227
|
-
async function
|
|
1227
|
+
async function Ei(e, t = "") {
|
|
1228
1228
|
const n = t ? `?token=${encodeURIComponent(t)}` : "", r = await S(
|
|
1229
1229
|
`${b}/admin/scenario-instances/${e}/refresh-skills${n}`,
|
|
1230
1230
|
{
|
|
@@ -1258,11 +1258,11 @@ function nn(e) {
|
|
|
1258
1258
|
updateTime: e.update_time == null ? e.updateTime : String(e.update_time)
|
|
1259
1259
|
};
|
|
1260
1260
|
}
|
|
1261
|
-
async function
|
|
1261
|
+
async function Ri(e = "") {
|
|
1262
1262
|
const t = e ? `?token=${encodeURIComponent(e)}` : "", n = await S(`${b}/personal-agents${t}`, g), r = await f(n, "获取个人 Agent 列表失败");
|
|
1263
1263
|
return (Array.isArray(r) ? r : []).map((s) => nn(s));
|
|
1264
1264
|
}
|
|
1265
|
-
async function
|
|
1265
|
+
async function Oi(e, t = "") {
|
|
1266
1266
|
const n = t ? `?token=${encodeURIComponent(t)}` : "", r = await S(`${b}/personal-agents${n}`, {
|
|
1267
1267
|
...g,
|
|
1268
1268
|
method: "POST",
|
|
@@ -1273,7 +1273,7 @@ async function ji(e, t = "") {
|
|
|
1273
1273
|
await f(r, "创建个人 Agent 失败")
|
|
1274
1274
|
);
|
|
1275
1275
|
}
|
|
1276
|
-
async function
|
|
1276
|
+
async function Mi(e, t, n, r, s = "") {
|
|
1277
1277
|
const o = s ? `?token=${encodeURIComponent(s)}` : "", i = await S(`${b}/personal-agents/ensure${o}`, {
|
|
1278
1278
|
...g,
|
|
1279
1279
|
method: "POST",
|
|
@@ -1289,7 +1289,7 @@ async function Ni(e, t, n, r, s = "") {
|
|
|
1289
1289
|
await f(i, "创建个人 Agent 失败")
|
|
1290
1290
|
);
|
|
1291
1291
|
}
|
|
1292
|
-
async function
|
|
1292
|
+
async function ji(e, t = "") {
|
|
1293
1293
|
const n = t ? `?token=${encodeURIComponent(t)}` : "", r = await S(
|
|
1294
1294
|
`${b}/personal-agents/${e}/sessions${n}`,
|
|
1295
1295
|
g
|
|
@@ -1303,7 +1303,7 @@ async function Ui(e, t = "") {
|
|
|
1303
1303
|
userMeta: (s == null ? void 0 : s.userMeta) ?? {}
|
|
1304
1304
|
};
|
|
1305
1305
|
}
|
|
1306
|
-
async function
|
|
1306
|
+
async function Ni(e, t = "新会话", n = "", r) {
|
|
1307
1307
|
const s = n ? `?token=${encodeURIComponent(n)}` : "", o = await S(
|
|
1308
1308
|
`${b}/personal-agents/${e}/sessions${s}`,
|
|
1309
1309
|
{
|
|
@@ -1343,7 +1343,7 @@ function Ye(e) {
|
|
|
1343
1343
|
updateTime: i || void 0
|
|
1344
1344
|
};
|
|
1345
1345
|
}
|
|
1346
|
-
async function
|
|
1346
|
+
async function Ui(e, t = "") {
|
|
1347
1347
|
const n = t ? `&token=${encodeURIComponent(t)}` : "", r = await S(
|
|
1348
1348
|
`${b}/personal-agents/sessions/search?keyword=${encodeURIComponent(
|
|
1349
1349
|
e
|
|
@@ -1359,14 +1359,14 @@ async function Li(e, t = "") {
|
|
|
1359
1359
|
};
|
|
1360
1360
|
});
|
|
1361
1361
|
}
|
|
1362
|
-
async function
|
|
1362
|
+
async function zi(e = "") {
|
|
1363
1363
|
const t = e ? `?token=${encodeURIComponent(e)}` : "", n = await S(
|
|
1364
1364
|
`${b}/personal-agents/sessions/all${t}`,
|
|
1365
1365
|
g
|
|
1366
1366
|
), r = await f(n, "获取聊天记录失败");
|
|
1367
1367
|
return (Array.isArray(r) ? r : []).map(Ye);
|
|
1368
1368
|
}
|
|
1369
|
-
async function
|
|
1369
|
+
async function Li(e, t, n = "", r) {
|
|
1370
1370
|
const s = n ? `?token=${encodeURIComponent(n)}` : "", o = await S(
|
|
1371
1371
|
`${b}/personal-agents/${e}/sessions/${t}${s}`,
|
|
1372
1372
|
{
|
|
@@ -1382,25 +1382,25 @@ async function Fi(e, t, n = "", r) {
|
|
|
1382
1382
|
await f(o, "会话归组失败")
|
|
1383
1383
|
);
|
|
1384
1384
|
}
|
|
1385
|
-
async function
|
|
1385
|
+
async function Di(e) {
|
|
1386
1386
|
const t = e ? `?token=${encodeURIComponent(e)}` : "", n = await S(`${b}/personal-agents/models${t}`, g);
|
|
1387
1387
|
return f(n, "获取模型列表失败");
|
|
1388
1388
|
}
|
|
1389
|
-
async function
|
|
1389
|
+
async function Fi(e) {
|
|
1390
1390
|
const t = e ? `?token=${encodeURIComponent(e)}` : "", n = await S(
|
|
1391
1391
|
`${b}/personal-agents/custom-models${t}`,
|
|
1392
1392
|
g
|
|
1393
1393
|
);
|
|
1394
1394
|
return f(n, "获取自定义模型失败");
|
|
1395
1395
|
}
|
|
1396
|
-
async function
|
|
1396
|
+
async function qi(e, t, n = "") {
|
|
1397
1397
|
const r = n ? `?token=${encodeURIComponent(n)}` : "", s = await S(
|
|
1398
1398
|
`${b}/personal-agents/${e}/sessions/${t}${r}`,
|
|
1399
1399
|
{ ...g, method: "DELETE" }
|
|
1400
1400
|
);
|
|
1401
1401
|
return f(s, "删除会话失败");
|
|
1402
1402
|
}
|
|
1403
|
-
async function
|
|
1403
|
+
async function Bi(e, t, n, r = "") {
|
|
1404
1404
|
const s = r ? `?token=${encodeURIComponent(r)}` : "", o = await S(
|
|
1405
1405
|
`${b}/personal-agents/${e}/sessions/${t}${s}`,
|
|
1406
1406
|
{
|
|
@@ -1412,14 +1412,14 @@ async function Ki(e, t, n, r = "") {
|
|
|
1412
1412
|
);
|
|
1413
1413
|
return f(o, "重命名会话失败");
|
|
1414
1414
|
}
|
|
1415
|
-
async function
|
|
1415
|
+
async function Hi(e, t, n = "") {
|
|
1416
1416
|
const r = n ? `?token=${encodeURIComponent(n)}` : "", s = await S(
|
|
1417
1417
|
`${b}/personal-agents/${e}/sessions/${t}/messages${r}`,
|
|
1418
1418
|
g
|
|
1419
1419
|
);
|
|
1420
1420
|
return f(s, "获取消息历史失败");
|
|
1421
1421
|
}
|
|
1422
|
-
async function
|
|
1422
|
+
async function Ki(e, t, n, r, s, o, i, c, l, d) {
|
|
1423
1423
|
const u = r ? `?token=${encodeURIComponent(r)}` : "", h = `${b}/personal-agents/${e}/sessions/${t}/chat/stream${u}`;
|
|
1424
1424
|
try {
|
|
1425
1425
|
const m = await fetch(h, {
|
|
@@ -1474,13 +1474,13 @@ async function Ji(e, t, n, r, s, o, i, c, l, d) {
|
|
|
1474
1474
|
o(m instanceof Error ? m : new Error(String(m)));
|
|
1475
1475
|
}
|
|
1476
1476
|
}
|
|
1477
|
-
const
|
|
1478
|
-
async function
|
|
1479
|
-
await fetch(`${
|
|
1477
|
+
const ra = "http://127.0.0.1:28080";
|
|
1478
|
+
async function Gi(e) {
|
|
1479
|
+
await fetch(`${ra}/v1/sessions/${e}`, {
|
|
1480
1480
|
method: "DELETE"
|
|
1481
1481
|
});
|
|
1482
1482
|
}
|
|
1483
|
-
async function
|
|
1483
|
+
async function Ji(e = {}) {
|
|
1484
1484
|
const t = new URLSearchParams(), { name: n, scenarioInstanceId: r, page: s = 1, size: o = 50, token: i = "" } = e;
|
|
1485
1485
|
n && t.set("name", n), r != null && r !== "" && t.set("scenarioInstanceId", String(r)), t.set("page", String(s)), t.set("size", String(o)), i && t.set("token", i);
|
|
1486
1486
|
const c = t.toString(), l = await S(
|
|
@@ -1489,7 +1489,7 @@ async function Wi(e = {}) {
|
|
|
1489
1489
|
);
|
|
1490
1490
|
return f(l, "获取任务列表失败");
|
|
1491
1491
|
}
|
|
1492
|
-
function
|
|
1492
|
+
function sa(e) {
|
|
1493
1493
|
const t = new URLSearchParams();
|
|
1494
1494
|
Object.entries(e).forEach(([r, s]) => {
|
|
1495
1495
|
s != null && s !== "" && t.append(r, String(s));
|
|
@@ -1497,14 +1497,14 @@ function aa(e) {
|
|
|
1497
1497
|
const n = t.toString();
|
|
1498
1498
|
return n ? `?${n}` : "";
|
|
1499
1499
|
}
|
|
1500
|
-
async function
|
|
1500
|
+
async function Vi(e) {
|
|
1501
1501
|
const t = await S(
|
|
1502
|
-
`${b}/admin/tool-call-logs/timeline${
|
|
1502
|
+
`${b}/admin/tool-call-logs/timeline${sa(e)}`,
|
|
1503
1503
|
g
|
|
1504
1504
|
);
|
|
1505
1505
|
return f(t, "查询工具调用时间轴统计失败");
|
|
1506
1506
|
}
|
|
1507
|
-
async function
|
|
1507
|
+
async function Wi(e) {
|
|
1508
1508
|
const t = [];
|
|
1509
1509
|
e.date && t.push(`date=${encodeURIComponent(e.date)}`), e.scenarioCode && t.push(`scenarioCode=${encodeURIComponent(e.scenarioCode)}`), e.token && t.push(`token=${encodeURIComponent(e.token)}`);
|
|
1510
1510
|
const n = t.length > 0 ? `?${t.join("&")}` : "", r = await S(
|
|
@@ -1513,14 +1513,14 @@ async function Xi(e) {
|
|
|
1513
1513
|
);
|
|
1514
1514
|
return f(r, "获取 Token 单日统计失败");
|
|
1515
1515
|
}
|
|
1516
|
-
async function
|
|
1516
|
+
async function Zi(e = "z-team") {
|
|
1517
1517
|
const t = await S(
|
|
1518
1518
|
`${b}/change-log/versions?repo=${encodeURIComponent(e)}`,
|
|
1519
1519
|
g
|
|
1520
1520
|
);
|
|
1521
1521
|
return f(t, "获取变更日志版本列表失败");
|
|
1522
1522
|
}
|
|
1523
|
-
async function
|
|
1523
|
+
async function Xi(e, t, n = "z-team") {
|
|
1524
1524
|
const r = new URLSearchParams();
|
|
1525
1525
|
e != null && r.set("versionId", String(e)), r.set("repo", n);
|
|
1526
1526
|
const s = await S(
|
|
@@ -1529,9 +1529,9 @@ async function Qi(e, t, n = "z-team") {
|
|
|
1529
1529
|
);
|
|
1530
1530
|
return f(s, "获取变更日志详情失败");
|
|
1531
1531
|
}
|
|
1532
|
-
async function
|
|
1532
|
+
async function Yi(e) {
|
|
1533
1533
|
const t = await S(
|
|
1534
|
-
`${
|
|
1534
|
+
`${us}/evolution/records/${e}/reset`,
|
|
1535
1535
|
{ ...g, method: "POST" }
|
|
1536
1536
|
);
|
|
1537
1537
|
return f(t, "操作失败");
|
|
@@ -1544,7 +1544,7 @@ function ae(e) {
|
|
|
1544
1544
|
const n = t.toString();
|
|
1545
1545
|
return n ? `?${n}` : "";
|
|
1546
1546
|
}
|
|
1547
|
-
async function
|
|
1547
|
+
async function Qi(e) {
|
|
1548
1548
|
const t = await S(
|
|
1549
1549
|
`${b}/admin/qa-eval/closed-instances${ae({
|
|
1550
1550
|
close_date: e.closeDate,
|
|
@@ -1560,7 +1560,7 @@ async function tc(e) {
|
|
|
1560
1560
|
);
|
|
1561
1561
|
return Array.isArray(n == null ? void 0 : n.list) ? n.list : [];
|
|
1562
1562
|
}
|
|
1563
|
-
async function
|
|
1563
|
+
async function ec(e) {
|
|
1564
1564
|
const t = await S(
|
|
1565
1565
|
`${b}/admin/qa-eval/overview${ae({
|
|
1566
1566
|
close_date: e.closeDate,
|
|
@@ -1573,7 +1573,7 @@ async function nc(e) {
|
|
|
1573
1573
|
);
|
|
1574
1574
|
return f(t, "获取 QA 评测总览失败");
|
|
1575
1575
|
}
|
|
1576
|
-
async function
|
|
1576
|
+
async function tc(e, t = "") {
|
|
1577
1577
|
const n = await S(
|
|
1578
1578
|
`${b}/admin/qa-eval/report/${e}/cancel${ae({
|
|
1579
1579
|
token: t
|
|
@@ -1582,7 +1582,7 @@ async function rc(e, t = "") {
|
|
|
1582
1582
|
);
|
|
1583
1583
|
return f(n, "取消评测失败");
|
|
1584
1584
|
}
|
|
1585
|
-
async function
|
|
1585
|
+
async function nc(e, t, n = "") {
|
|
1586
1586
|
const r = n ? `?token=${encodeURIComponent(n)}` : "", s = await S(
|
|
1587
1587
|
`${b}/admin/scenario-templates/preview${r}`,
|
|
1588
1588
|
{
|
|
@@ -1595,14 +1595,14 @@ async function sc(e, t, n = "") {
|
|
|
1595
1595
|
if (!s.ok) throw new Error(`HTTP ${s.status}`);
|
|
1596
1596
|
return s.text();
|
|
1597
1597
|
}
|
|
1598
|
-
async function
|
|
1598
|
+
async function rc(e, t = "") {
|
|
1599
1599
|
const n = t ? `?token=${encodeURIComponent(t)}` : "", r = await S(
|
|
1600
1600
|
`${b}/tasks/${e}/human-assist${n}`,
|
|
1601
1601
|
{ ...g, method: "GET" }
|
|
1602
1602
|
);
|
|
1603
1603
|
return f(r, "查询人机协助卡片失败");
|
|
1604
1604
|
}
|
|
1605
|
-
async function
|
|
1605
|
+
async function sc(e, t, n, r = "") {
|
|
1606
1606
|
const s = r ? `?token=${encodeURIComponent(r)}` : "", o = await S(
|
|
1607
1607
|
`${b}/scenario-instances/${e}/card-forms/${t}/submit${s}`,
|
|
1608
1608
|
{
|
|
@@ -1614,7 +1614,7 @@ async function oc(e, t, n, r = "") {
|
|
|
1614
1614
|
);
|
|
1615
1615
|
return f(o, "提交卡片表单失败");
|
|
1616
1616
|
}
|
|
1617
|
-
async function
|
|
1617
|
+
async function ac(e, t, n = "") {
|
|
1618
1618
|
const r = n ? `?token=${encodeURIComponent(n)}` : "", s = await S(
|
|
1619
1619
|
`${b}/tasks/${e}/submit-assist${r}`,
|
|
1620
1620
|
{
|
|
@@ -1626,17 +1626,17 @@ async function ic(e, t, n = "") {
|
|
|
1626
1626
|
);
|
|
1627
1627
|
return f(s, "提交人机协助任务失败");
|
|
1628
1628
|
}
|
|
1629
|
-
function
|
|
1629
|
+
function oc(e) {
|
|
1630
1630
|
return webIdeFetch(`/instances/${e}`, { method: "DELETE" });
|
|
1631
1631
|
}
|
|
1632
|
-
async function
|
|
1632
|
+
async function ic(e = "") {
|
|
1633
1633
|
const t = await S(
|
|
1634
1634
|
`${b}/admin/runtime-monitor/schedule${ae({ token: e })}`,
|
|
1635
1635
|
g
|
|
1636
1636
|
);
|
|
1637
1637
|
return f(t, "查询定时任务概览失败");
|
|
1638
1638
|
}
|
|
1639
|
-
async function
|
|
1639
|
+
async function cc(e) {
|
|
1640
1640
|
const t = new URLSearchParams();
|
|
1641
1641
|
t.set("scenarioCode", e.scenarioCode), e.startDate && t.set("startDate", e.startDate), e.endDate && t.set("endDate", e.endDate), e.creatorId && t.set("creatorId", e.creatorId), e.tagFilters && Object.keys(e.tagFilters).length > 0 && t.set("tagFilters", JSON.stringify(e.tagFilters)), e.groupBy && t.set("groupBy", e.groupBy), e.token && t.set("token", e.token);
|
|
1642
1642
|
const n = await S(
|
|
@@ -1653,7 +1653,7 @@ async function dc(e) {
|
|
|
1653
1653
|
activeCreators: (r == null ? void 0 : r.activeCreators) ?? void 0
|
|
1654
1654
|
};
|
|
1655
1655
|
}
|
|
1656
|
-
async function
|
|
1656
|
+
async function lc(e, t = "") {
|
|
1657
1657
|
const n = t ? `?token=${encodeURIComponent(t)}` : "", r = await S(
|
|
1658
1658
|
`${b}/admin/scenario-tags/values/${e}${n}`,
|
|
1659
1659
|
{
|
|
@@ -1663,7 +1663,7 @@ async function uc(e, t = "") {
|
|
|
1663
1663
|
);
|
|
1664
1664
|
return f(r, "删除标签值失败");
|
|
1665
1665
|
}
|
|
1666
|
-
async function
|
|
1666
|
+
async function dc(e, t, n) {
|
|
1667
1667
|
const r = await S(
|
|
1668
1668
|
`${b}/scenario-instances/${e}/workspace/git-clone`,
|
|
1669
1669
|
{
|
|
@@ -1680,21 +1680,21 @@ async function pc(e, t, n) {
|
|
|
1680
1680
|
);
|
|
1681
1681
|
return f(r, "Git Clone 失败");
|
|
1682
1682
|
}
|
|
1683
|
-
async function
|
|
1683
|
+
async function uc() {
|
|
1684
1684
|
const e = await S(
|
|
1685
1685
|
`${b}/scenarios/biz-consult-domains`,
|
|
1686
1686
|
g
|
|
1687
1687
|
);
|
|
1688
1688
|
return f(e, "获取业务域选项失败");
|
|
1689
1689
|
}
|
|
1690
|
-
async function
|
|
1690
|
+
async function pc(e = "") {
|
|
1691
1691
|
const t = e ? `?token=${encodeURIComponent(e)}` : "", n = await S(
|
|
1692
1692
|
`${b}/admin/statistics/current-dept${t}`,
|
|
1693
1693
|
g
|
|
1694
1694
|
);
|
|
1695
1695
|
return f(n, "获取当前用户部门信息失败");
|
|
1696
1696
|
}
|
|
1697
|
-
function
|
|
1697
|
+
function aa(e) {
|
|
1698
1698
|
const t = new URLSearchParams();
|
|
1699
1699
|
Object.entries(e).forEach(([r, s]) => {
|
|
1700
1700
|
s != null && s !== "" && t.append(r, String(s));
|
|
@@ -1702,9 +1702,9 @@ function oa(e) {
|
|
|
1702
1702
|
const n = t.toString();
|
|
1703
1703
|
return n ? `?${n}` : "";
|
|
1704
1704
|
}
|
|
1705
|
-
async function
|
|
1705
|
+
async function mc(e) {
|
|
1706
1706
|
const t = await S(
|
|
1707
|
-
`${b}/admin/evaluation/instances/${e.id}/snapshot-preview${
|
|
1707
|
+
`${b}/admin/evaluation/instances/${e.id}/snapshot-preview${aa({
|
|
1708
1708
|
section: e.section,
|
|
1709
1709
|
page: e.page,
|
|
1710
1710
|
size: e.size,
|
|
@@ -1715,10 +1715,10 @@ async function fc(e) {
|
|
|
1715
1715
|
);
|
|
1716
1716
|
return f(t, "获取快照预览失败");
|
|
1717
1717
|
}
|
|
1718
|
-
const
|
|
1719
|
-
async function
|
|
1718
|
+
const oa = typeof window < "u" && window.ZTEAM_WEBIDE_ADMIN_BASE || "http://localhost/kapi/webide/admin";
|
|
1719
|
+
async function ia(e, t) {
|
|
1720
1720
|
try {
|
|
1721
|
-
const n = await fetch(`${
|
|
1721
|
+
const n = await fetch(`${oa}${e}`, {
|
|
1722
1722
|
credentials: "include",
|
|
1723
1723
|
headers: {
|
|
1724
1724
|
Accept: "application/json",
|
|
@@ -1731,11 +1731,11 @@ async function ca(e, t) {
|
|
|
1731
1731
|
return {};
|
|
1732
1732
|
}
|
|
1733
1733
|
}
|
|
1734
|
-
function
|
|
1735
|
-
return
|
|
1734
|
+
function hc(e) {
|
|
1735
|
+
return ia(`/presets/${e}`, { method: "DELETE" });
|
|
1736
1736
|
}
|
|
1737
|
-
const
|
|
1738
|
-
async function
|
|
1737
|
+
const fc = tr;
|
|
1738
|
+
async function yc(e) {
|
|
1739
1739
|
const t = new FormData();
|
|
1740
1740
|
t.append("file", e);
|
|
1741
1741
|
const n = await S(`${b}/common/upload-video`, {
|
|
@@ -1748,11 +1748,11 @@ async function bc(e) {
|
|
|
1748
1748
|
}
|
|
1749
1749
|
return s;
|
|
1750
1750
|
}
|
|
1751
|
-
function
|
|
1751
|
+
function gc() {
|
|
1752
1752
|
const e = "登录已失效,请重新登录";
|
|
1753
1753
|
throw _e(e), { _apiUserError: !0, userMessage: e, message: e };
|
|
1754
1754
|
}
|
|
1755
|
-
async function
|
|
1755
|
+
async function bc(e) {
|
|
1756
1756
|
const t = await S(
|
|
1757
1757
|
`${b}/scenario-instances/${e}/interaction-mode`,
|
|
1758
1758
|
{ ...g }
|
|
@@ -1762,7 +1762,7 @@ async function wc(e) {
|
|
|
1762
1762
|
);
|
|
1763
1763
|
return (n == null ? void 0 : n.mode) ?? "dispatch";
|
|
1764
1764
|
}
|
|
1765
|
-
async function
|
|
1765
|
+
async function Sc(e, t) {
|
|
1766
1766
|
const n = await S(
|
|
1767
1767
|
`${b}/scenario-instances/${e}/interaction-mode`,
|
|
1768
1768
|
{
|
|
@@ -1777,21 +1777,21 @@ async function _c(e, t) {
|
|
|
1777
1777
|
);
|
|
1778
1778
|
return (r == null ? void 0 : r.mode) ?? t;
|
|
1779
1779
|
}
|
|
1780
|
-
async function
|
|
1780
|
+
async function wc(e = "") {
|
|
1781
1781
|
const t = e ? `?token=${encodeURIComponent(e)}` : "", n = await S(
|
|
1782
1782
|
`${b}/admin/indexer/overview${t}`,
|
|
1783
1783
|
Ce()
|
|
1784
1784
|
);
|
|
1785
1785
|
return f(n, "获取索引概览失败");
|
|
1786
1786
|
}
|
|
1787
|
-
async function
|
|
1787
|
+
async function _c(e = "") {
|
|
1788
1788
|
const t = e ? `?token=${encodeURIComponent(e)}` : "", n = await S(`${b}/admin/indexer/repos${t}`, Ce()), r = await f(
|
|
1789
1789
|
n,
|
|
1790
1790
|
"获取索引仓库列表失败"
|
|
1791
1791
|
);
|
|
1792
1792
|
return Array.isArray(r == null ? void 0 : r.repos) ? r.repos : [];
|
|
1793
1793
|
}
|
|
1794
|
-
async function
|
|
1794
|
+
async function Tc(e, t = "") {
|
|
1795
1795
|
const n = t ? `?token=${encodeURIComponent(t)}` : "", r = await S(`${b}/admin/indexer/repos${n}`, Ce({
|
|
1796
1796
|
method: "POST",
|
|
1797
1797
|
headers: { "Content-Type": "application/json" },
|
|
@@ -1799,14 +1799,14 @@ async function Ic(e, t = "") {
|
|
|
1799
1799
|
}));
|
|
1800
1800
|
return f(r, "保存索引仓库失败");
|
|
1801
1801
|
}
|
|
1802
|
-
async function
|
|
1802
|
+
async function kc(e, t = "") {
|
|
1803
1803
|
const n = t ? `?token=${encodeURIComponent(t)}` : "", r = await S(
|
|
1804
1804
|
`${b}/admin/indexer/repos/${encodeURIComponent(e)}${n}`,
|
|
1805
1805
|
Ce({ method: "DELETE" })
|
|
1806
1806
|
);
|
|
1807
1807
|
return f(r, "删除索引仓库失败");
|
|
1808
1808
|
}
|
|
1809
|
-
async function
|
|
1809
|
+
async function Ic(e, t, n = "") {
|
|
1810
1810
|
const r = n ? `?token=${encodeURIComponent(n)}` : "", s = await S(
|
|
1811
1811
|
`${b}/admin/indexer/repos/${encodeURIComponent(
|
|
1812
1812
|
e
|
|
@@ -1819,7 +1819,7 @@ async function Ac(e, t, n = "") {
|
|
|
1819
1819
|
);
|
|
1820
1820
|
return f(s, "切换仓库启停失败");
|
|
1821
1821
|
}
|
|
1822
|
-
async function
|
|
1822
|
+
async function Cc(e, t = "") {
|
|
1823
1823
|
const n = t ? `?token=${encodeURIComponent(t)}` : "", r = await S(
|
|
1824
1824
|
`${b}/admin/indexer/repos/${encodeURIComponent(
|
|
1825
1825
|
e
|
|
@@ -1828,13 +1828,13 @@ async function $c(e, t = "") {
|
|
|
1828
1828
|
);
|
|
1829
1829
|
return f(r, "触发重建失败");
|
|
1830
1830
|
}
|
|
1831
|
-
async function
|
|
1831
|
+
async function Ac(e = "") {
|
|
1832
1832
|
const t = e ? `?token=${encodeURIComponent(e)}` : "", n = await S(`${b}/admin/indexer/poll${t}`, Ce({
|
|
1833
1833
|
method: "POST"
|
|
1834
1834
|
}));
|
|
1835
1835
|
return f(n, "触发轮询失败");
|
|
1836
1836
|
}
|
|
1837
|
-
async function
|
|
1837
|
+
async function $c(e = "") {
|
|
1838
1838
|
const t = e ? `?token=${encodeURIComponent(e)}` : "", n = await S(
|
|
1839
1839
|
`${b}/admin/notify-channel/list${t}`,
|
|
1840
1840
|
g
|
|
@@ -1844,7 +1844,7 @@ async function vc(e = "") {
|
|
|
1844
1844
|
);
|
|
1845
1845
|
return Array.isArray(r == null ? void 0 : r.channels) ? r.channels : [];
|
|
1846
1846
|
}
|
|
1847
|
-
async function
|
|
1847
|
+
async function xc(e, t = "") {
|
|
1848
1848
|
const n = t ? `?token=${encodeURIComponent(t)}` : "", r = await S(`${b}/admin/notify-channel/test${n}`, {
|
|
1849
1849
|
...g,
|
|
1850
1850
|
method: "POST",
|
|
@@ -1853,7 +1853,7 @@ async function Pc(e, t = "") {
|
|
|
1853
1853
|
});
|
|
1854
1854
|
return f(r, "测试发送失败");
|
|
1855
1855
|
}
|
|
1856
|
-
async function
|
|
1856
|
+
async function vc(e, t = "") {
|
|
1857
1857
|
const n = await S(
|
|
1858
1858
|
`${b}/admin/schedule-task${ae({
|
|
1859
1859
|
token: t,
|
|
@@ -1865,7 +1865,7 @@ async function Ec(e, t = "") {
|
|
|
1865
1865
|
);
|
|
1866
1866
|
return f(n, "查询定时任务模版失败");
|
|
1867
1867
|
}
|
|
1868
|
-
async function
|
|
1868
|
+
async function Pc(e, t = "") {
|
|
1869
1869
|
const n = await S(
|
|
1870
1870
|
`${b}/admin/schedule-task${ae({ token: t })}`,
|
|
1871
1871
|
{
|
|
@@ -1877,7 +1877,7 @@ async function Rc(e, t = "") {
|
|
|
1877
1877
|
);
|
|
1878
1878
|
return f(n, "新建定时任务模版失败");
|
|
1879
1879
|
}
|
|
1880
|
-
async function
|
|
1880
|
+
async function Ec(e, t, n = "") {
|
|
1881
1881
|
const r = await S(
|
|
1882
1882
|
`${b}/admin/schedule-task/${encodeURIComponent(
|
|
1883
1883
|
e
|
|
@@ -1891,7 +1891,7 @@ async function Oc(e, t, n = "") {
|
|
|
1891
1891
|
);
|
|
1892
1892
|
return f(r, "更新定时任务模版失败");
|
|
1893
1893
|
}
|
|
1894
|
-
async function
|
|
1894
|
+
async function Rc(e, t, n = "") {
|
|
1895
1895
|
const r = await S(
|
|
1896
1896
|
`${b}/admin/schedule-task/${encodeURIComponent(
|
|
1897
1897
|
e
|
|
@@ -1905,7 +1905,7 @@ async function Mc(e, t, n = "") {
|
|
|
1905
1905
|
);
|
|
1906
1906
|
return f(r, "切换模版状态失败");
|
|
1907
1907
|
}
|
|
1908
|
-
async function
|
|
1908
|
+
async function Oc(e, t = "") {
|
|
1909
1909
|
const n = await S(
|
|
1910
1910
|
`${b}/admin/schedule-task/${encodeURIComponent(
|
|
1911
1911
|
e
|
|
@@ -1914,7 +1914,7 @@ async function jc(e, t = "") {
|
|
|
1914
1914
|
);
|
|
1915
1915
|
return f(n, "激活模版失败");
|
|
1916
1916
|
}
|
|
1917
|
-
async function
|
|
1917
|
+
async function Mc(e, t = "") {
|
|
1918
1918
|
const n = await S(
|
|
1919
1919
|
`${b}/admin/schedule-task/${encodeURIComponent(
|
|
1920
1920
|
e
|
|
@@ -1923,7 +1923,7 @@ async function Nc(e, t = "") {
|
|
|
1923
1923
|
);
|
|
1924
1924
|
return f(n, "删除模版失败");
|
|
1925
1925
|
}
|
|
1926
|
-
async function
|
|
1926
|
+
async function jc(e, t = "") {
|
|
1927
1927
|
const n = await S(
|
|
1928
1928
|
`${b}/admin/schedule-task/${encodeURIComponent(
|
|
1929
1929
|
e
|
|
@@ -1932,7 +1932,7 @@ async function Uc(e, t = "") {
|
|
|
1932
1932
|
);
|
|
1933
1933
|
return f(n, "手动执行失败");
|
|
1934
1934
|
}
|
|
1935
|
-
async function
|
|
1935
|
+
async function Nc(e, t = "") {
|
|
1936
1936
|
const n = await S(
|
|
1937
1937
|
`${b}/admin/schedule-task/history-all${ae({
|
|
1938
1938
|
token: t,
|
|
@@ -1944,7 +1944,7 @@ async function zc(e, t = "") {
|
|
|
1944
1944
|
);
|
|
1945
1945
|
return f(n, "查询运行记录失败");
|
|
1946
1946
|
}
|
|
1947
|
-
async function
|
|
1947
|
+
async function Uc(e, t, n, r, s = "") {
|
|
1948
1948
|
const o = s ? `?token=${encodeURIComponent(s)}` : "", i = await S(
|
|
1949
1949
|
`${b}/admin/permissions/users/${e}/roles${o}`,
|
|
1950
1950
|
{
|
|
@@ -1956,25 +1956,25 @@ async function Lc(e, t, n, r, s = "") {
|
|
|
1956
1956
|
);
|
|
1957
1957
|
return f(i, "更新用户角色失败");
|
|
1958
1958
|
}
|
|
1959
|
-
async function
|
|
1959
|
+
async function zc(e, t = "") {
|
|
1960
1960
|
const n = t ? `?token=${encodeURIComponent(t)}` : "", r = await S(
|
|
1961
1961
|
`${b}/admin/permissions/users/${e}/detail${n}`,
|
|
1962
1962
|
g
|
|
1963
1963
|
);
|
|
1964
1964
|
return f(r, "获取用户授权详情失败");
|
|
1965
1965
|
}
|
|
1966
|
-
async function
|
|
1966
|
+
async function Lc(e = "") {
|
|
1967
1967
|
const t = e ? `?token=${encodeURIComponent(e)}` : "", n = await S(`${b}/admin/roles${t}`, g);
|
|
1968
1968
|
return f(n, "获取角色列表失败") ?? [];
|
|
1969
1969
|
}
|
|
1970
|
-
async function
|
|
1970
|
+
async function Dc(e, t = "") {
|
|
1971
1971
|
const n = t ? `?token=${encodeURIComponent(t)}` : "", r = await S(
|
|
1972
1972
|
`${b}/admin/roles/${e}${n}`,
|
|
1973
1973
|
g
|
|
1974
1974
|
);
|
|
1975
1975
|
return f(r, "获取角色详情失败");
|
|
1976
1976
|
}
|
|
1977
|
-
async function
|
|
1977
|
+
async function Fc(e, t = "") {
|
|
1978
1978
|
const n = t ? `?token=${encodeURIComponent(t)}` : "", r = await S(`${b}/admin/roles${n}`, {
|
|
1979
1979
|
...g,
|
|
1980
1980
|
method: "POST",
|
|
@@ -1983,7 +1983,7 @@ async function Bc(e, t = "") {
|
|
|
1983
1983
|
});
|
|
1984
1984
|
return f(r, "创建角色失败");
|
|
1985
1985
|
}
|
|
1986
|
-
async function
|
|
1986
|
+
async function qc(e, t, n = "") {
|
|
1987
1987
|
const r = n ? `?token=${encodeURIComponent(n)}` : "", s = await S(`${b}/admin/roles/${e}${r}`, {
|
|
1988
1988
|
...g,
|
|
1989
1989
|
method: "PUT",
|
|
@@ -1992,14 +1992,14 @@ async function Hc(e, t, n = "") {
|
|
|
1992
1992
|
});
|
|
1993
1993
|
return f(s, "更新角色失败");
|
|
1994
1994
|
}
|
|
1995
|
-
async function
|
|
1995
|
+
async function Bc(e, t = "") {
|
|
1996
1996
|
const n = t ? `?token=${encodeURIComponent(t)}` : "", r = await S(`${b}/admin/roles/${e}${n}`, {
|
|
1997
1997
|
...g,
|
|
1998
1998
|
method: "DELETE"
|
|
1999
1999
|
});
|
|
2000
2000
|
return f(r, "删除角色失败");
|
|
2001
2001
|
}
|
|
2002
|
-
async function
|
|
2002
|
+
async function Hc(e, t, n = "") {
|
|
2003
2003
|
const r = n ? `?token=${encodeURIComponent(n)}` : "", s = await S(`${b}/admin/roles/${e}/users${r}`, {
|
|
2004
2004
|
...g,
|
|
2005
2005
|
method: "PUT",
|
|
@@ -2035,36 +2035,36 @@ function $t(e, t) {
|
|
|
2035
2035
|
return o === r || o.startsWith(`${r}(`);
|
|
2036
2036
|
});
|
|
2037
2037
|
}
|
|
2038
|
-
function
|
|
2038
|
+
function sr(e) {
|
|
2039
2039
|
return !!(e != null && e.is_global_admin);
|
|
2040
2040
|
}
|
|
2041
|
-
function
|
|
2042
|
-
return
|
|
2041
|
+
function Kc(e) {
|
|
2042
|
+
return sr(e);
|
|
2043
2043
|
}
|
|
2044
|
-
function
|
|
2044
|
+
function ca(e) {
|
|
2045
2045
|
var n;
|
|
2046
|
-
return ((n = e == null ? void 0 : e.scenario_code) == null ? void 0 : n.trim().toLowerCase()) ===
|
|
2046
|
+
return ((n = e == null ? void 0 : e.scenario_code) == null ? void 0 : n.trim().toLowerCase()) === ws;
|
|
2047
2047
|
}
|
|
2048
|
-
function
|
|
2049
|
-
return
|
|
2048
|
+
function ar(e, t) {
|
|
2049
|
+
return ca(e) && !sr(t);
|
|
2050
2050
|
}
|
|
2051
2051
|
function wn(e, t, n) {
|
|
2052
|
-
return
|
|
2052
|
+
return ar(e, t) || (n ?? (e == null ? void 0 : e.mode) ?? "build").trim().toLowerCase() === "plan" ? "plan" : "build";
|
|
2053
2053
|
}
|
|
2054
2054
|
function _t(e, t) {
|
|
2055
2055
|
if (e == null || t == null) return !1;
|
|
2056
2056
|
const n = Number(e), r = Number(t);
|
|
2057
2057
|
return !Number.isNaN(n) && !Number.isNaN(r) && n > 0 && n === r;
|
|
2058
2058
|
}
|
|
2059
|
-
function
|
|
2059
|
+
function or(e) {
|
|
2060
2060
|
return String(e.sender_type || "HUMAN").toUpperCase() === "HUMAN";
|
|
2061
2061
|
}
|
|
2062
|
-
function
|
|
2062
|
+
function la(e, t) {
|
|
2063
2063
|
var s;
|
|
2064
2064
|
const n = e.trim(), r = (s = t == null ? void 0 : t.display_name) == null ? void 0 : s.trim();
|
|
2065
2065
|
return !n || !r ? !1 : n === r || n.startsWith(`${r}(`);
|
|
2066
2066
|
}
|
|
2067
|
-
function
|
|
2067
|
+
function ir(e, t) {
|
|
2068
2068
|
const n = e.sender_id;
|
|
2069
2069
|
if (n == null)
|
|
2070
2070
|
return;
|
|
@@ -2075,23 +2075,23 @@ function cr(e, t) {
|
|
|
2075
2075
|
(s) => s.member_type === "HUMAN" && String(s.ref_id) === String(n)
|
|
2076
2076
|
);
|
|
2077
2077
|
}
|
|
2078
|
-
function
|
|
2079
|
-
if (!
|
|
2078
|
+
function da(e, t, n, r) {
|
|
2079
|
+
if (!or(e))
|
|
2080
2080
|
return !1;
|
|
2081
|
-
const s =
|
|
2081
|
+
const s = ir(e, r);
|
|
2082
2082
|
return !s || t && _t(s.id, t.id) ? !1 : !rn(s, n);
|
|
2083
2083
|
}
|
|
2084
|
-
function
|
|
2084
|
+
function cr(e, t, n, r) {
|
|
2085
2085
|
var i;
|
|
2086
|
-
if (!
|
|
2086
|
+
if (!or(e))
|
|
2087
2087
|
return !1;
|
|
2088
2088
|
if (e.is_own === !0 || t && e.sender_id != null && _t(e.sender_id, t.id) || n != null && n.id && e.sender_id != null && _t(e.sender_id, n.id))
|
|
2089
2089
|
return !0;
|
|
2090
|
-
const s =
|
|
2090
|
+
const s = ir(e, r);
|
|
2091
2091
|
if (s)
|
|
2092
2092
|
return rn(s, n);
|
|
2093
2093
|
const o = (i = e.sender_name) == null ? void 0 : i.trim();
|
|
2094
|
-
if (o && n &&
|
|
2094
|
+
if (o && n && la(o, n))
|
|
2095
2095
|
return !0;
|
|
2096
2096
|
if (o && (t != null && t.display_name)) {
|
|
2097
2097
|
const c = t.display_name.trim();
|
|
@@ -2100,10 +2100,10 @@ function lr(e, t, n, r) {
|
|
|
2100
2100
|
}
|
|
2101
2101
|
return !1;
|
|
2102
2102
|
}
|
|
2103
|
-
function
|
|
2103
|
+
function Gc(e) {
|
|
2104
2104
|
return Number(e.sender_id) === 0 ? !0 : (e.content || "").trim().startsWith("【任务 #");
|
|
2105
2105
|
}
|
|
2106
|
-
function
|
|
2106
|
+
function Jc(e) {
|
|
2107
2107
|
if (!e) return "";
|
|
2108
2108
|
try {
|
|
2109
2109
|
const t = e.trim(), n = /[zZ]$|[+-]\d{2}:?\d{2}$/.test(t) ? new Date(t) : /* @__PURE__ */ new Date(`${t.replace(" ", "T")}+08:00`);
|
|
@@ -2115,7 +2115,7 @@ function Wc(e) {
|
|
|
2115
2115
|
return "";
|
|
2116
2116
|
}
|
|
2117
2117
|
}
|
|
2118
|
-
function
|
|
2118
|
+
function Vc(e, t) {
|
|
2119
2119
|
if (e.sender_type !== "AGENT")
|
|
2120
2120
|
return !1;
|
|
2121
2121
|
const n = e.task_id ?? null;
|
|
@@ -2126,7 +2126,7 @@ function Zc(e, t) {
|
|
|
2126
2126
|
}
|
|
2127
2127
|
return !1;
|
|
2128
2128
|
}
|
|
2129
|
-
function
|
|
2129
|
+
function Wc(e, t) {
|
|
2130
2130
|
const n = e.content === "处理中..." || e.content === "🔄 正在处理中...", r = e.content.includes("[[REASONING:");
|
|
2131
2131
|
if (!n && !r)
|
|
2132
2132
|
return !1;
|
|
@@ -2146,15 +2146,15 @@ function Xc(e, t) {
|
|
|
2146
2146
|
}
|
|
2147
2147
|
return !1;
|
|
2148
2148
|
}
|
|
2149
|
-
function
|
|
2149
|
+
function Zc(e) {
|
|
2150
2150
|
return typeof e.content == "string" && (e.content.includes("【卡片表单已确认】") || e.content.includes("【卡片表单已提交】"));
|
|
2151
2151
|
}
|
|
2152
2152
|
function Qe(e) {
|
|
2153
2153
|
return e.sender_type !== "AGENT" ? !1 : e.message_type === "TURN_SUMMARY" ? !0 : e.content.includes("**本轮小结**") || e.content.includes("[[TURN_SUMMARY_REF");
|
|
2154
2154
|
}
|
|
2155
|
-
const
|
|
2156
|
-
function
|
|
2157
|
-
const t = e.match(
|
|
2155
|
+
const lr = /\[\[TURN_SUMMARY_REF trigger_message_id=(\d+) agent_reply_id=(\d+)(?: preview="([^"]*)")?\]\]/;
|
|
2156
|
+
function dr(e) {
|
|
2157
|
+
const t = e.match(lr);
|
|
2158
2158
|
return t ? {
|
|
2159
2159
|
// 正则抓到的是数字串,**原样保留**。曾经写成 Number(match[1]):
|
|
2160
2160
|
// 19 位 message_id 进 float64 后末位被抹掉,再拿去和字符串 m.id 比较,
|
|
@@ -2164,25 +2164,25 @@ function ur(e) {
|
|
|
2164
2164
|
preview: t[3] || void 0
|
|
2165
2165
|
} : null;
|
|
2166
2166
|
}
|
|
2167
|
-
function
|
|
2168
|
-
return e.replace(
|
|
2167
|
+
function ua(e) {
|
|
2168
|
+
return e.replace(lr, "").trimEnd();
|
|
2169
2169
|
}
|
|
2170
|
-
function
|
|
2171
|
-
let t =
|
|
2170
|
+
function Xc(e) {
|
|
2171
|
+
let t = ua(e);
|
|
2172
2172
|
return t = t.replace(/^\*\*本轮小结\*\*\s*/i, ""), t = t.replace(/^>\s*针对用户消息[^\n]*\n+/m, ""), t = t.replace(/^_生成中…_\s*/m, ""), t.trim();
|
|
2173
2173
|
}
|
|
2174
|
-
function
|
|
2174
|
+
function Yc(e) {
|
|
2175
2175
|
const t = /* @__PURE__ */ new Map();
|
|
2176
2176
|
for (const n of e) {
|
|
2177
2177
|
if (!Qe(n))
|
|
2178
2178
|
continue;
|
|
2179
|
-
const r =
|
|
2179
|
+
const r = dr(n.content);
|
|
2180
2180
|
(r == null ? void 0 : r.agentReplyId) != null && t.set(r.agentReplyId, n);
|
|
2181
2181
|
}
|
|
2182
2182
|
return t;
|
|
2183
2183
|
}
|
|
2184
|
-
function
|
|
2185
|
-
const n =
|
|
2184
|
+
function Qc(e, t) {
|
|
2185
|
+
const n = dr(e.content);
|
|
2186
2186
|
if (n != null && n.preview)
|
|
2187
2187
|
return n.preview;
|
|
2188
2188
|
if ((n == null ? void 0 : n.triggerMessageId) != null) {
|
|
@@ -2194,7 +2194,7 @@ function tl(e, t) {
|
|
|
2194
2194
|
}
|
|
2195
2195
|
return "";
|
|
2196
2196
|
}
|
|
2197
|
-
function
|
|
2197
|
+
function pa(e) {
|
|
2198
2198
|
return e.sender_type !== "AGENT" || Qe(e) || e.content === "已取消" ? !1 : e.content === "处理中..." || e.content === "🔄 正在处理中..." || qt(e.content) || e.content.includes("[[REASONING:") || e.content.includes("[[TOOL_CALL:");
|
|
2199
2199
|
}
|
|
2200
2200
|
function xt(e, t, n, r, s, o) {
|
|
@@ -2212,11 +2212,11 @@ function xt(e, t, n, r, s, o) {
|
|
|
2212
2212
|
continue;
|
|
2213
2213
|
if (!(e && d.sender_name !== e || Object.values(n).some(
|
|
2214
2214
|
(h) => h.loadingMessageId === d.id
|
|
2215
|
-
)) && (
|
|
2215
|
+
)) && (pa(d) || d.content === "处理中..." || d.content === "🔄 正在处理中..."))
|
|
2216
2216
|
return d.id;
|
|
2217
2217
|
}
|
|
2218
2218
|
}
|
|
2219
|
-
function
|
|
2219
|
+
function ma(e, t) {
|
|
2220
2220
|
if (e.sender_type !== "AGENT" || Qe(e) || e.content === "已取消")
|
|
2221
2221
|
return null;
|
|
2222
2222
|
for (const [n, r] of Object.entries(t))
|
|
@@ -2224,8 +2224,8 @@ function ha(e, t) {
|
|
|
2224
2224
|
return Number(n);
|
|
2225
2225
|
return null;
|
|
2226
2226
|
}
|
|
2227
|
-
function
|
|
2228
|
-
return e.sender_type !== "AGENT" || Qe(e) ? null :
|
|
2227
|
+
function el(e, t) {
|
|
2228
|
+
return e.sender_type !== "AGENT" || Qe(e) ? null : ma(e, t);
|
|
2229
2229
|
}
|
|
2230
2230
|
const _n = [
|
|
2231
2231
|
"#2F70F1",
|
|
@@ -2237,16 +2237,16 @@ const _n = [
|
|
|
2237
2237
|
"#f5222d",
|
|
2238
2238
|
"#faad14"
|
|
2239
2239
|
];
|
|
2240
|
-
function
|
|
2240
|
+
function tl(e) {
|
|
2241
2241
|
let t = 0;
|
|
2242
2242
|
for (let n = 0; n < e.length; n++) t = t * 31 + e.charCodeAt(n) | 0;
|
|
2243
2243
|
return _n[Math.abs(t) % _n.length];
|
|
2244
2244
|
}
|
|
2245
|
-
function
|
|
2245
|
+
function nl(e) {
|
|
2246
2246
|
return e ? e.charAt(0).toUpperCase() : "?";
|
|
2247
2247
|
}
|
|
2248
|
-
function
|
|
2249
|
-
return
|
|
2248
|
+
function rl(e, t, n, r, s) {
|
|
2249
|
+
return cr(t, n, r, s);
|
|
2250
2250
|
}
|
|
2251
2251
|
function oe(e, t = "success", n) {
|
|
2252
2252
|
switch (t) {
|
|
@@ -2263,7 +2263,7 @@ function oe(e, t = "success", n) {
|
|
|
2263
2263
|
v.success(e, n);
|
|
2264
2264
|
}
|
|
2265
2265
|
}
|
|
2266
|
-
function
|
|
2266
|
+
function sl() {
|
|
2267
2267
|
return null;
|
|
2268
2268
|
}
|
|
2269
2269
|
const Tn = 20, kn = 200;
|
|
@@ -2277,7 +2277,7 @@ function ot(e) {
|
|
|
2277
2277
|
return 0;
|
|
2278
2278
|
}
|
|
2279
2279
|
}
|
|
2280
|
-
function
|
|
2280
|
+
function al(e) {
|
|
2281
2281
|
const t = e == null ? void 0 : e.trim();
|
|
2282
2282
|
if (!t)
|
|
2283
2283
|
return "";
|
|
@@ -2301,7 +2301,7 @@ function il(e) {
|
|
|
2301
2301
|
function Kt(e, t) {
|
|
2302
2302
|
return `${t ?? ""}\0${e ?? ""}`;
|
|
2303
2303
|
}
|
|
2304
|
-
function
|
|
2304
|
+
function ol(e) {
|
|
2305
2305
|
const t = /* @__PURE__ */ new Map();
|
|
2306
2306
|
for (const r of Object.values(e)) {
|
|
2307
2307
|
const s = Kt(r.agentName, r.task_id), o = t.get(s) ?? [];
|
|
@@ -2339,25 +2339,25 @@ function In(e, t) {
|
|
|
2339
2339
|
const r = Kt(n.agentName, n.task_id);
|
|
2340
2340
|
return Object.values(e).filter((s) => Kt(s.agentName, s.task_id) === r).map((s) => s.executionId);
|
|
2341
2341
|
}
|
|
2342
|
-
const
|
|
2342
|
+
const ur = "$ref";
|
|
2343
2343
|
function ze(e) {
|
|
2344
2344
|
const t = q(e);
|
|
2345
2345
|
return we(t) ? t : void 0;
|
|
2346
2346
|
}
|
|
2347
|
-
function
|
|
2347
|
+
function pr(e) {
|
|
2348
2348
|
if (!e || typeof e != "object" || Array.isArray(e))
|
|
2349
2349
|
return !1;
|
|
2350
2350
|
const t = Object.keys(e);
|
|
2351
|
-
return t.length === 1 && t[0] ===
|
|
2351
|
+
return t.length === 1 && t[0] === ur;
|
|
2352
2352
|
}
|
|
2353
2353
|
function je(e) {
|
|
2354
|
-
if (!(!e || typeof e != "object" || Array.isArray(e)) && !
|
|
2354
|
+
if (!(!e || typeof e != "object" || Array.isArray(e)) && !pr(e))
|
|
2355
2355
|
return e;
|
|
2356
2356
|
}
|
|
2357
2357
|
function Ge(e) {
|
|
2358
|
-
return !e ||
|
|
2358
|
+
return !e || pr(e) ? !1 : Object.entries(e).some(([t, n]) => t === ur ? !1 : Array.isArray(n) ? n.length > 0 : typeof n == "string" ? n.trim() !== "" : typeof n == "number" || typeof n == "boolean");
|
|
2359
2359
|
}
|
|
2360
|
-
function
|
|
2360
|
+
function ha(e) {
|
|
2361
2361
|
var s;
|
|
2362
2362
|
const t = je(e.submittedValue);
|
|
2363
2363
|
if (Ge(t))
|
|
@@ -2368,7 +2368,7 @@ function fa(e) {
|
|
|
2368
2368
|
const r = typeof e.result == "string" && e.result.trim() ? e.result.trim() : "";
|
|
2369
2369
|
return r ? { response: r } : {};
|
|
2370
2370
|
}
|
|
2371
|
-
function
|
|
2371
|
+
function fa(e) {
|
|
2372
2372
|
if (e == null || e === "")
|
|
2373
2373
|
return null;
|
|
2374
2374
|
if (typeof e == "object" && !Array.isArray(e))
|
|
@@ -2382,23 +2382,23 @@ function ya(e) {
|
|
|
2382
2382
|
return null;
|
|
2383
2383
|
}
|
|
2384
2384
|
}
|
|
2385
|
-
function
|
|
2386
|
-
const n = t.result == null || t.result === "" ? e.result : String(t.result), r =
|
|
2385
|
+
function il(e, t) {
|
|
2386
|
+
const n = t.result == null || t.result === "" ? e.result : String(t.result), r = fa(t.ext), s = je(
|
|
2387
2387
|
(r == null ? void 0 : r.submittedValue) ?? (r == null ? void 0 : r.submitted_value)
|
|
2388
2388
|
), o = {
|
|
2389
2389
|
...e,
|
|
2390
2390
|
result: n,
|
|
2391
2391
|
submittedValue: Ge(e.submittedValue) ? e.submittedValue : s ?? e.submittedValue
|
|
2392
2392
|
};
|
|
2393
|
-
return
|
|
2393
|
+
return mr(o) ?? o;
|
|
2394
2394
|
}
|
|
2395
|
-
function
|
|
2395
|
+
function mr(e) {
|
|
2396
2396
|
if (!e || typeof e != "object")
|
|
2397
2397
|
return null;
|
|
2398
2398
|
const t = e, n = ze(t.humanTaskId ?? t.human_task_id);
|
|
2399
2399
|
if (n == null)
|
|
2400
2400
|
return null;
|
|
2401
|
-
const r = je(t.cardForm) ?? je(t.card_form), s = je(t.submittedValue ?? t.submitted_value), o = typeof t.result == "string" ? t.result : void 0, i =
|
|
2401
|
+
const r = je(t.cardForm) ?? je(t.card_form), s = je(t.submittedValue ?? t.submitted_value), o = typeof t.result == "string" ? t.result : void 0, i = ha({
|
|
2402
2402
|
submittedValue: s,
|
|
2403
2403
|
cardForm: r,
|
|
2404
2404
|
result: o
|
|
@@ -2410,7 +2410,7 @@ function hr(e) {
|
|
|
2410
2410
|
t.scenarioInstanceId ?? t.scenario_instance_id
|
|
2411
2411
|
),
|
|
2412
2412
|
// humanTaskStatus 是状态码而非 ID,不能走 idOrUndefined(会变成字符串)
|
|
2413
|
-
humanTaskStatus:
|
|
2413
|
+
humanTaskStatus: ya(t.humanTaskStatus ?? t.human_task_status),
|
|
2414
2414
|
assistType: typeof t.assistType == "string" ? t.assistType : typeof t.assist_type == "string" ? t.assist_type : void 0,
|
|
2415
2415
|
assignee: t.assignee && typeof t.assignee == "object" ? t.assignee : void 0,
|
|
2416
2416
|
cardForm: c,
|
|
@@ -2425,7 +2425,7 @@ function hr(e) {
|
|
|
2425
2425
|
canSubmit: t.canSubmit === !0 || t.can_submit === !0
|
|
2426
2426
|
};
|
|
2427
2427
|
}
|
|
2428
|
-
function
|
|
2428
|
+
function ya(e) {
|
|
2429
2429
|
const t = Number(e);
|
|
2430
2430
|
return Number.isFinite(t) ? t : void 0;
|
|
2431
2431
|
}
|
|
@@ -2462,12 +2462,12 @@ function Gt(e) {
|
|
|
2462
2462
|
sender_avatar: String(e.sender_avatar ?? e.senderAvatar ?? ""),
|
|
2463
2463
|
is_own: c,
|
|
2464
2464
|
read_status: h,
|
|
2465
|
-
human_assist_card:
|
|
2465
|
+
human_assist_card: mr(
|
|
2466
2466
|
e.human_assist_card ?? e.humanAssistCard
|
|
2467
2467
|
)
|
|
2468
2468
|
};
|
|
2469
2469
|
}
|
|
2470
|
-
function
|
|
2470
|
+
function ga(e, t) {
|
|
2471
2471
|
var o, i, c, l;
|
|
2472
2472
|
const n = (o = e.sender_name) == null ? void 0 : o.trim();
|
|
2473
2473
|
if (n)
|
|
@@ -2491,7 +2491,7 @@ function ba(e, t) {
|
|
|
2491
2491
|
return r === "AGENT" ? "助手" : r === "HUMAN" ? "成员" : "";
|
|
2492
2492
|
}
|
|
2493
2493
|
function gt(e, t) {
|
|
2494
|
-
const n =
|
|
2494
|
+
const n = ga(e, t);
|
|
2495
2495
|
return n === e.sender_name ? e : { ...e, sender_name: n };
|
|
2496
2496
|
}
|
|
2497
2497
|
const vt = /* @__PURE__ */ new Map(), Pt = /* @__PURE__ */ new Map(), Et = /* @__PURE__ */ new Map();
|
|
@@ -2533,7 +2533,7 @@ function Ot(e) {
|
|
|
2533
2533
|
const t = e.task_id;
|
|
2534
2534
|
return t == null || Tt(t, "0") <= 0;
|
|
2535
2535
|
}
|
|
2536
|
-
function
|
|
2536
|
+
function ba(e) {
|
|
2537
2537
|
if (!e) return !1;
|
|
2538
2538
|
const t = e.cardForm;
|
|
2539
2539
|
return !!(t && t.status === "pending");
|
|
@@ -2545,7 +2545,7 @@ function Cn(e) {
|
|
|
2545
2545
|
try {
|
|
2546
2546
|
const r = typeof n.ext == "string" ? JSON.parse(n.ext) : n.ext;
|
|
2547
2547
|
if ((r == null ? void 0 : r.taskId) != null) {
|
|
2548
|
-
if (
|
|
2548
|
+
if (ba(r))
|
|
2549
2549
|
continue;
|
|
2550
2550
|
t.add(q(r.taskId));
|
|
2551
2551
|
}
|
|
@@ -2564,7 +2564,7 @@ function Cn(e) {
|
|
|
2564
2564
|
function Jt(e, t) {
|
|
2565
2565
|
return e.map((n) => Gt(n)).map((n) => gt(n, t));
|
|
2566
2566
|
}
|
|
2567
|
-
function
|
|
2567
|
+
function Sa(e, t, n) {
|
|
2568
2568
|
return Jt(e, t).map((r) => ({
|
|
2569
2569
|
...r,
|
|
2570
2570
|
task_id: r.task_id ?? n
|
|
@@ -2573,7 +2573,7 @@ function wa(e, t, n) {
|
|
|
2573
2573
|
function lt(e) {
|
|
2574
2574
|
return e.length <= kn ? e : e.slice(e.length - kn);
|
|
2575
2575
|
}
|
|
2576
|
-
function
|
|
2576
|
+
function wa(e, t, n) {
|
|
2577
2577
|
if (t.sender_id == null)
|
|
2578
2578
|
return null;
|
|
2579
2579
|
const r = e.findIndex(
|
|
@@ -2584,7 +2584,7 @@ function _a(e, t, n) {
|
|
|
2584
2584
|
const s = [...e];
|
|
2585
2585
|
return s[r] = { ...t, id: t.id }, s;
|
|
2586
2586
|
}
|
|
2587
|
-
function
|
|
2587
|
+
function _a(e) {
|
|
2588
2588
|
var r;
|
|
2589
2589
|
const t = (r = e.currentProject) == null ? void 0 : r.id;
|
|
2590
2590
|
if (t == null)
|
|
@@ -2604,7 +2604,7 @@ function Ta(e) {
|
|
|
2604
2604
|
}
|
|
2605
2605
|
const dt = 80;
|
|
2606
2606
|
let An = 0;
|
|
2607
|
-
function
|
|
2607
|
+
function Ta(e) {
|
|
2608
2608
|
let t = (e || "").trim();
|
|
2609
2609
|
if (!t) return "";
|
|
2610
2610
|
t.length > 2e3 && (t = t.slice(0, 2e3));
|
|
@@ -2619,7 +2619,7 @@ function ka(e) {
|
|
|
2619
2619
|
const o = s.split(/[。;;!?\n]/)[0].trim();
|
|
2620
2620
|
return o.length > 48 ? o.slice(0, 48) + "…" : o;
|
|
2621
2621
|
}
|
|
2622
|
-
function
|
|
2622
|
+
function cl(e) {
|
|
2623
2623
|
let t = (e || "").trim();
|
|
2624
2624
|
if (!t) return "";
|
|
2625
2625
|
t.length > 200 && (t = t.slice(0, 200));
|
|
@@ -2630,7 +2630,7 @@ function ut() {
|
|
|
2630
2630
|
const e = /* @__PURE__ */ new Date(), t = (n) => String(n).padStart(2, "0");
|
|
2631
2631
|
return `${t(e.getHours())}:${t(e.getMinutes())}:${t(e.getSeconds())}`;
|
|
2632
2632
|
}
|
|
2633
|
-
const
|
|
2633
|
+
const ll = 3, dl = 4, ul = 5, $n = yr((e, t) => ({
|
|
2634
2634
|
currentUser: null,
|
|
2635
2635
|
permissionState: "unknown",
|
|
2636
2636
|
// FEATURE-ZTEAM-MERGE: 优先 z-opc 的 token, 其次 z-team 原生的 z_team_token
|
|
@@ -2744,7 +2744,7 @@ const ul = 3, pl = 4, ml = 5, $n = gr((e, t) => ({
|
|
|
2744
2744
|
},
|
|
2745
2745
|
/* ──── 认证 ──── */
|
|
2746
2746
|
login: async (n, r) => {
|
|
2747
|
-
const { user: s, token: o } = await
|
|
2747
|
+
const { user: s, token: o } = await hs(n, r);
|
|
2748
2748
|
localStorage.setItem("token", o), localStorage.setItem("z_team_token", o);
|
|
2749
2749
|
const i = {
|
|
2750
2750
|
userId: s.id,
|
|
@@ -2758,7 +2758,7 @@ const ul = 3, pl = 4, ml = 5, $n = gr((e, t) => ({
|
|
|
2758
2758
|
},
|
|
2759
2759
|
logout: async () => {
|
|
2760
2760
|
const { token: n } = t();
|
|
2761
|
-
n && await
|
|
2761
|
+
n && await fs().catch(() => {
|
|
2762
2762
|
}), localStorage.removeItem("token"), localStorage.removeItem("z_team_token"), localStorage.removeItem("userInfo"), e({ currentUser: null, token: "", permissionState: "unknown" });
|
|
2763
2763
|
},
|
|
2764
2764
|
updateCurrentUser: (n) => {
|
|
@@ -2772,7 +2772,7 @@ const ul = 3, pl = 4, ml = 5, $n = gr((e, t) => ({
|
|
|
2772
2772
|
e({ loading: !0 });
|
|
2773
2773
|
const { token: r } = t();
|
|
2774
2774
|
try {
|
|
2775
|
-
const s = await
|
|
2775
|
+
const s = await bs(r, n), i = (Array.isArray(s) ? s : []).map((c) => Ae(c)).sort(
|
|
2776
2776
|
(c, l) => ot(l.created_at) - ot(c.created_at)
|
|
2777
2777
|
);
|
|
2778
2778
|
e({ projects: i, loading: !1 });
|
|
@@ -2783,7 +2783,7 @@ const ul = 3, pl = 4, ml = 5, $n = gr((e, t) => ({
|
|
|
2783
2783
|
createScenarioInstance: async (n, r, s, o) => {
|
|
2784
2784
|
const i = t().token || "", c = { name: n, description: r, workspace_path: n };
|
|
2785
2785
|
s && s.trim() && (c.scenario_code = s.trim()), o && Object.keys(o).length > 0 && (c.extend_params = o);
|
|
2786
|
-
const l = await
|
|
2786
|
+
const l = await rr(c, i), d = l.scenario_name && l.scenario_code ? `${l.scenario_name}(${l.scenario_code})` : l.scenario_code || "未知场景";
|
|
2787
2787
|
return oe(`已按场景「${d}」创建项目`, "success"), c.scenario_code === "qa_support" && l.scenario_code === "default" && oe(
|
|
2788
2788
|
"警告:请求答疑场景但实际为默认场景,请检查数据库 ft_scenario",
|
|
2789
2789
|
"error"
|
|
@@ -2836,7 +2836,7 @@ const ul = 3, pl = 4, ml = 5, $n = gr((e, t) => ({
|
|
|
2836
2836
|
},
|
|
2837
2837
|
deleteScenarioInstance: async (n) => {
|
|
2838
2838
|
var r;
|
|
2839
|
-
if (await
|
|
2839
|
+
if (await Xs(n), e((s) => ({ projects: s.projects.filter((o) => o.id !== n) })), ((r = t().currentProject) == null ? void 0 : r.id) === n) {
|
|
2840
2840
|
const { [n]: s, ...o } = t().fileTrees, { [n]: i, ...c } = t().projectCache;
|
|
2841
2841
|
e({
|
|
2842
2842
|
currentProject: null,
|
|
@@ -2849,7 +2849,7 @@ const ul = 3, pl = 4, ml = 5, $n = gr((e, t) => ({
|
|
|
2849
2849
|
}
|
|
2850
2850
|
},
|
|
2851
2851
|
forkScenarioInstance: async (n, r) => {
|
|
2852
|
-
const s = await
|
|
2852
|
+
const s = await Ys(
|
|
2853
2853
|
n,
|
|
2854
2854
|
r,
|
|
2855
2855
|
t().token
|
|
@@ -2861,7 +2861,7 @@ const ul = 3, pl = 4, ml = 5, $n = gr((e, t) => ({
|
|
|
2861
2861
|
})), await t().expandProject(s), s;
|
|
2862
2862
|
},
|
|
2863
2863
|
updateScenarioInstance: async (n, r) => {
|
|
2864
|
-
const s = await
|
|
2864
|
+
const s = await Qs(n, r);
|
|
2865
2865
|
e((o) => {
|
|
2866
2866
|
var i;
|
|
2867
2867
|
return {
|
|
@@ -2879,7 +2879,7 @@ const ul = 3, pl = 4, ml = 5, $n = gr((e, t) => ({
|
|
|
2879
2879
|
return s;
|
|
2880
2880
|
const o = (async () => {
|
|
2881
2881
|
try {
|
|
2882
|
-
const c = (await
|
|
2882
|
+
const c = (await _s(n.id)).map((l) => ({
|
|
2883
2883
|
...l,
|
|
2884
2884
|
ref_id: String(l.ref_id ?? "")
|
|
2885
2885
|
}));
|
|
@@ -2915,8 +2915,8 @@ const ul = 3, pl = 4, ml = 5, $n = gr((e, t) => ({
|
|
|
2915
2915
|
const o = (async () => {
|
|
2916
2916
|
try {
|
|
2917
2917
|
const [i, c] = await Promise.all([
|
|
2918
|
-
|
|
2919
|
-
|
|
2918
|
+
Is(n.id),
|
|
2919
|
+
Cs(n.id)
|
|
2920
2920
|
]), l = (Array.isArray(i) ? i : []).map(
|
|
2921
2921
|
(d) => ({
|
|
2922
2922
|
...d,
|
|
@@ -2950,7 +2950,7 @@ const ul = 3, pl = 4, ml = 5, $n = gr((e, t) => ({
|
|
|
2950
2950
|
},
|
|
2951
2951
|
addMember: async (n, r, s, o) => {
|
|
2952
2952
|
const i = t().currentProject;
|
|
2953
|
-
i && (await
|
|
2953
|
+
i && (await Ts(i.id, {
|
|
2954
2954
|
member_type: n,
|
|
2955
2955
|
ref_id: r,
|
|
2956
2956
|
display_name: s,
|
|
@@ -2959,7 +2959,7 @@ const ul = 3, pl = 4, ml = 5, $n = gr((e, t) => ({
|
|
|
2959
2959
|
},
|
|
2960
2960
|
removeMember: async (n) => {
|
|
2961
2961
|
const r = t().currentProject;
|
|
2962
|
-
r && (await
|
|
2962
|
+
r && (await ks(r.id, n), await Promise.all([t().loadMembers(), t().loadTeamPickerOptions()]));
|
|
2963
2963
|
},
|
|
2964
2964
|
/* ──── 聊天 ──── */
|
|
2965
2965
|
loadMessages: async () => {
|
|
@@ -3034,12 +3034,12 @@ const ul = 3, pl = 4, ml = 5, $n = gr((e, t) => ({
|
|
|
3034
3034
|
const c = String(r.sender_type || "HUMAN").toUpperCase() === "HUMAN", l = $t(o.members, o.currentUser) ?? null, d = String(r.scenario_instance_id ?? ""), u = (x = o.currentProject) != null && x.id ? String(o.currentProject.id) : "";
|
|
3035
3035
|
if (d && d !== "0" && u && d !== u)
|
|
3036
3036
|
return;
|
|
3037
|
-
const h = !!o.pendingTeamChatContent && o.pendingTeamChatContent === r.content && c, m =
|
|
3037
|
+
const h = !!o.pendingTeamChatContent && o.pendingTeamChatContent === r.content && c, m = da(
|
|
3038
3038
|
r,
|
|
3039
3039
|
l,
|
|
3040
3040
|
o.currentUser,
|
|
3041
3041
|
o.members
|
|
3042
|
-
), C =
|
|
3042
|
+
), C = cr(
|
|
3043
3043
|
r,
|
|
3044
3044
|
l,
|
|
3045
3045
|
o.currentUser,
|
|
@@ -3112,7 +3112,7 @@ const ul = 3, pl = 4, ml = 5, $n = gr((e, t) => ({
|
|
|
3112
3112
|
) : !1);
|
|
3113
3113
|
if (l.length !== 0)
|
|
3114
3114
|
for (const d of l)
|
|
3115
|
-
|
|
3115
|
+
Rs(r.id, d.id, s).catch(() => {
|
|
3116
3116
|
});
|
|
3117
3117
|
},
|
|
3118
3118
|
sendChatMessage: async (n) => {
|
|
@@ -3173,7 +3173,7 @@ const ul = 3, pl = 4, ml = 5, $n = gr((e, t) => ({
|
|
|
3173
3173
|
if (!n) return;
|
|
3174
3174
|
const r = String(n.id);
|
|
3175
3175
|
try {
|
|
3176
|
-
const s = await
|
|
3176
|
+
const s = await As(n.id);
|
|
3177
3177
|
e((o) => {
|
|
3178
3178
|
var c;
|
|
3179
3179
|
if (((c = o.currentProject) == null ? void 0 : c.id) !== r)
|
|
@@ -3194,24 +3194,24 @@ const ul = 3, pl = 4, ml = 5, $n = gr((e, t) => ({
|
|
|
3194
3194
|
const n = t().currentProject;
|
|
3195
3195
|
if (n)
|
|
3196
3196
|
try {
|
|
3197
|
-
const r = await
|
|
3197
|
+
const r = await $s(n.id);
|
|
3198
3198
|
e({ allSkills: r });
|
|
3199
3199
|
} catch {
|
|
3200
3200
|
}
|
|
3201
3201
|
},
|
|
3202
3202
|
addProjectSkill: async (n) => {
|
|
3203
3203
|
const r = t().currentProject;
|
|
3204
|
-
r && (await
|
|
3204
|
+
r && (await xs(r.id, n), await t().loadSkills(), await t().loadFileTree(t().currentDir, !0));
|
|
3205
3205
|
},
|
|
3206
3206
|
removeProjectSkill: async (n) => {
|
|
3207
3207
|
const r = t().currentProject;
|
|
3208
|
-
r && (await
|
|
3208
|
+
r && (await vs(r.id, n), await t().loadSkills(), await t().loadFileTree(t().currentDir, !0));
|
|
3209
3209
|
},
|
|
3210
3210
|
refreshAgentSkills: async (n) => {
|
|
3211
3211
|
const r = t().currentProject;
|
|
3212
3212
|
if (r)
|
|
3213
3213
|
try {
|
|
3214
|
-
const s = await
|
|
3214
|
+
const s = await Ps(r.id, n), o = s && typeof s.message == "string" ? s.message : "技能已刷新";
|
|
3215
3215
|
oe(o, (s == null ? void 0 : s.ok) === !1 ? "warning" : "success"), await t().loadFileTree(t().currentDir, !0);
|
|
3216
3216
|
} catch {
|
|
3217
3217
|
}
|
|
@@ -3219,7 +3219,7 @@ const ul = 3, pl = 4, ml = 5, $n = gr((e, t) => ({
|
|
|
3219
3219
|
refreshAllAgentSkills: async (n) => {
|
|
3220
3220
|
if (n)
|
|
3221
3221
|
try {
|
|
3222
|
-
const r = await
|
|
3222
|
+
const r = await Es(n), s = r && typeof r.message == "string" ? r.message : "所有技能已刷新";
|
|
3223
3223
|
oe(s, (r == null ? void 0 : r.ok) === !1 ? "warning" : "success");
|
|
3224
3224
|
const o = t().currentProject;
|
|
3225
3225
|
o && String(o.id) === String(n) && await t().loadFileTree(t().currentDir, !0);
|
|
@@ -3257,14 +3257,14 @@ const ul = 3, pl = 4, ml = 5, $n = gr((e, t) => ({
|
|
|
3257
3257
|
selectedFileContent: null,
|
|
3258
3258
|
lastSelectedFilePath: n
|
|
3259
3259
|
}), localStorage.setItem("ft_last_file_path", n);
|
|
3260
|
-
const { content: s } = await
|
|
3260
|
+
const { content: s } = await zs(r.id, n);
|
|
3261
3261
|
e({ selectedFileContent: s, editingFileContent: s ?? "" });
|
|
3262
3262
|
},
|
|
3263
3263
|
saveFileContent: async (n) => {
|
|
3264
3264
|
const r = t().currentProject, s = t().selectedFilePath;
|
|
3265
3265
|
if (!(!r || !s))
|
|
3266
3266
|
try {
|
|
3267
|
-
await
|
|
3267
|
+
await Ls(r.id, s, n), e({ selectedFileContent: n, editingFileContent: n }), console.log("文件保存成功:", s);
|
|
3268
3268
|
} catch (o) {
|
|
3269
3269
|
throw console.error("保存文件失败:", o), console.log("保存失败的文件路径:", s), o;
|
|
3270
3270
|
}
|
|
@@ -3275,19 +3275,19 @@ const ul = 3, pl = 4, ml = 5, $n = gr((e, t) => ({
|
|
|
3275
3275
|
},
|
|
3276
3276
|
renameFile: async (n, r) => {
|
|
3277
3277
|
const s = t().currentProject;
|
|
3278
|
-
s && (await
|
|
3278
|
+
s && (await Ds(s.id, n, r), await t().loadFileTree(t().currentDir), t()._bumpVersion());
|
|
3279
3279
|
},
|
|
3280
3280
|
createFile: async (n, r) => {
|
|
3281
3281
|
const s = t().currentProject;
|
|
3282
|
-
s && (await
|
|
3282
|
+
s && (await Fs(s.id, n, r), await t().loadFileTree(t().currentDir), t()._bumpVersion());
|
|
3283
3283
|
},
|
|
3284
3284
|
createFolder: async (n, r) => {
|
|
3285
3285
|
const s = t().currentProject;
|
|
3286
|
-
s && (await
|
|
3286
|
+
s && (await qs(s.id, n, r), await t().loadFileTree(t().currentDir), t()._bumpVersion());
|
|
3287
3287
|
},
|
|
3288
3288
|
deleteFile: async (n) => {
|
|
3289
3289
|
const r = t().currentProject;
|
|
3290
|
-
r && (await
|
|
3290
|
+
r && (await Bs(r.id, n), t().selectedFilePath === n && (e({
|
|
3291
3291
|
selectedFilePath: null,
|
|
3292
3292
|
selectedFileContent: null,
|
|
3293
3293
|
editingFileContent: null
|
|
@@ -3295,16 +3295,16 @@ const ul = 3, pl = 4, ml = 5, $n = gr((e, t) => ({
|
|
|
3295
3295
|
},
|
|
3296
3296
|
uploadFile: async (n, r) => {
|
|
3297
3297
|
const s = t().currentProject;
|
|
3298
|
-
s && (await
|
|
3298
|
+
s && (await Hs(s.id, n, r), await t().loadFileTree(t().currentDir), t()._bumpVersion());
|
|
3299
3299
|
},
|
|
3300
3300
|
uploadFolder: async (n, r) => {
|
|
3301
3301
|
const s = t().currentProject;
|
|
3302
|
-
s && (await
|
|
3302
|
+
s && (await Ks(s.id, n, r), await t().loadFileTree(t().currentDir), t()._bumpVersion());
|
|
3303
3303
|
},
|
|
3304
3304
|
downloadFile: async (n) => {
|
|
3305
3305
|
const r = t().currentProject;
|
|
3306
3306
|
if (!r) return;
|
|
3307
|
-
const s = await
|
|
3307
|
+
const s = await Gs(r.id, n), o = window.URL.createObjectURL(s), i = document.createElement("a");
|
|
3308
3308
|
i.href = o, i.download = n.split("/").pop() || "download", document.body.appendChild(i), i.click(), window.URL.revokeObjectURL(o), document.body.removeChild(i);
|
|
3309
3309
|
},
|
|
3310
3310
|
toggleProjectExpand: async (n) => {
|
|
@@ -3348,7 +3348,7 @@ const ul = 3, pl = 4, ml = 5, $n = gr((e, t) => ({
|
|
|
3348
3348
|
},
|
|
3349
3349
|
expandProject: async (n, r) => {
|
|
3350
3350
|
var _, x;
|
|
3351
|
-
const s = String(n.id), o = (r == null ? void 0 : r.expandTree) === !0, i = t(), c =
|
|
3351
|
+
const s = String(n.id), o = (r == null ? void 0 : r.expandTree) === !0, i = t(), c = _a(i), l = wn(n, i.currentUser, n.mode), d = i.expandedProjectIds.includes(s), u = c[s], h = !i.fileTrees[s] || i.fileTrees[s].length === 0;
|
|
3352
3352
|
if (((_ = i.currentProject) == null ? void 0 : _.id) === s && i.projectSwitchSeq > 0) {
|
|
3353
3353
|
o && !d && (e({
|
|
3354
3354
|
expandedProjectIds: [
|
|
@@ -3405,11 +3405,11 @@ const ul = 3, pl = 4, ml = 5, $n = gr((e, t) => ({
|
|
|
3405
3405
|
/* 模式切换 */
|
|
3406
3406
|
switchMode: (n) => {
|
|
3407
3407
|
const { agentMode: r, currentProject: s, currentUser: o } = t();
|
|
3408
|
-
if (
|
|
3408
|
+
if (ar(s, o)) {
|
|
3409
3409
|
r !== "plan" && (e({ agentMode: "plan" }), localStorage.setItem("ft_agent_mode", "plan"));
|
|
3410
3410
|
return;
|
|
3411
3411
|
}
|
|
3412
|
-
r !== n && (e({ agentMode: n }), localStorage.setItem("ft_agent_mode", n),
|
|
3412
|
+
r !== n && (e({ agentMode: n }), localStorage.setItem("ft_agent_mode", n), os({ type: "mode", mode: n }));
|
|
3413
3413
|
},
|
|
3414
3414
|
enforceTeamModePolicy: () => {
|
|
3415
3415
|
const { currentProject: n, currentUser: r, agentMode: s } = t(), o = wn(
|
|
@@ -3453,7 +3453,7 @@ const ul = 3, pl = 4, ml = 5, $n = gr((e, t) => ({
|
|
|
3453
3453
|
const o = s;
|
|
3454
3454
|
t().applyExecutionCancelled(o);
|
|
3455
3455
|
try {
|
|
3456
|
-
await
|
|
3456
|
+
await Os(r.id, o);
|
|
3457
3457
|
} catch (c) {
|
|
3458
3458
|
console.error("[ChatPanel] 停止失败:", c), At(c) || oe(
|
|
3459
3459
|
"停止失败:" + (c instanceof Error ? c.message : "未知错误"),
|
|
@@ -3468,7 +3468,7 @@ const ul = 3, pl = 4, ml = 5, $n = gr((e, t) => ({
|
|
|
3468
3468
|
for (const c of i)
|
|
3469
3469
|
t().applyExecutionCancelled(c);
|
|
3470
3470
|
try {
|
|
3471
|
-
await
|
|
3471
|
+
await Ms(r.id, o);
|
|
3472
3472
|
} catch (c) {
|
|
3473
3473
|
console.error("[ChatPanel] 停止队列失败:", c), At(c) || oe(
|
|
3474
3474
|
"停止队列失败:" + (c instanceof Error ? c.message : "未知错误"),
|
|
@@ -3587,7 +3587,7 @@ const ul = 3, pl = 4, ml = 5, $n = gr((e, t) => ({
|
|
|
3587
3587
|
},
|
|
3588
3588
|
fetchWorkspaceEnv: async () => {
|
|
3589
3589
|
try {
|
|
3590
|
-
const n = await
|
|
3590
|
+
const n = await Ns();
|
|
3591
3591
|
e({ isLocal: !!n.is_local });
|
|
3592
3592
|
} catch {
|
|
3593
3593
|
e({ isLocal: !1 });
|
|
@@ -3600,7 +3600,7 @@ const ul = 3, pl = 4, ml = 5, $n = gr((e, t) => ({
|
|
|
3600
3600
|
syncingProjectIds: /* @__PURE__ */ new Set([...r.syncingProjectIds, n])
|
|
3601
3601
|
});
|
|
3602
3602
|
try {
|
|
3603
|
-
const s = await
|
|
3603
|
+
const s = await Us(n), o = `同步完成:${s.files_synced} 个文件,${s.dirs_created} 个目录` + (s.errors.length > 0 ? `,${s.errors.length} 个错误` : "");
|
|
3604
3604
|
oe(o, s.errors.length > 0 ? "warning" : "success"), e((c) => ({ fileTreeVersion: c.fileTreeVersion + 1 }));
|
|
3605
3605
|
const i = t().currentProject;
|
|
3606
3606
|
if (i && i.id === n) {
|
|
@@ -3626,7 +3626,7 @@ const ul = 3, pl = 4, ml = 5, $n = gr((e, t) => ({
|
|
|
3626
3626
|
n
|
|
3627
3627
|
), s = q(r.task_id);
|
|
3628
3628
|
if (we(s)) {
|
|
3629
|
-
const h =
|
|
3629
|
+
const h = Ta(r.content);
|
|
3630
3630
|
h && t().pushTaskActivity(
|
|
3631
3631
|
s,
|
|
3632
3632
|
h,
|
|
@@ -3655,7 +3655,7 @@ const ul = 3, pl = 4, ml = 5, $n = gr((e, t) => ({
|
|
|
3655
3655
|
)
|
|
3656
3656
|
};
|
|
3657
3657
|
if (c.sender_type === "AGENT" && qt(c.content)) {
|
|
3658
|
-
const _ =
|
|
3658
|
+
const _ = wa(
|
|
3659
3659
|
m,
|
|
3660
3660
|
c,
|
|
3661
3661
|
qt
|
|
@@ -3743,7 +3743,7 @@ const ul = 3, pl = 4, ml = 5, $n = gr((e, t) => ({
|
|
|
3743
3743
|
...s != null && s.switchToTasksTab ? { navigateToTasksTick: t().navigateToTasksTick + 1 } : {}
|
|
3744
3744
|
});
|
|
3745
3745
|
try {
|
|
3746
|
-
const c = await
|
|
3746
|
+
const c = await ea(o.id, n), l = {
|
|
3747
3747
|
task_id: q(c.task_id ?? c.taskId ?? n),
|
|
3748
3748
|
scenario_instance_id: q(
|
|
3749
3749
|
c.scenario_instance_id ?? c.scenarioInstanceId ?? o.id
|
|
@@ -3776,7 +3776,7 @@ const ul = 3, pl = 4, ml = 5, $n = gr((e, t) => ({
|
|
|
3776
3776
|
let c = t().projects.find((d) => d.id === o);
|
|
3777
3777
|
if (!c)
|
|
3778
3778
|
try {
|
|
3779
|
-
c = await
|
|
3779
|
+
c = await Zs(o, i), e((d) => ({
|
|
3780
3780
|
projects: d.projects.some((h) => h.id === o) ? d.projects : [...d.projects, c]
|
|
3781
3781
|
}));
|
|
3782
3782
|
} catch (d) {
|
|
@@ -3790,12 +3790,12 @@ const ul = 3, pl = 4, ml = 5, $n = gr((e, t) => ({
|
|
|
3790
3790
|
const o = t().currentProject;
|
|
3791
3791
|
if (o)
|
|
3792
3792
|
try {
|
|
3793
|
-
const i = await
|
|
3793
|
+
const i = await ta(
|
|
3794
3794
|
o.id,
|
|
3795
3795
|
n,
|
|
3796
3796
|
r,
|
|
3797
3797
|
s
|
|
3798
|
-
), c = Array.isArray(i == null ? void 0 : i.messages) ? i.messages : [], l =
|
|
3798
|
+
), c = Array.isArray(i == null ? void 0 : i.messages) ? i.messages : [], l = Sa(c, t().members, n), d = !!i.has_more;
|
|
3799
3799
|
s ? e((u) => ({
|
|
3800
3800
|
taskMessages: ct([...l, ...u.taskMessages]),
|
|
3801
3801
|
taskHasMoreMessages: d
|
|
@@ -3811,7 +3811,7 @@ const ul = 3, pl = 4, ml = 5, $n = gr((e, t) => ({
|
|
|
3811
3811
|
const o = t().currentProject;
|
|
3812
3812
|
if (!(!o || !r.trim() && !(s != null && s.length)))
|
|
3813
3813
|
try {
|
|
3814
|
-
await
|
|
3814
|
+
await na(o.id, n, r, t().token, s), await t().loadTaskMessages(n), t().requestChatScrollBottom("task", !0);
|
|
3815
3815
|
} catch (i) {
|
|
3816
3816
|
throw console.error("Failed to send task message", i), i;
|
|
3817
3817
|
}
|
|
@@ -3820,7 +3820,7 @@ const ul = 3, pl = 4, ml = 5, $n = gr((e, t) => ({
|
|
|
3820
3820
|
const n = t().currentProject;
|
|
3821
3821
|
if (n)
|
|
3822
3822
|
try {
|
|
3823
|
-
const r = await
|
|
3823
|
+
const r = await js(n.id);
|
|
3824
3824
|
e((s) => {
|
|
3825
3825
|
var i;
|
|
3826
3826
|
const o = {};
|
|
@@ -3857,11 +3857,11 @@ const ul = 3, pl = 4, ml = 5, $n = gr((e, t) => ({
|
|
|
3857
3857
|
}
|
|
3858
3858
|
}
|
|
3859
3859
|
}));
|
|
3860
|
-
|
|
3860
|
+
fr({
|
|
3861
3861
|
useToken: () => $n((e) => e.token),
|
|
3862
3862
|
useCurrentUser: () => $n((e) => e.currentUser)
|
|
3863
3863
|
});
|
|
3864
|
-
const
|
|
3864
|
+
const pl = [
|
|
3865
3865
|
"/config",
|
|
3866
3866
|
// z-config 配置中心
|
|
3867
3867
|
"/mist",
|
|
@@ -3888,48 +3888,42 @@ const Ia = [
|
|
|
3888
3888
|
// z-oss 对象存储
|
|
3889
3889
|
"/schedule"
|
|
3890
3890
|
// z-schedule 调度中心(2026-11-09 从系统面孤儿路由收编到中间件面)
|
|
3891
|
-
],
|
|
3892
|
-
"/script/keys",
|
|
3893
|
-
"/script/monitor",
|
|
3894
|
-
"/script/quota",
|
|
3895
|
-
"/script/version",
|
|
3896
|
-
"/script/tag"
|
|
3897
|
-
], Aa = [
|
|
3891
|
+
], ka = [
|
|
3898
3892
|
"/ops",
|
|
3899
3893
|
// DevOps 运维 + 部署编排(渠道/环境/部署/仓库)
|
|
3900
3894
|
"/resource"
|
|
3901
3895
|
// 资源管理(域名 / ECS / RDS / OSS)
|
|
3902
3896
|
];
|
|
3903
|
-
function
|
|
3897
|
+
function Ia(e, t) {
|
|
3904
3898
|
return e === t || e.startsWith(t + "/");
|
|
3905
3899
|
}
|
|
3906
|
-
function
|
|
3907
|
-
return e
|
|
3900
|
+
function Ca(e) {
|
|
3901
|
+
return e && ka.some((t) => Ia(e, t)) ? "ops" : "system";
|
|
3908
3902
|
}
|
|
3909
|
-
const
|
|
3903
|
+
const Aa = 30, $a = ["/api/", "/kapi/", "/z-team/", "/auth/", "/sso/"], Je = "__zteam_api_error_monitor__", Ve = globalThis;
|
|
3910
3904
|
function Mt(e) {
|
|
3911
|
-
return e.startsWith(location.origin) && (e = e.slice(location.origin.length)),
|
|
3905
|
+
return e.startsWith(location.origin) && (e = e.slice(location.origin.length)), $a.some((t) => e.includes(t));
|
|
3912
3906
|
}
|
|
3913
3907
|
function jt(e) {
|
|
3914
3908
|
const t = Ve[Je];
|
|
3915
3909
|
if (!t) return;
|
|
3916
|
-
t.failures.push(e), t.failures.length >
|
|
3910
|
+
t.failures.push(e), t.failures.length > Aa && t.failures.shift();
|
|
3917
3911
|
const n = [...t.failures];
|
|
3918
3912
|
t.listeners.forEach((r) => r(n));
|
|
3919
3913
|
}
|
|
3920
|
-
function
|
|
3914
|
+
function ml() {
|
|
3921
3915
|
var e;
|
|
3922
3916
|
return ((e = Ve[Je]) == null ? void 0 : e.failures) ?? [];
|
|
3923
3917
|
}
|
|
3924
|
-
function
|
|
3918
|
+
function hl(e) {
|
|
3925
3919
|
const t = Ve[Je];
|
|
3926
3920
|
return t ? (t.listeners.add(e), e(t.failures), () => t.listeners.delete(e)) : () => {
|
|
3927
3921
|
};
|
|
3928
3922
|
}
|
|
3929
|
-
function
|
|
3923
|
+
function xn(e) {
|
|
3930
3924
|
return e >= 400 && e !== 401;
|
|
3931
3925
|
}
|
|
3932
|
-
function
|
|
3926
|
+
function xa() {
|
|
3933
3927
|
if (Ve[Je]) return;
|
|
3934
3928
|
const e = { failures: [], listeners: /* @__PURE__ */ new Set() };
|
|
3935
3929
|
Ve[Je] = e;
|
|
@@ -3939,7 +3933,7 @@ function Pa() {
|
|
|
3939
3933
|
const o = s[0], i = typeof o == "string" ? o : o instanceof URL ? o.href : o.url, c = (((l = s[1]) == null ? void 0 : l.method) ?? (typeof o == "object" && o && "method" in o ? o.method : void 0) ?? "GET").toUpperCase();
|
|
3940
3934
|
try {
|
|
3941
3935
|
const d = await t(...s);
|
|
3942
|
-
return
|
|
3936
|
+
return xn(d.status) && Mt(i) && jt({ method: c, url: i, status: d.status, route: location.pathname, at: Date.now() }), d;
|
|
3943
3937
|
} catch (d) {
|
|
3944
3938
|
throw Mt(i) && jt({ method: c, url: i, status: 0, route: location.pathname, at: Date.now() }), d;
|
|
3945
3939
|
}
|
|
@@ -3953,24 +3947,24 @@ function Pa() {
|
|
|
3953
3947
|
if (c && Mt(c)) {
|
|
3954
3948
|
const l = i.__method ?? "GET";
|
|
3955
3949
|
this.addEventListener("loadend", () => {
|
|
3956
|
-
|
|
3950
|
+
xn(this.status) && jt({ method: l, url: c, status: this.status, route: location.pathname, at: Date.now() });
|
|
3957
3951
|
});
|
|
3958
3952
|
}
|
|
3959
3953
|
return o;
|
|
3960
3954
|
};
|
|
3961
3955
|
}
|
|
3962
|
-
|
|
3956
|
+
xa();
|
|
3963
3957
|
const ne = (e) => {
|
|
3964
|
-
const t =
|
|
3965
|
-
return (n) => /* @__PURE__ */ a(
|
|
3966
|
-
}, xe = ne(() => import("./index-
|
|
3967
|
-
ne(() => import("./index-
|
|
3968
|
-
const
|
|
3969
|
-
function
|
|
3970
|
-
const { pathname: t } =
|
|
3971
|
-
return e === "system" ? /* @__PURE__ */ a(xe, { forcedChatMode:
|
|
3972
|
-
}
|
|
3973
|
-
function
|
|
3958
|
+
const t = Sr(e);
|
|
3959
|
+
return (n) => /* @__PURE__ */ a(wr, { fallback: null, children: /* @__PURE__ */ a(t, { ...n }) });
|
|
3960
|
+
}, xe = ne(() => import("./index-DXvw5NUH.js").then((e) => e.at)), va = ne(() => import("./index-M_hPRTgh.js")), Pa = ne(() => import("./index-mHqvjT5a.js")), Ea = ne(() => import("./index-CM6iVhI3.js")), Ra = ne(() => import("./index-BtCyMeHe.js")), Oa = ne(() => import("./index-Dj88QNYQ.js"));
|
|
3961
|
+
ne(() => import("./index-Bf57pWxm.js"));
|
|
3962
|
+
const Ma = ne(() => import("./index-C815hPWS.js")), ja = ne(() => import("./index-DWi-8Esh.js")), Na = ne(() => import("./index-DhDdFRHC.js")), Ua = ne(() => import("./index-9fGksFL5.js")), za = ne(() => import("./index-Dx6dKBLL.js")), La = ne(() => import("./index-B_LJRFsK.js")), Da = ne(() => import("./index-dti6XFQV.js"));
|
|
3963
|
+
function fl({ forcedMode: e }) {
|
|
3964
|
+
const { pathname: t } = _r(), n = t.replace(/\/+$/, "") || "/";
|
|
3965
|
+
return e === "system" ? /* @__PURE__ */ a(xe, { forcedChatMode: Ca(n) }) : e === "dev" ? /* @__PURE__ */ a(xe, { forcedChatMode: "dev" }) : e === "knowledge" ? /* @__PURE__ */ a(xe, { forcedChatMode: "knowledge" }) : n === "/workspace" ? /* @__PURE__ */ a(xe, {}) : n === "/workspace/phone" ? /* @__PURE__ */ a(va, {}) : n === "/workspace/from-ticket" ? /* @__PURE__ */ a(Pa, {}) : n === "/workspace/from-scenario" ? /* @__PURE__ */ a(Ea, {}) : n === "/workspace/build-by-form" ? /* @__PURE__ */ a(Ra, {}) : n === "/scenario" ? /* @__PURE__ */ a(Oa, {}) : n === "/admin" ? /* @__PURE__ */ a(xe, {}) : n === "/welcome" ? /* @__PURE__ */ a(ja, {}) : n === "/portal" ? /* @__PURE__ */ a(Na, {}) : n === "/chatdemo" ? /* @__PURE__ */ a(Ma, {}) : n === "/embed/chat" || n.startsWith("/embed/chat/") ? /* @__PURE__ */ a(Da, {}) : n === "/change-log" ? /* @__PURE__ */ a(Ua, {}) : n === "/docs" ? /* @__PURE__ */ a(za, {}) : n === "/download" ? /* @__PURE__ */ a(La, {}) : /* @__PURE__ */ a(xe, {});
|
|
3966
|
+
}
|
|
3967
|
+
function Fa(e) {
|
|
3974
3968
|
if (!e || typeof e != "string") return null;
|
|
3975
3969
|
const t = e.split(".");
|
|
3976
3970
|
if (t.length !== 3) return null;
|
|
@@ -3984,12 +3978,12 @@ function Ba(e) {
|
|
|
3984
3978
|
return null;
|
|
3985
3979
|
}
|
|
3986
3980
|
}
|
|
3987
|
-
function
|
|
3988
|
-
const n =
|
|
3981
|
+
function qa(e, t = 30) {
|
|
3982
|
+
const n = Fa(e);
|
|
3989
3983
|
return !n || typeof n.exp != "number" ? !0 : Date.now() / 1e3 > n.exp - t;
|
|
3990
3984
|
}
|
|
3991
|
-
let
|
|
3992
|
-
const
|
|
3985
|
+
let vn = !1;
|
|
3986
|
+
const Ba = [
|
|
3993
3987
|
"/ctc/authn/login",
|
|
3994
3988
|
"/ctc/authn/register",
|
|
3995
3989
|
"/ctc/authn/send-code",
|
|
@@ -4007,12 +4001,12 @@ const Ka = [
|
|
|
4007
4001
|
"/sso/login",
|
|
4008
4002
|
"/sso/callback"
|
|
4009
4003
|
];
|
|
4010
|
-
function
|
|
4011
|
-
return
|
|
4004
|
+
function Ha(e) {
|
|
4005
|
+
return Ba.some((t) => e.includes(t));
|
|
4012
4006
|
}
|
|
4013
|
-
function
|
|
4014
|
-
if (
|
|
4015
|
-
|
|
4007
|
+
function Pn(e) {
|
|
4008
|
+
if (vn || typeof window > "u" || window.location.pathname.startsWith("/login")) return;
|
|
4009
|
+
vn = !0;
|
|
4016
4010
|
try {
|
|
4017
4011
|
localStorage.removeItem("token"), localStorage.removeItem("userInfo");
|
|
4018
4012
|
} catch {
|
|
@@ -4021,19 +4015,19 @@ function En(e) {
|
|
|
4021
4015
|
const t = window.location.pathname + window.location.search, n = encodeURIComponent(t);
|
|
4022
4016
|
window.location.href = `/login?redirect=${n}`;
|
|
4023
4017
|
}
|
|
4024
|
-
function
|
|
4018
|
+
function Ka(e) {
|
|
4025
4019
|
if (e && typeof e == "object" && "code" in e && "data" in e) {
|
|
4026
4020
|
const t = e;
|
|
4027
4021
|
return (typeof t.success == "boolean" ? t.success : typeof t.code == "number" && t.code >= 200 && t.code < 300) ? t.data : Promise.reject(new Error(t.message || "请求失败"));
|
|
4028
4022
|
}
|
|
4029
4023
|
return e;
|
|
4030
4024
|
}
|
|
4031
|
-
function
|
|
4025
|
+
function Ga(e, t = {}) {
|
|
4032
4026
|
const { tokenKey: n = "token", userInfoKey: r = "userInfo" } = t;
|
|
4033
4027
|
e.interceptors.request.use((s) => {
|
|
4034
4028
|
const o = localStorage.getItem(n);
|
|
4035
|
-
if (o &&
|
|
4036
|
-
return
|
|
4029
|
+
if (o && qa(o))
|
|
4030
|
+
return Pn(`请求前检测到 token 已过期 (${s.url || ""})`), Promise.reject(new en.CanceledError("token expired"));
|
|
4037
4031
|
try {
|
|
4038
4032
|
const i = localStorage.getItem(r);
|
|
4039
4033
|
if (i) {
|
|
@@ -4047,11 +4041,11 @@ function Va(e, t = {}) {
|
|
|
4047
4041
|
}
|
|
4048
4042
|
return s;
|
|
4049
4043
|
}), e.interceptors.response.use(
|
|
4050
|
-
(s) =>
|
|
4044
|
+
(s) => Ka(s.data),
|
|
4051
4045
|
(s) => {
|
|
4052
4046
|
var c, l;
|
|
4053
4047
|
const o = (c = s.response) == null ? void 0 : c.status, i = ((l = s.config) == null ? void 0 : l.url) || "";
|
|
4054
|
-
return o === 401 ?
|
|
4048
|
+
return o === 401 ? Ha(i) ? console.warn(`[401] 公开接口返回 401 (不是 token 问题): ${i}`) : Pn(`接口 ${i} 返回 401`) : o === 403 ? console.warn("[403] 没有权限访问该资源:", i) : o === 404 ? console.warn("[404] 接口不存在:", i) : o === 500 && console.error("[500] 服务器内部错误:", i), Promise.reject(s);
|
|
4055
4049
|
}
|
|
4056
4050
|
);
|
|
4057
4051
|
}
|
|
@@ -4062,12 +4056,12 @@ function sn(e = {}) {
|
|
|
4062
4056
|
withCredentials: !0
|
|
4063
4057
|
// Cookie 模式:浏览器自动携带 Cookie
|
|
4064
4058
|
});
|
|
4065
|
-
return
|
|
4059
|
+
return Ga(t, {
|
|
4066
4060
|
tokenKey: e.tokenKey,
|
|
4067
4061
|
userInfoKey: e.userInfoKey
|
|
4068
4062
|
}), t;
|
|
4069
4063
|
}
|
|
4070
|
-
const H = sn(),
|
|
4064
|
+
const H = sn(), yl = sn(), pt = sn({ baseURL: "/api", timeout: 1e4 }), mt = (e) => e ? typeof e.total == "number" ? e.total : Array.isArray(e) ? e.length : Array.isArray(e.records) ? e.records.length : Array.isArray(e.data) ? e.data.length : 0 : 0, Ja = [
|
|
4071
4065
|
{
|
|
4072
4066
|
key: "ai",
|
|
4073
4067
|
color: "violet",
|
|
@@ -4095,7 +4089,7 @@ const H = sn(), gl = sn(), pt = sn({ baseURL: "/api", timeout: 1e4 }), mt = (e)
|
|
|
4095
4089
|
{
|
|
4096
4090
|
title: "模板市场",
|
|
4097
4091
|
description: "精选 AI 应用模板, 一键复制即可使用",
|
|
4098
|
-
icon: /* @__PURE__ */ a(
|
|
4092
|
+
icon: /* @__PURE__ */ a(Ir, {}),
|
|
4099
4093
|
color: "pink",
|
|
4100
4094
|
tags: [{ label: "模板", color: "pink" }],
|
|
4101
4095
|
meta: "24 个模板"
|
|
@@ -4121,14 +4115,14 @@ const H = sn(), gl = sn(), pt = sn({ baseURL: "/api", timeout: 1e4 }), mt = (e)
|
|
|
4121
4115
|
{
|
|
4122
4116
|
title: "任务仪表盘",
|
|
4123
4117
|
description: "实时任务执行情况, 成功率与时长统计",
|
|
4124
|
-
icon: /* @__PURE__ */ a(
|
|
4118
|
+
icon: /* @__PURE__ */ a(Cr, {}),
|
|
4125
4119
|
color: "green",
|
|
4126
4120
|
tags: [{ label: "看板", color: "green" }]
|
|
4127
4121
|
},
|
|
4128
4122
|
{
|
|
4129
4123
|
title: "任务列表",
|
|
4130
4124
|
description: "所有定时/手动任务, 支持 Cron 表达式",
|
|
4131
|
-
icon: /* @__PURE__ */ a(
|
|
4125
|
+
icon: /* @__PURE__ */ a(Ar, {}),
|
|
4132
4126
|
color: "blue",
|
|
4133
4127
|
tags: [{ label: "调度", color: "blue" }]
|
|
4134
4128
|
},
|
|
@@ -4165,7 +4159,7 @@ const H = sn(), gl = sn(), pt = sn({ baseURL: "/api", timeout: 1e4 }), mt = (e)
|
|
|
4165
4159
|
}
|
|
4166
4160
|
]
|
|
4167
4161
|
}
|
|
4168
|
-
],
|
|
4162
|
+
], gl = () => {
|
|
4169
4163
|
const [e, t] = $({
|
|
4170
4164
|
configCount: null,
|
|
4171
4165
|
projectCount: null,
|
|
@@ -4200,7 +4194,7 @@ const H = sn(), gl = sn(), pt = sn({ baseURL: "/api", timeout: 1e4 }), mt = (e)
|
|
|
4200
4194
|
/* @__PURE__ */ a(D, { xs: 24, sm: 12, md: 12, lg: 6, children: /* @__PURE__ */ a(
|
|
4201
4195
|
nt,
|
|
4202
4196
|
{
|
|
4203
|
-
icon: /* @__PURE__ */ a(
|
|
4197
|
+
icon: /* @__PURE__ */ a(kr, {}),
|
|
4204
4198
|
label: "配置中心",
|
|
4205
4199
|
value: e.configCount,
|
|
4206
4200
|
suffix: "条",
|
|
@@ -4224,7 +4218,7 @@ const H = sn(), gl = sn(), pt = sn({ baseURL: "/api", timeout: 1e4 }), mt = (e)
|
|
|
4224
4218
|
/* @__PURE__ */ a(D, { xs: 24, sm: 12, md: 12, lg: 6, children: /* @__PURE__ */ a(
|
|
4225
4219
|
nt,
|
|
4226
4220
|
{
|
|
4227
|
-
icon: /* @__PURE__ */ a(
|
|
4221
|
+
icon: /* @__PURE__ */ a(Hn, {}),
|
|
4228
4222
|
label: "账号数",
|
|
4229
4223
|
value: e.userCount,
|
|
4230
4224
|
suffix: "人",
|
|
@@ -4246,9 +4240,9 @@ const H = sn(), gl = sn(), pt = sn({ baseURL: "/api", timeout: 1e4 }), mt = (e)
|
|
|
4246
4240
|
}
|
|
4247
4241
|
) })
|
|
4248
4242
|
] }),
|
|
4249
|
-
|
|
4243
|
+
Ja.map((n) => /* @__PURE__ */ p("div", { style: { marginBottom: 32 }, children: [
|
|
4250
4244
|
/* @__PURE__ */ a(
|
|
4251
|
-
|
|
4245
|
+
Lr,
|
|
4252
4246
|
{
|
|
4253
4247
|
color: n.color,
|
|
4254
4248
|
title: n.title,
|
|
@@ -4266,7 +4260,7 @@ const H = sn(), gl = sn(), pt = sn({ baseURL: "/api", timeout: 1e4 }), mt = (e)
|
|
|
4266
4260
|
xl: 6,
|
|
4267
4261
|
xxl: 6,
|
|
4268
4262
|
children: /* @__PURE__ */ a(
|
|
4269
|
-
|
|
4263
|
+
Dr,
|
|
4270
4264
|
{
|
|
4271
4265
|
title: r.title,
|
|
4272
4266
|
description: r.description,
|
|
@@ -4282,7 +4276,7 @@ const H = sn(), gl = sn(), pt = sn({ baseURL: "/api", timeout: 1e4 }), mt = (e)
|
|
|
4282
4276
|
)) })
|
|
4283
4277
|
] }, n.key)),
|
|
4284
4278
|
/* @__PURE__ */ a(
|
|
4285
|
-
|
|
4279
|
+
Fr,
|
|
4286
4280
|
{
|
|
4287
4281
|
tag: "FOR ENGINEERS",
|
|
4288
4282
|
title: "把 Z-One Company 接入你的工作流",
|
|
@@ -4293,12 +4287,12 @@ const H = sn(), gl = sn(), pt = sn({ baseURL: "/api", timeout: 1e4 }), mt = (e)
|
|
|
4293
4287
|
)
|
|
4294
4288
|
] });
|
|
4295
4289
|
};
|
|
4296
|
-
let
|
|
4297
|
-
function
|
|
4298
|
-
return en.create({ baseURL:
|
|
4290
|
+
let Va = "/api";
|
|
4291
|
+
function hr() {
|
|
4292
|
+
return en.create({ baseURL: Va, timeout: 15e3, withCredentials: !0 });
|
|
4299
4293
|
}
|
|
4300
|
-
const et =
|
|
4301
|
-
|
|
4294
|
+
const et = hr(), Wa = hr();
|
|
4295
|
+
Wa.interceptors.request.use((e) => e);
|
|
4302
4296
|
et.interceptors.request.use((e) => e);
|
|
4303
4297
|
const It = "/mock-platform", Q = (e, t) => et.get(`${It}${e}`, { params: t }).then((n) => n.data), Z = (e, t, n) => et.post(`${It}${e}`, t, { params: n }).then((r) => r.data), ht = (e, t, n) => et.put(`${It}${e}`, t, { params: n }).then((r) => r.data), ve = (e, t) => et.delete(`${It}${e}`, { params: t }).then((n) => n.data), J = {
|
|
4304
4298
|
stats: () => Q("/stats"),
|
|
@@ -4365,7 +4359,7 @@ const It = "/mock-platform", Q = (e, t) => et.get(`${It}${e}`, { params: t }).th
|
|
|
4365
4359
|
importBatch: (e) => Z("/openapi/import-batch", e),
|
|
4366
4360
|
sample: (e) => Q("/openapi/sample", { format: e })
|
|
4367
4361
|
}
|
|
4368
|
-
}, { Text: me, Paragraph:
|
|
4362
|
+
}, { Text: me, Paragraph: Za } = pe, En = { GET: "green", POST: "blue", PUT: "orange", DELETE: "red", PATCH: "purple" };
|
|
4369
4363
|
function Vt({ activeEnvCode: e }) {
|
|
4370
4364
|
const [t, n] = $([]), [r, s] = $(!1), [o, i] = $(null), [c, l] = $(!1), [d, u] = $(null), [h, m] = $(""), C = h.trim() ? t.filter((y) => `${y.path || ""} ${y.mock_code || ""}`.toLowerCase().includes(h.trim().toLowerCase())) : t;
|
|
4371
4365
|
Y(() => {
|
|
@@ -4388,7 +4382,7 @@ function Vt({ activeEnvCode: e }) {
|
|
|
4388
4382
|
key: "path",
|
|
4389
4383
|
width: 280,
|
|
4390
4384
|
render: (y, A) => /* @__PURE__ */ p(U, { children: [
|
|
4391
|
-
/* @__PURE__ */ a(E, { color:
|
|
4385
|
+
/* @__PURE__ */ a(E, { color: En[A.method] || "default", children: A.method }),
|
|
4392
4386
|
/* @__PURE__ */ a(me, { code: !0, copyable: { text: y }, children: y })
|
|
4393
4387
|
] })
|
|
4394
4388
|
},
|
|
@@ -4469,7 +4463,7 @@ function Vt({ activeEnvCode: e }) {
|
|
|
4469
4463
|
{
|
|
4470
4464
|
size: "small",
|
|
4471
4465
|
type: "link",
|
|
4472
|
-
icon: /* @__PURE__ */ a(
|
|
4466
|
+
icon: /* @__PURE__ */ a(Kn, {}),
|
|
4473
4467
|
onClick: () => {
|
|
4474
4468
|
navigator.clipboard.writeText(_(A)), v.success("已复制");
|
|
4475
4469
|
}
|
|
@@ -4538,7 +4532,7 @@ function Vt({ activeEnvCode: e }) {
|
|
|
4538
4532
|
We,
|
|
4539
4533
|
{
|
|
4540
4534
|
title: /* @__PURE__ */ p(U, { children: [
|
|
4541
|
-
/* @__PURE__ */ a(
|
|
4535
|
+
/* @__PURE__ */ a($r, {}),
|
|
4542
4536
|
"端点详情: ",
|
|
4543
4537
|
d == null ? void 0 : d.mock_code
|
|
4544
4538
|
] }),
|
|
@@ -4549,7 +4543,7 @@ function Vt({ activeEnvCode: e }) {
|
|
|
4549
4543
|
/* @__PURE__ */ p(z, { column: 2, size: "small", bordered: !0, style: { marginBottom: 16 }, children: [
|
|
4550
4544
|
/* @__PURE__ */ a(z.Item, { label: "编码", children: d.mock_code }),
|
|
4551
4545
|
/* @__PURE__ */ a(z.Item, { label: "名称", children: d.mock_name }),
|
|
4552
|
-
/* @__PURE__ */ a(z.Item, { label: "方法", children: /* @__PURE__ */ a(E, { color:
|
|
4546
|
+
/* @__PURE__ */ a(z.Item, { label: "方法", children: /* @__PURE__ */ a(E, { color: En[d.method], children: d.method }) }),
|
|
4553
4547
|
/* @__PURE__ */ a(z.Item, { label: "环境", children: d.env_code }),
|
|
4554
4548
|
/* @__PURE__ */ a(z.Item, { label: "路径", span: 2, children: d.path }),
|
|
4555
4549
|
/* @__PURE__ */ a(z.Item, { label: "状态码", children: d.status_code }),
|
|
@@ -4567,7 +4561,7 @@ function Vt({ activeEnvCode: e }) {
|
|
|
4567
4561
|
/* @__PURE__ */ a(z.Item, { label: "状态", span: 2, children: d.status === 1 ? /* @__PURE__ */ a(E, { color: "green", children: "启用" }) : /* @__PURE__ */ a(E, { children: "禁用" }) }),
|
|
4568
4562
|
/* @__PURE__ */ a(z.Item, { label: "完整 URL", span: 2, children: /* @__PURE__ */ a(me, { copyable: !0, children: _(d) }) })
|
|
4569
4563
|
] }),
|
|
4570
|
-
/* @__PURE__ */ a(
|
|
4564
|
+
/* @__PURE__ */ a(Za, { strong: !0, children: "响应模板:" }),
|
|
4571
4565
|
/* @__PURE__ */ a("pre", { style: {
|
|
4572
4566
|
background: "#f5f5f5",
|
|
4573
4567
|
padding: 12,
|
|
@@ -4584,7 +4578,7 @@ function Vt({ activeEnvCode: e }) {
|
|
|
4584
4578
|
)
|
|
4585
4579
|
] });
|
|
4586
4580
|
}
|
|
4587
|
-
const { Text: Nt } = pe,
|
|
4581
|
+
const { Text: Nt } = pe, Xa = { MOCK: "green", REAL: "blue", MIXED: "orange" };
|
|
4588
4582
|
function Wt({ onEnvChange: e }) {
|
|
4589
4583
|
const [t, n] = $([]), [r, s] = $(!1), [o, i] = $(""), c = o.trim() ? t.filter((u) => `${u.env_code || ""} ${u.env_name || ""}`.toLowerCase().includes(o.trim().toLowerCase())) : t;
|
|
4590
4584
|
Y(() => {
|
|
@@ -4614,7 +4608,7 @@ function Wt({ onEnvChange: e }) {
|
|
|
4614
4608
|
dataIndex: "env_type",
|
|
4615
4609
|
key: "env_type",
|
|
4616
4610
|
width: 240,
|
|
4617
|
-
render: (u) => /* @__PURE__ */ a(E, { color:
|
|
4611
|
+
render: (u) => /* @__PURE__ */ a(E, { color: Xa[u] || "default", children: u })
|
|
4618
4612
|
},
|
|
4619
4613
|
{
|
|
4620
4614
|
title: "真实服务地址",
|
|
@@ -4646,7 +4640,7 @@ function Wt({ onEnvChange: e }) {
|
|
|
4646
4640
|
{
|
|
4647
4641
|
size: "small",
|
|
4648
4642
|
type: "link",
|
|
4649
|
-
icon: /* @__PURE__ */ a(
|
|
4643
|
+
icon: /* @__PURE__ */ a(Gn, {}),
|
|
4650
4644
|
onClick: () => {
|
|
4651
4645
|
e && e(h.env_code);
|
|
4652
4646
|
},
|
|
@@ -4704,8 +4698,8 @@ function Wt({ onEnvChange: e }) {
|
|
|
4704
4698
|
)
|
|
4705
4699
|
] });
|
|
4706
4700
|
}
|
|
4707
|
-
const { Text:
|
|
4708
|
-
function
|
|
4701
|
+
const { Text: Ya } = pe;
|
|
4702
|
+
function Qa() {
|
|
4709
4703
|
const [e, t] = $([]), [n, r] = $(!1), [s, o] = $(!1), [i, c] = $(null), [l, d] = $(""), u = l.trim() ? e.filter((_) => `${_.scenario_code || ""} ${_.scenario_name || ""}`.toLowerCase().includes(l.trim().toLowerCase())) : e;
|
|
4710
4704
|
Y(() => {
|
|
4711
4705
|
h();
|
|
@@ -4739,7 +4733,7 @@ function to() {
|
|
|
4739
4733
|
dataIndex: "scenario_code",
|
|
4740
4734
|
key: "scenario_code",
|
|
4741
4735
|
width: 160,
|
|
4742
|
-
render: (_) => /* @__PURE__ */ a(
|
|
4736
|
+
render: (_) => /* @__PURE__ */ a(Ya, { code: !0, children: _ })
|
|
4743
4737
|
},
|
|
4744
4738
|
{ title: "场景名称", dataIndex: "scenario_name", key: "scenario_name", width: 200 },
|
|
4745
4739
|
{
|
|
@@ -4767,7 +4761,7 @@ function to() {
|
|
|
4767
4761
|
{
|
|
4768
4762
|
size: "small",
|
|
4769
4763
|
type: "link",
|
|
4770
|
-
icon: /* @__PURE__ */ a(
|
|
4764
|
+
icon: /* @__PURE__ */ a(xr, {}),
|
|
4771
4765
|
onClick: () => C(x.scenario_code),
|
|
4772
4766
|
children: "实例"
|
|
4773
4767
|
}
|
|
@@ -4777,7 +4771,7 @@ function to() {
|
|
|
4777
4771
|
{
|
|
4778
4772
|
size: "small",
|
|
4779
4773
|
type: "link",
|
|
4780
|
-
icon: /* @__PURE__ */ a(
|
|
4774
|
+
icon: /* @__PURE__ */ a(vr, {}),
|
|
4781
4775
|
onClick: () => m(x.scenario_code),
|
|
4782
4776
|
children: "重置"
|
|
4783
4777
|
}
|
|
@@ -4851,8 +4845,8 @@ function to() {
|
|
|
4851
4845
|
)
|
|
4852
4846
|
] });
|
|
4853
4847
|
}
|
|
4854
|
-
const { Text: be } = pe, Ut = { PASS: "green", FAIL: "red", SKIP: "default" },
|
|
4855
|
-
function
|
|
4848
|
+
const { Text: be } = pe, Ut = { PASS: "green", FAIL: "red", SKIP: "default" }, eo = { P0: "red", P1: "orange", P2: "blue", P3: "default" };
|
|
4849
|
+
function to() {
|
|
4856
4850
|
const [e, t] = $([]), [n, r] = $(!1), [s, o] = $([]), [i, c] = $(!1), [l, d] = $(null), [u, h] = $(null), [m, C] = $(!1), [O, _] = $(""), x = O.trim() ? e.filter((T) => `${T.case_code || ""} ${T.case_name || ""} ${T.request_url || ""}`.toLowerCase().includes(O.trim().toLowerCase())) : e;
|
|
4857
4851
|
Y(() => {
|
|
4858
4852
|
y();
|
|
@@ -4921,7 +4915,7 @@ function ro() {
|
|
|
4921
4915
|
key: "priority",
|
|
4922
4916
|
width: 80,
|
|
4923
4917
|
align: "center",
|
|
4924
|
-
render: (T) => /* @__PURE__ */ a(E, { color:
|
|
4918
|
+
render: (T) => /* @__PURE__ */ a(E, { color: eo[T], children: T || "P1" })
|
|
4925
4919
|
},
|
|
4926
4920
|
{
|
|
4927
4921
|
title: "上次结果",
|
|
@@ -5023,7 +5017,7 @@ function ro() {
|
|
|
5023
5017
|
We,
|
|
5024
5018
|
{
|
|
5025
5019
|
title: /* @__PURE__ */ p(U, { children: [
|
|
5026
|
-
/* @__PURE__ */ a(
|
|
5020
|
+
/* @__PURE__ */ a(Pr, {}),
|
|
5027
5021
|
"用例执行结果"
|
|
5028
5022
|
] }),
|
|
5029
5023
|
open: i,
|
|
@@ -5149,13 +5143,13 @@ function ro() {
|
|
|
5149
5143
|
)
|
|
5150
5144
|
] });
|
|
5151
5145
|
}
|
|
5152
|
-
const { Text: Pe } = pe,
|
|
5146
|
+
const { Text: Pe } = pe, Rn = {
|
|
5153
5147
|
IDLE: "default",
|
|
5154
5148
|
RECORDING: "red",
|
|
5155
5149
|
STOPPED: "green",
|
|
5156
5150
|
EXPIRED: "gray"
|
|
5157
5151
|
};
|
|
5158
|
-
function
|
|
5152
|
+
function no() {
|
|
5159
5153
|
const [e, t] = $([]), [n, r] = $(!1), [s, o] = $(!1), [i, c] = $(null), [l, d] = $([]), [u, h] = $(""), m = u.trim() ? e.filter((x) => `${x.recording_code || ""} ${x.recording_name || ""} ${x.target_url || ""}`.toLowerCase().includes(u.trim().toLowerCase())) : e;
|
|
5160
5154
|
Y(() => {
|
|
5161
5155
|
C();
|
|
@@ -5191,7 +5185,7 @@ function so() {
|
|
|
5191
5185
|
dataIndex: "record_status",
|
|
5192
5186
|
key: "record_status",
|
|
5193
5187
|
width: 110,
|
|
5194
|
-
render: (x) => /* @__PURE__ */ a(E, { color:
|
|
5188
|
+
render: (x) => /* @__PURE__ */ a(E, { color: Rn[x], children: x })
|
|
5195
5189
|
},
|
|
5196
5190
|
{
|
|
5197
5191
|
title: "请求数",
|
|
@@ -5284,7 +5278,7 @@ function so() {
|
|
|
5284
5278
|
/* @__PURE__ */ p(z, { column: 2, size: "small", bordered: !0, style: { marginBottom: 16 }, children: [
|
|
5285
5279
|
/* @__PURE__ */ a(z.Item, { label: "编码", children: i.recording_code }),
|
|
5286
5280
|
/* @__PURE__ */ a(z.Item, { label: "名称", children: i.recording_name }),
|
|
5287
|
-
/* @__PURE__ */ a(z.Item, { label: "状态", children: /* @__PURE__ */ a(E, { color:
|
|
5281
|
+
/* @__PURE__ */ a(z.Item, { label: "状态", children: /* @__PURE__ */ a(E, { color: Rn[i.record_status], children: i.record_status }) }),
|
|
5288
5282
|
/* @__PURE__ */ a(z.Item, { label: "请求数", children: i.total_requests }),
|
|
5289
5283
|
/* @__PURE__ */ a(z.Item, { label: "目标 URL", span: 2, children: /* @__PURE__ */ a(Pe, { copyable: !0, children: i.target_url }) }),
|
|
5290
5284
|
/* @__PURE__ */ a(z.Item, { label: "开始", children: i.start_time }),
|
|
@@ -5341,8 +5335,8 @@ function so() {
|
|
|
5341
5335
|
)
|
|
5342
5336
|
] });
|
|
5343
5337
|
}
|
|
5344
|
-
const { Text: Ee } = pe,
|
|
5345
|
-
function
|
|
5338
|
+
const { Text: Ee } = pe, ro = { MOCK: "green", PROXY: "blue", 404: "red", 502: "orange" };
|
|
5339
|
+
function so() {
|
|
5346
5340
|
const [e, t] = $([]), [n, r] = $(null), [s, o] = $(!1), [i, c] = $(null), [l, d] = $(!1), [u, h] = $(""), [m, C] = $();
|
|
5347
5341
|
Y(() => {
|
|
5348
5342
|
O();
|
|
@@ -5416,7 +5410,7 @@ function oo() {
|
|
|
5416
5410
|
dataIndex: "fallback_type",
|
|
5417
5411
|
key: "fallback_type",
|
|
5418
5412
|
width: 100,
|
|
5419
|
-
render: (y) => y ? /* @__PURE__ */ a(E, { color:
|
|
5413
|
+
render: (y) => y ? /* @__PURE__ */ a(E, { color: ro[y], children: y }) : "-"
|
|
5420
5414
|
},
|
|
5421
5415
|
{
|
|
5422
5416
|
title: "耗时",
|
|
@@ -5443,7 +5437,7 @@ function oo() {
|
|
|
5443
5437
|
{
|
|
5444
5438
|
size: "small",
|
|
5445
5439
|
type: "link",
|
|
5446
|
-
icon: /* @__PURE__ */ a(
|
|
5440
|
+
icon: /* @__PURE__ */ a(Er, {}),
|
|
5447
5441
|
onClick: () => _(A),
|
|
5448
5442
|
children: "详情"
|
|
5449
5443
|
}
|
|
@@ -5492,7 +5486,7 @@ function oo() {
|
|
|
5492
5486
|
B,
|
|
5493
5487
|
{
|
|
5494
5488
|
placeholder: "搜索路径",
|
|
5495
|
-
prefix: /* @__PURE__ */ a(
|
|
5489
|
+
prefix: /* @__PURE__ */ a(Jn, {}),
|
|
5496
5490
|
allowClear: !0,
|
|
5497
5491
|
style: { width: 240 },
|
|
5498
5492
|
value: u,
|
|
@@ -5618,15 +5612,15 @@ function oo() {
|
|
|
5618
5612
|
)
|
|
5619
5613
|
] });
|
|
5620
5614
|
}
|
|
5621
|
-
const { Text: le } = pe,
|
|
5615
|
+
const { Text: le } = pe, On = [
|
|
5622
5616
|
{ key: "endpoints", label: "Mock 端点", component: Vt },
|
|
5623
5617
|
{ key: "environments", label: "环境 (MOCK/REAL/MIXED)", component: Wt },
|
|
5624
|
-
{ key: "scenarios", label: "场景状态机", component:
|
|
5625
|
-
{ key: "cases", label: "测试用例", component:
|
|
5626
|
-
{ key: "recordings", label: "录制回放", component:
|
|
5627
|
-
{ key: "request-logs", label: "请求日志", component:
|
|
5618
|
+
{ key: "scenarios", label: "场景状态机", component: Qa },
|
|
5619
|
+
{ key: "cases", label: "测试用例", component: to },
|
|
5620
|
+
{ key: "recordings", label: "录制回放", component: no },
|
|
5621
|
+
{ key: "request-logs", label: "请求日志", component: so }
|
|
5628
5622
|
];
|
|
5629
|
-
function
|
|
5623
|
+
function ao() {
|
|
5630
5624
|
var u;
|
|
5631
5625
|
const [e, t] = $("endpoints"), [n, r] = $([]), [s, o] = $("default"), [i, c] = $(null);
|
|
5632
5626
|
Y(() => {
|
|
@@ -5648,7 +5642,7 @@ function io() {
|
|
|
5648
5642
|
} catch {
|
|
5649
5643
|
}
|
|
5650
5644
|
};
|
|
5651
|
-
return (u =
|
|
5645
|
+
return (u = On.find((h) => h.key === e)) == null || u.component, /* @__PURE__ */ p("div", { children: [
|
|
5652
5646
|
/* @__PURE__ */ a(
|
|
5653
5647
|
Ue,
|
|
5654
5648
|
{
|
|
@@ -5664,7 +5658,7 @@ function io() {
|
|
|
5664
5658
|
type: "card",
|
|
5665
5659
|
tabBarExtraContent: /* @__PURE__ */ p(U, { size: "large", wrap: !0, children: [
|
|
5666
5660
|
/* @__PURE__ */ p(U, { children: [
|
|
5667
|
-
/* @__PURE__ */ a(
|
|
5661
|
+
/* @__PURE__ */ a(Gn, {}),
|
|
5668
5662
|
/* @__PURE__ */ a(le, { children: "当前环境:" }),
|
|
5669
5663
|
/* @__PURE__ */ a(
|
|
5670
5664
|
te,
|
|
@@ -5708,7 +5702,7 @@ function io() {
|
|
|
5708
5702
|
l(), d();
|
|
5709
5703
|
}, children: "刷新" })
|
|
5710
5704
|
] }),
|
|
5711
|
-
items:
|
|
5705
|
+
items: On.map((h) => ({
|
|
5712
5706
|
key: h.key,
|
|
5713
5707
|
label: h.label,
|
|
5714
5708
|
children: h.component === Vt ? /* @__PURE__ */ a(Vt, { activeEnvCode: s }) : h.component === Wt ? /* @__PURE__ */ a(Wt, { onEnvChange: (m) => {
|
|
@@ -5719,10 +5713,10 @@ function io() {
|
|
|
5719
5713
|
)
|
|
5720
5714
|
] });
|
|
5721
5715
|
}
|
|
5722
|
-
const
|
|
5716
|
+
const bl = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
5723
5717
|
__proto__: null,
|
|
5724
|
-
default:
|
|
5725
|
-
}, Symbol.toStringTag, { value: "Module" })), { Text: Le, Paragraph:
|
|
5718
|
+
default: ao
|
|
5719
|
+
}, Symbol.toStringTag, { value: "Module" })), { Text: Le, Paragraph: Sl } = pe, Mn = [
|
|
5726
5720
|
{
|
|
5727
5721
|
group: "基础数据",
|
|
5728
5722
|
icon: /* @__PURE__ */ a(Fe, {}),
|
|
@@ -5778,7 +5772,7 @@ const Sl = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
5778
5772
|
]
|
|
5779
5773
|
}
|
|
5780
5774
|
];
|
|
5781
|
-
function
|
|
5775
|
+
function wl({ onInsert: e, form: t, formField: n = "responseTemplate" }) {
|
|
5782
5776
|
const [r, s] = $(""), o = (h) => {
|
|
5783
5777
|
var m;
|
|
5784
5778
|
try {
|
|
@@ -5800,12 +5794,12 @@ function _l({ onInsert: e, form: t, formField: n = "responseTemplate" }) {
|
|
|
5800
5794
|
} catch {
|
|
5801
5795
|
v.warning("复制失败,请手动选择");
|
|
5802
5796
|
}
|
|
5803
|
-
}, c = r.toLowerCase(), l =
|
|
5797
|
+
}, c = r.toLowerCase(), l = Mn.map((h) => ({
|
|
5804
5798
|
...h,
|
|
5805
5799
|
items: h.items.filter(
|
|
5806
5800
|
(m) => !c || m.syntax.toLowerCase().includes(c) || m.desc.toLowerCase().includes(c) || m.example.toLowerCase().includes(c)
|
|
5807
5801
|
)
|
|
5808
|
-
})).filter((h) => h.items.length > 0), d =
|
|
5802
|
+
})).filter((h) => h.items.length > 0), d = Mn.reduce((h, m) => h + m.items.length, 0), u = l.reduce((h, m) => h + m.items.length, 0);
|
|
5809
5803
|
return /* @__PURE__ */ p(
|
|
5810
5804
|
F,
|
|
5811
5805
|
{
|
|
@@ -5818,14 +5812,14 @@ function _l({ onInsert: e, form: t, formField: n = "responseTemplate" }) {
|
|
|
5818
5812
|
"/",
|
|
5819
5813
|
d
|
|
5820
5814
|
] }),
|
|
5821
|
-
/* @__PURE__ */ a(Oe, { title: "点击按钮即可插入到上方响应模板;点击 syntax 文本可复制", children: /* @__PURE__ */ a(
|
|
5815
|
+
/* @__PURE__ */ a(Oe, { title: "点击按钮即可插入到上方响应模板;点击 syntax 文本可复制", children: /* @__PURE__ */ a(Rr, { style: { color: "#999" } }) })
|
|
5822
5816
|
] }),
|
|
5823
5817
|
extra: /* @__PURE__ */ a(
|
|
5824
5818
|
B,
|
|
5825
5819
|
{
|
|
5826
5820
|
size: "small",
|
|
5827
5821
|
placeholder: "搜索 @ 表达式",
|
|
5828
|
-
prefix: /* @__PURE__ */ a(
|
|
5822
|
+
prefix: /* @__PURE__ */ a(Jn, {}),
|
|
5829
5823
|
value: r,
|
|
5830
5824
|
onChange: (h) => s(h.target.value),
|
|
5831
5825
|
style: { width: 180 },
|
|
@@ -5871,7 +5865,7 @@ function _l({ onInsert: e, form: t, formField: n = "responseTemplate" }) {
|
|
|
5871
5865
|
{
|
|
5872
5866
|
size: "small",
|
|
5873
5867
|
type: "text",
|
|
5874
|
-
icon: /* @__PURE__ */ a(
|
|
5868
|
+
icon: /* @__PURE__ */ a(Kn, {}),
|
|
5875
5869
|
onClick: () => o(m.syntax)
|
|
5876
5870
|
}
|
|
5877
5871
|
) })
|
|
@@ -5883,8 +5877,8 @@ function _l({ onInsert: e, form: t, formField: n = "responseTemplate" }) {
|
|
|
5883
5877
|
}
|
|
5884
5878
|
);
|
|
5885
5879
|
}
|
|
5886
|
-
const { TextArea:
|
|
5887
|
-
function
|
|
5880
|
+
const { TextArea: jn } = B, { Text: Re, Paragraph: oo } = pe;
|
|
5881
|
+
function _l({ open: e, onClose: t, onSuccess: n, envOptions: r = [] }) {
|
|
5888
5882
|
const [s, o] = $(""), [i, c] = $(null), [l, d] = $(null), [u, h] = $(!1), [m, C] = $(null), [O, _] = $(!1), [x, y] = $("import"), [A] = N.useForm(), [k] = N.useForm(), P = () => {
|
|
5889
5883
|
o(""), c(null), d(null), C(null), A.resetFields(), k.resetFields();
|
|
5890
5884
|
}, T = () => {
|
|
@@ -5994,9 +5988,9 @@ function Tl({ open: e, onClose: t, onSuccess: n, envOptions: r = [] }) {
|
|
|
5994
5988
|
size: "large",
|
|
5995
5989
|
destroyOnHidden: !0,
|
|
5996
5990
|
children: [
|
|
5997
|
-
/* @__PURE__ */ a(
|
|
5991
|
+
/* @__PURE__ */ a(oo, { type: "secondary", style: { marginBottom: 12 }, children: "从浏览器 DevTools / Postman / 终端复制 curl 命令,粘贴到下方即可解析、试跑、入库。" }),
|
|
5998
5992
|
/* @__PURE__ */ a(
|
|
5999
|
-
|
|
5993
|
+
jn,
|
|
6000
5994
|
{
|
|
6001
5995
|
value: s,
|
|
6002
5996
|
onChange: (L) => o(L.target.value),
|
|
@@ -6014,7 +6008,7 @@ function Tl({ open: e, onClose: t, onSuccess: n, envOptions: r = [] }) {
|
|
|
6014
6008
|
] }),
|
|
6015
6009
|
l && /* @__PURE__ */ a(ee, { type: "error", showIcon: !0, style: { marginTop: 12 }, title: "解析失败", description: l }),
|
|
6016
6010
|
i && /* @__PURE__ */ a(F, { size: "small", style: { marginTop: 16 }, title: "解析结果", children: /* @__PURE__ */ p(z, { column: 1, size: "small", bordered: !0, children: [
|
|
6017
|
-
/* @__PURE__ */ a(z.Item, { label: "Method", children: /* @__PURE__ */ a(E, { color:
|
|
6011
|
+
/* @__PURE__ */ a(z.Item, { label: "Method", children: /* @__PURE__ */ a(E, { color: io(i.method), children: i.method }) }),
|
|
6018
6012
|
/* @__PURE__ */ a(z.Item, { label: "URL", children: /* @__PURE__ */ a(Re, { code: !0, copyable: !0, children: i.url }) }),
|
|
6019
6013
|
/* @__PURE__ */ a(z.Item, { label: "Path", children: /* @__PURE__ */ a(Re, { code: !0, children: i.path }) }),
|
|
6020
6014
|
i.query && /* @__PURE__ */ a(z.Item, { label: "Query", children: /* @__PURE__ */ a(Re, { code: !0, children: i.query }) }),
|
|
@@ -6101,7 +6095,7 @@ function Tl({ open: e, onClose: t, onSuccess: n, envOptions: r = [] }) {
|
|
|
6101
6095
|
/* @__PURE__ */ a(D, { span: 6, children: /* @__PURE__ */ a(N.Item, { name: "projectCode", label: "项目", children: /* @__PURE__ */ a(B, {}) }) })
|
|
6102
6096
|
] }),
|
|
6103
6097
|
/* @__PURE__ */ a(N.Item, { name: "responseTemplate", label: "响应模板 (JSON)", children: /* @__PURE__ */ a(
|
|
6104
|
-
|
|
6098
|
+
jn,
|
|
6105
6099
|
{
|
|
6106
6100
|
autoSize: { minRows: 3, maxRows: 8 },
|
|
6107
6101
|
style: { fontFamily: "Menlo, Monaco, monospace" }
|
|
@@ -6126,12 +6120,12 @@ function Tl({ open: e, onClose: t, onSuccess: n, envOptions: r = [] }) {
|
|
|
6126
6120
|
}
|
|
6127
6121
|
);
|
|
6128
6122
|
}
|
|
6129
|
-
function
|
|
6123
|
+
function io(e) {
|
|
6130
6124
|
return { GET: "blue", POST: "green", PUT: "orange", DELETE: "red", PATCH: "purple" }[e] || "default";
|
|
6131
6125
|
}
|
|
6132
|
-
const { TextArea:
|
|
6133
|
-
function
|
|
6134
|
-
const [s, o] = $("paste"), [i, c] = $(""), [l, d] = $(null), [u, h] = $(null), [m, C] = $(!1), [O, _] = $([]), [x, y] = $(!1), [A] = N.useForm(), k =
|
|
6126
|
+
const { TextArea: Nn } = B;
|
|
6127
|
+
function Tl({ open: e, onClose: t, onSuccess: n, envOptions: r = [] }) {
|
|
6128
|
+
const [s, o] = $("paste"), [i, c] = $(""), [l, d] = $(null), [u, h] = $(null), [m, C] = $(!1), [O, _] = $([]), [x, y] = $(!1), [A] = N.useForm(), k = Dn(null), P = () => {
|
|
6135
6129
|
c(""), d(null), h(null), _([]), A.resetFields();
|
|
6136
6130
|
}, T = () => {
|
|
6137
6131
|
P(), t();
|
|
@@ -6210,7 +6204,7 @@ function kl({ open: e, onClose: t, onSuccess: n, envOptions: r = [] }) {
|
|
|
6210
6204
|
title: "Method",
|
|
6211
6205
|
dataIndex: "method",
|
|
6212
6206
|
width: 90,
|
|
6213
|
-
render: (R) => /* @__PURE__ */ a(E, { color:
|
|
6207
|
+
render: (R) => /* @__PURE__ */ a(E, { color: co(R), children: R })
|
|
6214
6208
|
},
|
|
6215
6209
|
{ title: "Path", dataIndex: "path", width: 240, ellipsis: !0 },
|
|
6216
6210
|
{ title: "Summary", dataIndex: "summary", ellipsis: !0 },
|
|
@@ -6262,7 +6256,7 @@ function kl({ open: e, onClose: t, onSuccess: n, envOptions: r = [] }) {
|
|
|
6262
6256
|
] }),
|
|
6263
6257
|
children: /* @__PURE__ */ p("div", { children: [
|
|
6264
6258
|
/* @__PURE__ */ a(
|
|
6265
|
-
|
|
6259
|
+
Nn,
|
|
6266
6260
|
{
|
|
6267
6261
|
value: i,
|
|
6268
6262
|
onChange: (R) => c(R.target.value),
|
|
@@ -6281,11 +6275,11 @@ function kl({ open: e, onClose: t, onSuccess: n, envOptions: r = [] }) {
|
|
|
6281
6275
|
{
|
|
6282
6276
|
key: "upload",
|
|
6283
6277
|
label: /* @__PURE__ */ p("span", { children: [
|
|
6284
|
-
/* @__PURE__ */ a(
|
|
6278
|
+
/* @__PURE__ */ a(Or, {}),
|
|
6285
6279
|
" 上传文件"
|
|
6286
6280
|
] }),
|
|
6287
6281
|
children: /* @__PURE__ */ p(
|
|
6288
|
-
|
|
6282
|
+
gr.Dragger,
|
|
6289
6283
|
{
|
|
6290
6284
|
ref: k,
|
|
6291
6285
|
accept: ".json,.yaml,.yml,application/json,text/yaml",
|
|
@@ -6346,7 +6340,7 @@ function kl({ open: e, onClose: t, onSuccess: n, envOptions: r = [] }) {
|
|
|
6346
6340
|
/* @__PURE__ */ a(D, { span: 4, children: /* @__PURE__ */ a(N.Item, { name: "tagPrefix", label: "Tag 前缀", children: /* @__PURE__ */ a(B, {}) }) })
|
|
6347
6341
|
] }),
|
|
6348
6342
|
/* @__PURE__ */ a(N.Item, { name: "defaultResponse", label: "默认响应(无 example 时使用)", children: /* @__PURE__ */ a(
|
|
6349
|
-
|
|
6343
|
+
Nn,
|
|
6350
6344
|
{
|
|
6351
6345
|
autoSize: { minRows: 3, maxRows: 6 },
|
|
6352
6346
|
style: { fontFamily: "Menlo, Monaco, monospace" }
|
|
@@ -6373,22 +6367,22 @@ function kl({ open: e, onClose: t, onSuccess: n, envOptions: r = [] }) {
|
|
|
6373
6367
|
}
|
|
6374
6368
|
);
|
|
6375
6369
|
}
|
|
6376
|
-
function
|
|
6370
|
+
function co(e) {
|
|
6377
6371
|
return { GET: "blue", POST: "green", PUT: "orange", DELETE: "red", PATCH: "purple" }[e] || "default";
|
|
6378
6372
|
}
|
|
6379
|
-
const
|
|
6373
|
+
const lo = {
|
|
6380
6374
|
STANDARD_JSON: { label: "标准 JSON", color: "blue" },
|
|
6381
6375
|
RSS_XML: { label: "RSS 2.0", color: "orange" },
|
|
6382
6376
|
ATOM_XML: { label: "Atom 1.0", color: "gold" },
|
|
6383
6377
|
CUSTOM_SCRIPT: { label: "自定义脚本", color: "purple" },
|
|
6384
6378
|
INTERNAL_BEAN: { label: "内部 Bean", color: "cyan" }
|
|
6385
|
-
},
|
|
6379
|
+
}, uo = {
|
|
6386
6380
|
PENDING_VERIFY: { color: "default", text: "待验证" },
|
|
6387
6381
|
VERIFIED: { color: "green", text: "已验证" },
|
|
6388
6382
|
INVALID_AUTH: { color: "red", text: "鉴权失败" },
|
|
6389
6383
|
FATAL: { color: "red", text: "永久失败" },
|
|
6390
6384
|
DISABLED: { color: "default", text: "已停用" }
|
|
6391
|
-
},
|
|
6385
|
+
}, Un = {
|
|
6392
6386
|
PENDING: { color: "default" },
|
|
6393
6387
|
RUNNING: { color: "processing" },
|
|
6394
6388
|
SUCCESS: { color: "green" },
|
|
@@ -6396,7 +6390,7 @@ const po = {
|
|
|
6396
6390
|
FAILED: { color: "red" },
|
|
6397
6391
|
FATAL: { color: "red" }
|
|
6398
6392
|
};
|
|
6399
|
-
function
|
|
6393
|
+
function po() {
|
|
6400
6394
|
const e = Xe(), [t, n] = $([]), [r, s] = $(!1), [o, i] = $(null), [c, l] = $([]), [d, u] = $({}), [h, m] = $(null), [C, O] = $([]), _ = async () => {
|
|
6401
6395
|
s(!0);
|
|
6402
6396
|
try {
|
|
@@ -6414,7 +6408,7 @@ function ho() {
|
|
|
6414
6408
|
const x = (I) => {
|
|
6415
6409
|
Ne.confirm({
|
|
6416
6410
|
title: "确认删除",
|
|
6417
|
-
icon: /* @__PURE__ */ a(
|
|
6411
|
+
icon: /* @__PURE__ */ a(Ur, {}),
|
|
6418
6412
|
content: `确定要删除订阅 "${I.name}" 吗? 运行历史会保留.`,
|
|
6419
6413
|
onOk: async () => {
|
|
6420
6414
|
try {
|
|
@@ -6528,7 +6522,7 @@ function ho() {
|
|
|
6528
6522
|
dataIndex: "extractorType",
|
|
6529
6523
|
width: 140,
|
|
6530
6524
|
render: (I) => {
|
|
6531
|
-
const w =
|
|
6525
|
+
const w = lo[I] || { label: I, color: "default" };
|
|
6532
6526
|
return /* @__PURE__ */ a(E, { color: w.color, children: w.label });
|
|
6533
6527
|
}
|
|
6534
6528
|
},
|
|
@@ -6543,7 +6537,7 @@ function ho() {
|
|
|
6543
6537
|
dataIndex: "status",
|
|
6544
6538
|
width: 110,
|
|
6545
6539
|
render: (I) => {
|
|
6546
|
-
const w =
|
|
6540
|
+
const w = uo[I] || { color: "default", text: I };
|
|
6547
6541
|
return /* @__PURE__ */ a(E, { color: w.color, children: w.text });
|
|
6548
6542
|
}
|
|
6549
6543
|
},
|
|
@@ -6559,7 +6553,7 @@ function ho() {
|
|
|
6559
6553
|
width: 110,
|
|
6560
6554
|
render: (I, w) => {
|
|
6561
6555
|
var L;
|
|
6562
|
-
return I ? /* @__PURE__ */ a(Oe, { title: w.lastError || "", children: /* @__PURE__ */ a(E, { color: ((L =
|
|
6556
|
+
return I ? /* @__PURE__ */ a(Oe, { title: w.lastError || "", children: /* @__PURE__ */ a(E, { color: ((L = Un[I]) == null ? void 0 : L.color) || "default", children: I }) }) : /* @__PURE__ */ a("span", { style: { color: "#ccc" }, children: "-" });
|
|
6563
6557
|
}
|
|
6564
6558
|
},
|
|
6565
6559
|
{
|
|
@@ -6586,7 +6580,7 @@ function ho() {
|
|
|
6586
6580
|
{
|
|
6587
6581
|
type: "link",
|
|
6588
6582
|
size: "small",
|
|
6589
|
-
icon: /* @__PURE__ */ a(
|
|
6583
|
+
icon: /* @__PURE__ */ a(Mr, {}),
|
|
6590
6584
|
onClick: () => e(`/subscribe/edit/${w.id}`),
|
|
6591
6585
|
children: "编辑"
|
|
6592
6586
|
}
|
|
@@ -6625,7 +6619,7 @@ function ho() {
|
|
|
6625
6619
|
{
|
|
6626
6620
|
type: "link",
|
|
6627
6621
|
size: "small",
|
|
6628
|
-
icon: /* @__PURE__ */ a(
|
|
6622
|
+
icon: /* @__PURE__ */ a(jr, {}),
|
|
6629
6623
|
onClick: () => A(w.id),
|
|
6630
6624
|
children: "停用"
|
|
6631
6625
|
}
|
|
@@ -6639,7 +6633,7 @@ function ho() {
|
|
|
6639
6633
|
children: "启用"
|
|
6640
6634
|
}
|
|
6641
6635
|
),
|
|
6642
|
-
/* @__PURE__ */ a(Zt, { title: "确认删除?", onConfirm: () => x(w), okText: "删除", cancelText: "取消", children: /* @__PURE__ */ a(j, { type: "link", size: "small", danger: !0, icon: /* @__PURE__ */ a(
|
|
6636
|
+
/* @__PURE__ */ a(Zt, { title: "确认删除?", onConfirm: () => x(w), okText: "删除", cancelText: "取消", children: /* @__PURE__ */ a(j, { type: "link", size: "small", danger: !0, icon: /* @__PURE__ */ a(Nr, {}), children: "删除" }) })
|
|
6643
6637
|
] })
|
|
6644
6638
|
}
|
|
6645
6639
|
],
|
|
@@ -6657,7 +6651,7 @@ function ho() {
|
|
|
6657
6651
|
j,
|
|
6658
6652
|
{
|
|
6659
6653
|
type: "primary",
|
|
6660
|
-
icon: /* @__PURE__ */ a(
|
|
6654
|
+
icon: /* @__PURE__ */ a(Vn, {}),
|
|
6661
6655
|
onClick: () => e("/subscribe/new"),
|
|
6662
6656
|
children: "新建订阅"
|
|
6663
6657
|
}
|
|
@@ -6712,7 +6706,7 @@ function ho() {
|
|
|
6712
6706
|
width: 90,
|
|
6713
6707
|
render: (I) => {
|
|
6714
6708
|
var w;
|
|
6715
|
-
return /* @__PURE__ */ a(E, { color: (w =
|
|
6709
|
+
return /* @__PURE__ */ a(E, { color: (w = Un[I]) == null ? void 0 : w.color, children: I });
|
|
6716
6710
|
}
|
|
6717
6711
|
},
|
|
6718
6712
|
{
|
|
@@ -6812,12 +6806,12 @@ function ho() {
|
|
|
6812
6806
|
}
|
|
6813
6807
|
]
|
|
6814
6808
|
}
|
|
6815
|
-
) : /* @__PURE__ */ a(
|
|
6809
|
+
) : /* @__PURE__ */ a(mo, { result: o == null ? void 0 : o.result })
|
|
6816
6810
|
}
|
|
6817
6811
|
)
|
|
6818
6812
|
] });
|
|
6819
6813
|
}
|
|
6820
|
-
function
|
|
6814
|
+
function mo({ result: e }) {
|
|
6821
6815
|
return e ? e.success ? /* @__PURE__ */ p(U, { orientation: "vertical", style: { width: "100%" }, size: "middle", children: [
|
|
6822
6816
|
/* @__PURE__ */ a(F, { size: "small", title: "调用结果", children: /* @__PURE__ */ p(U, { size: "large", wrap: !0, children: [
|
|
6823
6817
|
/* @__PURE__ */ p("span", { children: [
|
|
@@ -6862,26 +6856,26 @@ function fo({ result: e }) {
|
|
|
6862
6856
|
e.fieldErrors && e.fieldErrors.length > 0 && /* @__PURE__ */ a(ee, { type: "warning", showIcon: !0, message: "字段问题", description: /* @__PURE__ */ a("ul", { children: e.fieldErrors.map((t, n) => /* @__PURE__ */ a("li", { children: t }, n)) }) })
|
|
6863
6857
|
] }) : /* @__PURE__ */ a(ee, { type: "error", showIcon: !0, title: "试运行失败", description: e.errorMessage || "未知错误" }) : null;
|
|
6864
6858
|
}
|
|
6865
|
-
const
|
|
6859
|
+
const ho = [
|
|
6866
6860
|
{ value: "STANDARD_JSON", label: "标准 JSON (按统一契约返回的 JSON)" },
|
|
6867
6861
|
{ value: "RSS_XML", label: "RSS 2.0 (XML feed)" },
|
|
6868
6862
|
{ value: "ATOM_XML", label: "Atom 1.0 (XML feed)" },
|
|
6869
6863
|
{ value: "CUSTOM_SCRIPT", label: "自定义脚本 (z-script 平台)" },
|
|
6870
6864
|
{ value: "INTERNAL_BEAN", label: "内部 Bean (我们自己的模块, 暂未启用)" }
|
|
6871
|
-
],
|
|
6865
|
+
], fo = [
|
|
6872
6866
|
{ value: "NONE", label: "无鉴权" },
|
|
6873
6867
|
{ value: "BEARER", label: "Bearer (Authorization: Bearer xxx)" },
|
|
6874
6868
|
{ value: "API_KEY", label: "API Key (Authorization: xxx)" },
|
|
6875
6869
|
{ value: "BASIC", label: "Basic (user:password base64)" }
|
|
6876
|
-
],
|
|
6870
|
+
], yo = [
|
|
6877
6871
|
{ label: "每 5 分钟", value: "0 */5 * * * ?" },
|
|
6878
6872
|
{ label: "每 15 分钟", value: "0 */15 * * * ?" },
|
|
6879
6873
|
{ label: "每小时", value: "0 0 * * * ?" },
|
|
6880
6874
|
{ label: "每 6 小时", value: "0 0 */6 * * ?" },
|
|
6881
6875
|
{ label: "每天 8 点", value: "0 0 8 * * ?" }
|
|
6882
6876
|
];
|
|
6883
|
-
function
|
|
6884
|
-
const { id: e } =
|
|
6877
|
+
function zn() {
|
|
6878
|
+
const { id: e } = Fn(), t = Xe(), n = !!e, [r] = N.useForm(), [s, o] = $(!1), [i, c] = $(!1), [l, d] = $([]), [u, h] = $([]), m = N.useWatch("sourceType", r), C = N.useWatch("extractorType", r), O = N.useWatch("authType", r);
|
|
6885
6879
|
Y(() => {
|
|
6886
6880
|
_(), x(), n && y();
|
|
6887
6881
|
}, [e]);
|
|
@@ -6939,7 +6933,7 @@ function Ln() {
|
|
|
6939
6933
|
back: !0,
|
|
6940
6934
|
extra: /* @__PURE__ */ p(U, { children: [
|
|
6941
6935
|
/* @__PURE__ */ a(j, { onClick: () => t("/subscribe/list"), children: "取消" }),
|
|
6942
|
-
/* @__PURE__ */ a(j, { type: "primary", icon: /* @__PURE__ */ a(
|
|
6936
|
+
/* @__PURE__ */ a(j, { type: "primary", icon: /* @__PURE__ */ a(Wn, {}), loading: i, onClick: A, children: "保存 (自动验证)" })
|
|
6943
6937
|
] })
|
|
6944
6938
|
}
|
|
6945
6939
|
),
|
|
@@ -6991,7 +6985,7 @@ function Ln() {
|
|
|
6991
6985
|
] })
|
|
6992
6986
|
] }),
|
|
6993
6987
|
/* @__PURE__ */ p(F, { type: "inner", title: "鉴权 (从 z-mist 拉取 secret)", style: { marginBottom: 16 }, children: [
|
|
6994
|
-
/* @__PURE__ */ a(N.Item, { label: "鉴权方式", name: "authType", children: /* @__PURE__ */ a(te, { options:
|
|
6988
|
+
/* @__PURE__ */ a(N.Item, { label: "鉴权方式", name: "authType", children: /* @__PURE__ */ a(te, { options: fo }) }),
|
|
6995
6989
|
O && O !== "NONE" && /* @__PURE__ */ a(
|
|
6996
6990
|
N.Item,
|
|
6997
6991
|
{
|
|
@@ -7021,7 +7015,7 @@ function Ln() {
|
|
|
7021
7015
|
name: "extractorType",
|
|
7022
7016
|
rules: [{ required: !0 }],
|
|
7023
7017
|
extra: "STANDARD_JSON/RSS_XML/ATOM_XML 直接解析; CUSTOM_SCRIPT 调 z-script 平台",
|
|
7024
|
-
children: /* @__PURE__ */ a(te, { options:
|
|
7018
|
+
children: /* @__PURE__ */ a(te, { options: ho })
|
|
7025
7019
|
}
|
|
7026
7020
|
),
|
|
7027
7021
|
C === "CUSTOM_SCRIPT" && /* @__PURE__ */ a(
|
|
@@ -7058,7 +7052,7 @@ function Ln() {
|
|
|
7058
7052
|
{
|
|
7059
7053
|
style: { width: 140 },
|
|
7060
7054
|
placeholder: "常用",
|
|
7061
|
-
options:
|
|
7055
|
+
options: yo,
|
|
7062
7056
|
onChange: (k) => r.setFieldValue("cronExpr", k),
|
|
7063
7057
|
value: null
|
|
7064
7058
|
}
|
|
@@ -7095,7 +7089,7 @@ function Ln() {
|
|
|
7095
7089
|
) }) })
|
|
7096
7090
|
] });
|
|
7097
7091
|
}
|
|
7098
|
-
const
|
|
7092
|
+
const go = {
|
|
7099
7093
|
PENDING: "default",
|
|
7100
7094
|
RUNNING: "processing",
|
|
7101
7095
|
SUCCESS: "green",
|
|
@@ -7103,7 +7097,7 @@ const So = {
|
|
|
7103
7097
|
FAILED: "red",
|
|
7104
7098
|
FATAL: "red"
|
|
7105
7099
|
};
|
|
7106
|
-
function
|
|
7100
|
+
function bo() {
|
|
7107
7101
|
const [e, t] = $([]), [n, r] = $(null), [s, o] = $([]), [i, c] = $([]), [l, d] = $(null), [u, h] = $(!1);
|
|
7108
7102
|
Y(() => {
|
|
7109
7103
|
m();
|
|
@@ -7145,7 +7139,7 @@ function wo() {
|
|
|
7145
7139
|
}
|
|
7146
7140
|
),
|
|
7147
7141
|
/* @__PURE__ */ a(
|
|
7148
|
-
|
|
7142
|
+
qr,
|
|
7149
7143
|
{
|
|
7150
7144
|
left: /* @__PURE__ */ a(
|
|
7151
7145
|
te,
|
|
@@ -7215,7 +7209,7 @@ function wo() {
|
|
|
7215
7209
|
title: "状态",
|
|
7216
7210
|
dataIndex: "status",
|
|
7217
7211
|
width: 80,
|
|
7218
|
-
render: (A) => /* @__PURE__ */ a(E, { color:
|
|
7212
|
+
render: (A) => /* @__PURE__ */ a(E, { color: go[A], children: A })
|
|
7219
7213
|
},
|
|
7220
7214
|
{
|
|
7221
7215
|
title: "拉取/成功/死信",
|
|
@@ -7274,25 +7268,25 @@ function wo() {
|
|
|
7274
7268
|
] })
|
|
7275
7269
|
] });
|
|
7276
7270
|
}
|
|
7277
|
-
function
|
|
7278
|
-
return /* @__PURE__ */ p(
|
|
7279
|
-
/* @__PURE__ */ a(ue, { index: !0, element: /* @__PURE__ */ a(
|
|
7280
|
-
/* @__PURE__ */ a(ue, { path: "list", element: /* @__PURE__ */ a(
|
|
7281
|
-
/* @__PURE__ */ a(ue, { path: "new", element: /* @__PURE__ */ a(
|
|
7282
|
-
/* @__PURE__ */ a(ue, { path: "edit/:id", element: /* @__PURE__ */ a(
|
|
7283
|
-
/* @__PURE__ */ a(ue, { path: "runs", element: /* @__PURE__ */ a(
|
|
7271
|
+
function So() {
|
|
7272
|
+
return /* @__PURE__ */ p(qn, { children: [
|
|
7273
|
+
/* @__PURE__ */ a(ue, { index: !0, element: /* @__PURE__ */ a(Bn, { to: "list", replace: !0 }) }),
|
|
7274
|
+
/* @__PURE__ */ a(ue, { path: "list", element: /* @__PURE__ */ a(po, {}) }),
|
|
7275
|
+
/* @__PURE__ */ a(ue, { path: "new", element: /* @__PURE__ */ a(zn, {}) }),
|
|
7276
|
+
/* @__PURE__ */ a(ue, { path: "edit/:id", element: /* @__PURE__ */ a(zn, {}) }),
|
|
7277
|
+
/* @__PURE__ */ a(ue, { path: "runs", element: /* @__PURE__ */ a(bo, {}) })
|
|
7284
7278
|
] });
|
|
7285
7279
|
}
|
|
7286
|
-
const
|
|
7280
|
+
const kl = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
7287
7281
|
__proto__: null,
|
|
7288
|
-
default:
|
|
7289
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
7282
|
+
default: So
|
|
7283
|
+
}, Symbol.toStringTag, { value: "Module" })), wo = {
|
|
7290
7284
|
OPEN: { color: "blue", text: "待开始" },
|
|
7291
7285
|
IN_PROGRESS: { color: "green", text: "进行中" },
|
|
7292
7286
|
COMPLETED: { color: "default", text: "已完成" },
|
|
7293
7287
|
ARCHIVED: { color: "default", text: "已归档" }
|
|
7294
7288
|
};
|
|
7295
|
-
function
|
|
7289
|
+
function _o() {
|
|
7296
7290
|
const e = Xe(), [t, n] = $("mine"), [r, s] = $([]), [o, i] = $(!1), [c, l] = $(null), d = async () => {
|
|
7297
7291
|
i(!0), l(null);
|
|
7298
7292
|
try {
|
|
@@ -7324,7 +7318,7 @@ function ko() {
|
|
|
7324
7318
|
breadcrumb: [{ label: "项目中心" }]
|
|
7325
7319
|
}
|
|
7326
7320
|
),
|
|
7327
|
-
c && !o && /* @__PURE__ */ a("div", { style: { marginBottom: 16 }, children: /* @__PURE__ */ a(
|
|
7321
|
+
c && !o && /* @__PURE__ */ a("div", { style: { marginBottom: 16 }, children: /* @__PURE__ */ a(Br, { error: c, onRetry: d }) }),
|
|
7328
7322
|
/* @__PURE__ */ p("div", { style: {
|
|
7329
7323
|
background: "#ffffff",
|
|
7330
7324
|
borderRadius: 16,
|
|
@@ -7342,7 +7336,7 @@ function ko() {
|
|
|
7342
7336
|
j,
|
|
7343
7337
|
{
|
|
7344
7338
|
type: "primary",
|
|
7345
|
-
icon: /* @__PURE__ */ a(
|
|
7339
|
+
icon: /* @__PURE__ */ a(Vn, {}),
|
|
7346
7340
|
onClick: () => e("/project/new"),
|
|
7347
7341
|
children: "新建项目"
|
|
7348
7342
|
}
|
|
@@ -7382,7 +7376,7 @@ function ko() {
|
|
|
7382
7376
|
dataIndex: "status",
|
|
7383
7377
|
width: 100,
|
|
7384
7378
|
render: (m) => {
|
|
7385
|
-
const C =
|
|
7379
|
+
const C = wo[m] || { color: "default", text: m };
|
|
7386
7380
|
return /* @__PURE__ */ a(E, { color: C.color, children: C.text });
|
|
7387
7381
|
}
|
|
7388
7382
|
},
|
|
@@ -7433,15 +7427,15 @@ function ko() {
|
|
|
7433
7427
|
] })
|
|
7434
7428
|
] });
|
|
7435
7429
|
}
|
|
7436
|
-
const
|
|
7430
|
+
const To = [
|
|
7437
7431
|
{ value: "general", label: "通用助手" },
|
|
7438
7432
|
{ value: "analyst", label: "分析师" },
|
|
7439
7433
|
{ value: "writer", label: "写手" },
|
|
7440
7434
|
{ value: "pm", label: "产品经理" },
|
|
7441
7435
|
{ value: "ops", label: "运营" }
|
|
7442
7436
|
];
|
|
7443
|
-
function
|
|
7444
|
-
const e = Xe(), [t] =
|
|
7437
|
+
function ko() {
|
|
7438
|
+
const e = Xe(), [t] = Tr(), [n] = N.useForm(), [r, s] = $(!1), [o, i] = $("from-subscribe"), [c, l] = $([]), [d, u] = $([]), [h, m] = $(!1), [C, O] = $([]), [_, x] = $(null);
|
|
7445
7439
|
Y(() => {
|
|
7446
7440
|
const P = t.get("subscriptionId"), T = t.get("itemIds");
|
|
7447
7441
|
P && (x(Number(P)), n.setFieldValue("sourceSubscriptionId", Number(P)), A(P)), T && O(T.split(",").map(Number).filter(Boolean));
|
|
@@ -7474,7 +7468,7 @@ function Co() {
|
|
|
7474
7468
|
F,
|
|
7475
7469
|
{
|
|
7476
7470
|
title: /* @__PURE__ */ p(U, { children: [
|
|
7477
|
-
/* @__PURE__ */ a(j, { type: "text", icon: /* @__PURE__ */ a(
|
|
7471
|
+
/* @__PURE__ */ a(j, { type: "text", icon: /* @__PURE__ */ a(Zn, {}), onClick: () => e("/project/list") }),
|
|
7478
7472
|
/* @__PURE__ */ a(Xt, {}),
|
|
7479
7473
|
"新建项目 (立项)"
|
|
7480
7474
|
] }),
|
|
@@ -7484,7 +7478,7 @@ function Co() {
|
|
|
7484
7478
|
j,
|
|
7485
7479
|
{
|
|
7486
7480
|
type: "primary",
|
|
7487
|
-
icon: /* @__PURE__ */ a(
|
|
7481
|
+
icon: /* @__PURE__ */ a(Wn, {}),
|
|
7488
7482
|
loading: r,
|
|
7489
7483
|
onClick: async () => {
|
|
7490
7484
|
try {
|
|
@@ -7604,7 +7598,7 @@ function Co() {
|
|
|
7604
7598
|
] })
|
|
7605
7599
|
] }),
|
|
7606
7600
|
/* @__PURE__ */ p(F, { type: "inner", title: "Agent 配置", style: { marginBottom: 16 }, children: [
|
|
7607
|
-
/* @__PURE__ */ a(N.Item, { label: "Agent 角色", name: "agentRole", extra: "决定 system prompt 的语气 / 视角", children: /* @__PURE__ */ a(te, { options:
|
|
7601
|
+
/* @__PURE__ */ a(N.Item, { label: "Agent 角色", name: "agentRole", extra: "决定 system prompt 的语气 / 视角", children: /* @__PURE__ */ a(te, { options: To }) }),
|
|
7608
7602
|
/* @__PURE__ */ a(
|
|
7609
7603
|
N.Item,
|
|
7610
7604
|
{
|
|
@@ -7627,18 +7621,18 @@ function Co() {
|
|
|
7627
7621
|
}
|
|
7628
7622
|
) });
|
|
7629
7623
|
}
|
|
7630
|
-
const
|
|
7631
|
-
USER: { color: "blue", icon: /* @__PURE__ */ a(
|
|
7624
|
+
const Ln = {
|
|
7625
|
+
USER: { color: "blue", icon: /* @__PURE__ */ a(Hn, {}), label: "CEO" },
|
|
7632
7626
|
ASSISTANT: { color: "purple", icon: /* @__PURE__ */ a(Dt, {}), label: "Agent" },
|
|
7633
7627
|
SYSTEM: { color: "default", icon: null, label: "系统" }
|
|
7634
|
-
},
|
|
7628
|
+
}, Io = {
|
|
7635
7629
|
OPEN: { color: "blue", text: "待开始" },
|
|
7636
7630
|
IN_PROGRESS: { color: "green", text: "进行中" },
|
|
7637
7631
|
COMPLETED: { color: "default", text: "已完成" },
|
|
7638
7632
|
ARCHIVED: { color: "default", text: "已归档" }
|
|
7639
7633
|
};
|
|
7640
|
-
function
|
|
7641
|
-
const { id: e } =
|
|
7634
|
+
function Co() {
|
|
7635
|
+
const { id: e } = Fn(), t = Xe(), [n, r] = $(null), [s, o] = $([]), [i, c] = $(""), [l, d] = $(!1), u = Dn(null);
|
|
7642
7636
|
Y(() => {
|
|
7643
7637
|
e && h();
|
|
7644
7638
|
}, [e]), Y(() => {
|
|
@@ -7681,13 +7675,13 @@ function $o() {
|
|
|
7681
7675
|
}
|
|
7682
7676
|
};
|
|
7683
7677
|
if (!n) return /* @__PURE__ */ a("div", { style: { padding: 24 }, children: /* @__PURE__ */ a(bt, {}) });
|
|
7684
|
-
const O =
|
|
7678
|
+
const O = Io[n.status] || { color: "default", text: n.status };
|
|
7685
7679
|
return /* @__PURE__ */ p("div", { style: { padding: 24, height: "calc(100vh - 64px)", display: "flex", flexDirection: "column", gap: 16 }, children: [
|
|
7686
7680
|
/* @__PURE__ */ p(
|
|
7687
7681
|
F,
|
|
7688
7682
|
{
|
|
7689
7683
|
title: /* @__PURE__ */ p(U, { children: [
|
|
7690
|
-
/* @__PURE__ */ a(j, { type: "text", icon: /* @__PURE__ */ a(
|
|
7684
|
+
/* @__PURE__ */ a(j, { type: "text", icon: /* @__PURE__ */ a(Zn, {}), onClick: () => t("/project/list") }),
|
|
7691
7685
|
/* @__PURE__ */ a(Xt, {}),
|
|
7692
7686
|
/* @__PURE__ */ a("span", { style: { fontWeight: 500 }, children: n.name }),
|
|
7693
7687
|
/* @__PURE__ */ a(E, { color: O.color, children: O.text })
|
|
@@ -7724,9 +7718,9 @@ function $o() {
|
|
|
7724
7718
|
style: { flex: 1, display: "flex", flexDirection: "column" },
|
|
7725
7719
|
styles: { body: { flex: 1, display: "flex", flexDirection: "column", padding: 0 } },
|
|
7726
7720
|
children: [
|
|
7727
|
-
/* @__PURE__ */ a("div", { ref: u, style: { flex: 1, overflow: "auto", padding: 16, background: "#fafafa" }, children: s.length === 0 ? /* @__PURE__ */ a(
|
|
7721
|
+
/* @__PURE__ */ a("div", { ref: u, style: { flex: 1, overflow: "auto", padding: 16, background: "#fafafa" }, children: s.length === 0 ? /* @__PURE__ */ a(br, { description: "还没有消息, 跟 Agent 说点什么?" }) : /* @__PURE__ */ p(U, { orientation: "vertical", style: { width: "100%" }, size: "middle", children: [
|
|
7728
7722
|
s.map((_) => {
|
|
7729
|
-
const x =
|
|
7723
|
+
const x = Ln[_.role] || Ln.SYSTEM, y = _.role === "USER";
|
|
7730
7724
|
return /* @__PURE__ */ a("div", { style: {
|
|
7731
7725
|
display: "flex",
|
|
7732
7726
|
justifyContent: y ? "flex-end" : "flex-start"
|
|
@@ -7795,7 +7789,7 @@ function $o() {
|
|
|
7795
7789
|
j,
|
|
7796
7790
|
{
|
|
7797
7791
|
type: "primary",
|
|
7798
|
-
icon: /* @__PURE__ */ a(
|
|
7792
|
+
icon: /* @__PURE__ */ a(zr, {}),
|
|
7799
7793
|
loading: l,
|
|
7800
7794
|
onClick: m,
|
|
7801
7795
|
disabled: !i.trim(),
|
|
@@ -7808,228 +7802,228 @@ function $o() {
|
|
|
7808
7802
|
)
|
|
7809
7803
|
] });
|
|
7810
7804
|
}
|
|
7811
|
-
function
|
|
7812
|
-
return /* @__PURE__ */ p(
|
|
7813
|
-
/* @__PURE__ */ a(ue, { index: !0, element: /* @__PURE__ */ a(
|
|
7814
|
-
/* @__PURE__ */ a(ue, { path: "list", element: /* @__PURE__ */ a(
|
|
7815
|
-
/* @__PURE__ */ a(ue, { path: "new", element: /* @__PURE__ */ a(
|
|
7816
|
-
/* @__PURE__ */ a(ue, { path: ":id", element: /* @__PURE__ */ a(
|
|
7805
|
+
function Ao() {
|
|
7806
|
+
return /* @__PURE__ */ p(qn, { children: [
|
|
7807
|
+
/* @__PURE__ */ a(ue, { index: !0, element: /* @__PURE__ */ a(Bn, { to: "list", replace: !0 }) }),
|
|
7808
|
+
/* @__PURE__ */ a(ue, { path: "list", element: /* @__PURE__ */ a(_o, {}) }),
|
|
7809
|
+
/* @__PURE__ */ a(ue, { path: "new", element: /* @__PURE__ */ a(ko, {}) }),
|
|
7810
|
+
/* @__PURE__ */ a(ue, { path: ":id", element: /* @__PURE__ */ a(Co, {}) })
|
|
7817
7811
|
] });
|
|
7818
7812
|
}
|
|
7819
|
-
const
|
|
7813
|
+
const Il = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
7820
7814
|
__proto__: null,
|
|
7821
|
-
default:
|
|
7822
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
7823
|
-
function
|
|
7824
|
-
return /* @__PURE__ */ a(
|
|
7815
|
+
default: Ao
|
|
7816
|
+
}, Symbol.toStringTag, { value: "Module" })), $o = "# z-team-component\n\nz-team(团队工作台)的**跨仓唯一前端面**:把「多模式工作台 / 模式切换 / z-opc 业务套件聚合 / 订阅域 / 项目域」\n这一整套团队工作台页面收敛成一个可复用的 React 组件包,由主壳(z-opc 主前端)挂载。\n\n- **npm 包名**:`@yuku123/z-team-component`\n- **宿主接入**:双入口 —— `.`(`ZTeamApp` / `SubscribeApp` / `ProjectApp`)与 `./pages`(`routes` / `appMeta` / `menuItems`)\n- **后端**:与 z-opc 主壳同源的 `/api/**`(axios `baseURL = '/api'`,Cookie 模式 `withCredentials`)\n- **技术栈**:React 19 + antd 6 + react-router-dom 7 + vite(**library mode**,双入口 `index` / `pages`,\n 基座与全部 `@yuku123/*` 一律 **external**,由消费方用自己的 node_modules 解析)\n\n> ⚠ z-team 是**主壳的总控包**:它自己不承载某个业务域,而是把 z-opc 的业务套件(`/ctc/*`、`/ai/*`、`/config/*` …)\n> 聚合进工作台外壳里渲染。所以本文档描述的是 **z-team 自身的能力**(工作台 / 模式切换 / 套件聚合 / 订阅 / 项目)。\n\n---\n\n## 一、能力概览\n\n### 1.1 顶层路由(`src/pages-manifest.ts` 的 `routes`)\n\n| 路由 | 组件 | 能力 |\n|------|------|------|\n| `/team/subscribe` | `SubscribeApp` | 订阅域:订阅列表 / 编辑 / 运行历史 |\n| `/team/project` | `ProjectApp` | 项目域:项目列表 / 创建 / 详情 |\n| `/team/docs` | `ComponentDocPage` | 本文件渲染页(左侧 240px TOC + 右侧正文) |\n| `/team/:rest*` | `ZTeamApp` | **兜底**:`ZTeamApp` 内部按 `useLocation().pathname` 懒加载分发到下面 15 个域 |\n\n`menuItems`:`/team/subscribe`(订阅)/ `/team/project`(项目)/ `/team/workspace`(工作台)/ `/team/docs`(组件文档,末项)。\n\n### 1.2 `ZTeamApp` 顶层分发(`src/zteam-adapter/App.tsx`)\n\n| pathname | 渲染的域 | 源文件 |\n|----------|----------|--------|\n| `/workspace` | 工作台 | `src/zteam/pages/workspace/index.tsx` |\n| `/workspace/phone` | 移动端工作台 | `src/zteam/pages/workspace/phone/index.tsx` |\n| `/workspace/from-ticket` | 从工单进入 | `src/zteam/pages/workspace/from-ticket.tsx` |\n| `/workspace/from-scenario` | 从场景进入 | `src/zteam/pages/workspace/from-scenario.tsx` |\n| `/workspace/build-by-form` | 表单构建 | `src/zteam/pages/workspace/build-by-form.tsx` |\n| `/scenario` | 场景 | `src/zteam/pages/scenario/index.tsx` |\n| `/admin` | 管理后台(走工作台外壳的 admin 分支) | `src/zteam/pages/admin/index.tsx` |\n| `/welcome` | 产品介绍 | `src/zteam/pages/welcome/index.tsx` |\n| `/portal` | 场景入口 | `src/zteam/pages/portal/index.tsx` |\n| `/chatdemo` | 聊天演示 | `src/zteam/pages/chatdemo/index.tsx` |\n| `/embed/chat` | 嵌入式聊天 | `src/zteam/pages/embed/chat/index.tsx` |\n| `/change-log` | 变更记录 | `src/zteam/pages/change-log/index.tsx` |\n| `/docs` | **操作手册页**(52KB 手写暗色主题页,**与本文件的组件文档页不是一回事**) | `src/zteam/pages/docs/index.tsx` |\n\n`src/zteam/pages/` 下共 **14 个域目录**:`admin` / `agenthub-digital-brain-test` / `change-log` / `chatdemo` /\n`docs` / `download` / `embed` / `login` / `note` / `phone` / `portal` / `scenario` / `welcome` / `workspace`。\n其中 `agenthub-digital-brain-test` / `download` / `login` / `note` **没有** `ZTeamApp` 顶层分支,\n由域内路由或别的入口进入。\n\n> **2026-11-07:`rpa` 域目录已删除(RPA 入口整体下线)。** RPA 是脚本中心(z-script)的产品皮,\n> 前端 tab / `/rpa/*` 路由 / 页面全部移除,执行能力留在脚本中心继续增强;老链接 `/rpa/*` 由主壳重定向到 `/workspace`。\n\n### 1.3 工作台模式切换(`src/zteam/pages/workspace/utils/chatMode.ts`)\n\n`ChatMode` 共 12 种:`personal` / `collaboration` / `smart` / `product` / `dev` / `test` / `ops` / `admin` /\n`system` / `life` / `training` / `knowledge`(默认 `collaboration`)。\n\n模式切换统一走 `history.push` 到对应顶层路由(`Layout/index.tsx` 的 `handleModeSwitch`):\n\n| 模式 | 落点 |\n|------|------|\n| `system` | `/ctc/4a/account`(z-opc 业务路径;已在业务路径上时不重复跳) |\n| `test` | `/test/qa/dashboard` |\n| `admin` | `/admin?mode=admin` |\n| 其余模式 | `/workspace?mode=xxx`(必须带 `?desktop=1`,否则窄视口会被重定向到移动端工作台) |\n\n模式持久化在 URL query 上(`?mode=xxx`,`replaceState` 不污染历史记录);\n`/admin*` → `admin`、`/ops/*` → `ops`、`/lc/*` → `dev` 由 `readModeFromUrl()` 自动识别。\n\n### 1.4 套件聚合(`src/zteam/pages/workspace/components/Layout/SystemShell.tsx`)\n\n`SystemShell` 用一张 `SYSTEM_ROUTES` 表把 **z-opc 的业务套件**接进工作台的右侧内容区,\n用 `matchSystemPath()` 做 pathname 匹配(精确 → 通配 `*` / 参数 `:param`),支持 `/ctc/*`、`/ai/*`、`/config/*`、\n`/task/*`、`/workflow/*`、`/schedule/*`、`/mist/*`、`/meta/*`、`/msg/*`、`/rpc/*`、`/kb/*`、`/product/*`、`/ops/*` 等前缀。\n\n## 二、导出面\n\n```js\n// 主入口(. 桶):工作台主壳 + 订阅 / 项目域 + 公共设施\nimport ZTeamApp, {SubscribeApp, ProjectApp, history, isTokenExpired, ComponentDocPage}\n from '@yuku123/z-team-component'\n\n// 宿主组装面(./pages 桶):路由清单 + 菜单\nimport {routes, appMeta, menuItems, ComponentDocPage} from '@yuku123/z-team-component/pages'\n```\n\n- `routes`:`/team/subscribe`、`/team/project`、`/team/docs`、`/team/:rest*`(兜底)。\n- `appMeta`:`{ title: 'Z-OPC 一人公司基建', short: 'team' }`。\n- `ComponentDocPage`:组件文档页,**主入口与 `./pages` 桶都具名导出**(名字全仓统一,主壳按这个名字取)。\n\n## 三、API 端点\n\n请求实例由 `src/common/services/api.js` 的 axios 工厂创建:`baseURL = '/api'`(可用 `configureBaseURL()` 改),\n`timeout = 15000`,`withCredentials = true`(**Cookie 模式,不设 Authorization Header**)。\n下表路径是 `src/common/services/`、`src/services/`、`src/subscribe/services/`、`src/project/services/` 里\n**实际调用**的路径(已补上 `/api` 前缀)。\n\n| 方法 | 路径 | 说明 |\n|---|---|---|\n| POST | `/api/ctc/authn/login` | 登录 |\n| GET | `/api/ctc/authn/my-tenants` | 我的租户 |\n| POST | `/api/ctc/authn/select-tenant` | 选择租户 |\n| POST | `/api/ctc/authn/switch-tenant` | 切换租户 |\n| GET | `/api/ctc/app-menu/tree` | 应用菜单树 |\n| GET/POST | `/api/ctc/ac/invitations`、`/accept`、`/redeem`、`/leave` | 邀请(加入 / 兑换 / 退出) |\n| GET/POST | `/api/ctc/ac/invitations/members`、`/members/{memberId}/remove`、`/{id}/revoke` | 邀请成员管理 |\n| GET/POST/PUT/DELETE | `/api/agent/team/workspace`、`/workspace/{id}` | Agent 团队工作区 |\n| GET | `/api/agent/team/workspace/list`、`/file-tree-by-path`、`/file-content` | 工作区列表 / 文件树 / 文件内容 |\n| GET/POST/PUT/DELETE | `/api/agent/team/work-item`、`/work-item/{id}` | 工作项 |\n| GET | `/api/agent/team/conversation/{conversationId}/work-items` | 会话下的工作项 |\n| POST | `/api/agent/skill/register`、`/heartbeat`、`/pull`、`/sync-logs` | 技能注册 / 心跳 / 拉取 / 日志回传 |\n| POST/GET | `/api/agent/skill/bind`、`/unbind`、`/bindings` | 技能绑定 |\n| GET/POST/DELETE | `/api/agent/instance/list`、`/get`、`/create`、`/create-container`、`/create-external`、`/destroy-container`、`/destroy-local-process`、`/agent-types`、`/health`、`/status` | Agent 实例(容器 / 外部 / 本地进程) |\n| POST/GET | `/api/bot/feedback`、`/feedback/recent`、`/feedback/score` | Bot 反馈 |\n| GET | `/api/skill/get`、`/api/skill/page` | 技能查询 |\n| GET/POST | `/api/task`、`/task/list`、`/task/complete`、`/task/move`、`/task/project/list` | 任务 |\n| GET/POST | `/api/project`、`/api/project/archive`、`/api/project/user/list` | 项目 |\n| GET/POST/PUT/DELETE | `/api/mock-platform/{environments,endpoints,scenarios,cases,recordings,...}` | Mock 平台(`z-script-web` 的 `MockPlatformController`) |\n| GET | `/api/{name}/list`、`/api/{name}/page`、`/api/{name}/byId` | 通用 CRUD 工厂(`makeApi(name)`,`src/common/services/api.js`) |\n\n各服务模块另有自己的探活端点(`/api/agentTeam/health`、`/api/ctcAc/health`、`/api/ctcAcDomain/health`、\n`/api/ctcSurl/health`、`/api/ctcUser/health`、`/api/job/health`、`/api/metaApp/health`、\n`/api/privateConfig/health`、`/api/webide/health`)。\n\n## 四、页面说明\n\n### 4.1 工作台(`src/zteam/pages/workspace/`)\n\n工作台是本包最大的域,含 `Layout`(顶栏 + 模式切换 + 内容区)、`ProductWorkbench` / `SmartWorkbench` /\n`DevWorkbench` / `OpsWorkbench` 等工作台壳,以及聊天、笔记、代码编辑、知识图谱等通用组件。\n\n### 4.2 套件聚合壳(`SystemShell`)\n\n工作台的「系统」模式用它把 z-opc 业务页面(账号 / 角色 / 应用 / 租户 / 组织 / 权限 / 短链 / 字典 / 审计 /\nwebide / Agent / LLM / MCP / 技能 / OSS / 任务 / 流程 / 调度 / 密钥 / 运维 等)渲染进工作台右侧内容区,\n而不是回到 z-opc 旧 Layout。\n\n### 4.3 订阅域(`src/subscribe/pages/`)\n\n`SubscribeApp` + `SubscriptionList` / `SubscriptionEdit` / `RunHistory`:订阅的列表、编辑与运行历史。\n\n### 4.4 项目域(`src/project/pages/`)\n\n`ProjectApp` + `ProjectList` / `ProjectCreate` / `ProjectDetail`:项目的列表、创建与详情。\n\n### 4.5 组件文档\n\n本文件。内容以 `?raw` 在编译期内联,零额外请求;左侧 240px TOC 随滚动联动。\n渲染用基座的 `ComponentDoc`(`@yuku123/z-frontend-common/ui`),不在本包重写 TOC / 两栏 / 滚动联动。\n\n## 五、配置\n\n| 配置项 | 默认值 | 说明 |\n|---|---|---|\n| `configureBaseURL(baseURL)` | `'/api'` | 改写 axios `baseURL`(`src/common/services/api.js`) |\n| 请求 `timeout` | `15000` | axios 实例默认值 |\n| `withCredentials` | `true` | Cookie 模式;**不设 Authorization Header** |\n| vite `external` | 25 个精确包 + 4 条前缀规则 | `react` / `react-dom` / `antd` / `@ant-design/icons` / `@yuku123/*` / `@zopc-mock/*` / `echarts/*` / `highlight.js/*` 等一律 external,**消费方必须自备** |\n| vite alias | `@` → `src/`、`@zteam` → `src/zteam/` | 仅 standalone 构建用;打包后路径已解析 |\n| 模式 URL 参数 | `?mode=xxx` | 持久化在 query 上;`collaboration` 是默认值,不写入 URL |\n| `?desktop=1` | — | 强制桌面版工作台(窄视口默认跳 `/workspace/phone`) |\n\n## 六、已知限制\n\n- **`/team/docs` 目前没有可达路径**:主壳 `z-opc-main-starter-frontend/src/domainRoutes.ts` 的 `DOMAINS` 数组里\n **没有注册 z-team 域**(截至 2026-10-23),所以 z-team 的 `routes` 清单还没有被主壳消费。\n ⇒ 需要主控决定是否接线(注册 z-team 域,或在主壳里显式挂 `ComponentDocPage`)。\n- **`ZTeamApp` 内部没有 `/team/docs` 分支**:它按**绝对 pathname** 分发(`/workspace`、`/scenario`、`/docs` …),\n 未知路径兜底渲染工作台。所以即使走了 `/team/:rest*` 兜底路由,`/team/docs` 也会落进工作台而不是文档页。\n (`ZTeamApp` 不在本批次的改动范围内,需要单独接线。)\n- **已有另一个「文档页」**:`src/zteam/pages/docs/index.tsx` 是 52KB 的手写暗色主题**操作手册**页,\n 路由是 `/docs`。它与本 §7 的**组件文档页**不是一回事(内容、样式、来源都不同),别混淆。\n- **本仓没有 `tsconfig.json`,构建不做类型检查**(`npm run build` = `vite build` + 产物守卫脚本)。\n 基座只发 JS 不发 `.d.ts`,`src/z-frontend-common-ui.d.ts` 是手写的最小声明;\n 新增基座组件时要同步补声明(当前该声明文件里**还没有** `ComponentDoc`,因为本包的文档页走的是 `.jsx`,不参与类型检查)。\n- **组件包必须 external 基座**:`@yuku123/z-frontend-common/ui` 在 dist 里保持裸 import,\n 消费方(主壳)必须自己装基座,否则会出现两份 UI 主题。\n- **工作台下的部分工作台壳仍在改造中**(`ProductWorkbench` / `SmartWorkbench` 等),页面结构可能继续变,\n 本文档只描述到「域 + 顶层路由 + 模式」这一层,域内二级页面未逐页展开。\n- **请求是 Cookie 模式**:后端 `SsoInterceptor` 靠 `Accept` / `Content-Type` 判断「是不是 API 请求」,\n 裸 `fetch` 不带 `Accept` 会被当成页面访问而 302 跳登录页(构建产物有 `guard-fetch-accept.mjs` 守卫)。\n\n## 七、变更记录\n\n| 版本 | 变更 |\n|---|---|\n| 0.2.96 | 协作壳本地车道(合并第 3 步):`hooks/useLocalLane.ts`(30s 轮询 + web 隧道 / Tauri 直连),Sidebar 单聊分区并列「本机任务」组(`ft_exclusive_force_desktop=1` 浏览器可验桌面链路),CollabPersonalHost chat 视图按 lane 渲染 LocalChatArea / PersonalChatArea |\n| 0.2.93 | 顶部「个人」tab 下线(协作侧栏单聊分区已承载个人会话);RPA 前端入口整体下线(ChatMode 移除 rpa / Layout tab 分支 / `/rpa/*` 路由 → 主壳重定向 `/workspace`;RpaShell 与 `pages/rpa/` 删除),执行能力留在脚本中心 |\n| 0.2.30(未发布) | 新增组件文档页 `ComponentDocPage`(lead 008 §7):`src/DOC.md` + 基座 `ComponentDoc` 薄包装 + 菜单末项 `/team/docs` |\n| 0.2.30 | 工作台模式体系(13 种 `ChatMode`)+ `SystemShell` 套件聚合 + 订阅 / 项目双域 |\n";
|
|
7817
|
+
function Cl() {
|
|
7818
|
+
return /* @__PURE__ */ a(Hr, { markdown: $o, title: "组件文档 — Z-OPC 一人公司基建" });
|
|
7825
7819
|
}
|
|
7826
7820
|
export {
|
|
7827
|
-
|
|
7828
|
-
|
|
7821
|
+
Ht as $,
|
|
7822
|
+
fs as A,
|
|
7829
7823
|
Te as B,
|
|
7830
|
-
|
|
7831
|
-
|
|
7832
|
-
|
|
7833
|
-
|
|
7834
|
-
|
|
7835
|
-
|
|
7836
|
-
|
|
7837
|
-
|
|
7838
|
-
|
|
7839
|
-
|
|
7840
|
-
|
|
7841
|
-
|
|
7842
|
-
|
|
7843
|
-
|
|
7824
|
+
Cl as C,
|
|
7825
|
+
qo as D,
|
|
7826
|
+
ml as E,
|
|
7827
|
+
hl as F,
|
|
7828
|
+
_l as G,
|
|
7829
|
+
Vt as H,
|
|
7830
|
+
Wt as I,
|
|
7831
|
+
wl as J,
|
|
7832
|
+
gl as K,
|
|
7833
|
+
so as L,
|
|
7834
|
+
ao as M,
|
|
7835
|
+
Qa as N,
|
|
7836
|
+
Tl as O,
|
|
7837
|
+
Ao as P,
|
|
7844
7838
|
to as Q,
|
|
7845
|
-
|
|
7846
|
-
|
|
7847
|
-
|
|
7848
|
-
|
|
7849
|
-
|
|
7850
|
-
|
|
7851
|
-
|
|
7852
|
-
|
|
7853
|
-
|
|
7854
|
-
|
|
7839
|
+
no as R,
|
|
7840
|
+
So as S,
|
|
7841
|
+
tr as T,
|
|
7842
|
+
sn as U,
|
|
7843
|
+
H as V,
|
|
7844
|
+
Ga as W,
|
|
7845
|
+
Zo as X,
|
|
7846
|
+
as as Y,
|
|
7847
|
+
fl as Z,
|
|
7848
|
+
Xo as _,
|
|
7855
7849
|
ke as a,
|
|
7856
|
-
|
|
7857
|
-
|
|
7858
|
-
|
|
7859
|
-
|
|
7860
|
-
|
|
7861
|
-
|
|
7862
|
-
|
|
7863
|
-
|
|
7864
|
-
|
|
7865
|
-
|
|
7866
|
-
|
|
7867
|
-
|
|
7868
|
-
|
|
7869
|
-
|
|
7870
|
-
|
|
7871
|
-
|
|
7872
|
-
|
|
7850
|
+
nl as a$,
|
|
7851
|
+
al as a0,
|
|
7852
|
+
sl as a1,
|
|
7853
|
+
xa as a2,
|
|
7854
|
+
pl as a3,
|
|
7855
|
+
ki as a4,
|
|
7856
|
+
ps as a5,
|
|
7857
|
+
yc as a6,
|
|
7858
|
+
mi as a7,
|
|
7859
|
+
cc as a8,
|
|
7860
|
+
pc as a9,
|
|
7861
|
+
Sn as aA,
|
|
7862
|
+
Ca as aB,
|
|
7863
|
+
oi as aC,
|
|
7864
|
+
Do as aD,
|
|
7865
|
+
zs as aE,
|
|
7866
|
+
zo as aF,
|
|
7873
7867
|
Gt as aG,
|
|
7874
|
-
|
|
7875
|
-
|
|
7876
|
-
|
|
7868
|
+
rc as aH,
|
|
7869
|
+
ac as aI,
|
|
7870
|
+
sc as aJ,
|
|
7877
7871
|
Ge as aK,
|
|
7878
|
-
|
|
7879
|
-
|
|
7880
|
-
|
|
7881
|
-
|
|
7882
|
-
|
|
7883
|
-
|
|
7884
|
-
|
|
7885
|
-
|
|
7886
|
-
|
|
7887
|
-
|
|
7888
|
-
|
|
7889
|
-
|
|
7890
|
-
|
|
7891
|
-
|
|
7892
|
-
|
|
7893
|
-
|
|
7894
|
-
|
|
7895
|
-
|
|
7896
|
-
|
|
7897
|
-
|
|
7898
|
-
|
|
7899
|
-
|
|
7900
|
-
|
|
7901
|
-
|
|
7902
|
-
|
|
7903
|
-
|
|
7904
|
-
|
|
7905
|
-
|
|
7906
|
-
|
|
7907
|
-
|
|
7908
|
-
|
|
7909
|
-
|
|
7910
|
-
|
|
7911
|
-
|
|
7912
|
-
|
|
7913
|
-
|
|
7872
|
+
ha as aL,
|
|
7873
|
+
mr as aM,
|
|
7874
|
+
Vo as aN,
|
|
7875
|
+
il as aO,
|
|
7876
|
+
ll as aP,
|
|
7877
|
+
ul as aQ,
|
|
7878
|
+
dl as aR,
|
|
7879
|
+
Go as aS,
|
|
7880
|
+
Jo as aT,
|
|
7881
|
+
Bo as aU,
|
|
7882
|
+
Ho as aV,
|
|
7883
|
+
Ko as aW,
|
|
7884
|
+
dr as aX,
|
|
7885
|
+
Xc as aY,
|
|
7886
|
+
Qc as aZ,
|
|
7887
|
+
ga as a_,
|
|
7888
|
+
Wo as aa,
|
|
7889
|
+
Gi as ab,
|
|
7890
|
+
Hi as ac,
|
|
7891
|
+
bi as ad,
|
|
7892
|
+
Di as ae,
|
|
7893
|
+
Fi as af,
|
|
7894
|
+
ji as ag,
|
|
7895
|
+
Ki as ah,
|
|
7896
|
+
ii as ai,
|
|
7897
|
+
oc as aj,
|
|
7898
|
+
Li as ak,
|
|
7899
|
+
Oi as al,
|
|
7900
|
+
Xr as am,
|
|
7901
|
+
gc as an,
|
|
7902
|
+
At as ao,
|
|
7903
|
+
us as ap,
|
|
7904
|
+
Mi as aq,
|
|
7905
|
+
uc as ar,
|
|
7906
|
+
si as as,
|
|
7907
|
+
ri as at,
|
|
7914
7908
|
ai as au,
|
|
7915
|
-
|
|
7916
|
-
|
|
7917
|
-
|
|
7918
|
-
|
|
7919
|
-
|
|
7909
|
+
Ui as av,
|
|
7910
|
+
Kc as aw,
|
|
7911
|
+
yi as ax,
|
|
7912
|
+
ot as ay,
|
|
7913
|
+
Tt as az,
|
|
7920
7914
|
Ie as b,
|
|
7921
|
-
|
|
7922
|
-
|
|
7923
|
-
|
|
7915
|
+
qc as b$,
|
|
7916
|
+
tl as b0,
|
|
7917
|
+
Lo as b1,
|
|
7924
7918
|
b as b2,
|
|
7925
|
-
|
|
7926
|
-
|
|
7927
|
-
|
|
7919
|
+
Gc as b3,
|
|
7920
|
+
Yc as b4,
|
|
7921
|
+
Zc as b5,
|
|
7928
7922
|
Qe as b6,
|
|
7929
7923
|
qt as b7,
|
|
7930
|
-
|
|
7931
|
-
|
|
7932
|
-
|
|
7924
|
+
el as b8,
|
|
7925
|
+
Vc as b9,
|
|
7926
|
+
hi as bA,
|
|
7933
7927
|
mn as bB,
|
|
7934
|
-
|
|
7935
|
-
|
|
7936
|
-
|
|
7937
|
-
|
|
7938
|
-
|
|
7939
|
-
|
|
7940
|
-
|
|
7941
|
-
|
|
7942
|
-
|
|
7943
|
-
|
|
7944
|
-
|
|
7945
|
-
|
|
7946
|
-
|
|
7947
|
-
|
|
7948
|
-
|
|
7949
|
-
|
|
7950
|
-
|
|
7951
|
-
|
|
7952
|
-
|
|
7953
|
-
|
|
7954
|
-
|
|
7955
|
-
|
|
7956
|
-
|
|
7957
|
-
|
|
7958
|
-
|
|
7959
|
-
|
|
7960
|
-
|
|
7961
|
-
|
|
7962
|
-
|
|
7928
|
+
Vr as bC,
|
|
7929
|
+
Ji as bD,
|
|
7930
|
+
Vi as bE,
|
|
7931
|
+
mc as bF,
|
|
7932
|
+
Ii as bG,
|
|
7933
|
+
Ai as bH,
|
|
7934
|
+
Ci as bI,
|
|
7935
|
+
Yo as bJ,
|
|
7936
|
+
_c as bK,
|
|
7937
|
+
wc as bL,
|
|
7938
|
+
Cc as bM,
|
|
7939
|
+
Ic as bN,
|
|
7940
|
+
kc as bO,
|
|
7941
|
+
Ac as bP,
|
|
7942
|
+
Qo as bQ,
|
|
7943
|
+
ei as bR,
|
|
7944
|
+
Tc as bS,
|
|
7945
|
+
$c as bT,
|
|
7946
|
+
xc as bU,
|
|
7947
|
+
$i as bV,
|
|
7948
|
+
xi as bW,
|
|
7949
|
+
vi as bX,
|
|
7950
|
+
Lc as bY,
|
|
7951
|
+
Dc as bZ,
|
|
7952
|
+
Fc as b_,
|
|
7953
|
+
Wc as ba,
|
|
7954
|
+
Jc as bb,
|
|
7955
|
+
rl as bc,
|
|
7956
|
+
cr as bd,
|
|
7963
7957
|
$t as be,
|
|
7964
|
-
|
|
7965
|
-
|
|
7966
|
-
|
|
7967
|
-
|
|
7968
|
-
|
|
7958
|
+
bc as bf,
|
|
7959
|
+
Sc as bg,
|
|
7960
|
+
Es as bh,
|
|
7961
|
+
li as bi,
|
|
7962
|
+
ol as bj,
|
|
7969
7963
|
f as bk,
|
|
7970
7964
|
bn as bl,
|
|
7971
|
-
|
|
7972
|
-
|
|
7973
|
-
|
|
7974
|
-
|
|
7975
|
-
|
|
7976
|
-
|
|
7977
|
-
|
|
7978
|
-
|
|
7979
|
-
|
|
7980
|
-
|
|
7981
|
-
|
|
7982
|
-
|
|
7983
|
-
|
|
7984
|
-
|
|
7965
|
+
_s as bm,
|
|
7966
|
+
ss as bn,
|
|
7967
|
+
fc as bo,
|
|
7968
|
+
Yi as bp,
|
|
7969
|
+
pi as bq,
|
|
7970
|
+
dc as br,
|
|
7971
|
+
cl as bs,
|
|
7972
|
+
ar as bt,
|
|
7973
|
+
Fo as bu,
|
|
7974
|
+
Si as bv,
|
|
7975
|
+
wi as bw,
|
|
7976
|
+
_i as bx,
|
|
7977
|
+
gi as by,
|
|
7978
|
+
fi as bz,
|
|
7985
7979
|
Bt as c,
|
|
7986
|
-
|
|
7987
|
-
|
|
7988
|
-
|
|
7989
|
-
|
|
7990
|
-
|
|
7991
|
-
|
|
7992
|
-
|
|
7993
|
-
|
|
7994
|
-
|
|
7995
|
-
|
|
7996
|
-
|
|
7997
|
-
|
|
7998
|
-
|
|
7999
|
-
|
|
8000
|
-
|
|
8001
|
-
|
|
8002
|
-
|
|
8003
|
-
|
|
8004
|
-
|
|
8005
|
-
|
|
8006
|
-
|
|
8007
|
-
|
|
8008
|
-
|
|
8009
|
-
|
|
8010
|
-
|
|
8011
|
-
|
|
8012
|
-
|
|
7980
|
+
Bc as c0,
|
|
7981
|
+
Hc as c1,
|
|
7982
|
+
zc as c2,
|
|
7983
|
+
Uc as c3,
|
|
7984
|
+
tc as c4,
|
|
7985
|
+
Qi as c5,
|
|
7986
|
+
ec as c6,
|
|
7987
|
+
Ei as c7,
|
|
7988
|
+
Pi as c8,
|
|
7989
|
+
nc as c9,
|
|
7990
|
+
ic as ca,
|
|
7991
|
+
Nc as cb,
|
|
7992
|
+
vc as cc,
|
|
7993
|
+
Ec as cd,
|
|
7994
|
+
Pc as ce,
|
|
7995
|
+
Rc as cf,
|
|
7996
|
+
Oc as cg,
|
|
7997
|
+
jc as ch,
|
|
7998
|
+
Mc as ci,
|
|
7999
|
+
Ti as cj,
|
|
8000
|
+
Wi as ck,
|
|
8001
|
+
lc as cl,
|
|
8002
|
+
hc as cm,
|
|
8003
|
+
bl as cn,
|
|
8004
|
+
kl as co,
|
|
8005
|
+
Il as cp,
|
|
8006
|
+
yl as d,
|
|
8013
8007
|
we as e,
|
|
8014
8008
|
ge as f,
|
|
8015
|
-
|
|
8016
|
-
|
|
8017
|
-
|
|
8018
|
-
|
|
8019
|
-
|
|
8020
|
-
|
|
8021
|
-
|
|
8009
|
+
rr as g,
|
|
8010
|
+
ui as h,
|
|
8011
|
+
qa as i,
|
|
8012
|
+
ci as j,
|
|
8013
|
+
ni as k,
|
|
8014
|
+
Zi as l,
|
|
8015
|
+
Xi as m,
|
|
8022
8016
|
he as n,
|
|
8023
|
-
|
|
8024
|
-
|
|
8025
|
-
|
|
8026
|
-
|
|
8017
|
+
Ri as o,
|
|
8018
|
+
di as p,
|
|
8019
|
+
zi as q,
|
|
8020
|
+
Jr as r,
|
|
8027
8021
|
at as s,
|
|
8028
8022
|
q as t,
|
|
8029
8023
|
$n as u,
|
|
8030
|
-
|
|
8024
|
+
Bi as v,
|
|
8031
8025
|
oe as w,
|
|
8032
|
-
|
|
8033
|
-
|
|
8034
|
-
|
|
8026
|
+
qi as x,
|
|
8027
|
+
Ni as y,
|
|
8028
|
+
ti as z
|
|
8035
8029
|
};
|