@yuku123/z-team-component 0.2.139 → 0.2.141
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.
- package/dist/{AdminModuleContent-B1IJbLVN.js → AdminModuleContent-FFU5MUjw.js} +10526 -10697
- package/dist/{ChangeLogView-BVKf3AZn.js → ChangeLogView-C5v5uT8L.js} +1 -1
- package/dist/{ComponentDoc-BIX-e69A.js → ComponentDoc-DnZq0_Rk.js} +1318 -1313
- package/dist/{InvitationManagementPage-DRC_8AiO.js → InvitationManagementPage-dEBNe9_s.js} +1 -1
- package/dist/{OnboardingPage-B4GQTFCS.js → OnboardingPage-BW8WhBg5.js} +2 -2
- package/dist/ScheduledTasks-BaZ0_klE.js +12024 -0
- package/dist/SystemShell-I7vWo1XG.js +858 -0
- package/dist/{admin-logs-DK00NEUv.js → admin-logs-BDPC3Q_Y.js} +5 -5
- package/dist/{api-C_9xZbZr.js → api-BJ5jPWNm.js} +1 -1
- package/dist/{api-DBemNteG.js → api-U9U4zzq_.js} +1 -1
- package/dist/createWorkspaceWsHandler-B6TdD0Oz.js +11757 -0
- package/dist/{index-BGAG77Nt.js → index-BGZV4U3S.js} +1325 -1187
- package/dist/{CollabPersonalHost-BY6RqeQJ.js → index-BPEfgkzE.js} +3 -3
- package/dist/{index-BgCxUeRF.js → index-BXaJSMd0.js} +9 -9
- package/dist/{from-scenario-D8CIJLDn.js → index-Bfw6OE5L.js} +19 -20
- package/dist/index-BlDMnzJF.js +18 -0
- package/dist/{welcome-BBLRGBWu.js → index-BmlFIrWx.js} +1 -1
- package/dist/{build-by-form-CXxXrXvw.js → index-BwhK44Dc.js} +26 -27
- package/dist/{TrainingAdminShell-CgnQM4Nb.js → index-CP5raaOW.js} +780 -792
- package/dist/{docs-A-g6sqaE.js → index-CPpqideA.js} +1 -1
- package/dist/{index-BM6KEb8k.js → index-CToJEufJ.js} +1 -1
- package/dist/{common-Bcnlb4nY.js → index-CVgvlDAT.js} +17 -17
- package/dist/{admin-ryysUJ9z.js → index-CmzTSdmD.js} +30 -31
- package/dist/{Market-C2vkBzDr.js → index-CsNtBWH-.js} +2 -2
- package/dist/index-DIv1OJ_2.js +1840 -0
- package/dist/{chat-DKwMolQV.js → index-DKUg7Evq.js} +28 -29
- package/dist/{index-BlfOXOZM.js → index-DSXVCDf7.js} +9 -9
- package/dist/{OpsWorkbench-D8RF2p4X.js → index-Dd5RE_0a.js} +342 -389
- package/dist/index-DuZrrpXt.js +1298 -0
- package/dist/{from-ticket-D0oQPEf1.js → index-Gn0zdd5m.js} +2 -2
- package/dist/index-WWGxF0UX.js +136 -0
- package/dist/{change-log-CcmXtywx.js → index-XTNGZnrF.js} +1 -1
- package/dist/{KnowledgeGraphTab-BfhDEyvW.js → index-XgaiU13i.js} +1 -1
- package/dist/{scenario-DOpFkfNV.js → index-d6RIzlsj.js} +2 -2
- package/dist/{index-Bs_WMKyt.js → index-kjli87DO.js} +3895 -3964
- package/dist/{phone-BU4g7eHI.js → index-mDjl3m2W.js} +198 -192
- package/dist/{index-Dlf6mERD.js → index-nj-cjKsf.js} +1910 -1950
- package/dist/{WorkBuddyShell-DCrPpMd5.js → index-skl-gjj4.js} +6 -6
- package/dist/index.js +1 -1
- package/dist/instance-D_EP8AQm.js +116 -0
- package/dist/{menuPermission-C4EVCwjs.js → menuPermission-Bhnols4v.js} +3 -3
- package/dist/pages.js +1 -1
- package/dist/{send-default-agent-team-message-1L9Jv1eJ.js → send-default-agent-team-message-0RB1pYex.js} +1 -1
- package/dist/{training-BqYfINRR.js → training-B1eRX8g1.js} +1 -1
- package/dist/{webide-AknolY0B.js → webide-C4ThGZzY.js} +1161 -1317
- package/dist/z-team-component.css +1 -1
- package/package.json +5 -4
- package/dist/CognitionWorkbench-DrDFy5jN.js +0 -139
- package/dist/DevWorkbench-BtiPE_V4.js +0 -228
- package/dist/ProductWorkspace-PSO7Q9m-.js +0 -1323
- package/dist/ScheduledTasks-CoaHVU6e.js +0 -12006
- package/dist/SmartWorkbench-BkdfSgqx.js +0 -1867
- package/dist/SystemShell-CANwRSyW.js +0 -886
- package/dist/SystemWorkbench.module-DpLM0zgA.js +0 -36
- package/dist/createWorkspaceWsHandler-6xyLJ14H.js +0 -12902
- package/dist/instance-B9ZKD5cL.js +0 -186
- package/dist/sso-user-Co71Xi9I.js +0 -43
- /package/dist/{download-B_LJRFsK.js → index-B_LJRFsK.js} +0 -0
- /package/dist/{chatdemo-C815hPWS.js → index-C815hPWS.js} +0 -0
- /package/dist/{portal-QNpTaU--.js → index-QNpTaU--.js} +0 -0
|
@@ -1,35 +1,34 @@
|
|
|
1
|
-
import { jsxs as
|
|
1
|
+
import { jsxs as u, 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,
|
|
4
|
-
import { ArrowLeftOutlined as
|
|
5
|
-
import { Spin as O, Button as
|
|
6
|
-
import
|
|
7
|
-
import { useState as y, useRef as E, useEffect as
|
|
8
|
-
import { useLocation as
|
|
3
|
+
import { u as r, $ as de, a0 as ue, a1 as pe, a2 as he, m as q, a3 as me, a4 as fe, r as ge, k as K, l as X } from "./ComponentDoc-DnZq0_Rk.js";
|
|
4
|
+
import { ArrowLeftOutlined as ke, LogoutOutlined as be, SearchOutlined as Se } from "@ant-design/icons";
|
|
5
|
+
import { Spin as O, Button as J, Input as we, Empty as Y, Tag as ye, message as ve } from "antd";
|
|
6
|
+
import Q from "query-string";
|
|
7
|
+
import { useState as y, useRef as E, useEffect as S, useMemo as ee, useCallback as B } from "react";
|
|
8
|
+
import { useLocation as Te } from "react-router-dom";
|
|
9
9
|
import { h as A } from "./history-BlrA1eaW.js";
|
|
10
|
-
import { a as
|
|
11
|
-
import {
|
|
12
|
-
import { l as Ce, j as Pe } from "./instance-B9ZKD5cL.js";
|
|
10
|
+
import { a as je, C as Ne } from "./createWorkspaceWsHandler-B6TdD0Oz.js";
|
|
11
|
+
import { l as Ce, j as Pe } from "./instance-D_EP8AQm.js";
|
|
13
12
|
import { i as xe, s as _e } from "./mobile-client-O3yr9h6t.js";
|
|
14
13
|
/* empty css */
|
|
15
|
-
import { s as Ee } from "./admin-logs-
|
|
14
|
+
import { s as Ee } from "./admin-logs-BDPC3Q_Y.js";
|
|
16
15
|
const ae = 2e4;
|
|
17
|
-
function Ae(
|
|
18
|
-
let
|
|
16
|
+
function Ae(s, i = ae, o = globalThis) {
|
|
17
|
+
let c = null;
|
|
19
18
|
return {
|
|
20
19
|
start() {
|
|
21
|
-
|
|
22
|
-
|
|
20
|
+
c == null && (c = o.setTimeout(() => {
|
|
21
|
+
c = null, s();
|
|
23
22
|
}, i));
|
|
24
23
|
},
|
|
25
24
|
stop() {
|
|
26
|
-
|
|
25
|
+
c != null && (o.clearTimeout(c), c = null);
|
|
27
26
|
}
|
|
28
27
|
};
|
|
29
28
|
}
|
|
30
|
-
function Ie({ text:
|
|
31
|
-
return /* @__PURE__ */
|
|
32
|
-
/* @__PURE__ */ t("div", { style: { marginBottom: 10 }, children:
|
|
29
|
+
function Ie({ text: s, onRetry: i }) {
|
|
30
|
+
return /* @__PURE__ */ u("div", { style: { marginTop: 12, textAlign: "center" }, children: [
|
|
31
|
+
/* @__PURE__ */ t("div", { style: { marginBottom: 10 }, children: s }),
|
|
33
32
|
/* @__PURE__ */ t(
|
|
34
33
|
"button",
|
|
35
34
|
{
|
|
@@ -50,266 +49,273 @@ function Ie({ text: o, onRetry: i }) {
|
|
|
50
49
|
}
|
|
51
50
|
const Le = "统一登录接入超时(可能是网络抖动或服务正在重启),请重新登录。";
|
|
52
51
|
function Me({
|
|
53
|
-
loadingText:
|
|
52
|
+
loadingText: s,
|
|
54
53
|
timeoutText: i = Le,
|
|
55
|
-
onRetry:
|
|
56
|
-
timeoutMs:
|
|
57
|
-
className:
|
|
54
|
+
onRetry: o,
|
|
55
|
+
timeoutMs: c = ae,
|
|
56
|
+
className: n
|
|
58
57
|
}) {
|
|
59
|
-
const [
|
|
60
|
-
return
|
|
61
|
-
const
|
|
62
|
-
() =>
|
|
63
|
-
|
|
58
|
+
const [N, m] = y(!1), k = E(o);
|
|
59
|
+
return k.current = o, S(() => {
|
|
60
|
+
const p = Ae(
|
|
61
|
+
() => m(!0),
|
|
62
|
+
c
|
|
64
63
|
);
|
|
65
|
-
return
|
|
66
|
-
}, [
|
|
64
|
+
return p.start(), () => p.stop();
|
|
65
|
+
}, [c]), N ? /* @__PURE__ */ u("div", { className: n, children: [
|
|
67
66
|
/* @__PURE__ */ t(O, { description: "" }),
|
|
68
67
|
/* @__PURE__ */ t(
|
|
69
68
|
Ie,
|
|
70
69
|
{
|
|
71
70
|
text: i,
|
|
72
|
-
onRetry: () =>
|
|
71
|
+
onRetry: () => k.current()
|
|
73
72
|
}
|
|
74
73
|
)
|
|
75
|
-
] }) : /* @__PURE__ */ t("div", { className:
|
|
74
|
+
] }) : /* @__PURE__ */ t("div", { className: n, children: /* @__PURE__ */ t(O, { description: s }) });
|
|
76
75
|
}
|
|
77
|
-
function Oe(
|
|
78
|
-
|
|
79
|
-
if (
|
|
76
|
+
function Oe(s, i) {
|
|
77
|
+
S(() => {
|
|
78
|
+
if (s == null)
|
|
80
79
|
return;
|
|
81
|
-
|
|
82
|
-
const
|
|
83
|
-
const
|
|
84
|
-
|
|
85
|
-
}),
|
|
80
|
+
r.getState().setObserverStatus(null);
|
|
81
|
+
const o = () => {
|
|
82
|
+
const p = r.getState();
|
|
83
|
+
p.loadMessages().catch(() => {
|
|
84
|
+
}), p.loadRunningExecutions().catch(() => {
|
|
86
85
|
});
|
|
87
|
-
const f =
|
|
88
|
-
f != null && f.taskId &&
|
|
89
|
-
}),
|
|
86
|
+
const f = p.activeTaskChat;
|
|
87
|
+
f != null && f.taskId && p.loadTaskMessages(f.taskId).catch(() => {
|
|
88
|
+
}), p.loadFileTree(void 0, !0).catch(() => {
|
|
90
89
|
});
|
|
91
|
-
},
|
|
92
|
-
|
|
90
|
+
}, c = de((p) => {
|
|
91
|
+
r.getState().setWsState(p);
|
|
93
92
|
});
|
|
94
|
-
|
|
93
|
+
ue(s, i, o), r.getState().loadRunningExecutions().catch(() => {
|
|
95
94
|
});
|
|
96
|
-
const
|
|
97
|
-
projectId:
|
|
95
|
+
const n = r.getState(), { handler: N, dispose: m } = je({
|
|
96
|
+
projectId: s,
|
|
98
97
|
token: i,
|
|
99
|
-
updateExecution:
|
|
100
|
-
registerExecutionStart:
|
|
101
|
-
clearExecution:
|
|
102
|
-
applyExecutionCancelled:
|
|
103
|
-
addMessage:
|
|
104
|
-
addTaskMessage:
|
|
105
|
-
deleteMessage:
|
|
106
|
-
updateMessageReadStatus:
|
|
107
|
-
loadFileTree:
|
|
108
|
-
}),
|
|
98
|
+
updateExecution: n.updateExecution,
|
|
99
|
+
registerExecutionStart: n.registerExecutionStart,
|
|
100
|
+
clearExecution: n.clearExecution,
|
|
101
|
+
applyExecutionCancelled: n.applyExecutionCancelled,
|
|
102
|
+
addMessage: n.addMessage,
|
|
103
|
+
addTaskMessage: n.addTaskMessage,
|
|
104
|
+
deleteMessage: n.deleteMessage,
|
|
105
|
+
updateMessageReadStatus: n.updateMessageReadStatus,
|
|
106
|
+
loadFileTree: n.loadFileTree
|
|
107
|
+
}), k = pe(N);
|
|
109
108
|
return () => {
|
|
110
|
-
|
|
109
|
+
k(), m(), he(), c(), r.getState().setObserverStatus(null);
|
|
111
110
|
};
|
|
112
|
-
}, [
|
|
111
|
+
}, [s, i]);
|
|
113
112
|
}
|
|
114
113
|
const Re = `${window.publicPath ?? "/"}logo.svg`;
|
|
115
114
|
function te() {
|
|
116
|
-
const { pathname:
|
|
117
|
-
if (!
|
|
115
|
+
const { pathname: s, search: i } = A.location, o = Q.parse(i);
|
|
116
|
+
if (!o.projectId && !o.project_id)
|
|
118
117
|
return;
|
|
119
|
-
delete
|
|
120
|
-
const
|
|
118
|
+
delete o.projectId, delete o.project_id;
|
|
119
|
+
const c = Q.stringify(o);
|
|
121
120
|
A.replace({
|
|
122
|
-
pathname:
|
|
123
|
-
search:
|
|
121
|
+
pathname: s,
|
|
122
|
+
search: c ? `?${c}` : ""
|
|
124
123
|
});
|
|
125
124
|
}
|
|
126
|
-
function
|
|
127
|
-
const
|
|
125
|
+
function Xe() {
|
|
126
|
+
const s = Te(), [i, o] = y("list"), [c, n] = y("chat"), [N, m] = y("team"), [k, p] = y(""), [f, $] = y(
|
|
127
|
+
() => !!r.getState().currentUser
|
|
128
|
+
), [re, I] = y(!1), {
|
|
128
129
|
currentProject: v,
|
|
129
130
|
currentUser: R,
|
|
130
131
|
projects: L,
|
|
131
132
|
loading: ne,
|
|
132
|
-
members:
|
|
133
|
+
members: U,
|
|
133
134
|
token: oe,
|
|
134
135
|
loadProjects: V,
|
|
135
|
-
expandProject:
|
|
136
|
-
updateCurrentUser:
|
|
137
|
-
requestChatScrollBottom:
|
|
138
|
-
} =
|
|
139
|
-
const e =
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
return Number.isFinite(l) && l > 0 ? l : null;
|
|
144
|
-
}, [o.search]), F = E(!1), C = E(!1), P = E(!1), z = E(k);
|
|
145
|
-
z.current = k, Oe(v == null ? void 0 : v.id, oe), w(() => (document.body.classList.add("team-phone-workspace-route"), () => {
|
|
136
|
+
expandProject: z,
|
|
137
|
+
updateCurrentUser: T,
|
|
138
|
+
requestChatScrollBottom: w
|
|
139
|
+
} = r(), b = ee(() => {
|
|
140
|
+
const e = Q.parse(s.search), a = String(e.projectId ?? e.project_id ?? "").trim();
|
|
141
|
+
return /^[0-9]+$/.test(a) ? a : null;
|
|
142
|
+
}, [s.search]), W = E(!1), C = E(!1), P = E(!1), H = E(b);
|
|
143
|
+
H.current = b, Oe(v == null ? void 0 : v.id, oe), S(() => (document.body.classList.add("team-phone-workspace-route"), () => {
|
|
146
144
|
document.body.classList.remove("team-phone-workspace-route");
|
|
147
|
-
}), []),
|
|
148
|
-
!xe(
|
|
145
|
+
}), []), S(() => {
|
|
146
|
+
!xe(s.search) && _e() || A.replace({
|
|
149
147
|
pathname: "/workspace",
|
|
150
|
-
search:
|
|
148
|
+
search: s.search
|
|
151
149
|
});
|
|
152
|
-
}, [
|
|
153
|
-
const se =
|
|
150
|
+
}, [s.search]);
|
|
151
|
+
const se = B(
|
|
154
152
|
(e) => {
|
|
155
|
-
|
|
153
|
+
n("chat"), m(e), w(e, !0);
|
|
156
154
|
},
|
|
157
|
-
[
|
|
155
|
+
[w]
|
|
158
156
|
);
|
|
159
|
-
|
|
157
|
+
S(() => {
|
|
160
158
|
let e = !1, a = 0;
|
|
161
|
-
const
|
|
162
|
-
let x = !1,
|
|
163
|
-
const M = 3
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
e || (
|
|
167
|
-
|
|
159
|
+
const h = 100;
|
|
160
|
+
let x = !1, F = 0;
|
|
161
|
+
const M = 3;
|
|
162
|
+
if (r.getState().currentUser) {
|
|
163
|
+
r.getState().token && q().then((l) => {
|
|
164
|
+
e || T(l);
|
|
165
|
+
}).catch(() => {
|
|
166
|
+
});
|
|
167
|
+
return;
|
|
168
|
+
}
|
|
169
|
+
const j = (g) => {
|
|
170
|
+
const l = r.getState().token;
|
|
171
|
+
if (H.current != null) {
|
|
172
|
+
e || (T(X(g)), $(!0)), q().then((G) => {
|
|
173
|
+
e || T(G);
|
|
168
174
|
}).catch(() => {
|
|
169
|
-
!e &&
|
|
175
|
+
!e && l && (localStorage.removeItem("z_team_token"), r.setState({ token: "" }));
|
|
170
176
|
});
|
|
171
177
|
return;
|
|
172
178
|
}
|
|
173
|
-
|
|
174
|
-
e ||
|
|
179
|
+
q().then((G) => {
|
|
180
|
+
e || T(G);
|
|
175
181
|
}).catch(() => {
|
|
176
|
-
e || (
|
|
182
|
+
e || (l && (localStorage.removeItem("z_team_token"), r.setState({ token: "" })), T(X(g)));
|
|
177
183
|
}).finally(() => {
|
|
178
|
-
e ||
|
|
184
|
+
e || $(!0);
|
|
179
185
|
});
|
|
180
186
|
};
|
|
181
187
|
return (() => {
|
|
182
188
|
if (e)
|
|
183
189
|
return;
|
|
184
|
-
const
|
|
190
|
+
const g = async () => {
|
|
185
191
|
if (e)
|
|
186
192
|
return;
|
|
187
|
-
let
|
|
188
|
-
if ((!
|
|
193
|
+
let l = ge();
|
|
194
|
+
if ((!l || !K(l)) && !x) {
|
|
189
195
|
x = !0;
|
|
190
196
|
try {
|
|
191
|
-
const
|
|
192
|
-
|
|
197
|
+
const d = await le();
|
|
198
|
+
d.kind === "authenticated" ? l = d.user : d.kind === "unauthenticated" && (F += 1);
|
|
193
199
|
} catch {
|
|
194
200
|
} finally {
|
|
195
201
|
x = !1;
|
|
196
202
|
}
|
|
197
203
|
}
|
|
198
|
-
if (
|
|
199
|
-
|
|
204
|
+
if (l && K(l)) {
|
|
205
|
+
j(l);
|
|
200
206
|
return;
|
|
201
207
|
}
|
|
202
|
-
if (
|
|
208
|
+
if (F >= M) {
|
|
203
209
|
D();
|
|
204
210
|
return;
|
|
205
211
|
}
|
|
206
|
-
if (a += 1, a >=
|
|
212
|
+
if (a += 1, a >= h) {
|
|
207
213
|
D();
|
|
208
214
|
return;
|
|
209
215
|
}
|
|
210
216
|
window.setTimeout(() => {
|
|
211
|
-
|
|
217
|
+
g();
|
|
212
218
|
}, 150);
|
|
213
219
|
};
|
|
214
|
-
|
|
220
|
+
g();
|
|
215
221
|
})(), () => {
|
|
216
222
|
e = !0;
|
|
217
223
|
};
|
|
218
|
-
}, [
|
|
224
|
+
}, [T]), S(() => {
|
|
219
225
|
R && V();
|
|
220
|
-
}, [R, V]),
|
|
221
|
-
var
|
|
222
|
-
if (!f ||
|
|
226
|
+
}, [R, V]), S(() => {
|
|
227
|
+
var h;
|
|
228
|
+
if (!f || b != null || i === "project" || P.current)
|
|
223
229
|
return;
|
|
224
|
-
const e =
|
|
225
|
-
a == null || !e.expandedProjectIds.includes(String(a)) || (
|
|
226
|
-
}, [f,
|
|
227
|
-
const ce =
|
|
230
|
+
const e = r.getState(), a = (h = e.currentProject) == null ? void 0 : h.id;
|
|
231
|
+
a == null || !e.expandedProjectIds.includes(String(a)) || (o("project"), n("chat"), m("team"), w("team", !0));
|
|
232
|
+
}, [f, b, i, w]);
|
|
233
|
+
const ce = B(
|
|
228
234
|
async (e) => {
|
|
229
235
|
P.current = !1, I(!0);
|
|
230
236
|
try {
|
|
231
|
-
await
|
|
232
|
-
const a =
|
|
237
|
+
await z(e), o("project"), n("chat"), m("team");
|
|
238
|
+
const a = r.getState();
|
|
233
239
|
a.currentProject && await a.refreshProjectPanels(
|
|
234
240
|
String(a.currentProject.id),
|
|
235
241
|
a.projectSwitchSeq,
|
|
236
242
|
!1
|
|
237
|
-
),
|
|
243
|
+
), w("team", !0);
|
|
238
244
|
} finally {
|
|
239
245
|
I(!1);
|
|
240
246
|
}
|
|
241
247
|
},
|
|
242
|
-
[
|
|
248
|
+
[z, w]
|
|
243
249
|
);
|
|
244
|
-
|
|
250
|
+
S(() => {
|
|
245
251
|
var M;
|
|
246
|
-
if (!f ||
|
|
252
|
+
if (!f || b == null || W.current || C.current)
|
|
247
253
|
return;
|
|
248
|
-
const e =
|
|
254
|
+
const e = b == null ? "" : String(b), a = r.getState();
|
|
249
255
|
if (String(((M = a.currentProject) == null ? void 0 : M.id) ?? "") === e && a.expandedProjectIds.includes(e)) {
|
|
250
|
-
|
|
256
|
+
W.current = !0, te(), P.current = !1, o("project"), n("chat"), m("team"), r.getState().loadMessages().catch(() => {
|
|
251
257
|
});
|
|
252
258
|
return;
|
|
253
259
|
}
|
|
254
|
-
let
|
|
260
|
+
let h = !1;
|
|
255
261
|
C.current = !0, I(!0);
|
|
256
262
|
const x = async () => {
|
|
257
|
-
const
|
|
258
|
-
for (; Date.now() <
|
|
259
|
-
if (
|
|
263
|
+
const j = Date.now() + 4e3;
|
|
264
|
+
for (; Date.now() < j; ) {
|
|
265
|
+
if (h)
|
|
260
266
|
return;
|
|
261
|
-
const _ =
|
|
267
|
+
const _ = r.getState();
|
|
262
268
|
if (!_.loading || _.projects.length > 0)
|
|
263
269
|
return;
|
|
264
|
-
await new Promise((
|
|
270
|
+
await new Promise((g) => setTimeout(g, 50));
|
|
265
271
|
}
|
|
266
272
|
};
|
|
267
273
|
return (async () => {
|
|
268
274
|
try {
|
|
269
|
-
if (await x(),
|
|
275
|
+
if (await x(), h)
|
|
270
276
|
return;
|
|
271
277
|
let {
|
|
272
|
-
token:
|
|
278
|
+
token: j,
|
|
273
279
|
projects: _,
|
|
274
|
-
expandProject:
|
|
275
|
-
} =
|
|
276
|
-
if (!
|
|
277
|
-
const
|
|
278
|
-
if (
|
|
280
|
+
expandProject: g
|
|
281
|
+
} = r.getState(), l = _.find((d) => d.id === e);
|
|
282
|
+
if (!l) {
|
|
283
|
+
const d = await Ce(e, j);
|
|
284
|
+
if (h)
|
|
279
285
|
return;
|
|
280
|
-
if (
|
|
281
|
-
|
|
286
|
+
if (d.status === "NOT_FOUND" || !d.scenarioInstance) {
|
|
287
|
+
ve.info("无此工程");
|
|
282
288
|
return;
|
|
283
289
|
}
|
|
284
|
-
if (
|
|
290
|
+
if (l = await Pe(e, j), h)
|
|
285
291
|
return;
|
|
286
292
|
}
|
|
287
|
-
if (
|
|
293
|
+
if (h || !l)
|
|
288
294
|
return;
|
|
289
|
-
if (
|
|
290
|
-
P.current = !1,
|
|
291
|
-
const
|
|
292
|
-
|
|
293
|
-
String(
|
|
294
|
-
|
|
295
|
+
if (W.current = !0, await g(l), !h) {
|
|
296
|
+
P.current = !1, o("project"), n("chat"), m("team"), te();
|
|
297
|
+
const d = r.getState();
|
|
298
|
+
d.currentProject && await d.refreshProjectPanels(
|
|
299
|
+
String(d.currentProject.id),
|
|
300
|
+
d.projectSwitchSeq,
|
|
295
301
|
!1
|
|
296
|
-
),
|
|
302
|
+
), w("team", !0);
|
|
297
303
|
}
|
|
298
304
|
} catch {
|
|
299
305
|
} finally {
|
|
300
|
-
I(!1), C.current = !1,
|
|
306
|
+
I(!1), C.current = !1, r.getState().loadProjects();
|
|
301
307
|
}
|
|
302
308
|
})(), () => {
|
|
303
|
-
|
|
309
|
+
h = !0, C.current && (C.current = !1);
|
|
304
310
|
};
|
|
305
|
-
}, [f,
|
|
306
|
-
const
|
|
307
|
-
const e =
|
|
311
|
+
}, [f, b]);
|
|
312
|
+
const Z = ee(() => {
|
|
313
|
+
const e = k.trim().toLowerCase();
|
|
308
314
|
return e ? L.filter(
|
|
309
315
|
(a) => a.name.toLowerCase().includes(e) || (a.scenario_name ?? "").toLowerCase().includes(e)
|
|
310
316
|
) : L;
|
|
311
|
-
}, [
|
|
312
|
-
P.current = !0,
|
|
317
|
+
}, [k, L]), ie = B(() => {
|
|
318
|
+
P.current = !0, o("list"), n("chat");
|
|
313
319
|
}, []);
|
|
314
320
|
return !f || !R ? /* @__PURE__ */ t(
|
|
315
321
|
Me,
|
|
@@ -319,13 +325,13 @@ function Ye() {
|
|
|
319
325
|
timeoutText: "4A 统一登录接入超时(可能是网络抖动或服务正在重启),请重新登录。",
|
|
320
326
|
onRetry: () => D()
|
|
321
327
|
}
|
|
322
|
-
) : /* @__PURE__ */
|
|
323
|
-
/* @__PURE__ */
|
|
328
|
+
) : /* @__PURE__ */ u("div", { className: "phone-workspace", children: [
|
|
329
|
+
/* @__PURE__ */ u("header", { className: "phone-workspace-header", children: [
|
|
324
330
|
i === "project" ? /* @__PURE__ */ t(
|
|
325
|
-
|
|
331
|
+
J,
|
|
326
332
|
{
|
|
327
333
|
type: "text",
|
|
328
|
-
icon: /* @__PURE__ */ t(
|
|
334
|
+
icon: /* @__PURE__ */ t(ke, {}),
|
|
329
335
|
className: "phone-workspace-back",
|
|
330
336
|
onClick: ie,
|
|
331
337
|
"aria-label": "返回项目列表"
|
|
@@ -350,10 +356,10 @@ function Ye() {
|
|
|
350
356
|
}
|
|
351
357
|
) : /* @__PURE__ */ t("span", { className: "phone-workspace-project-name", children: (v == null ? void 0 : v.name) ?? "工程" }) }),
|
|
352
358
|
/* @__PURE__ */ t("div", { className: "phone-workspace-header-actions", children: /* @__PURE__ */ t(
|
|
353
|
-
|
|
359
|
+
J,
|
|
354
360
|
{
|
|
355
361
|
type: "text",
|
|
356
|
-
icon: /* @__PURE__ */ t(
|
|
362
|
+
icon: /* @__PURE__ */ t(be, {}),
|
|
357
363
|
onClick: () => {
|
|
358
364
|
Ee();
|
|
359
365
|
},
|
|
@@ -361,28 +367,28 @@ function Ye() {
|
|
|
361
367
|
}
|
|
362
368
|
) })
|
|
363
369
|
] }),
|
|
364
|
-
/* @__PURE__ */ t("main", { className: "phone-workspace-main", children: i === "list" ? /* @__PURE__ */
|
|
370
|
+
/* @__PURE__ */ t("main", { className: "phone-workspace-main", children: i === "list" ? /* @__PURE__ */ u("div", { className: "phone-workspace-list", children: [
|
|
365
371
|
/* @__PURE__ */ t("div", { className: "phone-workspace-search", children: /* @__PURE__ */ t(
|
|
366
|
-
|
|
372
|
+
we,
|
|
367
373
|
{
|
|
368
374
|
allowClear: !0,
|
|
369
|
-
prefix: /* @__PURE__ */ t(
|
|
375
|
+
prefix: /* @__PURE__ */ t(Se, {}),
|
|
370
376
|
placeholder: "搜索项目",
|
|
371
|
-
value:
|
|
372
|
-
onChange: (e) =>
|
|
377
|
+
value: k,
|
|
378
|
+
onChange: (e) => p(e.target.value)
|
|
373
379
|
}
|
|
374
380
|
) }),
|
|
375
|
-
ne && L.length === 0 ? /* @__PURE__ */ t("div", { className: "phone-workspace-list-loading", children: /* @__PURE__ */ t(O, { description: "加载项目…" }) }) :
|
|
381
|
+
ne && L.length === 0 ? /* @__PURE__ */ t("div", { className: "phone-workspace-list-loading", children: /* @__PURE__ */ t(O, { description: "加载项目…" }) }) : Z.length === 0 ? /* @__PURE__ */ t(
|
|
376
382
|
Y,
|
|
377
383
|
{
|
|
378
|
-
description:
|
|
384
|
+
description: k ? "无匹配项目" : "暂无项目",
|
|
379
385
|
className: "phone-workspace-empty"
|
|
380
386
|
}
|
|
381
|
-
) : /* @__PURE__ */ t("ul", { className: "phone-project-list", children:
|
|
382
|
-
const a =
|
|
387
|
+
) : /* @__PURE__ */ t("ul", { className: "phone-project-list", children: Z.map((e) => {
|
|
388
|
+
const a = me(
|
|
383
389
|
e.created_at
|
|
384
390
|
);
|
|
385
|
-
return /* @__PURE__ */ t("li", { children: /* @__PURE__ */
|
|
391
|
+
return /* @__PURE__ */ t("li", { children: /* @__PURE__ */ u(
|
|
386
392
|
"button",
|
|
387
393
|
{
|
|
388
394
|
type: "button",
|
|
@@ -391,15 +397,15 @@ function Ye() {
|
|
|
391
397
|
ce(e);
|
|
392
398
|
},
|
|
393
399
|
children: [
|
|
394
|
-
/* @__PURE__ */
|
|
400
|
+
/* @__PURE__ */ u("div", { className: "phone-project-item-main", children: [
|
|
395
401
|
/* @__PURE__ */ t("span", { className: "phone-project-item-name", children: e.name }),
|
|
396
|
-
e.scenario_name || a ? /* @__PURE__ */
|
|
402
|
+
e.scenario_name || a ? /* @__PURE__ */ u("div", { className: "phone-project-item-meta", children: [
|
|
397
403
|
e.scenario_name ? /* @__PURE__ */ t("span", { className: "phone-project-item-scenario", children: e.scenario_name }) : null,
|
|
398
404
|
a ? /* @__PURE__ */ t("span", { className: "phone-project-item-time", children: a }) : null
|
|
399
405
|
] }) : null
|
|
400
406
|
] }),
|
|
401
407
|
/* @__PURE__ */ t(
|
|
402
|
-
|
|
408
|
+
ye,
|
|
403
409
|
{
|
|
404
410
|
color: e.role === "ADMIN" ? "blue" : "default",
|
|
405
411
|
className: "phone-project-item-tag",
|
|
@@ -410,36 +416,36 @@ function Ye() {
|
|
|
410
416
|
}
|
|
411
417
|
) }, e.id);
|
|
412
418
|
}) })
|
|
413
|
-
] }) : /* @__PURE__ */
|
|
414
|
-
/* @__PURE__ */
|
|
419
|
+
] }) : /* @__PURE__ */ u("div", { className: "phone-workspace-detail", children: [
|
|
420
|
+
/* @__PURE__ */ u("div", { className: "phone-project-toolbar", children: [
|
|
415
421
|
/* @__PURE__ */ t("div", { className: "phone-project-toolbar-main", children: /* @__PURE__ */ t(
|
|
416
422
|
"button",
|
|
417
423
|
{
|
|
418
424
|
type: "button",
|
|
419
|
-
className:
|
|
425
|
+
className: c === "chat" ? "phone-toolbar-tab phone-toolbar-active" : "phone-toolbar-tab",
|
|
420
426
|
onClick: () => se("team"),
|
|
421
427
|
children: "协作"
|
|
422
428
|
}
|
|
423
429
|
) }),
|
|
424
|
-
/* @__PURE__ */
|
|
430
|
+
/* @__PURE__ */ u(
|
|
425
431
|
"button",
|
|
426
432
|
{
|
|
427
433
|
type: "button",
|
|
428
|
-
className:
|
|
429
|
-
onClick: () =>
|
|
434
|
+
className: c === "members" ? "phone-toolbar-tab phone-toolbar-members phone-toolbar-active" : "phone-toolbar-tab phone-toolbar-members",
|
|
435
|
+
onClick: () => n("members"),
|
|
430
436
|
children: [
|
|
431
437
|
"成员 (",
|
|
432
|
-
|
|
438
|
+
U.length,
|
|
433
439
|
")"
|
|
434
440
|
]
|
|
435
441
|
}
|
|
436
442
|
)
|
|
437
443
|
] }),
|
|
438
|
-
/* @__PURE__ */ t("div", { className: "phone-workspace-detail-body", children:
|
|
444
|
+
/* @__PURE__ */ t("div", { className: "phone-workspace-detail-body", children: c === "members" ? /* @__PURE__ */ t("ul", { className: "phone-member-list", children: U.length === 0 ? /* @__PURE__ */ t(Y, { description: "暂无成员" }) : U.map((e) => /* @__PURE__ */ u("li", { className: "phone-member-item", children: [
|
|
439
445
|
/* @__PURE__ */ t("span", { className: "phone-member-avatar", children: e.member_type === "AGENT" ? "🤖" : "👤" }),
|
|
440
|
-
/* @__PURE__ */
|
|
446
|
+
/* @__PURE__ */ u("div", { className: "phone-member-info", children: [
|
|
441
447
|
/* @__PURE__ */ t("span", { className: "phone-member-name", children: e.display_name }),
|
|
442
|
-
/* @__PURE__ */
|
|
448
|
+
/* @__PURE__ */ u("span", { className: "phone-member-meta", children: [
|
|
443
449
|
e.member_type === "AGENT" ? "Agent" : "成员",
|
|
444
450
|
" ·",
|
|
445
451
|
" ",
|
|
@@ -447,21 +453,21 @@ function Ye() {
|
|
|
447
453
|
] })
|
|
448
454
|
] })
|
|
449
455
|
] }, e.id)) }) : /* @__PURE__ */ t("div", { className: "phone-chat-host", children: /* @__PURE__ */ t(
|
|
450
|
-
|
|
456
|
+
Ne,
|
|
451
457
|
{
|
|
452
458
|
hideTabs: !0,
|
|
453
|
-
activeTab:
|
|
459
|
+
activeTab: N,
|
|
454
460
|
onActiveTabChange: (e) => (
|
|
455
461
|
// @ts-expect-error phase1 宽松化:tab 类型比 chatTab="team" 宽,业务代码未启用 content 模式
|
|
456
|
-
|
|
462
|
+
m(e)
|
|
457
463
|
)
|
|
458
464
|
}
|
|
459
465
|
) }) })
|
|
460
466
|
] }) }),
|
|
461
467
|
re ? /* @__PURE__ */ t("div", { className: "phone-workspace-overlay", children: /* @__PURE__ */ t(O, { description: "正在打开工程…" }) }) : null,
|
|
462
|
-
/* @__PURE__ */ t(
|
|
468
|
+
/* @__PURE__ */ t(fe, {})
|
|
463
469
|
] });
|
|
464
470
|
}
|
|
465
471
|
export {
|
|
466
|
-
|
|
472
|
+
Xe as default
|
|
467
473
|
};
|