@yuku123/z-team-component 0.2.145 → 0.2.146

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/{AdminModuleContent-CHag6CqK.js → AdminModuleContent-CpPRtBhf.js} +6 -6
  2. package/dist/{ChangeLogView-Bsir7xGE.js → ChangeLogView-DKbqhsU3.js} +1 -1
  3. package/dist/{ComponentDoc-BVkKoBEO.js → ComponentDoc-B11C4Swx.js} +3 -3
  4. package/dist/{InvitationManagementPage-DMSxqd_u.js → InvitationManagementPage-BgWcIOfq.js} +1 -1
  5. package/dist/{OnboardingPage-Bu4ckQNK.js → OnboardingPage-SDjCRah7.js} +2 -2
  6. package/dist/{ScheduledTasks-C8aDGdT8.js → ScheduledTasks-D3BsnxdD.js} +9 -9
  7. package/dist/{SettingsModal-5zHvSGgL.js → SettingsModal-Duhx6sgy.js} +4 -4
  8. package/dist/{SystemShell-DpH7u-fU.js → SystemShell-g5s21kjl.js} +7 -7
  9. package/dist/{admin-logs-DU83H-JK.js → admin-logs-9JP7Zv_M.js} +1 -1
  10. package/dist/{api-Bl_dS2Wy.js → api-C_QGz3cC.js} +1 -1
  11. package/dist/{api-OP6AC1ZT.js → api-D3tlBWV2.js} +1 -1
  12. package/dist/{browser-Dnq-HgEe.js → browser-BTRhzc_h.js} +1 -1
  13. package/dist/{createWorkspaceWsHandler-upDJ_l-a.js → createWorkspaceWsHandler-iET70rhv.js} +1504 -1504
  14. package/dist/{index-BDLt4eE-.js → index-B3EuOSdc.js} +2 -2
  15. package/dist/{index-CgN9PksK.js → index-B3LWKGqn.js} +2 -2
  16. package/dist/{index-D3pFumgk.js → index-BN2CbrvD.js} +1 -1
  17. package/dist/{index-n0ObqtQ7.js → index-BUmvuw2J.js} +3 -3
  18. package/dist/{index-ShhGPYVc.js → index-BYog_1zd.js} +3 -3
  19. package/dist/{index-Dkk5ENYO.js → index-BZ88j8oo.js} +2 -2
  20. package/dist/{index-CQgfn29U.js → index-Bo7aUfMi.js} +6 -6
  21. package/dist/{index-DF6atZz3.js → index-BrN81F9K.js} +2 -2
  22. package/dist/{index-CxbAGDJ3.js → index-C5LDveug.js} +1 -1
  23. package/dist/{index-DJv79_-3.js → index-CJSSITWe.js} +2 -2
  24. package/dist/{index-C_yKDgXK.js → index-CJvskwqR.js} +1 -1
  25. package/dist/{index-AlS6mPbY.js → index-CMIq6fEf.js} +8 -8
  26. package/dist/index-CPOQkuGS.js +20 -0
  27. package/dist/{index-C-FP9WGw.js → index-CYDSu-o0.js} +2 -2
  28. package/dist/{index-CuYJDipp.js → index-CZBb5aGw.js} +4 -4
  29. package/dist/index-CkHB8H5z.js +1298 -0
  30. package/dist/{index-CVzO7S1T.js → index-CqVXGc3e.js} +2 -2
  31. package/dist/{index-sWaHY8Ir.js → index-D9MtcOhY.js} +2 -2
  32. package/dist/{index-Am7DqaNc.js → index-D9SCuemi.js} +3 -3
  33. package/dist/{index-CBtQ0HQk.js → index-DNCfDU4G.js} +4 -4
  34. package/dist/{index-CHwuIgOt.js → index-DQ4-Q12f.js} +1 -1
  35. package/dist/{index-DFMeqCkH.js → index-DV94b3-C.js} +2 -2
  36. package/dist/{index-CHUnO3gy.js → index-DgJ8YYTW.js} +4 -4
  37. package/dist/{index-Dgz0cYS2.js → index-Dgvc35tE.js} +1 -1
  38. package/dist/{index-fFsLmuFS.js → index-DzLp4w3Q.js} +1 -1
  39. package/dist/{index-j8Yktrgi.js → index-wuz6Ltl2.js} +1 -1
  40. package/dist/index.js +1 -1
  41. package/dist/{instance-CoNcgooy.js → instance-RPYQUlqG.js} +1 -1
  42. package/dist/{menuPermission-fbpOuih9.js → menuPermission-3xJYTPxY.js} +3 -3
  43. package/dist/pages.js +1 -1
  44. package/dist/{send-default-agent-team-message-BeDkZJ90.js → send-default-agent-team-message-DIrk-E4F.js} +1 -1
  45. package/dist/{spark-md5-DbgWp97W.js → spark-md5-BoDlwjZ8.js} +1 -1
  46. package/dist/{training-DRzfNoMw.js → training-DwnE6mwX.js} +1 -1
  47. package/dist/{webide-C2FOLy6h.js → webide-C-m4gDjl.js} +3 -3
  48. package/dist/z-team-component.css +1 -1
  49. package/package.json +1 -1
  50. package/dist/index-DK3POUqJ.js +0 -1298
  51. package/dist/index-g6QZon70.js +0 -20
