@yuku123/z-team-component 0.2.73 → 0.2.74

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 (27) hide show
  1. package/dist/{ComponentDoc-D6j0q6td.js → ComponentDoc-CFKpk6X_.js} +1 -1
  2. package/dist/{InvitationManagementPage-CguvahDP.js → InvitationManagementPage-Dr4SxM5K.js} +1 -1
  3. package/dist/{OnboardingPage-CMtXJdWG.js → OnboardingPage-DcYULxKd.js} +2 -2
  4. package/dist/{ScheduledTasks-CboH2Vtb.js → ScheduledTasks-T4NFJWsk.js} +766 -766
  5. package/dist/{SystemShell-Bj3uLkb-.js → SystemShell-D8aDuO_D.js} +215 -196
  6. package/dist/{api-DcV3bpwl.js → api-Bj-xsNGU.js} +1 -1
  7. package/dist/{createWorkspaceWsHandler-BUDc2OuA.js → createWorkspaceWsHandler-25JfnMML.js} +1834 -1812
  8. package/dist/{index-ewTV5yeN.js → index-BYTVXqVp.js} +3872 -3760
  9. package/dist/{index-CfljuY26.js → index-BYn9kfIj.js} +1 -1
  10. package/dist/{index-Cz45ypLD.js → index-BZnC9BRh.js} +3 -3
  11. package/dist/{index-nj-cjKsf.js → index-BohoJQPr.js} +1849 -1857
  12. package/dist/{index-DdEl0ec4.js → index-CMVYzEVW.js} +1 -1
  13. package/dist/{index-DjFfvrfB.js → index-CQcGGl6J.js} +16 -15
  14. package/dist/{index-BJqS68-M.js → index-CbTwXfER.js} +1 -1
  15. package/dist/{index-CM81Z4Gw.js → index-Ccc2gRJA.js} +1 -1
  16. package/dist/{index-D8WafKB8.js → index-Ce9TrTy7.js} +2 -2
  17. package/dist/{index-CWnbQ1Ho.js → index-Czt_d2TY.js} +1 -1
  18. package/dist/{index-DB0RIaB4.js → index-DOOlyOVX.js} +2 -2
  19. package/dist/{index--l2UiQAT.js → index-IK8UlsDo.js} +30 -30
  20. package/dist/{index-CRgnk_Ly.js → index-OP18iV8V.js} +3 -3
  21. package/dist/{index-DQ6ZfUO0.js → index-rkF8co0n.js} +447 -445
  22. package/dist/index.js +1 -1
  23. package/dist/{menuPermission-B0HlWqWx.js → menuPermission-6NaQTuIn.js} +1 -1
  24. package/dist/pages.js +11 -11
  25. package/dist/z-team-component.css +1 -1
  26. package/package.json +1 -1
  27. package/dist/index-DrDur76N.js +0 -1747
@@ -1,91 +1,91 @@
1
1
  import { jsx as e, jsxs as l, Fragment as Ee } from "react/jsx-runtime";
2
- import { S as Ot, T as $t, P as Et } from "./webide-BlpH-J-H.js";
2
+ import { S as $t, T as Et, P as Ht } from "./webide-BlpH-J-H.js";
3
3
  import { useState as m, useRef as q, useMemo as $e, useEffect as H, useCallback as J } from "react";
4
- import { af as nn, ag as Ht, k as st, ah as sn, ai as an, aj as ln, ak as on, al as cn, am as rn, an as dn } from "./api-DPkUB1DA.js";
5
- import { f as Pt, c as _t, a as un, b as mn, r as pn, s as hn, t as gn, d as Ft, e as yt, g as _n, h as fn, i as jt, j as p, R as ut, D as bt, k as yn, l as bn, F as vt, P as vn, L as Nn, A as Cn, C as kn, m as wn, n as Tn, o as Sn, p as In, W as An, q as Bn, S as Ln, u as Dn, U as Mn, T as xn, v as Rn } from "./index-ewTV5yeN.js";
6
- import { u as wt, i as Wt, T as On, a as $n, s as En } from "./createWorkspaceWsHandler-BUDc2OuA.js";
4
+ import { af as sn, ag as Pt, k as st, ah as an, ai as ln, aj as on, ak as cn, al as rn, am as dn, an as un } from "./api-DPkUB1DA.js";
5
+ import { f as Ft, c as ft, a as mn, b as pn, r as hn, s as gn, t as _n, d as jt, e as bt, g as fn, h as yn, i as Wt, j as p, R as ut, D as vt, k as bn, l as vn, F as Nt, P as Nn, L as Cn, A as kn, C as Tn, m as wn, n as Sn, o as In, p as An, W as Bn, q as Ln, S as Dn, u as Mn, U as xn, T as Rn, v as On } from "./index-BYTVXqVp.js";
6
+ import { u as wt, a as mt, i as Kt, T as $n, b as En, s as Hn } from "./createWorkspaceWsHandler-25JfnMML.js";
7
7
  import { u as Ae } from "./useAppStore-DQP0l22d.js";
