@yuku123/z-team-component 0.2.80 → 0.2.81

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (51) hide show
  1. package/dist/ChangeLogView-_bRZ55Yi.js +542 -0
  2. package/dist/ComponentDoc-BWciPDcn.js +3998 -0
  3. package/dist/InvitationManagementPage-X9t4igh7.js +495 -0
  4. package/dist/OnboardingPage-D2sVawTW.js +393 -0
  5. package/dist/ScheduledTasks-CdCX5FlH.js +9407 -0
  6. package/dist/SystemShell-Bd0UpmAs.js +689 -0
  7. package/dist/_commonjsHelpers-B52_cu2H.js +26 -0
  8. package/dist/api-BKjWEmUY.js +20 -0
  9. package/dist/api-CIhVblfa.js +2155 -0
  10. package/dist/browser-jb_PFvU3.js +1538 -0
  11. package/dist/createWorkspaceWsHandler-BWP5S5X3.js +12951 -0
  12. package/dist/ctc-sso-DtJHC-2M.js +117 -0
  13. package/dist/echarts-B1OU1xr4.js +16 -0
  14. package/dist/history-BlrA1eaW.js +41 -0
  15. package/dist/index-B_LJRFsK.js +339 -0
  16. package/dist/index-BgIheStI.js +133 -0
  17. package/dist/index-Bn6u-XqL.js +242 -0
  18. package/dist/index-BohoJQPr.js +7631 -0
  19. package/dist/index-BydWNuk5.js +1229 -0
  20. package/dist/index-C815hPWS.js +430 -0
  21. package/dist/index-CPXlkVYF.js +118 -0
  22. package/dist/index-CUVdeb8y.js +638 -0
  23. package/dist/index-CdsD23Cm.js +914 -0
  24. package/dist/index-CijskN6t.js +316 -0
  25. package/dist/index-CkhoaNnF.js +137 -0
  26. package/dist/index-Cvx6rrxD.js +956 -0
  27. package/dist/index-Cwr5Slv1.js +480 -0
  28. package/dist/index-CxFAICql.js +42050 -0
  29. package/dist/index-D6i_zovv.js +574 -0
  30. package/dist/index-D8aigFpH.js +9583 -0
  31. package/dist/index-DK70mOTz.js +143 -0
  32. package/dist/index-DSoOHdTf.js +178 -0
  33. package/dist/index-DT80Pwa_.js +5893 -0
  34. package/dist/index-DWsfQMp8.js +208 -0
  35. package/dist/index-DZoJnRKu.js +112 -0
  36. package/dist/index-DhDdFRHC.js +279 -0
  37. package/dist/index-DimSOV0E.js +1143 -0
  38. package/dist/index-Dm3wmB0K.js +435 -0
  39. package/dist/index-DsP2ysav.js +93 -0
  40. package/dist/index-Dwm0j8qF.js +2936 -0
  41. package/dist/index-DzS6-D3M.js +1640 -0
  42. package/dist/index-RVaaSElI.js +2700 -0
  43. package/dist/index-cdB5K3gx.js +814 -0
  44. package/dist/index-nU-V276i.js +170 -0
  45. package/dist/index-uF04Ucsi.js +8 -0
  46. package/dist/index.js +10 -0
  47. package/dist/index.module-CAa-2T7m.js +72 -0
  48. package/dist/index.module-UI0iz8K0.js +42 -0
  49. package/dist/{menuPermission-D9NGpBZP.js → menuPermission-Uzk46Gto.js} +1 -1
  50. package/dist/pages.js +1 -1
  51. package/package.json +1 -1
