@yuku123/z-team-component 0.2.31 → 0.2.32

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.
@@ -1,16 +1,16 @@
1
1
  import { jsxs as a, jsx as e, Fragment as vt } from "react/jsx-runtime";
2
- import { a as Ne, r as Qe, f as Be, B as Oe, u as dn, T as Ut, ah as To, J as kn, t as Dt, ai as en, aj as Lo, ak as xo, c as $o, af as Po, al as to, k as It, am as Ao, x as Mo, G as Eo, i as no, an as Do, o as Fo, l as Ro, n as Bo, m as Oo, e as jo, ao as Wo } from "./api-19TXED_O.js";
2
+ import { a as Se, r as Qe, f as Be, B as Oe, u as dn, T as Ut, ah as To, J as kn, t as Dt, ai as en, aj as Lo, ak as xo, c as $o, af as Po, al as to, k as It, am as Ao, x as Mo, G as Eo, i as no, an as Do, o as Fo, l as Ro, n as Bo, m as Oo, e as jo, ao as Wo } from "./api-19TXED_O.js";
3
3
  import { s as Ho, r as tn, f as Uo } from "./ctc-sso-DtJHC-2M.js";
4
- import { i as zo } from "./ComponentDoc-CUhlRqDo.js";
4
+ import { i as zo } from "./ComponentDoc-oOU-0zBg.js";
5
5
  import { r as Go, h as Tn, s as Ln } from "./sso-user-BEY5ICaR.js";
6
6
  import { Input as Gt, Tooltip as qt, Spin as ot, Tabs as Nn, Popconfirm as fn, Button as ft, Empty as nn, Modal as Kt, Form as Wt, Checkbox as qo, Tag as Ko, Select as Vo, Popover as Jo, Dropdown as Yo, Avatar as Qo, message as xn } from "antd";
7
7
  import zt from "query-string";
8
- import { useState as c, useRef as le, useCallback as q, useEffect as j, useLayoutEffect as oo, useMemo as Re, memo as Zo, Suspense as $n, lazy as it } from "react";
8
+ import { useState as c, useRef as le, useCallback as q, useEffect as H, useLayoutEffect as oo, useMemo as Re, memo as Zo, Suspense as $n, lazy as it } from "react";
9
9
  import { useLocation as Xo, useNavigate as ea } from "react-router-dom";
10
10
  import { h as st } from "./history-BlrA1eaW.js";
11
11
  import { s as fe, p as ta, B as ao, S as ro, o as na, q as Pn, t as An, v as oa, w as aa, x as d, y as mn, C as ra, c as sa } from "./createWorkspaceWsHandler-CBk4DqP4.js";
12
12
  import { SearchOutlined as cn, CloseOutlined as Ft, ProfileOutlined as ia, FileTextOutlined as so, CustomerServiceOutlined as io, ThunderboltOutlined as Mn, MessageOutlined as ca, ReloadOutlined as la, UndoOutlined as da, DeleteOutlined as ma, FolderOpenOutlined as ua, LinkOutlined as pa, BugOutlined as Sn, SolutionOutlined as ha, BellOutlined as fa, CheckOutlined as ga, FilterOutlined as ya, DashboardOutlined as _a, HeartOutlined as va, ReadOutlined as ka, BookOutlined as ba, BulbOutlined as wa, TeamOutlined as Na, ProductOutlined as Sa, CodeOutlined as Ca, CloudServerOutlined as Ia, SettingOutlined as Ta, AppstoreOutlined as La, RobotOutlined as xa, UserOutlined as $a, NotificationOutlined as Pa, LogoutOutlined as Aa } from "@ant-design/icons";
13
- import { u as D, s as Le, i as Ma, p as on, T as Ea } from "./useAppStore-BQN-26ns.js";
13
+ import { u as E, s as xe, i as Ma, p as on, T as Ea } from "./useAppStore-BQN-26ns.js";
14
14
  import { s as Da } from "./admin-logs-Dv86pFvY.js";
15
15
  import { a as Fa, l as Ra, j as Ba } from "./instance-D951fRuD.js";
16
16
  import En from "react-markdown";
@@ -21,29 +21,29 @@ import { f as ja, m as Wa, a as Ha, h as Ua, E as za } from "./schedule-DD50-7cs
21
21
  /* empty css */
22
22
  import { s as Ga, i as qa } from "./mobile-client-O3yr9h6t.js";