8
- import { h as Kt, f as Hn } from "./schedule-iMEGim0L.js";
9
- import { RightOutlined as Ut, PlusOutlined as Pn, LeftOutlined as Fn, CheckOutlined as Vt, LoadingOutlined as Tt, EditOutlined as St, DeleteOutlined as jn, UpOutlined as It, RedoOutlined as Wn, DownOutlined as Kn, StopOutlined as Un, CopyOutlined as Vn, MessageOutlined as Gt, MoreOutlined as Gn, DashboardOutlined as zt, MenuUnfoldOutlined as zn, MenuFoldOutlined as Qn, SettingOutlined as qn, TeamOutlined as Xn, FolderOpenOutlined as Jn, BarChartOutlined as Yn, PieChartOutlined as Zn, CodeOutlined as es, LinkOutlined as ts, UnorderedListOutlined as ns, FileTextOutlined as Qt, ReadOutlined as ss, ConsoleSqlOutlined as as, PlayCircleOutlined as ls } from "@ant-design/icons";
10
- import is from "react-markdown";
11
- import os from "rehype-highlight";
12
- import cs from "remark-gfm";
13
- import { W as Nt, b as mt, T as qt, c as Xt, a as Jt, P as Yt, S as rs, E as ds, C as us } from "./ScheduledTasks-CboH2Vtb.js";
14
- import { message as rt, Tooltip as Ct } from "antd";
15
- const ms = "_container_3gc15_1", ps = "_sessionPanel_3gc15_9", hs = "_sessionHeader_3gc15_19", gs = "_sessionHeaderActions_3gc15_32", _s = "_sessionBtnSm_3gc15_37", fs = "_sessionList_3gc15_55", ys = "_sessionItem_3gc15_61", bs = "_sessionItemActive_3gc15_79", vs = "_sessionItemTitle_3gc15_84", Ns = "_sessionLiveDot_3gc15_93", Cs = "_sessionItemTime_3gc15_100", ks = "_sessionDeleteBtn_3gc15_106", ws = "_sessionRenameBtn_3gc15_127", Ts = "_sessionRenameInput_3gc15_148", Ss = "_sessionCreateRow_3gc15_160", Is = "_sessionCreateInput_3gc15_166", As = "_sessionCreateConfirm_3gc15_180", Bs = "_sessionCreateCancel_3gc15_181", Ls = "_sessionSearchRow_3gc15_203", Ds = "_sessionSearchInput_3gc15_209", Ms = "_sessionSearchClear_3gc15_224", xs = "_sessionEmpty_3gc15_245", Rs = "_sessionExpandBtn_3gc15_255", Os = "_chatPanel_3gc15_275", $s = "_chatHeader_3gc15_284", Es = "_agentAvatar_3gc15_296", Hs = "_chatHeaderMeta_3gc15_309", Ps = "_chatHeaderName_3gc15_317", Fs = "_chatHeaderSession_3gc15_324", js = "_chatHeaderBadge_3gc15_332", Ws = "_streamingIndicator_3gc15_342", Ks = "_threadScroll_3gc15_351", Us = "_threadInner_3gc15_357", Vs = "_landing_3gc15_368", Gs = "_landingLogo_3gc15_378", zs = "_landingTitle_3gc15_392", Qs = "_landingHint_3gc15_398", qs = "_newChatLanding_3gc15_404", Xs = "_landingComposer_3gc15_415", Js = "_landingInput_3gc15_432", Ys = "_chatEmpty_3gc15_448", Zs = "_userRow_3gc15_459", ea = "_userBubble_3gc15_464", ta = "_assistantBlock_3gc15_478", na = "_md_3gc15_488", sa = "_mdPreWrap_3gc15_546", aa = "_mdPreCopy_3gc15_550", la = "_caretCursor_3gc15_585", ia = "_errorBar_3gc15_602", oa = "_errorRetryBtn_3gc15_611", ca = "_stoppedBar_3gc15_626", ra = "_scrollTopBtn_3gc15_636", da = "_scrollTopBtnVisible_3gc15_658", ua = "_composerWrap_3gc15_669", ma = "_composer_3gc15_669", pa = "_composerInput_3gc15_691", ha = "_sendBtn_3gc15_709", ga = "_stopBtn_3gc15_710", _a = "_sendBtnReady_3gc15_730", fa = "_composerHint_3gc15_748", ya = "_msgMeta_3gc15_758", ba = "_copyBtn_3gc15_769", va = "_copyBtnInline_3gc15_799", Na = "_copyBtnDone_3gc15_806", Ca = "_landingChips_3gc15_811", ka = "_landingChip_3gc15_811", wa = "_userActions_3gc15_838", Ta = "_userActionBtn_3gc15_851", Sa = "_editingBar_3gc15_874", Ia = "_pendingBar_3gc15_889", Aa = "_editingCancel_3gc15_910", i = {
16
- container: ms,
17
- sessionPanel: ps,
18
- sessionHeader: hs,
19
- sessionHeaderActions: gs,
20
- sessionBtnSm: _s,
21
- sessionList: fs,
22
- sessionItem: ys,
23
- sessionItemActive: bs,
24
- sessionItemTitle: vs,
25
- sessionLiveDot: Ns,
26
- sessionItemTime: Cs,
27
- sessionDeleteBtn: ks,
8
+ import { h as Ut, f as Pn } from "./schedule-iMEGim0L.js";
9
+ import { RightOutlined as Vt, PlusOutlined as Fn, LeftOutlined as jn, CheckOutlined as Gt, LoadingOutlined as St, EditOutlined as It, DeleteOutlined as Wn, UpOutlined as At, RedoOutlined as Kn, DownOutlined as Un, StopOutlined as Vn, CopyOutlined as Gn, MessageOutlined as zt, MoreOutlined as zn, DashboardOutlined as Qt, MenuUnfoldOutlined as Qn, MenuFoldOutlined as qn, SettingOutlined as Xn, TeamOutlined as Jn, FolderOpenOutlined as Yn, BarChartOutlined as Zn, PieChartOutlined as es, CodeOutlined as ts, LinkOutlined as ns, UnorderedListOutlined as ss, FileTextOutlined as qt, ReadOutlined as as, ConsoleSqlOutlined as ls, PlayCircleOutlined as is } from "@ant-design/icons";
10
+ import os from "react-markdown";
11
+ import cs from "rehype-highlight";
12
+ import rs from "remark-gfm";
13
+ import { W as Ct, b as pt, T as Xt, c as Jt, a as Yt, P as Zt, S as ds, E as us, C as ms } from "./ScheduledTasks-T4NFJWsk.js";
14
+ import { message as rt, Tooltip as kt } from "antd";
15
+ const ps = "_container_3gc15_1", hs = "_sessionPanel_3gc15_9", gs = "_sessionHeader_3gc15_19", _s = "_sessionHeaderActions_3gc15_32", fs = "_sessionBtnSm_3gc15_37", ys = "_sessionList_3gc15_55", bs = "_sessionItem_3gc15_61", vs = "_sessionItemActive_3gc15_79", Ns = "_sessionItemTitle_3gc15_84", Cs = "_sessionLiveDot_3gc15_93", ks = "_sessionItemTime_3gc15_100", Ts = "_sessionDeleteBtn_3gc15_106", ws = "_sessionRenameBtn_3gc15_127", Ss = "_sessionRenameInput_3gc15_148", Is = "_sessionCreateRow_3gc15_160", As = "_sessionCreateInput_3gc15_166", Bs = "_sessionCreateConfirm_3gc15_180", Ls = "_sessionCreateCancel_3gc15_181", Ds = "_sessionSearchRow_3gc15_203", Ms = "_sessionSearchInput_3gc15_209", xs = "_sessionSearchClear_3gc15_224", Rs = "_sessionEmpty_3gc15_245", Os = "_sessionExpandBtn_3gc15_255", $s = "_chatPanel_3gc15_275", Es = "_chatHeader_3gc15_284", Hs = "_agentAvatar_3gc15_296", Ps = "_chatHeaderMeta_3gc15_309", Fs = "_chatHeaderName_3gc15_317", js = "_chatHeaderSession_3gc15_324", Ws = "_chatHeaderBadge_3gc15_332", Ks = "_streamingIndicator_3gc15_342", Us = "_threadScroll_3gc15_351", Vs = "_threadInner_3gc15_357", Gs = "_landing_3gc15_368", zs = "_landingLogo_3gc15_378", Qs = "_landingTitle_3gc15_392", qs = "_landingHint_3gc15_398", Xs = "_newChatLanding_3gc15_404", Js = "_landingComposer_3gc15_415", Ys = "_landingInput_3gc15_432", Zs = "_chatEmpty_3gc15_448", ea = "_userRow_3gc15_459", ta = "_userBubble_3gc15_464", na = "_assistantBlock_3gc15_478", sa = "_md_3gc15_488", aa = "_mdPreWrap_3gc15_546", la = "_mdPreCopy_3gc15_550", ia = "_caretCursor_3gc15_585", oa = "_errorBar_3gc15_602", ca = "_errorRetryBtn_3gc15_611", ra = "_stoppedBar_3gc15_626", da = "_scrollTopBtn_3gc15_636", ua = "_scrollTopBtnVisible_3gc15_658", ma = "_composerWrap_3gc15_669", pa = "_composer_3gc15_669", ha = "_composerInput_3gc15_691", ga = "_sendBtn_3gc15_709", _a = "_stopBtn_3gc15_710", fa = "_sendBtnReady_3gc15_730", ya = "_composerHint_3gc15_748", ba = "_msgMeta_3gc15_758", va = "_copyBtn_3gc15_769", Na = "_copyBtnInline_3gc15_799", Ca = "_copyBtnDone_3gc15_806", ka = "_landingChips_3gc15_811", Ta = "_landingChip_3gc15_811", wa = "_userActions_3gc15_838", Sa = "_userActionBtn_3gc15_851", Ia = "_editingBar_3gc15_874", Aa = "_pendingBar_3gc15_889", Ba = "_editingCancel_3gc15_910", i = {
16
+ container: ps,
17
+ sessionPanel: hs,
18
+ sessionHeader: gs,
19
+ sessionHeaderActions: _s,
20
+ sessionBtnSm: fs,
21
+ sessionList: ys,
22
+ sessionItem: bs,
23
+ sessionItemActive: vs,
24
+ sessionItemTitle: Ns,
25
+ sessionLiveDot: Cs,
26
+ sessionItemTime: ks,
27
+ sessionDeleteBtn: Ts,
28
28
  sessionRenameBtn: ws,
29
- sessionRenameInput: Ts,
30
- sessionCreateRow: Ss,
31
- sessionCreateInput: Is,
32
- sessionCreateConfirm: As,
33
- sessionCreateCancel: Bs,
34
- sessionSearchRow: Ls,
35
- sessionSearchInput: Ds,
36
- sessionSearchClear: Ms,
37
- sessionEmpty: xs,
38
- sessionExpandBtn: Rs,
39
- chatPanel: Os,
40
- chatHeader: $s,
41
- agentAvatar: Es,
42
- chatHeaderMeta: Hs,
43
- chatHeaderName: Ps,
44
- chatHeaderSession: Fs,
45
- chatHeaderBadge: js,
46
- streamingIndicator: Ws,
47
- threadScroll: Ks,
48
- threadInner: Us,
49
- landing: Vs,
50
- landingLogo: Gs,
51
- landingTitle: zs,
52
- landingHint: Qs,
53
- newChatLanding: qs,
54
- landingComposer: Xs,
55
- landingInput: Js,
56
- chatEmpty: Ys,
57
- userRow: Zs,
58
- userBubble: ea,
59
- assistantBlock: ta,
60
- md: na,
61
- mdPreWrap: sa,
62
- mdPreCopy: aa,
63
- caretCursor: la,
64
- errorBar: ia,
65
- errorRetryBtn: oa,
66
- stoppedBar: ca,
67
- scrollTopBtn: ra,
68
- scrollTopBtnVisible: da,
69
- composerWrap: ua,
70
- composer: ma,
71
- composerInput: pa,
72
- sendBtn: ha,
73
- stopBtn: ga,
74
- sendBtnReady: _a,
75
- composerHint: fa,
76
- msgMeta: ya,
77
- copyBtn: ba,
78
- copyBtnInline: va,
79
- copyBtnDone: Na,
80
- landingChips: Ca,
81
- landingChip: ka,
29
+ sessionRenameInput: Ss,
30
+ sessionCreateRow: Is,
31
+ sessionCreateInput: As,
32
+ sessionCreateConfirm: Bs,
33
+ sessionCreateCancel: Ls,
34
+ sessionSearchRow: Ds,
35
+ sessionSearchInput: Ms,
36
+ sessionSearchClear: xs,
37
+ sessionEmpty: Rs,
38
+ sessionExpandBtn: Os,
39
+ chatPanel: $s,
40
+ chatHeader: Es,
41
+ agentAvatar: Hs,
42
+ chatHeaderMeta: Ps,
43
+ chatHeaderName: Fs,
44
+ chatHeaderSession: js,
45
+ chatHeaderBadge: Ws,
46
+ streamingIndicator: Ks,
47
+ threadScroll: Us,
48
+ threadInner: Vs,
49
+ landing: Gs,
50
+ landingLogo: zs,
51
+ landingTitle: Qs,
52
+ landingHint: qs,
53
+ newChatLanding: Xs,
54
+ landingComposer: Js,
55
+ landingInput: Ys,
56
+ chatEmpty: Zs,
57
+ userRow: ea,
58
+ userBubble: ta,
59
+ assistantBlock: na,
60
+ md: sa,
61
+ mdPreWrap: aa,
62
+ mdPreCopy: la,
63
+ caretCursor: ia,
64
+ errorBar: oa,
65
+ errorRetryBtn: ca,
66
+ stoppedBar: ra,
67
+ scrollTopBtn: da,
68
+ scrollTopBtnVisible: ua,
69
+ composerWrap: ma,
70
+ composer: pa,
71
+ composerInput: ha,
72
+ sendBtn: ga,
73
+ stopBtn: _a,
74
+ sendBtnReady: fa,
75
+ composerHint: ya,
76
+ msgMeta: ba,
77
+ copyBtn: va,
78
+ copyBtnInline: Na,
79
+ copyBtnDone: Ca,
80
+ landingChips: ka,
81
+ landingChip: Ta,
82
82
  userActions: wa,
83
- userActionBtn: Ta,
84
- editingBar: Sa,
85
- pendingBar: Ia,
86
- editingCancel: Aa
83
+ userActionBtn: Sa,
84
+ editingBar: Ia,
85
+ pendingBar: Aa,
86
+ editingCancel: Ba
87
87
  };
88
- function Ba(n) {
88
+ function La(n) {
89
89
  if (n && n.trim().startsWith("{"))
90
90
  try {
91
91
  const o = JSON.parse(n);
@@ -100,9 +100,9 @@ function Ba(n) {
100
100
  }
101
101
  return null;
102
102
  }
103
- function At(n) {
103
+ function Bt(n) {
104
104
  return (n || []).map((o, u) => {
105
- const _ = Ba(o.content);
105
+ const _ = La(o.content);
106
106
  return {
107
107
  id: `local-${o.timestamp}-${o.role}-${u}`,
108
108
  role: o.role === "assistant" ? "assistant" : "user",
@@ -116,10 +116,10 @@ function At(n) {
116
116
  function Je(n) {
117
117
  return n.filter((o) => o.type === "text").map((o) => o.text).join("");
118
118
  }
119
- function La(n) {
119
+ function Da(n) {
120
120
  return n >= 1e4 ? `${Math.round(n / 1e3)}k` : n >= 1e3 ? `${(n / 1e3).toFixed(1)}k` : String(n);
121
121
  }
122
- function Da(n) {
122
+ function Ma(n) {
123
123
  if (n == null || n <= 0) return "";
124
124
  const o = Date.now() - n;
125
125
  if (o < 6e4) return "刚刚";
@@ -130,7 +130,7 @@ function Da(n) {
130
130
  const _ = new Date(n);
131
131
  return `${_.getMonth() + 1}-${String(_.getDate()).padStart(2, "0")}`;
132
132
  }
133
- const Bt = [
133
+ const Lt = [
134
134
  "#2F70F1",
135
135
  "#52c41a",
136
136
  "#fa8c16",
@@ -140,38 +140,38 @@ const Bt = [
140
140
  "#f522d0",
141
141
  "#faad14"
142
142
  ];
143
- function Lt(n) {
143
+ function Dt(n) {
144
144
  let o = 0;
145
145
  for (let u = 0; u < n.length; u++) o = o * 31 + n.charCodeAt(u) | 0;
146
- return Bt[Math.abs(o) % Bt.length];
146
+ return Lt[Math.abs(o) % Lt.length];
147
147
  }
148
- function ft(n) {
148
+ function yt(n) {
149
149
  return n ? n.charAt(0).toUpperCase() : "?";
150
150
  }
151
- function Ma({ children: n }) {
151
+ function xa({ children: n }) {
152
152
  const o = q(null);
153
153
  return /* @__PURE__ */ l("div", { className: i.mdPreWrap, children: [
154
- /* @__PURE__ */ e("div", { className: i.mdPreCopy, children: /* @__PURE__ */ e(kt, { getText: () => {
154
+ /* @__PURE__ */ e("div", { className: i.mdPreCopy, children: /* @__PURE__ */ e(Tt, { getText: () => {
155
155
  var u;
156
156
  return ((u = o.current) == null ? void 0 : u.textContent) ?? "";
157
157
  } }) }),
158
158
  /* @__PURE__ */ e("pre", { ref: o, children: n })
159
159
  ] });
160
160
  }
161
- function xa({ text: n }) {
161
+ function Ra({ text: n }) {
162
162
  return /* @__PURE__ */ e("div", { className: i.md, children: /* @__PURE__ */ e(
163
- is,
163
+ os,
164
164
  {
165
- remarkPlugins: [cs],
166
- rehypePlugins: [os],
165
+ remarkPlugins: [rs],
166
+ rehypePlugins: [cs],
167
167
  components: {
168
- pre: (o) => /* @__PURE__ */ e(Ma, { children: o.children })
168
+ pre: (o) => /* @__PURE__ */ e(xa, { children: o.children })
169
169
  },
170
170
  children: n
171
171
  }
172
172
  ) });
173
173
  }
174
- function Ra({ startedAtMs: n }) {
174
+ function Oa({ startedAtMs: n }) {
175
175
  const [, o] = m(0);
176
176
  H(() => {
177
177
  const _ = window.setInterval(() => o((k) => k + 1), 1e3);
@@ -183,7 +183,7 @@ function Ra({ startedAtMs: n }) {
183
183
  "s…"
184
184
  ] });
185
185
  }
186
- function Oa(n) {
186
+ function $a(n) {
187
187
  var o;
188
188
  if ((o = navigator.clipboard) != null && o.writeText)
189
189
  return navigator.clipboard.writeText(n).catch(() => {
@@ -197,7 +197,7 @@ function Oa(n) {
197
197
  return !1;
198
198
  }
199
199
  }
200
- function kt({
200
+ function Tt({
201
201
  getText: n,
202
202
  inline: o,
203
203
  label: u = "复制正文"
@@ -210,21 +210,21 @@ function kt({
210
210
  className: `${i.copyBtn} ${o ? i.copyBtnInline : ""} ${_ ? i.copyBtnDone : ""}`,
211
211
  onClick: () => {
212
212
  const R = n();
213
- !R || !Oa(R) || (k(!0), window.setTimeout(() => k(!1), 1600));
213
+ !R || !$a(R) || (k(!0), window.setTimeout(() => k(!1), 1600));
214
214
  },
215
215
  title: u,
216
216
  "aria-label": u,
217
- children: _ ? /* @__PURE__ */ e(Vt, {}) : /* @__PURE__ */ e(Vn, {})
217
+ children: _ ? /* @__PURE__ */ e(Gt, {}) : /* @__PURE__ */ e(Gn, {})
218
218
  }
219
219
  );
220
220
  }
221
- const Dt = [
221
+ const Mt = [
222
222
  "查看当前目录的文件列表",
223
223
  "总结当前目录里各文件的内容",
224
224
  "帮我写一个脚本统计各文件的行数",
225
225
  "说明一下你能使用哪些工具"
226
226
  ];
227
- function Zt({
227
+ function en({
228
228
  agent: n,
229
229
  newSessionTrigger: o = 0,
230
230
  autoSendDraft: u = null,
@@ -236,15 +236,15 @@ function Zt({
236
236
  const y = Ae((t) => t.currentUser), x = wt(), [j, D] = m([]), [$, P] = m(""), [E, B] = m(null), [N, X] = m(""), V = q(!1), de = $e(() => {
237
237
  const t = $.trim().toLowerCase();
238
238
  return t ? j.filter((d) => d.title.toLowerCase().includes(t)) : j;
239
- }, [j, $]), [L, T] = m(
239
+ }, [j, $]), [L, w] = m(
240
240
  null
241
- ), [W, I] = m([]), [z, G] = m(""), [K, f] = m(!1), w = q(!1), Y = q(null), [Be, ve] = m(null), Z = q(null), ke = q(null), ge = q(null);
241
+ ), [W, I] = m([]), [z, G] = m(""), [K, f] = m(!1), T = q(!1), Y = q(null), [Be, ve] = m(null), Z = q(null), ke = q(null), ge = q(null);
242
242
  H(() => {
243
243
  ge.current = L;
244
244
  }, [L]);
245
- const we = q(/* @__PURE__ */ new Map()), He = q(null), Pe = (t) => {
246
- w.current = t, f(t);
247
- }, [Te, _e] = m(!1), [Le, oe] = m(""), [De, Ne] = m(!1), [Me, ue] = m(!1), [xe, fe] = m(""), [ze, Fe] = m(
245
+ const Te = q(/* @__PURE__ */ new Map()), He = q(null), Pe = (t) => {
246
+ T.current = t, f(t);
247
+ }, [we, _e] = m(!1), [Le, oe] = m(""), [De, Ne] = m(!1), [Me, ue] = m(!1), [xe, fe] = m(""), [ze, Fe] = m(
248
248
  () => localStorage.getItem("ft_local_session_collapsed") !== "false"
249
249
  ), [qe, je] = m(!0), [a, b] = m(!1), [Q, Ce] = m(null), ne = q(null), me = q(null), se = q(null), Se = q(null), We = q(!0), ce = q(!1), ae = q(null), le = J(
250
250
  (t, d) => {
@@ -258,29 +258,29 @@ function Zt({
258
258
  []
259
259
  ), Ye = K ? ((nt = ae.current) == null ? void 0 : nt.sid) ?? null : null, Ze = J(async () => {
260
260
  try {
261
- const t = await Pt(n == null ? void 0 : n.localAgentId);
261
+ const t = await Ft(n == null ? void 0 : n.localAgentId);
262
262
  return D(t), je(!0), t;
263
263
  } catch {
264
264
  return je(!1), D([]), [];
265
265
  }
266
266
  }, [n == null ? void 0 : n.localAgentId]);
267
267
  H(() => {
268
- T(null), I([]), P(""), Ze().then((t) => {
268
+ w(null), I([]), P(""), Ze().then((t) => {
269
269
  if (t.length > 0) {
270
270
  const d = [...t].sort(
271
271
  (c, v) => new Date(v.updatedAt).getTime() - new Date(c.updatedAt).getTime()
272
272
  )[0];
273
- T(d.id);
273
+ w(d.id);
274
274
  }
275
275
  });
276
276
  }, [Ze]), H(() => {
277
277
  o > 0 && (async () => {
278
278
  try {
279
- const t = await _t(
279
+ const t = await ft(
280
280
  "新会话",
281
281
  n == null ? void 0 : n.localAgentId
282
282
  );
283
- D((d) => [t, ...d]), T(t.id), I([]), P("");
283
+ D((d) => [t, ...d]), w(t.id), I([]), P("");
284
284
  } catch {
285
285
  ue(!0), fe("");
286
286
  }
@@ -292,12 +292,12 @@ function Zt({
292
292
  }, []);
293
293
  const et = q(null);
294
294
  H(() => {
295
- !k || et.current === k || (et.current = k, T(k), R == null || R());
295
+ !k || et.current === k || (et.current = k, w(k), R == null || R());
296
296
  }, [k, R]), H(() => {
297
297
  const t = He.current;
298
298
  if (t != null && t !== L) {
299
- we.current.set(t, z);
300
- const v = we.current.get(L ?? "") ?? "";
299
+ Te.current.set(t, z);
300
+ const v = Te.current.get(L ?? "") ?? "";
301
301
  G(v), requestAnimationFrame(() => {
302
302
  const h = me.current;
303
303
  h && (h.style.height = "auto", h.style.height = Math.min(h.scrollHeight, 180) + "px");
@@ -317,8 +317,8 @@ function Zt({
317
317
  return;
318
318
  }
319
319
  let c = !1;
320
- return _e(!0), un(L).then((v) => {
321
- c || I(At(v.messages));
320
+ return _e(!0), mn(L).then((v) => {
321
+ c || I(Bt(v.messages));
322
322
  }).catch(() => {
323
323
  c || I([]);
324
324
  }).finally(() => {
@@ -334,7 +334,7 @@ function Zt({
334
334
  if (!t) return;
335
335
  const d = t.scrollHeight - t.scrollTop - t.clientHeight;
336
336
  We.current = d < 80, b(d > 120);
337
- }, []), pt = J(() => {
337
+ }, []), ht = J(() => {
338
338
  const t = ne.current;
339
339
  t && (t.scrollTop = t.scrollHeight), We.current = !0, b(!1);
340
340
  }, []);
@@ -347,8 +347,8 @@ function Zt({
347
347
  const lt = async () => {
348
348
  const t = xe.trim() || "新会话";
349
349
  try {
350
- const d = await _t(t, n == null ? void 0 : n.localAgentId);
351
- D((c) => [d, ...c]), T(d.id), I([]), ue(!1), fe(""), P("");
350
+ const d = await ft(t, n == null ? void 0 : n.localAgentId);
351
+ D((c) => [d, ...c]), w(d.id), I([]), ue(!1), fe(""), P("");
352
352
  } catch {
353
353
  }
354
354
  }, ye = (t) => {
@@ -359,16 +359,16 @@ function Zt({
359
359
  const t = E, d = N.trim();
360
360
  if (B(null), !(!t || !d))
361
361
  try {
362
- await pn(t, d), D(
362
+ await hn(t, d), D(
363
363
  (c) => c.map((v) => v.id === t ? { ...v, title: d } : v)
364
364
  );
365
365
  } catch {
366
366
  }
367
367
  }, it = async (t) => {
368
- if (window.confirm("确定删除此会话吗?")) {
369
- w.current && Se.current === t && Qe();
368
+ if (await mt({ content: "确定删除此会话吗?" })) {
369
+ T.current && Se.current === t && Qe();
370
370
  try {
371
- await nn(t), D((d) => d.filter((c) => c.id !== t)), L === t && (T(null), I([]));
371
+ await sn(t), D((d) => d.filter((c) => c.id !== t)), L === t && (w(null), I([]));
372
372
  } catch {
373
373
  }
374
374
  }
@@ -390,7 +390,7 @@ function Zt({
390
390
  );
391
391
  },
392
392
  [le]
393
- ), ht = J(
393
+ ), gt = J(
394
394
  (t, d, c) => {
395
395
  le(
396
396
  t,
@@ -427,7 +427,7 @@ function Zt({
427
427
  ), Qe = J(() => {
428
428
  var h;
429
429
  const t = Se.current;
430
- Se.current = null, (h = se.current) == null || h.abort(), se.current = null, Pe(!1), t && mn(t).catch(() => {
430
+ Se.current = null, (h = se.current) == null || h.abort(), se.current = null, Pe(!1), t && pn(t).catch(() => {
431
431
  });
432
432
  const d = ae.current;
433
433
  ae.current = null;
@@ -455,7 +455,7 @@ function Zt({
455
455
  }, [K, Q, Qe]);
456
456
  const Ke = async (t, d) => {
457
457
  const c = d ?? L;
458
- if (!c || !t || w.current) return;
458
+ if (!c || !t || T.current) return;
459
459
  Y.current = null;
460
460
  const v = {
461
461
  id: `local-user-${Date.now()}`,
@@ -473,13 +473,13 @@ function Zt({
473
473
  return ae.current = { sid: c, messages: F }, F;
474
474
  }), Pe(!0), Se.current = c, We.current = !0;
475
475
  const O = new AbortController();
476
- se.current = O, await hn(
476
+ se.current = O, await gn(
477
477
  c,
478
478
  t,
479
479
  {
480
480
  onToken: (C) => ot(c, h, "text", C),
481
481
  onReasoning: (C) => ot(c, h, "thinking", C),
482
- onEvent: (C) => ht(c, h, C),
482
+ onEvent: (C) => gt(c, h, C),
483
483
  onFinal: (C) => {
484
484
  Y.current = C;
485
485
  },
@@ -530,17 +530,17 @@ function Zt({
530
530
  }, tt = async (t, d) => {
531
531
  if (L)
532
532
  try {
533
- const { session: c, previousId: v } = await gn(
533
+ const { session: c, previousId: v } = await _n(
534
534
  L,
535
535
  t
536
536
  );
537
537
  ce.current = !0, D(
538
538
  (h) => h.map((S) => S.id === v ? c : S)
539
- ), T(c.id), I(At(c.messages)), await Ke(d, c.id);
539
+ ), w(c.id), I(Bt(c.messages)), await Ke(d, c.id);
540
540
  } catch {
541
541
  await Ke(d);
542
542
  }
543
- }, gt = (t, d) => {
543
+ }, _t = (t, d) => {
544
544
  K || (G(d), Ce(t), requestAnimationFrame(() => {
545
545
  const c = me.current;
546
546
  c && (c.focus(), c.style.height = "auto", c.style.height = Math.min(c.scrollHeight, 180) + "px");
@@ -553,13 +553,13 @@ function Zt({
553
553
  ` + t : t);
554
554
  }, s = async (t) => {
555
555
  const d = (t ?? Le).trim();
556
- if (!(!d || De || w.current)) {
556
+ if (!(!d || De || T.current)) {
557
557
  Ne(!0);
558
558
  try {
559
559
  const c = /* @__PURE__ */ new Date(), v = (O) => String(O).padStart(2, "0"), h = `${v(c.getMonth() + 1)}${v(c.getDate())} ${v(
560
560
  c.getHours()
561
- )}:${v(c.getMinutes())}`, S = await _t(h, n == null ? void 0 : n.localAgentId);
562
- D((O) => [S, ...O]), T(S.id), I([]), oe(""), await Ke(d, S.id);
561
+ )}:${v(c.getMinutes())}`, S = await ft(h, n == null ? void 0 : n.localAgentId);
562
+ D((O) => [S, ...O]), w(S.id), I([]), oe(""), await Ke(d, S.id);
563
563
  } catch {
564
564
  } finally {
565
565
  Ne(!1);
@@ -570,10 +570,10 @@ function Zt({
570
570
  if (t) {
571
571
  if (K) {
572
572
  Z.current = Z.current ? Z.current + `
573
- ` + t : t, ke.current = L, ve(Z.current), G(""), we.current.delete(L ?? ""), me.current && (me.current.style.height = "auto");
573
+ ` + t : t, ke.current = L, ve(Z.current), G(""), Te.current.delete(L ?? ""), me.current && (me.current.style.height = "auto");
574
574
  return;
575
575
  }
576
- if (G(""), we.current.delete(L ?? ""), me.current && (me.current.style.height = "auto"), Q != null) {
576
+ if (G(""), Te.current.delete(L ?? ""), me.current && (me.current.style.height = "auto"), Q != null) {
577
577
  const d = Q;
578
578
  Ce(null), tt(d, t);
579
579
  return;
@@ -581,13 +581,13 @@ function Zt({
581
581
  Ke(t);
582
582
  }
583
583
  }, A = (t) => {
584
- Wt(t, x.sendKey) && !t.nativeEvent.isComposing && (t.preventDefault(), g()), t.key === "Escape" && (K ? Qe() : Q != null && ct());
584
+ Kt(t, x.sendKey) && !t.nativeEvent.isComposing && (t.preventDefault(), g()), t.key === "Escape" && (K ? Qe() : Q != null && ct());
585
585
  }, M = (t) => {
586
586
  G(t.target.value);
587
587
  const d = t.target;
588
588
  d.style.height = "auto", d.style.height = Math.min(d.scrollHeight, 180) + "px";
589
- }, pe = Lt("local-default");
590
- Lt(
589
+ }, pe = Dt("local-default");
590
+ Dt(
591
591
  (y == null ? void 0 : y.username) || (y == null ? void 0 : y.display_name) || "user"
592
592
  );
593
593
  const U = (t) => {
@@ -602,7 +602,7 @@ function Zt({
602
602
  if (h.type === "thinking")
603
603
  v.push(
604
604
  /* @__PURE__ */ e(
605
- On,
605
+ $n,
606
606
  {
607
607
  text: h.text,
608
608
  streaming: !!t.streaming,
@@ -616,7 +616,7 @@ function Zt({
616
616
  const O = h.id ? d.get(h.id) : void 0, C = h._t0 != null && (O == null ? void 0 : O._t1) != null ? Math.max(1, O._t1 - h._t0) : h.durationMs;
617
617
  v.push(
618
618
  /* @__PURE__ */ e(
619
- $n,
619
+ En,
620
620
  {
621
621
  call: h,
622
622
  result: O,
@@ -635,7 +635,7 @@ function Zt({
635
635
  /* @__PURE__ */ e("pre", { className: i.toolPre, children: h.content || "(空)" })
636
636
  ] }) }, S)
637
637
  );
638
- } else h.type === "text" && h.text && v.push(/* @__PURE__ */ e(xa, { text: h.text }, S));
638
+ } else h.type === "text" && h.text && v.push(/* @__PURE__ */ e(Ra, { text: h.text }, S));
639
639
  }), v;
640
640
  };
641
641
  if (!qe)
@@ -649,7 +649,7 @@ function Zt({
649
649
  className: i.sessionExpandBtn,
650
650
  onClick: () => Fe(!1),
651
651
  title: "展开会话列表",
652
- children: /* @__PURE__ */ e(Ut, {})
652
+ children: /* @__PURE__ */ e(Vt, {})
653
653
  }
654
654
  ) : /* @__PURE__ */ l("div", { className: i.sessionPanel, children: [
655
655
  /* @__PURE__ */ l("div", { className: i.sessionHeader, children: [
@@ -664,7 +664,7 @@ function Zt({
664
664
  ue(!0), fe("");
665
665
  },
666
666
  title: "新建会话",
667
- children: /* @__PURE__ */ e(Pn, {})
667
+ children: /* @__PURE__ */ e(Fn, {})
668
668
  }
669
669
  ),
670
670
  /* @__PURE__ */ e(
@@ -674,7 +674,7 @@ function Zt({
674
674
  className: i.sessionBtnSm,
675
675
  onClick: () => Fe(!0),
676
676
  title: "收起会话列表",
677
- children: /* @__PURE__ */ e(Fn, {})
677
+ children: /* @__PURE__ */ e(jn, {})
678
678
  }
679
679
  )
680
680
  ] })
@@ -724,7 +724,7 @@ function Zt({
724
724
  className: i.sessionCreateConfirm,
725
725
  onClick: () => void lt(),
726
726
  title: "确认创建",
727
- children: /* @__PURE__ */ e(Vt, {})
727
+ children: /* @__PURE__ */ e(Gt, {})
728
728
  }
729
729
  ),
730
730
  /* @__PURE__ */ e(
@@ -750,7 +750,7 @@ function Zt({
750
750
  "div",
751
751
  {
752
752
  className: `${i.sessionItem} ${L === t.id ? i.sessionItemActive : ""}`,
753
- onClick: () => T(t.id),
753
+ onClick: () => w(t.id),
754
754
  children: [
755
755
  E === t.id ? /* @__PURE__ */ e(
756
756
  "input",
@@ -775,7 +775,7 @@ function Zt({
775
775
  onDoubleClick: () => ye(t),
776
776
  children: [
777
777
  t.id === Ye && /* @__PURE__ */ e(
778
- Tt,
778
+ St,
779
779
  {
780
780
  spin: !0,
781
781
  className: i.sessionLiveDot
@@ -785,7 +785,7 @@ function Zt({
785
785
  ]
786
786
  }
787
787
  ),
788
- E !== t.id && /* @__PURE__ */ e("span", { className: i.sessionItemTime, children: Da(t.updatedAt) }),
788
+ E !== t.id && /* @__PURE__ */ e("span", { className: i.sessionItemTime, children: Ma(t.updatedAt) }),
789
789
  /* @__PURE__ */ e(
790
790
  "button",
791
791
  {
@@ -795,7 +795,7 @@ function Zt({
795
795
  d.stopPropagation(), ye(t);
796
796
  },
797
797
  title: "重命名会话",
798
- children: /* @__PURE__ */ e(St, {})
798
+ children: /* @__PURE__ */ e(It, {})
799
799
  }
800
800
  ),
801
801
  /* @__PURE__ */ e(
@@ -807,7 +807,7 @@ function Zt({
807
807
  d.stopPropagation(), it(t.id);
808
808
  },
809
809
  title: "删除会话",
810
- children: /* @__PURE__ */ e(jn, {})
810
+ children: /* @__PURE__ */ e(Wn, {})
811
811
  }
812
812
  )
813
813
  ]
@@ -823,7 +823,7 @@ function Zt({
823
823
  {
824
824
  className: i.agentAvatar,
825
825
  style: { backgroundColor: pe },
826
- children: ft((n == null ? void 0 : n.displayName) || "本地 Agent")
826
+ children: yt((n == null ? void 0 : n.displayName) || "本地 Agent")
827
827
  }
828
828
  ),
829
829
  /* @__PURE__ */ l("div", { className: i.chatHeaderMeta, children: [
@@ -832,7 +832,7 @@ function Zt({
832
832
  ] }),
833
833
  /* @__PURE__ */ e("span", { className: i.chatHeaderBadge, children: (n == null ? void 0 : n.localAgentType) === "jar" ? "内置模型" : n == null ? void 0 : n.localAgentType }),
834
834
  K && /* @__PURE__ */ l("span", { className: i.streamingIndicator, children: [
835
- /* @__PURE__ */ e(Tt, {}),
835
+ /* @__PURE__ */ e(St, {}),
836
836
  " 工作中…"
837
837
  ] })
838
838
  ] }),
@@ -843,13 +843,13 @@ function Zt({
843
843
  className: i.threadScroll,
844
844
  ref: ne,
845
845
  onScroll: at,
846
- children: /* @__PURE__ */ e("div", { className: i.threadInner, children: Te && W.length === 0 ? /* @__PURE__ */ e("div", { className: i.chatEmpty, children: "加载中…" }) : W.length === 0 ? /* @__PURE__ */ l("div", { className: i.landing, children: [
846
+ children: /* @__PURE__ */ e("div", { className: i.threadInner, children: we && W.length === 0 ? /* @__PURE__ */ e("div", { className: i.chatEmpty, children: "加载中…" }) : W.length === 0 ? /* @__PURE__ */ l("div", { className: i.landing, children: [
847
847
  /* @__PURE__ */ e(
848
848
  "div",
849
849
  {
850
850
  className: i.landingLogo,
851
851
  style: { backgroundColor: pe },
852
- children: ft((n == null ? void 0 : n.displayName) || "本地 Agent")
852
+ children: yt((n == null ? void 0 : n.displayName) || "本地 Agent")
853
853
  }
854
854
  ),
855
855
  /* @__PURE__ */ l("div", { className: i.landingTitle, children: [
@@ -858,7 +858,7 @@ function Zt({
858
858
  " 协作"
859
859
  ] }),
860
860
  /* @__PURE__ */ e("div", { className: i.landingHint, children: "思考过程与工具调用实时可见 · Enter 发送 · Esc 停止" }),
861
- /* @__PURE__ */ e("div", { className: i.landingChips, children: Dt.map((t) => /* @__PURE__ */ e(
861
+ /* @__PURE__ */ e("div", { className: i.landingChips, children: Mt.map((t) => /* @__PURE__ */ e(
862
862
  "button",
863
863
  {
864
864
  type: "button",
@@ -873,7 +873,7 @@ function Zt({
873
873
  /* @__PURE__ */ e("div", { className: i.userBubble, children: Je(t.blocks) }),
874
874
  !K && /* @__PURE__ */ l("div", { className: i.userActions, children: [
875
875
  /* @__PURE__ */ e(
876
- kt,
876
+ Tt,
877
877
  {
878
878
  inline: !0,
879
879
  label: "复制",
@@ -887,8 +887,8 @@ function Zt({
887
887
  className: i.userActionBtn,
888
888
  title: "编辑重发(其后内容将被截断)",
889
889
  "aria-label": "编辑重发",
890
- onClick: () => gt(d, Je(t.blocks)),
891
- children: /* @__PURE__ */ e(St, {})
890
+ onClick: () => _t(d, Je(t.blocks)),
891
+ children: /* @__PURE__ */ e(It, {})
892
892
  }
893
893
  ),
894
894
  /* @__PURE__ */ e(
@@ -902,13 +902,13 @@ function Zt({
902
902
  d,
903
903
  Je(t.blocks)
904
904
  ),
905
- children: /* @__PURE__ */ e(Wn, {})
905
+ children: /* @__PURE__ */ e(Kn, {})
906
906
  }
907
907
  )
908
908
  ] })
909
909
  ] }, t.id) : /* @__PURE__ */ l("div", { className: i.assistantBlock, children: [
910
910
  U(t),
911
- t.streaming && t.startedAtMs != null && /* @__PURE__ */ e(Ra, { startedAtMs: t.startedAtMs }),
911
+ t.streaming && t.startedAtMs != null && /* @__PURE__ */ e(Oa, { startedAtMs: t.startedAtMs }),
912
912
  t.streaming && t.blocks.every(
913
913
  (c) => c.type !== "tool_call" && c.type !== "thinking"
914
914
  ) && /* @__PURE__ */ e("span", { className: i.caretCursor }),
@@ -918,11 +918,11 @@ function Zt({
918
918
  (() => {
919
919
  var S, O;
920
920
  const c = ((S = t.usage) == null ? void 0 : S.inputTokens) ?? 0, v = ((O = t.usage) == null ? void 0 : O.outputTokens) ?? 0, h = c + v;
921
- return h > 0 ? ` · ${La(h)} tokens` : "";
921
+ return h > 0 ? ` · ${Da(h)} tokens` : "";
922
922
  })()
923
923
  ] }),
924
924
  !t.streaming && /* @__PURE__ */ e(
925
- kt,
925
+ Tt,
926
926
  {
927
927
  getText: () => Je(t.blocks)
928
928
  }
@@ -958,10 +958,10 @@ function Zt({
958
958
  {
959
959
  type: "button",
960
960
  className: `${i.scrollTopBtn} ${a ? i.scrollTopBtnVisible : ""}`,
961
- onClick: pt,
961
+ onClick: ht,
962
962
  title: "回到最新消息",
963
963
  "aria-label": "回到最新消息",
964
- children: /* @__PURE__ */ e(Kn, {})
964
+ children: /* @__PURE__ */ e(Un, {})
965
965
  }
966
966
  ),
967
967
  /* @__PURE__ */ l("div", { className: i.composerWrap, children: [
@@ -1017,7 +1017,7 @@ function Zt({
1017
1017
  onClick: Qe,
1018
1018
  title: "停止生成(Esc)",
1019
1019
  "aria-label": "停止生成",
1020
- children: /* @__PURE__ */ e(Un, {})
1020
+ children: /* @__PURE__ */ e(Vn, {})
1021
1021
  }
1022
1022
  ) : /* @__PURE__ */ e(
1023
1023
  "button",
@@ -1028,7 +1028,7 @@ function Zt({
1028
1028
  onClick: g,
1029
1029
  title: "发送",
1030
1030
  "aria-label": "发送",
1031
- children: /* @__PURE__ */ e(It, {})
1031
+ children: /* @__PURE__ */ e(At, {})
1032
1032
  }
1033
1033
  )
1034
1034
  ] }),
@@ -1042,7 +1042,7 @@ function Zt({
1042
1042
  {
1043
1043
  className: i.landingLogo,
1044
1044
  style: { backgroundColor: pe },
1045
- children: ft((n == null ? void 0 : n.displayName) || "本地 Agent")
1045
+ children: yt((n == null ? void 0 : n.displayName) || "本地 Agent")
1046
1046
  }
1047
1047
  ),
1048
1048
  /* @__PURE__ */ l("div", { className: i.landingTitle, children: [
@@ -1075,11 +1075,11 @@ function Zt({
1075
1075
  onClick: () => void s(),
1076
1076
  title: "发送并创建会话",
1077
1077
  "aria-label": "发送并创建会话",
1078
- children: /* @__PURE__ */ e(It, {})
1078
+ children: /* @__PURE__ */ e(At, {})
1079
1079
  }
1080
1080
  )
1081
1081
  ] }),
1082
- /* @__PURE__ */ e("div", { className: i.landingChips, children: Dt.map((t) => /* @__PURE__ */ e(
1082
+ /* @__PURE__ */ e("div", { className: i.landingChips, children: Mt.map((t) => /* @__PURE__ */ e(
1083
1083
  "button",
1084
1084
  {
1085
1085
  type: "button",
@@ -1094,49 +1094,49 @@ function Zt({
1094
1094
  ] })
1095
1095
  ] });
1096
1096
  }
1097
- const $a = "_sidebarInner_1vu3c_1", Ea = "_header_1vu3c_8", Ha = "_headerActions_1vu3c_19", Pa = "_tabBar_1vu3c_26", Fa = "_tab_1vu3c_26", ja = "_tabActive_1vu3c_50", Wa = "_btnSm_1vu3c_66", Ka = "_agentSection_1vu3c_84", Ua = "_agentItem_1vu3c_90", Va = "_agentItemActive_1vu3c_112", Ga = "_agentAvatar_1vu3c_117", za = "_agentName_1vu3c_130", Qa = "_emptyState_1vu3c_156", qa = "_createInputRow_1vu3c_168", Xa = "_createInput_1vu3c_168", Ja = "_createConfirmBtn_1vu3c_188", Ya = "_contextMenu_1vu3c_205", Za = "_contextMenuItem_1vu3c_216", el = "_contextMenuItemDanger_1vu3c_231", tl = "_contextMenuDivider_1vu3c_239", nl = "_renameOverlay_1vu3c_246", sl = "_renameDialog_1vu3c_259", al = "_renameTitle_1vu3c_267", ll = "_renameInput_1vu3c_274", il = "_renameActions_1vu3c_289", ol = "_renameBtn_1vu3c_295", cl = "_renameBtnPrimary_1vu3c_309", rl = "_agentDetailBtn_1vu3c_326", dl = "_agentItemShared_1vu3c_358", ul = "_agentInfo_1vu3c_362", ml = "_agentOwner_1vu3c_374", pl = "_sharedBadge_1vu3c_382", hl = "_createLocalDialog_1vu3c_430", gl = "_createLocalLabel_1vu3c_438", _l = "_agentTypeCards_1vu3c_446", fl = "_agentTypeCard_1vu3c_446", yl = "_agentTypeIcon_1vu3c_474", bl = "_agentTypeBody_1vu3c_487", vl = "_agentTypeTitle_1vu3c_494", Nl = "_agentTypeDesc_1vu3c_500", Cl = "_agentTypeBadge_1vu3c_506", r = {
1098
- sidebarInner: $a,
1099
- header: Ea,
1100
- headerActions: Ha,
1101
- tabBar: Pa,
1102
- tab: Fa,
1103
- tabActive: ja,
1104
- btnSm: Wa,
1105
- agentSection: Ka,
1106
- agentItem: Ua,
1107
- agentItemActive: Va,
1108
- agentAvatar: Ga,
1109
- agentName: za,
1110
- emptyState: Qa,
1111
- createInputRow: qa,
1112
- createInput: Xa,
1113
- createConfirmBtn: Ja,
1114
- contextMenu: Ya,
1115
- contextMenuItem: Za,
1116
- contextMenuItemDanger: el,
1117
- contextMenuDivider: tl,
1118
- renameOverlay: nl,
1119
- renameDialog: sl,
1120
- renameTitle: al,
1121
- renameInput: ll,
1122
- renameActions: il,
1123
- renameBtn: ol,
1124
- renameBtnPrimary: cl,
1125
- agentDetailBtn: rl,
1126
- agentItemShared: dl,
1127
- agentInfo: ul,
1128
- agentOwner: ml,
1129
- sharedBadge: pl,
1130
- createLocalDialog: hl,
1131
- createLocalLabel: gl,
1132
- agentTypeCards: _l,
1133
- agentTypeCard: fl,
1134
- agentTypeIcon: yl,
1135
- agentTypeBody: bl,
1136
- agentTypeTitle: vl,
1137
- agentTypeDesc: Nl,
1138
- agentTypeBadge: Cl
1139
- }, Mt = [
1097
+ const Ea = "_sidebarInner_1vu3c_1", Ha = "_header_1vu3c_8", Pa = "_headerActions_1vu3c_19", Fa = "_tabBar_1vu3c_26", ja = "_tab_1vu3c_26", Wa = "_tabActive_1vu3c_50", Ka = "_btnSm_1vu3c_66", Ua = "_agentSection_1vu3c_84", Va = "_agentItem_1vu3c_90", Ga = "_agentItemActive_1vu3c_112", za = "_agentAvatar_1vu3c_117", Qa = "_agentName_1vu3c_130", qa = "_emptyState_1vu3c_156", Xa = "_createInputRow_1vu3c_168", Ja = "_createInput_1vu3c_168", Ya = "_createConfirmBtn_1vu3c_188", Za = "_contextMenu_1vu3c_205", el = "_contextMenuItem_1vu3c_216", tl = "_contextMenuItemDanger_1vu3c_231", nl = "_contextMenuDivider_1vu3c_239", sl = "_renameOverlay_1vu3c_246", al = "_renameDialog_1vu3c_259", ll = "_renameTitle_1vu3c_267", il = "_renameInput_1vu3c_274", ol = "_renameActions_1vu3c_289", cl = "_renameBtn_1vu3c_295", rl = "_renameBtnPrimary_1vu3c_309", dl = "_agentDetailBtn_1vu3c_326", ul = "_agentItemShared_1vu3c_358", ml = "_agentInfo_1vu3c_362", pl = "_agentOwner_1vu3c_374", hl = "_sharedBadge_1vu3c_382", gl = "_createLocalDialog_1vu3c_430", _l = "_createLocalLabel_1vu3c_438", fl = "_agentTypeCards_1vu3c_446", yl = "_agentTypeCard_1vu3c_446", bl = "_agentTypeIcon_1vu3c_474", vl = "_agentTypeBody_1vu3c_487", Nl = "_agentTypeTitle_1vu3c_494", Cl = "_agentTypeDesc_1vu3c_500", kl = "_agentTypeBadge_1vu3c_506", r = {
1098
+ sidebarInner: Ea,
1099
+ header: Ha,
1100
+ headerActions: Pa,
1101
+ tabBar: Fa,
1102
+ tab: ja,
1103
+ tabActive: Wa,
1104
+ btnSm: Ka,
1105
+ agentSection: Ua,
1106
+ agentItem: Va,
1107
+ agentItemActive: Ga,
1108
+ agentAvatar: za,
1109
+ agentName: Qa,
1110
+ emptyState: qa,
1111
+ createInputRow: Xa,
1112
+ createInput: Ja,
1113
+ createConfirmBtn: Ya,
1114
+ contextMenu: Za,
1115
+ contextMenuItem: el,
1116
+ contextMenuItemDanger: tl,
1117
+ contextMenuDivider: nl,
1118
+ renameOverlay: sl,
1119
+ renameDialog: al,
1120
+ renameTitle: ll,
1121
+ renameInput: il,
1122
+ renameActions: ol,
1123
+ renameBtn: cl,
1124
+ renameBtnPrimary: rl,
1125
+ agentDetailBtn: dl,
1126
+ agentItemShared: ul,
1127
+ agentInfo: ml,
1128
+ agentOwner: pl,
1129
+ sharedBadge: hl,
1130
+ createLocalDialog: gl,
1131
+ createLocalLabel: _l,
1132
+ agentTypeCards: fl,
1133
+ agentTypeCard: yl,
1134
+ agentTypeIcon: bl,
1135
+ agentTypeBody: vl,
1136
+ agentTypeTitle: Nl,
1137
+ agentTypeDesc: Cl,
1138
+ agentTypeBadge: kl
1139
+ }, xt = [
1140
1140
  "#2F70F1",
1141
1141
  "#52c41a",
1142
1142
  "#fa8c16",
@@ -1146,16 +1146,16 @@ const $a = "_sidebarInner_1vu3c_1", Ea = "_header_1vu3c_8", Ha = "_headerActions
1146
1146
  "#f5222d",
1147
1147
  "#faad14"
1148
1148
  ];
1149
- function xt(n) {
1149
+ function Rt(n) {
1150
1150
  let o = 0;
1151
1151
  for (let u = 0; u < n.length; u++) o = o * 31 + n.charCodeAt(u) | 0;
1152
- return Mt[Math.abs(o) % Mt.length];
1152
+ return xt[Math.abs(o) % xt.length];
1153
1153
  }
1154
- function Rt(n) {
1154
+ function Ot(n) {
1155
1155
  return n ? n.charAt(0).toUpperCase() : "?";
1156
1156
  }
1157
1157
  const dt = "-1";
1158
- function kl({
1158
+ function Tl({
1159
1159
  selectedAgentId: n,
1160
1160
  selectedLocalAgentId: o,
1161
1161
  onSelectAgent: u,
@@ -1164,10 +1164,10 @@ function kl({
1164
1164
  }) {
1165
1165
  const R = Ae((a) => a.token), y = Ae((a) => a.personalChatNav), [x, j] = m(
1166
1166
  y.tab === "shared" ? "shared" : "remote"
1167
- ), [D, $] = m([]), [P, E] = m(!1), [B, N] = m(!1), [X, V] = m(""), [de, L] = m(!1), [T, W] = m(null), [I, z] = m(null), [G, K] = m(!1), [f, w] = m([]), [Y, Be] = m(!1), [ve, Z] = m(null), [ke, ge] = m(!1), [we, He] = m([]), [Pe, Te] = m(!1), [_e, Le] = m(!1), oe = q(null), De = J(async () => {
1167
+ ), [D, $] = m([]), [P, E] = m(!1), [B, N] = m(!1), [X, V] = m(""), [de, L] = m(!1), [w, W] = m(null), [I, z] = m(null), [G, K] = m(!1), [f, T] = m([]), [Y, Be] = m(!1), [ve, Z] = m(null), [ke, ge] = m(!1), [Te, He] = m([]), [Pe, we] = m(!1), [_e, Le] = m(!1), oe = q(null), De = J(async () => {
1168
1168
  E(!0);
1169
1169
  try {
1170
- const a = await Ht(R);
1170
+ const a = await Pt(R);
1171
1171
  $(a), n && !a.find((b) => st(b.id, n)) && u(null);
1172
1172
  } catch {
1173
1173
  } finally {
@@ -1176,8 +1176,8 @@ function kl({
1176
1176
  }, [R, n, u]), Ne = J(async () => {
1177
1177
  Be(!0);
1178
1178
  try {
1179
- const a = await sn(R);
1180
- w(a);
1179
+ const a = await an(R);
1180
+ T(a);
1181
1181
  } catch {
1182
1182
  } finally {
1183
1183
  Be(!1);
@@ -1190,29 +1190,29 @@ function kl({
1190
1190
  }, [De, Ne, x]);
1191
1191
  const Me = J(async () => {
1192
1192
  try {
1193
- const a = await Ft();
1193
+ const a = await jt();
1194
1194
  He(a);
1195
1195
  } catch {
1196
1196
  He([]);
1197
1197
  }
1198
1198
  }, []);
1199
1199
  H(() => {
1200
- x === "local" && yt().then((a) => {
1200
+ x === "local" && bt().then((a) => {
1201
1201
  ge(a), a && Me();
1202
1202
  });
1203
1203
  }, [x, Me]), H(() => {
1204
- if (!T) return;
1204
+ if (!w) return;
1205
1205
  const a = (b) => {
1206
1206
  oe.current && !oe.current.contains(b.target) && W(null);
1207
1207
  };
1208
1208
  return document.addEventListener("mousedown", a), () => document.removeEventListener("mousedown", a);
1209
- }, [T]);
1209
+ }, [w]);
1210
1210
  const ue = async () => {
1211
1211
  const a = X.trim();
1212
1212
  if (a) {
1213
1213
  L(!0);
1214
1214
  try {
1215
- const b = await an(a, R);
1215
+ const b = await ln(a, R);
1216
1216
  $((Q) => [...Q, b]), V(""), N(!1), u(b);
1217
1217
  } catch {
1218
1218
  } finally {
@@ -1221,7 +1221,7 @@ function kl({
1221
1221
  }
1222
1222
  }, xe = async (a) => {
1223
1223
  if (a === "jar") {
1224
- Te(!1), k({
1224
+ we(!1), k({
1225
1225
  id: dt,
1226
1226
  userId: "local",
1227
1227
  agentHubAgentId: null,
@@ -1233,7 +1233,7 @@ function kl({
1233
1233
  return;
1234
1234
  }
1235
1235
  if (!ke) {
1236
- if (!await yt()) {
1236
+ if (!await bt()) {
1237
1237
  rt.error(
1238
1238
  "本地 Agent 未启动,请通过菜单栏「重启 Agent」启动后再试"
1239
1239
  );
@@ -1244,7 +1244,7 @@ function kl({
1244
1244
  Le(!0);
1245
1245
  try {
1246
1246
  const b = a === "hermes" ? "hermes" : "claude-code";
1247
- await _n(b, a), rt.success(`已引入 ${b},点击列表项即可开始对话`), Te(!1), await Me();
1247
+ await fn(b, a), rt.success(`已引入 ${b},点击列表项即可开始对话`), we(!1), await Me();
1248
1248
  } catch (b) {
1249
1249
  rt.error(
1250
1250
  b.message || "创建失败,请检查本地 Agent 是否正常运行"
@@ -1253,18 +1253,18 @@ function kl({
1253
1253
  Le(!1);
1254
1254
  }
1255
1255
  }, fe = async (a) => {
1256
- if (window.confirm("确定删除此 Agent?"))
1256
+ if (await mt({ content: "确定删除此 Agent?" }))
1257
1257
  try {
1258
- await fn(a), await Me();
1258
+ await yn(a), await Me();
1259
1259
  } catch (b) {
1260
1260
  rt.error(b.message || "删除失败");
1261
1261
  }
1262
1262
  }, ze = async (a) => {
1263
- if (window.confirm(
1264
- `确定删除 Agent「${a.displayName}」吗?所有会话记录将一并删除。`
1265
- ))
1263
+ if (await mt({
1264
+ content: `确定删除 Agent「${a.displayName}」吗?所有会话记录将一并删除。`
1265
+ }))
1266
1266
  try {
1267
- await ln(a.id, R), $((b) => b.filter((Q) => Q.id !== a.id)), st(n, a.id) && u(null);
1267
+ await on(a.id, R), $((b) => b.filter((Q) => Q.id !== a.id)), st(n, a.id) && u(null);
1268
1268
  } catch {
1269
1269
  }
1270
1270
  }, Fe = async () => {
@@ -1276,7 +1276,7 @@ function kl({
1276
1276
  }
1277
1277
  K(!0);
1278
1278
  try {
1279
- const b = await on(
1279
+ const b = await cn(
1280
1280
  I.agent.id,
1281
1281
  a,
1282
1282
  R
@@ -1288,12 +1288,14 @@ function kl({
1288
1288
  }
1289
1289
  }, qe = async (a) => {
1290
1290
  const b = a.shared === 1;
1291
- if (window.confirm(
1292
- b ? `确定取消共享 Agent「${a.displayName}」吗?取消后其他用户将无法与此 Agent 聊天。` : `确定共享 Agent「${a.displayName}」吗?共享后其他用户可以与此 Agent 发起聊天。`
1293
- )) {
1291
+ if (await mt({
1292
+ title: b ? "取消共享" : "共享 Agent",
1293
+ content: b ? `确定取消共享 Agent「${a.displayName}」吗?取消后其他用户将无法与此 Agent 聊天。` : `确定共享 Agent「${a.displayName}」吗?共享后其他用户可以与此 Agent 发起聊天。`,
1294
+ danger: !1
1295
+ })) {
1294
1296
  Z(a.id);
1295
1297
  try {
1296
- const Q = await cn(
1298
+ const Q = await rn(
1297
1299
  a.id,
1298
1300
  !b,
1299
1301
  R
@@ -1327,7 +1329,7 @@ function kl({
1327
1329
  {
1328
1330
  type: "button",
1329
1331
  className: r.btnSm,
1330
- onClick: () => Te(!0),
1332
+ onClick: () => we(!0),
1331
1333
  title: "新建本地 Agent",
1332
1334
  children: "+ 新增"
1333
1335
  }
@@ -1363,7 +1365,7 @@ function kl({
1363
1365
  }
1364
1366
  )
1365
1367
  ] }),
1366
- x === "local" ? /* @__PURE__ */ e("div", { className: r.agentSection, children: ke ? /* @__PURE__ */ e(Ee, { children: we.map((a) => /* @__PURE__ */ l(
1368
+ x === "local" ? /* @__PURE__ */ e("div", { className: r.agentSection, children: ke ? /* @__PURE__ */ e(Ee, { children: Te.map((a) => /* @__PURE__ */ l(
1367
1369
  "div",
1368
1370
  {
1369
1371
  className: `${r.agentItem} ${st(n, dt) && (a.type === "jar" && !o || o === a.id) ? r.agentItemActive : ""}`,
@@ -1433,11 +1435,11 @@ function kl({
1433
1435
  {
1434
1436
  className: r.agentAvatar,
1435
1437
  style: {
1436
- backgroundColor: xt(
1438
+ backgroundColor: Rt(
1437
1439
  a.agentCode || a.displayName
1438
1440
  )
1439
1441
  },
1440
- children: Rt(a.displayName)
1442
+ children: Ot(a.displayName)
1441
1443
  }
1442
1444
  ),
1443
1445
  /* @__PURE__ */ l("div", { className: r.agentInfo, children: [
@@ -1456,7 +1458,7 @@ function kl({
1456
1458
  b.stopPropagation(), k(a);
1457
1459
  },
1458
1460
  title: "开始聊天",
1459
- children: /* @__PURE__ */ e(Gt, { style: { fontSize: 12 } })
1461
+ children: /* @__PURE__ */ e(zt, { style: { fontSize: 12 } })
1460
1462
  }
1461
1463
  )
1462
1464
  ]
@@ -1504,11 +1506,11 @@ function kl({
1504
1506
  {
1505
1507
  className: r.agentAvatar,
1506
1508
  style: {
1507
- backgroundColor: xt(
1509
+ backgroundColor: Rt(
1508
1510
  a.agentCode || a.displayName
1509
1511
  )
1510
1512
  },
1511
- children: Rt(a.displayName)
1513
+ children: Ot(a.displayName)
1512
1514
  }
1513
1515
  ),
1514
1516
  /* @__PURE__ */ l("span", { className: r.agentName, children: [
@@ -1530,7 +1532,7 @@ function kl({
1530
1532
  });
1531
1533
  },
1532
1534
  title: "更多操作",
1533
- children: /* @__PURE__ */ e(Gn, { style: { fontSize: 14 } })
1535
+ children: /* @__PURE__ */ e(zn, { style: { fontSize: 14 } })
1534
1536
  }
1535
1537
  )
1536
1538
  ]
@@ -1538,19 +1540,19 @@ function kl({
1538
1540
  a.id
1539
1541
  )) })
1540
1542
  ] }),
1541
- T && /* @__PURE__ */ l(
1543
+ w && /* @__PURE__ */ l(
1542
1544
  "div",
1543
1545
  {
1544
1546
  ref: oe,
1545
1547
  className: r.contextMenu,
1546
- style: { top: T.y, left: T.x },
1548
+ style: { top: w.y, left: w.x },
1547
1549
  children: [
1548
1550
  /* @__PURE__ */ e(
1549
1551
  "div",
1550
1552
  {
1551
1553
  className: r.contextMenuItem,
1552
1554
  onClick: () => {
1553
- k(T.agent), W(null);
1555
+ k(w.agent), W(null);
1554
1556
  },
1555
1557
  children: "开始聊天"
1556
1558
  }
@@ -1560,7 +1562,7 @@ function kl({
1560
1562
  {
1561
1563
  className: r.contextMenuItem,
1562
1564
  onClick: () => {
1563
- _(T.agent), W(null);
1565
+ _(w.agent), W(null);
1564
1566
  },
1565
1567
  children: "Agent 配置"
1566
1568
  }
@@ -1572,8 +1574,8 @@ function kl({
1572
1574
  className: r.contextMenuItem,
1573
1575
  onClick: () => {
1574
1576
  z({
1575
- agent: T.agent,
1576
- value: T.agent.displayName
1577
+ agent: w.agent,
1578
+ value: w.agent.displayName
1577
1579
  }), W(null);
1578
1580
  },
1579
1581
  children: "重命名"
@@ -1584,9 +1586,9 @@ function kl({
1584
1586
  {
1585
1587
  className: r.contextMenuItem,
1586
1588
  onClick: () => {
1587
- ve === null && qe(T.agent), W(null);
1589
+ ve === null && qe(w.agent), W(null);
1588
1590
  },
1589
- children: T.agent.shared === 1 ? "取消共享" : "共享给他人"
1591
+ children: w.agent.shared === 1 ? "取消共享" : "共享给他人"
1590
1592
  }
1591
1593
  ),
1592
1594
  /* @__PURE__ */ e("div", { className: r.contextMenuDivider }),
@@ -1595,7 +1597,7 @@ function kl({
1595
1597
  {
1596
1598
  className: `${r.contextMenuItem} ${r.contextMenuItemDanger}`,
1597
1599
  onClick: () => {
1598
- ze(T.agent), W(null);
1600
+ ze(w.agent), W(null);
1599
1601
  },
1600
1602
  children: "删除"
1601
1603
  }
@@ -1607,7 +1609,7 @@ function kl({
1607
1609
  "div",
1608
1610
  {
1609
1611
  className: r.renameOverlay,
1610
- onClick: () => !_e && Te(!1),
1612
+ onClick: () => !_e && we(!1),
1611
1613
  children: /* @__PURE__ */ l(
1612
1614
  "div",
1613
1615
  {
@@ -1690,7 +1692,7 @@ function kl({
1690
1692
  {
1691
1693
  type: "button",
1692
1694
  className: r.renameBtn,
1693
- onClick: () => Te(!1),
1695
+ onClick: () => we(!1),
1694
1696
  disabled: _e,
1695
1697
  children: "取消"
1696
1698
  }
@@ -1754,32 +1756,32 @@ function kl({
1754
1756
  )
1755
1757
  ] });
1756
1758
  }
1757
- const wl = "_shell_1w53k_2", Tl = "_inset_1w53k_33", Sl = "_main_1w53k_40", Il = "_pane_1w53k_52", Al = "_skipLink_1w53k_62", Bl = "_personalMainArea_1w53k_82", Ll = "_personalSidebar_1w53k_90", Dl = "_personalChatArea_1w53k_103", Ve = {
1759
+ const wl = "_shell_1w53k_2", Sl = "_inset_1w53k_33", Il = "_main_1w53k_40", Al = "_pane_1w53k_52", Bl = "_skipLink_1w53k_62", Ll = "_personalMainArea_1w53k_82", Dl = "_personalSidebar_1w53k_90", Ml = "_personalChatArea_1w53k_103", Ve = {
1758
1760
  shell: wl,
1759
- inset: Tl,
1760
- main: Sl,
1761
- pane: Il,
1762
- skipLink: Al,
1763
- personalMainArea: Bl,
1764
- personalSidebar: Ll,
1765
- personalChatArea: Dl
1766
- }, Ml = "_sidebar_y5tuo_1", xl = "_collapsed_y5tuo_12", Rl = "_sideHeader_y5tuo_17", Ol = "_sideHeaderIcon_y5tuo_32", $l = "_sideHeaderTitle_y5tuo_45", El = "_sideContent_y5tuo_54", Hl = "_groupLabel_y5tuo_61", Pl = "_navList_y5tuo_71", Fl = "_navItem_y5tuo_77", jl = "_navItemActive_y5tuo_109", Wl = "_navIcon_y5tuo_114", Kl = "_navLabel_y5tuo_120", Ul = "_sideFooter_y5tuo_131", Vl = "_footHint_y5tuo_138", te = {
1767
- sidebar: Ml,
1768
- collapsed: xl,
1769
- sideHeader: Rl,
1770
- sideHeaderIcon: Ol,
1771
- sideHeaderTitle: $l,
1772
- sideContent: El,
1773
- groupLabel: Hl,
1774
- navList: Pl,
1775
- navItem: Fl,
1776
- navItemActive: jl,
1777
- navIcon: Wl,
1778
- navLabel: Kl,
1779
- sideFooter: Ul,
1780
- footHint: Vl
1761
+ inset: Sl,
1762
+ main: Il,
1763
+ pane: Al,
1764
+ skipLink: Bl,
1765
+ personalMainArea: Ll,
1766
+ personalSidebar: Dl,
1767
+ personalChatArea: Ml
1768
+ }, xl = "_sidebar_y5tuo_1", Rl = "_collapsed_y5tuo_12", Ol = "_sideHeader_y5tuo_17", $l = "_sideHeaderIcon_y5tuo_32", El = "_sideHeaderTitle_y5tuo_45", Hl = "_sideContent_y5tuo_54", Pl = "_groupLabel_y5tuo_61", Fl = "_navList_y5tuo_71", jl = "_navItem_y5tuo_77", Wl = "_navItemActive_y5tuo_109", Kl = "_navIcon_y5tuo_114", Ul = "_navLabel_y5tuo_120", Vl = "_sideFooter_y5tuo_131", Gl = "_footHint_y5tuo_138", te = {
1769
+ sidebar: xl,
1770
+ collapsed: Rl,
1771
+ sideHeader: Ol,
1772
+ sideHeaderIcon: $l,
1773
+ sideHeaderTitle: El,
1774
+ sideContent: Hl,
1775
+ groupLabel: Pl,
1776
+ navList: Fl,
1777
+ navItem: jl,
1778
+ navItemActive: Wl,
1779
+ navIcon: Kl,
1780
+ navLabel: Ul,
1781
+ sideFooter: Vl,
1782
+ footHint: Gl
1781
1783
  };
1782
- function Gl({
1784
+ function zl({
1783
1785
  items: n,
1784
1786
  activeTab: o,
1785
1787
  collapsed: u,
@@ -1794,7 +1796,7 @@ function Gl({
1794
1796
  "aria-label": "个人工作台导航",
1795
1797
  children: [
1796
1798
  /* @__PURE__ */ l("div", { className: te.sideHeader, children: [
1797
- /* @__PURE__ */ e("span", { className: te.sideHeaderIcon, children: /* @__PURE__ */ e(zt, {}) }),
1799
+ /* @__PURE__ */ e("span", { className: te.sideHeaderIcon, children: /* @__PURE__ */ e(Qt, {}) }),
1798
1800
  !u && /* @__PURE__ */ e("span", { className: te.sideHeaderTitle, children: "个人工作台" })
1799
1801
  ] }),
1800
1802
  /* @__PURE__ */ l("div", { className: te.sideContent, children: [
@@ -1814,7 +1816,7 @@ function Gl({
1814
1816
  },
1815
1817
  y.key
1816
1818
  );
1817
- return u ? /* @__PURE__ */ e(Ct, { placement: "right", title: y.label, children: j }, y.key) : j;
1819
+ return u ? /* @__PURE__ */ e(kt, { placement: "right", title: y.label, children: j }, y.key) : j;
1818
1820
  }) })
1819
1821
  ] }),
1820
1822
  /* @__PURE__ */ l("div", { className: te.sideFooter, children: [
@@ -1832,7 +1834,7 @@ function Gl({
1832
1834
  },
1833
1835
  y.mode
1834
1836
  );
1835
- return u ? /* @__PURE__ */ e(Ct, { placement: "right", title: y.label, children: x }, y.mode) : x;
1837
+ return u ? /* @__PURE__ */ e(kt, { placement: "right", title: y.label, children: x }, y.mode) : x;
1836
1838
  }) }),
1837
1839
  !u && /* @__PURE__ */ e("p", { className: te.footHint, children: "⌘ / Ctrl + B 切换导航" })
1838
1840
  ] })
@@ -1840,17 +1842,17 @@ function Gl({
1840
1842
  }
1841
1843
  );
1842
1844
  }
1843
- const zl = "_topbar_ms4b7_1", Ql = "_topbarLeft_ms4b7_14", ql = "_collapseBtn_ms4b7_22", Xl = "_crumbs_ms4b7_49", Jl = "_crumbsRoot_ms4b7_57", Yl = "_crumbsSep_ms4b7_62", Zl = "_crumbsCurrent_ms4b7_68", ei = "_topbarRight_ms4b7_76", Ge = {
1844
- topbar: zl,
1845
- topbarLeft: Ql,
1846
- collapseBtn: ql,
1847
- crumbs: Xl,
1848
- crumbsRoot: Jl,
1849
- crumbsSep: Yl,
1850
- crumbsCurrent: Zl,
1851
- topbarRight: ei
1845
+ const Ql = "_topbar_ms4b7_1", ql = "_topbarLeft_ms4b7_14", Xl = "_collapseBtn_ms4b7_22", Jl = "_crumbs_ms4b7_49", Yl = "_crumbsRoot_ms4b7_57", Zl = "_crumbsSep_ms4b7_62", ei = "_crumbsCurrent_ms4b7_68", ti = "_topbarRight_ms4b7_76", Ge = {
1846
+ topbar: Ql,
1847
+ topbarLeft: ql,
1848
+ collapseBtn: Xl,
1849
+ crumbs: Jl,
1850
+ crumbsRoot: Yl,
1851
+ crumbsSep: Zl,
1852
+ crumbsCurrent: ei,
1853
+ topbarRight: ti
1852
1854
  };
1853
- function ti({
1855
+ function ni({
1854
1856
  label: n,
1855
1857
  collapsed: o,
1856
1858
  onToggleCollapse: u
@@ -1858,7 +1860,7 @@ function ti({
1858
1860
  return /* @__PURE__ */ l("header", { className: Ge.topbar, children: [
1859
1861
  /* @__PURE__ */ l("div", { className: Ge.topbarLeft, children: [
1860
1862
  /* @__PURE__ */ e(
1861
- Ct,
1863
+ kt,
1862
1864
  {
1863
1865
  title: o ? "展开个人菜单" : "收起个人菜单",
1864
1866
  placement: "bottom",
@@ -1870,59 +1872,59 @@ function ti({
1870
1872
  onClick: u,
1871
1873
  "aria-label": "展开或收起个人菜单",
1872
1874
  "aria-expanded": !o,
1873
- children: o ? /* @__PURE__ */ e(zn, {}) : /* @__PURE__ */ e(Qn, {})
1875
+ children: o ? /* @__PURE__ */ e(Qn, {}) : /* @__PURE__ */ e(qn, {})
1874
1876
  }
1875
1877
  )
1876
1878
  }
1877
1879
  ),
1878
1880
  /* @__PURE__ */ l("div", { className: Ge.crumbs, "aria-label": "当前位置", children: [
1879
1881
  /* @__PURE__ */ e("span", { className: Ge.crumbsRoot, children: "个人" }),
1880
- /* @__PURE__ */ e(Ut, { className: Ge.crumbsSep }),
1882
+ /* @__PURE__ */ e(Vt, { className: Ge.crumbsSep }),
1881
1883
  /* @__PURE__ */ e("span", { className: Ge.crumbsCurrent, children: n })
1882
1884
  ] })
1883
1885
  ] }),
1884
1886
  /* @__PURE__ */ e("div", { className: Ge.topbarRight })
1885
1887
  ] });
1886
1888
  }
1887
- const en = [
1888
- { key: "workbench", label: "场景工作台", icon: /* @__PURE__ */ e(zt, {}) },
1889
- { key: "projects", label: "工作单管理", icon: /* @__PURE__ */ e(Jn, {}) },
1890
- { key: "personal", label: "个人统计", icon: /* @__PURE__ */ e(Yn, {}) },
1891
- { key: "business-stats", label: "业务指标", icon: /* @__PURE__ */ e(Zn, {}) },
1892
- { key: "tools", label: "常用工具", icon: /* @__PURE__ */ e(es, {}) },
1893
- { key: "websites", label: "常用网站", icon: /* @__PURE__ */ e(ts, {}) },
1894
- { key: "smart-partner", label: "智能伙伴", icon: /* @__PURE__ */ e(Gt, {}) },
1895
- { key: "todo", label: "工作待办", icon: /* @__PURE__ */ e(ns, {}) },
1896
- { key: "notes", label: "个人笔记", icon: /* @__PURE__ */ e(Qt, {}) },
1889
+ const tn = [
1890
+ { key: "workbench", label: "场景工作台", icon: /* @__PURE__ */ e(Qt, {}) },
1891
+ { key: "projects", label: "工作单管理", icon: /* @__PURE__ */ e(Yn, {}) },
1892
+ { key: "personal", label: "个人统计", icon: /* @__PURE__ */ e(Zn, {}) },
1893
+ { key: "business-stats", label: "业务指标", icon: /* @__PURE__ */ e(es, {}) },
1894
+ { key: "tools", label: "常用工具", icon: /* @__PURE__ */ e(ts, {}) },
1895
+ { key: "websites", label: "常用网站", icon: /* @__PURE__ */ e(ns, {}) },
1896
+ { key: "smart-partner", label: "智能伙伴", icon: /* @__PURE__ */ e(zt, {}) },
1897
+ { key: "todo", label: "工作待办", icon: /* @__PURE__ */ e(ss, {}) },
1898
+ { key: "notes", label: "个人笔记", icon: /* @__PURE__ */ e(qt, {}) },
1897
1899
  {
1898
1900
  key: "training",
1899
1901
  label: "培训中心",
1900
- icon: /* @__PURE__ */ e(ss, {}),
1902
+ icon: /* @__PURE__ */ e(as, {}),
1901
1903
  // 学员侧学习入口与培训管理(TRAINING)解耦:按需单独分配,不随培训入口发放
1902
1904
  permission: "TRAINING_CENTER"
1903
1905
  },
1904
- { key: "webide", label: "WebIDE", icon: /* @__PURE__ */ e(as, {}) }
1905
- ], tn = "ft_pw_sidebar_collapsed";
1906
- function ni() {
1906
+ { key: "webide", label: "WebIDE", icon: /* @__PURE__ */ e(ls, {}) }
1907
+ ], nn = "ft_pw_sidebar_collapsed";
1908
+ function si() {
1907
1909
  try {
1908
- return localStorage.getItem(tn) === "1";
1910
+ return localStorage.getItem(nn) === "1";
1909
1911
  } catch {
1910
1912
  return !1;
1911
1913
  }
1912
1914
  }
1913
- function si(n) {
1915
+ function ai(n) {
1914
1916
  const o = n;
1915
1917
  return o ? o.tagName === "INPUT" || o.tagName === "TEXTAREA" || o.isContentEditable === !0 : !1;
1916
1918
  }
1917
- function ai() {
1919
+ function li() {
1918
1920
  try {
1919
1921
  const n = new URLSearchParams(window.location.search).get("tab");
1920
- return n && en.some((o) => o.key === n) ? n : null;
1922
+ return n && tn.some((o) => o.key === n) ? n : null;
1921
1923
  } catch {
1922
1924
  return null;
1923
1925
  }
1924
1926
  }
1925
- function li({
1927
+ function ii({
1926
1928
  onOpenProject: n,
1927
1929
  openTodoId: o,
1928
1930
  selectedPersonalAgent: u,
@@ -1936,52 +1938,52 @@ function li({
1936
1938
  var f;
1937
1939
  const [D, $] = m(
1938
1940
  // 惰性初始化:命中深链时直接以目标 Tab 首屏渲染,不先渲染场景工作台再切
1939
- () => ai() ?? "workbench"
1941
+ () => li() ?? "workbench"
1940
1942
  );
1941
1943
  H(() => {
1942
1944
  try {
1943
- const w = new URL(window.location.href);
1944
- if (!w.searchParams.has("tab")) return;
1945
- w.searchParams.delete("tab"), window.history.replaceState(window.history.state, "", w.toString());
1945
+ const T = new URL(window.location.href);
1946
+ if (!T.searchParams.has("tab")) return;
1947
+ T.searchParams.delete("tab"), window.history.replaceState(window.history.state, "", T.toString());
1946
1948
  } catch {
1947
1949
  }
1948
1950
  }, []);
1949
- const [P, E] = m(ni);
1951
+ const [P, E] = m(si);
1950
1952
  H(() => {
1951
1953
  try {
1952
- localStorage.setItem(tn, P ? "1" : "0");
1954
+ localStorage.setItem(nn, P ? "1" : "0");
1953
1955
  } catch {
1954
1956
  }
1955
1957
  }, [P]);
1956
1958
  const B = J(() => {
1957
- E((w) => !w), window.setTimeout(() => window.dispatchEvent(new Event("resize")), 300);
1959
+ E((T) => !T), window.setTimeout(() => window.dispatchEvent(new Event("resize")), 300);
1958
1960
  }, []);
1959
1961
  H(() => {
1960
- function w(Y) {
1961
- !(Y.metaKey || Y.ctrlKey) || Y.altKey || Y.key.toLowerCase() === "b" && (si(Y.target) || (Y.preventDefault(), B()));
1962
+ function T(Y) {
1963
+ !(Y.metaKey || Y.ctrlKey) || Y.altKey || Y.key.toLowerCase() === "b" && (ai(Y.target) || (Y.preventDefault(), B()));
1962
1964
  }
1963
- return window.addEventListener("keydown", w), () => window.removeEventListener("keydown", w);
1965
+ return window.addEventListener("keydown", T), () => window.removeEventListener("keydown", T);
1964
1966
  }, [B]);
1965
- const N = Ae((w) => w.currentUser), X = en.filter(
1966
- (w) => !w.permission || Kt(N, w.permission)
1967
+ const N = Ae((T) => T.currentUser), X = tn.filter(
1968
+ (T) => !T.permission || Ut(N, T.permission)
1967
1969
  ), V = $e(() => j ? [
1968
- { mode: "admin", label: "运营工作台", icon: /* @__PURE__ */ e(qn, {}) },
1969
- { mode: "collaboration", label: "协作工作台", icon: /* @__PURE__ */ e(Xn, {}) }
1970
+ { mode: "admin", label: "运营工作台", icon: /* @__PURE__ */ e(Xn, {}) },
1971
+ { mode: "collaboration", label: "协作工作台", icon: /* @__PURE__ */ e(Jn, {}) }
1970
1972
  ].filter(
1971
- (Y) => jt(N, Y.mode)
1972
- ) : [], [N, j]), de = ((f = X.find((w) => w.key === D)) == null ? void 0 : f.label) ?? "个人工作台", [L, T] = m(null), [W, I] = m(null), z = J((w) => {
1973
- $(w);
1974
- }, []), G = J((w) => {
1975
- $("notes"), T({ id: w, ts: Date.now() });
1976
- }, []), K = J((w) => {
1977
- $("todo"), I({ id: w, ts: Date.now() });
1973
+ (Y) => Wt(N, Y.mode)
1974
+ ) : [], [N, j]), de = ((f = X.find((T) => T.key === D)) == null ? void 0 : f.label) ?? "个人工作台", [L, w] = m(null), [W, I] = m(null), z = J((T) => {
1975
+ $(T);
1976
+ }, []), G = J((T) => {
1977
+ $("notes"), w({ id: T, ts: Date.now() });
1978
+ }, []), K = J((T) => {
1979
+ $("todo"), I({ id: T, ts: Date.now() });
1978
1980
  }, []);
1979
1981
  return H(() => {
1980
1982
  o != null && o.id && ($("todo"), I({ id: o.id, ts: o.ts }));
1981
1983
  }, [o == null ? void 0 : o.id, o == null ? void 0 : o.ts]), /* @__PURE__ */ l("div", { className: Ve.shell, children: [
1982
1984
  /* @__PURE__ */ e("a", { className: Ve.skipLink, href: "#pw-content", children: "跳到个人工作台内容" }),
1983
1985
  /* @__PURE__ */ e(
1984
- Gl,
1986
+ zl,
1985
1987
  {
1986
1988
  items: X,
1987
1989
  activeTab: D,
@@ -1993,7 +1995,7 @@ function li({
1993
1995
  ),
1994
1996
  /* @__PURE__ */ l("div", { className: Ve.inset, children: [
1995
1997
  /* @__PURE__ */ e(
1996
- ti,
1998
+ ni,
1997
1999
  {
1998
2000
  label: de,
1999
2001
  collapsed: P,
@@ -2009,7 +2011,7 @@ function li({
2009
2011
  className: Ve.main,
2010
2012
  children: /* @__PURE__ */ l("div", { className: Ve.pane, children: [
2011
2013
  (D === "workbench" || D === "projects" || D === "personal") && /* @__PURE__ */ e(
2012
- Nt,
2014
+ Ct,
2013
2015
  {
2014
2016
  activeTab: D,
2015
2017
  onActiveTabChange: z,
@@ -2017,11 +2019,11 @@ function li({
2017
2019
  hideTabs: !0
2018
2020
  }
2019
2021
  ),
2020
- D === "business-stats" && /* @__PURE__ */ e(Ot, { source: "scenario" }),
2021
- D === "tools" && /* @__PURE__ */ e(mt, { showTools: !0, showWebsites: !1 }),
2022
- D === "websites" && /* @__PURE__ */ e(mt, { showTools: !1, showWebsites: !0 }),
2022
+ D === "business-stats" && /* @__PURE__ */ e($t, { source: "scenario" }),
2023
+ D === "tools" && /* @__PURE__ */ e(pt, { showTools: !0, showWebsites: !1 }),
2024
+ D === "websites" && /* @__PURE__ */ e(pt, { showTools: !1, showWebsites: !0 }),
2023
2025
  D === "todo" && /* @__PURE__ */ e(
2024
- $t,
2026
+ Et,
2025
2027
  {
2026
2028
  onOpenProject: n,
2027
2029
  onOpenNote: G,
@@ -2029,18 +2031,18 @@ function li({
2029
2031
  }
2030
2032
  ),
2031
2033
  D === "notes" && /* @__PURE__ */ e(
2032
- Et,
2034
+ Ht,
2033
2035
  {
2034
2036
  onOpenProject: n,
2035
2037
  onOpenTodo: K,
2036
2038
  openNoteId: L
2037
2039
  }
2038
2040
  ),
2039
- D === "training" && /* @__PURE__ */ e(qt, {}),
2040
- D === "webide" && /* @__PURE__ */ e(Xt, {}),
2041
+ D === "training" && /* @__PURE__ */ e(Xt, {}),
2042
+ D === "webide" && /* @__PURE__ */ e(Jt, {}),
2041
2043
  D === "smart-partner" && /* @__PURE__ */ l("div", { className: Ve.personalMainArea, children: [
2042
2044
  /* @__PURE__ */ e("div", { className: Ve.personalSidebar, children: /* @__PURE__ */ e(
2043
- kl,
2045
+ Tl,
2044
2046
  {
2045
2047
  selectedAgentId: (u == null ? void 0 : u.id) ?? null,
2046
2048
  selectedLocalAgentId: (u == null ? void 0 : u.localAgentId) ?? null,
@@ -2050,19 +2052,19 @@ function li({
2050
2052
  }
2051
2053
  ) }),
2052
2054
  /* @__PURE__ */ e("div", { className: Ve.personalChatArea, children: _ === "detail" && u && !u.isLocal ? /* @__PURE__ */ e(
2053
- Jt,
2055
+ Yt,
2054
2056
  {
2055
2057
  agent: u,
2056
2058
  onBack: () => R(u)
2057
2059
  }
2058
2060
  ) : u != null && u.isLocal ? /* @__PURE__ */ e(
2059
- Zt,
2061
+ en,
2060
2062
  {
2061
2063
  agent: u,
2062
2064
  newSessionTrigger: k
2063
2065
  }
2064
2066
  ) : /* @__PURE__ */ e(
2065
- Yt,
2067
+ Zt,
2066
2068
  {
2067
2069
  agent: u,
2068
2070
  newSessionTrigger: k
@@ -2075,22 +2077,22 @@ function li({
2075
2077
  ] })
2076
2078
  ] });
2077
2079
  }
2078
- const ii = `${window.publicPath ?? "/"}logo.svg`, oi = [
2080
+ const oi = `${window.publicPath ?? "/"}logo.svg`, ci = [
2079
2081
  "帮我排查一个线上问题",
2080
2082
  "总结一下今天的群聊进展",
2081
2083
  "把这周的变更整理成周报"
2082
- ], ci = [
2084
+ ], ri = [
2083
2085
  {
2084
2086
  key: "video",
2085
2087
  label: "视频生成",
2086
- icon: /* @__PURE__ */ e(ls, {}),
2088
+ icon: /* @__PURE__ */ e(is, {}),
2087
2089
  action: "chat",
2088
2090
  prompt: "帮我写一条 15 秒短视频脚本,主题是:"
2089
2091
  },
2090
2092
  {
2091
2093
  key: "docs",
2092
2094
  label: "文档办公",
2093
- icon: /* @__PURE__ */ e(Qt, {}),
2095
+ icon: /* @__PURE__ */ e(qt, {}),
2094
2096
  action: "tools"
2095
2097
  },
2096
2098
  {
@@ -2102,7 +2104,7 @@ const ii = `${window.publicPath ?? "/"}logo.svg`, oi = [
2102
2104
  {
2103
2105
  key: "design",
2104
2106
  label: "设计视觉",
2105
- icon: /* @__PURE__ */ e(Tn, {}),
2107
+ icon: /* @__PURE__ */ e(Sn, {}),
2106
2108
  action: "chat",
2107
2109
  prompt: "帮我出一版视觉设计稿,风格偏:"
2108
2110
  },
@@ -2113,11 +2115,11 @@ const ii = `${window.publicPath ?? "/"}logo.svg`, oi = [
2113
2115
  action: "ask"
2114
2116
  }
2115
2117
  ];
2116
- function ri() {
2118
+ function di() {
2117
2119
  const n = (/* @__PURE__ */ new Date()).getHours();
2118
2120
  return n < 5 ? "夜深了" : n < 12 ? "早上好" : n < 14 ? "中午好" : n < 18 ? "下午好" : "晚上好";
2119
2121
  }
2120
- function di({
2122
+ function ui({
2121
2123
  agents: n,
2122
2124
  activeAgent: o,
2123
2125
  onSwitchAgent: u,
@@ -2128,7 +2130,7 @@ function di({
2128
2130
  onOpenTab: x,
2129
2131
  onQuickAsk: j
2130
2132
  }) {
2131
- const D = Ae((f) => f.token), $ = Ae((f) => f.currentUser), P = wt(), [E, B] = m(""), N = q(null), [X, V] = m(!1), [de, L] = m(!1), [T, W] = m(R ?? null), [I, z] = m(!1), G = J(async () => {
2133
+ const D = Ae((f) => f.token), $ = Ae((f) => f.currentUser), P = wt(), [E, B] = m(""), N = q(null), [X, V] = m(!1), [de, L] = m(!1), [w, W] = m(R ?? null), [I, z] = m(!1), G = J(async () => {
2132
2134
  const f = E.trim();
2133
2135
  if (!(!f || X)) {
2134
2136
  if (_ && k) {
@@ -2138,16 +2140,16 @@ function di({
2138
2140
  if (o) {
2139
2141
  V(!0);
2140
2142
  try {
2141
- await y(f, T), B(""), W(null);
2143
+ await y(f, w), B(""), W(null);
2142
2144
  } finally {
2143
2145
  V(!1);
2144
2146
  }
2145
2147
  }
2146
2148
  }
2147
- }, [E, X, _, k, o, y, T]), K = P.nickname || ($ == null ? void 0 : $.display_name) || ($ == null ? void 0 : $.username) || "";
2149
+ }, [E, X, _, k, o, y, w]), K = P.nickname || ($ == null ? void 0 : $.display_name) || ($ == null ? void 0 : $.username) || "";
2148
2150
  return /* @__PURE__ */ e("div", { className: `${p.landing} ${p.xwScope}`, children: /* @__PURE__ */ l("div", { className: p.landingInner, children: [
2149
- /* @__PURE__ */ e("div", { className: p.mascot, "aria-hidden": "true", children: /* @__PURE__ */ e("img", { src: ii, alt: "" }) }),
2150
- /* @__PURE__ */ e("h1", { className: p.landingTitle, children: P.greetingEnabled ? `${ri()}${K ? `,${K}` : ""}` : "开始新的对话" }),
2151
+ /* @__PURE__ */ e("div", { className: p.mascot, "aria-hidden": "true", children: /* @__PURE__ */ e("img", { src: oi, alt: "" }) }),
2152
+ /* @__PURE__ */ e("h1", { className: p.landingTitle, children: P.greetingEnabled ? `${di()}${K ? `,${K}` : ""}` : "开始新的对话" }),
2151
2153
  /* @__PURE__ */ e("p", { className: p.landingSub, children: P.bio || "我是你的智能伙伴,有什么可以帮你?" }),
2152
2154
  /* @__PURE__ */ l("div", { className: p.landingBox, children: [
2153
2155
  /* @__PURE__ */ e(
@@ -2155,13 +2157,13 @@ function di({
2155
2157
  {
2156
2158
  ref: N,
2157
2159
  className: p.landingInput,
2158
- placeholder: `给智能伙伴发送消息,${En(P.sendKey)}`,
2160
+ placeholder: `给智能伙伴发送消息,${Hn(P.sendKey)}`,
2159
2161
  rows: 3,
2160
2162
  value: E,
2161
2163
  autoFocus: !0,
2162
2164
  onChange: (f) => B(f.target.value),
2163
2165
  onKeyDown: (f) => {
2164
- Wt(f, P.sendKey) && !f.nativeEvent.isComposing && (f.preventDefault(), G());
2166
+ Kt(f, P.sendKey) && !f.nativeEvent.isComposing && (f.preventDefault(), G());
2165
2167
  }
2166
2168
  }
2167
2169
  ),
@@ -2182,7 +2184,7 @@ function di({
2182
2184
  children: [
2183
2185
  /* @__PURE__ */ e(ut, {}),
2184
2186
  /* @__PURE__ */ e("span", { children: o.displayName }),
2185
- n.length > 1 && /* @__PURE__ */ e(bt, { className: p.chipCaret })
2187
+ n.length > 1 && /* @__PURE__ */ e(vt, { className: p.chipCaret })
2186
2188
  ]
2187
2189
  }
2188
2190
  ),
@@ -2208,8 +2210,8 @@ function di({
2208
2210
  "span",
2209
2211
  {
2210
2212
  className: p.agentDot,
2211
- style: { background: bn(f.displayName) },
2212
- children: yn(f.displayName)
2213
+ style: { background: vn(f.displayName) },
2214
+ children: bn(f.displayName)
2213
2215
  }
2214
2216
  ),
2215
2217
  f.displayName
@@ -2228,9 +2230,9 @@ function di({
2228
2230
  title: "本次新建任务归入的项目空间(可选)",
2229
2231
  onClick: () => z((f) => !f),
2230
2232
  children: [
2231
- /* @__PURE__ */ e(vt, {}),
2232
- /* @__PURE__ */ e("span", { children: T ? T.title : "不归组" }),
2233
- /* @__PURE__ */ e(bt, { className: p.chipCaret })
2233
+ /* @__PURE__ */ e(Nt, {}),
2234
+ /* @__PURE__ */ e("span", { children: w ? w.title : "不归组" }),
2235
+ /* @__PURE__ */ e(vt, { className: p.chipCaret })
2234
2236
  ]
2235
2237
  }
2236
2238
  ),
@@ -2243,10 +2245,10 @@ function di({
2243
2245
  }
2244
2246
  ),
2245
2247
  /* @__PURE__ */ e(
2246
- vn,
2248
+ Nn,
2247
2249
  {
2248
2250
  token: D,
2249
- currentId: (T == null ? void 0 : T.id) ?? null,
2251
+ currentId: (w == null ? void 0 : w.id) ?? null,
2250
2252
  onPick: (f) => {
2251
2253
  W(f), z(!1);
2252
2254
  }
@@ -2262,15 +2264,15 @@ function di({
2262
2264
  disabled: !E.trim() || X || !o && !_,
2263
2265
  onClick: () => void G(),
2264
2266
  "aria-label": "发送",
2265
- children: X ? /* @__PURE__ */ e(Nn, {}) : /* @__PURE__ */ e(Cn, {})
2267
+ children: X ? /* @__PURE__ */ e(Cn, {}) : /* @__PURE__ */ e(kn, {})
2266
2268
  }
2267
2269
  )
2268
2270
  ] })
2269
2271
  ] }),
2270
2272
  /* @__PURE__ */ l("div", { className: p.contextRow, children: [
2271
2273
  /* @__PURE__ */ l("span", { className: p.contextChip, children: [
2272
- /* @__PURE__ */ e(vt, {}),
2273
- /* @__PURE__ */ e("span", { children: T ? T.title : "未归组" })
2274
+ /* @__PURE__ */ e(Nt, {}),
2275
+ /* @__PURE__ */ e("span", { children: w ? w.title : "未归组" })
2274
2276
  ] }),
2275
2277
  /* @__PURE__ */ e("span", { className: p.contextChip, children: _ ? /* @__PURE__ */ l(Ee, { children: [
2276
2278
  /* @__PURE__ */ e(ut, {}),
@@ -2279,17 +2281,17 @@ function di({
2279
2281
  "(本机)"
2280
2282
  ] })
2281
2283
  ] }) : /* @__PURE__ */ l(Ee, { children: [
2282
- /* @__PURE__ */ e(kn, {}),
2284
+ /* @__PURE__ */ e(Tn, {}),
2283
2285
  /* @__PURE__ */ e("span", { children: "云端" })
2284
2286
  ] }) })
2285
2287
  ] }),
2286
- /* @__PURE__ */ e("div", { className: p.chipRow, children: ci.map((f) => /* @__PURE__ */ l(
2288
+ /* @__PURE__ */ e("div", { className: p.chipRow, children: ri.map((f) => /* @__PURE__ */ l(
2287
2289
  "button",
2288
2290
  {
2289
2291
  type: "button",
2290
2292
  className: p.capChip,
2291
2293
  onClick: () => {
2292
- var w;
2294
+ var T;
2293
2295
  if (f.action === "tools") {
2294
2296
  x("tools");
2295
2297
  return;
@@ -2302,7 +2304,7 @@ function di({
2302
2304
  j();
2303
2305
  return;
2304
2306
  }
2305
- B(f.prompt ?? ""), (w = N.current) == null || w.focus();
2307
+ B(f.prompt ?? ""), (T = N.current) == null || T.focus();
2306
2308
  },
2307
2309
  children: [
2308
2310
  /* @__PURE__ */ e("span", { className: p.capChipIcon, children: f.icon }),
@@ -2311,14 +2313,14 @@ function di({
2311
2313
  },
2312
2314
  f.key
2313
2315
  )) }),
2314
- /* @__PURE__ */ e("div", { className: p.chipRow, children: oi.map((f) => /* @__PURE__ */ e(
2316
+ /* @__PURE__ */ e("div", { className: p.chipRow, children: ci.map((f) => /* @__PURE__ */ e(
2315
2317
  "button",
2316
2318
  {
2317
2319
  type: "button",
2318
2320
  className: p.suggestChip,
2319
2321
  onClick: () => {
2320
- var w;
2321
- B(f), (w = N.current) == null || w.focus();
2322
+ var T;
2323
+ B(f), (T = N.current) == null || T.focus();
2322
2324
  },
2323
2325
  children: f
2324
2326
  },
@@ -2326,8 +2328,8 @@ function di({
2326
2328
  )) })
2327
2329
  ] }) });
2328
2330
  }
2329
- const re = Rn() || typeof localStorage < "u" && localStorage.getItem("ft_exclusive_force_desktop") === "1";
2330
- function ui(n) {
2331
+ const re = On() || typeof localStorage < "u" && localStorage.getItem("ft_exclusive_force_desktop") === "1";
2332
+ function mi(n) {
2331
2333
  return n.type === "jar" ? {
2332
2334
  id: "-1",
2333
2335
  userId: "local",
@@ -2348,21 +2350,21 @@ function ui(n) {
2348
2350
  localAgentType: n.type
2349
2351
  };
2350
2352
  }
2351
- function Si({
2353
+ function Ii({
2352
2354
  onSwitchMode: n,
2353
2355
  onOpenProject: o,
2354
2356
  openAgentRequest: u
2355
2357
  }) {
2356
2358
  const _ = Ae((s) => s.token), k = Ae((s) => s.currentUser), R = wt(), [y, x] = m([]), [j, D] = m(!0), [$, P] = m(null), [E, B] = m("landing"), [N, X] = m(null), [V, de] = m(
2357
2359
  re ? "local" : "cloud"
2358
- ), [L, T] = m(
2360
+ ), [L, w] = m(
2359
2361
  []
2360
- ), [W, I] = m([]), [z, G] = m(!0), [K, f] = m(!1), w = Ae((s) => s.projects), [Y, Be] = m([]), [ve, Z] = m(null), [ke, ge] = m(
2362
+ ), [W, I] = m([]), [z, G] = m(!0), [K, f] = m(!1), T = Ae((s) => s.projects), [Y, Be] = m([]), [ve, Z] = m(null), [ke, ge] = m(
2361
2363
  /* @__PURE__ */ new Set()
2362
- ), [we, He] = m(0), [Pe, Te] = m(null), [_e, Le] = m(!1), [oe, De] = m([]), [Ne, Me] = m(null), [ue, xe] = m(null), fe = J(
2364
+ ), [Te, He] = m(0), [Pe, we] = m(null), [_e, Le] = m(!1), [oe, De] = m([]), [Ne, Me] = m(null), [ue, xe] = m(null), fe = J(
2363
2365
  (s) => {
2364
- const g = Sn(s);
2365
- g && !Kt(k, g) || (Se(s), B("personalTab"));
2366
+ const g = In(s);
2367
+ g && !Ut(k, g) || (Se(s), B("personalTab"));
2366
2368
  },
2367
2369
  [k]
2368
2370
  ), [ze, Fe] = m(!1), [qe, je] = m(
@@ -2378,7 +2380,7 @@ function Si({
2378
2380
  [o]
2379
2381
  ), me = J((s) => {
2380
2382
  Se("todo"), Ce({ id: s, ts: Date.now() });
2381
- }, []), [se, Se] = m("personal"), We = q(!1), ce = $e(() => In(y), [y]), ae = $e(
2383
+ }, []), [se, Se] = m("personal"), We = q(!1), ce = $e(() => An(y), [y]), ae = $e(
2382
2384
  () => y.find((s) => s.id === $) ?? ce,
2383
2385
  [y, $, ce]
2384
2386
  );
@@ -2389,7 +2391,7 @@ function Si({
2389
2391
  );
2390
2392
  H(() => {
2391
2393
  let s = !0;
2392
- return D(!0), Ht(_).then((g) => {
2394
+ return D(!0), Pt(_).then((g) => {
2393
2395
  s && x(g);
2394
2396
  }).catch(() => {
2395
2397
  }).finally(() => {
@@ -2401,14 +2403,14 @@ function Si({
2401
2403
  if (!re) return;
2402
2404
  let s = !0;
2403
2405
  const g = async () => {
2404
- const M = await yt();
2406
+ const M = await bt();
2405
2407
  if (s) {
2406
2408
  if (Le(M), !M) {
2407
2409
  De([]);
2408
2410
  return;
2409
2411
  }
2410
2412
  try {
2411
- const pe = await Ft();
2413
+ const pe = await jt();
2412
2414
  s && De(pe);
2413
2415
  } catch {
2414
2416
  }
@@ -2432,10 +2434,10 @@ function Si({
2432
2434
  }, [y]), Ze = J(async () => {
2433
2435
  G(!0);
2434
2436
  const [s, g] = await Promise.allSettled([
2435
- rn(_),
2436
- Hn(_)
2437
+ dn(_),
2438
+ Pn(_)
2437
2439
  ]);
2438
- if (s.status === "fulfilled" && T(s.value || []), g.status === "fulfilled") {
2440
+ if (s.status === "fulfilled" && w(s.value || []), g.status === "fulfilled") {
2439
2441
  const A = /* @__PURE__ */ new Set(), M = [];
2440
2442
  for (const pe of [...g.value.owned, ...g.value.joined])
2441
2443
  A.has(pe.id) || (A.add(pe.id), M.push(pe));
@@ -2494,7 +2496,7 @@ function Si({
2494
2496
  H(() => {
2495
2497
  if (!re || V !== "local" || !_e) return;
2496
2498
  let s = !0;
2497
- return Pt(at).then((g) => {
2499
+ return Ft(at).then((g) => {
2498
2500
  s && Be([...g].sort((A, M) => M.updatedAt - A.updatedAt));
2499
2501
  }).catch(() => {
2500
2502
  s && Be([]);
@@ -2506,9 +2508,9 @@ function Si({
2506
2508
  _e,
2507
2509
  at,
2508
2510
  ve,
2509
- we
2511
+ Te
2510
2512
  ]);
2511
- const pt = J(() => Z(null), []), lt = (s) => {
2513
+ const ht = J(() => Z(null), []), lt = (s) => {
2512
2514
  X(null), Z(s), B("chat");
2513
2515
  }, ye = (s, g = null, A = null) => {
2514
2516
  P(s.id), X(
@@ -2539,12 +2541,12 @@ function Si({
2539
2541
  return;
2540
2542
  }
2541
2543
  Xe();
2542
- }, ht = () => {
2544
+ }, gt = () => {
2543
2545
  N ? B("chat") : ce && ye(ce);
2544
2546
  }, Qe = async (s, g) => {
2545
2547
  if (ae)
2546
2548
  try {
2547
- const A = s.length > 20 ? `${s.slice(0, 20)}…` : s, M = await dn(
2549
+ const A = s.length > 20 ? `${s.slice(0, 20)}…` : s, M = await un(
2548
2550
  ae.id,
2549
2551
  A,
2550
2552
  _,
@@ -2559,30 +2561,30 @@ function Si({
2559
2561
  } catch {
2560
2562
  }
2561
2563
  }, Ke = (s) => {
2562
- Te(s), B("chat");
2563
- }, tt = R.nickname || (k == null ? void 0 : k.display_name) || (k == null ? void 0 : k.username) || "", gt = $e(() => n ? [
2564
+ we(s), B("chat");
2565
+ }, tt = R.nickname || (k == null ? void 0 : k.display_name) || (k == null ? void 0 : k.username) || "", _t = $e(() => n ? [
2564
2566
  {
2565
2567
  mode: "personal",
2566
2568
  label: "个人工作台",
2567
- icon: /* @__PURE__ */ e(Mn, {})
2569
+ icon: /* @__PURE__ */ e(xn, {})
2568
2570
  },
2569
2571
  {
2570
2572
  mode: "collaboration",
2571
2573
  label: "协作工作台",
2572
- icon: /* @__PURE__ */ e(xn, {})
2574
+ icon: /* @__PURE__ */ e(Rn, {})
2573
2575
  }
2574
2576
  ].filter(
2575
- (g) => jt(k, g.mode)
2577
+ (g) => Wt(k, g.mode)
2576
2578
  ) : [], [k, n]), ct = N ? `${N.agent.id}-${N.sessionId ?? 0}-${N.ts}` : "none";
2577
2579
  let be;
2578
2580
  return E === "agentDetail" && qe ? be = /* @__PURE__ */ e("div", { className: p.detailHost, children: /* @__PURE__ */ e(
2579
- Jt,
2581
+ Yt,
2580
2582
  {
2581
2583
  agent: qe,
2582
2584
  onBack: () => B("extensions")
2583
2585
  }
2584
- ) }) : E === "schedule" ? be = /* @__PURE__ */ e(rs, { localOnline: _e }) : E === "extensions" ? be = /* @__PURE__ */ e(
2585
- ds,
2586
+ ) }) : E === "schedule" ? be = /* @__PURE__ */ e(ds, { localOnline: _e }) : E === "extensions" ? be = /* @__PURE__ */ e(
2587
+ us,
2586
2588
  {
2587
2589
  agents: y,
2588
2590
  loading: j,
@@ -2598,19 +2600,19 @@ function Si({
2598
2600
  onOpenWorkbenchShell: () => B("workbenchShell")
2599
2601
  }
2600
2602
  ) : E === "history" ? be = /* @__PURE__ */ e(
2601
- us,
2603
+ ms,
2602
2604
  {
2603
2605
  agents: y,
2604
2606
  token: _,
2605
2607
  onOpenSession: (s, g) => ye(s, g)
2606
2608
  }
2607
2609
  ) : E === "workbenchShell" ? be = /* @__PURE__ */ e(
2608
- li,
2610
+ ii,
2609
2611
  {
2610
2612
  onOpenProject: ne,
2611
2613
  selectedPersonalAgent: ae,
2612
2614
  personalView: "chat",
2613
- newSessionTrigger: we,
2615
+ newSessionTrigger: Te,
2614
2616
  onSelectPersonalAgent: (s) => P((s == null ? void 0 : s.id) ?? null),
2615
2617
  onShowPersonalAgentDetail: (s) => {
2616
2618
  je(s), B("agentDetail");
@@ -2620,7 +2622,7 @@ function Si({
2620
2622
  }
2621
2623
  ) : E === "personalTab" ? be = /* @__PURE__ */ l("div", { className: p.personalTabHost, children: [
2622
2624
  se === "projects" && /* @__PURE__ */ e(
2623
- Nt,
2625
+ Ct,
2624
2626
  {
2625
2627
  activeTab: "projects",
2626
2628
  onActiveTabChange: () => {
@@ -2630,7 +2632,7 @@ function Si({
2630
2632
  }
2631
2633
  ),
2632
2634
  se === "personal" && /* @__PURE__ */ e(
2633
- Nt,
2635
+ Ct,
2634
2636
  {
2635
2637
  activeTab: "personal",
2636
2638
  onActiveTabChange: () => {
@@ -2639,11 +2641,11 @@ function Si({
2639
2641
  hideTabs: !0
2640
2642
  }
2641
2643
  ),
2642
- se === "business-stats" && /* @__PURE__ */ e(Ot, { source: "scenario" }),
2643
- se === "tools" && /* @__PURE__ */ e(mt, { showTools: !0, showWebsites: !1 }),
2644
- se === "websites" && /* @__PURE__ */ e(mt, { showTools: !1, showWebsites: !0 }),
2644
+ se === "business-stats" && /* @__PURE__ */ e($t, { source: "scenario" }),
2645
+ se === "tools" && /* @__PURE__ */ e(pt, { showTools: !0, showWebsites: !1 }),
2646
+ se === "websites" && /* @__PURE__ */ e(pt, { showTools: !1, showWebsites: !0 }),
2645
2647
  se === "todo" && /* @__PURE__ */ e(
2646
- $t,
2648
+ Et,
2647
2649
  {
2648
2650
  onOpenProject: ne,
2649
2651
  onOpenNote: (s) => {
@@ -2653,17 +2655,17 @@ function Si({
2653
2655
  }
2654
2656
  ),
2655
2657
  se === "notes" && /* @__PURE__ */ e(
2656
- Et,
2658
+ Ht,
2657
2659
  {
2658
2660
  onOpenProject: ne,
2659
2661
  onOpenTodo: me,
2660
2662
  openNoteId: a
2661
2663
  }
2662
2664
  ),
2663
- se === "training" && /* @__PURE__ */ e(qt, {}),
2664
- se === "webide" && /* @__PURE__ */ e(Xt, {})
2665
+ se === "training" && /* @__PURE__ */ e(Xt, {}),
2666
+ se === "webide" && /* @__PURE__ */ e(Jt, {})
2665
2667
  ] }) : N ? be = /* @__PURE__ */ e("div", { className: p.chatHost, children: /* @__PURE__ */ e(
2666
- Yt,
2668
+ Zt,
2667
2669
  {
2668
2670
  agent: N.agent,
2669
2671
  initialSessionId: N.sessionId,
@@ -2674,18 +2676,18 @@ function Si({
2674
2676
  },
2675
2677
  ct
2676
2678
  ) }) : re && le && E !== "landing" ? be = /* @__PURE__ */ e("div", { className: p.chatHost, children: /* @__PURE__ */ e(
2677
- Zt,
2679
+ en,
2678
2680
  {
2679
- agent: ui(le),
2680
- newSessionTrigger: we,
2681
+ agent: mi(le),
2682
+ newSessionTrigger: Te,
2681
2683
  autoSendDraft: Pe,
2682
- onAutoSendConsumed: () => Te(null),
2684
+ onAutoSendConsumed: () => we(null),
2683
2685
  openSessionId: ve,
2684
- onOpenSessionConsumed: pt
2686
+ onOpenSessionConsumed: ht
2685
2687
  },
2686
2688
  le.id
2687
2689
  ) }) : be = /* @__PURE__ */ e(
2688
- di,
2690
+ ui,
2689
2691
  {
2690
2692
  agents: y,
2691
2693
  activeAgent: ae,
@@ -2701,7 +2703,7 @@ function Si({
2701
2703
  /* @__PURE__ */ l("aside", { className: p.sidebar, "aria-label": "个人专享工作台导航", children: [
2702
2704
  /* @__PURE__ */ l("div", { className: p.sideContent, children: [
2703
2705
  /* @__PURE__ */ e(
2704
- An,
2706
+ Bn,
2705
2707
  {
2706
2708
  currentUser: k,
2707
2709
  token: _,
@@ -2729,7 +2731,7 @@ function Si({
2729
2731
  searchActive: K,
2730
2732
  onOpenPersonalTab: fe,
2731
2733
  onOpenWorkbenchShell: () => B("workbenchShell"),
2732
- onCloudNav: re ? ht : void 0,
2734
+ onCloudNav: re ? gt : void 0,
2733
2735
  cloudNavActive: E === "chat" && !!N
2734
2736
  }
2735
2737
  ),
@@ -2798,12 +2800,12 @@ function Si({
2798
2800
  }),
2799
2801
  children: [
2800
2802
  /* @__PURE__ */ e(
2801
- bt,
2803
+ vt,
2802
2804
  {
2803
2805
  className: `${p.projCaret} ${g ? p.projCaretOpen : ""}`
2804
2806
  }
2805
2807
  ),
2806
- /* @__PURE__ */ e(vt, { className: p.projIcon }),
2808
+ /* @__PURE__ */ e(Nt, { className: p.projIcon }),
2807
2809
  /* @__PURE__ */ e("span", { className: p.projName, title: s.title, children: s.title }),
2808
2810
  /* @__PURE__ */ e("span", { className: p.projMeta, children: s.sessions.length > 0 ? s.sessions.length : "暂无任务" })
2809
2811
  ]
@@ -2830,12 +2832,12 @@ function Si({
2830
2832
  ] })
2831
2833
  ] }),
2832
2834
  /* @__PURE__ */ e(
2833
- Bn,
2835
+ Ln,
2834
2836
  {
2835
2837
  displayName: tt,
2836
2838
  subtitle: "Z-Team · 个人(专享)",
2837
2839
  onOpenSettings: () => Fe(!0),
2838
- children: gt.map((s) => /* @__PURE__ */ l(
2840
+ children: _t.map((s) => /* @__PURE__ */ l(
2839
2841
  "button",
2840
2842
  {
2841
2843
  type: "button",
@@ -2854,7 +2856,7 @@ function Si({
2854
2856
  ] }),
2855
2857
  /* @__PURE__ */ e("main", { className: p.main, "aria-label": "个人专享工作台内容", children: j && !N && !le ? /* @__PURE__ */ e("div", { className: p.emptyState, children: /* @__PURE__ */ e("span", { className: p.emptyTitle, children: "正在加载智能伙伴…" }) }) : be }),
2856
2858
  /* @__PURE__ */ e(
2857
- Ln,
2859
+ Dn,
2858
2860
  {
2859
2861
  open: ze,
2860
2862
  onClose: () => Fe(!1),
@@ -2862,11 +2864,11 @@ function Si({
2862
2864
  }
2863
2865
  ),
2864
2866
  K && /* @__PURE__ */ e(
2865
- Dn,
2867
+ Mn,
2866
2868
  {
2867
2869
  sessions: L,
2868
2870
  agentsById: Ye,
2869
- projects: w,
2871
+ projects: T,
2870
2872
  token: _,
2871
2873
  onOpenSession: (s, g) => ye(s, g),
2872
2874
  onOpenProject: (s) => ne(s.id),
@@ -2876,5 +2878,5 @@ function Si({
2876
2878
  ] });
2877
2879
  }
2878
2880
  export {
2879
- Si as default
2881
+ Ii as default
2880
2882
  };