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