@yuku123/z-team-component 0.2.126 → 0.2.128

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (47) hide show
  1. package/dist/{ChangeLogView-hwkY-Pxj.js → ChangeLogView-BWcf9eFT.js} +1 -1
  2. package/dist/{ComponentDoc-CKmtNnh_.js → ComponentDoc-MAAFSdex.js} +3 -3
  3. package/dist/{InvitationManagementPage-ClQ_7XHg.js → InvitationManagementPage-DB3CeBs-.js} +1 -1
  4. package/dist/{OnboardingPage-5lzdybfe.js → OnboardingPage-KwEQlQ9m.js} +2 -2
  5. package/dist/{ScheduledTasks-oj2tZe__.js → ScheduledTasks-BQnjn17C.js} +4193 -4249
  6. package/dist/{SystemShell-Bo3Ng6_d.js → SystemShell-xfKRXTHa.js} +4 -4
  7. package/dist/{admin-logs-BokQn7fB.js → admin-logs-BBniVCWG.js} +1 -1
  8. package/dist/{api-BZs1eLa_.js → api-CErncfky.js} +1 -1
  9. package/dist/{api-5yDkyF00.js → api-CIzOXga5.js} +1 -1
  10. package/dist/{createWorkspaceWsHandler-Cd7unuWy.js → createWorkspaceWsHandler-DZc2EeOE.js} +4570 -4748
  11. package/dist/{index-DWCdywD4.js → index-9cmnvhwH.js} +6 -6
  12. package/dist/index-BK0TLurx.js +1718 -0
  13. package/dist/{index-BX8H830P.js → index-BNfRZbfa.js} +2 -2
  14. package/dist/{index-CnDetS6K.js → index-BPDcCJys.js} +161 -173
  15. package/dist/{index-rp3qgBky.js → index-BTnwvvjN.js} +3 -3
  16. package/dist/{index-BfTdO2nT.js → index-BWlQEPJO.js} +3031 -3058
  17. package/dist/{index-D_7JpAQa.js → index-BZdTJbw5.js} +1 -1
  18. package/dist/{index-ur6gpyT1.js → index-BbmFLkXG.js} +3 -3
  19. package/dist/{index-DMHKU_G5.js → index-Bchg8LCD.js} +1 -1
  20. package/dist/{index-CbVvlL_b.js → index-BkbSCWQ7.js} +40 -38
  21. package/dist/{index-Cg6G_t44.js → index-BmgJG2c3.js} +2 -2
  22. package/dist/{index-C75zXxPM.js → index-BsxfUGiv.js} +3 -3
  23. package/dist/{index-BoXsk4dS.js → index-C6uTjD16.js} +2 -2
  24. package/dist/{index-y1YkonCi.js → index-CcsEH7Y7.js} +3 -3
  25. package/dist/{index-BlPEzCfX.js → index-CjKs2OyG.js} +2 -2
  26. package/dist/{index-DxjUlEU_.js → index-Cqzxd3l5.js} +2 -2
  27. package/dist/{index-DXa_PuZH.js → index-Cxz8YOXI.js} +3 -3
  28. package/dist/{index-BwIpkciY.js → index-D7PjZbJz.js} +291 -295
  29. package/dist/{index-CHzNasWa.js → index-DMScwqnC.js} +1 -1
  30. package/dist/{index-D3lnAFF-.js → index-DTRR9SFq.js} +4 -4
  31. package/dist/{index-BTNBi5rr.js → index-DVdVtFor.js} +2 -2
  32. package/dist/{index-BMk_Sumc.js → index-DmO4sKus.js} +2 -2
  33. package/dist/{index-B9Y6yPZO.js → index-DqAba7Rt.js} +1 -1
  34. package/dist/{index-B_rGKW7y.js → index-HU-dTCwe.js} +3 -3
  35. package/dist/{index-U_bR1irL.js → index-nu3p6CB7.js} +34 -41
  36. package/dist/{index-BFg1y572.js → index-vn1AwgKA.js} +2 -2
  37. package/dist/index.js +1 -1
  38. package/dist/{instance-CTEy2yAP.js → instance-C7K_c-Ic.js} +31 -61
  39. package/dist/{menuPermission-Cm2AFp2N.js → menuPermission-ClR4xmR1.js} +3 -3
  40. package/dist/pages.js +1 -1
  41. package/dist/{send-default-agent-team-message-D4Ji6TrR.js → send-default-agent-team-message-BkUCZ7h9.js} +1 -1
  42. package/dist/{sso-user-BAkLqzuY.js → sso-user-B9VemiQi.js} +1 -1
  43. package/dist/{training-CxX8t9Ha.js → training-s01hnxH7.js} +1 -1
  44. package/dist/{webide-4JYjdOGz.js → webide-CJ8I_wyf.js} +3 -3
  45. package/dist/z-team-component.css +1 -1
  46. package/package.json +1 -1
  47. package/dist/index-BzHxN3Tj.js +0 -1645