@@ -0,0 +1,1298 @@
1
+ import { jsxs as i, jsx as n, Fragment as _t } from "react/jsx-runtime";
2
+ import { ReloadOutlined as gt, SearchOutlined as Nt, RightOutlined as yt, TeamOutlined as ft, MessageOutlined as wt, AppstoreOutlined as Me, DeploymentUnitOutlined as bt, ThunderboltOutlined as Tt } from "@ant-design/icons";
3
+ import { Button as Q, Select as Pe, Spin as he, Empty as f, Tag as k, Input as j, Modal as Ct } from "antd";
4
+ import { useState as p, useCallback as _, useEffect as me, useMemo as Y, useRef as St } from "react";
5
+ import { u as B } from "./ComponentDoc-B11C4Swx.js";
6
+ import { h as W } from "./history-BlrA1eaW.js";
7
+ import { menuItems as Rt } from "@yuku123/z-product-component";
8
+ import { C as Pt } from "./createWorkspaceWsHandler-iET70rhv.js";
9
+ import { l as At, c as kt } from "./api-D3tlBWV2.js";
10
+ import { SidebarShell as It, MenuTree as Et } from "@yuku123/z-frontend-common/ui";
11
+ const Lt = "product-workspace", xe = "productCode";
12
+ function w(a) {
13
+ if (!a.ok) throw new Error(`产品接口失败 (${a.status})`);
14
+ return a.json();
15
+ }
16
+ async function Gt() {
17
+ const a = B.getState().token, s = await fetch(`/api/product/list${a ? `?token=${encodeURIComponent(a)}` : ""}`, {
18
+ credentials: "include",
19
+ headers: { Accept: "application/json" }
20
+ }), c = await w(s), o = Array.isArray(c) ? c : c == null ? void 0 : c.data;
21
+ return Array.isArray(o) ? o.map((g) => ({
22
+ ...g,
23
+ productCode: String(g.productCode ?? g.code ?? ""),
24
+ name: String(g.name ?? g.productCode ?? g.code ?? "未命名")
25
+ })) : [];
26
+ }
27
+ async function Bt(a) {
28
+ try {
29
+ const s = await fetch(`/api/product/${encodeURIComponent(a)}`, {
30
+ credentials: "include",
31
+ headers: { Accept: "application/json" }
32
+ }), c = await w(s), o = (c == null ? void 0 : c.data) ?? c;
33
+ return o && typeof o == "object" ? { ...o, productCode: a } : null;
34
+ } catch {
35
+ return null;
36
+ }
37
+ }
38
+ async function $t(a) {
39
+ try {
40
+ const s = await fetch(`/api/product/${encodeURIComponent(a)}/atelier/workspace`, {
41
+ credentials: "include",
42
+ headers: { Accept: "application/json" }
43
+ }), c = await w(s), o = (c == null ? void 0 : c.data) ?? c;
44
+ return o && typeof o == "object" && Array.isArray(o.files) ? o.files : Array.isArray(o) ? o : [];
45
+ } catch {
46
+ return [];
47
+ }
48
+ }
49
+ async function Ft(a, s) {
50
+ try {
51
+ const c = await fetch(
52
+ `/api/product/${encodeURIComponent(a)}/atelier/files/raw?path=${encodeURIComponent(s)}`,
53
+ { credentials: "include", headers: { Accept: "text/html, application/json" } }
54
+ );
55
+ return c.ok ? await c.text() : null;
56
+ } catch {
57
+ return null;
58
+ }
59
+ }
60
+ function Ot(a) {
61
+ var o;
62
+ const s = (o = a.ext) == null ? void 0 : o.params;
63
+ if (!s || typeof s != "object") return null;
64
+ const c = s[xe];
65
+ return c == null ? null : String(c);
66
+ }
67
+ async function jt(a, s) {
68
+ try {
69
+ return (await At(s)).filter((o) => Ot(o) === a);
70
+ } catch {
71
+ return [];
72
+ }
73
+ }
74
+ async function qt(a, s, c) {
75
+ return kt(
76
+ { scenario_code: Lt, name: s || `产品 ${a} 讨论组` },
77
+ c,
78
+ { [xe]: a }
79
+ );
80
+ }
81
+ function b(a) {
82
+ return a && typeof a == "object" && "data" in a ? a.data : a;
83
+ }
84
+ async function Ht() {
85
+ try {
86
+ const a = await fetch("/api/product/group/list", {
87
+ credentials: "include",
88
+ headers: { Accept: "application/json" }
89
+ }), s = await w(a), c = b(s);
90
+ return Array.isArray(c) ? c : [];
91
+ } catch {
92
+ return [];
93
+ }
94
+ }
95
+ async function Dt(a) {
96
+ try {
97
+ const s = await fetch("/api/product/group", {
98
+ method: "POST",
99
+ credentials: "include",
100
+ headers: { Accept: "application/json", "Content-Type": "application/json" },
101
+ body: JSON.stringify(a)
102
+ }), c = await w(s);
103
+ return b(c);
104
+ } catch {
105
+ return null;
106
+ }
107
+ }
108
+ async function Ut(a) {
109
+ try {
110
+ const s = await fetch(`/api/product/${encodeURIComponent(a)}/app-binding/list`, {
111
+ credentials: "include",
112
+ headers: { Accept: "application/json" }
113
+ }), c = await w(s), o = b(c);
114
+ return Array.isArray(o) ? o : [];
115
+ } catch {
116
+ return [];
117
+ }
118
+ }
119
+ async function Mt(a, s) {
120
+ try {
121
+ const c = await fetch(`/api/product/${encodeURIComponent(a)}/app-binding`, {
122
+ method: "POST",
123
+ credentials: "include",
124
+ headers: { Accept: "application/json", "Content-Type": "application/json" },
125
+ body: JSON.stringify(s)
126
+ }), o = await w(c);
127
+ return b(o);
128
+ } catch {
129
+ return null;
130
+ }
131
+ }
132
+ async function xt(a) {
133
+ try {
134
+ const s = await fetch(`/api/product/${encodeURIComponent(a)}/requirement/list`, {
135
+ credentials: "include",
136
+ headers: { Accept: "application/json" }
137
+ }), c = await w(s), o = b(c);
138
+ return Array.isArray(o) ? o : [];
139
+ } catch {
140
+ return [];
141
+ }
142
+ }
143
+ async function zt(a, s) {
144
+ try {
145
+ const c = await fetch(`/api/product/${encodeURIComponent(a)}/requirement`, {
146
+ method: "POST",
147
+ credentials: "include",
148
+ headers: { Accept: "application/json", "Content-Type": "application/json" },
149
+ body: JSON.stringify(s)
150
+ }), o = await w(c);
151
+ return b(o);
152
+ } catch {
153
+ return null;
154
+ }
155
+ }
156
+ async function q(a, s) {
157
+ try {
158
+ const c = await fetch(
159
+ `/api/product/${encodeURIComponent(a)}/${s}`,
160
+ { credentials: "include", headers: { Accept: "application/json" } }
161
+ ), o = await w(c), g = b(o);
162
+ return Array.isArray(g) ? g : [];
163
+ } catch {
164
+ return [];
165
+ }
166
+ }
167
+ async function Kt(a) {
168
+ return q(a, "glossary/list");
169
+ }
170
+ async function Vt(a) {
171
+ return q(a, "concept/list");
172
+ }
173
+ async function Jt(a) {
174
+ return q(a, "scenario/list");
175
+ }
176
+ async function Wt(a) {
177
+ return q(a, "design/list");
178
+ }
179
+ async function Qt(a) {
180
+ return q(a, "chat/sessions");
181
+ }
182
+ async function Yt(a) {
183
+ return q(a, "chat/proposals");
184
+ }
185
+ async function Zt() {
186
+ try {
187
+ const a = await fetch("/api/product/relation/types", {
188
+ credentials: "include",
189
+ headers: { Accept: "application/json" }
190
+ }), s = await w(a), c = b(s);
191
+ return c && typeof c == "object" ? c : {};
192
+ } catch {
193
+ return {};
194
+ }
195
+ }
196
+ async function Xt() {
197
+ try {
198
+ const a = await fetch("/api/product/architecture", {
199
+ credentials: "include",
200
+ headers: { Accept: "application/json" }
201
+ }), s = await w(a), c = b(s);
202
+ return c && typeof c == "object" ? {
203
+ products: Array.isArray(c.products) ? c.products : [],
204
+ groups: Array.isArray(c.groups) ? c.groups : [],
205
+ relations: Array.isArray(c.relations) ? c.relations : [],
206
+ appBindings: Array.isArray(c.appBindings) ? c.appBindings : []
207
+ } : { products: [], groups: [], relations: [], appBindings: [] };
208
+ } catch {
209
+ return { products: [], groups: [], relations: [], appBindings: [] };
210
+ }
211
+ }
212
+ async function en(a) {
213
+ try {
214
+ const s = await fetch("/api/product/relation", {
215
+ method: "POST",
216
+ credentials: "include",
217
+ headers: { Accept: "application/json", "Content-Type": "application/json" },
218
+ body: JSON.stringify(a)
219
+ }), c = await w(s);
220
+ return b(c);
221
+ } catch {
222
+ return null;
223
+ }
224
+ }
225
+ async function tn(a) {
226
+ try {
227
+ return await fetch(`/api/product/relation/${a}`, {
228
+ method: "DELETE",
229
+ credentials: "include",
230
+ headers: { Accept: "application/json" }
231
+ }), !0;
232
+ } catch {
233
+ return !1;
234
+ }
235
+ }
236
+ async function nn(a, s) {
237
+ try {
238
+ const c = await fetch(`/api/product/${encodeURIComponent(a)}/requirement/${s.id}`, {
239
+ method: "PUT",
240
+ credentials: "include",
241
+ headers: { Accept: "application/json", "Content-Type": "application/json" },
242
+ body: JSON.stringify(s)
243
+ }), o = await w(c);
244
+ return b(o);
245
+ } catch {
246
+ return null;
247
+ }
248
+ }
249
+ const an = "_container_v1vhg_3", cn = "_header_v1vhg_11", rn = "_title_v1vhg_23", sn = "_subtitle_v1vhg_30", on = "_actions_v1vhg_36", ln = "_stats_v1vhg_42", dn = "_relForm_v1vhg_55", pn = "_relFormLabel_v1vhg_66", un = "_centerFill_v1vhg_72", hn = "_groups_v1vhg_79", mn = "_groupBlock_v1vhg_89", vn = "_groupHeader_v1vhg_95", _n = "_groupName_v1vhg_101", gn = "_groupCount_v1vhg_107", Nn = "_productGrid_v1vhg_112", yn = "_productCard_v1vhg_118", fn = "_cardHead_v1vhg_134", wn = "_cardName_v1vhg_141", bn = "_cardTag_v1vhg_150", Tn = "_cardCode_v1vhg_156", Cn = "_cardDesc_v1vhg_161", Sn = "_cardSection_v1vhg_171", Rn = "_sectionLabel_v1vhg_180", Pn = "_bindList_v1vhg_185", An = "_bindTag_v1vhg_191", kn = "_relList_v1vhg_196", In = "_relRow_v1vhg_202", En = "_relTag_v1vhg_209", Ln = "_relTarget_v1vhg_215", Gn = "_relDel_v1vhg_225", h = {
250
+ container: an,
251
+ header: cn,
252
+ title: rn,
253
+ subtitle: sn,
254
+ actions: on,
255
+ stats: ln,
256
+ relForm: dn,
257
+ relFormLabel: pn,
258
+ centerFill: un,
259
+ groups: hn,
260
+ groupBlock: mn,
261
+ groupHeader: vn,
262
+ groupName: _n,
263
+ groupCount: gn,
264
+ productGrid: Nn,
265
+ productCard: yn,
266
+ cardHead: fn,
267
+ cardName: wn,
268
+ cardTag: bn,
269
+ cardCode: Tn,
270
+ cardDesc: Cn,
271
+ cardSection: Sn,
272
+ sectionLabel: Rn,
273
+ bindList: Pn,
274
+ bindTag: An,
275
+ relList: kn,
276
+ relRow: In,
277
+ relTag: En,
278
+ relTarget: Ln,
279
+ relDel: Gn
280
+ };
281
+ function Bn() {
282
+ const [a, s] = p({ products: [], groups: [], relations: [], appBindings: [] }), [c, o] = p({}), [g, L] = p(!0), [d, H] = p(null), [l, D] = p(null), [T, Z] = p("DEPENDS_ON"), $ = _(async () => {
283
+ L(!0);
284
+ try {
285
+ const [u, v] = await Promise.all([Xt(), Zt()]);
286
+ s(u), o(v);
287
+ } finally {
288
+ L(!1);
289
+ }
290
+ }, []);
291
+ me(() => {
292
+ $();
293
+ }, [$]);
294
+ const I = _(
295
+ (u) => {
296
+ if (!u) return null;
297
+ const v = a.groups.find((m) => m.groupCode === u);
298
+ return v ? v.name : u;
299
+ },
300
+ [a.groups]
301
+ ), ve = Y(() => {
302
+ const u = /* @__PURE__ */ new Map();
303
+ for (const v of a.products) {
304
+ const m = v.groupCode ?? null;
305
+ u.has(m) || u.set(m, []), u.get(m).push(v);
306
+ }
307
+ return [...u.entries()].sort((v, m) => v[0] === null ? 1 : m[0] === null ? -1 : String(I(v[0])).localeCompare(String(I(m[0])), "zh"));
308
+ }, [a.products, I]), X = _(
309
+ (u) => a.appBindings.filter((v) => v.productCode === u),
310
+ [a.appBindings]
311
+ ), U = _(
312
+ (u) => a.relations.filter((v) => v.productCode === u),
313
+ [a.relations]
314
+ ), C = _(
315
+ (u) => {
316
+ const v = a.products.find((m) => m.productCode === u);
317
+ return v ? v.name : u;
318
+ },
319
+ [a.products]
320
+ ), M = _(async () => {
321
+ if (!d || !l || d === l) return;
322
+ const u = await en({
323
+ productCode: d,
324
+ relatedCode: l,
325
+ relationType: T,
326
+ description: `${C(d)} ${c[T] ?? T} ${C(l)}`
327
+ });
328
+ u && (s((v) => ({ ...v, relations: [...v.relations, u] })), H(null), D(null));
329
+ }, [d, l, T, c, C]), E = Y(
330
+ () => a.products.map((u) => ({
331
+ value: u.productCode,
332
+ label: `${u.name}(${u.productCode})`
333
+ })),
334
+ [a.products]
335
+ );
336
+ return /* @__PURE__ */ i("div", { className: h.container, children: [
337
+ /* @__PURE__ */ i("div", { className: h.header, children: [
338
+ /* @__PURE__ */ i("div", { children: [
339
+ /* @__PURE__ */ n("h2", { className: h.title, children: "架构全景" }),
340
+ /* @__PURE__ */ n("p", { className: h.subtitle, children: "租户下所有产品整顿成一张架构图:产品群 · 产品↔产品关系 · 挂接的中间件/应用" })
341
+ ] }),
342
+ /* @__PURE__ */ i("div", { className: h.actions, children: [
343
+ /* @__PURE__ */ i("span", { className: h.stats, children: [
344
+ /* @__PURE__ */ n("b", { children: a.products.length }),
345
+ " 产品",
346
+ /* @__PURE__ */ n("b", { children: a.groups.length }),
347
+ " 群",
348
+ /* @__PURE__ */ n("b", { children: a.relations.length }),
349
+ " 关系",
350
+ /* @__PURE__ */ n("b", { children: a.appBindings.filter((u) => u.appType === "INFRA").length }),
351
+ " 基建"
352
+ ] }),
353
+ /* @__PURE__ */ n(Q, { size: "small", icon: /* @__PURE__ */ n(gt, {}), onClick: () => void $(), children: "刷新" })
354
+ ] })
355
+ ] }),
356
+ /* @__PURE__ */ i("div", { className: h.relForm, children: [
357
+ /* @__PURE__ */ n("span", { className: h.relFormLabel, children: "新建产品关系:" }),
358
+ /* @__PURE__ */ n(
359
+ Pe,
360
+ {
361
+ size: "small",
362
+ placeholder: "起点产品",
363
+ value: d,
364
+ onChange: H,
365
+ options: E,
366
+ style: { width: 200 },
367
+ showSearch: !0,
368
+ optionFilterProp: "label"
369
+ }
370
+ ),
371
+ /* @__PURE__ */ n(
372
+ Pe,
373
+ {
374
+ size: "small",
375
+ placeholder: "关系类型",
376
+ value: T,
377
+ onChange: (u) => Z(u),
378
+ style: { width: 130 },
379
+ options: Object.entries(c).map(([u, v]) => ({ value: u, label: v }))
380
+ }
381
+ ),
382
+ /* @__PURE__ */ n(
383
+ Pe,
384
+ {
385
+ size: "small",
386
+ placeholder: "终点产品",
387
+ value: l,
388
+ onChange: D,
389
+ options: E,
390
+ style: { width: 200 },
391
+ showSearch: !0,
392
+ optionFilterProp: "label"
393
+ }
394
+ ),
395
+ /* @__PURE__ */ n(
396
+ Q,
397
+ {
398
+ size: "small",
399
+ type: "primary",
400
+ onClick: () => void M(),
401
+ disabled: !d || !l || d === l,
402
+ children: "建立关系"
403
+ }
404
+ )
405
+ ] }),
406
+ g ? /* @__PURE__ */ n("div", { className: h.centerFill, children: /* @__PURE__ */ n(he, {}) }) : a.products.length === 0 ? /* @__PURE__ */ n("div", { className: h.centerFill, children: /* @__PURE__ */ n(f, { image: f.PRESENTED_IMAGE_SIMPLE, description: "暂无产品,先在产品库创建" }) }) : /* @__PURE__ */ n("div", { className: h.groups, children: ve.map(([u, v]) => /* @__PURE__ */ i("div", { className: h.groupBlock, children: [
407
+ /* @__PURE__ */ i("div", { className: h.groupHeader, children: [
408
+ /* @__PURE__ */ n("span", { className: h.groupName, children: I(u) ? `📦 ${I(u)}` : "🗂 未分组" }),
409
+ /* @__PURE__ */ i("span", { className: h.groupCount, children: [
410
+ v.length,
411
+ " 个产品"
412
+ ] })
413
+ ] }),
414
+ /* @__PURE__ */ n("div", { className: h.productGrid, children: v.map((m) => {
415
+ const ee = X(m.productCode ?? ""), x = U(m.productCode ?? "");
416
+ return /* @__PURE__ */ i("div", { className: h.productCard, children: [
417
+ /* @__PURE__ */ i("div", { className: h.cardHead, children: [
418
+ /* @__PURE__ */ n("span", { className: h.cardName, title: m.name, children: m.name }),
419
+ m.status && /* @__PURE__ */ n(k, { className: h.cardTag, children: m.status })
420
+ ] }),
421
+ /* @__PURE__ */ n("div", { className: h.cardCode, children: m.productCode }),
422
+ m.description && /* @__PURE__ */ n("div", { className: h.cardDesc, title: m.description, children: m.description }),
423
+ ee.length > 0 && /* @__PURE__ */ i("div", { className: h.cardSection, children: [
424
+ /* @__PURE__ */ n("div", { className: h.sectionLabel, children: "挂接" }),
425
+ /* @__PURE__ */ n("div", { className: h.bindList, children: ee.map((N) => /* @__PURE__ */ i(
426
+ k,
427
+ {
428
+ className: h.bindTag,
429
+ color: N.appType === "INFRA" ? "purple" : "geekblue",
430
+ children: [
431
+ N.appType === "INFRA" ? "🏗" : "🧩",
432
+ " ",
433
+ N.appName
434
+ ]
435
+ },
436
+ N.id
437
+ )) })
438
+ ] }),
439
+ x.length > 0 && /* @__PURE__ */ i("div", { className: h.cardSection, children: [
440
+ /* @__PURE__ */ n("div", { className: h.sectionLabel, children: "关系" }),
441
+ /* @__PURE__ */ n("div", { className: h.relList, children: x.map((N) => /* @__PURE__ */ i("div", { className: h.relRow, children: [
442
+ /* @__PURE__ */ n(
443
+ k,
444
+ {
445
+ className: h.relTag,
446
+ color: N.relationType === "DEPENDS_ON" ? "orange" : N.relationType === "BUILT_ON" ? "cyan" : "blue",
447
+ children: c[N.relationType] ?? N.relationType
448
+ }
449
+ ),
450
+ /* @__PURE__ */ n("span", { className: h.relTarget, title: C(N.relatedCode), children: C(N.relatedCode) }),
451
+ /* @__PURE__ */ n(
452
+ "button",
453
+ {
454
+ type: "button",
455
+ className: h.relDel,
456
+ onClick: async () => {
457
+ await tn(N.id), s((G) => ({
458
+ ...G,
459
+ relations: G.relations.filter((z) => z.id !== N.id)
460
+ }));
461
+ },
462
+ title: "删除关系",
463
+ children: "✕"
464
+ }
465
+ )
466
+ ] }, N.id)) })
467
+ ] })
468
+ ] }, m.productCode);
469
+ }) })
470
+ ] }, u ?? "__none__")) })
471
+ ] });
472
+ }
473
+ const $n = "_container_1n33v_5", Fn = "_libraryView_1n33v_14", On = "_libraryHeader_1n33v_22", jn = "_libraryHeadRow_1n33v_32", qn = "_libraryTitle_1n33v_40", Hn = "_librarySubtitle_1n33v_47", Dn = "_librarySearch_1n33v_53", Un = "_libraryBody_1n33v_58", Mn = "_productGrid_1n33v_65", xn = "_productCard_1n33v_71", zn = "_cardCode_1n33v_91", Kn = "_cardName_1n33v_104", Vn = "_cardDesc_1n33v_113", Jn = "_cardFoot_1n33v_124", Wn = "_cardEnter_1n33v_132", Qn = "_cardTag_1n33v_140", Yn = "_left_1n33v_146", Zn = "_leftHeader_1n33v_156", Xn = "_leftTitleRow_1n33v_162", ea = "_leftTitle_1n33v_162", ta = "_backBtn_1n33v_179", na = "_sectionBar_1n33v_209", aa = "_sectionTab_1n33v_219", ia = "_sectionTabActive_1n33v_241", ca = "_sectionIcon_1n33v_248", ra = "_leftBody_1n33v_253", sa = "_fileList_1n33v_264", oa = "_fileTreeHint_1n33v_303", la = "_fileRow_1n33v_309", da = "_fileRowActive_1n33v_323", pa = "_fileRowIcon_1n33v_327", ua = "_fileRowName_1n33v_332", ha = "_fileKindTag_1n33v_341", ma = "_center_1n33v_349", va = "_centerFill_1n33v_358", _a = "_renderArea_1n33v_413", ga = "_renderIframe_1n33v_423", Na = "_renderCode_1n33v_429", ya = "_right_1n33v_442", fa = "_chatSide_1n33v_453", wa = "_chatSideHeader_1n33v_459", ba = "_chatSideTitle_1n33v_468", Ta = "_chatGroupList_1n33v_477", Ca = "_chatGroupRow_1n33v_486", Sa = "_chatGroupRowActive_1n33v_500", Ra = "_chatGroupName_1n33v_504", Pa = "_chatGroupTime_1n33v_513", Aa = "_chatPane_1n33v_520", ka = "_chatPaneHeader_1n33v_526", Ia = "_chatPaneTitle_1n33v_535", Ea = "_chatPaneBody_1n33v_544", La = "_groupChips_1n33v_555", Ga = "_groupChip_1n33v_555", Ba = "_groupChipActive_1n33v_578", $a = "_groupNewBtn_1n33v_589", Fa = "_cardGroup_1n33v_604", Oa = "_overviewArea_1n33v_614", ja = "_overviewHeader_1n33v_619", qa = "_overviewTitle_1n33v_623", Ha = "_overviewSubtitle_1n33v_630", Da = "_overviewTabs_1n33v_636", Ua = "_overviewTab_1n33v_636", Ma = "_overviewTabActive_1n33v_659", xa = "_overviewPanel_1n33v_669", za = "_reqForm_1n33v_677", Ka = "_reqList_1n33v_683", Va = "_reqRow_1n33v_689", Ja = "_reqTitle_1n33v_698", Wa = "_reqTag_1n33v_707", Qa = "_reqStatusTag_1n33v_713", Ya = "_reqTime_1n33v_726", Za = "_appForm_1n33v_733", Xa = "_appTypeSelect_1n33v_740", ei = "_appList_1n33v_751", ti = "_appRow_1n33v_757", ni = "_appIcon_1n33v_766", ai = "_appName_1n33v_771", ii = "_appCode_1n33v_781", ci = "_appTag_1n33v_787", ri = "_appGo_1n33v_793", si = "_appInfraNote_1n33v_808", oi = "_appUnbind_1n33v_814", li = "_statsRow_1n33v_831", di = "_statItem_1n33v_842", pi = "_domainBlock_1n33v_856", ui = "_domainBlockTitle_1n33v_864", hi = "_domainEmpty_1n33v_871", mi = "_domainList_1n33v_879", vi = "_domainRow_1n33v_885", _i = "_domainName_1n33v_894", gi = "_domainDesc_1n33v_908", Ni = "_designHint_1n33v_919", yi = "_designList_1n33v_928", fi = "_designRow_1n33v_934", wi = "_designIcon_1n33v_943", bi = "_designName_1n33v_948", Ti = "_designTime_1n33v_958", Ci = "_overviewEntryBtn_1n33v_965", t = {
474
+ container: $n,
475
+ libraryView: Fn,
476
+ libraryHeader: On,
477
+ libraryHeadRow: jn,
478
+ libraryTitle: qn,
479
+ librarySubtitle: Hn,
480
+ librarySearch: Dn,
481
+ libraryBody: Un,
482
+ productGrid: Mn,
483
+ productCard: xn,
484
+ cardCode: zn,
485
+ cardName: Kn,
486
+ cardDesc: Vn,
487
+ cardFoot: Jn,
488
+ cardEnter: Wn,
489
+ cardTag: Qn,
490
+ left: Yn,
491
+ leftHeader: Zn,
492
+ leftTitleRow: Xn,
493
+ leftTitle: ea,
494
+ backBtn: ta,
495
+ sectionBar: na,
496
+ sectionTab: aa,
497
+ sectionTabActive: ia,
498
+ sectionIcon: ca,
499
+ leftBody: ra,
500
+ fileList: sa,
501
+ fileTreeHint: oa,
502
+ fileRow: la,
503
+ fileRowActive: da,
504
+ fileRowIcon: pa,
505
+ fileRowName: ua,
506
+ fileKindTag: ha,
507
+ center: ma,
508
+ centerFill: va,
509
+ renderArea: _a,
510
+ renderIframe: ga,
511
+ renderCode: Na,
512
+ right: ya,
513
+ chatSide: fa,
514
+ chatSideHeader: wa,
515
+ chatSideTitle: ba,
516
+ chatGroupList: Ta,
517
+ chatGroupRow: Ca,
518
+ chatGroupRowActive: Sa,
519
+ chatGroupName: Ra,
520
+ chatGroupTime: Pa,
521
+ chatPane: Aa,
522
+ chatPaneHeader: ka,
523
+ chatPaneTitle: Ia,
524
+ chatPaneBody: Ea,
525
+ groupChips: La,
526
+ groupChip: Ga,
527
+ groupChipActive: Ba,
528
+ groupNewBtn: $a,
529
+ cardGroup: Fa,
530
+ overviewArea: Oa,
531
+ overviewHeader: ja,
532
+ overviewTitle: qa,
533
+ overviewSubtitle: Ha,
534
+ overviewTabs: Da,
535
+ overviewTab: Ua,
536
+ overviewTabActive: Ma,
537
+ overviewPanel: xa,
538
+ reqForm: za,
539
+ reqList: Ka,
540
+ reqRow: Va,
541
+ reqTitle: Ja,
542
+ reqTag: Wa,
543
+ reqStatusTag: Qa,
544
+ reqTime: Ya,
545
+ appForm: Za,
546
+ appTypeSelect: Xa,
547
+ appList: ei,
548
+ appRow: ti,
549
+ appIcon: ni,
550
+ appName: ai,
551
+ appCode: ii,
552
+ appTag: ci,
553
+ appGo: ri,
554
+ appInfraNote: si,
555
+ appUnbind: oi,
556
+ statsRow: li,
557
+ statItem: di,
558
+ domainBlock: pi,
559
+ domainBlockTitle: ui,
560
+ domainEmpty: hi,
561
+ domainList: mi,
562
+ domainRow: vi,
563
+ domainName: _i,
564
+ domainDesc: gi,
565
+ designHint: Ni,
566
+ designList: yi,
567
+ designRow: fi,
568
+ designIcon: wi,
569
+ designName: bi,
570
+ designTime: Ti,
571
+ overviewEntryBtn: Ci
572
+ };
573
+ function Si(a) {
574
+ return {
575
+ id: String(a.id),
576
+ name: a.name,
577
+ description: a.description ?? "",
578
+ workspace_path: a.workspacePath || a.name,
579
+ status: a.status,
580
+ created_at: a.createTime ?? "",
581
+ scenario_id: String(a.id),
582
+ scenario_code: a.scenarioCode,
583
+ scenario_name: a.scenarioName ?? a.name
584
+ };
585
+ }
586
+ const Ri = [
587
+ {
588
+ title: "产品域",
589
+ icon: /* @__PURE__ */ n(Me, {}),
590
+ items: [
591
+ { key: "prod-library", label: "产品库", icon: /* @__PURE__ */ n(Me, {}) },
592
+ {
593
+ key: "prod-architecture",
594
+ label: "架构全景",
595
+ icon: /* @__PURE__ */ n(bt, {}),
596
+ title: "租户下所有产品的架构关系(产品↔产品、产品↔中间件)"
597
+ }
598
+ ]
599
+ },
600
+ {
601
+ title: "产品工作台",
602
+ icon: /* @__PURE__ */ n(Tt, {}),
603
+ items: Rt.map((a) => ({
604
+ key: a.key,
605
+ label: a.label,
606
+ icon: a.icon,
607
+ path: a.key
608
+ }))
609
+ }
610
+ ];
611
+ function ze(a) {
612
+ const s = a.toLowerCase();
613
+ return /\.(html?|png|jpe?g|webp|svg|pdf)$/.test(s) ? "design" : /\.(md|markdown|txt|docx?)$/.test(s) ? "doc" : /\.(js|ts|tsx|jsx|java|py|json|yml|yaml|sql|css|vue|go|rs)$/.test(s) ? "code" : "other";
614
+ }
615
+ function Ke(a, s = "") {
616
+ const c = [];
617
+ for (const o of a ?? []) {
618
+ const g = o.path || `${s}${o.name ?? ""}`, L = o.name || g.split("/").pop() || g, d = o.type === "dir" || Array.isArray(o.children);
619
+ c.push({ path: g, name: L, dir: d, kind: ze(g), depth: s.split("/").filter(Boolean).length }), d && Array.isArray(o.children) && c.push(...Ke(o.children, `${g}/`));
620
+ }
621
+ return c;
622
+ }
623
+ function Oi() {
624
+ const a = B((e) => e.token), s = B((e) => e.selectProject), [c, o] = p([]), [g, L] = p(!0), [d, H] = p(null), [l, D] = p(null), [T, Z] = p(!1), [$, I] = p([]), [ve, X] = p(!1), [U, C] = p(null), [M, E] = p(null), [u, v] = p("other"), [m, ee] = p(""), [x, N] = p("library"), [G, z] = p([]), [Ae, _e] = p(null), [te, ke] = p(!1), [Ve, ne] = p("list"), R = St(null), [ge, Ie] = p([]), [K, Ee] = p(null), [ae, Ne] = p([]), [ie, ye] = p([]), [P, F] = p("req"), [V, Le] = p(""), [ce, Je] = p([]), [re, We] = p([]), [se, Qe] = p([]), [oe, Ye] = p([]), [le, Ze] = p([]), [Ge, Xe] = p([]), fe = _(
625
+ async (e) => {
626
+ H(e), Z(!0), C(null), E(null), ne("list"), _e(null), F("req");
627
+ const r = await Bt(e);
628
+ D(r);
629
+ const y = await jt(e, a);
630
+ z(y);
631
+ const S = await Ut(e);
632
+ Ne(S);
633
+ const ue = await xt(e);
634
+ ye(ue);
635
+ const [Re, J, pt, ut, ht, mt] = await Promise.all([
636
+ Kt(e),
637
+ Vt(e),
638
+ Jt(e),
639
+ Wt(e),
640
+ Qt(e),
641
+ Yt(e)
642
+ ]);
643
+ Je(Re), We(J), Qe(pt), Ye(ut), Ze(ht), Xe(mt), X(!0);
644
+ const vt = await $t(e);
645
+ I(vt), X(!1);
646
+ },
647
+ [a]
648
+ ), Be = _(async () => {
649
+ L(!0);
650
+ try {
651
+ const e = await Gt();
652
+ o(e);
653
+ const r = await Ht();
654
+ Ie(r);
655
+ try {
656
+ const y = new URLSearchParams(window.location.search).get("product");
657
+ if (y) {
658
+ const S = e.find((ue) => ue.productCode === y);
659
+ if (S) {
660
+ fe(S.productCode);
661
+ return;
662
+ }
663
+ }
664
+ } catch {
665
+ }
666
+ } catch {
667
+ o([]);
668
+ } finally {
669
+ L(!1);
670
+ }
671
+ }, [fe]);
672
+ me(() => {
673
+ Be();
674
+ }, [Be]);
675
+ const et = _(() => {
676
+ if (!d) return;
677
+ const e = new URLSearchParams();
678
+ e.set("product", d), l != null && l.name && e.set("productName", l.name), W.push(`/lc/apps?${e.toString()}`);
679
+ }, [d, l == null ? void 0 : l.name]), tt = _(() => {
680
+ if (!d) return;
681
+ const e = new URLSearchParams();
682
+ e.set("product", d), l != null && l.name && e.set("productName", l.name), W.push(`/test/qa/dashboard?${e.toString()}`);
683
+ }, [d, l == null ? void 0 : l.name]), we = _(() => {
684
+ H(null), Z(!1), D(null), I([]), z([]), C(null), E(null), _e(null), ne("list"), R.current !== void 0 && B.setState({ currentProject: R.current }), R.current = void 0;
685
+ }, []);
686
+ me(() => {
687
+ new URLSearchParams(window.location.search).get("view") === "architecture" && N("architecture");
688
+ }, []);
689
+ const $e = _(
690
+ (e) => {
691
+ T && we(), N(e);
692
+ const r = new URL(window.location.href);
693
+ r.searchParams.set("view", e), W.replace(`${r.pathname}${r.search}${r.hash}`);
694
+ },
695
+ [T, we]
696
+ ), Fe = _((e) => {
697
+ W.push(e);
698
+ }, []), Oe = T ? null : x === "architecture" ? "prod-architecture" : "prod-library", je = _(
699
+ (e, r) => {
700
+ e === "产品域" ? $e(r.key === "prod-architecture" ? "architecture" : "library") : r.path && Fe(r.path);
701
+ },
702
+ [$e, Fe]
703
+ ), nt = Y(
704
+ () => Ri.map((e) => ({
705
+ key: e.title,
706
+ title: e.title,
707
+ items: e.items.map((r) => ({
708
+ key: r.key,
709
+ label: r.label,
710
+ icon: r.icon,
711
+ title: r.title,
712
+ active: Oe === r.key,
713
+ onClick: () => je(e.title, r)
714
+ }))
715
+ })),
716
+ [Oe, je]
717
+ ), qe = _(async () => {
718
+ if (!d || !V.trim()) return;
719
+ const e = await zt(d, {
720
+ title: V.trim(),
721
+ priority: "P2"
722
+ });
723
+ e && (ye((r) => [...r, e]), Le(""));
724
+ }, [d, V]), at = ["OPEN", "IN_PROGRESS", "DONE", "CLOSED"], [de] = p(at), it = _(
725
+ async (e) => {
726
+ if (!d || e.id == null) return;
727
+ const r = String(e.status ?? "OPEN"), y = de.indexOf(r), S = de[(y + 1) % de.length];
728
+ await nn(d, { id: e.id, status: S }) && ye((Re) => Re.map((J) => J.id === e.id ? { ...J, status: S } : J));
729
+ },
730
+ [d, de]
731
+ ), [A, pe] = p({
732
+ appCode: "",
733
+ appName: "",
734
+ appType: "APP"
735
+ }), ct = _(async () => {
736
+ if (!d || !A.appCode.trim() || !A.appName.trim()) return;
737
+ const e = await Mt(d, A);
738
+ e && (Ne((r) => [...r, e]), pe({ appCode: "", appName: "", appType: "APP" }));
739
+ }, [d, A]), rt = _(
740
+ async (e) => {
741
+ d && (await unbindProductApp(d, e), Ne((r) => r.filter((y) => y.id !== e)));
742
+ },
743
+ [d]
744
+ ), [O, be] = p({ groupCode: "", name: "" }), [st, Te] = p(!1), He = _(async () => {
745
+ if (!O.groupCode.trim() || !O.name.trim()) return !1;
746
+ const e = await Dt(O);
747
+ return e ? (Ie((r) => [...r, e]), be({ groupCode: "", name: "" }), !0) : !1;
748
+ }, [O]), ot = _(async () => {
749
+ await He() && Te(!1);
750
+ }, [He]), lt = _(
751
+ async (e) => {
752
+ if (!d) return;
753
+ C(e), E(null);
754
+ const r = ze(e);
755
+ v(r);
756
+ const y = await Ft(d, e);
757
+ E(y ?? "");
758
+ },
759
+ [d]
760
+ ), Ce = _(
761
+ async (e) => {
762
+ if (!e) return;
763
+ const r = Si(e);
764
+ R.current = B.getState().currentProject, _e(e.id), ne("chat"), s(r);
765
+ },
766
+ [s]
767
+ ), dt = _(async () => {
768
+ if (!(!d || te)) {
769
+ ke(!0);
770
+ try {
771
+ const e = await qt(
772
+ d,
773
+ `${(l == null ? void 0 : l.name) || d} · 讨论组 ${G.length + 1}`,
774
+ a
775
+ );
776
+ z((r) => [...r, e]), await Ce(e);
777
+ } finally {
778
+ ke(!1);
779
+ }
780
+ }
781
+ }, [d, te, G.length, l == null ? void 0 : l.name, a, Ce]);
782
+ me(() => () => {
783
+ R.current !== void 0 && B.setState({ currentProject: R.current });
784
+ }, [Ae]);
785
+ const Se = Y(() => Ke($), [$]), De = Y(
786
+ () => c.filter((e) => !(m && !e.name.includes(m) && !e.productCode.includes(m) || K && e.groupCode !== K)),
787
+ [c, m, K]
788
+ ), Ue = _(
789
+ (e) => {
790
+ if (!e) return null;
791
+ const r = ge.find((y) => y.groupCode === e);
792
+ return r ? r.name : e;
793
+ },
794
+ [ge]
795
+ );
796
+ return /* @__PURE__ */ i("div", { className: t.container, children: [
797
+ /* @__PURE__ */ n(It, { title: "产品", width: 220, storageKey: "ft_product_sidebar_collapsed", children: /* @__PURE__ */ n(Et, { groups: nt, defaultCollapsed: !0 }) }),
798
+ T ? /* @__PURE__ */ i(_t, { children: [
799
+ /* @__PURE__ */ i("aside", { className: t.left, children: [
800
+ /* @__PURE__ */ i("div", { className: t.leftHeader, children: [
801
+ /* @__PURE__ */ i("div", { className: t.leftTitleRow, children: [
802
+ /* @__PURE__ */ n("button", { type: "button", className: t.backBtn, onClick: we, title: "返回产品库", children: "←" }),
803
+ /* @__PURE__ */ n("span", { className: t.leftTitle, title: (l == null ? void 0 : l.name) || d || "", children: (l == null ? void 0 : l.name) || d })
804
+ ] }),
805
+ /* @__PURE__ */ i("div", { className: t.sectionBar, children: [
806
+ /* @__PURE__ */ i("span", { className: `${t.sectionTab} ${t.sectionTabActive}`, children: [
807
+ /* @__PURE__ */ n("span", { className: t.sectionIcon, children: "📦" }),
808
+ " 产品"
809
+ ] }),
810
+ /* @__PURE__ */ i("button", { type: "button", className: t.sectionTab, onClick: et, title: "进入研发工作台(z-lc)", children: [
811
+ /* @__PURE__ */ n("span", { className: t.sectionIcon, children: "💻" }),
812
+ " 研发"
813
+ ] }),
814
+ /* @__PURE__ */ i("button", { type: "button", className: t.sectionTab, onClick: tt, title: "进入测试工作台(QA)", children: [
815
+ /* @__PURE__ */ n("span", { className: t.sectionIcon, children: "🧪" }),
816
+ " 测试"
817
+ ] })
818
+ ] })
819
+ ] }),
820
+ /* @__PURE__ */ i("div", { className: t.leftBody, children: [
821
+ /* @__PURE__ */ n(
822
+ "button",
823
+ {
824
+ type: "button",
825
+ className: t.overviewEntryBtn,
826
+ onClick: () => {
827
+ C(null), E(null);
828
+ },
829
+ title: "回到产品总览(沉淀台)",
830
+ children: "📋 产品总览 · 返回沉淀台"
831
+ }
832
+ ),
833
+ /* @__PURE__ */ n("div", { className: t.fileTreeHint, children: "文件(设计稿 · 文档 · 产物)" }),
834
+ ve ? /* @__PURE__ */ n("div", { className: t.centerFill, children: /* @__PURE__ */ n(he, { size: "small" }) }) : Se.length === 0 ? /* @__PURE__ */ n(f, { image: f.PRESENTED_IMAGE_SIMPLE, description: "产品下暂无文件" }) : /* @__PURE__ */ n("div", { className: t.fileList, children: Se.map((e) => /* @__PURE__ */ i(
835
+ "div",
836
+ {
837
+ className: `${t.fileRow} ${U === e.path ? t.fileRowActive : ""}`,
838
+ style: { paddingLeft: 12 + e.depth * 16 },
839
+ onClick: () => !e.dir && lt(e.path),
840
+ children: [
841
+ /* @__PURE__ */ n("span", { className: t.fileRowIcon, children: e.dir ? "📁" : e.kind === "design" ? "🖼" : e.kind === "doc" ? "📄" : e.kind === "code" ? "{" : "◦" }),
842
+ /* @__PURE__ */ n("span", { className: t.fileRowName, children: e.name }),
843
+ e.kind === "design" && /* @__PURE__ */ n(k, { className: t.fileKindTag, color: "blue", children: "设计稿" })
844
+ ]
845
+ },
846
+ e.path
847
+ )) })
848
+ ] })
849
+ ] }),
850
+ /* @__PURE__ */ n("main", { className: t.center, children: U == null ? /* @__PURE__ */ i("div", { className: t.overviewArea, children: [
851
+ /* @__PURE__ */ i("div", { className: t.overviewHeader, children: [
852
+ /* @__PURE__ */ n("h2", { className: t.overviewTitle, children: "产品总览" }),
853
+ /* @__PURE__ */ n("p", { className: t.overviewSubtitle, children: "「关于这个产品的一切」沉淀在这里:需求 · 应用群 · 领域资产 · 设计稿 · 聊天蒸馏" })
854
+ ] }),
855
+ /* @__PURE__ */ i("div", { className: t.statsRow, children: [
856
+ /* @__PURE__ */ i("span", { className: t.statItem, children: [
857
+ /* @__PURE__ */ n("b", { children: ie.length }),
858
+ " 需求"
859
+ ] }),
860
+ /* @__PURE__ */ i("span", { className: t.statItem, children: [
861
+ /* @__PURE__ */ n("b", { children: ae.length }),
862
+ " 应用"
863
+ ] }),
864
+ /* @__PURE__ */ i("span", { className: t.statItem, children: [
865
+ /* @__PURE__ */ n("b", { children: ce.length }),
866
+ " 术语"
867
+ ] }),
868
+ /* @__PURE__ */ i("span", { className: t.statItem, children: [
869
+ /* @__PURE__ */ n("b", { children: re.length }),
870
+ " 概念"
871
+ ] }),
872
+ /* @__PURE__ */ i("span", { className: t.statItem, children: [
873
+ /* @__PURE__ */ n("b", { children: se.length }),
874
+ " 专家团"
875
+ ] }),
876
+ /* @__PURE__ */ i("span", { className: t.statItem, children: [
877
+ /* @__PURE__ */ n("b", { children: oe.length }),
878
+ " 设计稿"
879
+ ] }),
880
+ /* @__PURE__ */ i("span", { className: t.statItem, children: [
881
+ /* @__PURE__ */ n("b", { children: le.length }),
882
+ " 会话"
883
+ ] }),
884
+ /* @__PURE__ */ i("span", { className: t.statItem, children: [
885
+ /* @__PURE__ */ n("b", { children: Se.filter((e) => !e.dir).length }),
886
+ " 文件"
887
+ ] })
888
+ ] }),
889
+ /* @__PURE__ */ i("div", { className: t.overviewTabs, children: [
890
+ /* @__PURE__ */ i(
891
+ "button",
892
+ {
893
+ type: "button",
894
+ className: `${t.overviewTab} ${P === "req" ? t.overviewTabActive : ""}`,
895
+ onClick: () => F("req"),
896
+ children: [
897
+ "需求(",
898
+ ie.length,
899
+ ")"
900
+ ]
901
+ }
902
+ ),
903
+ /* @__PURE__ */ i(
904
+ "button",
905
+ {
906
+ type: "button",
907
+ className: `${t.overviewTab} ${P === "apps" ? t.overviewTabActive : ""}`,
908
+ onClick: () => F("apps"),
909
+ children: [
910
+ "应用群(",
911
+ ae.length,
912
+ ")"
913
+ ]
914
+ }
915
+ ),
916
+ /* @__PURE__ */ i(
917
+ "button",
918
+ {
919
+ type: "button",
920
+ className: `${t.overviewTab} ${P === "domain" ? t.overviewTabActive : ""}`,
921
+ onClick: () => F("domain"),
922
+ children: [
923
+ "领域资产(",
924
+ ce.length + re.length + se.length,
925
+ ")"
926
+ ]
927
+ }
928
+ ),
929
+ /* @__PURE__ */ i(
930
+ "button",
931
+ {
932
+ type: "button",
933
+ className: `${t.overviewTab} ${P === "design" ? t.overviewTabActive : ""}`,
934
+ onClick: () => F("design"),
935
+ children: [
936
+ "设计稿(",
937
+ oe.length,
938
+ ")"
939
+ ]
940
+ }
941
+ ),
942
+ /* @__PURE__ */ i(
943
+ "button",
944
+ {
945
+ type: "button",
946
+ className: `${t.overviewTab} ${P === "chat" ? t.overviewTabActive : ""}`,
947
+ onClick: () => F("chat"),
948
+ children: [
949
+ "聊天蒸馏(",
950
+ le.length,
951
+ ")"
952
+ ]
953
+ }
954
+ )
955
+ ] }),
956
+ P === "req" ? /* @__PURE__ */ i("div", { className: t.overviewPanel, children: [
957
+ /* @__PURE__ */ i("div", { className: t.reqForm, children: [
958
+ /* @__PURE__ */ n(
959
+ j,
960
+ {
961
+ placeholder: "新增需求标题(针对本产品)",
962
+ value: V,
963
+ onChange: (e) => Le(e.target.value),
964
+ onPressEnter: () => void qe(),
965
+ style: { flex: 1 }
966
+ }
967
+ ),
968
+ /* @__PURE__ */ n(Q, { type: "primary", onClick: () => void qe(), disabled: !V.trim(), children: "添加需求" })
969
+ ] }),
970
+ ie.length === 0 ? /* @__PURE__ */ n(f, { image: f.PRESENTED_IMAGE_SIMPLE, description: "还没有需求,先落一条" }) : /* @__PURE__ */ n("div", { className: t.reqList, children: ie.map((e) => /* @__PURE__ */ i("div", { className: t.reqRow, children: [
971
+ /* @__PURE__ */ n("span", { className: t.reqTitle, title: e.title, children: e.title }),
972
+ /* @__PURE__ */ n(k, { className: t.reqTag, color: e.priority === "P0" ? "red" : e.priority === "P1" ? "orange" : "blue", children: e.priority || "P2" }),
973
+ /* @__PURE__ */ n(
974
+ k,
975
+ {
976
+ className: t.reqStatusTag,
977
+ onClick: () => void it(e),
978
+ title: "点击流转状态(OPEN → IN_PROGRESS → DONE → CLOSED)",
979
+ children: e.status || "OPEN"
980
+ }
981
+ ),
982
+ /* @__PURE__ */ n("span", { className: t.reqTime, children: String(e.createdAt ?? "").slice(0, 10) })
983
+ ] }, e.id)) })
984
+ ] }) : P === "apps" ? /* @__PURE__ */ i("div", { className: t.overviewPanel, children: [
985
+ /* @__PURE__ */ i("div", { className: t.appForm, children: [
986
+ /* @__PURE__ */ n(
987
+ j,
988
+ {
989
+ placeholder: "应用编码(如 z-lc 应用 code)",
990
+ value: A.appCode,
991
+ onChange: (e) => pe((r) => ({ ...r, appCode: e.target.value })),
992
+ style: { flex: 1 }
993
+ }
994
+ ),
995
+ /* @__PURE__ */ n(
996
+ j,
997
+ {
998
+ placeholder: "应用名称",
999
+ value: A.appName,
1000
+ onChange: (e) => pe((r) => ({ ...r, appName: e.target.value })),
1001
+ style: { width: 150 }
1002
+ }
1003
+ ),
1004
+ /* @__PURE__ */ i(
1005
+ "select",
1006
+ {
1007
+ className: t.appTypeSelect,
1008
+ value: A.appType,
1009
+ onChange: (e) => pe((r) => ({ ...r, appType: e.target.value })),
1010
+ children: [
1011
+ /* @__PURE__ */ n("option", { value: "APP", children: "应用" }),
1012
+ /* @__PURE__ */ n("option", { value: "INFRA", children: "基建" })
1013
+ ]
1014
+ }
1015
+ ),
1016
+ /* @__PURE__ */ n(
1017
+ Q,
1018
+ {
1019
+ type: "primary",
1020
+ onClick: () => void ct(),
1021
+ disabled: !A.appCode.trim() || !A.appName.trim(),
1022
+ children: "绑定"
1023
+ }
1024
+ )
1025
+ ] }),
1026
+ ae.length === 0 ? /* @__PURE__ */ n(f, { image: f.PRESENTED_IMAGE_SIMPLE, description: "还没有应用群,绑定支撑这个产品的应用/基建" }) : /* @__PURE__ */ n("div", { className: t.appList, children: ae.map((e) => /* @__PURE__ */ i("div", { className: t.appRow, children: [
1027
+ /* @__PURE__ */ n("span", { className: t.appIcon, children: e.appType === "INFRA" ? "🏗" : "🧩" }),
1028
+ /* @__PURE__ */ n("span", { className: t.appName, title: e.appName, children: e.appName }),
1029
+ /* @__PURE__ */ n("span", { className: t.appCode, children: e.appCode }),
1030
+ /* @__PURE__ */ n(
1031
+ k,
1032
+ {
1033
+ className: t.appTag,
1034
+ color: e.appType === "INFRA" ? "purple" : "geekblue",
1035
+ children: e.appType === "INFRA" ? "基建" : "应用"
1036
+ }
1037
+ ),
1038
+ e.appType === "APP" ? /* @__PURE__ */ n(
1039
+ "button",
1040
+ {
1041
+ type: "button",
1042
+ className: t.appGo,
1043
+ onClick: () => {
1044
+ const r = new URLSearchParams();
1045
+ r.set("product", d || ""), l != null && l.name && r.set("productName", l.name), r.set("app", e.appCode), W.push(`/lc/apps?${r.toString()}`);
1046
+ },
1047
+ children: "去研发"
1048
+ }
1049
+ ) : /* @__PURE__ */ n("span", { className: t.appInfraNote, children: "横切多产品" }),
1050
+ /* @__PURE__ */ n(
1051
+ "button",
1052
+ {
1053
+ type: "button",
1054
+ className: t.appUnbind,
1055
+ onClick: () => void rt(e.id),
1056
+ title: "解绑",
1057
+ children: "✕"
1058
+ }
1059
+ )
1060
+ ] }, e.id)) })
1061
+ ] }) : P === "domain" ? /* @__PURE__ */ i("div", { className: t.overviewPanel, children: [
1062
+ /* @__PURE__ */ i("div", { className: t.domainBlock, children: [
1063
+ /* @__PURE__ */ n("div", { className: t.domainBlockTitle, children: "📖 统一语言 · 术语" }),
1064
+ ce.length === 0 ? /* @__PURE__ */ n("div", { className: t.domainEmpty, children: "还没有术语,先在对话里对齐统一语言" }) : /* @__PURE__ */ n("div", { className: t.domainList, children: ce.map((e, r) => /* @__PURE__ */ i("div", { className: t.domainRow, children: [
1065
+ /* @__PURE__ */ n("span", { className: t.domainName, children: String(e.term ?? e.term_code ?? "") }),
1066
+ /* @__PURE__ */ n("span", { className: t.domainDesc, children: String(e.definition ?? "") })
1067
+ ] }, String(e.id ?? r))) })
1068
+ ] }),
1069
+ /* @__PURE__ */ i("div", { className: t.domainBlock, children: [
1070
+ /* @__PURE__ */ n("div", { className: t.domainBlockTitle, children: "🧬 领域概念" }),
1071
+ re.length === 0 ? /* @__PURE__ */ n("div", { className: t.domainEmpty, children: "还没有概念模型" }) : /* @__PURE__ */ n("div", { className: t.domainList, children: re.map((e, r) => /* @__PURE__ */ i("div", { className: t.domainRow, children: [
1072
+ /* @__PURE__ */ n("span", { className: t.domainName, children: String(e.name ?? e.code ?? "") }),
1073
+ /* @__PURE__ */ n("span", { className: t.domainDesc, children: String(e.description ?? "") })
1074
+ ] }, String(e.id ?? r))) })
1075
+ ] }),
1076
+ /* @__PURE__ */ i("div", { className: t.domainBlock, children: [
1077
+ /* @__PURE__ */ n("div", { className: t.domainBlockTitle, children: "🎬 用户专家团" }),
1078
+ se.length === 0 ? /* @__PURE__ */ n("div", { className: t.domainEmpty, children: "还没有专家团,描述目标用户的典型操作链路" }) : /* @__PURE__ */ n("div", { className: t.domainList, children: se.map((e, r) => /* @__PURE__ */ i("div", { className: t.domainRow, children: [
1079
+ /* @__PURE__ */ n("span", { className: t.domainName, children: String(e.title ?? e.name ?? "") }),
1080
+ /* @__PURE__ */ n("span", { className: t.domainDesc, children: String(e.description ?? "") })
1081
+ ] }, String(e.id ?? r))) })
1082
+ ] })
1083
+ ] }) : P === "design" ? /* @__PURE__ */ i("div", { className: t.overviewPanel, children: [
1084
+ /* @__PURE__ */ n("div", { className: t.designHint, children: "设计稿在左侧文件树(标注「设计稿」标签);点选后在中间渲染区直渲 raw HTML" }),
1085
+ oe.length === 0 ? /* @__PURE__ */ n(f, { image: f.PRESENTED_IMAGE_SIMPLE, description: "还没有设计稿记录" }) : /* @__PURE__ */ n("div", { className: t.designList, children: oe.map((e, r) => /* @__PURE__ */ i("div", { className: t.designRow, children: [
1086
+ /* @__PURE__ */ n("span", { className: t.designIcon, children: "🖼" }),
1087
+ /* @__PURE__ */ n("span", { className: t.designName, children: String(e.title ?? e.name ?? "") }),
1088
+ /* @__PURE__ */ n("span", { className: t.designTime, children: String(e.updated_at ?? e.created_at ?? "").slice(0, 10) })
1089
+ ] }, String(e.id ?? r))) })
1090
+ ] }) : /* @__PURE__ */ i("div", { className: t.overviewPanel, children: [
1091
+ /* @__PURE__ */ i("div", { className: t.domainBlock, children: [
1092
+ /* @__PURE__ */ n("div", { className: t.domainBlockTitle, children: "💬 群聊会话" }),
1093
+ le.length === 0 ? /* @__PURE__ */ n("div", { className: t.domainEmpty, children: "还没有群聊会话,右侧「发起聊天」开始" }) : /* @__PURE__ */ n("div", { className: t.domainList, children: le.map((e, r) => /* @__PURE__ */ i("div", { className: t.domainRow, children: [
1094
+ /* @__PURE__ */ n("span", { className: t.domainName, children: String(e.title ?? e.session_code ?? "") }),
1095
+ /* @__PURE__ */ n("span", { className: t.domainDesc, children: String(e.updated_at ?? e.created_at ?? "").slice(0, 16).replace("T", " ") })
1096
+ ] }, String(e.id ?? r))) })
1097
+ ] }),
1098
+ /* @__PURE__ */ i("div", { className: t.domainBlock, children: [
1099
+ /* @__PURE__ */ n("div", { className: t.domainBlockTitle, children: "📌 蒸馏提案" }),
1100
+ Ge.length === 0 ? /* @__PURE__ */ n("div", { className: t.domainEmpty, children: "还没有提案(聊天中沉淀的需求/设计提案会出现在这里)" }) : /* @__PURE__ */ n("div", { className: t.domainList, children: Ge.map((e, r) => {
1101
+ let y = {};
1102
+ try {
1103
+ y = JSON.parse(String(e.payload ?? "{}"));
1104
+ } catch {
1105
+ }
1106
+ const S = String(e.proposal_type ?? "requirement");
1107
+ return /* @__PURE__ */ i("div", { className: t.domainRow, children: [
1108
+ /* @__PURE__ */ i("span", { className: t.domainName, children: [
1109
+ /* @__PURE__ */ n(k, { className: t.reqTag, color: S === "design" ? "geekblue" : "blue", children: S }),
1110
+ String(y.title ?? "")
1111
+ ] }),
1112
+ /* @__PURE__ */ n("span", { className: t.domainDesc, children: String(y.description ?? "") })
1113
+ ] }, String(e.id ?? r));
1114
+ }) })
1115
+ ] })
1116
+ ] })
1117
+ ] }) : M == null ? /* @__PURE__ */ n("div", { className: t.centerFill, children: /* @__PURE__ */ n(he, {}) }) : /* @__PURE__ */ n("div", { className: t.renderArea, children: u === "design" ? (
1118
+ /* 设计稿:raw 通常为 HTML → iframe srcdoc 渲染 */
1119
+ /* @__PURE__ */ n(
1120
+ "iframe",
1121
+ {
1122
+ className: t.renderIframe,
1123
+ srcDoc: M,
1124
+ title: U,
1125
+ sandbox: "allow-scripts allow-same-origin"
1126
+ }
1127
+ )
1128
+ ) : /* @__PURE__ */ n("pre", { className: t.renderCode, children: M || "(空文件)" }) }) }),
1129
+ /* @__PURE__ */ n("aside", { className: t.right, children: Ve === "list" ? /* @__PURE__ */ i("div", { className: t.chatSide, children: [
1130
+ /* @__PURE__ */ i("div", { className: t.chatSideHeader, children: [
1131
+ /* @__PURE__ */ i("span", { className: t.chatSideTitle, children: [
1132
+ /* @__PURE__ */ n(ft, {}),
1133
+ " 聊天组"
1134
+ ] }),
1135
+ /* @__PURE__ */ i(
1136
+ Q,
1137
+ {
1138
+ size: "small",
1139
+ type: "primary",
1140
+ ghost: !0,
1141
+ loading: te,
1142
+ onClick: dt,
1143
+ children: [
1144
+ /* @__PURE__ */ n(wt, {}),
1145
+ " 发起聊天"
1146
+ ]
1147
+ }
1148
+ )
1149
+ ] }),
1150
+ /* @__PURE__ */ n("div", { className: t.chatGroupList, children: G.length === 0 ? /* @__PURE__ */ n(f, { image: f.PRESENTED_IMAGE_SIMPLE, description: "还没有聊天组,点「发起聊天」开始" }) : G.map((e) => /* @__PURE__ */ i(
1151
+ "div",
1152
+ {
1153
+ className: `${t.chatGroupRow} ${Ae === e.id ? t.chatGroupRowActive : ""}`,
1154
+ onClick: () => !te && Ce(e),
1155
+ children: [
1156
+ /* @__PURE__ */ n("span", { className: t.chatGroupName, title: e.name, children: e.name }),
1157
+ /* @__PURE__ */ n("span", { className: t.chatGroupTime, children: String(e.createTime ?? "").slice(5, 16).replace("T", " ") })
1158
+ ]
1159
+ },
1160
+ e.id
1161
+ )) })
1162
+ ] }) : /* @__PURE__ */ i("div", { className: t.chatPane, children: [
1163
+ /* @__PURE__ */ i("div", { className: t.chatPaneHeader, children: [
1164
+ /* @__PURE__ */ n(
1165
+ "button",
1166
+ {
1167
+ type: "button",
1168
+ className: t.backBtn,
1169
+ onClick: () => {
1170
+ ne("list"), R.current !== void 0 && B.setState({ currentProject: R.current }), R.current = void 0;
1171
+ },
1172
+ title: "返回聊天组列表",
1173
+ children: "←"
1174
+ }
1175
+ ),
1176
+ /* @__PURE__ */ i("span", { className: t.chatPaneTitle, children: [
1177
+ "群聊 · ",
1178
+ (l == null ? void 0 : l.name) || d
1179
+ ] })
1180
+ ] }),
1181
+ /* @__PURE__ */ n("div", { className: t.chatPaneBody, children: /* @__PURE__ */ n(Pt, { hideTabs: !0 }) })
1182
+ ] }) })
1183
+ ] }) : x === "architecture" ? (
1184
+ /* ═══ 架构全景:架构语言的表达面 ═══ */
1185
+ /* @__PURE__ */ n(Bn, {})
1186
+ ) : (
1187
+ /* ═══ 产品库视图:全宽产品卡片网格,点卡片直接进入 ═══ */
1188
+ /* @__PURE__ */ i("div", { className: t.libraryView, children: [
1189
+ /* @__PURE__ */ i("div", { className: t.libraryHeader, children: [
1190
+ /* @__PURE__ */ i("div", { className: t.libraryHeadRow, children: [
1191
+ /* @__PURE__ */ i("div", { children: [
1192
+ /* @__PURE__ */ n("h2", { className: t.libraryTitle, children: "产品库" }),
1193
+ /* @__PURE__ */ n("p", { className: t.librarySubtitle, children: "选择产品进入工作区:文件 · 设计稿 · 群聊 · 应用群" })
1194
+ ] }),
1195
+ /* @__PURE__ */ n(
1196
+ j,
1197
+ {
1198
+ prefix: /* @__PURE__ */ n(Nt, {}),
1199
+ placeholder: "搜索产品",
1200
+ value: m,
1201
+ onChange: (e) => ee(e.target.value),
1202
+ allowClear: !0,
1203
+ className: t.librarySearch
1204
+ }
1205
+ )
1206
+ ] }),
1207
+ /* @__PURE__ */ i("div", { className: t.groupChips, children: [
1208
+ /* @__PURE__ */ n(
1209
+ "button",
1210
+ {
1211
+ type: "button",
1212
+ className: `${t.groupChip} ${K === null ? t.groupChipActive : ""}`,
1213
+ onClick: () => Ee(null),
1214
+ children: "全部"
1215
+ }
1216
+ ),
1217
+ ge.map((e) => /* @__PURE__ */ n(
1218
+ "button",
1219
+ {
1220
+ type: "button",
1221
+ className: `${t.groupChip} ${K === e.groupCode ? t.groupChipActive : ""}`,
1222
+ onClick: () => Ee(e.groupCode),
1223
+ title: e.description || e.name,
1224
+ children: e.name
1225
+ },
1226
+ e.groupCode
1227
+ )),
1228
+ /* @__PURE__ */ n(
1229
+ "button",
1230
+ {
1231
+ type: "button",
1232
+ className: t.groupNewBtn,
1233
+ onClick: () => Te(!0),
1234
+ title: "新建产品群",
1235
+ children: "+ 新建产品群"
1236
+ }
1237
+ )
1238
+ ] })
1239
+ ] }),
1240
+ /* @__PURE__ */ n("div", { className: t.libraryBody, children: g ? /* @__PURE__ */ n("div", { className: t.centerFill, children: /* @__PURE__ */ n(he, {}) }) : De.length === 0 ? /* @__PURE__ */ n(f, { image: f.PRESENTED_IMAGE_SIMPLE, description: "暂无产品" }) : /* @__PURE__ */ n("div", { className: t.productGrid, children: De.map((e) => /* @__PURE__ */ i(
1241
+ "button",
1242
+ {
1243
+ type: "button",
1244
+ className: t.productCard,
1245
+ onClick: () => void fe(e.productCode),
1246
+ children: [
1247
+ /* @__PURE__ */ n("span", { className: t.cardCode, children: e.productCode }),
1248
+ /* @__PURE__ */ n("span", { className: t.cardName, title: e.name, children: e.name }),
1249
+ /* @__PURE__ */ n("span", { className: t.cardDesc, children: e.description || "暂无产品描述" }),
1250
+ /* @__PURE__ */ i("span", { className: t.cardFoot, children: [
1251
+ /* @__PURE__ */ i("span", { className: t.cardEnter, children: [
1252
+ "进入产品 ",
1253
+ /* @__PURE__ */ n(yt, {})
1254
+ ] }),
1255
+ Ue(e.groupCode) && /* @__PURE__ */ n("span", { className: t.cardGroup, children: Ue(e.groupCode) }),
1256
+ e.status && /* @__PURE__ */ n(k, { className: t.cardTag, children: e.status })
1257
+ ] })
1258
+ ]
1259
+ },
1260
+ e.productCode
1261
+ )) }) }),
1262
+ /* @__PURE__ */ n(
1263
+ Ct,
1264
+ {
1265
+ title: "新建产品群",
1266
+ open: st,
1267
+ onOk: () => void ot(),
1268
+ onCancel: () => Te(!1),
1269
+ okText: "创建",
1270
+ cancelText: "取消",
1271
+ destroyOnClose: !0,
1272
+ children: /* @__PURE__ */ i("div", { style: { display: "flex", flexDirection: "column", gap: 12, paddingTop: 8 }, children: [
1273
+ /* @__PURE__ */ n(
1274
+ j,
1275
+ {
1276
+ placeholder: "群码(唯一标识,如 ppt-studio)",
1277
+ value: O.groupCode,
1278
+ onChange: (e) => be((r) => ({ ...r, groupCode: e.target.value }))
1279
+ }
1280
+ ),
1281
+ /* @__PURE__ */ n(
1282
+ j,
1283
+ {
1284
+ placeholder: "群名(如 PPT 智造群)",
1285
+ value: O.name,
1286
+ onChange: (e) => be((r) => ({ ...r, name: e.target.value }))
1287
+ }
1288
+ )
1289
+ ] })
1290
+ }
1291
+ )
1292
+ ] })
1293
+ )
1294
+ ] });
1295
+ }
1296
+ export {
1297
+ Oi as default
1298
+ };