@yuku123/z-team-component 0.2.19 → 0.2.22
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/{InvitationManagementPage-CXABWAsC.js → InvitationManagementPage-C0FUV1TU.js} +2 -2
- package/dist/{OnboardingPage-CVW00fMq.js → OnboardingPage-B030Arpo.js} +2 -2
- package/dist/{ProjectApp-BlLiCgpN.js → ProjectApp-nq_XicIi.js} +3 -3
- package/dist/{admin-logs-1ld3lzCM.js → admin-logs-96BMdLm3.js} +2 -2
- package/dist/{api-CPLNBlG6.js → api-Cilf5gIj.js} +1 -1
- package/dist/{api-DrwVSH9U.js → api-DayyjL1e.js} +496 -478
- package/dist/{createWorkspaceWsHandler-oFqLJfnn.js → createWorkspaceWsHandler-Dgpag_y3.js} +4 -4
- package/dist/{index-C_jearbI.js → index-BX-3TBsz.js} +6 -6
- package/dist/{index-DMrKqSMi.js → index-BuGgpiDq.js} +4 -4
- package/dist/{index-fsVYzhZa.js → index-CW8ICCZX.js} +3 -3
- package/dist/{index-wJ5boaks.js → index-Cnw06MGB.js} +3 -3
- package/dist/{index-NP9NEJg7.js → index-DHGvzWWQ.js} +3 -3
- package/dist/{index-DD0zq3u0.js → index-DN6iuI7S.js} +10 -10
- package/dist/{index-qnwzFacI.js → index-Drj0OTv1.js} +7 -7
- package/dist/{index-DNVCGr--.js → index-DvXzJh2b.js} +18320 -18193
- package/dist/{index-DxbG5SaU.js → index-gqKmHnTZ.js} +4 -4
- package/dist/{index-Di4T51xg.js → index-pJERGpTh.js} +1 -1
- package/dist/{index-CemLwRut.js → index-sGtg7MFg.js} +2 -2
- package/dist/index.js +1 -1
- package/dist/{instance-0k79E34u.js → instance-CNHJqTd1.js} +1 -1
- package/dist/pages.js +1 -1
- package/dist/{send-default-agent-team-message-CscqcSGe.js → send-default-agent-team-message-CRRwpv0q.js} +1 -1
- package/dist/{sso-user-SBawWc0G.js → sso-user-D0JzsJeR.js} +1 -1
- package/dist/{useAppStore-jVuolAFy.js → useAppStore-BYXwTjW-.js} +1 -1
- package/dist/z-team-component.css +1 -1
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { message as
|
|
1
|
+
import { message as H } from "antd";
|
|
2
2
|
function p(e) {
|
|
3
3
|
return e == null || e === "" ? "" : typeof e == "string" ? e : String(e);
|
|
4
4
|
}
|
|
@@ -15,9 +15,9 @@ function Ke(e) {
|
|
|
15
15
|
}
|
|
16
16
|
function ue(e) {
|
|
17
17
|
const n = p(e);
|
|
18
|
-
return n !== "" &&
|
|
18
|
+
return n !== "" && le(n, "0") > 0;
|
|
19
19
|
}
|
|
20
|
-
function
|
|
20
|
+
function le(e, n) {
|
|
21
21
|
const t = p(e), s = p(n);
|
|
22
22
|
if (t === s)
|
|
23
23
|
return 0;
|
|
@@ -26,26 +26,26 @@ function de(e, n) {
|
|
|
26
26
|
if (s === "")
|
|
27
27
|
return -1;
|
|
28
28
|
try {
|
|
29
|
-
const o = BigInt(t),
|
|
30
|
-
return o <
|
|
29
|
+
const o = BigInt(t), d = BigInt(s);
|
|
30
|
+
return o < d ? -1 : 1;
|
|
31
31
|
} catch {
|
|
32
32
|
return t < s ? -1 : 1;
|
|
33
33
|
}
|
|
34
34
|
}
|
|
35
|
-
const
|
|
36
|
-
function
|
|
35
|
+
const pe = 101012001;
|
|
36
|
+
function fe() {
|
|
37
37
|
const e = typeof window < "u" && window.ZTEAM_SSO_BASE || "";
|
|
38
38
|
return e ? e.replace(/\/+$/, "") : typeof window > "u" ? "http://localhost" : window.location.origin;
|
|
39
39
|
}
|
|
40
|
-
function
|
|
40
|
+
function me() {
|
|
41
41
|
const e = new URL(window.location.href);
|
|
42
42
|
e.searchParams.has("_from_login") || e.searchParams.set("_from_login", "1");
|
|
43
|
-
const n = `${
|
|
43
|
+
const n = `${fe()}/login?redirect=${encodeURIComponent(
|
|
44
44
|
e.toString()
|
|
45
45
|
)}`;
|
|
46
46
|
window.location.href = n;
|
|
47
47
|
}
|
|
48
|
-
async function
|
|
48
|
+
async function ye() {
|
|
49
49
|
try {
|
|
50
50
|
const e = await w(`${S}/sso/attach-ctc-token`, {
|
|
51
51
|
...h,
|
|
@@ -59,7 +59,7 @@ async function me() {
|
|
|
59
59
|
return !1;
|
|
60
60
|
}
|
|
61
61
|
}
|
|
62
|
-
async function
|
|
62
|
+
async function Ve(e, n) {
|
|
63
63
|
const t = n != null && n.trim() !== "" ? { result: n } : void 0, s = await w(`${S}/tasks/${e}/complete`, {
|
|
64
64
|
...h,
|
|
65
65
|
method: "POST",
|
|
@@ -68,7 +68,7 @@ async function Qe(e, n) {
|
|
|
68
68
|
});
|
|
69
69
|
return T(s, "完成任务失败");
|
|
70
70
|
}
|
|
71
|
-
async function
|
|
71
|
+
async function Qe(e, n) {
|
|
72
72
|
const t = await w(`${S}/tasks/${e}/suspend`, {
|
|
73
73
|
...h,
|
|
74
74
|
method: "POST",
|
|
@@ -107,47 +107,47 @@ async function Ye(e) {
|
|
|
107
107
|
return T(n, "加载任务失败");
|
|
108
108
|
}
|
|
109
109
|
const en = "http://127.0.0.1/kapi/z-webide/inspect";
|
|
110
|
-
let l = null, P = [], k = [], b = 0,
|
|
111
|
-
function
|
|
112
|
-
|
|
110
|
+
let l = null, P = [], k = [], b = 0, K = "", j = null, O = 0, $ = null, ee = "disconnected";
|
|
111
|
+
function D(e) {
|
|
112
|
+
ee = e, k.forEach((n) => n(e));
|
|
113
113
|
}
|
|
114
|
-
function
|
|
114
|
+
function V() {
|
|
115
115
|
return b !== 0 && b !== "";
|
|
116
116
|
}
|
|
117
|
-
function
|
|
117
|
+
function $e(e, n = "") {
|
|
118
118
|
const t = window.location.protocol === "https:" ? "wss:" : "ws:", s = window.location.host, o = n ? `?token=${encodeURIComponent(n)}` : "";
|
|
119
|
-
return `${t}//${s}${
|
|
119
|
+
return `${t}//${s}${Ie}/${e}/ws${o}`;
|
|
120
120
|
}
|
|
121
121
|
function nn(e) {
|
|
122
|
-
return k.push(e), e(
|
|
122
|
+
return k.push(e), e(ee), () => {
|
|
123
123
|
k = k.filter((n) => n !== e);
|
|
124
124
|
};
|
|
125
125
|
}
|
|
126
|
-
function
|
|
126
|
+
function he(e, n = "", t) {
|
|
127
127
|
if (l && (l.readyState === WebSocket.CONNECTING || l.readyState === WebSocket.OPEN) && b === e)
|
|
128
128
|
return;
|
|
129
129
|
l && (l.onclose = null, l.close(), l = null), $ != null && (clearTimeout($), $ = null);
|
|
130
|
-
const s =
|
|
131
|
-
b = e,
|
|
132
|
-
O = 0,
|
|
130
|
+
const s = $e(e, n);
|
|
131
|
+
b = e, K = n, t && (j = t), D("connecting"), l = new WebSocket(s), l.onopen = () => {
|
|
132
|
+
O = 0, D("connected"), console.log("[WS] connected");
|
|
133
133
|
}, l.onmessage = (o) => {
|
|
134
134
|
try {
|
|
135
|
-
const
|
|
136
|
-
console.log("[WS recv]",
|
|
135
|
+
const d = JSON.parse(o.data);
|
|
136
|
+
console.log("[WS recv]", d.type, d), P.forEach((u) => u(d));
|
|
137
137
|
} catch {
|
|
138
138
|
}
|
|
139
139
|
}, l.onerror = () => {
|
|
140
140
|
console.warn("[WS] connection error:", s);
|
|
141
141
|
}, l.onclose = (o) => {
|
|
142
|
-
const
|
|
143
|
-
if (l = null,
|
|
142
|
+
const d = o.wasClean;
|
|
143
|
+
if (l = null, D("disconnected"), !V()) return;
|
|
144
144
|
O += 1;
|
|
145
|
-
const
|
|
145
|
+
const u = Math.min(3e3 * O, 3e4);
|
|
146
146
|
console.warn(
|
|
147
|
-
`[WS] closed (clean=${
|
|
147
|
+
`[WS] closed (clean=${d}), reconnect #${O} in ${u}ms`
|
|
148
148
|
), $ = setTimeout(() => {
|
|
149
|
-
$ = null,
|
|
150
|
-
},
|
|
149
|
+
$ = null, V() && (he(b, K), j == null || j());
|
|
150
|
+
}, u);
|
|
151
151
|
};
|
|
152
152
|
}
|
|
153
153
|
function tn(e) {
|
|
@@ -156,15 +156,15 @@ function tn(e) {
|
|
|
156
156
|
};
|
|
157
157
|
}
|
|
158
158
|
async function sn(e) {
|
|
159
|
-
await
|
|
159
|
+
await ye().catch(() => {
|
|
160
160
|
}), l && l.readyState === WebSocket.OPEN && l.send(JSON.stringify(e));
|
|
161
161
|
}
|
|
162
|
-
function
|
|
163
|
-
b = 0, $ != null && (clearTimeout($), $ = null), l && (l.onclose = null, l.close(), l = null), O = 0,
|
|
162
|
+
function ge() {
|
|
163
|
+
b = 0, $ != null && (clearTimeout($), $ = null), l && (l.onclose = null, l.close(), l = null), O = 0, D("disconnected"), P = [], k = [];
|
|
164
164
|
}
|
|
165
165
|
const h = { credentials: "include" };
|
|
166
|
-
function
|
|
167
|
-
n === "warning" ?
|
|
166
|
+
function J(e, n = "error") {
|
|
167
|
+
n === "warning" ? H.warning(e) : H.error(e);
|
|
168
168
|
}
|
|
169
169
|
typeof window < "u" && window.addEventListener(
|
|
170
170
|
"unhandledrejection",
|
|
@@ -174,52 +174,52 @@ typeof window < "u" && window.addEventListener(
|
|
|
174
174
|
}
|
|
175
175
|
);
|
|
176
176
|
let Q = !1;
|
|
177
|
-
const
|
|
178
|
-
function
|
|
177
|
+
const G = "登录已失效,请重新登录";
|
|
178
|
+
function Se(e) {
|
|
179
179
|
if (!e) return !1;
|
|
180
|
-
if (Number(e.code) ===
|
|
180
|
+
if (Number(e.code) === pe) return !0;
|
|
181
181
|
const n = typeof e.message == "string" ? e.message : "";
|
|
182
182
|
return /登录(?:已)?(?:失效|过期)|重新登录|未登录/.test(n);
|
|
183
183
|
}
|
|
184
|
-
function
|
|
184
|
+
function Z() {
|
|
185
185
|
if (!Q) {
|
|
186
186
|
Q = !0;
|
|
187
187
|
try {
|
|
188
|
-
|
|
188
|
+
ge();
|
|
189
189
|
} catch {
|
|
190
190
|
}
|
|
191
191
|
try {
|
|
192
192
|
localStorage.removeItem("ft_token"), localStorage.removeItem("USER_INFO"), delete window.USER_INFO;
|
|
193
193
|
} catch {
|
|
194
194
|
}
|
|
195
|
-
|
|
195
|
+
me();
|
|
196
196
|
}
|
|
197
197
|
throw {
|
|
198
198
|
_apiUserError: !0,
|
|
199
|
-
userMessage:
|
|
200
|
-
message:
|
|
199
|
+
userMessage: G,
|
|
200
|
+
message: G
|
|
201
201
|
};
|
|
202
202
|
}
|
|
203
|
-
function
|
|
203
|
+
function X(e, n) {
|
|
204
204
|
return e.status === 401 ? "登录已失效,请重新登录" : e.status === 403 ? "没有权限访问该资源" : e.status === 404 ? "接口不存在,请确认后端已启动且路径为 /z-team" : e.status >= 500 ? "服务暂时不可用,请稍后重试" : (e.status >= 400, n);
|
|
205
205
|
}
|
|
206
|
-
const
|
|
206
|
+
const ne = "/z-team", we = typeof window < "u" && /(zteam[-.]ft\.(zteam\.local|zteam\.local)|team\.zteam\.local)/i.test(
|
|
207
207
|
window.location.hostname
|
|
208
|
-
),
|
|
208
|
+
), L = we, Te = `${L ? "/kapi" : ""}${ne}/api`, Ie = `${L ? "/kapi" : ""}${ne}/v1/scenario-instances`, Ce = window.ENV_TYPE || window.envType || "", S = Te, on = `${L ? "/kapi" : ""}/z-team-evolution/api`, an = `${L ? "/kapi" : ""}/z-team-bench/api`, _e = Ce || "local";
|
|
209
209
|
async function w(e, n) {
|
|
210
210
|
try {
|
|
211
211
|
const t = {
|
|
212
|
-
"project-env":
|
|
212
|
+
"project-env": _e,
|
|
213
213
|
...n == null ? void 0 : n.headers
|
|
214
214
|
};
|
|
215
215
|
return await fetch(e, { ...h, ...n, headers: t });
|
|
216
216
|
} catch {
|
|
217
217
|
const t = "无法连接服务器,请确认 Java 服务已启动(如 127.0.0.1:8080)且前端代理 /z-team 已配置";
|
|
218
|
-
throw
|
|
218
|
+
throw J(t), { _apiUserError: !0, userMessage: t, message: t };
|
|
219
219
|
}
|
|
220
220
|
}
|
|
221
221
|
async function T(e, n) {
|
|
222
|
-
e.status === 401 &&
|
|
222
|
+
e.status === 401 && Z();
|
|
223
223
|
const t = await e.text().catch(() => "");
|
|
224
224
|
let s = {};
|
|
225
225
|
if (t)
|
|
@@ -227,8 +227,8 @@ async function T(e, n) {
|
|
|
227
227
|
s = JSON.parse(t);
|
|
228
228
|
} catch {
|
|
229
229
|
if (!e.ok) {
|
|
230
|
-
const o =
|
|
231
|
-
throw
|
|
230
|
+
const o = X(e, n);
|
|
231
|
+
throw J(
|
|
232
232
|
e.status >= 500 ? o : `${o}(HTTP ${e.status},响应非 JSON)`
|
|
233
233
|
), {
|
|
234
234
|
_apiUserError: !0,
|
|
@@ -238,20 +238,20 @@ async function T(e, n) {
|
|
|
238
238
|
}
|
|
239
239
|
return t;
|
|
240
240
|
}
|
|
241
|
-
if (
|
|
241
|
+
if (Se(s) && Z(), typeof s.success == "boolean") {
|
|
242
242
|
if (s.success)
|
|
243
243
|
return s.data !== void 0 ? s.data : !0;
|
|
244
244
|
const o = s.message || // z-team 另有 7 个 admin controller 挂 bench Result({code,msg,data,success})
|
|
245
245
|
s.msg || s.detail || n;
|
|
246
|
-
throw
|
|
246
|
+
throw J(o), {
|
|
247
247
|
_apiUserError: !0,
|
|
248
248
|
userMessage: o,
|
|
249
249
|
message: o
|
|
250
250
|
};
|
|
251
251
|
}
|
|
252
252
|
if (!e.ok) {
|
|
253
|
-
const o = s.detail || s.message ||
|
|
254
|
-
throw
|
|
253
|
+
const o = s.detail || s.message || X(e, n);
|
|
254
|
+
throw J(o), {
|
|
255
255
|
_apiUserError: !0,
|
|
256
256
|
userMessage: o,
|
|
257
257
|
message: o
|
|
@@ -259,31 +259,46 @@ async function T(e, n) {
|
|
|
259
259
|
}
|
|
260
260
|
return s;
|
|
261
261
|
}
|
|
262
|
-
const
|
|
263
|
-
function
|
|
264
|
-
return e.replace(
|
|
262
|
+
const be = /_+([a-z0-9])/gi;
|
|
263
|
+
function Ae(e) {
|
|
264
|
+
return e.replace(be, (n, t) => t.toUpperCase());
|
|
265
265
|
}
|
|
266
|
-
function
|
|
267
|
-
if (Array.isArray(e)) return e.map((n) =>
|
|
266
|
+
function F(e) {
|
|
267
|
+
if (Array.isArray(e)) return e.map((n) => F(n));
|
|
268
268
|
if (e && typeof e == "object" && !(e instanceof Date)) {
|
|
269
269
|
const n = {};
|
|
270
270
|
for (const [t, s] of Object.entries(e))
|
|
271
|
-
n[
|
|
271
|
+
n[Ae(t)] = F(s);
|
|
272
272
|
return n;
|
|
273
273
|
}
|
|
274
274
|
return e;
|
|
275
275
|
}
|
|
276
276
|
async function rn(e, n) {
|
|
277
|
-
return
|
|
277
|
+
return F(await T(e, n));
|
|
278
278
|
}
|
|
279
279
|
const c = {
|
|
280
280
|
credentials: "include",
|
|
281
281
|
// 强制标识为 XHR/fetch API 请求,使后端 SsoInterceptor 走 JSON 401 分支
|
|
282
282
|
// 而不是返回 302 跳到 SSO 登录页(避免 fetch follow redirect 后拿到 SPA HTML 导致解析失败)
|
|
283
283
|
headers: { Accept: "application/json" }
|
|
284
|
-
},
|
|
285
|
-
function
|
|
286
|
-
|
|
284
|
+
}, R = "zindexer_admin_token";
|
|
285
|
+
function cn() {
|
|
286
|
+
return typeof localStorage > "u" ? "" : localStorage.getItem(R) || "";
|
|
287
|
+
}
|
|
288
|
+
function dn(e) {
|
|
289
|
+
if (typeof localStorage > "u") return;
|
|
290
|
+
const n = (e || "").trim();
|
|
291
|
+
if (!n) {
|
|
292
|
+
localStorage.removeItem(R);
|
|
293
|
+
return;
|
|
294
|
+
}
|
|
295
|
+
localStorage.setItem(R, n);
|
|
296
|
+
}
|
|
297
|
+
function un() {
|
|
298
|
+
typeof localStorage > "u" || localStorage.removeItem(R);
|
|
299
|
+
}
|
|
300
|
+
function I(e = {}) {
|
|
301
|
+
const n = (typeof localStorage < "u" ? localStorage.getItem(R) : "") || "";
|
|
287
302
|
return {
|
|
288
303
|
...c,
|
|
289
304
|
...e,
|
|
@@ -299,7 +314,7 @@ class Ue extends Error {
|
|
|
299
314
|
super(n), this._apiUserError = !0, this.name = "ApiUserError", this.userMessage = n;
|
|
300
315
|
}
|
|
301
316
|
}
|
|
302
|
-
function
|
|
317
|
+
function ln(e) {
|
|
303
318
|
return e instanceof Ue ? !0 : !!(e && typeof e == "object" && e._apiUserError);
|
|
304
319
|
}
|
|
305
320
|
function g(e, n = "error") {
|
|
@@ -312,10 +327,10 @@ typeof window < "u" && window.addEventListener(
|
|
|
312
327
|
n && typeof n == "object" && n._apiUserError && e.preventDefault();
|
|
313
328
|
}
|
|
314
329
|
);
|
|
315
|
-
function
|
|
330
|
+
function Y(e, n) {
|
|
316
331
|
return e.status === 401 ? "登录已失效,请重新登录" : e.status === 403 ? "没有权限访问该资源" : e.status === 404 ? "接口不存在,请确认后端已启动且路径为 /z-team" : e.status >= 500 ? "服务暂时不可用,请稍后重试" : (e.status >= 400, n);
|
|
317
332
|
}
|
|
318
|
-
const Ee = "/z-team", Oe = typeof window < "u" && window.ZTEAM_USE_KAPI === !0,
|
|
333
|
+
const Ee = "/z-team", Oe = typeof window < "u" && window.ZTEAM_USE_KAPI === !0, te = Oe, se = `${te ? "/kapi" : ""}${Ee}/api`, Pe = window.ENV_TYPE || window.envType || "", r = se, ke = `${te ? "/kapi" : ""}/z-team-evolution/api`;
|
|
319
334
|
async function Re(e) {
|
|
320
335
|
const n = new FormData();
|
|
321
336
|
n.append("file", e);
|
|
@@ -324,20 +339,20 @@ async function Re(e) {
|
|
|
324
339
|
body: n
|
|
325
340
|
}), s = await a(t, "上传图片失败"), o = typeof (s == null ? void 0 : s.url) == "string" ? s.url : "";
|
|
326
341
|
if (!o) {
|
|
327
|
-
const
|
|
328
|
-
throw g(
|
|
342
|
+
const d = "上传图片失败:响应缺少图片地址";
|
|
343
|
+
throw g(d), { _apiUserError: !0, userMessage: d, message: d };
|
|
329
344
|
}
|
|
330
345
|
return o;
|
|
331
346
|
}
|
|
332
|
-
async function
|
|
347
|
+
async function pn(e) {
|
|
333
348
|
return Promise.all(e.map((n) => Re(n)));
|
|
334
349
|
}
|
|
335
|
-
const
|
|
350
|
+
const ve = Pe || "local";
|
|
336
351
|
async function i(e, n) {
|
|
337
352
|
try {
|
|
338
353
|
const t = {
|
|
339
354
|
...c.headers,
|
|
340
|
-
"project-env":
|
|
355
|
+
"project-env": ve,
|
|
341
356
|
...n == null ? void 0 : n.headers
|
|
342
357
|
};
|
|
343
358
|
return await fetch(e, { ...c, ...n, headers: t });
|
|
@@ -346,7 +361,7 @@ async function i(e, n) {
|
|
|
346
361
|
throw g(t), { _apiUserError: !0, userMessage: t, message: t };
|
|
347
362
|
}
|
|
348
363
|
}
|
|
349
|
-
function
|
|
364
|
+
function oe(e) {
|
|
350
365
|
const n = e.id ?? e.staff_id ?? e.staffId ?? e.user_id ?? e.userId;
|
|
351
366
|
return {
|
|
352
367
|
// FE-PRECISION-FIX: 雪花 ID 保持字符串,禁止走 Number()
|
|
@@ -366,49 +381,49 @@ async function a(e, n) {
|
|
|
366
381
|
s = JSON.parse(t);
|
|
367
382
|
} catch {
|
|
368
383
|
if (!e.ok) {
|
|
369
|
-
const
|
|
384
|
+
const u = Y(e, n);
|
|
370
385
|
throw g(
|
|
371
|
-
e.status >= 500 ?
|
|
386
|
+
e.status >= 500 ? u : `${u}(HTTP ${e.status},响应非 JSON)`
|
|
372
387
|
), {
|
|
373
388
|
_apiUserError: !0,
|
|
374
|
-
userMessage:
|
|
375
|
-
message:
|
|
389
|
+
userMessage: u,
|
|
390
|
+
message: u
|
|
376
391
|
};
|
|
377
392
|
}
|
|
378
393
|
return t;
|
|
379
394
|
}
|
|
380
|
-
const o = s.status_code ?? s.statusCode,
|
|
395
|
+
const o = s.status_code ?? s.statusCode, d = s.success === !0 || typeof o == "number" && o >= 200 && o < 300;
|
|
381
396
|
if (typeof s.success == "boolean" || typeof o == "number") {
|
|
382
|
-
if (
|
|
397
|
+
if (d)
|
|
383
398
|
return s.data !== void 0 ? s.data : !0;
|
|
384
|
-
const
|
|
385
|
-
throw g(
|
|
399
|
+
const u = s.message || s.msg || s.detail || n;
|
|
400
|
+
throw g(u), {
|
|
386
401
|
_apiUserError: !0,
|
|
387
|
-
userMessage:
|
|
388
|
-
message:
|
|
402
|
+
userMessage: u,
|
|
403
|
+
message: u
|
|
389
404
|
};
|
|
390
405
|
}
|
|
391
406
|
if (!e.ok) {
|
|
392
|
-
const
|
|
393
|
-
throw g(
|
|
407
|
+
const u = s.detail || s.message || Y(e, n);
|
|
408
|
+
throw g(u), {
|
|
394
409
|
_apiUserError: !0,
|
|
395
|
-
userMessage:
|
|
396
|
-
message:
|
|
410
|
+
userMessage: u,
|
|
411
|
+
message: u
|
|
397
412
|
};
|
|
398
413
|
}
|
|
399
414
|
return s;
|
|
400
415
|
}
|
|
401
|
-
async function
|
|
416
|
+
async function fn(e, n) {
|
|
402
417
|
const t = await fetch("/kapi/z-ctc/api/ctc/authn/login", {
|
|
403
418
|
...c,
|
|
404
419
|
method: "POST",
|
|
405
420
|
headers: { "Content-Type": "application/json" },
|
|
406
421
|
credentials: "include",
|
|
407
422
|
body: JSON.stringify({ identifier: e, password: n })
|
|
408
|
-
}), s = await a(t, "登录失败"), o = (s == null ? void 0 : s.userInfo) ?? (s == null ? void 0 : s.user_info) ?? (s == null ? void 0 : s.user) ?? s,
|
|
409
|
-
return { token: (s == null ? void 0 : s.token) ?? "", user:
|
|
423
|
+
}), s = await a(t, "登录失败"), o = (s == null ? void 0 : s.userInfo) ?? (s == null ? void 0 : s.user_info) ?? (s == null ? void 0 : s.user) ?? s, d = oe(o);
|
|
424
|
+
return { token: (s == null ? void 0 : s.token) ?? "", user: d };
|
|
410
425
|
}
|
|
411
|
-
async function
|
|
426
|
+
async function mn(e) {
|
|
412
427
|
const n = await fetch("/kapi/z-ctc/api/ctc/authn/whoami", {
|
|
413
428
|
...c,
|
|
414
429
|
credentials: "include"
|
|
@@ -416,9 +431,9 @@ async function ln(e) {
|
|
|
416
431
|
n,
|
|
417
432
|
"获取用户信息失败"
|
|
418
433
|
);
|
|
419
|
-
return
|
|
434
|
+
return oe(t);
|
|
420
435
|
}
|
|
421
|
-
async function
|
|
436
|
+
async function yn(e) {
|
|
422
437
|
await a(
|
|
423
438
|
await fetch("/kapi/z-ctc/api/ctc/authn/logout", {
|
|
424
439
|
...c,
|
|
@@ -432,7 +447,7 @@ async function pn(e) {
|
|
|
432
447
|
} catch {
|
|
433
448
|
}
|
|
434
449
|
}
|
|
435
|
-
async function
|
|
450
|
+
async function $n(e, n) {
|
|
436
451
|
try {
|
|
437
452
|
const t = await fetch(
|
|
438
453
|
`/kapi/z-ctc/api/ctc/authz/users/permissions?userId=${e}`,
|
|
@@ -444,12 +459,12 @@ async function fn(e, n) {
|
|
|
444
459
|
);
|
|
445
460
|
if (!t.ok) return [];
|
|
446
461
|
const s = await t.json(), o = (s == null ? void 0 : s.data) ?? s;
|
|
447
|
-
return Array.isArray(o) ? o.map((
|
|
462
|
+
return Array.isArray(o) ? o.map((d) => (d == null ? void 0 : d.resource_code) ?? (d == null ? void 0 : d.resourceCode)).filter((d) => typeof d == "string" && d) : [];
|
|
448
463
|
} catch {
|
|
449
464
|
return [];
|
|
450
465
|
}
|
|
451
466
|
}
|
|
452
|
-
async function
|
|
467
|
+
async function hn(e = "", n) {
|
|
453
468
|
const t = new URLSearchParams();
|
|
454
469
|
e && t.set("token", e), n && t.set("create_time_start", n);
|
|
455
470
|
const s = t.toString(), o = await i(
|
|
@@ -458,11 +473,11 @@ async function mn(e = "", n) {
|
|
|
458
473
|
);
|
|
459
474
|
return a(o, "获取项目列表失败");
|
|
460
475
|
}
|
|
461
|
-
async function
|
|
476
|
+
async function gn(e = "") {
|
|
462
477
|
const n = e ? `?token=${encodeURIComponent(e)}` : "", t = await i(`${r}/scenarios${n}`, c);
|
|
463
478
|
return a(t, "获取场景列表失败");
|
|
464
479
|
}
|
|
465
|
-
async function
|
|
480
|
+
async function Ne(e, n = "") {
|
|
466
481
|
const t = n ? `?token=${encodeURIComponent(n)}` : "", s = {
|
|
467
482
|
...e,
|
|
468
483
|
extend_params: { ...e.extend_params, skip_init_task: "true" }
|
|
@@ -471,10 +486,10 @@ async function ve(e, n = "") {
|
|
|
471
486
|
method: "POST",
|
|
472
487
|
headers: { "Content-Type": "application/json" },
|
|
473
488
|
body: JSON.stringify(s)
|
|
474
|
-
}),
|
|
475
|
-
return A(
|
|
489
|
+
}), d = await a(o, "创建项目失败");
|
|
490
|
+
return A(d);
|
|
476
491
|
}
|
|
477
|
-
const
|
|
492
|
+
const Sn = Ne;
|
|
478
493
|
function A(e) {
|
|
479
494
|
return {
|
|
480
495
|
// FE-PRECISION-FIX: 雪花 ID 是 19 位 bigint, Number() 会丢末位精度
|
|
@@ -492,16 +507,16 @@ function A(e) {
|
|
|
492
507
|
scenario_name: e.scenario_name != null ? String(e.scenario_name) : e.scenarioName != null ? String(e.scenarioName) : void 0,
|
|
493
508
|
role: e.role != null ? String(e.role) : void 0,
|
|
494
509
|
llm_code: e.llm_code != null ? String(e.llm_code) : e.llmCode != null ? String(e.llmCode) : void 0,
|
|
495
|
-
close_feedback:
|
|
496
|
-
close_tags:
|
|
497
|
-
close_time:
|
|
498
|
-
close_user:
|
|
510
|
+
close_feedback: q(e, "close_feedback"),
|
|
511
|
+
close_tags: q(e, "close_tags"),
|
|
512
|
+
close_time: q(e, "close_time"),
|
|
513
|
+
close_user: q(e, "close_user"),
|
|
499
514
|
members: Array.isArray(e.members) ? e.members.map((n) => String(n)) : void 0,
|
|
500
515
|
parent_id: je(e)
|
|
501
516
|
};
|
|
502
517
|
}
|
|
503
|
-
function
|
|
504
|
-
const t = n.replace(/_([a-z])/g, (
|
|
518
|
+
function q(e, n) {
|
|
519
|
+
const t = n.replace(/_([a-z])/g, (u, f) => f.toUpperCase());
|
|
505
520
|
if (e[n] != null) return e[n];
|
|
506
521
|
if (e[t] != null) return e[t];
|
|
507
522
|
const s = e.close_info ?? e.closeInfo;
|
|
@@ -511,9 +526,9 @@ function j(e, n) {
|
|
|
511
526
|
}
|
|
512
527
|
const o = e.ext;
|
|
513
528
|
if (!o) return;
|
|
514
|
-
const
|
|
515
|
-
if (
|
|
516
|
-
return
|
|
529
|
+
const d = o.params;
|
|
530
|
+
if (d)
|
|
531
|
+
return d[n] ?? void 0;
|
|
517
532
|
}
|
|
518
533
|
function je(e) {
|
|
519
534
|
const n = e.ext;
|
|
@@ -525,7 +540,7 @@ function je(e) {
|
|
|
525
540
|
const o = p(s);
|
|
526
541
|
return o === "" ? void 0 : o;
|
|
527
542
|
}
|
|
528
|
-
async function
|
|
543
|
+
async function wn(e, n) {
|
|
529
544
|
const t = await i(
|
|
530
545
|
`${r}/scenario-instances/${e}/llm-code`,
|
|
531
546
|
{
|
|
@@ -537,12 +552,12 @@ async function hn(e, n) {
|
|
|
537
552
|
), s = await a(t, "设置模型失败");
|
|
538
553
|
return A(s);
|
|
539
554
|
}
|
|
540
|
-
const
|
|
541
|
-
function
|
|
555
|
+
const Tn = "qa_support";
|
|
556
|
+
function In(e) {
|
|
542
557
|
const n = e.futureTeamProjectId ?? e.future_team_project_id ?? "", t = p(String(n).trim());
|
|
543
558
|
return ue(t) ? t : null;
|
|
544
559
|
}
|
|
545
|
-
async function
|
|
560
|
+
async function Cn(e, n, t) {
|
|
546
561
|
const s = new URLSearchParams({
|
|
547
562
|
ticketId: e,
|
|
548
563
|
futureTeamProjectId: String(n),
|
|
@@ -556,14 +571,14 @@ async function wn(e, n, t) {
|
|
|
556
571
|
});
|
|
557
572
|
await a(o, "回写工单关联工程失败");
|
|
558
573
|
}
|
|
559
|
-
async function
|
|
574
|
+
async function _n(e) {
|
|
560
575
|
const n = await i(
|
|
561
576
|
`${r}/scenario-instances/${e}/team/`,
|
|
562
577
|
c
|
|
563
578
|
);
|
|
564
579
|
return a(n, "获取团队成员失败");
|
|
565
580
|
}
|
|
566
|
-
async function
|
|
581
|
+
async function bn(e, n) {
|
|
567
582
|
const t = await i(`${r}/scenario-instances/${e}/team/`, {
|
|
568
583
|
...c,
|
|
569
584
|
method: "POST",
|
|
@@ -572,7 +587,7 @@ async function Cn(e, n) {
|
|
|
572
587
|
});
|
|
573
588
|
return a(t, "添加成员失败");
|
|
574
589
|
}
|
|
575
|
-
async function
|
|
590
|
+
async function An(e, n) {
|
|
576
591
|
const t = await i(
|
|
577
592
|
`${r}/scenario-instances/${e}/team/${n}`,
|
|
578
593
|
{
|
|
@@ -582,35 +597,35 @@ async function In(e, n) {
|
|
|
582
597
|
);
|
|
583
598
|
return a(t, "移除成员失败");
|
|
584
599
|
}
|
|
585
|
-
async function
|
|
600
|
+
async function Un(e) {
|
|
586
601
|
const n = await i(
|
|
587
602
|
`${r}/scenario-instances/${e}/team/available-agents`,
|
|
588
603
|
c
|
|
589
604
|
);
|
|
590
605
|
return a(n, "获取Agent列表失败");
|
|
591
606
|
}
|
|
592
|
-
async function
|
|
607
|
+
async function En(e) {
|
|
593
608
|
const n = await i(
|
|
594
609
|
`${r}/scenario-instances/${e}/team/available-humans`,
|
|
595
610
|
c
|
|
596
611
|
);
|
|
597
612
|
return a(n, "获取用户列表失败");
|
|
598
613
|
}
|
|
599
|
-
async function
|
|
614
|
+
async function On(e) {
|
|
600
615
|
const n = await i(
|
|
601
616
|
`${r}/scenario-instances/${e}/skills`,
|
|
602
617
|
c
|
|
603
618
|
);
|
|
604
619
|
return a(n, "获取技能列表失败");
|
|
605
620
|
}
|
|
606
|
-
async function
|
|
621
|
+
async function Pn(e) {
|
|
607
622
|
const n = await i(
|
|
608
623
|
`${r}/scenario-instances/${e}/all-skills`,
|
|
609
624
|
c
|
|
610
625
|
);
|
|
611
626
|
return a(n, "获取全部技能列表失败");
|
|
612
627
|
}
|
|
613
|
-
async function
|
|
628
|
+
async function kn(e, n) {
|
|
614
629
|
const t = await i(`${r}/scenario-instances/${e}/skills`, {
|
|
615
630
|
...c,
|
|
616
631
|
method: "POST",
|
|
@@ -619,7 +634,7 @@ async function En(e, n) {
|
|
|
619
634
|
});
|
|
620
635
|
return a(t, "添加技能失败");
|
|
621
636
|
}
|
|
622
|
-
async function
|
|
637
|
+
async function Rn(e, n) {
|
|
623
638
|
const t = await i(
|
|
624
639
|
`${r}/scenario-instances/${e}/skills/${n}`,
|
|
625
640
|
{
|
|
@@ -629,7 +644,7 @@ async function On(e, n) {
|
|
|
629
644
|
);
|
|
630
645
|
return a(t, "移除技能失败");
|
|
631
646
|
}
|
|
632
|
-
async function
|
|
647
|
+
async function vn(e, n) {
|
|
633
648
|
const t = await i(
|
|
634
649
|
`${r}/scenario-instances/${e}/agent-skills/refresh`,
|
|
635
650
|
{
|
|
@@ -641,7 +656,7 @@ async function Pn(e, n) {
|
|
|
641
656
|
);
|
|
642
657
|
return a(t, "刷新技能失败");
|
|
643
658
|
}
|
|
644
|
-
async function
|
|
659
|
+
async function Nn(e) {
|
|
645
660
|
const n = await i(
|
|
646
661
|
`${r}/scenario-instances/${e}/all-agent-skills/refresh`,
|
|
647
662
|
{
|
|
@@ -651,13 +666,13 @@ async function kn(e) {
|
|
|
651
666
|
);
|
|
652
667
|
return a(n, "刷新所有技能失败");
|
|
653
668
|
}
|
|
654
|
-
async function
|
|
669
|
+
async function jn(e, n = 50, t) {
|
|
655
670
|
let s = `${r}/scenario-instances/${e}/messages?limit=${n}`;
|
|
656
671
|
t && (s += `&before=${t}`);
|
|
657
672
|
const o = await i(s, c);
|
|
658
673
|
return a(o, "加载聊天记录失败,请稍后重试");
|
|
659
674
|
}
|
|
660
|
-
async function
|
|
675
|
+
async function qn(e, n, t = "") {
|
|
661
676
|
const s = t ? `?token=${encodeURIComponent(t)}` : "", o = await i(
|
|
662
677
|
`${r}/scenario-instances/${e}/messages/${n}/read${s}`,
|
|
663
678
|
{
|
|
@@ -667,7 +682,7 @@ async function Nn(e, n, t = "") {
|
|
|
667
682
|
);
|
|
668
683
|
return a(o, "标记已读失败");
|
|
669
684
|
}
|
|
670
|
-
async function
|
|
685
|
+
async function Dn(e, n, t = "") {
|
|
671
686
|
const s = t ? `?token=${encodeURIComponent(t)}` : "", o = await i(
|
|
672
687
|
`${r}/scenario-instances/${e}/messages${s}`,
|
|
673
688
|
{
|
|
@@ -679,7 +694,7 @@ async function vn(e, n, t = "") {
|
|
|
679
694
|
);
|
|
680
695
|
return a(o, "发送消息失败");
|
|
681
696
|
}
|
|
682
|
-
async function
|
|
697
|
+
async function Jn(e, n) {
|
|
683
698
|
const t = await i(
|
|
684
699
|
`${r}/scenario-instances/${e}/cancel/${n}`,
|
|
685
700
|
{ ...c, method: "POST" }
|
|
@@ -688,32 +703,32 @@ async function jn(e, n) {
|
|
|
688
703
|
throw new Error(String(s.warning));
|
|
689
704
|
return s;
|
|
690
705
|
}
|
|
691
|
-
async function
|
|
706
|
+
async function Ln(e, n) {
|
|
692
707
|
const t = await i(
|
|
693
708
|
`${r}/scenario-instances/${e}/cancel/${n}/queue`,
|
|
694
709
|
{ ...c, method: "POST" }
|
|
695
710
|
);
|
|
696
711
|
return a(t, "停止队列失败");
|
|
697
712
|
}
|
|
698
|
-
async function
|
|
713
|
+
async function Mn(e) {
|
|
699
714
|
const n = await i(
|
|
700
715
|
`${r}/scenario-instances/${e}/executions`,
|
|
701
716
|
c
|
|
702
717
|
);
|
|
703
718
|
return a(n, "获取执行列表失败");
|
|
704
719
|
}
|
|
705
|
-
async function
|
|
720
|
+
async function xn(e, n = "") {
|
|
706
721
|
const t = n ? `?subdir=${encodeURIComponent(n)}` : "", s = await i(
|
|
707
722
|
`${r}/scenario-instances/${e}/workspace/tree${t}`,
|
|
708
723
|
c
|
|
709
724
|
);
|
|
710
725
|
return a(s, "获取文件树失败");
|
|
711
726
|
}
|
|
712
|
-
async function
|
|
727
|
+
async function zn() {
|
|
713
728
|
const e = await i(`${r}/workspace/env`, c);
|
|
714
729
|
return a(e, "获取环境信息失败");
|
|
715
730
|
}
|
|
716
|
-
async function
|
|
731
|
+
async function Fn(e) {
|
|
717
732
|
const n = await i(
|
|
718
733
|
`${r}/scenario-instances/${e}/workspace/sync-from-prod`,
|
|
719
734
|
{
|
|
@@ -724,7 +739,7 @@ async function Mn(e) {
|
|
|
724
739
|
);
|
|
725
740
|
return a(n, "同步失败");
|
|
726
741
|
}
|
|
727
|
-
async function
|
|
742
|
+
async function Bn(e, n) {
|
|
728
743
|
const t = await i(
|
|
729
744
|
`${r}/scenario-instances/${e}/workspace/file?file_path=${encodeURIComponent(
|
|
730
745
|
n
|
|
@@ -733,7 +748,7 @@ async function zn(e, n) {
|
|
|
733
748
|
);
|
|
734
749
|
return a(t, "获取文件内容失败");
|
|
735
750
|
}
|
|
736
|
-
async function
|
|
751
|
+
async function Wn(e, n, t) {
|
|
737
752
|
const s = await i(
|
|
738
753
|
`${r}/scenario-instances/${e}/workspace/file?file_path=${encodeURIComponent(
|
|
739
754
|
n
|
|
@@ -747,7 +762,7 @@ async function xn(e, n, t) {
|
|
|
747
762
|
);
|
|
748
763
|
return a(s, "保存文件失败");
|
|
749
764
|
}
|
|
750
|
-
async function
|
|
765
|
+
async function Hn(e, n, t) {
|
|
751
766
|
const s = await i(
|
|
752
767
|
`${r}/scenario-instances/${e}/workspace/rename`,
|
|
753
768
|
{
|
|
@@ -759,7 +774,7 @@ async function Fn(e, n, t) {
|
|
|
759
774
|
);
|
|
760
775
|
return a(s, "重命名失败");
|
|
761
776
|
}
|
|
762
|
-
async function
|
|
777
|
+
async function Kn(e, n, t) {
|
|
763
778
|
const s = await i(
|
|
764
779
|
`${r}/scenario-instances/${e}/workspace/new-file`,
|
|
765
780
|
{
|
|
@@ -771,7 +786,7 @@ async function Bn(e, n, t) {
|
|
|
771
786
|
);
|
|
772
787
|
return a(s, "新建文件失败");
|
|
773
788
|
}
|
|
774
|
-
async function
|
|
789
|
+
async function Vn(e, n, t) {
|
|
775
790
|
const s = await i(
|
|
776
791
|
`${r}/scenario-instances/${e}/workspace/new-folder`,
|
|
777
792
|
{
|
|
@@ -783,7 +798,7 @@ async function Wn(e, n, t) {
|
|
|
783
798
|
);
|
|
784
799
|
return a(s, "新建文件夹失败");
|
|
785
800
|
}
|
|
786
|
-
async function
|
|
801
|
+
async function Qn(e, n) {
|
|
787
802
|
const t = await i(
|
|
788
803
|
`${r}/scenario-instances/${e}/workspace/delete`,
|
|
789
804
|
{
|
|
@@ -795,7 +810,7 @@ async function Hn(e, n) {
|
|
|
795
810
|
);
|
|
796
811
|
return a(t, "删除失败");
|
|
797
812
|
}
|
|
798
|
-
async function
|
|
813
|
+
async function Gn(e, n, t) {
|
|
799
814
|
const s = new FormData();
|
|
800
815
|
s.append("file", t), s.append("parent_path", n);
|
|
801
816
|
const o = await i(
|
|
@@ -808,9 +823,9 @@ async function Kn(e, n, t) {
|
|
|
808
823
|
);
|
|
809
824
|
return a(o, "上传文件失败");
|
|
810
825
|
}
|
|
811
|
-
async function
|
|
826
|
+
async function Zn(e, n, t) {
|
|
812
827
|
const s = new FormData();
|
|
813
|
-
t.forEach((
|
|
828
|
+
t.forEach((d) => s.append("files", d)), s.append("parent_path", n);
|
|
814
829
|
const o = await i(
|
|
815
830
|
`${r}/scenario-instances/${e}/workspace/upload-folder`,
|
|
816
831
|
{
|
|
@@ -821,7 +836,7 @@ async function Qn(e, n, t) {
|
|
|
821
836
|
);
|
|
822
837
|
return a(o, "上传文件夹失败");
|
|
823
838
|
}
|
|
824
|
-
async function
|
|
839
|
+
async function Xn(e, n) {
|
|
825
840
|
const t = await i(
|
|
826
841
|
`${r}/scenario-instances/${e}/workspace/download?file_path=${encodeURIComponent(
|
|
827
842
|
n
|
|
@@ -835,10 +850,10 @@ async function qe(e, n = "") {
|
|
|
835
850
|
const t = n ? `?token=${encodeURIComponent(n)}` : "", s = await i(
|
|
836
851
|
`${r}/scenario-instances/${e}${t}`,
|
|
837
852
|
c
|
|
838
|
-
), o = await a(s, "获取项目失败"),
|
|
853
|
+
), o = await a(s, "获取项目失败"), d = o.status === "FOUND" ? "FOUND" : "NOT_FOUND", u = o.scenario_instance ?? o.scenarioInstance ?? null;
|
|
839
854
|
return {
|
|
840
|
-
status:
|
|
841
|
-
scenarioInstance:
|
|
855
|
+
status: d,
|
|
856
|
+
scenarioInstance: u ? A(u) : null
|
|
842
857
|
};
|
|
843
858
|
}
|
|
844
859
|
async function De(e, n = "") {
|
|
@@ -861,17 +876,17 @@ async function Je(e, n = "") {
|
|
|
861
876
|
), o = await a(s, "加入工程失败");
|
|
862
877
|
return A(o);
|
|
863
878
|
}
|
|
864
|
-
async function
|
|
879
|
+
async function Yn(e, n = "") {
|
|
865
880
|
return await De(e, n), Je(e, n);
|
|
866
881
|
}
|
|
867
|
-
async function
|
|
882
|
+
async function et(e) {
|
|
868
883
|
const n = await i(`${r}/scenario-instances/${e}`, {
|
|
869
884
|
...c,
|
|
870
885
|
method: "DELETE"
|
|
871
886
|
});
|
|
872
887
|
return a(n, "删除项目失败");
|
|
873
888
|
}
|
|
874
|
-
async function
|
|
889
|
+
async function nt(e, n, t = "") {
|
|
875
890
|
const s = t ? `?token=${encodeURIComponent(t)}` : "", o = await i(
|
|
876
891
|
`${r}/scenario-instances/${e}/fork${s}`,
|
|
877
892
|
{
|
|
@@ -880,10 +895,10 @@ async function Xn(e, n, t = "") {
|
|
|
880
895
|
headers: { "Content-Type": "application/json" },
|
|
881
896
|
body: JSON.stringify({ mode: n })
|
|
882
897
|
}
|
|
883
|
-
),
|
|
884
|
-
return A(
|
|
898
|
+
), d = await a(o, "Fork 项目失败");
|
|
899
|
+
return A(d);
|
|
885
900
|
}
|
|
886
|
-
async function
|
|
901
|
+
async function tt(e, n) {
|
|
887
902
|
const t = await i(`${r}/scenario-instances/${e}`, {
|
|
888
903
|
...c,
|
|
889
904
|
method: "PATCH",
|
|
@@ -892,7 +907,7 @@ async function Yn(e, n) {
|
|
|
892
907
|
}), s = await a(t, "更新项目失败");
|
|
893
908
|
return A(s);
|
|
894
909
|
}
|
|
895
|
-
async function
|
|
910
|
+
async function st(e) {
|
|
896
911
|
const n = await i(
|
|
897
912
|
`${r}/scenario-instances/${e}/retry-image-parse`,
|
|
898
913
|
{
|
|
@@ -906,7 +921,7 @@ async function et(e) {
|
|
|
906
921
|
message: s.message
|
|
907
922
|
};
|
|
908
923
|
}
|
|
909
|
-
async function
|
|
924
|
+
async function ot(e, n, t = "") {
|
|
910
925
|
const s = t ? `?token=${encodeURIComponent(t)}` : "", o = await i(
|
|
911
926
|
`${r}/scenario-instances/${e}/task-sessions/${n}${s}`,
|
|
912
927
|
{
|
|
@@ -917,31 +932,31 @@ async function nt(e, n, t = "") {
|
|
|
917
932
|
);
|
|
918
933
|
return a(o, "创建任务会话失败");
|
|
919
934
|
}
|
|
920
|
-
async function
|
|
921
|
-
let
|
|
922
|
-
s && (
|
|
923
|
-
const
|
|
924
|
-
return a(
|
|
935
|
+
async function at(e, n, t = 50, s, o = "") {
|
|
936
|
+
let d = `${r}/scenario-instances/${e}/task-sessions/${n}/messages?limit=${t}`;
|
|
937
|
+
s && (d += `&before=${s}`), o && (d += `&token=${encodeURIComponent(o)}`);
|
|
938
|
+
const u = await i(d, c);
|
|
939
|
+
return a(u, "获取任务消息失败");
|
|
925
940
|
}
|
|
926
|
-
async function
|
|
927
|
-
const
|
|
928
|
-
o && o.length > 0 && (
|
|
941
|
+
async function rt(e, n, t, s = "", o) {
|
|
942
|
+
const d = s ? `?token=${encodeURIComponent(s)}` : "", u = { content: t };
|
|
943
|
+
o && o.length > 0 && (u.image_urls = o);
|
|
929
944
|
const f = await i(
|
|
930
|
-
`${r}/scenario-instances/${e}/task-sessions/${n}/messages${
|
|
945
|
+
`${r}/scenario-instances/${e}/task-sessions/${n}/messages${d}`,
|
|
931
946
|
{
|
|
932
947
|
...c,
|
|
933
948
|
method: "POST",
|
|
934
949
|
headers: { "Content-Type": "application/json" },
|
|
935
|
-
body: JSON.stringify(
|
|
950
|
+
body: JSON.stringify(u)
|
|
936
951
|
}
|
|
937
952
|
);
|
|
938
953
|
return a(f, "发送任务消息失败");
|
|
939
954
|
}
|
|
940
|
-
async function
|
|
955
|
+
async function it(e = "") {
|
|
941
956
|
const n = e ? `?token=${encodeURIComponent(e)}` : "", t = await i(`${r}/admin/scenarios${n}`, c);
|
|
942
957
|
return a(t, "获取场景列表失败");
|
|
943
958
|
}
|
|
944
|
-
async function
|
|
959
|
+
async function ct(e, n, t = "") {
|
|
945
960
|
const s = t ? `?token=${encodeURIComponent(t)}` : "", o = await i(
|
|
946
961
|
`${r}/admin/agents/${encodeURIComponent(
|
|
947
962
|
e
|
|
@@ -955,14 +970,14 @@ async function at(e, n, t = "") {
|
|
|
955
970
|
);
|
|
956
971
|
return a(o, "测试登录失败");
|
|
957
972
|
}
|
|
958
|
-
async function
|
|
973
|
+
async function dt(e = "") {
|
|
959
974
|
const n = e ? `?token=${encodeURIComponent(e)}` : "", t = await i(
|
|
960
975
|
`${r}/admin/agents/identity-envs${n}`,
|
|
961
976
|
c
|
|
962
977
|
);
|
|
963
978
|
return a(t, "获取身份绑定环境列表失败");
|
|
964
979
|
}
|
|
965
|
-
async function
|
|
980
|
+
async function ut(e, n = "") {
|
|
966
981
|
const t = new URLSearchParams();
|
|
967
982
|
e && t.set("envCode", e), n && t.set("token", n);
|
|
968
983
|
const s = t.toString() ? `?${t.toString()}` : "", o = await i(
|
|
@@ -971,7 +986,7 @@ async function it(e, n = "") {
|
|
|
971
986
|
);
|
|
972
987
|
return a(o, "获取成员列表失败") ?? [];
|
|
973
988
|
}
|
|
974
|
-
async function
|
|
989
|
+
async function lt(e, n, t = "") {
|
|
975
990
|
const s = t ? `?token=${encodeURIComponent(t)}` : "", o = await i(`${r}/admin/agents/${e}/move${s}`, {
|
|
976
991
|
...c,
|
|
977
992
|
method: "POST",
|
|
@@ -980,19 +995,19 @@ async function ct(e, n, t = "") {
|
|
|
980
995
|
});
|
|
981
996
|
return a(o, "移动 Agent 分类失败");
|
|
982
997
|
}
|
|
983
|
-
async function
|
|
998
|
+
async function pt(e = "") {
|
|
984
999
|
const n = e ? `?token=${encodeURIComponent(e)}` : "", t = await i(`${r}/admin/agents/models${n}`, c);
|
|
985
1000
|
return a(t, "获取模型列表失败");
|
|
986
1001
|
}
|
|
987
|
-
function
|
|
1002
|
+
function B(e) {
|
|
988
1003
|
const n = Object.entries(e).filter(([, t]) => t !== void 0 && t !== "").map(([t, s]) => `${t}=${encodeURIComponent(s)}`);
|
|
989
1004
|
return n.length ? `?${n.join("&")}` : "";
|
|
990
1005
|
}
|
|
991
|
-
async function
|
|
1006
|
+
async function ft(e, n = "") {
|
|
992
1007
|
const t = await i(
|
|
993
1008
|
`${r}/admin/agents/${encodeURIComponent(
|
|
994
1009
|
e
|
|
995
|
-
)}/ontology${
|
|
1010
|
+
)}/ontology${B({ token: n })}`,
|
|
996
1011
|
c
|
|
997
1012
|
);
|
|
998
1013
|
return (await a(
|
|
@@ -1003,9 +1018,9 @@ async function dt(e, n = "") {
|
|
|
1003
1018
|
nodeInfo: { ...o.nodeInfo, dataPrepareEnabled: !1 }
|
|
1004
1019
|
}));
|
|
1005
1020
|
}
|
|
1006
|
-
async function
|
|
1021
|
+
async function mt(e, n = "") {
|
|
1007
1022
|
const t = await i(
|
|
1008
|
-
`${r}/admin/agents/ontology/ontologies${
|
|
1023
|
+
`${r}/admin/agents/ontology/ontologies${B({
|
|
1009
1024
|
ontologyType: e,
|
|
1010
1025
|
token: n
|
|
1011
1026
|
})}`,
|
|
@@ -1013,9 +1028,9 @@ async function lt(e, n = "") {
|
|
|
1013
1028
|
);
|
|
1014
1029
|
return a(t, "获取本体列表失败") ?? [];
|
|
1015
1030
|
}
|
|
1016
|
-
async function
|
|
1031
|
+
async function yt(e, n = "") {
|
|
1017
1032
|
const t = await i(
|
|
1018
|
-
`${r}/admin/agents/ontology/knowledges${
|
|
1033
|
+
`${r}/admin/agents/ontology/knowledges${B({
|
|
1019
1034
|
ontologyCode: e,
|
|
1020
1035
|
token: n
|
|
1021
1036
|
})}`,
|
|
@@ -1023,7 +1038,7 @@ async function pt(e, n = "") {
|
|
|
1023
1038
|
);
|
|
1024
1039
|
return a(t, "获取知识列表失败") ?? [];
|
|
1025
1040
|
}
|
|
1026
|
-
async function
|
|
1041
|
+
async function $t(e, n, t = "") {
|
|
1027
1042
|
const s = t ? `?token=${encodeURIComponent(t)}` : "", o = await i(`${r}/admin/skills/${e}/move${s}`, {
|
|
1028
1043
|
...c,
|
|
1029
1044
|
method: "POST",
|
|
@@ -1032,7 +1047,7 @@ async function ft(e, n, t = "") {
|
|
|
1032
1047
|
});
|
|
1033
1048
|
return a(o, "移动 Skill 分类失败");
|
|
1034
1049
|
}
|
|
1035
|
-
async function
|
|
1050
|
+
async function ht(e = "", n = "") {
|
|
1036
1051
|
const t = new URLSearchParams();
|
|
1037
1052
|
e && t.append("keyword", e), n && t.append("token", n);
|
|
1038
1053
|
const s = t.toString() ? `?${t.toString()}` : "", o = await i(
|
|
@@ -1041,13 +1056,13 @@ async function mt(e = "", n = "") {
|
|
|
1041
1056
|
);
|
|
1042
1057
|
return a(o, "获取员工列表失败");
|
|
1043
1058
|
}
|
|
1044
|
-
async function
|
|
1059
|
+
async function gt(e, n, t = "", s = "") {
|
|
1045
1060
|
const o = new URLSearchParams();
|
|
1046
1061
|
o.append("profileScope", e), o.append("memberType", n), t && o.append("scenarioCode", t), s && o.append("token", s);
|
|
1047
|
-
const
|
|
1048
|
-
return a(
|
|
1062
|
+
const d = o.toString() ? `?${o.toString()}` : "", u = await i(`${r}/admin/profiles${d}`, c);
|
|
1063
|
+
return a(u, "获取画像列表失败");
|
|
1049
1064
|
}
|
|
1050
|
-
async function
|
|
1065
|
+
async function St(e, n = "") {
|
|
1051
1066
|
const t = n ? `?token=${encodeURIComponent(n)}` : "", s = await i(`${r}/admin/profiles${t}`, {
|
|
1052
1067
|
...c,
|
|
1053
1068
|
method: "POST",
|
|
@@ -1056,13 +1071,13 @@ async function $t(e, n = "") {
|
|
|
1056
1071
|
});
|
|
1057
1072
|
return a(s, "保存画像失败");
|
|
1058
1073
|
}
|
|
1059
|
-
async function
|
|
1060
|
-
const
|
|
1061
|
-
s &&
|
|
1062
|
-
const
|
|
1074
|
+
async function wt(e, n, t, s = "", o = "") {
|
|
1075
|
+
const d = new URLSearchParams();
|
|
1076
|
+
s && d.append("scenarioCode", s), o && d.append("token", o);
|
|
1077
|
+
const u = d.toString() ? `?${d.toString()}` : "", f = await i(
|
|
1063
1078
|
`${r}/admin/profiles/${encodeURIComponent(
|
|
1064
1079
|
e
|
|
1065
|
-
)}/${encodeURIComponent(n)}/${encodeURIComponent(t)}${
|
|
1080
|
+
)}/${encodeURIComponent(n)}/${encodeURIComponent(t)}${u}`,
|
|
1066
1081
|
{
|
|
1067
1082
|
...c,
|
|
1068
1083
|
method: "DELETE"
|
|
@@ -1070,31 +1085,31 @@ async function ht(e, n, t, s = "", o = "") {
|
|
|
1070
1085
|
);
|
|
1071
1086
|
return a(f, "删除画像失败");
|
|
1072
1087
|
}
|
|
1073
|
-
async function
|
|
1088
|
+
async function Tt(e = "", n = "") {
|
|
1074
1089
|
const t = new URLSearchParams();
|
|
1075
1090
|
e && t.append("scenarioCode", e), n && t.append("token", n);
|
|
1076
1091
|
const s = t.toString() ? `?${t.toString()}` : "", o = await i(`${r}/admin/human-on-calls${s}`, c);
|
|
1077
1092
|
return a(o, "获取值班信息失败");
|
|
1078
1093
|
}
|
|
1079
|
-
async function
|
|
1080
|
-
const o = s ? `?token=${encodeURIComponent(s)}` : "",
|
|
1094
|
+
async function It(e, n, t, s = "") {
|
|
1095
|
+
const o = s ? `?token=${encodeURIComponent(s)}` : "", d = await i(`${r}/admin/human-on-calls/batch${o}`, {
|
|
1081
1096
|
...c,
|
|
1082
1097
|
method: "POST",
|
|
1083
1098
|
headers: { "Content-Type": "application/json" },
|
|
1084
1099
|
body: JSON.stringify({ scenarioCode: e, dayOfWeek: n, onCalls: t })
|
|
1085
1100
|
});
|
|
1086
|
-
return a(
|
|
1101
|
+
return a(d, "保存值班信息失败");
|
|
1087
1102
|
}
|
|
1088
|
-
async function
|
|
1089
|
-
const o = s ? `?token=${encodeURIComponent(s)}` : "",
|
|
1103
|
+
async function Ct(e, n, t, s = "") {
|
|
1104
|
+
const o = s ? `?token=${encodeURIComponent(s)}` : "", d = await i(
|
|
1090
1105
|
`${r}/admin/human-on-calls/${encodeURIComponent(
|
|
1091
1106
|
e
|
|
1092
1107
|
)}/${t}/${encodeURIComponent(n)}${o}`,
|
|
1093
1108
|
{ ...c, method: "DELETE" }
|
|
1094
1109
|
);
|
|
1095
|
-
return a(
|
|
1110
|
+
return a(d, "删除值班信息失败");
|
|
1096
1111
|
}
|
|
1097
|
-
async function
|
|
1112
|
+
async function _t(e = {}, n = "") {
|
|
1098
1113
|
const t = [];
|
|
1099
1114
|
e.scenarioCode && t.push(`scenario_code=${encodeURIComponent(e.scenarioCode)}`), e.status && t.push(`status=${encodeURIComponent(e.status)}`), n && t.push(`token=${encodeURIComponent(n)}`);
|
|
1100
1115
|
const s = t.length > 0 ? `?${t.join("&")}` : "", o = await i(
|
|
@@ -1106,7 +1121,7 @@ async function Tt(e = {}, n = "") {
|
|
|
1106
1121
|
);
|
|
1107
1122
|
return a(o, "全量刷新技能失败");
|
|
1108
1123
|
}
|
|
1109
|
-
async function
|
|
1124
|
+
async function bt(e, n = "") {
|
|
1110
1125
|
const t = n ? `?token=${encodeURIComponent(n)}` : "", s = await i(
|
|
1111
1126
|
`${r}/admin/scenario-instances/${e}/refresh-skills${t}`,
|
|
1112
1127
|
{
|
|
@@ -1119,8 +1134,8 @@ async function Ct(e, n = "") {
|
|
|
1119
1134
|
function U(e) {
|
|
1120
1135
|
const n = (...s) => {
|
|
1121
1136
|
for (const o of s) {
|
|
1122
|
-
const
|
|
1123
|
-
if (
|
|
1137
|
+
const d = e[o];
|
|
1138
|
+
if (d != null && d !== "") return String(d);
|
|
1124
1139
|
}
|
|
1125
1140
|
return "";
|
|
1126
1141
|
}, t = e.shared;
|
|
@@ -1140,11 +1155,11 @@ function U(e) {
|
|
|
1140
1155
|
updateTime: e.update_time == null ? e.updateTime : String(e.update_time)
|
|
1141
1156
|
};
|
|
1142
1157
|
}
|
|
1143
|
-
async function
|
|
1158
|
+
async function At(e = "") {
|
|
1144
1159
|
const n = e ? `?token=${encodeURIComponent(e)}` : "", t = await i(`${r}/personal-agents${n}`, c), s = await a(t, "获取个人 Agent 列表失败");
|
|
1145
1160
|
return (Array.isArray(s) ? s : []).map((o) => U(o));
|
|
1146
1161
|
}
|
|
1147
|
-
async function
|
|
1162
|
+
async function Ut(e, n = "") {
|
|
1148
1163
|
const t = n ? `?token=${encodeURIComponent(n)}` : "", s = await i(`${r}/personal-agents${t}`, {
|
|
1149
1164
|
...c,
|
|
1150
1165
|
method: "POST",
|
|
@@ -1155,8 +1170,8 @@ async function _t(e, n = "") {
|
|
|
1155
1170
|
await a(s, "创建个人 Agent 失败")
|
|
1156
1171
|
);
|
|
1157
1172
|
}
|
|
1158
|
-
async function
|
|
1159
|
-
const
|
|
1173
|
+
async function Et(e, n, t, s, o = "") {
|
|
1174
|
+
const d = o ? `?token=${encodeURIComponent(o)}` : "", u = await i(`${r}/personal-agents/ensure${d}`, {
|
|
1160
1175
|
...c,
|
|
1161
1176
|
method: "POST",
|
|
1162
1177
|
headers: { "Content-Type": "application/json" },
|
|
@@ -1168,17 +1183,17 @@ async function bt(e, n, t, s, o = "") {
|
|
|
1168
1183
|
})
|
|
1169
1184
|
});
|
|
1170
1185
|
return U(
|
|
1171
|
-
await a(
|
|
1186
|
+
await a(u, "创建个人 Agent 失败")
|
|
1172
1187
|
);
|
|
1173
1188
|
}
|
|
1174
|
-
async function
|
|
1189
|
+
async function Ot(e, n = "") {
|
|
1175
1190
|
const t = n ? `?token=${encodeURIComponent(n)}` : "", s = await i(`${r}/personal-agents/${e}${t}`, {
|
|
1176
1191
|
...c,
|
|
1177
1192
|
method: "DELETE"
|
|
1178
1193
|
});
|
|
1179
1194
|
return a(s, "删除个人 Agent 失败");
|
|
1180
1195
|
}
|
|
1181
|
-
async function
|
|
1196
|
+
async function Pt(e, n, t = "") {
|
|
1182
1197
|
const s = t ? `?token=${encodeURIComponent(t)}` : "", o = await i(`${r}/personal-agents/${e}${s}`, {
|
|
1183
1198
|
...c,
|
|
1184
1199
|
method: "PUT",
|
|
@@ -1189,7 +1204,7 @@ async function Ut(e, n, t = "") {
|
|
|
1189
1204
|
await a(o, "重命名个人 Agent 失败")
|
|
1190
1205
|
);
|
|
1191
1206
|
}
|
|
1192
|
-
async function
|
|
1207
|
+
async function kt(e = "") {
|
|
1193
1208
|
const n = e ? `?token=${encodeURIComponent(e)}` : "", t = await i(
|
|
1194
1209
|
`${r}/personal-agents/shared${n}`,
|
|
1195
1210
|
c
|
|
@@ -1201,7 +1216,7 @@ async function Et(e = "") {
|
|
|
1201
1216
|
(o) => U(o)
|
|
1202
1217
|
);
|
|
1203
1218
|
}
|
|
1204
|
-
async function
|
|
1219
|
+
async function Rt(e, n, t = "") {
|
|
1205
1220
|
const s = t ? `?token=${encodeURIComponent(t)}` : "", o = await i(`${r}/personal-agents/${e}/share${s}`, {
|
|
1206
1221
|
...c,
|
|
1207
1222
|
method: "PUT",
|
|
@@ -1212,22 +1227,22 @@ async function Ot(e, n, t = "") {
|
|
|
1212
1227
|
await a(o, "切换共享状态失败")
|
|
1213
1228
|
);
|
|
1214
1229
|
}
|
|
1215
|
-
async function
|
|
1230
|
+
async function vt(e, n = "") {
|
|
1216
1231
|
const t = n ? `?token=${encodeURIComponent(n)}` : "", s = await i(
|
|
1217
1232
|
`${r}/personal-agents/${e}/sessions${t}`,
|
|
1218
1233
|
c
|
|
1219
1234
|
), o = await a(
|
|
1220
1235
|
s,
|
|
1221
1236
|
"获取会话列表失败"
|
|
1222
|
-
),
|
|
1237
|
+
), d = o == null ? void 0 : o.sessions;
|
|
1223
1238
|
return {
|
|
1224
|
-
sessions: (Array.isArray(
|
|
1239
|
+
sessions: (Array.isArray(d) ? d : []).map(M),
|
|
1225
1240
|
isOwner: (o == null ? void 0 : o.isOwner) === !0,
|
|
1226
1241
|
userMeta: (o == null ? void 0 : o.userMeta) ?? {}
|
|
1227
1242
|
};
|
|
1228
1243
|
}
|
|
1229
|
-
async function
|
|
1230
|
-
const o = t ? `?token=${encodeURIComponent(t)}` : "",
|
|
1244
|
+
async function Nt(e, n = "新会话", t = "", s) {
|
|
1245
|
+
const o = t ? `?token=${encodeURIComponent(t)}` : "", d = await i(
|
|
1231
1246
|
`${r}/personal-agents/${e}/sessions${o}`,
|
|
1232
1247
|
{
|
|
1233
1248
|
...c,
|
|
@@ -1242,18 +1257,18 @@ async function kt(e, n = "新会话", t = "", s) {
|
|
|
1242
1257
|
})
|
|
1243
1258
|
}
|
|
1244
1259
|
);
|
|
1245
|
-
return
|
|
1246
|
-
await a(
|
|
1260
|
+
return M(
|
|
1261
|
+
await a(d, "创建会话失败")
|
|
1247
1262
|
);
|
|
1248
1263
|
}
|
|
1249
|
-
function
|
|
1264
|
+
function M(e) {
|
|
1250
1265
|
const n = e ?? {}, t = (...f) => {
|
|
1251
|
-
for (const
|
|
1252
|
-
const E = n[
|
|
1266
|
+
for (const C of f) {
|
|
1267
|
+
const E = n[C];
|
|
1253
1268
|
if (E != null && E !== "") return String(E);
|
|
1254
1269
|
}
|
|
1255
1270
|
return "";
|
|
1256
|
-
}, s = n.project_space_id ?? n.projectSpaceId, o = n.project_space_title ?? n.projectSpaceTitle,
|
|
1271
|
+
}, s = n.project_space_id ?? n.projectSpaceId, o = n.project_space_title ?? n.projectSpaceTitle, d = t("create_time", "createTime"), u = t("update_time", "updateTime");
|
|
1257
1272
|
return {
|
|
1258
1273
|
id: p(n.id),
|
|
1259
1274
|
personalAgentId: p(n.personal_agent_id ?? n.personalAgentId),
|
|
@@ -1261,19 +1276,19 @@ function L(e) {
|
|
|
1261
1276
|
title: t("title"),
|
|
1262
1277
|
projectSpaceId: s != null && s !== "" ? p(s) : null,
|
|
1263
1278
|
projectSpaceTitle: o != null && o !== "" ? String(o) : null,
|
|
1264
|
-
createTime:
|
|
1265
|
-
updateTime:
|
|
1279
|
+
createTime: d || void 0,
|
|
1280
|
+
updateTime: u || void 0
|
|
1266
1281
|
};
|
|
1267
1282
|
}
|
|
1268
|
-
async function
|
|
1283
|
+
async function jt(e = "") {
|
|
1269
1284
|
const n = e ? `?token=${encodeURIComponent(e)}` : "", t = await i(
|
|
1270
1285
|
`${r}/personal-agents/sessions/all${n}`,
|
|
1271
1286
|
c
|
|
1272
1287
|
), s = await a(t, "获取聊天记录失败");
|
|
1273
|
-
return (Array.isArray(s) ? s : []).map(
|
|
1288
|
+
return (Array.isArray(s) ? s : []).map(M);
|
|
1274
1289
|
}
|
|
1275
|
-
async function
|
|
1276
|
-
const o = t ? `?token=${encodeURIComponent(t)}` : "",
|
|
1290
|
+
async function qt(e, n, t = "", s) {
|
|
1291
|
+
const o = t ? `?token=${encodeURIComponent(t)}` : "", d = await i(
|
|
1277
1292
|
`${r}/personal-agents/${e}/sessions/${n}${o}`,
|
|
1278
1293
|
{
|
|
1279
1294
|
...c,
|
|
@@ -1284,30 +1299,30 @@ async function Nt(e, n, t = "", s) {
|
|
|
1284
1299
|
)
|
|
1285
1300
|
}
|
|
1286
1301
|
);
|
|
1287
|
-
return
|
|
1288
|
-
await a(
|
|
1302
|
+
return M(
|
|
1303
|
+
await a(d, "会话归组失败")
|
|
1289
1304
|
);
|
|
1290
1305
|
}
|
|
1291
|
-
async function
|
|
1306
|
+
async function Dt(e) {
|
|
1292
1307
|
const n = e ? `?token=${encodeURIComponent(e)}` : "", t = await i(`${r}/personal-agents/models${n}`, c);
|
|
1293
1308
|
return a(t, "获取模型列表失败");
|
|
1294
1309
|
}
|
|
1295
|
-
async function
|
|
1310
|
+
async function Jt(e) {
|
|
1296
1311
|
const n = e ? `?token=${encodeURIComponent(e)}` : "", t = await i(
|
|
1297
1312
|
`${r}/personal-agents/custom-models${n}`,
|
|
1298
1313
|
c
|
|
1299
1314
|
);
|
|
1300
1315
|
return a(t, "获取自定义模型失败");
|
|
1301
1316
|
}
|
|
1302
|
-
async function
|
|
1317
|
+
async function Lt(e, n, t = "") {
|
|
1303
1318
|
const s = t ? `?token=${encodeURIComponent(t)}` : "", o = await i(
|
|
1304
1319
|
`${r}/personal-agents/${e}/sessions/${n}${s}`,
|
|
1305
1320
|
{ ...c, method: "DELETE" }
|
|
1306
1321
|
);
|
|
1307
1322
|
return a(o, "删除会话失败");
|
|
1308
1323
|
}
|
|
1309
|
-
async function
|
|
1310
|
-
const o = s ? `?token=${encodeURIComponent(s)}` : "",
|
|
1324
|
+
async function Mt(e, n, t, s = "") {
|
|
1325
|
+
const o = s ? `?token=${encodeURIComponent(s)}` : "", d = await i(
|
|
1311
1326
|
`${r}/personal-agents/${e}/sessions/${n}${o}`,
|
|
1312
1327
|
{
|
|
1313
1328
|
...c,
|
|
@@ -1316,57 +1331,57 @@ async function Dt(e, n, t, s = "") {
|
|
|
1316
1331
|
body: JSON.stringify({ title: t })
|
|
1317
1332
|
}
|
|
1318
1333
|
);
|
|
1319
|
-
return a(
|
|
1334
|
+
return a(d, "重命名会话失败");
|
|
1320
1335
|
}
|
|
1321
|
-
async function
|
|
1336
|
+
async function xt(e, n, t = "") {
|
|
1322
1337
|
const s = t ? `?token=${encodeURIComponent(t)}` : "", o = await i(
|
|
1323
1338
|
`${r}/personal-agents/${e}/sessions/${n}/messages${s}`,
|
|
1324
1339
|
c
|
|
1325
1340
|
);
|
|
1326
1341
|
return a(o, "获取消息历史失败");
|
|
1327
1342
|
}
|
|
1328
|
-
async function
|
|
1329
|
-
const E = s ? `?token=${encodeURIComponent(s)}` : "",
|
|
1343
|
+
async function zt(e, n, t, s, o, d, u, f, C) {
|
|
1344
|
+
const E = s ? `?token=${encodeURIComponent(s)}` : "", ae = `${r}/personal-agents/${e}/sessions/${n}/chat/stream${E}`;
|
|
1330
1345
|
try {
|
|
1331
|
-
const y = await fetch(
|
|
1346
|
+
const y = await fetch(ae, {
|
|
1332
1347
|
...c,
|
|
1333
1348
|
method: "POST",
|
|
1334
1349
|
headers: { "Content-Type": "application/json" },
|
|
1335
|
-
body: JSON.stringify(
|
|
1350
|
+
body: JSON.stringify(C ? { message: t, llmCode: C } : { message: t })
|
|
1336
1351
|
});
|
|
1337
1352
|
if (!y.ok || !y.body) {
|
|
1338
1353
|
const z = await y.text().catch(() => "");
|
|
1339
|
-
|
|
1354
|
+
d(new Error(z || `HTTP ${y.status}`));
|
|
1340
1355
|
return;
|
|
1341
1356
|
}
|
|
1342
|
-
const
|
|
1343
|
-
let
|
|
1357
|
+
const re = y.body.getReader(), ie = new TextDecoder();
|
|
1358
|
+
let x = "", v = "";
|
|
1344
1359
|
for (; ; ) {
|
|
1345
|
-
const { done: z, value:
|
|
1360
|
+
const { done: z, value: ce } = await re.read();
|
|
1346
1361
|
if (z) break;
|
|
1347
|
-
|
|
1348
|
-
const
|
|
1362
|
+
x += ie.decode(ce, { stream: !0 });
|
|
1363
|
+
const W = x.split(`
|
|
1349
1364
|
`);
|
|
1350
|
-
|
|
1351
|
-
for (const
|
|
1352
|
-
const _ =
|
|
1365
|
+
x = W.pop() || "";
|
|
1366
|
+
for (const de of W) {
|
|
1367
|
+
const _ = de.trim();
|
|
1353
1368
|
if (!_) {
|
|
1354
|
-
|
|
1369
|
+
v = "";
|
|
1355
1370
|
continue;
|
|
1356
1371
|
}
|
|
1357
1372
|
if (!_.startsWith(":")) {
|
|
1358
1373
|
if (_.startsWith("event:")) {
|
|
1359
|
-
|
|
1374
|
+
v = _.slice(6).trim();
|
|
1360
1375
|
continue;
|
|
1361
1376
|
}
|
|
1362
1377
|
if (_.startsWith("data:")) {
|
|
1363
1378
|
const N = _.slice(5).trim();
|
|
1364
|
-
if (
|
|
1365
|
-
f && f(N),
|
|
1379
|
+
if (v === "replace") {
|
|
1380
|
+
f && f(N), v = "";
|
|
1366
1381
|
continue;
|
|
1367
1382
|
}
|
|
1368
1383
|
if (N.startsWith("[error]")) {
|
|
1369
|
-
|
|
1384
|
+
d(new Error(N.slice(7).trim()));
|
|
1370
1385
|
return;
|
|
1371
1386
|
}
|
|
1372
1387
|
o(N);
|
|
@@ -1374,25 +1389,25 @@ async function Lt(e, n, t, s, o, u, d, f, I) {
|
|
|
1374
1389
|
}
|
|
1375
1390
|
}
|
|
1376
1391
|
}
|
|
1377
|
-
|
|
1392
|
+
u();
|
|
1378
1393
|
} catch (y) {
|
|
1379
|
-
|
|
1394
|
+
d(y instanceof Error ? y : new Error(String(y)));
|
|
1380
1395
|
}
|
|
1381
1396
|
}
|
|
1382
1397
|
const Le = "http://127.0.0.1:28080";
|
|
1383
|
-
async function
|
|
1398
|
+
async function Ft(e) {
|
|
1384
1399
|
await fetch(`${Le}/v1/sessions/${e}`, {
|
|
1385
1400
|
method: "DELETE"
|
|
1386
1401
|
});
|
|
1387
1402
|
}
|
|
1388
|
-
async function
|
|
1389
|
-
const n = new URLSearchParams(), { name: t, scenarioInstanceId: s, page: o = 1, size:
|
|
1390
|
-
t && n.set("name", t), s != null && s !== "" && n.set("scenarioInstanceId", String(s)), n.set("page", String(o)), n.set("size", String(
|
|
1391
|
-
const f = n.toString(),
|
|
1403
|
+
async function Bt(e = {}) {
|
|
1404
|
+
const n = new URLSearchParams(), { name: t, scenarioInstanceId: s, page: o = 1, size: d = 50, token: u = "" } = e;
|
|
1405
|
+
t && n.set("name", t), s != null && s !== "" && n.set("scenarioInstanceId", String(s)), n.set("page", String(o)), n.set("size", String(d)), u && n.set("token", u);
|
|
1406
|
+
const f = n.toString(), C = await i(
|
|
1392
1407
|
`${r}/admin/tasks${f ? `?${f}` : ""}`,
|
|
1393
1408
|
c
|
|
1394
1409
|
);
|
|
1395
|
-
return a(
|
|
1410
|
+
return a(C, "获取任务列表失败");
|
|
1396
1411
|
}
|
|
1397
1412
|
function Me(e) {
|
|
1398
1413
|
const n = new URLSearchParams();
|
|
@@ -1402,14 +1417,14 @@ function Me(e) {
|
|
|
1402
1417
|
const t = n.toString();
|
|
1403
1418
|
return t ? `?${t}` : "";
|
|
1404
1419
|
}
|
|
1405
|
-
async function
|
|
1420
|
+
async function Wt(e) {
|
|
1406
1421
|
const n = await i(
|
|
1407
1422
|
`${r}/admin/tool-call-logs/timeline${Me(e)}`,
|
|
1408
1423
|
c
|
|
1409
1424
|
);
|
|
1410
1425
|
return a(n, "查询工具调用时间轴统计失败");
|
|
1411
1426
|
}
|
|
1412
|
-
async function
|
|
1427
|
+
async function Ht(e) {
|
|
1413
1428
|
const n = [];
|
|
1414
1429
|
e.date && n.push(`date=${encodeURIComponent(e.date)}`), e.scenarioCode && n.push(`scenarioCode=${encodeURIComponent(e.scenarioCode)}`), e.token && n.push(`token=${encodeURIComponent(e.token)}`);
|
|
1415
1430
|
const t = n.length > 0 ? `?${n.join("&")}` : "", s = await i(
|
|
@@ -1418,14 +1433,14 @@ async function Ft(e) {
|
|
|
1418
1433
|
);
|
|
1419
1434
|
return a(s, "获取 Token 单日统计失败");
|
|
1420
1435
|
}
|
|
1421
|
-
async function
|
|
1436
|
+
async function Kt(e = "z-team") {
|
|
1422
1437
|
const n = await i(
|
|
1423
1438
|
`${r}/change-log/versions?repo=${encodeURIComponent(e)}`,
|
|
1424
1439
|
c
|
|
1425
1440
|
);
|
|
1426
1441
|
return a(n, "获取变更日志版本列表失败");
|
|
1427
1442
|
}
|
|
1428
|
-
async function
|
|
1443
|
+
async function Vt(e, n, t = "z-team") {
|
|
1429
1444
|
const s = new URLSearchParams();
|
|
1430
1445
|
e != null && s.set("versionId", String(e)), s.set("repo", t);
|
|
1431
1446
|
const o = await i(
|
|
@@ -1434,7 +1449,7 @@ async function Wt(e, n, t = "z-team") {
|
|
|
1434
1449
|
);
|
|
1435
1450
|
return a(o, "获取变更日志详情失败");
|
|
1436
1451
|
}
|
|
1437
|
-
async function
|
|
1452
|
+
async function Qt(e) {
|
|
1438
1453
|
const n = await i(
|
|
1439
1454
|
`${ke}/evolution/records/${e}/reset`,
|
|
1440
1455
|
{ ...c, method: "POST" }
|
|
@@ -1449,7 +1464,7 @@ function m(e) {
|
|
|
1449
1464
|
const t = n.toString();
|
|
1450
1465
|
return t ? `?${t}` : "";
|
|
1451
1466
|
}
|
|
1452
|
-
async function
|
|
1467
|
+
async function Gt(e) {
|
|
1453
1468
|
const n = await i(
|
|
1454
1469
|
`${r}/admin/qa-eval/closed-instances${m({
|
|
1455
1470
|
close_date: e.closeDate,
|
|
@@ -1465,7 +1480,7 @@ async function Kt(e) {
|
|
|
1465
1480
|
);
|
|
1466
1481
|
return Array.isArray(t == null ? void 0 : t.list) ? t.list : [];
|
|
1467
1482
|
}
|
|
1468
|
-
async function
|
|
1483
|
+
async function Zt(e) {
|
|
1469
1484
|
const n = await i(
|
|
1470
1485
|
`${r}/admin/qa-eval/overview${m({
|
|
1471
1486
|
close_date: e.closeDate,
|
|
@@ -1478,7 +1493,7 @@ async function Qt(e) {
|
|
|
1478
1493
|
);
|
|
1479
1494
|
return a(n, "获取 QA 评测总览失败");
|
|
1480
1495
|
}
|
|
1481
|
-
async function
|
|
1496
|
+
async function Xt(e, n = "") {
|
|
1482
1497
|
const t = await i(
|
|
1483
1498
|
`${r}/admin/qa-eval/report/${e}/cancel${m({
|
|
1484
1499
|
token: n
|
|
@@ -1487,7 +1502,7 @@ async function Vt(e, n = "") {
|
|
|
1487
1502
|
);
|
|
1488
1503
|
return a(t, "取消评测失败");
|
|
1489
1504
|
}
|
|
1490
|
-
async function
|
|
1505
|
+
async function Yt(e, n, t = "") {
|
|
1491
1506
|
const s = t ? `?token=${encodeURIComponent(t)}` : "", o = await i(
|
|
1492
1507
|
`${r}/admin/scenario-templates/preview${s}`,
|
|
1493
1508
|
{
|
|
@@ -1500,15 +1515,15 @@ async function Gt(e, n, t = "") {
|
|
|
1500
1515
|
if (!o.ok) throw new Error(`HTTP ${o.status}`);
|
|
1501
1516
|
return o.text();
|
|
1502
1517
|
}
|
|
1503
|
-
async function
|
|
1518
|
+
async function es(e, n = "") {
|
|
1504
1519
|
const t = n ? `?token=${encodeURIComponent(n)}` : "", s = await i(
|
|
1505
1520
|
`${r}/tasks/${e}/human-assist${t}`,
|
|
1506
1521
|
{ ...c, method: "GET" }
|
|
1507
1522
|
);
|
|
1508
1523
|
return a(s, "查询人机协助卡片失败");
|
|
1509
1524
|
}
|
|
1510
|
-
async function
|
|
1511
|
-
const o = s ? `?token=${encodeURIComponent(s)}` : "",
|
|
1525
|
+
async function ns(e, n, t, s = "") {
|
|
1526
|
+
const o = s ? `?token=${encodeURIComponent(s)}` : "", d = await i(
|
|
1512
1527
|
`${r}/scenario-instances/${e}/card-forms/${n}/submit${o}`,
|
|
1513
1528
|
{
|
|
1514
1529
|
...c,
|
|
@@ -1517,9 +1532,9 @@ async function Xt(e, n, t, s = "") {
|
|
|
1517
1532
|
body: JSON.stringify({ value: t })
|
|
1518
1533
|
}
|
|
1519
1534
|
);
|
|
1520
|
-
return a(
|
|
1535
|
+
return a(d, "提交卡片表单失败");
|
|
1521
1536
|
}
|
|
1522
|
-
async function
|
|
1537
|
+
async function ts(e, n, t = "") {
|
|
1523
1538
|
const s = t ? `?token=${encodeURIComponent(t)}` : "", o = await i(
|
|
1524
1539
|
`${r}/tasks/${e}/submit-assist${s}`,
|
|
1525
1540
|
{
|
|
@@ -1531,17 +1546,17 @@ async function Yt(e, n, t = "") {
|
|
|
1531
1546
|
);
|
|
1532
1547
|
return a(o, "提交人机协助任务失败");
|
|
1533
1548
|
}
|
|
1534
|
-
function
|
|
1549
|
+
function ss(e) {
|
|
1535
1550
|
return webIdeFetch(`/instances/${e}`, { method: "DELETE" });
|
|
1536
1551
|
}
|
|
1537
|
-
async function
|
|
1552
|
+
async function os(e = "") {
|
|
1538
1553
|
const n = await i(
|
|
1539
1554
|
`${r}/admin/runtime-monitor/schedule${m({ token: e })}`,
|
|
1540
1555
|
c
|
|
1541
1556
|
);
|
|
1542
1557
|
return a(n, "查询定时任务概览失败");
|
|
1543
1558
|
}
|
|
1544
|
-
async function
|
|
1559
|
+
async function as(e) {
|
|
1545
1560
|
const n = new URLSearchParams();
|
|
1546
1561
|
n.set("scenarioCode", e.scenarioCode), e.startDate && n.set("startDate", e.startDate), e.endDate && n.set("endDate", e.endDate), e.creatorId && n.set("creatorId", e.creatorId), e.tagFilters && Object.keys(e.tagFilters).length > 0 && n.set("tagFilters", JSON.stringify(e.tagFilters)), e.groupBy && n.set("groupBy", e.groupBy), e.token && n.set("token", e.token);
|
|
1547
1562
|
const t = await i(
|
|
@@ -1558,7 +1573,7 @@ async function ts(e) {
|
|
|
1558
1573
|
activeCreators: (s == null ? void 0 : s.activeCreators) ?? void 0
|
|
1559
1574
|
};
|
|
1560
1575
|
}
|
|
1561
|
-
async function
|
|
1576
|
+
async function rs(e, n = "") {
|
|
1562
1577
|
const t = n ? `?token=${encodeURIComponent(n)}` : "", s = await i(
|
|
1563
1578
|
`${r}/admin/scenario-tags/values/${e}${t}`,
|
|
1564
1579
|
{
|
|
@@ -1568,7 +1583,7 @@ async function ss(e, n = "") {
|
|
|
1568
1583
|
);
|
|
1569
1584
|
return a(s, "删除标签值失败");
|
|
1570
1585
|
}
|
|
1571
|
-
async function
|
|
1586
|
+
async function is(e, n, t) {
|
|
1572
1587
|
const s = await i(
|
|
1573
1588
|
`${r}/scenario-instances/${e}/workspace/git-clone`,
|
|
1574
1589
|
{
|
|
@@ -1585,21 +1600,21 @@ async function os(e, n, t) {
|
|
|
1585
1600
|
);
|
|
1586
1601
|
return a(s, "Git Clone 失败");
|
|
1587
1602
|
}
|
|
1588
|
-
async function
|
|
1603
|
+
async function cs() {
|
|
1589
1604
|
const e = await i(
|
|
1590
1605
|
`${r}/scenarios/biz-consult-domains`,
|
|
1591
1606
|
c
|
|
1592
1607
|
);
|
|
1593
1608
|
return a(e, "获取业务域选项失败");
|
|
1594
1609
|
}
|
|
1595
|
-
async function
|
|
1610
|
+
async function ds(e = "") {
|
|
1596
1611
|
const n = e ? `?token=${encodeURIComponent(e)}` : "", t = await i(
|
|
1597
1612
|
`${r}/admin/statistics/current-dept${n}`,
|
|
1598
1613
|
c
|
|
1599
1614
|
);
|
|
1600
1615
|
return a(t, "获取当前用户部门信息失败");
|
|
1601
1616
|
}
|
|
1602
|
-
function
|
|
1617
|
+
function xe(e) {
|
|
1603
1618
|
const n = new URLSearchParams();
|
|
1604
1619
|
Object.entries(e).forEach(([s, o]) => {
|
|
1605
1620
|
o != null && o !== "" && n.append(s, String(o));
|
|
@@ -1607,9 +1622,9 @@ function ze(e) {
|
|
|
1607
1622
|
const t = n.toString();
|
|
1608
1623
|
return t ? `?${t}` : "";
|
|
1609
1624
|
}
|
|
1610
|
-
async function
|
|
1625
|
+
async function us(e) {
|
|
1611
1626
|
const n = await i(
|
|
1612
|
-
`${r}/admin/evaluation/instances/${e.id}/snapshot-preview${
|
|
1627
|
+
`${r}/admin/evaluation/instances/${e.id}/snapshot-preview${xe({
|
|
1613
1628
|
section: e.section,
|
|
1614
1629
|
page: e.page,
|
|
1615
1630
|
size: e.size,
|
|
@@ -1620,10 +1635,10 @@ async function is(e) {
|
|
|
1620
1635
|
);
|
|
1621
1636
|
return a(n, "获取快照预览失败");
|
|
1622
1637
|
}
|
|
1623
|
-
const
|
|
1638
|
+
const ze = typeof window < "u" && window.ZTEAM_WEBIDE_ADMIN_BASE || "http://localhost/kapi/webide/admin";
|
|
1624
1639
|
async function Fe(e, n) {
|
|
1625
1640
|
try {
|
|
1626
|
-
const t = await fetch(`${
|
|
1641
|
+
const t = await fetch(`${ze}${e}`, {
|
|
1627
1642
|
credentials: "include",
|
|
1628
1643
|
headers: {
|
|
1629
1644
|
Accept: "application/json",
|
|
@@ -1636,11 +1651,11 @@ async function Fe(e, n) {
|
|
|
1636
1651
|
return {};
|
|
1637
1652
|
}
|
|
1638
1653
|
}
|
|
1639
|
-
function
|
|
1654
|
+
function ls(e) {
|
|
1640
1655
|
return Fe(`/presets/${e}`, { method: "DELETE" });
|
|
1641
1656
|
}
|
|
1642
|
-
const
|
|
1643
|
-
async function
|
|
1657
|
+
const ps = se;
|
|
1658
|
+
async function fs(e) {
|
|
1644
1659
|
const n = new FormData();
|
|
1645
1660
|
n.append("file", e);
|
|
1646
1661
|
const t = await i(`${r}/common/upload-video`, {
|
|
@@ -1648,16 +1663,16 @@ async function ds(e) {
|
|
|
1648
1663
|
body: n
|
|
1649
1664
|
}), s = await a(t, "上传视频失败"), o = typeof (s == null ? void 0 : s.url) == "string" ? s.url : "";
|
|
1650
1665
|
if (!o) {
|
|
1651
|
-
const
|
|
1652
|
-
throw g(
|
|
1666
|
+
const d = "上传视频失败:响应缺少视频地址";
|
|
1667
|
+
throw g(d), { _apiUserError: !0, userMessage: d, message: d };
|
|
1653
1668
|
}
|
|
1654
1669
|
return o;
|
|
1655
1670
|
}
|
|
1656
|
-
function
|
|
1671
|
+
function ms() {
|
|
1657
1672
|
const e = "登录已失效,请重新登录";
|
|
1658
1673
|
throw g(e), { _apiUserError: !0, userMessage: e, message: e };
|
|
1659
1674
|
}
|
|
1660
|
-
async function
|
|
1675
|
+
async function ys(e) {
|
|
1661
1676
|
const n = await i(
|
|
1662
1677
|
`${r}/scenario-instances/${e}/interaction-mode`,
|
|
1663
1678
|
{ ...c }
|
|
@@ -1667,7 +1682,7 @@ async function ps(e) {
|
|
|
1667
1682
|
);
|
|
1668
1683
|
return (t == null ? void 0 : t.mode) ?? "dispatch";
|
|
1669
1684
|
}
|
|
1670
|
-
async function
|
|
1685
|
+
async function $s(e, n) {
|
|
1671
1686
|
const t = await i(
|
|
1672
1687
|
`${r}/scenario-instances/${e}/interaction-mode`,
|
|
1673
1688
|
{
|
|
@@ -1682,41 +1697,41 @@ async function fs(e, n) {
|
|
|
1682
1697
|
);
|
|
1683
1698
|
return (s == null ? void 0 : s.mode) ?? n;
|
|
1684
1699
|
}
|
|
1685
|
-
async function
|
|
1700
|
+
async function hs(e = "") {
|
|
1686
1701
|
const n = e ? `?token=${encodeURIComponent(e)}` : "", t = await i(
|
|
1687
1702
|
`${r}/admin/indexer/overview${n}`,
|
|
1688
|
-
|
|
1703
|
+
I()
|
|
1689
1704
|
);
|
|
1690
1705
|
return a(t, "获取索引概览失败");
|
|
1691
1706
|
}
|
|
1692
|
-
async function
|
|
1693
|
-
const n = e ? `?token=${encodeURIComponent(e)}` : "", t = await i(`${r}/admin/indexer/repos${n}`,
|
|
1707
|
+
async function gs(e = "") {
|
|
1708
|
+
const n = e ? `?token=${encodeURIComponent(e)}` : "", t = await i(`${r}/admin/indexer/repos${n}`, I()), s = await a(
|
|
1694
1709
|
t,
|
|
1695
1710
|
"获取索引仓库列表失败"
|
|
1696
1711
|
);
|
|
1697
1712
|
return Array.isArray(s == null ? void 0 : s.repos) ? s.repos : [];
|
|
1698
1713
|
}
|
|
1699
|
-
async function
|
|
1700
|
-
const t = n ? `?token=${encodeURIComponent(n)}` : "", s = await i(`${r}/admin/indexer/repos${t}`,
|
|
1714
|
+
async function Ss(e, n = "") {
|
|
1715
|
+
const t = n ? `?token=${encodeURIComponent(n)}` : "", s = await i(`${r}/admin/indexer/repos${t}`, I({
|
|
1701
1716
|
method: "POST",
|
|
1702
1717
|
headers: { "Content-Type": "application/json" },
|
|
1703
1718
|
body: JSON.stringify(e)
|
|
1704
1719
|
}));
|
|
1705
1720
|
return a(s, "保存索引仓库失败");
|
|
1706
1721
|
}
|
|
1707
|
-
async function
|
|
1722
|
+
async function ws(e, n = "") {
|
|
1708
1723
|
const t = n ? `?token=${encodeURIComponent(n)}` : "", s = await i(
|
|
1709
1724
|
`${r}/admin/indexer/repos/${encodeURIComponent(e)}${t}`,
|
|
1710
|
-
|
|
1725
|
+
I({ method: "DELETE" })
|
|
1711
1726
|
);
|
|
1712
1727
|
return a(s, "删除索引仓库失败");
|
|
1713
1728
|
}
|
|
1714
|
-
async function
|
|
1729
|
+
async function Ts(e, n, t = "") {
|
|
1715
1730
|
const s = t ? `?token=${encodeURIComponent(t)}` : "", o = await i(
|
|
1716
1731
|
`${r}/admin/indexer/repos/${encodeURIComponent(
|
|
1717
1732
|
e
|
|
1718
1733
|
)}/enabled${s}`,
|
|
1719
|
-
|
|
1734
|
+
I({
|
|
1720
1735
|
method: "PUT",
|
|
1721
1736
|
headers: { "Content-Type": "application/json" },
|
|
1722
1737
|
body: JSON.stringify({ enabled: n })
|
|
@@ -1724,22 +1739,22 @@ async function gs(e, n, t = "") {
|
|
|
1724
1739
|
);
|
|
1725
1740
|
return a(o, "切换仓库启停失败");
|
|
1726
1741
|
}
|
|
1727
|
-
async function
|
|
1742
|
+
async function Is(e, n = "") {
|
|
1728
1743
|
const t = n ? `?token=${encodeURIComponent(n)}` : "", s = await i(
|
|
1729
1744
|
`${r}/admin/indexer/repos/${encodeURIComponent(
|
|
1730
1745
|
e
|
|
1731
1746
|
)}/rebuild${t}`,
|
|
1732
|
-
|
|
1747
|
+
I({ method: "POST" })
|
|
1733
1748
|
);
|
|
1734
1749
|
return a(s, "触发重建失败");
|
|
1735
1750
|
}
|
|
1736
|
-
async function
|
|
1737
|
-
const n = e ? `?token=${encodeURIComponent(e)}` : "", t = await i(`${r}/admin/indexer/poll${n}`,
|
|
1751
|
+
async function Cs(e = "") {
|
|
1752
|
+
const n = e ? `?token=${encodeURIComponent(e)}` : "", t = await i(`${r}/admin/indexer/poll${n}`, I({
|
|
1738
1753
|
method: "POST"
|
|
1739
1754
|
}));
|
|
1740
1755
|
return a(t, "触发轮询失败");
|
|
1741
1756
|
}
|
|
1742
|
-
async function
|
|
1757
|
+
async function _s(e = "") {
|
|
1743
1758
|
const n = e ? `?token=${encodeURIComponent(e)}` : "", t = await i(
|
|
1744
1759
|
`${r}/admin/notify-channel/list${n}`,
|
|
1745
1760
|
c
|
|
@@ -1749,7 +1764,7 @@ async function Ts(e = "") {
|
|
|
1749
1764
|
);
|
|
1750
1765
|
return Array.isArray(s == null ? void 0 : s.channels) ? s.channels : [];
|
|
1751
1766
|
}
|
|
1752
|
-
async function
|
|
1767
|
+
async function bs(e, n = "") {
|
|
1753
1768
|
const t = n ? `?token=${encodeURIComponent(n)}` : "", s = await i(`${r}/admin/notify-channel/test${t}`, {
|
|
1754
1769
|
...c,
|
|
1755
1770
|
method: "POST",
|
|
@@ -1758,7 +1773,7 @@ async function Cs(e, n = "") {
|
|
|
1758
1773
|
});
|
|
1759
1774
|
return a(s, "测试发送失败");
|
|
1760
1775
|
}
|
|
1761
|
-
async function
|
|
1776
|
+
async function As(e, n = "") {
|
|
1762
1777
|
const t = await i(
|
|
1763
1778
|
`${r}/admin/schedule-task${m({
|
|
1764
1779
|
token: n,
|
|
@@ -1770,7 +1785,7 @@ async function Is(e, n = "") {
|
|
|
1770
1785
|
);
|
|
1771
1786
|
return a(t, "查询定时任务模版失败");
|
|
1772
1787
|
}
|
|
1773
|
-
async function
|
|
1788
|
+
async function Us(e, n = "") {
|
|
1774
1789
|
const t = await i(
|
|
1775
1790
|
`${r}/admin/schedule-task${m({ token: n })}`,
|
|
1776
1791
|
{
|
|
@@ -1782,7 +1797,7 @@ async function _s(e, n = "") {
|
|
|
1782
1797
|
);
|
|
1783
1798
|
return a(t, "新建定时任务模版失败");
|
|
1784
1799
|
}
|
|
1785
|
-
async function
|
|
1800
|
+
async function Es(e, n, t = "") {
|
|
1786
1801
|
const s = await i(
|
|
1787
1802
|
`${r}/admin/schedule-task/${encodeURIComponent(
|
|
1788
1803
|
e
|
|
@@ -1796,7 +1811,7 @@ async function bs(e, n, t = "") {
|
|
|
1796
1811
|
);
|
|
1797
1812
|
return a(s, "更新定时任务模版失败");
|
|
1798
1813
|
}
|
|
1799
|
-
async function
|
|
1814
|
+
async function Os(e, n, t = "") {
|
|
1800
1815
|
const s = await i(
|
|
1801
1816
|
`${r}/admin/schedule-task/${encodeURIComponent(
|
|
1802
1817
|
e
|
|
@@ -1810,7 +1825,7 @@ async function As(e, n, t = "") {
|
|
|
1810
1825
|
);
|
|
1811
1826
|
return a(s, "切换模版状态失败");
|
|
1812
1827
|
}
|
|
1813
|
-
async function
|
|
1828
|
+
async function Ps(e, n = "") {
|
|
1814
1829
|
const t = await i(
|
|
1815
1830
|
`${r}/admin/schedule-task/${encodeURIComponent(
|
|
1816
1831
|
e
|
|
@@ -1819,7 +1834,7 @@ async function Us(e, n = "") {
|
|
|
1819
1834
|
);
|
|
1820
1835
|
return a(t, "激活模版失败");
|
|
1821
1836
|
}
|
|
1822
|
-
async function
|
|
1837
|
+
async function ks(e, n = "") {
|
|
1823
1838
|
const t = await i(
|
|
1824
1839
|
`${r}/admin/schedule-task/${encodeURIComponent(
|
|
1825
1840
|
e
|
|
@@ -1828,7 +1843,7 @@ async function Es(e, n = "") {
|
|
|
1828
1843
|
);
|
|
1829
1844
|
return a(t, "删除模版失败");
|
|
1830
1845
|
}
|
|
1831
|
-
async function
|
|
1846
|
+
async function Rs(e, n = "") {
|
|
1832
1847
|
const t = await i(
|
|
1833
1848
|
`${r}/admin/schedule-task/${encodeURIComponent(
|
|
1834
1849
|
e
|
|
@@ -1837,7 +1852,7 @@ async function Os(e, n = "") {
|
|
|
1837
1852
|
);
|
|
1838
1853
|
return a(t, "手动执行失败");
|
|
1839
1854
|
}
|
|
1840
|
-
async function
|
|
1855
|
+
async function vs(e, n = "") {
|
|
1841
1856
|
const t = await i(
|
|
1842
1857
|
`${r}/admin/schedule-task/history-all${m({
|
|
1843
1858
|
token: n,
|
|
@@ -1849,9 +1864,9 @@ async function Ps(e, n = "") {
|
|
|
1849
1864
|
);
|
|
1850
1865
|
return a(t, "查询运行记录失败");
|
|
1851
1866
|
}
|
|
1852
|
-
async function
|
|
1853
|
-
const
|
|
1854
|
-
`${r}/admin/permissions/users/${e}/roles${
|
|
1867
|
+
async function Ns(e, n, t, s, o = "") {
|
|
1868
|
+
const d = o ? `?token=${encodeURIComponent(o)}` : "", u = await i(
|
|
1869
|
+
`${r}/admin/permissions/users/${e}/roles${d}`,
|
|
1855
1870
|
{
|
|
1856
1871
|
...c,
|
|
1857
1872
|
method: "PUT",
|
|
@@ -1859,27 +1874,27 @@ async function ks(e, n, t, s, o = "") {
|
|
|
1859
1874
|
body: JSON.stringify({ staffName: n, accountNo: t, roleIds: s })
|
|
1860
1875
|
}
|
|
1861
1876
|
);
|
|
1862
|
-
return a(
|
|
1877
|
+
return a(u, "更新用户角色失败");
|
|
1863
1878
|
}
|
|
1864
|
-
async function
|
|
1879
|
+
async function js(e, n = "") {
|
|
1865
1880
|
const t = n ? `?token=${encodeURIComponent(n)}` : "", s = await i(
|
|
1866
1881
|
`${r}/admin/permissions/users/${e}/detail${t}`,
|
|
1867
1882
|
c
|
|
1868
1883
|
);
|
|
1869
1884
|
return a(s, "获取用户授权详情失败");
|
|
1870
1885
|
}
|
|
1871
|
-
async function
|
|
1886
|
+
async function qs(e = "") {
|
|
1872
1887
|
const n = e ? `?token=${encodeURIComponent(e)}` : "", t = await i(`${r}/admin/roles${n}`, c);
|
|
1873
1888
|
return a(t, "获取角色列表失败") ?? [];
|
|
1874
1889
|
}
|
|
1875
|
-
async function
|
|
1890
|
+
async function Ds(e, n = "") {
|
|
1876
1891
|
const t = n ? `?token=${encodeURIComponent(n)}` : "", s = await i(
|
|
1877
1892
|
`${r}/admin/roles/${e}${t}`,
|
|
1878
1893
|
c
|
|
1879
1894
|
);
|
|
1880
1895
|
return a(s, "获取角色详情失败");
|
|
1881
1896
|
}
|
|
1882
|
-
async function
|
|
1897
|
+
async function Js(e, n = "") {
|
|
1883
1898
|
const t = n ? `?token=${encodeURIComponent(n)}` : "", s = await i(`${r}/admin/roles${t}`, {
|
|
1884
1899
|
...c,
|
|
1885
1900
|
method: "POST",
|
|
@@ -1888,7 +1903,7 @@ async function js(e, n = "") {
|
|
|
1888
1903
|
});
|
|
1889
1904
|
return a(s, "创建角色失败");
|
|
1890
1905
|
}
|
|
1891
|
-
async function
|
|
1906
|
+
async function Ls(e, n, t = "") {
|
|
1892
1907
|
const s = t ? `?token=${encodeURIComponent(t)}` : "", o = await i(`${r}/admin/roles/${e}${s}`, {
|
|
1893
1908
|
...c,
|
|
1894
1909
|
method: "PUT",
|
|
@@ -1897,14 +1912,14 @@ async function qs(e, n, t = "") {
|
|
|
1897
1912
|
});
|
|
1898
1913
|
return a(o, "更新角色失败");
|
|
1899
1914
|
}
|
|
1900
|
-
async function
|
|
1915
|
+
async function Ms(e, n = "") {
|
|
1901
1916
|
const t = n ? `?token=${encodeURIComponent(n)}` : "", s = await i(`${r}/admin/roles/${e}${t}`, {
|
|
1902
1917
|
...c,
|
|
1903
1918
|
method: "DELETE"
|
|
1904
1919
|
});
|
|
1905
1920
|
return a(s, "删除角色失败");
|
|
1906
1921
|
}
|
|
1907
|
-
async function
|
|
1922
|
+
async function xs(e, n, t = "") {
|
|
1908
1923
|
const s = t ? `?token=${encodeURIComponent(t)}` : "", o = await i(`${r}/admin/roles/${e}/users${s}`, {
|
|
1909
1924
|
...c,
|
|
1910
1925
|
method: "PUT",
|
|
@@ -1914,179 +1929,182 @@ async function Js(e, n, t = "") {
|
|
|
1914
1929
|
return a(o, "更新角色成员失败");
|
|
1915
1930
|
}
|
|
1916
1931
|
export {
|
|
1917
|
-
|
|
1918
|
-
|
|
1932
|
+
Pn as $,
|
|
1933
|
+
rt as A,
|
|
1919
1934
|
S as B,
|
|
1920
|
-
|
|
1921
|
-
|
|
1922
|
-
|
|
1923
|
-
|
|
1924
|
-
|
|
1925
|
-
|
|
1926
|
-
|
|
1927
|
-
|
|
1928
|
-
|
|
1935
|
+
at as C,
|
|
1936
|
+
Yn as D,
|
|
1937
|
+
ot as E,
|
|
1938
|
+
Fn as F,
|
|
1939
|
+
xn as G,
|
|
1940
|
+
zn as H,
|
|
1941
|
+
Ln as I,
|
|
1942
|
+
ln as J,
|
|
1943
|
+
Jn as K,
|
|
1929
1944
|
sn as L,
|
|
1930
|
-
|
|
1931
|
-
|
|
1932
|
-
|
|
1933
|
-
|
|
1934
|
-
|
|
1935
|
-
|
|
1936
|
-
|
|
1937
|
-
|
|
1938
|
-
|
|
1939
|
-
|
|
1940
|
-
|
|
1941
|
-
|
|
1942
|
-
|
|
1943
|
-
|
|
1944
|
-
|
|
1945
|
+
Xn as M,
|
|
1946
|
+
Zn as N,
|
|
1947
|
+
Gn as O,
|
|
1948
|
+
Qn as P,
|
|
1949
|
+
Tn as Q,
|
|
1950
|
+
Vn as R,
|
|
1951
|
+
Kn as S,
|
|
1952
|
+
se as T,
|
|
1953
|
+
Hn as U,
|
|
1954
|
+
Wn as V,
|
|
1955
|
+
Bn as W,
|
|
1956
|
+
Nn as X,
|
|
1957
|
+
vn as Y,
|
|
1958
|
+
Rn as Z,
|
|
1959
|
+
kn as _,
|
|
1945
1960
|
w as a,
|
|
1946
1961
|
an as a$,
|
|
1947
|
-
|
|
1948
|
-
|
|
1949
|
-
|
|
1950
|
-
|
|
1951
|
-
|
|
1952
|
-
|
|
1953
|
-
|
|
1954
|
-
|
|
1955
|
-
|
|
1956
|
-
|
|
1957
|
-
|
|
1958
|
-
|
|
1959
|
-
|
|
1962
|
+
On as a0,
|
|
1963
|
+
qn as a1,
|
|
1964
|
+
jn as a2,
|
|
1965
|
+
An as a3,
|
|
1966
|
+
bn as a4,
|
|
1967
|
+
Un as a5,
|
|
1968
|
+
En as a6,
|
|
1969
|
+
_n as a7,
|
|
1970
|
+
tt as a8,
|
|
1971
|
+
nt as a9,
|
|
1972
|
+
es as aA,
|
|
1973
|
+
ts as aB,
|
|
1974
|
+
ns as aC,
|
|
1960
1975
|
Ye as aD,
|
|
1961
1976
|
Ze as aE,
|
|
1962
1977
|
Xe as aF,
|
|
1963
|
-
|
|
1964
|
-
|
|
1978
|
+
Ve as aG,
|
|
1979
|
+
Qe as aH,
|
|
1965
1980
|
Ge as aI,
|
|
1966
1981
|
r as aJ,
|
|
1967
|
-
|
|
1968
|
-
|
|
1969
|
-
|
|
1982
|
+
ys as aK,
|
|
1983
|
+
$s as aL,
|
|
1984
|
+
wn as aM,
|
|
1970
1985
|
a as aN,
|
|
1971
|
-
|
|
1972
|
-
|
|
1973
|
-
|
|
1974
|
-
|
|
1975
|
-
|
|
1976
|
-
|
|
1977
|
-
|
|
1986
|
+
$e as aO,
|
|
1987
|
+
ps as aP,
|
|
1988
|
+
ms as aQ,
|
|
1989
|
+
Qt as aR,
|
|
1990
|
+
st as aS,
|
|
1991
|
+
is as aT,
|
|
1992
|
+
fs as aU,
|
|
1978
1993
|
ke as aV,
|
|
1979
|
-
|
|
1980
|
-
|
|
1981
|
-
|
|
1982
|
-
|
|
1983
|
-
|
|
1984
|
-
|
|
1985
|
-
|
|
1994
|
+
Et as aW,
|
|
1995
|
+
cs as aX,
|
|
1996
|
+
ut as aY,
|
|
1997
|
+
ht as aZ,
|
|
1998
|
+
$n as a_,
|
|
1999
|
+
et as aa,
|
|
2000
|
+
hn as ab,
|
|
1986
2001
|
A as ac,
|
|
1987
|
-
|
|
1988
|
-
|
|
1989
|
-
|
|
1990
|
-
|
|
1991
|
-
|
|
1992
|
-
|
|
1993
|
-
|
|
1994
|
-
|
|
1995
|
-
|
|
1996
|
-
|
|
1997
|
-
|
|
1998
|
-
|
|
1999
|
-
|
|
2000
|
-
|
|
2001
|
-
|
|
2002
|
-
|
|
2003
|
-
|
|
2004
|
-
|
|
2005
|
-
|
|
2006
|
-
|
|
2007
|
-
|
|
2002
|
+
fn as ad,
|
|
2003
|
+
Ft as ae,
|
|
2004
|
+
xt as af,
|
|
2005
|
+
pt as ag,
|
|
2006
|
+
Dt as ah,
|
|
2007
|
+
Jt as ai,
|
|
2008
|
+
vt as aj,
|
|
2009
|
+
Nt as ak,
|
|
2010
|
+
Mt as al,
|
|
2011
|
+
Lt as am,
|
|
2012
|
+
zt as an,
|
|
2013
|
+
gn as ao,
|
|
2014
|
+
At as ap,
|
|
2015
|
+
kt as aq,
|
|
2016
|
+
Ut as ar,
|
|
2017
|
+
Ot as as,
|
|
2018
|
+
Pt as at,
|
|
2019
|
+
Rt as au,
|
|
2020
|
+
ss as av,
|
|
2021
|
+
jt as aw,
|
|
2022
|
+
qt as ax,
|
|
2008
2023
|
on as ay,
|
|
2009
2024
|
Re as az,
|
|
2010
2025
|
T as b,
|
|
2011
|
-
|
|
2012
|
-
|
|
2013
|
-
|
|
2014
|
-
|
|
2015
|
-
|
|
2016
|
-
|
|
2017
|
-
|
|
2018
|
-
|
|
2019
|
-
|
|
2020
|
-
|
|
2021
|
-
|
|
2022
|
-
|
|
2023
|
-
|
|
2024
|
-
|
|
2025
|
-
|
|
2026
|
-
|
|
2027
|
-
|
|
2028
|
-
|
|
2029
|
-
|
|
2030
|
-
|
|
2026
|
+
ft as b0,
|
|
2027
|
+
mt as b1,
|
|
2028
|
+
yt as b2,
|
|
2029
|
+
lt as b3,
|
|
2030
|
+
dt as b4,
|
|
2031
|
+
ct as b5,
|
|
2032
|
+
Z as b6,
|
|
2033
|
+
Se as b7,
|
|
2034
|
+
Bt as b8,
|
|
2035
|
+
Wt as b9,
|
|
2036
|
+
js as bA,
|
|
2037
|
+
Ns as bB,
|
|
2038
|
+
Xt as bC,
|
|
2039
|
+
Gt as bD,
|
|
2040
|
+
Zt as bE,
|
|
2041
|
+
bt as bF,
|
|
2042
|
+
_t as bG,
|
|
2043
|
+
Yt as bH,
|
|
2044
|
+
os as bI,
|
|
2045
|
+
vs as bJ,
|
|
2031
2046
|
As as bK,
|
|
2032
|
-
|
|
2033
|
-
|
|
2034
|
-
|
|
2035
|
-
|
|
2036
|
-
|
|
2037
|
-
|
|
2038
|
-
|
|
2039
|
-
|
|
2040
|
-
|
|
2041
|
-
|
|
2042
|
-
|
|
2043
|
-
|
|
2044
|
-
|
|
2045
|
-
|
|
2046
|
-
|
|
2047
|
-
|
|
2048
|
-
|
|
2049
|
-
|
|
2050
|
-
|
|
2051
|
-
|
|
2047
|
+
Es as bL,
|
|
2048
|
+
Us as bM,
|
|
2049
|
+
Os as bN,
|
|
2050
|
+
Ps as bO,
|
|
2051
|
+
Rs as bP,
|
|
2052
|
+
ks as bQ,
|
|
2053
|
+
$t as bR,
|
|
2054
|
+
as as bS,
|
|
2055
|
+
ds as bT,
|
|
2056
|
+
Ht as bU,
|
|
2057
|
+
rs as bV,
|
|
2058
|
+
en as bW,
|
|
2059
|
+
ls as bX,
|
|
2060
|
+
it as ba,
|
|
2061
|
+
us as bb,
|
|
2062
|
+
gt as bc,
|
|
2063
|
+
wt as bd,
|
|
2064
|
+
St as be,
|
|
2065
|
+
cn as bf,
|
|
2066
|
+
gs as bg,
|
|
2067
|
+
hs as bh,
|
|
2068
|
+
Is as bi,
|
|
2069
|
+
Ts as bj,
|
|
2052
2070
|
ws as bk,
|
|
2053
|
-
|
|
2054
|
-
|
|
2055
|
-
|
|
2056
|
-
|
|
2057
|
-
|
|
2058
|
-
|
|
2059
|
-
|
|
2060
|
-
|
|
2061
|
-
|
|
2071
|
+
Cs as bl,
|
|
2072
|
+
dn as bm,
|
|
2073
|
+
un as bn,
|
|
2074
|
+
Ss as bo,
|
|
2075
|
+
_s as bp,
|
|
2076
|
+
bs as bq,
|
|
2077
|
+
Tt as br,
|
|
2078
|
+
It as bs,
|
|
2079
|
+
Ct as bt,
|
|
2062
2080
|
qs as bu,
|
|
2063
2081
|
Ds as bv,
|
|
2064
2082
|
Js as bw,
|
|
2065
|
-
|
|
2066
|
-
|
|
2067
|
-
|
|
2068
|
-
|
|
2069
|
-
|
|
2070
|
-
|
|
2083
|
+
Ls as bx,
|
|
2084
|
+
Ms as by,
|
|
2085
|
+
xs as bz,
|
|
2086
|
+
Ne as c,
|
|
2087
|
+
Sn as d,
|
|
2088
|
+
mn as e,
|
|
2071
2089
|
h as f,
|
|
2072
|
-
|
|
2073
|
-
|
|
2090
|
+
F as g,
|
|
2091
|
+
Kt as h,
|
|
2074
2092
|
ue as i,
|
|
2075
|
-
|
|
2093
|
+
Vt as j,
|
|
2076
2094
|
He as k,
|
|
2077
|
-
|
|
2095
|
+
he as l,
|
|
2078
2096
|
tn as m,
|
|
2079
|
-
|
|
2097
|
+
ge as n,
|
|
2080
2098
|
nn as o,
|
|
2081
|
-
|
|
2082
|
-
|
|
2099
|
+
In as p,
|
|
2100
|
+
pn as q,
|
|
2083
2101
|
rn as r,
|
|
2084
|
-
|
|
2102
|
+
Dn as s,
|
|
2085
2103
|
p as t,
|
|
2086
|
-
|
|
2087
|
-
|
|
2104
|
+
Cn as u,
|
|
2105
|
+
yn as v,
|
|
2088
2106
|
Ke as w,
|
|
2089
|
-
|
|
2107
|
+
le as x,
|
|
2090
2108
|
We as y,
|
|
2091
|
-
|
|
2109
|
+
Mn as z
|
|
2092
2110
|
};
|