@@ -1,8 +1,8 @@
1
1
  import { jsxs as c, jsx as a } from "react/jsx-runtime";
2
2
  import v, { useState as d, useEffect as _, useMemo as h } from "react";
3
3
  import { useLocation as N } from "react-router-dom";
4
- import { w as b, x as g } from "./ComponentDoc-CKmtNnh_.js";
5
- import { i as x, P as K } from "./index-CHzNasWa.js";
4
+ import { w as b, x as g } from "./ComponentDoc-MAAFSdex.js";
5
+ import { i as x, P as K } from "./index-DMScwqnC.js";
6
6
  const E = "_banner_2v7mc_1", S = "_dot_2v7mc_18", f = "_text_2v7mc_26", A = "_retry_2v7mc_31", F = "_dismiss_2v7mc_44", P = "_details_2v7mc_57", k = "_method_2v7mc_85", C = "_status_2v7mc_86", D = "_statusNet_2v7mc_87", $ = "_url_2v7mc_88", e = {
7
7
  banner: E,
8
8
  dot: S,
@@ -1,40 +1,40 @@
1
- import { jsxs as d, jsx as t } from "react/jsx-runtime";
1
+ import { jsxs as p, jsx as t } from "react/jsx-runtime";
2
2
  import { r as D, f as le } from "./ctc-sso-DtJHC-2M.js";
3
- import { r as de, h as $, s as K } from "./sso-user-BAkLqzuY.js";
4
- import { ArrowLeftOutlined as ue, PlusOutlined as pe, LogoutOutlined as me, SearchOutlined as he } from "@ant-design/icons";
5
- import { Spin as O, Button as q, Input as fe, Empty as J, Tag as ge, message as be } from "antd";
6
- import Q from "query-string";
7
- import { useState as y, useRef as E, useEffect as w, useMemo as Y, useCallback as B } from "react";
8
- import { useLocation as ke } from "react-router-dom";
3
+ import { r as de, h as Z, s as $ } from "./sso-user-B9VemiQi.js";
4
+ import { ArrowLeftOutlined as ue, LogoutOutlined as pe, SearchOutlined as me } from "@ant-design/icons";
5
+ import { Spin as O, Button as K, Input as he, Empty as J, Tag as fe, message as ge } from "antd";
6
+ import B from "query-string";
7
+ import { useState as y, useRef as E, useEffect as w, useMemo as Y, useCallback as q } from "react";
8
+ import { useLocation as be } from "react-router-dom";
9
9
  import { h as A } from "./history-BlrA1eaW.js";
10
- import { c as we, C as Se } from "./createWorkspaceWsHandler-Cd7unuWy.js";
11
- import { u as i, N as ye, Q as ve, U as Ne, V as Te, W as je, X as Ce, k as ee } from "./ComponentDoc-CKmtNnh_.js";
12
- import { l as Pe, j as xe } from "./instance-CTEy2yAP.js";
13
- import { i as _e, s as Ee } from "./mobile-client-O3yr9h6t.js";
10
+ import { c as ke, C as we } from "./createWorkspaceWsHandler-DZc2EeOE.js";
11
+ import { u as c, N as Se, Q as ye, U as ve, V as Ne, W as Te, X as je, k as ee } from "./ComponentDoc-MAAFSdex.js";
12
+ import { l as Ce, j as Pe } from "./instance-C7K_c-Ic.js";
13
+ import { i as xe, s as _e } from "./mobile-client-O3yr9h6t.js";
14
14
  /* empty css */
15
- import { s as Ae } from "./admin-logs-BokQn7fB.js";
16
- const ae = 2e4;
17
- function Ie(o, s = ae, n = globalThis) {
18
- let c = null;
15
+ import { s as Ee } from "./admin-logs-BBniVCWG.js";
16
+ const re = 2e4;
17
+ function Ae(o, i = re, n = globalThis) {
18
+ let s = null;
19
19
  return {
20
20
  start() {
21
- c == null && (c = n.setTimeout(() => {
22
- c = null, o();
23
- }, s));
21
+ s == null && (s = n.setTimeout(() => {
22
+ s = null, o();
23
+ }, i));
24
24
  },
25
25
  stop() {
26
- c != null && (n.clearTimeout(c), c = null);
26
+ s != null && (n.clearTimeout(s), s = null);
27
27
  }
28
28
  };
29
29
  }
30
- function Le({ text: o, onRetry: s }) {
31
- return /* @__PURE__ */ d("div", { style: { marginTop: 12, textAlign: "center" }, children: [
30
+ function Ie({ text: o, onRetry: i }) {
31
+ return /* @__PURE__ */ p("div", { style: { marginTop: 12, textAlign: "center" }, children: [
32
32
  /* @__PURE__ */ t("div", { style: { marginBottom: 10 }, children: o }),
33
33
  /* @__PURE__ */ t(
34
34
  "button",
35
35
  {
36
36
  type: "button",
37
- onClick: s,
37
+ onClick: i,
38
38
  style: {
39
39
  padding: "6px 16px",
40
40
  borderRadius: 6,
@@ -48,39 +48,39 @@ function Le({ text: o, onRetry: s }) {
48
48
  )
49
49
  ] });
50
50
  }
51
- const Me = "统一登录接入超时(可能是网络抖动或服务正在重启),请重新登录。";
52
- function Oe({
51
+ const Le = "统一登录接入超时(可能是网络抖动或服务正在重启),请重新登录。";
52
+ function Me({
53
53
  loadingText: o,
54
- timeoutText: s = Me,
54
+ timeoutText: i = Le,
55
55
  onRetry: n,
56
- timeoutMs: c = ae,
57
- className: r
56
+ timeoutMs: s = re,
57
+ className: a
58
58
  }) {
59
59
  const [T, h] = y(!1), g = E(n);
60
60
  return g.current = n, w(() => {
61
- const m = Ie(
61
+ const m = Ae(
62
62
  () => h(!0),
63
- c
63
+ s
64
64
  );
65
65
  return m.start(), () => m.stop();
66
- }, [c]), T ? /* @__PURE__ */ d("div", { className: r, children: [
66
+ }, [s]), T ? /* @__PURE__ */ p("div", { className: a, children: [
67
67
  /* @__PURE__ */ t(O, { description: "" }),
68
68
  /* @__PURE__ */ t(
69
- Le,
69
+ Ie,
70
70
  {
71
- text: s,
71
+ text: i,
72
72
  onRetry: () => g.current()
73
73
  }
74
74
  )
75
- ] }) : /* @__PURE__ */ t("div", { className: r, children: /* @__PURE__ */ t(O, { description: o }) });
75
+ ] }) : /* @__PURE__ */ t("div", { className: a, children: /* @__PURE__ */ t(O, { description: o }) });
76
76
  }
77
- function Re(o, s) {
77
+ function Oe(o, i) {
78
78
  w(() => {
79
79
  if (o == null)
80
80
  return;
81
- i.getState().setObserverStatus(null);
81
+ c.getState().setObserverStatus(null);
82
82
  const n = () => {
83
- const m = i.getState();
83
+ const m = c.getState();
84
84
  m.loadMessages().catch(() => {
85
85
  }), m.loadRunningExecutions().catch(() => {
86
86
  });
@@ -88,94 +88,94 @@ function Re(o, s) {
88
88
  f != null && f.taskId && m.loadTaskMessages(f.taskId).catch(() => {
89
89
  }), m.loadFileTree(void 0, !0).catch(() => {
90
90
  });
91
- }, c = ye((m) => {
92
- i.getState().setWsState(m);
91
+ }, s = Se((m) => {
92
+ c.getState().setWsState(m);
93
93
  });
94
- ve(o, s, n), i.getState().loadRunningExecutions().catch(() => {
94
+ ye(o, i, n), c.getState().loadRunningExecutions().catch(() => {
95
95
  });
96
- const r = i.getState(), { handler: T, dispose: h } = we({
96
+ const a = c.getState(), { handler: T, dispose: h } = ke({
97
97
  projectId: o,
98
- token: s,
99
- updateExecution: r.updateExecution,
100
- registerExecutionStart: r.registerExecutionStart,
101
- clearExecution: r.clearExecution,
102
- applyExecutionCancelled: r.applyExecutionCancelled,
103
- addMessage: r.addMessage,
104
- addTaskMessage: r.addTaskMessage,
105
- deleteMessage: r.deleteMessage,
106
- updateMessageReadStatus: r.updateMessageReadStatus,
107
- loadFileTree: r.loadFileTree
108
- }), g = Ne(T);
98
+ token: i,
99
+ updateExecution: a.updateExecution,
100
+ registerExecutionStart: a.registerExecutionStart,
101
+ clearExecution: a.clearExecution,
102
+ applyExecutionCancelled: a.applyExecutionCancelled,
103
+ addMessage: a.addMessage,
104
+ addTaskMessage: a.addTaskMessage,
105
+ deleteMessage: a.deleteMessage,
106
+ updateMessageReadStatus: a.updateMessageReadStatus,
107
+ loadFileTree: a.loadFileTree
108
+ }), g = ve(T);
109
109
  return () => {
110
- g(), h(), Te(), c(), i.getState().setObserverStatus(null);
110
+ g(), h(), Ne(), s(), c.getState().setObserverStatus(null);
111
111
  };
112
- }, [o, s]);
112
+ }, [o, i]);
113
113
  }
114
- const We = `${window.publicPath ?? "/"}logo.svg`;
114
+ const Re = `${window.publicPath ?? "/"}logo.svg`;
115
115
  function te() {
116
- const { pathname: o, search: s } = A.location, n = Q.parse(s);
116
+ const { pathname: o, search: i } = A.location, n = B.parse(i);
117
117
  if (!n.projectId && !n.project_id)
118
118
  return;
119
119
  delete n.projectId, delete n.project_id;
120
- const c = Q.stringify(n);
120
+ const s = B.stringify(n);
121
121
  A.replace({
122
122
  pathname: o,
123
- search: c ? `?${c}` : ""
123
+ search: s ? `?${s}` : ""
124
124
  });
125
125
  }
126
- function Ye() {
127
- const o = ke(), [s, n] = y("list"), [c, r] = y("chat"), [T, h] = y("team"), [g, m] = y(""), [f, V] = y(!1), [re, I] = y(!1), {
126
+ function Je() {
127
+ const o = be(), [i, n] = y("list"), [s, a] = y("chat"), [T, h] = y("team"), [g, m] = y(""), [f, Q] = y(!1), [ae, I] = y(!1), {
128
128
  currentProject: v,
129
129
  currentUser: R,
130
130
  projects: L,
131
131
  loading: ne,
132
132
  members: W,
133
133
  token: oe,
134
- loadProjects: z,
135
- expandProject: H,
134
+ loadProjects: V,
135
+ expandProject: z,
136
136
  updateCurrentUser: j,
137
137
  requestChatScrollBottom: S
138
- } = i(), k = Y(() => {
139
- const e = Q.parse(o.search), a = String(e.projectId ?? e.project_id ?? "").trim();
140
- if (!a)
138
+ } = c(), k = Y(() => {
139
+ const e = B.parse(o.search), r = String(e.projectId ?? e.project_id ?? "").trim();
140
+ if (!r)
141
141
  return null;
142
- const l = Number(a);
142
+ const l = Number(r);
143
143
  return Number.isFinite(l) && l > 0 ? l : null;
144
- }, [o.search]), U = E(!1), C = E(!1), P = E(!1), X = E(k);
145
- X.current = k, Re(v == null ? void 0 : v.id, oe), w(() => (document.body.classList.add("team-phone-workspace-route"), () => {
144
+ }, [o.search]), U = E(!1), C = E(!1), P = E(!1), H = E(k);
145
+ H.current = k, Oe(v == null ? void 0 : v.id, oe), w(() => (document.body.classList.add("team-phone-workspace-route"), () => {
146
146
  document.body.classList.remove("team-phone-workspace-route");
147
147
  }), []), w(() => {
148
- !_e(o.search) && Ee() || A.replace({
148
+ !xe(o.search) && _e() || A.replace({
149
149
  pathname: "/workspace",
150
150
  search: o.search
151
151
  });
152
152
  }, [o.search]);
153
- const se = B(
153
+ const se = q(
154
154
  (e) => {
155
- r("chat"), h(e), S(e, !0);
155
+ a("chat"), h(e), S(e, !0);
156
156
  },
157
157
  [S]
158
158
  );
159
159
  w(() => {
160
- let e = !1, a = 0;
160
+ let e = !1, r = 0;
161
161
  const l = 100;
162
162
  let x = !1, F = 0;
163
163
  const M = 3, N = (b) => {
164
- const u = i.getState().token;
165
- if (X.current != null) {
166
- e || (j(K(b)), V(!0)), ee().then((G) => {
164
+ const d = c.getState().token;
165
+ if (H.current != null) {
166
+ e || (j($(b)), Q(!0)), ee().then((G) => {
167
167
  e || j(G);
168
168
  }).catch(() => {
169
- !e && u && (localStorage.removeItem("z_team_token"), i.setState({ token: "" }));
169
+ !e && d && (localStorage.removeItem("z_team_token"), c.setState({ token: "" }));
170
170
  });
171
171
  return;
172
172
  }
173
173
  ee().then((G) => {
174
174
  e || j(G);
175
175
  }).catch(() => {
176
- e || (u && (localStorage.removeItem("z_team_token"), i.setState({ token: "" })), j(K(b)));
176
+ e || (d && (localStorage.removeItem("z_team_token"), c.setState({ token: "" })), j($(b)));
177
177
  }).finally(() => {
178
- e || V(!0);
178
+ e || Q(!0);
179
179
  });
180
180
  };
181
181
  return (() => {
@@ -184,26 +184,26 @@ function Ye() {
184
184
  const b = async () => {
185
185
  if (e)
186
186
  return;
187
- let u = de();
188
- if ((!u || !$(u)) && !x) {
187
+ let d = de();
188
+ if ((!d || !Z(d)) && !x) {
189
189
  x = !0;
190
190
  try {
191
- const p = await le();
192
- p.kind === "authenticated" ? u = p.user : p.kind === "unauthenticated" && (F += 1);
191
+ const u = await le();
192
+ u.kind === "authenticated" ? d = u.user : u.kind === "unauthenticated" && (F += 1);
193
193
  } catch {
194
194
  } finally {
195
195
  x = !1;
196
196
  }
197
197
  }
198
- if (u && $(u)) {
199
- N(u);
198
+ if (d && Z(d)) {
199
+ N(d);
200
200
  return;
201
201
  }
202
202
  if (F >= M) {
203
203
  D();
204
204
  return;
205
205
  }
206
- if (a += 1, a >= l) {
206
+ if (r += 1, r >= l) {
207
207
  D();
208
208
  return;
209
209
  }
@@ -216,38 +216,38 @@ function Ye() {
216
216
  e = !0;
217
217
  };
218
218
  }, [j]), w(() => {
219
- R && z();
220
- }, [R, z]), w(() => {
219
+ R && V();
220
+ }, [R, V]), w(() => {
221
221
  var l;
222
- if (!f || k != null || s === "project" || P.current)
222
+ if (!f || k != null || i === "project" || P.current)
223
223
  return;
224
- const e = i.getState(), a = (l = e.currentProject) == null ? void 0 : l.id;
225
- a == null || !e.expandedProjectIds.includes(String(a)) || (n("project"), r("chat"), h("team"), S("team", !0));
226
- }, [f, k, s, S]);
227
- const ce = B(
224
+ const e = c.getState(), r = (l = e.currentProject) == null ? void 0 : l.id;
225
+ r == null || !e.expandedProjectIds.includes(String(r)) || (n("project"), a("chat"), h("team"), S("team", !0));
226
+ }, [f, k, i, S]);
227
+ const ce = q(
228
228
  async (e) => {
229
229
  P.current = !1, I(!0);
230
230
  try {
231
- await H(e), n("project"), r("chat"), h("team");
232
- const a = i.getState();
233
- a.currentProject && await a.refreshProjectPanels(
234
- String(a.currentProject.id),
235
- a.projectSwitchSeq,
231
+ await z(e), n("project"), a("chat"), h("team");
232
+ const r = c.getState();
233
+ r.currentProject && await r.refreshProjectPanels(
234
+ String(r.currentProject.id),
235
+ r.projectSwitchSeq,
236
236
  !1
237
237
  ), S("team", !0);
238
238
  } finally {
239
239
  I(!1);
240
240
  }
241
241
  },
242
- [H, S]
242
+ [z, S]
243
243
  );
244
244
  w(() => {
245
245
  var M;
246
246
  if (!f || k == null || U.current || C.current)
247
247
  return;
248
- const e = k == null ? "" : String(k), a = i.getState();
249
- if (String(((M = a.currentProject) == null ? void 0 : M.id) ?? "") === e && a.expandedProjectIds.includes(e)) {
250
- U.current = !0, te(), P.current = !1, n("project"), r("chat"), h("team"), i.getState().loadMessages().catch(() => {
248
+ const e = k == null ? "" : String(k), r = c.getState();
249
+ if (String(((M = r.currentProject) == null ? void 0 : M.id) ?? "") === e && r.expandedProjectIds.includes(e)) {
250
+ U.current = !0, te(), P.current = !1, n("project"), a("chat"), h("team"), c.getState().loadMessages().catch(() => {
251
251
  });
252
252
  return;
253
253
  }
@@ -258,7 +258,7 @@ function Ye() {
258
258
  for (; Date.now() < N; ) {
259
259
  if (l)
260
260
  return;
261
- const _ = i.getState();
261
+ const _ = c.getState();
262
262
  if (!_.loading || _.projects.length > 0)
263
263
  return;
264
264
  await new Promise((b) => setTimeout(b, 50));
@@ -272,57 +272,57 @@ function Ye() {
272
272
  token: N,
273
273
  projects: _,
274
274
  expandProject: b
275
- } = i.getState(), u = _.find((p) => p.id === e);
276
- if (!u) {
277
- const p = await Pe(e, N);
275
+ } = c.getState(), d = _.find((u) => u.id === e);
276
+ if (!d) {
277
+ const u = await Ce(e, N);
278
278
  if (l)
279
279
  return;
280
- if (p.status === "NOT_FOUND" || !p.scenarioInstance) {
281
- be.info("无此工程");
280
+ if (u.status === "NOT_FOUND" || !u.scenarioInstance) {
281
+ ge.info("无此工程");
282
282
  return;
283
283
  }
284
- if (u = await xe(e, N), l)
284
+ if (d = await Pe(e, N), l)
285
285
  return;
286
286
  }
287
- if (l || !u)
287
+ if (l || !d)
288
288
  return;
289
- if (U.current = !0, await b(u), !l) {
290
- P.current = !1, n("project"), r("chat"), h("team"), te();
291
- const p = i.getState();
292
- p.currentProject && await p.refreshProjectPanels(
293
- String(p.currentProject.id),
294
- p.projectSwitchSeq,
289
+ if (U.current = !0, await b(d), !l) {
290
+ P.current = !1, n("project"), a("chat"), h("team"), te();
291
+ const u = c.getState();
292
+ u.currentProject && await u.refreshProjectPanels(
293
+ String(u.currentProject.id),
294
+ u.projectSwitchSeq,
295
295
  !1
296
296
  ), S("team", !0);
297
297
  }
298
298
  } catch {
299
299
  } finally {
300
- I(!1), C.current = !1, i.getState().loadProjects();
300
+ I(!1), C.current = !1, c.getState().loadProjects();
301
301
  }
302
302
  })(), () => {
303
303
  l = !0, C.current && (C.current = !1);
304
304
  };
305
305
  }, [f, k]);
306
- const Z = Y(() => {
306
+ const X = Y(() => {
307
307
  const e = g.trim().toLowerCase();
308
308
  return e ? L.filter(
309
- (a) => a.name.toLowerCase().includes(e) || (a.scenario_name ?? "").toLowerCase().includes(e)
309
+ (r) => r.name.toLowerCase().includes(e) || (r.scenario_name ?? "").toLowerCase().includes(e)
310
310
  ) : L;
311
- }, [g, L]), ie = B(() => {
312
- P.current = !0, n("list"), r("chat");
311
+ }, [g, L]), ie = q(() => {
312
+ P.current = !0, n("list"), a("chat");
313
313
  }, []);
314
314
  return !f || !R ? /* @__PURE__ */ t(
315
- Oe,
315
+ Me,
316
316
  {
317
317
  className: "phone-workspace phone-workspace-loading",
318
318
  loadingText: "正在接入 4A 统一登录…",
319
319
  timeoutText: "4A 统一登录接入超时(可能是网络抖动或服务正在重启),请重新登录。",
320
320
  onRetry: () => D()
321
321
  }
322
- ) : /* @__PURE__ */ d("div", { className: "phone-workspace", children: [
323
- /* @__PURE__ */ d("header", { className: "phone-workspace-header", children: [
324
- s === "project" ? /* @__PURE__ */ t(
325
- q,
322
+ ) : /* @__PURE__ */ p("div", { className: "phone-workspace", children: [
323
+ /* @__PURE__ */ p("header", { className: "phone-workspace-header", children: [
324
+ i === "project" ? /* @__PURE__ */ t(
325
+ K,
326
326
  {
327
327
  type: "text",
328
328
  icon: /* @__PURE__ */ t(ue, {}),
@@ -333,14 +333,14 @@ function Ye() {
333
333
  ) : /* @__PURE__ */ t(
334
334
  "img",
335
335
  {
336
- src: We,
336
+ src: Re,
337
337
  alt: "Z-OPC",
338
338
  className: "phone-workspace-logo",
339
339
  onClick: () => A.push("/welcome"),
340
340
  style: { cursor: "pointer" }
341
341
  }
342
342
  ),
343
- /* @__PURE__ */ t("div", { className: "phone-workspace-header-title", children: s === "list" ? /* @__PURE__ */ t(
343
+ /* @__PURE__ */ t("div", { className: "phone-workspace-header-title", children: i === "list" ? /* @__PURE__ */ t(
344
344
  "span",
345
345
  {
346
346
  className: "phone-workspace-brand",
@@ -349,52 +349,40 @@ function Ye() {
349
349
  children: "Z-OPC"
350
350
  }
351
351
  ) : /* @__PURE__ */ t("span", { className: "phone-workspace-project-name", children: (v == null ? void 0 : v.name) ?? "工程" }) }),
352
- /* @__PURE__ */ d("div", { className: "phone-workspace-header-actions", children: [
353
- s === "list" ? /* @__PURE__ */ t(
354
- q,
355
- {
356
- type: "text",
357
- icon: /* @__PURE__ */ t(pe, {}),
358
- onClick: () => {
359
- },
360
- "aria-label": "新建"
361
- }
362
- ) : null,
363
- /* @__PURE__ */ t(
364
- q,
365
- {
366
- type: "text",
367
- icon: /* @__PURE__ */ t(me, {}),
368
- onClick: () => {
369
- Ae();
370
- },
371
- "aria-label": "退出"
372
- }
373
- )
374
- ] })
352
+ /* @__PURE__ */ t("div", { className: "phone-workspace-header-actions", children: /* @__PURE__ */ t(
353
+ K,
354
+ {
355
+ type: "text",
356
+ icon: /* @__PURE__ */ t(pe, {}),
357
+ onClick: () => {
358
+ Ee();
359
+ },
360
+ "aria-label": "退出"
361
+ }
362
+ ) })
375
363
  ] }),
376
- /* @__PURE__ */ t("main", { className: "phone-workspace-main", children: s === "list" ? /* @__PURE__ */ d("div", { className: "phone-workspace-list", children: [
364
+ /* @__PURE__ */ t("main", { className: "phone-workspace-main", children: i === "list" ? /* @__PURE__ */ p("div", { className: "phone-workspace-list", children: [
377
365
  /* @__PURE__ */ t("div", { className: "phone-workspace-search", children: /* @__PURE__ */ t(
378
- fe,
366
+ he,
379
367
  {
380
368
  allowClear: !0,
381
- prefix: /* @__PURE__ */ t(he, {}),
369
+ prefix: /* @__PURE__ */ t(me, {}),
382
370
  placeholder: "搜索项目",
383
371
  value: g,
384
372
  onChange: (e) => m(e.target.value)
385
373
  }
386
374
  ) }),
387
- ne && L.length === 0 ? /* @__PURE__ */ t("div", { className: "phone-workspace-list-loading", children: /* @__PURE__ */ t(O, { description: "加载项目…" }) }) : Z.length === 0 ? /* @__PURE__ */ t(
375
+ ne && L.length === 0 ? /* @__PURE__ */ t("div", { className: "phone-workspace-list-loading", children: /* @__PURE__ */ t(O, { description: "加载项目…" }) }) : X.length === 0 ? /* @__PURE__ */ t(
388
376
  J,
389
377
  {
390
378
  description: g ? "无匹配项目" : "暂无项目",
391
379
  className: "phone-workspace-empty"
392
380
  }
393
- ) : /* @__PURE__ */ t("ul", { className: "phone-project-list", children: Z.map((e) => {
394
- const a = je(
381
+ ) : /* @__PURE__ */ t("ul", { className: "phone-project-list", children: X.map((e) => {
382
+ const r = Te(
395
383
  e.created_at
396
384
  );
397
- return /* @__PURE__ */ t("li", { children: /* @__PURE__ */ d(
385
+ return /* @__PURE__ */ t("li", { children: /* @__PURE__ */ p(
398
386
  "button",
399
387
  {
400
388
  type: "button",
@@ -403,15 +391,15 @@ function Ye() {
403
391
  ce(e);
404
392
  },
405
393
  children: [
406
- /* @__PURE__ */ d("div", { className: "phone-project-item-main", children: [
394
+ /* @__PURE__ */ p("div", { className: "phone-project-item-main", children: [
407
395
  /* @__PURE__ */ t("span", { className: "phone-project-item-name", children: e.name }),
408
- e.scenario_name || a ? /* @__PURE__ */ d("div", { className: "phone-project-item-meta", children: [
396
+ e.scenario_name || r ? /* @__PURE__ */ p("div", { className: "phone-project-item-meta", children: [
409
397
  e.scenario_name ? /* @__PURE__ */ t("span", { className: "phone-project-item-scenario", children: e.scenario_name }) : null,
410
- a ? /* @__PURE__ */ t("span", { className: "phone-project-item-time", children: a }) : null
398
+ r ? /* @__PURE__ */ t("span", { className: "phone-project-item-time", children: r }) : null
411
399
  ] }) : null
412
400
  ] }),
413
401
  /* @__PURE__ */ t(
414
- ge,
402
+ fe,
415
403
  {
416
404
  color: e.role === "ADMIN" ? "blue" : "default",
417
405
  className: "phone-project-item-tag",
@@ -422,23 +410,23 @@ function Ye() {
422
410
  }
423
411
  ) }, e.id);
424
412
  }) })
425
- ] }) : /* @__PURE__ */ d("div", { className: "phone-workspace-detail", children: [
426
- /* @__PURE__ */ d("div", { className: "phone-project-toolbar", children: [
413
+ ] }) : /* @__PURE__ */ p("div", { className: "phone-workspace-detail", children: [
414
+ /* @__PURE__ */ p("div", { className: "phone-project-toolbar", children: [
427
415
  /* @__PURE__ */ t("div", { className: "phone-project-toolbar-main", children: /* @__PURE__ */ t(
428
416
  "button",
429
417
  {
430
418
  type: "button",
431
- className: c === "chat" ? "phone-toolbar-tab phone-toolbar-active" : "phone-toolbar-tab",
419
+ className: s === "chat" ? "phone-toolbar-tab phone-toolbar-active" : "phone-toolbar-tab",
432
420
  onClick: () => se("team"),
433
421
  children: "协作"
434
422
  }
435
423
  ) }),
436
- /* @__PURE__ */ d(
424
+ /* @__PURE__ */ p(
437
425
  "button",
438
426
  {
439
427
  type: "button",
440
- className: c === "members" ? "phone-toolbar-tab phone-toolbar-members phone-toolbar-active" : "phone-toolbar-tab phone-toolbar-members",
441
- onClick: () => r("members"),
428
+ className: s === "members" ? "phone-toolbar-tab phone-toolbar-members phone-toolbar-active" : "phone-toolbar-tab phone-toolbar-members",
429
+ onClick: () => a("members"),
442
430
  children: [
443
431
  "成员 (",
444
432
  W.length,
@@ -447,11 +435,11 @@ function Ye() {
447
435
  }
448
436
  )
449
437
  ] }),
450
- /* @__PURE__ */ t("div", { className: "phone-workspace-detail-body", children: c === "members" ? /* @__PURE__ */ t("ul", { className: "phone-member-list", children: W.length === 0 ? /* @__PURE__ */ t(J, { description: "暂无成员" }) : W.map((e) => /* @__PURE__ */ d("li", { className: "phone-member-item", children: [
438
+ /* @__PURE__ */ t("div", { className: "phone-workspace-detail-body", children: s === "members" ? /* @__PURE__ */ t("ul", { className: "phone-member-list", children: W.length === 0 ? /* @__PURE__ */ t(J, { description: "暂无成员" }) : W.map((e) => /* @__PURE__ */ p("li", { className: "phone-member-item", children: [
451
439
  /* @__PURE__ */ t("span", { className: "phone-member-avatar", children: e.member_type === "AGENT" ? "🤖" : "👤" }),
452
- /* @__PURE__ */ d("div", { className: "phone-member-info", children: [
440
+ /* @__PURE__ */ p("div", { className: "phone-member-info", children: [
453
441
  /* @__PURE__ */ t("span", { className: "phone-member-name", children: e.display_name }),
454
- /* @__PURE__ */ d("span", { className: "phone-member-meta", children: [
442
+ /* @__PURE__ */ p("span", { className: "phone-member-meta", children: [
455
443
  e.member_type === "AGENT" ? "Agent" : "成员",
456
444
  " ·",
457
445
  " ",
@@ -459,7 +447,7 @@ function Ye() {
459
447
  ] })
460
448
  ] })
461
449
  ] }, e.id)) }) : /* @__PURE__ */ t("div", { className: "phone-chat-host", children: /* @__PURE__ */ t(
462
- Se,
450
+ we,
463
451
  {
464
452
  hideTabs: !0,
465
453
  activeTab: T,
@@ -470,10 +458,10 @@ function Ye() {
470
458
  }
471
459
  ) }) })
472
460
  ] }) }),
473
- re ? /* @__PURE__ */ t("div", { className: "phone-workspace-overlay", children: /* @__PURE__ */ t(O, { description: "正在打开工程…" }) }) : null,
474
- /* @__PURE__ */ t(Ce, {})
461
+ ae ? /* @__PURE__ */ t("div", { className: "phone-workspace-overlay", children: /* @__PURE__ */ t(O, { description: "正在打开工程…" }) }) : null,
462
+ /* @__PURE__ */ t(je, {})
475
463
  ] });
476
464
  }
477
465
  export {
478
- Ye as default
466
+ Je as default
479
467
  };
@@ -2,10 +2,10 @@ import { jsxs as i, jsx as a, Fragment as st } from "react/jsx-runtime";
2
2
  import { ReloadOutlined as ot, SearchOutlined as lt, RightOutlined as dt, TeamOutlined as pt, MessageOutlined as ut } from "@ant-design/icons";
3
3
  import { Button as W, Select as be, Spin as pe, Empty as y, Tag as R, Input as O } from "antd";
4
4
  import { useState as p, useCallback as v, useEffect as Se, useMemo as ue, useRef as mt } from "react";
5
- import { u as B } from "./ComponentDoc-CKmtNnh_.js";
5
+ import { u as B } from "./ComponentDoc-MAAFSdex.js";
6
6
  import { h as Ce } from "./history-BlrA1eaW.js";
7
- import { C as ht } from "./createWorkspaceWsHandler-Cd7unuWy.js";
8
- import { l as _t, c as vt } from "./api-5yDkyF00.js";
7
+ import { C as ht } from "./createWorkspaceWsHandler-DZc2EeOE.js";
8
+ import { l as _t, c as vt } from "./api-CIzOXga5.js";
9
9
  const ft = "product-workspace", Fe = "productCode";
10
10
  function w(n) {
11
11
  if (!n.ok) throw new Error(`产品接口失败 (${n.status})`);