@yuku123/z-team-component 0.2.103 → 0.2.104
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-DG-ogBff.js +542 -0
- package/dist/ComponentDoc-BW1SyDxk.js +8035 -0
- package/dist/InvitationManagementPage-hYvoPEcm.js +495 -0
- package/dist/OnboardingPage-KDp-DrzY.js +393 -0
- package/dist/ScheduledTasks-CErSDgyW.js +12127 -0
- package/dist/SystemShell-DvrY4Bl7.js +688 -0
- package/dist/_commonjsHelpers-B52_cu2H.js +26 -0
- package/dist/admin-logs-uPnnclwN.js +198 -0
- package/dist/api-B__qdRIf.js +20 -0
- package/dist/browser-jb_PFvU3.js +1538 -0
- package/dist/createWorkspaceWsHandler-BXbn5-Ft.js +13142 -0
- package/dist/ctc-sso-DtJHC-2M.js +117 -0
- package/dist/echarts-B1OU1xr4.js +16 -0
- package/dist/history-BlrA1eaW.js +41 -0
- package/dist/index-0smeCTnr.js +42049 -0
- package/dist/index-2isWwv1X.js +10169 -0
- package/dist/index-BC8f-JP9.js +242 -0
- package/dist/index-BK3YDeXH.js +2217 -0
- package/dist/index-BOJm25by.js +999 -0
- package/dist/index-B_LJRFsK.js +339 -0
- package/dist/index-BnJ8UEeZ.js +5892 -0
- package/dist/index-BohoJQPr.js +7631 -0
- package/dist/index-BwJPAN8f.js +112 -0
- package/dist/index-ByhCWenF.js +434 -0
- package/dist/index-C2_tfpEj.js +118 -0
- package/dist/index-C815hPWS.js +430 -0
- package/dist/index-C9fGup9t.js +189 -0
- package/dist/index-Cb88Xdh4.js +169 -0
- package/dist/index-Cih0yoxc.js +178 -0
- package/dist/index-CkWKJORv.js +1645 -0
- package/dist/index-CsaGecGX.js +132 -0
- package/dist/index-D-xPVrY3.js +316 -0
- package/dist/index-DAGa9v8r.js +142 -0
- package/dist/index-DBnH-lRh.js +956 -0
- package/dist/index-DIFIvVWE.js +93 -0
- package/dist/index-DOgCfVB2.js +574 -0
- package/dist/index-DWsfQMp8.js +208 -0
- package/dist/index-DcurzowX.js +2699 -0
- package/dist/index-DhDdFRHC.js +279 -0
- package/dist/index-Dpii3P5J.js +1302 -0
- package/dist/index-DtHoMz1H.js +8 -0
- package/dist/index-YVtm1SRy.js +913 -0
- package/dist/index-aI2EXKED.js +479 -0
- package/dist/index-q_TPea69.js +315 -0
- package/dist/index.js +10 -0
- package/dist/index.module-CAa-2T7m.js +72 -0
- package/dist/index.module-UI0iz8K0.js +42 -0
- package/dist/instance-pdQ_wAhB.js +216 -0
- package/dist/menuPermission-CCQjJVXg.js +60 -0
- package/dist/mobile-client-O3yr9h6t.js +24 -0
- package/dist/pages.js +21 -0
- package/dist/send-default-agent-team-message-BzeR4ahf.js +35 -0
- package/dist/spark-md5-Dld54a-T.js +178 -0
- package/dist/sso-user-DI7oiDdc.js +43 -0
- package/dist/training-Bz7Sr5yC.js +450 -0
- package/dist/webide-NcHLDiSn.js +5233 -0
- package/dist/z-team-component.css +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
import { jsx as r, jsxs as x } from "react/jsx-runtime";
|
|
2
|
+
import { f as z, r as T } from "./ctc-sso-DtJHC-2M.js";
|
|
3
|
+
import { r as D, h as U, s as F } from "./sso-user-DI7oiDdc.js";
|
|
4
|
+
import { CheckCircleFilled as W } from "@ant-design/icons";
|
|
5
|
+
import { Result as B, Button as H, Spin as G } from "antd";
|
|
6
|
+
import J from "query-string";
|
|
7
|
+
import { useState as d, useRef as K, useCallback as O, useMemo as R, useEffect as E } from "react";
|
|
8
|
+
import { useLocation as Q } from "react-router-dom";
|
|
9
|
+
import { h as b } from "./history-BlrA1eaW.js";
|
|
10
|
+
import { d as s, h as V, j as X } from "./ComponentDoc-BW1SyDxk.js";
|
|
11
|
+
import { b as Y } from "./mobile-client-O3yr9h6t.js";
|
|
12
|
+
import { s as Z } from "./send-default-agent-team-message-BzeR4ahf.js";
|
|
13
|
+
function ue() {
|
|
14
|
+
const h = Q(), f = J.parse(h.search), c = String(
|
|
15
|
+
f.scenarioCode ?? f.scenario_code ?? ""
|
|
16
|
+
).trim(), a = String(
|
|
17
|
+
f.projectName ?? f.project_name ?? ""
|
|
18
|
+
).trim(), i = String(f.input ?? "").trim(), _ = s((e) => e.expandProject), g = s((e) => e.updateCurrentUser), [j, I] = d(!1), [w, y] = d(""), [M, p] = d("正在登录…"), [k, $] = d([]), C = K(!1), u = O((e, t) => {
|
|
19
|
+
$((o) => [...o, e]), p(t);
|
|
20
|
+
}, []), n = R(() => c ? a ? "" : "缺少参数 projectName" : "缺少参数 scenarioCode", [a, c]);
|
|
21
|
+
E(() => {
|
|
22
|
+
if (n)
|
|
23
|
+
return;
|
|
24
|
+
let e = !1, t = 0;
|
|
25
|
+
const o = 100;
|
|
26
|
+
let S = !1, P = 0;
|
|
27
|
+
const A = 3;
|
|
28
|
+
return (() => {
|
|
29
|
+
if (e)
|
|
30
|
+
return;
|
|
31
|
+
const v = async () => {
|
|
32
|
+
if (e)
|
|
33
|
+
return;
|
|
34
|
+
let l = D();
|
|
35
|
+
if ((!l || !U(l)) && !S) {
|
|
36
|
+
S = !0;
|
|
37
|
+
try {
|
|
38
|
+
const m = await z();
|
|
39
|
+
m.kind === "authenticated" ? l = m.user : m.kind === "unauthenticated" && (P += 1);
|
|
40
|
+
} catch {
|
|
41
|
+
} finally {
|
|
42
|
+
S = !1;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
if (l && U(l)) {
|
|
46
|
+
g(F(l));
|
|
47
|
+
const m = s.getState().token;
|
|
48
|
+
try {
|
|
49
|
+
const L = await X(m);
|
|
50
|
+
e || g(L);
|
|
51
|
+
} catch {
|
|
52
|
+
!e && m && (localStorage.removeItem("z_team_token"), s.setState({ token: "" }));
|
|
53
|
+
} finally {
|
|
54
|
+
e || I(!0);
|
|
55
|
+
}
|
|
56
|
+
return;
|
|
57
|
+
}
|
|
58
|
+
if (P >= A) {
|
|
59
|
+
T();
|
|
60
|
+
return;
|
|
61
|
+
}
|
|
62
|
+
if (t += 1, t >= o) {
|
|
63
|
+
T();
|
|
64
|
+
return;
|
|
65
|
+
}
|
|
66
|
+
window.setTimeout(() => void v(), 150);
|
|
67
|
+
};
|
|
68
|
+
v();
|
|
69
|
+
})(), () => {
|
|
70
|
+
e = !0;
|
|
71
|
+
};
|
|
72
|
+
}, [n, g]);
|
|
73
|
+
const q = (e) => new Promise((t) => {
|
|
74
|
+
window.setTimeout(t, e);
|
|
75
|
+
});
|
|
76
|
+
E(() => {
|
|
77
|
+
if (n) {
|
|
78
|
+
y(n);
|
|
79
|
+
return;
|
|
80
|
+
}
|
|
81
|
+
!j || C.current || (C.current = !0, (async () => {
|
|
82
|
+
try {
|
|
83
|
+
const e = s.getState().token;
|
|
84
|
+
p("正在按场景创建工程…");
|
|
85
|
+
const t = await V(
|
|
86
|
+
{
|
|
87
|
+
name: a,
|
|
88
|
+
description: "",
|
|
89
|
+
workspace_path: a,
|
|
90
|
+
scenario_code: c
|
|
91
|
+
},
|
|
92
|
+
e
|
|
93
|
+
);
|
|
94
|
+
u("工程已创建", "正在打开协作区…"), p("正在同步工程列表…"), await _(t);
|
|
95
|
+
const o = s.getState();
|
|
96
|
+
o.currentProject && await o.refreshProjectPanels(
|
|
97
|
+
String(o.currentProject.id),
|
|
98
|
+
o.projectSwitchSeq,
|
|
99
|
+
!1
|
|
100
|
+
), u(
|
|
101
|
+
"协作区已就绪",
|
|
102
|
+
i ? "正在发送协作消息…" : "即将进入工作台…"
|
|
103
|
+
), i && (await Z(
|
|
104
|
+
t.id,
|
|
105
|
+
i,
|
|
106
|
+
e,
|
|
107
|
+
s.getState().members
|
|
108
|
+
), await s.getState().loadMessages(), u("协作消息已发送", "即将进入工作台…")), p("即将进入工作台…"), await q(2e3), b.replace(
|
|
109
|
+
Y({
|
|
110
|
+
projectId: t.id,
|
|
111
|
+
search: h.search
|
|
112
|
+
})
|
|
113
|
+
);
|
|
114
|
+
} catch (e) {
|
|
115
|
+
const t = e instanceof Error ? e.message : String(e);
|
|
116
|
+
y(t || "创建工程失败");
|
|
117
|
+
}
|
|
118
|
+
})());
|
|
119
|
+
}, [
|
|
120
|
+
u,
|
|
121
|
+
j,
|
|
122
|
+
_,
|
|
123
|
+
i,
|
|
124
|
+
h.search,
|
|
125
|
+
n,
|
|
126
|
+
a,
|
|
127
|
+
c
|
|
128
|
+
]);
|
|
129
|
+
const N = R(() => {
|
|
130
|
+
if (n)
|
|
131
|
+
return "";
|
|
132
|
+
const e = [`场景 ${c}`, `工程 ${a}`];
|
|
133
|
+
return i && e.push("含首条协作消息"), e.join(" · ");
|
|
134
|
+
}, [i, n, a, c]);
|
|
135
|
+
return w ? /* @__PURE__ */ r("div", { className: "from-scenario-page", children: /* @__PURE__ */ r(
|
|
136
|
+
B,
|
|
137
|
+
{
|
|
138
|
+
status: "error",
|
|
139
|
+
title: "无法创建工程",
|
|
140
|
+
subTitle: w,
|
|
141
|
+
extra: /* @__PURE__ */ r(
|
|
142
|
+
H,
|
|
143
|
+
{
|
|
144
|
+
type: "primary",
|
|
145
|
+
onClick: () => b.replace("/workspace"),
|
|
146
|
+
children: "返回工作台"
|
|
147
|
+
}
|
|
148
|
+
)
|
|
149
|
+
}
|
|
150
|
+
) }) : /* @__PURE__ */ r("div", { className: "from-scenario-page", children: /* @__PURE__ */ x("div", { className: "from-scenario-page__panel", children: [
|
|
151
|
+
/* @__PURE__ */ r(G, { size: "large" }),
|
|
152
|
+
/* @__PURE__ */ r("p", { className: "from-scenario-page__step", children: M }),
|
|
153
|
+
N ? /* @__PURE__ */ r("p", { className: "from-scenario-page__hint", children: N }) : null,
|
|
154
|
+
k.length > 0 ? /* @__PURE__ */ r("ul", { className: "from-scenario-page__done-list", children: k.filter((e) => e.trim().length > 0).map((e, t) => /* @__PURE__ */ x(
|
|
155
|
+
"li",
|
|
156
|
+
{
|
|
157
|
+
className: "from-scenario-page__done-item",
|
|
158
|
+
children: [
|
|
159
|
+
/* @__PURE__ */ r(W, { className: "from-scenario-page__done-icon" }),
|
|
160
|
+
/* @__PURE__ */ r("span", { children: e })
|
|
161
|
+
]
|
|
162
|
+
},
|
|
163
|
+
`${t}-${e}`
|
|
164
|
+
)) }) : null
|
|
165
|
+
] }) });
|
|
166
|
+
}
|
|
167
|
+
export {
|
|
168
|
+
ue as default
|
|
169
|
+
};
|
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
import { AppLayout as v, ErrorBoundary as z, LoginPage as _, StatusTag as j, defaultStatusMap as F } from "@yuku123/z-frontend-common";
|
|
2
|
+
import { b as y } from "./ComponentDoc-BW1SyDxk.js";
|
|
3
|
+
import { z as V, E as Q, A as X, D as Y, F as Z, O as $, G as ee, R as te, H as re, I as ae, J as oe, K as ne, L as le, L as ie, N as se } from "./ComponentDoc-BW1SyDxk.js";
|
|
4
|
+
import { jsxs as r, Fragment as h, jsx as e } from "react/jsx-runtime";
|
|
5
|
+
import { useState as n, useEffect as R } from "react";
|
|
6
|
+
import { Alert as I, Space as x, Button as l, Tag as c, Result as T } from "antd";
|
|
7
|
+
import { ReloadOutlined as g, UserAddOutlined as b, TeamOutlined as E, PlusOutlined as w, CodeOutlined as A } from "@ant-design/icons";
|
|
8
|
+
import { ListTable as f } from "@yuku123/z-frontend-common/ui";
|
|
9
|
+
const q = y, O = {
|
|
10
|
+
LEADER: "red",
|
|
11
|
+
WORKER: "blue",
|
|
12
|
+
OBSERVER: "default"
|
|
13
|
+
};
|
|
14
|
+
function B() {
|
|
15
|
+
const [i] = n(!1), [s] = n([]);
|
|
16
|
+
return /* @__PURE__ */ r(h, { children: [
|
|
17
|
+
/* @__PURE__ */ e(
|
|
18
|
+
I,
|
|
19
|
+
{
|
|
20
|
+
type: "info",
|
|
21
|
+
showIcon: !0,
|
|
22
|
+
style: { marginBottom: 16 },
|
|
23
|
+
title: "IM 群组 (含 STOMP 实时消息) 后端服务尚未启动",
|
|
24
|
+
description: "当前展示群组列表占位。等 z-agent-team 后端就绪后切换为完整 IM 客户端。"
|
|
25
|
+
}
|
|
26
|
+
),
|
|
27
|
+
/* @__PURE__ */ e(
|
|
28
|
+
f,
|
|
29
|
+
{
|
|
30
|
+
cardTitle: /* @__PURE__ */ r("span", { children: [
|
|
31
|
+
/* @__PURE__ */ e(E, { style: { marginRight: 8 } }),
|
|
32
|
+
"Agent 群组 IM"
|
|
33
|
+
] }),
|
|
34
|
+
cardExtra: /* @__PURE__ */ r(x, { children: [
|
|
35
|
+
/* @__PURE__ */ e(l, { icon: /* @__PURE__ */ e(g, {}), loading: i, children: "刷新" }),
|
|
36
|
+
/* @__PURE__ */ e(l, { type: "primary", icon: /* @__PURE__ */ e(b, {}), disabled: !0, children: "创建群组" })
|
|
37
|
+
] }),
|
|
38
|
+
rows: s,
|
|
39
|
+
columns: [
|
|
40
|
+
{ title: "群组编码", dataIndex: "teamCode", width: 200, ellipsis: !0 },
|
|
41
|
+
{ title: "群组名称", dataIndex: "teamName", width: 200 },
|
|
42
|
+
{
|
|
43
|
+
title: "我的角色",
|
|
44
|
+
dataIndex: "role",
|
|
45
|
+
width: 120,
|
|
46
|
+
render: (a) => /* @__PURE__ */ e(c, { color: O[a] || "default", children: a || "-" })
|
|
47
|
+
},
|
|
48
|
+
{ title: "成员数", dataIndex: "memberCount", width: 100 },
|
|
49
|
+
{ title: "最近消息", dataIndex: "lastMessage", width: 240, ellipsis: !0 },
|
|
50
|
+
{ title: "更新时间", dataIndex: "updatedAt", width: 180 }
|
|
51
|
+
],
|
|
52
|
+
rowKey: "teamCode",
|
|
53
|
+
loading: i,
|
|
54
|
+
searchKeys: ["teamCode", "teamName"],
|
|
55
|
+
searchPlaceholder: "按群组编码 / 名称过滤",
|
|
56
|
+
emptyTitle: "暂无群组",
|
|
57
|
+
emptyDescription: "当前还没有 IM 群组。"
|
|
58
|
+
}
|
|
59
|
+
)
|
|
60
|
+
] });
|
|
61
|
+
}
|
|
62
|
+
const D = {
|
|
63
|
+
CREATING: { text: "创建中", color: "processing" },
|
|
64
|
+
RUNNING: { text: "运行中", color: "success" },
|
|
65
|
+
STOPPED: { text: "已停止", color: "default" },
|
|
66
|
+
ERROR: { text: "错误", color: "error" }
|
|
67
|
+
}, M = {
|
|
68
|
+
GIT: { text: "GIT 模式", color: "blue" },
|
|
69
|
+
SHARED: { text: "SHARED 模式", color: "purple" }
|
|
70
|
+
};
|
|
71
|
+
function U() {
|
|
72
|
+
const [i, s] = n([]), [d, a] = n(!1), [u, m] = n(null), p = async () => {
|
|
73
|
+
a(!0), m(null);
|
|
74
|
+
try {
|
|
75
|
+
s([]);
|
|
76
|
+
} catch (t) {
|
|
77
|
+
m((t == null ? void 0 : t.message) || "加载失败");
|
|
78
|
+
} finally {
|
|
79
|
+
a(!1);
|
|
80
|
+
}
|
|
81
|
+
};
|
|
82
|
+
return R(() => {
|
|
83
|
+
p();
|
|
84
|
+
}, []), /* @__PURE__ */ r(h, { children: [
|
|
85
|
+
u && /* @__PURE__ */ e(
|
|
86
|
+
I,
|
|
87
|
+
{
|
|
88
|
+
type: "warning",
|
|
89
|
+
showIcon: !0,
|
|
90
|
+
style: { marginBottom: 16 },
|
|
91
|
+
title: "后端 API 暂未连接",
|
|
92
|
+
description: u
|
|
93
|
+
}
|
|
94
|
+
),
|
|
95
|
+
/* @__PURE__ */ e(
|
|
96
|
+
f,
|
|
97
|
+
{
|
|
98
|
+
cardTitle: /* @__PURE__ */ r("span", { children: [
|
|
99
|
+
/* @__PURE__ */ e(A, { style: { marginRight: 8 } }),
|
|
100
|
+
"WebIDE 容器管理"
|
|
101
|
+
] }),
|
|
102
|
+
cardExtra: /* @__PURE__ */ r(x, { children: [
|
|
103
|
+
/* @__PURE__ */ e(l, { icon: /* @__PURE__ */ e(g, {}), onClick: p, loading: d, children: "刷新" }),
|
|
104
|
+
/* @__PURE__ */ e(l, { type: "primary", icon: /* @__PURE__ */ e(w, {}), disabled: !0, children: "新建 WebIDE" })
|
|
105
|
+
] }),
|
|
106
|
+
rows: i,
|
|
107
|
+
columns: [
|
|
108
|
+
{ title: "容器ID", dataIndex: "containerId", width: 220, ellipsis: !0 },
|
|
109
|
+
{
|
|
110
|
+
title: "模式",
|
|
111
|
+
dataIndex: "mode",
|
|
112
|
+
width: 120,
|
|
113
|
+
render: (t) => {
|
|
114
|
+
const o = M[t] || { text: t, color: "default" };
|
|
115
|
+
return /* @__PURE__ */ e(c, { color: o.color, children: o.text });
|
|
116
|
+
}
|
|
117
|
+
},
|
|
118
|
+
{ title: "Git URL", dataIndex: "gitUrl", width: 240, ellipsis: !0 },
|
|
119
|
+
{ title: "分支", dataIndex: "branch", width: 120 },
|
|
120
|
+
{
|
|
121
|
+
title: "状态",
|
|
122
|
+
dataIndex: "status",
|
|
123
|
+
width: 120,
|
|
124
|
+
render: (t) => {
|
|
125
|
+
const o = D[t] || { text: t, color: "default" };
|
|
126
|
+
return /* @__PURE__ */ e(c, { color: o.color, children: o.text });
|
|
127
|
+
}
|
|
128
|
+
},
|
|
129
|
+
{ title: "创建时间", dataIndex: "createdAt", width: 180 }
|
|
130
|
+
],
|
|
131
|
+
rowKey: "containerId",
|
|
132
|
+
loading: d,
|
|
133
|
+
scroll: { x: 1e3 },
|
|
134
|
+
searchKeys: ["containerId", "branch"],
|
|
135
|
+
searchPlaceholder: "按容器 ID / 分支过滤",
|
|
136
|
+
emptyTitle: "暂无容器",
|
|
137
|
+
emptyDescription: "后端 z-webide 服务尚未启动"
|
|
138
|
+
}
|
|
139
|
+
)
|
|
140
|
+
] });
|
|
141
|
+
}
|
|
142
|
+
function H() {
|
|
143
|
+
return /* @__PURE__ */ e(
|
|
144
|
+
T,
|
|
145
|
+
{
|
|
146
|
+
title: "Debug Playground",
|
|
147
|
+
subTitle: "AI 调试沙盒功能开发中...",
|
|
148
|
+
extra: /* @__PURE__ */ e(l, { type: "primary", children: "敬请期待" })
|
|
149
|
+
}
|
|
150
|
+
);
|
|
151
|
+
}
|
|
152
|
+
export {
|
|
153
|
+
B as AgentTeamIM,
|
|
154
|
+
v as AppLayout,
|
|
155
|
+
V as CurlImportModal,
|
|
156
|
+
H as DebugPlayground,
|
|
157
|
+
Q as EndpointsTab,
|
|
158
|
+
X as EnvironmentsTab,
|
|
159
|
+
z as ErrorBoundary,
|
|
160
|
+
_ as LoginPage,
|
|
161
|
+
Y as MockPlatform,
|
|
162
|
+
Z as MockTemplateHelper,
|
|
163
|
+
$ as OpenApiImportModal,
|
|
164
|
+
ee as Overview,
|
|
165
|
+
te as RecordingsTab,
|
|
166
|
+
re as RequestLogsTab,
|
|
167
|
+
ae as ScenariosTab,
|
|
168
|
+
j as StatusTag,
|
|
169
|
+
oe as TestCasesTab,
|
|
170
|
+
U as Webide,
|
|
171
|
+
y as authRequest,
|
|
172
|
+
ne as createRequest,
|
|
173
|
+
q as ctcRequest,
|
|
174
|
+
le as default,
|
|
175
|
+
F as defaultStatusMap,
|
|
176
|
+
ie as request,
|
|
177
|
+
se as setupInterceptors
|
|
178
|
+
};
|