@yuku123/z-team-component 0.2.142 → 0.2.143

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/{AdminModuleContent-DIntalEE.js → AdminModuleContent-C9y4u5Ab.js} +6 -6
  2. package/dist/{ChangeLogView-BG0idpcI.js → ChangeLogView-Crx_PRZV.js} +1 -1
  3. package/dist/{ComponentDoc-DmA8kQED.js → ComponentDoc-CpD9Oqft.js} +3 -3
  4. package/dist/{InvitationManagementPage-BmvQrlzu.js → InvitationManagementPage-K8R9NQMT.js} +1 -1
  5. package/dist/{OnboardingPage-BNqu7ED-.js → OnboardingPage-DovjMzon.js} +2 -2
  6. package/dist/{ScheduledTasks-BpLYITou.js → ScheduledTasks-CAtPYgXw.js} +6 -6
  7. package/dist/SettingsModal-B6s0m7ss.js +1103 -0
  8. package/dist/{SystemShell-CHJGJAor.js → SystemShell-BwtZGu32.js} +336 -287
  9. package/dist/{admin-logs-CGbHioxz.js → admin-logs-CqN5Phct.js} +1 -1
  10. package/dist/{api-DTQ6gite.js → api-Cibkde66.js} +1 -1
  11. package/dist/{api-CVAq8S_3.js → api-DIAm9CQz.js} +1 -1
  12. package/dist/{createWorkspaceWsHandler-eEZssgTR.js → createWorkspaceWsHandler-DTnK73tD.js} +822 -822
  13. package/dist/{index-C6TJo_6f.js → index-B2ytjRa-.js} +3 -3
  14. package/dist/{index-BiKw2Cl_.js → index-BBtMl9Nz.js} +1 -1
  15. package/dist/{index-DCbdksxa.js → index-BGcqNhV1.js} +3 -3
  16. package/dist/{index-WYKbD2Kc.js → index-BGwAJocm.js} +1 -1
  17. package/dist/{index-CwohTaZ3.js → index-Bbb31dmy.js} +4 -4
  18. package/dist/{index-iFIFnLjk.js → index-BfR9eIzg.js} +3 -3
  19. package/dist/{index-DUEGauT8.js → index-BhHEPcvx.js} +1 -1
  20. package/dist/{index-DnA9mLM4.js → index-Bn9tzXst.js} +2 -2
  21. package/dist/{index-ZTJ7n_J_.js → index-Bs8fmFn0.js} +21 -21
  22. package/dist/{index-CkFZb89W.js → index-CGYCCh8R.js} +3 -3
  23. package/dist/{index-CnHG8LvQ.js → index-C_Ysrnnp.js} +2 -2
  24. package/dist/{index-D6jssKSM.js → index-CshNZQgN.js} +1 -1
  25. package/dist/{index-D2qy0vH-.js → index-D7dN1HGT.js} +2 -2
  26. package/dist/{index-BruNw5wQ.js → index-DCoLm48X.js} +1 -1
  27. package/dist/{index-ClaU3cVV.js → index-DTezuv5L.js} +2 -2
  28. package/dist/{index-BXas8GPY.js → index-DW8IHcLd.js} +2 -2
  29. package/dist/{index-DNofgrle.js → index-DXaXLRHV.js} +2 -2
  30. package/dist/{index-BLDm7Ltq.js → index-Dd2LlTvg.js} +4 -4
  31. package/dist/{index-G4_ZNL1t.js → index-DkbEusgG.js} +2 -2
  32. package/dist/index-Dpcve4hK.js +20 -0
  33. package/dist/index-VIj6jQQc.js +8412 -0
  34. package/dist/{index-B02tvvRk.js → index-WeUfGyGs.js} +1 -1
  35. package/dist/{index-1hUJPdXC.js → index-a3rvjuIX.js} +2 -2
  36. package/dist/{index-DoQpFpjM.js → index-amd_6wnu.js} +285 -293
  37. package/dist/{index-ByWmrjar.js → index-oCHQ6Gm8.js} +2 -2
  38. package/dist/index.js +1 -1
  39. package/dist/{instance-Ce0ksjOY.js → instance-cM3jNPz_.js} +1 -1
  40. package/dist/{menuPermission-CXN-JDku.js → menuPermission-CtsbPA_m.js} +3 -3
  41. package/dist/pages.js +1 -1
  42. package/dist/{send-default-agent-team-message-Caz3lGg6.js → send-default-agent-team-message-C3A4gJAt.js} +1 -1
  43. package/dist/{training-ry7fCVV4.js → training-VX0S1Wq1.js} +1 -1
  44. package/dist/{webide-DyvaibPK.js → webide-DdKW4JyS.js} +3 -3
  45. package/dist/z-team-component.css +1 -1
  46. package/package.json +2 -2
  47. package/dist/index-CSuF7xTK.js +0 -9496
@@ -1,23 +1,23 @@
1
1
  import { jsx as n, jsxs as p, Fragment as J } from "react/jsx-runtime";
