@yuku123/z-team-component 0.2.126 → 0.2.127

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (47) hide show
  1. package/dist/{ChangeLogView-hwkY-Pxj.js → ChangeLogView-BWcf9eFT.js} +1 -1
  2. package/dist/{ComponentDoc-CKmtNnh_.js → ComponentDoc-MAAFSdex.js} +3 -3
  3. package/dist/{InvitationManagementPage-ClQ_7XHg.js → InvitationManagementPage-DB3CeBs-.js} +1 -1
  4. package/dist/{OnboardingPage-5lzdybfe.js → OnboardingPage-KwEQlQ9m.js} +2 -2
  5. package/dist/{ScheduledTasks-oj2tZe__.js → ScheduledTasks-BQnjn17C.js} +4193 -4249
  6. package/dist/{SystemShell-Bo3Ng6_d.js → SystemShell-xfKRXTHa.js} +4 -4
  7. package/dist/{admin-logs-BokQn7fB.js → admin-logs-BBniVCWG.js} +1 -1
  8. package/dist/{api-BZs1eLa_.js → api-CErncfky.js} +1 -1
  9. package/dist/{api-5yDkyF00.js → api-CIzOXga5.js} +1 -1
  10. package/dist/{createWorkspaceWsHandler-Cd7unuWy.js → createWorkspaceWsHandler-DZc2EeOE.js} +4570 -4748
  11. package/dist/{index-DWCdywD4.js → index-9cmnvhwH.js} +6 -6
  12. package/dist/index-BK0TLurx.js +1718 -0
  13. package/dist/{index-BX8H830P.js → index-BNfRZbfa.js} +2 -2
  14. package/dist/{index-CnDetS6K.js → index-BPDcCJys.js} +161 -173
  15. package/dist/{index-rp3qgBky.js → index-BTnwvvjN.js} +3 -3
  16. package/dist/{index-BfTdO2nT.js → index-BWlQEPJO.js} +3031 -3058
  17. package/dist/{index-D_7JpAQa.js → index-BZdTJbw5.js} +1 -1
  18. package/dist/{index-ur6gpyT1.js → index-BbmFLkXG.js} +3 -3
  19. package/dist/{index-DMHKU_G5.js → index-Bchg8LCD.js} +1 -1
  20. package/dist/{index-CbVvlL_b.js → index-BkbSCWQ7.js} +40 -38
  21. package/dist/{index-Cg6G_t44.js → index-BmgJG2c3.js} +2 -2
  22. package/dist/{index-C75zXxPM.js → index-BsxfUGiv.js} +3 -3
  23. package/dist/{index-BoXsk4dS.js → index-C6uTjD16.js} +2 -2
  24. package/dist/{index-y1YkonCi.js → index-CcsEH7Y7.js} +3 -3
  25. package/dist/{index-BlPEzCfX.js → index-CjKs2OyG.js} +2 -2
  26. package/dist/{index-DxjUlEU_.js → index-Cqzxd3l5.js} +2 -2
  27. package/dist/{index-DXa_PuZH.js → index-Cxz8YOXI.js} +3 -3
  28. package/dist/{index-BwIpkciY.js → index-D7PjZbJz.js} +291 -295
  29. package/dist/{index-CHzNasWa.js → index-DMScwqnC.js} +1 -1
  30. package/dist/{index-D3lnAFF-.js → index-DTRR9SFq.js} +4 -4
  31. package/dist/{index-BTNBi5rr.js → index-DVdVtFor.js} +2 -2
  32. package/dist/{index-BMk_Sumc.js → index-DmO4sKus.js} +2 -2
  33. package/dist/{index-B9Y6yPZO.js → index-DqAba7Rt.js} +1 -1
  34. package/dist/{index-B_rGKW7y.js → index-HU-dTCwe.js} +3 -3
  35. package/dist/{index-U_bR1irL.js → index-nu3p6CB7.js} +34 -41
  36. package/dist/{index-BFg1y572.js → index-vn1AwgKA.js} +2 -2
  37. package/dist/index.js +1 -1
  38. package/dist/{instance-CTEy2yAP.js → instance-C7K_c-Ic.js} +31 -61
  39. package/dist/{menuPermission-Cm2AFp2N.js → menuPermission-ClR4xmR1.js} +3 -3
  40. package/dist/pages.js +1 -1
  41. package/dist/{send-default-agent-team-message-D4Ji6TrR.js → send-default-agent-team-message-BkUCZ7h9.js} +1 -1
  42. package/dist/{sso-user-BAkLqzuY.js → sso-user-B9VemiQi.js} +1 -1
  43. package/dist/{training-CxX8t9Ha.js → training-s01hnxH7.js} +1 -1
  44. package/dist/{webide-4JYjdOGz.js → webide-CJ8I_wyf.js} +3 -3
  45. package/dist/z-team-component.css +1 -1
  46. package/package.json +1 -1
  47. package/dist/index-BzHxN3Tj.js +0 -1645
@@ -1,18 +1,18 @@
1
- import { jsxs as i, jsx as e, Fragment as ge } from "react/jsx-runtime";
2
- import { S as Tn, P as In } from "./webide-4JYjdOGz.js";
1
+ import { jsxs as o, jsx as e, Fragment as ge } from "react/jsx-runtime";
2
+ import { S as Tn, P as In } from "./webide-CJ8I_wyf.js";
3
3
  import { message as Me, Tooltip as Qe, Dropdown as fn } from "antd";
4
- import { MessageOutlined as Sn, MoreOutlined as st, DashboardOutlined as Ln, MenuUnfoldOutlined as lt, MenuFoldOutlined as ot, RightOutlined as it, SettingOutlined as An, TeamOutlined as ct, FolderOpenOutlined as rt, BarChartOutlined as dt, PieChartOutlined as ut, CodeOutlined as mt, LinkOutlined as pt, UnorderedListOutlined as On, FileTextOutlined as nn, ReadOutlined as ht, ConsoleSqlOutlined as gt, PlayCircleOutlined as bt, PlusOutlined as yt, ClockCircleOutlined as ft, AppstoreOutlined as vt } from "@ant-design/icons";
5
- import { useState as d, useRef as Oe, useCallback as U, useEffect as A, useMemo as X } from "react";
6
- import { u as re, _ as Dn, n as q, $ as Nt, a0 as _t, a1 as kt, a2 as Ct, a3 as wt, a4 as Tt, t as It, a5 as St, a6 as je, a7 as Lt, a8 as At } from "./ComponentDoc-CKmtNnh_.js";
7
- import { f as Xe, c as Ye, a as Ot, d as Dt, b as $n, s, T as $t, R as Je, D as Ke, e as xt, g as Bt, F as qe, P as Rt, L as Pt, A as Et, C as Mt, h as jt, i as Ht, p as Ft, j as Kt, k as vn, l as Nn, W as Wt, m as Ut, S as Vt, n as Gt, o as Zt, r as zt, q as Qt, U as Xt, t as Yt, u as Jt, v as qt } from "./index-BfTdO2nT.js";
8
- import { a as Fe, u as xn, i as ea, s as _n } from "./createWorkspaceWsHandler-Cd7unuWy.js";
9
- import { h as Bn, f as na } from "./index-CHzNasWa.js";
10
- import { W as en, b as We, T as Rn, c as Pn, a as En, L as Mn, P as jn, S as ta, E as aa, C as sa } from "./ScheduledTasks-oj2tZe__.js";
4
+ import { MessageOutlined as Sn, MoreOutlined as st, DashboardOutlined as Ln, MenuUnfoldOutlined as lt, MenuFoldOutlined as it, RightOutlined as ot, SettingOutlined as An, TeamOutlined as ct, FolderOpenOutlined as rt, BarChartOutlined as dt, PieChartOutlined as ut, CodeOutlined as mt, LinkOutlined as pt, UnorderedListOutlined as Dn, FileTextOutlined as nn, ReadOutlined as ht, ConsoleSqlOutlined as gt, PlayCircleOutlined as bt, PlusOutlined as yt, ClockCircleOutlined as ft, AppstoreOutlined as vt } from "@ant-design/icons";
5
+ import { useState as d, useRef as De, useCallback as U, useEffect as A, useMemo as X } from "react";
6
+ import { u as re, _ as On, n as q, $ as Nt, a0 as _t, a1 as kt, a2 as Ct, a3 as wt, a4 as Tt, t as It, a5 as St, a6 as je, a7 as Lt, a8 as At } from "./ComponentDoc-MAAFSdex.js";
7
+ import { f as Xe, c as Ye, a as Dt, d as Ot, b as $n, s, T as $t, R as Je, D as Ke, e as xt, g as Bt, F as qe, P as Rt, L as Pt, A as Et, C as Mt, h as jt, i as Ht, p as Ft, j as Kt, k as vn, l as Nn, W as Wt, m as Ut, S as Vt, n as Gt, o as Zt, r as zt, q as Qt, U as Xt, t as Yt, u as Jt, v as qt } from "./index-BWlQEPJO.js";
8
+ import { a as Fe, u as xn, i as ea, s as _n } from "./createWorkspaceWsHandler-DZc2EeOE.js";
9
+ import { h as Bn, f as na } from "./index-DMScwqnC.js";
10
+ import { W as en, b as We, T as Rn, c as Pn, a as En, L as Mn, P as jn, S as ta, E as aa, C as sa } from "./ScheduledTasks-BQnjn17C.js";
11
11
  import { TodoTab as Hn } from "@yuku123/z-task-component";
