@yuku123/z-team-component 0.2.36 → 0.2.38
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 +542 -0
- package/dist/{ComponentDoc-B2qJmtU6.js → ComponentDoc-CSdxKqUS.js} +3 -3
- package/dist/{InvitationManagementPage-61uxWWwF.js → InvitationManagementPage-CffDsyab.js} +1 -1
- package/dist/{OnboardingPage-BBKst6Qf.js → OnboardingPage-2pc1hLlZ.js} +2 -2
- package/dist/SmartWorkbench.module-xRRmpTTw.js +85 -0
- package/dist/{SystemShell-C52BvjTM.js → SystemShell-Vb8zer_S.js} +160 -158
- package/dist/{admin-logs-Dv86pFvY.js → admin-logs-D6HtRcK6.js} +2 -2
- package/dist/{api-19TXED_O.js → api-C78tCfne.js} +156 -155
- package/dist/{api-Bf3E-c73.js → api-DjTLmeZp.js} +1 -1
- package/dist/{createWorkspaceWsHandler-CBk4DqP4.js → createWorkspaceWsHandler-mq-UTF2O.js} +4 -4
- package/dist/{index-DOPkM2W8.js → index-7nSly-MA.js} +6 -6
- package/dist/{index-BG755_pa.js → index-B3zpx3YB.js} +1 -1
- package/dist/{index-BoGVJ0hC.js → index-BAK7UDvY.js} +1 -1
- package/dist/{index-tDO0JBvI.js → index-BAY37t4f.js} +5 -5
- package/dist/{index-DHh0L9FB.js → index-BT3VobW1.js} +9 -9
- package/dist/{index-BTLD5gUt.js → index-BX1Wd9x9.js} +3 -3
- package/dist/{index-BIJnjJd5.js → index-Bdu31aRV.js} +2 -2
- package/dist/{index-ff3leJCK.js → index-BoBuTvFh.js} +3 -3
- package/dist/{index-7VAcVmtR.js → index-BtaRkt8l.js} +7 -7
- package/dist/{index-CFakyLYo.js → index-C52lmww8.js} +65 -56
- package/dist/{index-DYgD6BuB.js → index-ClA0896K.js} +4 -4
- package/dist/{index-B_EBV24V.js → index-D9AqC2O-.js} +1 -1
- package/dist/{index-BjqYiZpC.js → index-DFY3lzq0.js} +3 -3
- package/dist/{index-BEqPF6wm.js → index-Dn3Q_5em.js} +862 -863
- package/dist/{index-Bd57t_yF.js → index-DpcrvKsK.js} +1 -1
- package/dist/index-a4cM-7bG.js +1433 -0
- package/dist/{index-CEmwgW65.js → index-droRtYU6.js} +5 -5
- package/dist/{index-x4-W5ClM.js → index-qK6pyAGy.js} +4 -4
- package/dist/index.js +1 -1
- package/dist/{instance-D951fRuD.js → instance-D5dhjbgg.js} +1 -1
- package/dist/pages.js +1 -1
- package/dist/{schedule-DIlnA1uC.js → schedule-C-4ksDPw.js} +1 -1
- package/dist/{send-default-agent-team-message-Bbs2rMNf.js → send-default-agent-team-message-C882sJLV.js} +1 -1
- package/dist/{sso-user-BEY5ICaR.js → sso-user-Bi9_l9yi.js} +1 -1
- package/dist/{training-B-9tNFQw.js → training-Ba09KItE.js} +1 -1
- package/dist/{useAppStore-BQN-26ns.js → useAppStore-ibJyVIAX.js} +1 -1
- package/dist/{webide-mvUPb2k9.js → webide-BEHelWeW.js} +4 -4
- package/dist/z-team-component.css +1 -1
- package/package.json +1 -1
- package/dist/ChangeLogView-FLd1wS8H.js +0 -502
- package/dist/DebugPlayground-cxffrMgF.js +0 -15
- package/dist/SmartWorkbench.module-DzQskKT0.js +0 -85
- package/dist/index-Ddm63H7s.js +0 -1335
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import { jsxs as a, jsx as e, Fragment as bt } from "react/jsx-runtime";
|
|
2
|
-
import { a as
|
|
2
|
+
import { a as Se, v as Qe, f as Re, B as Oe, u as ln, T as Ht, ai as xo, K as kn, t as Mt, aj as Xt, ak as Ao, al as Po, c as $o, ag as Eo, am as oo, k as Lt, an as Mo, y as Do, H as Fo, i as ao, ao as Ro, o as Oo, l as Bo, n as jo, m as Wo, e as Ho, ap as Uo } from "./api-C78tCfne.js";
|
|
3
3
|
import { s as zo, r as en, f as Go } from "./ctc-sso-DtJHC-2M.js";
|
|
4
|
-
import { i as qo } from "./ComponentDoc-
|
|
5
|
-
import { r as Ko, h as Ln, s as xn } from "./sso-user-
|
|
4
|
+
import { i as qo } from "./ComponentDoc-CSdxKqUS.js";
|
|
5
|
+
import { r as Ko, h as Ln, s as xn } from "./sso-user-Bi9_l9yi.js";
|
|
6
6
|
import { Input as zt, Tooltip as Gt, Spin as at, Tabs as wn, Popconfirm as fn, Button as gt, Empty as tn, Modal as qt, Form as jt, Checkbox as Vo, Tag as Yo, Select as Jo, Popover as Qo, Dropdown as Zo, Avatar as Xo, message as An } from "antd";
|
|
7
7
|
import Ut from "query-string";
|
|
8
|
-
import { useState as c, useRef as le, useCallback as q, useEffect as
|
|
8
|
+
import { useState as c, useRef as le, useCallback as q, useEffect as H, useLayoutEffect as ro, useMemo as Fe, memo as ea, Suspense as Pn, lazy as ct } from "react";
|
|
9
9
|
import { useLocation as ta, useNavigate as na } from "react-router-dom";
|
|
10
10
|
import { h as it } from "./history-BlrA1eaW.js";
|
|
11
|
-
import { s as fe, p as oa, B as so, S as io, o as aa, q as $n, t as En, v as ra, w as sa, x as d, y as dn, C as ia, c as ca } from "./createWorkspaceWsHandler-
|
|
11
|
+
import { s as fe, p as oa, B as so, S as io, o as aa, q as $n, t as En, v as ra, w as sa, x as d, y as dn, C as ia, c as ca } from "./createWorkspaceWsHandler-mq-UTF2O.js";
|
|
12
12
|
import { SearchOutlined as sn, CloseOutlined as Dt, ProfileOutlined as la, FileTextOutlined as co, CustomerServiceOutlined as lo, ThunderboltOutlined as Mn, MessageOutlined as da, ReloadOutlined as ma, UndoOutlined as ua, DeleteOutlined as pa, FolderOpenOutlined as ha, LinkOutlined as fa, BugOutlined as Sn, SolutionOutlined as ga, BellOutlined as _a, CheckOutlined as ya, FilterOutlined as va, DashboardOutlined as ka, HeartOutlined as ba, ReadOutlined as Na, BookOutlined as wa, BulbOutlined as Sa, TeamOutlined as Ca, ProductOutlined as Ta, CodeOutlined as Ia, CloudServerOutlined as La, SettingOutlined as xa, AppstoreOutlined as Aa, RobotOutlined as Pa, UserOutlined as $a, NotificationOutlined as Ea, LogoutOutlined as Ma } from "@ant-design/icons";
|
|
13
|
-
import { u as
|
|
14
|
-
import { h as Ra, f as Oa, m as Ba, a as ja, E as Wa } from "./schedule-
|
|
15
|
-
import { s as Ha } from "./admin-logs-
|
|
16
|
-
import { a as Ua, l as za, j as Ga } from "./instance-
|
|
13
|
+
import { u as M, s as xe, i as Da, p as nn, T as Fa } from "./useAppStore-ibJyVIAX.js";
|
|
14
|
+
import { h as Ra, f as Oa, m as Ba, a as ja, E as Wa } from "./schedule-C-4ksDPw.js";
|
|
15
|
+
import { s as Ha } from "./admin-logs-D6HtRcK6.js";
|
|
16
|
+
import { a as Ua, l as za, j as Ga } from "./instance-D5dhjbgg.js";
|
|
17
17
|
import Dn from "react-markdown";
|
|
18
18
|
import Fn from "rehype-highlight";
|
|
19
19
|
import Rn from "remark-gfm";
|
|
@@ -21,29 +21,29 @@ import { ListTable as qa } from "@yuku123/z-frontend-common/ui";
|
|
|
21
21
|
/* empty css */
|
|
22
22
|
import { s as Ka, i as Va } from "./mobile-client-O3yr9h6t.js";
|
|
23
23
|
function Ya(t, o, r, s) {
|
|
24
|
-
const [m, g] = c(t), w = le(null), L = le(!1), S = le(0), F = le(t),
|
|
25
|
-
|
|
24
|
+
const [m, g] = c(t), w = le(null), L = le(!1), S = le(0), F = le(t), K = le(o), E = le(r);
|
|
25
|
+
K.current = o, E.current = r;
|
|
26
26
|
const v = q(
|
|
27
27
|
(I) => {
|
|
28
28
|
I.preventDefault(), L.current = !0, S.current = I.clientX, F.current = m, document.body.style.cursor = "col-resize", document.body.style.userSelect = "none";
|
|
29
29
|
},
|
|
30
30
|
[m]
|
|
31
31
|
);
|
|
32
|
-
return
|
|
32
|
+
return H(() => {
|
|
33
33
|
g((I) => Math.min(r, Math.max(o, I)));
|
|
34
|
-
}, [o, r]),
|
|
35
|
-
const I = (
|
|
34
|
+
}, [o, r]), H(() => {
|
|
35
|
+
const I = (U) => {
|
|
36
36
|
if (!L.current) return;
|
|
37
|
-
const z =
|
|
37
|
+
const z = U.clientX - S.current, V = F.current + z, Z = Math.min(
|
|
38
38
|
E.current,
|
|
39
|
-
Math.max(
|
|
40
|
-
),
|
|
41
|
-
|
|
39
|
+
Math.max(K.current, V)
|
|
40
|
+
), ne = w.current;
|
|
41
|
+
ne && (ne.style.width = Z + "px", ne.style.minWidth = Z + "px");
|
|
42
42
|
}, x = () => {
|
|
43
43
|
if (!L.current) return;
|
|
44
44
|
L.current = !1;
|
|
45
|
-
const
|
|
46
|
-
|
|
45
|
+
const U = w.current;
|
|
46
|
+
U && g(U.offsetWidth), document.body.style.cursor = "", document.body.style.userSelect = "";
|
|
47
47
|
};
|
|
48
48
|
return document.addEventListener("mousemove", I), document.addEventListener("mouseup", x), () => {
|
|
49
49
|
document.removeEventListener("mousemove", I), document.removeEventListener("mouseup", x);
|
|
@@ -53,21 +53,21 @@ function Ya(t, o, r, s) {
|
|
|
53
53
|
async function Sm(t = {}, o = "") {
|
|
54
54
|
const r = new URLSearchParams();
|
|
55
55
|
o && r.set("token", o), t.page && r.set("page", String(t.page)), t.size && r.set("size", String(t.size)), t.tag && r.set("tag", t.tag), t.sort && r.set("sort", t.sort);
|
|
56
|
-
const s = r.toString(), m = await
|
|
56
|
+
const s = r.toString(), m = await Se(
|
|
57
57
|
`${Oe}/community/posts${s ? `?${s}` : ""}`,
|
|
58
58
|
Re
|
|
59
59
|
);
|
|
60
60
|
return Qe(m, "获取帖子列表失败");
|
|
61
61
|
}
|
|
62
62
|
async function Cm(t, o = "") {
|
|
63
|
-
const r = o ? `?token=${encodeURIComponent(o)}` : "", s = await
|
|
63
|
+
const r = o ? `?token=${encodeURIComponent(o)}` : "", s = await Se(
|
|
64
64
|
`${Oe}/community/posts/${t}${r}`,
|
|
65
65
|
Re
|
|
66
66
|
);
|
|
67
67
|
return Qe(s, "获取帖子详情失败");
|
|
68
68
|
}
|
|
69
69
|
async function Tm(t, o = "") {
|
|
70
|
-
const r = await
|
|
70
|
+
const r = await Se(
|
|
71
71
|
`${Oe}/community/posts${o ? `?token=${encodeURIComponent(o)}` : ""}`,
|
|
72
72
|
{
|
|
73
73
|
...Re,
|
|
@@ -79,7 +79,7 @@ async function Tm(t, o = "") {
|
|
|
79
79
|
return Qe(r, "发帖失败");
|
|
80
80
|
}
|
|
81
81
|
async function Im(t, o, r = "") {
|
|
82
|
-
const s = await
|
|
82
|
+
const s = await Se(
|
|
83
83
|
`${Oe}/community/posts/${t}${r ? `?token=${encodeURIComponent(r)}` : ""}`,
|
|
84
84
|
{
|
|
85
85
|
...Re,
|
|
@@ -91,28 +91,28 @@ async function Im(t, o, r = "") {
|
|
|
91
91
|
return Qe(s, "编辑帖子失败");
|
|
92
92
|
}
|
|
93
93
|
async function Lm(t, o = "") {
|
|
94
|
-
const r = o ? `?token=${encodeURIComponent(o)}` : "", s = await
|
|
94
|
+
const r = o ? `?token=${encodeURIComponent(o)}` : "", s = await Se(`${Oe}/community/posts/${t}${r}`, {
|
|
95
95
|
...Re,
|
|
96
96
|
method: "DELETE"
|
|
97
97
|
});
|
|
98
98
|
return Qe(s, "删帖失败");
|
|
99
99
|
}
|
|
100
100
|
async function xm(t, o = "") {
|
|
101
|
-
const r = o ? `?token=${encodeURIComponent(o)}` : "", s = await
|
|
101
|
+
const r = o ? `?token=${encodeURIComponent(o)}` : "", s = await Se(`${Oe}/community/posts/${t}/pin${r}`, {
|
|
102
102
|
...Re,
|
|
103
103
|
method: "POST"
|
|
104
104
|
});
|
|
105
105
|
return Qe(s, "置顶操作失败");
|
|
106
106
|
}
|
|
107
107
|
async function Am(t, o = "") {
|
|
108
|
-
const r = o ? `?token=${encodeURIComponent(o)}` : "", s = await
|
|
108
|
+
const r = o ? `?token=${encodeURIComponent(o)}` : "", s = await Se(`${Oe}/community/posts/${t}/feature${r}`, {
|
|
109
109
|
...Re,
|
|
110
110
|
method: "POST"
|
|
111
111
|
});
|
|
112
112
|
return Qe(s, "精华操作失败");
|
|
113
113
|
}
|
|
114
114
|
async function Pm(t, o, r = "") {
|
|
115
|
-
const s = await
|
|
115
|
+
const s = await Se(
|
|
116
116
|
`${Oe}/community/posts/${t}/comments${r ? `?token=${encodeURIComponent(r)}` : ""}`,
|
|
117
117
|
{
|
|
118
118
|
...Re,
|
|
@@ -124,7 +124,7 @@ async function Pm(t, o, r = "") {
|
|
|
124
124
|
return Qe(s, "发评论失败");
|
|
125
125
|
}
|
|
126
126
|
async function $m(t, o = "") {
|
|
127
|
-
const r = await
|
|
127
|
+
const r = await Se(
|
|
128
128
|
`${Oe}/community/likes${o ? `?token=${encodeURIComponent(o)}` : ""}`,
|
|
129
129
|
{
|
|
130
130
|
...Re,
|
|
@@ -136,7 +136,7 @@ async function $m(t, o = "") {
|
|
|
136
136
|
return Qe(r, "点赞操作失败");
|
|
137
137
|
}
|
|
138
138
|
async function Em(t, o = "") {
|
|
139
|
-
const r = await
|
|
139
|
+
const r = await Se(
|
|
140
140
|
`${Oe}/community/favorites${o ? `?token=${encodeURIComponent(o)}` : ""}`,
|
|
141
141
|
{
|
|
142
142
|
...Re,
|
|
@@ -148,7 +148,7 @@ async function Em(t, o = "") {
|
|
|
148
148
|
return Qe(r, "收藏操作失败");
|
|
149
149
|
}
|
|
150
150
|
async function Mm(t, o = "") {
|
|
151
|
-
const r = await
|
|
151
|
+
const r = await Se(
|
|
152
152
|
`${Oe}/community/follows${o ? `?token=${encodeURIComponent(o)}` : ""}`,
|
|
153
153
|
{
|
|
154
154
|
...Re,
|
|
@@ -160,19 +160,19 @@ async function Mm(t, o = "") {
|
|
|
160
160
|
return Qe(r, "关注操作失败");
|
|
161
161
|
}
|
|
162
162
|
async function Dm(t = "") {
|
|
163
|
-
const o = t ? `?token=${encodeURIComponent(t)}` : "", r = await
|
|
163
|
+
const o = t ? `?token=${encodeURIComponent(t)}` : "", r = await Se(`${Oe}/community/tags${o}`, Re);
|
|
164
164
|
return Qe(r, "获取标签列表失败");
|
|
165
165
|
}
|
|
166
166
|
async function Fm(t = "") {
|
|
167
|
-
const o = t ? `?token=${encodeURIComponent(t)}` : "", r = await
|
|
167
|
+
const o = t ? `?token=${encodeURIComponent(t)}` : "", r = await Se(`${Oe}/community/my/posts${o}`, Re);
|
|
168
168
|
return Qe(r, "获取我的帖子失败");
|
|
169
169
|
}
|
|
170
170
|
async function Rm(t = "") {
|
|
171
|
-
const o = t ? `?token=${encodeURIComponent(t)}` : "", r = await
|
|
171
|
+
const o = t ? `?token=${encodeURIComponent(t)}` : "", r = await Se(`${Oe}/community/my/drafts${o}`, Re);
|
|
172
172
|
return Qe(r, "获取我的草稿失败");
|
|
173
173
|
}
|
|
174
174
|
async function On() {
|
|
175
|
-
const t = await
|
|
175
|
+
const t = await Se(`${Oe}/common/portal/header-tips`, Re);
|
|
176
176
|
return Qe(t, "获取顶部提示失败");
|
|
177
177
|
}
|
|
178
178
|
const rt = "http://127.0.0.1:28080";
|
|
@@ -240,7 +240,7 @@ async function Um(t) {
|
|
|
240
240
|
return o.json();
|
|
241
241
|
}
|
|
242
242
|
async function zm(t, o, r, s) {
|
|
243
|
-
var
|
|
243
|
+
var K, E;
|
|
244
244
|
const { onToken: m, onReasoning: g, onEvent: w, onFinal: L, onError: S, onComplete: F } = r;
|
|
245
245
|
try {
|
|
246
246
|
const v = {
|
|
@@ -256,23 +256,23 @@ async function zm(t, o, r, s) {
|
|
|
256
256
|
signal: s == null ? void 0 : s.signal
|
|
257
257
|
});
|
|
258
258
|
if (!I.ok || !I.body) {
|
|
259
|
-
const
|
|
260
|
-
S(new Error(
|
|
259
|
+
const V = await I.text().catch(() => "");
|
|
260
|
+
S(new Error(V || `HTTP ${I.status}`));
|
|
261
261
|
return;
|
|
262
262
|
}
|
|
263
|
-
const x = I.body.getReader(),
|
|
263
|
+
const x = I.body.getReader(), U = new TextDecoder();
|
|
264
264
|
let z = "";
|
|
265
265
|
for (; ; ) {
|
|
266
|
-
const { done:
|
|
267
|
-
if (
|
|
268
|
-
z +=
|
|
269
|
-
const
|
|
266
|
+
const { done: V, value: Z } = await x.read();
|
|
267
|
+
if (V) break;
|
|
268
|
+
z += U.decode(Z, { stream: !0 });
|
|
269
|
+
const ne = z.split(`
|
|
270
270
|
`);
|
|
271
|
-
z =
|
|
272
|
-
for (const
|
|
273
|
-
const
|
|
274
|
-
if (!(!
|
|
275
|
-
const f =
|
|
271
|
+
z = ne.pop() || "";
|
|
272
|
+
for (const re of ne) {
|
|
273
|
+
const D = re.trim();
|
|
274
|
+
if (!(!D || D.startsWith(":")) && D.startsWith("data:")) {
|
|
275
|
+
const f = D.slice(5).trim();
|
|
276
276
|
if (f === "[DONE]") {
|
|
277
277
|
F();
|
|
278
278
|
return;
|
|
@@ -296,7 +296,7 @@ async function zm(t, o, r, s) {
|
|
|
296
296
|
S(new Error(String(y.error)));
|
|
297
297
|
return;
|
|
298
298
|
}
|
|
299
|
-
const C = (E = (
|
|
299
|
+
const C = (E = (K = y == null ? void 0 : y.choices) == null ? void 0 : K[0]) == null ? void 0 : E.delta;
|
|
300
300
|
C != null && C.content && m(C.content), C != null && C.reasoning_content && g && g(C.reasoning_content), y != null && y.z_team_event && w && w(y.z_team_event);
|
|
301
301
|
} catch {
|
|
302
302
|
}
|
|
@@ -344,7 +344,7 @@ async function Vm(t) {
|
|
|
344
344
|
async function Ym(t, o = "", r = "") {
|
|
345
345
|
const s = new URLSearchParams();
|
|
346
346
|
o && s.set("subdir", o), r && s.set("token", r);
|
|
347
|
-
const m = s.toString(), g = await
|
|
347
|
+
const m = s.toString(), g = await Se(
|
|
348
348
|
`${Oe}/personal-agents/${t}/files/tree${m ? "?" + m : ""}`,
|
|
349
349
|
Re
|
|
350
350
|
);
|
|
@@ -353,7 +353,7 @@ async function Ym(t, o = "", r = "") {
|
|
|
353
353
|
async function Jm(t, o = "", r = "") {
|
|
354
354
|
const s = new URLSearchParams();
|
|
355
355
|
o && s.set("path", o), r && s.set("token", r);
|
|
356
|
-
const m = s.toString(), g = await
|
|
356
|
+
const m = s.toString(), g = await Se(
|
|
357
357
|
`${Oe}/personal-agents/${t}/files/content${m ? "?" + m : ""}`,
|
|
358
358
|
Re
|
|
359
359
|
);
|
|
@@ -362,14 +362,14 @@ async function Jm(t, o = "", r = "") {
|
|
|
362
362
|
async function Qm(t, o = 1, r = 20, s = "") {
|
|
363
363
|
const m = new URLSearchParams();
|
|
364
364
|
m.set("page", String(o)), m.set("size", String(r)), s && m.set("token", s);
|
|
365
|
-
const g = await
|
|
365
|
+
const g = await Se(
|
|
366
366
|
`${Oe}/personal-agents/${t}/skills?${m.toString()}`,
|
|
367
367
|
Re
|
|
368
368
|
);
|
|
369
369
|
return ln(g, "获取 Skill 列表失败");
|
|
370
370
|
}
|
|
371
371
|
async function Zm(t, o, r, s = "") {
|
|
372
|
-
const m = s ? `?token=${encodeURIComponent(s)}` : "", g = await
|
|
372
|
+
const m = s ? `?token=${encodeURIComponent(s)}` : "", g = await Se(
|
|
373
373
|
`${Oe}/personal-agents/${t}/skills/${encodeURIComponent(
|
|
374
374
|
o
|
|
375
375
|
)}/toggle${m}`,
|
|
@@ -538,29 +538,29 @@ const Un = {
|
|
|
538
538
|
function cr({
|
|
539
539
|
onCountChange: t
|
|
540
540
|
}) {
|
|
541
|
-
const o =
|
|
542
|
-
|
|
541
|
+
const o = M((A) => A.projects), r = M((A) => A.openTaskFromTodo), [s, m] = c(Un), [g, w] = c(!1), [L, S] = c(!1), [F, K] = c(!1), [E, v] = c(null), [I, x] = c(""), [U, z] = c(""), V = le(null), Z = le(null), ne = le(null), re = le(!1), D = le(s), f = le(null), y = le(null), C = le(U);
|
|
542
|
+
D.current = s, C.current = U;
|
|
543
543
|
const T = q(async (A) => {
|
|
544
|
-
const
|
|
544
|
+
const ee = new URLSearchParams({
|
|
545
545
|
current: String(A),
|
|
546
546
|
size: String(mo)
|
|
547
|
-
}),
|
|
548
|
-
|
|
549
|
-
const
|
|
550
|
-
|
|
551
|
-
const
|
|
547
|
+
}), se = C.current;
|
|
548
|
+
se && ee.set("keyword", se);
|
|
549
|
+
const O = typeof window < "u" && (window.localStorage.getItem("token") || window.localStorage.getItem("z_ctc_token") || window.localStorage.getItem("z_team_token")) || "", _e = {};
|
|
550
|
+
O && (_e.Authorization = `Bearer ${O}`);
|
|
551
|
+
const Ne = await fetch(`${Ht}/tasks/my?${ee}`, {
|
|
552
552
|
credentials: "include",
|
|
553
553
|
headers: {
|
|
554
554
|
..._e,
|
|
555
555
|
Accept: "application/json"
|
|
556
556
|
}
|
|
557
557
|
});
|
|
558
|
-
if (
|
|
559
|
-
const Ue = await
|
|
558
|
+
if (Ne.status === 401 && xo(), !Ne.ok) throw new Error(`HTTP ${Ne.status}`);
|
|
559
|
+
const Ue = await Ne.json();
|
|
560
560
|
return Ue.data && typeof Ue.data == "object" ? jn(Ue.data) : jn({});
|
|
561
561
|
}, []), i = q(async () => {
|
|
562
|
-
if (!
|
|
563
|
-
|
|
562
|
+
if (!re.current) {
|
|
563
|
+
re.current = !0, w(!0), v(null);
|
|
564
564
|
try {
|
|
565
565
|
const A = await T(1);
|
|
566
566
|
m({
|
|
@@ -573,91 +573,91 @@ function cr({
|
|
|
573
573
|
} catch (A) {
|
|
574
574
|
kn(A) || (v(A instanceof Error ? A.message : "加载失败"), m(Un));
|
|
575
575
|
} finally {
|
|
576
|
-
w(!1),
|
|
576
|
+
w(!1), re.current = !1;
|
|
577
577
|
}
|
|
578
578
|
}
|
|
579
579
|
}, [T]), b = q(async () => {
|
|
580
|
-
const A =
|
|
581
|
-
if (
|
|
580
|
+
const A = D.current;
|
|
581
|
+
if (re.current || A.maxLoadedPage <= 0 || A.maxLoadedPage >= A.pages)
|
|
582
582
|
return;
|
|
583
|
-
const
|
|
584
|
-
|
|
583
|
+
const ee = A.maxLoadedPage + 1;
|
|
584
|
+
re.current = !0, S(!0);
|
|
585
585
|
try {
|
|
586
|
-
const
|
|
587
|
-
m((
|
|
588
|
-
...
|
|
589
|
-
tasks: Wn(
|
|
590
|
-
total:
|
|
591
|
-
pages:
|
|
592
|
-
maxLoadedPage:
|
|
586
|
+
const se = await T(ee);
|
|
587
|
+
m((O) => ({
|
|
588
|
+
...O,
|
|
589
|
+
tasks: Wn(O.tasks, se.records, "append"),
|
|
590
|
+
total: se.total,
|
|
591
|
+
pages: se.pages,
|
|
592
|
+
maxLoadedPage: ee
|
|
593
593
|
}));
|
|
594
594
|
} catch {
|
|
595
595
|
} finally {
|
|
596
|
-
S(!1),
|
|
596
|
+
S(!1), re.current = !1;
|
|
597
597
|
}
|
|
598
598
|
}, [T]), k = q(async () => {
|
|
599
|
-
const A =
|
|
600
|
-
if (
|
|
601
|
-
const
|
|
602
|
-
|
|
599
|
+
const A = D.current;
|
|
600
|
+
if (re.current || A.minLoadedPage <= 1) return;
|
|
601
|
+
const ee = A.minLoadedPage - 1, se = V.current;
|
|
602
|
+
se && (f.current = se.scrollHeight), re.current = !0, K(!0);
|
|
603
603
|
try {
|
|
604
|
-
const
|
|
604
|
+
const O = await T(ee);
|
|
605
605
|
m((_e) => ({
|
|
606
606
|
..._e,
|
|
607
|
-
tasks: Wn(_e.tasks,
|
|
608
|
-
total:
|
|
609
|
-
pages:
|
|
610
|
-
minLoadedPage:
|
|
607
|
+
tasks: Wn(_e.tasks, O.records, "prepend"),
|
|
608
|
+
total: O.total,
|
|
609
|
+
pages: O.pages,
|
|
610
|
+
minLoadedPage: ee
|
|
611
611
|
}));
|
|
612
612
|
} catch {
|
|
613
613
|
f.current = null;
|
|
614
614
|
} finally {
|
|
615
|
-
|
|
615
|
+
K(!1), re.current = !1;
|
|
616
616
|
}
|
|
617
617
|
}, [T]);
|
|
618
618
|
ro(() => {
|
|
619
|
-
const A =
|
|
620
|
-
!A ||
|
|
621
|
-
}, [s.tasks]),
|
|
619
|
+
const A = V.current, ee = f.current;
|
|
620
|
+
!A || ee == null || (A.scrollTop += A.scrollHeight - ee, f.current = null);
|
|
621
|
+
}, [s.tasks]), H(() => {
|
|
622
622
|
i();
|
|
623
|
-
}, [i,
|
|
623
|
+
}, [i, U]);
|
|
624
624
|
const W = q((A) => {
|
|
625
625
|
x(A), y.current && clearTimeout(y.current), y.current = setTimeout(() => {
|
|
626
626
|
z(A.trim());
|
|
627
627
|
}, 400);
|
|
628
628
|
}, []);
|
|
629
|
-
|
|
629
|
+
H(() => () => {
|
|
630
630
|
y.current && clearTimeout(y.current);
|
|
631
|
-
}, []),
|
|
631
|
+
}, []), H(() => {
|
|
632
632
|
t == null || t(s.total);
|
|
633
|
-
}, [s.total, t]),
|
|
633
|
+
}, [s.total, t]), H(() => {
|
|
634
634
|
const A = setInterval(() => {
|
|
635
|
-
|
|
635
|
+
D.current.maxLoadedPage <= 1 && !C.current && i();
|
|
636
636
|
}, 15e3);
|
|
637
637
|
return () => clearInterval(A);
|
|
638
|
-
}, [i]),
|
|
639
|
-
const A =
|
|
640
|
-
if (!A || !
|
|
641
|
-
const
|
|
638
|
+
}, [i]), H(() => {
|
|
639
|
+
const A = V.current, ee = Z.current, se = ne.current;
|
|
640
|
+
if (!A || !ee || !se) return;
|
|
641
|
+
const O = new IntersectionObserver(
|
|
642
642
|
(_e) => {
|
|
643
|
-
for (const
|
|
644
|
-
|
|
643
|
+
for (const Ne of _e)
|
|
644
|
+
Ne.isIntersecting && (Ne.target === ee ? k() : Ne.target === se && b());
|
|
645
645
|
},
|
|
646
646
|
{ root: A, rootMargin: "64px", threshold: 0 }
|
|
647
647
|
);
|
|
648
|
-
return
|
|
648
|
+
return O.observe(ee), O.observe(se), () => O.disconnect();
|
|
649
649
|
}, [k, b, s.tasks.length]);
|
|
650
|
-
const
|
|
650
|
+
const Y = Fe(() => {
|
|
651
651
|
const A = {};
|
|
652
652
|
if (o)
|
|
653
|
-
for (const
|
|
654
|
-
A[String(
|
|
653
|
+
for (const ee of o)
|
|
654
|
+
A[String(ee.id)] = ee.name || `项目 ${ee.id}`;
|
|
655
655
|
return A;
|
|
656
656
|
}, [o]), pe = Fe(() => {
|
|
657
657
|
const A = [];
|
|
658
|
-
for (const
|
|
659
|
-
const
|
|
660
|
-
|
|
658
|
+
for (const ee of s.tasks) {
|
|
659
|
+
const se = ee.projectId || "unknown", O = A[A.length - 1];
|
|
660
|
+
O && O.projectId === se ? O.tasks.push(ee) : A.push({ projectId: se, tasks: [ee] });
|
|
661
661
|
}
|
|
662
662
|
return A;
|
|
663
663
|
}, [s.tasks]), p = q(
|
|
@@ -665,7 +665,7 @@ function cr({
|
|
|
665
665
|
r(A.id, A.name, A.projectId);
|
|
666
666
|
},
|
|
667
667
|
[r]
|
|
668
|
-
), { tasks: R, total: h, pages:
|
|
668
|
+
), { tasks: R, total: h, pages: j, minLoadedPage: Ce, maxLoadedPage: Te } = s, ge = Te > 0 && Te < j, oe = Ce > 1;
|
|
669
669
|
return /* @__PURE__ */ a("div", { className: fe.todoListWrap, children: [
|
|
670
670
|
/* @__PURE__ */ a("div", { className: fe.todoHeader, children: [
|
|
671
671
|
/* @__PURE__ */ e("span", { className: fe.todoHeaderTitle, children: "个人待办" }),
|
|
@@ -691,9 +691,9 @@ function cr({
|
|
|
691
691
|
}
|
|
692
692
|
)
|
|
693
693
|
] }),
|
|
694
|
-
/* @__PURE__ */ a("div", { ref:
|
|
695
|
-
/* @__PURE__ */ e("div", { ref:
|
|
696
|
-
F ? /* @__PURE__ */ e("div", { className: fe.todoLoadHint, children: "加载更早待办..." }) :
|
|
694
|
+
/* @__PURE__ */ a("div", { ref: V, className: fe.todoScrollArea, children: [
|
|
695
|
+
/* @__PURE__ */ e("div", { ref: Z, className: fe.todoScrollSentinel }),
|
|
696
|
+
F ? /* @__PURE__ */ e("div", { className: fe.todoLoadHint, children: "加载更早待办..." }) : oe ? /* @__PURE__ */ e("div", { className: fe.todoLoadHint, children: "向上滑动加载更多" }) : null,
|
|
697
697
|
g && R.length === 0 ? /* @__PURE__ */ e("div", { className: fe.todoEmpty, children: "加载中..." }) : E && R.length === 0 ? /* @__PURE__ */ a("div", { className: fe.todoEmpty, children: [
|
|
698
698
|
/* @__PURE__ */ e("span", { style: { color: "#f5222d" }, children: E }),
|
|
699
699
|
/* @__PURE__ */ e(
|
|
@@ -704,16 +704,16 @@ function cr({
|
|
|
704
704
|
children: "重试"
|
|
705
705
|
}
|
|
706
706
|
)
|
|
707
|
-
] }) : R.length === 0 ? /* @__PURE__ */ e("div", { className: fe.todoEmpty, children:
|
|
708
|
-
({ projectId: A, tasks:
|
|
709
|
-
const
|
|
707
|
+
] }) : R.length === 0 ? /* @__PURE__ */ e("div", { className: fe.todoEmpty, children: U ? "未找到匹配的待办" : "暂无待办" }) : pe.map(
|
|
708
|
+
({ projectId: A, tasks: ee }, se) => {
|
|
709
|
+
const O = Y[A] || `项目 ${A}`;
|
|
710
710
|
return /* @__PURE__ */ a("div", { className: fe.todoGroup, children: [
|
|
711
711
|
/* @__PURE__ */ a("div", { className: fe.todoGroupHeader, children: [
|
|
712
|
-
/* @__PURE__ */ e(Gt, { title:
|
|
713
|
-
/* @__PURE__ */ e("span", { className: fe.todoGroupCount, children:
|
|
712
|
+
/* @__PURE__ */ e(Gt, { title: O, placement: "topLeft", children: /* @__PURE__ */ e("span", { className: fe.todoGroupTitle, children: O }) }),
|
|
713
|
+
/* @__PURE__ */ e("span", { className: fe.todoGroupCount, children: ee.length })
|
|
714
714
|
] }),
|
|
715
|
-
|
|
716
|
-
const
|
|
715
|
+
ee.map((_e) => {
|
|
716
|
+
const Ne = sr(_e), Ue = oa(_e);
|
|
717
717
|
return /* @__PURE__ */ a(
|
|
718
718
|
"div",
|
|
719
719
|
{
|
|
@@ -724,11 +724,11 @@ function cr({
|
|
|
724
724
|
/* @__PURE__ */ e(
|
|
725
725
|
"span",
|
|
726
726
|
{
|
|
727
|
-
className: `${fe.todoStatusDot} ${
|
|
727
|
+
className: `${fe.todoStatusDot} ${Ne.cls}`
|
|
728
728
|
}
|
|
729
729
|
),
|
|
730
730
|
/* @__PURE__ */ e("span", { className: fe.todoName, children: _e.name }),
|
|
731
|
-
/* @__PURE__ */ e("span", { className: `${fe.todoTag} ${
|
|
731
|
+
/* @__PURE__ */ e("span", { className: `${fe.todoTag} ${Ne.cls}`, children: Ne.label })
|
|
732
732
|
] }),
|
|
733
733
|
/* @__PURE__ */ a("div", { className: fe.todoCardMeta, children: [
|
|
734
734
|
Ue ? /* @__PURE__ */ a("span", { className: fe.todoFrom, children: [
|
|
@@ -742,7 +742,7 @@ function cr({
|
|
|
742
742
|
_e.id
|
|
743
743
|
);
|
|
744
744
|
})
|
|
745
|
-
] }, `${A}-${
|
|
745
|
+
] }, `${A}-${se}`);
|
|
746
746
|
}
|
|
747
747
|
),
|
|
748
748
|
L ? /* @__PURE__ */ e("div", { className: fe.todoLoadHint, children: "加载更多待办..." }) : ge ? /* @__PURE__ */ a("div", { className: fe.todoLoadHint, children: [
|
|
@@ -756,7 +756,7 @@ function cr({
|
|
|
756
756
|
h,
|
|
757
757
|
" 条"
|
|
758
758
|
] }) : null,
|
|
759
|
-
/* @__PURE__ */ e("div", { ref:
|
|
759
|
+
/* @__PURE__ */ e("div", { ref: ne, className: fe.todoScrollSentinel })
|
|
760
760
|
] })
|
|
761
761
|
] });
|
|
762
762
|
}
|
|
@@ -813,7 +813,7 @@ function jr() {
|
|
|
813
813
|
moved: !1,
|
|
814
814
|
startY: 0,
|
|
815
815
|
startTop: 0
|
|
816
|
-
}), F = le(null), [
|
|
816
|
+
}), F = le(null), [K, E] = c([]), [v, I] = c(!1), x = le(null), [U, z] = c(!1), V = M((p) => p.currentProject), Z = M((p) => p.token), ne = V ? `${V.workspace_path}_${V.id}` : "global_scratchpad", re = (V == null ? void 0 : V.name) || (V == null ? void 0 : V.scenario_name) || "速记", D = V ? JSON.stringify({ type: "team", id: V.id }) : "", f = q(() => {
|
|
817
817
|
x.current && (clearTimeout(x.current), x.current = null);
|
|
818
818
|
}, []), y = q(
|
|
819
819
|
(p) => {
|
|
@@ -824,7 +824,7 @@ function jr() {
|
|
|
824
824
|
async (p = !1) => {
|
|
825
825
|
if (!(!p && (document.hidden || Gn() || t)))
|
|
826
826
|
try {
|
|
827
|
-
const R = await Ua(
|
|
827
|
+
const R = await Ua(Z, Rr);
|
|
828
828
|
if (!p && (!R.length || Gn())) return;
|
|
829
829
|
E(R), I(!0), R.length && sessionStorage.setItem(bn, String(Date.now())), f(), x.current = setTimeout(
|
|
830
830
|
() => y(!1),
|
|
@@ -833,9 +833,9 @@ function jr() {
|
|
|
833
833
|
} catch {
|
|
834
834
|
}
|
|
835
835
|
},
|
|
836
|
-
[
|
|
836
|
+
[Z, t, f, y]
|
|
837
837
|
);
|
|
838
|
-
|
|
838
|
+
H(() => {
|
|
839
839
|
const p = setTimeout(() => void C(), Mr), R = setInterval(() => void C(), ho);
|
|
840
840
|
return () => {
|
|
841
841
|
clearTimeout(p), clearInterval(R), f();
|
|
@@ -861,7 +861,7 @@ function jr() {
|
|
|
861
861
|
), b = q(
|
|
862
862
|
(p) => {
|
|
863
863
|
var R, h;
|
|
864
|
-
S.current.active && (S.current.active = !1, (h = (R = p.currentTarget).releasePointerCapture) == null || h.call(R, p.pointerId), S.current.moved && g((
|
|
864
|
+
S.current.active && (S.current.active = !1, (h = (R = p.currentTarget).releasePointerCapture) == null || h.call(R, p.pointerId), S.current.moved && g((j) => (localStorage.setItem(zn, String(j)), j)), L(!1));
|
|
865
865
|
},
|
|
866
866
|
[]
|
|
867
867
|
), k = q(() => {
|
|
@@ -873,10 +873,10 @@ function jr() {
|
|
|
873
873
|
o((p) => !p);
|
|
874
874
|
}
|
|
875
875
|
}, [v, y]);
|
|
876
|
-
|
|
876
|
+
H(() => {
|
|
877
877
|
const p = () => g((R) => gn(R));
|
|
878
878
|
return window.addEventListener("resize", p), () => window.removeEventListener("resize", p);
|
|
879
|
-
}, []),
|
|
879
|
+
}, []), H(() => {
|
|
880
880
|
if (!t) return;
|
|
881
881
|
const p = (R) => {
|
|
882
882
|
F.current && F.current.contains(R.target) || o(!1);
|
|
@@ -908,17 +908,17 @@ function jr() {
|
|
|
908
908
|
z(!0), o(!1);
|
|
909
909
|
}
|
|
910
910
|
}
|
|
911
|
-
],
|
|
911
|
+
], Y = (p) => {
|
|
912
912
|
window.open(`/workspace?projectId=${p}`, "_blank");
|
|
913
|
-
}, pe = v &&
|
|
913
|
+
}, pe = v && K.length > 0 && !w && !t;
|
|
914
914
|
return /* @__PURE__ */ a(bt, { children: [
|
|
915
915
|
/* @__PURE__ */ a("div", { ref: F, className: Pe.fabWrap, style: { top: m }, children: [
|
|
916
916
|
v && !w && !t ? /* @__PURE__ */ a("div", { className: Pe.pleadCard, role: "status", children: [
|
|
917
|
-
|
|
917
|
+
K.length ? /* @__PURE__ */ a(bt, { children: [
|
|
918
918
|
/* @__PURE__ */ a("div", { className: Pe.pleadTitle, children: [
|
|
919
919
|
/* @__PURE__ */ e("span", { className: Pe.pleadFace, children: "📋" }),
|
|
920
920
|
"你还有 ",
|
|
921
|
-
|
|
921
|
+
K.length,
|
|
922
922
|
" 个单子没关",
|
|
923
923
|
/* @__PURE__ */ e(
|
|
924
924
|
"button",
|
|
@@ -932,13 +932,13 @@ function jr() {
|
|
|
932
932
|
}
|
|
933
933
|
)
|
|
934
934
|
] }),
|
|
935
|
-
/* @__PURE__ */ e("ul", { className: Pe.pleadList, children:
|
|
935
|
+
/* @__PURE__ */ e("ul", { className: Pe.pleadList, children: K.map((p) => /* @__PURE__ */ e("li", { children: /* @__PURE__ */ a(
|
|
936
936
|
"button",
|
|
937
937
|
{
|
|
938
938
|
type: "button",
|
|
939
939
|
className: Pe.pleadItem,
|
|
940
940
|
title: p.name,
|
|
941
|
-
onClick: () =>
|
|
941
|
+
onClick: () => Y(p.id),
|
|
942
942
|
children: [
|
|
943
943
|
/* @__PURE__ */ e("span", { className: Pe.pleadItemName, children: p.name }),
|
|
944
944
|
/* @__PURE__ */ e("span", { className: Pe.pleadItemAge, children: Br(p.created_at) })
|
|
@@ -1132,16 +1132,16 @@ function jr() {
|
|
|
1132
1132
|
{
|
|
1133
1133
|
open: r,
|
|
1134
1134
|
onClose: () => s(!1),
|
|
1135
|
-
bindKey:
|
|
1136
|
-
defaultTitle:
|
|
1137
|
-
extraInfo:
|
|
1138
|
-
token:
|
|
1135
|
+
bindKey: ne,
|
|
1136
|
+
defaultTitle: re,
|
|
1137
|
+
extraInfo: D,
|
|
1138
|
+
token: Z
|
|
1139
1139
|
}
|
|
1140
1140
|
),
|
|
1141
1141
|
/* @__PURE__ */ e(
|
|
1142
1142
|
io,
|
|
1143
1143
|
{
|
|
1144
|
-
open:
|
|
1144
|
+
open: U,
|
|
1145
1145
|
onClose: () => z(!1)
|
|
1146
1146
|
}
|
|
1147
1147
|
)
|
|
@@ -1228,25 +1228,25 @@ const Wr = "_resumeModal_1ytri_3", Hr = "_modalHeader_1ytri_10", Ur = "_closeBtn
|
|
|
1228
1228
|
}, { TabPane: _n } = wn;
|
|
1229
1229
|
function li() {
|
|
1230
1230
|
var me, lt;
|
|
1231
|
-
const { agentProfileState: t, closeAgentProfile: o, navigateToPersonalChat: r } =
|
|
1231
|
+
const { agentProfileState: t, closeAgentProfile: o, navigateToPersonalChat: r } = M(), s = M((B) => B.token), [m, g] = c(!1), [w, L] = c(
|
|
1232
1232
|
null
|
|
1233
|
-
), [S, F] = c(!1), [
|
|
1233
|
+
), [S, F] = c(!1), [K, E] = c(null), [v, I] = c(!1), [x, U] = c("info"), [z, V] = c(
|
|
1234
1234
|
null
|
|
1235
|
-
), [
|
|
1235
|
+
), [Z, ne] = c(null), [re, D] = c([]), [f, y] = c(
|
|
1236
1236
|
null
|
|
1237
|
-
), [C, T] = c(""), [i, b] = c(!1), [k, W] = c(!1), [
|
|
1237
|
+
), [C, T] = c(""), [i, b] = c(!1), [k, W] = c(!1), [Y, pe] = c([]), [p, R] = c(!1), h = t.agent, j = (h == null ? void 0 : h.agent_code) || ((me = h == null ? void 0 : h._agenthub_raw) == null ? void 0 : me.agentCode) || "", Ce = Mt(
|
|
1238
1238
|
((lt = h == null ? void 0 : h._agenthub_raw) == null ? void 0 : lt.agentHubAgentId) ?? null
|
|
1239
|
-
) || null,
|
|
1240
|
-
if (
|
|
1239
|
+
) || null, Te = M((B) => B.currentProject), ge = Te == null ? void 0 : Te.id, oe = q(async () => {
|
|
1240
|
+
if (j) {
|
|
1241
1241
|
F(!0);
|
|
1242
1242
|
try {
|
|
1243
|
-
const
|
|
1243
|
+
const B = await Se(
|
|
1244
1244
|
`${Xt}/evolution/agents/${encodeURIComponent(
|
|
1245
|
-
|
|
1245
|
+
j
|
|
1246
1246
|
)}`
|
|
1247
1247
|
);
|
|
1248
|
-
if (
|
|
1249
|
-
const ie = await
|
|
1248
|
+
if (B.ok) {
|
|
1249
|
+
const ie = await B.json();
|
|
1250
1250
|
L(ie);
|
|
1251
1251
|
} else
|
|
1252
1252
|
L(null);
|
|
@@ -1256,15 +1256,15 @@ function li() {
|
|
|
1256
1256
|
F(!1);
|
|
1257
1257
|
}
|
|
1258
1258
|
}
|
|
1259
|
-
}, [
|
|
1259
|
+
}, [j]), A = q(async () => {
|
|
1260
1260
|
if (!(!ge || !h)) {
|
|
1261
1261
|
R(!0);
|
|
1262
1262
|
try {
|
|
1263
|
-
const
|
|
1263
|
+
const B = `${Ht}/scenario-instances/${ge}/team/agents/${encodeURIComponent(
|
|
1264
1264
|
h.name
|
|
1265
|
-
)}/skills`, ie = await
|
|
1265
|
+
)}/skills`, ie = await Se(B);
|
|
1266
1266
|
if (ie.ok) {
|
|
1267
|
-
const
|
|
1267
|
+
const Q = await ie.json(), Ae = (Array.isArray(Q == null ? void 0 : Q.data) ? Q.data : Array.isArray(Q) ? Q : []).map((te) => ({
|
|
1268
1268
|
skillName: te.skillName,
|
|
1269
1269
|
path: te.path,
|
|
1270
1270
|
revision: te.revision || !1,
|
|
@@ -1280,116 +1280,116 @@ function li() {
|
|
|
1280
1280
|
}
|
|
1281
1281
|
}
|
|
1282
1282
|
}, [ge, h]);
|
|
1283
|
-
|
|
1284
|
-
t.visible &&
|
|
1283
|
+
H(() => {
|
|
1284
|
+
t.visible && j && (L(null), E(null), U("info"), pe([]), oe(), A());
|
|
1285
1285
|
}, [
|
|
1286
1286
|
t.visible,
|
|
1287
|
-
|
|
1288
|
-
|
|
1287
|
+
j,
|
|
1288
|
+
oe,
|
|
1289
1289
|
A
|
|
1290
1290
|
]);
|
|
1291
|
-
const
|
|
1292
|
-
if (
|
|
1291
|
+
const ee = async (B) => {
|
|
1292
|
+
if (j) {
|
|
1293
1293
|
I(!0);
|
|
1294
1294
|
try {
|
|
1295
|
-
const
|
|
1295
|
+
const Q = await (await Se(
|
|
1296
1296
|
`${Xt}/evolution/agents/${encodeURIComponent(
|
|
1297
|
-
|
|
1298
|
-
)}/memory/${encodeURIComponent(
|
|
1297
|
+
j
|
|
1298
|
+
)}/memory/${encodeURIComponent(B)}`,
|
|
1299
1299
|
{ method: "DELETE" }
|
|
1300
1300
|
)).json();
|
|
1301
|
-
|
|
1301
|
+
Q.ok ? (xe("记忆已删除"), await oe(), K === B && E(null)) : xe(Q.error || "删除失败", "error");
|
|
1302
1302
|
} catch {
|
|
1303
|
-
|
|
1303
|
+
xe("删除失败", "error");
|
|
1304
1304
|
} finally {
|
|
1305
1305
|
I(!1);
|
|
1306
1306
|
}
|
|
1307
1307
|
}
|
|
1308
|
-
},
|
|
1309
|
-
if (
|
|
1308
|
+
}, se = async (B) => {
|
|
1309
|
+
if (j) {
|
|
1310
1310
|
I(!0);
|
|
1311
1311
|
try {
|
|
1312
|
-
const
|
|
1312
|
+
const Q = await (await Se(
|
|
1313
1313
|
`${Xt}/evolution/agents/${encodeURIComponent(
|
|
1314
|
-
|
|
1315
|
-
)}/memory/${encodeURIComponent(
|
|
1314
|
+
j
|
|
1315
|
+
)}/memory/${encodeURIComponent(B)}/reset`,
|
|
1316
1316
|
{ method: "POST" }
|
|
1317
1317
|
)).json();
|
|
1318
|
-
|
|
1318
|
+
Q.ok ? (xe("记忆已重置为种子内容"), await oe()) : xe(Q.error || "重置失败", "error");
|
|
1319
1319
|
} catch {
|
|
1320
|
-
|
|
1320
|
+
xe("重置失败", "error");
|
|
1321
1321
|
} finally {
|
|
1322
1322
|
I(!1);
|
|
1323
1323
|
}
|
|
1324
1324
|
}
|
|
1325
|
-
},
|
|
1326
|
-
if (
|
|
1325
|
+
}, O = async () => {
|
|
1326
|
+
if (j) {
|
|
1327
1327
|
I(!0);
|
|
1328
1328
|
try {
|
|
1329
|
-
(await (await
|
|
1329
|
+
(await (await Se(
|
|
1330
1330
|
`${Xt}/evolution/agents/${encodeURIComponent(
|
|
1331
|
-
|
|
1331
|
+
j
|
|
1332
1332
|
)}/memory/reset`,
|
|
1333
1333
|
{ method: "POST" }
|
|
1334
|
-
)).json()).ok ? (
|
|
1334
|
+
)).json()).ok ? (xe("记忆已重置"), E(null), await oe()) : xe("重置失败", "error");
|
|
1335
1335
|
} catch {
|
|
1336
|
-
|
|
1336
|
+
xe("重置失败", "error");
|
|
1337
1337
|
} finally {
|
|
1338
1338
|
I(!1);
|
|
1339
1339
|
}
|
|
1340
1340
|
}
|
|
1341
1341
|
}, _e = async () => {
|
|
1342
|
-
if (!
|
|
1343
|
-
|
|
1342
|
+
if (!j) {
|
|
1343
|
+
xe("无法获取 Agent 编码", "error");
|
|
1344
1344
|
return;
|
|
1345
1345
|
}
|
|
1346
1346
|
g(!0);
|
|
1347
1347
|
try {
|
|
1348
|
-
const
|
|
1349
|
-
|
|
1350
|
-
|
|
1351
|
-
(h == null ? void 0 : h.name) ||
|
|
1348
|
+
const B = await Ao(
|
|
1349
|
+
Ce,
|
|
1350
|
+
j,
|
|
1351
|
+
(h == null ? void 0 : h.name) || j,
|
|
1352
1352
|
h == null ? void 0 : h.avatar,
|
|
1353
1353
|
s
|
|
1354
1354
|
);
|
|
1355
|
-
if (!
|
|
1356
|
-
|
|
1355
|
+
if (!B || typeof B != "object" || !B.id) {
|
|
1356
|
+
xe("ensure 接口返回数据异常,缺少 id 字段", "error");
|
|
1357
1357
|
return;
|
|
1358
1358
|
}
|
|
1359
|
-
o(), r(
|
|
1360
|
-
} catch (
|
|
1361
|
-
const ie =
|
|
1362
|
-
|
|
1359
|
+
o(), r(B, "shared");
|
|
1360
|
+
} catch (B) {
|
|
1361
|
+
const ie = B && typeof B == "object" && "userMessage" in B ? String(B.userMessage) : B instanceof Error ? B.message : "打开聊天失败";
|
|
1362
|
+
xe(ie, "error");
|
|
1363
1363
|
} finally {
|
|
1364
1364
|
g(!1);
|
|
1365
1365
|
}
|
|
1366
|
-
},
|
|
1366
|
+
}, Ne = async (B) => {
|
|
1367
1367
|
var ie;
|
|
1368
1368
|
if (!(!ge || !h)) {
|
|
1369
|
-
|
|
1369
|
+
ne(B), D([]), y(null), T(""), b(!0), W(!0);
|
|
1370
1370
|
try {
|
|
1371
|
-
const
|
|
1371
|
+
const Q = await Se(
|
|
1372
1372
|
`${Ht}/scenario-instances/${ge}/team/agents/${encodeURIComponent(
|
|
1373
1373
|
h.name
|
|
1374
|
-
)}/skills/${encodeURIComponent(
|
|
1374
|
+
)}/skills/${encodeURIComponent(B.skillName)}/files`
|
|
1375
1375
|
);
|
|
1376
|
-
if (
|
|
1377
|
-
const $e = await
|
|
1378
|
-
|
|
1376
|
+
if (Q.ok) {
|
|
1377
|
+
const $e = await Q.json(), Ae = ($e == null ? void 0 : $e.data) || $e || [];
|
|
1378
|
+
D(Ae);
|
|
1379
1379
|
const te = Ae.find(
|
|
1380
1380
|
(qe) => qe.path === "skill.md" || qe.path === "SKILL.md"
|
|
1381
1381
|
), Ee = (te == null ? void 0 : te.path) || ((ie = Ae.find((qe) => !qe.isDir)) == null ? void 0 : ie.path);
|
|
1382
1382
|
if (Ee) {
|
|
1383
1383
|
y(Ee);
|
|
1384
|
-
const qe = await
|
|
1384
|
+
const qe = await Se(
|
|
1385
1385
|
`${Ht}/scenario-instances/${ge}/team/agents/${encodeURIComponent(
|
|
1386
1386
|
h.name
|
|
1387
1387
|
)}/skills/${encodeURIComponent(
|
|
1388
|
-
|
|
1388
|
+
B.skillName
|
|
1389
1389
|
)}/files/content?path=${encodeURIComponent(Ee)}`
|
|
1390
1390
|
);
|
|
1391
1391
|
if (qe.ok) {
|
|
1392
|
-
const
|
|
1392
|
+
const we = await qe.json(), tt = (we == null ? void 0 : we.data) || we;
|
|
1393
1393
|
T((tt == null ? void 0 : tt.content) || "");
|
|
1394
1394
|
}
|
|
1395
1395
|
}
|
|
@@ -1399,19 +1399,19 @@ function li() {
|
|
|
1399
1399
|
b(!1), W(!1);
|
|
1400
1400
|
}
|
|
1401
1401
|
}
|
|
1402
|
-
}, Ue = async (
|
|
1403
|
-
if (!(!
|
|
1404
|
-
y(
|
|
1402
|
+
}, Ue = async (B) => {
|
|
1403
|
+
if (!(!Z || B === f) && !(!ge || !h)) {
|
|
1404
|
+
y(B), W(!0);
|
|
1405
1405
|
try {
|
|
1406
|
-
const ie = await
|
|
1406
|
+
const ie = await Se(
|
|
1407
1407
|
`${Ht}/scenario-instances/${ge}/team/agents/${encodeURIComponent(
|
|
1408
1408
|
h.name
|
|
1409
1409
|
)}/skills/${encodeURIComponent(
|
|
1410
|
-
|
|
1411
|
-
)}/files/content?path=${encodeURIComponent(
|
|
1410
|
+
Z.skillName
|
|
1411
|
+
)}/files/content?path=${encodeURIComponent(B)}`
|
|
1412
1412
|
);
|
|
1413
1413
|
if (ie.ok) {
|
|
1414
|
-
const
|
|
1414
|
+
const Q = await ie.json(), $e = (Q == null ? void 0 : Q.data) || Q;
|
|
1415
1415
|
T(($e == null ? void 0 : $e.content) || "");
|
|
1416
1416
|
} else
|
|
1417
1417
|
T("");
|
|
@@ -1421,31 +1421,31 @@ function li() {
|
|
|
1421
1421
|
W(!1);
|
|
1422
1422
|
}
|
|
1423
1423
|
}
|
|
1424
|
-
}, et = (
|
|
1424
|
+
}, et = (B) => {
|
|
1425
1425
|
const ie = { children: [] };
|
|
1426
|
-
for (const $e of
|
|
1426
|
+
for (const $e of B) {
|
|
1427
1427
|
const Ae = $e.path.split("/");
|
|
1428
1428
|
let te = ie;
|
|
1429
1429
|
for (let Ee = 0; Ee < Ae.length; Ee++) {
|
|
1430
1430
|
const qe = Ae.slice(0, Ee + 1).join("/");
|
|
1431
|
-
let
|
|
1432
|
-
|
|
1431
|
+
let we = te.children.find((tt) => tt.name === Ae[Ee]);
|
|
1432
|
+
we || (we = {
|
|
1433
1433
|
name: Ae[Ee],
|
|
1434
1434
|
path: qe,
|
|
1435
1435
|
isDir: Ee < Ae.length - 1 || $e.isDir,
|
|
1436
1436
|
children: [],
|
|
1437
1437
|
size: Ee === Ae.length - 1 ? $e.size : 0
|
|
1438
|
-
}, te.children.push(
|
|
1438
|
+
}, te.children.push(we)), te = we;
|
|
1439
1439
|
}
|
|
1440
1440
|
}
|
|
1441
|
-
const
|
|
1442
|
-
$e.children.sort((Ae, te) => Ae.isDir !== te.isDir ? Ae.isDir ? -1 : 1 : Ae.name.localeCompare(te.name)), $e.children.forEach(
|
|
1441
|
+
const Q = ($e) => {
|
|
1442
|
+
$e.children.sort((Ae, te) => Ae.isDir !== te.isDir ? Ae.isDir ? -1 : 1 : Ae.name.localeCompare(te.name)), $e.children.forEach(Q);
|
|
1443
1443
|
};
|
|
1444
|
-
return
|
|
1444
|
+
return Q(ie), ie.children;
|
|
1445
1445
|
};
|
|
1446
1446
|
if (!t.visible || !h) return null;
|
|
1447
|
-
const $ = (w == null ? void 0 : w.memoryEntries) || [], ce =
|
|
1448
|
-
var
|
|
1447
|
+
const $ = (w == null ? void 0 : w.memoryEntries) || [], ce = Y, ye = () => {
|
|
1448
|
+
var B, ie;
|
|
1449
1449
|
return /* @__PURE__ */ a("div", { className: _.leftPanel, children: [
|
|
1450
1450
|
/* @__PURE__ */ e("div", { className: _.avatarWrap, children: h.avatar && h.avatar.includes("<svg") ? /* @__PURE__ */ e(
|
|
1451
1451
|
"span",
|
|
@@ -1454,8 +1454,8 @@ function li() {
|
|
|
1454
1454
|
className: _.avatarSvg
|
|
1455
1455
|
}
|
|
1456
1456
|
) : /* @__PURE__ */ e("div", { className: _.avatarFallback, children: h.avatar || "🤖" }) }),
|
|
1457
|
-
/* @__PURE__ */ e("div", { className: _.profileName, children: h.name ||
|
|
1458
|
-
((
|
|
1457
|
+
/* @__PURE__ */ e("div", { className: _.profileName, children: h.name || j }),
|
|
1458
|
+
((B = h._agenthub_raw) == null ? void 0 : B.createByName) && /* @__PURE__ */ a("div", { className: _.profileCreator, children: [
|
|
1459
1459
|
"创建者: ",
|
|
1460
1460
|
h._agenthub_raw.createByName
|
|
1461
1461
|
] }),
|
|
@@ -1464,7 +1464,7 @@ function li() {
|
|
|
1464
1464
|
h._agenthub_raw.type
|
|
1465
1465
|
] }),
|
|
1466
1466
|
h.description && /* @__PURE__ */ e("div", { className: _.profileDesc, children: h.description }),
|
|
1467
|
-
h.capabilities && h.capabilities.length > 0 && /* @__PURE__ */ e("div", { className: _.profileCapabilities, children: h.capabilities.map((
|
|
1467
|
+
h.capabilities && h.capabilities.length > 0 && /* @__PURE__ */ e("div", { className: _.profileCapabilities, children: h.capabilities.map((Q) => /* @__PURE__ */ e("span", { className: _.capabilityTag, children: Q }, Q)) }),
|
|
1468
1468
|
/* @__PURE__ */ e("div", { className: _.leftFooter, children: /* @__PURE__ */ a(
|
|
1469
1469
|
"button",
|
|
1470
1470
|
{
|
|
@@ -1481,25 +1481,25 @@ function li() {
|
|
|
1481
1481
|
) })
|
|
1482
1482
|
] });
|
|
1483
1483
|
}, de = () => {
|
|
1484
|
-
var
|
|
1484
|
+
var B, ie, Q, $e, Ae;
|
|
1485
1485
|
return /* @__PURE__ */ e("div", { className: _.rightPanel, children: /* @__PURE__ */ a(
|
|
1486
1486
|
wn,
|
|
1487
1487
|
{
|
|
1488
1488
|
activeKey: x,
|
|
1489
|
-
onChange:
|
|
1489
|
+
onChange: U,
|
|
1490
1490
|
size: "small",
|
|
1491
1491
|
className: _.tabs,
|
|
1492
1492
|
children: [
|
|
1493
1493
|
/* @__PURE__ */ e(_n, { tab: "基本信息", children: /* @__PURE__ */ a("div", { className: _.infoTab, children: [
|
|
1494
1494
|
/* @__PURE__ */ a("div", { className: _.infoRow, children: [
|
|
1495
1495
|
/* @__PURE__ */ e("span", { className: _.infoLabel, children: "Agent编码" }),
|
|
1496
|
-
/* @__PURE__ */ e("span", { className: _.infoValue, children:
|
|
1496
|
+
/* @__PURE__ */ e("span", { className: _.infoValue, children: j || "-" })
|
|
1497
1497
|
] }),
|
|
1498
1498
|
/* @__PURE__ */ a("div", { className: _.infoRow, children: [
|
|
1499
1499
|
/* @__PURE__ */ e("span", { className: _.infoLabel, children: "名称" }),
|
|
1500
1500
|
/* @__PURE__ */ e("span", { className: _.infoValue, children: h.name || "-" })
|
|
1501
1501
|
] }),
|
|
1502
|
-
((
|
|
1502
|
+
((B = h._agenthub_raw) == null ? void 0 : B.agentName) && /* @__PURE__ */ a("div", { className: _.infoRow, children: [
|
|
1503
1503
|
/* @__PURE__ */ e("span", { className: _.infoLabel, children: "Agent名称" }),
|
|
1504
1504
|
/* @__PURE__ */ e("span", { className: _.infoValue, children: h._agenthub_raw.agentName })
|
|
1505
1505
|
] }),
|
|
@@ -1507,7 +1507,7 @@ function li() {
|
|
|
1507
1507
|
/* @__PURE__ */ e("span", { className: _.infoLabel, children: "类型" }),
|
|
1508
1508
|
/* @__PURE__ */ e("span", { className: _.infoValue, children: h._agenthub_raw.type })
|
|
1509
1509
|
] }),
|
|
1510
|
-
((
|
|
1510
|
+
((Q = h._agenthub_raw) == null ? void 0 : Q.createByName) && /* @__PURE__ */ a("div", { className: _.infoRow, children: [
|
|
1511
1511
|
/* @__PURE__ */ e("span", { className: _.infoLabel, children: "创建者" }),
|
|
1512
1512
|
/* @__PURE__ */ e("span", { className: _.infoValue, children: h._agenthub_raw.createByName })
|
|
1513
1513
|
] }),
|
|
@@ -1536,14 +1536,14 @@ function li() {
|
|
|
1536
1536
|
/* @__PURE__ */ a("div", { className: _.memoryToolbar, children: [
|
|
1537
1537
|
/* @__PURE__ */ a("span", { className: _.memoryHint, children: [
|
|
1538
1538
|
"记忆文件存储于 /agents/",
|
|
1539
|
-
|
|
1539
|
+
j,
|
|
1540
1540
|
"/memory/ 目录"
|
|
1541
1541
|
] }),
|
|
1542
1542
|
/* @__PURE__ */ e(
|
|
1543
1543
|
fn,
|
|
1544
1544
|
{
|
|
1545
1545
|
title: "重置全部记忆:将从 /agents/{agentKey}/ 目录完整拷贝记忆,覆盖当前所有记忆文件。确定继续?",
|
|
1546
|
-
onConfirm: () => void
|
|
1546
|
+
onConfirm: () => void O(),
|
|
1547
1547
|
okText: "确定重置",
|
|
1548
1548
|
cancelText: "取消",
|
|
1549
1549
|
disabled: v,
|
|
@@ -1571,7 +1571,7 @@ function li() {
|
|
|
1571
1571
|
"div",
|
|
1572
1572
|
{
|
|
1573
1573
|
className: _.memoryItemClickable,
|
|
1574
|
-
onClick: () =>
|
|
1574
|
+
onClick: () => V(te),
|
|
1575
1575
|
children: [
|
|
1576
1576
|
/* @__PURE__ */ a("div", { className: _.memoryItemInfo, children: [
|
|
1577
1577
|
/* @__PURE__ */ e("div", { className: _.memoryItemTitle, children: te.title || te.name }),
|
|
@@ -1584,7 +1584,7 @@ function li() {
|
|
|
1584
1584
|
fn,
|
|
1585
1585
|
{
|
|
1586
1586
|
title: `确定重置「${te.title || te.name}」为种子内容?`,
|
|
1587
|
-
onConfirm: () => void
|
|
1587
|
+
onConfirm: () => void se(te.name),
|
|
1588
1588
|
okText: "重置",
|
|
1589
1589
|
cancelText: "取消",
|
|
1590
1590
|
disabled: v,
|
|
@@ -1605,7 +1605,7 @@ function li() {
|
|
|
1605
1605
|
fn,
|
|
1606
1606
|
{
|
|
1607
1607
|
title: `确定删除「${te.title || te.name}」?`,
|
|
1608
|
-
onConfirm: () => void
|
|
1608
|
+
onConfirm: () => void ee(te.name),
|
|
1609
1609
|
okText: "删除",
|
|
1610
1610
|
cancelText: "取消",
|
|
1611
1611
|
disabled: v,
|
|
@@ -1647,7 +1647,7 @@ function li() {
|
|
|
1647
1647
|
"div",
|
|
1648
1648
|
{
|
|
1649
1649
|
className: _.skillItemClickable,
|
|
1650
|
-
onClick: () => void
|
|
1650
|
+
onClick: () => void Ne(te),
|
|
1651
1651
|
children: [
|
|
1652
1652
|
/* @__PURE__ */ e("div", { className: _.skillIcon, children: /* @__PURE__ */ e(Mn, {}) }),
|
|
1653
1653
|
/* @__PURE__ */ a("div", { className: _.skillInfo, children: [
|
|
@@ -1668,27 +1668,27 @@ function li() {
|
|
|
1668
1668
|
]
|
|
1669
1669
|
}
|
|
1670
1670
|
) });
|
|
1671
|
-
}, Ge = (
|
|
1672
|
-
var
|
|
1673
|
-
const ie = ((
|
|
1671
|
+
}, Ge = (B) => {
|
|
1672
|
+
var Q;
|
|
1673
|
+
const ie = ((Q = B.split(".").pop()) == null ? void 0 : Q.toLowerCase()) || "";
|
|
1674
1674
|
return ie === "md" || ie === "markdown";
|
|
1675
|
-
},
|
|
1675
|
+
}, Ie = (B, ie) => B.map((Q) => /* @__PURE__ */ a("div", { children: [
|
|
1676
1676
|
/* @__PURE__ */ a(
|
|
1677
1677
|
"div",
|
|
1678
1678
|
{
|
|
1679
|
-
className: `${_.skillFileTreeNode} ${f ===
|
|
1679
|
+
className: `${_.skillFileTreeNode} ${f === Q.path ? _.skillFileTreeNodeActive : ""}`,
|
|
1680
1680
|
style: { paddingLeft: `${ie * 14 + 12}px` },
|
|
1681
1681
|
onClick: () => {
|
|
1682
|
-
|
|
1682
|
+
Q.isDir || Ue(Q.path);
|
|
1683
1683
|
},
|
|
1684
1684
|
children: [
|
|
1685
|
-
|
|
1686
|
-
/* @__PURE__ */ e("span", { className: _.skillFileTreeName, children:
|
|
1685
|
+
Q.isDir ? /* @__PURE__ */ e(ha, { className: _.skillFileTreeIcon }) : /* @__PURE__ */ e(co, { className: _.skillFileTreeIcon }),
|
|
1686
|
+
/* @__PURE__ */ e("span", { className: _.skillFileTreeName, children: Q.name })
|
|
1687
1687
|
]
|
|
1688
1688
|
}
|
|
1689
1689
|
),
|
|
1690
|
-
|
|
1691
|
-
] },
|
|
1690
|
+
Q.isDir && Q.children.length > 0 && /* @__PURE__ */ e("div", { children: Ie(Q.children, ie + 1) })
|
|
1691
|
+
] }, Q.path));
|
|
1692
1692
|
return /* @__PURE__ */ a(
|
|
1693
1693
|
"div",
|
|
1694
1694
|
{
|
|
@@ -1700,7 +1700,7 @@ function li() {
|
|
|
1700
1700
|
"div",
|
|
1701
1701
|
{
|
|
1702
1702
|
className: `${Xe.modal} ${_.resumeModal}`,
|
|
1703
|
-
onClick: (
|
|
1703
|
+
onClick: (B) => B.stopPropagation(),
|
|
1704
1704
|
children: [
|
|
1705
1705
|
/* @__PURE__ */ a("div", { className: _.modalHeader, children: [
|
|
1706
1706
|
/* @__PURE__ */ e("div", { className: Xe.title, children: "Agent 详情" }),
|
|
@@ -1725,14 +1725,14 @@ function li() {
|
|
|
1725
1725
|
"div",
|
|
1726
1726
|
{
|
|
1727
1727
|
className: _.memoryDetailOverlay,
|
|
1728
|
-
onClick: (
|
|
1729
|
-
|
|
1728
|
+
onClick: (B) => {
|
|
1729
|
+
B.stopPropagation(), V(null);
|
|
1730
1730
|
},
|
|
1731
1731
|
children: /* @__PURE__ */ a(
|
|
1732
1732
|
"div",
|
|
1733
1733
|
{
|
|
1734
1734
|
className: _.memoryDetailModal,
|
|
1735
|
-
onClick: (
|
|
1735
|
+
onClick: (B) => B.stopPropagation(),
|
|
1736
1736
|
children: [
|
|
1737
1737
|
/* @__PURE__ */ a("div", { className: _.memoryDetailHeader, children: [
|
|
1738
1738
|
/* @__PURE__ */ e("div", { className: _.memoryDetailTitle, children: z.title || z.name }),
|
|
@@ -1741,7 +1741,7 @@ function li() {
|
|
|
1741
1741
|
{
|
|
1742
1742
|
type: "button",
|
|
1743
1743
|
className: _.closeBtn,
|
|
1744
|
-
onClick: () =>
|
|
1744
|
+
onClick: () => V(null),
|
|
1745
1745
|
children: /* @__PURE__ */ e(Dt, {})
|
|
1746
1746
|
}
|
|
1747
1747
|
)
|
|
@@ -1776,31 +1776,31 @@ function li() {
|
|
|
1776
1776
|
)
|
|
1777
1777
|
}
|
|
1778
1778
|
),
|
|
1779
|
-
|
|
1779
|
+
Z && /* @__PURE__ */ e(
|
|
1780
1780
|
"div",
|
|
1781
1781
|
{
|
|
1782
1782
|
className: _.skillDetailOverlay,
|
|
1783
|
-
onClick: (
|
|
1784
|
-
|
|
1783
|
+
onClick: (B) => {
|
|
1784
|
+
B.stopPropagation(), ne(null);
|
|
1785
1785
|
},
|
|
1786
1786
|
children: /* @__PURE__ */ a(
|
|
1787
1787
|
"div",
|
|
1788
1788
|
{
|
|
1789
1789
|
className: _.skillDetailModal,
|
|
1790
|
-
onClick: (
|
|
1790
|
+
onClick: (B) => B.stopPropagation(),
|
|
1791
1791
|
children: [
|
|
1792
1792
|
/* @__PURE__ */ a("div", { className: _.skillDetailHeader, children: [
|
|
1793
1793
|
/* @__PURE__ */ a("div", { className: _.skillDetailTitle, children: [
|
|
1794
1794
|
/* @__PURE__ */ e("span", { style: { fontSize: 16 }, children: /* @__PURE__ */ e(Mn, {}) }),
|
|
1795
|
-
|
|
1796
|
-
|
|
1795
|
+
Z.skillName,
|
|
1796
|
+
Z.revision && /* @__PURE__ */ e("span", { className: _.skillBadge, children: "修订版" })
|
|
1797
1797
|
] }),
|
|
1798
1798
|
/* @__PURE__ */ e(
|
|
1799
1799
|
"button",
|
|
1800
1800
|
{
|
|
1801
1801
|
type: "button",
|
|
1802
1802
|
className: _.closeBtn,
|
|
1803
|
-
onClick: () =>
|
|
1803
|
+
onClick: () => ne(null),
|
|
1804
1804
|
children: /* @__PURE__ */ e(Dt, {})
|
|
1805
1805
|
}
|
|
1806
1806
|
)
|
|
@@ -1810,7 +1810,7 @@ function li() {
|
|
|
1810
1810
|
/* @__PURE__ */ e(at, { size: "small" }),
|
|
1811
1811
|
" ",
|
|
1812
1812
|
/* @__PURE__ */ e("span", { style: { marginLeft: 6 }, children: "加载中..." })
|
|
1813
|
-
] }) :
|
|
1813
|
+
] }) : re.length === 0 ? /* @__PURE__ */ e("div", { className: _.skillFileTreeEmpty, children: "暂无文件" }) : Ie(et(re), 0) }),
|
|
1814
1814
|
/* @__PURE__ */ e("div", { className: _.skillFileContent, children: k ? /* @__PURE__ */ a("div", { className: _.skillFileContentEmpty, children: [
|
|
1815
1815
|
/* @__PURE__ */ e(at, { size: "small" }),
|
|
1816
1816
|
" ",
|
|
@@ -1860,8 +1860,8 @@ function mi({
|
|
|
1860
1860
|
onClose: o,
|
|
1861
1861
|
onCreated: r
|
|
1862
1862
|
}) {
|
|
1863
|
-
const [s, m] = c(""), [g, w] = c([]), [L, S] = c(di), [F,
|
|
1864
|
-
|
|
1863
|
+
const [s, m] = c(""), [g, w] = c([]), [L, S] = c(di), [F, K] = c([]), [E, v] = c(!1), [I, x] = c(null), [U, z] = c(""), [V, Z] = c(!1), [ne, re] = c("");
|
|
1864
|
+
H(() => {
|
|
1865
1865
|
let C = !1;
|
|
1866
1866
|
return Po().then((T) => {
|
|
1867
1867
|
!C && Array.isArray(T) && T.length > 0 && S(T);
|
|
@@ -1870,17 +1870,17 @@ function mi({
|
|
|
1870
1870
|
C = !0;
|
|
1871
1871
|
};
|
|
1872
1872
|
}, []);
|
|
1873
|
-
const
|
|
1873
|
+
const D = async (C) => {
|
|
1874
1874
|
if (!C.type.startsWith("image/"))
|
|
1875
|
-
return
|
|
1875
|
+
return re("仅支持上传图片文件"), !1;
|
|
1876
1876
|
if (C.size > 10 * 1024 * 1024)
|
|
1877
|
-
return
|
|
1877
|
+
return re("图片大小不能超过 10MB"), !1;
|
|
1878
1878
|
v(!0);
|
|
1879
1879
|
try {
|
|
1880
1880
|
const T = await Eo(C);
|
|
1881
|
-
|
|
1881
|
+
K((i) => i.includes(T) ? i : [...i, T]);
|
|
1882
1882
|
} catch (T) {
|
|
1883
|
-
|
|
1883
|
+
re(`图片上传失败:${(T == null ? void 0 : T.message) || "未知错误"}`);
|
|
1884
1884
|
} finally {
|
|
1885
1885
|
v(!1);
|
|
1886
1886
|
}
|
|
@@ -1894,26 +1894,26 @@ function mi({
|
|
|
1894
1894
|
for (let k = 0; k < T.length; k++) {
|
|
1895
1895
|
const W = T[k];
|
|
1896
1896
|
if (W.kind === "file" && W.type.startsWith("image/")) {
|
|
1897
|
-
const
|
|
1898
|
-
|
|
1897
|
+
const Y = W.getAsFile();
|
|
1898
|
+
Y && i.push(Y);
|
|
1899
1899
|
}
|
|
1900
1900
|
}
|
|
1901
|
-
i.length && (C.preventDefault(), i.forEach((k) =>
|
|
1901
|
+
i.length && (C.preventDefault(), i.forEach((k) => D(k)));
|
|
1902
1902
|
}, y = async () => {
|
|
1903
1903
|
const C = s.trim();
|
|
1904
1904
|
if (!C) {
|
|
1905
|
-
|
|
1905
|
+
re("请填写产品页面地址");
|
|
1906
1906
|
return;
|
|
1907
1907
|
}
|
|
1908
|
-
|
|
1908
|
+
re(""), Z(!0);
|
|
1909
1909
|
try {
|
|
1910
|
-
const T =
|
|
1910
|
+
const T = U.trim();
|
|
1911
1911
|
let i, b;
|
|
1912
1912
|
T ? (i = T.length > 40 ? `${T.slice(0, 40)}…` : T, b = T.replace(/[?&#/\\:*"<>|]/g, "-").slice(0, 40) || "HBOS业务咨询") : (i = `HBOS业务咨询-${C.replace(/^https?:\/\//, "").replace(/\/+$/, "").replace(/[?&#/\\:]/g, "-").slice(0, 40) || "未命名"}`, b = i);
|
|
1913
1913
|
const k = [`HBOS业务咨询:${C}`];
|
|
1914
1914
|
g.length && k.push(`业务域:${g.join("、")}`), T && k.push(`问题描述:${T}`);
|
|
1915
1915
|
const W = k.join(`
|
|
1916
|
-
`),
|
|
1916
|
+
`), Y = await $o({
|
|
1917
1917
|
name: i,
|
|
1918
1918
|
description: W,
|
|
1919
1919
|
workspace_path: b,
|
|
@@ -1926,9 +1926,9 @@ function mi({
|
|
|
1926
1926
|
source: t.source
|
|
1927
1927
|
}
|
|
1928
1928
|
});
|
|
1929
|
-
r(
|
|
1929
|
+
r(Y.id), Z(!1);
|
|
1930
1930
|
} catch (T) {
|
|
1931
|
-
|
|
1931
|
+
re((T == null ? void 0 : T.message) || "创建失败,请重试"), Z(!1);
|
|
1932
1932
|
}
|
|
1933
1933
|
};
|
|
1934
1934
|
return /* @__PURE__ */ a(
|
|
@@ -1954,7 +1954,7 @@ function mi({
|
|
|
1954
1954
|
{
|
|
1955
1955
|
rows: 4,
|
|
1956
1956
|
placeholder: "请输入想咨询的业务问题,如:这个页面上的 XX 功能是怎么实现的?(支持 Ctrl+V 粘贴图片)",
|
|
1957
|
-
value:
|
|
1957
|
+
value: U,
|
|
1958
1958
|
onChange: (C) => z(C.target.value),
|
|
1959
1959
|
onPaste: f
|
|
1960
1960
|
}
|
|
@@ -1991,7 +1991,7 @@ function mi({
|
|
|
1991
1991
|
"a",
|
|
1992
1992
|
{
|
|
1993
1993
|
onClick: (i) => {
|
|
1994
|
-
i.stopPropagation(),
|
|
1994
|
+
i.stopPropagation(), K(
|
|
1995
1995
|
(b) => b.filter((k, W) => W !== T)
|
|
1996
1996
|
);
|
|
1997
1997
|
},
|
|
@@ -2023,7 +2023,7 @@ function mi({
|
|
|
2023
2023
|
onChange: (C) => w(C)
|
|
2024
2024
|
}
|
|
2025
2025
|
) }),
|
|
2026
|
-
|
|
2026
|
+
ne && /* @__PURE__ */ e("div", { style: { color: "#ff4d4f", marginBottom: 12, fontSize: 13 }, children: ne }),
|
|
2027
2027
|
/* @__PURE__ */ a("div", { style: { display: "flex", justifyContent: "flex-end", gap: 8 }, children: [
|
|
2028
2028
|
/* @__PURE__ */ e(gt, { onClick: o, children: "取消" }),
|
|
2029
2029
|
/* @__PURE__ */ e(
|
|
@@ -2031,8 +2031,8 @@ function mi({
|
|
|
2031
2031
|
{
|
|
2032
2032
|
type: "primary",
|
|
2033
2033
|
onClick: y,
|
|
2034
|
-
disabled:
|
|
2035
|
-
children:
|
|
2034
|
+
disabled: V || E,
|
|
2035
|
+
children: V ? /* @__PURE__ */ e(at, { size: "small" }) : "创建并开始咨询"
|
|
2036
2036
|
}
|
|
2037
2037
|
)
|
|
2038
2038
|
] })
|
|
@@ -2129,21 +2129,21 @@ function pi({
|
|
|
2129
2129
|
onClose: o,
|
|
2130
2130
|
onCreated: r
|
|
2131
2131
|
}) {
|
|
2132
|
-
var
|
|
2133
|
-
const [s, m] = c("link"), [g, w] = c(""), [L, S] = c([]), [F,
|
|
2132
|
+
var Ne, Ue, et;
|
|
2133
|
+
const [s, m] = c("link"), [g, w] = c(""), [L, S] = c([]), [F, K] = c(!1), [E, v] = c(), [I, x] = c(""), [U, z] = c([]), [V, Z] = c(0), [ne, re] = c(!1), [D, f] = c(1), [y, C] = c(10), [T, i] = c(
|
|
2134
2134
|
null
|
|
2135
|
-
), [b, k] = c(!1), [W,
|
|
2135
|
+
), [b, k] = c(!1), [W, Y] = c(""), [pe, p] = c(""), [R, h] = c(!1), [j, Ce] = c(
|
|
2136
2136
|
null
|
|
2137
2137
|
);
|
|
2138
|
-
|
|
2139
|
-
|
|
2138
|
+
H(() => {
|
|
2139
|
+
K(!0), aa().then(($) => {
|
|
2140
2140
|
S($ || []), $ && $.length > 0 && !E && v(String($[0].id));
|
|
2141
|
-
}).catch(($) =>
|
|
2142
|
-
}, []),
|
|
2141
|
+
}).catch(($) => Y($.message || "加载项目空间失败")).finally(() => K(!1));
|
|
2142
|
+
}, []), H(() => {
|
|
2143
2143
|
f(1), i(null);
|
|
2144
|
-
}, [E, I]),
|
|
2144
|
+
}, [E, I]), H(() => {
|
|
2145
2145
|
const $ = g.trim();
|
|
2146
|
-
p(""),
|
|
2146
|
+
p(""), Ce(null);
|
|
2147
2147
|
const ce = qn($), ye = ce ? null : an($);
|
|
2148
2148
|
if (!ce && !ye)
|
|
2149
2149
|
return;
|
|
@@ -2151,16 +2151,16 @@ function pi({
|
|
|
2151
2151
|
const Ge = setTimeout(() => {
|
|
2152
2152
|
h(!0), (async () => {
|
|
2153
2153
|
try {
|
|
2154
|
-
let
|
|
2155
|
-
if (!
|
|
2154
|
+
let Ie = ye;
|
|
2155
|
+
if (!Ie && ce) {
|
|
2156
2156
|
const lt = await $n(ce);
|
|
2157
|
-
|
|
2157
|
+
Ie = an(lt);
|
|
2158
2158
|
}
|
|
2159
|
-
if (!
|
|
2160
|
-
const me = await En(
|
|
2161
|
-
de || (p(me.title || ""),
|
|
2159
|
+
if (!Ie || de) return;
|
|
2160
|
+
const me = await En(Ie);
|
|
2161
|
+
de || (p(me.title || ""), Ce(me));
|
|
2162
2162
|
} catch {
|
|
2163
|
-
de || (p(""),
|
|
2163
|
+
de || (p(""), Ce(null));
|
|
2164
2164
|
} finally {
|
|
2165
2165
|
de || h(!1);
|
|
2166
2166
|
}
|
|
@@ -2169,30 +2169,30 @@ function pi({
|
|
|
2169
2169
|
return () => {
|
|
2170
2170
|
de = !0, clearTimeout(Ge);
|
|
2171
2171
|
};
|
|
2172
|
-
}, [g]),
|
|
2172
|
+
}, [g]), H(() => {
|
|
2173
2173
|
p((T == null ? void 0 : T.title) || "");
|
|
2174
2174
|
}, [T]);
|
|
2175
|
-
const
|
|
2175
|
+
const Te = q(async () => {
|
|
2176
2176
|
if (E) {
|
|
2177
|
-
|
|
2177
|
+
re(!0), Y("");
|
|
2178
2178
|
try {
|
|
2179
2179
|
const $ = await ra(
|
|
2180
2180
|
E,
|
|
2181
2181
|
I,
|
|
2182
|
-
|
|
2182
|
+
D,
|
|
2183
2183
|
y
|
|
2184
2184
|
);
|
|
2185
|
-
z($.records || []),
|
|
2185
|
+
z($.records || []), Z($.total || 0);
|
|
2186
2186
|
} catch ($) {
|
|
2187
|
-
z([]),
|
|
2187
|
+
z([]), Z(0), Y($.message || "查询工单列表失败");
|
|
2188
2188
|
} finally {
|
|
2189
|
-
|
|
2189
|
+
re(!1);
|
|
2190
2190
|
}
|
|
2191
2191
|
}
|
|
2192
|
-
}, [E, I,
|
|
2193
|
-
|
|
2194
|
-
s === "picker" &&
|
|
2195
|
-
}, [s,
|
|
2192
|
+
}, [E, I, D, y]);
|
|
2193
|
+
H(() => {
|
|
2194
|
+
s === "picker" && Te();
|
|
2195
|
+
}, [s, Te]);
|
|
2196
2196
|
const ge = Fe(
|
|
2197
2197
|
() => [
|
|
2198
2198
|
{
|
|
@@ -2234,7 +2234,7 @@ function pi({
|
|
|
2234
2234
|
}
|
|
2235
2235
|
],
|
|
2236
2236
|
[]
|
|
2237
|
-
),
|
|
2237
|
+
), oe = Fe(
|
|
2238
2238
|
() => ({
|
|
2239
2239
|
type: "radio",
|
|
2240
2240
|
selectedRowKeys: T ? [T.id] : [],
|
|
@@ -2247,81 +2247,81 @@ function pi({
|
|
|
2247
2247
|
async ($, ce, ye) => {
|
|
2248
2248
|
var de;
|
|
2249
2249
|
if (!$) {
|
|
2250
|
-
|
|
2250
|
+
Y("未选择有效的工单");
|
|
2251
2251
|
return;
|
|
2252
2252
|
}
|
|
2253
|
-
|
|
2253
|
+
Y(""), k(!0);
|
|
2254
2254
|
try {
|
|
2255
2255
|
const Ge = await sa($);
|
|
2256
2256
|
if (Ge != null) {
|
|
2257
2257
|
r(Mt(Ge));
|
|
2258
2258
|
return;
|
|
2259
2259
|
}
|
|
2260
|
-
const
|
|
2260
|
+
const Ie = `Fone工单排查-${$}`, me = pe.trim() || Ie, lt = {
|
|
2261
2261
|
1: "CD",
|
|
2262
2262
|
2: "CM",
|
|
2263
2263
|
3: "CP",
|
|
2264
2264
|
4: "PD",
|
|
2265
2265
|
10: "SOP"
|
|
2266
|
-
},
|
|
2266
|
+
}, B = ye ? {
|
|
2267
2267
|
foneIteamType: ye.workitemClassify || "",
|
|
2268
2268
|
// 改用大类型(需求/任务/缺陷/故障/事件)
|
|
2269
2269
|
foneIteamSpaceId: ye.projectCode || String(ye.projectId || ""),
|
|
2270
2270
|
foneIteamSpaceType: ye.projectType ? lt[ye.projectType] || String(ye.projectType) : "",
|
|
2271
2271
|
foneIteamSpaceName: ye.projectName || ""
|
|
2272
2272
|
// 新增:空间名称
|
|
2273
|
-
} : void 0,
|
|
2273
|
+
} : void 0, Q = await (await fetch("/kapi/z-team/api/scenario-instances/", {
|
|
2274
2274
|
method: "POST",
|
|
2275
2275
|
credentials: "include",
|
|
2276
2276
|
headers: { Accept: "application/json", "Content-Type": "application/json" },
|
|
2277
2277
|
body: JSON.stringify({
|
|
2278
2278
|
name: me,
|
|
2279
2279
|
description: ce ? `工单排查:${ce}` : `工单排查:workItemId=${$}`,
|
|
2280
|
-
workspace_path:
|
|
2280
|
+
workspace_path: Ie,
|
|
2281
2281
|
scenario_code: t.scenarioCode,
|
|
2282
2282
|
extend_params: {
|
|
2283
2283
|
[t.inputConfig.paramKey]: t.inputConfig.paramKey === "work_item_id" ? $ : ce || Kn($),
|
|
2284
2284
|
work_item_id: $,
|
|
2285
2285
|
source: t.source
|
|
2286
2286
|
},
|
|
2287
|
-
tags:
|
|
2287
|
+
tags: B
|
|
2288
2288
|
})
|
|
2289
2289
|
})).json();
|
|
2290
|
-
|
|
2290
|
+
Q.success && ((de = Q.data) != null && de.id) ? r(Q.data.id) : (Y(Q.message || "创建失败,请重试"), k(!1));
|
|
2291
2291
|
} catch {
|
|
2292
|
-
|
|
2292
|
+
Y("网络错误,请检查服务是否可用"), k(!1);
|
|
2293
2293
|
}
|
|
2294
2294
|
},
|
|
2295
2295
|
[t, r, pe]
|
|
2296
|
-
),
|
|
2296
|
+
), ee = q(async () => {
|
|
2297
2297
|
var ce;
|
|
2298
2298
|
const $ = g.trim();
|
|
2299
2299
|
if ((ce = t.inputConfig) != null && ce.required && !$) {
|
|
2300
|
-
|
|
2300
|
+
Y("请输入故障单链接地址");
|
|
2301
2301
|
return;
|
|
2302
2302
|
}
|
|
2303
|
-
|
|
2303
|
+
Y(""), k(!0);
|
|
2304
2304
|
try {
|
|
2305
2305
|
const ye = qn($);
|
|
2306
2306
|
let de, Ge;
|
|
2307
2307
|
if (ye) {
|
|
2308
|
-
const
|
|
2309
|
-
de = an(
|
|
2308
|
+
const Ie = await $n(ye);
|
|
2309
|
+
de = an(Ie), Ge = Ie;
|
|
2310
2310
|
} else
|
|
2311
2311
|
de = an($), Ge = ui($) || $;
|
|
2312
2312
|
if (!de) {
|
|
2313
|
-
|
|
2313
|
+
Y(
|
|
2314
2314
|
ye ? "短链解析结果中无法识别 workItemId,请改用工单详情页长链接" : "无法从链接中识别 workItemId,请检查链接是否包含 workItemId 参数"
|
|
2315
2315
|
), k(!1);
|
|
2316
2316
|
return;
|
|
2317
2317
|
}
|
|
2318
|
-
await A(de, Ge,
|
|
2318
|
+
await A(de, Ge, j);
|
|
2319
2319
|
} catch (ye) {
|
|
2320
|
-
|
|
2320
|
+
Y((ye == null ? void 0 : ye.message) || "链接解析失败,请重试"), k(!1);
|
|
2321
2321
|
}
|
|
2322
|
-
}, [g, t, A,
|
|
2322
|
+
}, [g, t, A, j]), se = q(async () => {
|
|
2323
2323
|
if (!T) {
|
|
2324
|
-
|
|
2324
|
+
Y("请先从列表中选择一条工单");
|
|
2325
2325
|
return;
|
|
2326
2326
|
}
|
|
2327
2327
|
const $ = String(T.id), ce = Kn(
|
|
@@ -2337,9 +2337,9 @@ function pi({
|
|
|
2337
2337
|
);
|
|
2338
2338
|
}
|
|
2339
2339
|
await A($, ce, ye);
|
|
2340
|
-
}, [T, E, A]),
|
|
2341
|
-
s === "link" ?
|
|
2342
|
-
}, [s,
|
|
2340
|
+
}, [T, E, A]), O = q(() => {
|
|
2341
|
+
s === "link" ? ee() : se();
|
|
2342
|
+
}, [s, ee, se]), _e = /* @__PURE__ */ a(
|
|
2343
2343
|
"div",
|
|
2344
2344
|
{
|
|
2345
2345
|
style: {
|
|
@@ -2357,7 +2357,7 @@ function pi({
|
|
|
2357
2357
|
] }) : /* @__PURE__ */ e("span", {}),
|
|
2358
2358
|
/* @__PURE__ */ a("div", { style: { display: "flex", gap: 8 }, children: [
|
|
2359
2359
|
/* @__PURE__ */ e(gt, { onClick: o, children: "取消" }),
|
|
2360
|
-
/* @__PURE__ */ e(gt, { type: "primary", loading: b, onClick:
|
|
2360
|
+
/* @__PURE__ */ e(gt, { type: "primary", loading: b, onClick: O, children: "确认并开始分析" })
|
|
2361
2361
|
] })
|
|
2362
2362
|
]
|
|
2363
2363
|
}
|
|
@@ -2380,7 +2380,7 @@ function pi({
|
|
|
2380
2380
|
{
|
|
2381
2381
|
activeKey: s,
|
|
2382
2382
|
onChange: ($) => {
|
|
2383
|
-
m($),
|
|
2383
|
+
m($), Y(""), p("");
|
|
2384
2384
|
},
|
|
2385
2385
|
items: [
|
|
2386
2386
|
{
|
|
@@ -2391,7 +2391,7 @@ function pi({
|
|
|
2391
2391
|
] }),
|
|
2392
2392
|
children: /* @__PURE__ */ a("div", { children: [
|
|
2393
2393
|
/* @__PURE__ */ e("div", { style: { marginBottom: 8 }, children: /* @__PURE__ */ a("label", { style: { fontWeight: 500, fontSize: 13 }, children: [
|
|
2394
|
-
(
|
|
2394
|
+
(Ne = t.inputConfig) == null ? void 0 : Ne.label,
|
|
2395
2395
|
((Ue = t.inputConfig) == null ? void 0 : Ue.required) && /* @__PURE__ */ e("span", { style: { color: "#ff4d4f", marginLeft: 4 }, children: "*" })
|
|
2396
2396
|
] }) }),
|
|
2397
2397
|
/* @__PURE__ */ e(
|
|
@@ -2400,10 +2400,10 @@ function pi({
|
|
|
2400
2400
|
value: g,
|
|
2401
2401
|
placeholder: (et = t.inputConfig) == null ? void 0 : et.placeholder,
|
|
2402
2402
|
onChange: ($) => {
|
|
2403
|
-
w($.target.value), W &&
|
|
2403
|
+
w($.target.value), W && Y("");
|
|
2404
2404
|
},
|
|
2405
2405
|
onKeyDown: ($) => {
|
|
2406
|
-
$.key === "Enter" && !$.shiftKey && ($.preventDefault(),
|
|
2406
|
+
$.key === "Enter" && !$.shiftKey && ($.preventDefault(), ee());
|
|
2407
2407
|
},
|
|
2408
2408
|
status: W ? "error" : void 0,
|
|
2409
2409
|
autoFocus: !0,
|
|
@@ -2481,9 +2481,9 @@ function pi({
|
|
|
2481
2481
|
type: "primary",
|
|
2482
2482
|
ghost: !0,
|
|
2483
2483
|
icon: /* @__PURE__ */ e(sn, {}),
|
|
2484
|
-
loading:
|
|
2484
|
+
loading: ne,
|
|
2485
2485
|
onClick: () => {
|
|
2486
|
-
f(1),
|
|
2486
|
+
f(1), Te();
|
|
2487
2487
|
},
|
|
2488
2488
|
children: "查询"
|
|
2489
2489
|
}
|
|
@@ -2491,17 +2491,17 @@ function pi({
|
|
|
2491
2491
|
]
|
|
2492
2492
|
}
|
|
2493
2493
|
),
|
|
2494
|
-
/* @__PURE__ */ e(at, { spinning:
|
|
2494
|
+
/* @__PURE__ */ e(at, { spinning: ne, children: /* @__PURE__ */ e(
|
|
2495
2495
|
qa,
|
|
2496
2496
|
{
|
|
2497
|
-
rows:
|
|
2497
|
+
rows: U,
|
|
2498
2498
|
rowKey: "id",
|
|
2499
2499
|
columns: ge,
|
|
2500
|
-
rowSelection:
|
|
2500
|
+
rowSelection: oe,
|
|
2501
2501
|
pagination: {
|
|
2502
|
-
current:
|
|
2502
|
+
current: D,
|
|
2503
2503
|
pageSize: y,
|
|
2504
|
-
total:
|
|
2504
|
+
total: V,
|
|
2505
2505
|
showSizeChanger: !0,
|
|
2506
2506
|
pageSizeOptions: ["10", "20", "50", "100"],
|
|
2507
2507
|
showTotal: ($) => `共 ${$} 条`,
|
|
@@ -2661,13 +2661,13 @@ function ec({
|
|
|
2661
2661
|
onProjectCreated: o,
|
|
2662
2662
|
presetScenarioCode: r
|
|
2663
2663
|
}) {
|
|
2664
|
-
const { createScenarioInstance: s, sendChatMessage: m, token: g } =
|
|
2665
|
-
|
|
2666
|
-
let
|
|
2664
|
+
const { createScenarioInstance: s, sendChatMessage: m, token: g } = M(), [w, L] = c([]), [S, F] = c(""), [K, E] = c(!0), [v, I] = c(""), [x, U] = c(""), [z, V] = c(!1);
|
|
2665
|
+
H(() => {
|
|
2666
|
+
let D = !1;
|
|
2667
2667
|
return (async () => {
|
|
2668
2668
|
try {
|
|
2669
2669
|
const f = await oo(g || "");
|
|
2670
|
-
if (
|
|
2670
|
+
if (D) return;
|
|
2671
2671
|
const y = Array.isArray(f) ? f : [];
|
|
2672
2672
|
if (y.length === 0) {
|
|
2673
2673
|
I(
|
|
@@ -2679,31 +2679,31 @@ function ec({
|
|
|
2679
2679
|
const C = (r || "").trim(), i = (C ? y.find((b) => b.code === C) : null) || Xi(y);
|
|
2680
2680
|
i && F(i.code);
|
|
2681
2681
|
} catch (f) {
|
|
2682
|
-
|
|
2682
|
+
D || (L([]), I(f instanceof Error ? f.message : "加载场景失败"));
|
|
2683
2683
|
} finally {
|
|
2684
|
-
|
|
2684
|
+
D || E(!1);
|
|
2685
2685
|
}
|
|
2686
2686
|
})(), () => {
|
|
2687
|
-
|
|
2687
|
+
D = !0;
|
|
2688
2688
|
};
|
|
2689
2689
|
}, [g, r]);
|
|
2690
|
-
const
|
|
2691
|
-
() => w.find((
|
|
2690
|
+
const Z = Fe(
|
|
2691
|
+
() => w.find((D) => D.code === S),
|
|
2692
2692
|
[w, S]
|
|
2693
|
-
),
|
|
2694
|
-
const
|
|
2695
|
-
if (!(!
|
|
2696
|
-
|
|
2693
|
+
), ne = async () => {
|
|
2694
|
+
const D = x.trim();
|
|
2695
|
+
if (!(!D || !S.trim() || z)) {
|
|
2696
|
+
V(!0);
|
|
2697
2697
|
try {
|
|
2698
|
-
const f =
|
|
2699
|
-
await s(f,
|
|
2698
|
+
const f = D.slice(0, 30) || "新建对话";
|
|
2699
|
+
await s(f, D, S.trim()), await m(D), t();
|
|
2700
2700
|
} catch (f) {
|
|
2701
2701
|
console.error("新建2 创建失败", f);
|
|
2702
2702
|
} finally {
|
|
2703
|
-
|
|
2703
|
+
V(!1);
|
|
2704
2704
|
}
|
|
2705
2705
|
}
|
|
2706
|
-
},
|
|
2706
|
+
}, re = x.trim().length > 0 && S.trim().length > 0 && !v && !z;
|
|
2707
2707
|
return /* @__PURE__ */ a("div", { className: Me.landing, children: [
|
|
2708
2708
|
/* @__PURE__ */ a("div", { className: Me.scrollArea, children: [
|
|
2709
2709
|
/* @__PURE__ */ a("div", { className: Me.header, children: [
|
|
@@ -2714,7 +2714,7 @@ function ec({
|
|
|
2714
2714
|
"Z-Team"
|
|
2715
2715
|
] }),
|
|
2716
2716
|
/* @__PURE__ */ e("span", { className: Me.contextDivider, children: "·" }),
|
|
2717
|
-
/* @__PURE__ */ e("span", { className: Me.contextItem, children: (
|
|
2717
|
+
/* @__PURE__ */ e("span", { className: Me.contextItem, children: (Z == null ? void 0 : Z.name) || "全场景总控" }),
|
|
2718
2718
|
v ? /* @__PURE__ */ e("span", { className: Me.contextError, children: v }) : null
|
|
2719
2719
|
] })
|
|
2720
2720
|
] }),
|
|
@@ -2734,9 +2734,9 @@ function ec({
|
|
|
2734
2734
|
rows: 4,
|
|
2735
2735
|
placeholder: "规划与编程,@ 添加上下文,/ 使用命令",
|
|
2736
2736
|
value: x,
|
|
2737
|
-
onChange: (
|
|
2738
|
-
onKeyDown: (
|
|
2739
|
-
|
|
2737
|
+
onChange: (D) => U(D.target.value),
|
|
2738
|
+
onKeyDown: (D) => {
|
|
2739
|
+
D.key === "Enter" && !D.shiftKey && (D.preventDefault(), ne());
|
|
2740
2740
|
},
|
|
2741
2741
|
autoFocus: !0,
|
|
2742
2742
|
disabled: z
|
|
@@ -2749,21 +2749,21 @@ function ec({
|
|
|
2749
2749
|
{
|
|
2750
2750
|
className: Me.scenarioSelect,
|
|
2751
2751
|
value: S,
|
|
2752
|
-
onChange: (
|
|
2753
|
-
disabled:
|
|
2752
|
+
onChange: (D) => F(D.target.value),
|
|
2753
|
+
disabled: K || w.length === 0,
|
|
2754
2754
|
children: [
|
|
2755
|
-
/* @__PURE__ */ e("option", { value: "", children:
|
|
2756
|
-
w.map((
|
|
2755
|
+
/* @__PURE__ */ e("option", { value: "", children: K ? "加载场景…" : "请选择场景" }),
|
|
2756
|
+
w.map((D) => /* @__PURE__ */ e("option", { value: D.code, children: D.name }, D.code))
|
|
2757
2757
|
]
|
|
2758
2758
|
}
|
|
2759
2759
|
),
|
|
2760
|
-
|
|
2760
|
+
Z != null && Z.description ? /* @__PURE__ */ e(
|
|
2761
2761
|
Gt,
|
|
2762
2762
|
{
|
|
2763
|
-
title:
|
|
2763
|
+
title: Z.description,
|
|
2764
2764
|
placement: "topLeft",
|
|
2765
2765
|
overlayClassName: Me.hintTooltip,
|
|
2766
|
-
children: /* @__PURE__ */ e("span", { className: Me.scenarioHint, children:
|
|
2766
|
+
children: /* @__PURE__ */ e("span", { className: Me.scenarioHint, children: Z.description })
|
|
2767
2767
|
}
|
|
2768
2768
|
) : null
|
|
2769
2769
|
] }),
|
|
@@ -2772,8 +2772,8 @@ function ec({
|
|
|
2772
2772
|
{
|
|
2773
2773
|
type: "button",
|
|
2774
2774
|
className: Me.sendBtn,
|
|
2775
|
-
onClick: () => void
|
|
2776
|
-
disabled: !
|
|
2775
|
+
onClick: () => void ne(),
|
|
2776
|
+
disabled: !re,
|
|
2777
2777
|
children: z ? "创建中…" : "发送"
|
|
2778
2778
|
}
|
|
2779
2779
|
)
|
|
@@ -2803,38 +2803,38 @@ const tc = "_bellBtn_zkdkx_2", nc = "_badge_zkdkx_25", oc = "_overlay_zkdkx_44",
|
|
|
2803
2803
|
itemResult: vc
|
|
2804
2804
|
};
|
|
2805
2805
|
function kc() {
|
|
2806
|
-
const t =
|
|
2806
|
+
const t = M((x) => x.token), [o, r] = c([]), [s, m] = c(0), [g, w] = c(!1), L = le(null), [S, F] = c({ top: 0, right: 0 }), K = q(async () => {
|
|
2807
2807
|
try {
|
|
2808
2808
|
const x = await Oa(t, 30);
|
|
2809
2809
|
r(x.items), m(x.unread);
|
|
2810
2810
|
} catch {
|
|
2811
2811
|
}
|
|
2812
2812
|
}, [t]);
|
|
2813
|
-
|
|
2814
|
-
|
|
2815
|
-
const x = setInterval(
|
|
2813
|
+
H(() => {
|
|
2814
|
+
K();
|
|
2815
|
+
const x = setInterval(K, 3e4);
|
|
2816
2816
|
return () => clearInterval(x);
|
|
2817
|
-
}, [
|
|
2817
|
+
}, [K]);
|
|
2818
2818
|
const E = () => {
|
|
2819
2819
|
const x = !g;
|
|
2820
2820
|
if (x && L.current) {
|
|
2821
|
-
const
|
|
2821
|
+
const U = L.current.getBoundingClientRect();
|
|
2822
2822
|
F({
|
|
2823
|
-
top:
|
|
2824
|
-
right: window.innerWidth -
|
|
2825
|
-
}),
|
|
2823
|
+
top: U.bottom + 4,
|
|
2824
|
+
right: window.innerWidth - U.right
|
|
2825
|
+
}), K();
|
|
2826
2826
|
}
|
|
2827
2827
|
w(x);
|
|
2828
2828
|
}, v = async (x) => {
|
|
2829
2829
|
try {
|
|
2830
2830
|
await Ba(x, t), r(
|
|
2831
|
-
(
|
|
2832
|
-
), m((
|
|
2831
|
+
(U) => U.map((z) => Lt(z.id, x) ? { ...z, readFlag: 1 } : z)
|
|
2832
|
+
), m((U) => Math.max(0, U - 1));
|
|
2833
2833
|
} catch {
|
|
2834
2834
|
}
|
|
2835
2835
|
}, I = async () => {
|
|
2836
2836
|
try {
|
|
2837
|
-
await ja(t), r((x) => x.map((
|
|
2837
|
+
await ja(t), r((x) => x.map((U) => ({ ...U, readFlag: 1 }))), m(0);
|
|
2838
2838
|
} catch {
|
|
2839
2839
|
}
|
|
2840
2840
|
};
|
|
@@ -2945,16 +2945,16 @@ function Ic() {
|
|
|
2945
2945
|
Math.abs(I) > Cc && (L.current.moved = !0, w(!0)), m(yn(L.current.startTop + I));
|
|
2946
2946
|
},
|
|
2947
2947
|
[]
|
|
2948
|
-
),
|
|
2948
|
+
), K = q(
|
|
2949
2949
|
(v) => {
|
|
2950
2950
|
var I, x;
|
|
2951
|
-
L.current.active && (L.current.active = !1, (x = (I = v.currentTarget).releasePointerCapture) == null || x.call(I, v.pointerId), L.current.moved && m((
|
|
2951
|
+
L.current.active && (L.current.active = !1, (x = (I = v.currentTarget).releasePointerCapture) == null || x.call(I, v.pointerId), L.current.moved && m((U) => (localStorage.setItem(Yn, String(U)), U)), w(!1));
|
|
2952
2952
|
},
|
|
2953
2953
|
[]
|
|
2954
2954
|
), E = q(() => {
|
|
2955
2955
|
L.current.moved || r(!0);
|
|
2956
2956
|
}, []);
|
|
2957
|
-
return
|
|
2957
|
+
return H(() => {
|
|
2958
2958
|
const v = () => m((I) => yn(I));
|
|
2959
2959
|
return window.addEventListener("resize", v), () => window.removeEventListener("resize", v);
|
|
2960
2960
|
}, []), t ? /* @__PURE__ */ a(bt, { children: [
|
|
@@ -2972,7 +2972,7 @@ function Ic() {
|
|
|
2972
2972
|
"data-dragging": g ? "" : void 0,
|
|
2973
2973
|
onPointerDown: S,
|
|
2974
2974
|
onPointerMove: F,
|
|
2975
|
-
onPointerUp:
|
|
2975
|
+
onPointerUp: K,
|
|
2976
2976
|
onClick: E,
|
|
2977
2977
|
"aria-label": "自身答疑",
|
|
2978
2978
|
children: /* @__PURE__ */ e(lo, {})
|
|
@@ -2995,8 +2995,8 @@ function Lc({
|
|
|
2995
2995
|
value: r,
|
|
2996
2996
|
onChange: s
|
|
2997
2997
|
}) {
|
|
2998
|
-
const [m, g] = c(!1), [w, L] = c(""), [S, F] = c(""), [
|
|
2999
|
-
|
|
2998
|
+
const [m, g] = c(!1), [w, L] = c(""), [S, F] = c(""), [K, E] = c(!1), v = le(null);
|
|
2999
|
+
H(() => {
|
|
3000
3000
|
if (!m) return;
|
|
3001
3001
|
L(""), F(""), E(!1);
|
|
3002
3002
|
const f = setTimeout(() => {
|
|
@@ -3004,7 +3004,7 @@ function Lc({
|
|
|
3004
3004
|
return (y = v.current) == null ? void 0 : y.focus();
|
|
3005
3005
|
}, 0);
|
|
3006
3006
|
return () => clearTimeout(f);
|
|
3007
|
-
}, [m]),
|
|
3007
|
+
}, [m]), H(() => {
|
|
3008
3008
|
if (w === S) return;
|
|
3009
3009
|
E(!0);
|
|
3010
3010
|
const f = setTimeout(() => {
|
|
@@ -3026,7 +3026,7 @@ function Lc({
|
|
|
3026
3026
|
for (const T of C) f.set(T, y);
|
|
3027
3027
|
}
|
|
3028
3028
|
return f;
|
|
3029
|
-
}, [t]),
|
|
3029
|
+
}, [t]), U = Fe(() => {
|
|
3030
3030
|
const f = /* @__PURE__ */ new Set();
|
|
3031
3031
|
for (const y of r) {
|
|
3032
3032
|
f.add(y);
|
|
@@ -3048,7 +3048,7 @@ function Lc({
|
|
|
3048
3048
|
},
|
|
3049
3049
|
[x]
|
|
3050
3050
|
);
|
|
3051
|
-
const
|
|
3051
|
+
const V = q(
|
|
3052
3052
|
(f) => {
|
|
3053
3053
|
const y = f.trim().toLowerCase();
|
|
3054
3054
|
return y ? t.filter(
|
|
@@ -3058,13 +3058,13 @@ function Lc({
|
|
|
3058
3058
|
) : t;
|
|
3059
3059
|
},
|
|
3060
3060
|
[t]
|
|
3061
|
-
),
|
|
3062
|
-
() =>
|
|
3063
|
-
[
|
|
3064
|
-
),
|
|
3061
|
+
), Z = Fe(
|
|
3062
|
+
() => V(S),
|
|
3063
|
+
[V, S]
|
|
3064
|
+
), ne = q(
|
|
3065
3065
|
(f) => {
|
|
3066
3066
|
const y = I(f);
|
|
3067
|
-
if (
|
|
3067
|
+
if (U.has(y)) {
|
|
3068
3068
|
const C = new Set(
|
|
3069
3069
|
[
|
|
3070
3070
|
f.staffId != null ? String(f.staffId) : "",
|
|
@@ -3076,11 +3076,11 @@ function Lc({
|
|
|
3076
3076
|
} else
|
|
3077
3077
|
s([...r, y]);
|
|
3078
3078
|
},
|
|
3079
|
-
[r, s, I,
|
|
3080
|
-
),
|
|
3079
|
+
[r, s, I, U]
|
|
3080
|
+
), re = q(
|
|
3081
3081
|
(f) => s(r.filter((y) => y !== f)),
|
|
3082
3082
|
[r, s]
|
|
3083
|
-
),
|
|
3083
|
+
), D = Fe(
|
|
3084
3084
|
() => r.map(z).join("、"),
|
|
3085
3085
|
[r, z]
|
|
3086
3086
|
);
|
|
@@ -3090,7 +3090,7 @@ function Lc({
|
|
|
3090
3090
|
{
|
|
3091
3091
|
type: "button",
|
|
3092
3092
|
className: `${d.iconChip} ${d.iconChipWithLabel} ${r.length > 0 ? d.iconChipActive : ""}`,
|
|
3093
|
-
title:
|
|
3093
|
+
title: D || "参与人",
|
|
3094
3094
|
onClick: () => g((f) => !f),
|
|
3095
3095
|
children: [
|
|
3096
3096
|
r.length > 0 && /* @__PURE__ */ e("span", { className: d.iconChipOrder, children: r.length }),
|
|
@@ -3145,13 +3145,13 @@ function Lc({
|
|
|
3145
3145
|
onChange: (f) => L(f.target.value),
|
|
3146
3146
|
onKeyDown: (f) => {
|
|
3147
3147
|
if (f.key === "Enter") {
|
|
3148
|
-
const y =
|
|
3149
|
-
F(w), E(!1), y.length > 0 &&
|
|
3148
|
+
const y = V(w);
|
|
3149
|
+
F(w), E(!1), y.length > 0 && ne(y[0]);
|
|
3150
3150
|
}
|
|
3151
3151
|
}
|
|
3152
3152
|
}
|
|
3153
3153
|
),
|
|
3154
|
-
/* @__PURE__ */ e("span", { className: d.participantSearchIcon, children:
|
|
3154
|
+
/* @__PURE__ */ e("span", { className: d.participantSearchIcon, children: K ? /* @__PURE__ */ e("span", { className: d.participantSearchSpinner }) : /* @__PURE__ */ a(
|
|
3155
3155
|
"svg",
|
|
3156
3156
|
{
|
|
3157
3157
|
width: "12",
|
|
@@ -3168,18 +3168,18 @@ function Lc({
|
|
|
3168
3168
|
}
|
|
3169
3169
|
) })
|
|
3170
3170
|
] }) }),
|
|
3171
|
-
/* @__PURE__ */ e("div", { className: d.participantColHeader, children: /* @__PURE__ */ e("span", { children:
|
|
3171
|
+
/* @__PURE__ */ e("div", { className: d.participantColHeader, children: /* @__PURE__ */ e("span", { children: K ? "查询中…" : `全部成员 (${Z.length})` }) }),
|
|
3172
3172
|
/* @__PURE__ */ e(
|
|
3173
3173
|
"div",
|
|
3174
3174
|
{
|
|
3175
|
-
className: `${d.participantList} ${
|
|
3176
|
-
children: o ? /* @__PURE__ */ e("div", { className: d.participantEmpty, children: "加载中…" }) :
|
|
3177
|
-
const y = I(f), C =
|
|
3175
|
+
className: `${d.participantList} ${K ? d.participantListSearching : ""}`,
|
|
3176
|
+
children: o ? /* @__PURE__ */ e("div", { className: d.participantEmpty, children: "加载中…" }) : Z.length === 0 ? /* @__PURE__ */ e("div", { className: d.participantEmpty, children: "未找到匹配成员" }) : Z.map((f) => {
|
|
3177
|
+
const y = I(f), C = U.has(y);
|
|
3178
3178
|
return /* @__PURE__ */ a(
|
|
3179
3179
|
"div",
|
|
3180
3180
|
{
|
|
3181
3181
|
className: `${d.participantItem} ${C ? d.participantItemChecked : ""}`,
|
|
3182
|
-
onClick: () =>
|
|
3182
|
+
onClick: () => ne(f),
|
|
3183
3183
|
children: [
|
|
3184
3184
|
/* @__PURE__ */ e("span", { className: d.participantItemName, children: f.name || f.accountNo }),
|
|
3185
3185
|
/* @__PURE__ */ e("span", { className: d.participantItemAccount, children: f.accountNo }),
|
|
@@ -3215,7 +3215,7 @@ function Lc({
|
|
|
3215
3215
|
{
|
|
3216
3216
|
className: d.participantRemoveBtn,
|
|
3217
3217
|
title: "移除",
|
|
3218
|
-
onClick: () =>
|
|
3218
|
+
onClick: () => re(f),
|
|
3219
3219
|
children: /* @__PURE__ */ e(Dt, {})
|
|
3220
3220
|
}
|
|
3221
3221
|
)
|
|
@@ -3227,7 +3227,7 @@ function Lc({
|
|
|
3227
3227
|
] })
|
|
3228
3228
|
] });
|
|
3229
3229
|
}
|
|
3230
|
-
const
|
|
3230
|
+
const J = {
|
|
3231
3231
|
folder: /* @__PURE__ */ e(
|
|
3232
3232
|
"svg",
|
|
3233
3233
|
{
|
|
@@ -3751,10 +3751,10 @@ function Pc({
|
|
|
3751
3751
|
members: L,
|
|
3752
3752
|
fileTreeVersion: S,
|
|
3753
3753
|
allSkills: F,
|
|
3754
|
-
skills:
|
|
3754
|
+
skills: K,
|
|
3755
3755
|
isLocal: E,
|
|
3756
3756
|
projectsLoading: v
|
|
3757
|
-
} =
|
|
3757
|
+
} = M(
|
|
3758
3758
|
dn((n) => ({
|
|
3759
3759
|
currentUser: n.currentUser,
|
|
3760
3760
|
currentProject: n.currentProject,
|
|
@@ -3769,10 +3769,10 @@ function Pc({
|
|
|
3769
3769
|
// 项目列表网络加载中(时间过滤切换触发 loadProjects 重查)
|
|
3770
3770
|
projectsLoading: n.loading
|
|
3771
3771
|
}))
|
|
3772
|
-
), I =
|
|
3772
|
+
), I = M((n) => n.selectFile), x = M((n) => n.deleteScenarioInstance), U = M((n) => n.forkScenarioInstance), z = M((n) => n.updateScenarioInstance), V = M((n) => n.renameFile), Z = M((n) => n.createFile), ne = M((n) => n.createFolder), re = M((n) => n.deleteFile), D = M((n) => n.uploadFile), f = M((n) => n.uploadFolder), y = M((n) => n.downloadFile), C = M((n) => n.expandProject), T = M((n) => n.loadAllSkills), i = M((n) => n.addProjectSkill), b = M((n) => n.removeProjectSkill), k = M((n) => n.refreshAgentSkills), W = M((n) => n.refreshAllAgentSkills), Y = M((n) => n.syncFromProduction), pe = M((n) => n.fetchWorkspaceEnv), p = M((n) => n.loadFileTree), R = M((n) => n.loadProjects), h = Fe(
|
|
3773
3773
|
() => Da(r),
|
|
3774
3774
|
[r]
|
|
3775
|
-
), [
|
|
3775
|
+
), [j, Ce] = c(null), [Te, ge] = c({ x: 0, y: 0 }), [oe, A] = c(!1), ee = le(null), se = le(null), [O, _e] = c(null), [Ne, Ue] = c(!1), [et, $] = c({}), [ce, ye] = c(
|
|
3776
3776
|
/* @__PURE__ */ new Set()
|
|
3777
3777
|
), [de, Ge] = c(() => {
|
|
3778
3778
|
try {
|
|
@@ -3781,15 +3781,15 @@ function Pc({
|
|
|
3781
3781
|
} catch {
|
|
3782
3782
|
return [];
|
|
3783
3783
|
}
|
|
3784
|
-
}), [
|
|
3784
|
+
}), [Ie, me] = c(Ac), [lt, B] = c(
|
|
3785
3785
|
/* @__PURE__ */ new Set()
|
|
3786
|
-
), [ie,
|
|
3786
|
+
), [ie, Q] = c(() => {
|
|
3787
3787
|
try {
|
|
3788
3788
|
return localStorage.getItem("ft_sidebar_time_filter") || "3d";
|
|
3789
3789
|
} catch {
|
|
3790
3790
|
return "3d";
|
|
3791
3791
|
}
|
|
3792
|
-
}), [$e, Ae] = c(!1), [te, Ee] = c(""), [qe,
|
|
3792
|
+
}), [$e, Ae] = c(!1), [te, Ee] = c(""), [qe, we] = c(null), tt = le(null), st = le({ active: !1, startX: 0, startVal: 0 }), mn = q(
|
|
3793
3793
|
(n) => {
|
|
3794
3794
|
n.preventDefault(), n.stopPropagation();
|
|
3795
3795
|
const l = tt.current;
|
|
@@ -3802,19 +3802,19 @@ function Pc({
|
|
|
3802
3802
|
},
|
|
3803
3803
|
[qe]
|
|
3804
3804
|
);
|
|
3805
|
-
|
|
3805
|
+
H(() => {
|
|
3806
3806
|
const n = (u) => {
|
|
3807
3807
|
if (!st.current.active) return;
|
|
3808
|
-
const G = u.clientX - st.current.startX,
|
|
3808
|
+
const G = u.clientX - st.current.startX, X = Math.max(
|
|
3809
3809
|
36,
|
|
3810
3810
|
Math.min(1200, st.current.startVal + G)
|
|
3811
3811
|
), ke = tt.current;
|
|
3812
|
-
ke && (ke.style.maxWidth = `${
|
|
3812
|
+
ke && (ke.style.maxWidth = `${X}px`);
|
|
3813
3813
|
}, l = () => {
|
|
3814
3814
|
if (!st.current.active) return;
|
|
3815
3815
|
st.current.active = !1, document.body.style.cursor = "", document.body.style.userSelect = "";
|
|
3816
3816
|
const u = tt.current;
|
|
3817
|
-
u &&
|
|
3817
|
+
u && we(
|
|
3818
3818
|
u.style.maxWidth ? parseInt(u.style.maxWidth, 10) : null
|
|
3819
3819
|
);
|
|
3820
3820
|
};
|
|
@@ -3830,11 +3830,11 @@ function Pc({
|
|
|
3830
3830
|
return [];
|
|
3831
3831
|
}
|
|
3832
3832
|
}), [At, _t] = c([]), [Yt, Jt] = c(!1), dt = le(!1);
|
|
3833
|
-
|
|
3833
|
+
H(() => {
|
|
3834
3834
|
pe();
|
|
3835
|
-
}, [pe]),
|
|
3835
|
+
}, [pe]), H(() => {
|
|
3836
3836
|
let n = !1;
|
|
3837
|
-
return Jt(!0), Mo(void 0,
|
|
3837
|
+
return Jt(!0), Mo(void 0, M.getState().token).then((l) => {
|
|
3838
3838
|
n || _t(Array.isArray(l) ? l : []);
|
|
3839
3839
|
}).catch(() => {
|
|
3840
3840
|
n || _t([]);
|
|
@@ -3843,7 +3843,7 @@ function Pc({
|
|
|
3843
3843
|
}), () => {
|
|
3844
3844
|
n = !0;
|
|
3845
3845
|
};
|
|
3846
|
-
}, []),
|
|
3846
|
+
}, []), H(() => {
|
|
3847
3847
|
if (!dt.current && (r != null && r.username)) {
|
|
3848
3848
|
if (!localStorage.getItem("ft_sidebar_participant_filter")) {
|
|
3849
3849
|
const l = r.id != null && Number(r.id) > 0 ? String(r.id) : String(r.username).trim();
|
|
@@ -3851,7 +3851,7 @@ function Pc({
|
|
|
3851
3851
|
}
|
|
3852
3852
|
dt.current = !0;
|
|
3853
3853
|
}
|
|
3854
|
-
}, [r]),
|
|
3854
|
+
}, [r]), H(() => {
|
|
3855
3855
|
dt.current && localStorage.setItem(
|
|
3856
3856
|
"ft_sidebar_participant_filter",
|
|
3857
3857
|
JSON.stringify(Je)
|
|
@@ -3875,7 +3875,7 @@ function Pc({
|
|
|
3875
3875
|
},
|
|
3876
3876
|
[Ot]
|
|
3877
3877
|
);
|
|
3878
|
-
|
|
3878
|
+
H(() => {
|
|
3879
3879
|
Tt((n) => {
|
|
3880
3880
|
let l = !1;
|
|
3881
3881
|
const u = [];
|
|
@@ -3887,14 +3887,14 @@ function Pc({
|
|
|
3887
3887
|
});
|
|
3888
3888
|
}, [Pt]);
|
|
3889
3889
|
const P = le(ce);
|
|
3890
|
-
P.current = ce,
|
|
3890
|
+
P.current = ce, H(() => {
|
|
3891
3891
|
localStorage.setItem("ft_sidebar_groupDims", JSON.stringify(de));
|
|
3892
|
-
}, [de]),
|
|
3893
|
-
localStorage.setItem("ft_sidebar_sortDims", JSON.stringify(
|
|
3894
|
-
}, [
|
|
3892
|
+
}, [de]), H(() => {
|
|
3893
|
+
localStorage.setItem("ft_sidebar_sortDims", JSON.stringify(Ie));
|
|
3894
|
+
}, [Ie]), H(() => {
|
|
3895
3895
|
localStorage.setItem("ft_sidebar_time_filter", ie);
|
|
3896
3896
|
}, [ie]);
|
|
3897
|
-
const
|
|
3897
|
+
const ae = q(() => {
|
|
3898
3898
|
if (!r) return;
|
|
3899
3899
|
const n = ie === "1d" ? 1 : ie === "3d" ? 3 : ie === "7d" ? 7 : 0;
|
|
3900
3900
|
if (n > 0) {
|
|
@@ -3906,9 +3906,9 @@ function Pc({
|
|
|
3906
3906
|
} else
|
|
3907
3907
|
R();
|
|
3908
3908
|
}, [ie, r]);
|
|
3909
|
-
|
|
3910
|
-
|
|
3911
|
-
}, [
|
|
3909
|
+
H(() => {
|
|
3910
|
+
ae();
|
|
3911
|
+
}, [ae]);
|
|
3912
3912
|
const ve = q((n) => {
|
|
3913
3913
|
Ge((l) => l.indexOf(n) >= 0 ? l.filter((G) => G !== n) : [...l, n]);
|
|
3914
3914
|
}, []), Ke = q((n) => {
|
|
@@ -3924,10 +3924,10 @@ function Pc({
|
|
|
3924
3924
|
}
|
|
3925
3925
|
return l.filter((G) => G.dim !== n);
|
|
3926
3926
|
});
|
|
3927
|
-
}, []), Be = ie !== "3d" || Je.length > 0 || de.length > 0 ||
|
|
3928
|
-
|
|
3927
|
+
}, []), Be = ie !== "3d" || Je.length > 0 || de.length > 0 || Ie.length > 0, Qt = q(() => {
|
|
3928
|
+
Q("3d"), Tt([]);
|
|
3929
3929
|
}, []);
|
|
3930
|
-
|
|
3930
|
+
H(() => {
|
|
3931
3931
|
if (Ye.current) {
|
|
3932
3932
|
Ye.current = !1;
|
|
3933
3933
|
return;
|
|
@@ -3935,9 +3935,9 @@ function Pc({
|
|
|
3935
3935
|
Vt(!0);
|
|
3936
3936
|
const n = setTimeout(() => Vt(!1), 300);
|
|
3937
3937
|
return () => clearTimeout(n);
|
|
3938
|
-
}, [de,
|
|
3938
|
+
}, [de, Ie, Je, ie]);
|
|
3939
3939
|
const Nt = v || un, It = q((n) => {
|
|
3940
|
-
|
|
3940
|
+
B((l) => {
|
|
3941
3941
|
const u = new Set(l);
|
|
3942
3942
|
return u.has(n) ? u.delete(n) : u.add(n), u;
|
|
3943
3943
|
});
|
|
@@ -3949,7 +3949,7 @@ function Pc({
|
|
|
3949
3949
|
(ze) => Pt(ze).some((nt) => Ze.includes(nt))
|
|
3950
3950
|
);
|
|
3951
3951
|
}), l = te.trim().toLowerCase(), G = [...l ? n.filter((he) => (he.name || "").toLowerCase().includes(l)) : n].sort((he, Ze) => {
|
|
3952
|
-
for (const { dim: ze, order: nt } of
|
|
3952
|
+
for (const { dim: ze, order: nt } of Ie) {
|
|
3953
3953
|
const ut = nt === "asc" ? 1 : -1;
|
|
3954
3954
|
if (ze === "create_time") {
|
|
3955
3955
|
const We = nn(he.created_at) - nn(Ze.created_at);
|
|
@@ -3966,7 +3966,7 @@ function Pc({
|
|
|
3966
3966
|
});
|
|
3967
3967
|
if (de.length === 0)
|
|
3968
3968
|
return [{ key: "__all__", label: "", projects: G }];
|
|
3969
|
-
function
|
|
3969
|
+
function X(he, Ze) {
|
|
3970
3970
|
switch (Ze) {
|
|
3971
3971
|
case "scenario":
|
|
3972
3972
|
return [
|
|
@@ -3986,12 +3986,12 @@ function Pc({
|
|
|
3986
3986
|
return he.parent_id != null ? ["fork", "Fork"] : ["normal", "正式"];
|
|
3987
3987
|
}
|
|
3988
3988
|
}
|
|
3989
|
-
const ke = ((je =
|
|
3989
|
+
const ke = ((je = Ie.find((he) => he.dim === "create_time")) == null ? void 0 : je.order) === "asc";
|
|
3990
3990
|
function wt(he, Ze, ze) {
|
|
3991
3991
|
if (Ze.length === 0) return [];
|
|
3992
3992
|
const [nt, ...ut] = Ze, We = /* @__PURE__ */ new Map();
|
|
3993
3993
|
for (const pt of he) {
|
|
3994
|
-
const [ht, ft] =
|
|
3994
|
+
const [ht, ft] = X(pt, nt);
|
|
3995
3995
|
We.has(ht) || We.set(ht, { label: ft, items: [] }), We.get(ht).items.push(pt);
|
|
3996
3996
|
}
|
|
3997
3997
|
const Zt = [];
|
|
@@ -4014,14 +4014,14 @@ function Pc({
|
|
|
4014
4014
|
}), Zt;
|
|
4015
4015
|
}
|
|
4016
4016
|
return wt(G, de, "");
|
|
4017
|
-
}, [m, de,
|
|
4017
|
+
}, [m, de, Ie, Je, Pt, te]), pn = Fe(
|
|
4018
4018
|
() => {
|
|
4019
4019
|
var n;
|
|
4020
4020
|
return de.length === 0 ? ((n = mt[0]) == null ? void 0 : n.projects.length) ?? 0 : mt.reduce((l, u) => l + u.projects.length, 0);
|
|
4021
4021
|
},
|
|
4022
4022
|
[mt, de]
|
|
4023
4023
|
);
|
|
4024
|
-
|
|
4024
|
+
H(() => {
|
|
4025
4025
|
$({}), s && P.current.forEach((n) => {
|
|
4026
4026
|
const l = n.indexOf("/");
|
|
4027
4027
|
if (l > 0) {
|
|
@@ -4029,49 +4029,49 @@ function Pc({
|
|
|
4029
4029
|
Bt(u);
|
|
4030
4030
|
}
|
|
4031
4031
|
});
|
|
4032
|
-
}, [S]),
|
|
4033
|
-
if (!
|
|
4034
|
-
const n = () =>
|
|
4035
|
-
u.key === "Escape" &&
|
|
4032
|
+
}, [S]), H(() => {
|
|
4033
|
+
if (!j) return;
|
|
4034
|
+
const n = () => Ce(null), l = (u) => {
|
|
4035
|
+
u.key === "Escape" && Ce(null);
|
|
4036
4036
|
};
|
|
4037
4037
|
return setTimeout(() => {
|
|
4038
4038
|
document.addEventListener("click", n), document.addEventListener("keydown", l);
|
|
4039
4039
|
}, 0), () => {
|
|
4040
4040
|
document.removeEventListener("click", n), document.removeEventListener("keydown", l);
|
|
4041
4041
|
};
|
|
4042
|
-
}, [
|
|
4042
|
+
}, [j]), ro(() => {
|
|
4043
4043
|
var je;
|
|
4044
|
-
if (!
|
|
4044
|
+
if (!j) {
|
|
4045
4045
|
A(!1);
|
|
4046
4046
|
return;
|
|
4047
4047
|
}
|
|
4048
|
-
const n =
|
|
4048
|
+
const n = se.current;
|
|
4049
4049
|
if (!n) return;
|
|
4050
4050
|
const { width: l, height: u } = n.getBoundingClientRect(), G = 8;
|
|
4051
|
-
let
|
|
4052
|
-
|
|
4053
|
-
const wt = (je =
|
|
4054
|
-
wt ?
|
|
4051
|
+
let X = j.initialX, ke = j.initialY;
|
|
4052
|
+
j.placement === "bottom-end" && (X = j.initialX - l);
|
|
4053
|
+
const wt = (je = ee.current) == null ? void 0 : je.getBoundingClientRect();
|
|
4054
|
+
wt ? X = Math.max(
|
|
4055
4055
|
wt.left + G,
|
|
4056
|
-
Math.min(
|
|
4057
|
-
) :
|
|
4058
|
-
}, [
|
|
4059
|
-
|
|
4060
|
-
}, [
|
|
4056
|
+
Math.min(X, wt.right - l - G)
|
|
4057
|
+
) : X = Math.max(G, Math.min(X, window.innerWidth - l - G)), ke = Math.max(G, Math.min(ke, window.innerHeight - u - G)), ge({ x: X, y: ke }), A(!0);
|
|
4058
|
+
}, [j]), H(() => {
|
|
4059
|
+
Ne && T();
|
|
4060
|
+
}, [Ne, T]);
|
|
4061
4061
|
const yt = q(
|
|
4062
4062
|
(n, l, u, G = !1) => {
|
|
4063
4063
|
if (n.preventDefault(), n.stopPropagation(), A(!1), G) {
|
|
4064
|
-
const
|
|
4065
|
-
|
|
4066
|
-
initialX:
|
|
4067
|
-
initialY:
|
|
4064
|
+
const X = n.currentTarget.getBoundingClientRect();
|
|
4065
|
+
Ce({
|
|
4066
|
+
initialX: X.right,
|
|
4067
|
+
initialY: X.bottom + 4,
|
|
4068
4068
|
placement: "bottom-end",
|
|
4069
4069
|
targetType: l,
|
|
4070
4070
|
target: u
|
|
4071
4071
|
});
|
|
4072
4072
|
return;
|
|
4073
4073
|
}
|
|
4074
|
-
|
|
4074
|
+
Ce({
|
|
4075
4075
|
initialX: n.clientX,
|
|
4076
4076
|
initialY: n.clientY,
|
|
4077
4077
|
placement: "pointer",
|
|
@@ -4099,14 +4099,14 @@ function Pc({
|
|
|
4099
4099
|
), Cn = q(
|
|
4100
4100
|
(n, l) => {
|
|
4101
4101
|
ce.has(n) || Bt(l), ye((G) => {
|
|
4102
|
-
const
|
|
4103
|
-
return
|
|
4102
|
+
const X = new Set(G);
|
|
4103
|
+
return X.has(n) ? X.delete(n) : X.add(n), X;
|
|
4104
4104
|
});
|
|
4105
4105
|
},
|
|
4106
4106
|
[ce, Bt]
|
|
4107
4107
|
), ko = q(
|
|
4108
|
-
(n, l, u, G,
|
|
4109
|
-
const ke = Array.isArray(n) ? n : [], wt =
|
|
4108
|
+
(n, l, u, G, X) => {
|
|
4109
|
+
const ke = Array.isArray(n) ? n : [], wt = X ?? 16;
|
|
4110
4110
|
return ke.map((je) => {
|
|
4111
4111
|
const he = u ? `${u}/${je.name}` : je.name, Ze = G ? `${G.id}/${he}` : he, ze = G ? `${G.id}/${he}` : he, nt = ce.has(Ze), ut = wt + l * 20;
|
|
4112
4112
|
return /* @__PURE__ */ a("div", { children: [
|
|
@@ -4123,8 +4123,8 @@ function Pc({
|
|
|
4123
4123
|
path: he
|
|
4124
4124
|
}),
|
|
4125
4125
|
children: [
|
|
4126
|
-
je.is_dir && /* @__PURE__ */ e("span", { className: d.treeArrow, children:
|
|
4127
|
-
/* @__PURE__ */ e("span", { className: d.fileItemIcon, children: je.is_dir ?
|
|
4126
|
+
je.is_dir && /* @__PURE__ */ e("span", { className: d.treeArrow, children: J.chevron(nt) }),
|
|
4127
|
+
/* @__PURE__ */ e("span", { className: d.fileItemIcon, children: je.is_dir ? J.folder : J.file }),
|
|
4128
4128
|
/* @__PURE__ */ e("span", { className: d.fileItemName, children: je.name }),
|
|
4129
4129
|
je.created_by_agent && /* @__PURE__ */ e("span", { className: d.fileItemBadge, children: "AI" }),
|
|
4130
4130
|
/* @__PURE__ */ e(
|
|
@@ -4142,7 +4142,7 @@ function Pc({
|
|
|
4142
4142
|
!0
|
|
4143
4143
|
);
|
|
4144
4144
|
},
|
|
4145
|
-
children:
|
|
4145
|
+
children: J.more
|
|
4146
4146
|
}
|
|
4147
4147
|
)
|
|
4148
4148
|
]
|
|
@@ -4153,7 +4153,7 @@ function Pc({
|
|
|
4153
4153
|
l + 1,
|
|
4154
4154
|
he,
|
|
4155
4155
|
G,
|
|
4156
|
-
|
|
4156
|
+
X
|
|
4157
4157
|
) : et[ze] ? /* @__PURE__ */ e(
|
|
4158
4158
|
"div",
|
|
4159
4159
|
{
|
|
@@ -4182,13 +4182,13 @@ function Pc({
|
|
|
4182
4182
|
]
|
|
4183
4183
|
), bo = q(
|
|
4184
4184
|
(n) => {
|
|
4185
|
-
if (
|
|
4185
|
+
if (j && (Ce(null), !(Jn.has(n) && !h))) {
|
|
4186
4186
|
if (n === "add-skill") {
|
|
4187
4187
|
Ue(!0);
|
|
4188
4188
|
return;
|
|
4189
4189
|
}
|
|
4190
4190
|
if (n === "refresh-agent-skills") {
|
|
4191
|
-
const l =
|
|
4191
|
+
const l = j.target;
|
|
4192
4192
|
if (!s || !confirm(
|
|
4193
4193
|
"确定刷新技能?将删除当前智能体所有本地技能,并从 AgentHub-AI 重新拉取覆盖。"
|
|
4194
4194
|
))
|
|
@@ -4196,8 +4196,8 @@ function Pc({
|
|
|
4196
4196
|
k(l.path);
|
|
4197
4197
|
return;
|
|
4198
4198
|
}
|
|
4199
|
-
if (
|
|
4200
|
-
const l =
|
|
4199
|
+
if (j.targetType === "project") {
|
|
4200
|
+
const l = j.target;
|
|
4201
4201
|
if (n === "rename")
|
|
4202
4202
|
_e({ type: "rename-project", target: l });
|
|
4203
4203
|
else if (n === "delete")
|
|
@@ -4224,42 +4224,42 @@ function Pc({
|
|
|
4224
4224
|
const u = document.createElement("input");
|
|
4225
4225
|
u.type = "file", u.onchange = (G) => {
|
|
4226
4226
|
var ke;
|
|
4227
|
-
const
|
|
4228
|
-
|
|
4227
|
+
const X = (ke = G.target.files) == null ? void 0 : ke[0];
|
|
4228
|
+
X && D(l.workspace_path, X);
|
|
4229
4229
|
}, u.click();
|
|
4230
4230
|
} else if (n === "upload-folder") {
|
|
4231
4231
|
const u = document.createElement("input");
|
|
4232
4232
|
u.type = "file", u.webkitdirectory = !0, u.multiple = !0, u.onchange = (G) => {
|
|
4233
|
-
const
|
|
4233
|
+
const X = Array.from(
|
|
4234
4234
|
G.target.files || []
|
|
4235
4235
|
);
|
|
4236
|
-
|
|
4236
|
+
X.length > 0 && f(l.workspace_path, X);
|
|
4237
4237
|
}, u.click();
|
|
4238
4238
|
} else if (n === "download")
|
|
4239
|
-
|
|
4239
|
+
xe("下载整个项目功能开发中...", "info");
|
|
4240
4240
|
else if (n === "sync-from-prod")
|
|
4241
|
-
|
|
4241
|
+
Y(l.id);
|
|
4242
4242
|
else if (n === "refresh-all-skills") {
|
|
4243
4243
|
if (!confirm(
|
|
4244
4244
|
"确定刷新本项目下所有智能体的技能?将从 AgentHub-AI 重新拉取覆盖安装,并在群中发出通知。"
|
|
4245
4245
|
))
|
|
4246
4246
|
return;
|
|
4247
4247
|
W(l.id);
|
|
4248
|
-
} else n === "fork-snapshot" ? (
|
|
4249
|
-
|
|
4248
|
+
} else n === "fork-snapshot" ? (xe("正在 Fork(快照模式)...", "info"), U(l.id, "snapshot").then((u) => {
|
|
4249
|
+
xe(`Fork 成功:${u.name}`, "success");
|
|
4250
4250
|
}).catch((u) => {
|
|
4251
|
-
|
|
4252
|
-
})) : n === "fork-clean" ? (
|
|
4253
|
-
|
|
4251
|
+
xe(`Fork 失败:${(u == null ? void 0 : u.message) ?? u}`, "error");
|
|
4252
|
+
})) : n === "fork-clean" ? (xe("正在 Fork(初始化模式)...", "info"), U(l.id, "clean").then((u) => {
|
|
4253
|
+
xe(`Fork 成功:${u.name}`, "success");
|
|
4254
4254
|
}).catch((u) => {
|
|
4255
|
-
|
|
4256
|
-
})) : n === "archive" ? (z(l.id, { status: "ARCHIVED" }),
|
|
4255
|
+
xe(`Fork 失败:${(u == null ? void 0 : u.message) ?? u}`, "error");
|
|
4256
|
+
})) : n === "archive" ? (z(l.id, { status: "ARCHIVED" }), xe(`已归档「${l.name}」`, "success")) : n === "unarchive" && (z(l.id, { status: "ACTIVE" }), xe(`已取消归档「${l.name}」`, "success"));
|
|
4257
4257
|
} else {
|
|
4258
|
-
const l =
|
|
4258
|
+
const l = j.target;
|
|
4259
4259
|
if (n === "rename")
|
|
4260
4260
|
_e({ type: "rename-file", target: l });
|
|
4261
4261
|
else if (n === "delete")
|
|
4262
|
-
confirm(`确定删除「${l.name}」?`) &&
|
|
4262
|
+
confirm(`确定删除「${l.name}」?`) && re(l.path);
|
|
4263
4263
|
else if (n === "new-file")
|
|
4264
4264
|
_e({ type: "new-file", target: l });
|
|
4265
4265
|
else if (n === "new-folder")
|
|
@@ -4268,27 +4268,27 @@ function Pc({
|
|
|
4268
4268
|
const u = document.createElement("input");
|
|
4269
4269
|
u.type = "file", u.onchange = (G) => {
|
|
4270
4270
|
var ke;
|
|
4271
|
-
const
|
|
4272
|
-
|
|
4271
|
+
const X = (ke = G.target.files) == null ? void 0 : ke[0];
|
|
4272
|
+
X && D(l.path, X);
|
|
4273
4273
|
}, u.click();
|
|
4274
4274
|
} else if (n === "upload-folder") {
|
|
4275
4275
|
const u = document.createElement("input");
|
|
4276
4276
|
u.type = "file", u.webkitdirectory = !0, u.multiple = !0, u.onchange = (G) => {
|
|
4277
|
-
const
|
|
4277
|
+
const X = Array.from(
|
|
4278
4278
|
G.target.files || []
|
|
4279
4279
|
);
|
|
4280
|
-
|
|
4280
|
+
X.length > 0 && f(l.path, X);
|
|
4281
4281
|
}, u.click();
|
|
4282
|
-
} else n === "download" && (l.is_dir ?
|
|
4282
|
+
} else n === "download" && (l.is_dir ? xe("下载文件夹功能开发中...", "info") : y(l.path));
|
|
4283
4283
|
}
|
|
4284
4284
|
}
|
|
4285
4285
|
},
|
|
4286
4286
|
[
|
|
4287
|
-
|
|
4287
|
+
j,
|
|
4288
4288
|
x,
|
|
4289
|
-
|
|
4290
|
-
|
|
4291
|
-
|
|
4289
|
+
U,
|
|
4290
|
+
re,
|
|
4291
|
+
D,
|
|
4292
4292
|
f,
|
|
4293
4293
|
y,
|
|
4294
4294
|
s,
|
|
@@ -4296,22 +4296,22 @@ function Pc({
|
|
|
4296
4296
|
W,
|
|
4297
4297
|
h,
|
|
4298
4298
|
E,
|
|
4299
|
-
|
|
4299
|
+
Y
|
|
4300
4300
|
]
|
|
4301
4301
|
), No = q(
|
|
4302
4302
|
(n) => {
|
|
4303
|
-
if (!
|
|
4304
|
-
const l =
|
|
4303
|
+
if (!O) return;
|
|
4304
|
+
const l = O;
|
|
4305
4305
|
_e(null), n.trim() && ((l.type === "rename-project" || l.type === "rename-file") && !h || (l.type === "rename-project" && l.target ? z(l.target.id, {
|
|
4306
4306
|
name: n.trim()
|
|
4307
|
-
}) : l.type === "rename-file" && l.target ?
|
|
4307
|
+
}) : l.type === "rename-file" && l.target ? V(l.target.path, n.trim()) : l.type === "new-file" && l.target ? Z(l.target.path, n.trim()) : l.type === "new-folder" && l.target && ne(l.target.path, n.trim())));
|
|
4308
4308
|
},
|
|
4309
4309
|
[
|
|
4310
|
-
|
|
4310
|
+
O,
|
|
4311
4311
|
z,
|
|
4312
|
-
|
|
4313
|
-
|
|
4314
|
-
|
|
4312
|
+
V,
|
|
4313
|
+
Z,
|
|
4314
|
+
ne,
|
|
4315
4315
|
h
|
|
4316
4316
|
]
|
|
4317
4317
|
), hn = q(
|
|
@@ -4325,22 +4325,22 @@ function Pc({
|
|
|
4325
4325
|
style: {
|
|
4326
4326
|
paddingLeft: l !== void 0 ? 16 + (l + 1) * 24 : 16
|
|
4327
4327
|
},
|
|
4328
|
-
onClick: async (
|
|
4329
|
-
|
|
4328
|
+
onClick: async (X) => {
|
|
4329
|
+
X.target.closest(`.${d.moreBtn}`) || await C(n);
|
|
4330
4330
|
},
|
|
4331
|
-
onContextMenu: (
|
|
4331
|
+
onContextMenu: (X) => yt(X, "project", n),
|
|
4332
4332
|
children: [
|
|
4333
|
-
/* @__PURE__ */ e("span", { className: `${d.fileItemIcon} ${G}`, children:
|
|
4333
|
+
/* @__PURE__ */ e("span", { className: `${d.fileItemIcon} ${G}`, children: J.groupChat }),
|
|
4334
4334
|
/* @__PURE__ */ e("span", { className: d.fileItemName, title: n.name, children: n.name }),
|
|
4335
|
-
n.parent_id != null && /* @__PURE__ */ e("span", { className: d.forkBadge, title: "Fork 子单", children:
|
|
4335
|
+
n.parent_id != null && /* @__PURE__ */ e("span", { className: d.forkBadge, title: "Fork 子单", children: J.fork }),
|
|
4336
4336
|
/* @__PURE__ */ e(
|
|
4337
4337
|
"button",
|
|
4338
4338
|
{
|
|
4339
4339
|
className: d.moreBtn,
|
|
4340
|
-
onClick: (
|
|
4341
|
-
|
|
4340
|
+
onClick: (X) => {
|
|
4341
|
+
X.stopPropagation(), yt(X, "project", n, !0);
|
|
4342
4342
|
},
|
|
4343
|
-
children:
|
|
4343
|
+
children: J.more
|
|
4344
4344
|
}
|
|
4345
4345
|
)
|
|
4346
4346
|
]
|
|
@@ -4364,13 +4364,13 @@ function Pc({
|
|
|
4364
4364
|
style: { paddingLeft: G },
|
|
4365
4365
|
onClick: () => It(n.key),
|
|
4366
4366
|
children: [
|
|
4367
|
-
/* @__PURE__ */ e("span", { className: d.treeArrow, children:
|
|
4367
|
+
/* @__PURE__ */ e("span", { className: d.treeArrow, children: J.chevron(!u) }),
|
|
4368
4368
|
/* @__PURE__ */ e("span", { className: d.groupLabel, title: n.label, children: n.label }),
|
|
4369
4369
|
/* @__PURE__ */ e("span", { className: d.groupCount, children: n.projects.length })
|
|
4370
4370
|
]
|
|
4371
4371
|
}
|
|
4372
4372
|
),
|
|
4373
|
-
!u && /* @__PURE__ */ e(bt, { children: n.children && n.children.length > 0 ? n.children.map((
|
|
4373
|
+
!u && /* @__PURE__ */ e(bt, { children: n.children && n.children.length > 0 ? n.children.map((X) => Tn(X, l + 1)) : n.projects.map((X) => hn(X, l)) })
|
|
4374
4374
|
] }, n.key);
|
|
4375
4375
|
},
|
|
4376
4376
|
[lt, It, hn]
|
|
@@ -4380,50 +4380,50 @@ function Pc({
|
|
|
4380
4380
|
action: u,
|
|
4381
4381
|
disabled: Jn.has(u) && wo
|
|
4382
4382
|
}), So = () => {
|
|
4383
|
-
if (!
|
|
4384
|
-
if (
|
|
4385
|
-
const l =
|
|
4386
|
-
ue("重命名",
|
|
4387
|
-
ue("新建文件",
|
|
4388
|
-
ue("新建文件夹",
|
|
4389
|
-
ue("上传文件",
|
|
4390
|
-
ue("上传文件夹",
|
|
4391
|
-
ue("下载",
|
|
4383
|
+
if (!j) return [];
|
|
4384
|
+
if (j.targetType === "project") {
|
|
4385
|
+
const l = j.target, u = [
|
|
4386
|
+
ue("重命名", J.edit, "rename"),
|
|
4387
|
+
ue("新建文件", J.file, "new-file"),
|
|
4388
|
+
ue("新建文件夹", J.folder, "new-folder"),
|
|
4389
|
+
ue("上传文件", J.upload, "upload-file"),
|
|
4390
|
+
ue("上传文件夹", J.upload, "upload-folder"),
|
|
4391
|
+
ue("下载", J.download, "download")
|
|
4392
4392
|
];
|
|
4393
|
-
return E && u.push(ue("从生产同步",
|
|
4394
|
-
ue("刷新所有技能",
|
|
4395
|
-
), u.push(ue("Fork(快照)",
|
|
4393
|
+
return E && u.push(ue("从生产同步", J.sync, "sync-from-prod")), u.push(
|
|
4394
|
+
ue("刷新所有技能", J.refresh, "refresh-all-skills")
|
|
4395
|
+
), u.push(ue("Fork(快照)", J.fork, "fork-snapshot")), u.push(ue("Fork(初始化)", J.fork, "fork-clean")), l.status === "ARCHIVED" ? u.push(ue("取消归档", J.archive, "unarchive")) : u.push(ue("归档", J.archive, "archive")), u.push(ue("删除", J.trash, "delete")), u;
|
|
4396
4396
|
}
|
|
4397
|
-
const n =
|
|
4397
|
+
const n = j.target;
|
|
4398
4398
|
return n.is_dir && n.path === ".z_team/.skills" ? [
|
|
4399
|
-
ue("添加技能",
|
|
4400
|
-
ue("新建文件",
|
|
4401
|
-
ue("新建文件夹",
|
|
4402
|
-
ue("上传文件",
|
|
4403
|
-
ue("上传文件夹",
|
|
4399
|
+
ue("添加技能", J.plus, "add-skill"),
|
|
4400
|
+
ue("新建文件", J.file, "new-file"),
|
|
4401
|
+
ue("新建文件夹", J.folder, "new-folder"),
|
|
4402
|
+
ue("上传文件", J.upload, "upload-file"),
|
|
4403
|
+
ue("上传文件夹", J.upload, "upload-folder")
|
|
4404
4404
|
] : n.is_dir && xc(n.path) ? [
|
|
4405
|
-
ue("刷新技能",
|
|
4406
|
-
ue("新建文件",
|
|
4407
|
-
ue("新建文件夹",
|
|
4408
|
-
ue("上传文件",
|
|
4409
|
-
ue("上传文件夹",
|
|
4410
|
-
ue("重命名",
|
|
4411
|
-
ue("删除",
|
|
4412
|
-
ue("下载",
|
|
4405
|
+
ue("刷新技能", J.refresh, "refresh-agent-skills"),
|
|
4406
|
+
ue("新建文件", J.file, "new-file"),
|
|
4407
|
+
ue("新建文件夹", J.folder, "new-folder"),
|
|
4408
|
+
ue("上传文件", J.upload, "upload-file"),
|
|
4409
|
+
ue("上传文件夹", J.upload, "upload-folder"),
|
|
4410
|
+
ue("重命名", J.edit, "rename"),
|
|
4411
|
+
ue("删除", J.trash, "delete"),
|
|
4412
|
+
ue("下载", J.download, "download")
|
|
4413
4413
|
] : n.is_dir ? [
|
|
4414
|
-
ue("新建文件",
|
|
4415
|
-
ue("新建文件夹",
|
|
4416
|
-
ue("上传文件",
|
|
4417
|
-
ue("上传文件夹",
|
|
4418
|
-
ue("重命名",
|
|
4419
|
-
ue("删除",
|
|
4420
|
-
ue("下载",
|
|
4414
|
+
ue("新建文件", J.file, "new-file"),
|
|
4415
|
+
ue("新建文件夹", J.folder, "new-folder"),
|
|
4416
|
+
ue("上传文件", J.upload, "upload-file"),
|
|
4417
|
+
ue("上传文件夹", J.upload, "upload-folder"),
|
|
4418
|
+
ue("重命名", J.edit, "rename"),
|
|
4419
|
+
ue("删除", J.trash, "delete"),
|
|
4420
|
+
ue("下载", J.download, "download")
|
|
4421
4421
|
] : [
|
|
4422
|
-
ue("重命名",
|
|
4423
|
-
ue("删除",
|
|
4424
|
-
ue("下载",
|
|
4422
|
+
ue("重命名", J.edit, "rename"),
|
|
4423
|
+
ue("删除", J.trash, "delete"),
|
|
4424
|
+
ue("下载", J.download, "download")
|
|
4425
4425
|
];
|
|
4426
|
-
}, Co =
|
|
4426
|
+
}, Co = O ? O.type === "rename-project" ? "输入新项目名称" : O.type === "rename-file" ? "输入新文件名" : O.type === "new-file" ? "输入文件名" : "输入文件夹名" : "", To = O ? O.type === "rename-project" ? "重命名项目" : O.type === "rename-file" ? "重命名" : O.type === "new-file" ? "新建文件" : "新建文件夹" : "", Io = O && O.type === "rename-file" && O.target || O && O.type === "rename-project" && O.target ? O.target.name : "", Lo = /* @__PURE__ */ a("div", { className: d.filterPopover, children: [
|
|
4427
4427
|
/* @__PURE__ */ a("div", { className: d.filterSection, children: [
|
|
4428
4428
|
/* @__PURE__ */ e("div", { className: d.filterSectionTitle, children: "过滤" }),
|
|
4429
4429
|
/* @__PURE__ */ e("div", { className: d.filterTimeOptions, children: [
|
|
@@ -4436,7 +4436,7 @@ function Pc({
|
|
|
4436
4436
|
{
|
|
4437
4437
|
type: "button",
|
|
4438
4438
|
className: `${d.filterTimeOption} ${ie === n.key ? d.filterTimeOptionActive : ""}`,
|
|
4439
|
-
onClick: () =>
|
|
4439
|
+
onClick: () => Q(n.key),
|
|
4440
4440
|
children: n.label
|
|
4441
4441
|
},
|
|
4442
4442
|
n.key
|
|
@@ -4459,7 +4459,7 @@ function Pc({
|
|
|
4459
4459
|
title: "重置过滤",
|
|
4460
4460
|
disabled: !Be,
|
|
4461
4461
|
onClick: Qt,
|
|
4462
|
-
children:
|
|
4462
|
+
children: J.reset
|
|
4463
4463
|
}
|
|
4464
4464
|
),
|
|
4465
4465
|
/* @__PURE__ */ e(
|
|
@@ -4469,8 +4469,8 @@ function Pc({
|
|
|
4469
4469
|
className: d.iconBtn,
|
|
4470
4470
|
disabled: v,
|
|
4471
4471
|
title: "刷新工作区",
|
|
4472
|
-
onClick:
|
|
4473
|
-
children: /* @__PURE__ */ e("span", { className: v ? d.refreshIconLoading : void 0, children:
|
|
4472
|
+
onClick: ae,
|
|
4473
|
+
children: /* @__PURE__ */ e("span", { className: v ? d.refreshIconLoading : void 0, children: J.refresh })
|
|
4474
4474
|
}
|
|
4475
4475
|
)
|
|
4476
4476
|
] })
|
|
@@ -4478,10 +4478,10 @@ function Pc({
|
|
|
4478
4478
|
/* @__PURE__ */ a("div", { className: d.filterSection, children: [
|
|
4479
4479
|
/* @__PURE__ */ e("div", { className: d.filterSectionTitle, children: "分组" }),
|
|
4480
4480
|
/* @__PURE__ */ e("div", { className: d.tagList, children: [
|
|
4481
|
-
{ key: "scenario", label: "场景", icon:
|
|
4482
|
-
{ key: "time", label: "时间", icon:
|
|
4483
|
-
{ key: "status", label: "状态", icon:
|
|
4484
|
-
{ key: "test", label: "测试", icon:
|
|
4481
|
+
{ key: "scenario", label: "场景", icon: J.apps },
|
|
4482
|
+
{ key: "time", label: "时间", icon: J.clock },
|
|
4483
|
+
{ key: "status", label: "状态", icon: J.target },
|
|
4484
|
+
{ key: "test", label: "测试", icon: J.branch }
|
|
4485
4485
|
].map((n) => {
|
|
4486
4486
|
const l = de.indexOf(n.key), u = l >= 0;
|
|
4487
4487
|
return /* @__PURE__ */ a(
|
|
@@ -4504,11 +4504,11 @@ function Pc({
|
|
|
4504
4504
|
/* @__PURE__ */ a("div", { className: d.filterSection, children: [
|
|
4505
4505
|
/* @__PURE__ */ e("div", { className: d.filterSectionTitle, children: "排序" }),
|
|
4506
4506
|
/* @__PURE__ */ e("div", { className: d.tagList, children: [
|
|
4507
|
-
{ key: "create_time", label: "创建时间", shortLabel: "时间", icon:
|
|
4508
|
-
{ key: "name", label: "名称", shortLabel: "名称", icon:
|
|
4509
|
-
{ key: "id", label: "ID", shortLabel: "ID", icon:
|
|
4507
|
+
{ key: "create_time", label: "创建时间", shortLabel: "时间", icon: J.clock },
|
|
4508
|
+
{ key: "name", label: "名称", shortLabel: "名称", icon: J.textT },
|
|
4509
|
+
{ key: "id", label: "ID", shortLabel: "ID", icon: J.listNum }
|
|
4510
4510
|
].map((n) => {
|
|
4511
|
-
const l =
|
|
4511
|
+
const l = Ie.findIndex((X) => X.dim === n.key), u = l >= 0, G = u ? Ie[l].order : void 0;
|
|
4512
4512
|
return /* @__PURE__ */ a(
|
|
4513
4513
|
"button",
|
|
4514
4514
|
{
|
|
@@ -4528,7 +4528,7 @@ function Pc({
|
|
|
4528
4528
|
}) })
|
|
4529
4529
|
] })
|
|
4530
4530
|
] });
|
|
4531
|
-
return /* @__PURE__ */ a("div", { className: d.sidebarInner, ref:
|
|
4531
|
+
return /* @__PURE__ */ a("div", { className: d.sidebarInner, ref: ee, children: [
|
|
4532
4532
|
/* @__PURE__ */ e(
|
|
4533
4533
|
"button",
|
|
4534
4534
|
{
|
|
@@ -4609,15 +4609,15 @@ function Pc({
|
|
|
4609
4609
|
title: "定位到当前聊天",
|
|
4610
4610
|
onClick: () => {
|
|
4611
4611
|
const n = s.id;
|
|
4612
|
-
|
|
4612
|
+
M.setState({ expandedProjectIds: [n] }), (!g[n] || !Array.isArray(g[n]) || g[n].length === 0) && p(), setTimeout(() => {
|
|
4613
4613
|
var u;
|
|
4614
|
-
const l = (u =
|
|
4614
|
+
const l = (u = ee.current) == null ? void 0 : u.querySelector(
|
|
4615
4615
|
`[data-project-id="${n}"]`
|
|
4616
4616
|
);
|
|
4617
4617
|
l == null || l.scrollIntoView({ behavior: "smooth", block: "nearest" });
|
|
4618
4618
|
}, 80);
|
|
4619
4619
|
},
|
|
4620
|
-
children:
|
|
4620
|
+
children: J.crosshair
|
|
4621
4621
|
}
|
|
4622
4622
|
)
|
|
4623
4623
|
] })
|
|
@@ -4635,15 +4635,15 @@ function Pc({
|
|
|
4635
4635
|
!Nt && m.length > 0 && pn === 0 && /* @__PURE__ */ e("div", { className: d.emptyHint, children: "无匹配的工作区,请调整过滤条件" })
|
|
4636
4636
|
] })
|
|
4637
4637
|
] }),
|
|
4638
|
-
|
|
4638
|
+
j && /* @__PURE__ */ e(
|
|
4639
4639
|
"div",
|
|
4640
4640
|
{
|
|
4641
|
-
ref:
|
|
4641
|
+
ref: se,
|
|
4642
4642
|
className: d.contextMenu,
|
|
4643
4643
|
style: {
|
|
4644
|
-
left:
|
|
4645
|
-
top:
|
|
4646
|
-
visibility:
|
|
4644
|
+
left: Te.x,
|
|
4645
|
+
top: Te.y,
|
|
4646
|
+
visibility: oe ? "visible" : "hidden"
|
|
4647
4647
|
},
|
|
4648
4648
|
onClick: (n) => n.stopPropagation(),
|
|
4649
4649
|
children: So().map((n) => /* @__PURE__ */ a(
|
|
@@ -4663,7 +4663,7 @@ function Pc({
|
|
|
4663
4663
|
))
|
|
4664
4664
|
}
|
|
4665
4665
|
),
|
|
4666
|
-
|
|
4666
|
+
O && /* @__PURE__ */ e(
|
|
4667
4667
|
$c,
|
|
4668
4668
|
{
|
|
4669
4669
|
title: To,
|
|
@@ -4673,17 +4673,17 @@ function Pc({
|
|
|
4673
4673
|
onCancel: () => _e(null)
|
|
4674
4674
|
}
|
|
4675
4675
|
),
|
|
4676
|
-
|
|
4676
|
+
Ne && /* @__PURE__ */ e(
|
|
4677
4677
|
Ec,
|
|
4678
4678
|
{
|
|
4679
4679
|
allSkills: F,
|
|
4680
|
-
projectSkills:
|
|
4680
|
+
projectSkills: K,
|
|
4681
4681
|
onConfirm: async (n) => {
|
|
4682
4682
|
if (!s) return;
|
|
4683
|
-
const u = new Set(
|
|
4683
|
+
const u = new Set(K.map((ke) => ke.id)), G = [...n].filter((ke) => !u.has(ke)), X = K.filter((ke) => !n.has(ke.id));
|
|
4684
4684
|
for (const ke of G)
|
|
4685
4685
|
await i(ke);
|
|
4686
|
-
for (const ke of
|
|
4686
|
+
for (const ke of X)
|
|
4687
4687
|
await b(ke.id);
|
|
4688
4688
|
Ue(!1);
|
|
4689
4689
|
},
|
|
@@ -4700,7 +4700,7 @@ function $c({
|
|
|
4700
4700
|
onCancel: m
|
|
4701
4701
|
}) {
|
|
4702
4702
|
const [g, w] = c(r), L = le(null);
|
|
4703
|
-
return
|
|
4703
|
+
return H(() => {
|
|
4704
4704
|
setTimeout(() => {
|
|
4705
4705
|
var S;
|
|
4706
4706
|
return (S = L.current) == null ? void 0 : S.focus();
|
|
@@ -4741,7 +4741,7 @@ function Ec({
|
|
|
4741
4741
|
});
|
|
4742
4742
|
}, F = async () => {
|
|
4743
4743
|
L(!0), await r(m), L(!1);
|
|
4744
|
-
},
|
|
4744
|
+
}, K = t.reduce((E, v) => {
|
|
4745
4745
|
const I = v.category || "其他";
|
|
4746
4746
|
return E[I] || (E[I] = []), E[I].push(v), E;
|
|
4747
4747
|
}, {});
|
|
@@ -4760,7 +4760,7 @@ function Ec({
|
|
|
4760
4760
|
" 已选"
|
|
4761
4761
|
] })
|
|
4762
4762
|
] }),
|
|
4763
|
-
/* @__PURE__ */ e("div", { className: d.skillPickerList, children: Object.entries(
|
|
4763
|
+
/* @__PURE__ */ e("div", { className: d.skillPickerList, children: Object.entries(K).map(([E, v]) => /* @__PURE__ */ a("div", { className: d.skillPickerGroup, children: [
|
|
4764
4764
|
/* @__PURE__ */ e("div", { className: d.skillPickerGroupLabel, children: E }),
|
|
4765
4765
|
v.map((I) => /* @__PURE__ */ a(
|
|
4766
4766
|
"label",
|
|
@@ -4850,13 +4850,13 @@ function dl(t) {
|
|
|
4850
4850
|
return m.length > Qn ? m.slice(0, Qn) + "…" : m || "新会话";
|
|
4851
4851
|
}
|
|
4852
4852
|
function ml() {
|
|
4853
|
-
const t = le(null), { token: o, createProjectAndSendFirstMessage: r } =
|
|
4853
|
+
const t = le(null), { token: o, createProjectAndSendFirstMessage: r } = M(
|
|
4854
4854
|
dn((i) => ({
|
|
4855
4855
|
token: i.token,
|
|
4856
4856
|
createProjectAndSendFirstMessage: i.createProjectAndSendFirstMessage
|
|
4857
4857
|
}))
|
|
4858
|
-
), [s, m] = c([]), [g, w] = c(!0), [L, S] = c(""), [F,
|
|
4859
|
-
|
|
4858
|
+
), [s, m] = c([]), [g, w] = c(!0), [L, S] = c(""), [F, K] = c(""), [E, v] = c(!1), [I, x] = c(""), [U, z] = c(!1), [V, Z] = c("");
|
|
4859
|
+
H(() => {
|
|
4860
4860
|
let i = !1;
|
|
4861
4861
|
return (async () => {
|
|
4862
4862
|
try {
|
|
@@ -4870,8 +4870,8 @@ function ml() {
|
|
|
4870
4870
|
return;
|
|
4871
4871
|
}
|
|
4872
4872
|
S(""), m(k);
|
|
4873
|
-
const W = k.find((
|
|
4874
|
-
W &&
|
|
4873
|
+
const W = k.find((Y) => Y.isDefault || Y.is_default) ?? (k.length === 1 ? k[0] : null);
|
|
4874
|
+
W && K(W.code);
|
|
4875
4875
|
} catch (b) {
|
|
4876
4876
|
i || (m([]), S(
|
|
4877
4877
|
b instanceof Error ? b.message : "加载场景失败"
|
|
@@ -4882,7 +4882,7 @@ function ml() {
|
|
|
4882
4882
|
})(), () => {
|
|
4883
4883
|
i = !0;
|
|
4884
4884
|
};
|
|
4885
|
-
}, [o]),
|
|
4885
|
+
}, [o]), H(() => {
|
|
4886
4886
|
if (!E) return;
|
|
4887
4887
|
const i = (b) => {
|
|
4888
4888
|
const k = document.querySelector(`.${be.scenarioWrap}`);
|
|
@@ -4890,10 +4890,10 @@ function ml() {
|
|
|
4890
4890
|
};
|
|
4891
4891
|
return document.addEventListener("mousedown", i), () => document.removeEventListener("mousedown", i);
|
|
4892
4892
|
}, [E]);
|
|
4893
|
-
const
|
|
4893
|
+
const ne = Fe(
|
|
4894
4894
|
() => s.find((i) => i.code === F),
|
|
4895
4895
|
[s, F]
|
|
4896
|
-
),
|
|
4896
|
+
), re = Fe(() => ne ? `${ne.name}(${ne.code})` : g ? "加载场景…" : s.length === 0 ? "无可用场景" : "请选择场景", [ne, g, s.length]), D = q(
|
|
4897
4897
|
(i) => {
|
|
4898
4898
|
x(i.target.value);
|
|
4899
4899
|
const b = i.target;
|
|
@@ -4912,14 +4912,14 @@ function ml() {
|
|
|
4912
4912
|
var k, W;
|
|
4913
4913
|
const i = I.trim();
|
|
4914
4914
|
if (!i) {
|
|
4915
|
-
|
|
4915
|
+
xe("请输入需求内容", "warning"), (W = (k = t.current) == null ? void 0 : k.focus) == null || W.call(k);
|
|
4916
4916
|
return;
|
|
4917
4917
|
}
|
|
4918
4918
|
if (!F.trim()) {
|
|
4919
|
-
|
|
4919
|
+
xe("请先选择场景", "warning");
|
|
4920
4920
|
return;
|
|
4921
4921
|
}
|
|
4922
|
-
z(!0),
|
|
4922
|
+
z(!0), Z("");
|
|
4923
4923
|
const b = dl(i);
|
|
4924
4924
|
try {
|
|
4925
4925
|
await r(
|
|
@@ -4928,21 +4928,21 @@ function ml() {
|
|
|
4928
4928
|
F,
|
|
4929
4929
|
i
|
|
4930
4930
|
);
|
|
4931
|
-
} catch (
|
|
4932
|
-
const pe =
|
|
4933
|
-
|
|
4931
|
+
} catch (Y) {
|
|
4932
|
+
const pe = Y instanceof Error ? Y.message : kn(Y) && Y.userMessage || "创建失败";
|
|
4933
|
+
Z(pe), kn(Y) || xe(pe, "error"), z(!1);
|
|
4934
4934
|
}
|
|
4935
4935
|
}, [I, F, r]), C = q(
|
|
4936
4936
|
(i) => {
|
|
4937
4937
|
i.key === "Enter" && (i.metaKey || i.ctrlKey) && (i.preventDefault(), y());
|
|
4938
4938
|
},
|
|
4939
4939
|
[y]
|
|
4940
|
-
), T =
|
|
4940
|
+
), T = U || !I.trim() || !F.trim() || g;
|
|
4941
4941
|
return /* @__PURE__ */ e("div", { className: be.welcomeRoot, children: /* @__PURE__ */ a("div", { className: be.welcomeInner, children: [
|
|
4942
4942
|
/* @__PURE__ */ e("h1", { className: be.heroTitle, children: "永远相信美好的事情即将发生" }),
|
|
4943
4943
|
/* @__PURE__ */ e("div", { className: be.heroDivider }),
|
|
4944
4944
|
L ? /* @__PURE__ */ e("div", { className: be.errorHint, children: L }) : null,
|
|
4945
|
-
|
|
4945
|
+
V ? /* @__PURE__ */ e("div", { className: be.errorHint, children: V }) : null,
|
|
4946
4946
|
/* @__PURE__ */ a("div", { className: be.composer, children: [
|
|
4947
4947
|
/* @__PURE__ */ e(
|
|
4948
4948
|
"textarea",
|
|
@@ -4950,10 +4950,10 @@ function ml() {
|
|
|
4950
4950
|
ref: t,
|
|
4951
4951
|
className: be.composerTextarea,
|
|
4952
4952
|
value: I,
|
|
4953
|
-
onChange:
|
|
4953
|
+
onChange: D,
|
|
4954
4954
|
onKeyDown: C,
|
|
4955
4955
|
placeholder: "规划与编程,@ 添加上下文,/ 使用命令",
|
|
4956
|
-
disabled:
|
|
4956
|
+
disabled: U,
|
|
4957
4957
|
rows: 3
|
|
4958
4958
|
}
|
|
4959
4959
|
),
|
|
@@ -4963,12 +4963,12 @@ function ml() {
|
|
|
4963
4963
|
{
|
|
4964
4964
|
className: be.scenarioWrap,
|
|
4965
4965
|
onClick: () => {
|
|
4966
|
-
s.length === 0 ||
|
|
4966
|
+
s.length === 0 || U || v((i) => !i);
|
|
4967
4967
|
},
|
|
4968
4968
|
title: "选择场景",
|
|
4969
4969
|
children: [
|
|
4970
4970
|
/* @__PURE__ */ e("span", { className: be.scenarioIcon, children: "⚡" }),
|
|
4971
|
-
/* @__PURE__ */ e("span", { className: be.scenarioLabel, children:
|
|
4971
|
+
/* @__PURE__ */ e("span", { className: be.scenarioLabel, children: re }),
|
|
4972
4972
|
/* @__PURE__ */ e(
|
|
4973
4973
|
"span",
|
|
4974
4974
|
{
|
|
@@ -4982,13 +4982,13 @@ function ml() {
|
|
|
4982
4982
|
className: be.scenarioDropdown,
|
|
4983
4983
|
onClick: (i) => i.stopPropagation(),
|
|
4984
4984
|
children: s.map((i) => {
|
|
4985
|
-
const b = (i.workspaceDirectories ?? i.workspace_directories ?? []).filter((h) => h && h !== ".z_team"), k = b.length > 0 ? b.join("、") : "(无业务目录)", W = i.agentCount ?? i.agent_count ?? 0,
|
|
4985
|
+
const b = (i.workspaceDirectories ?? i.workspace_directories ?? []).filter((h) => h && h !== ".z_team"), k = b.length > 0 ? b.join("、") : "(无业务目录)", W = i.agentCount ?? i.agent_count ?? 0, Y = i.skillInstallCount ?? i.skill_install_count ?? 0, pe = `将创建目录:${k};智能体 ${W} 个;预装技能 ${Y} 个`, p = !!(i.isDefault || i.is_default), R = i.code === F;
|
|
4986
4986
|
return /* @__PURE__ */ a(
|
|
4987
4987
|
"div",
|
|
4988
4988
|
{
|
|
4989
4989
|
className: `${be.scenarioOption} ${R ? be.scenarioOptionActive : ""}`,
|
|
4990
4990
|
onClick: () => {
|
|
4991
|
-
|
|
4991
|
+
K(i.code), v(!1);
|
|
4992
4992
|
},
|
|
4993
4993
|
children: [
|
|
4994
4994
|
/* @__PURE__ */ a("div", { className: be.scenarioOptionName, children: [
|
|
@@ -5008,7 +5008,7 @@ function ml() {
|
|
|
5008
5008
|
]
|
|
5009
5009
|
}
|
|
5010
5010
|
),
|
|
5011
|
-
/* @__PURE__ */ e("span", { className: be.scenarioMetaHint, children: (
|
|
5011
|
+
/* @__PURE__ */ e("span", { className: be.scenarioMetaHint, children: (ne == null ? void 0 : ne.description) || "元场景标签说明:选好场景后,由 Agent 自动识别目标" }),
|
|
5012
5012
|
/* @__PURE__ */ a(
|
|
5013
5013
|
"button",
|
|
5014
5014
|
{
|
|
@@ -5018,7 +5018,7 @@ function ml() {
|
|
|
5018
5018
|
disabled: T,
|
|
5019
5019
|
title: "Ctrl/⌘ + Enter 发送",
|
|
5020
5020
|
children: [
|
|
5021
|
-
|
|
5021
|
+
U ? "创建中…" : "发送",
|
|
5022
5022
|
/* @__PURE__ */ e("span", { style: { fontSize: 12, opacity: 0.85 }, children: "⏎" })
|
|
5023
5023
|
]
|
|
5024
5024
|
}
|
|
@@ -5033,7 +5033,7 @@ function ml() {
|
|
|
5033
5033
|
type: "button",
|
|
5034
5034
|
className: be.suggestionItem,
|
|
5035
5035
|
onClick: () => f(i.text),
|
|
5036
|
-
disabled:
|
|
5036
|
+
disabled: U,
|
|
5037
5037
|
children: [
|
|
5038
5038
|
/* @__PURE__ */ e("span", { className: be.suggestionIcon, children: i.icon }),
|
|
5039
5039
|
/* @__PURE__ */ e("span", { className: be.suggestionText, children: i.text })
|
|
@@ -5103,7 +5103,7 @@ const ul = "_layout_i9evc_1", pl = "_banner_i9evc_8", hl = "_bannerLeft_i9evc_20
|
|
|
5103
5103
|
modeToggleBtn: pd,
|
|
5104
5104
|
modeToggleBtnActive: hd,
|
|
5105
5105
|
smartWorkbenchArea: fd
|
|
5106
|
-
}, gd = ct(() => import("./index-
|
|
5106
|
+
}, gd = ct(() => import("./index-BT3VobW1.js")), _d = ct(() => import("./index-a4cM-7bG.js")), yd = ct(() => import("./index-BAK7UDvY.js")), vd = ct(() => import("./index-droRtYU6.js").then((t) => t.i)), kd = ct(() => import("./index-CcpWacSZ.js")), bd = ct(() => import("./index-BtaRkt8l.js")), Nd = ct(() => import("./index-C0EIMJI2.js")), wd = ct(() => import("./index-BAY37t4f.js")), Sd = ct(() => import("./index-B3zpx3YB.js")), Cd = ct(() => import("./index-JMzBzwiO.js")), Zn = ct(() => import("./SystemShell-Vb8zer_S.js")), Td = `${window.publicPath ?? "/"}logo.svg`, Id = [
|
|
5107
5107
|
"/ctc/",
|
|
5108
5108
|
"/ai/",
|
|
5109
5109
|
"/config/",
|
|
@@ -5169,65 +5169,65 @@ function Ad({
|
|
|
5169
5169
|
onOpenNewChat: g,
|
|
5170
5170
|
onCloseNewChat: w
|
|
5171
5171
|
}) {
|
|
5172
|
-
const { currentUser: L, currentProject: S } =
|
|
5172
|
+
const { currentUser: L, currentProject: S } = M(
|
|
5173
5173
|
dn((P) => ({
|
|
5174
5174
|
currentUser: P.currentUser,
|
|
5175
5175
|
currentProject: P.currentProject
|
|
5176
5176
|
}))
|
|
5177
|
-
), F =
|
|
5177
|
+
), F = M((P) => P.wsState), K = M((P) => P.token), E = le(null), v = Ya(260, 180, 400, "left"), [I, x] = c(
|
|
5178
5178
|
() => localStorage.getItem("ft_sidebar_collapsed") === "true"
|
|
5179
|
-
), [
|
|
5180
|
-
const P =
|
|
5181
|
-
return (P && P.length > 0 ? P :
|
|
5182
|
-
}, [
|
|
5183
|
-
() => Math.max(1e3, (
|
|
5184
|
-
[
|
|
5179
|
+
), [U, z] = c(!1), [V, Z] = c(0), [ne, re] = c(!1), [D, f] = c(null), [y, C] = c(0), [T, i] = c(!1), [b, k] = c(0), [W, Y] = c([]), [pe, p] = c(0), [R, h] = c(!1), [j, Ce] = c([]), [Te, ge] = c(0), oe = Fe(() => {
|
|
5180
|
+
const P = D == null ? void 0 : D.announcements;
|
|
5181
|
+
return (P && P.length > 0 ? P : D != null && D.announcement ? [D.announcement] : []).filter((ve) => ve.title || ve.content);
|
|
5182
|
+
}, [D]), A = Fe(
|
|
5183
|
+
() => Math.max(1e3, (D == null ? void 0 : D.bannerRotateInterval) ?? 5e3),
|
|
5184
|
+
[D == null ? void 0 : D.bannerRotateInterval]
|
|
5185
5185
|
);
|
|
5186
|
-
|
|
5187
|
-
if (
|
|
5186
|
+
H(() => {
|
|
5187
|
+
if (oe.length <= 1 || T) return;
|
|
5188
5188
|
const P = setInterval(() => {
|
|
5189
|
-
document.hidden || C((
|
|
5189
|
+
document.hidden || C((ae) => (ae + 1) % oe.length);
|
|
5190
5190
|
}, A);
|
|
5191
5191
|
return () => clearInterval(P);
|
|
5192
|
-
}, [
|
|
5192
|
+
}, [oe.length, T, A]), H(() => {
|
|
5193
5193
|
if (R) return;
|
|
5194
|
-
const P = yo(),
|
|
5194
|
+
const P = yo(), ae = oe.filter(
|
|
5195
5195
|
(ve) => ve.remindType === "POPUP" && !P.includes(Xn(ve))
|
|
5196
5196
|
);
|
|
5197
|
-
|
|
5198
|
-
}, [
|
|
5199
|
-
const
|
|
5197
|
+
ae.length !== 0 && (Y(ae), p(0), h(!0));
|
|
5198
|
+
}, [oe, R]);
|
|
5199
|
+
const ee = q(async () => {
|
|
5200
5200
|
try {
|
|
5201
|
-
const
|
|
5202
|
-
|
|
5201
|
+
const ae = (await On()).quotes ?? [];
|
|
5202
|
+
ae.length > 0 && (Ce(ae), ge(0));
|
|
5203
5203
|
} catch {
|
|
5204
5204
|
}
|
|
5205
5205
|
}, []);
|
|
5206
|
-
|
|
5206
|
+
H(() => {
|
|
5207
5207
|
let P = !0;
|
|
5208
|
-
const
|
|
5208
|
+
const ae = async () => {
|
|
5209
5209
|
try {
|
|
5210
5210
|
const Ke = await On();
|
|
5211
|
-
P && (f(Ke),
|
|
5211
|
+
P && (f(Ke), Ce((Be) => Be.length > 0 ? Be : Ke.quotes ?? []));
|
|
5212
5212
|
} catch {
|
|
5213
5213
|
}
|
|
5214
5214
|
};
|
|
5215
|
-
|
|
5216
|
-
const ve = setInterval(() => void
|
|
5215
|
+
ae();
|
|
5216
|
+
const ve = setInterval(() => void ae(), 6e4);
|
|
5217
5217
|
return () => {
|
|
5218
5218
|
P = !1, clearInterval(ve);
|
|
5219
5219
|
};
|
|
5220
|
-
}, []),
|
|
5221
|
-
if (
|
|
5220
|
+
}, []), H(() => {
|
|
5221
|
+
if (j.length === 0) return;
|
|
5222
5222
|
const P = setInterval(() => {
|
|
5223
|
-
document.hidden || ge((
|
|
5224
|
-
const ve =
|
|
5225
|
-
return ve <
|
|
5223
|
+
document.hidden || ge((ae) => {
|
|
5224
|
+
const ve = ae + 1;
|
|
5225
|
+
return ve < j.length ? ve : (ee(), 0);
|
|
5226
5226
|
});
|
|
5227
5227
|
}, 1e4);
|
|
5228
5228
|
return () => clearInterval(P);
|
|
5229
|
-
}, [
|
|
5230
|
-
const [
|
|
5229
|
+
}, [j, ee]);
|
|
5230
|
+
const [se, O] = c(null), [_e, Ne] = c("chat"), [Ue, et] = c(0), [$, ce] = c(0), [ye, de] = c(() => (on(), Xa())), [Ge, Ie] = c(() => {
|
|
5231
5231
|
try {
|
|
5232
5232
|
on();
|
|
5233
5233
|
const P = new URL(window.location.href).searchParams.get("mode");
|
|
@@ -5236,13 +5236,13 @@ function Ad({
|
|
|
5236
5236
|
}
|
|
5237
5237
|
return null;
|
|
5238
5238
|
});
|
|
5239
|
-
|
|
5239
|
+
H(() => {
|
|
5240
5240
|
const P = () => {
|
|
5241
5241
|
try {
|
|
5242
5242
|
on();
|
|
5243
|
-
const
|
|
5244
|
-
|
|
5245
|
-
|
|
5243
|
+
const ae = new URL(window.location.href).searchParams.get("mode");
|
|
5244
|
+
Ie(
|
|
5245
|
+
ae && rn.includes(ae) ? ae : null
|
|
5246
5246
|
);
|
|
5247
5247
|
} catch {
|
|
5248
5248
|
}
|
|
@@ -5253,28 +5253,28 @@ function Ad({
|
|
|
5253
5253
|
// /test/ 路径优先识别为 test 模式 (main.jsx 的 /test/* 路由传入 forcedChatMode='system',
|
|
5254
5254
|
// 但测试工作台需要 test 模式来渲染正确的菜单和高亮)
|
|
5255
5255
|
Ge === "test" || r === "system" && window.location.pathname.startsWith("/test/") ? "test" : r && !Ge ? r : Ge ?? r ?? ye
|
|
5256
|
-
), [lt,
|
|
5256
|
+
), [lt, B] = c(!1), [ie, Q] = c(null), [$e, Ae] = c(null), [te, Ee] = c(
|
|
5257
5257
|
null
|
|
5258
5258
|
);
|
|
5259
|
-
|
|
5259
|
+
H(() => {
|
|
5260
5260
|
try {
|
|
5261
|
-
const P = new URLSearchParams(window.location.search),
|
|
5262
|
-
if (
|
|
5263
|
-
de("collaboration"),
|
|
5261
|
+
const P = new URLSearchParams(window.location.search), ae = P.get("openNote");
|
|
5262
|
+
if (ae === "1" || ae === "true") {
|
|
5263
|
+
de("collaboration"), B(!0);
|
|
5264
5264
|
const Nt = String(
|
|
5265
5265
|
P.get("projectId") ?? P.get("project_id") ?? ""
|
|
5266
5266
|
).trim(), It = Mt(Nt);
|
|
5267
|
-
ao(It) &&
|
|
5267
|
+
ao(It) && Q(It);
|
|
5268
5268
|
}
|
|
5269
5269
|
const ve = P.get("mode"), Ke = P.get("agentId"), Be = P.get("tab"), Qt = P.get("sessionId");
|
|
5270
5270
|
if (ve === "personal" && Ke) {
|
|
5271
5271
|
de("personal");
|
|
5272
5272
|
const Nt = Mt(Ke);
|
|
5273
5273
|
Be && Ae(Be), Qt && Ee(Mt(Qt));
|
|
5274
|
-
const It =
|
|
5274
|
+
const It = M.getState().token;
|
|
5275
5275
|
Ro(It).then((pn) => {
|
|
5276
5276
|
const yt = pn.find((Bt) => Lt(Bt.id, Nt));
|
|
5277
|
-
yt && (
|
|
5277
|
+
yt && (O(yt), Ne(Be === "schedule" ? "detail" : "chat"), ce(Date.now()));
|
|
5278
5278
|
}).catch(() => {
|
|
5279
5279
|
});
|
|
5280
5280
|
const mt = new URL(window.location.href);
|
|
@@ -5282,19 +5282,19 @@ function Ad({
|
|
|
5282
5282
|
}
|
|
5283
5283
|
} catch {
|
|
5284
5284
|
}
|
|
5285
|
-
}, []),
|
|
5285
|
+
}, []), H(() => {
|
|
5286
5286
|
er(ye);
|
|
5287
5287
|
}, [ye]);
|
|
5288
5288
|
const qe = le(ye);
|
|
5289
|
-
|
|
5289
|
+
H(() => {
|
|
5290
5290
|
qe.current = ye;
|
|
5291
|
-
}, [ye]),
|
|
5291
|
+
}, [ye]), H(() => {
|
|
5292
5292
|
const P = () => {
|
|
5293
5293
|
try {
|
|
5294
5294
|
on();
|
|
5295
|
-
const
|
|
5296
|
-
let ve =
|
|
5297
|
-
!ve &&
|
|
5295
|
+
const ae = new URL(window.location.href);
|
|
5296
|
+
let ve = ae.searchParams.get("mode");
|
|
5297
|
+
!ve && ae.pathname.startsWith("/admin") && (ve = "admin"), !ve && ae.pathname.startsWith("/ops/") && (ve = "ops");
|
|
5298
5298
|
const Ke = ve && rn.includes(ve) ? ve : "collaboration";
|
|
5299
5299
|
Ke !== qe.current && de(Ke);
|
|
5300
5300
|
} catch {
|
|
@@ -5302,10 +5302,10 @@ function Ad({
|
|
|
5302
5302
|
};
|
|
5303
5303
|
return window.addEventListener("popstate", P), P(), () => window.removeEventListener("popstate", P);
|
|
5304
5304
|
}, []);
|
|
5305
|
-
const
|
|
5306
|
-
const
|
|
5305
|
+
const we = q((P) => {
|
|
5306
|
+
const ae = window.location.pathname;
|
|
5307
5307
|
if (P === "system") {
|
|
5308
|
-
if (Ld(
|
|
5308
|
+
if (Ld(ae) && !ae.startsWith("/ops/") && !ae.startsWith("/lc/"))
|
|
5309
5309
|
return;
|
|
5310
5310
|
it.push("/ctc/4a/account");
|
|
5311
5311
|
return;
|
|
@@ -5315,7 +5315,7 @@ function Ad({
|
|
|
5315
5315
|
return;
|
|
5316
5316
|
}
|
|
5317
5317
|
if (P === "admin") {
|
|
5318
|
-
if (
|
|
5318
|
+
if (ae.startsWith("/admin"))
|
|
5319
5319
|
return;
|
|
5320
5320
|
it.push("/admin?mode=admin");
|
|
5321
5321
|
return;
|
|
@@ -5339,13 +5339,13 @@ function Ad({
|
|
|
5339
5339
|
it.push(`/workspace?mode=${P}${ve}${Ke}`);
|
|
5340
5340
|
}, []), tt = (P) => {
|
|
5341
5341
|
x(P), localStorage.setItem("ft_sidebar_collapsed", P ? "true" : "false");
|
|
5342
|
-
}, st =
|
|
5343
|
-
|
|
5344
|
-
st.trigger > 0 && st.agent && (de("personal"),
|
|
5342
|
+
}, st = M((P) => P.personalChatNav);
|
|
5343
|
+
H(() => {
|
|
5344
|
+
st.trigger > 0 && st.agent && (de("personal"), O(st.agent), Ne("chat"), et((P) => P + 1), ce(Date.now()));
|
|
5345
5345
|
}, [st.trigger]);
|
|
5346
5346
|
const mn = q(
|
|
5347
|
-
(P,
|
|
5348
|
-
de("collaboration"),
|
|
5347
|
+
(P, ae) => {
|
|
5348
|
+
de("collaboration"), ae && (B(!0), Q(P)), it.push(`/workspace?projectId=${P}`);
|
|
5349
5349
|
},
|
|
5350
5350
|
[de]
|
|
5351
5351
|
), un = L != null && L.avatar && (L.avatar.startsWith("http") || L.avatar.startsWith("data:")) ? L.avatar : void 0, Vt = [
|
|
@@ -5357,20 +5357,20 @@ function Ad({
|
|
|
5357
5357
|
Ha();
|
|
5358
5358
|
}
|
|
5359
5359
|
}
|
|
5360
|
-
], Ye =
|
|
5360
|
+
], Ye = j[Te], Je = oe.length > 0 ? oe[y % oe.length] : void 0, Tt = (Je == null ? void 0 : Je.title) || (Je == null ? void 0 : Je.content) || "", At = oe.length > 0 ? b % oe.length : 0, _t = oe[At], Yt = Fe(() => {
|
|
5361
5361
|
if (!_t) return [];
|
|
5362
|
-
const P = [], { publishTime:
|
|
5363
|
-
return
|
|
5362
|
+
const P = [], { publishTime: ae, effectiveStartTime: ve, effectiveEndTime: Ke } = _t;
|
|
5363
|
+
return ae && P.push(`发布时间:${ae}`), (ve || Ke) && P.push(
|
|
5364
5364
|
`生效时间:${ve || "不限"} ~ ${Ke || "不限"}`
|
|
5365
5365
|
), P;
|
|
5366
5366
|
}, [_t]), Jt = q(() => {
|
|
5367
5367
|
k(
|
|
5368
|
-
|
|
5368
|
+
oe.length > 0 ? y % oe.length : 0
|
|
5369
5369
|
), i(!0);
|
|
5370
|
-
}, [y,
|
|
5370
|
+
}, [y, oe.length]), dt = W[pe], Ot = pe >= W.length - 1, Pt = q(() => {
|
|
5371
5371
|
const P = W[pe];
|
|
5372
5372
|
if (P && xd(Xn(P)), pe < W.length - 1) {
|
|
5373
|
-
p((
|
|
5373
|
+
p((ae) => ae + 1);
|
|
5374
5374
|
return;
|
|
5375
5375
|
}
|
|
5376
5376
|
h(!1);
|
|
@@ -5432,7 +5432,7 @@ function Ad({
|
|
|
5432
5432
|
{
|
|
5433
5433
|
type: "button",
|
|
5434
5434
|
className: `${N.modeToggleBtn} ${me === "personal" ? N.modeToggleBtnActive : ""}`,
|
|
5435
|
-
onClick: () =>
|
|
5435
|
+
onClick: () => we("personal"),
|
|
5436
5436
|
title: "个人",
|
|
5437
5437
|
children: /* @__PURE__ */ e(ka, {})
|
|
5438
5438
|
}
|
|
@@ -5442,7 +5442,7 @@ function Ad({
|
|
|
5442
5442
|
{
|
|
5443
5443
|
type: "button",
|
|
5444
5444
|
className: `${N.modeToggleBtn} ${me === "life" ? N.modeToggleBtnActive : ""}`,
|
|
5445
|
-
onClick: () =>
|
|
5445
|
+
onClick: () => we("life"),
|
|
5446
5446
|
title: "生活",
|
|
5447
5447
|
children: /* @__PURE__ */ e(ba, {})
|
|
5448
5448
|
}
|
|
@@ -5452,7 +5452,7 @@ function Ad({
|
|
|
5452
5452
|
{
|
|
5453
5453
|
type: "button",
|
|
5454
5454
|
className: `${N.modeToggleBtn} ${me === "training" ? N.modeToggleBtnActive : ""}`,
|
|
5455
|
-
onClick: () =>
|
|
5455
|
+
onClick: () => we("training"),
|
|
5456
5456
|
title: "培训",
|
|
5457
5457
|
children: /* @__PURE__ */ e(Na, {})
|
|
5458
5458
|
}
|
|
@@ -5462,7 +5462,7 @@ function Ad({
|
|
|
5462
5462
|
{
|
|
5463
5463
|
type: "button",
|
|
5464
5464
|
className: `${N.modeToggleBtn} ${me === "knowledge" ? N.modeToggleBtnActive : ""}`,
|
|
5465
|
-
onClick: () =>
|
|
5465
|
+
onClick: () => we("knowledge"),
|
|
5466
5466
|
title: "知识",
|
|
5467
5467
|
children: /* @__PURE__ */ e(wa, {})
|
|
5468
5468
|
}
|
|
@@ -5472,7 +5472,7 @@ function Ad({
|
|
|
5472
5472
|
{
|
|
5473
5473
|
type: "button",
|
|
5474
5474
|
className: `${N.modeToggleBtn} ${me === "smart" ? N.modeToggleBtnActive : ""}`,
|
|
5475
|
-
onClick: () =>
|
|
5475
|
+
onClick: () => we("smart"),
|
|
5476
5476
|
title: "智能",
|
|
5477
5477
|
children: /* @__PURE__ */ e(Sa, {})
|
|
5478
5478
|
}
|
|
@@ -5482,7 +5482,7 @@ function Ad({
|
|
|
5482
5482
|
{
|
|
5483
5483
|
type: "button",
|
|
5484
5484
|
className: `${N.modeToggleBtn} ${me === "collaboration" ? N.modeToggleBtnActive : ""}`,
|
|
5485
|
-
onClick: () =>
|
|
5485
|
+
onClick: () => we("collaboration"),
|
|
5486
5486
|
title: "协作",
|
|
5487
5487
|
children: /* @__PURE__ */ e(Ca, {})
|
|
5488
5488
|
}
|
|
@@ -5492,7 +5492,7 @@ function Ad({
|
|
|
5492
5492
|
{
|
|
5493
5493
|
type: "button",
|
|
5494
5494
|
className: `${N.modeToggleBtn} ${me === "product" ? N.modeToggleBtnActive : ""}`,
|
|
5495
|
-
onClick: () =>
|
|
5495
|
+
onClick: () => we("product"),
|
|
5496
5496
|
title: "产品",
|
|
5497
5497
|
children: /* @__PURE__ */ e(Ta, {})
|
|
5498
5498
|
}
|
|
@@ -5502,7 +5502,7 @@ function Ad({
|
|
|
5502
5502
|
{
|
|
5503
5503
|
type: "button",
|
|
5504
5504
|
className: `${N.modeToggleBtn} ${me === "dev" ? N.modeToggleBtnActive : ""}`,
|
|
5505
|
-
onClick: () =>
|
|
5505
|
+
onClick: () => we("dev"),
|
|
5506
5506
|
title: "研发",
|
|
5507
5507
|
children: /* @__PURE__ */ e(Ia, {})
|
|
5508
5508
|
}
|
|
@@ -5512,7 +5512,7 @@ function Ad({
|
|
|
5512
5512
|
{
|
|
5513
5513
|
type: "button",
|
|
5514
5514
|
className: `${N.modeToggleBtn} ${me === "test" ? N.modeToggleBtnActive : ""}`,
|
|
5515
|
-
onClick: () =>
|
|
5515
|
+
onClick: () => we("test"),
|
|
5516
5516
|
title: "测试",
|
|
5517
5517
|
children: /* @__PURE__ */ e(Sn, {})
|
|
5518
5518
|
}
|
|
@@ -5522,7 +5522,7 @@ function Ad({
|
|
|
5522
5522
|
{
|
|
5523
5523
|
type: "button",
|
|
5524
5524
|
className: `${N.modeToggleBtn} ${me === "ops" ? N.modeToggleBtnActive : ""}`,
|
|
5525
|
-
onClick: () =>
|
|
5525
|
+
onClick: () => we("ops"),
|
|
5526
5526
|
title: "运维",
|
|
5527
5527
|
children: /* @__PURE__ */ e(La, {})
|
|
5528
5528
|
}
|
|
@@ -5532,7 +5532,7 @@ function Ad({
|
|
|
5532
5532
|
{
|
|
5533
5533
|
type: "button",
|
|
5534
5534
|
className: `${N.modeToggleBtn} ${me === "admin" ? N.modeToggleBtnActive : ""}`,
|
|
5535
|
-
onClick: () =>
|
|
5535
|
+
onClick: () => we("admin"),
|
|
5536
5536
|
title: "运营",
|
|
5537
5537
|
children: /* @__PURE__ */ e(xa, {})
|
|
5538
5538
|
}
|
|
@@ -5542,7 +5542,7 @@ function Ad({
|
|
|
5542
5542
|
{
|
|
5543
5543
|
type: "button",
|
|
5544
5544
|
className: `${N.modeToggleBtn} ${me === "system" ? N.modeToggleBtnActive : ""}`,
|
|
5545
|
-
onClick: () =>
|
|
5545
|
+
onClick: () => we("system"),
|
|
5546
5546
|
title: "系统",
|
|
5547
5547
|
children: /* @__PURE__ */ e(Aa, {})
|
|
5548
5548
|
}
|
|
@@ -5552,7 +5552,7 @@ function Ad({
|
|
|
5552
5552
|
{
|
|
5553
5553
|
type: "button",
|
|
5554
5554
|
className: `${N.modeToggleBtn} ${me === "rpa" ? N.modeToggleBtnActive : ""}`,
|
|
5555
|
-
onClick: () =>
|
|
5555
|
+
onClick: () => we("rpa"),
|
|
5556
5556
|
title: "RPA",
|
|
5557
5557
|
children: /* @__PURE__ */ e(Pa, {})
|
|
5558
5558
|
}
|
|
@@ -5617,7 +5617,7 @@ function Ad({
|
|
|
5617
5617
|
/* ── FEATURE063: RPA 模式 ──
|
|
5618
5618
|
* 左侧 RpaSidebar (7 个菜单) + 右侧 useRoutes 渲染 7 个一级页面.
|
|
5619
5619
|
*/
|
|
5620
|
-
/* @__PURE__ */ e("div", { className: N.smartWorkbenchArea, children: /* @__PURE__ */ e(Sd, { onModeSwitch:
|
|
5620
|
+
/* @__PURE__ */ e("div", { className: N.smartWorkbenchArea, children: /* @__PURE__ */ e(Sd, { onModeSwitch: we }) })
|
|
5621
5621
|
) : me === "product" ? (
|
|
5622
5622
|
/* ── 产品工作台 ── */
|
|
5623
5623
|
/* @__PURE__ */ e("div", { className: N.smartWorkbenchArea, children: /* @__PURE__ */ e(Cd, {}) })
|
|
@@ -5651,9 +5651,9 @@ function Ad({
|
|
|
5651
5651
|
gd,
|
|
5652
5652
|
{
|
|
5653
5653
|
onOpenProject: mn,
|
|
5654
|
-
onSwitchMode: (P) =>
|
|
5654
|
+
onSwitchMode: (P) => we(P),
|
|
5655
5655
|
openAgentRequest: {
|
|
5656
|
-
agent:
|
|
5656
|
+
agent: se,
|
|
5657
5657
|
view: _e,
|
|
5658
5658
|
newSession: Ue,
|
|
5659
5659
|
ts: $
|
|
@@ -5712,16 +5712,16 @@ function Ad({
|
|
|
5712
5712
|
ia,
|
|
5713
5713
|
{
|
|
5714
5714
|
onOpenTeamModal: o,
|
|
5715
|
-
todoPanelVisible:
|
|
5715
|
+
todoPanelVisible: U,
|
|
5716
5716
|
onToggleTodoPanel: () => z((P) => !P),
|
|
5717
|
-
todoCount:
|
|
5717
|
+
todoCount: V
|
|
5718
5718
|
}
|
|
5719
5719
|
) : /* @__PURE__ */ e(ml, {}) }),
|
|
5720
5720
|
/* @__PURE__ */ e(
|
|
5721
5721
|
"div",
|
|
5722
5722
|
{
|
|
5723
|
-
className: `${N.todoPanel} ${
|
|
5724
|
-
children: /* @__PURE__ */ e(cr, { onCountChange:
|
|
5723
|
+
className: `${N.todoPanel} ${U ? "" : N.todoPanelHidden}`,
|
|
5724
|
+
children: /* @__PURE__ */ e(cr, { onCountChange: Z })
|
|
5725
5725
|
}
|
|
5726
5726
|
)
|
|
5727
5727
|
] })
|
|
@@ -5732,12 +5732,12 @@ function Ad({
|
|
|
5732
5732
|
/* @__PURE__ */ e(
|
|
5733
5733
|
so,
|
|
5734
5734
|
{
|
|
5735
|
-
open:
|
|
5736
|
-
onClose: () =>
|
|
5735
|
+
open: ne,
|
|
5736
|
+
onClose: () => re(!1),
|
|
5737
5737
|
bindKey: S ? `${S.workspace_path}_${S.id}` : "global_scratchpad",
|
|
5738
5738
|
defaultTitle: (S == null ? void 0 : S.name) || (S == null ? void 0 : S.scenario_name) || "速记",
|
|
5739
5739
|
extraInfo: S ? JSON.stringify({ type: "team", id: S.id }) : "",
|
|
5740
|
-
token:
|
|
5740
|
+
token: K
|
|
5741
5741
|
}
|
|
5742
5742
|
),
|
|
5743
5743
|
/* @__PURE__ */ a(
|
|
@@ -5770,17 +5770,17 @@ function Ad({
|
|
|
5770
5770
|
)
|
|
5771
5771
|
] }),
|
|
5772
5772
|
/* @__PURE__ */ a("div", { className: N.announcementModalBody, children: [
|
|
5773
|
-
/* @__PURE__ */ e("div", { className: N.announcementList, children:
|
|
5773
|
+
/* @__PURE__ */ e("div", { className: N.announcementList, children: oe.map((P, ae) => {
|
|
5774
5774
|
const ve = P.title || P.content;
|
|
5775
5775
|
return /* @__PURE__ */ e(
|
|
5776
5776
|
"div",
|
|
5777
5777
|
{
|
|
5778
|
-
className: `${N.announcementListItem} ${
|
|
5778
|
+
className: `${N.announcementListItem} ${ae === At ? N.announcementListItemActive : ""}`,
|
|
5779
5779
|
title: ve,
|
|
5780
|
-
onClick: () => k(
|
|
5780
|
+
onClick: () => k(ae),
|
|
5781
5781
|
children: ve
|
|
5782
5782
|
},
|
|
5783
|
-
P.id ?? `${ve}-${
|
|
5783
|
+
P.id ?? `${ve}-${ae}`
|
|
5784
5784
|
);
|
|
5785
5785
|
}) }),
|
|
5786
5786
|
/* @__PURE__ */ e("div", { className: N.announcementDetail, children: _t ? /* @__PURE__ */ a(bt, { children: [
|
|
@@ -5834,7 +5834,7 @@ function Ad({
|
|
|
5834
5834
|
)
|
|
5835
5835
|
] });
|
|
5836
5836
|
}
|
|
5837
|
-
const Pd = "_selectList_13hpp_1", $d = "_selectItem_13hpp_14", Ed = "_selectItemInfo_13hpp_32", Md = "_selectItemName_13hpp_38", Dd = "_selectItemDesc_13hpp_45", Fd = "_selectedBadge_13hpp_54", Rd = "_divider_13hpp_62", Od = "_memberList_13hpp_68", Bd = "_memberRow_13hpp_72", jd = "_memberRowLeft_13hpp_80", Wd = "_removeBtn_13hpp_86", Hd = "_searchInput_13hpp_98", Ud = "_spinBody_13hpp_119",
|
|
5837
|
+
const Pd = "_selectList_13hpp_1", $d = "_selectItem_13hpp_14", Ed = "_selectItemInfo_13hpp_32", Md = "_selectItemName_13hpp_38", Dd = "_selectItemDesc_13hpp_45", Fd = "_selectedBadge_13hpp_54", Rd = "_divider_13hpp_62", Od = "_memberList_13hpp_68", Bd = "_memberRow_13hpp_72", jd = "_memberRowLeft_13hpp_80", Wd = "_removeBtn_13hpp_86", Hd = "_searchInput_13hpp_98", Ud = "_spinBody_13hpp_119", Le = {
|
|
5838
5838
|
selectList: Pd,
|
|
5839
5839
|
selectItem: $d,
|
|
5840
5840
|
selectItemInfo: Ed,
|
|
@@ -5861,50 +5861,50 @@ function zd({ onClose: t }) {
|
|
|
5861
5861
|
removeMember: g,
|
|
5862
5862
|
loadTeamPickerOptions: w,
|
|
5863
5863
|
openAgentProfile: L
|
|
5864
|
-
} =
|
|
5865
|
-
|
|
5864
|
+
} = M();
|
|
5865
|
+
H(() => {
|
|
5866
5866
|
w();
|
|
5867
5867
|
}, [w]);
|
|
5868
|
-
const [S, F] = c(""), [
|
|
5868
|
+
const [S, F] = c(""), [K, E] = c(""), [v, I] = c(!1), [x, U] = c(() => /* @__PURE__ */ new Set()), z = le(!1), V = (i) => i.staff_id != null && i.staff_id > 0 ? String(i.staff_id) : i.id != null && i.id > 0 ? String(i.id) : String(i.username ?? ""), Z = async (i, b) => {
|
|
5869
5869
|
if (!z.current) {
|
|
5870
|
-
z.current = !0, i &&
|
|
5870
|
+
z.current = !0, i && U((k) => new Set(k).add(i)), I(!0);
|
|
5871
5871
|
try {
|
|
5872
5872
|
await b();
|
|
5873
5873
|
} finally {
|
|
5874
|
-
z.current = !1, I(!1), i &&
|
|
5874
|
+
z.current = !1, I(!1), i && U((k) => {
|
|
5875
5875
|
const W = new Set(k);
|
|
5876
5876
|
return W.delete(i), W;
|
|
5877
5877
|
});
|
|
5878
5878
|
}
|
|
5879
5879
|
}
|
|
5880
|
-
},
|
|
5880
|
+
}, ne = (i) => o.some(
|
|
5881
5881
|
(b) => b.member_type === "HUMAN" && String(b.ref_id) === i
|
|
5882
|
-
) || x.has($t("HUMAN", i)),
|
|
5882
|
+
) || x.has($t("HUMAN", i)), re = (i) => o.some(
|
|
5883
5883
|
(b) => b.member_type === "AGENT" && String(b.ref_id) === i
|
|
5884
|
-
) || x.has($t("AGENT", i)),
|
|
5885
|
-
const b =
|
|
5886
|
-
if (
|
|
5884
|
+
) || x.has($t("AGENT", i)), D = (i) => {
|
|
5885
|
+
const b = V(i);
|
|
5886
|
+
if (ne(b))
|
|
5887
5887
|
return;
|
|
5888
5888
|
const k = $t("HUMAN", b);
|
|
5889
|
-
|
|
5889
|
+
Z(k, async () => {
|
|
5890
5890
|
await m("HUMAN", b, i.display_name ?? b, "EDITOR");
|
|
5891
5891
|
});
|
|
5892
5892
|
}, f = (i) => {
|
|
5893
5893
|
const b = eo(i);
|
|
5894
|
-
if (!b ||
|
|
5894
|
+
if (!b || re(b))
|
|
5895
5895
|
return;
|
|
5896
5896
|
const k = $t("AGENT", b);
|
|
5897
|
-
|
|
5897
|
+
Z(k, async () => {
|
|
5898
5898
|
await m("AGENT", b, i.name, "EDITOR");
|
|
5899
5899
|
});
|
|
5900
5900
|
}, y = (i) => {
|
|
5901
|
-
|
|
5901
|
+
Z(null, async () => {
|
|
5902
5902
|
await g(Mt(i));
|
|
5903
5903
|
});
|
|
5904
5904
|
}, C = o.filter((i) => i.member_type === "HUMAN"), T = o.filter(
|
|
5905
5905
|
(i) => {
|
|
5906
|
-
var b, k, W,
|
|
5907
|
-
return i.member_type === "AGENT" && ((k = (b = i.agent_info) == null ? void 0 : b._agenthub_raw) == null ? void 0 : k.type) !== "node" && !((W = i.display_name) != null && W.startsWith("流程节点")) && !((pe = (
|
|
5906
|
+
var b, k, W, Y, pe;
|
|
5907
|
+
return i.member_type === "AGENT" && ((k = (b = i.agent_info) == null ? void 0 : b._agenthub_raw) == null ? void 0 : k.type) !== "node" && !((W = i.display_name) != null && W.startsWith("流程节点")) && !((pe = (Y = i.agent_info) == null ? void 0 : Y.name) != null && pe.startsWith("流程节点"));
|
|
5908
5908
|
}
|
|
5909
5909
|
);
|
|
5910
5910
|
return /* @__PURE__ */ e(
|
|
@@ -5920,7 +5920,7 @@ function zd({ onClose: t }) {
|
|
|
5920
5920
|
style: { width: "auto", maxWidth: 600 },
|
|
5921
5921
|
children: [
|
|
5922
5922
|
/* @__PURE__ */ e("div", { className: Xe.modalHeader, children: /* @__PURE__ */ e("div", { className: Xe.title, children: "👥 成员管理" }) }),
|
|
5923
|
-
/* @__PURE__ */ e(at, { spinning: v, description: "处理中…", children: /* @__PURE__ */ e("div", { className:
|
|
5923
|
+
/* @__PURE__ */ e(at, { spinning: v, description: "处理中…", children: /* @__PURE__ */ e("div", { className: Le.spinBody, children: /* @__PURE__ */ a("div", { className: Xe.modalContent, children: [
|
|
5924
5924
|
/* @__PURE__ */ a(
|
|
5925
5925
|
"div",
|
|
5926
5926
|
{
|
|
@@ -5942,14 +5942,14 @@ function zd({ onClose: t }) {
|
|
|
5942
5942
|
placeholder: "搜索成员...",
|
|
5943
5943
|
value: S,
|
|
5944
5944
|
onChange: (i) => F(i.target.value),
|
|
5945
|
-
className:
|
|
5945
|
+
className: Le.searchInput,
|
|
5946
5946
|
disabled: v
|
|
5947
5947
|
}
|
|
5948
5948
|
),
|
|
5949
5949
|
/* @__PURE__ */ e(
|
|
5950
5950
|
"div",
|
|
5951
5951
|
{
|
|
5952
|
-
className:
|
|
5952
|
+
className: Le.selectList,
|
|
5953
5953
|
style: { maxHeight: 240 },
|
|
5954
5954
|
children: s.filter(
|
|
5955
5955
|
(i) => {
|
|
@@ -5960,14 +5960,14 @@ function zd({ onClose: t }) {
|
|
|
5960
5960
|
}
|
|
5961
5961
|
).map(
|
|
5962
5962
|
(i) => {
|
|
5963
|
-
const b =
|
|
5963
|
+
const b = V(i), k = ne(b), W = x.has(
|
|
5964
5964
|
$t("HUMAN", b)
|
|
5965
5965
|
);
|
|
5966
5966
|
return /* @__PURE__ */ a(
|
|
5967
5967
|
"div",
|
|
5968
5968
|
{
|
|
5969
|
-
className:
|
|
5970
|
-
onClick: () => !k && !v &&
|
|
5969
|
+
className: Le.selectItem,
|
|
5970
|
+
onClick: () => !k && !v && D(i),
|
|
5971
5971
|
style: {
|
|
5972
5972
|
opacity: k ? 0.5 : 1,
|
|
5973
5973
|
cursor: k || v ? "default" : "pointer",
|
|
@@ -5975,14 +5975,14 @@ function zd({ onClose: t }) {
|
|
|
5975
5975
|
},
|
|
5976
5976
|
children: [
|
|
5977
5977
|
/* @__PURE__ */ e("span", { children: i.avatar }),
|
|
5978
|
-
/* @__PURE__ */ a("div", { className:
|
|
5979
|
-
/* @__PURE__ */ e("div", { className:
|
|
5980
|
-
/* @__PURE__ */ a("div", { className:
|
|
5978
|
+
/* @__PURE__ */ a("div", { className: Le.selectItemInfo, children: [
|
|
5979
|
+
/* @__PURE__ */ e("div", { className: Le.selectItemName, children: i.display_name }),
|
|
5980
|
+
/* @__PURE__ */ a("div", { className: Le.selectItemDesc, children: [
|
|
5981
5981
|
"@",
|
|
5982
5982
|
i.username
|
|
5983
5983
|
] })
|
|
5984
5984
|
] }),
|
|
5985
|
-
W ? /* @__PURE__ */ e("span", { className:
|
|
5985
|
+
W ? /* @__PURE__ */ e("span", { className: Le.selectedBadge, children: "加入中…" }) : k ? /* @__PURE__ */ e("span", { className: Le.selectedBadge, children: "已加入" }) : null
|
|
5986
5986
|
]
|
|
5987
5987
|
},
|
|
5988
5988
|
i.id ?? i.username
|
|
@@ -5999,16 +5999,16 @@ function zd({ onClose: t }) {
|
|
|
5999
5999
|
{
|
|
6000
6000
|
type: "text",
|
|
6001
6001
|
placeholder: "搜索 Agent...",
|
|
6002
|
-
value:
|
|
6002
|
+
value: K,
|
|
6003
6003
|
onChange: (i) => E(i.target.value),
|
|
6004
|
-
className:
|
|
6004
|
+
className: Le.searchInput,
|
|
6005
6005
|
disabled: v
|
|
6006
6006
|
}
|
|
6007
6007
|
),
|
|
6008
6008
|
/* @__PURE__ */ e(
|
|
6009
6009
|
"div",
|
|
6010
6010
|
{
|
|
6011
|
-
className:
|
|
6011
|
+
className: Le.selectList,
|
|
6012
6012
|
style: { maxHeight: 240 },
|
|
6013
6013
|
children: r.filter(
|
|
6014
6014
|
(i) => {
|
|
@@ -6017,15 +6017,15 @@ function zd({ onClose: t }) {
|
|
|
6017
6017
|
}
|
|
6018
6018
|
).filter((i) => {
|
|
6019
6019
|
var k, W;
|
|
6020
|
-
if (!
|
|
6021
|
-
const b =
|
|
6020
|
+
if (!K) return !0;
|
|
6021
|
+
const b = K.toLowerCase();
|
|
6022
6022
|
return ((k = i.name) == null ? void 0 : k.toLowerCase().includes(b)) || ((W = i.description) == null ? void 0 : W.toLowerCase().includes(b));
|
|
6023
6023
|
}).map((i) => {
|
|
6024
|
-
const b = eo(i), k = b ?
|
|
6024
|
+
const b = eo(i), k = b ? re(b) : !0, W = b && x.has($t("AGENT", b));
|
|
6025
6025
|
return /* @__PURE__ */ a(
|
|
6026
6026
|
"div",
|
|
6027
6027
|
{
|
|
6028
|
-
className:
|
|
6028
|
+
className: Le.selectItem,
|
|
6029
6029
|
onClick: () => !k && !v && f(i),
|
|
6030
6030
|
style: {
|
|
6031
6031
|
opacity: k ? 0.5 : 1,
|
|
@@ -6036,8 +6036,8 @@ function zd({ onClose: t }) {
|
|
|
6036
6036
|
/* @__PURE__ */ e(
|
|
6037
6037
|
"div",
|
|
6038
6038
|
{
|
|
6039
|
-
onClick: (
|
|
6040
|
-
|
|
6039
|
+
onClick: (Y) => {
|
|
6040
|
+
Y.stopPropagation(), L(i);
|
|
6041
6041
|
},
|
|
6042
6042
|
style: {
|
|
6043
6043
|
display: "flex",
|
|
@@ -6066,11 +6066,11 @@ function zd({ onClose: t }) {
|
|
|
6066
6066
|
) : /* @__PURE__ */ e("span", { style: { fontSize: 16 }, children: i.avatar || "🤖" })
|
|
6067
6067
|
}
|
|
6068
6068
|
),
|
|
6069
|
-
/* @__PURE__ */ a("div", { className:
|
|
6070
|
-
/* @__PURE__ */ e("div", { className:
|
|
6071
|
-
/* @__PURE__ */ e("div", { className:
|
|
6069
|
+
/* @__PURE__ */ a("div", { className: Le.selectItemInfo, children: [
|
|
6070
|
+
/* @__PURE__ */ e("div", { className: Le.selectItemName, children: i.name }),
|
|
6071
|
+
/* @__PURE__ */ e("div", { className: Le.selectItemDesc, children: i.description })
|
|
6072
6072
|
] }),
|
|
6073
|
-
W ? /* @__PURE__ */ e("span", { className:
|
|
6073
|
+
W ? /* @__PURE__ */ e("span", { className: Le.selectedBadge, children: "加入中…" }) : k ? /* @__PURE__ */ e("span", { className: Le.selectedBadge, children: "已加入" }) : null
|
|
6074
6074
|
]
|
|
6075
6075
|
},
|
|
6076
6076
|
b || i.name
|
|
@@ -6082,15 +6082,15 @@ function zd({ onClose: t }) {
|
|
|
6082
6082
|
]
|
|
6083
6083
|
}
|
|
6084
6084
|
),
|
|
6085
|
-
/* @__PURE__ */ e("div", { className:
|
|
6086
|
-
/* @__PURE__ */ a("div", { className:
|
|
6085
|
+
/* @__PURE__ */ e("div", { className: Le.divider }),
|
|
6086
|
+
/* @__PURE__ */ a("div", { className: Le.memberList, children: [
|
|
6087
6087
|
/* @__PURE__ */ a("div", { className: Xe.label, children: [
|
|
6088
6088
|
"当前成员 (",
|
|
6089
6089
|
o.length,
|
|
6090
6090
|
")"
|
|
6091
6091
|
] }),
|
|
6092
|
-
C.map((i) => /* @__PURE__ */ a("div", { className:
|
|
6093
|
-
/* @__PURE__ */ a("div", { className:
|
|
6092
|
+
C.map((i) => /* @__PURE__ */ a("div", { className: Le.memberRow, children: [
|
|
6093
|
+
/* @__PURE__ */ a("div", { className: Le.memberRowLeft, children: [
|
|
6094
6094
|
/* @__PURE__ */ e("span", { children: "👤" }),
|
|
6095
6095
|
/* @__PURE__ */ e("span", { children: i.display_name }),
|
|
6096
6096
|
/* @__PURE__ */ e(
|
|
@@ -6105,7 +6105,7 @@ function zd({ onClose: t }) {
|
|
|
6105
6105
|
"button",
|
|
6106
6106
|
{
|
|
6107
6107
|
type: "button",
|
|
6108
|
-
className:
|
|
6108
|
+
className: Le.removeBtn,
|
|
6109
6109
|
disabled: v,
|
|
6110
6110
|
onClick: () => y(i.id),
|
|
6111
6111
|
children: "移除"
|
|
@@ -6114,8 +6114,8 @@ function zd({ onClose: t }) {
|
|
|
6114
6114
|
] }, i.id)),
|
|
6115
6115
|
T.map((i) => {
|
|
6116
6116
|
var b, k;
|
|
6117
|
-
return /* @__PURE__ */ a("div", { className:
|
|
6118
|
-
/* @__PURE__ */ a("div", { className:
|
|
6117
|
+
return /* @__PURE__ */ a("div", { className: Le.memberRow, children: [
|
|
6118
|
+
/* @__PURE__ */ a("div", { className: Le.memberRowLeft, children: [
|
|
6119
6119
|
/* @__PURE__ */ e(
|
|
6120
6120
|
"div",
|
|
6121
6121
|
{
|
|
@@ -6173,7 +6173,7 @@ function zd({ onClose: t }) {
|
|
|
6173
6173
|
"button",
|
|
6174
6174
|
{
|
|
6175
6175
|
type: "button",
|
|
6176
|
-
className:
|
|
6176
|
+
className: Le.removeBtn,
|
|
6177
6177
|
disabled: v,
|
|
6178
6178
|
onClick: () => y(i.id),
|
|
6179
6179
|
children: "移除"
|
|
@@ -6252,12 +6252,12 @@ async function Yd(t) {
|
|
|
6252
6252
|
}
|
|
6253
6253
|
const L = w.body.getReader(), S = new TextDecoder();
|
|
6254
6254
|
for (; ; ) {
|
|
6255
|
-
const { done: F, value:
|
|
6255
|
+
const { done: F, value: K } = await L.read();
|
|
6256
6256
|
if (F) break;
|
|
6257
6257
|
vt({
|
|
6258
6258
|
type: "chunk",
|
|
6259
6259
|
requestId: o,
|
|
6260
|
-
payload: S.decode(
|
|
6260
|
+
payload: S.decode(K, { stream: !0 })
|
|
6261
6261
|
});
|
|
6262
6262
|
}
|
|
6263
6263
|
vt({ type: "end", requestId: o });
|
|
@@ -6337,7 +6337,7 @@ function tm({
|
|
|
6337
6337
|
forcedChatMode: t
|
|
6338
6338
|
} = {}) {
|
|
6339
6339
|
const o = ta(), r = na(), s = t !== "system" && Ka() && !Va(o.search);
|
|
6340
|
-
|
|
6340
|
+
H(() => {
|
|
6341
6341
|
s && it.replace({
|
|
6342
6342
|
pathname: "/workspace/phone",
|
|
6343
6343
|
search: o.search
|
|
@@ -6349,182 +6349,181 @@ function tm({
|
|
|
6349
6349
|
return null;
|
|
6350
6350
|
const h = Number(R);
|
|
6351
6351
|
return Number.isFinite(h) && h > 0 ? h : null;
|
|
6352
|
-
}, [o.search]), { currentProject: g, currentUser: w, projects: L, token: S } =
|
|
6352
|
+
}, [o.search]), { currentProject: g, currentUser: w, projects: L, token: S } = M(
|
|
6353
6353
|
dn((p) => ({
|
|
6354
6354
|
currentProject: p.currentProject,
|
|
6355
6355
|
currentUser: p.currentUser,
|
|
6356
6356
|
projects: p.projects,
|
|
6357
6357
|
token: p.token
|
|
6358
6358
|
}))
|
|
6359
|
-
), F =
|
|
6360
|
-
|
|
6359
|
+
), F = M((p) => p.loadProjects), K = M((p) => p.loadRunningExecutions), E = M((p) => p.updateCurrentUser), v = M((p) => p.selectFile), I = M((p) => p.clearCurrentProject), [x, U] = c(!1), [z, V] = c(!1), [Z, ne] = c(null), re = le(!1), D = le(!1);
|
|
6360
|
+
H(() => {
|
|
6361
6361
|
Jd(S);
|
|
6362
|
-
}, [S]),
|
|
6362
|
+
}, [S]), H(() => {
|
|
6363
6363
|
const p = Ut.parse(o.search), R = String(p.newChat ?? "").trim();
|
|
6364
6364
|
if (!R) return;
|
|
6365
|
-
/^(1|true)$/i.test(R) ||
|
|
6365
|
+
/^(1|true)$/i.test(R) || ne(R), re.current = !0, V(!0), delete p.newChat;
|
|
6366
6366
|
const h = Ut.stringify(p);
|
|
6367
6367
|
it.replace({
|
|
6368
6368
|
pathname: o.pathname,
|
|
6369
6369
|
search: h ? `?${h}` : ""
|
|
6370
6370
|
});
|
|
6371
|
-
}, [o.search, o.pathname]),
|
|
6371
|
+
}, [o.search, o.pathname]), H(() => {
|
|
6372
6372
|
const p = (g == null ? void 0 : g.id) ?? null;
|
|
6373
|
-
if (p != null && !
|
|
6374
|
-
|
|
6373
|
+
if (p != null && !D.current) {
|
|
6374
|
+
D.current = !0;
|
|
6375
6375
|
return;
|
|
6376
6376
|
}
|
|
6377
|
-
p != null && z &&
|
|
6377
|
+
p != null && z && V(!1);
|
|
6378
6378
|
}, [g == null ? void 0 : g.id, z]);
|
|
6379
6379
|
const [f, y] = c(
|
|
6380
|
-
() => !!
|
|
6381
|
-
), [C, T] = c(!1), [i, b] = c(null), k = le(!1), W = le(null),
|
|
6382
|
-
return pe.current = m,
|
|
6383
|
-
W.current = null,
|
|
6384
|
-
}, [m]),
|
|
6380
|
+
() => !!M.getState().currentUser
|
|
6381
|
+
), [C, T] = c(!1), [i, b] = c(null), k = le(!1), W = le(null), Y = le(null), pe = le(m);
|
|
6382
|
+
return pe.current = m, H(() => {
|
|
6383
|
+
W.current = null, Y.current = null;
|
|
6384
|
+
}, [m]), H(() => {
|
|
6385
6385
|
zo();
|
|
6386
|
-
const p =
|
|
6386
|
+
const p = M.getState().token;
|
|
6387
6387
|
if (p && qo(p)) {
|
|
6388
|
-
localStorage.removeItem("z_team_token"), localStorage.removeItem("token"), localStorage.removeItem("USER_INFO"),
|
|
6388
|
+
localStorage.removeItem("z_team_token"), localStorage.removeItem("token"), localStorage.removeItem("USER_INFO"), M.setState({ token: "", currentUser: null }), en();
|
|
6389
6389
|
return;
|
|
6390
6390
|
}
|
|
6391
|
-
if (
|
|
6392
|
-
const
|
|
6393
|
-
|
|
6391
|
+
if (M.getState().currentUser) {
|
|
6392
|
+
const se = M.getState().token;
|
|
6393
|
+
se && vn(se, E).catch(() => {
|
|
6394
6394
|
});
|
|
6395
6395
|
return;
|
|
6396
6396
|
}
|
|
6397
6397
|
let R = !1, h = 0;
|
|
6398
|
-
const
|
|
6399
|
-
let
|
|
6400
|
-
const ge = 3,
|
|
6401
|
-
const
|
|
6398
|
+
const j = 100;
|
|
6399
|
+
let Ce = !1, Te = 0;
|
|
6400
|
+
const ge = 3, oe = (se) => {
|
|
6401
|
+
const O = M.getState().token;
|
|
6402
6402
|
if (pe.current != null) {
|
|
6403
|
-
R || (E(xn(
|
|
6404
|
-
R || E(
|
|
6403
|
+
R || (E(xn(se)), y(!0)), vn(O, (Ne) => {
|
|
6404
|
+
R || E(Ne);
|
|
6405
6405
|
}).catch(() => {
|
|
6406
|
-
!R &&
|
|
6406
|
+
!R && O && (localStorage.removeItem("z_team_token"), M.setState({ token: "" }));
|
|
6407
6407
|
});
|
|
6408
6408
|
return;
|
|
6409
6409
|
}
|
|
6410
|
-
vn(
|
|
6411
|
-
R || E(
|
|
6410
|
+
vn(O, (Ne) => {
|
|
6411
|
+
R || E(Ne);
|
|
6412
6412
|
}).catch(() => {
|
|
6413
|
-
R || (
|
|
6413
|
+
R || (O && (localStorage.removeItem("z_team_token"), M.setState({ token: "" })), E(xn(se)));
|
|
6414
6414
|
}).finally(() => {
|
|
6415
6415
|
R || y(!0);
|
|
6416
6416
|
});
|
|
6417
6417
|
};
|
|
6418
|
-
|
|
6418
|
+
(() => {
|
|
6419
6419
|
if (R) return;
|
|
6420
|
-
const
|
|
6420
|
+
const se = async () => {
|
|
6421
6421
|
if (R) return;
|
|
6422
|
-
let
|
|
6423
|
-
if ((!
|
|
6424
|
-
|
|
6422
|
+
let O = Ko();
|
|
6423
|
+
if ((!O || !Ln(O)) && !Ce) {
|
|
6424
|
+
Ce = !0;
|
|
6425
6425
|
try {
|
|
6426
|
-
const
|
|
6427
|
-
|
|
6426
|
+
const _e = await Go();
|
|
6427
|
+
_e.kind === "authenticated" ? O = _e.user : _e.kind === "unauthenticated" && (Te += 1);
|
|
6428
6428
|
} catch {
|
|
6429
6429
|
} finally {
|
|
6430
|
-
|
|
6430
|
+
Ce = !1;
|
|
6431
6431
|
}
|
|
6432
6432
|
}
|
|
6433
|
-
if (
|
|
6434
|
-
|
|
6433
|
+
if (O && Ln(O)) {
|
|
6434
|
+
oe(O);
|
|
6435
6435
|
return;
|
|
6436
6436
|
}
|
|
6437
|
-
if (
|
|
6437
|
+
if (Te >= ge) {
|
|
6438
6438
|
en();
|
|
6439
6439
|
return;
|
|
6440
6440
|
}
|
|
6441
|
-
if (h += 1, h >=
|
|
6441
|
+
if (h += 1, h >= j) {
|
|
6442
6442
|
en();
|
|
6443
6443
|
return;
|
|
6444
6444
|
}
|
|
6445
6445
|
window.setTimeout(() => {
|
|
6446
|
-
|
|
6446
|
+
se();
|
|
6447
6447
|
}, 150);
|
|
6448
6448
|
};
|
|
6449
|
-
|
|
6450
|
-
})()
|
|
6451
|
-
|
|
6452
|
-
|
|
6453
|
-
}, [E]), j(() => {
|
|
6454
|
-
const p = window.setTimeout(() => {
|
|
6455
|
-
T(!0);
|
|
6449
|
+
se();
|
|
6450
|
+
})();
|
|
6451
|
+
const ee = window.setTimeout(() => {
|
|
6452
|
+
!R && !M.getState().currentUser && T(!0);
|
|
6456
6453
|
}, 2e4);
|
|
6457
|
-
return () =>
|
|
6458
|
-
|
|
6454
|
+
return () => {
|
|
6455
|
+
R = !0, window.clearTimeout(ee);
|
|
6456
|
+
};
|
|
6457
|
+
}, [E]), H(() => {
|
|
6459
6458
|
!w && f && (localStorage.getItem("z_team_token") || r("/login", { replace: !0 }));
|
|
6460
|
-
}, [w, f, r]),
|
|
6459
|
+
}, [w, f, r]), H(() => {
|
|
6461
6460
|
if (w) {
|
|
6462
6461
|
const p = localStorage.getItem("ft_sidebar_time_filter") || "all", R = p === "1d" ? 1 : p === "3d" ? 3 : p === "7d" ? 7 : 0;
|
|
6463
6462
|
if (R > 0) {
|
|
6464
|
-
const h = new Date(Date.now() - R * 864e5),
|
|
6463
|
+
const h = new Date(Date.now() - R * 864e5), j = `${h.getFullYear()}-${String(h.getMonth() + 1).padStart(
|
|
6465
6464
|
2,
|
|
6466
6465
|
"0"
|
|
6467
6466
|
)}-${String(h.getDate()).padStart(2, "0")}`;
|
|
6468
|
-
F(
|
|
6467
|
+
F(j);
|
|
6469
6468
|
} else
|
|
6470
6469
|
F();
|
|
6471
6470
|
}
|
|
6472
|
-
}, [w, F]),
|
|
6471
|
+
}, [w, F]), H(() => {
|
|
6473
6472
|
if (!w || k.current || m != null) return;
|
|
6474
|
-
const p =
|
|
6473
|
+
const p = M.getState().lastSelectedProjectId, R = M.getState().lastSelectedFilePath;
|
|
6475
6474
|
if (!p) return;
|
|
6476
|
-
let h = !1,
|
|
6477
|
-
const
|
|
6475
|
+
let h = !1, j = null;
|
|
6476
|
+
const Ce = async () => {
|
|
6478
6477
|
if (h || k.current) return;
|
|
6479
|
-
if (
|
|
6478
|
+
if (re.current) {
|
|
6480
6479
|
k.current = !0;
|
|
6481
6480
|
return;
|
|
6482
6481
|
}
|
|
6483
|
-
const
|
|
6484
|
-
if (
|
|
6485
|
-
|
|
6486
|
-
|
|
6482
|
+
const Te = M.getState().projects;
|
|
6483
|
+
if (Te.length === 0) {
|
|
6484
|
+
j = setTimeout(() => {
|
|
6485
|
+
Ce();
|
|
6487
6486
|
}, 100);
|
|
6488
6487
|
return;
|
|
6489
6488
|
}
|
|
6490
|
-
const ge =
|
|
6489
|
+
const ge = Te.find((A) => String(A.id) === String(p));
|
|
6491
6490
|
if (!ge) {
|
|
6492
6491
|
k.current = !0;
|
|
6493
6492
|
return;
|
|
6494
6493
|
}
|
|
6495
|
-
const
|
|
6496
|
-
if (
|
|
6494
|
+
const oe = M.getState();
|
|
6495
|
+
if (oe.currentProject && String(oe.currentProject.id) === String(p)) {
|
|
6497
6496
|
k.current = !0;
|
|
6498
6497
|
return;
|
|
6499
6498
|
}
|
|
6500
|
-
if (k.current = !0, await
|
|
6499
|
+
if (k.current = !0, await M.getState().expandProject(ge), !(h || !R))
|
|
6501
6500
|
try {
|
|
6502
6501
|
await v(R);
|
|
6503
6502
|
} catch {
|
|
6504
6503
|
localStorage.removeItem("ft_last_file_path");
|
|
6505
6504
|
}
|
|
6506
6505
|
};
|
|
6507
|
-
return
|
|
6508
|
-
h = !0,
|
|
6506
|
+
return Ce(), () => {
|
|
6507
|
+
h = !0, j != null && clearTimeout(j);
|
|
6509
6508
|
};
|
|
6510
|
-
}, [w, L, v, m]),
|
|
6511
|
-
var
|
|
6512
|
-
if (!f || m == null || !
|
|
6509
|
+
}, [w, L, v, m]), H(() => {
|
|
6510
|
+
var Te;
|
|
6511
|
+
if (!f || m == null || !M.getState().currentUser)
|
|
6513
6512
|
return;
|
|
6514
|
-
const p = m == null ? "" : String(m), R =
|
|
6515
|
-
if (Lt((
|
|
6516
|
-
W.current = p, k.current = !0, no(),
|
|
6513
|
+
const p = m == null ? "" : String(m), R = M.getState();
|
|
6514
|
+
if (Lt((Te = R.currentProject) == null ? void 0 : Te.id, p)) {
|
|
6515
|
+
W.current = p, k.current = !0, no(), M.getState().loadMessages().catch(() => {
|
|
6517
6516
|
});
|
|
6518
6517
|
return;
|
|
6519
6518
|
}
|
|
6520
|
-
if (Lt(W.current, p) || Lt(
|
|
6519
|
+
if (Lt(W.current, p) || Lt(Y.current, p))
|
|
6521
6520
|
return;
|
|
6522
6521
|
let h = !1;
|
|
6523
|
-
|
|
6524
|
-
const
|
|
6522
|
+
Y.current = p, k.current = !0, b(p);
|
|
6523
|
+
const j = async () => {
|
|
6525
6524
|
const ge = Date.now() + 4e3;
|
|
6526
6525
|
for (; Date.now() < ge; ) {
|
|
6527
|
-
if (h || !
|
|
6526
|
+
if (h || !M.getState().loading)
|
|
6528
6527
|
return;
|
|
6529
6528
|
await new Promise((A) => setTimeout(A, 50));
|
|
6530
6529
|
}
|
|
@@ -6535,55 +6534,55 @@ function tm({
|
|
|
6535
6534
|
0
|
|
6536
6535
|
);
|
|
6537
6536
|
try {
|
|
6538
|
-
if (await
|
|
6537
|
+
if (await j(), h)
|
|
6539
6538
|
return;
|
|
6540
|
-
let { token:
|
|
6541
|
-
if (!
|
|
6542
|
-
const
|
|
6539
|
+
let { token: oe, projects: A, expandProject: ee } = M.getState(), se = A.find((O) => O.id === p);
|
|
6540
|
+
if (!se) {
|
|
6541
|
+
const O = await za(p, oe);
|
|
6543
6542
|
if (h)
|
|
6544
6543
|
return;
|
|
6545
|
-
if (
|
|
6544
|
+
if (O.status === "NOT_FOUND" || !O.scenarioInstance) {
|
|
6546
6545
|
An.info("无此工程");
|
|
6547
6546
|
return;
|
|
6548
6547
|
}
|
|
6549
|
-
if (
|
|
6548
|
+
if (se = await Ga(p, oe), h)
|
|
6550
6549
|
return;
|
|
6551
6550
|
}
|
|
6552
|
-
await
|
|
6551
|
+
await ee(se), h || (W.current = p, no());
|
|
6553
6552
|
} catch {
|
|
6554
6553
|
} finally {
|
|
6555
|
-
ge(), b(null), Lt(
|
|
6556
|
-
const
|
|
6554
|
+
ge(), b(null), Lt(Y.current, p) && (Y.current = null), (() => {
|
|
6555
|
+
const oe = localStorage.getItem("ft_sidebar_time_filter") || "all", A = oe === "1d" ? 1 : oe === "3d" ? 3 : oe === "7d" ? 7 : 0;
|
|
6557
6556
|
if (A > 0) {
|
|
6558
|
-
const
|
|
6559
|
-
|
|
6560
|
-
).padStart(2, "0")}-${String(
|
|
6561
|
-
|
|
6557
|
+
const ee = new Date(Date.now() - A * 864e5), se = `${ee.getFullYear()}-${String(
|
|
6558
|
+
ee.getMonth() + 1
|
|
6559
|
+
).padStart(2, "0")}-${String(ee.getDate()).padStart(2, "0")}`;
|
|
6560
|
+
M.getState().loadProjects(se);
|
|
6562
6561
|
} else
|
|
6563
|
-
|
|
6562
|
+
M.getState().loadProjects();
|
|
6564
6563
|
})();
|
|
6565
6564
|
}
|
|
6566
6565
|
})(), () => {
|
|
6567
|
-
h = !0, Lt(
|
|
6566
|
+
h = !0, Lt(Y.current, p) && (Y.current = null);
|
|
6568
6567
|
};
|
|
6569
|
-
}, [f, m]),
|
|
6568
|
+
}, [f, m]), H(() => {
|
|
6570
6569
|
if (!g) return;
|
|
6571
|
-
|
|
6570
|
+
M.getState().setObserverStatus(null);
|
|
6572
6571
|
const p = () => {
|
|
6573
|
-
const ge =
|
|
6572
|
+
const ge = M.getState();
|
|
6574
6573
|
ge.loadMessages().catch(() => {
|
|
6575
6574
|
}), ge.loadRunningExecutions().catch(() => {
|
|
6576
6575
|
});
|
|
6577
|
-
const
|
|
6578
|
-
|
|
6576
|
+
const oe = ge.activeTaskChat;
|
|
6577
|
+
oe != null && oe.taskId && ge.loadTaskMessages(oe.taskId).catch(() => {
|
|
6579
6578
|
}), ge.loadFileTree(void 0, !0).catch(() => {
|
|
6580
6579
|
});
|
|
6581
6580
|
}, R = Oo((ge) => {
|
|
6582
|
-
|
|
6581
|
+
M.getState().setWsState(ge);
|
|
6583
6582
|
});
|
|
6584
|
-
Bo(g.id, S, p),
|
|
6583
|
+
Bo(g.id, S, p), K().catch(() => {
|
|
6585
6584
|
});
|
|
6586
|
-
const h =
|
|
6585
|
+
const h = M.getState(), { handler: j, dispose: Ce } = ca({
|
|
6587
6586
|
projectId: g.id,
|
|
6588
6587
|
token: S,
|
|
6589
6588
|
updateExecution: h.updateExecution,
|
|
@@ -6595,9 +6594,9 @@ function tm({
|
|
|
6595
6594
|
deleteMessage: h.deleteMessage,
|
|
6596
6595
|
updateMessageReadStatus: h.updateMessageReadStatus,
|
|
6597
6596
|
loadFileTree: h.loadFileTree
|
|
6598
|
-
}),
|
|
6597
|
+
}), Te = Wo(j);
|
|
6599
6598
|
return () => {
|
|
6600
|
-
|
|
6599
|
+
Te(), Ce(), jo(), R(), M.getState().setObserverStatus(null);
|
|
6601
6600
|
};
|
|
6602
6601
|
}, [g == null ? void 0 : g.id, S]), s ? /* @__PURE__ */ e("div", { className: Wt.loadingWrap, children: /* @__PURE__ */ e(at, { description: "正在进入移动版工作台…" }) }) : !f || !w ? C ? /* @__PURE__ */ a("div", { className: Wt.loadingWrap, children: [
|
|
6603
6602
|
/* @__PURE__ */ e(at, { description: "" }),
|
|
@@ -6625,18 +6624,18 @@ function tm({
|
|
|
6625
6624
|
Ad,
|
|
6626
6625
|
{
|
|
6627
6626
|
onNewProject: () => {
|
|
6628
|
-
|
|
6627
|
+
M.getState().currentProject && I();
|
|
6629
6628
|
},
|
|
6630
|
-
onOpenTeam: () =>
|
|
6629
|
+
onOpenTeam: () => U(!0),
|
|
6631
6630
|
forcedChatMode: t,
|
|
6632
6631
|
showNewChat: z,
|
|
6633
|
-
presetNewChatScenario:
|
|
6634
|
-
onOpenNewChat: () =>
|
|
6635
|
-
onCloseNewChat: () =>
|
|
6632
|
+
presetNewChatScenario: Z,
|
|
6633
|
+
onOpenNewChat: () => V(!0),
|
|
6634
|
+
onCloseNewChat: () => V(!1)
|
|
6636
6635
|
}
|
|
6637
6636
|
),
|
|
6638
6637
|
i != null ? /* @__PURE__ */ e("div", { className: Wt.openingOverlay, children: /* @__PURE__ */ e(at, { description: `正在打开工程 ${i}…` }) }) : null,
|
|
6639
|
-
x && /* @__PURE__ */ e(zd, { onClose: () =>
|
|
6638
|
+
x && /* @__PURE__ */ e(zd, { onClose: () => U(!1) }),
|
|
6640
6639
|
/* @__PURE__ */ e(Fa, {})
|
|
6641
6640
|
] });
|
|
6642
6641
|
}
|