@yuku123/z-team-component 0.2.8 → 0.2.11

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