@yuku123/z-team-component 0.2.130 → 0.2.132
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/{ChangeLogView-AY7dKChQ.js → ChangeLogView-SwacGpsw.js} +1 -1
- package/dist/{ComponentDoc-DTpTBK1V.js → ComponentDoc-Dh5YhLCI.js} +1018 -1048
- package/dist/{InvitationManagementPage-YzQVnNWz.js → InvitationManagementPage-CjEcLOGB.js} +1 -1
- package/dist/{OnboardingPage-ClH-s7zs.js → OnboardingPage-DvNt71kX.js} +2 -2
- package/dist/{ScheduledTasks-DhcmGmhu.js → ScheduledTasks-COgb4MZJ.js} +6 -6
- package/dist/SystemShell-CSXcsiNp.js +752 -0
- package/dist/{admin-logs-2gdJxEwA.js → admin-logs-CExsxQ5h.js} +5 -5
- package/dist/{api-BHYf7Uyx.js → api-C9kTgVc2.js} +1 -1
- package/dist/{api---aB1ADx.js → api-DXw93E7c.js} +1 -1
- package/dist/{createWorkspaceWsHandler-BC4HmdFu.js → createWorkspaceWsHandler-BwDUTYXH.js} +319 -319
- package/dist/{index-CqOsWy6H.js → index-9rfSVSTh.js} +9 -9
- package/dist/{index-lucAUJAv.js → index-B2Dfbi8J.js} +2 -2
- package/dist/{index-Chzml7fB.js → index-B3uLo8-F.js} +3 -3
- package/dist/{index-CnIbuXF9.js → index-BNPq7yBg.js} +2 -2
- package/dist/{index--HSE1tzT.js → index-BTJ83JLl.js} +11 -11
- package/dist/{index-9coNts0T.js → index-BkzBYfhO.js} +8489 -8453
- package/dist/{index-BkbSCWQ7.js → index-BoY7L8C4.js} +42 -37
- package/dist/index-Bs9odXxd.js +1214 -0
- package/dist/{index-mwKbvNPB.js → index-CF3xDZ7q.js} +4 -4
- package/dist/{index-CnRAUDUi.js → index-COobH4Vi.js} +1 -1
- package/dist/{index-Opx4qrhX.js → index-CU6jFFl5.js} +3 -3
- package/dist/{index-DA0MCrVH.js → index-CXEYA7rt.js} +2 -2
- package/dist/{index-Zr09eAzk.js → index-CZCKpsry.js} +2 -2
- package/dist/{index-CnyMTIyv.js → index-Ceu-yckM.js} +70 -70
- package/dist/{index-baUMWaRm.js → index-Ci6_CBwE.js} +3 -3
- package/dist/{index-CTqU8nrB.js → index-CntZHojY.js} +2 -2
- package/dist/{index-DqiBrPAv.js → index-D2DFKRUf.js} +1 -1
- package/dist/{index-DfpB0BR9.js → index-DLK7DuCr.js} +3 -3
- package/dist/{index-Ci31buz9.js → index-DM6XeWFk.js} +4059 -4043
- package/dist/{index-fJnhCAB9.js → index-DMfYPIkB.js} +2 -2
- package/dist/{index-Ca08VoFz.js → index-DZ0fYNO9.js} +20 -20
- package/dist/{index-Cui8SX9p.js → index-D_J1ZCy8.js} +3 -3
- package/dist/{index-Ccvhn50s.js → index-DmV6xR7C.js} +9 -9
- package/dist/{index-CROBbbCB.js → index-ftuPuj0s.js} +9 -9
- package/dist/{index-DHubhPeT.js → index-mEgmHNRO.js} +1 -1
- package/dist/{index--L2wU6OV.js → index-t2nMJUPu.js} +1 -1
- package/dist/index.js +1 -1
- package/dist/{instance-ITIB5e5v.js → instance-DD3kbAUh.js} +1 -1
- package/dist/{menuPermission-Dw1EJWIf.js → menuPermission-v0881tid.js} +3 -3
- package/dist/pages.js +1 -1
- package/dist/{send-default-agent-team-message-DzRmAa6S.js → send-default-agent-team-message-Cug0T_7J.js} +1 -1
- package/dist/{sso-user-497FBkoQ.js → sso-user-CnVXqYR7.js} +1 -1
- package/dist/{training-B4IByvWW.js → training-BS23m-yy.js} +1 -1
- package/dist/useSidebarResize--Avuabb1.js +46 -0
- package/dist/{webide-DwQqqS-I.js → webide-BPJ1IpZq.js} +3 -3
- package/dist/z-team-component.css +1 -1
- package/package.json +6 -6
- package/dist/SystemShell-Cz7S4YnT.js +0 -718
- package/dist/index-4apTfQuo.js +0 -2213
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { configureTodoStore as yr } from "@yuku123/z-task-component";
|
|
2
2
|
import { create as gr } 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
|
|
4
|
-
import { jsx as a, jsxs as p, Fragment 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 br, Popconfirm as Zt, Spin as bt, Radio as de, InputNumber as Ct, Empty as Sr } from "antd";
|
|
4
|
+
import { jsx as a, jsxs as p, Fragment as zt } from "react/jsx-runtime";
|
|
5
5
|
import { lazy as wr, Suspense as _r, useState as $, useEffect as Y, useRef as Fn } from "react";
|
|
6
|
-
import { useLocation as Tr, useNavigate as
|
|
7
|
-
import { SettingOutlined as Ir, ProjectOutlined as
|
|
6
|
+
import { useLocation as Tr, useNavigate as Xe, useParams as qn, Routes as Bn, Route as ue, Navigate as Hn, useSearchParams as kr } from "react-router-dom";
|
|
7
|
+
import { SettingOutlined as Ir, ProjectOutlined as St, UserOutlined as Kn, AuditOutlined as Lt, RobotOutlined as Dt, ApiOutlined as Xt, AppstoreOutlined as Cr, ThunderboltOutlined as He, BarChartOutlined as Ar, ScheduleOutlined as $r, FileTextOutlined as Yt, ReloadOutlined as ce, ExperimentOutlined as xr, PlayCircleOutlined as wt, CopyOutlined as Gn, GlobalOutlined as Jn, NodeIndexOutlined as vr, UndoOutlined as Pr, FileSearchOutlined as Er, VideoCameraOutlined as on, SearchOutlined as Vn, EyeOutlined as Rr, CodeOutlined as Fe, InfoCircleOutlined as Or, FunctionOutlined as tt, ImportOutlined as Ft, CloudUploadOutlined as cn, FileAddOutlined as Mr, PlusOutlined as Wn, EditOutlined as jr, PauseCircleOutlined as Nr, CheckCircleOutlined as Qt, DeleteOutlined as Ur, ExclamationCircleOutlined as zr, SaveOutlined as Zn, ArrowLeftOutlined as Xn, SendOutlined as Lr } from "@ant-design/icons";
|
|
8
8
|
import "@yuku123/z-frontend-common";
|
|
9
|
-
import { PageHeader as Ue, GradientStatCard as
|
|
10
|
-
import
|
|
9
|
+
import { PageHeader as Ue, GradientStatCard as nt, SectionHeader as Dr, FeatureCard as Fr, DarkBanner as qr, ListTable as ye, TableToolbar as Br, ErrorState as Hr, ComponentDoc as Kr } from "@yuku123/z-frontend-common/ui";
|
|
10
|
+
import en from "axios";
|
|
11
11
|
function q(e) {
|
|
12
12
|
return e == null || e === "" ? "" : typeof e == "string" ? e : String(e);
|
|
13
13
|
}
|
|
@@ -24,9 +24,9 @@ function Se(e) {
|
|
|
24
24
|
}
|
|
25
25
|
function we(e) {
|
|
26
26
|
const t = q(e);
|
|
27
|
-
return t !== "" &&
|
|
27
|
+
return t !== "" && Tt(t, "0") > 0;
|
|
28
28
|
}
|
|
29
|
-
function
|
|
29
|
+
function Tt(e, t) {
|
|
30
30
|
const n = q(e), r = q(t);
|
|
31
31
|
if (n === r)
|
|
32
32
|
return 0;
|
|
@@ -59,7 +59,7 @@ function Do(e) {
|
|
|
59
59
|
const t = ((n = e.name) == null ? void 0 : n.trim()) ?? "";
|
|
60
60
|
return dn(t);
|
|
61
61
|
}
|
|
62
|
-
function
|
|
62
|
+
function qt(e) {
|
|
63
63
|
if (e === "处理中..." || e === "🔄 正在处理中...")
|
|
64
64
|
return !0;
|
|
65
65
|
const t = e.trim();
|
|
@@ -84,7 +84,7 @@ function Vr() {
|
|
|
84
84
|
window.location.href = t;
|
|
85
85
|
}
|
|
86
86
|
const ge = { credentials: "include" };
|
|
87
|
-
function
|
|
87
|
+
function ft(e, t = "error") {
|
|
88
88
|
t === "warning" ? v.warning(e) : v.error(e);
|
|
89
89
|
}
|
|
90
90
|
typeof window < "u" && window.addEventListener(
|
|
@@ -106,7 +106,7 @@ function mn() {
|
|
|
106
106
|
if (!un) {
|
|
107
107
|
un = !0;
|
|
108
108
|
try {
|
|
109
|
-
|
|
109
|
+
Ht();
|
|
110
110
|
} catch {
|
|
111
111
|
}
|
|
112
112
|
try {
|
|
@@ -126,7 +126,7 @@ function hn(e, t) {
|
|
|
126
126
|
}
|
|
127
127
|
const Qn = "/z-team", Zr = typeof window < "u" && /(zteam[-.]ft\.(zteam\.local|zteam\.local)|team\.zteam\.local)/i.test(
|
|
128
128
|
window.location.hostname
|
|
129
|
-
),
|
|
129
|
+
), kt = Zr, Xr = `${kt ? "/kapi" : ""}${Qn}/api`, Yr = `${kt ? "/kapi" : ""}${Qn}`, Qr = `${Yr}/v1/scenario-instances`, es = window.ENV_TYPE || window.envType || "", Te = Xr, qo = `${kt ? "/kapi" : ""}/z-team-evolution/api`, Bo = `${kt ? "/kapi" : ""}/z-team-bench/api`, ts = es || "local";
|
|
130
130
|
async function ke(e, t) {
|
|
131
131
|
try {
|
|
132
132
|
const n = {
|
|
@@ -141,7 +141,7 @@ async function ke(e, t) {
|
|
|
141
141
|
return await fetch(e, { ...ge, ...t, headers: n });
|
|
142
142
|
} catch {
|
|
143
143
|
const n = "无法连接服务器,请确认 Java 服务已启动(如 127.0.0.1:8080)且前端代理 /z-team 已配置";
|
|
144
|
-
throw
|
|
144
|
+
throw ft(n), { _apiUserError: !0, userMessage: n, message: n };
|
|
145
145
|
}
|
|
146
146
|
}
|
|
147
147
|
async function Ie(e, t) {
|
|
@@ -154,7 +154,7 @@ async function Ie(e, t) {
|
|
|
154
154
|
} catch {
|
|
155
155
|
if (!e.ok) {
|
|
156
156
|
const s = hn(e, t);
|
|
157
|
-
throw
|
|
157
|
+
throw ft(
|
|
158
158
|
e.status >= 500 ? s : `${s}(HTTP ${e.status},响应非 JSON)`
|
|
159
159
|
), {
|
|
160
160
|
_apiUserError: !0,
|
|
@@ -169,7 +169,7 @@ async function Ie(e, t) {
|
|
|
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})
|
|
171
171
|
r.msg || r.detail || t;
|
|
172
|
-
throw
|
|
172
|
+
throw ft(s), {
|
|
173
173
|
_apiUserError: !0,
|
|
174
174
|
userMessage: s,
|
|
175
175
|
message: s
|
|
@@ -177,7 +177,7 @@ async function Ie(e, t) {
|
|
|
177
177
|
}
|
|
178
178
|
if (!e.ok) {
|
|
179
179
|
const s = r.detail || r.message || hn(e, t);
|
|
180
|
-
throw
|
|
180
|
+
throw ft(s), {
|
|
181
181
|
_apiUserError: !0,
|
|
182
182
|
userMessage: s,
|
|
183
183
|
message: s
|
|
@@ -189,18 +189,18 @@ const ns = /_+([a-z0-9])/gi;
|
|
|
189
189
|
function rs(e) {
|
|
190
190
|
return e.replace(ns, (t, n) => n.toUpperCase());
|
|
191
191
|
}
|
|
192
|
-
function
|
|
193
|
-
if (Array.isArray(e)) return e.map((t) =>
|
|
192
|
+
function Bt(e) {
|
|
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[rs(n)] =
|
|
197
|
+
t[rs(n)] = Bt(r);
|
|
198
198
|
return t;
|
|
199
199
|
}
|
|
200
200
|
return e;
|
|
201
201
|
}
|
|
202
202
|
async function Ho(e, t) {
|
|
203
|
-
return
|
|
203
|
+
return Bt(await Ie(e, t));
|
|
204
204
|
}
|
|
205
205
|
async function ss() {
|
|
206
206
|
try {
|
|
@@ -264,9 +264,9 @@ async function Zo(e) {
|
|
|
264
264
|
return Ie(t, "加载任务失败");
|
|
265
265
|
}
|
|
266
266
|
const Xo = "http://127.0.0.1/kapi/z-webide/inspect";
|
|
267
|
-
let V = null,
|
|
268
|
-
function
|
|
269
|
-
er = e,
|
|
267
|
+
let V = null, qe = [], Be = [], Me = 0, fn = "", rt = null, De = 0, fe = null, er = "disconnected";
|
|
268
|
+
function yt(e) {
|
|
269
|
+
er = e, Be.forEach((t) => t(e));
|
|
270
270
|
}
|
|
271
271
|
function yn() {
|
|
272
272
|
return Me !== 0 && Me !== "";
|
|
@@ -276,8 +276,8 @@ function as(e, t = "") {
|
|
|
276
276
|
return `${n}//${r}${Qr}/${e}/ws${s}`;
|
|
277
277
|
}
|
|
278
278
|
function Yo(e) {
|
|
279
|
-
return
|
|
280
|
-
|
|
279
|
+
return Be.push(e), e(er), () => {
|
|
280
|
+
Be = Be.filter((t) => t !== e);
|
|
281
281
|
};
|
|
282
282
|
}
|
|
283
283
|
function os(e, t = "", n) {
|
|
@@ -285,68 +285,68 @@ function os(e, t = "", n) {
|
|
|
285
285
|
return;
|
|
286
286
|
V && (V.onclose = null, V.close(), V = null), fe != null && (clearTimeout(fe), fe = null);
|
|
287
287
|
const r = as(e, t);
|
|
288
|
-
Me = e, fn = t, n && (
|
|
289
|
-
|
|
288
|
+
Me = e, fn = t, n && (rt = n), yt("connecting"), V = new WebSocket(r), V.onopen = () => {
|
|
289
|
+
De = 0, yt("connected"), console.log("[WS] connected");
|
|
290
290
|
}, V.onmessage = (s) => {
|
|
291
291
|
try {
|
|
292
292
|
const o = JSON.parse(s.data);
|
|
293
|
-
console.log("[WS recv]", o.type, o),
|
|
293
|
+
console.log("[WS recv]", o.type, o), qe.forEach((i) => i(o));
|
|
294
294
|
} catch {
|
|
295
295
|
}
|
|
296
296
|
}, V.onerror = () => {
|
|
297
297
|
console.warn("[WS] connection error:", r);
|
|
298
298
|
}, V.onclose = (s) => {
|
|
299
299
|
const o = s.wasClean;
|
|
300
|
-
if (V = null,
|
|
301
|
-
|
|
302
|
-
const i = Math.min(3e3 *
|
|
300
|
+
if (V = null, yt("disconnected"), !yn()) return;
|
|
301
|
+
De += 1;
|
|
302
|
+
const i = Math.min(3e3 * De, 3e4);
|
|
303
303
|
console.warn(
|
|
304
|
-
`[WS] closed (clean=${o}), reconnect #${
|
|
304
|
+
`[WS] closed (clean=${o}), reconnect #${De} in ${i}ms`
|
|
305
305
|
), fe = setTimeout(() => {
|
|
306
|
-
fe = null, yn() && (os(Me, fn),
|
|
306
|
+
fe = null, yn() && (os(Me, fn), rt == null || rt());
|
|
307
307
|
}, i);
|
|
308
308
|
};
|
|
309
309
|
}
|
|
310
310
|
function Qo(e) {
|
|
311
|
-
return
|
|
312
|
-
|
|
311
|
+
return qe.push(e), () => {
|
|
312
|
+
qe = qe.filter((t) => t !== e);
|
|
313
313
|
};
|
|
314
314
|
}
|
|
315
315
|
async function is(e) {
|
|
316
316
|
await ss().catch(() => {
|
|
317
317
|
}), V && V.readyState === WebSocket.OPEN && V.send(JSON.stringify(e));
|
|
318
318
|
}
|
|
319
|
-
function
|
|
320
|
-
Me = 0, fe != null && (clearTimeout(fe), fe = null), V && (V.onclose = null, V.close(), V = null),
|
|
319
|
+
function Ht() {
|
|
320
|
+
Me = 0, fe != null && (clearTimeout(fe), fe = null), V && (V.onclose = null, V.close(), V = null), De = 0, yt("disconnected"), qe = [], Be = [];
|
|
321
321
|
}
|
|
322
|
-
const
|
|
322
|
+
const g = {
|
|
323
323
|
credentials: "include",
|
|
324
324
|
// 强制标识为 XHR/fetch API 请求,使后端 SsoInterceptor 走 JSON 401 分支
|
|
325
325
|
// 而不是返回 302 跳到 SSO 登录页(避免 fetch follow redirect 后拿到 SPA HTML 导致解析失败)
|
|
326
326
|
headers: { Accept: "application/json" }
|
|
327
|
-
},
|
|
327
|
+
}, Ke = "zindexer_admin_token";
|
|
328
328
|
function ei() {
|
|
329
|
-
return typeof localStorage > "u" ? "" : localStorage.getItem(
|
|
329
|
+
return typeof localStorage > "u" ? "" : localStorage.getItem(Ke) || "";
|
|
330
330
|
}
|
|
331
331
|
function ti(e) {
|
|
332
332
|
if (typeof localStorage > "u") return;
|
|
333
333
|
const t = (e || "").trim();
|
|
334
334
|
if (!t) {
|
|
335
|
-
localStorage.removeItem(
|
|
335
|
+
localStorage.removeItem(Ke), localStorage.removeItem("zindexer_token");
|
|
336
336
|
return;
|
|
337
337
|
}
|
|
338
|
-
localStorage.setItem(
|
|
338
|
+
localStorage.setItem(Ke, t), localStorage.setItem("zindexer_token", t);
|
|
339
339
|
}
|
|
340
340
|
function ni() {
|
|
341
|
-
typeof localStorage > "u" || localStorage.removeItem(
|
|
341
|
+
typeof localStorage > "u" || localStorage.removeItem(Ke);
|
|
342
342
|
}
|
|
343
343
|
function Ce(e = {}) {
|
|
344
|
-
const t = (typeof localStorage < "u" ? localStorage.getItem(
|
|
344
|
+
const t = (typeof localStorage < "u" ? localStorage.getItem(Ke) : "") || "";
|
|
345
345
|
return {
|
|
346
|
-
...
|
|
346
|
+
...g,
|
|
347
347
|
...e,
|
|
348
348
|
headers: {
|
|
349
|
-
...
|
|
349
|
+
...g.headers || {},
|
|
350
350
|
...e.headers || {},
|
|
351
351
|
...t ? { "X-Indexer-Token": t } : {}
|
|
352
352
|
}
|
|
@@ -357,7 +357,7 @@ class cs extends Error {
|
|
|
357
357
|
super(t), this._apiUserError = !0, this.name = "ApiUserError", this.userMessage = t;
|
|
358
358
|
}
|
|
359
359
|
}
|
|
360
|
-
function
|
|
360
|
+
function At(e) {
|
|
361
361
|
return e instanceof cs ? !0 : !!(e && typeof e == "object" && e._apiUserError);
|
|
362
362
|
}
|
|
363
363
|
function _e(e, t = "error") {
|
|
@@ -373,11 +373,11 @@ 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 ls = "/z-team", ds = typeof window < "u" && window.ZTEAM_USE_KAPI === !0, tr = ds, nr = `${tr ? "/kapi" : ""}${ls}/api`, us = window.ENV_TYPE || window.envType || "",
|
|
376
|
+
const ls = "/z-team", ds = typeof window < "u" && window.ZTEAM_USE_KAPI === !0, tr = ds, nr = `${tr ? "/kapi" : ""}${ls}/api`, us = window.ENV_TYPE || window.envType || "", b = nr, ps = `${tr ? "/kapi" : ""}/z-team-evolution/api`;
|
|
377
377
|
async function ms(e) {
|
|
378
378
|
const t = new FormData();
|
|
379
379
|
t.append("file", e);
|
|
380
|
-
const n = await
|
|
380
|
+
const n = await S(`${b}/common/upload-image`, {
|
|
381
381
|
method: "POST",
|
|
382
382
|
body: t
|
|
383
383
|
}), r = await f(n, "上传图片失败"), s = typeof (r == null ? void 0 : r.url) == "string" ? r.url : "";
|
|
@@ -391,7 +391,7 @@ async function ri(e) {
|
|
|
391
391
|
return Promise.all(e.map((t) => ms(t)));
|
|
392
392
|
}
|
|
393
393
|
const hs = us || "local";
|
|
394
|
-
async function
|
|
394
|
+
async function S(e, t) {
|
|
395
395
|
try {
|
|
396
396
|
const n = {
|
|
397
397
|
// ⚠ 显式 Accept(2026-10-23, TASK-20261023-001):后端 SsoInterceptor 只看
|
|
@@ -399,11 +399,11 @@ async function b(e, t) {
|
|
|
399
399
|
// 302 分支(跳登录页 ⇒ 200 + text/html ⇒ res.json() 抛错)。
|
|
400
400
|
// init?.headers 在最后 ⇒ 调用方仍可用自己的 Accept 覆盖(如 SSE 的 text/event-stream)。
|
|
401
401
|
Accept: "application/json",
|
|
402
|
-
...
|
|
402
|
+
...g.headers,
|
|
403
403
|
"project-env": hs,
|
|
404
404
|
...t == null ? void 0 : t.headers
|
|
405
405
|
};
|
|
406
|
-
return await fetch(e, { ...
|
|
406
|
+
return await fetch(e, { ...g, ...t, headers: n });
|
|
407
407
|
} catch {
|
|
408
408
|
const n = "无法连接服务器,请确认 Java 服务已启动(如 127.0.0.1:8080)且前端代理 /z-team 已配置";
|
|
409
409
|
throw _e(n), { _apiUserError: !0, userMessage: n, message: n };
|
|
@@ -463,7 +463,7 @@ async function f(e, t) {
|
|
|
463
463
|
}
|
|
464
464
|
async function fs(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",
|
|
@@ -474,7 +474,7 @@ async function fs(e, t) {
|
|
|
474
474
|
async function si(e) {
|
|
475
475
|
const t = await fetch("/kapi/z-ctc/api/ctc/authn/whoami", {
|
|
476
476
|
headers: { Accept: "application/json" },
|
|
477
|
-
...
|
|
477
|
+
...g,
|
|
478
478
|
credentials: "include"
|
|
479
479
|
}), n = await f(
|
|
480
480
|
t,
|
|
@@ -484,7 +484,7 @@ async function si(e) {
|
|
|
484
484
|
}
|
|
485
485
|
async function ai() {
|
|
486
486
|
const e = await fetch("/kapi/z-ctc/api/ctc/authn/my-tenants", {
|
|
487
|
-
...
|
|
487
|
+
...g,
|
|
488
488
|
headers: { Accept: "application/json" },
|
|
489
489
|
credentials: "include"
|
|
490
490
|
}), t = await f(e, "获取租户列表失败"), n = (o, i, c) => (o == null ? void 0 : o[i]) ?? (o == null ? void 0 : o[c]), s = (Array.isArray(t == null ? void 0 : t.memberships) ? t.memberships : []).map((o) => ({
|
|
@@ -498,13 +498,27 @@ 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 oi(e
|
|
501
|
+
async function oi(e) {
|
|
502
|
+
const t = e ? `?tenantCode=${encodeURIComponent(e)}` : "", n = await fetch(`/kapi/z-ctc/api/ctc/ac/domains/list${t}`, {
|
|
503
|
+
...g,
|
|
504
|
+
headers: { Accept: "application/json" },
|
|
505
|
+
credentials: "include"
|
|
506
|
+
}), r = await f(n, "获取租户域列表失败"), s = (i, c, l) => (i == null ? void 0 : i[c]) ?? (i == null ? void 0 : i[l]);
|
|
507
|
+
return (Array.isArray(r) ? r : Array.isArray(r == null ? void 0 : r.list) ? r.list : []).map((i) => ({
|
|
508
|
+
id: s(i, "id", "id"),
|
|
509
|
+
domainCode: String(s(i, "domainCode", "domain_code") ?? ""),
|
|
510
|
+
domainName: s(i, "domainName", "domain_name"),
|
|
511
|
+
tenantCode: String(s(i, "tenantCode", "tenant_code") ?? ""),
|
|
512
|
+
status: s(i, "status", "status")
|
|
513
|
+
})).filter((i) => i.domainCode);
|
|
514
|
+
}
|
|
515
|
+
async function ii(e, t) {
|
|
502
516
|
const n = await fetch("/kapi/z-ctc/api/ctc/authn/select-tenant", {
|
|
503
|
-
...
|
|
517
|
+
...g,
|
|
504
518
|
method: "POST",
|
|
505
519
|
headers: { Accept: "application/json", "Content-Type": "application/json" },
|
|
506
520
|
credentials: "include",
|
|
507
|
-
body: JSON.stringify({ tenantCode: e, domainCode: "" })
|
|
521
|
+
body: JSON.stringify({ tenantCode: e, domainCode: t || "" })
|
|
508
522
|
}), r = await f(n, "切换租户失败");
|
|
509
523
|
return { token: (r == null ? void 0 : r.token) ?? "", account: (r == null ? void 0 : r.account) ?? null };
|
|
510
524
|
}
|
|
@@ -512,7 +526,7 @@ async function ys(e) {
|
|
|
512
526
|
await f(
|
|
513
527
|
await fetch("/kapi/z-ctc/api/ctc/authn/logout", {
|
|
514
528
|
headers: { Accept: "application/json" },
|
|
515
|
-
...
|
|
529
|
+
...g,
|
|
516
530
|
method: "POST",
|
|
517
531
|
credentials: "include"
|
|
518
532
|
}),
|
|
@@ -524,7 +538,7 @@ async function ys(e) {
|
|
|
524
538
|
}
|
|
525
539
|
}
|
|
526
540
|
const $e = /* @__PURE__ */ new Map(), gs = 300 * 1e3, bs = 30 * 1e3;
|
|
527
|
-
async function
|
|
541
|
+
async function ci(e, t) {
|
|
528
542
|
const n = `${e}`, r = $e.get(n);
|
|
529
543
|
if (r) {
|
|
530
544
|
const s = r.failed ? bs : gs;
|
|
@@ -556,29 +570,29 @@ async function ii(e, t) {
|
|
|
556
570
|
async function Ss(e = "", t) {
|
|
557
571
|
const n = new URLSearchParams();
|
|
558
572
|
e && n.set("token", e), t && n.set("create_time_start", t);
|
|
559
|
-
const r = n.toString(), s = await
|
|
560
|
-
`${
|
|
561
|
-
|
|
573
|
+
const r = n.toString(), s = await S(
|
|
574
|
+
`${b}/scenario-instances/${r ? `?${r}` : ""}`,
|
|
575
|
+
g
|
|
562
576
|
);
|
|
563
577
|
return f(s, "获取项目列表失败");
|
|
564
578
|
}
|
|
565
|
-
async function
|
|
566
|
-
const t = e ? `?token=${encodeURIComponent(e)}` : "", n = await
|
|
579
|
+
async function li(e = "") {
|
|
580
|
+
const t = e ? `?token=${encodeURIComponent(e)}` : "", n = await S(`${b}/scenarios${t}`, g);
|
|
567
581
|
return f(n, "获取场景列表失败");
|
|
568
582
|
}
|
|
569
583
|
async function sr(e, t = "") {
|
|
570
584
|
const n = t ? `?token=${encodeURIComponent(t)}` : "", r = {
|
|
571
585
|
...e,
|
|
572
586
|
extend_params: { ...e.extend_params, skip_init_task: "true" }
|
|
573
|
-
}, s = await
|
|
574
|
-
...
|
|
587
|
+
}, s = await S(`${b}/scenario-instances/${n}`, {
|
|
588
|
+
...g,
|
|
575
589
|
method: "POST",
|
|
576
590
|
headers: { "Content-Type": "application/json" },
|
|
577
591
|
body: JSON.stringify(r)
|
|
578
592
|
}), o = await f(s, "创建项目失败");
|
|
579
593
|
return Ae(o);
|
|
580
594
|
}
|
|
581
|
-
const
|
|
595
|
+
const di = sr;
|
|
582
596
|
function Ae(e) {
|
|
583
597
|
return {
|
|
584
598
|
// FE-PRECISION-FIX: 雪花 ID 是 19 位 bigint, Number() 会丢末位精度
|
|
@@ -596,15 +610,15 @@ function Ae(e) {
|
|
|
596
610
|
scenario_name: e.scenario_name != null ? String(e.scenario_name) : e.scenarioName != null ? String(e.scenarioName) : void 0,
|
|
597
611
|
role: e.role != null ? String(e.role) : void 0,
|
|
598
612
|
llm_code: e.llm_code != null ? String(e.llm_code) : e.llmCode != null ? String(e.llmCode) : void 0,
|
|
599
|
-
close_feedback:
|
|
600
|
-
close_tags:
|
|
601
|
-
close_time:
|
|
602
|
-
close_user:
|
|
613
|
+
close_feedback: st(e, "close_feedback"),
|
|
614
|
+
close_tags: st(e, "close_tags"),
|
|
615
|
+
close_time: st(e, "close_time"),
|
|
616
|
+
close_user: st(e, "close_user"),
|
|
603
617
|
members: Array.isArray(e.members) ? e.members.map((t) => String(t)) : void 0,
|
|
604
618
|
parent_id: ws(e)
|
|
605
619
|
};
|
|
606
620
|
}
|
|
607
|
-
function
|
|
621
|
+
function st(e, t) {
|
|
608
622
|
const n = t.replace(/_([a-z])/g, (i, c) => c.toUpperCase());
|
|
609
623
|
if (e[t] != null) return e[t];
|
|
610
624
|
if (e[n] != null) return e[n];
|
|
@@ -629,11 +643,11 @@ function ws(e) {
|
|
|
629
643
|
const s = q(r);
|
|
630
644
|
return s === "" ? void 0 : s;
|
|
631
645
|
}
|
|
632
|
-
async function
|
|
633
|
-
const n = await
|
|
634
|
-
`${
|
|
646
|
+
async function ui(e, t) {
|
|
647
|
+
const n = await S(
|
|
648
|
+
`${b}/scenario-instances/${e}/llm-code`,
|
|
635
649
|
{
|
|
636
|
-
...
|
|
650
|
+
...g,
|
|
637
651
|
method: "PUT",
|
|
638
652
|
headers: { "Content-Type": "application/json" },
|
|
639
653
|
body: JSON.stringify({ llmCode: t || null })
|
|
@@ -642,16 +656,16 @@ async function di(e, t) {
|
|
|
642
656
|
return Ae(r);
|
|
643
657
|
}
|
|
644
658
|
const _s = "qa_support";
|
|
645
|
-
function
|
|
659
|
+
function pi(e) {
|
|
646
660
|
const t = e.futureTeamProjectId ?? e.future_team_project_id ?? "", n = q(String(t).trim());
|
|
647
661
|
return we(n) ? n : null;
|
|
648
662
|
}
|
|
649
|
-
async function
|
|
663
|
+
async function mi(e, t, n) {
|
|
650
664
|
const r = new URLSearchParams({
|
|
651
665
|
ticketId: e,
|
|
652
666
|
futureTeamProjectId: String(t),
|
|
653
667
|
stage: n
|
|
654
|
-
}), s = await
|
|
668
|
+
}), s = await S(`${b}/dev-brain/agent/update-z-team`, {
|
|
655
669
|
method: "POST",
|
|
656
670
|
headers: {
|
|
657
671
|
"Content-Type": "application/x-www-form-urlencoded;charset=UTF-8"
|
|
@@ -661,15 +675,15 @@ async function pi(e, t, n) {
|
|
|
661
675
|
await f(s, "回写工单关联工程失败");
|
|
662
676
|
}
|
|
663
677
|
async function Ts(e) {
|
|
664
|
-
const t = await
|
|
665
|
-
`${
|
|
666
|
-
|
|
678
|
+
const t = await S(
|
|
679
|
+
`${b}/scenario-instances/${e}/team/`,
|
|
680
|
+
g
|
|
667
681
|
);
|
|
668
682
|
return f(t, "获取团队成员失败");
|
|
669
683
|
}
|
|
670
684
|
async function ks(e, t) {
|
|
671
|
-
const n = await
|
|
672
|
-
...
|
|
685
|
+
const n = await S(`${b}/scenario-instances/${e}/team/`, {
|
|
686
|
+
...g,
|
|
673
687
|
method: "POST",
|
|
674
688
|
headers: { "Content-Type": "application/json" },
|
|
675
689
|
body: JSON.stringify(t)
|
|
@@ -677,46 +691,46 @@ async function ks(e, t) {
|
|
|
677
691
|
return f(n, "添加成员失败");
|
|
678
692
|
}
|
|
679
693
|
async function Is(e, t) {
|
|
680
|
-
const n = await
|
|
681
|
-
`${
|
|
694
|
+
const n = await S(
|
|
695
|
+
`${b}/scenario-instances/${e}/team/${t}`,
|
|
682
696
|
{
|
|
683
|
-
...
|
|
697
|
+
...g,
|
|
684
698
|
method: "DELETE"
|
|
685
699
|
}
|
|
686
700
|
);
|
|
687
701
|
return f(n, "移除成员失败");
|
|
688
702
|
}
|
|
689
703
|
async function Cs(e) {
|
|
690
|
-
const t = await
|
|
691
|
-
`${
|
|
692
|
-
|
|
704
|
+
const t = await S(
|
|
705
|
+
`${b}/scenario-instances/${e}/team/available-agents`,
|
|
706
|
+
g
|
|
693
707
|
);
|
|
694
708
|
return f(t, "获取Agent列表失败");
|
|
695
709
|
}
|
|
696
710
|
async function As(e) {
|
|
697
|
-
const t = await
|
|
698
|
-
`${
|
|
699
|
-
|
|
711
|
+
const t = await S(
|
|
712
|
+
`${b}/scenario-instances/${e}/team/available-humans`,
|
|
713
|
+
g
|
|
700
714
|
);
|
|
701
715
|
return f(t, "获取用户列表失败");
|
|
702
716
|
}
|
|
703
717
|
async function $s(e) {
|
|
704
|
-
const t = await
|
|
705
|
-
`${
|
|
706
|
-
|
|
718
|
+
const t = await S(
|
|
719
|
+
`${b}/scenario-instances/${e}/skills`,
|
|
720
|
+
g
|
|
707
721
|
);
|
|
708
722
|
return f(t, "获取技能列表失败");
|
|
709
723
|
}
|
|
710
724
|
async function xs(e) {
|
|
711
|
-
const t = await
|
|
712
|
-
`${
|
|
713
|
-
|
|
725
|
+
const t = await S(
|
|
726
|
+
`${b}/scenario-instances/${e}/all-skills`,
|
|
727
|
+
g
|
|
714
728
|
);
|
|
715
729
|
return f(t, "获取全部技能列表失败");
|
|
716
730
|
}
|
|
717
731
|
async function vs(e, t) {
|
|
718
|
-
const n = await
|
|
719
|
-
...
|
|
732
|
+
const n = await S(`${b}/scenario-instances/${e}/skills`, {
|
|
733
|
+
...g,
|
|
720
734
|
method: "POST",
|
|
721
735
|
headers: { "Content-Type": "application/json" },
|
|
722
736
|
body: JSON.stringify({ skill_id: t })
|
|
@@ -724,20 +738,20 @@ async function vs(e, t) {
|
|
|
724
738
|
return f(n, "添加技能失败");
|
|
725
739
|
}
|
|
726
740
|
async function Ps(e, t) {
|
|
727
|
-
const n = await
|
|
728
|
-
`${
|
|
741
|
+
const n = await S(
|
|
742
|
+
`${b}/scenario-instances/${e}/skills/${t}`,
|
|
729
743
|
{
|
|
730
|
-
...
|
|
744
|
+
...g,
|
|
731
745
|
method: "DELETE"
|
|
732
746
|
}
|
|
733
747
|
);
|
|
734
748
|
return f(n, "移除技能失败");
|
|
735
749
|
}
|
|
736
750
|
async function Es(e, t) {
|
|
737
|
-
const n = await
|
|
738
|
-
`${
|
|
751
|
+
const n = await S(
|
|
752
|
+
`${b}/scenario-instances/${e}/agent-skills/refresh`,
|
|
739
753
|
{
|
|
740
|
-
...
|
|
754
|
+
...g,
|
|
741
755
|
method: "POST",
|
|
742
756
|
headers: { "Content-Type": "application/json" },
|
|
743
757
|
body: JSON.stringify({ agent_skills_path: t })
|
|
@@ -746,36 +760,36 @@ async function Es(e, t) {
|
|
|
746
760
|
return f(n, "刷新技能失败");
|
|
747
761
|
}
|
|
748
762
|
async function Rs(e) {
|
|
749
|
-
const t = await
|
|
750
|
-
`${
|
|
763
|
+
const t = await S(
|
|
764
|
+
`${b}/scenario-instances/${e}/all-agent-skills/refresh`,
|
|
751
765
|
{
|
|
752
|
-
...
|
|
766
|
+
...g,
|
|
753
767
|
method: "POST"
|
|
754
768
|
}
|
|
755
769
|
);
|
|
756
770
|
return f(t, "刷新所有技能失败");
|
|
757
771
|
}
|
|
758
772
|
async function bn(e, t = 50, n) {
|
|
759
|
-
let r = `${
|
|
773
|
+
let r = `${b}/scenario-instances/${e}/messages?limit=${t}`;
|
|
760
774
|
n && (r += `&before=${n}`);
|
|
761
|
-
const s = await
|
|
775
|
+
const s = await S(r, g);
|
|
762
776
|
return f(s, "加载聊天记录失败,请稍后重试");
|
|
763
777
|
}
|
|
764
778
|
async function Os(e, t, n = "") {
|
|
765
|
-
const r = n ? `?token=${encodeURIComponent(n)}` : "", s = await
|
|
766
|
-
`${
|
|
779
|
+
const r = n ? `?token=${encodeURIComponent(n)}` : "", s = await S(
|
|
780
|
+
`${b}/scenario-instances/${e}/messages/${t}/read${r}`,
|
|
767
781
|
{
|
|
768
|
-
...
|
|
782
|
+
...g,
|
|
769
783
|
method: "POST"
|
|
770
784
|
}
|
|
771
785
|
);
|
|
772
786
|
return f(s, "标记已读失败");
|
|
773
787
|
}
|
|
774
|
-
async function
|
|
775
|
-
const r = n ? `?token=${encodeURIComponent(n)}` : "", s = await
|
|
776
|
-
`${
|
|
788
|
+
async function at(e, t, n = "") {
|
|
789
|
+
const r = n ? `?token=${encodeURIComponent(n)}` : "", s = await S(
|
|
790
|
+
`${b}/scenario-instances/${e}/messages${r}`,
|
|
777
791
|
{
|
|
778
|
-
...
|
|
792
|
+
...g,
|
|
779
793
|
method: "POST",
|
|
780
794
|
headers: { "Content-Type": "application/json" },
|
|
781
795
|
body: JSON.stringify(t)
|
|
@@ -784,44 +798,44 @@ async function ot(e, t, n = "") {
|
|
|
784
798
|
return f(s, "发送消息失败");
|
|
785
799
|
}
|
|
786
800
|
async function Ms(e, t) {
|
|
787
|
-
const n = await
|
|
788
|
-
`${
|
|
789
|
-
{ ...
|
|
801
|
+
const n = await S(
|
|
802
|
+
`${b}/scenario-instances/${e}/cancel/${t}`,
|
|
803
|
+
{ ...g, method: "POST" }
|
|
790
804
|
), r = await f(n, "取消失败");
|
|
791
805
|
if (r != null && r.warning)
|
|
792
806
|
throw new Error(String(r.warning));
|
|
793
807
|
return r;
|
|
794
808
|
}
|
|
795
809
|
async function js(e, t) {
|
|
796
|
-
const n = await
|
|
797
|
-
`${
|
|
798
|
-
{ ...
|
|
810
|
+
const n = await S(
|
|
811
|
+
`${b}/scenario-instances/${e}/cancel/${t}/queue`,
|
|
812
|
+
{ ...g, method: "POST" }
|
|
799
813
|
);
|
|
800
814
|
return f(n, "停止队列失败");
|
|
801
815
|
}
|
|
802
816
|
async function Ns(e) {
|
|
803
|
-
const t = await
|
|
804
|
-
`${
|
|
805
|
-
|
|
817
|
+
const t = await S(
|
|
818
|
+
`${b}/scenario-instances/${e}/executions`,
|
|
819
|
+
g
|
|
806
820
|
);
|
|
807
821
|
return f(t, "获取执行列表失败");
|
|
808
822
|
}
|
|
809
823
|
async function Sn(e, t = "") {
|
|
810
|
-
const n = t ? `?subdir=${encodeURIComponent(t)}` : "", r = await
|
|
811
|
-
`${
|
|
812
|
-
|
|
824
|
+
const n = t ? `?subdir=${encodeURIComponent(t)}` : "", r = await S(
|
|
825
|
+
`${b}/scenario-instances/${e}/workspace/tree${n}`,
|
|
826
|
+
g
|
|
813
827
|
);
|
|
814
828
|
return f(r, "获取文件树失败");
|
|
815
829
|
}
|
|
816
830
|
async function Us() {
|
|
817
|
-
const e = await
|
|
831
|
+
const e = await S(`${b}/workspace/env`, g);
|
|
818
832
|
return f(e, "获取环境信息失败");
|
|
819
833
|
}
|
|
820
834
|
async function zs(e) {
|
|
821
|
-
const t = await
|
|
822
|
-
`${
|
|
835
|
+
const t = await S(
|
|
836
|
+
`${b}/scenario-instances/${e}/workspace/sync-from-prod`,
|
|
823
837
|
{
|
|
824
|
-
...
|
|
838
|
+
...g,
|
|
825
839
|
method: "POST",
|
|
826
840
|
headers: { "Content-Type": "application/json" }
|
|
827
841
|
}
|
|
@@ -829,21 +843,21 @@ async function zs(e) {
|
|
|
829
843
|
return f(t, "同步失败");
|
|
830
844
|
}
|
|
831
845
|
async function Ls(e, t) {
|
|
832
|
-
const n = await
|
|
833
|
-
`${
|
|
846
|
+
const n = await S(
|
|
847
|
+
`${b}/scenario-instances/${e}/workspace/file?file_path=${encodeURIComponent(
|
|
834
848
|
t
|
|
835
849
|
)}`,
|
|
836
|
-
|
|
850
|
+
g
|
|
837
851
|
);
|
|
838
852
|
return f(n, "获取文件内容失败");
|
|
839
853
|
}
|
|
840
854
|
async function Ds(e, t, n) {
|
|
841
|
-
const r = await
|
|
842
|
-
`${
|
|
855
|
+
const r = await S(
|
|
856
|
+
`${b}/scenario-instances/${e}/workspace/file?file_path=${encodeURIComponent(
|
|
843
857
|
t
|
|
844
858
|
)}`,
|
|
845
859
|
{
|
|
846
|
-
...
|
|
860
|
+
...g,
|
|
847
861
|
method: "POST",
|
|
848
862
|
headers: { "Content-Type": "application/json" },
|
|
849
863
|
body: JSON.stringify({ content: n })
|
|
@@ -852,10 +866,10 @@ async function Ds(e, t, n) {
|
|
|
852
866
|
return f(r, "保存文件失败");
|
|
853
867
|
}
|
|
854
868
|
async function Fs(e, t, n) {
|
|
855
|
-
const r = await
|
|
856
|
-
`${
|
|
869
|
+
const r = await S(
|
|
870
|
+
`${b}/scenario-instances/${e}/workspace/rename`,
|
|
857
871
|
{
|
|
858
|
-
...
|
|
872
|
+
...g,
|
|
859
873
|
method: "PUT",
|
|
860
874
|
headers: { "Content-Type": "application/json" },
|
|
861
875
|
body: JSON.stringify({ old_path: t, new_name: n })
|
|
@@ -864,10 +878,10 @@ async function Fs(e, t, n) {
|
|
|
864
878
|
return f(r, "重命名失败");
|
|
865
879
|
}
|
|
866
880
|
async function qs(e, t, n) {
|
|
867
|
-
const r = await
|
|
868
|
-
`${
|
|
881
|
+
const r = await S(
|
|
882
|
+
`${b}/scenario-instances/${e}/workspace/new-file`,
|
|
869
883
|
{
|
|
870
|
-
...
|
|
884
|
+
...g,
|
|
871
885
|
method: "POST",
|
|
872
886
|
headers: { "Content-Type": "application/json" },
|
|
873
887
|
body: JSON.stringify({ parent_path: t, name: n })
|
|
@@ -876,10 +890,10 @@ async function qs(e, t, n) {
|
|
|
876
890
|
return f(r, "新建文件失败");
|
|
877
891
|
}
|
|
878
892
|
async function Bs(e, t, n) {
|
|
879
|
-
const r = await
|
|
880
|
-
`${
|
|
893
|
+
const r = await S(
|
|
894
|
+
`${b}/scenario-instances/${e}/workspace/new-folder`,
|
|
881
895
|
{
|
|
882
|
-
...
|
|
896
|
+
...g,
|
|
883
897
|
method: "POST",
|
|
884
898
|
headers: { "Content-Type": "application/json" },
|
|
885
899
|
body: JSON.stringify({ parent_path: t, name: n })
|
|
@@ -888,10 +902,10 @@ async function Bs(e, t, n) {
|
|
|
888
902
|
return f(r, "新建文件夹失败");
|
|
889
903
|
}
|
|
890
904
|
async function Hs(e, t) {
|
|
891
|
-
const n = await
|
|
892
|
-
`${
|
|
905
|
+
const n = await S(
|
|
906
|
+
`${b}/scenario-instances/${e}/workspace/delete`,
|
|
893
907
|
{
|
|
894
|
-
...
|
|
908
|
+
...g,
|
|
895
909
|
method: "POST",
|
|
896
910
|
headers: { "Content-Type": "application/json" },
|
|
897
911
|
body: JSON.stringify({ path: t })
|
|
@@ -902,10 +916,10 @@ async function Hs(e, t) {
|
|
|
902
916
|
async function Ks(e, t, n) {
|
|
903
917
|
const r = new FormData();
|
|
904
918
|
r.append("file", n), r.append("parent_path", t);
|
|
905
|
-
const s = await
|
|
906
|
-
`${
|
|
919
|
+
const s = await S(
|
|
920
|
+
`${b}/scenario-instances/${e}/workspace/upload-file`,
|
|
907
921
|
{
|
|
908
|
-
...
|
|
922
|
+
...g,
|
|
909
923
|
method: "POST",
|
|
910
924
|
body: r
|
|
911
925
|
}
|
|
@@ -915,10 +929,10 @@ async function Ks(e, t, n) {
|
|
|
915
929
|
async function Gs(e, t, n) {
|
|
916
930
|
const r = new FormData();
|
|
917
931
|
n.forEach((o) => r.append("files", o)), r.append("parent_path", t);
|
|
918
|
-
const s = await
|
|
919
|
-
`${
|
|
932
|
+
const s = await S(
|
|
933
|
+
`${b}/scenario-instances/${e}/workspace/upload-folder`,
|
|
920
934
|
{
|
|
921
|
-
...
|
|
935
|
+
...g,
|
|
922
936
|
method: "POST",
|
|
923
937
|
body: r
|
|
924
938
|
}
|
|
@@ -926,19 +940,19 @@ async function Gs(e, t, n) {
|
|
|
926
940
|
return f(s, "上传文件夹失败");
|
|
927
941
|
}
|
|
928
942
|
async function Js(e, t) {
|
|
929
|
-
const n = await
|
|
930
|
-
`${
|
|
943
|
+
const n = await S(
|
|
944
|
+
`${b}/scenario-instances/${e}/workspace/download?file_path=${encodeURIComponent(
|
|
931
945
|
t
|
|
932
946
|
)}`,
|
|
933
|
-
|
|
947
|
+
g
|
|
934
948
|
);
|
|
935
949
|
if (!n.ok) throw new Error("下载失败");
|
|
936
950
|
return n.blob();
|
|
937
951
|
}
|
|
938
952
|
async function Vs(e, t = "") {
|
|
939
|
-
const n = t ? `?token=${encodeURIComponent(t)}` : "", r = await
|
|
940
|
-
`${
|
|
941
|
-
|
|
953
|
+
const n = t ? `?token=${encodeURIComponent(t)}` : "", r = await S(
|
|
954
|
+
`${b}/scenario-instances/${e}${n}`,
|
|
955
|
+
g
|
|
942
956
|
), s = await f(r, "获取项目失败"), o = s.status === "FOUND" ? "FOUND" : "NOT_FOUND", i = s.scenario_instance ?? s.scenarioInstance ?? null;
|
|
943
957
|
return {
|
|
944
958
|
status: o,
|
|
@@ -956,10 +970,10 @@ async function Ws(e, t = "") {
|
|
|
956
970
|
return n.scenarioInstance;
|
|
957
971
|
}
|
|
958
972
|
async function Zs(e, t = "") {
|
|
959
|
-
const n = t ? `?token=${encodeURIComponent(t)}` : "", r = await
|
|
960
|
-
`${
|
|
973
|
+
const n = t ? `?token=${encodeURIComponent(t)}` : "", r = await S(
|
|
974
|
+
`${b}/scenario-instances/${e}/join-self${n}`,
|
|
961
975
|
{
|
|
962
|
-
...
|
|
976
|
+
...g,
|
|
963
977
|
method: "POST"
|
|
964
978
|
}
|
|
965
979
|
), s = await f(r, "加入工程失败");
|
|
@@ -969,17 +983,17 @@ async function Xs(e, t = "") {
|
|
|
969
983
|
return await Ws(e, t), Zs(e, t);
|
|
970
984
|
}
|
|
971
985
|
async function Ys(e) {
|
|
972
|
-
const t = await
|
|
973
|
-
...
|
|
986
|
+
const t = await S(`${b}/scenario-instances/${e}`, {
|
|
987
|
+
...g,
|
|
974
988
|
method: "DELETE"
|
|
975
989
|
});
|
|
976
990
|
return f(t, "删除项目失败");
|
|
977
991
|
}
|
|
978
992
|
async function Qs(e, t, n = "") {
|
|
979
|
-
const r = n ? `?token=${encodeURIComponent(n)}` : "", s = await
|
|
980
|
-
`${
|
|
993
|
+
const r = n ? `?token=${encodeURIComponent(n)}` : "", s = await S(
|
|
994
|
+
`${b}/scenario-instances/${e}/fork${r}`,
|
|
981
995
|
{
|
|
982
|
-
...
|
|
996
|
+
...g,
|
|
983
997
|
method: "POST",
|
|
984
998
|
headers: { "Content-Type": "application/json" },
|
|
985
999
|
body: JSON.stringify({ mode: t })
|
|
@@ -988,19 +1002,19 @@ async function Qs(e, t, n = "") {
|
|
|
988
1002
|
return Ae(o);
|
|
989
1003
|
}
|
|
990
1004
|
async function ea(e, t) {
|
|
991
|
-
const n = await
|
|
992
|
-
...
|
|
1005
|
+
const n = await S(`${b}/scenario-instances/${e}`, {
|
|
1006
|
+
...g,
|
|
993
1007
|
method: "PATCH",
|
|
994
1008
|
headers: { "Content-Type": "application/json" },
|
|
995
1009
|
body: JSON.stringify(t)
|
|
996
1010
|
}), r = await f(n, "更新项目失败");
|
|
997
1011
|
return Ae(r);
|
|
998
1012
|
}
|
|
999
|
-
async function
|
|
1000
|
-
const t = await
|
|
1001
|
-
`${
|
|
1013
|
+
async function hi(e) {
|
|
1014
|
+
const t = await S(
|
|
1015
|
+
`${b}/scenario-instances/${e}/retry-image-parse`,
|
|
1002
1016
|
{
|
|
1003
|
-
...
|
|
1017
|
+
...g,
|
|
1004
1018
|
method: "POST",
|
|
1005
1019
|
headers: { "Content-Type": "application/json" }
|
|
1006
1020
|
}
|
|
@@ -1011,10 +1025,10 @@ async function mi(e) {
|
|
|
1011
1025
|
};
|
|
1012
1026
|
}
|
|
1013
1027
|
async function ta(e, t, n = "") {
|
|
1014
|
-
const r = n ? `?token=${encodeURIComponent(n)}` : "", s = await
|
|
1015
|
-
`${
|
|
1028
|
+
const r = n ? `?token=${encodeURIComponent(n)}` : "", s = await S(
|
|
1029
|
+
`${b}/scenario-instances/${e}/task-sessions/${t}${r}`,
|
|
1016
1030
|
{
|
|
1017
|
-
...
|
|
1031
|
+
...g,
|
|
1018
1032
|
method: "POST",
|
|
1019
1033
|
headers: { "Content-Type": "application/json" }
|
|
1020
1034
|
}
|
|
@@ -1022,18 +1036,18 @@ async function ta(e, t, n = "") {
|
|
|
1022
1036
|
return f(s, "创建任务会话失败");
|
|
1023
1037
|
}
|
|
1024
1038
|
async function na(e, t, n = 50, r, s = "") {
|
|
1025
|
-
let o = `${
|
|
1039
|
+
let o = `${b}/scenario-instances/${e}/task-sessions/${t}/messages?limit=${n}`;
|
|
1026
1040
|
r && (o += `&before=${r}`), s && (o += `&token=${encodeURIComponent(s)}`);
|
|
1027
|
-
const i = await
|
|
1041
|
+
const i = await S(o, g);
|
|
1028
1042
|
return f(i, "获取任务消息失败");
|
|
1029
1043
|
}
|
|
1030
1044
|
async function ra(e, t, n, r = "", s) {
|
|
1031
1045
|
const o = r ? `?token=${encodeURIComponent(r)}` : "", i = { content: n };
|
|
1032
1046
|
s && s.length > 0 && (i.image_urls = s);
|
|
1033
|
-
const c = await
|
|
1034
|
-
`${
|
|
1047
|
+
const c = await S(
|
|
1048
|
+
`${b}/scenario-instances/${e}/task-sessions/${t}/messages${o}`,
|
|
1035
1049
|
{
|
|
1036
|
-
...
|
|
1050
|
+
...g,
|
|
1037
1051
|
method: "POST",
|
|
1038
1052
|
headers: { "Content-Type": "application/json" },
|
|
1039
1053
|
body: JSON.stringify(i)
|
|
@@ -1041,17 +1055,17 @@ async function ra(e, t, n, r = "", s) {
|
|
|
1041
1055
|
);
|
|
1042
1056
|
return f(c, "发送任务消息失败");
|
|
1043
1057
|
}
|
|
1044
|
-
async function
|
|
1045
|
-
const t = e ? `?token=${encodeURIComponent(e)}` : "", n = await
|
|
1058
|
+
async function fi(e = "") {
|
|
1059
|
+
const t = e ? `?token=${encodeURIComponent(e)}` : "", n = await S(`${b}/admin/scenarios${t}`, g);
|
|
1046
1060
|
return f(n, "获取场景列表失败");
|
|
1047
1061
|
}
|
|
1048
|
-
async function
|
|
1049
|
-
const r = n ? `?token=${encodeURIComponent(n)}` : "", s = await
|
|
1050
|
-
`${
|
|
1062
|
+
async function yi(e, t, n = "") {
|
|
1063
|
+
const r = n ? `?token=${encodeURIComponent(n)}` : "", s = await S(
|
|
1064
|
+
`${b}/admin/agents/${encodeURIComponent(
|
|
1051
1065
|
e
|
|
1052
1066
|
)}/identity/test-login${r}`,
|
|
1053
1067
|
{
|
|
1054
|
-
...
|
|
1068
|
+
...g,
|
|
1055
1069
|
method: "POST",
|
|
1056
1070
|
headers: { "Content-Type": "application/json" },
|
|
1057
1071
|
body: JSON.stringify(t)
|
|
@@ -1059,45 +1073,45 @@ async function fi(e, t, n = "") {
|
|
|
1059
1073
|
);
|
|
1060
1074
|
return f(s, "测试登录失败");
|
|
1061
1075
|
}
|
|
1062
|
-
async function
|
|
1063
|
-
const t = e ? `?token=${encodeURIComponent(e)}` : "", n = await
|
|
1064
|
-
`${
|
|
1065
|
-
|
|
1076
|
+
async function gi(e = "") {
|
|
1077
|
+
const t = e ? `?token=${encodeURIComponent(e)}` : "", n = await S(
|
|
1078
|
+
`${b}/admin/agents/identity-envs${t}`,
|
|
1079
|
+
g
|
|
1066
1080
|
);
|
|
1067
1081
|
return f(n, "获取身份绑定环境列表失败");
|
|
1068
1082
|
}
|
|
1069
|
-
async function
|
|
1083
|
+
async function bi(e, t = "") {
|
|
1070
1084
|
const n = new URLSearchParams();
|
|
1071
1085
|
e && n.set("envCode", e), t && n.set("token", t);
|
|
1072
|
-
const r = n.toString() ? `?${n.toString()}` : "", s = await
|
|
1073
|
-
`${
|
|
1074
|
-
|
|
1086
|
+
const r = n.toString() ? `?${n.toString()}` : "", s = await S(
|
|
1087
|
+
`${b}/admin/agents/ctc-members${r}`,
|
|
1088
|
+
g
|
|
1075
1089
|
);
|
|
1076
1090
|
return f(s, "获取成员列表失败") ?? [];
|
|
1077
1091
|
}
|
|
1078
|
-
async function
|
|
1079
|
-
const r = n ? `?token=${encodeURIComponent(n)}` : "", s = await
|
|
1080
|
-
...
|
|
1092
|
+
async function Si(e, t, n = "") {
|
|
1093
|
+
const r = n ? `?token=${encodeURIComponent(n)}` : "", s = await S(`${b}/admin/agents/${e}/move${r}`, {
|
|
1094
|
+
...g,
|
|
1081
1095
|
method: "POST",
|
|
1082
1096
|
headers: { "Content-Type": "application/json" },
|
|
1083
1097
|
body: JSON.stringify(t)
|
|
1084
1098
|
});
|
|
1085
1099
|
return f(s, "移动 Agent 分类失败");
|
|
1086
1100
|
}
|
|
1087
|
-
async function
|
|
1088
|
-
const t = e ? `?token=${encodeURIComponent(e)}` : "", n = await
|
|
1101
|
+
async function wi(e = "") {
|
|
1102
|
+
const t = e ? `?token=${encodeURIComponent(e)}` : "", n = await S(`${b}/admin/agents/models${t}`, g);
|
|
1089
1103
|
return f(n, "获取模型列表失败");
|
|
1090
1104
|
}
|
|
1091
|
-
function
|
|
1105
|
+
function tn(e) {
|
|
1092
1106
|
const t = Object.entries(e).filter(([, n]) => n !== void 0 && n !== "").map(([n, r]) => `${n}=${encodeURIComponent(r)}`);
|
|
1093
1107
|
return t.length ? `?${t.join("&")}` : "";
|
|
1094
1108
|
}
|
|
1095
|
-
async function
|
|
1096
|
-
const n = await
|
|
1097
|
-
`${
|
|
1109
|
+
async function _i(e, t = "") {
|
|
1110
|
+
const n = await S(
|
|
1111
|
+
`${b}/admin/agents/${encodeURIComponent(
|
|
1098
1112
|
e
|
|
1099
|
-
)}/ontology${
|
|
1100
|
-
|
|
1113
|
+
)}/ontology${tn({ token: t })}`,
|
|
1114
|
+
g
|
|
1101
1115
|
);
|
|
1102
1116
|
return (await f(
|
|
1103
1117
|
n,
|
|
@@ -1107,120 +1121,120 @@ async function wi(e, t = "") {
|
|
|
1107
1121
|
nodeInfo: { ...s.nodeInfo, dataPrepareEnabled: !1 }
|
|
1108
1122
|
}));
|
|
1109
1123
|
}
|
|
1110
|
-
async function
|
|
1111
|
-
const n = await
|
|
1112
|
-
`${
|
|
1124
|
+
async function Ti(e, t = "") {
|
|
1125
|
+
const n = await S(
|
|
1126
|
+
`${b}/admin/agents/ontology/ontologies${tn({
|
|
1113
1127
|
ontologyType: e,
|
|
1114
1128
|
token: t
|
|
1115
1129
|
})}`,
|
|
1116
|
-
|
|
1130
|
+
g
|
|
1117
1131
|
);
|
|
1118
1132
|
return f(n, "获取本体列表失败") ?? [];
|
|
1119
1133
|
}
|
|
1120
|
-
async function
|
|
1121
|
-
const n = await
|
|
1122
|
-
`${
|
|
1134
|
+
async function ki(e, t = "") {
|
|
1135
|
+
const n = await S(
|
|
1136
|
+
`${b}/admin/agents/ontology/knowledges${tn({
|
|
1123
1137
|
ontologyCode: e,
|
|
1124
1138
|
token: t
|
|
1125
1139
|
})}`,
|
|
1126
|
-
|
|
1140
|
+
g
|
|
1127
1141
|
);
|
|
1128
1142
|
return f(n, "获取知识列表失败") ?? [];
|
|
1129
1143
|
}
|
|
1130
|
-
async function
|
|
1131
|
-
const r = n ? `?token=${encodeURIComponent(n)}` : "", s = await
|
|
1132
|
-
...
|
|
1144
|
+
async function Ii(e, t, n = "") {
|
|
1145
|
+
const r = n ? `?token=${encodeURIComponent(n)}` : "", s = await S(`${b}/admin/skills/${e}/move${r}`, {
|
|
1146
|
+
...g,
|
|
1133
1147
|
method: "POST",
|
|
1134
1148
|
headers: { "Content-Type": "application/json" },
|
|
1135
1149
|
body: JSON.stringify(t)
|
|
1136
1150
|
});
|
|
1137
1151
|
return f(s, "移动 Skill 分类失败");
|
|
1138
1152
|
}
|
|
1139
|
-
async function
|
|
1153
|
+
async function Ci(e = "", t = "") {
|
|
1140
1154
|
const n = new URLSearchParams();
|
|
1141
1155
|
e && n.append("keyword", e), t && n.append("token", t);
|
|
1142
|
-
const r = n.toString() ? `?${n.toString()}` : "", s = await
|
|
1143
|
-
`${
|
|
1144
|
-
|
|
1156
|
+
const r = n.toString() ? `?${n.toString()}` : "", s = await S(
|
|
1157
|
+
`${b}/admin/profiles/ctc-staff${r}`,
|
|
1158
|
+
g
|
|
1145
1159
|
);
|
|
1146
1160
|
return f(s, "获取员工列表失败");
|
|
1147
1161
|
}
|
|
1148
|
-
async function
|
|
1162
|
+
async function Ai(e, t, n = "", r = "") {
|
|
1149
1163
|
const s = new URLSearchParams();
|
|
1150
1164
|
s.append("profileScope", e), s.append("memberType", t), n && s.append("scenarioCode", n), r && s.append("token", r);
|
|
1151
|
-
const o = s.toString() ? `?${s.toString()}` : "", i = await
|
|
1165
|
+
const o = s.toString() ? `?${s.toString()}` : "", i = await S(`${b}/admin/profiles${o}`, g);
|
|
1152
1166
|
return f(i, "获取画像列表失败");
|
|
1153
1167
|
}
|
|
1154
|
-
async function
|
|
1155
|
-
const n = t ? `?token=${encodeURIComponent(t)}` : "", r = await
|
|
1156
|
-
...
|
|
1168
|
+
async function $i(e, t = "") {
|
|
1169
|
+
const n = t ? `?token=${encodeURIComponent(t)}` : "", r = await S(`${b}/admin/profiles${n}`, {
|
|
1170
|
+
...g,
|
|
1157
1171
|
method: "POST",
|
|
1158
1172
|
headers: { "Content-Type": "application/json" },
|
|
1159
1173
|
body: JSON.stringify(e)
|
|
1160
1174
|
});
|
|
1161
1175
|
return f(r, "保存画像失败");
|
|
1162
1176
|
}
|
|
1163
|
-
async function
|
|
1177
|
+
async function xi(e, t, n, r = "", s = "") {
|
|
1164
1178
|
const o = new URLSearchParams();
|
|
1165
1179
|
r && o.append("scenarioCode", r), s && o.append("token", s);
|
|
1166
|
-
const i = o.toString() ? `?${o.toString()}` : "", c = await
|
|
1167
|
-
`${
|
|
1180
|
+
const i = o.toString() ? `?${o.toString()}` : "", c = await S(
|
|
1181
|
+
`${b}/admin/profiles/${encodeURIComponent(
|
|
1168
1182
|
e
|
|
1169
1183
|
)}/${encodeURIComponent(t)}/${encodeURIComponent(n)}${i}`,
|
|
1170
1184
|
{
|
|
1171
|
-
...
|
|
1185
|
+
...g,
|
|
1172
1186
|
method: "DELETE"
|
|
1173
1187
|
}
|
|
1174
1188
|
);
|
|
1175
1189
|
return f(c, "删除画像失败");
|
|
1176
1190
|
}
|
|
1177
|
-
async function
|
|
1191
|
+
async function vi(e = "", t = "") {
|
|
1178
1192
|
const n = new URLSearchParams();
|
|
1179
1193
|
e && n.append("scenarioCode", e), t && n.append("token", t);
|
|
1180
|
-
const r = n.toString() ? `?${n.toString()}` : "", s = await
|
|
1194
|
+
const r = n.toString() ? `?${n.toString()}` : "", s = await S(`${b}/admin/human-on-calls${r}`, g);
|
|
1181
1195
|
return f(s, "获取值班信息失败");
|
|
1182
1196
|
}
|
|
1183
|
-
async function
|
|
1184
|
-
const s = r ? `?token=${encodeURIComponent(r)}` : "", o = await
|
|
1185
|
-
...
|
|
1197
|
+
async function Pi(e, t, n, r = "") {
|
|
1198
|
+
const s = r ? `?token=${encodeURIComponent(r)}` : "", o = await S(`${b}/admin/human-on-calls/batch${s}`, {
|
|
1199
|
+
...g,
|
|
1186
1200
|
method: "POST",
|
|
1187
1201
|
headers: { "Content-Type": "application/json" },
|
|
1188
1202
|
body: JSON.stringify({ scenarioCode: e, dayOfWeek: t, onCalls: n })
|
|
1189
1203
|
});
|
|
1190
1204
|
return f(o, "保存值班信息失败");
|
|
1191
1205
|
}
|
|
1192
|
-
async function
|
|
1193
|
-
const s = r ? `?token=${encodeURIComponent(r)}` : "", o = await
|
|
1194
|
-
`${
|
|
1206
|
+
async function Ei(e, t, n, r = "") {
|
|
1207
|
+
const s = r ? `?token=${encodeURIComponent(r)}` : "", o = await S(
|
|
1208
|
+
`${b}/admin/human-on-calls/${encodeURIComponent(
|
|
1195
1209
|
e
|
|
1196
1210
|
)}/${n}/${encodeURIComponent(t)}${s}`,
|
|
1197
|
-
{ ...
|
|
1211
|
+
{ ...g, method: "DELETE" }
|
|
1198
1212
|
);
|
|
1199
1213
|
return f(o, "删除值班信息失败");
|
|
1200
1214
|
}
|
|
1201
|
-
async function
|
|
1215
|
+
async function Ri(e = {}, t = "") {
|
|
1202
1216
|
const n = [];
|
|
1203
1217
|
e.scenarioCode && n.push(`scenario_code=${encodeURIComponent(e.scenarioCode)}`), e.status && n.push(`status=${encodeURIComponent(e.status)}`), t && n.push(`token=${encodeURIComponent(t)}`);
|
|
1204
|
-
const r = n.length > 0 ? `?${n.join("&")}` : "", s = await
|
|
1205
|
-
`${
|
|
1218
|
+
const r = n.length > 0 ? `?${n.join("&")}` : "", s = await S(
|
|
1219
|
+
`${b}/admin/scenario-instances/refresh-all-skills${r}`,
|
|
1206
1220
|
{
|
|
1207
|
-
...
|
|
1221
|
+
...g,
|
|
1208
1222
|
method: "POST"
|
|
1209
1223
|
}
|
|
1210
1224
|
);
|
|
1211
1225
|
return f(s, "全量刷新技能失败");
|
|
1212
1226
|
}
|
|
1213
|
-
async function
|
|
1214
|
-
const n = t ? `?token=${encodeURIComponent(t)}` : "", r = await
|
|
1215
|
-
`${
|
|
1227
|
+
async function Oi(e, t = "") {
|
|
1228
|
+
const n = t ? `?token=${encodeURIComponent(t)}` : "", r = await S(
|
|
1229
|
+
`${b}/admin/scenario-instances/${e}/refresh-skills${n}`,
|
|
1216
1230
|
{
|
|
1217
|
-
...
|
|
1231
|
+
...g,
|
|
1218
1232
|
method: "POST"
|
|
1219
1233
|
}
|
|
1220
1234
|
);
|
|
1221
1235
|
return f(r, "刷新技能失败");
|
|
1222
1236
|
}
|
|
1223
|
-
function
|
|
1237
|
+
function nn(e) {
|
|
1224
1238
|
const t = (...r) => {
|
|
1225
1239
|
for (const s of r) {
|
|
1226
1240
|
const o = e[s];
|
|
@@ -1244,24 +1258,24 @@ function ze(e) {
|
|
|
1244
1258
|
updateTime: e.update_time == null ? e.updateTime : String(e.update_time)
|
|
1245
1259
|
};
|
|
1246
1260
|
}
|
|
1247
|
-
async function
|
|
1248
|
-
const t = e ? `?token=${encodeURIComponent(e)}` : "", n = await
|
|
1249
|
-
return (Array.isArray(r) ? r : []).map((s) =>
|
|
1261
|
+
async function Mi(e = "") {
|
|
1262
|
+
const t = e ? `?token=${encodeURIComponent(e)}` : "", n = await S(`${b}/personal-agents${t}`, g), r = await f(n, "获取个人 Agent 列表失败");
|
|
1263
|
+
return (Array.isArray(r) ? r : []).map((s) => nn(s));
|
|
1250
1264
|
}
|
|
1251
|
-
async function
|
|
1252
|
-
const n = t ? `?token=${encodeURIComponent(t)}` : "", r = await
|
|
1253
|
-
...
|
|
1265
|
+
async function ji(e, t = "") {
|
|
1266
|
+
const n = t ? `?token=${encodeURIComponent(t)}` : "", r = await S(`${b}/personal-agents${n}`, {
|
|
1267
|
+
...g,
|
|
1254
1268
|
method: "POST",
|
|
1255
1269
|
headers: { "Content-Type": "application/json" },
|
|
1256
1270
|
body: JSON.stringify({ display_name: e })
|
|
1257
1271
|
});
|
|
1258
|
-
return
|
|
1272
|
+
return nn(
|
|
1259
1273
|
await f(r, "创建个人 Agent 失败")
|
|
1260
1274
|
);
|
|
1261
1275
|
}
|
|
1262
|
-
async function
|
|
1263
|
-
const o = s ? `?token=${encodeURIComponent(s)}` : "", i = await
|
|
1264
|
-
...
|
|
1276
|
+
async function Ni(e, t, n, r, s = "") {
|
|
1277
|
+
const o = s ? `?token=${encodeURIComponent(s)}` : "", i = await S(`${b}/personal-agents/ensure${o}`, {
|
|
1278
|
+
...g,
|
|
1265
1279
|
method: "POST",
|
|
1266
1280
|
headers: { "Content-Type": "application/json" },
|
|
1267
1281
|
body: JSON.stringify({
|
|
@@ -1271,70 +1285,29 @@ async function ji(e, t, n, r, s = "") {
|
|
|
1271
1285
|
avatar: r ?? ""
|
|
1272
1286
|
})
|
|
1273
1287
|
});
|
|
1274
|
-
return
|
|
1288
|
+
return nn(
|
|
1275
1289
|
await f(i, "创建个人 Agent 失败")
|
|
1276
1290
|
);
|
|
1277
1291
|
}
|
|
1278
|
-
async function
|
|
1279
|
-
const n = t ? `?token=${encodeURIComponent(t)}` : "", r = await
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
});
|
|
1283
|
-
return f(r, "删除个人 Agent 失败");
|
|
1284
|
-
}
|
|
1285
|
-
async function Ui(e, t, n = "") {
|
|
1286
|
-
const r = n ? `?token=${encodeURIComponent(n)}` : "", s = await b(`${g}/personal-agents/${e}${r}`, {
|
|
1287
|
-
...y,
|
|
1288
|
-
method: "PUT",
|
|
1289
|
-
headers: { "Content-Type": "application/json" },
|
|
1290
|
-
body: JSON.stringify({ display_name: t })
|
|
1291
|
-
});
|
|
1292
|
-
return ze(
|
|
1293
|
-
await f(s, "重命名个人 Agent 失败")
|
|
1294
|
-
);
|
|
1295
|
-
}
|
|
1296
|
-
async function zi(e = "") {
|
|
1297
|
-
const t = e ? `?token=${encodeURIComponent(e)}` : "", n = await b(
|
|
1298
|
-
`${g}/personal-agents/shared${t}`,
|
|
1299
|
-
y
|
|
1300
|
-
), r = await f(
|
|
1301
|
-
n,
|
|
1302
|
-
"获取共享 Agent 列表失败"
|
|
1303
|
-
);
|
|
1304
|
-
return (Array.isArray(r) ? r : []).map(
|
|
1305
|
-
(s) => ze(s)
|
|
1306
|
-
);
|
|
1307
|
-
}
|
|
1308
|
-
async function Li(e, t, n = "") {
|
|
1309
|
-
const r = n ? `?token=${encodeURIComponent(n)}` : "", s = await b(`${g}/personal-agents/${e}/share${r}`, {
|
|
1310
|
-
...y,
|
|
1311
|
-
method: "PUT",
|
|
1312
|
-
headers: { "Content-Type": "application/json" },
|
|
1313
|
-
body: JSON.stringify({ shared: t })
|
|
1314
|
-
});
|
|
1315
|
-
return ze(
|
|
1316
|
-
await f(s, "切换共享状态失败")
|
|
1317
|
-
);
|
|
1318
|
-
}
|
|
1319
|
-
async function Di(e, t = "") {
|
|
1320
|
-
const n = t ? `?token=${encodeURIComponent(t)}` : "", r = await b(
|
|
1321
|
-
`${g}/personal-agents/${e}/sessions${n}`,
|
|
1322
|
-
y
|
|
1292
|
+
async function Ui(e, t = "") {
|
|
1293
|
+
const n = t ? `?token=${encodeURIComponent(t)}` : "", r = await S(
|
|
1294
|
+
`${b}/personal-agents/${e}/sessions${n}`,
|
|
1295
|
+
g
|
|
1323
1296
|
), s = await f(
|
|
1324
1297
|
r,
|
|
1325
1298
|
"获取会话列表失败"
|
|
1326
1299
|
), o = s == null ? void 0 : s.sessions;
|
|
1327
1300
|
return {
|
|
1328
|
-
sessions: (Array.isArray(o) ? o : []).map(
|
|
1301
|
+
sessions: (Array.isArray(o) ? o : []).map(Ye),
|
|
1329
1302
|
isOwner: (s == null ? void 0 : s.isOwner) === !0,
|
|
1330
1303
|
userMeta: (s == null ? void 0 : s.userMeta) ?? {}
|
|
1331
1304
|
};
|
|
1332
1305
|
}
|
|
1333
|
-
async function
|
|
1334
|
-
const s = n ? `?token=${encodeURIComponent(n)}` : "", o = await
|
|
1335
|
-
`${
|
|
1306
|
+
async function zi(e, t = "新会话", n = "", r) {
|
|
1307
|
+
const s = n ? `?token=${encodeURIComponent(n)}` : "", o = await S(
|
|
1308
|
+
`${b}/personal-agents/${e}/sessions${s}`,
|
|
1336
1309
|
{
|
|
1337
|
-
...
|
|
1310
|
+
...g,
|
|
1338
1311
|
method: "POST",
|
|
1339
1312
|
headers: { "Content-Type": "application/json" },
|
|
1340
1313
|
body: JSON.stringify({
|
|
@@ -1346,11 +1319,11 @@ async function Fi(e, t = "新会话", n = "", r) {
|
|
|
1346
1319
|
})
|
|
1347
1320
|
}
|
|
1348
1321
|
);
|
|
1349
|
-
return
|
|
1322
|
+
return Ye(
|
|
1350
1323
|
await f(o, "创建会话失败")
|
|
1351
1324
|
);
|
|
1352
1325
|
}
|
|
1353
|
-
function
|
|
1326
|
+
function Ye(e) {
|
|
1354
1327
|
const t = e ?? {}, n = (...c) => {
|
|
1355
1328
|
for (const l of c) {
|
|
1356
1329
|
const d = t[l];
|
|
@@ -1370,34 +1343,34 @@ function Qe(e) {
|
|
|
1370
1343
|
updateTime: i || void 0
|
|
1371
1344
|
};
|
|
1372
1345
|
}
|
|
1373
|
-
async function
|
|
1374
|
-
const n = t ? `&token=${encodeURIComponent(t)}` : "", r = await
|
|
1375
|
-
`${
|
|
1346
|
+
async function Li(e, t = "") {
|
|
1347
|
+
const n = t ? `&token=${encodeURIComponent(t)}` : "", r = await S(
|
|
1348
|
+
`${b}/personal-agents/sessions/search?keyword=${encodeURIComponent(
|
|
1376
1349
|
e
|
|
1377
1350
|
)}&limit=50${n}`,
|
|
1378
|
-
|
|
1351
|
+
g
|
|
1379
1352
|
), s = await f(r, "搜索会话失败");
|
|
1380
1353
|
return (Array.isArray(s) ? s : []).map((o) => {
|
|
1381
1354
|
const i = o ?? {}, c = String(i.matchField || "title");
|
|
1382
1355
|
return {
|
|
1383
|
-
session:
|
|
1356
|
+
session: Ye(i.session),
|
|
1384
1357
|
matchField: c === "id" || c === "content" ? c : "title",
|
|
1385
1358
|
snippet: i.snippet != null && i.snippet !== "" ? String(i.snippet) : void 0
|
|
1386
1359
|
};
|
|
1387
1360
|
});
|
|
1388
1361
|
}
|
|
1389
|
-
async function
|
|
1390
|
-
const t = e ? `?token=${encodeURIComponent(e)}` : "", n = await
|
|
1391
|
-
`${
|
|
1392
|
-
|
|
1362
|
+
async function Di(e = "") {
|
|
1363
|
+
const t = e ? `?token=${encodeURIComponent(e)}` : "", n = await S(
|
|
1364
|
+
`${b}/personal-agents/sessions/all${t}`,
|
|
1365
|
+
g
|
|
1393
1366
|
), r = await f(n, "获取聊天记录失败");
|
|
1394
|
-
return (Array.isArray(r) ? r : []).map(
|
|
1367
|
+
return (Array.isArray(r) ? r : []).map(Ye);
|
|
1395
1368
|
}
|
|
1396
|
-
async function
|
|
1397
|
-
const s = n ? `?token=${encodeURIComponent(n)}` : "", o = await
|
|
1398
|
-
`${
|
|
1369
|
+
async function Fi(e, t, n = "", r) {
|
|
1370
|
+
const s = n ? `?token=${encodeURIComponent(n)}` : "", o = await S(
|
|
1371
|
+
`${b}/personal-agents/${e}/sessions/${t}${s}`,
|
|
1399
1372
|
{
|
|
1400
|
-
...
|
|
1373
|
+
...g,
|
|
1401
1374
|
method: "PUT",
|
|
1402
1375
|
headers: { "Content-Type": "application/json" },
|
|
1403
1376
|
body: JSON.stringify(
|
|
@@ -1405,33 +1378,33 @@ async function Hi(e, t, n = "", r) {
|
|
|
1405
1378
|
)
|
|
1406
1379
|
}
|
|
1407
1380
|
);
|
|
1408
|
-
return
|
|
1381
|
+
return Ye(
|
|
1409
1382
|
await f(o, "会话归组失败")
|
|
1410
1383
|
);
|
|
1411
1384
|
}
|
|
1412
|
-
async function
|
|
1413
|
-
const t = e ? `?token=${encodeURIComponent(e)}` : "", n = await
|
|
1385
|
+
async function qi(e) {
|
|
1386
|
+
const t = e ? `?token=${encodeURIComponent(e)}` : "", n = await S(`${b}/personal-agents/models${t}`, g);
|
|
1414
1387
|
return f(n, "获取模型列表失败");
|
|
1415
1388
|
}
|
|
1416
|
-
async function
|
|
1417
|
-
const t = e ? `?token=${encodeURIComponent(e)}` : "", n = await
|
|
1418
|
-
`${
|
|
1419
|
-
|
|
1389
|
+
async function Bi(e) {
|
|
1390
|
+
const t = e ? `?token=${encodeURIComponent(e)}` : "", n = await S(
|
|
1391
|
+
`${b}/personal-agents/custom-models${t}`,
|
|
1392
|
+
g
|
|
1420
1393
|
);
|
|
1421
1394
|
return f(n, "获取自定义模型失败");
|
|
1422
1395
|
}
|
|
1423
|
-
async function
|
|
1424
|
-
const r = n ? `?token=${encodeURIComponent(n)}` : "", s = await
|
|
1425
|
-
`${
|
|
1426
|
-
{ ...
|
|
1396
|
+
async function Hi(e, t, n = "") {
|
|
1397
|
+
const r = n ? `?token=${encodeURIComponent(n)}` : "", s = await S(
|
|
1398
|
+
`${b}/personal-agents/${e}/sessions/${t}${r}`,
|
|
1399
|
+
{ ...g, method: "DELETE" }
|
|
1427
1400
|
);
|
|
1428
1401
|
return f(s, "删除会话失败");
|
|
1429
1402
|
}
|
|
1430
|
-
async function
|
|
1431
|
-
const s = r ? `?token=${encodeURIComponent(r)}` : "", o = await
|
|
1432
|
-
`${
|
|
1403
|
+
async function Ki(e, t, n, r = "") {
|
|
1404
|
+
const s = r ? `?token=${encodeURIComponent(r)}` : "", o = await S(
|
|
1405
|
+
`${b}/personal-agents/${e}/sessions/${t}${s}`,
|
|
1433
1406
|
{
|
|
1434
|
-
...
|
|
1407
|
+
...g,
|
|
1435
1408
|
method: "PUT",
|
|
1436
1409
|
headers: { "Content-Type": "application/json" },
|
|
1437
1410
|
body: JSON.stringify({ title: n })
|
|
@@ -1439,33 +1412,33 @@ async function Vi(e, t, n, r = "") {
|
|
|
1439
1412
|
);
|
|
1440
1413
|
return f(o, "重命名会话失败");
|
|
1441
1414
|
}
|
|
1442
|
-
async function
|
|
1443
|
-
const r = n ? `?token=${encodeURIComponent(n)}` : "", s = await
|
|
1444
|
-
`${
|
|
1445
|
-
|
|
1415
|
+
async function Gi(e, t, n = "") {
|
|
1416
|
+
const r = n ? `?token=${encodeURIComponent(n)}` : "", s = await S(
|
|
1417
|
+
`${b}/personal-agents/${e}/sessions/${t}/messages${r}`,
|
|
1418
|
+
g
|
|
1446
1419
|
);
|
|
1447
1420
|
return f(s, "获取消息历史失败");
|
|
1448
1421
|
}
|
|
1449
|
-
async function
|
|
1450
|
-
const u = r ? `?token=${encodeURIComponent(r)}` : "", h = `${
|
|
1422
|
+
async function Ji(e, t, n, r, s, o, i, c, l, d) {
|
|
1423
|
+
const u = r ? `?token=${encodeURIComponent(r)}` : "", h = `${b}/personal-agents/${e}/sessions/${t}/chat/stream${u}`;
|
|
1451
1424
|
try {
|
|
1452
1425
|
const m = await fetch(h, {
|
|
1453
|
-
...
|
|
1426
|
+
...g,
|
|
1454
1427
|
method: "POST",
|
|
1455
1428
|
headers: { Accept: "text/event-stream", "Content-Type": "application/json" },
|
|
1456
1429
|
body: JSON.stringify(l ? { message: n, llmCode: l } : { message: n }),
|
|
1457
1430
|
signal: d
|
|
1458
1431
|
});
|
|
1459
1432
|
if (!m.ok || !m.body) {
|
|
1460
|
-
const
|
|
1461
|
-
o(new Error(
|
|
1433
|
+
const y = await m.text().catch(() => "");
|
|
1434
|
+
o(new Error(y || `HTTP ${m.status}`));
|
|
1462
1435
|
return;
|
|
1463
1436
|
}
|
|
1464
1437
|
const C = m.body.getReader(), O = new TextDecoder();
|
|
1465
1438
|
let _ = "", x = "";
|
|
1466
1439
|
for (; ; ) {
|
|
1467
|
-
const { done:
|
|
1468
|
-
if (
|
|
1440
|
+
const { done: y, value: A } = await C.read();
|
|
1441
|
+
if (y) break;
|
|
1469
1442
|
_ += O.decode(A, { stream: !0 });
|
|
1470
1443
|
const k = _.split(`
|
|
1471
1444
|
`);
|
|
@@ -1502,17 +1475,17 @@ async function Zi(e, t, n, r, s, o, i, c, l, d) {
|
|
|
1502
1475
|
}
|
|
1503
1476
|
}
|
|
1504
1477
|
const sa = "http://127.0.0.1:28080";
|
|
1505
|
-
async function
|
|
1478
|
+
async function Vi(e) {
|
|
1506
1479
|
await fetch(`${sa}/v1/sessions/${e}`, {
|
|
1507
1480
|
method: "DELETE"
|
|
1508
1481
|
});
|
|
1509
1482
|
}
|
|
1510
|
-
async function
|
|
1483
|
+
async function Wi(e = {}) {
|
|
1511
1484
|
const t = new URLSearchParams(), { name: n, scenarioInstanceId: r, page: s = 1, size: o = 50, token: i = "" } = e;
|
|
1512
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);
|
|
1513
|
-
const c = t.toString(), l = await
|
|
1514
|
-
`${
|
|
1515
|
-
|
|
1486
|
+
const c = t.toString(), l = await S(
|
|
1487
|
+
`${b}/admin/tasks${c ? `?${c}` : ""}`,
|
|
1488
|
+
g
|
|
1516
1489
|
);
|
|
1517
1490
|
return f(l, "获取任务列表失败");
|
|
1518
1491
|
}
|
|
@@ -1524,42 +1497,42 @@ function aa(e) {
|
|
|
1524
1497
|
const n = t.toString();
|
|
1525
1498
|
return n ? `?${n}` : "";
|
|
1526
1499
|
}
|
|
1527
|
-
async function
|
|
1528
|
-
const t = await
|
|
1529
|
-
`${
|
|
1530
|
-
|
|
1500
|
+
async function Zi(e) {
|
|
1501
|
+
const t = await S(
|
|
1502
|
+
`${b}/admin/tool-call-logs/timeline${aa(e)}`,
|
|
1503
|
+
g
|
|
1531
1504
|
);
|
|
1532
1505
|
return f(t, "查询工具调用时间轴统计失败");
|
|
1533
1506
|
}
|
|
1534
|
-
async function
|
|
1507
|
+
async function Xi(e) {
|
|
1535
1508
|
const t = [];
|
|
1536
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)}`);
|
|
1537
|
-
const n = t.length > 0 ? `?${t.join("&")}` : "", r = await
|
|
1538
|
-
`${
|
|
1539
|
-
|
|
1510
|
+
const n = t.length > 0 ? `?${t.join("&")}` : "", r = await S(
|
|
1511
|
+
`${b}/admin/statistics/token-daily${n}`,
|
|
1512
|
+
g
|
|
1540
1513
|
);
|
|
1541
1514
|
return f(r, "获取 Token 单日统计失败");
|
|
1542
1515
|
}
|
|
1543
|
-
async function
|
|
1544
|
-
const t = await
|
|
1545
|
-
`${
|
|
1546
|
-
|
|
1516
|
+
async function Yi(e = "z-team") {
|
|
1517
|
+
const t = await S(
|
|
1518
|
+
`${b}/change-log/versions?repo=${encodeURIComponent(e)}`,
|
|
1519
|
+
g
|
|
1547
1520
|
);
|
|
1548
1521
|
return f(t, "获取变更日志版本列表失败");
|
|
1549
1522
|
}
|
|
1550
|
-
async function
|
|
1523
|
+
async function Qi(e, t, n = "z-team") {
|
|
1551
1524
|
const r = new URLSearchParams();
|
|
1552
1525
|
e != null && r.set("versionId", String(e)), r.set("repo", n);
|
|
1553
|
-
const s = await
|
|
1554
|
-
`${
|
|
1555
|
-
|
|
1526
|
+
const s = await S(
|
|
1527
|
+
`${b}/change-log/detail?${r.toString()}`,
|
|
1528
|
+
g
|
|
1556
1529
|
);
|
|
1557
1530
|
return f(s, "获取变更日志详情失败");
|
|
1558
1531
|
}
|
|
1559
|
-
async function
|
|
1560
|
-
const t = await
|
|
1532
|
+
async function ec(e) {
|
|
1533
|
+
const t = await S(
|
|
1561
1534
|
`${ps}/evolution/records/${e}/reset`,
|
|
1562
|
-
{ ...
|
|
1535
|
+
{ ...g, method: "POST" }
|
|
1563
1536
|
);
|
|
1564
1537
|
return f(t, "操作失败");
|
|
1565
1538
|
}
|
|
@@ -1571,49 +1544,49 @@ function ae(e) {
|
|
|
1571
1544
|
const n = t.toString();
|
|
1572
1545
|
return n ? `?${n}` : "";
|
|
1573
1546
|
}
|
|
1574
|
-
async function
|
|
1575
|
-
const t = await
|
|
1576
|
-
`${
|
|
1547
|
+
async function tc(e) {
|
|
1548
|
+
const t = await S(
|
|
1549
|
+
`${b}/admin/qa-eval/closed-instances${ae({
|
|
1577
1550
|
close_date: e.closeDate,
|
|
1578
1551
|
close_date_start: e.closeDateStart,
|
|
1579
1552
|
close_date_end: e.closeDateEnd,
|
|
1580
1553
|
scenario_code: e.scenarioCode,
|
|
1581
1554
|
token: e.token
|
|
1582
1555
|
})}`,
|
|
1583
|
-
|
|
1556
|
+
g
|
|
1584
1557
|
), n = await f(
|
|
1585
1558
|
t,
|
|
1586
1559
|
"获取已关单实例列表失败"
|
|
1587
1560
|
);
|
|
1588
1561
|
return Array.isArray(n == null ? void 0 : n.list) ? n.list : [];
|
|
1589
1562
|
}
|
|
1590
|
-
async function
|
|
1591
|
-
const t = await
|
|
1592
|
-
`${
|
|
1563
|
+
async function nc(e) {
|
|
1564
|
+
const t = await S(
|
|
1565
|
+
`${b}/admin/qa-eval/overview${ae({
|
|
1593
1566
|
close_date: e.closeDate,
|
|
1594
1567
|
close_date_start: e.closeDateStart,
|
|
1595
1568
|
close_date_end: e.closeDateEnd,
|
|
1596
1569
|
scenario_code: e.scenarioCode,
|
|
1597
1570
|
token: e.token
|
|
1598
1571
|
})}`,
|
|
1599
|
-
|
|
1572
|
+
g
|
|
1600
1573
|
);
|
|
1601
1574
|
return f(t, "获取 QA 评测总览失败");
|
|
1602
1575
|
}
|
|
1603
|
-
async function
|
|
1604
|
-
const n = await
|
|
1605
|
-
`${
|
|
1576
|
+
async function rc(e, t = "") {
|
|
1577
|
+
const n = await S(
|
|
1578
|
+
`${b}/admin/qa-eval/report/${e}/cancel${ae({
|
|
1606
1579
|
token: t
|
|
1607
1580
|
})}`,
|
|
1608
|
-
{ ...
|
|
1581
|
+
{ ...g, method: "POST" }
|
|
1609
1582
|
);
|
|
1610
1583
|
return f(n, "取消评测失败");
|
|
1611
1584
|
}
|
|
1612
|
-
async function
|
|
1613
|
-
const r = n ? `?token=${encodeURIComponent(n)}` : "", s = await
|
|
1614
|
-
`${
|
|
1585
|
+
async function sc(e, t, n = "") {
|
|
1586
|
+
const r = n ? `?token=${encodeURIComponent(n)}` : "", s = await S(
|
|
1587
|
+
`${b}/admin/scenario-templates/preview${r}`,
|
|
1615
1588
|
{
|
|
1616
|
-
...
|
|
1589
|
+
...g,
|
|
1617
1590
|
method: "POST",
|
|
1618
1591
|
headers: { "Content-Type": "application/json" },
|
|
1619
1592
|
body: JSON.stringify({ html: e, data: t })
|
|
@@ -1622,18 +1595,18 @@ async function ic(e, t, n = "") {
|
|
|
1622
1595
|
if (!s.ok) throw new Error(`HTTP ${s.status}`);
|
|
1623
1596
|
return s.text();
|
|
1624
1597
|
}
|
|
1625
|
-
async function
|
|
1626
|
-
const n = t ? `?token=${encodeURIComponent(t)}` : "", r = await
|
|
1627
|
-
`${
|
|
1628
|
-
{ ...
|
|
1598
|
+
async function ac(e, t = "") {
|
|
1599
|
+
const n = t ? `?token=${encodeURIComponent(t)}` : "", r = await S(
|
|
1600
|
+
`${b}/tasks/${e}/human-assist${n}`,
|
|
1601
|
+
{ ...g, method: "GET" }
|
|
1629
1602
|
);
|
|
1630
1603
|
return f(r, "查询人机协助卡片失败");
|
|
1631
1604
|
}
|
|
1632
|
-
async function
|
|
1633
|
-
const s = r ? `?token=${encodeURIComponent(r)}` : "", o = await
|
|
1634
|
-
`${
|
|
1605
|
+
async function oc(e, t, n, r = "") {
|
|
1606
|
+
const s = r ? `?token=${encodeURIComponent(r)}` : "", o = await S(
|
|
1607
|
+
`${b}/scenario-instances/${e}/card-forms/${t}/submit${s}`,
|
|
1635
1608
|
{
|
|
1636
|
-
...
|
|
1609
|
+
...g,
|
|
1637
1610
|
method: "POST",
|
|
1638
1611
|
headers: { "Content-Type": "application/json" },
|
|
1639
1612
|
body: JSON.stringify({ value: n })
|
|
@@ -1641,11 +1614,11 @@ async function lc(e, t, n, r = "") {
|
|
|
1641
1614
|
);
|
|
1642
1615
|
return f(o, "提交卡片表单失败");
|
|
1643
1616
|
}
|
|
1644
|
-
async function
|
|
1645
|
-
const r = n ? `?token=${encodeURIComponent(n)}` : "", s = await
|
|
1646
|
-
`${
|
|
1617
|
+
async function ic(e, t, n = "") {
|
|
1618
|
+
const r = n ? `?token=${encodeURIComponent(n)}` : "", s = await S(
|
|
1619
|
+
`${b}/tasks/${e}/submit-assist${r}`,
|
|
1647
1620
|
{
|
|
1648
|
-
...
|
|
1621
|
+
...g,
|
|
1649
1622
|
method: "POST",
|
|
1650
1623
|
headers: { "Content-Type": "application/json" },
|
|
1651
1624
|
body: JSON.stringify({ value: t })
|
|
@@ -1653,22 +1626,22 @@ async function dc(e, t, n = "") {
|
|
|
1653
1626
|
);
|
|
1654
1627
|
return f(s, "提交人机协助任务失败");
|
|
1655
1628
|
}
|
|
1656
|
-
function
|
|
1629
|
+
function cc(e) {
|
|
1657
1630
|
return webIdeFetch(`/instances/${e}`, { method: "DELETE" });
|
|
1658
1631
|
}
|
|
1659
|
-
async function
|
|
1660
|
-
const t = await
|
|
1661
|
-
`${
|
|
1662
|
-
|
|
1632
|
+
async function lc(e = "") {
|
|
1633
|
+
const t = await S(
|
|
1634
|
+
`${b}/admin/runtime-monitor/schedule${ae({ token: e })}`,
|
|
1635
|
+
g
|
|
1663
1636
|
);
|
|
1664
1637
|
return f(t, "查询定时任务概览失败");
|
|
1665
1638
|
}
|
|
1666
|
-
async function
|
|
1639
|
+
async function dc(e) {
|
|
1667
1640
|
const t = new URLSearchParams();
|
|
1668
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);
|
|
1669
|
-
const n = await
|
|
1670
|
-
`${
|
|
1671
|
-
|
|
1642
|
+
const n = await S(
|
|
1643
|
+
`${b}/admin/statistics/business?${t.toString()}`,
|
|
1644
|
+
g
|
|
1672
1645
|
), r = await f(n, "业务指标查询失败");
|
|
1673
1646
|
return {
|
|
1674
1647
|
total: Number((r == null ? void 0 : r.total) ?? 0),
|
|
@@ -1680,21 +1653,21 @@ async function mc(e) {
|
|
|
1680
1653
|
activeCreators: (r == null ? void 0 : r.activeCreators) ?? void 0
|
|
1681
1654
|
};
|
|
1682
1655
|
}
|
|
1683
|
-
async function
|
|
1684
|
-
const n = t ? `?token=${encodeURIComponent(t)}` : "", r = await
|
|
1685
|
-
`${
|
|
1656
|
+
async function uc(e, t = "") {
|
|
1657
|
+
const n = t ? `?token=${encodeURIComponent(t)}` : "", r = await S(
|
|
1658
|
+
`${b}/admin/scenario-tags/values/${e}${n}`,
|
|
1686
1659
|
{
|
|
1687
|
-
...
|
|
1660
|
+
...g,
|
|
1688
1661
|
method: "DELETE"
|
|
1689
1662
|
}
|
|
1690
1663
|
);
|
|
1691
1664
|
return f(r, "删除标签值失败");
|
|
1692
1665
|
}
|
|
1693
|
-
async function
|
|
1694
|
-
const r = await
|
|
1695
|
-
`${
|
|
1666
|
+
async function pc(e, t, n) {
|
|
1667
|
+
const r = await S(
|
|
1668
|
+
`${b}/scenario-instances/${e}/workspace/git-clone`,
|
|
1696
1669
|
{
|
|
1697
|
-
...
|
|
1670
|
+
...g,
|
|
1698
1671
|
method: "POST",
|
|
1699
1672
|
headers: { "Content-Type": "application/json" },
|
|
1700
1673
|
body: JSON.stringify({
|
|
@@ -1707,17 +1680,17 @@ async function fc(e, t, n) {
|
|
|
1707
1680
|
);
|
|
1708
1681
|
return f(r, "Git Clone 失败");
|
|
1709
1682
|
}
|
|
1710
|
-
async function
|
|
1711
|
-
const e = await
|
|
1712
|
-
`${
|
|
1713
|
-
|
|
1683
|
+
async function mc() {
|
|
1684
|
+
const e = await S(
|
|
1685
|
+
`${b}/scenarios/biz-consult-domains`,
|
|
1686
|
+
g
|
|
1714
1687
|
);
|
|
1715
1688
|
return f(e, "获取业务域选项失败");
|
|
1716
1689
|
}
|
|
1717
|
-
async function
|
|
1718
|
-
const t = e ? `?token=${encodeURIComponent(e)}` : "", n = await
|
|
1719
|
-
`${
|
|
1720
|
-
|
|
1690
|
+
async function hc(e = "") {
|
|
1691
|
+
const t = e ? `?token=${encodeURIComponent(e)}` : "", n = await S(
|
|
1692
|
+
`${b}/admin/statistics/current-dept${t}`,
|
|
1693
|
+
g
|
|
1721
1694
|
);
|
|
1722
1695
|
return f(n, "获取当前用户部门信息失败");
|
|
1723
1696
|
}
|
|
@@ -1729,16 +1702,16 @@ function oa(e) {
|
|
|
1729
1702
|
const n = t.toString();
|
|
1730
1703
|
return n ? `?${n}` : "";
|
|
1731
1704
|
}
|
|
1732
|
-
async function
|
|
1733
|
-
const t = await
|
|
1734
|
-
`${
|
|
1705
|
+
async function fc(e) {
|
|
1706
|
+
const t = await S(
|
|
1707
|
+
`${b}/admin/evaluation/instances/${e.id}/snapshot-preview${oa({
|
|
1735
1708
|
section: e.section,
|
|
1736
1709
|
page: e.page,
|
|
1737
1710
|
size: e.size,
|
|
1738
1711
|
task_id: e.taskId,
|
|
1739
1712
|
token: e.token
|
|
1740
1713
|
})}`,
|
|
1741
|
-
|
|
1714
|
+
g
|
|
1742
1715
|
);
|
|
1743
1716
|
return f(t, "获取快照预览失败");
|
|
1744
1717
|
}
|
|
@@ -1758,14 +1731,14 @@ async function ca(e, t) {
|
|
|
1758
1731
|
return {};
|
|
1759
1732
|
}
|
|
1760
1733
|
}
|
|
1761
|
-
function
|
|
1734
|
+
function yc(e) {
|
|
1762
1735
|
return ca(`/presets/${e}`, { method: "DELETE" });
|
|
1763
1736
|
}
|
|
1764
|
-
const
|
|
1765
|
-
async function
|
|
1737
|
+
const gc = nr;
|
|
1738
|
+
async function bc(e) {
|
|
1766
1739
|
const t = new FormData();
|
|
1767
1740
|
t.append("file", e);
|
|
1768
|
-
const n = await
|
|
1741
|
+
const n = await S(`${b}/common/upload-video`, {
|
|
1769
1742
|
method: "POST",
|
|
1770
1743
|
body: t
|
|
1771
1744
|
}), r = await f(n, "上传视频失败"), s = typeof (r == null ? void 0 : r.url) == "string" ? r.url : "";
|
|
@@ -1775,25 +1748,25 @@ async function _c(e) {
|
|
|
1775
1748
|
}
|
|
1776
1749
|
return s;
|
|
1777
1750
|
}
|
|
1778
|
-
function
|
|
1751
|
+
function Sc() {
|
|
1779
1752
|
const e = "登录已失效,请重新登录";
|
|
1780
1753
|
throw _e(e), { _apiUserError: !0, userMessage: e, message: e };
|
|
1781
1754
|
}
|
|
1782
|
-
async function
|
|
1783
|
-
const t = await
|
|
1784
|
-
`${
|
|
1785
|
-
{ ...
|
|
1755
|
+
async function wc(e) {
|
|
1756
|
+
const t = await S(
|
|
1757
|
+
`${b}/scenario-instances/${e}/interaction-mode`,
|
|
1758
|
+
{ ...g }
|
|
1786
1759
|
), n = await f(
|
|
1787
1760
|
t,
|
|
1788
1761
|
"查询交互模式失败"
|
|
1789
1762
|
);
|
|
1790
1763
|
return (n == null ? void 0 : n.mode) ?? "dispatch";
|
|
1791
1764
|
}
|
|
1792
|
-
async function
|
|
1793
|
-
const n = await
|
|
1794
|
-
`${
|
|
1765
|
+
async function _c(e, t) {
|
|
1766
|
+
const n = await S(
|
|
1767
|
+
`${b}/scenario-instances/${e}/interaction-mode`,
|
|
1795
1768
|
{
|
|
1796
|
-
...
|
|
1769
|
+
...g,
|
|
1797
1770
|
method: "PUT",
|
|
1798
1771
|
headers: { "Content-Type": "application/json" },
|
|
1799
1772
|
body: JSON.stringify({ mode: t })
|
|
@@ -1804,38 +1777,38 @@ async function Ic(e, t) {
|
|
|
1804
1777
|
);
|
|
1805
1778
|
return (r == null ? void 0 : r.mode) ?? t;
|
|
1806
1779
|
}
|
|
1807
|
-
async function
|
|
1808
|
-
const t = e ? `?token=${encodeURIComponent(e)}` : "", n = await
|
|
1809
|
-
`${
|
|
1780
|
+
async function Tc(e = "") {
|
|
1781
|
+
const t = e ? `?token=${encodeURIComponent(e)}` : "", n = await S(
|
|
1782
|
+
`${b}/admin/indexer/overview${t}`,
|
|
1810
1783
|
Ce()
|
|
1811
1784
|
);
|
|
1812
1785
|
return f(n, "获取索引概览失败");
|
|
1813
1786
|
}
|
|
1814
|
-
async function
|
|
1815
|
-
const t = e ? `?token=${encodeURIComponent(e)}` : "", n = await
|
|
1787
|
+
async function kc(e = "") {
|
|
1788
|
+
const t = e ? `?token=${encodeURIComponent(e)}` : "", n = await S(`${b}/admin/indexer/repos${t}`, Ce()), r = await f(
|
|
1816
1789
|
n,
|
|
1817
1790
|
"获取索引仓库列表失败"
|
|
1818
1791
|
);
|
|
1819
1792
|
return Array.isArray(r == null ? void 0 : r.repos) ? r.repos : [];
|
|
1820
1793
|
}
|
|
1821
|
-
async function
|
|
1822
|
-
const n = t ? `?token=${encodeURIComponent(t)}` : "", r = await
|
|
1794
|
+
async function Ic(e, t = "") {
|
|
1795
|
+
const n = t ? `?token=${encodeURIComponent(t)}` : "", r = await S(`${b}/admin/indexer/repos${n}`, Ce({
|
|
1823
1796
|
method: "POST",
|
|
1824
1797
|
headers: { "Content-Type": "application/json" },
|
|
1825
1798
|
body: JSON.stringify(e)
|
|
1826
1799
|
}));
|
|
1827
1800
|
return f(r, "保存索引仓库失败");
|
|
1828
1801
|
}
|
|
1829
|
-
async function
|
|
1830
|
-
const n = t ? `?token=${encodeURIComponent(t)}` : "", r = await
|
|
1831
|
-
`${
|
|
1802
|
+
async function Cc(e, t = "") {
|
|
1803
|
+
const n = t ? `?token=${encodeURIComponent(t)}` : "", r = await S(
|
|
1804
|
+
`${b}/admin/indexer/repos/${encodeURIComponent(e)}${n}`,
|
|
1832
1805
|
Ce({ method: "DELETE" })
|
|
1833
1806
|
);
|
|
1834
1807
|
return f(r, "删除索引仓库失败");
|
|
1835
1808
|
}
|
|
1836
|
-
async function
|
|
1837
|
-
const r = n ? `?token=${encodeURIComponent(n)}` : "", s = await
|
|
1838
|
-
`${
|
|
1809
|
+
async function Ac(e, t, n = "") {
|
|
1810
|
+
const r = n ? `?token=${encodeURIComponent(n)}` : "", s = await S(
|
|
1811
|
+
`${b}/admin/indexer/repos/${encodeURIComponent(
|
|
1839
1812
|
e
|
|
1840
1813
|
)}/enabled${r}`,
|
|
1841
1814
|
Ce({
|
|
@@ -1846,57 +1819,57 @@ async function vc(e, t, n = "") {
|
|
|
1846
1819
|
);
|
|
1847
1820
|
return f(s, "切换仓库启停失败");
|
|
1848
1821
|
}
|
|
1849
|
-
async function
|
|
1850
|
-
const n = t ? `?token=${encodeURIComponent(t)}` : "", r = await
|
|
1851
|
-
`${
|
|
1822
|
+
async function $c(e, t = "") {
|
|
1823
|
+
const n = t ? `?token=${encodeURIComponent(t)}` : "", r = await S(
|
|
1824
|
+
`${b}/admin/indexer/repos/${encodeURIComponent(
|
|
1852
1825
|
e
|
|
1853
1826
|
)}/rebuild${n}`,
|
|
1854
1827
|
Ce({ method: "POST" })
|
|
1855
1828
|
);
|
|
1856
1829
|
return f(r, "触发重建失败");
|
|
1857
1830
|
}
|
|
1858
|
-
async function
|
|
1859
|
-
const t = e ? `?token=${encodeURIComponent(e)}` : "", n = await
|
|
1831
|
+
async function xc(e = "") {
|
|
1832
|
+
const t = e ? `?token=${encodeURIComponent(e)}` : "", n = await S(`${b}/admin/indexer/poll${t}`, Ce({
|
|
1860
1833
|
method: "POST"
|
|
1861
1834
|
}));
|
|
1862
1835
|
return f(n, "触发轮询失败");
|
|
1863
1836
|
}
|
|
1864
|
-
async function
|
|
1865
|
-
const t = e ? `?token=${encodeURIComponent(e)}` : "", n = await
|
|
1866
|
-
`${
|
|
1867
|
-
|
|
1837
|
+
async function vc(e = "") {
|
|
1838
|
+
const t = e ? `?token=${encodeURIComponent(e)}` : "", n = await S(
|
|
1839
|
+
`${b}/admin/notify-channel/list${t}`,
|
|
1840
|
+
g
|
|
1868
1841
|
), r = await f(
|
|
1869
1842
|
n,
|
|
1870
1843
|
"获取消息渠道状态失败"
|
|
1871
1844
|
);
|
|
1872
1845
|
return Array.isArray(r == null ? void 0 : r.channels) ? r.channels : [];
|
|
1873
1846
|
}
|
|
1874
|
-
async function
|
|
1875
|
-
const n = t ? `?token=${encodeURIComponent(t)}` : "", r = await
|
|
1876
|
-
...
|
|
1847
|
+
async function Pc(e, t = "") {
|
|
1848
|
+
const n = t ? `?token=${encodeURIComponent(t)}` : "", r = await S(`${b}/admin/notify-channel/test${n}`, {
|
|
1849
|
+
...g,
|
|
1877
1850
|
method: "POST",
|
|
1878
1851
|
headers: { "Content-Type": "application/json" },
|
|
1879
1852
|
body: JSON.stringify(e)
|
|
1880
1853
|
});
|
|
1881
1854
|
return f(r, "测试发送失败");
|
|
1882
1855
|
}
|
|
1883
|
-
async function
|
|
1884
|
-
const n = await
|
|
1885
|
-
`${
|
|
1856
|
+
async function Ec(e, t = "") {
|
|
1857
|
+
const n = await S(
|
|
1858
|
+
`${b}/admin/schedule-task${ae({
|
|
1886
1859
|
token: t,
|
|
1887
1860
|
task_type: e.taskType,
|
|
1888
1861
|
page: e.page,
|
|
1889
1862
|
size: e.size
|
|
1890
1863
|
})}`,
|
|
1891
|
-
|
|
1864
|
+
g
|
|
1892
1865
|
);
|
|
1893
1866
|
return f(n, "查询定时任务模版失败");
|
|
1894
1867
|
}
|
|
1895
|
-
async function
|
|
1896
|
-
const n = await
|
|
1897
|
-
`${
|
|
1868
|
+
async function Rc(e, t = "") {
|
|
1869
|
+
const n = await S(
|
|
1870
|
+
`${b}/admin/schedule-task${ae({ token: t })}`,
|
|
1898
1871
|
{
|
|
1899
|
-
...
|
|
1872
|
+
...g,
|
|
1900
1873
|
method: "POST",
|
|
1901
1874
|
headers: { "Content-Type": "application/json" },
|
|
1902
1875
|
body: JSON.stringify(e)
|
|
@@ -1904,13 +1877,13 @@ async function jc(e, t = "") {
|
|
|
1904
1877
|
);
|
|
1905
1878
|
return f(n, "新建定时任务模版失败");
|
|
1906
1879
|
}
|
|
1907
|
-
async function
|
|
1908
|
-
const r = await
|
|
1909
|
-
`${
|
|
1880
|
+
async function Oc(e, t, n = "") {
|
|
1881
|
+
const r = await S(
|
|
1882
|
+
`${b}/admin/schedule-task/${encodeURIComponent(
|
|
1910
1883
|
e
|
|
1911
1884
|
)}${ae({ token: n })}`,
|
|
1912
1885
|
{
|
|
1913
|
-
...
|
|
1886
|
+
...g,
|
|
1914
1887
|
method: "PUT",
|
|
1915
1888
|
headers: { "Content-Type": "application/json" },
|
|
1916
1889
|
body: JSON.stringify(t)
|
|
@@ -1918,13 +1891,13 @@ async function Nc(e, t, n = "") {
|
|
|
1918
1891
|
);
|
|
1919
1892
|
return f(r, "更新定时任务模版失败");
|
|
1920
1893
|
}
|
|
1921
|
-
async function
|
|
1922
|
-
const r = await
|
|
1923
|
-
`${
|
|
1894
|
+
async function Mc(e, t, n = "") {
|
|
1895
|
+
const r = await S(
|
|
1896
|
+
`${b}/admin/schedule-task/${encodeURIComponent(
|
|
1924
1897
|
e
|
|
1925
1898
|
)}/toggle${ae({ token: n })}`,
|
|
1926
1899
|
{
|
|
1927
|
-
...
|
|
1900
|
+
...g,
|
|
1928
1901
|
method: "POST",
|
|
1929
1902
|
headers: { "Content-Type": "application/json" },
|
|
1930
1903
|
body: JSON.stringify({ enabled: t })
|
|
@@ -1932,50 +1905,50 @@ async function Uc(e, t, n = "") {
|
|
|
1932
1905
|
);
|
|
1933
1906
|
return f(r, "切换模版状态失败");
|
|
1934
1907
|
}
|
|
1935
|
-
async function
|
|
1936
|
-
const n = await
|
|
1937
|
-
`${
|
|
1908
|
+
async function jc(e, t = "") {
|
|
1909
|
+
const n = await S(
|
|
1910
|
+
`${b}/admin/schedule-task/${encodeURIComponent(
|
|
1938
1911
|
e
|
|
1939
1912
|
)}/activate${ae({ token: t })}`,
|
|
1940
|
-
{ ...
|
|
1913
|
+
{ ...g, method: "POST" }
|
|
1941
1914
|
);
|
|
1942
1915
|
return f(n, "激活模版失败");
|
|
1943
1916
|
}
|
|
1944
|
-
async function
|
|
1945
|
-
const n = await
|
|
1946
|
-
`${
|
|
1917
|
+
async function Nc(e, t = "") {
|
|
1918
|
+
const n = await S(
|
|
1919
|
+
`${b}/admin/schedule-task/${encodeURIComponent(
|
|
1947
1920
|
e
|
|
1948
1921
|
)}${ae({ token: t })}`,
|
|
1949
|
-
{ ...
|
|
1922
|
+
{ ...g, method: "DELETE" }
|
|
1950
1923
|
);
|
|
1951
1924
|
return f(n, "删除模版失败");
|
|
1952
1925
|
}
|
|
1953
|
-
async function
|
|
1954
|
-
const n = await
|
|
1955
|
-
`${
|
|
1926
|
+
async function Uc(e, t = "") {
|
|
1927
|
+
const n = await S(
|
|
1928
|
+
`${b}/admin/schedule-task/${encodeURIComponent(
|
|
1956
1929
|
e
|
|
1957
1930
|
)}/run${ae({ token: t })}`,
|
|
1958
|
-
{ ...
|
|
1931
|
+
{ ...g, method: "POST" }
|
|
1959
1932
|
);
|
|
1960
1933
|
return f(n, "手动执行失败");
|
|
1961
1934
|
}
|
|
1962
|
-
async function
|
|
1963
|
-
const n = await
|
|
1964
|
-
`${
|
|
1935
|
+
async function zc(e, t = "") {
|
|
1936
|
+
const n = await S(
|
|
1937
|
+
`${b}/admin/schedule-task/history-all${ae({
|
|
1965
1938
|
token: t,
|
|
1966
1939
|
task_type: e.taskType,
|
|
1967
1940
|
page: e.page,
|
|
1968
1941
|
size: e.size
|
|
1969
1942
|
})}`,
|
|
1970
|
-
|
|
1943
|
+
g
|
|
1971
1944
|
);
|
|
1972
1945
|
return f(n, "查询运行记录失败");
|
|
1973
1946
|
}
|
|
1974
|
-
async function
|
|
1975
|
-
const o = s ? `?token=${encodeURIComponent(s)}` : "", i = await
|
|
1976
|
-
`${
|
|
1947
|
+
async function Lc(e, t, n, r, s = "") {
|
|
1948
|
+
const o = s ? `?token=${encodeURIComponent(s)}` : "", i = await S(
|
|
1949
|
+
`${b}/admin/permissions/users/${e}/roles${o}`,
|
|
1977
1950
|
{
|
|
1978
|
-
...
|
|
1951
|
+
...g,
|
|
1979
1952
|
method: "PUT",
|
|
1980
1953
|
headers: { "Content-Type": "application/json" },
|
|
1981
1954
|
body: JSON.stringify({ staffName: t, accountNo: n, roleIds: r })
|
|
@@ -1983,52 +1956,52 @@ async function qc(e, t, n, r, s = "") {
|
|
|
1983
1956
|
);
|
|
1984
1957
|
return f(i, "更新用户角色失败");
|
|
1985
1958
|
}
|
|
1986
|
-
async function
|
|
1987
|
-
const n = t ? `?token=${encodeURIComponent(t)}` : "", r = await
|
|
1988
|
-
`${
|
|
1989
|
-
|
|
1959
|
+
async function Dc(e, t = "") {
|
|
1960
|
+
const n = t ? `?token=${encodeURIComponent(t)}` : "", r = await S(
|
|
1961
|
+
`${b}/admin/permissions/users/${e}/detail${n}`,
|
|
1962
|
+
g
|
|
1990
1963
|
);
|
|
1991
1964
|
return f(r, "获取用户授权详情失败");
|
|
1992
1965
|
}
|
|
1993
|
-
async function
|
|
1994
|
-
const t = e ? `?token=${encodeURIComponent(e)}` : "", n = await
|
|
1966
|
+
async function Fc(e = "") {
|
|
1967
|
+
const t = e ? `?token=${encodeURIComponent(e)}` : "", n = await S(`${b}/admin/roles${t}`, g);
|
|
1995
1968
|
return f(n, "获取角色列表失败") ?? [];
|
|
1996
1969
|
}
|
|
1997
|
-
async function
|
|
1998
|
-
const n = t ? `?token=${encodeURIComponent(t)}` : "", r = await
|
|
1999
|
-
`${
|
|
2000
|
-
|
|
1970
|
+
async function qc(e, t = "") {
|
|
1971
|
+
const n = t ? `?token=${encodeURIComponent(t)}` : "", r = await S(
|
|
1972
|
+
`${b}/admin/roles/${e}${n}`,
|
|
1973
|
+
g
|
|
2001
1974
|
);
|
|
2002
1975
|
return f(r, "获取角色详情失败");
|
|
2003
1976
|
}
|
|
2004
|
-
async function
|
|
2005
|
-
const n = t ? `?token=${encodeURIComponent(t)}` : "", r = await
|
|
2006
|
-
...
|
|
1977
|
+
async function Bc(e, t = "") {
|
|
1978
|
+
const n = t ? `?token=${encodeURIComponent(t)}` : "", r = await S(`${b}/admin/roles${n}`, {
|
|
1979
|
+
...g,
|
|
2007
1980
|
method: "POST",
|
|
2008
1981
|
headers: { "Content-Type": "application/json" },
|
|
2009
1982
|
body: JSON.stringify(e)
|
|
2010
1983
|
});
|
|
2011
1984
|
return f(r, "创建角色失败");
|
|
2012
1985
|
}
|
|
2013
|
-
async function
|
|
2014
|
-
const r = n ? `?token=${encodeURIComponent(n)}` : "", s = await
|
|
2015
|
-
...
|
|
1986
|
+
async function Hc(e, t, n = "") {
|
|
1987
|
+
const r = n ? `?token=${encodeURIComponent(n)}` : "", s = await S(`${b}/admin/roles/${e}${r}`, {
|
|
1988
|
+
...g,
|
|
2016
1989
|
method: "PUT",
|
|
2017
1990
|
headers: { "Content-Type": "application/json" },
|
|
2018
1991
|
body: JSON.stringify(t)
|
|
2019
1992
|
});
|
|
2020
1993
|
return f(s, "更新角色失败");
|
|
2021
1994
|
}
|
|
2022
|
-
async function
|
|
2023
|
-
const n = t ? `?token=${encodeURIComponent(t)}` : "", r = await
|
|
2024
|
-
...
|
|
1995
|
+
async function Kc(e, t = "") {
|
|
1996
|
+
const n = t ? `?token=${encodeURIComponent(t)}` : "", r = await S(`${b}/admin/roles/${e}${n}`, {
|
|
1997
|
+
...g,
|
|
2025
1998
|
method: "DELETE"
|
|
2026
1999
|
});
|
|
2027
2000
|
return f(r, "删除角色失败");
|
|
2028
2001
|
}
|
|
2029
|
-
async function
|
|
2030
|
-
const r = n ? `?token=${encodeURIComponent(n)}` : "", s = await
|
|
2031
|
-
...
|
|
2002
|
+
async function Gc(e, t, n = "") {
|
|
2003
|
+
const r = n ? `?token=${encodeURIComponent(n)}` : "", s = await S(`${b}/admin/roles/${e}/users${r}`, {
|
|
2004
|
+
...g,
|
|
2032
2005
|
method: "PUT",
|
|
2033
2006
|
headers: { "Content-Type": "application/json" },
|
|
2034
2007
|
body: JSON.stringify({ users: t })
|
|
@@ -2049,7 +2022,7 @@ function rn(e, t) {
|
|
|
2049
2022
|
const s = String(t.display_name ?? "").trim();
|
|
2050
2023
|
return s.length > 0 && n === s;
|
|
2051
2024
|
}
|
|
2052
|
-
function
|
|
2025
|
+
function $t(e, t) {
|
|
2053
2026
|
const n = e.find(
|
|
2054
2027
|
(s) => s.member_type === "HUMAN" && rn(s, t)
|
|
2055
2028
|
);
|
|
@@ -2065,7 +2038,7 @@ function xt(e, t) {
|
|
|
2065
2038
|
function ar(e) {
|
|
2066
2039
|
return !!(e != null && e.is_global_admin);
|
|
2067
2040
|
}
|
|
2068
|
-
function
|
|
2041
|
+
function Jc(e) {
|
|
2069
2042
|
return ar(e);
|
|
2070
2043
|
}
|
|
2071
2044
|
function la(e) {
|
|
@@ -2078,7 +2051,7 @@ function or(e, t) {
|
|
|
2078
2051
|
function wn(e, t, n) {
|
|
2079
2052
|
return or(e, t) || (n ?? (e == null ? void 0 : e.mode) ?? "build").trim().toLowerCase() === "plan" ? "plan" : "build";
|
|
2080
2053
|
}
|
|
2081
|
-
function
|
|
2054
|
+
function _t(e, t) {
|
|
2082
2055
|
if (e == null || t == null) return !1;
|
|
2083
2056
|
const n = Number(e), r = Number(t);
|
|
2084
2057
|
return !Number.isNaN(n) && !Number.isNaN(r) && n > 0 && n === r;
|
|
@@ -2096,7 +2069,7 @@ function cr(e, t) {
|
|
|
2096
2069
|
if (n == null)
|
|
2097
2070
|
return;
|
|
2098
2071
|
const r = t.find(
|
|
2099
|
-
(s) => s.member_type === "HUMAN" &&
|
|
2072
|
+
(s) => s.member_type === "HUMAN" && _t(s.id, n)
|
|
2100
2073
|
);
|
|
2101
2074
|
return r || t.find(
|
|
2102
2075
|
(s) => s.member_type === "HUMAN" && String(s.ref_id) === String(n)
|
|
@@ -2106,13 +2079,13 @@ function ua(e, t, n, r) {
|
|
|
2106
2079
|
if (!ir(e))
|
|
2107
2080
|
return !1;
|
|
2108
2081
|
const s = cr(e, r);
|
|
2109
|
-
return !s || t &&
|
|
2082
|
+
return !s || t && _t(s.id, t.id) ? !1 : !rn(s, n);
|
|
2110
2083
|
}
|
|
2111
2084
|
function lr(e, t, n, r) {
|
|
2112
2085
|
var i;
|
|
2113
2086
|
if (!ir(e))
|
|
2114
2087
|
return !1;
|
|
2115
|
-
if (e.is_own === !0 || t && e.sender_id != null &&
|
|
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))
|
|
2116
2089
|
return !0;
|
|
2117
2090
|
const s = cr(e, r);
|
|
2118
2091
|
if (s)
|
|
@@ -2127,10 +2100,10 @@ function lr(e, t, n, r) {
|
|
|
2127
2100
|
}
|
|
2128
2101
|
return !1;
|
|
2129
2102
|
}
|
|
2130
|
-
function
|
|
2103
|
+
function Vc(e) {
|
|
2131
2104
|
return Number(e.sender_id) === 0 ? !0 : (e.content || "").trim().startsWith("【任务 #");
|
|
2132
2105
|
}
|
|
2133
|
-
function
|
|
2106
|
+
function Wc(e) {
|
|
2134
2107
|
if (!e) return "";
|
|
2135
2108
|
try {
|
|
2136
2109
|
const t = e.trim(), n = /[zZ]$|[+-]\d{2}:?\d{2}$/.test(t) ? new Date(t) : /* @__PURE__ */ new Date(`${t.replace(" ", "T")}+08:00`);
|
|
@@ -2142,7 +2115,7 @@ function Yc(e) {
|
|
|
2142
2115
|
return "";
|
|
2143
2116
|
}
|
|
2144
2117
|
}
|
|
2145
|
-
function
|
|
2118
|
+
function Zc(e, t) {
|
|
2146
2119
|
if (e.sender_type !== "AGENT")
|
|
2147
2120
|
return !1;
|
|
2148
2121
|
const n = e.task_id ?? null;
|
|
@@ -2153,7 +2126,7 @@ function Qc(e, t) {
|
|
|
2153
2126
|
}
|
|
2154
2127
|
return !1;
|
|
2155
2128
|
}
|
|
2156
|
-
function
|
|
2129
|
+
function Xc(e, t) {
|
|
2157
2130
|
const n = e.content === "处理中..." || e.content === "🔄 正在处理中...", r = e.content.includes("[[REASONING:");
|
|
2158
2131
|
if (!n && !r)
|
|
2159
2132
|
return !1;
|
|
@@ -2173,10 +2146,10 @@ function el(e, t) {
|
|
|
2173
2146
|
}
|
|
2174
2147
|
return !1;
|
|
2175
2148
|
}
|
|
2176
|
-
function
|
|
2149
|
+
function Yc(e) {
|
|
2177
2150
|
return typeof e.content == "string" && (e.content.includes("【卡片表单已确认】") || e.content.includes("【卡片表单已提交】"));
|
|
2178
2151
|
}
|
|
2179
|
-
function
|
|
2152
|
+
function Qe(e) {
|
|
2180
2153
|
return e.sender_type !== "AGENT" ? !1 : e.message_type === "TURN_SUMMARY" ? !0 : e.content.includes("**本轮小结**") || e.content.includes("[[TURN_SUMMARY_REF");
|
|
2181
2154
|
}
|
|
2182
2155
|
const dr = /\[\[TURN_SUMMARY_REF trigger_message_id=(\d+) agent_reply_id=(\d+)(?: preview="([^"]*)")?\]\]/;
|
|
@@ -2194,21 +2167,21 @@ function ur(e) {
|
|
|
2194
2167
|
function pa(e) {
|
|
2195
2168
|
return e.replace(dr, "").trimEnd();
|
|
2196
2169
|
}
|
|
2197
|
-
function
|
|
2170
|
+
function Qc(e) {
|
|
2198
2171
|
let t = pa(e);
|
|
2199
2172
|
return t = t.replace(/^\*\*本轮小结\*\*\s*/i, ""), t = t.replace(/^>\s*针对用户消息[^\n]*\n+/m, ""), t = t.replace(/^_生成中…_\s*/m, ""), t.trim();
|
|
2200
2173
|
}
|
|
2201
|
-
function
|
|
2174
|
+
function el(e) {
|
|
2202
2175
|
const t = /* @__PURE__ */ new Map();
|
|
2203
2176
|
for (const n of e) {
|
|
2204
|
-
if (!
|
|
2177
|
+
if (!Qe(n))
|
|
2205
2178
|
continue;
|
|
2206
2179
|
const r = ur(n.content);
|
|
2207
2180
|
(r == null ? void 0 : r.agentReplyId) != null && t.set(r.agentReplyId, n);
|
|
2208
2181
|
}
|
|
2209
2182
|
return t;
|
|
2210
2183
|
}
|
|
2211
|
-
function
|
|
2184
|
+
function tl(e, t) {
|
|
2212
2185
|
const n = ur(e.content);
|
|
2213
2186
|
if (n != null && n.preview)
|
|
2214
2187
|
return n.preview;
|
|
@@ -2222,15 +2195,15 @@ function sl(e, t) {
|
|
|
2222
2195
|
return "";
|
|
2223
2196
|
}
|
|
2224
2197
|
function ma(e) {
|
|
2225
|
-
return e.sender_type !== "AGENT" ||
|
|
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:");
|
|
2226
2199
|
}
|
|
2227
|
-
function
|
|
2200
|
+
function xt(e, t, n, r, s, o) {
|
|
2228
2201
|
if (we(o))
|
|
2229
2202
|
return o;
|
|
2230
2203
|
const i = t ? s : r, c = t ?? null;
|
|
2231
2204
|
for (let l = i.length - 1; l >= 0; l--) {
|
|
2232
2205
|
const d = i[l];
|
|
2233
|
-
if (d.sender_type !== "AGENT" ||
|
|
2206
|
+
if (d.sender_type !== "AGENT" || Qe(d))
|
|
2234
2207
|
continue;
|
|
2235
2208
|
if (c != null) {
|
|
2236
2209
|
if (d.task_id != null && d.task_id !== c)
|
|
@@ -2244,15 +2217,15 @@ function vt(e, t, n, r, s, o) {
|
|
|
2244
2217
|
}
|
|
2245
2218
|
}
|
|
2246
2219
|
function ha(e, t) {
|
|
2247
|
-
if (e.sender_type !== "AGENT" ||
|
|
2220
|
+
if (e.sender_type !== "AGENT" || Qe(e) || e.content === "已取消")
|
|
2248
2221
|
return null;
|
|
2249
2222
|
for (const [n, r] of Object.entries(t))
|
|
2250
2223
|
if (!r.completed && r.loadingMessageId === e.id)
|
|
2251
2224
|
return Number(n);
|
|
2252
2225
|
return null;
|
|
2253
2226
|
}
|
|
2254
|
-
function
|
|
2255
|
-
return e.sender_type !== "AGENT" ||
|
|
2227
|
+
function nl(e, t) {
|
|
2228
|
+
return e.sender_type !== "AGENT" || Qe(e) ? null : ha(e, t);
|
|
2256
2229
|
}
|
|
2257
2230
|
const _n = [
|
|
2258
2231
|
"#2F70F1",
|
|
@@ -2264,15 +2237,15 @@ const _n = [
|
|
|
2264
2237
|
"#f5222d",
|
|
2265
2238
|
"#faad14"
|
|
2266
2239
|
];
|
|
2267
|
-
function
|
|
2240
|
+
function rl(e) {
|
|
2268
2241
|
let t = 0;
|
|
2269
2242
|
for (let n = 0; n < e.length; n++) t = t * 31 + e.charCodeAt(n) | 0;
|
|
2270
2243
|
return _n[Math.abs(t) % _n.length];
|
|
2271
2244
|
}
|
|
2272
|
-
function
|
|
2245
|
+
function sl(e) {
|
|
2273
2246
|
return e ? e.charAt(0).toUpperCase() : "?";
|
|
2274
2247
|
}
|
|
2275
|
-
function
|
|
2248
|
+
function al(e, t, n, r, s) {
|
|
2276
2249
|
return lr(t, n, r, s);
|
|
2277
2250
|
}
|
|
2278
2251
|
function oe(e, t = "success", n) {
|
|
@@ -2290,11 +2263,11 @@ function oe(e, t = "success", n) {
|
|
|
2290
2263
|
v.success(e, n);
|
|
2291
2264
|
}
|
|
2292
2265
|
}
|
|
2293
|
-
function
|
|
2266
|
+
function ol() {
|
|
2294
2267
|
return null;
|
|
2295
2268
|
}
|
|
2296
2269
|
const Tn = 20, kn = 200;
|
|
2297
|
-
function
|
|
2270
|
+
function ot(e) {
|
|
2298
2271
|
const t = e == null ? void 0 : e.trim();
|
|
2299
2272
|
if (!t) return 0;
|
|
2300
2273
|
try {
|
|
@@ -2304,7 +2277,7 @@ function it(e) {
|
|
|
2304
2277
|
return 0;
|
|
2305
2278
|
}
|
|
2306
2279
|
}
|
|
2307
|
-
function
|
|
2280
|
+
function il(e) {
|
|
2308
2281
|
const t = e == null ? void 0 : e.trim();
|
|
2309
2282
|
if (!t)
|
|
2310
2283
|
return "";
|
|
@@ -2325,18 +2298,18 @@ function dl(e) {
|
|
|
2325
2298
|
return t;
|
|
2326
2299
|
}
|
|
2327
2300
|
}
|
|
2328
|
-
function
|
|
2301
|
+
function Kt(e, t) {
|
|
2329
2302
|
return `${t ?? ""}\0${e ?? ""}`;
|
|
2330
2303
|
}
|
|
2331
|
-
function
|
|
2304
|
+
function cl(e) {
|
|
2332
2305
|
const t = /* @__PURE__ */ new Map();
|
|
2333
2306
|
for (const r of Object.values(e)) {
|
|
2334
|
-
const s =
|
|
2307
|
+
const s = Kt(r.agentName, r.task_id), o = t.get(s) ?? [];
|
|
2335
2308
|
o.push(r), t.set(s, o);
|
|
2336
2309
|
}
|
|
2337
2310
|
const n = [];
|
|
2338
2311
|
for (const r of t.values()) {
|
|
2339
|
-
r.sort((l, d) =>
|
|
2312
|
+
r.sort((l, d) => Tt(l.executionId, d.executionId));
|
|
2340
2313
|
const s = r[0], o = r.length - 1, i = Math.max(s.pendingCount ?? 0, o), c = [...r].reverse().find((l) => {
|
|
2341
2314
|
const d = l.stepName || "";
|
|
2342
2315
|
return d !== "排队中" && d !== "已启动";
|
|
@@ -2363,11 +2336,11 @@ function In(e, t) {
|
|
|
2363
2336
|
);
|
|
2364
2337
|
if (!n)
|
|
2365
2338
|
return [t];
|
|
2366
|
-
const r =
|
|
2367
|
-
return Object.values(e).filter((s) =>
|
|
2339
|
+
const r = Kt(n.agentName, n.task_id);
|
|
2340
|
+
return Object.values(e).filter((s) => Kt(s.agentName, s.task_id) === r).map((s) => s.executionId);
|
|
2368
2341
|
}
|
|
2369
2342
|
const pr = "$ref";
|
|
2370
|
-
function
|
|
2343
|
+
function ze(e) {
|
|
2371
2344
|
const t = q(e);
|
|
2372
2345
|
return we(t) ? t : void 0;
|
|
2373
2346
|
}
|
|
@@ -2381,16 +2354,16 @@ function je(e) {
|
|
|
2381
2354
|
if (!(!e || typeof e != "object" || Array.isArray(e)) && !mr(e))
|
|
2382
2355
|
return e;
|
|
2383
2356
|
}
|
|
2384
|
-
function
|
|
2357
|
+
function Ge(e) {
|
|
2385
2358
|
return !e || mr(e) ? !1 : Object.entries(e).some(([t, n]) => t === pr ? !1 : Array.isArray(n) ? n.length > 0 : typeof n == "string" ? n.trim() !== "" : typeof n == "number" || typeof n == "boolean");
|
|
2386
2359
|
}
|
|
2387
2360
|
function fa(e) {
|
|
2388
2361
|
var s;
|
|
2389
2362
|
const t = je(e.submittedValue);
|
|
2390
|
-
if (
|
|
2363
|
+
if (Ge(t))
|
|
2391
2364
|
return t;
|
|
2392
2365
|
const n = je((s = e.cardForm) == null ? void 0 : s.value);
|
|
2393
|
-
if (
|
|
2366
|
+
if (Ge(n))
|
|
2394
2367
|
return n;
|
|
2395
2368
|
const r = typeof e.result == "string" && e.result.trim() ? e.result.trim() : "";
|
|
2396
2369
|
return r ? { response: r } : {};
|
|
@@ -2409,31 +2382,31 @@ function ya(e) {
|
|
|
2409
2382
|
return null;
|
|
2410
2383
|
}
|
|
2411
2384
|
}
|
|
2412
|
-
function
|
|
2385
|
+
function ll(e, t) {
|
|
2413
2386
|
const n = t.result == null || t.result === "" ? e.result : String(t.result), r = ya(t.ext), s = je(
|
|
2414
2387
|
(r == null ? void 0 : r.submittedValue) ?? (r == null ? void 0 : r.submitted_value)
|
|
2415
2388
|
), o = {
|
|
2416
2389
|
...e,
|
|
2417
2390
|
result: n,
|
|
2418
|
-
submittedValue:
|
|
2391
|
+
submittedValue: Ge(e.submittedValue) ? e.submittedValue : s ?? e.submittedValue
|
|
2419
2392
|
};
|
|
2420
2393
|
return hr(o) ?? o;
|
|
2421
2394
|
}
|
|
2422
2395
|
function hr(e) {
|
|
2423
2396
|
if (!e || typeof e != "object")
|
|
2424
2397
|
return null;
|
|
2425
|
-
const t = e, n =
|
|
2398
|
+
const t = e, n = ze(t.humanTaskId ?? t.human_task_id);
|
|
2426
2399
|
if (n == null)
|
|
2427
2400
|
return null;
|
|
2428
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 = fa({
|
|
2429
2402
|
submittedValue: s,
|
|
2430
2403
|
cardForm: r,
|
|
2431
2404
|
result: o
|
|
2432
|
-
}), c = r &&
|
|
2405
|
+
}), c = r && Ge(i) ? { ...r, value: i } : r;
|
|
2433
2406
|
return {
|
|
2434
2407
|
humanTaskId: n,
|
|
2435
|
-
agentTaskId:
|
|
2436
|
-
scenarioInstanceId:
|
|
2408
|
+
agentTaskId: ze(t.agentTaskId ?? t.agent_task_id),
|
|
2409
|
+
scenarioInstanceId: ze(
|
|
2437
2410
|
t.scenarioInstanceId ?? t.scenario_instance_id
|
|
2438
2411
|
),
|
|
2439
2412
|
// humanTaskStatus 是状态码而非 ID,不能走 idOrUndefined(会变成字符串)
|
|
@@ -2441,12 +2414,12 @@ function hr(e) {
|
|
|
2441
2414
|
assistType: typeof t.assistType == "string" ? t.assistType : typeof t.assist_type == "string" ? t.assist_type : void 0,
|
|
2442
2415
|
assignee: t.assignee && typeof t.assignee == "object" ? t.assignee : void 0,
|
|
2443
2416
|
cardForm: c,
|
|
2444
|
-
cardFormId:
|
|
2445
|
-
promotedMessageId:
|
|
2417
|
+
cardFormId: ze(t.cardFormId ?? t.card_form_id),
|
|
2418
|
+
promotedMessageId: ze(
|
|
2446
2419
|
t.promotedMessageId ?? t.promoted_message_id
|
|
2447
2420
|
),
|
|
2448
2421
|
instruction: typeof t.instruction == "string" ? t.instruction : void 0,
|
|
2449
|
-
submittedValue:
|
|
2422
|
+
submittedValue: Ge(i) ? i : s,
|
|
2450
2423
|
result: o,
|
|
2451
2424
|
pending: t.pending === !0 || t.pending === "true",
|
|
2452
2425
|
canSubmit: t.canSubmit === !0 || t.can_submit === !0
|
|
@@ -2456,7 +2429,7 @@ function ga(e) {
|
|
|
2456
2429
|
const t = Number(e);
|
|
2457
2430
|
return Number.isFinite(t) ? t : void 0;
|
|
2458
2431
|
}
|
|
2459
|
-
function
|
|
2432
|
+
function Gt(e) {
|
|
2460
2433
|
const t = String(
|
|
2461
2434
|
e.sender_type ?? e.senderType ?? "HUMAN"
|
|
2462
2435
|
).toUpperCase(), n = e.sender_id ?? e.senderId, r = ln(n), s = e.task_id ?? e.taskId, o = ln(s), i = e.is_own ?? e.isOwn;
|
|
@@ -2517,12 +2490,12 @@ function ba(e, t) {
|
|
|
2517
2490
|
}
|
|
2518
2491
|
return r === "AGENT" ? "助手" : r === "HUMAN" ? "成员" : "";
|
|
2519
2492
|
}
|
|
2520
|
-
function
|
|
2493
|
+
function gt(e, t) {
|
|
2521
2494
|
const n = ba(e, t);
|
|
2522
2495
|
return n === e.sender_name ? e : { ...e, sender_name: n };
|
|
2523
2496
|
}
|
|
2524
|
-
const
|
|
2525
|
-
function
|
|
2497
|
+
const vt = /* @__PURE__ */ new Map(), Pt = /* @__PURE__ */ new Map(), Et = /* @__PURE__ */ new Map();
|
|
2498
|
+
function it() {
|
|
2526
2499
|
return {
|
|
2527
2500
|
members: [],
|
|
2528
2501
|
availableAgents: [],
|
|
@@ -2532,7 +2505,7 @@ function ct() {
|
|
|
2532
2505
|
skills: []
|
|
2533
2506
|
};
|
|
2534
2507
|
}
|
|
2535
|
-
function
|
|
2508
|
+
function Rt(e, t) {
|
|
2536
2509
|
const n = e.findIndex((c) => c.id === t.id);
|
|
2537
2510
|
if (n !== -1) {
|
|
2538
2511
|
const c = [...e];
|
|
@@ -2550,15 +2523,15 @@ function Ot(e, t) {
|
|
|
2550
2523
|
const i = [...e];
|
|
2551
2524
|
return i.splice(o, 0, t), i;
|
|
2552
2525
|
}
|
|
2553
|
-
function
|
|
2526
|
+
function ct(e) {
|
|
2554
2527
|
return [...e].sort((t, n) => {
|
|
2555
2528
|
const r = t.created_at ? new Date(t.created_at).getTime() : 0, s = n.created_at ? new Date(n.created_at).getTime() : 0;
|
|
2556
|
-
return r !== s ? r - s :
|
|
2529
|
+
return r !== s ? r - s : Tt(t.id, n.id);
|
|
2557
2530
|
});
|
|
2558
2531
|
}
|
|
2559
|
-
function
|
|
2532
|
+
function Ot(e) {
|
|
2560
2533
|
const t = e.task_id;
|
|
2561
|
-
return t == null ||
|
|
2534
|
+
return t == null || Tt(t, "0") <= 0;
|
|
2562
2535
|
}
|
|
2563
2536
|
function Sa(e) {
|
|
2564
2537
|
if (!e) return !1;
|
|
@@ -2588,16 +2561,16 @@ function Cn(e) {
|
|
|
2588
2561
|
}
|
|
2589
2562
|
});
|
|
2590
2563
|
}
|
|
2591
|
-
function
|
|
2592
|
-
return e.map((n) =>
|
|
2564
|
+
function Jt(e, t) {
|
|
2565
|
+
return e.map((n) => Gt(n)).map((n) => gt(n, t));
|
|
2593
2566
|
}
|
|
2594
2567
|
function wa(e, t, n) {
|
|
2595
|
-
return
|
|
2568
|
+
return Jt(e, t).map((r) => ({
|
|
2596
2569
|
...r,
|
|
2597
2570
|
task_id: r.task_id ?? n
|
|
2598
2571
|
}));
|
|
2599
2572
|
}
|
|
2600
|
-
function
|
|
2573
|
+
function lt(e) {
|
|
2601
2574
|
return e.length <= kn ? e : e.slice(e.length - kn);
|
|
2602
2575
|
}
|
|
2603
2576
|
function _a(e, t, n) {
|
|
@@ -2629,7 +2602,7 @@ function Ta(e) {
|
|
|
2629
2602
|
}
|
|
2630
2603
|
};
|
|
2631
2604
|
}
|
|
2632
|
-
const
|
|
2605
|
+
const dt = 80;
|
|
2633
2606
|
let An = 0;
|
|
2634
2607
|
function ka(e) {
|
|
2635
2608
|
let t = (e || "").trim();
|
|
@@ -2646,18 +2619,18 @@ function ka(e) {
|
|
|
2646
2619
|
const o = s.split(/[。;;!?\n]/)[0].trim();
|
|
2647
2620
|
return o.length > 48 ? o.slice(0, 48) + "…" : o;
|
|
2648
2621
|
}
|
|
2649
|
-
function
|
|
2622
|
+
function dl(e) {
|
|
2650
2623
|
let t = (e || "").trim();
|
|
2651
2624
|
if (!t) return "";
|
|
2652
2625
|
t.length > 200 && (t = t.slice(0, 200));
|
|
2653
2626
|
const n = t.split(/[\n。;;]/).map((s) => s.trim()).filter(Boolean), r = n[n.length - 1] || t;
|
|
2654
2627
|
return r.length > 60 ? r.slice(0, 60) + "…" : r;
|
|
2655
2628
|
}
|
|
2656
|
-
function
|
|
2629
|
+
function ut() {
|
|
2657
2630
|
const e = /* @__PURE__ */ new Date(), t = (n) => String(n).padStart(2, "0");
|
|
2658
2631
|
return `${t(e.getHours())}:${t(e.getMinutes())}:${t(e.getSeconds())}`;
|
|
2659
2632
|
}
|
|
2660
|
-
const
|
|
2633
|
+
const ul = 3, pl = 4, ml = 5, $n = gr((e, t) => ({
|
|
2661
2634
|
currentUser: null,
|
|
2662
2635
|
permissionState: "unknown",
|
|
2663
2636
|
// FEATURE-ZTEAM-MERGE: 优先 z-opc 的 token, 其次 z-team 原生的 z_team_token
|
|
@@ -2800,11 +2773,11 @@ const hl = 3, fl = 4, yl = 5, $n = gr((e, t) => ({
|
|
|
2800
2773
|
const { token: r } = t();
|
|
2801
2774
|
try {
|
|
2802
2775
|
const s = await Ss(r, n), i = (Array.isArray(s) ? s : []).map((c) => Ae(c)).sort(
|
|
2803
|
-
(c, l) =>
|
|
2776
|
+
(c, l) => ot(l.created_at) - ot(c.created_at)
|
|
2804
2777
|
);
|
|
2805
2778
|
e({ projects: i, loading: !1 });
|
|
2806
2779
|
} catch (s) {
|
|
2807
|
-
e({ projects: [], loading: !1 }),
|
|
2780
|
+
e({ projects: [], loading: !1 }), At(s) || oe(s instanceof Error ? s.message : "获取项目列表失败", "error");
|
|
2808
2781
|
}
|
|
2809
2782
|
},
|
|
2810
2783
|
createScenarioInstance: async (n, r, s, o) => {
|
|
@@ -2837,7 +2810,7 @@ const hl = 3, fl = 4, yl = 5, $n = gr((e, t) => ({
|
|
|
2837
2810
|
return c;
|
|
2838
2811
|
},
|
|
2839
2812
|
clearCurrentProject: () => {
|
|
2840
|
-
t().currentProject && (
|
|
2813
|
+
t().currentProject && (Ht(), e({
|
|
2841
2814
|
currentProject: null,
|
|
2842
2815
|
messages: [],
|
|
2843
2816
|
hasMoreMessages: !1,
|
|
@@ -2883,7 +2856,7 @@ const hl = 3, fl = 4, yl = 5, $n = gr((e, t) => ({
|
|
|
2883
2856
|
);
|
|
2884
2857
|
return e((o) => ({
|
|
2885
2858
|
projects: [s, ...o.projects].sort(
|
|
2886
|
-
(i, c) =>
|
|
2859
|
+
(i, c) => ot(c.created_at) - ot(i.created_at)
|
|
2887
2860
|
)
|
|
2888
2861
|
})), await t().expandProject(s), s;
|
|
2889
2862
|
},
|
|
@@ -2901,7 +2874,7 @@ const hl = 3, fl = 4, yl = 5, $n = gr((e, t) => ({
|
|
|
2901
2874
|
loadMembers: async () => {
|
|
2902
2875
|
const n = t().currentProject;
|
|
2903
2876
|
if (!n) return;
|
|
2904
|
-
const r = String(n.id), s =
|
|
2877
|
+
const r = String(n.id), s = vt.get(r);
|
|
2905
2878
|
if (s)
|
|
2906
2879
|
return s;
|
|
2907
2880
|
const o = (async () => {
|
|
@@ -2914,8 +2887,8 @@ const hl = 3, fl = 4, yl = 5, $n = gr((e, t) => ({
|
|
|
2914
2887
|
var m;
|
|
2915
2888
|
if (((m = l.currentProject) == null ? void 0 : m.id) !== r)
|
|
2916
2889
|
return {};
|
|
2917
|
-
const d = l.projectCache[r] ??
|
|
2918
|
-
(C) =>
|
|
2890
|
+
const d = l.projectCache[r] ?? it(), u = { members: c }, h = l.messages.map(
|
|
2891
|
+
(C) => gt(C, c)
|
|
2919
2892
|
);
|
|
2920
2893
|
return {
|
|
2921
2894
|
members: c,
|
|
@@ -2929,14 +2902,14 @@ const hl = 3, fl = 4, yl = 5, $n = gr((e, t) => ({
|
|
|
2929
2902
|
} catch {
|
|
2930
2903
|
}
|
|
2931
2904
|
})().finally(() => {
|
|
2932
|
-
|
|
2905
|
+
vt.delete(r);
|
|
2933
2906
|
});
|
|
2934
|
-
return
|
|
2907
|
+
return vt.set(r, o), o;
|
|
2935
2908
|
},
|
|
2936
2909
|
loadTeamPickerOptions: async () => {
|
|
2937
2910
|
const n = t().currentProject;
|
|
2938
2911
|
if (!n) return;
|
|
2939
|
-
const r = String(n.id), s =
|
|
2912
|
+
const r = String(n.id), s = Pt.get(r);
|
|
2940
2913
|
if (s)
|
|
2941
2914
|
return s;
|
|
2942
2915
|
const o = (async () => {
|
|
@@ -2956,7 +2929,7 @@ const hl = 3, fl = 4, yl = 5, $n = gr((e, t) => ({
|
|
|
2956
2929
|
var m;
|
|
2957
2930
|
if (((m = d.currentProject) == null ? void 0 : m.id) !== r)
|
|
2958
2931
|
return {};
|
|
2959
|
-
const u = d.projectCache[r] ??
|
|
2932
|
+
const u = d.projectCache[r] ?? it(), h = {
|
|
2960
2933
|
availableAgents: l,
|
|
2961
2934
|
availableHumans: c
|
|
2962
2935
|
};
|
|
@@ -2971,9 +2944,9 @@ const hl = 3, fl = 4, yl = 5, $n = gr((e, t) => ({
|
|
|
2971
2944
|
} catch {
|
|
2972
2945
|
}
|
|
2973
2946
|
})().finally(() => {
|
|
2974
|
-
|
|
2947
|
+
Pt.delete(r);
|
|
2975
2948
|
});
|
|
2976
|
-
return
|
|
2949
|
+
return Pt.set(r, o), o;
|
|
2977
2950
|
},
|
|
2978
2951
|
addMember: async (n, r, s, o) => {
|
|
2979
2952
|
const i = t().currentProject;
|
|
@@ -2994,16 +2967,16 @@ const hl = 3, fl = 4, yl = 5, $n = gr((e, t) => ({
|
|
|
2994
2967
|
if (!n) return;
|
|
2995
2968
|
const r = String(n.id);
|
|
2996
2969
|
try {
|
|
2997
|
-
const s = await bn(n.id, Tn), o = s.messages || [], i = t().members, c =
|
|
2970
|
+
const s = await bn(n.id, Tn), o = s.messages || [], i = t().members, c = ct(
|
|
2998
2971
|
Cn(
|
|
2999
|
-
|
|
2972
|
+
Jt(o, i).filter(Ot)
|
|
3000
2973
|
)
|
|
3001
2974
|
), l = !!s.has_more;
|
|
3002
2975
|
e((d) => {
|
|
3003
2976
|
var h;
|
|
3004
2977
|
if (((h = d.currentProject) == null ? void 0 : h.id) !== r)
|
|
3005
2978
|
return {};
|
|
3006
|
-
const u = d.projectCache[r] ??
|
|
2979
|
+
const u = d.projectCache[r] ?? it();
|
|
3007
2980
|
return {
|
|
3008
2981
|
messages: c,
|
|
3009
2982
|
hasMoreMessages: l,
|
|
@@ -3028,13 +3001,13 @@ const hl = 3, fl = 4, yl = 5, $n = gr((e, t) => ({
|
|
|
3028
3001
|
), c = i.messages || [];
|
|
3029
3002
|
if (c.length > 0) {
|
|
3030
3003
|
const l = Cn(
|
|
3031
|
-
|
|
3004
|
+
Jt(
|
|
3032
3005
|
c,
|
|
3033
3006
|
t().members
|
|
3034
|
-
).filter(
|
|
3007
|
+
).filter(Ot)
|
|
3035
3008
|
);
|
|
3036
3009
|
e({
|
|
3037
|
-
messages:
|
|
3010
|
+
messages: ct([...l, ...r]),
|
|
3038
3011
|
hasMoreMessages: !!i.has_more
|
|
3039
3012
|
});
|
|
3040
3013
|
} else
|
|
@@ -3047,18 +3020,18 @@ const hl = 3, fl = 4, yl = 5, $n = gr((e, t) => ({
|
|
|
3047
3020
|
e({ pendingTeamChatContent: n }), t().requestChatScrollBottom("team", !0);
|
|
3048
3021
|
},
|
|
3049
3022
|
addMessage: (n) => {
|
|
3050
|
-
var x,
|
|
3051
|
-
const r =
|
|
3023
|
+
var x, y;
|
|
3024
|
+
const r = Gt(
|
|
3052
3025
|
n
|
|
3053
3026
|
);
|
|
3054
|
-
if (!
|
|
3027
|
+
if (!Ot(r))
|
|
3055
3028
|
return;
|
|
3056
3029
|
const s = r.id;
|
|
3057
3030
|
if (!we(s))
|
|
3058
3031
|
return;
|
|
3059
3032
|
const o = t();
|
|
3060
|
-
let i =
|
|
3061
|
-
const c = String(r.sender_type || "HUMAN").toUpperCase() === "HUMAN", l =
|
|
3033
|
+
let i = gt(r, o.members);
|
|
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) : "";
|
|
3062
3035
|
if (d && d !== "0" && u && d !== u)
|
|
3063
3036
|
return;
|
|
3064
3037
|
const h = !!o.pendingTeamChatContent && o.pendingTeamChatContent === r.content && c, m = ua(
|
|
@@ -3076,7 +3049,7 @@ const hl = 3, fl = 4, yl = 5, $n = gr((e, t) => ({
|
|
|
3076
3049
|
...i,
|
|
3077
3050
|
is_own: !0,
|
|
3078
3051
|
sender_id: i.sender_id ?? (l == null ? void 0 : l.id) ?? null,
|
|
3079
|
-
sender_name: i.sender_name || ((
|
|
3052
|
+
sender_name: i.sender_name || ((y = o.currentUser) == null ? void 0 : y.display_name) || ""
|
|
3080
3053
|
});
|
|
3081
3054
|
const O = h && !m && i.is_own === !0;
|
|
3082
3055
|
let _ = null;
|
|
@@ -3097,7 +3070,7 @@ const hl = 3, fl = 4, yl = 5, $n = gr((e, t) => ({
|
|
|
3097
3070
|
return !0;
|
|
3098
3071
|
}
|
|
3099
3072
|
}));
|
|
3100
|
-
const M =
|
|
3073
|
+
const M = Rt(T, i), K = lt(M);
|
|
3101
3074
|
return P !== -1 ? {
|
|
3102
3075
|
messages: K,
|
|
3103
3076
|
pendingTeamChatContent: k
|
|
@@ -3132,7 +3105,7 @@ const hl = 3, fl = 4, yl = 5, $n = gr((e, t) => ({
|
|
|
3132
3105
|
markUnreadMentionsAsRead: () => {
|
|
3133
3106
|
const n = t(), r = n.currentProject, s = n.token;
|
|
3134
3107
|
if (!r || !s) return;
|
|
3135
|
-
const o =
|
|
3108
|
+
const o = $t(n.members, n.currentUser);
|
|
3136
3109
|
if (!o) return;
|
|
3137
3110
|
const i = o.id, c = o.display_name, l = n.messages.filter((d) => d.read_status ? d.read_status.unread_members.some(
|
|
3138
3111
|
(u) => u.member_id === i || u.display_name === c
|
|
@@ -3144,11 +3117,11 @@ const hl = 3, fl = 4, yl = 5, $n = gr((e, t) => ({
|
|
|
3144
3117
|
},
|
|
3145
3118
|
sendChatMessage: async (n) => {
|
|
3146
3119
|
const r = t().currentProject, s = t().token;
|
|
3147
|
-
r && await
|
|
3120
|
+
r && await at(r.id, { content: n, message_type: "TEXT" }, s);
|
|
3148
3121
|
},
|
|
3149
3122
|
sendAtAgentMessage: async (n, r) => {
|
|
3150
3123
|
const s = t().currentProject, o = t().token;
|
|
3151
|
-
s && await
|
|
3124
|
+
s && await at(
|
|
3152
3125
|
s.id,
|
|
3153
3126
|
{
|
|
3154
3127
|
content: n,
|
|
@@ -3161,7 +3134,7 @@ const hl = 3, fl = 4, yl = 5, $n = gr((e, t) => ({
|
|
|
3161
3134
|
},
|
|
3162
3135
|
sendAtSkillMessage: async (n, r) => {
|
|
3163
3136
|
const s = t().currentProject, o = t().token;
|
|
3164
|
-
s && await
|
|
3137
|
+
s && await at(
|
|
3165
3138
|
s.id,
|
|
3166
3139
|
{
|
|
3167
3140
|
content: n,
|
|
@@ -3176,9 +3149,9 @@ const hl = 3, fl = 4, yl = 5, $n = gr((e, t) => ({
|
|
|
3176
3149
|
var c, l, d;
|
|
3177
3150
|
const r = t().currentProject, s = t().token;
|
|
3178
3151
|
if (!r) return;
|
|
3179
|
-
const o = String(r.id), i =
|
|
3152
|
+
const o = String(r.id), i = $t(t().members, t().currentUser);
|
|
3180
3153
|
try {
|
|
3181
|
-
const u = await
|
|
3154
|
+
const u = await at(r.id, n, s);
|
|
3182
3155
|
if (u && he((c = t().currentProject) == null ? void 0 : c.id, o) && t().addMessage({
|
|
3183
3156
|
...u,
|
|
3184
3157
|
is_own: !0,
|
|
@@ -3205,7 +3178,7 @@ const hl = 3, fl = 4, yl = 5, $n = gr((e, t) => ({
|
|
|
3205
3178
|
var c;
|
|
3206
3179
|
if (((c = o.currentProject) == null ? void 0 : c.id) !== r)
|
|
3207
3180
|
return {};
|
|
3208
|
-
const i = o.projectCache[r] ??
|
|
3181
|
+
const i = o.projectCache[r] ?? it();
|
|
3209
3182
|
return {
|
|
3210
3183
|
skills: s,
|
|
3211
3184
|
projectCache: {
|
|
@@ -3356,7 +3329,7 @@ const hl = 3, fl = 4, yl = 5, $n = gr((e, t) => ({
|
|
|
3356
3329
|
return l.projectSwitchSeq !== r || String(((d = l.currentProject) == null ? void 0 : d.id) ?? "") !== String(n);
|
|
3357
3330
|
};
|
|
3358
3331
|
if (o()) return;
|
|
3359
|
-
const i =
|
|
3332
|
+
const i = Et.get(n);
|
|
3360
3333
|
if (i) {
|
|
3361
3334
|
await i;
|
|
3362
3335
|
return;
|
|
@@ -3369,9 +3342,9 @@ const hl = 3, fl = 4, yl = 5, $n = gr((e, t) => ({
|
|
|
3369
3342
|
];
|
|
3370
3343
|
s && l.push(t().loadFileTree()), await Promise.allSettled(l);
|
|
3371
3344
|
})().finally(() => {
|
|
3372
|
-
|
|
3345
|
+
Et.delete(n);
|
|
3373
3346
|
});
|
|
3374
|
-
|
|
3347
|
+
Et.set(n, c), await c, o();
|
|
3375
3348
|
},
|
|
3376
3349
|
expandProject: async (n, r) => {
|
|
3377
3350
|
var _, x;
|
|
@@ -3381,8 +3354,8 @@ const hl = 3, fl = 4, yl = 5, $n = gr((e, t) => ({
|
|
|
3381
3354
|
expandedProjectIds: [
|
|
3382
3355
|
.../* @__PURE__ */ new Set([...i.expandedProjectIds, s])
|
|
3383
3356
|
]
|
|
3384
|
-
}), h && t().loadFileTree()), e((
|
|
3385
|
-
const A =
|
|
3357
|
+
}), h && t().loadFileTree()), e((y) => {
|
|
3358
|
+
const A = y.projects.filter(
|
|
3386
3359
|
(T, M, K) => K.findIndex((I) => I.id === T.id) === M
|
|
3387
3360
|
), k = A.findIndex((T) => T.id === s);
|
|
3388
3361
|
return {
|
|
@@ -3395,8 +3368,8 @@ const hl = 3, fl = 4, yl = 5, $n = gr((e, t) => ({
|
|
|
3395
3368
|
return;
|
|
3396
3369
|
}
|
|
3397
3370
|
const C = i.projectSwitchSeq + 1, O = o && !d ? [.../* @__PURE__ */ new Set([...i.expandedProjectIds, s])] : i.expandedProjectIds;
|
|
3398
|
-
((x = i.currentProject) == null ? void 0 : x.id) !== s &&
|
|
3399
|
-
const A =
|
|
3371
|
+
((x = i.currentProject) == null ? void 0 : x.id) !== s && Ht(), e((y) => {
|
|
3372
|
+
const A = y.projects.filter(
|
|
3400
3373
|
(T, M, K) => K.findIndex((I) => I.id === T.id) === M
|
|
3401
3374
|
), k = A.findIndex((T) => T.id === s);
|
|
3402
3375
|
return {
|
|
@@ -3482,7 +3455,7 @@ const hl = 3, fl = 4, yl = 5, $n = gr((e, t) => ({
|
|
|
3482
3455
|
try {
|
|
3483
3456
|
await Ms(r.id, o);
|
|
3484
3457
|
} catch (c) {
|
|
3485
|
-
console.error("[ChatPanel] 停止失败:", c),
|
|
3458
|
+
console.error("[ChatPanel] 停止失败:", c), At(c) || oe(
|
|
3486
3459
|
"停止失败:" + (c instanceof Error ? c.message : "未知错误"),
|
|
3487
3460
|
"error"
|
|
3488
3461
|
);
|
|
@@ -3497,7 +3470,7 @@ const hl = 3, fl = 4, yl = 5, $n = gr((e, t) => ({
|
|
|
3497
3470
|
try {
|
|
3498
3471
|
await js(r.id, o);
|
|
3499
3472
|
} catch (c) {
|
|
3500
|
-
console.error("[ChatPanel] 停止队列失败:", c),
|
|
3473
|
+
console.error("[ChatPanel] 停止队列失败:", c), At(c) || oe(
|
|
3501
3474
|
"停止队列失败:" + (c instanceof Error ? c.message : "未知错误"),
|
|
3502
3475
|
"error"
|
|
3503
3476
|
);
|
|
@@ -3511,7 +3484,7 @@ const hl = 3, fl = 4, yl = 5, $n = gr((e, t) => ({
|
|
|
3511
3484
|
if (n.taskId)
|
|
3512
3485
|
for (const l of Object.keys(o))
|
|
3513
3486
|
Se(l) && he((c = o[l]) == null ? void 0 : c.task_id, n.taskId) && delete o[l];
|
|
3514
|
-
const i =
|
|
3487
|
+
const i = xt(
|
|
3515
3488
|
n.agentName,
|
|
3516
3489
|
n.taskId,
|
|
3517
3490
|
o,
|
|
@@ -3539,7 +3512,7 @@ const hl = 3, fl = 4, yl = 5, $n = gr((e, t) => ({
|
|
|
3539
3512
|
e((s) => {
|
|
3540
3513
|
let o = s.runningExecutions[r];
|
|
3541
3514
|
if (!o) {
|
|
3542
|
-
const u =
|
|
3515
|
+
const u = xt(
|
|
3543
3516
|
n.agentName,
|
|
3544
3517
|
n.taskId,
|
|
3545
3518
|
s.runningExecutions,
|
|
@@ -3649,7 +3622,7 @@ const hl = 3, fl = 4, yl = 5, $n = gr((e, t) => ({
|
|
|
3649
3622
|
},
|
|
3650
3623
|
addTaskMessage: (n) => {
|
|
3651
3624
|
var d, u;
|
|
3652
|
-
const r =
|
|
3625
|
+
const r = Gt(
|
|
3653
3626
|
n
|
|
3654
3627
|
), s = q(r.task_id);
|
|
3655
3628
|
if (we(s)) {
|
|
@@ -3667,7 +3640,7 @@ const hl = 3, fl = 4, yl = 5, $n = gr((e, t) => ({
|
|
|
3667
3640
|
const i = r.task_id ?? q(o);
|
|
3668
3641
|
if (!he(i, o))
|
|
3669
3642
|
return;
|
|
3670
|
-
const c =
|
|
3643
|
+
const c = gt(
|
|
3671
3644
|
{ ...r, task_id: i },
|
|
3672
3645
|
t().members
|
|
3673
3646
|
), l = c.id;
|
|
@@ -3677,22 +3650,22 @@ const hl = 3, fl = 4, yl = 5, $n = gr((e, t) => ({
|
|
|
3677
3650
|
(_) => !(Se(_.id) && _.sender_type === "AGENT" && _.task_id === c.task_id)
|
|
3678
3651
|
)), m.findIndex((_) => _.id === l) !== -1)
|
|
3679
3652
|
return {
|
|
3680
|
-
taskMessages:
|
|
3681
|
-
|
|
3653
|
+
taskMessages: lt(
|
|
3654
|
+
Rt(m, c)
|
|
3682
3655
|
)
|
|
3683
3656
|
};
|
|
3684
|
-
if (c.sender_type === "AGENT" &&
|
|
3657
|
+
if (c.sender_type === "AGENT" && qt(c.content)) {
|
|
3685
3658
|
const _ = _a(
|
|
3686
3659
|
m,
|
|
3687
3660
|
c,
|
|
3688
|
-
|
|
3661
|
+
qt
|
|
3689
3662
|
);
|
|
3690
3663
|
if (_)
|
|
3691
|
-
return { taskMessages:
|
|
3664
|
+
return { taskMessages: lt(_) };
|
|
3692
3665
|
}
|
|
3693
3666
|
return {
|
|
3694
|
-
taskMessages:
|
|
3695
|
-
|
|
3667
|
+
taskMessages: lt(
|
|
3668
|
+
Rt(m, c)
|
|
3696
3669
|
)
|
|
3697
3670
|
};
|
|
3698
3671
|
});
|
|
@@ -3708,7 +3681,7 @@ const hl = 3, fl = 4, yl = 5, $n = gr((e, t) => ({
|
|
|
3708
3681
|
const C = {
|
|
3709
3682
|
...u,
|
|
3710
3683
|
text: c,
|
|
3711
|
-
time:
|
|
3684
|
+
time: ut()
|
|
3712
3685
|
};
|
|
3713
3686
|
return {
|
|
3714
3687
|
taskActivity: {
|
|
@@ -3720,11 +3693,11 @@ const hl = 3, fl = 4, yl = 5, $n = gr((e, t) => ({
|
|
|
3720
3693
|
if (u && u.text === c) return {};
|
|
3721
3694
|
const h = {
|
|
3722
3695
|
id: ++An,
|
|
3723
|
-
time:
|
|
3696
|
+
time: ut(),
|
|
3724
3697
|
text: c,
|
|
3725
3698
|
sender: s || void 0,
|
|
3726
3699
|
messageId: o ?? void 0
|
|
3727
|
-
}, m = d.length >=
|
|
3700
|
+
}, m = d.length >= dt ? [...d.slice(d.length - dt + 1), h] : [...d, h];
|
|
3728
3701
|
return { taskActivity: { ...l.taskActivity, [i]: m } };
|
|
3729
3702
|
});
|
|
3730
3703
|
},
|
|
@@ -3739,7 +3712,7 @@ const hl = 3, fl = 4, yl = 5, $n = gr((e, t) => ({
|
|
|
3739
3712
|
const O = {
|
|
3740
3713
|
...h,
|
|
3741
3714
|
text: l,
|
|
3742
|
-
time:
|
|
3715
|
+
time: ut()
|
|
3743
3716
|
};
|
|
3744
3717
|
return {
|
|
3745
3718
|
taskActivity: {
|
|
@@ -3751,12 +3724,12 @@ const hl = 3, fl = 4, yl = 5, $n = gr((e, t) => ({
|
|
|
3751
3724
|
if (h && h.text === l) return {};
|
|
3752
3725
|
const m = {
|
|
3753
3726
|
id: ++An,
|
|
3754
|
-
time:
|
|
3727
|
+
time: ut(),
|
|
3755
3728
|
text: l,
|
|
3756
3729
|
sender: i || void 0,
|
|
3757
3730
|
executionId: r,
|
|
3758
3731
|
kind: s
|
|
3759
|
-
}, C = u.length >=
|
|
3732
|
+
}, C = u.length >= dt ? [...u.slice(u.length - dt + 1), m] : [...u, m];
|
|
3760
3733
|
return { taskActivity: { ...d.taskActivity, [c]: C } };
|
|
3761
3734
|
});
|
|
3762
3735
|
},
|
|
@@ -3824,10 +3797,10 @@ const hl = 3, fl = 4, yl = 5, $n = gr((e, t) => ({
|
|
|
3824
3797
|
s
|
|
3825
3798
|
), c = Array.isArray(i == null ? void 0 : i.messages) ? i.messages : [], l = wa(c, t().members, n), d = !!i.has_more;
|
|
3826
3799
|
s ? e((u) => ({
|
|
3827
|
-
taskMessages:
|
|
3800
|
+
taskMessages: ct([...l, ...u.taskMessages]),
|
|
3828
3801
|
taskHasMoreMessages: d
|
|
3829
3802
|
})) : (e({
|
|
3830
|
-
taskMessages:
|
|
3803
|
+
taskMessages: ct(l),
|
|
3831
3804
|
taskHasMoreMessages: d
|
|
3832
3805
|
}), t().requestChatScrollBottom("task", !1));
|
|
3833
3806
|
} catch (i) {
|
|
@@ -3856,7 +3829,7 @@ const hl = 3, fl = 4, yl = 5, $n = gr((e, t) => ({
|
|
|
3856
3829
|
step: m.step,
|
|
3857
3830
|
name: m.name,
|
|
3858
3831
|
output: m.output
|
|
3859
|
-
})), u = s.runningExecutions[c.id], h =
|
|
3832
|
+
})), u = s.runningExecutions[c.id], h = xt(
|
|
3860
3833
|
c.agent_name || (u == null ? void 0 : u.agentName),
|
|
3861
3834
|
c.task_id ?? (u == null ? void 0 : u.task_id),
|
|
3862
3835
|
{ ...s.runningExecutions, ...o },
|
|
@@ -3933,23 +3906,23 @@ function xn(e, t) {
|
|
|
3933
3906
|
function $a(e) {
|
|
3934
3907
|
return e ? Aa.some((t) => xn(e, t)) ? "ops" : Ca.includes(e) || Ia.some((t) => xn(e, t)) ? "middleware" : "system" : "system";
|
|
3935
3908
|
}
|
|
3936
|
-
const xa = 30, va = ["/api/", "/kapi/", "/z-team/", "/auth/", "/sso/"],
|
|
3937
|
-
function
|
|
3909
|
+
const xa = 30, va = ["/api/", "/kapi/", "/z-team/", "/auth/", "/sso/"], Je = "__zteam_api_error_monitor__", Ve = globalThis;
|
|
3910
|
+
function Mt(e) {
|
|
3938
3911
|
return e.startsWith(location.origin) && (e = e.slice(location.origin.length)), va.some((t) => e.includes(t));
|
|
3939
3912
|
}
|
|
3940
|
-
function
|
|
3941
|
-
const t =
|
|
3913
|
+
function jt(e) {
|
|
3914
|
+
const t = Ve[Je];
|
|
3942
3915
|
if (!t) return;
|
|
3943
3916
|
t.failures.push(e), t.failures.length > xa && t.failures.shift();
|
|
3944
3917
|
const n = [...t.failures];
|
|
3945
3918
|
t.listeners.forEach((r) => r(n));
|
|
3946
3919
|
}
|
|
3947
|
-
function
|
|
3920
|
+
function hl() {
|
|
3948
3921
|
var e;
|
|
3949
|
-
return ((e =
|
|
3922
|
+
return ((e = Ve[Je]) == null ? void 0 : e.failures) ?? [];
|
|
3950
3923
|
}
|
|
3951
|
-
function
|
|
3952
|
-
const t =
|
|
3924
|
+
function fl(e) {
|
|
3925
|
+
const t = Ve[Je];
|
|
3953
3926
|
return t ? (t.listeners.add(e), e(t.failures), () => t.listeners.delete(e)) : () => {
|
|
3954
3927
|
};
|
|
3955
3928
|
}
|
|
@@ -3957,18 +3930,18 @@ function vn(e) {
|
|
|
3957
3930
|
return e >= 400 && e !== 401;
|
|
3958
3931
|
}
|
|
3959
3932
|
function Pa() {
|
|
3960
|
-
if (
|
|
3933
|
+
if (Ve[Je]) return;
|
|
3961
3934
|
const e = { failures: [], listeners: /* @__PURE__ */ new Set() };
|
|
3962
|
-
|
|
3935
|
+
Ve[Je] = e;
|
|
3963
3936
|
const t = window.fetch.bind(window);
|
|
3964
3937
|
window.fetch = async (...s) => {
|
|
3965
3938
|
var l;
|
|
3966
3939
|
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();
|
|
3967
3940
|
try {
|
|
3968
3941
|
const d = await t(...s);
|
|
3969
|
-
return vn(d.status) &&
|
|
3942
|
+
return vn(d.status) && Mt(i) && jt({ method: c, url: i, status: d.status, route: location.pathname, at: Date.now() }), d;
|
|
3970
3943
|
} catch (d) {
|
|
3971
|
-
throw
|
|
3944
|
+
throw Mt(i) && jt({ method: c, url: i, status: 0, route: location.pathname, at: Date.now() }), d;
|
|
3972
3945
|
}
|
|
3973
3946
|
};
|
|
3974
3947
|
const n = XMLHttpRequest.prototype.open, r = XMLHttpRequest.prototype.send;
|
|
@@ -3977,10 +3950,10 @@ function Pa() {
|
|
|
3977
3950
|
return this.__url = String(o), this.__method = String(s || "GET").toUpperCase(), c;
|
|
3978
3951
|
}, XMLHttpRequest.prototype.send = function(...s) {
|
|
3979
3952
|
const o = r.apply(this, s), i = this, c = i.__url;
|
|
3980
|
-
if (c &&
|
|
3953
|
+
if (c && Mt(c)) {
|
|
3981
3954
|
const l = i.__method ?? "GET";
|
|
3982
3955
|
this.addEventListener("loadend", () => {
|
|
3983
|
-
vn(this.status) &&
|
|
3956
|
+
vn(this.status) && jt({ method: l, url: c, status: this.status, route: location.pathname, at: Date.now() });
|
|
3984
3957
|
});
|
|
3985
3958
|
}
|
|
3986
3959
|
return o;
|
|
@@ -3990,10 +3963,10 @@ Pa();
|
|
|
3990
3963
|
const ne = (e) => {
|
|
3991
3964
|
const t = wr(e);
|
|
3992
3965
|
return (n) => /* @__PURE__ */ a(_r, { fallback: null, children: /* @__PURE__ */ a(t, { ...n }) });
|
|
3993
|
-
}, xe = ne(() => import("./index-
|
|
3994
|
-
ne(() => import("./index-
|
|
3995
|
-
const Na = ne(() => import("./index-C815hPWS.js")), Ua = ne(() => import("./index-DWi-8Esh.js")), za = ne(() => import("./index-DhDdFRHC.js")), La = ne(() => import("./index-
|
|
3996
|
-
function
|
|
3966
|
+
}, xe = ne(() => import("./index-DM6XeWFk.js").then((e) => e.at)), Ea = ne(() => import("./index-Ceu-yckM.js")), Ra = ne(() => import("./index-CntZHojY.js")), Oa = ne(() => import("./index-B3uLo8-F.js")), Ma = ne(() => import("./index-DmV6xR7C.js")), ja = ne(() => import("./index-DMfYPIkB.js"));
|
|
3967
|
+
ne(() => import("./index-BkzBYfhO.js"));
|
|
3968
|
+
const Na = ne(() => import("./index-C815hPWS.js")), Ua = ne(() => import("./index-DWi-8Esh.js")), za = ne(() => import("./index-DhDdFRHC.js")), La = ne(() => import("./index-D2DFKRUf.js")), Da = ne(() => import("./index-t2nMJUPu.js")), Fa = ne(() => import("./index-B_LJRFsK.js")), qa = ne(() => import("./index-B2Dfbi8J.js"));
|
|
3969
|
+
function yl({ forcedMode: e }) {
|
|
3997
3970
|
const { pathname: t } = Tr(), n = t.replace(/\/+$/, "") || "/";
|
|
3998
3971
|
return e === "system" ? /* @__PURE__ */ a(xe, { forcedChatMode: $a(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(Ea, {}) : n === "/workspace/from-ticket" ? /* @__PURE__ */ a(Ra, {}) : n === "/workspace/from-scenario" ? /* @__PURE__ */ a(Oa, {}) : n === "/workspace/build-by-form" ? /* @__PURE__ */ a(Ma, {}) : n === "/scenario" ? /* @__PURE__ */ a(ja, {}) : n === "/admin" ? /* @__PURE__ */ a(xe, {}) : n === "/welcome" ? /* @__PURE__ */ a(Ua, {}) : n === "/portal" ? /* @__PURE__ */ a(za, {}) : n === "/chatdemo" ? /* @__PURE__ */ a(Na, {}) : n === "/embed/chat" || n.startsWith("/embed/chat/") ? /* @__PURE__ */ a(qa, {}) : n === "/change-log" ? /* @__PURE__ */ a(La, {}) : n === "/docs" ? /* @__PURE__ */ a(Da, {}) : n === "/download" ? /* @__PURE__ */ a(Fa, {}) : /* @__PURE__ */ a(xe, {});
|
|
3999
3972
|
}
|
|
@@ -4060,7 +4033,7 @@ function Va(e, t = {}) {
|
|
|
4060
4033
|
e.interceptors.request.use((s) => {
|
|
4061
4034
|
const o = localStorage.getItem(n);
|
|
4062
4035
|
if (o && Ha(o))
|
|
4063
|
-
return En(`请求前检测到 token 已过期 (${s.url || ""})`), Promise.reject(new
|
|
4036
|
+
return En(`请求前检测到 token 已过期 (${s.url || ""})`), Promise.reject(new en.CanceledError("token expired"));
|
|
4064
4037
|
try {
|
|
4065
4038
|
const i = localStorage.getItem(r);
|
|
4066
4039
|
if (i) {
|
|
@@ -4083,7 +4056,7 @@ function Va(e, t = {}) {
|
|
|
4083
4056
|
);
|
|
4084
4057
|
}
|
|
4085
4058
|
function sn(e = {}) {
|
|
4086
|
-
const t =
|
|
4059
|
+
const t = en.create({
|
|
4087
4060
|
baseURL: e.baseURL ?? "/api",
|
|
4088
4061
|
timeout: e.timeout ?? 1e4,
|
|
4089
4062
|
withCredentials: !0
|
|
@@ -4094,19 +4067,19 @@ function sn(e = {}) {
|
|
|
4094
4067
|
userInfoKey: e.userInfoKey
|
|
4095
4068
|
}), t;
|
|
4096
4069
|
}
|
|
4097
|
-
const H = sn(),
|
|
4070
|
+
const H = sn(), gl = 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, Wa = [
|
|
4098
4071
|
{
|
|
4099
4072
|
key: "ai",
|
|
4100
4073
|
color: "violet",
|
|
4101
4074
|
title: "智能中心",
|
|
4102
4075
|
subtitle: "Agent · 模型 · MCP · 技能",
|
|
4103
|
-
icon: /* @__PURE__ */ a(
|
|
4076
|
+
icon: /* @__PURE__ */ a(Dt, {}),
|
|
4104
4077
|
href: "/ai/agent/app",
|
|
4105
4078
|
items: [
|
|
4106
4079
|
{
|
|
4107
4080
|
title: "Agent 应用",
|
|
4108
4081
|
description: "创建和管理 AI Agent 应用, 支持多种 LLM 模型",
|
|
4109
|
-
icon: /* @__PURE__ */ a(
|
|
4082
|
+
icon: /* @__PURE__ */ a(Dt, {}),
|
|
4110
4083
|
color: "violet",
|
|
4111
4084
|
tags: [{ label: "AI", color: "violet" }, { label: "推荐", color: "orange" }],
|
|
4112
4085
|
meta: "12 个应用"
|
|
@@ -4114,7 +4087,7 @@ const H = sn(), wl = sn(), mt = sn({ baseURL: "/api", timeout: 1e4 }), ht = (e)
|
|
|
4114
4087
|
{
|
|
4115
4088
|
title: "多 Agent 实例",
|
|
4116
4089
|
description: "多 Agent 协同执行, 支持 ZBOT / Hermes / Claude Code / OpenCode",
|
|
4117
|
-
icon: /* @__PURE__ */ a(
|
|
4090
|
+
icon: /* @__PURE__ */ a(Xt, {}),
|
|
4118
4091
|
color: "blue",
|
|
4119
4092
|
tags: [{ label: "AI", color: "blue" }],
|
|
4120
4093
|
meta: "5 种引擎"
|
|
@@ -4130,7 +4103,7 @@ const H = sn(), wl = sn(), mt = sn({ baseURL: "/api", timeout: 1e4 }), ht = (e)
|
|
|
4130
4103
|
{
|
|
4131
4104
|
title: "技能市场",
|
|
4132
4105
|
description: "为 Agent 装配技能, 拓展能力边界",
|
|
4133
|
-
icon: /* @__PURE__ */ a(
|
|
4106
|
+
icon: /* @__PURE__ */ a(He, {}),
|
|
4134
4107
|
color: "orange",
|
|
4135
4108
|
tags: [{ label: "扩展", color: "orange" }]
|
|
4136
4109
|
}
|
|
@@ -4142,7 +4115,7 @@ const H = sn(), wl = sn(), mt = sn({ baseURL: "/api", timeout: 1e4 }), ht = (e)
|
|
|
4142
4115
|
color: "green",
|
|
4143
4116
|
title: "任务中心",
|
|
4144
4117
|
subtitle: "仪表盘 · 任务 · 项目",
|
|
4145
|
-
icon: /* @__PURE__ */ a(
|
|
4118
|
+
icon: /* @__PURE__ */ a(St, {}),
|
|
4146
4119
|
href: "/task/dashboard",
|
|
4147
4120
|
items: [
|
|
4148
4121
|
{
|
|
@@ -4162,7 +4135,7 @@ const H = sn(), wl = sn(), mt = sn({ baseURL: "/api", timeout: 1e4 }), ht = (e)
|
|
|
4162
4135
|
{
|
|
4163
4136
|
title: "项目管理",
|
|
4164
4137
|
description: "项目维度组织任务, 支持里程碑",
|
|
4165
|
-
icon: /* @__PURE__ */ a(
|
|
4138
|
+
icon: /* @__PURE__ */ a(St, {}),
|
|
4166
4139
|
color: "violet",
|
|
4167
4140
|
tags: [{ label: "项目", color: "violet" }]
|
|
4168
4141
|
}
|
|
@@ -4173,26 +4146,26 @@ const H = sn(), wl = sn(), mt = sn({ baseURL: "/api", timeout: 1e4 }), ht = (e)
|
|
|
4173
4146
|
color: "orange",
|
|
4174
4147
|
title: "流程中心",
|
|
4175
4148
|
subtitle: "审批 · 待办 · 我的",
|
|
4176
|
-
icon: /* @__PURE__ */ a(
|
|
4149
|
+
icon: /* @__PURE__ */ a(Lt, {}),
|
|
4177
4150
|
href: "/workflow/dashboard",
|
|
4178
4151
|
items: [
|
|
4179
4152
|
{
|
|
4180
4153
|
title: "流程仪表盘",
|
|
4181
4154
|
description: "流程实例统计与效率分析",
|
|
4182
|
-
icon: /* @__PURE__ */ a(
|
|
4155
|
+
icon: /* @__PURE__ */ a(Lt, {}),
|
|
4183
4156
|
color: "orange",
|
|
4184
4157
|
tags: [{ label: "审批", color: "orange" }]
|
|
4185
4158
|
},
|
|
4186
4159
|
{
|
|
4187
4160
|
title: "待办任务",
|
|
4188
4161
|
description: "我的待审批任务, 实时推送",
|
|
4189
|
-
icon: /* @__PURE__ */ a(
|
|
4162
|
+
icon: /* @__PURE__ */ a(Yt, {}),
|
|
4190
4163
|
color: "red",
|
|
4191
4164
|
tags: [{ label: "待办", color: "red" }]
|
|
4192
4165
|
}
|
|
4193
4166
|
]
|
|
4194
4167
|
}
|
|
4195
|
-
],
|
|
4168
|
+
], bl = () => {
|
|
4196
4169
|
const [e, t] = $({
|
|
4197
4170
|
configCount: null,
|
|
4198
4171
|
projectCount: null,
|
|
@@ -4202,10 +4175,10 @@ const H = sn(), wl = sn(), mt = sn({ baseURL: "/api", timeout: 1e4 }), ht = (e)
|
|
|
4202
4175
|
return Y(() => {
|
|
4203
4176
|
let n = !0;
|
|
4204
4177
|
const r = [
|
|
4205
|
-
|
|
4206
|
-
|
|
4207
|
-
|
|
4208
|
-
|
|
4178
|
+
pt.get("/config/list", { params: { pageSize: 1 } }).then((s) => mt(s)).then((s) => n && t((o) => ({ ...o, configCount: s }))).catch(() => n && t((s) => ({ ...s, configCount: 0 }))),
|
|
4179
|
+
pt.get("/project/user/list").then((s) => mt(s)).then((s) => n && t((o) => ({ ...o, projectCount: s }))).catch(() => n && t((s) => ({ ...s, projectCount: 0 }))),
|
|
4180
|
+
pt.get("/ctc/ac/accounts", { params: { pageSize: 1 } }).then((s) => mt(s)).then((s) => n && t((o) => ({ ...o, userCount: s }))).catch(() => n && t((s) => ({ ...s, userCount: 0 }))),
|
|
4181
|
+
pt.get("/ctc/authz/roles/list").then((s) => mt(s)).then((s) => n && t((o) => ({ ...o, roleCount: s }))).catch(() => n && t((s) => ({ ...s, roleCount: 0 })))
|
|
4209
4182
|
];
|
|
4210
4183
|
return () => {
|
|
4211
4184
|
n = !1, r.forEach((s) => {
|
|
@@ -4225,7 +4198,7 @@ const H = sn(), wl = sn(), mt = sn({ baseURL: "/api", timeout: 1e4 }), ht = (e)
|
|
|
4225
4198
|
),
|
|
4226
4199
|
/* @__PURE__ */ p(se, { gutter: [16, 16], children: [
|
|
4227
4200
|
/* @__PURE__ */ a(D, { xs: 24, sm: 12, md: 12, lg: 6, children: /* @__PURE__ */ a(
|
|
4228
|
-
|
|
4201
|
+
nt,
|
|
4229
4202
|
{
|
|
4230
4203
|
icon: /* @__PURE__ */ a(Ir, {}),
|
|
4231
4204
|
label: "配置中心",
|
|
@@ -4237,9 +4210,9 @@ const H = sn(), wl = sn(), mt = sn({ baseURL: "/api", timeout: 1e4 }), ht = (e)
|
|
|
4237
4210
|
}
|
|
4238
4211
|
) }),
|
|
4239
4212
|
/* @__PURE__ */ a(D, { xs: 24, sm: 12, md: 12, lg: 6, children: /* @__PURE__ */ a(
|
|
4240
|
-
|
|
4213
|
+
nt,
|
|
4241
4214
|
{
|
|
4242
|
-
icon: /* @__PURE__ */ a(
|
|
4215
|
+
icon: /* @__PURE__ */ a(St, {}),
|
|
4243
4216
|
label: "我的项目",
|
|
4244
4217
|
value: e.projectCount,
|
|
4245
4218
|
suffix: "个",
|
|
@@ -4249,7 +4222,7 @@ const H = sn(), wl = sn(), mt = sn({ baseURL: "/api", timeout: 1e4 }), ht = (e)
|
|
|
4249
4222
|
}
|
|
4250
4223
|
) }),
|
|
4251
4224
|
/* @__PURE__ */ a(D, { xs: 24, sm: 12, md: 12, lg: 6, children: /* @__PURE__ */ a(
|
|
4252
|
-
|
|
4225
|
+
nt,
|
|
4253
4226
|
{
|
|
4254
4227
|
icon: /* @__PURE__ */ a(Kn, {}),
|
|
4255
4228
|
label: "账号数",
|
|
@@ -4261,9 +4234,9 @@ const H = sn(), wl = sn(), mt = sn({ baseURL: "/api", timeout: 1e4 }), ht = (e)
|
|
|
4261
4234
|
}
|
|
4262
4235
|
) }),
|
|
4263
4236
|
/* @__PURE__ */ a(D, { xs: 24, sm: 12, md: 12, lg: 6, children: /* @__PURE__ */ a(
|
|
4264
|
-
|
|
4237
|
+
nt,
|
|
4265
4238
|
{
|
|
4266
|
-
icon: /* @__PURE__ */ a(
|
|
4239
|
+
icon: /* @__PURE__ */ a(Lt, {}),
|
|
4267
4240
|
label: "角色数",
|
|
4268
4241
|
value: e.roleCount,
|
|
4269
4242
|
suffix: "个",
|
|
@@ -4322,24 +4295,24 @@ const H = sn(), wl = sn(), mt = sn({ baseURL: "/api", timeout: 1e4 }), ht = (e)
|
|
|
4322
4295
|
};
|
|
4323
4296
|
let Za = "/api";
|
|
4324
4297
|
function fr() {
|
|
4325
|
-
return
|
|
4298
|
+
return en.create({ baseURL: Za, timeout: 15e3, withCredentials: !0 });
|
|
4326
4299
|
}
|
|
4327
|
-
const
|
|
4300
|
+
const et = fr(), Xa = fr();
|
|
4328
4301
|
Xa.interceptors.request.use((e) => e);
|
|
4329
|
-
|
|
4330
|
-
const
|
|
4302
|
+
et.interceptors.request.use((e) => e);
|
|
4303
|
+
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 = {
|
|
4331
4304
|
stats: () => Q("/stats"),
|
|
4332
4305
|
environments: {
|
|
4333
4306
|
list: () => Q("/environments/list"),
|
|
4334
4307
|
create: (e) => Z("/environments", e),
|
|
4335
|
-
update: (e, t) =>
|
|
4308
|
+
update: (e, t) => ht("/environments", t, { envCode: e }),
|
|
4336
4309
|
delete: (e) => ve("/environments", { envCode: e })
|
|
4337
4310
|
},
|
|
4338
4311
|
endpoints: {
|
|
4339
4312
|
list: (e, t, n) => Q("/endpoints/list", { envCode: e, scenarioCode: t, status: n }),
|
|
4340
4313
|
get: (e) => Q("/endpoints/byCode", { mockCode: e }),
|
|
4341
4314
|
create: (e) => Z("/endpoints", e),
|
|
4342
|
-
update: (e, t) =>
|
|
4315
|
+
update: (e, t) => ht("/endpoints", t, { mockCode: e }),
|
|
4343
4316
|
delete: (e) => ve("/endpoints", { mockCode: e }),
|
|
4344
4317
|
toggle: (e, t) => Z("/endpoints/toggle", null, { mockCode: e, status: t })
|
|
4345
4318
|
},
|
|
@@ -4347,7 +4320,7 @@ const Ct = "/mock-platform", Q = (e, t) => tt.get(`${Ct}${e}`, { params: t }).th
|
|
|
4347
4320
|
list: () => Q("/scenarios/list"),
|
|
4348
4321
|
get: (e) => Q("/scenarios/byCode", { scenarioCode: e }),
|
|
4349
4322
|
create: (e) => Z("/scenarios", e),
|
|
4350
|
-
update: (e, t) =>
|
|
4323
|
+
update: (e, t) => ht("/scenarios", t, { scenarioCode: e }),
|
|
4351
4324
|
delete: (e) => ve("/scenarios", { scenarioCode: e }),
|
|
4352
4325
|
reset: (e) => Z("/scenarios/reset", null, { scenarioCode: e }),
|
|
4353
4326
|
instances: (e) => Q("/scenarios/instances", { scenarioCode: e })
|
|
@@ -4356,7 +4329,7 @@ const Ct = "/mock-platform", Q = (e, t) => tt.get(`${Ct}${e}`, { params: t }).th
|
|
|
4356
4329
|
list: () => Q("/cases/list"),
|
|
4357
4330
|
get: (e) => Q("/cases/byCode", { caseCode: e }),
|
|
4358
4331
|
create: (e) => Z("/cases", e),
|
|
4359
|
-
update: (e, t) =>
|
|
4332
|
+
update: (e, t) => ht("/cases", t, { caseCode: e }),
|
|
4360
4333
|
delete: (e) => ve("/cases", { caseCode: e }),
|
|
4361
4334
|
run: (e) => Z("/cases/run", null, { caseCode: e }),
|
|
4362
4335
|
runBatch: (e) => Z("/cases/run-batch", { caseCodes: e })
|
|
@@ -4393,30 +4366,30 @@ const Ct = "/mock-platform", Q = (e, t) => tt.get(`${Ct}${e}`, { params: t }).th
|
|
|
4393
4366
|
sample: (e) => Q("/openapi/sample", { format: e })
|
|
4394
4367
|
}
|
|
4395
4368
|
}, { Text: me, Paragraph: Ya } = pe, Rn = { GET: "green", POST: "blue", PUT: "orange", DELETE: "red", PATCH: "purple" };
|
|
4396
|
-
function
|
|
4397
|
-
const [t, n] = $([]), [r, s] = $(!1), [o, i] = $(null), [c, l] = $(!1), [d, u] = $(null), [h, m] = $(""), C = h.trim() ? t.filter((
|
|
4369
|
+
function Vt({ activeEnvCode: e }) {
|
|
4370
|
+
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;
|
|
4398
4371
|
Y(() => {
|
|
4399
4372
|
O();
|
|
4400
4373
|
}, [e]);
|
|
4401
4374
|
const O = async () => {
|
|
4402
4375
|
s(!0), i(null);
|
|
4403
4376
|
try {
|
|
4404
|
-
const
|
|
4405
|
-
n(Array.isArray(
|
|
4406
|
-
} catch (
|
|
4407
|
-
i((
|
|
4377
|
+
const y = await J.endpoints.list(e);
|
|
4378
|
+
n(Array.isArray(y) ? y : []);
|
|
4379
|
+
} catch (y) {
|
|
4380
|
+
i((y == null ? void 0 : y.message) || "API unavailable"), n([]);
|
|
4408
4381
|
} finally {
|
|
4409
4382
|
s(!1);
|
|
4410
4383
|
}
|
|
4411
|
-
}, _ = (
|
|
4384
|
+
}, _ = (y) => `${window.location.origin}/api/mock/${y.env_code || e || "default"}${y.path || ""}`, x = [
|
|
4412
4385
|
{
|
|
4413
4386
|
title: "路径",
|
|
4414
4387
|
dataIndex: "path",
|
|
4415
4388
|
key: "path",
|
|
4416
4389
|
width: 280,
|
|
4417
|
-
render: (
|
|
4390
|
+
render: (y, A) => /* @__PURE__ */ p(U, { children: [
|
|
4418
4391
|
/* @__PURE__ */ a(E, { color: Rn[A.method] || "default", children: A.method }),
|
|
4419
|
-
/* @__PURE__ */ a(me, { code: !0, copyable: { text:
|
|
4392
|
+
/* @__PURE__ */ a(me, { code: !0, copyable: { text: y }, children: y })
|
|
4420
4393
|
] })
|
|
4421
4394
|
},
|
|
4422
4395
|
{ title: "编码", dataIndex: "mock_code", key: "mock_code", width: 160 },
|
|
@@ -4426,9 +4399,9 @@ function Wt({ activeEnvCode: e }) {
|
|
|
4426
4399
|
key: "priority",
|
|
4427
4400
|
width: 80,
|
|
4428
4401
|
align: "center",
|
|
4429
|
-
render: (
|
|
4402
|
+
render: (y) => /* @__PURE__ */ p(E, { color: "blue", children: [
|
|
4430
4403
|
"P",
|
|
4431
|
-
|
|
4404
|
+
y || 5
|
|
4432
4405
|
] })
|
|
4433
4406
|
},
|
|
4434
4407
|
{ title: "状态码", dataIndex: "status_code", key: "status_code", width: 80, align: "center" },
|
|
@@ -4438,8 +4411,8 @@ function Wt({ activeEnvCode: e }) {
|
|
|
4438
4411
|
key: "delay_ms",
|
|
4439
4412
|
width: 80,
|
|
4440
4413
|
align: "center",
|
|
4441
|
-
render: (
|
|
4442
|
-
|
|
4414
|
+
render: (y) => y > 0 ? /* @__PURE__ */ p(me, { type: "warning", children: [
|
|
4415
|
+
y,
|
|
4443
4416
|
"ms"
|
|
4444
4417
|
] }) : /* @__PURE__ */ a(me, { type: "secondary", children: "-" })
|
|
4445
4418
|
},
|
|
@@ -4448,14 +4421,14 @@ function Wt({ activeEnvCode: e }) {
|
|
|
4448
4421
|
dataIndex: "fault_type",
|
|
4449
4422
|
key: "fault_type",
|
|
4450
4423
|
width: 110,
|
|
4451
|
-
render: (
|
|
4424
|
+
render: (y) => y && y !== "NONE" ? /* @__PURE__ */ a(E, { color: "red", children: y }) : /* @__PURE__ */ a(me, { type: "secondary", children: "-" })
|
|
4452
4425
|
},
|
|
4453
4426
|
{
|
|
4454
4427
|
title: "场景",
|
|
4455
4428
|
dataIndex: "scenario_code",
|
|
4456
4429
|
key: "scenario_code",
|
|
4457
4430
|
width: 130,
|
|
4458
|
-
render: (
|
|
4431
|
+
render: (y) => y ? /* @__PURE__ */ a(E, { color: "purple", children: y }) : /* @__PURE__ */ a(me, { type: "secondary", children: "-" })
|
|
4459
4432
|
},
|
|
4460
4433
|
{
|
|
4461
4434
|
title: "命中",
|
|
@@ -4463,7 +4436,7 @@ function Wt({ activeEnvCode: e }) {
|
|
|
4463
4436
|
key: "hit_count",
|
|
4464
4437
|
width: 80,
|
|
4465
4438
|
align: "center",
|
|
4466
|
-
render: (
|
|
4439
|
+
render: (y) => /* @__PURE__ */ a(me, { strong: !0, children: y || 0 })
|
|
4467
4440
|
},
|
|
4468
4441
|
{
|
|
4469
4442
|
title: "状态",
|
|
@@ -4471,20 +4444,20 @@ function Wt({ activeEnvCode: e }) {
|
|
|
4471
4444
|
key: "status",
|
|
4472
4445
|
width: 100,
|
|
4473
4446
|
align: "center",
|
|
4474
|
-
render: (
|
|
4447
|
+
render: (y) => y === 1 ? /* @__PURE__ */ a(E, { color: "green", children: "启用" }) : /* @__PURE__ */ a(E, { children: "禁用" })
|
|
4475
4448
|
},
|
|
4476
4449
|
{
|
|
4477
4450
|
title: "操作",
|
|
4478
4451
|
key: "action",
|
|
4479
4452
|
width: 160,
|
|
4480
4453
|
fixed: "right",
|
|
4481
|
-
render: (
|
|
4454
|
+
render: (y, A) => /* @__PURE__ */ p(U, { size: "small", children: [
|
|
4482
4455
|
/* @__PURE__ */ a(Oe, { title: "预览响应", children: /* @__PURE__ */ a(
|
|
4483
4456
|
j,
|
|
4484
4457
|
{
|
|
4485
4458
|
size: "small",
|
|
4486
4459
|
type: "link",
|
|
4487
|
-
icon: /* @__PURE__ */ a(
|
|
4460
|
+
icon: /* @__PURE__ */ a(wt, {}),
|
|
4488
4461
|
onClick: () => {
|
|
4489
4462
|
u(A), l(!0);
|
|
4490
4463
|
},
|
|
@@ -4523,18 +4496,18 @@ function Wt({ activeEnvCode: e }) {
|
|
|
4523
4496
|
] }) }),
|
|
4524
4497
|
/* @__PURE__ */ a(D, { span: 6, children: /* @__PURE__ */ p(F, { children: [
|
|
4525
4498
|
/* @__PURE__ */ a("strong", { children: "已启用" }),
|
|
4526
|
-
/* @__PURE__ */ a("div", { style: { fontSize: 22, color: "#52c41a" }, children: t.filter((
|
|
4499
|
+
/* @__PURE__ */ a("div", { style: { fontSize: 22, color: "#52c41a" }, children: t.filter((y) => y.status === 1).length })
|
|
4527
4500
|
] }) }),
|
|
4528
4501
|
/* @__PURE__ */ a(D, { span: 6, children: /* @__PURE__ */ p(F, { children: [
|
|
4529
4502
|
/* @__PURE__ */ a("strong", { children: "已禁用" }),
|
|
4530
|
-
/* @__PURE__ */ a("div", { style: { fontSize: 22, color: "#ff4d4f" }, children: t.filter((
|
|
4503
|
+
/* @__PURE__ */ a("div", { style: { fontSize: 22, color: "#ff4d4f" }, children: t.filter((y) => y.status === 0).length })
|
|
4531
4504
|
] }) }),
|
|
4532
4505
|
/* @__PURE__ */ a(D, { span: 6, children: /* @__PURE__ */ p(F, { children: [
|
|
4533
4506
|
/* @__PURE__ */ a("strong", { children: "总命中" }),
|
|
4534
4507
|
/* @__PURE__ */ a("div", { style: {
|
|
4535
4508
|
fontSize: 22,
|
|
4536
4509
|
color: "#1890ff"
|
|
4537
|
-
}, children: t.reduce((
|
|
4510
|
+
}, children: t.reduce((y, A) => y + (A.hit_count || 0), 0) })
|
|
4538
4511
|
] }) })
|
|
4539
4512
|
] }),
|
|
4540
4513
|
/* @__PURE__ */ p(U, { style: { marginBottom: 16 }, children: [
|
|
@@ -4544,7 +4517,7 @@ function Wt({ activeEnvCode: e }) {
|
|
|
4544
4517
|
allowClear: !0,
|
|
4545
4518
|
placeholder: "按路径 / 编码过滤",
|
|
4546
4519
|
style: { width: 220 },
|
|
4547
|
-
onChange: (
|
|
4520
|
+
onChange: (y) => m(y.target.value)
|
|
4548
4521
|
}
|
|
4549
4522
|
),
|
|
4550
4523
|
/* @__PURE__ */ a(j, { icon: /* @__PURE__ */ a(ce, {}), onClick: O, children: "刷新" })
|
|
@@ -4562,7 +4535,7 @@ function Wt({ activeEnvCode: e }) {
|
|
|
4562
4535
|
}
|
|
4563
4536
|
),
|
|
4564
4537
|
/* @__PURE__ */ a(
|
|
4565
|
-
|
|
4538
|
+
We,
|
|
4566
4539
|
{
|
|
4567
4540
|
title: /* @__PURE__ */ p(U, { children: [
|
|
4568
4541
|
/* @__PURE__ */ a(xr, {}),
|
|
@@ -4611,8 +4584,8 @@ function Wt({ activeEnvCode: e }) {
|
|
|
4611
4584
|
)
|
|
4612
4585
|
] });
|
|
4613
4586
|
}
|
|
4614
|
-
const { Text:
|
|
4615
|
-
function
|
|
4587
|
+
const { Text: Nt } = pe, Qa = { MOCK: "green", REAL: "blue", MIXED: "orange" };
|
|
4588
|
+
function Wt({ onEnvChange: e }) {
|
|
4616
4589
|
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;
|
|
4617
4590
|
Y(() => {
|
|
4618
4591
|
l();
|
|
@@ -4633,7 +4606,7 @@ function Zt({ onEnvChange: e }) {
|
|
|
4633
4606
|
dataIndex: "env_code",
|
|
4634
4607
|
key: "env_code",
|
|
4635
4608
|
width: 140,
|
|
4636
|
-
render: (u) => /* @__PURE__ */ a(
|
|
4609
|
+
render: (u) => /* @__PURE__ */ a(Nt, { code: !0, children: u })
|
|
4637
4610
|
},
|
|
4638
4611
|
{ title: "环境名称", dataIndex: "env_name", key: "env_name", width: 160 },
|
|
4639
4612
|
{
|
|
@@ -4647,7 +4620,7 @@ function Zt({ onEnvChange: e }) {
|
|
|
4647
4620
|
title: "真实服务地址",
|
|
4648
4621
|
dataIndex: "base_url",
|
|
4649
4622
|
key: "base_url",
|
|
4650
|
-
render: (u) => u ? /* @__PURE__ */ a(
|
|
4623
|
+
render: (u) => u ? /* @__PURE__ */ a(Nt, { copyable: !0, children: u }) : /* @__PURE__ */ a(Nt, { type: "secondary", children: "-" })
|
|
4651
4624
|
},
|
|
4652
4625
|
{
|
|
4653
4626
|
title: "默认",
|
|
@@ -4878,13 +4851,13 @@ function to() {
|
|
|
4878
4851
|
)
|
|
4879
4852
|
] });
|
|
4880
4853
|
}
|
|
4881
|
-
const { Text: be } = pe,
|
|
4854
|
+
const { Text: be } = pe, Ut = { PASS: "green", FAIL: "red", SKIP: "default" }, no = { P0: "red", P1: "orange", P2: "blue", P3: "default" };
|
|
4882
4855
|
function ro() {
|
|
4883
4856
|
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;
|
|
4884
4857
|
Y(() => {
|
|
4885
|
-
|
|
4858
|
+
y();
|
|
4886
4859
|
}, []);
|
|
4887
|
-
const
|
|
4860
|
+
const y = async () => {
|
|
4888
4861
|
r(!0);
|
|
4889
4862
|
try {
|
|
4890
4863
|
const T = await J.cases.list();
|
|
@@ -4897,7 +4870,7 @@ function ro() {
|
|
|
4897
4870
|
}, A = async (T) => {
|
|
4898
4871
|
try {
|
|
4899
4872
|
const M = await J.cases.run(T.case_code);
|
|
4900
|
-
d(M), c(!0), (M == null ? void 0 : M.status) === "PASS" ? v.success("用例通过") : v.error("用例失败: " + ((M == null ? void 0 : M.error) || (M == null ? void 0 : M.actualStatus))),
|
|
4873
|
+
d(M), c(!0), (M == null ? void 0 : M.status) === "PASS" ? v.success("用例通过") : v.error("用例失败: " + ((M == null ? void 0 : M.error) || (M == null ? void 0 : M.actualStatus))), y();
|
|
4901
4874
|
} catch (M) {
|
|
4902
4875
|
v.error("执行失败: " + (M == null ? void 0 : M.message));
|
|
4903
4876
|
}
|
|
@@ -4908,7 +4881,7 @@ function ro() {
|
|
|
4908
4881
|
}
|
|
4909
4882
|
try {
|
|
4910
4883
|
const T = await J.cases.runBatch(s);
|
|
4911
|
-
h(T), C(!0), v.success(`批量执行完成: ${T == null ? void 0 : T.pass} 通过, ${T == null ? void 0 : T.fail} 失败`),
|
|
4884
|
+
h(T), C(!0), v.success(`批量执行完成: ${T == null ? void 0 : T.pass} 通过, ${T == null ? void 0 : T.fail} 失败`), y();
|
|
4912
4885
|
} catch {
|
|
4913
4886
|
v.error("批量执行失败");
|
|
4914
4887
|
}
|
|
@@ -4956,7 +4929,7 @@ function ro() {
|
|
|
4956
4929
|
key: "last_run_result",
|
|
4957
4930
|
width: 100,
|
|
4958
4931
|
align: "center",
|
|
4959
|
-
render: (T) => T ? /* @__PURE__ */ a(E, { color:
|
|
4932
|
+
render: (T) => T ? /* @__PURE__ */ a(E, { color: Ut[T], children: T }) : "-"
|
|
4960
4933
|
},
|
|
4961
4934
|
{
|
|
4962
4935
|
title: "统计",
|
|
@@ -4984,7 +4957,7 @@ function ro() {
|
|
|
4984
4957
|
{
|
|
4985
4958
|
size: "small",
|
|
4986
4959
|
type: "link",
|
|
4987
|
-
icon: /* @__PURE__ */ a(
|
|
4960
|
+
icon: /* @__PURE__ */ a(wt, {}),
|
|
4988
4961
|
onClick: () => A(M),
|
|
4989
4962
|
children: "运行"
|
|
4990
4963
|
}
|
|
@@ -5012,12 +4985,12 @@ function ro() {
|
|
|
5012
4985
|
onChange: (T) => _(T.target.value)
|
|
5013
4986
|
}
|
|
5014
4987
|
),
|
|
5015
|
-
/* @__PURE__ */ a(j, { icon: /* @__PURE__ */ a(ce, {}), onClick:
|
|
4988
|
+
/* @__PURE__ */ a(j, { icon: /* @__PURE__ */ a(ce, {}), onClick: y, children: "刷新" }),
|
|
5016
4989
|
/* @__PURE__ */ p(
|
|
5017
4990
|
j,
|
|
5018
4991
|
{
|
|
5019
4992
|
type: "primary",
|
|
5020
|
-
icon: /* @__PURE__ */ a(
|
|
4993
|
+
icon: /* @__PURE__ */ a(wt, {}),
|
|
5021
4994
|
onClick: k,
|
|
5022
4995
|
disabled: s.length === 0,
|
|
5023
4996
|
children: [
|
|
@@ -5047,7 +5020,7 @@ function ro() {
|
|
|
5047
5020
|
}
|
|
5048
5021
|
),
|
|
5049
5022
|
/* @__PURE__ */ a(
|
|
5050
|
-
|
|
5023
|
+
We,
|
|
5051
5024
|
{
|
|
5052
5025
|
title: /* @__PURE__ */ p(U, { children: [
|
|
5053
5026
|
/* @__PURE__ */ a(Er, {}),
|
|
@@ -5063,7 +5036,7 @@ function ro() {
|
|
|
5063
5036
|
{
|
|
5064
5037
|
title: "结果",
|
|
5065
5038
|
value: l.status,
|
|
5066
|
-
styles: { content: { color:
|
|
5039
|
+
styles: { content: { color: Ut[l.status] === "green" ? "#52c41a" : "#ff4d4f" } }
|
|
5067
5040
|
}
|
|
5068
5041
|
) }) }),
|
|
5069
5042
|
/* @__PURE__ */ a(D, { span: 8, children: /* @__PURE__ */ a(F, { children: /* @__PURE__ */ a(X, { title: "实际状态码", value: l.actualStatus || "-" }) }) }),
|
|
@@ -5074,7 +5047,7 @@ function ro() {
|
|
|
5074
5047
|
/* @__PURE__ */ a(z.Item, { label: "用例名称", children: l.caseName }),
|
|
5075
5048
|
/* @__PURE__ */ a(z.Item, { label: "错误信息", children: l.error || "-" })
|
|
5076
5049
|
] }),
|
|
5077
|
-
l.assertionResults && /* @__PURE__ */ p(
|
|
5050
|
+
l.assertionResults && /* @__PURE__ */ p(zt, { children: [
|
|
5078
5051
|
/* @__PURE__ */ a(be, { strong: !0, children: "断言详情:" }),
|
|
5079
5052
|
/* @__PURE__ */ a(
|
|
5080
5053
|
ie,
|
|
@@ -5122,7 +5095,7 @@ function ro() {
|
|
|
5122
5095
|
onCancel: () => C(!1),
|
|
5123
5096
|
footer: /* @__PURE__ */ a(j, { onClick: () => C(!1), children: "关闭" }),
|
|
5124
5097
|
size: "large",
|
|
5125
|
-
children: u && /* @__PURE__ */ p(
|
|
5098
|
+
children: u && /* @__PURE__ */ p(zt, { children: [
|
|
5126
5099
|
/* @__PURE__ */ p(se, { gutter: 16, style: { marginBottom: 16 }, children: [
|
|
5127
5100
|
/* @__PURE__ */ a(D, { span: 6, children: /* @__PURE__ */ a(F, { children: /* @__PURE__ */ a(X, { title: "总数", value: u.total }) }) }),
|
|
5128
5101
|
/* @__PURE__ */ a(D, { span: 6, children: /* @__PURE__ */ a(F, { children: /* @__PURE__ */ a(
|
|
@@ -5161,7 +5134,7 @@ function ro() {
|
|
|
5161
5134
|
dataIndex: "status",
|
|
5162
5135
|
key: "status",
|
|
5163
5136
|
width: 80,
|
|
5164
|
-
render: (T) => /* @__PURE__ */ a(E, { color:
|
|
5137
|
+
render: (T) => /* @__PURE__ */ a(E, { color: Ut[T], children: T })
|
|
5165
5138
|
},
|
|
5166
5139
|
{ title: "耗时", dataIndex: "durationMs", key: "durationMs", width: 80, align: "center" },
|
|
5167
5140
|
{ title: "错误", dataIndex: "error", key: "error", ellipsis: !0 }
|
|
@@ -5199,8 +5172,8 @@ function so() {
|
|
|
5199
5172
|
}
|
|
5200
5173
|
}, O = async (x) => {
|
|
5201
5174
|
try {
|
|
5202
|
-
const
|
|
5203
|
-
c(x), d(Array.isArray(
|
|
5175
|
+
const y = await J.recordings.requests(x.recording_code);
|
|
5176
|
+
c(x), d(Array.isArray(y) ? y : []), o(!0);
|
|
5204
5177
|
} catch {
|
|
5205
5178
|
v.error("加载失败");
|
|
5206
5179
|
}
|
|
@@ -5241,13 +5214,13 @@ function so() {
|
|
|
5241
5214
|
key: "action",
|
|
5242
5215
|
width: 120,
|
|
5243
5216
|
fixed: "right",
|
|
5244
|
-
render: (x,
|
|
5217
|
+
render: (x, y) => /* @__PURE__ */ a(U, { size: "small", children: /* @__PURE__ */ a(
|
|
5245
5218
|
j,
|
|
5246
5219
|
{
|
|
5247
5220
|
size: "small",
|
|
5248
5221
|
type: "link",
|
|
5249
5222
|
icon: /* @__PURE__ */ a(on, {}),
|
|
5250
|
-
onClick: () => O(
|
|
5223
|
+
onClick: () => O(y),
|
|
5251
5224
|
children: "详情"
|
|
5252
5225
|
}
|
|
5253
5226
|
) })
|
|
@@ -5297,7 +5270,7 @@ function so() {
|
|
|
5297
5270
|
}
|
|
5298
5271
|
),
|
|
5299
5272
|
/* @__PURE__ */ a(
|
|
5300
|
-
|
|
5273
|
+
We,
|
|
5301
5274
|
{
|
|
5302
5275
|
title: /* @__PURE__ */ p(U, { children: [
|
|
5303
5276
|
/* @__PURE__ */ a(on, {}),
|
|
@@ -5377,7 +5350,7 @@ function oo() {
|
|
|
5377
5350
|
const O = async () => {
|
|
5378
5351
|
o(!0);
|
|
5379
5352
|
try {
|
|
5380
|
-
const [
|
|
5353
|
+
const [y, A] = await Promise.all([
|
|
5381
5354
|
J.requestLogs.list({
|
|
5382
5355
|
path: u || void 0,
|
|
5383
5356
|
matched: m,
|
|
@@ -5385,42 +5358,42 @@ function oo() {
|
|
|
5385
5358
|
}),
|
|
5386
5359
|
J.requestLogs.stats().catch(() => null)
|
|
5387
5360
|
]);
|
|
5388
|
-
t(Array.isArray(
|
|
5361
|
+
t(Array.isArray(y) ? y : []), r(A);
|
|
5389
5362
|
} catch {
|
|
5390
5363
|
v.warning("加载失败");
|
|
5391
5364
|
} finally {
|
|
5392
5365
|
o(!1);
|
|
5393
5366
|
}
|
|
5394
|
-
}, _ = (
|
|
5395
|
-
c(
|
|
5367
|
+
}, _ = (y) => {
|
|
5368
|
+
c(y), d(!0);
|
|
5396
5369
|
}, x = [
|
|
5397
5370
|
{
|
|
5398
5371
|
title: "时间",
|
|
5399
5372
|
dataIndex: "create_time",
|
|
5400
5373
|
key: "create_time",
|
|
5401
5374
|
width: 170,
|
|
5402
|
-
render: (
|
|
5375
|
+
render: (y) => y ? new Date(y).toLocaleString() : "-"
|
|
5403
5376
|
},
|
|
5404
5377
|
{
|
|
5405
5378
|
title: "环境",
|
|
5406
5379
|
dataIndex: "env_code",
|
|
5407
5380
|
key: "env_code",
|
|
5408
5381
|
width: 100,
|
|
5409
|
-
render: (
|
|
5382
|
+
render: (y) => /* @__PURE__ */ a(E, { children: y })
|
|
5410
5383
|
},
|
|
5411
5384
|
{
|
|
5412
5385
|
title: "方法",
|
|
5413
5386
|
dataIndex: "request_method",
|
|
5414
5387
|
key: "request_method",
|
|
5415
5388
|
width: 80,
|
|
5416
|
-
render: (
|
|
5389
|
+
render: (y) => /* @__PURE__ */ a(E, { color: "blue", children: y })
|
|
5417
5390
|
},
|
|
5418
5391
|
{
|
|
5419
5392
|
title: "路径",
|
|
5420
5393
|
dataIndex: "request_path",
|
|
5421
5394
|
key: "request_path",
|
|
5422
5395
|
ellipsis: !0,
|
|
5423
|
-
render: (
|
|
5396
|
+
render: (y) => /* @__PURE__ */ a(Ee, { code: !0, children: y })
|
|
5424
5397
|
},
|
|
5425
5398
|
{
|
|
5426
5399
|
title: "状态",
|
|
@@ -5428,7 +5401,7 @@ function oo() {
|
|
|
5428
5401
|
key: "response_status",
|
|
5429
5402
|
width: 90,
|
|
5430
5403
|
align: "center",
|
|
5431
|
-
render: (
|
|
5404
|
+
render: (y) => y ? /* @__PURE__ */ a(E, { color: y >= 400 ? "red" : "green", children: y }) : "-"
|
|
5432
5405
|
},
|
|
5433
5406
|
{
|
|
5434
5407
|
title: "匹配",
|
|
@@ -5436,14 +5409,14 @@ function oo() {
|
|
|
5436
5409
|
key: "matched",
|
|
5437
5410
|
width: 90,
|
|
5438
5411
|
align: "center",
|
|
5439
|
-
render: (
|
|
5412
|
+
render: (y) => y === 1 ? /* @__PURE__ */ a(E, { color: "green", children: "命中" }) : /* @__PURE__ */ a(E, { color: "red", children: "未匹配" })
|
|
5440
5413
|
},
|
|
5441
5414
|
{
|
|
5442
5415
|
title: "回退",
|
|
5443
5416
|
dataIndex: "fallback_type",
|
|
5444
5417
|
key: "fallback_type",
|
|
5445
5418
|
width: 100,
|
|
5446
|
-
render: (
|
|
5419
|
+
render: (y) => y ? /* @__PURE__ */ a(E, { color: ao[y], children: y }) : "-"
|
|
5447
5420
|
},
|
|
5448
5421
|
{
|
|
5449
5422
|
title: "耗时",
|
|
@@ -5451,7 +5424,7 @@ function oo() {
|
|
|
5451
5424
|
key: "duration_ms",
|
|
5452
5425
|
width: 80,
|
|
5453
5426
|
align: "center",
|
|
5454
|
-
render: (
|
|
5427
|
+
render: (y) => `${y || 0}ms`
|
|
5455
5428
|
},
|
|
5456
5429
|
{
|
|
5457
5430
|
title: "Mock",
|
|
@@ -5459,13 +5432,13 @@ function oo() {
|
|
|
5459
5432
|
key: "mock_code",
|
|
5460
5433
|
width: 160,
|
|
5461
5434
|
ellipsis: !0,
|
|
5462
|
-
render: (
|
|
5435
|
+
render: (y) => y ? /* @__PURE__ */ a(Ee, { code: !0, children: y }) : "-"
|
|
5463
5436
|
},
|
|
5464
5437
|
{
|
|
5465
5438
|
title: "操作",
|
|
5466
5439
|
key: "action",
|
|
5467
5440
|
width: 80,
|
|
5468
|
-
render: (
|
|
5441
|
+
render: (y, A) => /* @__PURE__ */ a(
|
|
5469
5442
|
j,
|
|
5470
5443
|
{
|
|
5471
5444
|
size: "small",
|
|
@@ -5523,7 +5496,7 @@ function oo() {
|
|
|
5523
5496
|
allowClear: !0,
|
|
5524
5497
|
style: { width: 240 },
|
|
5525
5498
|
value: u,
|
|
5526
|
-
onChange: (
|
|
5499
|
+
onChange: (y) => h(y.target.value),
|
|
5527
5500
|
onPressEnter: O
|
|
5528
5501
|
}
|
|
5529
5502
|
),
|
|
@@ -5556,7 +5529,7 @@ function oo() {
|
|
|
5556
5529
|
}
|
|
5557
5530
|
),
|
|
5558
5531
|
/* @__PURE__ */ a(
|
|
5559
|
-
|
|
5532
|
+
We,
|
|
5560
5533
|
{
|
|
5561
5534
|
title: "请求详情",
|
|
5562
5535
|
open: l,
|
|
@@ -5646,8 +5619,8 @@ function oo() {
|
|
|
5646
5619
|
] });
|
|
5647
5620
|
}
|
|
5648
5621
|
const { Text: le } = pe, Mn = [
|
|
5649
|
-
{ key: "endpoints", label: "Mock 端点", component:
|
|
5650
|
-
{ key: "environments", label: "环境 (MOCK/REAL/MIXED)", component:
|
|
5622
|
+
{ key: "endpoints", label: "Mock 端点", component: Vt },
|
|
5623
|
+
{ key: "environments", label: "环境 (MOCK/REAL/MIXED)", component: Wt },
|
|
5651
5624
|
{ key: "scenarios", label: "场景状态机", component: to },
|
|
5652
5625
|
{ key: "cases", label: "测试用例", component: ro },
|
|
5653
5626
|
{ key: "recordings", label: "录制回放", component: so },
|
|
@@ -5684,7 +5657,7 @@ function io() {
|
|
|
5684
5657
|
}
|
|
5685
5658
|
),
|
|
5686
5659
|
/* @__PURE__ */ a(
|
|
5687
|
-
|
|
5660
|
+
Ze,
|
|
5688
5661
|
{
|
|
5689
5662
|
activeKey: e,
|
|
5690
5663
|
onChange: t,
|
|
@@ -5738,7 +5711,7 @@ function io() {
|
|
|
5738
5711
|
items: Mn.map((h) => ({
|
|
5739
5712
|
key: h.key,
|
|
5740
5713
|
label: h.label,
|
|
5741
|
-
children: h.component ===
|
|
5714
|
+
children: h.component === Vt ? /* @__PURE__ */ a(Vt, { activeEnvCode: s }) : h.component === Wt ? /* @__PURE__ */ a(Wt, { onEnvChange: (m) => {
|
|
5742
5715
|
o(m), v.success(`已切换到环境: ${m}`);
|
|
5743
5716
|
} }) : /* @__PURE__ */ a(h.component, {})
|
|
5744
5717
|
}))
|
|
@@ -5746,13 +5719,13 @@ function io() {
|
|
|
5746
5719
|
)
|
|
5747
5720
|
] });
|
|
5748
5721
|
}
|
|
5749
|
-
const
|
|
5722
|
+
const Sl = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
5750
5723
|
__proto__: null,
|
|
5751
5724
|
default: io
|
|
5752
|
-
}, Symbol.toStringTag, { value: "Module" })), { Text:
|
|
5725
|
+
}, Symbol.toStringTag, { value: "Module" })), { Text: Le, Paragraph: wl } = pe, jn = [
|
|
5753
5726
|
{
|
|
5754
5727
|
group: "基础数据",
|
|
5755
|
-
icon: /* @__PURE__ */ a(
|
|
5728
|
+
icon: /* @__PURE__ */ a(Fe, {}),
|
|
5756
5729
|
items: [
|
|
5757
5730
|
{ syntax: "@uuid", desc: "随机 UUID", example: "a3f2e1b7-8c4d-4e6f-9a1b-2c3d4e5f6a7b" },
|
|
5758
5731
|
{ syntax: "@int(1, 100)", desc: "随机整数(含边界)", example: "42" },
|
|
@@ -5763,7 +5736,7 @@ const Tl = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
5763
5736
|
},
|
|
5764
5737
|
{
|
|
5765
5738
|
group: "时间相关",
|
|
5766
|
-
icon: /* @__PURE__ */ a(
|
|
5739
|
+
icon: /* @__PURE__ */ a(tt, {}),
|
|
5767
5740
|
items: [
|
|
5768
5741
|
{ syntax: "@datetime", desc: "当前时间 (yyyy-MM-dd HH:mm:ss)", example: "2026-06-17 22:30:15" },
|
|
5769
5742
|
{ syntax: "@date", desc: "当前日期 (yyyy-MM-dd)", example: "2026-06-17" },
|
|
@@ -5773,7 +5746,7 @@ const Tl = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
5773
5746
|
},
|
|
5774
5747
|
{
|
|
5775
5748
|
group: "文本生成",
|
|
5776
|
-
icon: /* @__PURE__ */ a(
|
|
5749
|
+
icon: /* @__PURE__ */ a(tt, {}),
|
|
5777
5750
|
items: [
|
|
5778
5751
|
{ syntax: "@name", desc: "随机中文姓名", example: "张伟" },
|
|
5779
5752
|
{ syntax: "@firstName", desc: "随机名", example: "伟" },
|
|
@@ -5788,7 +5761,7 @@ const Tl = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
5788
5761
|
},
|
|
5789
5762
|
{
|
|
5790
5763
|
group: "序列与状态",
|
|
5791
|
-
icon: /* @__PURE__ */ a(
|
|
5764
|
+
icon: /* @__PURE__ */ a(tt, {}),
|
|
5792
5765
|
items: [
|
|
5793
5766
|
{ syntax: "@sequence(1)", desc: "自增序号(每次调用 +1,1 起始)", example: "1, 2, 3, ..." },
|
|
5794
5767
|
{ syntax: "@sequence(100, 5)", desc: "自增序号(100 起始,步长 5)", example: "100, 105, 110, ..." }
|
|
@@ -5796,7 +5769,7 @@ const Tl = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
5796
5769
|
},
|
|
5797
5770
|
{
|
|
5798
5771
|
group: "请求上下文",
|
|
5799
|
-
icon: /* @__PURE__ */ a(
|
|
5772
|
+
icon: /* @__PURE__ */ a(tt, {}),
|
|
5800
5773
|
items: [
|
|
5801
5774
|
{ syntax: "#path.id", desc: "从 URL 路径取值 /users/123 → 123", example: "123" },
|
|
5802
5775
|
{ syntax: "#query.page", desc: "从 query string 取值 ?page=2", example: "2" },
|
|
@@ -5805,7 +5778,7 @@ const Tl = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
5805
5778
|
]
|
|
5806
5779
|
}
|
|
5807
5780
|
];
|
|
5808
|
-
function
|
|
5781
|
+
function _l({ onInsert: e, form: t, formField: n = "responseTemplate" }) {
|
|
5809
5782
|
const [r, s] = $(""), o = (h) => {
|
|
5810
5783
|
var m;
|
|
5811
5784
|
try {
|
|
@@ -5838,8 +5811,8 @@ function Il({ onInsert: e, form: t, formField: n = "responseTemplate" }) {
|
|
|
5838
5811
|
{
|
|
5839
5812
|
size: "small",
|
|
5840
5813
|
title: /* @__PURE__ */ p(U, { children: [
|
|
5841
|
-
/* @__PURE__ */ a(
|
|
5842
|
-
/* @__PURE__ */ a(
|
|
5814
|
+
/* @__PURE__ */ a(Fe, {}),
|
|
5815
|
+
/* @__PURE__ */ a(Le, { strong: !0, children: "模板表达式" }),
|
|
5843
5816
|
/* @__PURE__ */ p(E, { color: "blue", children: [
|
|
5844
5817
|
u,
|
|
5845
5818
|
"/",
|
|
@@ -5862,11 +5835,11 @@ function Il({ onInsert: e, form: t, formField: n = "responseTemplate" }) {
|
|
|
5862
5835
|
style: { marginTop: 8, background: "#fafafa" },
|
|
5863
5836
|
styles: { body: { padding: 12, maxHeight: 320, overflow: "auto" } },
|
|
5864
5837
|
children: [
|
|
5865
|
-
l.length === 0 && /* @__PURE__ */ a(
|
|
5838
|
+
l.length === 0 && /* @__PURE__ */ a(Le, { type: "secondary", style: { display: "block", textAlign: "center", padding: 16 }, children: "没有匹配的表达式" }),
|
|
5866
5839
|
l.map((h) => /* @__PURE__ */ p("div", { style: { marginBottom: 12 }, children: [
|
|
5867
5840
|
/* @__PURE__ */ p(U, { size: 4, style: { marginBottom: 6 }, children: [
|
|
5868
5841
|
h.icon,
|
|
5869
|
-
/* @__PURE__ */ a(
|
|
5842
|
+
/* @__PURE__ */ a(Le, { strong: !0, style: { fontSize: 13 }, children: h.group }),
|
|
5870
5843
|
/* @__PURE__ */ a(E, { children: h.items.length })
|
|
5871
5844
|
] }),
|
|
5872
5845
|
/* @__PURE__ */ a(se, { gutter: [8, 8], children: h.items.map((m) => /* @__PURE__ */ a(D, { span: 24, children: /* @__PURE__ */ p(
|
|
@@ -5883,7 +5856,7 @@ function Il({ onInsert: e, form: t, formField: n = "responseTemplate" }) {
|
|
|
5883
5856
|
},
|
|
5884
5857
|
children: [
|
|
5885
5858
|
/* @__PURE__ */ a(Oe, { title: "点击复制", children: /* @__PURE__ */ a(
|
|
5886
|
-
|
|
5859
|
+
Le,
|
|
5887
5860
|
{
|
|
5888
5861
|
code: !0,
|
|
5889
5862
|
style: { cursor: "pointer", minWidth: 140, fontSize: 12 },
|
|
@@ -5891,7 +5864,7 @@ function Il({ onInsert: e, form: t, formField: n = "responseTemplate" }) {
|
|
|
5891
5864
|
children: m.syntax
|
|
5892
5865
|
}
|
|
5893
5866
|
) }),
|
|
5894
|
-
/* @__PURE__ */ a(
|
|
5867
|
+
/* @__PURE__ */ a(Le, { type: "secondary", style: { fontSize: 12, flex: 1 }, children: m.desc }),
|
|
5895
5868
|
/* @__PURE__ */ a(E, { color: "default", style: { margin: 0, fontFamily: "monospace" }, children: m.example }),
|
|
5896
5869
|
/* @__PURE__ */ a(Oe, { title: "插入到响应模板", children: /* @__PURE__ */ a(
|
|
5897
5870
|
j,
|
|
@@ -5911,8 +5884,8 @@ function Il({ onInsert: e, form: t, formField: n = "responseTemplate" }) {
|
|
|
5911
5884
|
);
|
|
5912
5885
|
}
|
|
5913
5886
|
const { TextArea: Nn } = B, { Text: Re, Paragraph: co } = pe;
|
|
5914
|
-
function
|
|
5915
|
-
const [s, o] = $(""), [i, c] = $(null), [l, d] = $(null), [u, h] = $(!1), [m, C] = $(null), [O, _] = $(!1), [x,
|
|
5887
|
+
function Tl({ open: e, onClose: t, onSuccess: n, envOptions: r = [] }) {
|
|
5888
|
+
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 = () => {
|
|
5916
5889
|
o(""), c(null), d(null), C(null), A.resetFields(), k.resetFields();
|
|
5917
5890
|
}, T = () => {
|
|
5918
5891
|
P(), t();
|
|
@@ -6012,7 +5985,7 @@ function Cl({ open: e, onClose: t, onSuccess: n, envOptions: r = [] }) {
|
|
|
6012
5985
|
Ne,
|
|
6013
5986
|
{
|
|
6014
5987
|
title: /* @__PURE__ */ p(U, { children: [
|
|
6015
|
-
/* @__PURE__ */ a(
|
|
5988
|
+
/* @__PURE__ */ a(Fe, {}),
|
|
6016
5989
|
" 粘贴 curl 一键导入"
|
|
6017
5990
|
] }),
|
|
6018
5991
|
open: e,
|
|
@@ -6036,8 +6009,8 @@ function Cl({ open: e, onClose: t, onSuccess: n, envOptions: r = [] }) {
|
|
|
6036
6009
|
}
|
|
6037
6010
|
),
|
|
6038
6011
|
/* @__PURE__ */ p(U, { style: { marginTop: 12 }, children: [
|
|
6039
|
-
/* @__PURE__ */ a(j, { icon: /* @__PURE__ */ a(
|
|
6040
|
-
/* @__PURE__ */ a(j, { icon: /* @__PURE__ */ a(
|
|
6012
|
+
/* @__PURE__ */ a(j, { icon: /* @__PURE__ */ a(Yt, {}), onClick: M, type: "primary", ghost: !0, children: "解析" }),
|
|
6013
|
+
/* @__PURE__ */ a(j, { icon: /* @__PURE__ */ a(He, {}), onClick: K, loading: u, children: "直接执行(试跑)" })
|
|
6041
6014
|
] }),
|
|
6042
6015
|
l && /* @__PURE__ */ a(ee, { type: "error", showIcon: !0, style: { marginTop: 12 }, title: "解析失败", description: l }),
|
|
6043
6016
|
i && /* @__PURE__ */ a(F, { size: "small", style: { marginTop: 16 }, title: "解析结果", children: /* @__PURE__ */ p(z, { column: 1, size: "small", bordered: !0, children: [
|
|
@@ -6063,7 +6036,7 @@ function Cl({ open: e, onClose: t, onSuccess: n, envOptions: r = [] }) {
|
|
|
6063
6036
|
}, children: i.body }) })
|
|
6064
6037
|
] }) }),
|
|
6065
6038
|
m && /* @__PURE__ */ p(F, { size: "small", style: { marginTop: 16 }, title: /* @__PURE__ */ p(U, { children: [
|
|
6066
|
-
/* @__PURE__ */ a(
|
|
6039
|
+
/* @__PURE__ */ a(He, {}),
|
|
6067
6040
|
/* @__PURE__ */ a("span", { children: "试跑结果" }),
|
|
6068
6041
|
m.success ? /* @__PURE__ */ p(E, { color: "green", children: [
|
|
6069
6042
|
m.status,
|
|
@@ -6085,16 +6058,16 @@ function Cl({ open: e, onClose: t, onSuccess: n, envOptions: r = [] }) {
|
|
|
6085
6058
|
}, children: m.body })
|
|
6086
6059
|
] }),
|
|
6087
6060
|
i && /* @__PURE__ */ a(
|
|
6088
|
-
|
|
6061
|
+
Ze,
|
|
6089
6062
|
{
|
|
6090
6063
|
activeKey: x,
|
|
6091
|
-
onChange:
|
|
6064
|
+
onChange: y,
|
|
6092
6065
|
style: { marginTop: 16 },
|
|
6093
6066
|
items: [
|
|
6094
6067
|
{
|
|
6095
6068
|
key: "import",
|
|
6096
6069
|
label: /* @__PURE__ */ p("span", { children: [
|
|
6097
|
-
/* @__PURE__ */ a(
|
|
6070
|
+
/* @__PURE__ */ a(Ft, {}),
|
|
6098
6071
|
" 导入为测试用例"
|
|
6099
6072
|
] }),
|
|
6100
6073
|
children: /* @__PURE__ */ p(N, { form: A, layout: "vertical", children: [
|
|
@@ -6109,7 +6082,7 @@ function Cl({ open: e, onClose: t, onSuccess: n, envOptions: r = [] }) {
|
|
|
6109
6082
|
type: "primary",
|
|
6110
6083
|
onClick: I,
|
|
6111
6084
|
loading: O,
|
|
6112
|
-
icon: /* @__PURE__ */ a(
|
|
6085
|
+
icon: /* @__PURE__ */ a(Ft, {}),
|
|
6113
6086
|
children: "保存为测试用例"
|
|
6114
6087
|
}
|
|
6115
6088
|
)
|
|
@@ -6118,7 +6091,7 @@ function Cl({ open: e, onClose: t, onSuccess: n, envOptions: r = [] }) {
|
|
|
6118
6091
|
{
|
|
6119
6092
|
key: "mock",
|
|
6120
6093
|
label: /* @__PURE__ */ p("span", { children: [
|
|
6121
|
-
/* @__PURE__ */ a(
|
|
6094
|
+
/* @__PURE__ */ a(Fe, {}),
|
|
6122
6095
|
" 导入为 Mock 端点"
|
|
6123
6096
|
] }),
|
|
6124
6097
|
children: /* @__PURE__ */ p(N, { form: k, layout: "vertical", children: [
|
|
@@ -6140,7 +6113,7 @@ function Cl({ open: e, onClose: t, onSuccess: n, envOptions: r = [] }) {
|
|
|
6140
6113
|
type: "primary",
|
|
6141
6114
|
onClick: w,
|
|
6142
6115
|
loading: O,
|
|
6143
|
-
icon: /* @__PURE__ */ a(
|
|
6116
|
+
icon: /* @__PURE__ */ a(Fe, {}),
|
|
6144
6117
|
children: "保存为 Mock 端点"
|
|
6145
6118
|
}
|
|
6146
6119
|
)
|
|
@@ -6157,8 +6130,8 @@ function lo(e) {
|
|
|
6157
6130
|
return { GET: "blue", POST: "green", PUT: "orange", DELETE: "red", PATCH: "purple" }[e] || "default";
|
|
6158
6131
|
}
|
|
6159
6132
|
const { TextArea: Un } = B;
|
|
6160
|
-
function
|
|
6161
|
-
const [s, o] = $("paste"), [i, c] = $(""), [l, d] = $(null), [u, h] = $(null), [m, C] = $(!1), [O, _] = $([]), [x,
|
|
6133
|
+
function kl({ open: e, onClose: t, onSuccess: n, envOptions: r = [] }) {
|
|
6134
|
+
const [s, o] = $("paste"), [i, c] = $(""), [l, d] = $(null), [u, h] = $(null), [m, C] = $(!1), [O, _] = $([]), [x, y] = $(!1), [A] = N.useForm(), k = Fn(null), P = () => {
|
|
6162
6135
|
c(""), d(null), h(null), _([]), A.resetFields();
|
|
6163
6136
|
}, T = () => {
|
|
6164
6137
|
P(), t();
|
|
@@ -6211,7 +6184,7 @@ function Al({ open: e, onClose: t, onSuccess: n, envOptions: r = [] }) {
|
|
|
6211
6184
|
} catch {
|
|
6212
6185
|
return;
|
|
6213
6186
|
}
|
|
6214
|
-
|
|
6187
|
+
y(!0);
|
|
6215
6188
|
try {
|
|
6216
6189
|
const G = (l.endpoints || []).map((W, an) => ({
|
|
6217
6190
|
method: W.method,
|
|
@@ -6230,7 +6203,7 @@ function Al({ open: e, onClose: t, onSuccess: n, envOptions: r = [] }) {
|
|
|
6230
6203
|
} catch (G) {
|
|
6231
6204
|
v.error(String((G == null ? void 0 : G.message) || G));
|
|
6232
6205
|
} finally {
|
|
6233
|
-
|
|
6206
|
+
y(!1);
|
|
6234
6207
|
}
|
|
6235
6208
|
}, L = [
|
|
6236
6209
|
{
|
|
@@ -6276,7 +6249,7 @@ function Al({ open: e, onClose: t, onSuccess: n, envOptions: r = [] }) {
|
|
|
6276
6249
|
destroyOnHidden: !0,
|
|
6277
6250
|
children: [
|
|
6278
6251
|
/* @__PURE__ */ a(
|
|
6279
|
-
|
|
6252
|
+
Ze,
|
|
6280
6253
|
{
|
|
6281
6254
|
activeKey: s,
|
|
6282
6255
|
onChange: o,
|
|
@@ -6284,7 +6257,7 @@ function Al({ open: e, onClose: t, onSuccess: n, envOptions: r = [] }) {
|
|
|
6284
6257
|
{
|
|
6285
6258
|
key: "paste",
|
|
6286
6259
|
label: /* @__PURE__ */ p("span", { children: [
|
|
6287
|
-
/* @__PURE__ */ a(
|
|
6260
|
+
/* @__PURE__ */ a(Yt, {}),
|
|
6288
6261
|
" 粘贴 JSON"
|
|
6289
6262
|
] }),
|
|
6290
6263
|
children: /* @__PURE__ */ p("div", { children: [
|
|
@@ -6331,7 +6304,7 @@ function Al({ open: e, onClose: t, onSuccess: n, envOptions: r = [] }) {
|
|
|
6331
6304
|
}
|
|
6332
6305
|
),
|
|
6333
6306
|
/* @__PURE__ */ p(U, { style: { marginTop: 12 }, children: [
|
|
6334
|
-
/* @__PURE__ */ a(j, { type: "primary", icon: /* @__PURE__ */ a(
|
|
6307
|
+
/* @__PURE__ */ a(j, { type: "primary", icon: /* @__PURE__ */ a(He, {}), onClick: M, loading: m, children: "解析" }),
|
|
6335
6308
|
l && /* @__PURE__ */ a(E, { color: "blue", children: l.format }),
|
|
6336
6309
|
l && /* @__PURE__ */ p(E, { children: [
|
|
6337
6310
|
"共 ",
|
|
@@ -6384,7 +6357,7 @@ function Al({ open: e, onClose: t, onSuccess: n, envOptions: r = [] }) {
|
|
|
6384
6357
|
{
|
|
6385
6358
|
type: "primary",
|
|
6386
6359
|
size: "large",
|
|
6387
|
-
icon: /* @__PURE__ */ a(
|
|
6360
|
+
icon: /* @__PURE__ */ a(Ft, {}),
|
|
6388
6361
|
onClick: w,
|
|
6389
6362
|
loading: x,
|
|
6390
6363
|
disabled: O.length === 0,
|
|
@@ -6424,7 +6397,7 @@ const po = {
|
|
|
6424
6397
|
FATAL: { color: "red" }
|
|
6425
6398
|
};
|
|
6426
6399
|
function ho() {
|
|
6427
|
-
const e =
|
|
6400
|
+
const e = Xe(), [t, n] = $([]), [r, s] = $(!1), [o, i] = $(null), [c, l] = $([]), [d, u] = $({}), [h, m] = $(null), [C, O] = $([]), _ = async () => {
|
|
6428
6401
|
s(!0);
|
|
6429
6402
|
try {
|
|
6430
6403
|
const I = await H.get("/subscribe/subscription/list");
|
|
@@ -6452,7 +6425,7 @@ function ho() {
|
|
|
6452
6425
|
}
|
|
6453
6426
|
}
|
|
6454
6427
|
});
|
|
6455
|
-
},
|
|
6428
|
+
}, y = async (I) => {
|
|
6456
6429
|
try {
|
|
6457
6430
|
const w = await H.post(`/subscribe/subscription/${I}/enable`);
|
|
6458
6431
|
w && w.success !== !1 ? (v.success("已启用"), _()) : v.error((w == null ? void 0 : w.message) || "启用失败");
|
|
@@ -6623,7 +6596,7 @@ function ho() {
|
|
|
6623
6596
|
{
|
|
6624
6597
|
type: "link",
|
|
6625
6598
|
size: "small",
|
|
6626
|
-
icon: /* @__PURE__ */ a(
|
|
6599
|
+
icon: /* @__PURE__ */ a(He, {}),
|
|
6627
6600
|
onClick: () => P(w),
|
|
6628
6601
|
children: "试运行"
|
|
6629
6602
|
}
|
|
@@ -6633,7 +6606,7 @@ function ho() {
|
|
|
6633
6606
|
{
|
|
6634
6607
|
type: "link",
|
|
6635
6608
|
size: "small",
|
|
6636
|
-
icon: /* @__PURE__ */ a(
|
|
6609
|
+
icon: /* @__PURE__ */ a(wt, {}),
|
|
6637
6610
|
onClick: () => k(w),
|
|
6638
6611
|
children: "触发"
|
|
6639
6612
|
}
|
|
@@ -6661,12 +6634,12 @@ function ho() {
|
|
|
6661
6634
|
{
|
|
6662
6635
|
type: "link",
|
|
6663
6636
|
size: "small",
|
|
6664
|
-
icon: /* @__PURE__ */ a(
|
|
6665
|
-
onClick: () =>
|
|
6637
|
+
icon: /* @__PURE__ */ a(Qt, {}),
|
|
6638
|
+
onClick: () => y(w.id),
|
|
6666
6639
|
children: "启用"
|
|
6667
6640
|
}
|
|
6668
6641
|
),
|
|
6669
|
-
/* @__PURE__ */ a(
|
|
6642
|
+
/* @__PURE__ */ a(Zt, { title: "确认删除?", onConfirm: () => x(w), okText: "删除", cancelText: "取消", children: /* @__PURE__ */ a(j, { type: "link", size: "small", danger: !0, icon: /* @__PURE__ */ a(Ur, {}), children: "删除" }) })
|
|
6670
6643
|
] })
|
|
6671
6644
|
}
|
|
6672
6645
|
],
|
|
@@ -6693,14 +6666,14 @@ function ho() {
|
|
|
6693
6666
|
}
|
|
6694
6667
|
),
|
|
6695
6668
|
/* @__PURE__ */ a(
|
|
6696
|
-
|
|
6669
|
+
We,
|
|
6697
6670
|
{
|
|
6698
6671
|
title: o != null && o.sub ? `试运行 - ${o.sub.name}` : "运行历史",
|
|
6699
6672
|
open: !!o,
|
|
6700
6673
|
onClose: () => i(null),
|
|
6701
6674
|
size: "large",
|
|
6702
6675
|
children: (o == null ? void 0 : o.tab) === "runs" ? /* @__PURE__ */ a(
|
|
6703
|
-
|
|
6676
|
+
Ze,
|
|
6704
6677
|
{
|
|
6705
6678
|
activeKey: h ? "items" : "list",
|
|
6706
6679
|
onChange: (I) => I === "list" && m(null),
|
|
@@ -6773,7 +6746,7 @@ function ho() {
|
|
|
6773
6746
|
{
|
|
6774
6747
|
size: "small",
|
|
6775
6748
|
type: "primary",
|
|
6776
|
-
icon: /* @__PURE__ */ a(
|
|
6749
|
+
icon: /* @__PURE__ */ a(St, {}),
|
|
6777
6750
|
disabled: C.length === 0,
|
|
6778
6751
|
onClick: () => {
|
|
6779
6752
|
const I = C.join(",");
|
|
@@ -6908,9 +6881,9 @@ const yo = [
|
|
|
6908
6881
|
{ label: "每天 8 点", value: "0 0 8 * * ?" }
|
|
6909
6882
|
];
|
|
6910
6883
|
function Ln() {
|
|
6911
|
-
const { id: e } = qn(), t =
|
|
6884
|
+
const { id: e } = qn(), 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);
|
|
6912
6885
|
Y(() => {
|
|
6913
|
-
_(), x(), n &&
|
|
6886
|
+
_(), x(), n && y();
|
|
6914
6887
|
}, [e]);
|
|
6915
6888
|
const _ = async () => {
|
|
6916
6889
|
try {
|
|
@@ -6924,7 +6897,7 @@ function Ln() {
|
|
|
6924
6897
|
h(Array.isArray(P) ? P.filter((T) => T.status === 1) : []);
|
|
6925
6898
|
} catch {
|
|
6926
6899
|
}
|
|
6927
|
-
},
|
|
6900
|
+
}, y = async () => {
|
|
6928
6901
|
o(!0);
|
|
6929
6902
|
try {
|
|
6930
6903
|
const k = await H.get(`/subscribe/subscription/${e}`), P = (k == null ? void 0 : k.data) ?? k;
|
|
@@ -6970,7 +6943,7 @@ function Ln() {
|
|
|
6970
6943
|
] })
|
|
6971
6944
|
}
|
|
6972
6945
|
),
|
|
6973
|
-
/* @__PURE__ */ a(F, { children: /* @__PURE__ */ a(
|
|
6946
|
+
/* @__PURE__ */ a(F, { children: /* @__PURE__ */ a(bt, { spinning: s, children: /* @__PURE__ */ p(
|
|
6974
6947
|
N,
|
|
6975
6948
|
{
|
|
6976
6949
|
form: r,
|
|
@@ -6995,7 +6968,7 @@ function Ln() {
|
|
|
6995
6968
|
/* @__PURE__ */ a(de.Button, { value: "HTTP", children: "HTTP / HTTPS" }),
|
|
6996
6969
|
/* @__PURE__ */ a(de.Button, { value: "INTERNAL", disabled: !0, children: "内部 Bean" })
|
|
6997
6970
|
] }) }),
|
|
6998
|
-
m === "HTTP" && /* @__PURE__ */ p(
|
|
6971
|
+
m === "HTTP" && /* @__PURE__ */ p(zt, { children: [
|
|
6999
6972
|
/* @__PURE__ */ a(
|
|
7000
6973
|
N.Item,
|
|
7001
6974
|
{
|
|
@@ -7011,7 +6984,7 @@ function Ln() {
|
|
|
7011
6984
|
{ value: "POST", label: "POST" },
|
|
7012
6985
|
{ value: "PUT", label: "PUT" }
|
|
7013
6986
|
] }) }),
|
|
7014
|
-
/* @__PURE__ */ a(N.Item, { label: "超时 (ms)", name: "timeoutMs", children: /* @__PURE__ */ a(
|
|
6987
|
+
/* @__PURE__ */ a(N.Item, { label: "超时 (ms)", name: "timeoutMs", children: /* @__PURE__ */ a(Ct, { min: 1e3, max: 12e4, step: 1e3 }) })
|
|
7015
6988
|
] }),
|
|
7016
6989
|
/* @__PURE__ */ a(N.Item, { label: "自定义 HTTP 头 (JSON)", name: "httpHeaders", children: /* @__PURE__ */ a(B.TextArea, { rows: 2, placeholder: '{"X-Trace-Id":"abc"}' }) }),
|
|
7017
6990
|
/* @__PURE__ */ a(N.Item, { label: "请求体 (POST/PUT)", name: "requestBody", children: /* @__PURE__ */ a(B.TextArea, { rows: 3, placeholder: "(可选)" }) })
|
|
@@ -7103,10 +7076,10 @@ function Ln() {
|
|
|
7103
7076
|
label: "最小间隔 (秒)",
|
|
7104
7077
|
name: "minIntervalSec",
|
|
7105
7078
|
extra: "距上次 run 至少 N 秒",
|
|
7106
|
-
children: /* @__PURE__ */ a(
|
|
7079
|
+
children: /* @__PURE__ */ a(Ct, { min: 0, max: 3600 })
|
|
7107
7080
|
}
|
|
7108
7081
|
),
|
|
7109
|
-
/* @__PURE__ */ a(N.Item, { label: "单次最多条数", name: "maxItemsPerRun", children: /* @__PURE__ */ a(
|
|
7082
|
+
/* @__PURE__ */ a(N.Item, { label: "单次最多条数", name: "maxItemsPerRun", children: /* @__PURE__ */ a(Ct, { min: 1, max: 1e4 }) })
|
|
7110
7083
|
] })
|
|
7111
7084
|
] }),
|
|
7112
7085
|
/* @__PURE__ */ a(
|
|
@@ -7162,7 +7135,7 @@ function wo() {
|
|
|
7162
7135
|
} catch {
|
|
7163
7136
|
v.error("加载抽取项失败");
|
|
7164
7137
|
}
|
|
7165
|
-
}, _ = s.reduce((A, k) => A + (k.successCount || 0), 0), x = s.reduce((A, k) => A + (k.deadLetterCount || 0), 0),
|
|
7138
|
+
}, _ = s.reduce((A, k) => A + (k.successCount || 0), 0), x = s.reduce((A, k) => A + (k.deadLetterCount || 0), 0), y = s.reduce((A, k) => A + (k.duplicateCount || 0), 0);
|
|
7166
7139
|
return /* @__PURE__ */ p("div", { children: [
|
|
7167
7140
|
/* @__PURE__ */ a(
|
|
7168
7141
|
Ue,
|
|
@@ -7210,7 +7183,7 @@ function wo() {
|
|
|
7210
7183
|
styles: { content: { color: "#cf1322" } }
|
|
7211
7184
|
}
|
|
7212
7185
|
) }) }),
|
|
7213
|
-
/* @__PURE__ */ a(D, { span: 6, children: /* @__PURE__ */ a(F, { children: /* @__PURE__ */ a(X, { title: "重复跳过", value:
|
|
7186
|
+
/* @__PURE__ */ a(D, { span: 6, children: /* @__PURE__ */ a(F, { children: /* @__PURE__ */ a(X, { title: "重复跳过", value: y }) }) })
|
|
7214
7187
|
] }),
|
|
7215
7188
|
/* @__PURE__ */ p(se, { gutter: 16, children: [
|
|
7216
7189
|
/* @__PURE__ */ a(D, { span: 12, children: /* @__PURE__ */ a(
|
|
@@ -7310,7 +7283,7 @@ function _o() {
|
|
|
7310
7283
|
/* @__PURE__ */ a(ue, { path: "runs", element: /* @__PURE__ */ a(wo, {}) })
|
|
7311
7284
|
] });
|
|
7312
7285
|
}
|
|
7313
|
-
const
|
|
7286
|
+
const Il = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
7314
7287
|
__proto__: null,
|
|
7315
7288
|
default: _o
|
|
7316
7289
|
}, Symbol.toStringTag, { value: "Module" })), To = {
|
|
@@ -7320,7 +7293,7 @@ const $l = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
7320
7293
|
ARCHIVED: { color: "default", text: "已归档" }
|
|
7321
7294
|
};
|
|
7322
7295
|
function ko() {
|
|
7323
|
-
const e =
|
|
7296
|
+
const e = Xe(), [t, n] = $("mine"), [r, s] = $([]), [o, i] = $(!1), [c, l] = $(null), d = async () => {
|
|
7324
7297
|
i(!0), l(null);
|
|
7325
7298
|
try {
|
|
7326
7299
|
const m = t === "mine" ? "/project/list/mine?limit=100" : `/project/list/by-status?status=${t}&limit=100`, C = await H.get(m), O = (C == null ? void 0 : C.data) ?? C ?? [];
|
|
@@ -7359,7 +7332,7 @@ function ko() {
|
|
|
7359
7332
|
boxShadow: "0 1px 3px rgba(15, 23, 42, 0.04), 0 1px 2px rgba(15, 23, 42, 0.06)"
|
|
7360
7333
|
}, children: [
|
|
7361
7334
|
/* @__PURE__ */ a(
|
|
7362
|
-
|
|
7335
|
+
Ze,
|
|
7363
7336
|
{
|
|
7364
7337
|
activeKey: t,
|
|
7365
7338
|
onChange: n,
|
|
@@ -7434,12 +7407,12 @@ function ko() {
|
|
|
7434
7407
|
render: (m, C) => /* @__PURE__ */ p(U, { size: 4, children: [
|
|
7435
7408
|
/* @__PURE__ */ a(j, { type: "link", size: "small", onClick: () => e(`/project/${C.id}`), children: "对话" }),
|
|
7436
7409
|
C.status !== "COMPLETED" && C.status !== "ARCHIVED" && /* @__PURE__ */ a(
|
|
7437
|
-
|
|
7410
|
+
Zt,
|
|
7438
7411
|
{
|
|
7439
7412
|
title: "标记为已完成?",
|
|
7440
7413
|
onConfirm: () => u(C.id),
|
|
7441
7414
|
okButtonProps: { danger: !0 },
|
|
7442
|
-
children: /* @__PURE__ */ a(j, { type: "link", size: "small", icon: /* @__PURE__ */ a(
|
|
7415
|
+
children: /* @__PURE__ */ a(j, { type: "link", size: "small", icon: /* @__PURE__ */ a(Qt, {}), children: "完成" })
|
|
7443
7416
|
}
|
|
7444
7417
|
)
|
|
7445
7418
|
] })
|
|
@@ -7468,14 +7441,14 @@ const Io = [
|
|
|
7468
7441
|
{ value: "ops", label: "运营" }
|
|
7469
7442
|
];
|
|
7470
7443
|
function Co() {
|
|
7471
|
-
const e =
|
|
7444
|
+
const e = Xe(), [t] = kr(), [n] = N.useForm(), [r, s] = $(!1), [o, i] = $("from-subscribe"), [c, l] = $([]), [d, u] = $([]), [h, m] = $(!1), [C, O] = $([]), [_, x] = $(null);
|
|
7472
7445
|
Y(() => {
|
|
7473
7446
|
const P = t.get("subscriptionId"), T = t.get("itemIds");
|
|
7474
7447
|
P && (x(Number(P)), n.setFieldValue("sourceSubscriptionId", Number(P)), A(P)), T && O(T.split(",").map(Number).filter(Boolean));
|
|
7475
7448
|
}, [t]), Y(() => {
|
|
7476
|
-
|
|
7449
|
+
y();
|
|
7477
7450
|
}, []);
|
|
7478
|
-
const
|
|
7451
|
+
const y = async () => {
|
|
7479
7452
|
try {
|
|
7480
7453
|
const P = await H.get("/subscribe/subscription/list"), T = (P == null ? void 0 : P.data) ?? P ?? [];
|
|
7481
7454
|
l(Array.isArray(T) ? T.filter((M) => M.status === "VERIFIED") : []);
|
|
@@ -7502,7 +7475,7 @@ function Co() {
|
|
|
7502
7475
|
{
|
|
7503
7476
|
title: /* @__PURE__ */ p(U, { children: [
|
|
7504
7477
|
/* @__PURE__ */ a(j, { type: "text", icon: /* @__PURE__ */ a(Xn, {}), onClick: () => e("/project/list") }),
|
|
7505
|
-
/* @__PURE__ */ a(
|
|
7478
|
+
/* @__PURE__ */ a(Xt, {}),
|
|
7506
7479
|
"新建项目 (立项)"
|
|
7507
7480
|
] }),
|
|
7508
7481
|
extra: /* @__PURE__ */ p(U, { children: [
|
|
@@ -7566,7 +7539,7 @@ function Co() {
|
|
|
7566
7539
|
)
|
|
7567
7540
|
}
|
|
7568
7541
|
),
|
|
7569
|
-
_ && /* @__PURE__ */ p(
|
|
7542
|
+
_ && /* @__PURE__ */ p(bt, { spinning: h, children: [
|
|
7570
7543
|
/* @__PURE__ */ p("div", { style: { marginBottom: 8 }, children: [
|
|
7571
7544
|
/* @__PURE__ */ p(E, { color: "blue", children: [
|
|
7572
7545
|
"已选 ",
|
|
@@ -7656,7 +7629,7 @@ function Co() {
|
|
|
7656
7629
|
}
|
|
7657
7630
|
const Dn = {
|
|
7658
7631
|
USER: { color: "blue", icon: /* @__PURE__ */ a(Kn, {}), label: "CEO" },
|
|
7659
|
-
ASSISTANT: { color: "purple", icon: /* @__PURE__ */ a(
|
|
7632
|
+
ASSISTANT: { color: "purple", icon: /* @__PURE__ */ a(Dt, {}), label: "Agent" },
|
|
7660
7633
|
SYSTEM: { color: "default", icon: null, label: "系统" }
|
|
7661
7634
|
}, Ao = {
|
|
7662
7635
|
OPEN: { color: "blue", text: "待开始" },
|
|
@@ -7665,7 +7638,7 @@ const Dn = {
|
|
|
7665
7638
|
ARCHIVED: { color: "default", text: "已归档" }
|
|
7666
7639
|
};
|
|
7667
7640
|
function $o() {
|
|
7668
|
-
const { id: e } = qn(), t =
|
|
7641
|
+
const { id: e } = qn(), t = Xe(), [n, r] = $(null), [s, o] = $([]), [i, c] = $(""), [l, d] = $(!1), u = Fn(null);
|
|
7669
7642
|
Y(() => {
|
|
7670
7643
|
e && h();
|
|
7671
7644
|
}, [e]), Y(() => {
|
|
@@ -7686,16 +7659,16 @@ function $o() {
|
|
|
7686
7659
|
const _ = i.trim();
|
|
7687
7660
|
c(""), d(!0);
|
|
7688
7661
|
const x = { seq: -1, role: "USER", content: _, createdAt: (/* @__PURE__ */ new Date()).toISOString() };
|
|
7689
|
-
o((
|
|
7662
|
+
o((y) => [...y, x]);
|
|
7690
7663
|
try {
|
|
7691
|
-
const
|
|
7692
|
-
if (
|
|
7693
|
-
const k = (
|
|
7664
|
+
const y = await H.post(`/project/${e}/chat`, { message: _ });
|
|
7665
|
+
if (y && y.success !== !1) {
|
|
7666
|
+
const k = (y.data ?? y).message;
|
|
7694
7667
|
o((P) => [...P.filter((M) => M.seq !== -1), ...k ? [k] : []]), setTimeout(h, 100);
|
|
7695
7668
|
} else
|
|
7696
|
-
v.error((
|
|
7697
|
-
} catch (
|
|
7698
|
-
v.error("发送失败: " + ((
|
|
7669
|
+
v.error((y == null ? void 0 : y.message) || "发送失败");
|
|
7670
|
+
} catch (y) {
|
|
7671
|
+
v.error("发送失败: " + ((y == null ? void 0 : y.message) || ""));
|
|
7699
7672
|
} finally {
|
|
7700
7673
|
d(!1);
|
|
7701
7674
|
}
|
|
@@ -7707,7 +7680,7 @@ function $o() {
|
|
|
7707
7680
|
v.error("操作失败");
|
|
7708
7681
|
}
|
|
7709
7682
|
};
|
|
7710
|
-
if (!n) return /* @__PURE__ */ a("div", { style: { padding: 24 }, children: /* @__PURE__ */ a(
|
|
7683
|
+
if (!n) return /* @__PURE__ */ a("div", { style: { padding: 24 }, children: /* @__PURE__ */ a(bt, {}) });
|
|
7711
7684
|
const O = Ao[n.status] || { color: "default", text: n.status };
|
|
7712
7685
|
return /* @__PURE__ */ p("div", { style: { padding: 24, height: "calc(100vh - 64px)", display: "flex", flexDirection: "column", gap: 16 }, children: [
|
|
7713
7686
|
/* @__PURE__ */ p(
|
|
@@ -7715,7 +7688,7 @@ function $o() {
|
|
|
7715
7688
|
{
|
|
7716
7689
|
title: /* @__PURE__ */ p(U, { children: [
|
|
7717
7690
|
/* @__PURE__ */ a(j, { type: "text", icon: /* @__PURE__ */ a(Xn, {}), onClick: () => t("/project/list") }),
|
|
7718
|
-
/* @__PURE__ */ a(
|
|
7691
|
+
/* @__PURE__ */ a(Xt, {}),
|
|
7719
7692
|
/* @__PURE__ */ a("span", { style: { fontWeight: 500 }, children: n.name }),
|
|
7720
7693
|
/* @__PURE__ */ a(E, { color: O.color, children: O.text })
|
|
7721
7694
|
] }),
|
|
@@ -7727,7 +7700,7 @@ function $o() {
|
|
|
7727
7700
|
] }),
|
|
7728
7701
|
/* @__PURE__ */ a(E, { children: n.agentRole }),
|
|
7729
7702
|
n.modelCode && /* @__PURE__ */ a(E, { color: "purple", children: n.modelCode }),
|
|
7730
|
-
n.status !== "COMPLETED" && n.status !== "ARCHIVED" && /* @__PURE__ */ a(
|
|
7703
|
+
n.status !== "COMPLETED" && n.status !== "ARCHIVED" && /* @__PURE__ */ a(Zt, { title: "标记完成?", onConfirm: C, children: /* @__PURE__ */ a(j, { icon: /* @__PURE__ */ a(Qt, {}), children: "标记完成" }) })
|
|
7731
7704
|
] }),
|
|
7732
7705
|
children: [
|
|
7733
7706
|
n.description && /* @__PURE__ */ a("div", { style: { color: "#666", marginBottom: 8 }, children: n.description }),
|
|
@@ -7753,15 +7726,15 @@ function $o() {
|
|
|
7753
7726
|
children: [
|
|
7754
7727
|
/* @__PURE__ */ a("div", { ref: u, style: { flex: 1, overflow: "auto", padding: 16, background: "#fafafa" }, children: s.length === 0 ? /* @__PURE__ */ a(Sr, { description: "还没有消息, 跟 Agent 说点什么?" }) : /* @__PURE__ */ p(U, { orientation: "vertical", style: { width: "100%" }, size: "middle", children: [
|
|
7755
7728
|
s.map((_) => {
|
|
7756
|
-
const x = Dn[_.role] || Dn.SYSTEM,
|
|
7729
|
+
const x = Dn[_.role] || Dn.SYSTEM, y = _.role === "USER";
|
|
7757
7730
|
return /* @__PURE__ */ a("div", { style: {
|
|
7758
7731
|
display: "flex",
|
|
7759
|
-
justifyContent:
|
|
7732
|
+
justifyContent: y ? "flex-end" : "flex-start"
|
|
7760
7733
|
}, children: /* @__PURE__ */ p("div", { style: {
|
|
7761
7734
|
maxWidth: "70%",
|
|
7762
|
-
background:
|
|
7763
|
-
color:
|
|
7764
|
-
border:
|
|
7735
|
+
background: y ? "#1677ff" : "#fff",
|
|
7736
|
+
color: y ? "#fff" : "#000",
|
|
7737
|
+
border: y ? "none" : "1px solid #e8e8e8",
|
|
7765
7738
|
borderRadius: 8,
|
|
7766
7739
|
padding: "10px 14px",
|
|
7767
7740
|
boxShadow: "0 1px 2px rgba(0,0,0,0.04)"
|
|
@@ -7792,7 +7765,7 @@ function $o() {
|
|
|
7792
7765
|
borderRadius: 8,
|
|
7793
7766
|
padding: "10px 14px"
|
|
7794
7767
|
}, children: [
|
|
7795
|
-
/* @__PURE__ */ a(
|
|
7768
|
+
/* @__PURE__ */ a(bt, { size: "small" }),
|
|
7796
7769
|
" 思考中..."
|
|
7797
7770
|
] }) })
|
|
7798
7771
|
] }) }),
|
|
@@ -7843,223 +7816,220 @@ function xo() {
|
|
|
7843
7816
|
/* @__PURE__ */ a(ue, { path: ":id", element: /* @__PURE__ */ a($o, {}) })
|
|
7844
7817
|
] });
|
|
7845
7818
|
}
|
|
7846
|
-
const
|
|
7819
|
+
const Cl = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
7847
7820
|
__proto__: null,
|
|
7848
7821
|
default: xo
|
|
7849
7822
|
}, Symbol.toStringTag, { value: "Module" })), vo = "# 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";
|
|
7850
|
-
function
|
|
7823
|
+
function Al() {
|
|
7851
7824
|
return /* @__PURE__ */ a(Kr, { markdown: vo, title: "组件文档 — Z-OPC 一人公司基建" });
|
|
7852
7825
|
}
|
|
7853
7826
|
export {
|
|
7854
|
-
|
|
7855
|
-
|
|
7827
|
+
Qo as $,
|
|
7828
|
+
ys as A,
|
|
7856
7829
|
Te as B,
|
|
7857
|
-
|
|
7858
|
-
|
|
7859
|
-
|
|
7860
|
-
|
|
7861
|
-
|
|
7862
|
-
|
|
7863
|
-
|
|
7864
|
-
|
|
7865
|
-
|
|
7866
|
-
|
|
7830
|
+
Al as C,
|
|
7831
|
+
Ho as D,
|
|
7832
|
+
hl as E,
|
|
7833
|
+
fl as F,
|
|
7834
|
+
Pa as G,
|
|
7835
|
+
Tl as H,
|
|
7836
|
+
Vt as I,
|
|
7837
|
+
Wt as J,
|
|
7838
|
+
_l as K,
|
|
7839
|
+
bl as L,
|
|
7867
7840
|
io as M,
|
|
7868
|
-
|
|
7869
|
-
|
|
7841
|
+
oo as N,
|
|
7842
|
+
kl as O,
|
|
7870
7843
|
xo as P,
|
|
7871
|
-
|
|
7844
|
+
to as Q,
|
|
7872
7845
|
so as R,
|
|
7873
7846
|
_o as S,
|
|
7874
7847
|
nr as T,
|
|
7875
|
-
|
|
7876
|
-
|
|
7877
|
-
|
|
7878
|
-
|
|
7879
|
-
|
|
7880
|
-
|
|
7881
|
-
|
|
7848
|
+
ro as U,
|
|
7849
|
+
sn as V,
|
|
7850
|
+
H as W,
|
|
7851
|
+
Va as X,
|
|
7852
|
+
Yo as Y,
|
|
7853
|
+
yl as Z,
|
|
7854
|
+
os as _,
|
|
7882
7855
|
ke as a,
|
|
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
|
-
|
|
7856
|
+
sl as a$,
|
|
7857
|
+
Ht as a0,
|
|
7858
|
+
il as a1,
|
|
7859
|
+
ol as a2,
|
|
7860
|
+
Ia as a3,
|
|
7861
|
+
Ci as a4,
|
|
7862
|
+
ms as a5,
|
|
7863
|
+
bc as a6,
|
|
7864
|
+
fi as a7,
|
|
7865
|
+
dc as a8,
|
|
7866
|
+
hc as a9,
|
|
7867
|
+
Tt as aA,
|
|
7868
|
+
Sn as aB,
|
|
7869
|
+
ci as aC,
|
|
7870
|
+
qo as aD,
|
|
7871
|
+
Ls as aE,
|
|
7872
|
+
Do as aF,
|
|
7873
|
+
Gt as aG,
|
|
7874
|
+
ac as aH,
|
|
7875
|
+
ic as aI,
|
|
7876
|
+
oc as aJ,
|
|
7877
|
+
Ge as aK,
|
|
7878
|
+
fa as aL,
|
|
7879
|
+
hr as aM,
|
|
7880
|
+
Zo as aN,
|
|
7881
|
+
ll as aO,
|
|
7882
|
+
ul as aP,
|
|
7883
|
+
ml as aQ,
|
|
7911
7884
|
pl as aR,
|
|
7912
|
-
|
|
7913
|
-
|
|
7914
|
-
|
|
7915
|
-
|
|
7916
|
-
|
|
7917
|
-
|
|
7918
|
-
|
|
7919
|
-
|
|
7920
|
-
|
|
7921
|
-
|
|
7922
|
-
|
|
7923
|
-
|
|
7924
|
-
|
|
7925
|
-
|
|
7926
|
-
|
|
7927
|
-
|
|
7928
|
-
|
|
7929
|
-
|
|
7930
|
-
|
|
7931
|
-
|
|
7932
|
-
|
|
7933
|
-
|
|
7934
|
-
|
|
7935
|
-
|
|
7936
|
-
|
|
7937
|
-
|
|
7938
|
-
|
|
7939
|
-
|
|
7940
|
-
|
|
7941
|
-
|
|
7942
|
-
|
|
7943
|
-
|
|
7944
|
-
|
|
7945
|
-
|
|
7946
|
-
|
|
7885
|
+
Vo as aS,
|
|
7886
|
+
Wo as aT,
|
|
7887
|
+
Ko as aU,
|
|
7888
|
+
Go as aV,
|
|
7889
|
+
Jo as aW,
|
|
7890
|
+
ur as aX,
|
|
7891
|
+
Qc as aY,
|
|
7892
|
+
tl as aZ,
|
|
7893
|
+
ba as a_,
|
|
7894
|
+
Xo as aa,
|
|
7895
|
+
Vi as ab,
|
|
7896
|
+
Gi as ac,
|
|
7897
|
+
wi as ad,
|
|
7898
|
+
qi as ae,
|
|
7899
|
+
Bi as af,
|
|
7900
|
+
Ui as ag,
|
|
7901
|
+
Ji as ah,
|
|
7902
|
+
li as ai,
|
|
7903
|
+
cc as aj,
|
|
7904
|
+
Fi as ak,
|
|
7905
|
+
ji as al,
|
|
7906
|
+
$a as am,
|
|
7907
|
+
Yr as an,
|
|
7908
|
+
Sc as ao,
|
|
7909
|
+
At as ap,
|
|
7910
|
+
ps as aq,
|
|
7911
|
+
Ni as ar,
|
|
7912
|
+
mc as as,
|
|
7913
|
+
oi as at,
|
|
7914
|
+
ai as au,
|
|
7915
|
+
ii as av,
|
|
7916
|
+
Li as aw,
|
|
7917
|
+
Jc as ax,
|
|
7918
|
+
bi as ay,
|
|
7919
|
+
ot as az,
|
|
7947
7920
|
Ie as b,
|
|
7948
7921
|
Hc as b$,
|
|
7949
|
-
|
|
7950
|
-
|
|
7951
|
-
|
|
7952
|
-
|
|
7953
|
-
|
|
7954
|
-
|
|
7955
|
-
|
|
7956
|
-
|
|
7957
|
-
|
|
7958
|
-
|
|
7959
|
-
|
|
7960
|
-
|
|
7961
|
-
|
|
7962
|
-
|
|
7963
|
-
|
|
7964
|
-
|
|
7965
|
-
|
|
7966
|
-
|
|
7967
|
-
|
|
7968
|
-
|
|
7969
|
-
|
|
7970
|
-
|
|
7971
|
-
|
|
7922
|
+
rl as b0,
|
|
7923
|
+
Fo as b1,
|
|
7924
|
+
b as b2,
|
|
7925
|
+
Vc as b3,
|
|
7926
|
+
el as b4,
|
|
7927
|
+
Yc as b5,
|
|
7928
|
+
Qe as b6,
|
|
7929
|
+
qt as b7,
|
|
7930
|
+
nl as b8,
|
|
7931
|
+
Zc as b9,
|
|
7932
|
+
yi as bA,
|
|
7933
|
+
mn as bB,
|
|
7934
|
+
Wr as bC,
|
|
7935
|
+
Wi as bD,
|
|
7936
|
+
Zi as bE,
|
|
7937
|
+
fc as bF,
|
|
7938
|
+
Ai as bG,
|
|
7939
|
+
xi as bH,
|
|
7940
|
+
$i as bI,
|
|
7941
|
+
ei as bJ,
|
|
7942
|
+
kc as bK,
|
|
7943
|
+
Tc as bL,
|
|
7944
|
+
$c as bM,
|
|
7972
7945
|
Ac as bN,
|
|
7973
7946
|
Cc as bO,
|
|
7974
|
-
|
|
7975
|
-
|
|
7976
|
-
|
|
7977
|
-
|
|
7978
|
-
|
|
7979
|
-
|
|
7980
|
-
|
|
7981
|
-
|
|
7982
|
-
|
|
7983
|
-
|
|
7984
|
-
|
|
7985
|
-
|
|
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
|
-
|
|
7947
|
+
xc as bP,
|
|
7948
|
+
ti as bQ,
|
|
7949
|
+
ni as bR,
|
|
7950
|
+
Ic as bS,
|
|
7951
|
+
vc as bT,
|
|
7952
|
+
Pc as bU,
|
|
7953
|
+
vi as bV,
|
|
7954
|
+
Pi as bW,
|
|
7955
|
+
Ei as bX,
|
|
7956
|
+
Fc as bY,
|
|
7957
|
+
qc as bZ,
|
|
7958
|
+
Bc as b_,
|
|
7959
|
+
Xc as ba,
|
|
7960
|
+
Wc as bb,
|
|
7961
|
+
al as bc,
|
|
7962
|
+
lr as bd,
|
|
7963
|
+
$t as be,
|
|
7964
|
+
wc as bf,
|
|
7965
|
+
_c as bg,
|
|
7966
|
+
Rs as bh,
|
|
7967
|
+
ui as bi,
|
|
7968
|
+
cl as bj,
|
|
7969
|
+
f as bk,
|
|
7970
|
+
bn as bl,
|
|
7971
|
+
Ts as bm,
|
|
7972
|
+
as as bn,
|
|
7973
|
+
gc as bo,
|
|
7974
|
+
ec as bp,
|
|
7975
|
+
hi as bq,
|
|
7976
|
+
pc as br,
|
|
7977
|
+
dl as bs,
|
|
7978
|
+
or as bt,
|
|
7979
|
+
Bo as bu,
|
|
7980
|
+
_i as bv,
|
|
7981
|
+
Ti as bw,
|
|
7982
|
+
ki as bx,
|
|
7983
|
+
Si as by,
|
|
7984
|
+
gi as bz,
|
|
7985
|
+
Bt as c,
|
|
8013
7986
|
Kc as c0,
|
|
8014
7987
|
Gc as c1,
|
|
8015
|
-
|
|
8016
|
-
|
|
8017
|
-
|
|
8018
|
-
|
|
8019
|
-
|
|
8020
|
-
|
|
8021
|
-
|
|
8022
|
-
|
|
8023
|
-
|
|
8024
|
-
|
|
8025
|
-
|
|
8026
|
-
|
|
8027
|
-
|
|
7988
|
+
Dc as c2,
|
|
7989
|
+
Lc as c3,
|
|
7990
|
+
rc as c4,
|
|
7991
|
+
tc as c5,
|
|
7992
|
+
nc as c6,
|
|
7993
|
+
Oi as c7,
|
|
7994
|
+
Ri as c8,
|
|
7995
|
+
sc as c9,
|
|
7996
|
+
lc as ca,
|
|
7997
|
+
zc as cb,
|
|
7998
|
+
Ec as cc,
|
|
7999
|
+
Oc as cd,
|
|
8000
|
+
Rc as ce,
|
|
8028
8001
|
Mc as cf,
|
|
8029
|
-
|
|
8030
|
-
|
|
8031
|
-
|
|
8032
|
-
|
|
8033
|
-
|
|
8034
|
-
|
|
8035
|
-
|
|
8036
|
-
|
|
8037
|
-
|
|
8038
|
-
|
|
8039
|
-
|
|
8040
|
-
$l as cr,
|
|
8041
|
-
xl as cs,
|
|
8042
|
-
wl as d,
|
|
8002
|
+
jc as cg,
|
|
8003
|
+
Uc as ch,
|
|
8004
|
+
Nc as ci,
|
|
8005
|
+
Ii as cj,
|
|
8006
|
+
Xi as ck,
|
|
8007
|
+
uc as cl,
|
|
8008
|
+
yc as cm,
|
|
8009
|
+
Sl as cn,
|
|
8010
|
+
Il as co,
|
|
8011
|
+
Cl as cp,
|
|
8012
|
+
gl as d,
|
|
8043
8013
|
we as e,
|
|
8044
8014
|
ge as f,
|
|
8045
8015
|
sr as g,
|
|
8046
|
-
|
|
8016
|
+
mi as h,
|
|
8047
8017
|
Ha as i,
|
|
8048
|
-
|
|
8018
|
+
di as j,
|
|
8049
8019
|
si as k,
|
|
8050
|
-
|
|
8051
|
-
|
|
8020
|
+
Yi as l,
|
|
8021
|
+
Qi as m,
|
|
8052
8022
|
he as n,
|
|
8053
|
-
|
|
8054
|
-
|
|
8055
|
-
|
|
8023
|
+
Mi as o,
|
|
8024
|
+
pi as p,
|
|
8025
|
+
Di as q,
|
|
8056
8026
|
Vr as r,
|
|
8057
|
-
|
|
8027
|
+
at as s,
|
|
8058
8028
|
q as t,
|
|
8059
8029
|
$n as u,
|
|
8060
|
-
|
|
8061
|
-
|
|
8062
|
-
|
|
8063
|
-
|
|
8064
|
-
|
|
8030
|
+
Ki as v,
|
|
8031
|
+
oe as w,
|
|
8032
|
+
Hi as x,
|
|
8033
|
+
zi as y,
|
|
8034
|
+
ri as z
|
|
8065
8035
|
};
|