@@ -0,0 +1,143 @@
1
+ import { jsx as c, jsxs as _ } from "react/jsx-runtime";
2
+ import { i as $, t as x, p as O, c as b, b as v } from "./api-CIhVblfa.js";
3
+ import { CheckCircleFilled as F } from "@ant-design/icons";
4
+ import { Result as D, Button as R, Spin as U } from "antd";
5
+ import B from "query-string";
6
+ import { useMemo as j, useState as f, useRef as q, useCallback as A, useEffect as J } from "react";
7
+ import { useLocation as W } from "react-router-dom";
8
+ import { h as y } from "./history-BlrA1eaW.js";
9
+ import { l as Z, j as z, f as H, b as L, p as M } from "./instance-CDmueqyu.js";
10
+ import { u as w } from "./useAppStore-BBr_Fwsz.js";
11
+ import { b as N } from "./mobile-client-O3yr9h6t.js";
12
+ function ct() {
13
+ const m = W(), p = B.parse(m.search), o = String(
14
+ p.projectId ?? p.project_id ?? ""
15
+ ).trim(), a = String(p.ticketId ?? p.ticket_id ?? "").trim(), e = j(() => {
16
+ if (!o)
17
+ return null;
18
+ const t = x(o);
19
+ return $(t) ? t : null;
20
+ }, [o]), u = w((t) => t.token), T = w((t) => t.expandProject), [h, l] = f(""), [P, n] = f("正在启动…"), [k, C] = f([]), g = q(!1), i = A((t, r) => {
21
+ C((s) => [...s, t]), n(r);
22
+ }, []), I = async (t) => {
23
+ i("协作区已就绪", "正在同步工程列表…"), await T(t), i("工作区已准备", "即将进入工作台…"), y.replace(
24
+ N({
25
+ projectId: t.id,
26
+ search: m.search
27
+ })
28
+ );
29
+ }, d = async (t) => {
30
+ n("正在确认工程信息…");
31
+ const r = await Z(t, u);
32
+ if (r.status === "NOT_FOUND" || !r.scenarioInstance)
33
+ throw new Error("PROJECT_NOT_FOUND");
34
+ n("正在加入协作区…");
35
+ const s = await z(t, u);
36
+ i("已加入协作区", "正在打开协作区…"), await I(s);
37
+ }, E = async () => {
38
+ n("正在检查工单信息…");
39
+ const t = await H(a);
40
+ i("工单信息已获取", "正在解析工程绑定…");
41
+ const r = O(t);
42
+ if (r != null) {
43
+ i("已定位协作区", `正在打开协作区 ${r}…`), await d(r);
44
+ return;
45
+ }
46
+ n("正在初始化工程…");
47
+ const s = await b(
48
+ L(t, a),
49
+ u
50
+ );
51
+ n("正在关联工单…");
52
+ try {
53
+ await v(
54
+ a,
55
+ s.id,
56
+ M(t)
57
+ );
58
+ } catch {
59
+ }
60
+ n("正在初始化工作区…"), await I(s);
61
+ };
62
+ J(() => {
63
+ if (!g.current) {
64
+ if (g.current = !0, o && e == null) {
65
+ l("projectId 无效,请传入正整数");
66
+ return;
67
+ }
68
+ if (e == null && !a) {
69
+ l("缺少参数:请提供 projectId 和/或 ticketId");
70
+ return;
71
+ }
72
+ if (e != null && !a) {
73
+ (async () => {
74
+ try {
75
+ n(`正在打开协作区 ${e}…`), await d(e);
76
+ } catch (t) {
77
+ const r = t instanceof Error ? t.message : String(t);
78
+ l(r || "打开工程失败");
79
+ }
80
+ })();
81
+ return;
82
+ }
83
+ if (!a) {
84
+ l("缺少 ticketId");
85
+ return;
86
+ }
87
+ (async () => {
88
+ try {
89
+ if (e != null)
90
+ try {
91
+ n(`正在打开指定协作区 ${e}…`), await d(e);
92
+ return;
93
+ } catch (t) {
94
+ if (!(t instanceof Error && t.message === "PROJECT_NOT_FOUND"))
95
+ throw t;
96
+ n("正在按工单重新查找…");
97
+ }
98
+ await E();
99
+ } catch (t) {
100
+ const r = t instanceof Error ? t.message : String(t);
101
+ l(r || "打开工程失败");
102
+ }
103
+ })();
104
+ }
105
+ }, [i, e, o, a, u]);
106
+ const S = j(() => e != null && a ? `工单 ${a} · 工程 ${e}` : e != null ? `工程 ${e}` : a ? `工单 ${a}` : "", [e, a]);
107
+ return h ? /* @__PURE__ */ c("div", { className: "from-ticket-page", children: /* @__PURE__ */ c(
108
+ D,
109
+ {
110
+ status: "error",
111
+ title: "无法打开工程",
112
+ subTitle: h,
113
+ extra: /* @__PURE__ */ c(
114
+ R,
115
+ {
116
+ type: "primary",
117
+ onClick: () => y.replace(
118
+ N({ search: m.search })
119
+ ),
120
+ children: "返回工作台"
121
+ }
122
+ )
123
+ }
124
+ ) }) : /* @__PURE__ */ c("div", { className: "from-ticket-page", children: /* @__PURE__ */ _("div", { className: "from-ticket-page__panel", children: [
125
+ /* @__PURE__ */ c(U, { size: "large" }),
126
+ /* @__PURE__ */ c("p", { className: "from-ticket-page__step", children: P }),
127
+ S ? /* @__PURE__ */ c("p", { className: "from-ticket-page__hint", children: S }) : null,
128
+ k.length > 0 ? /* @__PURE__ */ c("ul", { className: "from-ticket-page__done-list", children: k.filter((t) => t.trim().length > 0).map((t, r) => /* @__PURE__ */ _(
129
+ "li",
130
+ {
131
+ className: "from-ticket-page__done-item",
132
+ children: [
133
+ /* @__PURE__ */ c(F, { className: "from-ticket-page__done-icon" }),
134
+ /* @__PURE__ */ c("span", { children: t })
135
+ ]
136
+ },
137
+ `${r}-${t}`
138
+ )) }) : null
139
+ ] }) });
140
+ }
141
+ export {
142
+ ct as default
143
+ };
@@ -0,0 +1,178 @@
1
+ import { AppLayout as v, ErrorBoundary as H, LoginPage as _, StatusTag as z, defaultStatusMap as F } from "@yuku123/z-frontend-common";
2
+ import { a as y } from "./ComponentDoc-BWciPDcn.js";
3
+ import { c as J, E as Q, d as X, e as Y, f as Z, O as $, h as ee, R as te, j as re, k as ae, T as oe, l as ne, r as le, r as ie, m as se } from "./ComponentDoc-BWciPDcn.js";
4
+ import { jsxs as r, Fragment as h, jsx as e } from "react/jsx-runtime";
5
+ import { useState as n, useEffect as T } from "react";
6
+ import { Alert as I, Space as x, Button as l, Tag as c, Result as R } from "antd";
7
+ import { ReloadOutlined as g, UserAddOutlined as E, TeamOutlined as b, PlusOutlined as w, CodeOutlined as A } from "@ant-design/icons";
8
+ import { ListTable as f } from "@yuku123/z-frontend-common/ui";
9
+ const G = y, O = {
10
+ LEADER: "red",
11
+ WORKER: "blue",
12
+ OBSERVER: "default"
13
+ };
14
+ function K() {
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(b, { 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(E, {}), 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 M = {
63
+ CREATING: { text: "创建中", color: "processing" },
64
+ RUNNING: { text: "运行中", color: "success" },
65
+ STOPPED: { text: "已停止", color: "default" },
66
+ ERROR: { text: "错误", color: "error" }
67
+ }, D = {
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 T(() => {
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 = D[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 = M[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 k() {
143
+ return /* @__PURE__ */ e(
144
+ R,
145
+ {
146
+ title: "Debug Playground",
147
+ subTitle: "AI 调试沙盒功能开发中...",
148
+ extra: /* @__PURE__ */ e(l, { type: "primary", children: "敬请期待" })
149
+ }
150
+ );
151
+ }
152
+ export {
153
+ K as AgentTeamIM,
154
+ v as AppLayout,
155
+ J as CurlImportModal,
156
+ k as DebugPlayground,
157
+ Q as EndpointsTab,
158
+ X as EnvironmentsTab,
159
+ H 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
+ z as StatusTag,
169
+ oe as TestCasesTab,
170
+ U as Webide,
171
+ y as authRequest,
172
+ ne as createRequest,
173
+ G as ctcRequest,
174
+ le as default,
175
+ F as defaultStatusMap,
176
+ ie as request,
177
+ se as setupInterceptors
178
+ };