2
- import { S as An, P as Dn } from "./webide-DyvaibPK.js";
3
- import { Dropdown as en } from "antd";
4
- import { PlayCircleOutlined as Pn, FileTextOutlined as cn, PlusOutlined as $n, ClockCircleOutlined as jn, AppstoreOutlined as xn, UnorderedListOutlined as En, SettingOutlined as Rn } from "@ant-design/icons";
5
- import { useState as d, useRef as Ne, useEffect as I, useCallback as B, useMemo as L } from "react";
6
- import { u as X, w as Mn, x as Kn, t as Fn, v as z, y as Bn, z as ke, A as Hn, D as Wn } from "./ComponentDoc-DmA8kQED.js";
7
- import { s, T as _n, R as De, D as we, f as Zn, a as Gn, F as Pe, P as Vn, L as Un, A as Qn, C as zn, b as Jn, c as Xn, p as Yn, d as qn, e as nn, g as tn, h as et, W as nt, i as tt, S as st, j as at, k as lt, l as sn, m as ot, r as it, n as ct, U as rt, o as dt, q as ut, t as pt } from "./index-CSuF7xTK.js";
8
- import { u as rn, i as ht, s as an, c as mt } from "./createWorkspaceWsHandler-eEZssgTR.js";
9
- import { h as ft, f as gt } from "./index-WYKbD2Kc.js";
10
- import { S as bt, P as yt, L as kt, a as Nt, E as wt, C as Tt, W as ln, b as on, T as vt, c as Ct } from "./ScheduledTasks-BpLYITou.js";
11
- import { TodoTab as St } from "@yuku123/z-task-component";
12
- const It = [
2
+ import { S as On, P as An } from "./webide-DdKW4JyS.js";
3
+ import { Dropdown as qe } from "antd";
4
+ import { PlayCircleOutlined as Dn, FileTextOutlined as cn, PlusOutlined as Pn, ClockCircleOutlined as $n, AppstoreOutlined as jn, UnorderedListOutlined as xn, SettingOutlined as En } from "@ant-design/icons";
5
+ import { useState as u, useRef as Ne, useEffect as I, useCallback as B, useMemo as O } from "react";
6
+ import { u as X, w as Rn, x as Kn, t as Mn, v as z, y as Fn, z as ke, A as Bn, D as Hn } from "./ComponentDoc-CpD9Oqft.js";
7
+ import { s, T as Wn, R as Ae, D as we, f as _n, a as Zn, F as De, P as Gn, L as Vn, A as Un, C as Qn, b as zn, c as Jn, p as Xn, d as Yn, e as en, g as nn, h as qn, W as et, i as nt, u as tn, S as tt, j as st, k as sn, l as at, r as lt, m as ot, U as it, n as ct, o as rt, q as dt } from "./index-VIj6jQQc.js";
8
+ import { u as rn, i as ut, s as an, c as pt } from "./createWorkspaceWsHandler-DTnK73tD.js";
9
+ import { h as ht, f as mt } from "./index-BGwAJocm.js";
10
+ import { S as gt, P as ft, L as bt, a as yt, E as kt, C as Nt, W as ln, b as on, T as wt, c as Tt } from "./ScheduledTasks-CAtPYgXw.js";
11
+ import { TodoTab as vt } from "@yuku123/z-task-component";
12
+ const Ct = [
13
13
  "帮我排查一个线上问题",
14
14
  "总结一下今天的群聊进展",
15
15
  "把这周的变更整理成周报"
16
- ], Ot = [
16
+ ], St = [
17
17
  {
18
18
  key: "video",
19
19
  label: "视频生成",
20
- icon: /* @__PURE__ */ n(Pn, {}),
20
+ icon: /* @__PURE__ */ n(Dn, {}),
21
21
  action: "chat",
22
22
  prompt: "帮我写一条 15 秒短视频脚本,主题是:"
23
23
  },
@@ -30,44 +30,44 @@ const It = [
30
30
  {
31
31
  key: "vibe",
32
32
  label: "Vibe Coding",
33
- icon: /* @__PURE__ */ n(zn, {}),
33
+ icon: /* @__PURE__ */ n(Qn, {}),
34
34
  action: "webide"
35
35
  },
36
36
  {
37
37
  key: "design",
38
38
  label: "设计视觉",
39
- icon: /* @__PURE__ */ n(Jn, {}),
39
+ icon: /* @__PURE__ */ n(zn, {}),
40
40
  action: "chat",
41
41
  prompt: "帮我出一版视觉设计稿,风格偏:"
42
42
  },
43
43
  {
44
44
  key: "ask",
45
45
  label: "问问 Z-OPC",
46
- icon: /* @__PURE__ */ n(De, {}),
46
+ icon: /* @__PURE__ */ n(Ae, {}),
47
47
  action: "ask"
48
48
  }
49
49
  ];
50
- function Lt() {
51
- const g = (/* @__PURE__ */ new Date()).getHours();
52
- return g < 5 ? "夜深了" : g < 12 ? "早上好" : g < 14 ? "中午好" : g < 18 ? "下午好" : "晚上好";
50
+ function It() {
51
+ const f = (/* @__PURE__ */ new Date()).getHours();
52
+ return f < 5 ? "夜深了" : f < 12 ? "早上好" : f < 14 ? "中午好" : f < 18 ? "下午好" : "晚上好";
53
53
  }
54
- function At(g) {
55
- if (!g) return "";
56
- const b = new Date(g), O = /* @__PURE__ */ new Date(), h = O.getTime() - g;
57
- if (h < 6e4) return "刚刚";
58
- if (h < 36e5) return `${Math.floor(h / 6e4)} 分钟前`;
59
- if (b.toDateString() === O.toDateString()) {
54
+ function Lt(f) {
55
+ if (!f) return "";
56
+ const b = new Date(f), L = /* @__PURE__ */ new Date(), m = L.getTime() - f;
57
+ if (m < 6e4) return "刚刚";
58
+ if (m < 36e5) return `${Math.floor(m / 6e4)} 分钟前`;
59
+ if (b.toDateString() === L.toDateString()) {
60
60
  const A = (y) => String(y).padStart(2, "0");
61
61
  return `${A(b.getHours())}:${A(b.getMinutes())}`;
62
62
  }
63
- const k = new Date(O);
64
- return k.setDate(O.getDate() - 1), b.toDateString() === k.toDateString() ? "昨天" : `${b.getMonth() + 1}月${b.getDate()}日`;
63
+ const k = new Date(L);
64
+ return k.setDate(L.getDate() - 1), b.toDateString() === k.toDateString() ? "昨天" : `${b.getMonth() + 1}月${b.getDate()}日`;
65
65
  }
66
- function Dt({
67
- agents: g,
66
+ function Ot({
67
+ agents: f,
68
68
  activeAgent: b,
69
- onSwitchAgent: O,
70
- localAgentName: h,
69
+ onSwitchAgent: L,
70
+ localAgentName: m,
71
71
  onLocalSend: k,
72
72
  localOffline: A = !1,
73
73
  initialSpace: y,
@@ -75,54 +75,54 @@ function Dt({
75
75
  onOpenTab: q,
76
76
  onQuickAsk: ce,
77
77
  recentTasks: ee = [],
78
- onOpenHistory: M
78
+ onOpenHistory: K
79
79
  }) {
80
- const w = X((i) => i.token), m = X((i) => i.currentUser), u = rn(), [D, f] = d(""), T = Ne(null), [C, G] = d(!1), [re, ne] = d(!1), [j, V] = d(y ?? null), [de, H] = d(!1);
80
+ const w = X((i) => i.token), h = X((i) => i.currentUser), d = rn(), [D, g] = u(""), T = Ne(null), [C, G] = u(!1), [re, ne] = u(!1), [j, V] = u(y ?? null), [de, H] = u(!1);
81
81
  I(() => {
82
82
  y && V(y);
83
83
  }, [y]);
84
84
  const ue = B(async () => {
85
85
  const i = D.trim();
86
86
  if (!(!i || C) && !A) {
87
- if (h && k) {
88
- k(i), f("");
87
+ if (m && k) {
88
+ k(i), g("");
89
89
  return;
90
90
  }
91
91
  if (b) {
92
92
  G(!0);
93
93
  try {
94
- await Y(i, j), f(""), V(null);
94
+ await Y(i, j), g(""), V(null);
95
95
  } finally {
96
96
  G(!1);
97
97
  }
98
98
  }
99
99
  }
100
- }, [D, C, A, h, k, b, Y, j]), pe = u.nickname || (m == null ? void 0 : m.display_name) || (m == null ? void 0 : m.username) || "";
100
+ }, [D, C, A, m, k, b, Y, j]), pe = d.nickname || (h == null ? void 0 : h.display_name) || (h == null ? void 0 : h.username) || "";
101
101
  return /* @__PURE__ */ n("div", { className: `${s.landing} ${s.xwScope}`, children: /* @__PURE__ */ p("div", { className: s.landingInner, children: [
102
- /* @__PURE__ */ n("div", { className: s.mascot, "aria-hidden": "true", children: /* @__PURE__ */ n("img", { src: _n, alt: "" }) }),
103
- /* @__PURE__ */ n("h1", { className: s.landingTitle, children: u.greetingEnabled ? `${Lt()}${pe ? `,${pe}` : ""}` : "开始新的对话" }),
104
- /* @__PURE__ */ n("p", { className: s.landingSub, children: h ? A ? "本机 Agent 未运行 —— 启动 Z-OPC 桌面端(伴生服务起来后自动连上)" : "本地模式:任务在你的电脑上执行,文件与上下文都不上云" : u.bio || "我是你的智能伙伴,有什么可以帮你?" }),
102
+ /* @__PURE__ */ n("div", { className: s.mascot, "aria-hidden": "true", children: /* @__PURE__ */ n("img", { src: Wn, alt: "" }) }),
103
+ /* @__PURE__ */ n("h1", { className: s.landingTitle, children: d.greetingEnabled ? `${It()}${pe ? `,${pe}` : ""}` : "开始新的对话" }),
104
+ /* @__PURE__ */ n("p", { className: s.landingSub, children: m ? A ? "本机 Agent 未运行 —— 启动 Z-OPC 桌面端(伴生服务起来后自动连上)" : "本地模式:任务在你的电脑上执行,文件与上下文都不上云" : d.bio || "我是你的智能伙伴,有什么可以帮你?" }),
105
105
  /* @__PURE__ */ p("div", { className: s.landingBox, children: [
106
106
  /* @__PURE__ */ n(
107
107
  "textarea",
108
108
  {
109
109
  ref: T,
110
110
  className: s.landingInput,
111
- placeholder: h ? A ? "本机 Agent 未运行,启动桌面端后即可在本地执行" : `给本机 Agent 发送消息,${an(u.sendKey)}` : `给智能伙伴发送消息,${an(u.sendKey)}`,
111
+ placeholder: m ? A ? "本机 Agent 未运行,启动桌面端后即可在本地执行" : `给本机 Agent 发送消息,${an(d.sendKey)}` : `给智能伙伴发送消息,${an(d.sendKey)}`,
112
112
  rows: 3,
113
113
  value: D,
114
114
  autoFocus: !0,
115
- onChange: (i) => f(i.target.value),
115
+ onChange: (i) => g(i.target.value),
116
116
  onKeyDown: (i) => {
117
- ht(i, u.sendKey) && !i.nativeEvent.isComposing && (i.preventDefault(), ue());
117
+ ut(i, d.sendKey) && !i.nativeEvent.isComposing && (i.preventDefault(), ue());
118
118
  }
119
119
  }
120
120
  ),
121
121
  /* @__PURE__ */ p("div", { className: s.landingBoxBar, children: [
122
- h ? /* @__PURE__ */ p("span", { className: s.agentChip, children: [
123
- /* @__PURE__ */ n(De, {}),
122
+ m ? /* @__PURE__ */ p("span", { className: s.agentChip, children: [
123
+ /* @__PURE__ */ n(Ae, {}),
124
124
  /* @__PURE__ */ p("span", { children: [
125
- h,
125
+ m,
126
126
  "(本机)"
127
127
  ] })
128
128
  ] }) : b ? /* @__PURE__ */ p("div", { className: s.agentChipWrap, children: [
@@ -133,13 +133,13 @@ function Dt({
133
133
  className: s.agentChip,
134
134
  onClick: () => ne((i) => !i),
135
135
  children: [
136
- /* @__PURE__ */ n(De, {}),
136
+ /* @__PURE__ */ n(Ae, {}),
137
137
  /* @__PURE__ */ n("span", { children: b.displayName }),
138
- g.length > 1 && /* @__PURE__ */ n(we, { className: s.chipCaret })
138
+ f.length > 1 && /* @__PURE__ */ n(we, { className: s.chipCaret })
139
139
  ]
140
140
  }
141
141
  ),
142
- re && g.length > 1 && /* @__PURE__ */ p(J, { children: [
142
+ re && f.length > 1 && /* @__PURE__ */ p(J, { children: [
143
143
  /* @__PURE__ */ n(
144
144
  "div",
145
145
  {
@@ -147,22 +147,22 @@ function Dt({
147
147
  onClick: () => ne(!1)
148
148
  }
149
149
  ),
150
- /* @__PURE__ */ n("div", { className: s.agentMenu, role: "menu", children: g.map((i) => /* @__PURE__ */ p(
150
+ /* @__PURE__ */ n("div", { className: s.agentMenu, role: "menu", children: f.map((i) => /* @__PURE__ */ p(
151
151
  "button",
152
152
  {
153
153
  type: "button",
154
154
  role: "menuitem",
155
155
  className: `${s.agentMenuItem} ${i.id === b.id ? s.agentMenuItemActive : ""}`,
156
156
  onClick: () => {
157
- O(i), ne(!1);
157
+ L(i), ne(!1);
158
158
  },
159
159
  children: [
160
160
  /* @__PURE__ */ n(
161
161
  "span",
162
162
  {
163
163
  className: s.agentDot,
164
- style: { background: Gn(i.displayName) },
165
- children: Zn(i.displayName)
164
+ style: { background: Zn(i.displayName) },
165
+ children: _n(i.displayName)
166
166
  }
167
167
  ),
168
168
  i.displayName
@@ -172,7 +172,7 @@ function Dt({
172
172
  )) })
173
173
  ] })
174
174
  ] }) : /* @__PURE__ */ n("span", { className: s.agentChipEmpty, children: "还没有云端伙伴,可到个人工作台创建" }),
175
- !h && b && /* @__PURE__ */ p("div", { className: s.agentChipWrap, children: [
175
+ !m && b && /* @__PURE__ */ p("div", { className: s.agentChipWrap, children: [
176
176
  /* @__PURE__ */ p(
177
177
  "button",
178
178
  {
@@ -181,7 +181,7 @@ function Dt({
181
181
  title: "本次新建任务归入的项目空间(可选)",
182
182
  onClick: () => H((i) => !i),
183
183
  children: [
184
- /* @__PURE__ */ n(Pe, {}),
184
+ /* @__PURE__ */ n(De, {}),
185
185
  /* @__PURE__ */ n("span", { children: j ? j.title : "不归组" }),
186
186
  /* @__PURE__ */ n(we, { className: s.chipCaret })
187
187
  ]
@@ -196,7 +196,7 @@ function Dt({
196
196
  }
197
197
  ),
198
198
  /* @__PURE__ */ n(
199
- Vn,
199
+ Gn,
200
200
  {
201
201
  token: w,
202
202
  currentId: (j == null ? void 0 : j.id) ?? null,
@@ -212,10 +212,10 @@ function Dt({
212
212
  {
213
213
  type: "button",
214
214
  className: s.landingSend,
215
- disabled: !D.trim() || C || A || !b && !h,
215
+ disabled: !D.trim() || C || A || !b && !m,
216
216
  onClick: () => void ue(),
217
217
  "aria-label": "发送",
218
- children: C ? /* @__PURE__ */ n(Un, {}) : /* @__PURE__ */ n(Qn, {})
218
+ children: C ? /* @__PURE__ */ n(Vn, {}) : /* @__PURE__ */ n(Un, {})
219
219
  }
220
220
  )
221
221
  ] })
@@ -223,12 +223,12 @@ function Dt({
223
223
  ee.length > 0 && /* @__PURE__ */ p("section", { className: s.recentBlock, "aria-label": "继续最近任务", children: [
224
224
  /* @__PURE__ */ p("div", { className: s.recentHead, children: [
225
225
  /* @__PURE__ */ n("span", { children: "继续最近任务" }),
226
- M && /* @__PURE__ */ n(
226
+ K && /* @__PURE__ */ n(
227
227
  "button",
228
228
  {
229
229
  type: "button",
230
230
  className: s.recentAll,
231
- onClick: M,
231
+ onClick: K,
232
232
  children: "全部 →"
233
233
  }
234
234
  )
@@ -249,13 +249,13 @@ function Dt({
249
249
  }
250
250
  ),
251
251
  /* @__PURE__ */ n("span", { className: s.recentTitle, children: i.title }),
252
- /* @__PURE__ */ n("span", { className: s.recentTime, children: At(i.updatedAt) })
252
+ /* @__PURE__ */ n("span", { className: s.recentTime, children: Lt(i.updatedAt) })
253
253
  ]
254
254
  },
255
255
  i.key
256
256
  )) })
257
257
  ] }),
258
- /* @__PURE__ */ n("div", { className: s.chipRow, children: Ot.map((i) => /* @__PURE__ */ p(
258
+ /* @__PURE__ */ n("div", { className: s.chipRow, children: St.map((i) => /* @__PURE__ */ p(
259
259
  "button",
260
260
  {
261
261
  type: "button",
@@ -274,7 +274,7 @@ function Dt({
274
274
  ce();
275
275
  return;
276
276
  }
277
- f(i.prompt ?? ""), (W = T.current) == null || W.focus();
277
+ g(i.prompt ?? ""), (W = T.current) == null || W.focus();
278
278
  },
279
279
  children: [
280
280
  /* @__PURE__ */ n("span", { className: s.capChipIcon, children: i.icon }),
@@ -283,14 +283,14 @@ function Dt({
283
283
  },
284
284
  i.key
285
285
  )) }),
286
- /* @__PURE__ */ n("div", { className: s.chipRow, children: It.map((i) => /* @__PURE__ */ n(
286
+ /* @__PURE__ */ n("div", { className: s.chipRow, children: Ct.map((i) => /* @__PURE__ */ n(
287
287
  "button",
288
288
  {
289
289
  type: "button",
290
290
  className: s.suggestChip,
291
291
  onClick: () => {
292
292
  var W;
293
- f(i), (W = T.current) == null || W.focus();
293
+ g(i), (W = T.current) == null || W.focus();
294
294
  },
295
295
  children: i
296
296
  },
@@ -305,75 +305,75 @@ function Dt({
305
305
  ] })
306
306
  ] }) });
307
307
  }
308
- const ie = ut() || typeof localStorage < "u" && localStorage.getItem("ft_exclusive_force_desktop") === "1";
309
- function Pt(g) {
310
- return g.type === "jar" ? {
308
+ const ie = rt() || typeof localStorage < "u" && localStorage.getItem("ft_exclusive_force_desktop") === "1";
309
+ function At(f) {
310
+ return f.type === "jar" ? {
311
311
  id: "-1",
312
312
  userId: "local",
313
313
  agentHubAgentId: null,
314
314
  agentCode: "local-default",
315
- displayName: g.name || "本地 Agent",
315
+ displayName: f.name || "本地 Agent",
316
316
  avatar: null,
317
317
  isLocal: !0
318
318
  } : {
319
319
  id: "-1",
320
320
  userId: "local",
321
321
  agentHubAgentId: null,
322
- agentCode: g.name,
323
- displayName: g.name,
322
+ agentCode: f.name,
323
+ displayName: f.name,
324
324
  avatar: null,
325
325
  isLocal: !0,
326
- localAgentId: g.id,
327
- localAgentType: g.type
326
+ localAgentId: f.id,
327
+ localAgentType: f.type
328
328
  };
329
329
  }
330
- function _t({
331
- onSwitchMode: g,
330
+ function Ht({
331
+ onSwitchMode: f,
332
332
  onOpenProject: b,
333
- openAgentRequest: O
333
+ openAgentRequest: L
334
334
  }) {
335
- const h = X((e) => e.token), k = X((e) => e.currentUser), A = rn(), [y, Y] = d([]), [q, ce] = d(!0), [ee, M] = d(null), [w, m] = d("landing"), [u, D] = d(null), [f, T] = d(
335
+ const m = X((e) => e.token), k = X((e) => e.currentUser), A = rn(), [y, Y] = u([]), [q, ce] = u(!0), [ee, K] = u(null), [w, h] = u("landing"), [d, D] = u(null), [g, T] = u(
336
336
  ie ? "local" : "cloud"
337
- ), [C, G] = d(
337
+ ), [C, G] = u(
338
338
  []
339
- ), [re, ne] = d([]), [j, V] = d(!0), [de, H] = d(!1), [ue, pe] = d(null), i = B(
339
+ ), [re, ne] = u([]), [j, V] = u(!0), [de, H] = u(!1), [ue, pe] = u(null), i = B(
340
340
  (e) => {
341
- pe({ tab: e ?? "agents", ts: Date.now() }), m("extensions");
341
+ pe({ tab: e ?? "agents", ts: Date.now() }), h("extensions");
342
342
  },
343
343
  []
344
- ), W = X((e) => e.projects), [K, $e] = d([]), [_, Te] = d(null), [je, te] = d(
344
+ ), W = X((e) => e.projects), [M, Pe] = u([]), [_, Te] = u(null), [$e, te] = u(
345
345
  /* @__PURE__ */ new Set()
346
- ), [xe, U] = d(0), [dn, Ee] = d(null), [P, ve] = d(null), [Ce, se] = d(""), [un, Re] = d(!1), [F, Me] = d(!1), [x, he] = d([]), [ae, pn] = d(null), [Se, hn] = d(!1), v = ie || Se, [me, Ke] = d(null), le = B(
346
+ ), [je, U] = u(0), [dn, xe] = u(null), [P, ve] = u(null), [Ce, se] = u(""), [un, Ee] = u(!1), [F, Re] = u(!1), [x, he] = u([]), [ae, pn] = u(null), [Se, hn] = u(!1), v = ie || Se, [me, Ke] = u(null), le = B(
347
347
  (e) => {
348
- const t = Xn(e);
349
- t && !ft(k, t) || (Oe(e), m("personalTab"));
348
+ const t = Jn(e);
349
+ t && !ht(k, t) || (Ie(e), h("personalTab"));
350
350
  },
351
351
  [k]
352
- ), [mn, Ie] = d(!1), [Fe, Be] = d(
352
+ ), [Me, Fe] = u(
353
353
  null
354
- ), [fn, gn] = d(
354
+ ), [mn, gn] = u(
355
355
  null
356
- ), [bn, yn] = d(
356
+ ), [fn, bn] = u(
357
357
  null
358
358
  ), oe = B(
359
359
  (e, t) => {
360
360
  b == null || b(e, t);
361
361
  },
362
362
  [b]
363
- ), kn = B((e) => {
364
- Oe("todo"), yn({ id: e, ts: Date.now() });
365
- }, []), [$, Oe] = d("personal"), He = Ne(!1), S = L(() => Yn(y), [y]), Z = L(
363
+ ), yn = B((e) => {
364
+ Ie("todo"), bn({ id: e, ts: Date.now() });
365
+ }, []), [$, Ie] = u("personal"), Be = Ne(!1), S = O(() => Xn(y), [y]), Z = O(
366
366
  () => y.find((e) => e.id === ee) ?? S,
367
367
  [y, ee, S]
368
368
  );
369
369
  v && F && x.length > 0;
370
- const N = L(
370
+ const N = O(
371
371
  () => x.find((e) => e.id === ae) ?? null,
372
372
  [x, ae]
373
373
  );
374
374
  I(() => {
375
375
  let e = !0;
376
- return ce(!0), Mn(h).then((t) => {
376
+ return ce(!0), Rn(m).then((t) => {
377
377
  e && Y(t);
378
378
  }).catch(() => {
379
379
  }).finally(() => {
@@ -381,18 +381,18 @@ function _t({
381
381
  }), () => {
382
382
  e = !1;
383
383
  };
384
- }, [h]), I(() => {
384
+ }, [m]), I(() => {
385
385
  let e = !0;
386
386
  const t = async () => {
387
387
  if (!ie) {
388
388
  let o = !1;
389
389
  try {
390
- o = !!(await lt(h)).online;
390
+ o = !!(await st(m)).online;
391
391
  } catch {
392
392
  o = !1;
393
393
  }
394
394
  if (!e) return;
395
- if (hn(o), pt(o ? "tunnel" : "direct", h), Me(o), !o) {
395
+ if (hn(o), dt(o ? "tunnel" : "direct", m), Re(o), !o) {
396
396
  he([]);
397
397
  return;
398
398
  }
@@ -403,9 +403,9 @@ function _t({
403
403
  }
404
404
  return;
405
405
  }
406
- const l = await ot();
406
+ const l = await at();
407
407
  if (e) {
408
- if (Me(l), !l) {
408
+ if (Re(l), !l) {
409
409
  he([]);
410
410
  return;
411
411
  }
@@ -421,21 +421,21 @@ function _t({
421
421
  return () => {
422
422
  e = !1, window.clearInterval(a);
423
423
  };
424
- }, [h]), I(() => {
424
+ }, [m]), I(() => {
425
425
  if (!v || x.length === 0 || ae && x.some((t) => t.id === ae))
426
426
  return;
427
427
  const e = x.find((t) => t.type === "jar");
428
428
  pn((e ?? x[0]).id);
429
429
  }, [x, ae]);
430
- const fe = L(() => {
430
+ const ge = O(() => {
431
431
  const e = /* @__PURE__ */ new Map();
432
432
  for (const t of y) e.set(t.id, t);
433
433
  return e;
434
- }, [y]), We = B(async () => {
434
+ }, [y]), He = B(async () => {
435
435
  V(!0);
436
436
  const [e, t] = await Promise.allSettled([
437
- Kn(h),
438
- gt(h)
437
+ Kn(m),
438
+ mt(m)
439
439
  ]);
440
440
  if (e.status === "fulfilled" && G(e.value || []), t.status === "fulfilled") {
441
441
  const a = /* @__PURE__ */ new Set(), l = [];
@@ -444,11 +444,11 @@ function _t({
444
444
  ne(l);
445
445
  }
446
446
  V(!1);
447
- }, [h]);
447
+ }, [m]);
448
448
  I(() => {
449
- We();
450
- }, [We, u == null ? void 0 : u.ts]);
451
- const Q = L(() => {
449
+ He();
450
+ }, [He, d == null ? void 0 : d.ts]);
451
+ const Q = O(() => {
452
452
  const e = /* @__PURE__ */ new Map();
453
453
  for (const c of re)
454
454
  e.set(`sp:${String(c.id)}`, {
@@ -472,51 +472,51 @@ function _t({
472
472
  } else
473
473
  t.push(c);
474
474
  const l = (c) => {
475
- var r, qe;
476
- return ((r = c.sessions[0]) == null ? void 0 : r.updateTime) || ((qe = c.sessions[0]) == null ? void 0 : qe.createTime) || "";
475
+ var r, Ye;
476
+ return ((r = c.sessions[0]) == null ? void 0 : r.updateTime) || ((Ye = c.sessions[0]) == null ? void 0 : Ye.createTime) || "";
477
477
  }, o = [...e.values()];
478
478
  return o.sort((c, r) => c.sessions.length > 0 && r.sessions.length > 0 ? l(r).localeCompare(l(c)) : c.sessions.length > 0 ? -1 : r.sessions.length > 0 ? 1 : c.title.localeCompare(r.title)), t.length > 0 && o.push({ key: "sp:none", title: "未归组", sessions: t }), o;
479
- }, [re, C]), _e = L(
479
+ }, [re, C]), We = O(
480
480
  () => {
481
481
  var e;
482
- return u != null && u.sessionId ? ((e = Q.find(
483
- (t) => t.sessions.some((a) => a.id === u.sessionId)
482
+ return d != null && d.sessionId ? ((e = Q.find(
483
+ (t) => t.sessions.some((a) => a.id === d.sessionId)
484
484
  )) == null ? void 0 : e.key) ?? null : null;
485
485
  },
486
- [Q, u == null ? void 0 : u.sessionId]
486
+ [Q, d == null ? void 0 : d.sessionId]
487
487
  );
488
488
  I(() => {
489
489
  var t;
490
- const e = _e ?? (He.current ? null : ((t = Q.find((a) => a.sessions.length > 0)) == null ? void 0 : t.key) ?? null);
491
- e && (He.current = !0, te(
490
+ const e = We ?? (Be.current ? null : ((t = Q.find((a) => a.sessions.length > 0)) == null ? void 0 : t.key) ?? null);
491
+ e && (Be.current = !0, te(
492
492
  (a) => a.has(e) ? a : new Set(a).add(e)
493
493
  ));
494
- }, [_e, Q]);
495
- const Ze = Ne(!1);
494
+ }, [We, Q]);
495
+ const _e = Ne(!1);
496
496
  I(() => {
497
- ie || !Se || Ze.current || (Ze.current = !0, T("local"));
497
+ ie || !Se || _e.current || (_e.current = !0, T("local"));
498
498
  }, [Se]);
499
- const Ge = N && N.type !== "jar" ? N.id : void 0;
499
+ const Ze = N && N.type !== "jar" ? N.id : void 0;
500
500
  I(() => {
501
- if (!v || f !== "local" || !F) return;
501
+ if (!v || g !== "local" || !F) return;
502
502
  let e = !0;
503
- return qn(Ge).then((t) => {
504
- e && $e([...t].sort((a, l) => l.updatedAt - a.updatedAt));
503
+ return Yn(Ze).then((t) => {
504
+ e && Pe([...t].sort((a, l) => l.updatedAt - a.updatedAt));
505
505
  }).catch(() => {
506
- e && $e([]);
506
+ e && Pe([]);
507
507
  }), () => {
508
508
  e = !1;
509
509
  };
510
510
  }, [
511
- f,
511
+ g,
512
512
  F,
513
- Ge,
513
+ Ze,
514
514
  _,
515
- xe
515
+ je
516
516
  ]);
517
- const ge = L(() => {
517
+ const fe = O(() => {
518
518
  const e = /* @__PURE__ */ new Map(), t = [];
519
- for (const l of K) {
519
+ for (const l of M) {
520
520
  const o = l.workdir ?? null;
521
521
  if (!o) {
522
522
  t.push(l);
@@ -541,116 +541,116 @@ function _t({
541
541
  }
542
542
  );
543
543
  return t.length > 0 && a.push({ key: "wd:none", title: "未绑定目录", path: null, sessions: t }), a;
544
- }, [K]), be = L(() => {
544
+ }, [M]), be = O(() => {
545
545
  if (!_) return null;
546
- const e = K.find((t) => t.id === _);
546
+ const e = M.find((t) => t.id === _);
547
547
  return e ? e.workdir ? `wd:${e.workdir}` : "wd:none" : null;
548
- }, [K, _]);
548
+ }, [M, _]);
549
549
  I(() => {
550
550
  be && te(
551
551
  (e) => e.has(be) ? e : new Set(e).add(be)
552
552
  );
553
553
  }, [be]);
554
- const Ve = Ne(!1);
554
+ const Ge = Ne(!1);
555
555
  I(() => {
556
- Ve.current || ge.length === 0 || (Ve.current = !0, te((e) => {
556
+ Ge.current || fe.length === 0 || (Ge.current = !0, te((e) => {
557
557
  const t = new Set(e);
558
- for (const a of ge)
558
+ for (const a of fe)
559
559
  a.sessions.length > 0 && t.add(a.key);
560
560
  return t;
561
561
  }));
562
- }, [ge]);
563
- const Nn = B(() => Te(null), []), Le = (e) => {
564
- if (e !== f && (T(e), !(w !== "chat" && w !== "landing"))) {
562
+ }, [fe]);
563
+ const kn = B(() => Te(null), []), Le = (e) => {
564
+ if (e !== g && (T(e), !(w !== "chat" && w !== "landing"))) {
565
565
  if (e === "cloud") {
566
- m(u ? "chat" : "landing");
566
+ h(d ? "chat" : "landing");
567
567
  return;
568
568
  }
569
- m(F ? "chat" : "landing");
569
+ h(F ? "chat" : "landing");
570
570
  }
571
- }, Ae = (e) => {
572
- T("local"), Te(e), m("chat");
573
- }, Ue = (e, t, a) => {
571
+ }, Oe = (e) => {
572
+ T("local"), Te(e), h("chat");
573
+ }, Ve = (e, t, a) => {
574
574
  ve({ lane: e, id: t }), se(a || "");
575
- }, Qe = () => {
575
+ }, Ue = () => {
576
576
  ve(null), se("");
577
- }, ze = async () => {
577
+ }, Qe = async () => {
578
578
  if (!P || un) return;
579
579
  const e = P, t = Ce.trim();
580
580
  if (ve(null), se(""), !!t) {
581
- Re(!0);
581
+ Ee(!0);
582
582
  try {
583
583
  if (e.lane === "cloud") {
584
584
  const a = C.find((l) => z(l.id, e.id));
585
585
  if (!a) return;
586
- await Bn(
586
+ await Fn(
587
587
  a.personalAgentId,
588
588
  a.id,
589
589
  t,
590
- h
590
+ m
591
591
  ), G(
592
592
  (l) => l.map((o) => z(o.id, e.id) ? { ...o, title: t } : o)
593
593
  );
594
594
  } else
595
- await it(e.id, t), U((a) => a + 1);
595
+ await lt(e.id, t), U((a) => a + 1);
596
596
  ke("已重命名会话", "success");
597
597
  } catch (a) {
598
598
  ke(a instanceof Error ? a.message : "重命名失败", "error");
599
599
  } finally {
600
- Re(!1);
600
+ Ee(!1);
601
601
  }
602
602
  }
603
- }, Je = async (e, t, a) => {
604
- if (await mt({
603
+ }, ze = async (e, t, a) => {
604
+ if (await pt({
605
605
  content: `确定删除会话「${a || "未命名会话"}」吗?删除后不可恢复。`
606
606
  }))
607
607
  try {
608
608
  if (e === "cloud") {
609
609
  const o = C.find((c) => z(c.id, t));
610
610
  if (!o) return;
611
- await Hn(o.personalAgentId, o.id, h), G((c) => c.filter((r) => !z(r.id, t))), z(u == null ? void 0 : u.sessionId, t) && (D(null), m("landing"));
611
+ await Bn(o.personalAgentId, o.id, m), G((c) => c.filter((r) => !z(r.id, t))), z(d == null ? void 0 : d.sessionId, t) && (D(null), h("landing"));
612
612
  } else
613
- await ct(t), U((o) => o + 1), _ === t && (Te(null), m("landing"));
613
+ await ot(t), U((o) => o + 1), _ === t && (Te(null), h("landing"));
614
614
  ke("已删除会话", "success");
615
615
  } catch (o) {
616
616
  ke(o instanceof Error ? o.message : "删除失败", "error");
617
617
  }
618
618
  }, E = (e, t = null, a = null) => {
619
- T("cloud"), M(e.id), D(
619
+ T("cloud"), K(e.id), D(
620
620
  (l) => l && l.agent.id === e.id && l.sessionId === t && !a ? l : { agent: e, sessionId: t, draft: a, ts: Date.now() }
621
- ), m("chat");
621
+ ), h("chat");
622
622
  };
623
623
  I(() => {
624
- const e = O;
624
+ const e = L;
625
625
  if (!(e != null && e.agent) || !e.ts) return;
626
626
  const t = e.agent;
627
- if (M(t.id), e.view === "detail") {
628
- Be(t), m("agentDetail");
627
+ if (K(t.id), e.view === "detail") {
628
+ Fe(t), h("agentDetail");
629
629
  return;
630
630
  }
631
631
  E(t, e.sessionId ?? null), e.newSession > 0 && U((a) => a + 1);
632
- }, [O == null ? void 0 : O.ts]);
633
- const Xe = () => {
634
- T("cloud"), M((S == null ? void 0 : S.id) ?? null), D(null), m("landing");
635
- }, Ye = () => {
636
- T("local"), U((e) => e + 1), m("chat");
637
- }, wn = () => {
638
- if (f === "local" && v && N) {
639
- Ye();
632
+ }, [L == null ? void 0 : L.ts]);
633
+ const Je = () => {
634
+ T("cloud"), K((S == null ? void 0 : S.id) ?? null), D(null), h("landing");
635
+ }, Xe = () => {
636
+ T("local"), U((e) => e + 1), h("chat");
637
+ }, Nn = () => {
638
+ if (g === "local" && v && N) {
639
+ Xe();
640
640
  return;
641
641
  }
642
642
  if (S) {
643
643
  E(S);
644
644
  return;
645
645
  }
646
- Xe();
647
- }, Tn = async (e, t) => {
646
+ Je();
647
+ }, wn = async (e, t) => {
648
648
  if (Z)
649
649
  try {
650
- const a = e.length > 20 ? `${e.slice(0, 20)}…` : e, l = await Wn(
650
+ const a = e.length > 20 ? `${e.slice(0, 20)}…` : e, l = await Hn(
651
651
  Z.id,
652
652
  a,
653
- h,
653
+ m,
654
654
  t
655
655
  );
656
656
  Ke(null), T("cloud"), D({
@@ -658,42 +658,42 @@ function _t({
658
658
  sessionId: l.id,
659
659
  draft: e,
660
660
  ts: Date.now()
661
- }), m("chat");
661
+ }), h("chat");
662
662
  } catch {
663
663
  }
664
- }, vn = (e) => {
665
- T("local"), Ee(e), m("chat");
664
+ }, Tn = (e) => {
665
+ T("local"), xe(e), h("chat");
666
666
  }, ye = B(() => {
667
- if (v && f === "local" && N) {
668
- U((e) => e + 1), m("chat");
667
+ if (v && g === "local" && N) {
668
+ U((e) => e + 1), h("chat");
669
669
  return;
670
670
  }
671
- T("cloud"), M((S == null ? void 0 : S.id) ?? null), D(null), m("landing");
672
- }, [v, f, N, S]), Cn = L(() => {
671
+ T("cloud"), K((S == null ? void 0 : S.id) ?? null), D(null), h("landing");
672
+ }, [v, g, N, S]), vn = O(() => {
673
673
  const e = [
674
674
  {
675
675
  key: "new-task",
676
676
  label: "新建任务",
677
- icon: /* @__PURE__ */ n($n, {}),
677
+ icon: /* @__PURE__ */ n(Pn, {}),
678
678
  hint: "⌘N",
679
679
  run: ye
680
680
  },
681
681
  {
682
682
  key: "schedule",
683
683
  label: "定时任务",
684
- icon: /* @__PURE__ */ n(jn, {}),
685
- run: () => m("schedule")
684
+ icon: /* @__PURE__ */ n($n, {}),
685
+ run: () => h("schedule")
686
686
  },
687
687
  {
688
688
  key: "extensions",
689
689
  label: "更多能力",
690
- icon: /* @__PURE__ */ n(xn, {}),
691
- run: () => m("extensions")
690
+ icon: /* @__PURE__ */ n(jn, {}),
691
+ run: () => h("extensions")
692
692
  },
693
693
  {
694
694
  key: "todo",
695
695
  label: "工作待办",
696
- icon: /* @__PURE__ */ n(En, {}),
696
+ icon: /* @__PURE__ */ n(xn, {}),
697
697
  run: () => le("todo")
698
698
  },
699
699
  {
@@ -705,17 +705,17 @@ function _t({
705
705
  {
706
706
  key: "settings",
707
707
  label: "设置",
708
- icon: /* @__PURE__ */ n(Rn, {}),
709
- run: () => Ie(!0)
708
+ icon: /* @__PURE__ */ n(En, {}),
709
+ run: () => tn.getState().show()
710
710
  }
711
711
  ];
712
712
  return v && e.push({
713
713
  key: "switch-lane",
714
- label: f === "local" ? "切换到云端车道" : "切换到本地车道",
715
- icon: f === "local" ? /* @__PURE__ */ n(nn, {}) : /* @__PURE__ */ n(tn, {}),
716
- run: () => Le(f === "local" ? "cloud" : "local")
714
+ label: g === "local" ? "切换到云端车道" : "切换到本地车道",
715
+ icon: g === "local" ? /* @__PURE__ */ n(en, {}) : /* @__PURE__ */ n(nn, {}),
716
+ run: () => Le(g === "local" ? "cloud" : "local")
717
717
  }), e;
718
- }, [ye, le, v, f]);
718
+ }, [ye, le, v, g]);
719
719
  I(() => {
720
720
  const e = (t) => {
721
721
  if (!(t.metaKey || t.ctrlKey) || t.altKey) return;
@@ -728,19 +728,19 @@ function _t({
728
728
  };
729
729
  return document.addEventListener("keydown", e), () => document.removeEventListener("keydown", e);
730
730
  }, [ye]);
731
- const Sn = L(() => {
731
+ const Cn = O(() => {
732
732
  const e = [];
733
733
  if (v)
734
- for (const t of K)
734
+ for (const t of M)
735
735
  e.push({
736
736
  key: `l-${t.id}`,
737
737
  title: t.title || "未命名会话",
738
738
  lane: "local",
739
739
  updatedAt: t.updatedAt ?? 0,
740
- open: () => Ae(t.id)
740
+ open: () => Oe(t.id)
741
741
  });
742
742
  for (const t of C) {
743
- const a = fe.get(t.personalAgentId);
743
+ const a = ge.get(t.personalAgentId);
744
744
  if (!a) continue;
745
745
  const l = new Date(
746
746
  (t.updateTime || t.createTime || "").replace(" ", "T")
@@ -754,59 +754,59 @@ function _t({
754
754
  });
755
755
  }
756
756
  return e.sort((t, a) => a.updatedAt - t.updatedAt), e.slice(0, 5);
757
- }, [v, K, C, fe]), In = A.nickname || (k == null ? void 0 : k.display_name) || (k == null ? void 0 : k.username) || "", On = L(() => g ? [
757
+ }, [v, M, C, ge]), Sn = A.nickname || (k == null ? void 0 : k.display_name) || (k == null ? void 0 : k.username) || "", In = O(() => f ? [
758
758
  {
759
759
  mode: "personal",
760
760
  label: "个人工作台",
761
- icon: /* @__PURE__ */ n(rt, {})
761
+ icon: /* @__PURE__ */ n(it, {})
762
762
  },
763
763
  {
764
764
  mode: "collaboration",
765
765
  label: "协作工作台",
766
- icon: /* @__PURE__ */ n(dt, {})
766
+ icon: /* @__PURE__ */ n(ct, {})
767
767
  }
768
768
  ].filter(
769
- (t) => et(k, t.mode)
770
- ) : [], [k, g]), Ln = u ? `${u.agent.id}-${u.sessionId ?? 0}-${u.ts}` : "none";
769
+ (t) => qn(k, t.mode)
770
+ ) : [], [k, f]), Ln = d ? `${d.agent.id}-${d.sessionId ?? 0}-${d.ts}` : "none";
771
771
  let R;
772
- return w === "agentDetail" && Fe ? R = /* @__PURE__ */ n("div", { className: s.detailHost, children: /* @__PURE__ */ n(
773
- Nt,
772
+ return w === "agentDetail" && Me ? R = /* @__PURE__ */ n("div", { className: s.detailHost, children: /* @__PURE__ */ n(
773
+ yt,
774
774
  {
775
- agent: Fe,
776
- onBack: () => m("extensions")
775
+ agent: Me,
776
+ onBack: () => h("extensions")
777
777
  }
778
778
  ) }) : w === "schedule" ? R = /* @__PURE__ */ n(
779
- bt,
779
+ gt,
780
780
  {
781
781
  localOnline: F,
782
782
  agents: y,
783
- token: h,
783
+ token: m,
784
784
  localAgents: x,
785
- defaultLane: f,
785
+ defaultLane: g,
786
786
  defaultAgentId: (Z == null ? void 0 : Z.id) ?? null
787
787
  }
788
788
  ) : w === "extensions" ? R = /* @__PURE__ */ n(
789
- wt,
789
+ kt,
790
790
  {
791
791
  agents: y,
792
792
  loading: q,
793
793
  skillsAgent: S,
794
- token: h,
795
- lane: f,
794
+ token: m,
795
+ lane: g,
796
796
  onChat: (e) => E(e),
797
797
  onConfig: (e) => {
798
- Be(e), m("agentDetail");
798
+ Fe(e), h("agentDetail");
799
799
  },
800
800
  onCreated: (e) => Y((t) => [...t, e]),
801
801
  capTabRequest: ue
802
802
  }
803
803
  ) : w === "history" ? R = /* @__PURE__ */ n(
804
- Tt,
804
+ Nt,
805
805
  {
806
806
  agents: y,
807
- token: h,
807
+ token: m,
808
808
  onOpenSession: (e, t) => E(e, t),
809
- onBack: () => m("extensions")
809
+ onBack: () => h("extensions")
810
810
  }
811
811
  ) : w === "personalTab" ? R = /* @__PURE__ */ p("div", { className: s.personalTabHost, children: [
812
812
  $ === "projects" && /* @__PURE__ */ n(
@@ -829,71 +829,71 @@ function _t({
829
829
  hideTabs: !0
830
830
  }
831
831
  ),
832
- $ === "business-stats" && /* @__PURE__ */ n(An, { source: "scenario" }),
832
+ $ === "business-stats" && /* @__PURE__ */ n(On, { source: "scenario" }),
833
833
  $ === "tools" && /* @__PURE__ */ n(on, { showTools: !0, showWebsites: !1 }),
834
834
  $ === "websites" && /* @__PURE__ */ n(on, { showTools: !1, showWebsites: !0 }),
835
835
  $ === "todo" && /* @__PURE__ */ n(
836
- St,
836
+ vt,
837
837
  {
838
838
  onOpenProject: oe,
839
839
  onOpenNote: (e) => {
840
- Oe("notes"), gn({ id: e, ts: Date.now() });
840
+ Ie("notes"), gn({ id: e, ts: Date.now() });
841
841
  },
842
842
  onOpenAgentSession: (e, t) => {
843
843
  const a = y.find((l) => z(l.id, t));
844
844
  a && E(a, e);
845
845
  },
846
- openTodoId: bn
846
+ openTodoId: fn
847
847
  }
848
848
  ),
849
849
  $ === "notes" && /* @__PURE__ */ n(
850
- Dn,
850
+ An,
851
851
  {
852
852
  onOpenProject: oe,
853
- onOpenTodo: kn,
854
- openNoteId: fn
853
+ onOpenTodo: yn,
854
+ openNoteId: mn
855
855
  }
856
856
  ),
857
- $ === "training" && /* @__PURE__ */ n(vt, {}),
858
- $ === "webide" && /* @__PURE__ */ n(Ct, {})
859
- ] }) : f === "cloud" && u ? R = /* @__PURE__ */ n("div", { className: s.chatHost, children: /* @__PURE__ */ n(
860
- yt,
857
+ $ === "training" && /* @__PURE__ */ n(wt, {}),
858
+ $ === "webide" && /* @__PURE__ */ n(Tt, {})
859
+ ] }) : g === "cloud" && d ? R = /* @__PURE__ */ n("div", { className: s.chatHost, children: /* @__PURE__ */ n(
860
+ ft,
861
861
  {
862
- agent: u.agent,
863
- initialSessionId: u.sessionId,
864
- autoSendDraft: u.draft,
862
+ agent: d.agent,
863
+ initialSessionId: d.sessionId,
864
+ autoSendDraft: d.draft,
865
865
  chromeless: !0,
866
866
  agents: y,
867
867
  onSwitchAgent: (e) => E(e)
868
868
  },
869
869
  Ln
870
- ) }) : f === "local" && v && N && w !== "landing" ? R = /* @__PURE__ */ n("div", { className: s.chatHost, children: /* @__PURE__ */ n(
871
- kt,
870
+ ) }) : g === "local" && v && N && w !== "landing" ? R = /* @__PURE__ */ n("div", { className: s.chatHost, children: /* @__PURE__ */ n(
871
+ bt,
872
872
  {
873
- agent: Pt(N),
874
- newSessionTrigger: xe,
873
+ agent: At(N),
874
+ newSessionTrigger: je,
875
875
  autoSendDraft: dn,
876
- onAutoSendConsumed: () => Ee(null),
876
+ onAutoSendConsumed: () => xe(null),
877
877
  openSessionId: _,
878
- onOpenSessionConsumed: Nn,
878
+ onOpenSessionConsumed: kn,
879
879
  onSessionsMutated: () => U((e) => e + 1)
880
880
  },
881
881
  N.id
882
882
  ) }) : R = /* @__PURE__ */ n(
883
- Dt,
883
+ Ot,
884
884
  {
885
885
  agents: y,
886
886
  activeAgent: Z,
887
- onSwitchAgent: (e) => M(e.id),
888
- localAgentName: f === "local" ? (N == null ? void 0 : N.name) ?? "本机 Agent" : null,
889
- onLocalSend: f === "local" ? vn : void 0,
890
- localOffline: f === "local" && !F,
887
+ onSwitchAgent: (e) => K(e.id),
888
+ localAgentName: g === "local" ? (N == null ? void 0 : N.name) ?? "本机 Agent" : null,
889
+ onLocalSend: g === "local" ? Tn : void 0,
890
+ localOffline: g === "local" && !F,
891
891
  initialSpace: me,
892
- onSend: Tn,
892
+ onSend: wn,
893
893
  onOpenTab: le,
894
- onQuickAsk: wn,
895
- recentTasks: Sn,
896
- onOpenHistory: () => m("history")
894
+ onQuickAsk: Nn,
895
+ recentTasks: Cn,
896
+ onOpenHistory: () => h("history")
897
897
  }
898
898
  ), /* @__PURE__ */ p("div", { className: s.shell, children: [
899
899
  /* @__PURE__ */ p("aside", { className: s.sidebar, "aria-label": "个人专享工作台导航", children: [
@@ -904,12 +904,12 @@ function _t({
904
904
  {
905
905
  type: "button",
906
906
  role: "tab",
907
- "aria-selected": f === "local",
908
- className: `${s.laneTab} ${f === "local" ? s.laneTabActive : ""}`,
907
+ "aria-selected": g === "local",
908
+ className: `${s.laneTab} ${g === "local" ? s.laneTabActive : ""}`,
909
909
  onClick: () => Le("local"),
910
910
  title: F ? "本机 Agent 已连接:任务在你的电脑上执行" : "本机 Agent 未运行:启动 Z-OPC 桌面端伴生服务后可用",
911
911
  children: [
912
- /* @__PURE__ */ n(tn, { className: s.laneIcon }),
912
+ /* @__PURE__ */ n(nn, { className: s.laneIcon }),
913
913
  /* @__PURE__ */ n("span", { className: s.laneText, children: "本地" })
914
914
  ]
915
915
  }
@@ -919,22 +919,22 @@ function _t({
919
919
  {
920
920
  type: "button",
921
921
  role: "tab",
922
- "aria-selected": f === "cloud",
923
- className: `${s.laneTab} ${f === "cloud" ? s.laneTabActive : ""}`,
922
+ "aria-selected": g === "cloud",
923
+ className: `${s.laneTab} ${g === "cloud" ? s.laneTabActive : ""}`,
924
924
  onClick: () => Le("cloud"),
925
925
  title: "云端任务:跨设备同步,手机/网页都能继续",
926
926
  children: [
927
- /* @__PURE__ */ n(nn, { className: s.laneIcon }),
927
+ /* @__PURE__ */ n(en, { className: s.laneIcon }),
928
928
  /* @__PURE__ */ n("span", { className: s.laneText, children: "云端" })
929
929
  ]
930
930
  }
931
931
  )
932
932
  ] }),
933
933
  /* @__PURE__ */ n(
934
- nt,
934
+ et,
935
935
  {
936
936
  currentUser: k,
937
- token: h,
937
+ token: m,
938
938
  isDesktop: ie,
939
939
  activeNav: w === "schedule" ? "schedule" : null,
940
940
  extensionsGroupActive: [
@@ -946,14 +946,14 @@ function _t({
946
946
  "personalTab"
947
947
  ].includes(w),
948
948
  activePersonalTab: w === "personalTab" ? $ : null,
949
- onDesktopNewTask: f === "local" && N ? Ye : void 0,
949
+ onDesktopNewTask: g === "local" && N ? Xe : void 0,
950
950
  onPickSpace: (e) => {
951
- Ke(e), Xe();
951
+ Ke(e), Je();
952
952
  },
953
953
  currentSpaceId: (me == null ? void 0 : me.id) ?? null,
954
- onOpenSchedule: () => m("schedule"),
954
+ onOpenSchedule: () => h("schedule"),
955
955
  onOpenExtensions: i,
956
- onOpenHistory: () => m("history"),
956
+ onOpenHistory: () => h("history"),
957
957
  onOpenSearch: () => {
958
958
  H(!0), X.getState().loadProjects();
959
959
  },
@@ -961,11 +961,11 @@ function _t({
961
961
  onOpenPersonalTab: le
962
962
  }
963
963
  ),
964
- /* @__PURE__ */ n("div", { className: s.sideTasks, children: f === "cloud" ? /* @__PURE__ */ p(J, { children: [
964
+ /* @__PURE__ */ n("div", { className: s.sideTasks, children: g === "cloud" ? /* @__PURE__ */ p(J, { children: [
965
965
  /* @__PURE__ */ n("div", { className: s.tasksLabel, children: "项目" }),
966
966
  Q.length === 0 && !j && /* @__PURE__ */ n("div", { className: s.tasksEmpty, children: "还没有项目空间或云端任务" }),
967
967
  Q.map((e) => {
968
- const t = je.has(e.key);
968
+ const t = $e.has(e.key);
969
969
  return /* @__PURE__ */ p("div", { children: [
970
970
  /* @__PURE__ */ p(
971
971
  "button",
@@ -984,14 +984,14 @@ function _t({
984
984
  className: `${s.projCaret} ${t ? s.projCaretOpen : ""}`
985
985
  }
986
986
  ),
987
- /* @__PURE__ */ n(Pe, { className: s.projIcon }),
987
+ /* @__PURE__ */ n(De, { className: s.projIcon }),
988
988
  /* @__PURE__ */ n("span", { className: s.projName, title: e.title, children: e.title }),
989
989
  /* @__PURE__ */ n("span", { className: s.projMeta, children: e.sessions.length > 0 ? e.sessions.length : "暂无任务" })
990
990
  ]
991
991
  }
992
992
  ),
993
993
  t && e.sessions.length > 0 && /* @__PURE__ */ n("div", { className: s.projRows, children: e.sessions.map((a) => {
994
- const l = fe.get(a.personalAgentId), o = Fn(a.id), c = (P == null ? void 0 : P.lane) === "cloud" && P.id === o;
994
+ const l = ge.get(a.personalAgentId), o = Mn(a.id), c = (P == null ? void 0 : P.lane) === "cloud" && P.id === o;
995
995
  return /* @__PURE__ */ n("div", { className: s.sessionRow, children: c ? /* @__PURE__ */ n(
996
996
  "input",
997
997
  {
@@ -1000,9 +1000,9 @@ function _t({
1000
1000
  autoFocus: !0,
1001
1001
  "aria-label": "重命名会话",
1002
1002
  onChange: (r) => se(r.target.value),
1003
- onBlur: () => void ze(),
1003
+ onBlur: () => void Qe(),
1004
1004
  onKeyDown: (r) => {
1005
- r.key === "Enter" ? (r.preventDefault(), r.currentTarget.blur()) : r.key === "Escape" && (r.preventDefault(), Qe());
1005
+ r.key === "Enter" ? (r.preventDefault(), r.currentTarget.blur()) : r.key === "Escape" && (r.preventDefault(), Ue());
1006
1006
  }
1007
1007
  }
1008
1008
  ) : /* @__PURE__ */ p(J, { children: [
@@ -1010,7 +1010,7 @@ function _t({
1010
1010
  "button",
1011
1011
  {
1012
1012
  type: "button",
1013
- className: `${s.recentItem} ${(u == null ? void 0 : u.sessionId) === a.id ? s.recentItemActive : ""}`,
1013
+ className: `${s.recentItem} ${(d == null ? void 0 : d.sessionId) === a.id ? s.recentItemActive : ""}`,
1014
1014
  disabled: !l,
1015
1015
  title: l ? a.title || "未命名会话" : "伙伴已不存在,无法打开",
1016
1016
  onClick: () => l && E(l, a.id),
@@ -1018,7 +1018,7 @@ function _t({
1018
1018
  }
1019
1019
  ),
1020
1020
  /* @__PURE__ */ n(
1021
- en,
1021
+ qe,
1022
1022
  {
1023
1023
  trigger: ["click"],
1024
1024
  menu: {
@@ -1031,11 +1031,11 @@ function _t({
1031
1031
  }
1032
1032
  ],
1033
1033
  onClick: ({ key: r }) => {
1034
- l && (r === "rename" ? Ue(
1034
+ l && (r === "rename" ? Ve(
1035
1035
  "cloud",
1036
1036
  o,
1037
1037
  a.title || ""
1038
- ) : r === "delete" && Je(
1038
+ ) : r === "delete" && ze(
1039
1039
  "cloud",
1040
1040
  o,
1041
1041
  a.title || ""
@@ -1062,8 +1062,8 @@ function _t({
1062
1062
  })
1063
1063
  ] }) : /* @__PURE__ */ p(J, { children: [
1064
1064
  /* @__PURE__ */ n("div", { className: s.tasksLabel, children: "目录" }),
1065
- ge.map((e) => {
1066
- const t = je.has(e.key);
1065
+ fe.map((e) => {
1066
+ const t = $e.has(e.key);
1067
1067
  return /* @__PURE__ */ p("div", { children: [
1068
1068
  /* @__PURE__ */ p(
1069
1069
  "button",
@@ -1083,7 +1083,7 @@ function _t({
1083
1083
  className: `${s.projCaret} ${t ? s.projCaretOpen : ""}`
1084
1084
  }
1085
1085
  ),
1086
- /* @__PURE__ */ n(Pe, { className: s.projIcon }),
1086
+ /* @__PURE__ */ n(De, { className: s.projIcon }),
1087
1087
  /* @__PURE__ */ n("span", { className: s.projName, children: e.title }),
1088
1088
  /* @__PURE__ */ n("span", { className: s.projMeta, children: e.sessions.length })
1089
1089
  ]
@@ -1099,9 +1099,9 @@ function _t({
1099
1099
  autoFocus: !0,
1100
1100
  "aria-label": "重命名会话",
1101
1101
  onChange: (o) => se(o.target.value),
1102
- onBlur: () => void ze(),
1102
+ onBlur: () => void Qe(),
1103
1103
  onKeyDown: (o) => {
1104
- o.key === "Enter" ? (o.preventDefault(), o.currentTarget.blur()) : o.key === "Escape" && (o.preventDefault(), Qe());
1104
+ o.key === "Enter" ? (o.preventDefault(), o.currentTarget.blur()) : o.key === "Escape" && (o.preventDefault(), Ue());
1105
1105
  }
1106
1106
  }
1107
1107
  ) : /* @__PURE__ */ p(J, { children: [
@@ -1111,12 +1111,12 @@ function _t({
1111
1111
  type: "button",
1112
1112
  className: `${s.recentItem} ${_ === a.id ? s.recentItemActive : ""}`,
1113
1113
  title: a.title,
1114
- onClick: () => Ae(a.id),
1114
+ onClick: () => Oe(a.id),
1115
1115
  children: /* @__PURE__ */ n("span", { className: s.recentItemText, children: a.title || "未命名会话" })
1116
1116
  }
1117
1117
  ),
1118
1118
  /* @__PURE__ */ n(
1119
- en,
1119
+ qe,
1120
1120
  {
1121
1121
  trigger: ["click"],
1122
1122
  menu: {
@@ -1129,11 +1129,11 @@ function _t({
1129
1129
  }
1130
1130
  ],
1131
1131
  onClick: ({ key: o }) => {
1132
- o === "rename" ? Ue(
1132
+ o === "rename" ? Ve(
1133
1133
  "local",
1134
1134
  a.id,
1135
1135
  a.title || ""
1136
- ) : o === "delete" && Je(
1136
+ ) : o === "delete" && ze(
1137
1137
  "local",
1138
1138
  a.id,
1139
1139
  a.title || ""
@@ -1157,22 +1157,22 @@ function _t({
1157
1157
  }) })
1158
1158
  ] }, e.key);
1159
1159
  }),
1160
- K.length === 0 && /* @__PURE__ */ n("div", { className: s.tasksEmpty, children: F ? "暂无本地任务,点上方「新建任务」开始" : "本机 Agent 未运行 —— 启动 Z-OPC 桌面端后自动连上" })
1160
+ M.length === 0 && /* @__PURE__ */ n("div", { className: s.tasksEmpty, children: F ? "暂无本地任务,点上方「新建任务」开始" : "本机 Agent 未运行 —— 启动 Z-OPC 桌面端后自动连上" })
1161
1161
  ] }) })
1162
1162
  ] }),
1163
1163
  /* @__PURE__ */ n(
1164
- tt,
1164
+ nt,
1165
1165
  {
1166
- displayName: In,
1166
+ displayName: Sn,
1167
1167
  subtitle: "Z-OPC · 个人(专享)",
1168
- onOpenSettings: () => Ie(!0),
1169
- children: On.map((e) => /* @__PURE__ */ p(
1168
+ onOpenSettings: () => tn.getState().show(),
1169
+ children: In.map((e) => /* @__PURE__ */ p(
1170
1170
  "button",
1171
1171
  {
1172
1172
  type: "button",
1173
1173
  role: "menuitem",
1174
1174
  className: s.agentMenuItem,
1175
- onClick: () => g == null ? void 0 : g(e.mode),
1175
+ onClick: () => f == null ? void 0 : f(e.mode),
1176
1176
  children: [
1177
1177
  /* @__PURE__ */ n("span", { className: s.navIcon, children: e.icon }),
1178
1178
  /* @__PURE__ */ n("span", { children: e.label })
@@ -1183,26 +1183,18 @@ function _t({
1183
1183
  }
1184
1184
  )
1185
1185
  ] }),
1186
- /* @__PURE__ */ n("main", { className: s.main, "aria-label": "个人专享工作台内容", children: q && !u && !N ? /* @__PURE__ */ n("div", { className: s.emptyState, children: /* @__PURE__ */ n("span", { className: s.emptyTitle, children: "正在加载智能伙伴…" }) }) : R }),
1187
- /* @__PURE__ */ n(
1188
- st,
1189
- {
1190
- open: mn,
1191
- onClose: () => Ie(!1),
1192
- token: h
1193
- }
1194
- ),
1186
+ /* @__PURE__ */ n("main", { className: s.main, "aria-label": "个人专享工作台内容", children: q && !d && !N ? /* @__PURE__ */ n("div", { className: s.emptyState, children: /* @__PURE__ */ n("span", { className: s.emptyTitle, children: "正在加载智能伙伴…" }) }) : R }),
1195
1187
  de && /* @__PURE__ */ n(
1196
- at,
1188
+ tt,
1197
1189
  {
1198
1190
  sessions: C,
1199
- localSessions: v ? K : [],
1200
- agentsById: fe,
1191
+ localSessions: v ? M : [],
1192
+ agentsById: ge,
1201
1193
  projects: W,
1202
- token: h,
1203
- actions: Cn,
1194
+ token: m,
1195
+ actions: vn,
1204
1196
  onOpenSession: (e, t) => E(e, t),
1205
- onOpenLocalSession: Ae,
1197
+ onOpenLocalSession: Oe,
1206
1198
  onOpenProject: (e) => oe(e.id),
1207
1199
  onClose: () => H(!1)
1208
1200
  }
@@ -1210,5 +1202,5 @@ function _t({
1210
1202
  ] });
1211
1203
  }
1212
1204
  export {
1213
- _t as default
1205
+ Ht as default
1214
1206
  };