@yuku123/z-team-component 0.2.51 → 0.2.53
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/{ChangeLogView-nPAmM1X0.js → ChangeLogView-Dm7C3S14.js} +1 -1
- package/dist/{ComponentDoc-DQqssf25.js → ComponentDoc-y1NfPcHG.js} +506 -461
- package/dist/{InvitationManagementPage-VP4Z5dfA.js → InvitationManagementPage-Btw9iVOl.js} +1 -1
- package/dist/{OnboardingPage-DItjgM-n.js → OnboardingPage-wF0OrgfD.js} +2 -2
- package/dist/ScheduledTasks-CzzgG3n8.js +9417 -0
- package/dist/{SystemShell-5h2iViyD.js → SystemShell-BSCmnOxf.js} +1 -1
- package/dist/{admin-logs-D6HtRcK6.js → admin-logs-vR556ORQ.js} +2 -2
- package/dist/{api-yLI7Ykc0.js → api-Bs0qYxjL.js} +1 -1
- package/dist/{api-C78tCfne.js → api-Jfnj1ybB.js} +287 -270
- package/dist/createWorkspaceWsHandler-obuYWncQ.js +12820 -0
- package/dist/{index-BAY37t4f.js → index-B3LhKHBx.js} +4 -4
- package/dist/{index-CR3sbzOU.js → index-BNShjps9.js} +7 -7
- package/dist/{index-uQn3pzQd.js → index-BXiuxhgz.js} +6 -6
- package/dist/{index-B6bDmTPW.js → index-BbkE7r8M.js} +431 -432
- package/dist/index-BtWtVMgY.js +474 -0
- package/dist/{index-DpcrvKsK.js → index-C5WSr14Z.js} +1 -1
- package/dist/{index-D9AqC2O-.js → index-CYViRXQo.js} +1 -1
- package/dist/{index-Bdu31aRV.js → index-Ck_D109M.js} +2 -2
- package/dist/index-CnEWSsKt.js +582 -0
- package/dist/{index-CLLTeFL6.js → index-CxrBnzg2.js} +1 -1
- package/dist/index-DRrBkbr_.js +100 -0
- package/dist/index-DUmgSTQu.js +9179 -0
- package/dist/index-DWsfQMp8.js +208 -0
- package/dist/{index-td6dkPa2.js → index-Di_vaPxC.js} +3 -3
- package/dist/{index-dPkeRBwq.js → index-Dj5_8ulz.js} +5 -5
- package/dist/{index-qK6pyAGy.js → index-DmZdGNnh.js} +4 -4
- package/dist/index-DqUOCs_a.js +242 -0
- package/dist/{index-DFY3lzq0.js → index-DroZE6Bv.js} +3 -3
- package/dist/{index-BAK7UDvY.js → index-JLtVgwZv.js} +1 -1
- package/dist/index-Onqu_VQO.js +2828 -0
- package/dist/index-Pk7OkJrk.js +1133 -0
- package/dist/index-WIsi8fln.js +339 -0
- package/dist/{index-ClA0896K.js → index-gxEdw4X4.js} +4 -4
- package/dist/index-tADa82Fa.js +130 -0
- package/dist/{index-BX1Wd9x9.js → index-yS7XIUis.js} +3 -3
- package/dist/index.js +1 -1
- package/dist/{instance-D5dhjbgg.js → instance-B0DZJnee.js} +3 -3
- package/dist/pages.js +1 -1
- package/dist/schedule-D3jTrI1R.js +497 -0
- package/dist/{send-default-agent-team-message-C882sJLV.js → send-default-agent-team-message-CbqHaohM.js} +1 -1
- package/dist/{sso-user-Bi9_l9yi.js → sso-user-Dw_wwYa-.js} +1 -1
- package/dist/{training-Ba09KItE.js → training-CETtJBNQ.js} +1 -1
- package/dist/{useAppStore-ibJyVIAX.js → useAppStore-s-CLa-nF.js} +19 -19
- package/dist/webide-6j4OVoNA.js +7845 -0
- package/dist/z-team-component.css +2 -2
- package/package.json +1 -1
- package/dist/createWorkspaceWsHandler-mq-UTF2O.js +0 -13028
- package/dist/index-7nSly-MA.js +0 -405
- package/dist/index-BzBTizx3.js +0 -6685
- package/dist/index-CKCDXE2N.js +0 -13862
- package/dist/index-DDFDZ3CZ.js +0 -844
- package/dist/index-UsGqMo11.js +0 -848
- package/dist/schedule-C-4ksDPw.js +0 -239
- package/dist/webide-RsFP9pHM.js +0 -8087
|
@@ -0,0 +1,474 @@
|
|
|
1
|
+
import { jsxs as d, jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import { r as q, f as le } from "./ctc-sso-DtJHC-2M.js";
|
|
3
|
+
import { r as de, h as K, s as X } from "./sso-user-Dw_wwYa-.js";
|
|
4
|
+
import { ArrowLeftOutlined as ue, PlusOutlined as pe, LogoutOutlined as me, SearchOutlined as he } from "@ant-design/icons";
|
|
5
|
+
import { Spin as M, Button as D, Input as fe, Empty as J, Tag as ge, message as be } from "antd";
|
|
6
|
+
import Q from "query-string";
|
|
7
|
+
import { useState as S, useRef as E, useEffect as y, useMemo as Y, useCallback as B } from "react";
|
|
8
|
+
import { useLocation as ke } from "react-router-dom";
|
|
9
|
+
import { h as R } from "./history-BlrA1eaW.js";
|
|
10
|
+
import { c as we, C as Se } from "./createWorkspaceWsHandler-obuYWncQ.js";
|
|
11
|
+
import { u as c, f as ye, T as ve } from "./useAppStore-s-CLa-nF.js";
|
|
12
|
+
import { o as Te, q as Ne, v as je, w as Ce, e as ee } from "./api-Jfnj1ybB.js";
|
|
13
|
+
import { l as xe, j as Pe } from "./instance-B0DZJnee.js";
|
|
14
|
+
/* empty css */
|
|
15
|
+
import { s as _e } from "./admin-logs-vR556ORQ.js";
|
|
16
|
+
const ae = 2e4;
|
|
17
|
+
function Ee(l, o = ae, n = globalThis) {
|
|
18
|
+
let s = null;
|
|
19
|
+
return {
|
|
20
|
+
start() {
|
|
21
|
+
s == null && (s = n.setTimeout(() => {
|
|
22
|
+
s = null, l();
|
|
23
|
+
}, o));
|
|
24
|
+
},
|
|
25
|
+
stop() {
|
|
26
|
+
s != null && (n.clearTimeout(s), s = null);
|
|
27
|
+
}
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
function Ae({ text: l, onRetry: o }) {
|
|
31
|
+
return /* @__PURE__ */ d("div", { style: { marginTop: 12, textAlign: "center" }, children: [
|
|
32
|
+
/* @__PURE__ */ t("div", { style: { marginBottom: 10 }, children: l }),
|
|
33
|
+
/* @__PURE__ */ t(
|
|
34
|
+
"button",
|
|
35
|
+
{
|
|
36
|
+
type: "button",
|
|
37
|
+
onClick: o,
|
|
38
|
+
style: {
|
|
39
|
+
padding: "6px 16px",
|
|
40
|
+
borderRadius: 6,
|
|
41
|
+
border: "1px solid #1677ff",
|
|
42
|
+
background: "#1677ff",
|
|
43
|
+
color: "#fff",
|
|
44
|
+
cursor: "pointer"
|
|
45
|
+
},
|
|
46
|
+
children: "重新登录"
|
|
47
|
+
}
|
|
48
|
+
)
|
|
49
|
+
] });
|
|
50
|
+
}
|
|
51
|
+
const Ie = "统一登录接入超时(可能是网络抖动或服务正在重启),请重新登录。";
|
|
52
|
+
function Le({
|
|
53
|
+
loadingText: l,
|
|
54
|
+
timeoutText: o = Ie,
|
|
55
|
+
onRetry: n,
|
|
56
|
+
timeoutMs: s = ae,
|
|
57
|
+
className: r
|
|
58
|
+
}) {
|
|
59
|
+
const [N, h] = S(!1), g = E(n);
|
|
60
|
+
return g.current = n, y(() => {
|
|
61
|
+
const m = Ee(
|
|
62
|
+
() => h(!0),
|
|
63
|
+
s
|
|
64
|
+
);
|
|
65
|
+
return m.start(), () => m.stop();
|
|
66
|
+
}, [s]), N ? /* @__PURE__ */ d("div", { className: r, children: [
|
|
67
|
+
/* @__PURE__ */ t(M, { description: "" }),
|
|
68
|
+
/* @__PURE__ */ t(
|
|
69
|
+
Ae,
|
|
70
|
+
{
|
|
71
|
+
text: o,
|
|
72
|
+
onRetry: () => g.current()
|
|
73
|
+
}
|
|
74
|
+
)
|
|
75
|
+
] }) : /* @__PURE__ */ t("div", { className: r, children: /* @__PURE__ */ t(M, { description: l }) });
|
|
76
|
+
}
|
|
77
|
+
function Me(l, o) {
|
|
78
|
+
y(() => {
|
|
79
|
+
if (l == null)
|
|
80
|
+
return;
|
|
81
|
+
c.getState().setObserverStatus(null);
|
|
82
|
+
const n = () => {
|
|
83
|
+
const m = c.getState();
|
|
84
|
+
m.loadMessages().catch(() => {
|
|
85
|
+
}), m.loadRunningExecutions().catch(() => {
|
|
86
|
+
});
|
|
87
|
+
const f = m.activeTaskChat;
|
|
88
|
+
f != null && f.taskId && m.loadTaskMessages(f.taskId).catch(() => {
|
|
89
|
+
}), m.loadFileTree(void 0, !0).catch(() => {
|
|
90
|
+
});
|
|
91
|
+
}, s = Te((m) => {
|
|
92
|
+
c.getState().setWsState(m);
|
|
93
|
+
});
|
|
94
|
+
Ne(l, o, n), c.getState().loadRunningExecutions().catch(() => {
|
|
95
|
+
});
|
|
96
|
+
const r = c.getState(), { handler: N, dispose: h } = we({
|
|
97
|
+
projectId: l,
|
|
98
|
+
token: o,
|
|
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 = je(N);
|
|
109
|
+
return () => {
|
|
110
|
+
g(), h(), Ce(), s(), c.getState().setObserverStatus(null);
|
|
111
|
+
};
|
|
112
|
+
}, [l, o]);
|
|
113
|
+
}
|
|
114
|
+
const Re = `${window.publicPath ?? "/"}logo.svg`;
|
|
115
|
+
function te() {
|
|
116
|
+
const { pathname: l, search: o } = R.location, n = Q.parse(o);
|
|
117
|
+
if (!n.projectId && !n.project_id)
|
|
118
|
+
return;
|
|
119
|
+
delete n.projectId, delete n.project_id;
|
|
120
|
+
const s = Q.stringify(n);
|
|
121
|
+
R.replace({
|
|
122
|
+
pathname: l,
|
|
123
|
+
search: s ? `?${s}` : ""
|
|
124
|
+
});
|
|
125
|
+
}
|
|
126
|
+
function Xe() {
|
|
127
|
+
const l = ke(), [o, n] = S("list"), [s, r] = S("chat"), [N, h] = S("team"), [g, m] = S(""), [f, V] = S(!1), [re, A] = S(!1), {
|
|
128
|
+
currentProject: v,
|
|
129
|
+
currentUser: O,
|
|
130
|
+
projects: I,
|
|
131
|
+
loading: ne,
|
|
132
|
+
members: W,
|
|
133
|
+
token: oe,
|
|
134
|
+
loadProjects: z,
|
|
135
|
+
expandProject: H,
|
|
136
|
+
updateCurrentUser: j,
|
|
137
|
+
requestChatScrollBottom: w
|
|
138
|
+
} = c(), k = Y(() => {
|
|
139
|
+
const e = Q.parse(l.search), a = String(e.projectId ?? e.project_id ?? "").trim();
|
|
140
|
+
if (!a)
|
|
141
|
+
return null;
|
|
142
|
+
const i = Number(a);
|
|
143
|
+
return Number.isFinite(i) && i > 0 ? i : null;
|
|
144
|
+
}, [l.search]), U = E(!1), C = E(!1), x = E(!1), Z = E(k);
|
|
145
|
+
Z.current = k, Me(v == null ? void 0 : v.id, oe), y(() => (document.body.classList.add("team-phone-workspace-route"), () => {
|
|
146
|
+
document.body.classList.remove("team-phone-workspace-route");
|
|
147
|
+
}), []);
|
|
148
|
+
const se = B(
|
|
149
|
+
(e) => {
|
|
150
|
+
r("chat"), h(e), w(e, !0);
|
|
151
|
+
},
|
|
152
|
+
[w]
|
|
153
|
+
);
|
|
154
|
+
y(() => {
|
|
155
|
+
let e = !1, a = 0;
|
|
156
|
+
const i = 100;
|
|
157
|
+
let P = !1, F = 0;
|
|
158
|
+
const L = 3, T = (b) => {
|
|
159
|
+
const u = c.getState().token;
|
|
160
|
+
if (Z.current != null) {
|
|
161
|
+
e || (j(X(b)), V(!0)), ee().then((G) => {
|
|
162
|
+
e || j(G);
|
|
163
|
+
}).catch(() => {
|
|
164
|
+
!e && u && (localStorage.removeItem("z_team_token"), c.setState({ token: "" }));
|
|
165
|
+
});
|
|
166
|
+
return;
|
|
167
|
+
}
|
|
168
|
+
ee().then((G) => {
|
|
169
|
+
e || j(G);
|
|
170
|
+
}).catch(() => {
|
|
171
|
+
e || (u && (localStorage.removeItem("z_team_token"), c.setState({ token: "" })), j(X(b)));
|
|
172
|
+
}).finally(() => {
|
|
173
|
+
e || V(!0);
|
|
174
|
+
});
|
|
175
|
+
};
|
|
176
|
+
return (() => {
|
|
177
|
+
if (e)
|
|
178
|
+
return;
|
|
179
|
+
const b = async () => {
|
|
180
|
+
if (e)
|
|
181
|
+
return;
|
|
182
|
+
let u = de();
|
|
183
|
+
if ((!u || !K(u)) && !P) {
|
|
184
|
+
P = !0;
|
|
185
|
+
try {
|
|
186
|
+
const p = await le();
|
|
187
|
+
p.kind === "authenticated" ? u = p.user : p.kind === "unauthenticated" && (F += 1);
|
|
188
|
+
} catch {
|
|
189
|
+
} finally {
|
|
190
|
+
P = !1;
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
if (u && K(u)) {
|
|
194
|
+
T(u);
|
|
195
|
+
return;
|
|
196
|
+
}
|
|
197
|
+
if (F >= L) {
|
|
198
|
+
q();
|
|
199
|
+
return;
|
|
200
|
+
}
|
|
201
|
+
if (a += 1, a >= i) {
|
|
202
|
+
q();
|
|
203
|
+
return;
|
|
204
|
+
}
|
|
205
|
+
window.setTimeout(() => {
|
|
206
|
+
b();
|
|
207
|
+
}, 150);
|
|
208
|
+
};
|
|
209
|
+
b();
|
|
210
|
+
})(), () => {
|
|
211
|
+
e = !0;
|
|
212
|
+
};
|
|
213
|
+
}, [j]), y(() => {
|
|
214
|
+
O && z();
|
|
215
|
+
}, [O, z]), y(() => {
|
|
216
|
+
var i;
|
|
217
|
+
if (!f || k != null || o === "project" || x.current)
|
|
218
|
+
return;
|
|
219
|
+
const e = c.getState(), a = (i = e.currentProject) == null ? void 0 : i.id;
|
|
220
|
+
a == null || !e.expandedProjectIds.includes(String(a)) || (n("project"), r("chat"), h("team"), w("team", !0));
|
|
221
|
+
}, [f, k, o, w]);
|
|
222
|
+
const ce = B(
|
|
223
|
+
async (e) => {
|
|
224
|
+
x.current = !1, A(!0);
|
|
225
|
+
try {
|
|
226
|
+
await H(e), n("project"), r("chat"), h("team");
|
|
227
|
+
const a = c.getState();
|
|
228
|
+
a.currentProject && await a.refreshProjectPanels(
|
|
229
|
+
String(a.currentProject.id),
|
|
230
|
+
a.projectSwitchSeq,
|
|
231
|
+
!1
|
|
232
|
+
), w("team", !0);
|
|
233
|
+
} finally {
|
|
234
|
+
A(!1);
|
|
235
|
+
}
|
|
236
|
+
},
|
|
237
|
+
[H, w]
|
|
238
|
+
);
|
|
239
|
+
y(() => {
|
|
240
|
+
var L;
|
|
241
|
+
if (!f || k == null || U.current || C.current)
|
|
242
|
+
return;
|
|
243
|
+
const e = k == null ? "" : String(k), a = c.getState();
|
|
244
|
+
if (String(((L = a.currentProject) == null ? void 0 : L.id) ?? "") === e && a.expandedProjectIds.includes(e)) {
|
|
245
|
+
U.current = !0, te(), x.current = !1, n("project"), r("chat"), h("team"), c.getState().loadMessages().catch(() => {
|
|
246
|
+
});
|
|
247
|
+
return;
|
|
248
|
+
}
|
|
249
|
+
let i = !1;
|
|
250
|
+
C.current = !0, A(!0);
|
|
251
|
+
const P = async () => {
|
|
252
|
+
const T = Date.now() + 4e3;
|
|
253
|
+
for (; Date.now() < T; ) {
|
|
254
|
+
if (i)
|
|
255
|
+
return;
|
|
256
|
+
const _ = c.getState();
|
|
257
|
+
if (!_.loading || _.projects.length > 0)
|
|
258
|
+
return;
|
|
259
|
+
await new Promise((b) => setTimeout(b, 50));
|
|
260
|
+
}
|
|
261
|
+
};
|
|
262
|
+
return (async () => {
|
|
263
|
+
try {
|
|
264
|
+
if (await P(), i)
|
|
265
|
+
return;
|
|
266
|
+
let {
|
|
267
|
+
token: T,
|
|
268
|
+
projects: _,
|
|
269
|
+
expandProject: b
|
|
270
|
+
} = c.getState(), u = _.find((p) => p.id === e);
|
|
271
|
+
if (!u) {
|
|
272
|
+
const p = await xe(e, T);
|
|
273
|
+
if (i)
|
|
274
|
+
return;
|
|
275
|
+
if (p.status === "NOT_FOUND" || !p.scenarioInstance) {
|
|
276
|
+
be.info("无此工程");
|
|
277
|
+
return;
|
|
278
|
+
}
|
|
279
|
+
if (u = await Pe(e, T), i)
|
|
280
|
+
return;
|
|
281
|
+
}
|
|
282
|
+
if (i || !u)
|
|
283
|
+
return;
|
|
284
|
+
if (U.current = !0, await b(u), !i) {
|
|
285
|
+
x.current = !1, n("project"), r("chat"), h("team"), te();
|
|
286
|
+
const p = c.getState();
|
|
287
|
+
p.currentProject && await p.refreshProjectPanels(
|
|
288
|
+
String(p.currentProject.id),
|
|
289
|
+
p.projectSwitchSeq,
|
|
290
|
+
!1
|
|
291
|
+
), w("team", !0);
|
|
292
|
+
}
|
|
293
|
+
} catch {
|
|
294
|
+
} finally {
|
|
295
|
+
A(!1), C.current = !1, c.getState().loadProjects();
|
|
296
|
+
}
|
|
297
|
+
})(), () => {
|
|
298
|
+
i = !0, C.current && (C.current = !1);
|
|
299
|
+
};
|
|
300
|
+
}, [f, k]);
|
|
301
|
+
const $ = Y(() => {
|
|
302
|
+
const e = g.trim().toLowerCase();
|
|
303
|
+
return e ? I.filter(
|
|
304
|
+
(a) => a.name.toLowerCase().includes(e) || (a.scenario_name ?? "").toLowerCase().includes(e)
|
|
305
|
+
) : I;
|
|
306
|
+
}, [g, I]), ie = B(() => {
|
|
307
|
+
x.current = !0, n("list"), r("chat");
|
|
308
|
+
}, []);
|
|
309
|
+
return !f || !O ? /* @__PURE__ */ t(
|
|
310
|
+
Le,
|
|
311
|
+
{
|
|
312
|
+
className: "phone-workspace phone-workspace-loading",
|
|
313
|
+
loadingText: "正在接入 4A 统一登录…",
|
|
314
|
+
timeoutText: "4A 统一登录接入超时(可能是网络抖动或服务正在重启),请重新登录。",
|
|
315
|
+
onRetry: () => q()
|
|
316
|
+
}
|
|
317
|
+
) : /* @__PURE__ */ d("div", { className: "phone-workspace", children: [
|
|
318
|
+
/* @__PURE__ */ d("header", { className: "phone-workspace-header", children: [
|
|
319
|
+
o === "project" ? /* @__PURE__ */ t(
|
|
320
|
+
D,
|
|
321
|
+
{
|
|
322
|
+
type: "text",
|
|
323
|
+
icon: /* @__PURE__ */ t(ue, {}),
|
|
324
|
+
className: "phone-workspace-back",
|
|
325
|
+
onClick: ie,
|
|
326
|
+
"aria-label": "返回项目列表"
|
|
327
|
+
}
|
|
328
|
+
) : /* @__PURE__ */ t(
|
|
329
|
+
"img",
|
|
330
|
+
{
|
|
331
|
+
src: Re,
|
|
332
|
+
alt: "Z-Team",
|
|
333
|
+
className: "phone-workspace-logo",
|
|
334
|
+
onClick: () => R.push("/welcome"),
|
|
335
|
+
style: { cursor: "pointer" }
|
|
336
|
+
}
|
|
337
|
+
),
|
|
338
|
+
/* @__PURE__ */ t("div", { className: "phone-workspace-header-title", children: o === "list" ? /* @__PURE__ */ t(
|
|
339
|
+
"span",
|
|
340
|
+
{
|
|
341
|
+
className: "phone-workspace-brand",
|
|
342
|
+
onClick: () => R.push("/welcome"),
|
|
343
|
+
style: { cursor: "pointer" },
|
|
344
|
+
children: "Z-Team"
|
|
345
|
+
}
|
|
346
|
+
) : /* @__PURE__ */ t("span", { className: "phone-workspace-project-name", children: (v == null ? void 0 : v.name) ?? "工程" }) }),
|
|
347
|
+
/* @__PURE__ */ d("div", { className: "phone-workspace-header-actions", children: [
|
|
348
|
+
o === "list" ? /* @__PURE__ */ t(
|
|
349
|
+
D,
|
|
350
|
+
{
|
|
351
|
+
type: "text",
|
|
352
|
+
icon: /* @__PURE__ */ t(pe, {}),
|
|
353
|
+
onClick: () => {
|
|
354
|
+
},
|
|
355
|
+
"aria-label": "新建"
|
|
356
|
+
}
|
|
357
|
+
) : null,
|
|
358
|
+
/* @__PURE__ */ t(
|
|
359
|
+
D,
|
|
360
|
+
{
|
|
361
|
+
type: "text",
|
|
362
|
+
icon: /* @__PURE__ */ t(me, {}),
|
|
363
|
+
onClick: () => {
|
|
364
|
+
_e();
|
|
365
|
+
},
|
|
366
|
+
"aria-label": "退出"
|
|
367
|
+
}
|
|
368
|
+
)
|
|
369
|
+
] })
|
|
370
|
+
] }),
|
|
371
|
+
/* @__PURE__ */ t("main", { className: "phone-workspace-main", children: o === "list" ? /* @__PURE__ */ d("div", { className: "phone-workspace-list", children: [
|
|
372
|
+
/* @__PURE__ */ t("div", { className: "phone-workspace-search", children: /* @__PURE__ */ t(
|
|
373
|
+
fe,
|
|
374
|
+
{
|
|
375
|
+
allowClear: !0,
|
|
376
|
+
prefix: /* @__PURE__ */ t(he, {}),
|
|
377
|
+
placeholder: "搜索项目",
|
|
378
|
+
value: g,
|
|
379
|
+
onChange: (e) => m(e.target.value)
|
|
380
|
+
}
|
|
381
|
+
) }),
|
|
382
|
+
ne && I.length === 0 ? /* @__PURE__ */ t("div", { className: "phone-workspace-list-loading", children: /* @__PURE__ */ t(M, { description: "加载项目…" }) }) : $.length === 0 ? /* @__PURE__ */ t(
|
|
383
|
+
J,
|
|
384
|
+
{
|
|
385
|
+
description: g ? "无匹配项目" : "暂无项目",
|
|
386
|
+
className: "phone-workspace-empty"
|
|
387
|
+
}
|
|
388
|
+
) : /* @__PURE__ */ t("ul", { className: "phone-project-list", children: $.map((e) => {
|
|
389
|
+
const a = ye(
|
|
390
|
+
e.created_at
|
|
391
|
+
);
|
|
392
|
+
return /* @__PURE__ */ t("li", { children: /* @__PURE__ */ d(
|
|
393
|
+
"button",
|
|
394
|
+
{
|
|
395
|
+
type: "button",
|
|
396
|
+
className: "phone-project-item",
|
|
397
|
+
onClick: () => {
|
|
398
|
+
ce(e);
|
|
399
|
+
},
|
|
400
|
+
children: [
|
|
401
|
+
/* @__PURE__ */ d("div", { className: "phone-project-item-main", children: [
|
|
402
|
+
/* @__PURE__ */ t("span", { className: "phone-project-item-name", children: e.name }),
|
|
403
|
+
e.scenario_name || a ? /* @__PURE__ */ d("div", { className: "phone-project-item-meta", children: [
|
|
404
|
+
e.scenario_name ? /* @__PURE__ */ t("span", { className: "phone-project-item-scenario", children: e.scenario_name }) : null,
|
|
405
|
+
a ? /* @__PURE__ */ t("span", { className: "phone-project-item-time", children: a }) : null
|
|
406
|
+
] }) : null
|
|
407
|
+
] }),
|
|
408
|
+
/* @__PURE__ */ t(
|
|
409
|
+
ge,
|
|
410
|
+
{
|
|
411
|
+
color: e.role === "ADMIN" ? "blue" : "default",
|
|
412
|
+
className: "phone-project-item-tag",
|
|
413
|
+
children: e.role === "ADMIN" ? "我创建" : "参与"
|
|
414
|
+
}
|
|
415
|
+
)
|
|
416
|
+
]
|
|
417
|
+
}
|
|
418
|
+
) }, e.id);
|
|
419
|
+
}) })
|
|
420
|
+
] }) : /* @__PURE__ */ d("div", { className: "phone-workspace-detail", children: [
|
|
421
|
+
/* @__PURE__ */ d("div", { className: "phone-project-toolbar", children: [
|
|
422
|
+
/* @__PURE__ */ t("div", { className: "phone-project-toolbar-main", children: /* @__PURE__ */ t(
|
|
423
|
+
"button",
|
|
424
|
+
{
|
|
425
|
+
type: "button",
|
|
426
|
+
className: s === "chat" ? "phone-toolbar-tab phone-toolbar-active" : "phone-toolbar-tab",
|
|
427
|
+
onClick: () => se("team"),
|
|
428
|
+
children: "协作"
|
|
429
|
+
}
|
|
430
|
+
) }),
|
|
431
|
+
/* @__PURE__ */ d(
|
|
432
|
+
"button",
|
|
433
|
+
{
|
|
434
|
+
type: "button",
|
|
435
|
+
className: s === "members" ? "phone-toolbar-tab phone-toolbar-members phone-toolbar-active" : "phone-toolbar-tab phone-toolbar-members",
|
|
436
|
+
onClick: () => r("members"),
|
|
437
|
+
children: [
|
|
438
|
+
"成员 (",
|
|
439
|
+
W.length,
|
|
440
|
+
")"
|
|
441
|
+
]
|
|
442
|
+
}
|
|
443
|
+
)
|
|
444
|
+
] }),
|
|
445
|
+
/* @__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__ */ d("li", { className: "phone-member-item", children: [
|
|
446
|
+
/* @__PURE__ */ t("span", { className: "phone-member-avatar", children: e.member_type === "AGENT" ? "🤖" : "👤" }),
|
|
447
|
+
/* @__PURE__ */ d("div", { className: "phone-member-info", children: [
|
|
448
|
+
/* @__PURE__ */ t("span", { className: "phone-member-name", children: e.display_name }),
|
|
449
|
+
/* @__PURE__ */ d("span", { className: "phone-member-meta", children: [
|
|
450
|
+
e.member_type === "AGENT" ? "Agent" : "成员",
|
|
451
|
+
" ·",
|
|
452
|
+
" ",
|
|
453
|
+
e.role
|
|
454
|
+
] })
|
|
455
|
+
] })
|
|
456
|
+
] }, e.id)) }) : /* @__PURE__ */ t("div", { className: "phone-chat-host", children: /* @__PURE__ */ t(
|
|
457
|
+
Se,
|
|
458
|
+
{
|
|
459
|
+
hideTabs: !0,
|
|
460
|
+
activeTab: N,
|
|
461
|
+
onActiveTabChange: (e) => (
|
|
462
|
+
// @ts-expect-error phase1 宽松化:tab 类型比 chatTab="team" 宽,业务代码未启用 content 模式
|
|
463
|
+
h(e)
|
|
464
|
+
)
|
|
465
|
+
}
|
|
466
|
+
) }) })
|
|
467
|
+
] }) }),
|
|
468
|
+
re ? /* @__PURE__ */ t("div", { className: "phone-workspace-overlay", children: /* @__PURE__ */ t(M, { description: "正在打开工程…" }) }) : null,
|
|
469
|
+
/* @__PURE__ */ t(ve, {})
|
|
470
|
+
] });
|
|
471
|
+
}
|
|
472
|
+
export {
|
|
473
|
+
Xe as default
|
|
474
|
+
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsxs as n, jsx as e } from "react/jsx-runtime";
|
|
2
2
|
import { useState as N, useRef as A, useEffect as d, useCallback as h } from "react";
|
|
3
3
|
import { h as _ } from "./history-BlrA1eaW.js";
|
|
4
|
-
import { C as u } from "./ChangeLogView-
|
|
4
|
+
import { C as u } from "./ChangeLogView-Dm7C3S14.js";
|
|
5
5
|
const T = "_docs_t4zom_6", v = "_bgLayer_t4zom_33", p = "_bgGrid_t4zom_47", y = "_navbar_t4zom_65", f = "_navLeft_t4zom_81", z = "_navBack_t4zom_87", k = "_navBrand_t4zom_104", I = "_navLogo_t4zom_110", q = "_navTitle_t4zom_124", B = "_navLink_t4zom_130", L = "_layout_t4zom_144", C = "_sidebar_t4zom_154", S = "_sidebarInner_t4zom_165", G = "_sidebarTitle_t4zom_169", E = "_tocItem_t4zom_179", D = "_tocActive_t4zom_201", K = "_tocNum_t4zom_207", F = "_content_t4zom_219", w = "_section_t4zom_229", O = "_secTitle_t4zom_234", R = "_subTitle_t4zom_244", x = "_lead_t4zom_251", W = "_list_t4zom_266", M = "_olist_t4zom_297", Z = "_callout_t4zom_332", Q = "_calloutGreen_t4zom_344", P = "_calloutBlue_t4zom_356", U = "_calloutRed_t4zom_368", V = "_inlineCode_t4zom_385", H = "_codeBlock_t4zom_398", j = "_tableWrap_t4zom_413", Y = "_table_t4zom_413", $ = "_tableKey_t4zom_452", J = "_tableIcon_t4zom_457", X = "_faqList_t4zom_463", ee = "_faqItem_t4zom_469", le = "_faqQ_t4zom_481", ne = "_faqA_t4zom_488", ce = "_changelogEmbed_t4zom_495", ie = "_changelogTip_t4zom_499", te = "_changelogLink_t4zom_505", ae = "_docFooter_t4zom_516", se = "_backBtn_t4zom_525", re = "_docFooterText_t4zom_544", l = {
|
|
6
6
|
docs: T,
|
|
7
7
|
bgLayer: v,
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsxs as a, jsx as i, Fragment as B } from "react/jsx-runtime";
|
|
2
2
|
import { useState as d, useRef as F, useCallback as D, useEffect as R } from "react";
|
|
3
|
-
import { u as O } from "./useAppStore-
|
|
3
|
+
import { u as O } from "./useAppStore-s-CLa-nF.js";
|
|
4
4
|
/* empty css */
|
|
5
|
-
import { T as P, g as U } from "./api-
|
|
5
|
+
import { T as P, g as U } from "./api-Jfnj1ybB.js";
|
|
6
6
|
async function y(o, s) {
|
|
7
7
|
const n = await o.text().catch(() => "");
|
|
8
8
|
let t = {};
|