12
- const la = "_sidebarInner_1vu3c_1", oa = "_header_1vu3c_8", ia = "_headerActions_1vu3c_19", ca = "_tabBar_1vu3c_26", ra = "_tab_1vu3c_26", da = "_tabActive_1vu3c_50", ua = "_btnSm_1vu3c_66", ma = "_agentSection_1vu3c_84", pa = "_agentItem_1vu3c_90", ha = "_agentItemActive_1vu3c_112", ga = "_agentAvatar_1vu3c_117", ba = "_agentName_1vu3c_130", ya = "_emptyState_1vu3c_156", fa = "_createInputRow_1vu3c_168", va = "_createInput_1vu3c_168", Na = "_createConfirmBtn_1vu3c_188", _a = "_contextMenu_1vu3c_205", ka = "_contextMenuItem_1vu3c_216", Ca = "_contextMenuItemDanger_1vu3c_231", wa = "_contextMenuDivider_1vu3c_239", Ta = "_renameOverlay_1vu3c_246", Ia = "_renameDialog_1vu3c_259", Sa = "_renameTitle_1vu3c_267", La = "_renameInput_1vu3c_274", Aa = "_renameActions_1vu3c_289", Oa = "_renameBtn_1vu3c_295", Da = "_renameBtnPrimary_1vu3c_309", $a = "_agentDetailBtn_1vu3c_326", xa = "_agentItemShared_1vu3c_358", Ba = "_agentInfo_1vu3c_362", Ra = "_agentOwner_1vu3c_374", Pa = "_sharedBadge_1vu3c_382", Ea = "_createLocalDialog_1vu3c_430", Ma = "_createLocalLabel_1vu3c_438", ja = "_agentTypeCards_1vu3c_446", Ha = "_agentTypeCard_1vu3c_446", Fa = "_agentTypeIcon_1vu3c_474", Ka = "_agentTypeBody_1vu3c_487", Wa = "_agentTypeTitle_1vu3c_494", Ua = "_agentTypeDesc_1vu3c_500", Va = "_agentTypeBadge_1vu3c_506", l = {
12
+ const la = "_sidebarInner_1vu3c_1", ia = "_header_1vu3c_8", oa = "_headerActions_1vu3c_19", ca = "_tabBar_1vu3c_26", ra = "_tab_1vu3c_26", da = "_tabActive_1vu3c_50", ua = "_btnSm_1vu3c_66", ma = "_agentSection_1vu3c_84", pa = "_agentItem_1vu3c_90", ha = "_agentItemActive_1vu3c_112", ga = "_agentAvatar_1vu3c_117", ba = "_agentName_1vu3c_130", ya = "_emptyState_1vu3c_156", fa = "_createInputRow_1vu3c_168", va = "_createInput_1vu3c_168", Na = "_createConfirmBtn_1vu3c_188", _a = "_contextMenu_1vu3c_205", ka = "_contextMenuItem_1vu3c_216", Ca = "_contextMenuItemDanger_1vu3c_231", wa = "_contextMenuDivider_1vu3c_239", Ta = "_renameOverlay_1vu3c_246", Ia = "_renameDialog_1vu3c_259", Sa = "_renameTitle_1vu3c_267", La = "_renameInput_1vu3c_274", Aa = "_renameActions_1vu3c_289", Da = "_renameBtn_1vu3c_295", Oa = "_renameBtnPrimary_1vu3c_309", $a = "_agentDetailBtn_1vu3c_326", xa = "_agentItemShared_1vu3c_358", Ba = "_agentInfo_1vu3c_362", Ra = "_agentOwner_1vu3c_374", Pa = "_sharedBadge_1vu3c_382", Ea = "_createLocalDialog_1vu3c_430", Ma = "_createLocalLabel_1vu3c_438", ja = "_agentTypeCards_1vu3c_446", Ha = "_agentTypeCard_1vu3c_446", Fa = "_agentTypeIcon_1vu3c_474", Ka = "_agentTypeBody_1vu3c_487", Wa = "_agentTypeTitle_1vu3c_494", Ua = "_agentTypeDesc_1vu3c_500", Va = "_agentTypeBadge_1vu3c_506", l = {
13
13
  sidebarInner: la,
14
- header: oa,
15
- headerActions: ia,
14
+ header: ia,
15
+ headerActions: oa,
16
16
  tabBar: ca,
17
17
  tab: ra,
18
18
  tabActive: da,
@@ -35,8 +35,8 @@ const la = "_sidebarInner_1vu3c_1", oa = "_header_1vu3c_8", ia = "_headerActions
35
35
  renameTitle: Sa,
36
36
  renameInput: La,
37
37
  renameActions: Aa,
38
- renameBtn: Oa,
39
- renameBtnPrimary: Da,
38
+ renameBtn: Da,
39
+ renameBtnPrimary: Oa,
40
40
  agentDetailBtn: $a,
41
41
  agentItemShared: xa,
42
42
  agentInfo: Ba,
@@ -75,24 +75,24 @@ function Ga({
75
75
  selectedLocalAgentId: m,
76
76
  onSelectAgent: p,
77
77
  onShowDetail: N,
78
- onChatWithAgent: C
78
+ onChatWithAgent: w
79
79
  }) {
80
80
  const T = re((t) => t.token), g = re((t) => t.personalChatNav), [I, B] = d(
81
81
  g.tab === "shared" ? "shared" : "remote"
82
- ), [S, R] = d([]), [j, O] = d(!1), [y, b] = d(!1), [P, _] = d(""), [D, E] = d(!1), [L, F] = d(null), [M, $] = d(null), [Z, oe] = d(!1), [V, w] = d([]), [K, h] = d(!1), [ie, Y] = d(null), [we, ee] = d(!1), [Te, Ie] = d([]), [be, ce] = d(!1), [ne, De] = d(!1), ye = Oe(null), z = U(async () => {
83
- O(!0);
82
+ ), [S, R] = d([]), [j, D] = d(!1), [y, b] = d(!1), [P, _] = d(""), [O, E] = d(!1), [L, F] = d(null), [M, $] = d(null), [Z, ie] = d(!1), [V, C] = d([]), [K, h] = d(!1), [oe, Y] = d(null), [Ce, ee] = d(!1), [we, Te] = d([]), [be, ce] = d(!1), [ne, Oe] = d(!1), ye = De(null), z = U(async () => {
83
+ D(!0);
84
84
  try {
85
- const t = await Dn(T);
85
+ const t = await On(T);
86
86
  R(t), c && !t.find((f) => q(f.id, c)) && p(null);
87
87
  } catch {
88
88
  } finally {
89
- O(!1);
89
+ D(!1);
90
90
  }
91
91
  }, [T, c, p]), fe = U(async () => {
92
92
  h(!0);
93
93
  try {
94
94
  const t = await Nt(T);
95
- w(t);
95
+ C(t);
96
96
  } catch {
97
97
  } finally {
98
98
  h(!1);
@@ -106,9 +106,9 @@ function Ga({
106
106
  const de = U(async () => {
107
107
  try {
108
108
  const t = await Xe();
109
- Ie(t);
109
+ Te(t);
110
110
  } catch {
111
- Ie([]);
111
+ Te([]);
112
112
  }
113
113
  }, []);
114
114
  A(() => {
@@ -134,9 +134,9 @@ function Ga({
134
134
  E(!1);
135
135
  }
136
136
  }
137
- }, Se = async (t) => {
137
+ }, Ie = async (t) => {
138
138
  if (t === "jar") {
139
- ce(!1), C({
139
+ ce(!1), w({
140
140
  id: He,
141
141
  userId: "local",
142
142
  agentHubAgentId: null,
@@ -147,7 +147,7 @@ function Ga({
147
147
  });
148
148
  return;
149
149
  }
150
- if (!we) {
150
+ if (!Ce) {
151
151
  if (!await Ye()) {
152
152
  Me.error(
153
153
  "本地 Agent 未启动,请通过菜单栏「重启 Agent」启动后再试"
@@ -156,21 +156,21 @@ function Ga({
156
156
  }
157
157
  ee(!0);
158
158
  }
159
- De(!0);
159
+ Oe(!0);
160
160
  try {
161
161
  const f = t === "hermes" ? "hermes" : "claude-code";
162
- await Ot(f, t), Me.success(`已引入 ${f},点击列表项即可开始对话`), ce(!1), await de();
162
+ await Dt(f, t), Me.success(`已引入 ${f},点击列表项即可开始对话`), ce(!1), await de();
163
163
  } catch (f) {
164
164
  Me.error(
165
165
  f.message || "创建失败,请检查本地 Agent 是否正常运行"
166
166
  );
167
167
  } finally {
168
- De(!1);
168
+ Oe(!1);
169
169
  }
170
170
  }, $e = async (t) => {
171
171
  if (await Fe({ content: "确定删除此 Agent?" }))
172
172
  try {
173
- await Dt(t), await de();
173
+ await Ot(t), await de();
174
174
  } catch (f) {
175
175
  Me.error(f.message || "删除失败");
176
176
  }
@@ -182,14 +182,14 @@ function Ga({
182
182
  await kt(t.id, T), R((f) => f.filter((W) => W.id !== t.id)), q(c, t.id) && p(null);
183
183
  } catch {
184
184
  }
185
- }, Le = async () => {
185
+ }, Se = async () => {
186
186
  if (!M) return;
187
187
  const t = M.value.trim();
188
188
  if (!t || t === M.agent.displayName) {
189
189
  $(null);
190
190
  return;
191
191
  }
192
- oe(!0);
192
+ ie(!0);
193
193
  try {
194
194
  const f = await Ct(
195
195
  M.agent.id,
@@ -199,7 +199,7 @@ function Ga({
199
199
  R((W) => W.map((Ne) => Ne.id === f.id ? f : Ne)), q(c, f.id) && p(f), $(null);
200
200
  } catch {
201
201
  } finally {
202
- oe(!1);
202
+ ie(!1);
203
203
  }
204
204
  }, J = async (t) => {
205
205
  const f = t.shared === 1;
@@ -224,8 +224,8 @@ function Ga({
224
224
  }, ve = (t, f) => {
225
225
  t.preventDefault(), t.stopPropagation(), F({ x: t.clientX, y: t.clientY, agent: f });
226
226
  };
227
- return /* @__PURE__ */ i("div", { className: l.sidebarInner, children: [
228
- /* @__PURE__ */ i("div", { className: l.header, children: [
227
+ return /* @__PURE__ */ o("div", { className: l.sidebarInner, children: [
228
+ /* @__PURE__ */ o("div", { className: l.header, children: [
229
229
  /* @__PURE__ */ e("span", { children: "个人 Agent" }),
230
230
  I === "remote" && /* @__PURE__ */ e("div", { className: l.headerActions, children: /* @__PURE__ */ e(
231
231
  "button",
@@ -250,7 +250,7 @@ function Ga({
250
250
  }
251
251
  ) })
252
252
  ] }),
253
- /* @__PURE__ */ i("div", { className: l.tabBar, children: [
253
+ /* @__PURE__ */ o("div", { className: l.tabBar, children: [
254
254
  /* @__PURE__ */ e(
255
255
  "button",
256
256
  {
@@ -280,7 +280,7 @@ function Ga({
280
280
  }
281
281
  )
282
282
  ] }),
283
- I === "local" ? /* @__PURE__ */ e("div", { className: l.agentSection, children: we ? /* @__PURE__ */ e(ge, { children: Te.map((t) => /* @__PURE__ */ i(
283
+ I === "local" ? /* @__PURE__ */ e("div", { className: l.agentSection, children: Ce ? /* @__PURE__ */ e(ge, { children: we.map((t) => /* @__PURE__ */ o(
284
284
  "div",
285
285
  {
286
286
  className: `${l.agentItem} ${q(c, He) && (t.type === "jar" && !m || m === t.id) ? l.agentItemActive : ""}`,
@@ -332,17 +332,17 @@ function Ga({
332
332
  ]
333
333
  },
334
334
  t.id
335
- )) }) : /* @__PURE__ */ i("div", { className: l.emptyState, children: [
335
+ )) }) : /* @__PURE__ */ o("div", { className: l.emptyState, children: [
336
336
  /* @__PURE__ */ e("span", { children: "本地 Agent 未启动" }),
337
337
  /* @__PURE__ */ e("span", { children: "请检查桌面端是否正常运行" })
338
- ] }) }) : I === "shared" ? /* @__PURE__ */ e("div", { className: l.agentSection, children: K && V.length === 0 ? /* @__PURE__ */ e("div", { className: l.emptyState, children: "加载中..." }) : V.length === 0 ? /* @__PURE__ */ i("div", { className: l.emptyState, children: [
338
+ ] }) }) : I === "shared" ? /* @__PURE__ */ e("div", { className: l.agentSection, children: K && V.length === 0 ? /* @__PURE__ */ e("div", { className: l.emptyState, children: "加载中..." }) : V.length === 0 ? /* @__PURE__ */ o("div", { className: l.emptyState, children: [
339
339
  /* @__PURE__ */ e("span", { children: "暂无共享 Agent" }),
340
340
  /* @__PURE__ */ e("span", { children: "其他用户共享的 Agent 会显示在这里" })
341
- ] }) : V.map((t) => /* @__PURE__ */ i(
341
+ ] }) : V.map((t) => /* @__PURE__ */ o(
342
342
  "div",
343
343
  {
344
344
  className: `${l.agentItem} ${l.agentItemShared}`,
345
- onClick: () => C(t),
345
+ onClick: () => w(t),
346
346
  title: `点击与「${t.displayName}」聊天`,
347
347
  children: [
348
348
  /* @__PURE__ */ e(
@@ -357,9 +357,9 @@ function Ga({
357
357
  children: wn(t.displayName)
358
358
  }
359
359
  ),
360
- /* @__PURE__ */ i("div", { className: l.agentInfo, children: [
360
+ /* @__PURE__ */ o("div", { className: l.agentInfo, children: [
361
361
  /* @__PURE__ */ e("span", { className: l.agentName, children: t.displayName }),
362
- /* @__PURE__ */ i("span", { className: l.agentOwner, children: [
362
+ /* @__PURE__ */ o("span", { className: l.agentOwner, children: [
363
363
  "来自: ",
364
364
  t.userId
365
365
  ] })
@@ -370,7 +370,7 @@ function Ga({
370
370
  type: "button",
371
371
  className: l.agentDetailBtn,
372
372
  onClick: (f) => {
373
- f.stopPropagation(), C(t);
373
+ f.stopPropagation(), w(t);
374
374
  },
375
375
  title: "开始聊天",
376
376
  children: /* @__PURE__ */ e(Sn, { style: { fontSize: 12 } })
@@ -379,8 +379,8 @@ function Ga({
379
379
  ]
380
380
  },
381
381
  t.id
382
- )) }) : /* @__PURE__ */ i(ge, { children: [
383
- y && /* @__PURE__ */ i("div", { className: l.createInputRow, children: [
382
+ )) }) : /* @__PURE__ */ o(ge, { children: [
383
+ y && /* @__PURE__ */ o("div", { className: l.createInputRow, children: [
384
384
  /* @__PURE__ */ e(
385
385
  "input",
386
386
  {
@@ -400,16 +400,16 @@ function Ga({
400
400
  {
401
401
  type: "button",
402
402
  className: l.createConfirmBtn,
403
- disabled: !P.trim() || D,
403
+ disabled: !P.trim() || O,
404
404
  onClick: ue,
405
- children: D ? "..." : "创建"
405
+ children: O ? "..." : "创建"
406
406
  }
407
407
  )
408
408
  ] }),
409
- /* @__PURE__ */ e("div", { className: l.agentSection, children: j && S.length === 0 ? /* @__PURE__ */ e("div", { className: l.emptyState, children: "加载中..." }) : S.length === 0 ? /* @__PURE__ */ i("div", { className: l.emptyState, children: [
409
+ /* @__PURE__ */ e("div", { className: l.agentSection, children: j && S.length === 0 ? /* @__PURE__ */ e("div", { className: l.emptyState, children: "加载中..." }) : S.length === 0 ? /* @__PURE__ */ o("div", { className: l.emptyState, children: [
410
410
  /* @__PURE__ */ e("span", { children: "暂无个人 Agent" }),
411
411
  /* @__PURE__ */ e("span", { children: "点击「新建」创建一个" })
412
- ] }) : S.map((t) => /* @__PURE__ */ i(
412
+ ] }) : S.map((t) => /* @__PURE__ */ o(
413
413
  "div",
414
414
  {
415
415
  className: `${l.agentItem} ${q(c, t.id) ? l.agentItemActive : ""}`,
@@ -428,7 +428,7 @@ function Ga({
428
428
  children: wn(t.displayName)
429
429
  }
430
430
  ),
431
- /* @__PURE__ */ i("span", { className: l.agentName, children: [
431
+ /* @__PURE__ */ o("span", { className: l.agentName, children: [
432
432
  t.displayName,
433
433
  t.shared === 1 && /* @__PURE__ */ e("span", { className: l.sharedBadge, children: "共享" })
434
434
  ] }),
@@ -455,7 +455,7 @@ function Ga({
455
455
  t.id
456
456
  )) })
457
457
  ] }),
458
- L && /* @__PURE__ */ i(
458
+ L && /* @__PURE__ */ o(
459
459
  "div",
460
460
  {
461
461
  ref: ye,
@@ -467,7 +467,7 @@ function Ga({
467
467
  {
468
468
  className: l.contextMenuItem,
469
469
  onClick: () => {
470
- C(L.agent), F(null);
470
+ w(L.agent), F(null);
471
471
  },
472
472
  children: "开始聊天"
473
473
  }
@@ -501,7 +501,7 @@ function Ga({
501
501
  {
502
502
  className: l.contextMenuItem,
503
503
  onClick: () => {
504
- ie === null && J(L.agent), F(null);
504
+ oe === null && J(L.agent), F(null);
505
505
  },
506
506
  children: L.agent.shared === 1 ? "取消共享" : "共享给他人"
507
507
  }
@@ -525,7 +525,7 @@ function Ga({
525
525
  {
526
526
  className: l.renameOverlay,
527
527
  onClick: () => !ne && ce(!1),
528
- children: /* @__PURE__ */ i(
528
+ children: /* @__PURE__ */ o(
529
529
  "div",
530
530
  {
531
531
  className: l.createLocalDialog,
@@ -533,12 +533,12 @@ function Ga({
533
533
  children: [
534
534
  /* @__PURE__ */ e("div", { className: l.renameTitle, children: "新建本地 Agent" }),
535
535
  /* @__PURE__ */ e("div", { className: l.createLocalLabel, children: ne ? "正在创建..." : "点击选择,直接开始聊天" }),
536
- /* @__PURE__ */ i("div", { className: l.agentTypeCards, children: [
537
- /* @__PURE__ */ i(
536
+ /* @__PURE__ */ o("div", { className: l.agentTypeCards, children: [
537
+ /* @__PURE__ */ o(
538
538
  "div",
539
539
  {
540
540
  className: l.agentTypeCard,
541
- onClick: () => Se("jar"),
541
+ onClick: () => Ie("jar"),
542
542
  children: [
543
543
  /* @__PURE__ */ e(
544
544
  "div",
@@ -548,8 +548,8 @@ function Ga({
548
548
  children: "L"
549
549
  }
550
550
  ),
551
- /* @__PURE__ */ i("div", { className: l.agentTypeBody, children: [
552
- /* @__PURE__ */ i("div", { className: l.agentTypeTitle, children: [
551
+ /* @__PURE__ */ o("div", { className: l.agentTypeBody, children: [
552
+ /* @__PURE__ */ o("div", { className: l.agentTypeTitle, children: [
553
553
  "自研",
554
554
  " ",
555
555
  /* @__PURE__ */ e("span", { className: l.agentTypeBadge, children: "已运行" })
@@ -559,11 +559,11 @@ function Ga({
559
559
  ]
560
560
  }
561
561
  ),
562
- /* @__PURE__ */ i(
562
+ /* @__PURE__ */ o(
563
563
  "div",
564
564
  {
565
565
  className: l.agentTypeCard,
566
- onClick: () => Se("hermes"),
566
+ onClick: () => Ie("hermes"),
567
567
  children: [
568
568
  /* @__PURE__ */ e(
569
569
  "div",
@@ -573,18 +573,18 @@ function Ga({
573
573
  children: "H"
574
574
  }
575
575
  ),
576
- /* @__PURE__ */ i("div", { className: l.agentTypeBody, children: [
576
+ /* @__PURE__ */ o("div", { className: l.agentTypeBody, children: [
577
577
  /* @__PURE__ */ e("div", { className: l.agentTypeTitle, children: "Hermes" }),
578
578
  /* @__PURE__ */ e("div", { className: l.agentTypeDesc, children: "本地 Hermes CLI,支持 tool-calling 与多模型切换" })
579
579
  ] })
580
580
  ]
581
581
  }
582
582
  ),
583
- /* @__PURE__ */ i(
583
+ /* @__PURE__ */ o(
584
584
  "div",
585
585
  {
586
586
  className: l.agentTypeCard,
587
- onClick: () => Se("claude-code"),
587
+ onClick: () => Ie("claude-code"),
588
588
  children: [
589
589
  /* @__PURE__ */ e(
590
590
  "div",
@@ -594,7 +594,7 @@ function Ga({
594
594
  children: "C"
595
595
  }
596
596
  ),
597
- /* @__PURE__ */ i("div", { className: l.agentTypeBody, children: [
597
+ /* @__PURE__ */ o("div", { className: l.agentTypeBody, children: [
598
598
  /* @__PURE__ */ e("div", { className: l.agentTypeTitle, children: "Claude Code" }),
599
599
  /* @__PURE__ */ e("div", { className: l.agentTypeDesc, children: "Anthropic Claude CLI 编码助手" })
600
600
  ] })
@@ -622,7 +622,7 @@ function Ga({
622
622
  {
623
623
  className: l.renameOverlay,
624
624
  onClick: () => !Z && $(null),
625
- children: /* @__PURE__ */ i(
625
+ children: /* @__PURE__ */ o(
626
626
  "div",
627
627
  {
628
628
  className: l.renameDialog,
@@ -638,11 +638,11 @@ function Ga({
638
638
  autoFocus: !0,
639
639
  onChange: (t) => $({ ...M, value: t.target.value }),
640
640
  onKeyDown: (t) => {
641
- t.key === "Enter" && Le(), t.key === "Escape" && $(null);
641
+ t.key === "Enter" && Se(), t.key === "Escape" && $(null);
642
642
  }
643
643
  }
644
644
  ),
645
- /* @__PURE__ */ i("div", { className: l.renameActions, children: [
645
+ /* @__PURE__ */ o("div", { className: l.renameActions, children: [
646
646
  /* @__PURE__ */ e(
647
647
  "button",
648
648
  {
@@ -659,7 +659,7 @@ function Ga({
659
659
  type: "button",
660
660
  className: l.renameBtnPrimary,
661
661
  disabled: !M.value.trim() || Z,
662
- onClick: Le,
662
+ onClick: Se,
663
663
  children: Z ? "..." : "确定"
664
664
  }
665
665
  )
@@ -680,14 +680,14 @@ const Za = "_shell_1w53k_2", za = "_inset_1w53k_33", Qa = "_main_1w53k_40", Xa =
680
680
  personalMainArea: Ja,
681
681
  personalSidebar: qa,
682
682
  personalChatArea: es
683
- }, ns = "_sidebar_y5tuo_1", ts = "_collapsed_y5tuo_12", as = "_sideHeader_y5tuo_17", ss = "_sideHeaderIcon_y5tuo_32", ls = "_sideHeaderTitle_y5tuo_45", os = "_sideContent_y5tuo_54", is = "_groupLabel_y5tuo_61", cs = "_navList_y5tuo_71", rs = "_navItem_y5tuo_77", ds = "_navItemActive_y5tuo_109", us = "_navIcon_y5tuo_114", ms = "_navLabel_y5tuo_120", ps = "_sideFooter_y5tuo_131", hs = "_footHint_y5tuo_138", x = {
683
+ }, ns = "_sidebar_y5tuo_1", ts = "_collapsed_y5tuo_12", as = "_sideHeader_y5tuo_17", ss = "_sideHeaderIcon_y5tuo_32", ls = "_sideHeaderTitle_y5tuo_45", is = "_sideContent_y5tuo_54", os = "_groupLabel_y5tuo_61", cs = "_navList_y5tuo_71", rs = "_navItem_y5tuo_77", ds = "_navItemActive_y5tuo_109", us = "_navIcon_y5tuo_114", ms = "_navLabel_y5tuo_120", ps = "_sideFooter_y5tuo_131", hs = "_footHint_y5tuo_138", x = {
684
684
  sidebar: ns,
685
685
  collapsed: ts,
686
686
  sideHeader: as,
687
687
  sideHeaderIcon: ss,
688
688
  sideHeaderTitle: ls,
689
- sideContent: os,
690
- groupLabel: is,
689
+ sideContent: is,
690
+ groupLabel: os,
691
691
  navList: cs,
692
692
  navItem: rs,
693
693
  navItemActive: ds,
@@ -701,28 +701,28 @@ function gs({
701
701
  activeTab: m,
702
702
  collapsed: p,
703
703
  footerItems: N,
704
- onSelect: C,
704
+ onSelect: w,
705
705
  onSwitchMode: T
706
706
  }) {
707
- return /* @__PURE__ */ i(
707
+ return /* @__PURE__ */ o(
708
708
  "aside",
709
709
  {
710
710
  className: `${x.sidebar} ${p ? x.collapsed : ""}`,
711
711
  "aria-label": "个人工作台导航",
712
712
  children: [
713
- /* @__PURE__ */ i("div", { className: x.sideHeader, children: [
713
+ /* @__PURE__ */ o("div", { className: x.sideHeader, children: [
714
714
  /* @__PURE__ */ e("span", { className: x.sideHeaderIcon, children: /* @__PURE__ */ e(Ln, {}) }),
715
715
  !p && /* @__PURE__ */ e("span", { className: x.sideHeaderTitle, children: "个人工作台" })
716
716
  ] }),
717
- /* @__PURE__ */ i("div", { className: x.sideContent, children: [
717
+ /* @__PURE__ */ o("div", { className: x.sideContent, children: [
718
718
  !p && /* @__PURE__ */ e("p", { className: x.groupLabel, children: "我的工作空间" }),
719
719
  /* @__PURE__ */ e("nav", { className: x.navList, "aria-label": "个人模块", children: c.map((g) => {
720
- const I = m === g.key, B = /* @__PURE__ */ i(
720
+ const I = m === g.key, B = /* @__PURE__ */ o(
721
721
  "button",
722
722
  {
723
723
  type: "button",
724
724
  className: `${x.navItem} ${I ? x.navItemActive : ""}`,
725
- onClick: () => C(g.key),
725
+ onClick: () => w(g.key),
726
726
  "aria-current": I ? "page" : void 0,
727
727
  children: [
728
728
  /* @__PURE__ */ e("span", { className: x.navIcon, children: g.icon }),
@@ -734,9 +734,9 @@ function gs({
734
734
  return p ? /* @__PURE__ */ e(Qe, { placement: "right", title: g.label, children: B }, g.key) : B;
735
735
  }) })
736
736
  ] }),
737
- /* @__PURE__ */ i("div", { className: x.sideFooter, children: [
737
+ /* @__PURE__ */ o("div", { className: x.sideFooter, children: [
738
738
  N.length > 0 && /* @__PURE__ */ e("nav", { className: x.navList, "aria-label": "快捷切换", children: N.map((g) => {
739
- const I = /* @__PURE__ */ i(
739
+ const I = /* @__PURE__ */ o(
740
740
  "button",
741
741
  {
742
742
  type: "button",
@@ -772,8 +772,8 @@ function ws({
772
772
  collapsed: m,
773
773
  onToggleCollapse: p
774
774
  }) {
775
- return /* @__PURE__ */ i("header", { className: he.topbar, children: [
776
- /* @__PURE__ */ i("div", { className: he.topbarLeft, children: [
775
+ return /* @__PURE__ */ o("header", { className: he.topbar, children: [
776
+ /* @__PURE__ */ o("div", { className: he.topbarLeft, children: [
777
777
  /* @__PURE__ */ e(
778
778
  Qe,
779
779
  {
@@ -787,14 +787,14 @@ function ws({
787
787
  onClick: p,
788
788
  "aria-label": "展开或收起个人菜单",
789
789
  "aria-expanded": !m,
790
- children: m ? /* @__PURE__ */ e(lt, {}) : /* @__PURE__ */ e(ot, {})
790
+ children: m ? /* @__PURE__ */ e(lt, {}) : /* @__PURE__ */ e(it, {})
791
791
  }
792
792
  )
793
793
  }
794
794
  ),
795
- /* @__PURE__ */ i("div", { className: he.crumbs, "aria-label": "当前位置", children: [
795
+ /* @__PURE__ */ o("div", { className: he.crumbs, "aria-label": "当前位置", children: [
796
796
  /* @__PURE__ */ e("span", { className: he.crumbsRoot, children: "个人" }),
797
- /* @__PURE__ */ e(it, { className: he.crumbsSep }),
797
+ /* @__PURE__ */ e(ot, { className: he.crumbsSep }),
798
798
  /* @__PURE__ */ e("span", { className: he.crumbsCurrent, children: c })
799
799
  ] })
800
800
  ] }),
@@ -809,7 +809,7 @@ const Fn = [
809
809
  { key: "tools", label: "常用工具", icon: /* @__PURE__ */ e(mt, {}) },
810
810
  { key: "websites", label: "常用网站", icon: /* @__PURE__ */ e(pt, {}) },
811
811
  { key: "smart-partner", label: "智能伙伴", icon: /* @__PURE__ */ e(Sn, {}) },
812
- { key: "todo", label: "工作待办", icon: /* @__PURE__ */ e(On, {}) },
812
+ { key: "todo", label: "工作待办", icon: /* @__PURE__ */ e(Dn, {}) },
813
813
  { key: "notes", label: "个人笔记", icon: /* @__PURE__ */ e(nn, {}) },
814
814
  {
815
815
  key: "training",
@@ -844,7 +844,7 @@ function Ls({
844
844
  openTodoId: m,
845
845
  selectedPersonalAgent: p,
846
846
  personalView: N,
847
- newSessionTrigger: C,
847
+ newSessionTrigger: w,
848
848
  onSelectPersonalAgent: T,
849
849
  onShowPersonalAgentDetail: g,
850
850
  onChatWithPersonalAgent: I,
@@ -857,13 +857,13 @@ function Ls({
857
857
  );
858
858
  A(() => {
859
859
  try {
860
- const w = new URL(window.location.href);
861
- if (!w.searchParams.has("tab")) return;
862
- w.searchParams.delete("tab"), window.history.replaceState(window.history.state, "", w.toString());
860
+ const C = new URL(window.location.href);
861
+ if (!C.searchParams.has("tab")) return;
862
+ C.searchParams.delete("tab"), window.history.replaceState(window.history.state, "", C.toString());
863
863
  } catch {
864
864
  }
865
865
  }, []);
866
- const [j, O] = d(Ts);
866
+ const [j, D] = d(Ts);
867
867
  A(() => {
868
868
  try {
869
869
  localStorage.setItem(Kn, j ? "1" : "0");
@@ -871,31 +871,31 @@ function Ls({
871
871
  }
872
872
  }, [j]);
873
873
  const y = U(() => {
874
- O((w) => !w), window.setTimeout(() => window.dispatchEvent(new Event("resize")), 300);
874
+ D((C) => !C), window.setTimeout(() => window.dispatchEvent(new Event("resize")), 300);
875
875
  }, []);
876
876
  A(() => {
877
- function w(K) {
877
+ function C(K) {
878
878
  !(K.metaKey || K.ctrlKey) || K.altKey || K.key.toLowerCase() === "b" && (Is(K.target) || (K.preventDefault(), y()));
879
879
  }
880
- return window.addEventListener("keydown", w), () => window.removeEventListener("keydown", w);
880
+ return window.addEventListener("keydown", C), () => window.removeEventListener("keydown", C);
881
881
  }, [y]);
882
- const b = re((w) => w.currentUser), P = Fn.filter(
883
- (w) => !w.permission || Bn(b, w.permission)
882
+ const b = re((C) => C.currentUser), P = Fn.filter(
883
+ (C) => !C.permission || Bn(b, C.permission)
884
884
  ), _ = X(() => B ? [
885
885
  { mode: "admin", label: "运营工作台", icon: /* @__PURE__ */ e(An, {}) },
886
886
  { mode: "collaboration", label: "协作工作台", icon: /* @__PURE__ */ e(ct, {}) }
887
887
  ].filter(
888
888
  (K) => $n(b, K.mode)
889
- ) : [], [b, B]), D = ((V = P.find((w) => w.key === S)) == null ? void 0 : V.label) ?? "个人工作台", [E, L] = d(null), [F, M] = d(null), $ = U((w) => {
890
- R(w);
891
- }, []), Z = U((w) => {
892
- R("notes"), L({ id: w, ts: Date.now() });
893
- }, []), oe = U((w) => {
894
- R("todo"), M({ id: w, ts: Date.now() });
889
+ ) : [], [b, B]), O = ((V = P.find((C) => C.key === S)) == null ? void 0 : V.label) ?? "个人工作台", [E, L] = d(null), [F, M] = d(null), $ = U((C) => {
890
+ R(C);
891
+ }, []), Z = U((C) => {
892
+ R("notes"), L({ id: C, ts: Date.now() });
893
+ }, []), ie = U((C) => {
894
+ R("todo"), M({ id: C, ts: Date.now() });
895
895
  }, []);
896
896
  return A(() => {
897
897
  m != null && m.id && (R("todo"), M({ id: m.id, ts: m.ts }));
898
- }, [m == null ? void 0 : m.id, m == null ? void 0 : m.ts]), /* @__PURE__ */ i("div", { className: pe.shell, children: [
898
+ }, [m == null ? void 0 : m.id, m == null ? void 0 : m.ts]), /* @__PURE__ */ o("div", { className: pe.shell, children: [
899
899
  /* @__PURE__ */ e("a", { className: pe.skipLink, href: "#pw-content", children: "跳到个人工作台内容" }),
900
900
  /* @__PURE__ */ e(
901
901
  gs,
@@ -908,11 +908,11 @@ function Ls({
908
908
  onSwitchMode: B
909
909
  }
910
910
  ),
911
- /* @__PURE__ */ i("div", { className: pe.inset, children: [
911
+ /* @__PURE__ */ o("div", { className: pe.inset, children: [
912
912
  /* @__PURE__ */ e(
913
913
  ws,
914
914
  {
915
- label: D,
915
+ label: O,
916
916
  collapsed: j,
917
917
  onToggleCollapse: y
918
918
  }
@@ -922,9 +922,9 @@ function Ls({
922
922
  {
923
923
  id: "pw-content",
924
924
  tabIndex: -1,
925
- "aria-label": `${D}内容`,
925
+ "aria-label": `${O}内容`,
926
926
  className: pe.main,
927
- children: /* @__PURE__ */ i("div", { className: pe.pane, children: [
927
+ children: /* @__PURE__ */ o("div", { className: pe.pane, children: [
928
928
  (S === "workbench" || S === "projects" || S === "personal") && /* @__PURE__ */ e(
929
929
  en,
930
930
  {
@@ -949,13 +949,13 @@ function Ls({
949
949
  In,
950
950
  {
951
951
  onOpenProject: c,
952
- onOpenTodo: oe,
952
+ onOpenTodo: ie,
953
953
  openNoteId: E
954
954
  }
955
955
  ),
956
956
  S === "training" && /* @__PURE__ */ e(Rn, {}),
957
957
  S === "webide" && /* @__PURE__ */ e(Pn, {}),
958
- S === "smart-partner" && /* @__PURE__ */ i("div", { className: pe.personalMainArea, children: [
958
+ S === "smart-partner" && /* @__PURE__ */ o("div", { className: pe.personalMainArea, children: [
959
959
  /* @__PURE__ */ e("div", { className: pe.personalSidebar, children: /* @__PURE__ */ e(
960
960
  Ga,
961
961
  {
@@ -976,13 +976,13 @@ function Ls({
976
976
  Mn,
977
977
  {
978
978
  agent: p,
979
- newSessionTrigger: C
979
+ newSessionTrigger: w
980
980
  }
981
981
  ) : /* @__PURE__ */ e(
982
982
  jn,
983
983
  {
984
984
  agent: p,
985
- newSessionTrigger: C
985
+ newSessionTrigger: w
986
986
  }
987
987
  ) })
988
988
  ] })
@@ -996,7 +996,7 @@ const As = [
996
996
  "帮我排查一个线上问题",
997
997
  "总结一下今天的群聊进展",
998
998
  "把这周的变更整理成周报"
999
- ], Os = [
999
+ ], Ds = [
1000
1000
  {
1001
1001
  key: "video",
1002
1002
  label: "视频生成",
@@ -1030,7 +1030,7 @@ const As = [
1030
1030
  action: "ask"
1031
1031
  }
1032
1032
  ];
1033
- function Ds() {
1033
+ function Os() {
1034
1034
  const c = (/* @__PURE__ */ new Date()).getHours();
1035
1035
  return c < 5 ? "夜深了" : c < 12 ? "早上好" : c < 14 ? "中午好" : c < 18 ? "下午好" : "晚上好";
1036
1036
  }
@@ -1043,15 +1043,15 @@ function $s(c) {
1043
1043
  const T = (g) => String(g).padStart(2, "0");
1044
1044
  return `${T(m.getHours())}:${T(m.getMinutes())}`;
1045
1045
  }
1046
- const C = new Date(p);
1047
- return C.setDate(p.getDate() - 1), m.toDateString() === C.toDateString() ? "昨天" : `${m.getMonth() + 1}月${m.getDate()}日`;
1046
+ const w = new Date(p);
1047
+ return w.setDate(p.getDate() - 1), m.toDateString() === w.toDateString() ? "昨天" : `${m.getMonth() + 1}月${m.getDate()}日`;
1048
1048
  }
1049
1049
  function xs({
1050
1050
  agents: c,
1051
1051
  activeAgent: m,
1052
1052
  onSwitchAgent: p,
1053
1053
  localAgentName: N,
1054
- onLocalSend: C,
1054
+ onLocalSend: w,
1055
1055
  localOffline: T = !1,
1056
1056
  initialSpace: g,
1057
1057
  onSend: I,
@@ -1060,15 +1060,15 @@ function xs({
1060
1060
  recentTasks: R = [],
1061
1061
  onOpenHistory: j
1062
1062
  }) {
1063
- const O = re((h) => h.token), y = re((h) => h.currentUser), b = xn(), [P, _] = d(""), D = Oe(null), [E, L] = d(!1), [F, M] = d(!1), [$, Z] = d(g ?? null), [oe, V] = d(!1);
1063
+ const D = re((h) => h.token), y = re((h) => h.currentUser), b = xn(), [P, _] = d(""), O = De(null), [E, L] = d(!1), [F, M] = d(!1), [$, Z] = d(g ?? null), [ie, V] = d(!1);
1064
1064
  A(() => {
1065
1065
  g && Z(g);
1066
1066
  }, [g]);
1067
- const w = U(async () => {
1067
+ const C = U(async () => {
1068
1068
  const h = P.trim();
1069
1069
  if (!(!h || E) && !T) {
1070
- if (N && C) {
1071
- C(h), _("");
1070
+ if (N && w) {
1071
+ w(h), _("");
1072
1072
  return;
1073
1073
  }
1074
1074
  if (m) {
@@ -1080,16 +1080,16 @@ function xs({
1080
1080
  }
1081
1081
  }
1082
1082
  }
1083
- }, [P, E, T, N, C, m, I, $]), K = b.nickname || (y == null ? void 0 : y.display_name) || (y == null ? void 0 : y.username) || "";
1084
- return /* @__PURE__ */ e("div", { className: `${s.landing} ${s.xwScope}`, children: /* @__PURE__ */ i("div", { className: s.landingInner, children: [
1083
+ }, [P, E, T, N, w, m, I, $]), K = b.nickname || (y == null ? void 0 : y.display_name) || (y == null ? void 0 : y.username) || "";
1084
+ return /* @__PURE__ */ e("div", { className: `${s.landing} ${s.xwScope}`, children: /* @__PURE__ */ o("div", { className: s.landingInner, children: [
1085
1085
  /* @__PURE__ */ e("div", { className: s.mascot, "aria-hidden": "true", children: /* @__PURE__ */ e("img", { src: $t, alt: "" }) }),
1086
- /* @__PURE__ */ e("h1", { className: s.landingTitle, children: b.greetingEnabled ? `${Ds()}${K ? `,${K}` : ""}` : "开始新的对话" }),
1086
+ /* @__PURE__ */ e("h1", { className: s.landingTitle, children: b.greetingEnabled ? `${Os()}${K ? `,${K}` : ""}` : "开始新的对话" }),
1087
1087
  /* @__PURE__ */ e("p", { className: s.landingSub, children: N ? T ? "本机 Agent 未运行 —— 启动 Z-OPC 桌面端(伴生服务起来后自动连上)" : "本地模式:任务在你的电脑上执行,文件与上下文都不上云" : b.bio || "我是你的智能伙伴,有什么可以帮你?" }),
1088
- /* @__PURE__ */ i("div", { className: s.landingBox, children: [
1088
+ /* @__PURE__ */ o("div", { className: s.landingBox, children: [
1089
1089
  /* @__PURE__ */ e(
1090
1090
  "textarea",
1091
1091
  {
1092
- ref: D,
1092
+ ref: O,
1093
1093
  className: s.landingInput,
1094
1094
  placeholder: N ? T ? "本机 Agent 未运行,启动桌面端后即可在本地执行" : `给本机 Agent 发送消息,${_n(b.sendKey)}` : `给智能伙伴发送消息,${_n(b.sendKey)}`,
1095
1095
  rows: 3,
@@ -1097,19 +1097,19 @@ function xs({
1097
1097
  autoFocus: !0,
1098
1098
  onChange: (h) => _(h.target.value),
1099
1099
  onKeyDown: (h) => {
1100
- ea(h, b.sendKey) && !h.nativeEvent.isComposing && (h.preventDefault(), w());
1100
+ ea(h, b.sendKey) && !h.nativeEvent.isComposing && (h.preventDefault(), C());
1101
1101
  }
1102
1102
  }
1103
1103
  ),
1104
- /* @__PURE__ */ i("div", { className: s.landingBoxBar, children: [
1105
- N ? /* @__PURE__ */ i("span", { className: s.agentChip, children: [
1104
+ /* @__PURE__ */ o("div", { className: s.landingBoxBar, children: [
1105
+ N ? /* @__PURE__ */ o("span", { className: s.agentChip, children: [
1106
1106
  /* @__PURE__ */ e(Je, {}),
1107
- /* @__PURE__ */ i("span", { children: [
1107
+ /* @__PURE__ */ o("span", { children: [
1108
1108
  N,
1109
1109
  "(本机)"
1110
1110
  ] })
1111
- ] }) : m ? /* @__PURE__ */ i("div", { className: s.agentChipWrap, children: [
1112
- /* @__PURE__ */ i(
1111
+ ] }) : m ? /* @__PURE__ */ o("div", { className: s.agentChipWrap, children: [
1112
+ /* @__PURE__ */ o(
1113
1113
  "button",
1114
1114
  {
1115
1115
  type: "button",
@@ -1122,7 +1122,7 @@ function xs({
1122
1122
  ]
1123
1123
  }
1124
1124
  ),
1125
- F && c.length > 1 && /* @__PURE__ */ i(ge, { children: [
1125
+ F && c.length > 1 && /* @__PURE__ */ o(ge, { children: [
1126
1126
  /* @__PURE__ */ e(
1127
1127
  "div",
1128
1128
  {
@@ -1130,7 +1130,7 @@ function xs({
1130
1130
  onClick: () => M(!1)
1131
1131
  }
1132
1132
  ),
1133
- /* @__PURE__ */ e("div", { className: s.agentMenu, role: "menu", children: c.map((h) => /* @__PURE__ */ i(
1133
+ /* @__PURE__ */ e("div", { className: s.agentMenu, role: "menu", children: c.map((h) => /* @__PURE__ */ o(
1134
1134
  "button",
1135
1135
  {
1136
1136
  type: "button",
@@ -1155,8 +1155,8 @@ function xs({
1155
1155
  )) })
1156
1156
  ] })
1157
1157
  ] }) : /* @__PURE__ */ e("span", { className: s.agentChipEmpty, children: "还没有云端伙伴,可到个人工作台创建" }),
1158
- !N && m && /* @__PURE__ */ i("div", { className: s.agentChipWrap, children: [
1159
- /* @__PURE__ */ i(
1158
+ !N && m && /* @__PURE__ */ o("div", { className: s.agentChipWrap, children: [
1159
+ /* @__PURE__ */ o(
1160
1160
  "button",
1161
1161
  {
1162
1162
  type: "button",
@@ -1170,7 +1170,7 @@ function xs({
1170
1170
  ]
1171
1171
  }
1172
1172
  ),
1173
- oe && /* @__PURE__ */ i(ge, { children: [
1173
+ ie && /* @__PURE__ */ o(ge, { children: [
1174
1174
  /* @__PURE__ */ e(
1175
1175
  "div",
1176
1176
  {
@@ -1181,7 +1181,7 @@ function xs({
1181
1181
  /* @__PURE__ */ e(
1182
1182
  Rt,
1183
1183
  {
1184
- token: O,
1184
+ token: D,
1185
1185
  currentId: ($ == null ? void 0 : $.id) ?? null,
1186
1186
  onPick: (h) => {
1187
1187
  Z(h), V(!1);
@@ -1196,15 +1196,15 @@ function xs({
1196
1196
  type: "button",
1197
1197
  className: s.landingSend,
1198
1198
  disabled: !P.trim() || E || T || !m && !N,
1199
- onClick: () => void w(),
1199
+ onClick: () => void C(),
1200
1200
  "aria-label": "发送",
1201
1201
  children: E ? /* @__PURE__ */ e(Pt, {}) : /* @__PURE__ */ e(Et, {})
1202
1202
  }
1203
1203
  )
1204
1204
  ] })
1205
1205
  ] }),
1206
- R.length > 0 && /* @__PURE__ */ i("section", { className: s.recentBlock, "aria-label": "继续最近任务", children: [
1207
- /* @__PURE__ */ i("div", { className: s.recentHead, children: [
1206
+ R.length > 0 && /* @__PURE__ */ o("section", { className: s.recentBlock, "aria-label": "继续最近任务", children: [
1207
+ /* @__PURE__ */ o("div", { className: s.recentHead, children: [
1208
1208
  /* @__PURE__ */ e("span", { children: "继续最近任务" }),
1209
1209
  j && /* @__PURE__ */ e(
1210
1210
  "button",
@@ -1216,7 +1216,7 @@ function xs({
1216
1216
  }
1217
1217
  )
1218
1218
  ] }),
1219
- /* @__PURE__ */ e("div", { className: s.recentList, children: R.map((h) => /* @__PURE__ */ i(
1219
+ /* @__PURE__ */ e("div", { className: s.recentList, children: R.map((h) => /* @__PURE__ */ o(
1220
1220
  "button",
1221
1221
  {
1222
1222
  type: "button",
@@ -1238,13 +1238,13 @@ function xs({
1238
1238
  h.key
1239
1239
  )) })
1240
1240
  ] }),
1241
- /* @__PURE__ */ e("div", { className: s.chipRow, children: Os.map((h) => /* @__PURE__ */ i(
1241
+ /* @__PURE__ */ e("div", { className: s.chipRow, children: Ds.map((h) => /* @__PURE__ */ o(
1242
1242
  "button",
1243
1243
  {
1244
1244
  type: "button",
1245
1245
  className: s.capChip,
1246
1246
  onClick: () => {
1247
- var ie;
1247
+ var oe;
1248
1248
  if (h.action === "tools") {
1249
1249
  B("tools");
1250
1250
  return;
@@ -1257,7 +1257,7 @@ function xs({
1257
1257
  S();
1258
1258
  return;
1259
1259
  }
1260
- _(h.prompt ?? ""), (ie = D.current) == null || ie.focus();
1260
+ _(h.prompt ?? ""), (oe = O.current) == null || oe.focus();
1261
1261
  },
1262
1262
  children: [
1263
1263
  /* @__PURE__ */ e("span", { className: s.capChipIcon, children: h.icon }),
@@ -1272,14 +1272,14 @@ function xs({
1272
1272
  type: "button",
1273
1273
  className: s.suggestChip,
1274
1274
  onClick: () => {
1275
- var ie;
1276
- _(h), (ie = D.current) == null || ie.focus();
1275
+ var oe;
1276
+ _(h), (oe = O.current) == null || oe.focus();
1277
1277
  },
1278
1278
  children: h
1279
1279
  },
1280
1280
  h
1281
1281
  )) }),
1282
- /* @__PURE__ */ i("p", { className: s.shortcutHint, children: [
1282
+ /* @__PURE__ */ o("p", { className: s.shortcutHint, children: [
1283
1283
  /* @__PURE__ */ e("kbd", { className: s.shortcutKbd, children: "⌘K" }),
1284
1284
  /* @__PURE__ */ e("span", { children: "搜索与命令" }),
1285
1285
  /* @__PURE__ */ e("span", { className: s.shortcutDot, children: "·" }),
@@ -1315,37 +1315,37 @@ function Gs({
1315
1315
  onOpenProject: m,
1316
1316
  openAgentRequest: p
1317
1317
  }) {
1318
- const N = re((n) => n.token), C = re((n) => n.currentUser), T = xn(), [g, I] = d([]), [B, S] = d(!0), [R, j] = d(null), [O, y] = d("landing"), [b, P] = d(null), [_, D] = d(
1318
+ const N = re((n) => n.token), w = re((n) => n.currentUser), T = xn(), [g, I] = d([]), [B, S] = d(!0), [R, j] = d(null), [D, y] = d("landing"), [b, P] = d(null), [_, O] = d(
1319
1319
  Ae ? "local" : "cloud"
1320
1320
  ), [E, L] = d(
1321
1321
  []
1322
- ), [F, M] = d([]), [$, Z] = d(!0), [oe, V] = d(!1), [w, K] = d(null), h = U(
1322
+ ), [F, M] = d([]), [$, Z] = d(!0), [ie, V] = d(!1), [C, K] = d(null), h = U(
1323
1323
  (n) => {
1324
- K({ tab: n === "skills" ? "bind" : n === "plugins" || n === "connectors" ? "soon" : "agents", ts: Date.now() }), y("extensions");
1324
+ K({ tab: n ?? "agents", ts: Date.now() }), y("extensions");
1325
1325
  },
1326
1326
  []
1327
- ), ie = re((n) => n.projects), [Y, we] = d([]), [ee, Te] = d(null), [Ie, be] = d(
1327
+ ), oe = re((n) => n.projects), [Y, Ce] = d([]), [ee, we] = d(null), [Te, be] = d(
1328
1328
  /* @__PURE__ */ new Set()
1329
- ), [ce, ne] = d(0), [De, ye] = d(null), [z, fe] = d(null), [de, ue] = d(""), [Se, $e] = d(!1), [te, Le] = d(!1), [J, ve] = d([]), [t, f] = d(null), [W, Ne] = d(!1), H = Ae || W, [xe, tn] = d(null), _e = U(
1329
+ ), [ce, ne] = d(0), [Oe, ye] = d(null), [z, fe] = d(null), [de, ue] = d(""), [Ie, $e] = d(!1), [te, Se] = d(!1), [J, ve] = d([]), [t, f] = d(null), [W, Ne] = d(!1), H = Ae || W, [xe, tn] = d(null), Le = U(
1330
1330
  (n) => {
1331
1331
  const a = Ht(n);
1332
- a && !Bn(C, a) || (Ge(n), y("personalTab"));
1332
+ a && !Bn(w, a) || (Ge(n), y("personalTab"));
1333
1333
  },
1334
- [C]
1334
+ [w]
1335
1335
  ), [Wn, Ue] = d(!1), [an, Ve] = d(
1336
1336
  null
1337
1337
  ), [Un, Vn] = d(
1338
1338
  null
1339
1339
  ), [Gn, Zn] = d(
1340
1340
  null
1341
- ), ke = U(
1341
+ ), _e = U(
1342
1342
  (n, a) => {
1343
1343
  m == null || m(n, a);
1344
1344
  },
1345
1345
  [m]
1346
1346
  ), zn = U((n) => {
1347
1347
  Ge("todo"), Zn({ id: n, ts: Date.now() });
1348
- }, []), [ae, Ge] = d("personal"), sn = Oe(!1), Q = X(() => Ft(g), [g]), me = X(
1348
+ }, []), [ae, Ge] = d("personal"), sn = De(!1), Q = X(() => Ft(g), [g]), me = X(
1349
1349
  () => g.find((n) => n.id === R) ?? Q,
1350
1350
  [g, R, Q]
1351
1351
  );
@@ -1356,7 +1356,7 @@ function Gs({
1356
1356
  );
1357
1357
  A(() => {
1358
1358
  let n = !0;
1359
- return S(!0), Dn(N).then((a) => {
1359
+ return S(!0), On(N).then((a) => {
1360
1360
  n && I(a);
1361
1361
  }).catch(() => {
1362
1362
  }).finally(() => {
@@ -1375,7 +1375,7 @@ function Gs({
1375
1375
  u = !1;
1376
1376
  }
1377
1377
  if (!n) return;
1378
- if (Ne(u), qt(u ? "tunnel" : "direct", N), Le(u), !u) {
1378
+ if (Ne(u), qt(u ? "tunnel" : "direct", N), Se(u), !u) {
1379
1379
  ve([]);
1380
1380
  return;
1381
1381
  }
@@ -1388,7 +1388,7 @@ function Gs({
1388
1388
  }
1389
1389
  const r = await Ye();
1390
1390
  if (n) {
1391
- if (Le(r), !r) {
1391
+ if (Se(r), !r) {
1392
1392
  ve([]);
1393
1393
  return;
1394
1394
  }
@@ -1400,9 +1400,9 @@ function Gs({
1400
1400
  }
1401
1401
  };
1402
1402
  a();
1403
- const o = window.setInterval(() => void a(), 3e4);
1403
+ const i = window.setInterval(() => void a(), 3e4);
1404
1404
  return () => {
1405
- n = !1, window.clearInterval(o);
1405
+ n = !1, window.clearInterval(i);
1406
1406
  };
1407
1407
  }, [N]), A(() => {
1408
1408
  if (!H || J.length === 0 || t && J.some((a) => a.id === t))
@@ -1421,9 +1421,9 @@ function Gs({
1421
1421
  na(N)
1422
1422
  ]);
1423
1423
  if (n.status === "fulfilled" && L(n.value || []), a.status === "fulfilled") {
1424
- const o = /* @__PURE__ */ new Set(), r = [];
1424
+ const i = /* @__PURE__ */ new Set(), r = [];
1425
1425
  for (const u of [...a.value.owned, ...a.value.joined])
1426
- o.has(u.id) || (o.add(u.id), r.push(u));
1426
+ i.has(u.id) || (i.add(u.id), r.push(u));
1427
1427
  M(r);
1428
1428
  }
1429
1429
  Z(!1);
@@ -1431,7 +1431,7 @@ function Gs({
1431
1431
  A(() => {
1432
1432
  ln();
1433
1433
  }, [ln, b == null ? void 0 : b.ts]);
1434
- const Ce = X(() => {
1434
+ const ke = X(() => {
1435
1435
  const n = /* @__PURE__ */ new Map();
1436
1436
  for (const v of F)
1437
1437
  n.set(`sp:${String(v.id)}`, {
@@ -1439,12 +1439,12 @@ function Gs({
1439
1439
  title: v.title,
1440
1440
  sessions: []
1441
1441
  });
1442
- const a = [], o = [...E].sort(
1442
+ const a = [], i = [...E].sort(
1443
1443
  (v, k) => (k.updateTime || k.createTime || "").localeCompare(
1444
1444
  v.updateTime || v.createTime || ""
1445
1445
  )
1446
1446
  );
1447
- for (const v of o)
1447
+ for (const v of i)
1448
1448
  if (v.projectSpaceId != null) {
1449
1449
  const k = `sp:${String(v.projectSpaceId)}`;
1450
1450
  n.has(k) || n.set(k, {
@@ -1462,31 +1462,31 @@ function Gs({
1462
1462
  }, [F, E]), on = X(
1463
1463
  () => {
1464
1464
  var n;
1465
- return b != null && b.sessionId ? ((n = Ce.find(
1466
- (a) => a.sessions.some((o) => o.id === b.sessionId)
1465
+ return b != null && b.sessionId ? ((n = ke.find(
1466
+ (a) => a.sessions.some((i) => i.id === b.sessionId)
1467
1467
  )) == null ? void 0 : n.key) ?? null : null;
1468
1468
  },
1469
- [Ce, b == null ? void 0 : b.sessionId]
1469
+ [ke, b == null ? void 0 : b.sessionId]
1470
1470
  );
1471
1471
  A(() => {
1472
1472
  var a;
1473
- const n = on ?? (sn.current ? null : ((a = Ce.find((o) => o.sessions.length > 0)) == null ? void 0 : a.key) ?? null);
1473
+ const n = on ?? (sn.current ? null : ((a = ke.find((i) => i.sessions.length > 0)) == null ? void 0 : a.key) ?? null);
1474
1474
  n && (sn.current = !0, be(
1475
- (o) => o.has(n) ? o : new Set(o).add(n)
1475
+ (i) => i.has(n) ? i : new Set(i).add(n)
1476
1476
  ));
1477
- }, [on, Ce]);
1478
- const cn = Oe(!1);
1477
+ }, [on, ke]);
1478
+ const cn = De(!1);
1479
1479
  A(() => {
1480
- Ae || !W || cn.current || (cn.current = !0, D("local"));
1480
+ Ae || !W || cn.current || (cn.current = !0, O("local"));
1481
1481
  }, [W]);
1482
1482
  const rn = G && G.type !== "jar" ? G.id : void 0;
1483
1483
  A(() => {
1484
1484
  if (!H || _ !== "local" || !te) return;
1485
1485
  let n = !0;
1486
1486
  return Kt(rn).then((a) => {
1487
- n && we([...a].sort((o, r) => r.updatedAt - o.updatedAt));
1487
+ n && Ce([...a].sort((i, r) => r.updatedAt - i.updatedAt));
1488
1488
  }).catch(() => {
1489
- n && we([]);
1489
+ n && Ce([]);
1490
1490
  }), () => {
1491
1491
  n = !1;
1492
1492
  };
@@ -1517,13 +1517,13 @@ function Gs({
1517
1517
  }
1518
1518
  n.get(v).sessions.push(r);
1519
1519
  }
1520
- const o = [...n.values()].sort(
1520
+ const i = [...n.values()].sort(
1521
1521
  (r, u) => {
1522
1522
  var v, k;
1523
1523
  return (((v = u.sessions[0]) == null ? void 0 : v.updatedAt) ?? 0) - (((k = r.sessions[0]) == null ? void 0 : k.updatedAt) ?? 0);
1524
1524
  }
1525
1525
  );
1526
- return a.length > 0 && o.push({ key: "wd:none", title: "未绑定目录", path: null, sessions: a }), o;
1526
+ return a.length > 0 && i.push({ key: "wd:none", title: "未绑定目录", path: null, sessions: a }), i;
1527
1527
  }, [Y]), Pe = X(() => {
1528
1528
  if (!ee) return null;
1529
1529
  const n = Y.find((a) => a.id === ee);
@@ -1534,17 +1534,17 @@ function Gs({
1534
1534
  (n) => n.has(Pe) ? n : new Set(n).add(Pe)
1535
1535
  );
1536
1536
  }, [Pe]);
1537
- const dn = Oe(!1);
1537
+ const dn = De(!1);
1538
1538
  A(() => {
1539
1539
  dn.current || Re.length === 0 || (dn.current = !0, be((n) => {
1540
1540
  const a = new Set(n);
1541
- for (const o of Re)
1542
- o.sessions.length > 0 && a.add(o.key);
1541
+ for (const i of Re)
1542
+ i.sessions.length > 0 && a.add(i.key);
1543
1543
  return a;
1544
1544
  }));
1545
1545
  }, [Re]);
1546
- const Qn = U(() => Te(null), []), Ze = (n) => {
1547
- if (n !== _ && (D(n), !(O !== "chat" && O !== "landing"))) {
1546
+ const Qn = U(() => we(null), []), Ze = (n) => {
1547
+ if (n !== _ && (O(n), !(D !== "chat" && D !== "landing"))) {
1548
1548
  if (n === "cloud") {
1549
1549
  y(b ? "chat" : "landing");
1550
1550
  return;
@@ -1552,40 +1552,40 @@ function Gs({
1552
1552
  y(te ? "chat" : "landing");
1553
1553
  }
1554
1554
  }, ze = (n) => {
1555
- D("local"), Te(n), y("chat");
1556
- }, un = (n, a, o) => {
1557
- fe({ lane: n, id: a }), ue(o || "");
1555
+ O("local"), we(n), y("chat");
1556
+ }, un = (n, a, i) => {
1557
+ fe({ lane: n, id: a }), ue(i || "");
1558
1558
  }, mn = () => {
1559
1559
  fe(null), ue("");
1560
1560
  }, pn = async () => {
1561
- if (!z || Se) return;
1561
+ if (!z || Ie) return;
1562
1562
  const n = z, a = de.trim();
1563
1563
  if (fe(null), ue(""), !!a) {
1564
1564
  $e(!0);
1565
1565
  try {
1566
1566
  if (n.lane === "cloud") {
1567
- const o = E.find((r) => q(r.id, n.id));
1568
- if (!o) return;
1567
+ const i = E.find((r) => q(r.id, n.id));
1568
+ if (!i) return;
1569
1569
  await St(
1570
- o.personalAgentId,
1571
- o.id,
1570
+ i.personalAgentId,
1571
+ i.id,
1572
1572
  a,
1573
1573
  N
1574
1574
  ), L(
1575
1575
  (r) => r.map((u) => q(u.id, n.id) ? { ...u, title: a } : u)
1576
1576
  );
1577
1577
  } else
1578
- await zt(n.id, a), ne((o) => o + 1);
1578
+ await zt(n.id, a), ne((i) => i + 1);
1579
1579
  je("已重命名会话", "success");
1580
- } catch (o) {
1581
- je(o instanceof Error ? o.message : "重命名失败", "error");
1580
+ } catch (i) {
1581
+ je(i instanceof Error ? i.message : "重命名失败", "error");
1582
1582
  } finally {
1583
1583
  $e(!1);
1584
1584
  }
1585
1585
  }
1586
- }, hn = async (n, a, o) => {
1586
+ }, hn = async (n, a, i) => {
1587
1587
  if (await Fe({
1588
- content: `确定删除会话「${o || "未命名会话"}」吗?删除后不可恢复。`
1588
+ content: `确定删除会话「${i || "未命名会话"}」吗?删除后不可恢复。`
1589
1589
  }))
1590
1590
  try {
1591
1591
  if (n === "cloud") {
@@ -1593,14 +1593,14 @@ function Gs({
1593
1593
  if (!u) return;
1594
1594
  await Lt(u.personalAgentId, u.id, N), L((v) => v.filter((k) => !q(k.id, a))), q(b == null ? void 0 : b.sessionId, a) && (P(null), y("landing"));
1595
1595
  } else
1596
- await Qt(a), ne((u) => u + 1), ee === a && (Te(null), y("landing"));
1596
+ await Qt(a), ne((u) => u + 1), ee === a && (we(null), y("landing"));
1597
1597
  je("已删除会话", "success");
1598
1598
  } catch (u) {
1599
1599
  je(u instanceof Error ? u.message : "删除失败", "error");
1600
1600
  }
1601
- }, se = (n, a = null, o = null) => {
1602
- D("cloud"), j(n.id), P(
1603
- (r) => r && r.agent.id === n.id && r.sessionId === a && !o ? r : { agent: n, sessionId: a, draft: o, ts: Date.now() }
1601
+ }, se = (n, a = null, i = null) => {
1602
+ O("cloud"), j(n.id), P(
1603
+ (r) => r && r.agent.id === n.id && r.sessionId === a && !i ? r : { agent: n, sessionId: a, draft: i, ts: Date.now() }
1604
1604
  ), y("chat");
1605
1605
  };
1606
1606
  A(() => {
@@ -1611,12 +1611,12 @@ function Gs({
1611
1611
  Ve(a), y("agentDetail");
1612
1612
  return;
1613
1613
  }
1614
- se(a, n.sessionId ?? null), n.newSession > 0 && ne((o) => o + 1);
1614
+ se(a, n.sessionId ?? null), n.newSession > 0 && ne((i) => i + 1);
1615
1615
  }, [p == null ? void 0 : p.ts]);
1616
1616
  const gn = () => {
1617
- D("cloud"), j((Q == null ? void 0 : Q.id) ?? null), P(null), y("landing");
1617
+ O("cloud"), j((Q == null ? void 0 : Q.id) ?? null), P(null), y("landing");
1618
1618
  }, bn = () => {
1619
- D("local"), ne((n) => n + 1), y("chat");
1619
+ O("local"), ne((n) => n + 1), y("chat");
1620
1620
  }, Xn = () => {
1621
1621
  if (_ === "local" && H && G) {
1622
1622
  bn();
@@ -1630,13 +1630,13 @@ function Gs({
1630
1630
  }, Yn = async (n, a) => {
1631
1631
  if (me)
1632
1632
  try {
1633
- const o = n.length > 20 ? `${n.slice(0, 20)}…` : n, r = await At(
1633
+ const i = n.length > 20 ? `${n.slice(0, 20)}…` : n, r = await At(
1634
1634
  me.id,
1635
- o,
1635
+ i,
1636
1636
  N,
1637
1637
  a
1638
1638
  );
1639
- tn(null), D("cloud"), P({
1639
+ tn(null), O("cloud"), P({
1640
1640
  agent: me,
1641
1641
  sessionId: r.id,
1642
1642
  draft: n,
@@ -1645,13 +1645,13 @@ function Gs({
1645
1645
  } catch {
1646
1646
  }
1647
1647
  }, Jn = (n) => {
1648
- D("local"), ye(n), y("chat");
1648
+ O("local"), ye(n), y("chat");
1649
1649
  }, Ee = U(() => {
1650
1650
  if (H && _ === "local" && G) {
1651
1651
  ne((n) => n + 1), y("chat");
1652
1652
  return;
1653
1653
  }
1654
- D("cloud"), j((Q == null ? void 0 : Q.id) ?? null), P(null), y("landing");
1654
+ O("cloud"), j((Q == null ? void 0 : Q.id) ?? null), P(null), y("landing");
1655
1655
  }, [H, _, G, Q]), qn = X(() => {
1656
1656
  const n = [
1657
1657
  {
@@ -1676,14 +1676,14 @@ function Gs({
1676
1676
  {
1677
1677
  key: "todo",
1678
1678
  label: "工作待办",
1679
- icon: /* @__PURE__ */ e(On, {}),
1680
- run: () => _e("todo")
1679
+ icon: /* @__PURE__ */ e(Dn, {}),
1680
+ run: () => Le("todo")
1681
1681
  },
1682
1682
  {
1683
1683
  key: "notes",
1684
1684
  label: "个人笔记",
1685
1685
  icon: /* @__PURE__ */ e(nn, {}),
1686
- run: () => _e("notes")
1686
+ run: () => Le("notes")
1687
1687
  },
1688
1688
  {
1689
1689
  key: "settings",
@@ -1698,16 +1698,16 @@ function Gs({
1698
1698
  icon: _ === "local" ? /* @__PURE__ */ e(vn, {}) : /* @__PURE__ */ e(Nn, {}),
1699
1699
  run: () => Ze(_ === "local" ? "cloud" : "local")
1700
1700
  }), n;
1701
- }, [Ee, _e, H, _]);
1701
+ }, [Ee, Le, H, _]);
1702
1702
  A(() => {
1703
1703
  const n = (a) => {
1704
1704
  if (!(a.metaKey || a.ctrlKey) || a.altKey) return;
1705
- const o = a.key.toLowerCase();
1706
- if (o === "k") {
1705
+ const i = a.key.toLowerCase();
1706
+ if (i === "k") {
1707
1707
  a.preventDefault(), V((r) => !r);
1708
1708
  return;
1709
1709
  }
1710
- o === "n" && (a.preventDefault(), Ee());
1710
+ i === "n" && (a.preventDefault(), Ee());
1711
1711
  };
1712
1712
  return document.addEventListener("keydown", n), () => document.removeEventListener("keydown", n);
1713
1713
  }, [Ee]);
@@ -1723,8 +1723,8 @@ function Gs({
1723
1723
  open: () => ze(a.id)
1724
1724
  });
1725
1725
  for (const a of E) {
1726
- const o = Be.get(a.personalAgentId);
1727
- if (!o) continue;
1726
+ const i = Be.get(a.personalAgentId);
1727
+ if (!i) continue;
1728
1728
  const r = new Date(
1729
1729
  (a.updateTime || a.createTime || "").replace(" ", "T")
1730
1730
  ).getTime();
@@ -1733,11 +1733,11 @@ function Gs({
1733
1733
  title: a.title || "未命名会话",
1734
1734
  lane: "cloud",
1735
1735
  updatedAt: Number.isNaN(r) ? 0 : r,
1736
- open: () => se(o, a.id)
1736
+ open: () => se(i, a.id)
1737
1737
  });
1738
1738
  }
1739
- return n.sort((a, o) => o.updatedAt - a.updatedAt), n.slice(0, 5);
1740
- }, [H, Y, E, Be]), nt = T.nickname || (C == null ? void 0 : C.display_name) || (C == null ? void 0 : C.username) || "", tt = X(() => c ? [
1739
+ return n.sort((a, i) => i.updatedAt - a.updatedAt), n.slice(0, 5);
1740
+ }, [H, Y, E, Be]), nt = T.nickname || (w == null ? void 0 : w.display_name) || (w == null ? void 0 : w.username) || "", tt = X(() => c ? [
1741
1741
  {
1742
1742
  mode: "personal",
1743
1743
  label: "个人工作台",
@@ -1749,16 +1749,16 @@ function Gs({
1749
1749
  icon: /* @__PURE__ */ e(Yt, {})
1750
1750
  }
1751
1751
  ].filter(
1752
- (a) => $n(C, a.mode)
1753
- ) : [], [C, c]), at = b ? `${b.agent.id}-${b.sessionId ?? 0}-${b.ts}` : "none";
1752
+ (a) => $n(w, a.mode)
1753
+ ) : [], [w, c]), at = b ? `${b.agent.id}-${b.sessionId ?? 0}-${b.ts}` : "none";
1754
1754
  let le;
1755
- return O === "agentDetail" && an ? le = /* @__PURE__ */ e("div", { className: s.detailHost, children: /* @__PURE__ */ e(
1755
+ return D === "agentDetail" && an ? le = /* @__PURE__ */ e("div", { className: s.detailHost, children: /* @__PURE__ */ e(
1756
1756
  En,
1757
1757
  {
1758
1758
  agent: an,
1759
1759
  onBack: () => y("extensions")
1760
1760
  }
1761
- ) }) : O === "schedule" ? le = /* @__PURE__ */ e(
1761
+ ) }) : D === "schedule" ? le = /* @__PURE__ */ e(
1762
1762
  ta,
1763
1763
  {
1764
1764
  localOnline: te,
@@ -1768,26 +1768,22 @@ function Gs({
1768
1768
  defaultLane: _,
1769
1769
  defaultAgentId: (me == null ? void 0 : me.id) ?? null
1770
1770
  }
1771
- ) : O === "extensions" ? le = /* @__PURE__ */ e(
1771
+ ) : D === "extensions" ? le = /* @__PURE__ */ e(
1772
1772
  aa,
1773
1773
  {
1774
1774
  agents: g,
1775
1775
  loading: B,
1776
1776
  skillsAgent: Q,
1777
1777
  token: N,
1778
- currentUser: C,
1779
1778
  lane: _,
1780
1779
  onChat: (n) => se(n),
1781
1780
  onConfig: (n) => {
1782
1781
  Ve(n), y("agentDetail");
1783
1782
  },
1784
1783
  onCreated: (n) => I((a) => [...a, n]),
1785
- onOpenPersonalTab: _e,
1786
- onOpenWorkbenchShell: () => y("workbenchShell"),
1787
- onOpenHistory: () => y("history"),
1788
- capTabRequest: w
1784
+ capTabRequest: C
1789
1785
  }
1790
- ) : O === "history" ? le = /* @__PURE__ */ e(
1786
+ ) : D === "history" ? le = /* @__PURE__ */ e(
1791
1787
  sa,
1792
1788
  {
1793
1789
  agents: g,
@@ -1795,10 +1791,10 @@ function Gs({
1795
1791
  onOpenSession: (n, a) => se(n, a),
1796
1792
  onBack: () => y("extensions")
1797
1793
  }
1798
- ) : O === "workbenchShell" ? le = /* @__PURE__ */ e(
1794
+ ) : D === "workbenchShell" ? le = /* @__PURE__ */ e(
1799
1795
  Ls,
1800
1796
  {
1801
- onOpenProject: ke,
1797
+ onOpenProject: _e,
1802
1798
  selectedPersonalAgent: me,
1803
1799
  personalView: "chat",
1804
1800
  newSessionTrigger: ce,
@@ -1809,14 +1805,14 @@ function Gs({
1809
1805
  onChatWithPersonalAgent: (n) => se(n),
1810
1806
  onSwitchMode: c
1811
1807
  }
1812
- ) : O === "personalTab" ? le = /* @__PURE__ */ i("div", { className: s.personalTabHost, children: [
1808
+ ) : D === "personalTab" ? le = /* @__PURE__ */ o("div", { className: s.personalTabHost, children: [
1813
1809
  ae === "projects" && /* @__PURE__ */ e(
1814
1810
  en,
1815
1811
  {
1816
1812
  activeTab: "projects",
1817
1813
  onActiveTabChange: () => {
1818
1814
  },
1819
- onOpenProject: ke,
1815
+ onOpenProject: _e,
1820
1816
  hideTabs: !0
1821
1817
  }
1822
1818
  ),
@@ -1826,7 +1822,7 @@ function Gs({
1826
1822
  activeTab: "personal",
1827
1823
  onActiveTabChange: () => {
1828
1824
  },
1829
- onOpenProject: ke,
1825
+ onOpenProject: _e,
1830
1826
  hideTabs: !0
1831
1827
  }
1832
1828
  ),
@@ -1836,13 +1832,13 @@ function Gs({
1836
1832
  ae === "todo" && /* @__PURE__ */ e(
1837
1833
  Hn,
1838
1834
  {
1839
- onOpenProject: ke,
1835
+ onOpenProject: _e,
1840
1836
  onOpenNote: (n) => {
1841
1837
  Ge("notes"), Vn({ id: n, ts: Date.now() });
1842
1838
  },
1843
1839
  onOpenAgentSession: (n, a) => {
1844
- const o = g.find((r) => q(r.id, a));
1845
- o && se(o, n);
1840
+ const i = g.find((r) => q(r.id, a));
1841
+ i && se(i, n);
1846
1842
  },
1847
1843
  openTodoId: Gn
1848
1844
  }
@@ -1850,7 +1846,7 @@ function Gs({
1850
1846
  ae === "notes" && /* @__PURE__ */ e(
1851
1847
  In,
1852
1848
  {
1853
- onOpenProject: ke,
1849
+ onOpenProject: _e,
1854
1850
  onOpenTodo: zn,
1855
1851
  openNoteId: Un
1856
1852
  }
@@ -1868,12 +1864,12 @@ function Gs({
1868
1864
  onSwitchAgent: (n) => se(n)
1869
1865
  },
1870
1866
  at
1871
- ) }) : _ === "local" && H && G && O !== "landing" ? le = /* @__PURE__ */ e("div", { className: s.chatHost, children: /* @__PURE__ */ e(
1867
+ ) }) : _ === "local" && H && G && D !== "landing" ? le = /* @__PURE__ */ e("div", { className: s.chatHost, children: /* @__PURE__ */ e(
1872
1868
  Mn,
1873
1869
  {
1874
1870
  agent: Bs(G),
1875
1871
  newSessionTrigger: ce,
1876
- autoSendDraft: De,
1872
+ autoSendDraft: Oe,
1877
1873
  onAutoSendConsumed: () => ye(null),
1878
1874
  openSessionId: ee,
1879
1875
  onOpenSessionConsumed: Qn,
@@ -1891,16 +1887,16 @@ function Gs({
1891
1887
  localOffline: _ === "local" && !te,
1892
1888
  initialSpace: xe,
1893
1889
  onSend: Yn,
1894
- onOpenTab: _e,
1890
+ onOpenTab: Le,
1895
1891
  onQuickAsk: Xn,
1896
1892
  recentTasks: et,
1897
1893
  onOpenHistory: () => y("history")
1898
1894
  }
1899
- ), /* @__PURE__ */ i("div", { className: s.shell, children: [
1900
- /* @__PURE__ */ i("aside", { className: s.sidebar, "aria-label": "个人专享工作台导航", children: [
1901
- /* @__PURE__ */ i("div", { className: s.sideContent, children: [
1902
- H && /* @__PURE__ */ i("div", { className: s.laneTabs, role: "tablist", "aria-label": "任务车道", children: [
1903
- /* @__PURE__ */ i(
1895
+ ), /* @__PURE__ */ o("div", { className: s.shell, children: [
1896
+ /* @__PURE__ */ o("aside", { className: s.sidebar, "aria-label": "个人专享工作台导航", children: [
1897
+ /* @__PURE__ */ o("div", { className: s.sideContent, children: [
1898
+ H && /* @__PURE__ */ o("div", { className: s.laneTabs, role: "tablist", "aria-label": "任务车道", children: [
1899
+ /* @__PURE__ */ o(
1904
1900
  "button",
1905
1901
  {
1906
1902
  type: "button",
@@ -1915,7 +1911,7 @@ function Gs({
1915
1911
  ]
1916
1912
  }
1917
1913
  ),
1918
- /* @__PURE__ */ i(
1914
+ /* @__PURE__ */ o(
1919
1915
  "button",
1920
1916
  {
1921
1917
  type: "button",
@@ -1934,10 +1930,10 @@ function Gs({
1934
1930
  /* @__PURE__ */ e(
1935
1931
  Wt,
1936
1932
  {
1937
- currentUser: C,
1933
+ currentUser: w,
1938
1934
  token: N,
1939
1935
  isDesktop: Ae,
1940
- activeNav: O === "schedule" ? "schedule" : null,
1936
+ activeNav: D === "schedule" ? "schedule" : null,
1941
1937
  extensionsGroupActive: [
1942
1938
  "extensions",
1943
1939
  "agentDetail",
@@ -1946,8 +1942,8 @@ function Gs({
1946
1942
  "history",
1947
1943
  "personalTab",
1948
1944
  "workbenchShell"
1949
- ].includes(O),
1950
- activePersonalTab: O === "personalTab" ? ae : null,
1945
+ ].includes(D),
1946
+ activePersonalTab: D === "personalTab" ? ae : null,
1951
1947
  onDesktopNewTask: _ === "local" && G ? bn : void 0,
1952
1948
  onPickSpace: (n) => {
1953
1949
  tn(n), gn();
@@ -1959,25 +1955,25 @@ function Gs({
1959
1955
  onOpenSearch: () => {
1960
1956
  V(!0), re.getState().loadProjects();
1961
1957
  },
1962
- searchActive: oe,
1963
- onOpenPersonalTab: _e,
1958
+ searchActive: ie,
1959
+ onOpenPersonalTab: Le,
1964
1960
  onOpenWorkbenchShell: () => y("workbenchShell")
1965
1961
  }
1966
1962
  ),
1967
- /* @__PURE__ */ e("div", { className: s.sideTasks, children: _ === "cloud" ? /* @__PURE__ */ i(ge, { children: [
1963
+ /* @__PURE__ */ e("div", { className: s.sideTasks, children: _ === "cloud" ? /* @__PURE__ */ o(ge, { children: [
1968
1964
  /* @__PURE__ */ e("div", { className: s.tasksLabel, children: "项目" }),
1969
- Ce.length === 0 && !$ && /* @__PURE__ */ e("div", { className: s.tasksEmpty, children: "还没有项目空间或云端任务" }),
1970
- Ce.map((n) => {
1971
- const a = Ie.has(n.key);
1972
- return /* @__PURE__ */ i("div", { children: [
1973
- /* @__PURE__ */ i(
1965
+ ke.length === 0 && !$ && /* @__PURE__ */ e("div", { className: s.tasksEmpty, children: "还没有项目空间或云端任务" }),
1966
+ ke.map((n) => {
1967
+ const a = Te.has(n.key);
1968
+ return /* @__PURE__ */ o("div", { children: [
1969
+ /* @__PURE__ */ o(
1974
1970
  "button",
1975
1971
  {
1976
1972
  type: "button",
1977
1973
  className: s.projFolder,
1978
1974
  "aria-expanded": a,
1979
- onClick: () => be((o) => {
1980
- const r = new Set(o);
1975
+ onClick: () => be((i) => {
1976
+ const r = new Set(i);
1981
1977
  return r.has(n.key) ? r.delete(n.key) : r.add(n.key), r;
1982
1978
  }),
1983
1979
  children: [
@@ -1993,8 +1989,8 @@ function Gs({
1993
1989
  ]
1994
1990
  }
1995
1991
  ),
1996
- a && n.sessions.length > 0 && /* @__PURE__ */ e("div", { className: s.projRows, children: n.sessions.map((o) => {
1997
- const r = Be.get(o.personalAgentId), u = It(o.id), v = (z == null ? void 0 : z.lane) === "cloud" && z.id === u;
1992
+ a && n.sessions.length > 0 && /* @__PURE__ */ e("div", { className: s.projRows, children: n.sessions.map((i) => {
1993
+ const r = Be.get(i.personalAgentId), u = It(i.id), v = (z == null ? void 0 : z.lane) === "cloud" && z.id === u;
1998
1994
  return /* @__PURE__ */ e("div", { className: s.sessionRow, children: v ? /* @__PURE__ */ e(
1999
1995
  "input",
2000
1996
  {
@@ -2008,16 +2004,16 @@ function Gs({
2008
2004
  k.key === "Enter" ? (k.preventDefault(), k.currentTarget.blur()) : k.key === "Escape" && (k.preventDefault(), mn());
2009
2005
  }
2010
2006
  }
2011
- ) : /* @__PURE__ */ i(ge, { children: [
2007
+ ) : /* @__PURE__ */ o(ge, { children: [
2012
2008
  /* @__PURE__ */ e(
2013
2009
  "button",
2014
2010
  {
2015
2011
  type: "button",
2016
- className: `${s.recentItem} ${(b == null ? void 0 : b.sessionId) === o.id ? s.recentItemActive : ""}`,
2012
+ className: `${s.recentItem} ${(b == null ? void 0 : b.sessionId) === i.id ? s.recentItemActive : ""}`,
2017
2013
  disabled: !r,
2018
- title: r ? o.title || "未命名会话" : "伙伴已不存在,无法打开",
2019
- onClick: () => r && se(r, o.id),
2020
- children: /* @__PURE__ */ e("span", { className: s.recentItemText, children: o.title || "未命名会话" })
2014
+ title: r ? i.title || "未命名会话" : "伙伴已不存在,无法打开",
2015
+ onClick: () => r && se(r, i.id),
2016
+ children: /* @__PURE__ */ e("span", { className: s.recentItemText, children: i.title || "未命名会话" })
2021
2017
  }
2022
2018
  ),
2023
2019
  /* @__PURE__ */ e(
@@ -2037,11 +2033,11 @@ function Gs({
2037
2033
  r && (k === "rename" ? un(
2038
2034
  "cloud",
2039
2035
  u,
2040
- o.title || ""
2036
+ i.title || ""
2041
2037
  ) : k === "delete" && hn(
2042
2038
  "cloud",
2043
2039
  u,
2044
- o.title || ""
2040
+ i.title || ""
2045
2041
  ));
2046
2042
  }
2047
2043
  },
@@ -2059,24 +2055,24 @@ function Gs({
2059
2055
  )
2060
2056
  }
2061
2057
  )
2062
- ] }) }, o.id);
2058
+ ] }) }, i.id);
2063
2059
  }) })
2064
2060
  ] }, n.key);
2065
2061
  })
2066
- ] }) : /* @__PURE__ */ i(ge, { children: [
2062
+ ] }) : /* @__PURE__ */ o(ge, { children: [
2067
2063
  /* @__PURE__ */ e("div", { className: s.tasksLabel, children: "目录" }),
2068
2064
  Re.map((n) => {
2069
- const a = Ie.has(n.key);
2070
- return /* @__PURE__ */ i("div", { children: [
2071
- /* @__PURE__ */ i(
2065
+ const a = Te.has(n.key);
2066
+ return /* @__PURE__ */ o("div", { children: [
2067
+ /* @__PURE__ */ o(
2072
2068
  "button",
2073
2069
  {
2074
2070
  type: "button",
2075
2071
  className: s.projFolder,
2076
2072
  "aria-expanded": a,
2077
2073
  title: n.path ?? "未绑定目录:任务不带目录上下文",
2078
- onClick: () => be((o) => {
2079
- const r = new Set(o);
2074
+ onClick: () => be((i) => {
2075
+ const r = new Set(i);
2080
2076
  return r.has(n.key) ? r.delete(n.key) : r.add(n.key), r;
2081
2077
  }),
2082
2078
  children: [
@@ -2092,8 +2088,8 @@ function Gs({
2092
2088
  ]
2093
2089
  }
2094
2090
  ),
2095
- a && /* @__PURE__ */ e("div", { className: s.projRows, children: n.sessions.map((o) => {
2096
- const r = (z == null ? void 0 : z.lane) === "local" && z.id === o.id;
2091
+ a && /* @__PURE__ */ e("div", { className: s.projRows, children: n.sessions.map((i) => {
2092
+ const r = (z == null ? void 0 : z.lane) === "local" && z.id === i.id;
2097
2093
  return /* @__PURE__ */ e("div", { className: s.sessionRow, children: r ? /* @__PURE__ */ e(
2098
2094
  "input",
2099
2095
  {
@@ -2107,15 +2103,15 @@ function Gs({
2107
2103
  u.key === "Enter" ? (u.preventDefault(), u.currentTarget.blur()) : u.key === "Escape" && (u.preventDefault(), mn());
2108
2104
  }
2109
2105
  }
2110
- ) : /* @__PURE__ */ i(ge, { children: [
2106
+ ) : /* @__PURE__ */ o(ge, { children: [
2111
2107
  /* @__PURE__ */ e(
2112
2108
  "button",
2113
2109
  {
2114
2110
  type: "button",
2115
- className: `${s.recentItem} ${ee === o.id ? s.recentItemActive : ""}`,
2116
- title: o.title,
2117
- onClick: () => ze(o.id),
2118
- children: /* @__PURE__ */ e("span", { className: s.recentItemText, children: o.title || "未命名会话" })
2111
+ className: `${s.recentItem} ${ee === i.id ? s.recentItemActive : ""}`,
2112
+ title: i.title,
2113
+ onClick: () => ze(i.id),
2114
+ children: /* @__PURE__ */ e("span", { className: s.recentItemText, children: i.title || "未命名会话" })
2119
2115
  }
2120
2116
  ),
2121
2117
  /* @__PURE__ */ e(
@@ -2134,12 +2130,12 @@ function Gs({
2134
2130
  onClick: ({ key: u }) => {
2135
2131
  u === "rename" ? un(
2136
2132
  "local",
2137
- o.id,
2138
- o.title || ""
2133
+ i.id,
2134
+ i.title || ""
2139
2135
  ) : u === "delete" && hn(
2140
2136
  "local",
2141
- o.id,
2142
- o.title || ""
2137
+ i.id,
2138
+ i.title || ""
2143
2139
  );
2144
2140
  }
2145
2141
  },
@@ -2156,7 +2152,7 @@ function Gs({
2156
2152
  )
2157
2153
  }
2158
2154
  )
2159
- ] }) }, o.id);
2155
+ ] }) }, i.id);
2160
2156
  }) })
2161
2157
  ] }, n.key);
2162
2158
  }),
@@ -2169,7 +2165,7 @@ function Gs({
2169
2165
  displayName: nt,
2170
2166
  subtitle: "Z-OPC · 个人(专享)",
2171
2167
  onOpenSettings: () => Ue(!0),
2172
- children: tt.map((n) => /* @__PURE__ */ i(
2168
+ children: tt.map((n) => /* @__PURE__ */ o(
2173
2169
  "button",
2174
2170
  {
2175
2171
  type: "button",
@@ -2195,18 +2191,18 @@ function Gs({
2195
2191
  token: N
2196
2192
  }
2197
2193
  ),
2198
- oe && /* @__PURE__ */ e(
2194
+ ie && /* @__PURE__ */ e(
2199
2195
  Gt,
2200
2196
  {
2201
2197
  sessions: E,
2202
2198
  localSessions: H ? Y : [],
2203
2199
  agentsById: Be,
2204
- projects: ie,
2200
+ projects: oe,
2205
2201
  token: N,
2206
2202
  actions: qn,
2207
2203
  onOpenSession: (n, a) => se(n, a),
2208
2204
  onOpenLocalSession: ze,
2209
- onOpenProject: (n) => ke(n.id),
2205
+ onOpenProject: (n) => _e(n.id),
2210
2206
  onClose: () => V(!1)
2211
2207
  }
2212
2208
  )