23
23
  function Ka(t, o, r, s) {
24
- const [m, g] = c(t), N = le(null), A = le(!1), S = le(0), F = le(t), V = le(o), M = le(r);
25
- V.current = o, M.current = r;
24
+ const [m, g] = c(t), N = le(null), A = le(!1), S = le(0), F = le(t), K = le(o), M = le(r);
25
+ K.current = o, M.current = r;
26
26
  const v = q(
27
27
  (T) => {
28
28
  T.preventDefault(), A.current = !0, S.current = T.clientX, F.current = m, document.body.style.cursor = "col-resize", document.body.style.userSelect = "none";
29
29
  },
30
30
  [m]
31
31
  );
32
- return j(() => {
32
+ return H(() => {
33
33
  g((T) => Math.min(r, Math.max(o, T)));
34
- }, [o, r]), j(() => {
35
- const T = (H) => {
34
+ }, [o, r]), H(() => {
35
+ const T = (U) => {
36
36
  if (!A.current) return;
37
- const z = H.clientX - S.current, J = F.current + z, X = Math.min(
37
+ const z = U.clientX - S.current, V = F.current + z, Z = Math.min(
38
38
  M.current,
39
- Math.max(V.current, J)
40
- ), oe = N.current;
41
- oe && (oe.style.width = X + "px", oe.style.minWidth = X + "px");
39
+ Math.max(K.current, V)
40
+ ), ne = N.current;
41
+ ne && (ne.style.width = Z + "px", ne.style.minWidth = Z + "px");
42
42
  }, L = () => {
43
43
  if (!A.current) return;
44
44
  A.current = !1;
45
- const H = N.current;
46
- H && g(H.offsetWidth), document.body.style.cursor = "", document.body.style.userSelect = "";
45
+ const U = N.current;
46
+ U && g(U.offsetWidth), document.body.style.cursor = "", document.body.style.userSelect = "";
47
47
  };
48
48
  return document.addEventListener("mousemove", T), document.addEventListener("mouseup", L), () => {
49
49
  document.removeEventListener("mousemove", T), document.removeEventListener("mouseup", L);
@@ -53,21 +53,21 @@ function Ka(t, o, r, s) {
53
53
  async function vm(t = {}, o = "") {
54
54
  const r = new URLSearchParams();
55
55
  o && r.set("token", o), t.page && r.set("page", String(t.page)), t.size && r.set("size", String(t.size)), t.tag && r.set("tag", t.tag), t.sort && r.set("sort", t.sort);
56
- const s = r.toString(), m = await Ne(
56
+ const s = r.toString(), m = await Se(
57
57
  `${Oe}/community/posts${s ? `?${s}` : ""}`,
58
58
  Be
59
59
  );
60
60
  return Qe(m, "获取帖子列表失败");
61
61
  }
62
62
  async function km(t, o = "") {
63
- const r = o ? `?token=${encodeURIComponent(o)}` : "", s = await Ne(
63
+ const r = o ? `?token=${encodeURIComponent(o)}` : "", s = await Se(
64
64
  `${Oe}/community/posts/${t}${r}`,
65
65
  Be
66
66
  );
67
67
  return Qe(s, "获取帖子详情失败");
68
68
  }
69
69
  async function bm(t, o = "") {
70
- const r = await Ne(
70
+ const r = await Se(
71
71
  `${Oe}/community/posts${o ? `?token=${encodeURIComponent(o)}` : ""}`,
72
72
  {
73
73
  ...Be,
@@ -79,7 +79,7 @@ async function bm(t, o = "") {
79
79
  return Qe(r, "发帖失败");
80
80
  }
81
81
  async function wm(t, o, r = "") {
82
- const s = await Ne(
82
+ const s = await Se(
83
83
  `${Oe}/community/posts/${t}${r ? `?token=${encodeURIComponent(r)}` : ""}`,
84
84
  {
85
85
  ...Be,
@@ -91,28 +91,28 @@ async function wm(t, o, r = "") {
91
91
  return Qe(s, "编辑帖子失败");
92
92
  }
93
93
  async function Nm(t, o = "") {
94
- const r = o ? `?token=${encodeURIComponent(o)}` : "", s = await Ne(`${Oe}/community/posts/${t}${r}`, {
94
+ const r = o ? `?token=${encodeURIComponent(o)}` : "", s = await Se(`${Oe}/community/posts/${t}${r}`, {
95
95
  ...Be,
96
96
  method: "DELETE"
97
97
  });
98
98
  return Qe(s, "删帖失败");
99
99
  }
100
100
  async function Sm(t, o = "") {
101
- const r = o ? `?token=${encodeURIComponent(o)}` : "", s = await Ne(`${Oe}/community/posts/${t}/pin${r}`, {
101
+ const r = o ? `?token=${encodeURIComponent(o)}` : "", s = await Se(`${Oe}/community/posts/${t}/pin${r}`, {
102
102
  ...Be,
103
103
  method: "POST"
104
104
  });
105
105
  return Qe(s, "置顶操作失败");
106
106
  }
107
107
  async function Cm(t, o = "") {
108
- const r = o ? `?token=${encodeURIComponent(o)}` : "", s = await Ne(`${Oe}/community/posts/${t}/feature${r}`, {
108
+ const r = o ? `?token=${encodeURIComponent(o)}` : "", s = await Se(`${Oe}/community/posts/${t}/feature${r}`, {
109
109
  ...Be,
110
110
  method: "POST"
111
111
  });
112
112
  return Qe(s, "精华操作失败");
113
113
  }
114
114
  async function Im(t, o, r = "") {
115
- const s = await Ne(
115
+ const s = await Se(
116
116
  `${Oe}/community/posts/${t}/comments${r ? `?token=${encodeURIComponent(r)}` : ""}`,
117
117
  {
118
118
  ...Be,
@@ -124,7 +124,7 @@ async function Im(t, o, r = "") {
124
124
  return Qe(s, "发评论失败");
125
125
  }
126
126
  async function Tm(t, o = "") {
127
- const r = await Ne(
127
+ const r = await Se(
128
128
  `${Oe}/community/likes${o ? `?token=${encodeURIComponent(o)}` : ""}`,
129
129
  {
130
130
  ...Be,
@@ -136,7 +136,7 @@ async function Tm(t, o = "") {
136
136
  return Qe(r, "点赞操作失败");
137
137
  }
138
138
  async function Lm(t, o = "") {
139
- const r = await Ne(
139
+ const r = await Se(
140
140
  `${Oe}/community/favorites${o ? `?token=${encodeURIComponent(o)}` : ""}`,
141
141
  {
142
142
  ...Be,
@@ -148,7 +148,7 @@ async function Lm(t, o = "") {
148
148
  return Qe(r, "收藏操作失败");
149
149
  }
150
150
  async function xm(t, o = "") {
151
- const r = await Ne(
151
+ const r = await Se(
152
152
  `${Oe}/community/follows${o ? `?token=${encodeURIComponent(o)}` : ""}`,
153
153
  {
154
154
  ...Be,
@@ -160,19 +160,19 @@ async function xm(t, o = "") {
160
160
  return Qe(r, "关注操作失败");
161
161
  }
162
162
  async function $m(t = "") {
163
- const o = t ? `?token=${encodeURIComponent(t)}` : "", r = await Ne(`${Oe}/community/tags${o}`, Be);
163
+ const o = t ? `?token=${encodeURIComponent(t)}` : "", r = await Se(`${Oe}/community/tags${o}`, Be);
164
164
  return Qe(r, "获取标签列表失败");
165
165
  }
166
166
  async function Pm(t = "") {
167
- const o = t ? `?token=${encodeURIComponent(t)}` : "", r = await Ne(`${Oe}/community/my/posts${o}`, Be);
167
+ const o = t ? `?token=${encodeURIComponent(t)}` : "", r = await Se(`${Oe}/community/my/posts${o}`, Be);
168
168
  return Qe(r, "获取我的帖子失败");
169
169
  }
170
170
  async function Am(t = "") {
171
- const o = t ? `?token=${encodeURIComponent(t)}` : "", r = await Ne(`${Oe}/community/my/drafts${o}`, Be);
171
+ const o = t ? `?token=${encodeURIComponent(t)}` : "", r = await Se(`${Oe}/community/my/drafts${o}`, Be);
172
172
  return Qe(r, "获取我的草稿失败");
173
173
  }
174
174
  async function Rn() {
175
- const t = await Ne(`${Oe}/common/portal/header-tips`, Be);
175
+ const t = await Se(`${Oe}/common/portal/header-tips`, Be);
176
176
  return Qe(t, "获取顶部提示失败");
177
177
  }
178
178
  const at = "http://127.0.0.1:28080";
@@ -240,7 +240,7 @@ async function Bm(t) {
240
240
  return o.json();
241
241
  }
242
242
  async function Om(t, o, r, s) {
243
- var V, M;
243
+ var K, M;
244
244
  const { onToken: m, onReasoning: g, onEvent: N, onFinal: A, onError: S, onComplete: F } = r;
245
245
  try {
246
246
  const v = {
@@ -256,23 +256,23 @@ async function Om(t, o, r, s) {
256
256
  signal: s == null ? void 0 : s.signal
257
257
  });
258
258
  if (!T.ok || !T.body) {
259
- const J = await T.text().catch(() => "");
260
- S(new Error(J || `HTTP ${T.status}`));
259
+ const V = await T.text().catch(() => "");
260
+ S(new Error(V || `HTTP ${T.status}`));
261
261
  return;
262
262
  }
263
- const L = T.body.getReader(), H = new TextDecoder();
263
+ const L = T.body.getReader(), U = new TextDecoder();
264
264
  let z = "";
265
265
  for (; ; ) {
266
- const { done: J, value: X } = await L.read();
267
- if (J) break;
268
- z += H.decode(X, { stream: !0 });
269
- const oe = z.split(`
266
+ const { done: V, value: Z } = await L.read();
267
+ if (V) break;
268
+ z += U.decode(Z, { stream: !0 });
269
+ const ne = z.split(`
270
270
  `);
271
- z = oe.pop() || "";
272
- for (const re of oe) {
273
- const E = re.trim();
274
- if (!(!E || E.startsWith(":")) && E.startsWith("data:")) {
275
- const f = E.slice(5).trim();
271
+ z = ne.pop() || "";
272
+ for (const ae of ne) {
273
+ const D = ae.trim();
274
+ if (!(!D || D.startsWith(":")) && D.startsWith("data:")) {
275
+ const f = D.slice(5).trim();
276
276
  if (f === "[DONE]") {
277
277
  F();
278
278
  return;
@@ -296,7 +296,7 @@ async function Om(t, o, r, s) {
296
296
  S(new Error(String(_.error)));
297
297
  return;
298
298
  }
299
- const C = (M = (V = _ == null ? void 0 : _.choices) == null ? void 0 : V[0]) == null ? void 0 : M.delta;
299
+ const C = (M = (K = _ == null ? void 0 : _.choices) == null ? void 0 : K[0]) == null ? void 0 : M.delta;
300
300
  C != null && C.content && m(C.content), C != null && C.reasoning_content && g && g(C.reasoning_content), _ != null && _.z_team_event && N && N(_.z_team_event);
301
301
  } catch {
302
302
  }
@@ -344,7 +344,7 @@ async function Um(t) {
344
344
  async function zm(t, o = "", r = "") {
345
345
  const s = new URLSearchParams();
346
346
  o && s.set("subdir", o), r && s.set("token", r);
347
- const m = s.toString(), g = await Ne(
347
+ const m = s.toString(), g = await Se(
348
348
  `${Oe}/personal-agents/${t}/files/tree${m ? "?" + m : ""}`,
349
349
  Be
350
350
  );
@@ -353,7 +353,7 @@ async function zm(t, o = "", r = "") {
353
353
  async function Gm(t, o = "", r = "") {
354
354
  const s = new URLSearchParams();
355
355
  o && s.set("path", o), r && s.set("token", r);
356
- const m = s.toString(), g = await Ne(
356
+ const m = s.toString(), g = await Se(
357
357
  `${Oe}/personal-agents/${t}/files/content${m ? "?" + m : ""}`,
358
358
  Be
359
359
  );
@@ -362,14 +362,14 @@ async function Gm(t, o = "", r = "") {
362
362
  async function qm(t, o = 1, r = 20, s = "") {
363
363
  const m = new URLSearchParams();
364
364
  m.set("page", String(o)), m.set("size", String(r)), s && m.set("token", s);
365
- const g = await Ne(
365
+ const g = await Se(
366
366
  `${Oe}/personal-agents/${t}/skills?${m.toString()}`,
367
367
  Be
368
368
  );
369
369
  return dn(g, "获取 Skill 列表失败");
370
370
  }
371
371
  async function Km(t, o, r, s = "") {
372
- const m = s ? `?token=${encodeURIComponent(s)}` : "", g = await Ne(
372
+ const m = s ? `?token=${encodeURIComponent(s)}` : "", g = await Se(
373
373
  `${Oe}/personal-agents/${t}/skills/${encodeURIComponent(
374
374
  o
375
375
  )}/toggle${m}`,
@@ -509,29 +509,29 @@ const Wn = {
509
509
  function or({
510
510
  onCountChange: t
511
511
  }) {
512
- const o = D((x) => x.projects), r = D((x) => x.openTaskFromTodo), [s, m] = c(Wn), [g, N] = c(!1), [A, S] = c(!1), [F, V] = c(!1), [M, v] = c(null), [T, L] = c(""), [H, z] = c(""), J = le(null), X = le(null), oe = le(null), re = le(!1), E = le(s), f = le(null), _ = le(null), C = le(H);
513
- E.current = s, C.current = H;
512
+ const o = E((x) => x.projects), r = E((x) => x.openTaskFromTodo), [s, m] = c(Wn), [g, N] = c(!1), [A, S] = c(!1), [F, K] = c(!1), [M, v] = c(null), [T, L] = c(""), [U, z] = c(""), V = le(null), Z = le(null), ne = le(null), ae = le(!1), D = le(s), f = le(null), _ = le(null), C = le(U);
513
+ D.current = s, C.current = U;
514
514
  const I = q(async (x) => {
515
- const K = new URLSearchParams({
515
+ const ee = new URLSearchParams({
516
516
  current: String(x),
517
517
  size: String(co)
518
- }), ne = C.current;
519
- ne && K.set("keyword", ne);
520
- const U = typeof window < "u" && (window.localStorage.getItem("token") || window.localStorage.getItem("z_ctc_token") || window.localStorage.getItem("z_team_token")) || "", ye = {};
521
- U && (ye.Authorization = `Bearer ${U}`);
522
- const xe = await fetch(`${Ut}/tasks/my?${K}`, {
518
+ }), re = C.current;
519
+ re && ee.set("keyword", re);
520
+ const B = typeof window < "u" && (window.localStorage.getItem("token") || window.localStorage.getItem("z_ctc_token") || window.localStorage.getItem("z_team_token")) || "", ye = {};
521
+ B && (ye.Authorization = `Bearer ${B}`);
522
+ const we = await fetch(`${Ut}/tasks/my?${ee}`, {
523
523
  credentials: "include",
524
524
  headers: {
525
525
  ...ye,
526
526
  Accept: "application/json"
527
527
  }
528
528
  });
529
- if (xe.status === 401 && To(), !xe.ok) throw new Error(`HTTP ${xe.status}`);
530
- const Ue = await xe.json();
529
+ if (we.status === 401 && To(), !we.ok) throw new Error(`HTTP ${we.status}`);
530
+ const Ue = await we.json();
531
531
  return Ue.data && typeof Ue.data == "object" ? Bn(Ue.data) : Bn({});
532
532
  }, []), i = q(async () => {
533
- if (!re.current) {
534
- re.current = !0, N(!0), v(null);
533
+ if (!ae.current) {
534
+ ae.current = !0, N(!0), v(null);
535
535
  try {
536
536
  const x = await I(1);
537
537
  m({
@@ -544,91 +544,91 @@ function or({
544
544
  } catch (x) {
545
545
  kn(x) || (v(x instanceof Error ? x.message : "加载失败"), m(Wn));
546
546
  } finally {
547
- N(!1), re.current = !1;
547
+ N(!1), ae.current = !1;
548
548
  }
549
549
  }
550
550
  }, [I]), b = q(async () => {
551
- const x = E.current;
552
- if (re.current || x.maxLoadedPage <= 0 || x.maxLoadedPage >= x.pages)
551
+ const x = D.current;
552
+ if (ae.current || x.maxLoadedPage <= 0 || x.maxLoadedPage >= x.pages)
553
553
  return;
554
- const K = x.maxLoadedPage + 1;
555
- re.current = !0, S(!0);
554
+ const ee = x.maxLoadedPage + 1;
555
+ ae.current = !0, S(!0);
556
556
  try {
557
- const ne = await I(K);
558
- m((U) => ({
559
- ...U,
560
- tasks: On(U.tasks, ne.records, "append"),
561
- total: ne.total,
562
- pages: ne.pages,
563
- maxLoadedPage: K
557
+ const re = await I(ee);
558
+ m((B) => ({
559
+ ...B,
560
+ tasks: On(B.tasks, re.records, "append"),
561
+ total: re.total,
562
+ pages: re.pages,
563
+ maxLoadedPage: ee
564
564
  }));
565
565
  } catch {
566
566
  } finally {
567
- S(!1), re.current = !1;
567
+ S(!1), ae.current = !1;
568
568
  }
569
569
  }, [I]), k = q(async () => {
570
- const x = E.current;
571
- if (re.current || x.minLoadedPage <= 1) return;
572
- const K = x.minLoadedPage - 1, ne = J.current;
573
- ne && (f.current = ne.scrollHeight), re.current = !0, V(!0);
570
+ const x = D.current;
571
+ if (ae.current || x.minLoadedPage <= 1) return;
572
+ const ee = x.minLoadedPage - 1, re = V.current;
573
+ re && (f.current = re.scrollHeight), ae.current = !0, K(!0);
574
574
  try {
575
- const U = await I(K);
575
+ const B = await I(ee);
576
576
  m((ye) => ({
577
577
  ...ye,
578
- tasks: On(ye.tasks, U.records, "prepend"),
579
- total: U.total,
580
- pages: U.pages,
581
- minLoadedPage: K
578
+ tasks: On(ye.tasks, B.records, "prepend"),
579
+ total: B.total,
580
+ pages: B.pages,
581
+ minLoadedPage: ee
582
582
  }));
583
583
  } catch {
584
584
  f.current = null;
585
585
  } finally {
586
- V(!1), re.current = !1;
586
+ K(!1), ae.current = !1;
587
587
  }
588
588
  }, [I]);
589
589
  oo(() => {
590
- const x = J.current, K = f.current;
591
- !x || K == null || (x.scrollTop += x.scrollHeight - K, f.current = null);
592
- }, [s.tasks]), j(() => {
590
+ const x = V.current, ee = f.current;
591
+ !x || ee == null || (x.scrollTop += x.scrollHeight - ee, f.current = null);
592
+ }, [s.tasks]), H(() => {
593
593
  i();
594
- }, [i, H]);
594
+ }, [i, U]);
595
595
  const W = q((x) => {
596
596
  L(x), _.current && clearTimeout(_.current), _.current = setTimeout(() => {
597
597
  z(x.trim());
598
598
  }, 400);
599
599
  }, []);
600
- j(() => () => {
600
+ H(() => () => {
601
601
  _.current && clearTimeout(_.current);
602
- }, []), j(() => {
602
+ }, []), H(() => {
603
603
  t == null || t(s.total);
604
- }, [s.total, t]), j(() => {
604
+ }, [s.total, t]), H(() => {
605
605
  const x = setInterval(() => {
606
- E.current.maxLoadedPage <= 1 && !C.current && i();
606
+ D.current.maxLoadedPage <= 1 && !C.current && i();
607
607
  }, 15e3);
608
608
  return () => clearInterval(x);
609
- }, [i]), j(() => {
610
- const x = J.current, K = X.current, ne = oe.current;
611
- if (!x || !K || !ne) return;
612
- const U = new IntersectionObserver(
609
+ }, [i]), H(() => {
610
+ const x = V.current, ee = Z.current, re = ne.current;
611
+ if (!x || !ee || !re) return;
612
+ const B = new IntersectionObserver(
613
613
  (ye) => {
614
- for (const xe of ye)
615
- xe.isIntersecting && (xe.target === K ? k() : xe.target === ne && b());
614
+ for (const we of ye)
615
+ we.isIntersecting && (we.target === ee ? k() : we.target === re && b());
616
616
  },
617
617
  { root: x, rootMargin: "64px", threshold: 0 }
618
618
  );
619
- return U.observe(K), U.observe(ne), () => U.disconnect();
619
+ return B.observe(ee), B.observe(re), () => B.disconnect();
620
620
  }, [k, b, s.tasks.length]);
621
- const Y = Re(() => {
621
+ const J = Re(() => {
622
622
  const x = {};
623
623
  if (o)
624
- for (const K of o)
625
- x[String(K.id)] = K.name || `项目 ${K.id}`;
624
+ for (const ee of o)
625
+ x[String(ee.id)] = ee.name || `项目 ${ee.id}`;
626
626
  return x;
627
627
  }, [o]), pe = Re(() => {
628
628
  const x = [];
629
- for (const K of s.tasks) {
630
- const ne = K.projectId || "unknown", U = x[x.length - 1];
631
- U && U.projectId === ne ? U.tasks.push(K) : x.push({ projectId: ne, tasks: [K] });
629
+ for (const ee of s.tasks) {
630
+ const re = ee.projectId || "unknown", B = x[x.length - 1];
631
+ B && B.projectId === re ? B.tasks.push(ee) : x.push({ projectId: re, tasks: [ee] });
632
632
  }
633
633
  return x;
634
634
  }, [s.tasks]), p = q(
@@ -636,7 +636,7 @@ function or({
636
636
  r(x.id, x.name, x.projectId);
637
637
  },
638
638
  [r]
639
- ), { tasks: R, total: h, pages: O, minLoadedPage: Se, maxLoadedPage: Ce } = s, ge = Ce > 0 && Ce < O, ae = Se > 1;
639
+ ), { tasks: R, total: h, pages: j, minLoadedPage: Ce, maxLoadedPage: Ie } = s, ge = Ie > 0 && Ie < j, oe = Ce > 1;
640
640
  return /* @__PURE__ */ a("div", { className: fe.todoListWrap, children: [
641
641
  /* @__PURE__ */ a("div", { className: fe.todoHeader, children: [
642
642
  /* @__PURE__ */ e("span", { className: fe.todoHeaderTitle, children: "个人待办" }),
@@ -662,9 +662,9 @@ function or({
662
662
  }
663
663
  )
664
664
  ] }),
665
- /* @__PURE__ */ a("div", { ref: J, className: fe.todoScrollArea, children: [
666
- /* @__PURE__ */ e("div", { ref: X, className: fe.todoScrollSentinel }),
667
- F ? /* @__PURE__ */ e("div", { className: fe.todoLoadHint, children: "加载更早待办..." }) : ae ? /* @__PURE__ */ e("div", { className: fe.todoLoadHint, children: "向上滑动加载更多" }) : null,
665
+ /* @__PURE__ */ a("div", { ref: V, className: fe.todoScrollArea, children: [
666
+ /* @__PURE__ */ e("div", { ref: Z, className: fe.todoScrollSentinel }),
667
+ F ? /* @__PURE__ */ e("div", { className: fe.todoLoadHint, children: "加载更早待办..." }) : oe ? /* @__PURE__ */ e("div", { className: fe.todoLoadHint, children: "向上滑动加载更多" }) : null,
668
668
  g && R.length === 0 ? /* @__PURE__ */ e("div", { className: fe.todoEmpty, children: "加载中..." }) : M && R.length === 0 ? /* @__PURE__ */ a("div", { className: fe.todoEmpty, children: [
669
669
  /* @__PURE__ */ e("span", { style: { color: "#f5222d" }, children: M }),
670
670
  /* @__PURE__ */ e(
@@ -675,16 +675,16 @@ function or({
675
675
  children: "重试"
676
676
  }
677
677
  )
678
- ] }) : R.length === 0 ? /* @__PURE__ */ e("div", { className: fe.todoEmpty, children: H ? "未找到匹配的待办" : "暂无待办" }) : pe.map(
679
- ({ projectId: x, tasks: K }, ne) => {
680
- const U = Y[x] || `项目 ${x}`;
678
+ ] }) : R.length === 0 ? /* @__PURE__ */ e("div", { className: fe.todoEmpty, children: U ? "未找到匹配的待办" : "暂无待办" }) : pe.map(
679
+ ({ projectId: x, tasks: ee }, re) => {
680
+ const B = J[x] || `项目 ${x}`;
681
681
  return /* @__PURE__ */ a("div", { className: fe.todoGroup, children: [
682
682
  /* @__PURE__ */ a("div", { className: fe.todoGroupHeader, children: [
683
- /* @__PURE__ */ e(qt, { title: U, placement: "topLeft", children: /* @__PURE__ */ e("span", { className: fe.todoGroupTitle, children: U }) }),
684
- /* @__PURE__ */ e("span", { className: fe.todoGroupCount, children: K.length })
683
+ /* @__PURE__ */ e(qt, { title: B, placement: "topLeft", children: /* @__PURE__ */ e("span", { className: fe.todoGroupTitle, children: B }) }),
684
+ /* @__PURE__ */ e("span", { className: fe.todoGroupCount, children: ee.length })
685
685
  ] }),
686
- K.map((ye) => {
687
- const xe = tr(ye), Ue = ta(ye);
686
+ ee.map((ye) => {
687
+ const we = tr(ye), Ue = ta(ye);
688
688
  return /* @__PURE__ */ a(
689
689
  "div",
690
690
  {
@@ -695,11 +695,11 @@ function or({
695
695
  /* @__PURE__ */ e(
696
696
  "span",
697
697
  {
698
- className: `${fe.todoStatusDot} ${xe.cls}`
698
+ className: `${fe.todoStatusDot} ${we.cls}`
699
699
  }
700
700
  ),
701
701
  /* @__PURE__ */ e("span", { className: fe.todoName, children: ye.name }),
702
- /* @__PURE__ */ e("span", { className: `${fe.todoTag} ${xe.cls}`, children: xe.label })
702
+ /* @__PURE__ */ e("span", { className: `${fe.todoTag} ${we.cls}`, children: we.label })
703
703
  ] }),
704
704
  /* @__PURE__ */ a("div", { className: fe.todoCardMeta, children: [
705
705
  Ue ? /* @__PURE__ */ a("span", { className: fe.todoFrom, children: [
@@ -713,7 +713,7 @@ function or({
713
713
  ye.id
714
714
  );
715
715
  })
716
- ] }, `${x}-${ne}`);
716
+ ] }, `${x}-${re}`);
717
717
  }
718
718
  ),
719
719
  A ? /* @__PURE__ */ e("div", { className: fe.todoLoadHint, children: "加载更多待办..." }) : ge ? /* @__PURE__ */ a("div", { className: fe.todoLoadHint, children: [
@@ -727,7 +727,7 @@ function or({
727
727
  h,
728
728
  " 条"
729
729
  ] }) : null,
730
- /* @__PURE__ */ e("div", { ref: oe, className: fe.todoScrollSentinel })
730
+ /* @__PURE__ */ e("div", { ref: ne, className: fe.todoScrollSentinel })
731
731
  ] })
732
732
  ] });
733
733
  }
@@ -784,7 +784,7 @@ function Dr() {
784
784
  moved: !1,
785
785
  startY: 0,
786
786
  startTop: 0
787
- }), F = le(null), [V, M] = c([]), [v, T] = c(!1), L = le(null), [H, z] = c(!1), J = D((p) => p.currentProject), X = D((p) => p.token), oe = J ? `${J.workspace_path}_${J.id}` : "global_scratchpad", re = (J == null ? void 0 : J.name) || (J == null ? void 0 : J.scenario_name) || "速记", E = J ? JSON.stringify({ type: "team", id: J.id }) : "", f = q(() => {
787
+ }), F = le(null), [K, M] = c([]), [v, T] = c(!1), L = le(null), [U, z] = c(!1), V = E((p) => p.currentProject), Z = E((p) => p.token), ne = V ? `${V.workspace_path}_${V.id}` : "global_scratchpad", ae = (V == null ? void 0 : V.name) || (V == null ? void 0 : V.scenario_name) || "速记", D = V ? JSON.stringify({ type: "team", id: V.id }) : "", f = q(() => {
788
788
  L.current && (clearTimeout(L.current), L.current = null);
789
789
  }, []), _ = q(
790
790
  (p) => {
@@ -795,7 +795,7 @@ function Dr() {
795
795
  async (p = !1) => {
796
796
  if (!(!p && (document.hidden || Un() || t)))
797
797
  try {
798
- const R = await Fa(X, Ar);
798
+ const R = await Fa(Z, Ar);
799
799
  if (!p && (!R.length || Un())) return;
800
800
  M(R), T(!0), R.length && sessionStorage.setItem(bn, String(Date.now())), f(), L.current = setTimeout(
801
801
  () => _(!1),
@@ -804,9 +804,9 @@ function Dr() {
804
804
  } catch {
805
805
  }
806
806
  },
807
- [X, t, f, _]
807
+ [Z, t, f, _]
808
808
  );
809
- j(() => {
809
+ H(() => {
810
810
  const p = setTimeout(() => void C(), xr), R = setInterval(() => void C(), uo);
811
811
  return () => {
812
812
  clearTimeout(p), clearInterval(R), f();
@@ -832,7 +832,7 @@ function Dr() {
832
832
  ), b = q(
833
833
  (p) => {
834
834
  var R, h;
835
- S.current.active && (S.current.active = !1, (h = (R = p.currentTarget).releasePointerCapture) == null || h.call(R, p.pointerId), S.current.moved && g((O) => (localStorage.setItem(Hn, String(O)), O)), A(!1));
835
+ S.current.active && (S.current.active = !1, (h = (R = p.currentTarget).releasePointerCapture) == null || h.call(R, p.pointerId), S.current.moved && g((j) => (localStorage.setItem(Hn, String(j)), j)), A(!1));
836
836
  },
837
837
  []
838
838
  ), k = q(() => {
@@ -844,10 +844,10 @@ function Dr() {
844
844
  o((p) => !p);
845
845
  }
846
846
  }, [v, _]);
847
- j(() => {
847
+ H(() => {
848
848
  const p = () => g((R) => gn(R));
849
849
  return window.addEventListener("resize", p), () => window.removeEventListener("resize", p);
850
- }, []), j(() => {
850
+ }, []), H(() => {
851
851
  if (!t) return;
852
852
  const p = (R) => {
853
853
  F.current && F.current.contains(R.target) || o(!1);
@@ -879,17 +879,17 @@ function Dr() {
879
879
  z(!0), o(!1);
880
880
  }
881
881
  }
882
- ], Y = (p) => {
882
+ ], J = (p) => {
883
883
  window.open(`/workspace?projectId=${p}`, "_blank");
884
- }, pe = v && V.length > 0 && !N && !t;
884
+ }, pe = v && K.length > 0 && !N && !t;
885
885
  return /* @__PURE__ */ a(vt, { children: [
886
886
  /* @__PURE__ */ a("div", { ref: F, className: Pe.fabWrap, style: { top: m }, children: [
887
887
  v && !N && !t ? /* @__PURE__ */ a("div", { className: Pe.pleadCard, role: "status", children: [
888
- V.length ? /* @__PURE__ */ a(vt, { children: [
888
+ K.length ? /* @__PURE__ */ a(vt, { children: [
889
889
  /* @__PURE__ */ a("div", { className: Pe.pleadTitle, children: [
890
890
  /* @__PURE__ */ e("span", { className: Pe.pleadFace, children: "📋" }),
891
891
  "你还有 ",
892
- V.length,
892
+ K.length,
893
893
  " 个单子没关",
894
894
  /* @__PURE__ */ e(
895
895
  "button",
@@ -903,13 +903,13 @@ function Dr() {
903
903
  }
904
904
  )
905
905
  ] }),
906
- /* @__PURE__ */ e("ul", { className: Pe.pleadList, children: V.map((p) => /* @__PURE__ */ e("li", { children: /* @__PURE__ */ a(
906
+ /* @__PURE__ */ e("ul", { className: Pe.pleadList, children: K.map((p) => /* @__PURE__ */ e("li", { children: /* @__PURE__ */ a(
907
907
  "button",
908
908
  {
909
909
  type: "button",
910
910
  className: Pe.pleadItem,
911
911
  title: p.name,
912
- onClick: () => Y(p.id),
912
+ onClick: () => J(p.id),
913
913
  children: [
914
914
  /* @__PURE__ */ e("span", { className: Pe.pleadItemName, children: p.name }),
915
915
  /* @__PURE__ */ e("span", { className: Pe.pleadItemAge, children: Er(p.created_at) })
@@ -1103,16 +1103,16 @@ function Dr() {
1103
1103
  {
1104
1104
  open: r,
1105
1105
  onClose: () => s(!1),
1106
- bindKey: oe,
1107
- defaultTitle: re,
1108
- extraInfo: E,
1109
- token: X
1106
+ bindKey: ne,
1107
+ defaultTitle: ae,
1108
+ extraInfo: D,
1109
+ token: Z
1110
1110
  }
1111
1111
  ),
1112
1112
  /* @__PURE__ */ e(
1113
1113
  ro,
1114
1114
  {
1115
- open: H,
1115
+ open: U,
1116
1116
  onClose: () => z(!1)
1117
1117
  }
1118
1118
  )
@@ -1199,25 +1199,25 @@ const Fr = "_resumeModal_1ytri_3", Rr = "_modalHeader_1ytri_10", Br = "_closeBtn
1199
1199
  }, { TabPane: yn } = Nn;
1200
1200
  function ai() {
1201
1201
  var me, ct;
1202
- const { agentProfileState: t, closeAgentProfile: o, navigateToPersonalChat: r } = D(), s = D((B) => B.token), [m, g] = c(!1), [N, A] = c(
1202
+ const { agentProfileState: t, closeAgentProfile: o, navigateToPersonalChat: r } = E(), s = E((O) => O.token), [m, g] = c(!1), [N, A] = c(
1203
1203
  null
1204
- ), [S, F] = c(!1), [V, M] = c(null), [v, T] = c(!1), [L, H] = c("info"), [z, J] = c(
1204
+ ), [S, F] = c(!1), [K, M] = c(null), [v, T] = c(!1), [L, U] = c("info"), [z, V] = c(
1205
1205
  null
1206
- ), [X, oe] = c(null), [re, E] = c([]), [f, _] = c(
1206
+ ), [Z, ne] = c(null), [ae, D] = c([]), [f, _] = c(
1207
1207
  null
1208
- ), [C, I] = c(""), [i, b] = c(!1), [k, W] = c(!1), [Y, pe] = c([]), [p, R] = c(!1), h = t.agent, O = (h == null ? void 0 : h.agent_code) || ((me = h == null ? void 0 : h._agenthub_raw) == null ? void 0 : me.agentCode) || "", Se = Dt(
1208
+ ), [C, I] = c(""), [i, b] = c(!1), [k, W] = c(!1), [J, pe] = c([]), [p, R] = c(!1), h = t.agent, j = (h == null ? void 0 : h.agent_code) || ((me = h == null ? void 0 : h._agenthub_raw) == null ? void 0 : me.agentCode) || "", Ce = Dt(
1209
1209
  ((ct = h == null ? void 0 : h._agenthub_raw) == null ? void 0 : ct.agentHubAgentId) ?? null
1210
- ) || null, Ce = D((B) => B.currentProject), ge = Ce == null ? void 0 : Ce.id, ae = q(async () => {
1211
- if (O) {
1210
+ ) || null, Ie = E((O) => O.currentProject), ge = Ie == null ? void 0 : Ie.id, oe = q(async () => {
1211
+ if (j) {
1212
1212
  F(!0);
1213
1213
  try {
1214
- const B = await Ne(
1214
+ const O = await Se(
1215
1215
  `${en}/evolution/agents/${encodeURIComponent(
1216
- O
1216
+ j
1217
1217
  )}`
1218
1218
  );
1219
- if (B.ok) {
1220
- const se = await B.json();
1219
+ if (O.ok) {
1220
+ const se = await O.json();
1221
1221
  A(se);
1222
1222
  } else
1223
1223
  A(null);
@@ -1227,15 +1227,15 @@ function ai() {
1227
1227
  F(!1);
1228
1228
  }
1229
1229
  }
1230
- }, [O]), x = q(async () => {
1230
+ }, [j]), x = q(async () => {
1231
1231
  if (!(!ge || !h)) {
1232
1232
  R(!0);
1233
1233
  try {
1234
- const B = `${Ut}/scenario-instances/${ge}/team/agents/${encodeURIComponent(
1234
+ const O = `${Ut}/scenario-instances/${ge}/team/agents/${encodeURIComponent(
1235
1235
  h.name
1236
- )}/skills`, se = await Ne(B);
1236
+ )}/skills`, se = await Se(O);
1237
1237
  if (se.ok) {
1238
- const Z = await se.json(), $e = (Array.isArray(Z == null ? void 0 : Z.data) ? Z.data : Array.isArray(Z) ? Z : []).map((te) => ({
1238
+ const Q = await se.json(), $e = (Array.isArray(Q == null ? void 0 : Q.data) ? Q.data : Array.isArray(Q) ? Q : []).map((te) => ({
1239
1239
  skillName: te.skillName,
1240
1240
  path: te.path,
1241
1241
  revision: te.revision || !1,
@@ -1251,116 +1251,116 @@ function ai() {
1251
1251
  }
1252
1252
  }
1253
1253
  }, [ge, h]);
1254
- j(() => {
1255
- t.visible && O && (A(null), M(null), H("info"), pe([]), ae(), x());
1254
+ H(() => {
1255
+ t.visible && j && (A(null), M(null), U("info"), pe([]), oe(), x());
1256
1256
  }, [
1257
1257
  t.visible,
1258
- O,
1259
- ae,
1258
+ j,
1259
+ oe,
1260
1260
  x
1261
1261
  ]);
1262
- const K = async (B) => {
1263
- if (O) {
1262
+ const ee = async (O) => {
1263
+ if (j) {
1264
1264
  T(!0);
1265
1265
  try {
1266
- const Z = await (await Ne(
1266
+ const Q = await (await Se(
1267
1267
  `${en}/evolution/agents/${encodeURIComponent(
1268
- O
1269
- )}/memory/${encodeURIComponent(B)}`,
1268
+ j
1269
+ )}/memory/${encodeURIComponent(O)}`,
1270
1270
  { method: "DELETE" }
1271
1271
  )).json();
1272
- Z.ok ? (Le("记忆已删除"), await ae(), V === B && M(null)) : Le(Z.error || "删除失败", "error");
1272
+ Q.ok ? (xe("记忆已删除"), await oe(), K === O && M(null)) : xe(Q.error || "删除失败", "error");
1273
1273
  } catch {
1274
- Le("删除失败", "error");
1274
+ xe("删除失败", "error");
1275
1275
  } finally {
1276
1276
  T(!1);
1277
1277
  }
1278
1278
  }
1279
- }, ne = async (B) => {
1280
- if (O) {
1279
+ }, re = async (O) => {
1280
+ if (j) {
1281
1281
  T(!0);
1282
1282
  try {
1283
- const Z = await (await Ne(
1283
+ const Q = await (await Se(
1284
1284
  `${en}/evolution/agents/${encodeURIComponent(
1285
- O
1286
- )}/memory/${encodeURIComponent(B)}/reset`,
1285
+ j
1286
+ )}/memory/${encodeURIComponent(O)}/reset`,
1287
1287
  { method: "POST" }
1288
1288
  )).json();
1289
- Z.ok ? (Le("记忆已重置为种子内容"), await ae()) : Le(Z.error || "重置失败", "error");
1289
+ Q.ok ? (xe("记忆已重置为种子内容"), await oe()) : xe(Q.error || "重置失败", "error");
1290
1290
  } catch {
1291
- Le("重置失败", "error");
1291
+ xe("重置失败", "error");
1292
1292
  } finally {
1293
1293
  T(!1);
1294
1294
  }
1295
1295
  }
1296
- }, U = async () => {
1297
- if (O) {
1296
+ }, B = async () => {
1297
+ if (j) {
1298
1298
  T(!0);
1299
1299
  try {
1300
- (await (await Ne(
1300
+ (await (await Se(
1301
1301
  `${en}/evolution/agents/${encodeURIComponent(
1302
- O
1302
+ j
1303
1303
  )}/memory/reset`,
1304
1304
  { method: "POST" }
1305
- )).json()).ok ? (Le("记忆已重置"), M(null), await ae()) : Le("重置失败", "error");
1305
+ )).json()).ok ? (xe("记忆已重置"), M(null), await oe()) : xe("重置失败", "error");
1306
1306
  } catch {
1307
- Le("重置失败", "error");
1307
+ xe("重置失败", "error");
1308
1308
  } finally {
1309
1309
  T(!1);
1310
1310
  }
1311
1311
  }
1312
1312
  }, ye = async () => {
1313
- if (!O) {
1314
- Le("无法获取 Agent 编码", "error");
1313
+ if (!j) {
1314
+ xe("无法获取 Agent 编码", "error");
1315
1315
  return;
1316
1316
  }
1317
1317
  g(!0);
1318
1318
  try {
1319
- const B = await Lo(
1320
- Se,
1321
- O,
1322
- (h == null ? void 0 : h.name) || O,
1319
+ const O = await Lo(
1320
+ Ce,
1321
+ j,
1322
+ (h == null ? void 0 : h.name) || j,
1323
1323
  h == null ? void 0 : h.avatar,
1324
1324
  s
1325
1325
  );
1326
- if (!B || typeof B != "object" || !B.id) {
1327
- Le("ensure 接口返回数据异常,缺少 id 字段", "error");
1326
+ if (!O || typeof O != "object" || !O.id) {
1327
+ xe("ensure 接口返回数据异常,缺少 id 字段", "error");
1328
1328
  return;
1329
1329
  }
1330
- o(), r(B, "shared");
1331
- } catch (B) {
1332
- const se = B && typeof B == "object" && "userMessage" in B ? String(B.userMessage) : B instanceof Error ? B.message : "打开聊天失败";
1333
- Le(se, "error");
1330
+ o(), r(O, "shared");
1331
+ } catch (O) {
1332
+ const se = O && typeof O == "object" && "userMessage" in O ? String(O.userMessage) : O instanceof Error ? O.message : "打开聊天失败";
1333
+ xe(se, "error");
1334
1334
  } finally {
1335
1335
  g(!1);
1336
1336
  }
1337
- }, xe = async (B) => {
1337
+ }, we = async (O) => {
1338
1338
  var se;
1339
1339
  if (!(!ge || !h)) {
1340
- oe(B), E([]), _(null), I(""), b(!0), W(!0);
1340
+ ne(O), D([]), _(null), I(""), b(!0), W(!0);
1341
1341
  try {
1342
- const Z = await Ne(
1342
+ const Q = await Se(
1343
1343
  `${Ut}/scenario-instances/${ge}/team/agents/${encodeURIComponent(
1344
1344
  h.name
1345
- )}/skills/${encodeURIComponent(B.skillName)}/files`
1345
+ )}/skills/${encodeURIComponent(O.skillName)}/files`
1346
1346
  );
1347
- if (Z.ok) {
1348
- const Ae = await Z.json(), $e = (Ae == null ? void 0 : Ae.data) || Ae || [];
1349
- E($e);
1347
+ if (Q.ok) {
1348
+ const Ae = await Q.json(), $e = (Ae == null ? void 0 : Ae.data) || Ae || [];
1349
+ D($e);
1350
1350
  const te = $e.find(
1351
1351
  (qe) => qe.path === "skill.md" || qe.path === "SKILL.md"
1352
1352
  ), Me = (te == null ? void 0 : te.path) || ((se = $e.find((qe) => !qe.isDir)) == null ? void 0 : se.path);
1353
1353
  if (Me) {
1354
1354
  _(Me);
1355
- const qe = await Ne(
1355
+ const qe = await Se(
1356
1356
  `${Ut}/scenario-instances/${ge}/team/agents/${encodeURIComponent(
1357
1357
  h.name
1358
1358
  )}/skills/${encodeURIComponent(
1359
- B.skillName
1359
+ O.skillName
1360
1360
  )}/files/content?path=${encodeURIComponent(Me)}`
1361
1361
  );
1362
1362
  if (qe.ok) {
1363
- const we = await qe.json(), tt = (we == null ? void 0 : we.data) || we;
1363
+ const Ne = await qe.json(), tt = (Ne == null ? void 0 : Ne.data) || Ne;
1364
1364
  I((tt == null ? void 0 : tt.content) || "");
1365
1365
  }
1366
1366
  }
@@ -1370,19 +1370,19 @@ function ai() {
1370
1370
  b(!1), W(!1);
1371
1371
  }
1372
1372
  }
1373
- }, Ue = async (B) => {
1374
- if (!(!X || B === f) && !(!ge || !h)) {
1375
- _(B), W(!0);
1373
+ }, Ue = async (O) => {
1374
+ if (!(!Z || O === f) && !(!ge || !h)) {
1375
+ _(O), W(!0);
1376
1376
  try {
1377
- const se = await Ne(
1377
+ const se = await Se(
1378
1378
  `${Ut}/scenario-instances/${ge}/team/agents/${encodeURIComponent(
1379
1379
  h.name
1380
1380
  )}/skills/${encodeURIComponent(
1381
- X.skillName
1382
- )}/files/content?path=${encodeURIComponent(B)}`
1381
+ Z.skillName
1382
+ )}/files/content?path=${encodeURIComponent(O)}`
1383
1383
  );
1384
1384
  if (se.ok) {
1385
- const Z = await se.json(), Ae = (Z == null ? void 0 : Z.data) || Z;
1385
+ const Q = await se.json(), Ae = (Q == null ? void 0 : Q.data) || Q;
1386
1386
  I((Ae == null ? void 0 : Ae.content) || "");
1387
1387
  } else
1388
1388
  I("");
@@ -1392,31 +1392,31 @@ function ai() {
1392
1392
  W(!1);
1393
1393
  }
1394
1394
  }
1395
- }, et = (B) => {
1395
+ }, et = (O) => {
1396
1396
  const se = { children: [] };
1397
- for (const Ae of B) {
1397
+ for (const Ae of O) {
1398
1398
  const $e = Ae.path.split("/");
1399
1399
  let te = se;
1400
1400
  for (let Me = 0; Me < $e.length; Me++) {
1401
1401
  const qe = $e.slice(0, Me + 1).join("/");
1402
- let we = te.children.find((tt) => tt.name === $e[Me]);
1403
- we || (we = {
1402
+ let Ne = te.children.find((tt) => tt.name === $e[Me]);
1403
+ Ne || (Ne = {
1404
1404
  name: $e[Me],
1405
1405
  path: qe,
1406
1406
  isDir: Me < $e.length - 1 || Ae.isDir,
1407
1407
  children: [],
1408
1408
  size: Me === $e.length - 1 ? Ae.size : 0
1409
- }, te.children.push(we)), te = we;
1409
+ }, te.children.push(Ne)), te = Ne;
1410
1410
  }
1411
1411
  }
1412
- const Z = (Ae) => {
1413
- Ae.children.sort(($e, te) => $e.isDir !== te.isDir ? $e.isDir ? -1 : 1 : $e.name.localeCompare(te.name)), Ae.children.forEach(Z);
1412
+ const Q = (Ae) => {
1413
+ Ae.children.sort(($e, te) => $e.isDir !== te.isDir ? $e.isDir ? -1 : 1 : $e.name.localeCompare(te.name)), Ae.children.forEach(Q);
1414
1414
  };
1415
- return Z(se), se.children;
1415
+ return Q(se), se.children;
1416
1416
  };
1417
1417
  if (!t.visible || !h) return null;
1418
- const P = (N == null ? void 0 : N.memoryEntries) || [], ce = Y, _e = () => {
1419
- var B, se;
1418
+ const P = (N == null ? void 0 : N.memoryEntries) || [], ce = J, _e = () => {
1419
+ var O, se;
1420
1420
  return /* @__PURE__ */ a("div", { className: y.leftPanel, children: [
1421
1421
  /* @__PURE__ */ e("div", { className: y.avatarWrap, children: h.avatar && h.avatar.includes("<svg") ? /* @__PURE__ */ e(
1422
1422
  "span",
@@ -1425,8 +1425,8 @@ function ai() {
1425
1425
  className: y.avatarSvg
1426
1426
  }
1427
1427
  ) : /* @__PURE__ */ e("div", { className: y.avatarFallback, children: h.avatar || "🤖" }) }),
1428
- /* @__PURE__ */ e("div", { className: y.profileName, children: h.name || O }),
1429
- ((B = h._agenthub_raw) == null ? void 0 : B.createByName) && /* @__PURE__ */ a("div", { className: y.profileCreator, children: [
1428
+ /* @__PURE__ */ e("div", { className: y.profileName, children: h.name || j }),
1429
+ ((O = h._agenthub_raw) == null ? void 0 : O.createByName) && /* @__PURE__ */ a("div", { className: y.profileCreator, children: [
1430
1430
  "创建者: ",
1431
1431
  h._agenthub_raw.createByName
1432
1432
  ] }),
@@ -1435,7 +1435,7 @@ function ai() {
1435
1435
  h._agenthub_raw.type
1436
1436
  ] }),
1437
1437
  h.description && /* @__PURE__ */ e("div", { className: y.profileDesc, children: h.description }),
1438
- h.capabilities && h.capabilities.length > 0 && /* @__PURE__ */ e("div", { className: y.profileCapabilities, children: h.capabilities.map((Z) => /* @__PURE__ */ e("span", { className: y.capabilityTag, children: Z }, Z)) }),
1438
+ h.capabilities && h.capabilities.length > 0 && /* @__PURE__ */ e("div", { className: y.profileCapabilities, children: h.capabilities.map((Q) => /* @__PURE__ */ e("span", { className: y.capabilityTag, children: Q }, Q)) }),
1439
1439
  /* @__PURE__ */ e("div", { className: y.leftFooter, children: /* @__PURE__ */ a(
1440
1440
  "button",
1441
1441
  {
@@ -1452,25 +1452,25 @@ function ai() {
1452
1452
  ) })
1453
1453
  ] });
1454
1454
  }, de = () => {
1455
- var B, se, Z, Ae, $e;
1455
+ var O, se, Q, Ae, $e;
1456
1456
  return /* @__PURE__ */ e("div", { className: y.rightPanel, children: /* @__PURE__ */ a(
1457
1457
  Nn,
1458
1458
  {
1459
1459
  activeKey: L,
1460
- onChange: H,
1460
+ onChange: U,
1461
1461
  size: "small",
1462
1462
  className: y.tabs,
1463
1463
  children: [
1464
1464
  /* @__PURE__ */ e(yn, { tab: "基本信息", children: /* @__PURE__ */ a("div", { className: y.infoTab, children: [
1465
1465
  /* @__PURE__ */ a("div", { className: y.infoRow, children: [
1466
1466
  /* @__PURE__ */ e("span", { className: y.infoLabel, children: "Agent编码" }),
1467
- /* @__PURE__ */ e("span", { className: y.infoValue, children: O || "-" })
1467
+ /* @__PURE__ */ e("span", { className: y.infoValue, children: j || "-" })
1468
1468
  ] }),
1469
1469
  /* @__PURE__ */ a("div", { className: y.infoRow, children: [
1470
1470
  /* @__PURE__ */ e("span", { className: y.infoLabel, children: "名称" }),
1471
1471
  /* @__PURE__ */ e("span", { className: y.infoValue, children: h.name || "-" })
1472
1472
  ] }),
1473
- ((B = h._agenthub_raw) == null ? void 0 : B.agentName) && /* @__PURE__ */ a("div", { className: y.infoRow, children: [
1473
+ ((O = h._agenthub_raw) == null ? void 0 : O.agentName) && /* @__PURE__ */ a("div", { className: y.infoRow, children: [
1474
1474
  /* @__PURE__ */ e("span", { className: y.infoLabel, children: "Agent名称" }),
1475
1475
  /* @__PURE__ */ e("span", { className: y.infoValue, children: h._agenthub_raw.agentName })
1476
1476
  ] }),
@@ -1478,7 +1478,7 @@ function ai() {
1478
1478
  /* @__PURE__ */ e("span", { className: y.infoLabel, children: "类型" }),
1479
1479
  /* @__PURE__ */ e("span", { className: y.infoValue, children: h._agenthub_raw.type })
1480
1480
  ] }),
1481
- ((Z = h._agenthub_raw) == null ? void 0 : Z.createByName) && /* @__PURE__ */ a("div", { className: y.infoRow, children: [
1481
+ ((Q = h._agenthub_raw) == null ? void 0 : Q.createByName) && /* @__PURE__ */ a("div", { className: y.infoRow, children: [
1482
1482
  /* @__PURE__ */ e("span", { className: y.infoLabel, children: "创建者" }),
1483
1483
  /* @__PURE__ */ e("span", { className: y.infoValue, children: h._agenthub_raw.createByName })
1484
1484
  ] }),
@@ -1507,14 +1507,14 @@ function ai() {
1507
1507
  /* @__PURE__ */ a("div", { className: y.memoryToolbar, children: [
1508
1508
  /* @__PURE__ */ a("span", { className: y.memoryHint, children: [
1509
1509
  "记忆文件存储于 /agents/",
1510
- O,
1510
+ j,
1511
1511
  "/memory/ 目录"
1512
1512
  ] }),
1513
1513
  /* @__PURE__ */ e(
1514
1514
  fn,
1515
1515
  {
1516
1516
  title: "重置全部记忆:将从 /agents/{agentKey}/ 目录完整拷贝记忆,覆盖当前所有记忆文件。确定继续?",
1517
- onConfirm: () => void U(),
1517
+ onConfirm: () => void B(),
1518
1518
  okText: "确定重置",
1519
1519
  cancelText: "取消",
1520
1520
  disabled: v,
@@ -1542,7 +1542,7 @@ function ai() {
1542
1542
  "div",
1543
1543
  {
1544
1544
  className: y.memoryItemClickable,
1545
- onClick: () => J(te),
1545
+ onClick: () => V(te),
1546
1546
  children: [
1547
1547
  /* @__PURE__ */ a("div", { className: y.memoryItemInfo, children: [
1548
1548
  /* @__PURE__ */ e("div", { className: y.memoryItemTitle, children: te.title || te.name }),
@@ -1555,7 +1555,7 @@ function ai() {
1555
1555
  fn,
1556
1556
  {
1557
1557
  title: `确定重置「${te.title || te.name}」为种子内容?`,
1558
- onConfirm: () => void ne(te.name),
1558
+ onConfirm: () => void re(te.name),
1559
1559
  okText: "重置",
1560
1560
  cancelText: "取消",
1561
1561
  disabled: v,
@@ -1576,7 +1576,7 @@ function ai() {
1576
1576
  fn,
1577
1577
  {
1578
1578
  title: `确定删除「${te.title || te.name}」?`,
1579
- onConfirm: () => void K(te.name),
1579
+ onConfirm: () => void ee(te.name),
1580
1580
  okText: "删除",
1581
1581
  cancelText: "取消",
1582
1582
  disabled: v,
@@ -1618,7 +1618,7 @@ function ai() {
1618
1618
  "div",
1619
1619
  {
1620
1620
  className: y.skillItemClickable,
1621
- onClick: () => void xe(te),
1621
+ onClick: () => void we(te),
1622
1622
  children: [
1623
1623
  /* @__PURE__ */ e("div", { className: y.skillIcon, children: /* @__PURE__ */ e(Mn, {}) }),
1624
1624
  /* @__PURE__ */ a("div", { className: y.skillInfo, children: [
@@ -1639,27 +1639,27 @@ function ai() {
1639
1639
  ]
1640
1640
  }
1641
1641
  ) });
1642
- }, Ge = (B) => {
1643
- var Z;
1644
- const se = ((Z = B.split(".").pop()) == null ? void 0 : Z.toLowerCase()) || "";
1642
+ }, Ge = (O) => {
1643
+ var Q;
1644
+ const se = ((Q = O.split(".").pop()) == null ? void 0 : Q.toLowerCase()) || "";
1645
1645
  return se === "md" || se === "markdown";
1646
- }, Ie = (B, se) => B.map((Z) => /* @__PURE__ */ a("div", { children: [
1646
+ }, Te = (O, se) => O.map((Q) => /* @__PURE__ */ a("div", { children: [
1647
1647
  /* @__PURE__ */ a(
1648
1648
  "div",
1649
1649
  {
1650
- className: `${y.skillFileTreeNode} ${f === Z.path ? y.skillFileTreeNodeActive : ""}`,
1650
+ className: `${y.skillFileTreeNode} ${f === Q.path ? y.skillFileTreeNodeActive : ""}`,
1651
1651
  style: { paddingLeft: `${se * 14 + 12}px` },
1652
1652
  onClick: () => {
1653
- Z.isDir || Ue(Z.path);
1653
+ Q.isDir || Ue(Q.path);
1654
1654
  },
1655
1655
  children: [
1656
- Z.isDir ? /* @__PURE__ */ e(ua, { className: y.skillFileTreeIcon }) : /* @__PURE__ */ e(so, { className: y.skillFileTreeIcon }),
1657
- /* @__PURE__ */ e("span", { className: y.skillFileTreeName, children: Z.name })
1656
+ Q.isDir ? /* @__PURE__ */ e(ua, { className: y.skillFileTreeIcon }) : /* @__PURE__ */ e(so, { className: y.skillFileTreeIcon }),
1657
+ /* @__PURE__ */ e("span", { className: y.skillFileTreeName, children: Q.name })
1658
1658
  ]
1659
1659
  }
1660
1660
  ),
1661
- Z.isDir && Z.children.length > 0 && /* @__PURE__ */ e("div", { children: Ie(Z.children, se + 1) })
1662
- ] }, Z.path));
1661
+ Q.isDir && Q.children.length > 0 && /* @__PURE__ */ e("div", { children: Te(Q.children, se + 1) })
1662
+ ] }, Q.path));
1663
1663
  return /* @__PURE__ */ a(
1664
1664
  "div",
1665
1665
  {
@@ -1671,7 +1671,7 @@ function ai() {
1671
1671
  "div",
1672
1672
  {
1673
1673
  className: `${Xe.modal} ${y.resumeModal}`,
1674
- onClick: (B) => B.stopPropagation(),
1674
+ onClick: (O) => O.stopPropagation(),
1675
1675
  children: [
1676
1676
  /* @__PURE__ */ a("div", { className: y.modalHeader, children: [
1677
1677
  /* @__PURE__ */ e("div", { className: Xe.title, children: "Agent 详情" }),
@@ -1696,14 +1696,14 @@ function ai() {
1696
1696
  "div",
1697
1697
  {
1698
1698
  className: y.memoryDetailOverlay,
1699
- onClick: (B) => {
1700
- B.stopPropagation(), J(null);
1699
+ onClick: (O) => {
1700
+ O.stopPropagation(), V(null);
1701
1701
  },
1702
1702
  children: /* @__PURE__ */ a(
1703
1703
  "div",
1704
1704
  {
1705
1705
  className: y.memoryDetailModal,
1706
- onClick: (B) => B.stopPropagation(),
1706
+ onClick: (O) => O.stopPropagation(),
1707
1707
  children: [
1708
1708
  /* @__PURE__ */ a("div", { className: y.memoryDetailHeader, children: [
1709
1709
  /* @__PURE__ */ e("div", { className: y.memoryDetailTitle, children: z.title || z.name }),
@@ -1712,7 +1712,7 @@ function ai() {
1712
1712
  {
1713
1713
  type: "button",
1714
1714
  className: y.closeBtn,
1715
- onClick: () => J(null),
1715
+ onClick: () => V(null),
1716
1716
  children: /* @__PURE__ */ e(Ft, {})
1717
1717
  }
1718
1718
  )
@@ -1747,31 +1747,31 @@ function ai() {
1747
1747
  )
1748
1748
  }
1749
1749
  ),
1750
- X && /* @__PURE__ */ e(
1750
+ Z && /* @__PURE__ */ e(
1751
1751
  "div",
1752
1752
  {
1753
1753
  className: y.skillDetailOverlay,
1754
- onClick: (B) => {
1755
- B.stopPropagation(), oe(null);
1754
+ onClick: (O) => {
1755
+ O.stopPropagation(), ne(null);
1756
1756
  },
1757
1757
  children: /* @__PURE__ */ a(
1758
1758
  "div",
1759
1759
  {
1760
1760
  className: y.skillDetailModal,
1761
- onClick: (B) => B.stopPropagation(),
1761
+ onClick: (O) => O.stopPropagation(),
1762
1762
  children: [
1763
1763
  /* @__PURE__ */ a("div", { className: y.skillDetailHeader, children: [
1764
1764
  /* @__PURE__ */ a("div", { className: y.skillDetailTitle, children: [
1765
1765
  /* @__PURE__ */ e("span", { style: { fontSize: 16 }, children: /* @__PURE__ */ e(Mn, {}) }),
1766
- X.skillName,
1767
- X.revision && /* @__PURE__ */ e("span", { className: y.skillBadge, children: "修订版" })
1766
+ Z.skillName,
1767
+ Z.revision && /* @__PURE__ */ e("span", { className: y.skillBadge, children: "修订版" })
1768
1768
  ] }),
1769
1769
  /* @__PURE__ */ e(
1770
1770
  "button",
1771
1771
  {
1772
1772
  type: "button",
1773
1773
  className: y.closeBtn,
1774
- onClick: () => oe(null),
1774
+ onClick: () => ne(null),
1775
1775
  children: /* @__PURE__ */ e(Ft, {})
1776
1776
  }
1777
1777
  )
@@ -1781,7 +1781,7 @@ function ai() {
1781
1781
  /* @__PURE__ */ e(ot, { size: "small" }),
1782
1782
  " ",
1783
1783
  /* @__PURE__ */ e("span", { style: { marginLeft: 6 }, children: "加载中..." })
1784
- ] }) : re.length === 0 ? /* @__PURE__ */ e("div", { className: y.skillFileTreeEmpty, children: "暂无文件" }) : Ie(et(re), 0) }),
1784
+ ] }) : ae.length === 0 ? /* @__PURE__ */ e("div", { className: y.skillFileTreeEmpty, children: "暂无文件" }) : Te(et(ae), 0) }),
1785
1785
  /* @__PURE__ */ e("div", { className: y.skillFileContent, children: k ? /* @__PURE__ */ a("div", { className: y.skillFileContentEmpty, children: [
1786
1786
  /* @__PURE__ */ e(ot, { size: "small" }),
1787
1787
  " ",
@@ -1831,8 +1831,8 @@ function si({
1831
1831
  onClose: o,
1832
1832
  onCreated: r
1833
1833
  }) {
1834
- const [s, m] = c(""), [g, N] = c([]), [A, S] = c(ri), [F, V] = c([]), [M, v] = c(!1), [T, L] = c(null), [H, z] = c(""), [J, X] = c(!1), [oe, re] = c("");
1835
- j(() => {
1834
+ const [s, m] = c(""), [g, N] = c([]), [A, S] = c(ri), [F, K] = c([]), [M, v] = c(!1), [T, L] = c(null), [U, z] = c(""), [V, Z] = c(!1), [ne, ae] = c("");
1835
+ H(() => {
1836
1836
  let C = !1;
1837
1837
  return xo().then((I) => {
1838
1838
  !C && Array.isArray(I) && I.length > 0 && S(I);
@@ -1841,17 +1841,17 @@ function si({
1841
1841
  C = !0;
1842
1842
  };
1843
1843
  }, []);
1844
- const E = async (C) => {
1844
+ const D = async (C) => {
1845
1845
  if (!C.type.startsWith("image/"))
1846
- return re("仅支持上传图片文件"), !1;
1846
+ return ae("仅支持上传图片文件"), !1;
1847
1847
  if (C.size > 10 * 1024 * 1024)
1848
- return re("图片大小不能超过 10MB"), !1;
1848
+ return ae("图片大小不能超过 10MB"), !1;
1849
1849
  v(!0);
1850
1850
  try {
1851
1851
  const I = await Po(C);
1852
- V((i) => i.includes(I) ? i : [...i, I]);
1852
+ K((i) => i.includes(I) ? i : [...i, I]);
1853
1853
  } catch (I) {
1854
- re(`图片上传失败:${(I == null ? void 0 : I.message) || "未知错误"}`);
1854
+ ae(`图片上传失败:${(I == null ? void 0 : I.message) || "未知错误"}`);
1855
1855
  } finally {
1856
1856
  v(!1);
1857
1857
  }
@@ -1865,26 +1865,26 @@ function si({
1865
1865
  for (let k = 0; k < I.length; k++) {
1866
1866
  const W = I[k];
1867
1867
  if (W.kind === "file" && W.type.startsWith("image/")) {
1868
- const Y = W.getAsFile();
1869
- Y && i.push(Y);
1868
+ const J = W.getAsFile();
1869
+ J && i.push(J);
1870
1870
  }
1871
1871
  }
1872
- i.length && (C.preventDefault(), i.forEach((k) => E(k)));
1872
+ i.length && (C.preventDefault(), i.forEach((k) => D(k)));
1873
1873
  }, _ = async () => {
1874
1874
  const C = s.trim();
1875
1875
  if (!C) {
1876
- re("请填写产品页面地址");
1876
+ ae("请填写产品页面地址");
1877
1877
  return;
1878
1878
  }
1879
- re(""), X(!0);
1879
+ ae(""), Z(!0);
1880
1880
  try {
1881
- const I = H.trim();
1881
+ const I = U.trim();
1882
1882
  let i, b;
1883
1883
  I ? (i = I.length > 40 ? `${I.slice(0, 40)}…` : I, b = I.replace(/[?&#/\\:*"<>|]/g, "-").slice(0, 40) || "HBOS业务咨询") : (i = `HBOS业务咨询-${C.replace(/^https?:\/\//, "").replace(/\/+$/, "").replace(/[?&#/\\:]/g, "-").slice(0, 40) || "未命名"}`, b = i);
1884
1884
  const k = [`HBOS业务咨询:${C}`];
1885
1885
  g.length && k.push(`业务域:${g.join("、")}`), I && k.push(`问题描述:${I}`);
1886
1886
  const W = k.join(`
1887
- `), Y = await $o({
1887
+ `), J = await $o({
1888
1888
  name: i,
1889
1889
  description: W,
1890
1890
  workspace_path: b,
@@ -1897,9 +1897,9 @@ function si({
1897
1897
  source: t.source
1898
1898
  }
1899
1899
  });
1900
- r(Y.id), X(!1);
1900
+ r(J.id), Z(!1);
1901
1901
  } catch (I) {
1902
- re((I == null ? void 0 : I.message) || "创建失败,请重试"), X(!1);
1902
+ ae((I == null ? void 0 : I.message) || "创建失败,请重试"), Z(!1);
1903
1903
  }
1904
1904
  };
1905
1905
  return /* @__PURE__ */ a(
@@ -1925,7 +1925,7 @@ function si({
1925
1925
  {
1926
1926
  rows: 4,
1927
1927
  placeholder: "请输入想咨询的业务问题,如:这个页面上的 XX 功能是怎么实现的?(支持 Ctrl+V 粘贴图片)",
1928
- value: H,
1928
+ value: U,
1929
1929
  onChange: (C) => z(C.target.value),
1930
1930
  onPaste: f
1931
1931
  }
@@ -1962,7 +1962,7 @@ function si({
1962
1962
  "a",
1963
1963
  {
1964
1964
  onClick: (i) => {
1965
- i.stopPropagation(), V(
1965
+ i.stopPropagation(), K(
1966
1966
  (b) => b.filter((k, W) => W !== I)
1967
1967
  );
1968
1968
  },
@@ -1994,7 +1994,7 @@ function si({
1994
1994
  onChange: (C) => N(C)
1995
1995
  }
1996
1996
  ) }),
1997
- oe && /* @__PURE__ */ e("div", { style: { color: "#ff4d4f", marginBottom: 12, fontSize: 13 }, children: oe }),
1997
+ ne && /* @__PURE__ */ e("div", { style: { color: "#ff4d4f", marginBottom: 12, fontSize: 13 }, children: ne }),
1998
1998
  /* @__PURE__ */ a("div", { style: { display: "flex", justifyContent: "flex-end", gap: 8 }, children: [
1999
1999
  /* @__PURE__ */ e(ft, { onClick: o, children: "取消" }),
2000
2000
  /* @__PURE__ */ e(
@@ -2002,8 +2002,8 @@ function si({
2002
2002
  {
2003
2003
  type: "primary",
2004
2004
  onClick: _,
2005
- disabled: J || M,
2006
- children: J ? /* @__PURE__ */ e(ot, { size: "small" }) : "创建并开始咨询"
2005
+ disabled: V || M,
2006
+ children: V ? /* @__PURE__ */ e(ot, { size: "small" }) : "创建并开始咨询"
2007
2007
  }
2008
2008
  )
2009
2009
  ] })
@@ -2100,21 +2100,21 @@ function ci({
2100
2100
  onClose: o,
2101
2101
  onCreated: r
2102
2102
  }) {
2103
- var xe, Ue, et;
2104
- const [s, m] = c("link"), [g, N] = c(""), [A, S] = c([]), [F, V] = c(!1), [M, v] = c(), [T, L] = c(""), [H, z] = c([]), [J, X] = c(0), [oe, re] = c(!1), [E, f] = c(1), [_, C] = c(10), [I, i] = c(
2103
+ var we, Ue, et;
2104
+ const [s, m] = c("link"), [g, N] = c(""), [A, S] = c([]), [F, K] = c(!1), [M, v] = c(), [T, L] = c(""), [U, z] = c([]), [V, Z] = c(0), [ne, ae] = c(!1), [D, f] = c(1), [_, C] = c(10), [I, i] = c(
2105
2105
  null
2106
- ), [b, k] = c(!1), [W, Y] = c(""), [pe, p] = c(""), [R, h] = c(!1), [O, Se] = c(
2106
+ ), [b, k] = c(!1), [W, J] = c(""), [pe, p] = c(""), [R, h] = c(!1), [j, Ce] = c(
2107
2107
  null
2108
2108
  );
2109
- j(() => {
2110
- V(!0), na().then((P) => {
2109
+ H(() => {
2110
+ K(!0), na().then((P) => {
2111
2111
  S(P || []), P && P.length > 0 && !M && v(String(P[0].id));
2112
- }).catch((P) => Y(P.message || "加载项目空间失败")).finally(() => V(!1));
2113
- }, []), j(() => {
2112
+ }).catch((P) => J(P.message || "加载项目空间失败")).finally(() => K(!1));
2113
+ }, []), H(() => {
2114
2114
  f(1), i(null);
2115
- }, [M, T]), j(() => {
2115
+ }, [M, T]), H(() => {
2116
2116
  const P = g.trim();
2117
- p(""), Se(null);
2117
+ p(""), Ce(null);
2118
2118
  const ce = zn(P), _e = ce ? null : rn(P);
2119
2119
  if (!ce && !_e)
2120
2120
  return;
@@ -2122,16 +2122,16 @@ function ci({
2122
2122
  const Ge = setTimeout(() => {
2123
2123
  h(!0), (async () => {
2124
2124
  try {
2125
- let Ie = _e;
2126
- if (!Ie && ce) {
2125
+ let Te = _e;
2126
+ if (!Te && ce) {
2127
2127
  const ct = await Pn(ce);
2128
- Ie = rn(ct);
2128
+ Te = rn(ct);
2129
2129
  }
2130
- if (!Ie || de) return;
2131
- const me = await An(Ie);
2132
- de || (p(me.title || ""), Se(me));
2130
+ if (!Te || de) return;
2131
+ const me = await An(Te);
2132
+ de || (p(me.title || ""), Ce(me));
2133
2133
  } catch {
2134
- de || (p(""), Se(null));
2134
+ de || (p(""), Ce(null));
2135
2135
  } finally {
2136
2136
  de || h(!1);
2137
2137
  }
@@ -2140,30 +2140,30 @@ function ci({
2140
2140
  return () => {
2141
2141
  de = !0, clearTimeout(Ge);
2142
2142
  };
2143
- }, [g]), j(() => {
2143
+ }, [g]), H(() => {
2144
2144
  p((I == null ? void 0 : I.title) || "");
2145
2145
  }, [I]);
2146
- const Ce = q(async () => {
2146
+ const Ie = q(async () => {
2147
2147
  if (M) {
2148
- re(!0), Y("");
2148
+ ae(!0), J("");
2149
2149
  try {
2150
2150
  const P = await oa(
2151
2151
  M,
2152
2152
  T,
2153
- E,
2153
+ D,
2154
2154
  _
2155
2155
  );
2156
- z(P.records || []), X(P.total || 0);
2156
+ z(P.records || []), Z(P.total || 0);
2157
2157
  } catch (P) {
2158
- z([]), X(0), Y(P.message || "查询工单列表失败");
2158
+ z([]), Z(0), J(P.message || "查询工单列表失败");
2159
2159
  } finally {
2160
- re(!1);
2160
+ ae(!1);
2161
2161
  }
2162
2162
  }
2163
- }, [M, T, E, _]);
2164
- j(() => {
2165
- s === "picker" && Ce();
2166
- }, [s, Ce]);
2163
+ }, [M, T, D, _]);
2164
+ H(() => {
2165
+ s === "picker" && Ie();
2166
+ }, [s, Ie]);
2167
2167
  const ge = Re(
2168
2168
  () => [
2169
2169
  {
@@ -2205,7 +2205,7 @@ function ci({
2205
2205
  }
2206
2206
  ],
2207
2207
  []
2208
- ), ae = Re(
2208
+ ), oe = Re(
2209
2209
  () => ({
2210
2210
  type: "radio",
2211
2211
  selectedRowKeys: I ? [I.id] : [],
@@ -2218,81 +2218,81 @@ function ci({
2218
2218
  async (P, ce, _e) => {
2219
2219
  var de;
2220
2220
  if (!P) {
2221
- Y("未选择有效的工单");
2221
+ J("未选择有效的工单");
2222
2222
  return;
2223
2223
  }
2224
- Y(""), k(!0);
2224
+ J(""), k(!0);
2225
2225
  try {
2226
2226
  const Ge = await aa(P);
2227
2227
  if (Ge != null) {
2228
2228
  r(Dt(Ge));
2229
2229
  return;
2230
2230
  }
2231
- const Ie = `Fone工单排查-${P}`, me = pe.trim() || Ie, ct = {
2231
+ const Te = `Fone工单排查-${P}`, me = pe.trim() || Te, ct = {
2232
2232
  1: "CD",
2233
2233
  2: "CM",
2234
2234
  3: "CP",
2235
2235
  4: "PD",
2236
2236
  10: "SOP"
2237
- }, B = _e ? {
2237
+ }, O = _e ? {
2238
2238
  foneIteamType: _e.workitemClassify || "",
2239
2239
  // 改用大类型(需求/任务/缺陷/故障/事件)
2240
2240
  foneIteamSpaceId: _e.projectCode || String(_e.projectId || ""),
2241
2241
  foneIteamSpaceType: _e.projectType ? ct[_e.projectType] || String(_e.projectType) : "",
2242
2242
  foneIteamSpaceName: _e.projectName || ""
2243
2243
  // 新增:空间名称
2244
- } : void 0, Z = await (await fetch("/kapi/z-team/api/scenario-instances/", {
2244
+ } : void 0, Q = await (await fetch("/kapi/z-team/api/scenario-instances/", {
2245
2245
  method: "POST",
2246
2246
  credentials: "include",
2247
2247
  headers: { Accept: "application/json", "Content-Type": "application/json" },
2248
2248
  body: JSON.stringify({
2249
2249
  name: me,
2250
2250
  description: ce ? `工单排查:${ce}` : `工单排查:workItemId=${P}`,
2251
- workspace_path: Ie,
2251
+ workspace_path: Te,
2252
2252
  scenario_code: t.scenarioCode,
2253
2253
  extend_params: {
2254
2254
  [t.inputConfig.paramKey]: t.inputConfig.paramKey === "work_item_id" ? P : ce || Gn(P),
2255
2255
  work_item_id: P,
2256
2256
  source: t.source
2257
2257
  },
2258
- tags: B
2258
+ tags: O
2259
2259
  })
2260
2260
  })).json();
2261
- Z.success && ((de = Z.data) != null && de.id) ? r(Z.data.id) : (Y(Z.message || "创建失败,请重试"), k(!1));
2261
+ Q.success && ((de = Q.data) != null && de.id) ? r(Q.data.id) : (J(Q.message || "创建失败,请重试"), k(!1));
2262
2262
  } catch {
2263
- Y("网络错误,请检查服务是否可用"), k(!1);
2263
+ J("网络错误,请检查服务是否可用"), k(!1);
2264
2264
  }
2265
2265
  },
2266
2266
  [t, r, pe]
2267
- ), K = q(async () => {
2267
+ ), ee = q(async () => {
2268
2268
  var ce;
2269
2269
  const P = g.trim();
2270
2270
  if ((ce = t.inputConfig) != null && ce.required && !P) {
2271
- Y("请输入故障单链接地址");
2271
+ J("请输入故障单链接地址");
2272
2272
  return;
2273
2273
  }
2274
- Y(""), k(!0);
2274
+ J(""), k(!0);
2275
2275
  try {
2276
2276
  const _e = zn(P);
2277
2277
  let de, Ge;
2278
2278
  if (_e) {
2279
- const Ie = await Pn(_e);
2280
- de = rn(Ie), Ge = Ie;
2279
+ const Te = await Pn(_e);
2280
+ de = rn(Te), Ge = Te;
2281
2281
  } else
2282
2282
  de = rn(P), Ge = ii(P) || P;
2283
2283
  if (!de) {
2284
- Y(
2284
+ J(
2285
2285
  _e ? "短链解析结果中无法识别 workItemId,请改用工单详情页长链接" : "无法从链接中识别 workItemId,请检查链接是否包含 workItemId 参数"
2286
2286
  ), k(!1);
2287
2287
  return;
2288
2288
  }
2289
- await x(de, Ge, O);
2289
+ await x(de, Ge, j);
2290
2290
  } catch (_e) {
2291
- Y((_e == null ? void 0 : _e.message) || "链接解析失败,请重试"), k(!1);
2291
+ J((_e == null ? void 0 : _e.message) || "链接解析失败,请重试"), k(!1);
2292
2292
  }
2293
- }, [g, t, x, O]), ne = q(async () => {
2293
+ }, [g, t, x, j]), re = q(async () => {
2294
2294
  if (!I) {
2295
- Y("请先从列表中选择一条工单");
2295
+ J("请先从列表中选择一条工单");
2296
2296
  return;
2297
2297
  }
2298
2298
  const P = String(I.id), ce = Gn(
@@ -2308,9 +2308,9 @@ function ci({
2308
2308
  );
2309
2309
  }
2310
2310
  await x(P, ce, _e);
2311
- }, [I, M, x]), U = q(() => {
2312
- s === "link" ? K() : ne();
2313
- }, [s, K, ne]), ye = /* @__PURE__ */ a(
2311
+ }, [I, M, x]), B = q(() => {
2312
+ s === "link" ? ee() : re();
2313
+ }, [s, ee, re]), ye = /* @__PURE__ */ a(
2314
2314
  "div",
2315
2315
  {
2316
2316
  style: {
@@ -2328,7 +2328,7 @@ function ci({
2328
2328
  ] }) : /* @__PURE__ */ e("span", {}),
2329
2329
  /* @__PURE__ */ a("div", { style: { display: "flex", gap: 8 }, children: [
2330
2330
  /* @__PURE__ */ e(ft, { onClick: o, children: "取消" }),
2331
- /* @__PURE__ */ e(ft, { type: "primary", loading: b, onClick: U, children: "确认并开始分析" })
2331
+ /* @__PURE__ */ e(ft, { type: "primary", loading: b, onClick: B, children: "确认并开始分析" })
2332
2332
  ] })
2333
2333
  ]
2334
2334
  }
@@ -2351,7 +2351,7 @@ function ci({
2351
2351
  {
2352
2352
  activeKey: s,
2353
2353
  onChange: (P) => {
2354
- m(P), Y(""), p("");
2354
+ m(P), J(""), p("");
2355
2355
  },
2356
2356
  items: [
2357
2357
  {
@@ -2362,7 +2362,7 @@ function ci({
2362
2362
  ] }),
2363
2363
  children: /* @__PURE__ */ a("div", { children: [
2364
2364
  /* @__PURE__ */ e("div", { style: { marginBottom: 8 }, children: /* @__PURE__ */ a("label", { style: { fontWeight: 500, fontSize: 13 }, children: [
2365
- (xe = t.inputConfig) == null ? void 0 : xe.label,
2365
+ (we = t.inputConfig) == null ? void 0 : we.label,
2366
2366
  ((Ue = t.inputConfig) == null ? void 0 : Ue.required) && /* @__PURE__ */ e("span", { style: { color: "#ff4d4f", marginLeft: 4 }, children: "*" })
2367
2367
  ] }) }),
2368
2368
  /* @__PURE__ */ e(
@@ -2371,10 +2371,10 @@ function ci({
2371
2371
  value: g,
2372
2372
  placeholder: (et = t.inputConfig) == null ? void 0 : et.placeholder,
2373
2373
  onChange: (P) => {
2374
- N(P.target.value), W && Y("");
2374
+ N(P.target.value), W && J("");
2375
2375
  },
2376
2376
  onKeyDown: (P) => {
2377
- P.key === "Enter" && !P.shiftKey && (P.preventDefault(), K());
2377
+ P.key === "Enter" && !P.shiftKey && (P.preventDefault(), ee());
2378
2378
  },
2379
2379
  status: W ? "error" : void 0,
2380
2380
  autoFocus: !0,
@@ -2452,9 +2452,9 @@ function ci({
2452
2452
  type: "primary",
2453
2453
  ghost: !0,
2454
2454
  icon: /* @__PURE__ */ e(cn, {}),
2455
- loading: oe,
2455
+ loading: ne,
2456
2456
  onClick: () => {
2457
- f(1), Ce();
2457
+ f(1), Ie();
2458
2458
  },
2459
2459
  children: "查询"
2460
2460
  }
@@ -2462,17 +2462,17 @@ function ci({
2462
2462
  ]
2463
2463
  }
2464
2464
  ),
2465
- /* @__PURE__ */ e(ot, { spinning: oe, children: /* @__PURE__ */ e(
2465
+ /* @__PURE__ */ e(ot, { spinning: ne, children: /* @__PURE__ */ e(
2466
2466
  Oa,
2467
2467
  {
2468
- rows: H,
2468
+ rows: U,
2469
2469
  rowKey: "id",
2470
2470
  columns: ge,
2471
- rowSelection: ae,
2471
+ rowSelection: oe,
2472
2472
  pagination: {
2473
- current: E,
2473
+ current: D,
2474
2474
  pageSize: _,
2475
- total: J,
2475
+ total: V,
2476
2476
  showSizeChanger: !0,
2477
2477
  pageSizeOptions: ["10", "20", "50", "100"],
2478
2478
  showTotal: (P) => `共 ${P} 条`,
@@ -2632,13 +2632,13 @@ function Ji({
2632
2632
  onProjectCreated: o,
2633
2633
  presetScenarioCode: r
2634
2634
  }) {
2635
- const { createScenarioInstance: s, sendChatMessage: m, token: g } = D(), [N, A] = c([]), [S, F] = c(""), [V, M] = c(!0), [v, T] = c(""), [L, H] = c(""), [z, J] = c(!1);
2636
- j(() => {
2637
- let E = !1;
2635
+ const { createScenarioInstance: s, sendChatMessage: m, token: g } = E(), [N, A] = c([]), [S, F] = c(""), [K, M] = c(!0), [v, T] = c(""), [L, U] = c(""), [z, V] = c(!1);
2636
+ H(() => {
2637
+ let D = !1;
2638
2638
  return (async () => {
2639
2639
  try {
2640
2640
  const f = await to(g || "");
2641
- if (E) return;
2641
+ if (D) return;
2642
2642
  const _ = Array.isArray(f) ? f : [];
2643
2643
  if (_.length === 0) {
2644
2644
  T(
@@ -2650,31 +2650,31 @@ function Ji({
2650
2650
  const C = (r || "").trim(), i = (C ? _.find((b) => b.code === C) : null) || Vi(_);
2651
2651
  i && F(i.code);
2652
2652
  } catch (f) {
2653
- E || (A([]), T(f instanceof Error ? f.message : "加载场景失败"));
2653
+ D || (A([]), T(f instanceof Error ? f.message : "加载场景失败"));
2654
2654
  } finally {
2655
- E || M(!1);
2655
+ D || M(!1);
2656
2656
  }
2657
2657
  })(), () => {
2658
- E = !0;
2658
+ D = !0;
2659
2659
  };
2660
2660
  }, [g, r]);
2661
- const X = Re(
2662
- () => N.find((E) => E.code === S),
2661
+ const Z = Re(
2662
+ () => N.find((D) => D.code === S),
2663
2663
  [N, S]
2664
- ), oe = async () => {
2665
- const E = L.trim();
2666
- if (!(!E || !S.trim() || z)) {
2667
- J(!0);
2664
+ ), ne = async () => {
2665
+ const D = L.trim();
2666
+ if (!(!D || !S.trim() || z)) {
2667
+ V(!0);
2668
2668
  try {
2669
- const f = E.slice(0, 30) || "新建对话";
2670
- await s(f, E, S.trim()), await m(E), t();
2669
+ const f = D.slice(0, 30) || "新建对话";
2670
+ await s(f, D, S.trim()), await m(D), t();
2671
2671
  } catch (f) {
2672
2672
  console.error("新建2 创建失败", f);
2673
2673
  } finally {
2674
- J(!1);
2674
+ V(!1);
2675
2675
  }
2676
2676
  }
2677
- }, re = L.trim().length > 0 && S.trim().length > 0 && !v && !z;
2677
+ }, ae = L.trim().length > 0 && S.trim().length > 0 && !v && !z;
2678
2678
  return /* @__PURE__ */ a("div", { className: Ee.landing, children: [
2679
2679
  /* @__PURE__ */ a("div", { className: Ee.scrollArea, children: [
2680
2680
  /* @__PURE__ */ a("div", { className: Ee.header, children: [
@@ -2685,7 +2685,7 @@ function Ji({
2685
2685
  "Z-Team"
2686
2686
  ] }),
2687
2687
  /* @__PURE__ */ e("span", { className: Ee.contextDivider, children: "·" }),
2688
- /* @__PURE__ */ e("span", { className: Ee.contextItem, children: (X == null ? void 0 : X.name) || "全场景总控" }),
2688
+ /* @__PURE__ */ e("span", { className: Ee.contextItem, children: (Z == null ? void 0 : Z.name) || "全场景总控" }),
2689
2689
  v ? /* @__PURE__ */ e("span", { className: Ee.contextError, children: v }) : null
2690
2690
  ] })
2691
2691
  ] }),
@@ -2705,9 +2705,9 @@ function Ji({
2705
2705
  rows: 4,
2706
2706
  placeholder: "规划与编程,@ 添加上下文,/ 使用命令",
2707
2707
  value: L,
2708
- onChange: (E) => H(E.target.value),
2709
- onKeyDown: (E) => {
2710
- E.key === "Enter" && !E.shiftKey && (E.preventDefault(), oe());
2708
+ onChange: (D) => U(D.target.value),
2709
+ onKeyDown: (D) => {
2710
+ D.key === "Enter" && !D.shiftKey && (D.preventDefault(), ne());
2711
2711
  },
2712
2712
  autoFocus: !0,
2713
2713
  disabled: z
@@ -2720,21 +2720,21 @@ function Ji({
2720
2720
  {
2721
2721
  className: Ee.scenarioSelect,
2722
2722
  value: S,
2723
- onChange: (E) => F(E.target.value),
2724
- disabled: V || N.length === 0,
2723
+ onChange: (D) => F(D.target.value),
2724
+ disabled: K || N.length === 0,
2725
2725
  children: [
2726
- /* @__PURE__ */ e("option", { value: "", children: V ? "加载场景…" : "请选择场景" }),
2727
- N.map((E) => /* @__PURE__ */ e("option", { value: E.code, children: E.name }, E.code))
2726
+ /* @__PURE__ */ e("option", { value: "", children: K ? "加载场景…" : "请选择场景" }),
2727
+ N.map((D) => /* @__PURE__ */ e("option", { value: D.code, children: D.name }, D.code))
2728
2728
  ]
2729
2729
  }
2730
2730
  ),
2731
- X != null && X.description ? /* @__PURE__ */ e(
2731
+ Z != null && Z.description ? /* @__PURE__ */ e(
2732
2732
  qt,
2733
2733
  {
2734
- title: X.description,
2734
+ title: Z.description,
2735
2735
  placement: "topLeft",
2736
2736
  overlayClassName: Ee.hintTooltip,
2737
- children: /* @__PURE__ */ e("span", { className: Ee.scenarioHint, children: X.description })
2737
+ children: /* @__PURE__ */ e("span", { className: Ee.scenarioHint, children: Z.description })
2738
2738
  }
2739
2739
  ) : null
2740
2740
  ] }),
@@ -2743,8 +2743,8 @@ function Ji({
2743
2743
  {
2744
2744
  type: "button",
2745
2745
  className: Ee.sendBtn,
2746
- onClick: () => void oe(),
2747
- disabled: !re,
2746
+ onClick: () => void ne(),
2747
+ disabled: !ae,
2748
2748
  children: z ? "创建中…" : "发送"
2749
2749
  }
2750
2750
  )
@@ -2774,38 +2774,38 @@ const Yi = "_bellBtn_zkdkx_2", Qi = "_badge_zkdkx_25", Zi = "_overlay_zkdkx_44",
2774
2774
  itemResult: hc
2775
2775
  };
2776
2776
  function fc() {
2777
- const t = D((L) => L.token), [o, r] = c([]), [s, m] = c(0), [g, N] = c(!1), A = le(null), [S, F] = c({ top: 0, right: 0 }), V = q(async () => {
2777
+ const t = E((L) => L.token), [o, r] = c([]), [s, m] = c(0), [g, N] = c(!1), A = le(null), [S, F] = c({ top: 0, right: 0 }), K = q(async () => {
2778
2778
  try {
2779
2779
  const L = await ja(t, 30);
2780
2780
  r(L.items), m(L.unread);
2781
2781
  } catch {
2782
2782
  }
2783
2783
  }, [t]);
2784
- j(() => {
2785
- V();
2786
- const L = setInterval(V, 3e4);
2784
+ H(() => {
2785
+ K();
2786
+ const L = setInterval(K, 3e4);
2787
2787
  return () => clearInterval(L);
2788
- }, [V]);
2788
+ }, [K]);
2789
2789
  const M = () => {
2790
2790
  const L = !g;
2791
2791
  if (L && A.current) {
2792
- const H = A.current.getBoundingClientRect();
2792
+ const U = A.current.getBoundingClientRect();
2793
2793
  F({
2794
- top: H.bottom + 4,
2795
- right: window.innerWidth - H.right
2796
- }), V();
2794
+ top: U.bottom + 4,
2795
+ right: window.innerWidth - U.right
2796
+ }), K();
2797
2797
  }
2798
2798
  N(L);
2799
2799
  }, v = async (L) => {
2800
2800
  try {
2801
2801
  await Wa(L, t), r(
2802
- (H) => H.map((z) => It(z.id, L) ? { ...z, readFlag: 1 } : z)
2803
- ), m((H) => Math.max(0, H - 1));
2802
+ (U) => U.map((z) => It(z.id, L) ? { ...z, readFlag: 1 } : z)
2803
+ ), m((U) => Math.max(0, U - 1));
2804
2804
  } catch {
2805
2805
  }
2806
2806
  }, T = async () => {
2807
2807
  try {
2808
- await Ha(t), r((L) => L.map((H) => ({ ...H, readFlag: 1 }))), m(0);
2808
+ await Ha(t), r((L) => L.map((U) => ({ ...U, readFlag: 1 }))), m(0);
2809
2809
  } catch {
2810
2810
  }
2811
2811
  };
@@ -2916,16 +2916,16 @@ function wc() {
2916
2916
  Math.abs(T) > kc && (A.current.moved = !0, N(!0)), m(_n(A.current.startTop + T));
2917
2917
  },
2918
2918
  []
2919
- ), V = q(
2919
+ ), K = q(
2920
2920
  (v) => {
2921
2921
  var T, L;
2922
- A.current.active && (A.current.active = !1, (L = (T = v.currentTarget).releasePointerCapture) == null || L.call(T, v.pointerId), A.current.moved && m((H) => (localStorage.setItem(Kn, String(H)), H)), N(!1));
2922
+ A.current.active && (A.current.active = !1, (L = (T = v.currentTarget).releasePointerCapture) == null || L.call(T, v.pointerId), A.current.moved && m((U) => (localStorage.setItem(Kn, String(U)), U)), N(!1));
2923
2923
  },
2924
2924
  []
2925
2925
  ), M = q(() => {
2926
2926
  A.current.moved || r(!0);
2927
2927
  }, []);
2928
- return j(() => {
2928
+ return H(() => {
2929
2929
  const v = () => m((T) => _n(T));
2930
2930
  return window.addEventListener("resize", v), () => window.removeEventListener("resize", v);
2931
2931
  }, []), t ? /* @__PURE__ */ a(vt, { children: [
@@ -2943,7 +2943,7 @@ function wc() {
2943
2943
  "data-dragging": g ? "" : void 0,
2944
2944
  onPointerDown: S,
2945
2945
  onPointerMove: F,
2946
- onPointerUp: V,
2946
+ onPointerUp: K,
2947
2947
  onClick: M,
2948
2948
  "aria-label": "自身答疑",
2949
2949
  children: /* @__PURE__ */ e(io, {})
@@ -2966,8 +2966,8 @@ function Nc({
2966
2966
  value: r,
2967
2967
  onChange: s
2968
2968
  }) {
2969
- const [m, g] = c(!1), [N, A] = c(""), [S, F] = c(""), [V, M] = c(!1), v = le(null);
2970
- j(() => {
2969
+ const [m, g] = c(!1), [N, A] = c(""), [S, F] = c(""), [K, M] = c(!1), v = le(null);
2970
+ H(() => {
2971
2971
  if (!m) return;
2972
2972
  A(""), F(""), M(!1);
2973
2973
  const f = setTimeout(() => {
@@ -2975,7 +2975,7 @@ function Nc({
2975
2975
  return (_ = v.current) == null ? void 0 : _.focus();
2976
2976
  }, 0);
2977
2977
  return () => clearTimeout(f);
2978
- }, [m]), j(() => {
2978
+ }, [m]), H(() => {
2979
2979
  if (N === S) return;
2980
2980
  M(!0);
2981
2981
  const f = setTimeout(() => {
@@ -2997,7 +2997,7 @@ function Nc({
2997
2997
  for (const I of C) f.set(I, _);
2998
2998
  }
2999
2999
  return f;
3000
- }, [t]), H = Re(() => {
3000
+ }, [t]), U = Re(() => {
3001
3001
  const f = /* @__PURE__ */ new Set();
3002
3002
  for (const _ of r) {
3003
3003
  f.add(_);
@@ -3019,7 +3019,7 @@ function Nc({
3019
3019
  },
3020
3020
  [L]
3021
3021
  );
3022
- const J = q(
3022
+ const V = q(
3023
3023
  (f) => {
3024
3024
  const _ = f.trim().toLowerCase();
3025
3025
  return _ ? t.filter(
@@ -3029,13 +3029,13 @@ function Nc({
3029
3029
  ) : t;
3030
3030
  },
3031
3031
  [t]
3032
- ), X = Re(
3033
- () => J(S),
3034
- [J, S]
3035
- ), oe = q(
3032
+ ), Z = Re(
3033
+ () => V(S),
3034
+ [V, S]
3035
+ ), ne = q(
3036
3036
  (f) => {
3037
3037
  const _ = T(f);
3038
- if (H.has(_)) {
3038
+ if (U.has(_)) {
3039
3039
  const C = new Set(
3040
3040
  [
3041
3041
  f.staffId != null ? String(f.staffId) : "",
@@ -3047,11 +3047,11 @@ function Nc({
3047
3047
  } else
3048
3048
  s([...r, _]);
3049
3049
  },
3050
- [r, s, T, H]
3051
- ), re = q(
3050
+ [r, s, T, U]
3051
+ ), ae = q(
3052
3052
  (f) => s(r.filter((_) => _ !== f)),
3053
3053
  [r, s]
3054
- ), E = Re(
3054
+ ), D = Re(
3055
3055
  () => r.map(z).join("、"),
3056
3056
  [r, z]
3057
3057
  );
@@ -3061,7 +3061,7 @@ function Nc({
3061
3061
  {
3062
3062
  type: "button",
3063
3063
  className: `${d.iconChip} ${d.iconChipWithLabel} ${r.length > 0 ? d.iconChipActive : ""}`,
3064
- title: E || "参与人",
3064
+ title: D || "参与人",
3065
3065
  onClick: () => g((f) => !f),
3066
3066
  children: [
3067
3067
  r.length > 0 && /* @__PURE__ */ e("span", { className: d.iconChipOrder, children: r.length }),
@@ -3116,13 +3116,13 @@ function Nc({
3116
3116
  onChange: (f) => A(f.target.value),
3117
3117
  onKeyDown: (f) => {
3118
3118
  if (f.key === "Enter") {
3119
- const _ = J(N);
3120
- F(N), M(!1), _.length > 0 && oe(_[0]);
3119
+ const _ = V(N);
3120
+ F(N), M(!1), _.length > 0 && ne(_[0]);
3121
3121
  }
3122
3122
  }
3123
3123
  }
3124
3124
  ),
3125
- /* @__PURE__ */ e("span", { className: d.participantSearchIcon, children: V ? /* @__PURE__ */ e("span", { className: d.participantSearchSpinner }) : /* @__PURE__ */ a(
3125
+ /* @__PURE__ */ e("span", { className: d.participantSearchIcon, children: K ? /* @__PURE__ */ e("span", { className: d.participantSearchSpinner }) : /* @__PURE__ */ a(
3126
3126
  "svg",
3127
3127
  {
3128
3128
  width: "12",
@@ -3139,18 +3139,18 @@ function Nc({
3139
3139
  }
3140
3140
  ) })
3141
3141
  ] }) }),
3142
- /* @__PURE__ */ e("div", { className: d.participantColHeader, children: /* @__PURE__ */ e("span", { children: V ? "查询中…" : `全部成员 (${X.length})` }) }),
3142
+ /* @__PURE__ */ e("div", { className: d.participantColHeader, children: /* @__PURE__ */ e("span", { children: K ? "查询中…" : `全部成员 (${Z.length})` }) }),
3143
3143
  /* @__PURE__ */ e(
3144
3144
  "div",
3145
3145
  {
3146
- className: `${d.participantList} ${V ? d.participantListSearching : ""}`,
3147
- children: o ? /* @__PURE__ */ e("div", { className: d.participantEmpty, children: "加载中…" }) : X.length === 0 ? /* @__PURE__ */ e("div", { className: d.participantEmpty, children: "未找到匹配成员" }) : X.map((f) => {
3148
- const _ = T(f), C = H.has(_);
3146
+ className: `${d.participantList} ${K ? d.participantListSearching : ""}`,
3147
+ children: o ? /* @__PURE__ */ e("div", { className: d.participantEmpty, children: "加载中…" }) : Z.length === 0 ? /* @__PURE__ */ e("div", { className: d.participantEmpty, children: "未找到匹配成员" }) : Z.map((f) => {
3148
+ const _ = T(f), C = U.has(_);
3149
3149
  return /* @__PURE__ */ a(
3150
3150
  "div",
3151
3151
  {
3152
3152
  className: `${d.participantItem} ${C ? d.participantItemChecked : ""}`,
3153
- onClick: () => oe(f),
3153
+ onClick: () => ne(f),
3154
3154
  children: [
3155
3155
  /* @__PURE__ */ e("span", { className: d.participantItemName, children: f.name || f.accountNo }),
3156
3156
  /* @__PURE__ */ e("span", { className: d.participantItemAccount, children: f.accountNo }),
@@ -3186,7 +3186,7 @@ function Nc({
3186
3186
  {
3187
3187
  className: d.participantRemoveBtn,
3188
3188
  title: "移除",
3189
- onClick: () => re(f),
3189
+ onClick: () => ae(f),
3190
3190
  children: /* @__PURE__ */ e(Ft, {})
3191
3191
  }
3192
3192
  )
@@ -3198,7 +3198,7 @@ function Nc({
3198
3198
  ] })
3199
3199
  ] });
3200
3200
  }
3201
- const Q = {
3201
+ const Y = {
3202
3202
  folder: /* @__PURE__ */ e(
3203
3203
  "svg",
3204
3204
  {
@@ -3722,10 +3722,10 @@ function Ic({
3722
3722
  members: A,
3723
3723
  fileTreeVersion: S,
3724
3724
  allSkills: F,
3725
- skills: V,
3725
+ skills: K,
3726
3726
  isLocal: M,
3727
3727
  projectsLoading: v
3728
- } = D(
3728
+ } = E(
3729
3729
  mn((n) => ({
3730
3730
  currentUser: n.currentUser,
3731
3731
  currentProject: n.currentProject,
@@ -3740,10 +3740,10 @@ function Ic({
3740
3740
  // 项目列表网络加载中(时间过滤切换触发 loadProjects 重查)
3741
3741
  projectsLoading: n.loading
3742
3742
  }))
3743
- ), T = D((n) => n.selectFile), L = D((n) => n.deleteScenarioInstance), H = D((n) => n.forkScenarioInstance), z = D((n) => n.updateScenarioInstance), J = D((n) => n.renameFile), X = D((n) => n.createFile), oe = D((n) => n.createFolder), re = D((n) => n.deleteFile), E = D((n) => n.uploadFile), f = D((n) => n.uploadFolder), _ = D((n) => n.downloadFile), C = D((n) => n.expandProject), I = D((n) => n.loadAllSkills), i = D((n) => n.addProjectSkill), b = D((n) => n.removeProjectSkill), k = D((n) => n.refreshAgentSkills), W = D((n) => n.refreshAllAgentSkills), Y = D((n) => n.syncFromProduction), pe = D((n) => n.fetchWorkspaceEnv), p = D((n) => n.loadFileTree), R = D((n) => n.loadProjects), h = Re(
3743
+ ), T = E((n) => n.selectFile), L = E((n) => n.deleteScenarioInstance), U = E((n) => n.forkScenarioInstance), z = E((n) => n.updateScenarioInstance), V = E((n) => n.renameFile), Z = E((n) => n.createFile), ne = E((n) => n.createFolder), ae = E((n) => n.deleteFile), D = E((n) => n.uploadFile), f = E((n) => n.uploadFolder), _ = E((n) => n.downloadFile), C = E((n) => n.expandProject), I = E((n) => n.loadAllSkills), i = E((n) => n.addProjectSkill), b = E((n) => n.removeProjectSkill), k = E((n) => n.refreshAgentSkills), W = E((n) => n.refreshAllAgentSkills), J = E((n) => n.syncFromProduction), pe = E((n) => n.fetchWorkspaceEnv), p = E((n) => n.loadFileTree), R = E((n) => n.loadProjects), h = Re(
3744
3744
  () => Ma(r),
3745
3745
  [r]
3746
- ), [O, Se] = c(null), [Ce, ge] = c({ x: 0, y: 0 }), [ae, x] = c(!1), K = le(null), ne = le(null), [U, ye] = c(null), [xe, Ue] = c(!1), [et, P] = c({}), [ce, _e] = c(
3746
+ ), [j, Ce] = c(null), [Ie, ge] = c({ x: 0, y: 0 }), [oe, x] = c(!1), ee = le(null), re = le(null), [B, ye] = c(null), [we, Ue] = c(!1), [et, P] = c({}), [ce, _e] = c(
3747
3747
  /* @__PURE__ */ new Set()
3748
3748
  ), [de, Ge] = c(() => {
3749
3749
  try {
@@ -3752,15 +3752,15 @@ function Ic({
3752
3752
  } catch {
3753
3753
  return [];
3754
3754
  }
3755
- }), [Ie, me] = c(Cc), [ct, B] = c(
3755
+ }), [Te, me] = c(Cc), [ct, O] = c(
3756
3756
  /* @__PURE__ */ new Set()
3757
- ), [se, Z] = c(() => {
3757
+ ), [se, Q] = c(() => {
3758
3758
  try {
3759
3759
  return localStorage.getItem("ft_sidebar_time_filter") || "3d";
3760
3760
  } catch {
3761
3761
  return "3d";
3762
3762
  }
3763
- }), [Ae, $e] = c(!1), [te, Me] = c(""), [qe, we] = c(null), tt = le(null), rt = le({ active: !1, startX: 0, startVal: 0 }), un = q(
3763
+ }), [Ae, $e] = c(!1), [te, Me] = c(""), [qe, Ne] = c(null), tt = le(null), rt = le({ active: !1, startX: 0, startVal: 0 }), un = q(
3764
3764
  (n) => {
3765
3765
  n.preventDefault(), n.stopPropagation();
3766
3766
  const l = tt.current;
@@ -3773,19 +3773,19 @@ function Ic({
3773
3773
  },
3774
3774
  [qe]
3775
3775
  );
3776
- j(() => {
3776
+ H(() => {
3777
3777
  const n = (u) => {
3778
3778
  if (!rt.current.active) return;
3779
- const G = u.clientX - rt.current.startX, ee = Math.max(
3779
+ const G = u.clientX - rt.current.startX, X = Math.max(
3780
3780
  36,
3781
3781
  Math.min(1200, rt.current.startVal + G)
3782
3782
  ), ke = tt.current;
3783
- ke && (ke.style.maxWidth = `${ee}px`);
3783
+ ke && (ke.style.maxWidth = `${X}px`);
3784
3784
  }, l = () => {
3785
3785
  if (!rt.current.active) return;
3786
3786
  rt.current.active = !1, document.body.style.cursor = "", document.body.style.userSelect = "";
3787
3787
  const u = tt.current;
3788
- u && we(
3788
+ u && Ne(
3789
3789
  u.style.maxWidth ? parseInt(u.style.maxWidth, 10) : null
3790
3790
  );
3791
3791
  };
@@ -3801,11 +3801,11 @@ function Ic({
3801
3801
  return [];
3802
3802
  }
3803
3803
  }), [Lt, gt] = c([]), [Yt, Qt] = c(!1), lt = le(!1);
3804
- j(() => {
3804
+ H(() => {
3805
3805
  pe();
3806
- }, [pe]), j(() => {
3806
+ }, [pe]), H(() => {
3807
3807
  let n = !1;
3808
- return Qt(!0), Ao(void 0, D.getState().token).then((l) => {
3808
+ return Qt(!0), Ao(void 0, E.getState().token).then((l) => {
3809
3809
  n || gt(Array.isArray(l) ? l : []);
3810
3810
  }).catch(() => {
3811
3811
  n || gt([]);
@@ -3814,7 +3814,7 @@ function Ic({
3814
3814
  }), () => {
3815
3815
  n = !0;
3816
3816
  };
3817
- }, []), j(() => {
3817
+ }, []), H(() => {
3818
3818
  if (!lt.current && (r != null && r.username)) {
3819
3819
  if (!localStorage.getItem("ft_sidebar_participant_filter")) {
3820
3820
  const l = r.id != null && Number(r.id) > 0 ? String(r.id) : String(r.username).trim();
@@ -3822,7 +3822,7 @@ function Ic({
3822
3822
  }
3823
3823
  lt.current = !0;
3824
3824
  }
3825
- }, [r]), j(() => {
3825
+ }, [r]), H(() => {
3826
3826
  lt.current && localStorage.setItem(
3827
3827
  "ft_sidebar_participant_filter",
3828
3828
  JSON.stringify(Je)
@@ -3846,7 +3846,7 @@ function Ic({
3846
3846
  },
3847
3847
  [Ot]
3848
3848
  );
3849
- j(() => {
3849
+ H(() => {
3850
3850
  St((n) => {
3851
3851
  let l = !1;
3852
3852
  const u = [];
@@ -3858,11 +3858,11 @@ function Ic({
3858
3858
  });
3859
3859
  }, [xt]);
3860
3860
  const jt = le(ce);
3861
- jt.current = ce, j(() => {
3861
+ jt.current = ce, H(() => {
3862
3862
  localStorage.setItem("ft_sidebar_groupDims", JSON.stringify(de));
3863
- }, [de]), j(() => {
3864
- localStorage.setItem("ft_sidebar_sortDims", JSON.stringify(Ie));
3865
- }, [Ie]), j(() => {
3863
+ }, [de]), H(() => {
3864
+ localStorage.setItem("ft_sidebar_sortDims", JSON.stringify(Te));
3865
+ }, [Te]), H(() => {
3866
3866
  localStorage.setItem("ft_sidebar_time_filter", se);
3867
3867
  }, [se]);
3868
3868
  const $ = q(() => {
@@ -3877,7 +3877,7 @@ function Ic({
3877
3877
  } else
3878
3878
  R();
3879
3879
  }, [se, r]);
3880
- j(() => {
3880
+ H(() => {
3881
3881
  $();
3882
3882
  }, [$]);
3883
3883
  const ie = q((n) => {
@@ -3895,10 +3895,10 @@ function Ic({
3895
3895
  }
3896
3896
  return l.filter((G) => G.dim !== n);
3897
3897
  });
3898
- }, []), De = se !== "3d" || Je.length > 0 || de.length > 0 || Ie.length > 0, Ye = q(() => {
3899
- Z("3d"), St([]);
3898
+ }, []), De = se !== "3d" || Je.length > 0 || de.length > 0 || Te.length > 0, Ye = q(() => {
3899
+ Q("3d"), St([]);
3900
3900
  }, []);
3901
- j(() => {
3901
+ H(() => {
3902
3902
  if (Ve.current) {
3903
3903
  Ve.current = !1;
3904
3904
  return;
@@ -3906,9 +3906,9 @@ function Ic({
3906
3906
  Jt(!0);
3907
3907
  const n = setTimeout(() => Jt(!1), 300);
3908
3908
  return () => clearTimeout(n);
3909
- }, [de, Ie, Je, se]);
3909
+ }, [de, Te, Je, se]);
3910
3910
  const Ct = v || pn, $t = q((n) => {
3911
- B((l) => {
3911
+ O((l) => {
3912
3912
  const u = new Set(l);
3913
3913
  return u.has(n) ? u.delete(n) : u.add(n), u;
3914
3914
  });
@@ -3920,7 +3920,7 @@ function Ic({
3920
3920
  (ze) => xt(ze).some((nt) => Ze.includes(nt))
3921
3921
  );
3922
3922
  }), l = te.trim().toLowerCase(), G = [...l ? n.filter((he) => (he.name || "").toLowerCase().includes(l)) : n].sort((he, Ze) => {
3923
- for (const { dim: ze, order: nt } of Ie) {
3923
+ for (const { dim: ze, order: nt } of Te) {
3924
3924
  const mt = nt === "asc" ? 1 : -1;
3925
3925
  if (ze === "create_time") {
3926
3926
  const We = on(he.created_at) - on(Ze.created_at);
@@ -3937,7 +3937,7 @@ function Ic({
3937
3937
  });
3938
3938
  if (de.length === 0)
3939
3939
  return [{ key: "__all__", label: "", projects: G }];
3940
- function ee(he, Ze) {
3940
+ function X(he, Ze) {
3941
3941
  switch (Ze) {
3942
3942
  case "scenario":
3943
3943
  return [
@@ -3957,12 +3957,12 @@ function Ic({
3957
3957
  return he.parent_id != null ? ["fork", "Fork"] : ["normal", "正式"];
3958
3958
  }
3959
3959
  }
3960
- const ke = ((je = Ie.find((he) => he.dim === "create_time")) == null ? void 0 : je.order) === "asc";
3960
+ const ke = ((je = Te.find((he) => he.dim === "create_time")) == null ? void 0 : je.order) === "asc";
3961
3961
  function bt(he, Ze, ze) {
3962
3962
  if (Ze.length === 0) return [];
3963
3963
  const [nt, ...mt] = Ze, We = /* @__PURE__ */ new Map();
3964
3964
  for (const ut of he) {
3965
- const [pt, ht] = ee(ut, nt);
3965
+ const [pt, ht] = X(ut, nt);
3966
3966
  We.has(pt) || We.set(pt, { label: ht, items: [] }), We.get(pt).items.push(ut);
3967
3967
  }
3968
3968
  const Xt = [];
@@ -3985,14 +3985,14 @@ function Ic({
3985
3985
  }), Xt;
3986
3986
  }
3987
3987
  return bt(G, de, "");
3988
- }, [m, de, Ie, Je, xt, te]), Pt = Re(
3988
+ }, [m, de, Te, Je, xt, te]), Pt = Re(
3989
3989
  () => {
3990
3990
  var n;
3991
3991
  return de.length === 0 ? ((n = dt[0]) == null ? void 0 : n.projects.length) ?? 0 : dt.reduce((l, u) => l + u.projects.length, 0);
3992
3992
  },
3993
3993
  [dt, de]
3994
3994
  );
3995
- j(() => {
3995
+ H(() => {
3996
3996
  P({}), s && jt.current.forEach((n) => {
3997
3997
  const l = n.indexOf("/");
3998
3998
  if (l > 0) {
@@ -4000,49 +4000,49 @@ function Ic({
4000
4000
  At(u);
4001
4001
  }
4002
4002
  });
4003
- }, [S]), j(() => {
4004
- if (!O) return;
4005
- const n = () => Se(null), l = (u) => {
4006
- u.key === "Escape" && Se(null);
4003
+ }, [S]), H(() => {
4004
+ if (!j) return;
4005
+ const n = () => Ce(null), l = (u) => {
4006
+ u.key === "Escape" && Ce(null);
4007
4007
  };
4008
4008
  return setTimeout(() => {
4009
4009
  document.addEventListener("click", n), document.addEventListener("keydown", l);
4010
4010
  }, 0), () => {
4011
4011
  document.removeEventListener("click", n), document.removeEventListener("keydown", l);
4012
4012
  };
4013
- }, [O]), oo(() => {
4013
+ }, [j]), oo(() => {
4014
4014
  var je;
4015
- if (!O) {
4015
+ if (!j) {
4016
4016
  x(!1);
4017
4017
  return;
4018
4018
  }
4019
- const n = ne.current;
4019
+ const n = re.current;
4020
4020
  if (!n) return;
4021
4021
  const { width: l, height: u } = n.getBoundingClientRect(), G = 8;
4022
- let ee = O.initialX, ke = O.initialY;
4023
- O.placement === "bottom-end" && (ee = O.initialX - l);
4024
- const bt = (je = K.current) == null ? void 0 : je.getBoundingClientRect();
4025
- bt ? ee = Math.max(
4022
+ let X = j.initialX, ke = j.initialY;
4023
+ j.placement === "bottom-end" && (X = j.initialX - l);
4024
+ const bt = (je = ee.current) == null ? void 0 : je.getBoundingClientRect();
4025
+ bt ? X = Math.max(
4026
4026
  bt.left + G,
4027
- Math.min(ee, bt.right - l - G)
4028
- ) : ee = Math.max(G, Math.min(ee, window.innerWidth - l - G)), ke = Math.max(G, Math.min(ke, window.innerHeight - u - G)), ge({ x: ee, y: ke }), x(!0);
4029
- }, [O]), j(() => {
4030
- xe && I();
4031
- }, [xe, I]);
4027
+ Math.min(X, bt.right - l - G)
4028
+ ) : X = Math.max(G, Math.min(X, window.innerWidth - l - G)), ke = Math.max(G, Math.min(ke, window.innerHeight - u - G)), ge({ x: X, y: ke }), x(!0);
4029
+ }, [j]), H(() => {
4030
+ we && I();
4031
+ }, [we, I]);
4032
4032
  const kt = q(
4033
4033
  (n, l, u, G = !1) => {
4034
4034
  if (n.preventDefault(), n.stopPropagation(), x(!1), G) {
4035
- const ee = n.currentTarget.getBoundingClientRect();
4036
- Se({
4037
- initialX: ee.right,
4038
- initialY: ee.bottom + 4,
4035
+ const X = n.currentTarget.getBoundingClientRect();
4036
+ Ce({
4037
+ initialX: X.right,
4038
+ initialY: X.bottom + 4,
4039
4039
  placement: "bottom-end",
4040
4040
  targetType: l,
4041
4041
  target: u
4042
4042
  });
4043
4043
  return;
4044
4044
  }
4045
- Se({
4045
+ Ce({
4046
4046
  initialX: n.clientX,
4047
4047
  initialY: n.clientY,
4048
4048
  placement: "pointer",
@@ -4070,14 +4070,14 @@ function Ic({
4070
4070
  ), Zt = q(
4071
4071
  (n, l) => {
4072
4072
  ce.has(n) || At(l), _e((G) => {
4073
- const ee = new Set(G);
4074
- return ee.has(n) ? ee.delete(n) : ee.add(n), ee;
4073
+ const X = new Set(G);
4074
+ return X.has(n) ? X.delete(n) : X.add(n), X;
4075
4075
  });
4076
4076
  },
4077
4077
  [ce, At]
4078
4078
  ), _o = q(
4079
- (n, l, u, G, ee) => {
4080
- const ke = Array.isArray(n) ? n : [], bt = ee ?? 16;
4079
+ (n, l, u, G, X) => {
4080
+ const ke = Array.isArray(n) ? n : [], bt = X ?? 16;
4081
4081
  return ke.map((je) => {
4082
4082
  const he = u ? `${u}/${je.name}` : je.name, Ze = G ? `${G.id}/${he}` : he, ze = G ? `${G.id}/${he}` : he, nt = ce.has(Ze), mt = bt + l * 20;
4083
4083
  return /* @__PURE__ */ a("div", { children: [
@@ -4094,8 +4094,8 @@ function Ic({
4094
4094
  path: he
4095
4095
  }),
4096
4096
  children: [
4097
- je.is_dir && /* @__PURE__ */ e("span", { className: d.treeArrow, children: Q.chevron(nt) }),
4098
- /* @__PURE__ */ e("span", { className: d.fileItemIcon, children: je.is_dir ? Q.folder : Q.file }),
4097
+ je.is_dir && /* @__PURE__ */ e("span", { className: d.treeArrow, children: Y.chevron(nt) }),
4098
+ /* @__PURE__ */ e("span", { className: d.fileItemIcon, children: je.is_dir ? Y.folder : Y.file }),
4099
4099
  /* @__PURE__ */ e("span", { className: d.fileItemName, children: je.name }),
4100
4100
  je.created_by_agent && /* @__PURE__ */ e("span", { className: d.fileItemBadge, children: "AI" }),
4101
4101
  /* @__PURE__ */ e(
@@ -4113,7 +4113,7 @@ function Ic({
4113
4113
  !0
4114
4114
  );
4115
4115
  },
4116
- children: Q.more
4116
+ children: Y.more
4117
4117
  }
4118
4118
  )
4119
4119
  ]
@@ -4124,7 +4124,7 @@ function Ic({
4124
4124
  l + 1,
4125
4125
  he,
4126
4126
  G,
4127
- ee
4127
+ X
4128
4128
  ) : et[ze] ? /* @__PURE__ */ e(
4129
4129
  "div",
4130
4130
  {
@@ -4153,13 +4153,13 @@ function Ic({
4153
4153
  ]
4154
4154
  ), vo = q(
4155
4155
  (n) => {
4156
- if (O && (Se(null), !(Vn.has(n) && !h))) {
4156
+ if (j && (Ce(null), !(Vn.has(n) && !h))) {
4157
4157
  if (n === "add-skill") {
4158
4158
  Ue(!0);
4159
4159
  return;
4160
4160
  }
4161
4161
  if (n === "refresh-agent-skills") {
4162
- const l = O.target;
4162
+ const l = j.target;
4163
4163
  if (!s || !confirm(
4164
4164
  "确定刷新技能?将删除当前智能体所有本地技能,并从 AgentHub-AI 重新拉取覆盖。"
4165
4165
  ))
@@ -4167,8 +4167,8 @@ function Ic({
4167
4167
  k(l.path);
4168
4168
  return;
4169
4169
  }
4170
- if (O.targetType === "project") {
4171
- const l = O.target;
4170
+ if (j.targetType === "project") {
4171
+ const l = j.target;
4172
4172
  if (n === "rename")
4173
4173
  ye({ type: "rename-project", target: l });
4174
4174
  else if (n === "delete")
@@ -4195,42 +4195,42 @@ function Ic({
4195
4195
  const u = document.createElement("input");
4196
4196
  u.type = "file", u.onchange = (G) => {
4197
4197
  var ke;
4198
- const ee = (ke = G.target.files) == null ? void 0 : ke[0];
4199
- ee && E(l.workspace_path, ee);
4198
+ const X = (ke = G.target.files) == null ? void 0 : ke[0];
4199
+ X && D(l.workspace_path, X);
4200
4200
  }, u.click();
4201
4201
  } else if (n === "upload-folder") {
4202
4202
  const u = document.createElement("input");
4203
4203
  u.type = "file", u.webkitdirectory = !0, u.multiple = !0, u.onchange = (G) => {
4204
- const ee = Array.from(
4204
+ const X = Array.from(
4205
4205
  G.target.files || []
4206
4206
  );
4207
- ee.length > 0 && f(l.workspace_path, ee);
4207
+ X.length > 0 && f(l.workspace_path, X);
4208
4208
  }, u.click();
4209
4209
  } else if (n === "download")
4210
- Le("下载整个项目功能开发中...", "info");
4210
+ xe("下载整个项目功能开发中...", "info");
4211
4211
  else if (n === "sync-from-prod")
4212
- Y(l.id);
4212
+ J(l.id);
4213
4213
  else if (n === "refresh-all-skills") {
4214
4214
  if (!confirm(
4215
4215
  "确定刷新本项目下所有智能体的技能?将从 AgentHub-AI 重新拉取覆盖安装,并在群中发出通知。"
4216
4216
  ))
4217
4217
  return;
4218
4218
  W(l.id);
4219
- } else n === "fork-snapshot" ? (Le("正在 Fork(快照模式)...", "info"), H(l.id, "snapshot").then((u) => {
4220
- Le(`Fork 成功:${u.name}`, "success");
4219
+ } else n === "fork-snapshot" ? (xe("正在 Fork(快照模式)...", "info"), U(l.id, "snapshot").then((u) => {
4220
+ xe(`Fork 成功:${u.name}`, "success");
4221
4221
  }).catch((u) => {
4222
- Le(`Fork 失败:${(u == null ? void 0 : u.message) ?? u}`, "error");
4223
- })) : n === "fork-clean" ? (Le("正在 Fork(初始化模式)...", "info"), H(l.id, "clean").then((u) => {
4224
- Le(`Fork 成功:${u.name}`, "success");
4222
+ xe(`Fork 失败:${(u == null ? void 0 : u.message) ?? u}`, "error");
4223
+ })) : n === "fork-clean" ? (xe("正在 Fork(初始化模式)...", "info"), U(l.id, "clean").then((u) => {
4224
+ xe(`Fork 成功:${u.name}`, "success");
4225
4225
  }).catch((u) => {
4226
- Le(`Fork 失败:${(u == null ? void 0 : u.message) ?? u}`, "error");
4227
- })) : n === "archive" ? (z(l.id, { status: "ARCHIVED" }), Le(`已归档「${l.name}」`, "success")) : n === "unarchive" && (z(l.id, { status: "ACTIVE" }), Le(`已取消归档「${l.name}」`, "success"));
4226
+ xe(`Fork 失败:${(u == null ? void 0 : u.message) ?? u}`, "error");
4227
+ })) : n === "archive" ? (z(l.id, { status: "ARCHIVED" }), xe(`已归档「${l.name}」`, "success")) : n === "unarchive" && (z(l.id, { status: "ACTIVE" }), xe(`已取消归档「${l.name}」`, "success"));
4228
4228
  } else {
4229
- const l = O.target;
4229
+ const l = j.target;
4230
4230
  if (n === "rename")
4231
4231
  ye({ type: "rename-file", target: l });
4232
4232
  else if (n === "delete")
4233
- confirm(`确定删除「${l.name}」?`) && re(l.path);
4233
+ confirm(`确定删除「${l.name}」?`) && ae(l.path);
4234
4234
  else if (n === "new-file")
4235
4235
  ye({ type: "new-file", target: l });
4236
4236
  else if (n === "new-folder")
@@ -4239,27 +4239,27 @@ function Ic({
4239
4239
  const u = document.createElement("input");
4240
4240
  u.type = "file", u.onchange = (G) => {
4241
4241
  var ke;
4242
- const ee = (ke = G.target.files) == null ? void 0 : ke[0];
4243
- ee && E(l.path, ee);
4242
+ const X = (ke = G.target.files) == null ? void 0 : ke[0];
4243
+ X && D(l.path, X);
4244
4244
  }, u.click();
4245
4245
  } else if (n === "upload-folder") {
4246
4246
  const u = document.createElement("input");
4247
4247
  u.type = "file", u.webkitdirectory = !0, u.multiple = !0, u.onchange = (G) => {
4248
- const ee = Array.from(
4248
+ const X = Array.from(
4249
4249
  G.target.files || []
4250
4250
  );
4251
- ee.length > 0 && f(l.path, ee);
4251
+ X.length > 0 && f(l.path, X);
4252
4252
  }, u.click();
4253
- } else n === "download" && (l.is_dir ? Le("下载文件夹功能开发中...", "info") : _(l.path));
4253
+ } else n === "download" && (l.is_dir ? xe("下载文件夹功能开发中...", "info") : _(l.path));
4254
4254
  }
4255
4255
  }
4256
4256
  },
4257
4257
  [
4258
- O,
4258
+ j,
4259
4259
  L,
4260
- H,
4261
- re,
4262
- E,
4260
+ U,
4261
+ ae,
4262
+ D,
4263
4263
  f,
4264
4264
  _,
4265
4265
  s,
@@ -4267,22 +4267,22 @@ function Ic({
4267
4267
  W,
4268
4268
  h,
4269
4269
  M,
4270
- Y
4270
+ J
4271
4271
  ]
4272
4272
  ), ko = q(
4273
4273
  (n) => {
4274
- if (!U) return;
4275
- const l = U;
4274
+ if (!B) return;
4275
+ const l = B;
4276
4276
  ye(null), n.trim() && ((l.type === "rename-project" || l.type === "rename-file") && !h || (l.type === "rename-project" && l.target ? z(l.target.id, {
4277
4277
  name: n.trim()
4278
- }) : l.type === "rename-file" && l.target ? J(l.target.path, n.trim()) : l.type === "new-file" && l.target ? X(l.target.path, n.trim()) : l.type === "new-folder" && l.target && oe(l.target.path, n.trim())));
4278
+ }) : l.type === "rename-file" && l.target ? V(l.target.path, n.trim()) : l.type === "new-file" && l.target ? Z(l.target.path, n.trim()) : l.type === "new-folder" && l.target && ne(l.target.path, n.trim())));
4279
4279
  },
4280
4280
  [
4281
- U,
4281
+ B,
4282
4282
  z,
4283
- J,
4284
- X,
4285
- oe,
4283
+ V,
4284
+ Z,
4285
+ ne,
4286
4286
  h
4287
4287
  ]
4288
4288
  ), hn = q(
@@ -4296,22 +4296,22 @@ function Ic({
4296
4296
  style: {
4297
4297
  paddingLeft: l !== void 0 ? 16 + (l + 1) * 24 : 16
4298
4298
  },
4299
- onClick: async (ee) => {
4300
- ee.target.closest(`.${d.moreBtn}`) || await C(n);
4299
+ onClick: async (X) => {
4300
+ X.target.closest(`.${d.moreBtn}`) || await C(n);
4301
4301
  },
4302
- onContextMenu: (ee) => kt(ee, "project", n),
4302
+ onContextMenu: (X) => kt(X, "project", n),
4303
4303
  children: [
4304
- /* @__PURE__ */ e("span", { className: `${d.fileItemIcon} ${G}`, children: Q.groupChat }),
4304
+ /* @__PURE__ */ e("span", { className: `${d.fileItemIcon} ${G}`, children: Y.groupChat }),
4305
4305
  /* @__PURE__ */ e("span", { className: d.fileItemName, title: n.name, children: n.name }),
4306
- n.parent_id != null && /* @__PURE__ */ e("span", { className: d.forkBadge, title: "Fork 子单", children: Q.fork }),
4306
+ n.parent_id != null && /* @__PURE__ */ e("span", { className: d.forkBadge, title: "Fork 子单", children: Y.fork }),
4307
4307
  /* @__PURE__ */ e(
4308
4308
  "button",
4309
4309
  {
4310
4310
  className: d.moreBtn,
4311
- onClick: (ee) => {
4312
- ee.stopPropagation(), kt(ee, "project", n, !0);
4311
+ onClick: (X) => {
4312
+ X.stopPropagation(), kt(X, "project", n, !0);
4313
4313
  },
4314
- children: Q.more
4314
+ children: Y.more
4315
4315
  }
4316
4316
  )
4317
4317
  ]
@@ -4335,13 +4335,13 @@ function Ic({
4335
4335
  style: { paddingLeft: G },
4336
4336
  onClick: () => $t(n.key),
4337
4337
  children: [
4338
- /* @__PURE__ */ e("span", { className: d.treeArrow, children: Q.chevron(!u) }),
4338
+ /* @__PURE__ */ e("span", { className: d.treeArrow, children: Y.chevron(!u) }),
4339
4339
  /* @__PURE__ */ e("span", { className: d.groupLabel, title: n.label, children: n.label }),
4340
4340
  /* @__PURE__ */ e("span", { className: d.groupCount, children: n.projects.length })
4341
4341
  ]
4342
4342
  }
4343
4343
  ),
4344
- !u && /* @__PURE__ */ e(vt, { children: n.children && n.children.length > 0 ? n.children.map((ee) => Cn(ee, l + 1)) : n.projects.map((ee) => hn(ee, l)) })
4344
+ !u && /* @__PURE__ */ e(vt, { children: n.children && n.children.length > 0 ? n.children.map((X) => Cn(X, l + 1)) : n.projects.map((X) => hn(X, l)) })
4345
4345
  ] }, n.key);
4346
4346
  },
4347
4347
  [ct, $t, hn]
@@ -4351,50 +4351,50 @@ function Ic({
4351
4351
  action: u,
4352
4352
  disabled: Vn.has(u) && bo
4353
4353
  }), wo = () => {
4354
- if (!O) return [];
4355
- if (O.targetType === "project") {
4356
- const l = O.target, u = [
4357
- ue("重命名", Q.edit, "rename"),
4358
- ue("新建文件", Q.file, "new-file"),
4359
- ue("新建文件夹", Q.folder, "new-folder"),
4360
- ue("上传文件", Q.upload, "upload-file"),
4361
- ue("上传文件夹", Q.upload, "upload-folder"),
4362
- ue("下载", Q.download, "download")
4354
+ if (!j) return [];
4355
+ if (j.targetType === "project") {
4356
+ const l = j.target, u = [
4357
+ ue("重命名", Y.edit, "rename"),
4358
+ ue("新建文件", Y.file, "new-file"),
4359
+ ue("新建文件夹", Y.folder, "new-folder"),
4360
+ ue("上传文件", Y.upload, "upload-file"),
4361
+ ue("上传文件夹", Y.upload, "upload-folder"),
4362
+ ue("下载", Y.download, "download")
4363
4363
  ];
4364
- return M && u.push(ue("从生产同步", Q.sync, "sync-from-prod")), u.push(
4365
- ue("刷新所有技能", Q.refresh, "refresh-all-skills")
4366
- ), u.push(ue("Fork(快照)", Q.fork, "fork-snapshot")), u.push(ue("Fork(初始化)", Q.fork, "fork-clean")), l.status === "ARCHIVED" ? u.push(ue("取消归档", Q.archive, "unarchive")) : u.push(ue("归档", Q.archive, "archive")), u.push(ue("删除", Q.trash, "delete")), u;
4364
+ return M && u.push(ue("从生产同步", Y.sync, "sync-from-prod")), u.push(
4365
+ ue("刷新所有技能", Y.refresh, "refresh-all-skills")
4366
+ ), u.push(ue("Fork(快照)", Y.fork, "fork-snapshot")), u.push(ue("Fork(初始化)", Y.fork, "fork-clean")), l.status === "ARCHIVED" ? u.push(ue("取消归档", Y.archive, "unarchive")) : u.push(ue("归档", Y.archive, "archive")), u.push(ue("删除", Y.trash, "delete")), u;
4367
4367
  }
4368
- const n = O.target;
4368
+ const n = j.target;
4369
4369
  return n.is_dir && n.path === ".z_team/.skills" ? [
4370
- ue("添加技能", Q.plus, "add-skill"),
4371
- ue("新建文件", Q.file, "new-file"),
4372
- ue("新建文件夹", Q.folder, "new-folder"),
4373
- ue("上传文件", Q.upload, "upload-file"),
4374
- ue("上传文件夹", Q.upload, "upload-folder")
4370
+ ue("添加技能", Y.plus, "add-skill"),
4371
+ ue("新建文件", Y.file, "new-file"),
4372
+ ue("新建文件夹", Y.folder, "new-folder"),
4373
+ ue("上传文件", Y.upload, "upload-file"),
4374
+ ue("上传文件夹", Y.upload, "upload-folder")
4375
4375
  ] : n.is_dir && Sc(n.path) ? [
4376
- ue("刷新技能", Q.refresh, "refresh-agent-skills"),
4377
- ue("新建文件", Q.file, "new-file"),
4378
- ue("新建文件夹", Q.folder, "new-folder"),
4379
- ue("上传文件", Q.upload, "upload-file"),
4380
- ue("上传文件夹", Q.upload, "upload-folder"),
4381
- ue("重命名", Q.edit, "rename"),
4382
- ue("删除", Q.trash, "delete"),
4383
- ue("下载", Q.download, "download")
4376
+ ue("刷新技能", Y.refresh, "refresh-agent-skills"),
4377
+ ue("新建文件", Y.file, "new-file"),
4378
+ ue("新建文件夹", Y.folder, "new-folder"),
4379
+ ue("上传文件", Y.upload, "upload-file"),
4380
+ ue("上传文件夹", Y.upload, "upload-folder"),
4381
+ ue("重命名", Y.edit, "rename"),
4382
+ ue("删除", Y.trash, "delete"),
4383
+ ue("下载", Y.download, "download")
4384
4384
  ] : n.is_dir ? [
4385
- ue("新建文件", Q.file, "new-file"),
4386
- ue("新建文件夹", Q.folder, "new-folder"),
4387
- ue("上传文件", Q.upload, "upload-file"),
4388
- ue("上传文件夹", Q.upload, "upload-folder"),
4389
- ue("重命名", Q.edit, "rename"),
4390
- ue("删除", Q.trash, "delete"),
4391
- ue("下载", Q.download, "download")
4385
+ ue("新建文件", Y.file, "new-file"),
4386
+ ue("新建文件夹", Y.folder, "new-folder"),
4387
+ ue("上传文件", Y.upload, "upload-file"),
4388
+ ue("上传文件夹", Y.upload, "upload-folder"),
4389
+ ue("重命名", Y.edit, "rename"),
4390
+ ue("删除", Y.trash, "delete"),
4391
+ ue("下载", Y.download, "download")
4392
4392
  ] : [
4393
- ue("重命名", Q.edit, "rename"),
4394
- ue("删除", Q.trash, "delete"),
4395
- ue("下载", Q.download, "download")
4393
+ ue("重命名", Y.edit, "rename"),
4394
+ ue("删除", Y.trash, "delete"),
4395
+ ue("下载", Y.download, "download")
4396
4396
  ];
4397
- }, No = U ? U.type === "rename-project" ? "输入新项目名称" : U.type === "rename-file" ? "输入新文件名" : U.type === "new-file" ? "输入文件名" : "输入文件夹名" : "", So = U ? U.type === "rename-project" ? "重命名项目" : U.type === "rename-file" ? "重命名" : U.type === "new-file" ? "新建文件" : "新建文件夹" : "", Co = U && U.type === "rename-file" && U.target || U && U.type === "rename-project" && U.target ? U.target.name : "", Io = /* @__PURE__ */ a("div", { className: d.filterPopover, children: [
4397
+ }, No = B ? B.type === "rename-project" ? "输入新项目名称" : B.type === "rename-file" ? "输入新文件名" : B.type === "new-file" ? "输入文件名" : "输入文件夹名" : "", So = B ? B.type === "rename-project" ? "重命名项目" : B.type === "rename-file" ? "重命名" : B.type === "new-file" ? "新建文件" : "新建文件夹" : "", Co = B && B.type === "rename-file" && B.target || B && B.type === "rename-project" && B.target ? B.target.name : "", Io = /* @__PURE__ */ a("div", { className: d.filterPopover, children: [
4398
4398
  /* @__PURE__ */ a("div", { className: d.filterSection, children: [
4399
4399
  /* @__PURE__ */ e("div", { className: d.filterSectionTitle, children: "过滤" }),
4400
4400
  /* @__PURE__ */ e("div", { className: d.filterTimeOptions, children: [
@@ -4407,7 +4407,7 @@ function Ic({
4407
4407
  {
4408
4408
  type: "button",
4409
4409
  className: `${d.filterTimeOption} ${se === n.key ? d.filterTimeOptionActive : ""}`,
4410
- onClick: () => Z(n.key),
4410
+ onClick: () => Q(n.key),
4411
4411
  children: n.label
4412
4412
  },
4413
4413
  n.key
@@ -4430,7 +4430,7 @@ function Ic({
4430
4430
  title: "重置过滤",
4431
4431
  disabled: !De,
4432
4432
  onClick: Ye,
4433
- children: Q.reset
4433
+ children: Y.reset
4434
4434
  }
4435
4435
  ),
4436
4436
  /* @__PURE__ */ e(
@@ -4441,7 +4441,7 @@ function Ic({
4441
4441
  disabled: v,
4442
4442
  title: "刷新工作区",
4443
4443
  onClick: $,
4444
- children: /* @__PURE__ */ e("span", { className: v ? d.refreshIconLoading : void 0, children: Q.refresh })
4444
+ children: /* @__PURE__ */ e("span", { className: v ? d.refreshIconLoading : void 0, children: Y.refresh })
4445
4445
  }
4446
4446
  )
4447
4447
  ] })
@@ -4449,10 +4449,10 @@ function Ic({
4449
4449
  /* @__PURE__ */ a("div", { className: d.filterSection, children: [
4450
4450
  /* @__PURE__ */ e("div", { className: d.filterSectionTitle, children: "分组" }),
4451
4451
  /* @__PURE__ */ e("div", { className: d.tagList, children: [
4452
- { key: "scenario", label: "场景", icon: Q.apps },
4453
- { key: "time", label: "时间", icon: Q.clock },
4454
- { key: "status", label: "状态", icon: Q.target },
4455
- { key: "test", label: "测试", icon: Q.branch }
4452
+ { key: "scenario", label: "场景", icon: Y.apps },
4453
+ { key: "time", label: "时间", icon: Y.clock },
4454
+ { key: "status", label: "状态", icon: Y.target },
4455
+ { key: "test", label: "测试", icon: Y.branch }
4456
4456
  ].map((n) => {
4457
4457
  const l = de.indexOf(n.key), u = l >= 0;
4458
4458
  return /* @__PURE__ */ a(
@@ -4475,11 +4475,11 @@ function Ic({
4475
4475
  /* @__PURE__ */ a("div", { className: d.filterSection, children: [
4476
4476
  /* @__PURE__ */ e("div", { className: d.filterSectionTitle, children: "排序" }),
4477
4477
  /* @__PURE__ */ e("div", { className: d.tagList, children: [
4478
- { key: "create_time", label: "创建时间", shortLabel: "时间", icon: Q.clock },
4479
- { key: "name", label: "名称", shortLabel: "名称", icon: Q.textT },
4480
- { key: "id", label: "ID", shortLabel: "ID", icon: Q.listNum }
4478
+ { key: "create_time", label: "创建时间", shortLabel: "时间", icon: Y.clock },
4479
+ { key: "name", label: "名称", shortLabel: "名称", icon: Y.textT },
4480
+ { key: "id", label: "ID", shortLabel: "ID", icon: Y.listNum }
4481
4481
  ].map((n) => {
4482
- const l = Ie.findIndex((ee) => ee.dim === n.key), u = l >= 0, G = u ? Ie[l].order : void 0;
4482
+ const l = Te.findIndex((X) => X.dim === n.key), u = l >= 0, G = u ? Te[l].order : void 0;
4483
4483
  return /* @__PURE__ */ a(
4484
4484
  "button",
4485
4485
  {
@@ -4499,7 +4499,7 @@ function Ic({
4499
4499
  }) })
4500
4500
  ] })
4501
4501
  ] });
4502
- return /* @__PURE__ */ a("div", { className: d.sidebarInner, ref: K, children: [
4502
+ return /* @__PURE__ */ a("div", { className: d.sidebarInner, ref: ee, children: [
4503
4503
  /* @__PURE__ */ e(
4504
4504
  "button",
4505
4505
  {
@@ -4580,15 +4580,15 @@ function Ic({
4580
4580
  title: "定位到当前聊天",
4581
4581
  onClick: () => {
4582
4582
  const n = s.id;
4583
- D.setState({ expandedProjectIds: [n] }), (!g[n] || !Array.isArray(g[n]) || g[n].length === 0) && p(), setTimeout(() => {
4583
+ E.setState({ expandedProjectIds: [n] }), (!g[n] || !Array.isArray(g[n]) || g[n].length === 0) && p(), setTimeout(() => {
4584
4584
  var u;
4585
- const l = (u = K.current) == null ? void 0 : u.querySelector(
4585
+ const l = (u = ee.current) == null ? void 0 : u.querySelector(
4586
4586
  `[data-project-id="${n}"]`
4587
4587
  );
4588
4588
  l == null || l.scrollIntoView({ behavior: "smooth", block: "nearest" });
4589
4589
  }, 80);
4590
4590
  },
4591
- children: Q.crosshair
4591
+ children: Y.crosshair
4592
4592
  }
4593
4593
  )
4594
4594
  ] })
@@ -4606,15 +4606,15 @@ function Ic({
4606
4606
  !Ct && m.length > 0 && Pt === 0 && /* @__PURE__ */ e("div", { className: d.emptyHint, children: "无匹配的工作区,请调整过滤条件" })
4607
4607
  ] })
4608
4608
  ] }),
4609
- O && /* @__PURE__ */ e(
4609
+ j && /* @__PURE__ */ e(
4610
4610
  "div",
4611
4611
  {
4612
- ref: ne,
4612
+ ref: re,
4613
4613
  className: d.contextMenu,
4614
4614
  style: {
4615
- left: Ce.x,
4616
- top: Ce.y,
4617
- visibility: ae ? "visible" : "hidden"
4615
+ left: Ie.x,
4616
+ top: Ie.y,
4617
+ visibility: oe ? "visible" : "hidden"
4618
4618
  },
4619
4619
  onClick: (n) => n.stopPropagation(),
4620
4620
  children: wo().map((n) => /* @__PURE__ */ a(
@@ -4634,7 +4634,7 @@ function Ic({
4634
4634
  ))
4635
4635
  }
4636
4636
  ),
4637
- U && /* @__PURE__ */ e(
4637
+ B && /* @__PURE__ */ e(
4638
4638
  Tc,
4639
4639
  {
4640
4640
  title: So,
@@ -4644,17 +4644,17 @@ function Ic({
4644
4644
  onCancel: () => ye(null)
4645
4645
  }
4646
4646
  ),
4647
- xe && /* @__PURE__ */ e(
4647
+ we && /* @__PURE__ */ e(
4648
4648
  Lc,
4649
4649
  {
4650
4650
  allSkills: F,
4651
- projectSkills: V,
4651
+ projectSkills: K,
4652
4652
  onConfirm: async (n) => {
4653
4653
  if (!s) return;
4654
- const u = new Set(V.map((ke) => ke.id)), G = [...n].filter((ke) => !u.has(ke)), ee = V.filter((ke) => !n.has(ke.id));
4654
+ const u = new Set(K.map((ke) => ke.id)), G = [...n].filter((ke) => !u.has(ke)), X = K.filter((ke) => !n.has(ke.id));
4655
4655
  for (const ke of G)
4656
4656
  await i(ke);
4657
- for (const ke of ee)
4657
+ for (const ke of X)
4658
4658
  await b(ke.id);
4659
4659
  Ue(!1);
4660
4660
  },
@@ -4671,7 +4671,7 @@ function Tc({
4671
4671
  onCancel: m
4672
4672
  }) {
4673
4673
  const [g, N] = c(r), A = le(null);
4674
- return j(() => {
4674
+ return H(() => {
4675
4675
  setTimeout(() => {
4676
4676
  var S;
4677
4677
  return (S = A.current) == null ? void 0 : S.focus();
@@ -4712,7 +4712,7 @@ function Lc({
4712
4712
  });
4713
4713
  }, F = async () => {
4714
4714
  A(!0), await r(m), A(!1);
4715
- }, V = t.reduce((M, v) => {
4715
+ }, K = t.reduce((M, v) => {
4716
4716
  const T = v.category || "其他";
4717
4717
  return M[T] || (M[T] = []), M[T].push(v), M;
4718
4718
  }, {});
@@ -4731,7 +4731,7 @@ function Lc({
4731
4731
  " 已选"
4732
4732
  ] })
4733
4733
  ] }),
4734
- /* @__PURE__ */ e("div", { className: d.skillPickerList, children: Object.entries(V).map(([M, v]) => /* @__PURE__ */ a("div", { className: d.skillPickerGroup, children: [
4734
+ /* @__PURE__ */ e("div", { className: d.skillPickerList, children: Object.entries(K).map(([M, v]) => /* @__PURE__ */ a("div", { className: d.skillPickerGroup, children: [
4735
4735
  /* @__PURE__ */ e("div", { className: d.skillPickerGroupLabel, children: M }),
4736
4736
  v.map((T) => /* @__PURE__ */ a(
4737
4737
  "label",
@@ -4821,13 +4821,13 @@ function rl(t) {
4821
4821
  return m.length > Jn ? m.slice(0, Jn) + "…" : m || "新会话";
4822
4822
  }
4823
4823
  function sl() {
4824
- const t = le(null), { token: o, createProjectAndSendFirstMessage: r } = D(
4824
+ const t = le(null), { token: o, createProjectAndSendFirstMessage: r } = E(
4825
4825
  mn((i) => ({
4826
4826
  token: i.token,
4827
4827
  createProjectAndSendFirstMessage: i.createProjectAndSendFirstMessage
4828
4828
  }))
4829
- ), [s, m] = c([]), [g, N] = c(!0), [A, S] = c(""), [F, V] = c(""), [M, v] = c(!1), [T, L] = c(""), [H, z] = c(!1), [J, X] = c("");
4830
- j(() => {
4829
+ ), [s, m] = c([]), [g, N] = c(!0), [A, S] = c(""), [F, K] = c(""), [M, v] = c(!1), [T, L] = c(""), [U, z] = c(!1), [V, Z] = c("");
4830
+ H(() => {
4831
4831
  let i = !1;
4832
4832
  return (async () => {
4833
4833
  try {
@@ -4841,8 +4841,8 @@ function sl() {
4841
4841
  return;
4842
4842
  }
4843
4843
  S(""), m(k);
4844
- const W = k.find((Y) => Y.isDefault || Y.is_default) ?? (k.length === 1 ? k[0] : null);
4845
- W && V(W.code);
4844
+ const W = k.find((J) => J.isDefault || J.is_default) ?? (k.length === 1 ? k[0] : null);
4845
+ W && K(W.code);
4846
4846
  } catch (b) {
4847
4847
  i || (m([]), S(
4848
4848
  b instanceof Error ? b.message : "加载场景失败"
@@ -4853,7 +4853,7 @@ function sl() {
4853
4853
  })(), () => {
4854
4854
  i = !0;
4855
4855
  };
4856
- }, [o]), j(() => {
4856
+ }, [o]), H(() => {
4857
4857
  if (!M) return;
4858
4858
  const i = (b) => {
4859
4859
  const k = document.querySelector(`.${be.scenarioWrap}`);
@@ -4861,10 +4861,10 @@ function sl() {
4861
4861
  };
4862
4862
  return document.addEventListener("mousedown", i), () => document.removeEventListener("mousedown", i);
4863
4863
  }, [M]);
4864
- const oe = Re(
4864
+ const ne = Re(
4865
4865
  () => s.find((i) => i.code === F),
4866
4866
  [s, F]
4867
- ), re = Re(() => oe ? `${oe.name}(${oe.code})` : g ? "加载场景…" : s.length === 0 ? "无可用场景" : "请选择场景", [oe, g, s.length]), E = q(
4867
+ ), ae = Re(() => ne ? `${ne.name}(${ne.code})` : g ? "加载场景…" : s.length === 0 ? "无可用场景" : "请选择场景", [ne, g, s.length]), D = q(
4868
4868
  (i) => {
4869
4869
  L(i.target.value);
4870
4870
  const b = i.target;
@@ -4883,14 +4883,14 @@ function sl() {
4883
4883
  var k, W;
4884
4884
  const i = T.trim();
4885
4885
  if (!i) {
4886
- Le("请输入需求内容", "warning"), (W = (k = t.current) == null ? void 0 : k.focus) == null || W.call(k);
4886
+ xe("请输入需求内容", "warning"), (W = (k = t.current) == null ? void 0 : k.focus) == null || W.call(k);
4887
4887
  return;
4888
4888
  }
4889
4889
  if (!F.trim()) {
4890
- Le("请先选择场景", "warning");
4890
+ xe("请先选择场景", "warning");
4891
4891
  return;
4892
4892
  }
4893
- z(!0), X("");
4893
+ z(!0), Z("");
4894
4894
  const b = rl(i);
4895
4895
  try {
4896
4896
  await r(
@@ -4899,21 +4899,21 @@ function sl() {
4899
4899
  F,
4900
4900
  i
4901
4901
  );
4902
- } catch (Y) {
4903
- const pe = Y instanceof Error ? Y.message : kn(Y) && Y.userMessage || "创建失败";
4904
- X(pe), kn(Y) || Le(pe, "error"), z(!1);
4902
+ } catch (J) {
4903
+ const pe = J instanceof Error ? J.message : kn(J) && J.userMessage || "创建失败";
4904
+ Z(pe), kn(J) || xe(pe, "error"), z(!1);
4905
4905
  }
4906
4906
  }, [T, F, r]), C = q(
4907
4907
  (i) => {
4908
4908
  i.key === "Enter" && (i.metaKey || i.ctrlKey) && (i.preventDefault(), _());
4909
4909
  },
4910
4910
  [_]
4911
- ), I = H || !T.trim() || !F.trim() || g;
4911
+ ), I = U || !T.trim() || !F.trim() || g;
4912
4912
  return /* @__PURE__ */ e("div", { className: be.welcomeRoot, children: /* @__PURE__ */ a("div", { className: be.welcomeInner, children: [
4913
4913
  /* @__PURE__ */ e("h1", { className: be.heroTitle, children: "永远相信美好的事情即将发生" }),
4914
4914
  /* @__PURE__ */ e("div", { className: be.heroDivider }),
4915
4915
  A ? /* @__PURE__ */ e("div", { className: be.errorHint, children: A }) : null,
4916
- J ? /* @__PURE__ */ e("div", { className: be.errorHint, children: J }) : null,
4916
+ V ? /* @__PURE__ */ e("div", { className: be.errorHint, children: V }) : null,
4917
4917
  /* @__PURE__ */ a("div", { className: be.composer, children: [
4918
4918
  /* @__PURE__ */ e(
4919
4919
  "textarea",
@@ -4921,10 +4921,10 @@ function sl() {
4921
4921
  ref: t,
4922
4922
  className: be.composerTextarea,
4923
4923
  value: T,
4924
- onChange: E,
4924
+ onChange: D,
4925
4925
  onKeyDown: C,
4926
4926
  placeholder: "规划与编程,@ 添加上下文,/ 使用命令",
4927
- disabled: H,
4927
+ disabled: U,
4928
4928
  rows: 3
4929
4929
  }
4930
4930
  ),
@@ -4934,12 +4934,12 @@ function sl() {
4934
4934
  {
4935
4935
  className: be.scenarioWrap,
4936
4936
  onClick: () => {
4937
- s.length === 0 || H || v((i) => !i);
4937
+ s.length === 0 || U || v((i) => !i);
4938
4938
  },
4939
4939
  title: "选择场景",
4940
4940
  children: [
4941
4941
  /* @__PURE__ */ e("span", { className: be.scenarioIcon, children: "⚡" }),
4942
- /* @__PURE__ */ e("span", { className: be.scenarioLabel, children: re }),
4942
+ /* @__PURE__ */ e("span", { className: be.scenarioLabel, children: ae }),
4943
4943
  /* @__PURE__ */ e(
4944
4944
  "span",
4945
4945
  {
@@ -4953,13 +4953,13 @@ function sl() {
4953
4953
  className: be.scenarioDropdown,
4954
4954
  onClick: (i) => i.stopPropagation(),
4955
4955
  children: s.map((i) => {
4956
- const b = (i.workspaceDirectories ?? i.workspace_directories ?? []).filter((h) => h && h !== ".z_team"), k = b.length > 0 ? b.join("、") : "(无业务目录)", W = i.agentCount ?? i.agent_count ?? 0, Y = i.skillInstallCount ?? i.skill_install_count ?? 0, pe = `将创建目录:${k};智能体 ${W} 个;预装技能 ${Y} 个`, p = !!(i.isDefault || i.is_default), R = i.code === F;
4956
+ const b = (i.workspaceDirectories ?? i.workspace_directories ?? []).filter((h) => h && h !== ".z_team"), k = b.length > 0 ? b.join("、") : "(无业务目录)", W = i.agentCount ?? i.agent_count ?? 0, J = i.skillInstallCount ?? i.skill_install_count ?? 0, pe = `将创建目录:${k};智能体 ${W} 个;预装技能 ${J} 个`, p = !!(i.isDefault || i.is_default), R = i.code === F;
4957
4957
  return /* @__PURE__ */ a(
4958
4958
  "div",
4959
4959
  {
4960
4960
  className: `${be.scenarioOption} ${R ? be.scenarioOptionActive : ""}`,
4961
4961
  onClick: () => {
4962
- V(i.code), v(!1);
4962
+ K(i.code), v(!1);
4963
4963
  },
4964
4964
  children: [
4965
4965
  /* @__PURE__ */ a("div", { className: be.scenarioOptionName, children: [
@@ -4979,7 +4979,7 @@ function sl() {
4979
4979
  ]
4980
4980
  }
4981
4981
  ),
4982
- /* @__PURE__ */ e("span", { className: be.scenarioMetaHint, children: (oe == null ? void 0 : oe.description) || "元场景标签说明:选好场景后,由 Agent 自动识别目标" }),
4982
+ /* @__PURE__ */ e("span", { className: be.scenarioMetaHint, children: (ne == null ? void 0 : ne.description) || "元场景标签说明:选好场景后,由 Agent 自动识别目标" }),
4983
4983
  /* @__PURE__ */ a(
4984
4984
  "button",
4985
4985
  {
@@ -4989,7 +4989,7 @@ function sl() {
4989
4989
  disabled: I,
4990
4990
  title: "Ctrl/⌘ + Enter 发送",
4991
4991
  children: [
4992
- H ? "创建中…" : "发送",
4992
+ U ? "创建中…" : "发送",
4993
4993
  /* @__PURE__ */ e("span", { style: { fontSize: 12, opacity: 0.85 }, children: "⏎" })
4994
4994
  ]
4995
4995
  }
@@ -5004,7 +5004,7 @@ function sl() {
5004
5004
  type: "button",
5005
5005
  className: be.suggestionItem,
5006
5006
  onClick: () => f(i.text),
5007
- disabled: H,
5007
+ disabled: U,
5008
5008
  children: [
5009
5009
  /* @__PURE__ */ e("span", { className: be.suggestionIcon, children: i.icon }),
5010
5010
  /* @__PURE__ */ e("span", { className: be.suggestionText, children: i.text })
@@ -5074,7 +5074,7 @@ const il = "_layout_i9evc_1", cl = "_banner_i9evc_8", ll = "_bannerLeft_i9evc_20
5074
5074
  modeToggleBtn: cd,
5075
5075
  modeToggleBtnActive: ld,
5076
5076
  smartWorkbenchArea: dd
5077
- }, md = it(() => import("./index-CwIgdJYL.js")), ud = it(() => import("./index-C6vfXs2f.js")), pd = it(() => import("./index-BoGVJ0hC.js")), hd = it(() => import("./index-VHvEmmhf.js").then((t) => t.i)), fd = it(() => import("./index-CcpWacSZ.js")), gd = it(() => import("./index-BpuJ9Njb.js")), yd = it(() => import("./index-C0EIMJI2.js")), _d = it(() => import("./index-B5_xKK08.js")), vd = it(() => import("./index-BCBBZW4m.js")), kd = it(() => import("./index-JMzBzwiO.js")), Yn = it(() => import("./SystemShell-yMCZOMUN.js")), bd = `${window.publicPath ?? "/"}logo.svg`, wd = [
5077
+ }, md = it(() => import("./index-Iw2RDvji.js")), ud = it(() => import("./index-a4cM-7bG.js")), pd = it(() => import("./index-BoGVJ0hC.js")), hd = it(() => import("./index-BPVspGPJ.js").then((t) => t.i)), fd = it(() => import("./index-CcpWacSZ.js")), gd = it(() => import("./index-BpuJ9Njb.js")), yd = it(() => import("./index-C0EIMJI2.js")), _d = it(() => import("./index-BKJeoGCL.js")), vd = it(() => import("./index-BagwrhL6.js")), kd = it(() => import("./index-JMzBzwiO.js")), Yn = it(() => import("./SystemShell-BBRnHTz-.js")), bd = `${window.publicPath ?? "/"}logo.svg`, wd = [
5078
5078
  "/ctc/",
5079
5079
  "/ai/",
5080
5080
  "/config/",
@@ -5141,46 +5141,46 @@ function Cd({
5141
5141
  onCloseNewChat: N
5142
5142
  }) {
5143
5143
  var jt;
5144
- const { currentUser: A, currentProject: S } = D(
5144
+ const { currentUser: A, currentProject: S } = E(
5145
5145
  mn(($) => ({
5146
5146
  currentUser: $.currentUser,
5147
5147
  currentProject: $.currentProject
5148
5148
  }))
5149
- ), F = D(($) => $.wsState), V = D(($) => $.token), M = le(null), v = Ka(260, 180, 400, "left"), [T, L] = c(
5149
+ ), F = E(($) => $.wsState), K = E(($) => $.token), M = le(null), v = Ka(260, 180, 400, "left"), [T, L] = c(
5150
5150
  () => localStorage.getItem("ft_sidebar_collapsed") === "true"
5151
- ), [H, z] = c(!1), [J, X] = c(0), [oe, re] = c(!1), [E, f] = c(null), [_, C] = c(0), [I, i] = c(!1), [b, k] = c(0), [W, Y] = c([]), [pe, p] = c(0), [R, h] = c(!1), [O, Se] = c([]), [Ce, ge] = c(0), ae = Re(() => {
5152
- const $ = E == null ? void 0 : E.announcements;
5153
- return ($ && $.length > 0 ? $ : E != null && E.announcement ? [E.announcement] : []).filter((ve) => ve.title || ve.content);
5154
- }, [E]), x = Re(
5155
- () => Math.max(1e3, (E == null ? void 0 : E.bannerRotateInterval) ?? 5e3),
5156
- [E == null ? void 0 : E.bannerRotateInterval]
5151
+ ), [U, z] = c(!1), [V, Z] = c(0), [ne, ae] = c(!1), [D, f] = c(null), [_, C] = c(0), [I, i] = c(!1), [b, k] = c(0), [W, J] = c([]), [pe, p] = c(0), [R, h] = c(!1), [j, Ce] = c([]), [Ie, ge] = c(0), oe = Re(() => {
5152
+ const $ = D == null ? void 0 : D.announcements;
5153
+ return ($ && $.length > 0 ? $ : D != null && D.announcement ? [D.announcement] : []).filter((ve) => ve.title || ve.content);
5154
+ }, [D]), x = Re(
5155
+ () => Math.max(1e3, (D == null ? void 0 : D.bannerRotateInterval) ?? 5e3),
5156
+ [D == null ? void 0 : D.bannerRotateInterval]
5157
5157
  );
5158
- j(() => {
5159
- if (ae.length <= 1 || I) return;
5158
+ H(() => {
5159
+ if (oe.length <= 1 || I) return;
5160
5160
  const $ = setInterval(() => {
5161
- document.hidden || C((ie) => (ie + 1) % ae.length);
5161
+ document.hidden || C((ie) => (ie + 1) % oe.length);
5162
5162
  }, x);
5163
5163
  return () => clearInterval($);
5164
- }, [ae.length, I, x]), j(() => {
5164
+ }, [oe.length, I, x]), H(() => {
5165
5165
  if (R) return;
5166
- const $ = go(), ie = ae.filter(
5166
+ const $ = go(), ie = oe.filter(
5167
5167
  (ve) => ve.remindType === "POPUP" && !$.includes(Qn(ve))
5168
5168
  );
5169
- ie.length !== 0 && (Y(ie), p(0), h(!0));
5170
- }, [ae, R]);
5171
- const K = q(async () => {
5169
+ ie.length !== 0 && (J(ie), p(0), h(!0));
5170
+ }, [oe, R]);
5171
+ const ee = q(async () => {
5172
5172
  try {
5173
5173
  const ie = (await Rn()).quotes ?? [];
5174
- ie.length > 0 && (Se(ie), ge(0));
5174
+ ie.length > 0 && (Ce(ie), ge(0));
5175
5175
  } catch {
5176
5176
  }
5177
5177
  }, []);
5178
- j(() => {
5178
+ H(() => {
5179
5179
  let $ = !0;
5180
5180
  const ie = async () => {
5181
5181
  try {
5182
5182
  const De = await Rn();
5183
- $ && (f(De), Se((Ye) => Ye.length > 0 ? Ye : De.quotes ?? []));
5183
+ $ && (f(De), Ce((Ye) => Ye.length > 0 ? Ye : De.quotes ?? []));
5184
5184
  } catch {
5185
5185
  }
5186
5186
  };
@@ -5189,17 +5189,17 @@ function Cd({
5189
5189
  return () => {
5190
5190
  $ = !1, clearInterval(ve);
5191
5191
  };
5192
- }, []), j(() => {
5193
- if (O.length === 0) return;
5192
+ }, []), H(() => {
5193
+ if (j.length === 0) return;
5194
5194
  const $ = setInterval(() => {
5195
5195
  document.hidden || ge((ie) => {
5196
5196
  const ve = ie + 1;
5197
- return ve < O.length ? ve : (K(), 0);
5197
+ return ve < j.length ? ve : (ee(), 0);
5198
5198
  });
5199
5199
  }, 1e4);
5200
5200
  return () => clearInterval($);
5201
- }, [O, K]);
5202
- const [ne, U] = c(null), [ye, xe] = c("chat"), [Ue, et] = c(0), [P, ce] = c(0), [_e, de] = c(() => (an(), Qa())), [Ge, Ie] = c(() => {
5201
+ }, [j, ee]);
5202
+ const [re, B] = c(null), [ye, we] = c("chat"), [Ue, et] = c(0), [P, ce] = c(0), [_e, de] = c(() => (an(), Qa())), [Ge, Te] = c(() => {
5203
5203
  try {
5204
5204
  an();
5205
5205
  const $ = new URL(window.location.href).searchParams.get("mode");
@@ -5208,12 +5208,12 @@ function Cd({
5208
5208
  }
5209
5209
  return null;
5210
5210
  });
5211
- j(() => {
5211
+ H(() => {
5212
5212
  const $ = () => {
5213
5213
  try {
5214
5214
  an();
5215
5215
  const ie = new URL(window.location.href).searchParams.get("mode");
5216
- Ie(
5216
+ Te(
5217
5217
  ie && sn.includes(ie) ? ie : null
5218
5218
  );
5219
5219
  } catch {
@@ -5225,28 +5225,28 @@ function Cd({
5225
5225
  // /test/ 路径优先识别为 test 模式 (main.jsx 的 /test/* 路由传入 forcedChatMode='system',
5226
5226
  // 但测试工作台需要 test 模式来渲染正确的菜单和高亮)
5227
5227
  Ge === "test" || r === "system" && window.location.pathname.startsWith("/test/") ? "test" : r && !Ge ? r : Ge ?? r ?? _e
5228
- ), [ct, B] = c(!1), [se, Z] = c(null), [Ae, $e] = c(null), [te, Me] = c(
5228
+ ), [ct, O] = c(!1), [se, Q] = c(null), [Ae, $e] = c(null), [te, Me] = c(
5229
5229
  null
5230
5230
  );
5231
- j(() => {
5231
+ H(() => {
5232
5232
  try {
5233
5233
  const $ = new URLSearchParams(window.location.search), ie = $.get("openNote");
5234
5234
  if (ie === "1" || ie === "true") {
5235
- de("collaboration"), B(!0);
5235
+ de("collaboration"), O(!0);
5236
5236
  const $t = String(
5237
5237
  $.get("projectId") ?? $.get("project_id") ?? ""
5238
5238
  ).trim(), dt = Dt($t);
5239
- no(dt) && Z(dt);
5239
+ no(dt) && Q(dt);
5240
5240
  }
5241
5241
  const ve = $.get("mode"), De = $.get("agentId"), Ye = $.get("tab"), Ct = $.get("sessionId");
5242
5242
  if (ve === "personal" && De) {
5243
5243
  de("personal");
5244
5244
  const $t = Dt(De);
5245
5245
  Ye && $e(Ye), Ct && Me(Dt(Ct));
5246
- const dt = D.getState().token;
5246
+ const dt = E.getState().token;
5247
5247
  Do(dt).then((kt) => {
5248
5248
  const At = kt.find((Zt) => It(Zt.id, $t));
5249
- At && (U(At), xe(Ye === "schedule" ? "detail" : "chat"), ce(Date.now()));
5249
+ At && (B(At), we(Ye === "schedule" ? "detail" : "chat"), ce(Date.now()));
5250
5250
  }).catch(() => {
5251
5251
  });
5252
5252
  const Pt = new URL(window.location.href);
@@ -5254,13 +5254,13 @@ function Cd({
5254
5254
  }
5255
5255
  } catch {
5256
5256
  }
5257
- }, []), j(() => {
5257
+ }, []), H(() => {
5258
5258
  Za(_e);
5259
5259
  }, [_e]);
5260
5260
  const qe = le(_e);
5261
- j(() => {
5261
+ H(() => {
5262
5262
  qe.current = _e;
5263
- }, [_e]), j(() => {
5263
+ }, [_e]), H(() => {
5264
5264
  const $ = () => {
5265
5265
  try {
5266
5266
  an();
@@ -5274,7 +5274,7 @@ function Cd({
5274
5274
  };
5275
5275
  return window.addEventListener("popstate", $), $(), () => window.removeEventListener("popstate", $);
5276
5276
  }, []);
5277
- const we = q(($) => {
5277
+ const Ne = q(($) => {
5278
5278
  const ie = window.location.pathname;
5279
5279
  if ($ === "system") {
5280
5280
  if (Nd(ie) && !ie.startsWith("/ops/") && !ie.startsWith("/lc/"))
@@ -5311,13 +5311,13 @@ function Cd({
5311
5311
  st.push(`/workspace?mode=${$}${ve}${De}`);
5312
5312
  }, []), tt = ($) => {
5313
5313
  L($), localStorage.setItem("ft_sidebar_collapsed", $ ? "true" : "false");
5314
- }, rt = D(($) => $.personalChatNav);
5315
- j(() => {
5316
- rt.trigger > 0 && rt.agent && (de("personal"), U(rt.agent), xe("chat"), et(($) => $ + 1), ce(Date.now()));
5314
+ }, rt = E(($) => $.personalChatNav);
5315
+ H(() => {
5316
+ rt.trigger > 0 && rt.agent && (de("personal"), B(rt.agent), we("chat"), et(($) => $ + 1), ce(Date.now()));
5317
5317
  }, [rt.trigger]);
5318
5318
  const un = q(
5319
5319
  ($, ie) => {
5320
- de("collaboration"), ie && (B(!0), Z($)), st.push(`/workspace?projectId=${$}`);
5320
+ de("collaboration"), ie && (O(!0), Q($)), st.push(`/workspace?projectId=${$}`);
5321
5321
  },
5322
5322
  [de]
5323
5323
  ), pn = A != null && A.avatar && (A.avatar.startsWith("http") || A.avatar.startsWith("data:")) ? A.avatar : void 0, Jt = [
@@ -5329,7 +5329,7 @@ function Cd({
5329
5329
  Da();
5330
5330
  }
5331
5331
  }
5332
- ], Ve = O[Ce], Je = ae.length > 0 ? ae[_ % ae.length] : void 0, St = (Je == null ? void 0 : Je.title) || (Je == null ? void 0 : Je.content) || "", Lt = ae.length > 0 ? b % ae.length : 0, gt = ae[Lt], Yt = Re(() => {
5332
+ ], Ve = j[Ie], Je = oe.length > 0 ? oe[_ % oe.length] : void 0, St = (Je == null ? void 0 : Je.title) || (Je == null ? void 0 : Je.content) || "", Lt = oe.length > 0 ? b % oe.length : 0, gt = oe[Lt], Yt = Re(() => {
5333
5333
  if (!gt) return [];
5334
5334
  const $ = [], { publishTime: ie, effectiveStartTime: ve, effectiveEndTime: De } = gt;
5335
5335
  return ie && $.push(`发布时间:${ie}`), (ve || De) && $.push(
@@ -5337,9 +5337,9 @@ function Cd({
5337
5337
  ), $;
5338
5338
  }, [gt]), Qt = q(() => {
5339
5339
  k(
5340
- ae.length > 0 ? _ % ae.length : 0
5340
+ oe.length > 0 ? _ % oe.length : 0
5341
5341
  ), i(!0);
5342
- }, [_, ae.length]), lt = W[pe], Ot = pe >= W.length - 1, xt = q(() => {
5342
+ }, [_, oe.length]), lt = W[pe], Ot = pe >= W.length - 1, xt = q(() => {
5343
5343
  const $ = W[pe];
5344
5344
  if ($ && Sd(Qn($)), pe < W.length - 1) {
5345
5345
  p((ie) => ie + 1);
@@ -5404,7 +5404,7 @@ function Cd({
5404
5404
  {
5405
5405
  type: "button",
5406
5406
  className: `${w.modeToggleBtn} ${me === "personal" ? w.modeToggleBtnActive : ""}`,
5407
- onClick: () => we("personal"),
5407
+ onClick: () => Ne("personal"),
5408
5408
  title: "个人",
5409
5409
  children: /* @__PURE__ */ e(_a, {})
5410
5410
  }
@@ -5414,7 +5414,7 @@ function Cd({
5414
5414
  {
5415
5415
  type: "button",
5416
5416
  className: `${w.modeToggleBtn} ${me === "life" ? w.modeToggleBtnActive : ""}`,
5417
- onClick: () => we("life"),
5417
+ onClick: () => Ne("life"),
5418
5418
  title: "生活",
5419
5419
  children: /* @__PURE__ */ e(va, {})
5420
5420
  }
@@ -5424,7 +5424,7 @@ function Cd({
5424
5424
  {
5425
5425
  type: "button",
5426
5426
  className: `${w.modeToggleBtn} ${me === "training" ? w.modeToggleBtnActive : ""}`,
5427
- onClick: () => we("training"),
5427
+ onClick: () => Ne("training"),
5428
5428
  title: "培训",
5429
5429
  children: /* @__PURE__ */ e(ka, {})
5430
5430
  }
@@ -5434,7 +5434,7 @@ function Cd({
5434
5434
  {
5435
5435
  type: "button",
5436
5436
  className: `${w.modeToggleBtn} ${me === "knowledge" ? w.modeToggleBtnActive : ""}`,
5437
- onClick: () => we("knowledge"),
5437
+ onClick: () => Ne("knowledge"),
5438
5438
  title: "知识",
5439
5439
  children: /* @__PURE__ */ e(ba, {})
5440
5440
  }
@@ -5444,7 +5444,7 @@ function Cd({
5444
5444
  {
5445
5445
  type: "button",
5446
5446
  className: `${w.modeToggleBtn} ${me === "smart" ? w.modeToggleBtnActive : ""}`,
5447
- onClick: () => we("smart"),
5447
+ onClick: () => Ne("smart"),
5448
5448
  title: "智能",
5449
5449
  children: /* @__PURE__ */ e(wa, {})
5450
5450
  }
@@ -5454,7 +5454,7 @@ function Cd({
5454
5454
  {
5455
5455
  type: "button",
5456
5456
  className: `${w.modeToggleBtn} ${me === "collaboration" ? w.modeToggleBtnActive : ""}`,
5457
- onClick: () => we("collaboration"),
5457
+ onClick: () => Ne("collaboration"),
5458
5458
  title: "协作",
5459
5459
  children: /* @__PURE__ */ e(Na, {})
5460
5460
  }
@@ -5464,7 +5464,7 @@ function Cd({
5464
5464
  {
5465
5465
  type: "button",
5466
5466
  className: `${w.modeToggleBtn} ${me === "product" ? w.modeToggleBtnActive : ""}`,
5467
- onClick: () => we("product"),
5467
+ onClick: () => Ne("product"),
5468
5468
  title: "产品",
5469
5469
  children: /* @__PURE__ */ e(Sa, {})
5470
5470
  }
@@ -5474,7 +5474,7 @@ function Cd({
5474
5474
  {
5475
5475
  type: "button",
5476
5476
  className: `${w.modeToggleBtn} ${me === "dev" ? w.modeToggleBtnActive : ""}`,
5477
- onClick: () => we("dev"),
5477
+ onClick: () => Ne("dev"),
5478
5478
  title: "研发",
5479
5479
  children: /* @__PURE__ */ e(Ca, {})
5480
5480
  }
@@ -5484,7 +5484,7 @@ function Cd({
5484
5484
  {
5485
5485
  type: "button",
5486
5486
  className: `${w.modeToggleBtn} ${me === "test" ? w.modeToggleBtnActive : ""}`,
5487
- onClick: () => we("test"),
5487
+ onClick: () => Ne("test"),
5488
5488
  title: "测试",
5489
5489
  children: /* @__PURE__ */ e(Sn, {})
5490
5490
  }
@@ -5494,7 +5494,7 @@ function Cd({
5494
5494
  {
5495
5495
  type: "button",
5496
5496
  className: `${w.modeToggleBtn} ${me === "ops" ? w.modeToggleBtnActive : ""}`,
5497
- onClick: () => we("ops"),
5497
+ onClick: () => Ne("ops"),
5498
5498
  title: "运维",
5499
5499
  children: /* @__PURE__ */ e(Ia, {})
5500
5500
  }
@@ -5504,7 +5504,7 @@ function Cd({
5504
5504
  {
5505
5505
  type: "button",
5506
5506
  className: `${w.modeToggleBtn} ${me === "admin" ? w.modeToggleBtnActive : ""}`,
5507
- onClick: () => we("admin"),
5507
+ onClick: () => Ne("admin"),
5508
5508
  title: "运营",
5509
5509
  children: /* @__PURE__ */ e(Ta, {})
5510
5510
  }
@@ -5514,7 +5514,7 @@ function Cd({
5514
5514
  {
5515
5515
  type: "button",
5516
5516
  className: `${w.modeToggleBtn} ${me === "system" ? w.modeToggleBtnActive : ""}`,
5517
- onClick: () => we("system"),
5517
+ onClick: () => Ne("system"),
5518
5518
  title: "系统",
5519
5519
  children: /* @__PURE__ */ e(La, {})
5520
5520
  }
@@ -5524,7 +5524,7 @@ function Cd({
5524
5524
  {
5525
5525
  type: "button",
5526
5526
  className: `${w.modeToggleBtn} ${me === "rpa" ? w.modeToggleBtnActive : ""}`,
5527
- onClick: () => we("rpa"),
5527
+ onClick: () => Ne("rpa"),
5528
5528
  title: "RPA",
5529
5529
  children: /* @__PURE__ */ e(xa, {})
5530
5530
  }
@@ -5589,7 +5589,7 @@ function Cd({
5589
5589
  /* ── FEATURE063: RPA 模式 ──
5590
5590
  * 左侧 RpaSidebar (7 个菜单) + 右侧 useRoutes 渲染 7 个一级页面.
5591
5591
  */
5592
- /* @__PURE__ */ e("div", { className: w.smartWorkbenchArea, children: /* @__PURE__ */ e(vd, { onModeSwitch: we }) })
5592
+ /* @__PURE__ */ e("div", { className: w.smartWorkbenchArea, children: /* @__PURE__ */ e(vd, { onModeSwitch: Ne }) })
5593
5593
  ) : me === "product" ? (
5594
5594
  /* ── 产品工作台 ── */
5595
5595
  /* @__PURE__ */ e("div", { className: w.smartWorkbenchArea, children: /* @__PURE__ */ e(kd, {}) })
@@ -5623,9 +5623,9 @@ function Cd({
5623
5623
  md,
5624
5624
  {
5625
5625
  onOpenProject: un,
5626
- onSwitchMode: ($) => we($),
5626
+ onSwitchMode: ($) => Ne($),
5627
5627
  openAgentRequest: {
5628
- agent: ne,
5628
+ agent: re,
5629
5629
  view: ye,
5630
5630
  newSession: Ue,
5631
5631
  ts: P
@@ -5684,16 +5684,16 @@ function Cd({
5684
5684
  ra,
5685
5685
  {
5686
5686
  onOpenTeamModal: o,
5687
- todoPanelVisible: H,
5687
+ todoPanelVisible: U,
5688
5688
  onToggleTodoPanel: () => z(($) => !$),
5689
- todoCount: J
5689
+ todoCount: V
5690
5690
  }
5691
5691
  ) : /* @__PURE__ */ e(sl, {}) }),
5692
5692
  /* @__PURE__ */ e(
5693
5693
  "div",
5694
5694
  {
5695
- className: `${w.todoPanel} ${H ? "" : w.todoPanelHidden}`,
5696
- children: /* @__PURE__ */ e(or, { onCountChange: X })
5695
+ className: `${w.todoPanel} ${U ? "" : w.todoPanelHidden}`,
5696
+ children: /* @__PURE__ */ e(or, { onCountChange: Z })
5697
5697
  }
5698
5698
  )
5699
5699
  ] })
@@ -5704,12 +5704,12 @@ function Cd({
5704
5704
  /* @__PURE__ */ e(
5705
5705
  ao,
5706
5706
  {
5707
- open: oe,
5708
- onClose: () => re(!1),
5707
+ open: ne,
5708
+ onClose: () => ae(!1),
5709
5709
  bindKey: S ? `${S.workspace_path}_${S.id}` : "global_scratchpad",
5710
5710
  defaultTitle: (S == null ? void 0 : S.name) || (S == null ? void 0 : S.scenario_name) || "速记",
5711
5711
  extraInfo: S ? JSON.stringify({ type: "team", id: S.id }) : "",
5712
- token: V
5712
+ token: K
5713
5713
  }
5714
5714
  ),
5715
5715
  /* @__PURE__ */ a(
@@ -5742,7 +5742,7 @@ function Cd({
5742
5742
  )
5743
5743
  ] }),
5744
5744
  /* @__PURE__ */ a("div", { className: w.announcementModalBody, children: [
5745
- /* @__PURE__ */ e("div", { className: w.announcementList, children: ae.map(($, ie) => {
5745
+ /* @__PURE__ */ e("div", { className: w.announcementList, children: oe.map(($, ie) => {
5746
5746
  const ve = $.title || $.content;
5747
5747
  return /* @__PURE__ */ e(
5748
5748
  "div",
@@ -5806,7 +5806,7 @@ function Cd({
5806
5806
  )
5807
5807
  ] });
5808
5808
  }
5809
- const Id = "_selectList_13hpp_1", Td = "_selectItem_13hpp_14", Ld = "_selectItemInfo_13hpp_32", xd = "_selectItemName_13hpp_38", $d = "_selectItemDesc_13hpp_45", Pd = "_selectedBadge_13hpp_54", Ad = "_divider_13hpp_62", Md = "_memberList_13hpp_68", Ed = "_memberRow_13hpp_72", Dd = "_memberRowLeft_13hpp_80", Fd = "_removeBtn_13hpp_86", Rd = "_searchInput_13hpp_98", Bd = "_spinBody_13hpp_119", Te = {
5809
+ const Id = "_selectList_13hpp_1", Td = "_selectItem_13hpp_14", Ld = "_selectItemInfo_13hpp_32", xd = "_selectItemName_13hpp_38", $d = "_selectItemDesc_13hpp_45", Pd = "_selectedBadge_13hpp_54", Ad = "_divider_13hpp_62", Md = "_memberList_13hpp_68", Ed = "_memberRow_13hpp_72", Dd = "_memberRowLeft_13hpp_80", Fd = "_removeBtn_13hpp_86", Rd = "_searchInput_13hpp_98", Bd = "_spinBody_13hpp_119", Le = {
5810
5810
  selectList: Id,
5811
5811
  selectItem: Td,
5812
5812
  selectItemInfo: Ld,
@@ -5833,50 +5833,50 @@ function Od({ onClose: t }) {
5833
5833
  removeMember: g,
5834
5834
  loadTeamPickerOptions: N,
5835
5835
  openAgentProfile: A
5836
- } = D();
5837
- j(() => {
5836
+ } = E();
5837
+ H(() => {
5838
5838
  N();
5839
5839
  }, [N]);
5840
- const [S, F] = c(""), [V, M] = c(""), [v, T] = c(!1), [L, H] = c(() => /* @__PURE__ */ new Set()), z = le(!1), J = (i) => i.staff_id != null && i.staff_id > 0 ? String(i.staff_id) : i.id != null && i.id > 0 ? String(i.id) : String(i.username ?? ""), X = async (i, b) => {
5840
+ const [S, F] = c(""), [K, M] = c(""), [v, T] = c(!1), [L, U] = c(() => /* @__PURE__ */ new Set()), z = le(!1), V = (i) => i.staff_id != null && i.staff_id > 0 ? String(i.staff_id) : i.id != null && i.id > 0 ? String(i.id) : String(i.username ?? ""), Z = async (i, b) => {
5841
5841
  if (!z.current) {
5842
- z.current = !0, i && H((k) => new Set(k).add(i)), T(!0);
5842
+ z.current = !0, i && U((k) => new Set(k).add(i)), T(!0);
5843
5843
  try {
5844
5844
  await b();
5845
5845
  } finally {
5846
- z.current = !1, T(!1), i && H((k) => {
5846
+ z.current = !1, T(!1), i && U((k) => {
5847
5847
  const W = new Set(k);
5848
5848
  return W.delete(i), W;
5849
5849
  });
5850
5850
  }
5851
5851
  }
5852
- }, oe = (i) => o.some(
5852
+ }, ne = (i) => o.some(
5853
5853
  (b) => b.member_type === "HUMAN" && String(b.ref_id) === i
5854
- ) || L.has(Mt("HUMAN", i)), re = (i) => o.some(
5854
+ ) || L.has(Mt("HUMAN", i)), ae = (i) => o.some(
5855
5855
  (b) => b.member_type === "AGENT" && String(b.ref_id) === i
5856
- ) || L.has(Mt("AGENT", i)), E = (i) => {
5857
- const b = J(i);
5858
- if (oe(b))
5856
+ ) || L.has(Mt("AGENT", i)), D = (i) => {
5857
+ const b = V(i);
5858
+ if (ne(b))
5859
5859
  return;
5860
5860
  const k = Mt("HUMAN", b);
5861
- X(k, async () => {
5861
+ Z(k, async () => {
5862
5862
  await m("HUMAN", b, i.display_name ?? b, "EDITOR");
5863
5863
  });
5864
5864
  }, f = (i) => {
5865
5865
  const b = Zn(i);
5866
- if (!b || re(b))
5866
+ if (!b || ae(b))
5867
5867
  return;
5868
5868
  const k = Mt("AGENT", b);
5869
- X(k, async () => {
5869
+ Z(k, async () => {
5870
5870
  await m("AGENT", b, i.name, "EDITOR");
5871
5871
  });
5872
5872
  }, _ = (i) => {
5873
- X(null, async () => {
5873
+ Z(null, async () => {
5874
5874
  await g(Dt(i));
5875
5875
  });
5876
5876
  }, C = o.filter((i) => i.member_type === "HUMAN"), I = o.filter(
5877
5877
  (i) => {
5878
- var b, k, W, Y, pe;
5879
- return i.member_type === "AGENT" && ((k = (b = i.agent_info) == null ? void 0 : b._agenthub_raw) == null ? void 0 : k.type) !== "node" && !((W = i.display_name) != null && W.startsWith("流程节点")) && !((pe = (Y = i.agent_info) == null ? void 0 : Y.name) != null && pe.startsWith("流程节点"));
5878
+ var b, k, W, J, pe;
5879
+ return i.member_type === "AGENT" && ((k = (b = i.agent_info) == null ? void 0 : b._agenthub_raw) == null ? void 0 : k.type) !== "node" && !((W = i.display_name) != null && W.startsWith("流程节点")) && !((pe = (J = i.agent_info) == null ? void 0 : J.name) != null && pe.startsWith("流程节点"));
5880
5880
  }
5881
5881
  );
5882
5882
  return /* @__PURE__ */ e(
@@ -5892,7 +5892,7 @@ function Od({ onClose: t }) {
5892
5892
  style: { width: "auto", maxWidth: 600 },
5893
5893
  children: [
5894
5894
  /* @__PURE__ */ e("div", { className: Xe.modalHeader, children: /* @__PURE__ */ e("div", { className: Xe.title, children: "👥 成员管理" }) }),
5895
- /* @__PURE__ */ e(ot, { spinning: v, description: "处理中…", children: /* @__PURE__ */ e("div", { className: Te.spinBody, children: /* @__PURE__ */ a("div", { className: Xe.modalContent, children: [
5895
+ /* @__PURE__ */ e(ot, { spinning: v, description: "处理中…", children: /* @__PURE__ */ e("div", { className: Le.spinBody, children: /* @__PURE__ */ a("div", { className: Xe.modalContent, children: [
5896
5896
  /* @__PURE__ */ a(
5897
5897
  "div",
5898
5898
  {
@@ -5914,14 +5914,14 @@ function Od({ onClose: t }) {
5914
5914
  placeholder: "搜索成员...",
5915
5915
  value: S,
5916
5916
  onChange: (i) => F(i.target.value),
5917
- className: Te.searchInput,
5917
+ className: Le.searchInput,
5918
5918
  disabled: v
5919
5919
  }
5920
5920
  ),
5921
5921
  /* @__PURE__ */ e(
5922
5922
  "div",
5923
5923
  {
5924
- className: Te.selectList,
5924
+ className: Le.selectList,
5925
5925
  style: { maxHeight: 240 },
5926
5926
  children: s.filter(
5927
5927
  (i) => {
@@ -5932,14 +5932,14 @@ function Od({ onClose: t }) {
5932
5932
  }
5933
5933
  ).map(
5934
5934
  (i) => {
5935
- const b = J(i), k = oe(b), W = L.has(
5935
+ const b = V(i), k = ne(b), W = L.has(
5936
5936
  Mt("HUMAN", b)
5937
5937
  );
5938
5938
  return /* @__PURE__ */ a(
5939
5939
  "div",
5940
5940
  {
5941
- className: Te.selectItem,
5942
- onClick: () => !k && !v && E(i),
5941
+ className: Le.selectItem,
5942
+ onClick: () => !k && !v && D(i),
5943
5943
  style: {
5944
5944
  opacity: k ? 0.5 : 1,
5945
5945
  cursor: k || v ? "default" : "pointer",
@@ -5947,14 +5947,14 @@ function Od({ onClose: t }) {
5947
5947
  },
5948
5948
  children: [
5949
5949
  /* @__PURE__ */ e("span", { children: i.avatar }),
5950
- /* @__PURE__ */ a("div", { className: Te.selectItemInfo, children: [
5951
- /* @__PURE__ */ e("div", { className: Te.selectItemName, children: i.display_name }),
5952
- /* @__PURE__ */ a("div", { className: Te.selectItemDesc, children: [
5950
+ /* @__PURE__ */ a("div", { className: Le.selectItemInfo, children: [
5951
+ /* @__PURE__ */ e("div", { className: Le.selectItemName, children: i.display_name }),
5952
+ /* @__PURE__ */ a("div", { className: Le.selectItemDesc, children: [
5953
5953
  "@",
5954
5954
  i.username
5955
5955
  ] })
5956
5956
  ] }),
5957
- W ? /* @__PURE__ */ e("span", { className: Te.selectedBadge, children: "加入中…" }) : k ? /* @__PURE__ */ e("span", { className: Te.selectedBadge, children: "已加入" }) : null
5957
+ W ? /* @__PURE__ */ e("span", { className: Le.selectedBadge, children: "加入中…" }) : k ? /* @__PURE__ */ e("span", { className: Le.selectedBadge, children: "已加入" }) : null
5958
5958
  ]
5959
5959
  },
5960
5960
  i.id ?? i.username
@@ -5971,16 +5971,16 @@ function Od({ onClose: t }) {
5971
5971
  {
5972
5972
  type: "text",
5973
5973
  placeholder: "搜索 Agent...",
5974
- value: V,
5974
+ value: K,
5975
5975
  onChange: (i) => M(i.target.value),
5976
- className: Te.searchInput,
5976
+ className: Le.searchInput,
5977
5977
  disabled: v
5978
5978
  }
5979
5979
  ),
5980
5980
  /* @__PURE__ */ e(
5981
5981
  "div",
5982
5982
  {
5983
- className: Te.selectList,
5983
+ className: Le.selectList,
5984
5984
  style: { maxHeight: 240 },
5985
5985
  children: r.filter(
5986
5986
  (i) => {
@@ -5989,15 +5989,15 @@ function Od({ onClose: t }) {
5989
5989
  }
5990
5990
  ).filter((i) => {
5991
5991
  var k, W;
5992
- if (!V) return !0;
5993
- const b = V.toLowerCase();
5992
+ if (!K) return !0;
5993
+ const b = K.toLowerCase();
5994
5994
  return ((k = i.name) == null ? void 0 : k.toLowerCase().includes(b)) || ((W = i.description) == null ? void 0 : W.toLowerCase().includes(b));
5995
5995
  }).map((i) => {
5996
- const b = Zn(i), k = b ? re(b) : !0, W = b && L.has(Mt("AGENT", b));
5996
+ const b = Zn(i), k = b ? ae(b) : !0, W = b && L.has(Mt("AGENT", b));
5997
5997
  return /* @__PURE__ */ a(
5998
5998
  "div",
5999
5999
  {
6000
- className: Te.selectItem,
6000
+ className: Le.selectItem,
6001
6001
  onClick: () => !k && !v && f(i),
6002
6002
  style: {
6003
6003
  opacity: k ? 0.5 : 1,
@@ -6008,8 +6008,8 @@ function Od({ onClose: t }) {
6008
6008
  /* @__PURE__ */ e(
6009
6009
  "div",
6010
6010
  {
6011
- onClick: (Y) => {
6012
- Y.stopPropagation(), A(i);
6011
+ onClick: (J) => {
6012
+ J.stopPropagation(), A(i);
6013
6013
  },
6014
6014
  style: {
6015
6015
  display: "flex",
@@ -6038,11 +6038,11 @@ function Od({ onClose: t }) {
6038
6038
  ) : /* @__PURE__ */ e("span", { style: { fontSize: 16 }, children: i.avatar || "🤖" })
6039
6039
  }
6040
6040
  ),
6041
- /* @__PURE__ */ a("div", { className: Te.selectItemInfo, children: [
6042
- /* @__PURE__ */ e("div", { className: Te.selectItemName, children: i.name }),
6043
- /* @__PURE__ */ e("div", { className: Te.selectItemDesc, children: i.description })
6041
+ /* @__PURE__ */ a("div", { className: Le.selectItemInfo, children: [
6042
+ /* @__PURE__ */ e("div", { className: Le.selectItemName, children: i.name }),
6043
+ /* @__PURE__ */ e("div", { className: Le.selectItemDesc, children: i.description })
6044
6044
  ] }),
6045
- W ? /* @__PURE__ */ e("span", { className: Te.selectedBadge, children: "加入中…" }) : k ? /* @__PURE__ */ e("span", { className: Te.selectedBadge, children: "已加入" }) : null
6045
+ W ? /* @__PURE__ */ e("span", { className: Le.selectedBadge, children: "加入中…" }) : k ? /* @__PURE__ */ e("span", { className: Le.selectedBadge, children: "已加入" }) : null
6046
6046
  ]
6047
6047
  },
6048
6048
  b || i.name
@@ -6054,15 +6054,15 @@ function Od({ onClose: t }) {
6054
6054
  ]
6055
6055
  }
6056
6056
  ),
6057
- /* @__PURE__ */ e("div", { className: Te.divider }),
6058
- /* @__PURE__ */ a("div", { className: Te.memberList, children: [
6057
+ /* @__PURE__ */ e("div", { className: Le.divider }),
6058
+ /* @__PURE__ */ a("div", { className: Le.memberList, children: [
6059
6059
  /* @__PURE__ */ a("div", { className: Xe.label, children: [
6060
6060
  "当前成员 (",
6061
6061
  o.length,
6062
6062
  ")"
6063
6063
  ] }),
6064
- C.map((i) => /* @__PURE__ */ a("div", { className: Te.memberRow, children: [
6065
- /* @__PURE__ */ a("div", { className: Te.memberRowLeft, children: [
6064
+ C.map((i) => /* @__PURE__ */ a("div", { className: Le.memberRow, children: [
6065
+ /* @__PURE__ */ a("div", { className: Le.memberRowLeft, children: [
6066
6066
  /* @__PURE__ */ e("span", { children: "👤" }),
6067
6067
  /* @__PURE__ */ e("span", { children: i.display_name }),
6068
6068
  /* @__PURE__ */ e(
@@ -6077,7 +6077,7 @@ function Od({ onClose: t }) {
6077
6077
  "button",
6078
6078
  {
6079
6079
  type: "button",
6080
- className: Te.removeBtn,
6080
+ className: Le.removeBtn,
6081
6081
  disabled: v,
6082
6082
  onClick: () => _(i.id),
6083
6083
  children: "移除"
@@ -6086,8 +6086,8 @@ function Od({ onClose: t }) {
6086
6086
  ] }, i.id)),
6087
6087
  I.map((i) => {
6088
6088
  var b, k;
6089
- return /* @__PURE__ */ a("div", { className: Te.memberRow, children: [
6090
- /* @__PURE__ */ a("div", { className: Te.memberRowLeft, children: [
6089
+ return /* @__PURE__ */ a("div", { className: Le.memberRow, children: [
6090
+ /* @__PURE__ */ a("div", { className: Le.memberRowLeft, children: [
6091
6091
  /* @__PURE__ */ e(
6092
6092
  "div",
6093
6093
  {
@@ -6145,7 +6145,7 @@ function Od({ onClose: t }) {
6145
6145
  "button",
6146
6146
  {
6147
6147
  type: "button",
6148
- className: Te.removeBtn,
6148
+ className: Le.removeBtn,
6149
6149
  disabled: v,
6150
6150
  onClick: () => _(i.id),
6151
6151
  children: "移除"
@@ -6224,12 +6224,12 @@ async function zd(t) {
6224
6224
  }
6225
6225
  const A = N.body.getReader(), S = new TextDecoder();
6226
6226
  for (; ; ) {
6227
- const { done: F, value: V } = await A.read();
6227
+ const { done: F, value: K } = await A.read();
6228
6228
  if (F) break;
6229
6229
  yt({
6230
6230
  type: "chunk",
6231
6231
  requestId: o,
6232
- payload: S.decode(V, { stream: !0 })
6232
+ payload: S.decode(K, { stream: !0 })
6233
6233
  });
6234
6234
  }
6235
6235
  yt({ type: "end", requestId: o });
@@ -6309,7 +6309,7 @@ function Yd({
6309
6309
  forcedChatMode: t
6310
6310
  } = {}) {
6311
6311
  const o = Xo(), r = ea(), s = t !== "system" && Ga() && !qa(o.search);
6312
- j(() => {
6312
+ H(() => {
6313
6313
  s && st.replace({
6314
6314
  pathname: "/workspace/phone",
6315
6315
  search: o.search
@@ -6321,182 +6321,181 @@ function Yd({
6321
6321
  return null;
6322
6322
  const h = Number(R);
6323
6323
  return Number.isFinite(h) && h > 0 ? h : null;
6324
- }, [o.search]), { currentProject: g, currentUser: N, projects: A, token: S } = D(
6324
+ }, [o.search]), { currentProject: g, currentUser: N, projects: A, token: S } = E(
6325
6325
  mn((p) => ({
6326
6326
  currentProject: p.currentProject,
6327
6327
  currentUser: p.currentUser,
6328
6328
  projects: p.projects,
6329
6329
  token: p.token
6330
6330
  }))
6331
- ), F = D((p) => p.loadProjects), V = D((p) => p.loadRunningExecutions), M = D((p) => p.updateCurrentUser), v = D((p) => p.selectFile), T = D((p) => p.clearCurrentProject), [L, H] = c(!1), [z, J] = c(!1), [X, oe] = c(null), re = le(!1), E = le(!1);
6332
- j(() => {
6331
+ ), F = E((p) => p.loadProjects), K = E((p) => p.loadRunningExecutions), M = E((p) => p.updateCurrentUser), v = E((p) => p.selectFile), T = E((p) => p.clearCurrentProject), [L, U] = c(!1), [z, V] = c(!1), [Z, ne] = c(null), ae = le(!1), D = le(!1);
6332
+ H(() => {
6333
6333
  Gd(S);
6334
- }, [S]), j(() => {
6334
+ }, [S]), H(() => {
6335
6335
  const p = zt.parse(o.search), R = String(p.newChat ?? "").trim();
6336
6336
  if (!R) return;
6337
- /^(1|true)$/i.test(R) || oe(R), re.current = !0, J(!0), delete p.newChat;
6337
+ /^(1|true)$/i.test(R) || ne(R), ae.current = !0, V(!0), delete p.newChat;
6338
6338
  const h = zt.stringify(p);
6339
6339
  st.replace({
6340
6340
  pathname: o.pathname,
6341
6341
  search: h ? `?${h}` : ""
6342
6342
  });
6343
- }, [o.search, o.pathname]), j(() => {
6343
+ }, [o.search, o.pathname]), H(() => {
6344
6344
  const p = (g == null ? void 0 : g.id) ?? null;
6345
- if (p != null && !E.current) {
6346
- E.current = !0;
6345
+ if (p != null && !D.current) {
6346
+ D.current = !0;
6347
6347
  return;
6348
6348
  }
6349
- p != null && z && J(!1);
6349
+ p != null && z && V(!1);
6350
6350
  }, [g == null ? void 0 : g.id, z]);
6351
6351
  const [f, _] = c(
6352
- () => !!D.getState().currentUser
6353
- ), [C, I] = c(!1), [i, b] = c(null), k = le(!1), W = le(null), Y = le(null), pe = le(m);
6354
- return pe.current = m, j(() => {
6355
- W.current = null, Y.current = null;
6356
- }, [m]), j(() => {
6352
+ () => !!E.getState().currentUser
6353
+ ), [C, I] = c(!1), [i, b] = c(null), k = le(!1), W = le(null), J = le(null), pe = le(m);
6354
+ return pe.current = m, H(() => {
6355
+ W.current = null, J.current = null;
6356
+ }, [m]), H(() => {
6357
6357
  Ho();
6358
- const p = D.getState().token;
6358
+ const p = E.getState().token;
6359
6359
  if (p && zo(p)) {
6360
- localStorage.removeItem("z_team_token"), localStorage.removeItem("token"), localStorage.removeItem("USER_INFO"), D.setState({ token: "", currentUser: null }), tn();
6360
+ localStorage.removeItem("z_team_token"), localStorage.removeItem("token"), localStorage.removeItem("USER_INFO"), E.setState({ token: "", currentUser: null }), tn();
6361
6361
  return;
6362
6362
  }
6363
- if (D.getState().currentUser) {
6364
- const K = D.getState().token;
6365
- K && vn(K, M).catch(() => {
6363
+ if (E.getState().currentUser) {
6364
+ const re = E.getState().token;
6365
+ re && vn(re, M).catch(() => {
6366
6366
  });
6367
6367
  return;
6368
6368
  }
6369
6369
  let R = !1, h = 0;
6370
- const O = 100;
6371
- let Se = !1, Ce = 0;
6372
- const ge = 3, ae = (K) => {
6373
- const ne = D.getState().token;
6370
+ const j = 100;
6371
+ let Ce = !1, Ie = 0;
6372
+ const ge = 3, oe = (re) => {
6373
+ const B = E.getState().token;
6374
6374
  if (pe.current != null) {
6375
- R || (M(Ln(K)), _(!0)), vn(ne, (ye) => {
6376
- R || M(ye);
6375
+ R || (M(Ln(re)), _(!0)), vn(B, (we) => {
6376
+ R || M(we);
6377
6377
  }).catch(() => {
6378
- !R && ne && (localStorage.removeItem("z_team_token"), D.setState({ token: "" }));
6378
+ !R && B && (localStorage.removeItem("z_team_token"), E.setState({ token: "" }));
6379
6379
  });
6380
6380
  return;
6381
6381
  }
6382
- vn(ne, (ye) => {
6383
- R || M(ye);
6382
+ vn(B, (we) => {
6383
+ R || M(we);
6384
6384
  }).catch(() => {
6385
- R || (ne && (localStorage.removeItem("z_team_token"), D.setState({ token: "" })), M(Ln(K)));
6385
+ R || (B && (localStorage.removeItem("z_team_token"), E.setState({ token: "" })), M(Ln(re)));
6386
6386
  }).finally(() => {
6387
6387
  R || _(!0);
6388
6388
  });
6389
6389
  };
6390
- return (() => {
6390
+ (() => {
6391
6391
  if (R) return;
6392
- const K = async () => {
6392
+ const re = async () => {
6393
6393
  if (R) return;
6394
- let ne = Go();
6395
- if ((!ne || !Tn(ne)) && !Se) {
6396
- Se = !0;
6394
+ let B = Go();
6395
+ if ((!B || !Tn(B)) && !Ce) {
6396
+ Ce = !0;
6397
6397
  try {
6398
- const U = await Uo();
6399
- U.kind === "authenticated" ? ne = U.user : U.kind === "unauthenticated" && (Ce += 1);
6398
+ const ye = await Uo();
6399
+ ye.kind === "authenticated" ? B = ye.user : ye.kind === "unauthenticated" && (Ie += 1);
6400
6400
  } catch {
6401
6401
  } finally {
6402
- Se = !1;
6402
+ Ce = !1;
6403
6403
  }
6404
6404
  }
6405
- if (ne && Tn(ne)) {
6406
- ae(ne);
6405
+ if (B && Tn(B)) {
6406
+ oe(B);
6407
6407
  return;
6408
6408
  }
6409
- if (Ce >= ge) {
6409
+ if (Ie >= ge) {
6410
6410
  tn();
6411
6411
  return;
6412
6412
  }
6413
- if (h += 1, h >= O) {
6413
+ if (h += 1, h >= j) {
6414
6414
  tn();
6415
6415
  return;
6416
6416
  }
6417
6417
  window.setTimeout(() => {
6418
- K();
6418
+ re();
6419
6419
  }, 150);
6420
6420
  };
6421
- K();
6422
- })(), () => {
6423
- R = !0;
6424
- };
6425
- }, [M]), j(() => {
6426
- const p = window.setTimeout(() => {
6427
- I(!0);
6421
+ re();
6422
+ })();
6423
+ const ee = window.setTimeout(() => {
6424
+ !R && !E.getState().currentUser && I(!0);
6428
6425
  }, 2e4);
6429
- return () => window.clearTimeout(p);
6430
- }, []), j(() => {
6426
+ return () => {
6427
+ R = !0, window.clearTimeout(ee);
6428
+ };
6429
+ }, [M]), H(() => {
6431
6430
  !N && f && (localStorage.getItem("z_team_token") || r("/login", { replace: !0 }));
6432
- }, [N, f, r]), j(() => {
6431
+ }, [N, f, r]), H(() => {
6433
6432
  if (N) {
6434
6433
  const p = localStorage.getItem("ft_sidebar_time_filter") || "all", R = p === "1d" ? 1 : p === "3d" ? 3 : p === "7d" ? 7 : 0;
6435
6434
  if (R > 0) {
6436
- const h = new Date(Date.now() - R * 864e5), O = `${h.getFullYear()}-${String(h.getMonth() + 1).padStart(
6435
+ const h = new Date(Date.now() - R * 864e5), j = `${h.getFullYear()}-${String(h.getMonth() + 1).padStart(
6437
6436
  2,
6438
6437
  "0"
6439
6438
  )}-${String(h.getDate()).padStart(2, "0")}`;
6440
- F(O);
6439
+ F(j);
6441
6440
  } else
6442
6441
  F();
6443
6442
  }
6444
- }, [N, F]), j(() => {
6443
+ }, [N, F]), H(() => {
6445
6444
  if (!N || k.current || m != null) return;
6446
- const p = D.getState().lastSelectedProjectId, R = D.getState().lastSelectedFilePath;
6445
+ const p = E.getState().lastSelectedProjectId, R = E.getState().lastSelectedFilePath;
6447
6446
  if (!p) return;
6448
- let h = !1, O = null;
6449
- const Se = async () => {
6447
+ let h = !1, j = null;
6448
+ const Ce = async () => {
6450
6449
  if (h || k.current) return;
6451
- if (re.current) {
6450
+ if (ae.current) {
6452
6451
  k.current = !0;
6453
6452
  return;
6454
6453
  }
6455
- const Ce = D.getState().projects;
6456
- if (Ce.length === 0) {
6457
- O = setTimeout(() => {
6458
- Se();
6454
+ const Ie = E.getState().projects;
6455
+ if (Ie.length === 0) {
6456
+ j = setTimeout(() => {
6457
+ Ce();
6459
6458
  }, 100);
6460
6459
  return;
6461
6460
  }
6462
- const ge = Ce.find((x) => String(x.id) === String(p));
6461
+ const ge = Ie.find((x) => String(x.id) === String(p));
6463
6462
  if (!ge) {
6464
6463
  k.current = !0;
6465
6464
  return;
6466
6465
  }
6467
- const ae = D.getState();
6468
- if (ae.currentProject && String(ae.currentProject.id) === String(p)) {
6466
+ const oe = E.getState();
6467
+ if (oe.currentProject && String(oe.currentProject.id) === String(p)) {
6469
6468
  k.current = !0;
6470
6469
  return;
6471
6470
  }
6472
- if (k.current = !0, await D.getState().expandProject(ge), !(h || !R))
6471
+ if (k.current = !0, await E.getState().expandProject(ge), !(h || !R))
6473
6472
  try {
6474
6473
  await v(R);
6475
6474
  } catch {
6476
6475
  localStorage.removeItem("ft_last_file_path");
6477
6476
  }
6478
6477
  };
6479
- return Se(), () => {
6480
- h = !0, O != null && clearTimeout(O);
6478
+ return Ce(), () => {
6479
+ h = !0, j != null && clearTimeout(j);
6481
6480
  };
6482
- }, [N, A, v, m]), j(() => {
6483
- var Ce;
6484
- if (!f || m == null || !D.getState().currentUser)
6481
+ }, [N, A, v, m]), H(() => {
6482
+ var Ie;
6483
+ if (!f || m == null || !E.getState().currentUser)
6485
6484
  return;
6486
- const p = m == null ? "" : String(m), R = D.getState();
6487
- if (It((Ce = R.currentProject) == null ? void 0 : Ce.id, p)) {
6488
- W.current = p, k.current = !0, eo(), D.getState().loadMessages().catch(() => {
6485
+ const p = m == null ? "" : String(m), R = E.getState();
6486
+ if (It((Ie = R.currentProject) == null ? void 0 : Ie.id, p)) {
6487
+ W.current = p, k.current = !0, eo(), E.getState().loadMessages().catch(() => {
6489
6488
  });
6490
6489
  return;
6491
6490
  }
6492
- if (It(W.current, p) || It(Y.current, p))
6491
+ if (It(W.current, p) || It(J.current, p))
6493
6492
  return;
6494
6493
  let h = !1;
6495
- Y.current = p, k.current = !0, b(p);
6496
- const O = async () => {
6494
+ J.current = p, k.current = !0, b(p);
6495
+ const j = async () => {
6497
6496
  const ge = Date.now() + 4e3;
6498
6497
  for (; Date.now() < ge; ) {
6499
- if (h || !D.getState().loading)
6498
+ if (h || !E.getState().loading)
6500
6499
  return;
6501
6500
  await new Promise((x) => setTimeout(x, 50));
6502
6501
  }
@@ -6507,55 +6506,55 @@ function Yd({
6507
6506
  0
6508
6507
  );
6509
6508
  try {
6510
- if (await O(), h)
6509
+ if (await j(), h)
6511
6510
  return;
6512
- let { token: ae, projects: x, expandProject: K } = D.getState(), ne = x.find((U) => U.id === p);
6513
- if (!ne) {
6514
- const U = await Ra(p, ae);
6511
+ let { token: oe, projects: x, expandProject: ee } = E.getState(), re = x.find((B) => B.id === p);
6512
+ if (!re) {
6513
+ const B = await Ra(p, oe);
6515
6514
  if (h)
6516
6515
  return;
6517
- if (U.status === "NOT_FOUND" || !U.scenarioInstance) {
6516
+ if (B.status === "NOT_FOUND" || !B.scenarioInstance) {
6518
6517
  xn.info("无此工程");
6519
6518
  return;
6520
6519
  }
6521
- if (ne = await Ba(p, ae), h)
6520
+ if (re = await Ba(p, oe), h)
6522
6521
  return;
6523
6522
  }
6524
- await K(ne), h || (W.current = p, eo());
6523
+ await ee(re), h || (W.current = p, eo());
6525
6524
  } catch {
6526
6525
  } finally {
6527
- ge(), b(null), It(Y.current, p) && (Y.current = null), (() => {
6528
- const ae = localStorage.getItem("ft_sidebar_time_filter") || "all", x = ae === "1d" ? 1 : ae === "3d" ? 3 : ae === "7d" ? 7 : 0;
6526
+ ge(), b(null), It(J.current, p) && (J.current = null), (() => {
6527
+ const oe = localStorage.getItem("ft_sidebar_time_filter") || "all", x = oe === "1d" ? 1 : oe === "3d" ? 3 : oe === "7d" ? 7 : 0;
6529
6528
  if (x > 0) {
6530
- const K = new Date(Date.now() - x * 864e5), ne = `${K.getFullYear()}-${String(
6531
- K.getMonth() + 1
6532
- ).padStart(2, "0")}-${String(K.getDate()).padStart(2, "0")}`;
6533
- D.getState().loadProjects(ne);
6529
+ const ee = new Date(Date.now() - x * 864e5), re = `${ee.getFullYear()}-${String(
6530
+ ee.getMonth() + 1
6531
+ ).padStart(2, "0")}-${String(ee.getDate()).padStart(2, "0")}`;
6532
+ E.getState().loadProjects(re);
6534
6533
  } else
6535
- D.getState().loadProjects();
6534
+ E.getState().loadProjects();
6536
6535
  })();
6537
6536
  }
6538
6537
  })(), () => {
6539
- h = !0, It(Y.current, p) && (Y.current = null);
6538
+ h = !0, It(J.current, p) && (J.current = null);
6540
6539
  };
6541
- }, [f, m]), j(() => {
6540
+ }, [f, m]), H(() => {
6542
6541
  if (!g) return;
6543
- D.getState().setObserverStatus(null);
6542
+ E.getState().setObserverStatus(null);
6544
6543
  const p = () => {
6545
- const ge = D.getState();
6544
+ const ge = E.getState();
6546
6545
  ge.loadMessages().catch(() => {
6547
6546
  }), ge.loadRunningExecutions().catch(() => {
6548
6547
  });
6549
- const ae = ge.activeTaskChat;
6550
- ae != null && ae.taskId && ge.loadTaskMessages(ae.taskId).catch(() => {
6548
+ const oe = ge.activeTaskChat;
6549
+ oe != null && oe.taskId && ge.loadTaskMessages(oe.taskId).catch(() => {
6551
6550
  }), ge.loadFileTree(void 0, !0).catch(() => {
6552
6551
  });
6553
6552
  }, R = Fo((ge) => {
6554
- D.getState().setWsState(ge);
6553
+ E.getState().setWsState(ge);
6555
6554
  });
6556
- Ro(g.id, S, p), V().catch(() => {
6555
+ Ro(g.id, S, p), K().catch(() => {
6557
6556
  });
6558
- const h = D.getState(), { handler: O, dispose: Se } = sa({
6557
+ const h = E.getState(), { handler: j, dispose: Ce } = sa({
6559
6558
  projectId: g.id,
6560
6559
  token: S,
6561
6560
  updateExecution: h.updateExecution,
@@ -6567,9 +6566,9 @@ function Yd({
6567
6566
  deleteMessage: h.deleteMessage,
6568
6567
  updateMessageReadStatus: h.updateMessageReadStatus,
6569
6568
  loadFileTree: h.loadFileTree
6570
- }), Ce = Oo(O);
6569
+ }), Ie = Oo(j);
6571
6570
  return () => {
6572
- Ce(), Se(), Bo(), R(), D.getState().setObserverStatus(null);
6571
+ Ie(), Ce(), Bo(), R(), E.getState().setObserverStatus(null);
6573
6572
  };
6574
6573
  }, [g == null ? void 0 : g.id, S]), s ? /* @__PURE__ */ e("div", { className: Ht.loadingWrap, children: /* @__PURE__ */ e(ot, { description: "正在进入移动版工作台…" }) }) : !f || !N ? C ? /* @__PURE__ */ a("div", { className: Ht.loadingWrap, children: [
6575
6574
  /* @__PURE__ */ e(ot, { description: "" }),
@@ -6597,18 +6596,18 @@ function Yd({
6597
6596
  Cd,
6598
6597
  {
6599
6598
  onNewProject: () => {
6600
- D.getState().currentProject && T();
6599
+ E.getState().currentProject && T();
6601
6600
  },
6602
- onOpenTeam: () => H(!0),
6601
+ onOpenTeam: () => U(!0),
6603
6602
  forcedChatMode: t,
6604
6603
  showNewChat: z,
6605
- presetNewChatScenario: X,
6606
- onOpenNewChat: () => J(!0),
6607
- onCloseNewChat: () => J(!1)
6604
+ presetNewChatScenario: Z,
6605
+ onOpenNewChat: () => V(!0),
6606
+ onCloseNewChat: () => V(!1)
6608
6607
  }
6609
6608
  ),
6610
6609
  i != null ? /* @__PURE__ */ e("div", { className: Ht.openingOverlay, children: /* @__PURE__ */ e(ot, { description: `正在打开工程 ${i}…` }) }) : null,
6611
- L && /* @__PURE__ */ e(Od, { onClose: () => H(!1) }),
6610
+ L && /* @__PURE__ */ e(Od, { onClose: () => U(!1) }),
6612
6611
  /* @__PURE__ */ e(Ea, {})
6613
6612
  ] });
6614
6613
  }