@yuku123/z-team-component 0.2.138 → 0.2.140

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 (52) hide show
  1. package/dist/{AdminModuleContent-9gH_G78B.js → AdminModuleContent-DDB35gOh.js} +11463 -12034
  2. package/dist/{ChangeLogView-DzFmZVBw.js → ChangeLogView-AKOZ6Ski.js} +1 -1
  3. package/dist/{ComponentDoc-KyD5wtuW.js → ComponentDoc-SiXXhka1.js} +204 -212
  4. package/dist/{InvitationManagementPage-6-0uZNuO.js → InvitationManagementPage-CRbABOKe.js} +1 -1
  5. package/dist/{OnboardingPage-tLarxnp5.js → OnboardingPage-BNJopRYO.js} +2 -2
  6. package/dist/{ScheduledTasks-QGmD7Uhz.js → ScheduledTasks-Cn_CEZ-B.js} +3104 -3141
  7. package/dist/{SystemShell-CWawiWOn.js → SystemShell-B8Tyluzu.js} +170 -162
  8. package/dist/SystemWorkbench.module-DpLM0zgA.js +36 -0
  9. package/dist/{admin-logs-DXjxD-y2.js → admin-logs-B3IxooG2.js} +1 -1
  10. package/dist/{api-Dzr8HLsU.js → api-DW8nsucC.js} +1 -1
  11. package/dist/{api-DOjASQ0k.js → api-DmBlT5MH.js} +1 -1
  12. package/dist/{createWorkspaceWsHandler-DCokPv4M.js → createWorkspaceWsHandler-5MHgQGfJ.js} +3417 -3479
  13. package/dist/{index-PJZV-bFc.js → index-BBLRGBWu.js} +1 -1
  14. package/dist/{index-4icVyiM3.js → index-BSqUODiN.js} +6 -6
  15. package/dist/{index-DXA0r7Co.js → index-BT4oQJby.js} +2 -2
  16. package/dist/{index-DC1fQH0J.js → index-BV64kKse.js} +2 -2
  17. package/dist/{index-CUOByyqy.js → index-C1nr0UeB.js} +5 -5
  18. package/dist/index-C24QsGsG.js +576 -0
  19. package/dist/{index-0AjMJyFL.js → index-C7DSDopw.js} +5 -5
  20. package/dist/{index-BdEokzAv.js → index-CEoS_jEa.js} +6 -6
  21. package/dist/{index-8VddM67M.js → index-CJ7dJejJ.js} +2 -2
  22. package/dist/{index-DZcMGMHV.js → index-CXjen4Gx.js} +292 -292
  23. package/dist/{index-CjYmL2yJ.js → index-CvHMXrAD.js} +2 -2
  24. package/dist/{index-Crzx3zh2.js → index-D-G4mbxH.js} +2 -2
  25. package/dist/{index-CLP0LnEz.js → index-D440bEgm.js} +5 -5
  26. package/dist/{index-C9NwYJh-.js → index-D7thpI99.js} +1 -1
  27. package/dist/{index-DGdtqBi4.js → index-DCAO83Wb.js} +4 -4
  28. package/dist/index-DDOfdrn4.js +9527 -0
  29. package/dist/{index-DarTFF-M.js → index-DHrMSEVJ.js} +1 -1
  30. package/dist/{index-ZqDoLUxb.js → index-DULYXalY.js} +1 -1
  31. package/dist/{index-VqKcDrn3.js → index-DjbLq5lI.js} +2 -2
  32. package/dist/{index-4NOi2xz4.js → index-Du95tdVf.js} +2 -2
  33. package/dist/{index-Cwptuq_d.js → index-DvslXAjT.js} +7 -7
  34. package/dist/{index-BHfNKXIA.js → index-Hv2KDG7i.js} +3 -3
  35. package/dist/{index-CNmSLd0s.js → index-NIu3OKHi.js} +610 -636
  36. package/dist/index-QNpTaU--.js +237 -0
  37. package/dist/{index-B75TTql4.js → index-VmRWH4U5.js} +2 -2
  38. package/dist/{index-BgdqkNkT.js → index-l9KH8r7F.js} +3 -3
  39. package/dist/index.js +1 -1
  40. package/dist/{instance-CDA6R8yG.js → instance-B4SrJ-BY.js} +1 -1
  41. package/dist/{menuPermission-LCjN8Osm.js → menuPermission-DxknHmt8.js} +3 -3
  42. package/dist/{menuTree-Ctcz41N8.js → menuTree-BjchjhUw.js} +25 -23
  43. package/dist/pages.js +1 -1
  44. package/dist/{send-default-agent-team-message-3Uyy88s_.js → send-default-agent-team-message-DYytBtLc.js} +1 -1
  45. package/dist/{sso-user-DX2FYQCh.js → sso-user-DN6kSAc0.js} +1 -1
  46. package/dist/{training-BgYM7EV-.js → training-CKYPSkUP.js} +1 -1
  47. package/dist/{webide-BsF30aLX.js → webide-JAalC_Wr.js} +213 -213
  48. package/dist/z-team-component.css +1 -1
  49. package/package.json +13 -4
  50. package/dist/SystemWorkbench.module-CZv_ruUa.js +0 -36
  51. package/dist/index-DhDdFRHC.js +0 -279
  52. package/dist/index-DxZEpsT6.js +0 -10339
@@ -0,0 +1,576 @@
1
+ import { jsxs as d, jsx as n } from "react/jsx-runtime";
2
+ import { ReloadOutlined as oe, SearchOutlined as re, ThunderboltOutlined as ie } from "@ant-design/icons";
3
+ import { message as R, Spin as ce, Space as de, Button as A, Tabs as ue, Tag as g, Input as M, Select as he, Popconfirm as me, Modal as pe } from "antd";
4
+ import { ListTable as I } from "@yuku123/z-frontend-common/ui";
5
+ import { useState as c, useCallback as P, useEffect as U, useMemo as ye } from "react";
6
+ import { a as J } from "./ComponentDoc-SiXXhka1.js";
7
+ function fe() {
8
+ return typeof window > "u" ? !1 : window.ZTEAM_USE_KAPI === !0;
9
+ }
10
+ const ge = "_msghubPage_qqxwb_1", be = "_pageHeader_qqxwb_12", we = "_pageTitle_qqxwb_19", Ce = "_tabs_qqxwb_27", _e = "_tabContent_qqxwb_38", ve = "_statsRow_qqxwb_51", Te = "_statCard_qqxwb_57", Ne = "_statValue_qqxwb_66", xe = "_statLabel_qqxwb_72", Se = "_card_qqxwb_78", Re = "_cardHeader_qqxwb_85", Ae = "_cardTitle_qqxwb_93", Ie = "_filterBar_qqxwb_103", qe = "_resizeHandle_qqxwb_112", Oe = "_payloadCell_qqxwb_133", Le = "_fromTag_qqxwb_150", Ee = "_actionTag_qqxwb_154", He = "_timeCell_qqxwb_159", Me = "_channelCell_qqxwb_165", Pe = "_jsonViewer_qqxwb_173", s = {
11
+ msghubPage: ge,
12
+ pageHeader: be,
13
+ pageTitle: we,
14
+ tabs: Ce,
15
+ tabContent: _e,
16
+ statsRow: ve,
17
+ statCard: Te,
18
+ statValue: Ne,
19
+ statLabel: xe,
20
+ card: Se,
21
+ cardHeader: Re,
22
+ cardTitle: Ae,
23
+ filterBar: Ie,
24
+ resizeHandle: qe,
25
+ payloadCell: Oe,
26
+ fromTag: Le,
27
+ actionTag: Ee,
28
+ timeCell: He,
29
+ channelCell: Me,
30
+ jsonViewer: Pe
31
+ }, G = fe() ? "/kapi/z-team-msg/msghub/api" : "/msghub-api";
32
+ async function b(o) {
33
+ const l = await (await J(`${G}${o}`, { credentials: "include" })).text().catch(() => "");
34
+ let a = null;
35
+ if (l)
36
+ try {
37
+ a = JSON.parse(l);
38
+ } catch {
39
+ a = null;
40
+ }
41
+ if (a === null) throw new Error("无响应");
42
+ if (typeof a == "object" && a !== null && typeof a.success == "boolean") {
43
+ if (a.success) return a.data;
44
+ throw new Error(a.message || a.detail || "请求失败");
45
+ }
46
+ return a;
47
+ }
48
+ async function ze(o) {
49
+ const l = await (await J(`${G}${o}`, {
50
+ method: "DELETE",
51
+ credentials: "include"
52
+ })).text().catch(() => "");
53
+ let a = null;
54
+ if (l)
55
+ try {
56
+ a = JSON.parse(l);
57
+ } catch {
58
+ a = null;
59
+ }
60
+ if (a === null) return {};
61
+ if (typeof a == "object" && typeof a.success == "boolean") {
62
+ if (a.success) return a.data;
63
+ throw new Error(a.message || a.detail || "操作失败");
64
+ }
65
+ return a;
66
+ }
67
+ function V(o) {
68
+ if (!o) return "-";
69
+ try {
70
+ const r = typeof o == "string" ? parseInt(o) : o, l = new Date(r);
71
+ return isNaN(l.getTime()) ? String(o) : l.toLocaleString("zh-CN", { hour12: !1 });
72
+ } catch {
73
+ return String(o);
74
+ }
75
+ }
76
+ const B = {
77
+ CHAT: "blue",
78
+ REASONING: "purple",
79
+ TOOL_CALL: "orange",
80
+ TOOL_RESULT: "gold",
81
+ TURN_COMPLETE: "green",
82
+ ERROR: "red",
83
+ MEMORY_COMPRESS: "default",
84
+ signal: "default",
85
+ completed: "green",
86
+ error: "red"
87
+ };
88
+ function ke(o) {
89
+ var l;
90
+ if (!o) return o;
91
+ const r = { ...o };
92
+ if ((l = r.payload) != null && l.content && typeof r.payload.content == "string")
93
+ try {
94
+ const a = r.payload.content.trim();
95
+ (a.startsWith("{") && a.endsWith("}") || a.startsWith("[") && a.endsWith("]")) && (r.payload = { ...r.payload, content: JSON.parse(a) });
96
+ } catch {
97
+ }
98
+ return r;
99
+ }
100
+ function je(o) {
101
+ return JSON.stringify(o, null, 2).replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(
102
+ /("(\\u[a-zA-Z0-9]{4}|\\[^u]|[^\\"])*"(\s*:)?|\b(true|false|null)\b|-?\d+\.?\d*([eE][+-]?\d+)?)/g,
103
+ (l) => {
104
+ let a = "json-number";
105
+ return /^"/.test(l) ? /:$/.test(l) ? a = "json-key" : a = "json-string" : /true|false/.test(l) ? a = "json-boolean" : /null/.test(l) && (a = "json-null"), `<span class="${a}">${l}</span>`;
106
+ }
107
+ );
108
+ }
109
+ function De(o) {
110
+ const { onResize: r, ...l } = o;
111
+ if (!r) return /* @__PURE__ */ n("th", { ...l });
112
+ const a = (h) => {
113
+ h.preventDefault(), h.stopPropagation();
114
+ const q = h.clientX, y = h.currentTarget.parentElement;
115
+ if (!y) return;
116
+ const O = y.getBoundingClientRect().width, w = (L) => {
117
+ const E = Math.max(60, O + L.clientX - q);
118
+ r(E);
119
+ }, C = () => {
120
+ document.removeEventListener("mousemove", w), document.removeEventListener("mouseup", C), document.body.style.cursor = "", document.body.style.userSelect = "";
121
+ };
122
+ document.addEventListener("mousemove", w), document.addEventListener("mouseup", C), document.body.style.cursor = "col-resize", document.body.style.userSelect = "none";
123
+ };
124
+ return /* @__PURE__ */ d("th", { ...l, style: { ...l.style, position: "relative" }, children: [
125
+ l.children,
126
+ /* @__PURE__ */ n("span", { onMouseDown: a, className: s.resizeHandle })
127
+ ] });
128
+ }
129
+ function Be() {
130
+ const [o, r] = c(!1), [l, a] = c({}), [h, q] = c([]), [y, O] = c(0), [w, C] = c([]), [L, E] = c([]), [X, Y] = c([]), [_, Z] = c(""), [f, z] = c(1), [v, Q] = c(20), [T, k] = c(""), [N, j] = c(""), [x, D] = c(""), [H, $] = c(null), [m, ee] = c({
131
+ timestamp: 180,
132
+ sessionId: 180,
133
+ from: 120,
134
+ action: 140,
135
+ content: 400,
136
+ fromChannel: 140,
137
+ fromRemoteAddr: 140
138
+ }), p = (e) => ((t) => {
139
+ ee((i) => ({ ...i, [e]: t }));
140
+ }), K = P(async () => {
141
+ r(!0);
142
+ try {
143
+ let e = `/messages?page=${f}&pageSize=${v}`;
144
+ _.trim() && (e += `&sessionId=${encodeURIComponent(_.trim())}`);
145
+ const t = await b(e), u = [...Array.isArray(t) ? t : (t == null ? void 0 : t.list) || []].reverse();
146
+ q(u), O(
147
+ Array.isArray(t) ? t.length : (t == null ? void 0 : t.total) ?? 0
148
+ );
149
+ } catch (e) {
150
+ R.error((e == null ? void 0 : e.message) || "加载消息失败");
151
+ } finally {
152
+ r(!1);
153
+ }
154
+ }, [f, v, _]), S = P(async () => {
155
+ r(!0);
156
+ try {
157
+ const [e, t, i, u] = await Promise.all([
158
+ b("/overview").catch(() => ({})),
159
+ b("/sessions").catch(() => []),
160
+ b("/connections").catch(() => []),
161
+ b("/stats/action").catch(() => [])
162
+ ]);
163
+ a(e || {}), C(Array.isArray(t) ? t : []), E(Array.isArray(i) ? i : []), Y(Array.isArray(u) ? u : []);
164
+ } catch (e) {
165
+ R.error((e == null ? void 0 : e.message) || "加载失败");
166
+ } finally {
167
+ r(!1);
168
+ }
169
+ }, []);
170
+ U(() => {
171
+ S();
172
+ }, []), U(() => {
173
+ K();
174
+ }, [f, v]);
175
+ const te = (e, t) => {
176
+ z(e), Q(t);
177
+ }, F = () => {
178
+ f === 1 ? K() : z(1);
179
+ }, ne = ye(() => h.filter((e) => {
180
+ var t, i, u;
181
+ return !(T.trim() && !(((t = e == null ? void 0 : e.payload) == null ? void 0 : t.from) || "").toLowerCase().includes(T.trim().toLowerCase()) || N && (((i = e == null ? void 0 : e.payload) == null ? void 0 : i.action) || "") !== N || x.trim() && !(((u = e == null ? void 0 : e.payload) == null ? void 0 : u.content) || "").toLowerCase().includes(x.trim().toLowerCase()));
182
+ }), [h, T, N, x]), ae = () => {
183
+ k(""), j(""), D("");
184
+ }, se = P(
185
+ async (e) => {
186
+ try {
187
+ await ze(`/connections/${e}`), R.success("已断开连接"), S();
188
+ } catch (t) {
189
+ R.error((t == null ? void 0 : t.message) || "操作失败");
190
+ }
191
+ },
192
+ [S]
193
+ ), le = [
194
+ {
195
+ label: "连接数",
196
+ value: l.onlineConnections ?? l.connections ?? "-"
197
+ },
198
+ { label: "路由消息", value: l.routedMessages ?? "-" },
199
+ { label: "总消息数", value: l.totalMessages ?? "-" },
200
+ { label: "活跃会话", value: l.sessionCount ?? "-" }
201
+ ];
202
+ return /* @__PURE__ */ d(ce, { spinning: o, children: [
203
+ /* @__PURE__ */ d("div", { className: s.msghubPage, children: [
204
+ /* @__PURE__ */ d("div", { className: s.pageHeader, children: [
205
+ /* @__PURE__ */ n("h3", { className: s.pageTitle, children: "MsgHub 消息监控" }),
206
+ /* @__PURE__ */ n(de, { children: /* @__PURE__ */ n(A, { icon: /* @__PURE__ */ n(oe, {}), onClick: S, children: "刷新" }) })
207
+ ] }),
208
+ /* @__PURE__ */ n(
209
+ ue,
210
+ {
211
+ className: s.tabs,
212
+ defaultActiveKey: "overview",
213
+ items: [
214
+ {
215
+ key: "overview",
216
+ label: "概览",
217
+ children: /* @__PURE__ */ d("div", { className: s.tabContent, children: [
218
+ /* @__PURE__ */ n("div", { className: s.statsRow, children: le.map((e) => /* @__PURE__ */ d("div", { className: s.statCard, children: [
219
+ /* @__PURE__ */ n("div", { className: s.statValue, children: e.value }),
220
+ /* @__PURE__ */ n("div", { className: s.statLabel, children: e.label })
221
+ ] }, e.label)) }),
222
+ /* @__PURE__ */ d("div", { className: s.card, children: [
223
+ /* @__PURE__ */ n("div", { className: s.cardHeader, children: /* @__PURE__ */ n("span", { className: s.cardTitle, children: "Action 统计" }) }),
224
+ /* @__PURE__ */ n(
225
+ I,
226
+ {
227
+ rows: X,
228
+ rowKey: (e, t) => (e == null ? void 0 : e.action) || String(t),
229
+ searchKeys: ["action"],
230
+ searchPlaceholder: "按 Action 过滤",
231
+ emptyTitle: "暂无 Action 统计",
232
+ emptyDescription: "后端还没有上报任何 action 计数。",
233
+ cardProps: { variant: "borderless", styles: { body: { padding: 0 } } },
234
+ columns: [
235
+ {
236
+ title: "Action",
237
+ dataIndex: "action",
238
+ render: (e) => /* @__PURE__ */ n(g, { color: B[e] || "default", children: e || "-" })
239
+ },
240
+ {
241
+ title: "数量",
242
+ dataIndex: "count",
243
+ width: 120,
244
+ render: (e) => /* @__PURE__ */ n("span", { style: { fontWeight: 600 }, children: e ?? 0 })
245
+ }
246
+ ]
247
+ }
248
+ )
249
+ ] })
250
+ ] })
251
+ },
252
+ {
253
+ key: "messages",
254
+ label: "消息流水",
255
+ children: /* @__PURE__ */ n("div", { className: s.tabContent, children: /* @__PURE__ */ d("div", { className: s.card, children: [
256
+ /* @__PURE__ */ d("div", { className: s.cardHeader, children: [
257
+ /* @__PURE__ */ n("span", { className: s.cardTitle, children: "消息流水" }),
258
+ /* @__PURE__ */ d("span", { style: { fontSize: 12, color: "#9ca3af" }, children: [
259
+ "共 ",
260
+ y,
261
+ " 条"
262
+ ] })
263
+ ] }),
264
+ /* @__PURE__ */ d("div", { className: s.filterBar, children: [
265
+ /* @__PURE__ */ n(
266
+ M,
267
+ {
268
+ prefix: /* @__PURE__ */ n(re, {}),
269
+ placeholder: "Session ID",
270
+ value: _,
271
+ onChange: (e) => Z(e.target.value),
272
+ onPressEnter: F,
273
+ style: { width: 180 },
274
+ allowClear: !0
275
+ }
276
+ ),
277
+ /* @__PURE__ */ n(
278
+ M,
279
+ {
280
+ placeholder: "From 来源",
281
+ value: T,
282
+ onChange: (e) => k(e.target.value),
283
+ style: { width: 140 },
284
+ allowClear: !0
285
+ }
286
+ ),
287
+ /* @__PURE__ */ n(
288
+ he,
289
+ {
290
+ placeholder: "Action",
291
+ value: N || void 0,
292
+ onChange: (e) => j(e || ""),
293
+ style: { width: 160 },
294
+ allowClear: !0,
295
+ options: [
296
+ { value: "CHAT", label: "CHAT" },
297
+ { value: "REASONING", label: "REASONING" },
298
+ { value: "TOOL_CALL", label: "TOOL_CALL" },
299
+ { value: "TOOL_RESULT", label: "TOOL_RESULT" },
300
+ { value: "TURN_COMPLETE", label: "TURN_COMPLETE" },
301
+ { value: "ERROR", label: "ERROR" },
302
+ {
303
+ value: "MEMORY_COMPRESS",
304
+ label: "MEMORY_COMPRESS"
305
+ },
306
+ { value: "signal", label: "signal" },
307
+ { value: "completed", label: "completed" },
308
+ { value: "error", label: "error" }
309
+ ]
310
+ }
311
+ ),
312
+ /* @__PURE__ */ n(
313
+ M,
314
+ {
315
+ placeholder: "内容关键词",
316
+ value: x,
317
+ onChange: (e) => D(e.target.value),
318
+ style: { width: 180 },
319
+ allowClear: !0
320
+ }
321
+ ),
322
+ /* @__PURE__ */ n(
323
+ A,
324
+ {
325
+ type: "primary",
326
+ icon: /* @__PURE__ */ n(ie, {}),
327
+ onClick: F,
328
+ children: "查询"
329
+ }
330
+ ),
331
+ /* @__PURE__ */ n(A, { onClick: ae, children: "重置" })
332
+ ] }),
333
+ /* @__PURE__ */ n(
334
+ I,
335
+ {
336
+ rows: ne,
337
+ rowKey: (e, t) => e != null && e.messageId ? `${e.messageId}-${t}` : String(t),
338
+ pagination: {
339
+ current: f,
340
+ pageSize: v,
341
+ total: y,
342
+ showSizeChanger: !0,
343
+ pageSizeOptions: ["10", "20", "50", "100"],
344
+ showTotal: (e) => `共 ${e} 条`,
345
+ onChange: te
346
+ },
347
+ tableLayout: "fixed",
348
+ scroll: { y: "calc(100vh - 400px)", x: "max-content" },
349
+ components: { header: { cell: De } },
350
+ emptyTitle: "暂无消息",
351
+ emptyDescription: "调整过滤条件或等后端上报消息后再看。",
352
+ cardProps: { variant: "borderless", styles: { body: { padding: 0 } } },
353
+ columns: [
354
+ {
355
+ title: "时间",
356
+ dataIndex: "timestamp",
357
+ key: "timestamp",
358
+ width: m.timestamp,
359
+ onHeaderCell: () => ({
360
+ onResize: p("timestamp")
361
+ }),
362
+ render: (e) => /* @__PURE__ */ n("span", { className: s.timeCell, children: V(e) })
363
+ },
364
+ {
365
+ title: "Session",
366
+ dataIndex: "sessionId",
367
+ key: "sessionId",
368
+ width: m.sessionId,
369
+ ellipsis: !0,
370
+ onHeaderCell: () => ({
371
+ onResize: p("sessionId")
372
+ }),
373
+ render: (e) => e ? /* @__PURE__ */ n(g, { color: "cyan", children: e }) : "-"
374
+ },
375
+ {
376
+ title: "From",
377
+ key: "from",
378
+ width: m.from,
379
+ onHeaderCell: () => ({
380
+ onResize: p("from")
381
+ }),
382
+ render: (e, t) => {
383
+ var i;
384
+ return (i = t == null ? void 0 : t.payload) != null && i.from ? /* @__PURE__ */ n(g, { className: s.fromTag, children: t.payload.from }) : "-";
385
+ }
386
+ },
387
+ {
388
+ title: "Action",
389
+ key: "action",
390
+ width: m.action,
391
+ onHeaderCell: () => ({
392
+ onResize: p("action")
393
+ }),
394
+ render: (e, t) => {
395
+ var u;
396
+ const i = ((u = t == null ? void 0 : t.payload) == null ? void 0 : u.action) || "";
397
+ return /* @__PURE__ */ n(
398
+ g,
399
+ {
400
+ className: s.actionTag,
401
+ color: B[i] || "default",
402
+ children: i || "-"
403
+ }
404
+ );
405
+ }
406
+ },
407
+ {
408
+ title: "内容",
409
+ key: "content",
410
+ width: m.content,
411
+ onHeaderCell: () => ({
412
+ onResize: p("content")
413
+ }),
414
+ render: (e, t) => {
415
+ var i;
416
+ return /* @__PURE__ */ n(
417
+ "span",
418
+ {
419
+ className: s.payloadCell,
420
+ onClick: () => $(t),
421
+ children: ((i = t == null ? void 0 : t.payload) == null ? void 0 : i.content) || "-"
422
+ }
423
+ );
424
+ }
425
+ },
426
+ {
427
+ title: "来源连接",
428
+ dataIndex: "fromChannel",
429
+ key: "fromChannel",
430
+ width: m.fromChannel,
431
+ onHeaderCell: () => ({
432
+ onResize: p("fromChannel")
433
+ }),
434
+ render: (e) => e ? /* @__PURE__ */ d("span", { className: s.channelCell, children: [
435
+ e.slice(0, 12),
436
+ "…"
437
+ ] }) : "-"
438
+ },
439
+ {
440
+ title: "来源地址",
441
+ dataIndex: "fromRemoteAddr",
442
+ key: "fromRemoteAddr",
443
+ width: m.fromRemoteAddr,
444
+ onHeaderCell: () => ({
445
+ onResize: p("fromRemoteAddr")
446
+ }),
447
+ render: (e) => e || "-"
448
+ }
449
+ ]
450
+ }
451
+ )
452
+ ] }) })
453
+ },
454
+ {
455
+ key: "sessions",
456
+ label: "会话管理",
457
+ children: /* @__PURE__ */ n("div", { className: s.tabContent, children: /* @__PURE__ */ d("div", { className: s.card, children: [
458
+ /* @__PURE__ */ n("div", { className: s.cardHeader, children: /* @__PURE__ */ n("span", { className: s.cardTitle, children: "会话列表" }) }),
459
+ /* @__PURE__ */ n(
460
+ I,
461
+ {
462
+ rows: w,
463
+ rowKey: (e, t) => (e == null ? void 0 : e.sessionId) || String(t),
464
+ searchKeys: ["sessionId"],
465
+ searchPlaceholder: "按 Session ID 过滤",
466
+ emptyTitle: "暂无会话",
467
+ emptyDescription: "后端还没有上报任何会话。",
468
+ cardProps: { variant: "borderless", styles: { body: { padding: 0 } } },
469
+ columns: [
470
+ {
471
+ title: "Session ID",
472
+ dataIndex: "sessionId",
473
+ ellipsis: !0,
474
+ render: (e) => /* @__PURE__ */ n(g, { color: "cyan", children: e })
475
+ },
476
+ {
477
+ title: "消息数",
478
+ dataIndex: "messageCount",
479
+ width: 100,
480
+ render: (e) => /* @__PURE__ */ n("span", { style: { fontWeight: 600 }, children: e ?? 0 })
481
+ }
482
+ ]
483
+ }
484
+ )
485
+ ] }) })
486
+ },
487
+ {
488
+ key: "connections",
489
+ label: "连接管理",
490
+ children: /* @__PURE__ */ n("div", { className: s.tabContent, children: /* @__PURE__ */ d("div", { className: s.card, children: [
491
+ /* @__PURE__ */ n("div", { className: s.cardHeader, children: /* @__PURE__ */ n("span", { className: s.cardTitle, children: "连接管理" }) }),
492
+ /* @__PURE__ */ n(
493
+ I,
494
+ {
495
+ rows: L,
496
+ rowKey: (e, t) => (e == null ? void 0 : e.channelId) || String(t),
497
+ scroll: { x: 800 },
498
+ searchKeys: ["channelId", "remoteAddr"],
499
+ searchPlaceholder: "按 Channel ID / 远程地址过滤",
500
+ emptyTitle: "暂无连接",
501
+ emptyDescription: "当前没有活跃的长连接。",
502
+ cardProps: { variant: "borderless", styles: { body: { padding: 0 } } },
503
+ columns: [
504
+ {
505
+ title: "Channel ID",
506
+ dataIndex: "channelId",
507
+ width: 200,
508
+ ellipsis: !0,
509
+ render: (e) => /* @__PURE__ */ n("span", { className: s.channelCell, children: e })
510
+ },
511
+ {
512
+ title: "远程地址",
513
+ dataIndex: "remoteAddr",
514
+ width: 160,
515
+ render: (e) => e || "-"
516
+ },
517
+ {
518
+ title: "订阅",
519
+ dataIndex: "subscriptions",
520
+ render: (e) => e ? Array.isArray(e) ? e.length : typeof e == "object" ? Object.keys(e).length : String(e) : "-"
521
+ },
522
+ {
523
+ title: "连接时间",
524
+ dataIndex: "connectedAt",
525
+ width: 180,
526
+ render: (e) => /* @__PURE__ */ n("span", { className: s.timeCell, children: V(e) })
527
+ },
528
+ {
529
+ title: "操作",
530
+ width: 100,
531
+ render: (e, t) => /* @__PURE__ */ n(
532
+ me,
533
+ {
534
+ title: "确认断开此连接?",
535
+ onConfirm: () => se(t == null ? void 0 : t.channelId),
536
+ okText: "断开",
537
+ cancelText: "取消",
538
+ children: /* @__PURE__ */ n(A, { type: "link", danger: !0, size: "small", children: "踢出" })
539
+ }
540
+ )
541
+ }
542
+ ]
543
+ }
544
+ )
545
+ ] }) })
546
+ }
547
+ ]
548
+ }
549
+ )
550
+ ] }),
551
+ /* @__PURE__ */ n(
552
+ pe,
553
+ {
554
+ title: "消息详情",
555
+ open: !!H,
556
+ onCancel: () => $(null),
557
+ footer: null,
558
+ width: 760,
559
+ bodyStyle: { maxHeight: "70vh", overflow: "auto" },
560
+ children: H && /* @__PURE__ */ n(
561
+ "pre",
562
+ {
563
+ className: s.jsonViewer,
564
+ dangerouslySetInnerHTML: {
565
+ __html: je(ke(H))
566
+ }
567
+ }
568
+ )
569
+ }
570
+ )
571
+ ] });
572
+ }
573
+ export {
574
+ Be as M,
575
+ fe as n
576
+ };
@@ -1,16 +1,16 @@
1
1
  import { jsx as t, jsxs as l } from "react/jsx-runtime";
2
2
  import { f as ie, r as q } from "./ctc-sso-DtJHC-2M.js";
3
- import { r as ne, h as X, s as oe } from "./sso-user-DX2FYQCh.js";
3
+ import { r as ne, h as X, s as oe } from "./sso-user-DN6kSAc0.js";
4
4
  import { CheckCircleFilled as le, QuestionCircleOutlined as ce, CloseOutlined as me } from "@ant-design/icons";
5
5
  import { message as P, Result as de, Button as D, Spin as G, Input as ue, Image as fe } from "antd";
6
6
  import pe from "query-string";
7
7
  import { useState as f, useRef as Y, useMemo as K, useCallback as w, useEffect as V } from "react";
8
8
  import { useLocation as ge } from "react-router-dom";
9
9
  import { h as W } from "./history-BlrA1eaW.js";
10
- import { u as c, z as he, j as be, k as _e } from "./ComponentDoc-KyD5wtuW.js";
10
+ import { u as c, z as he, j as be, k as _e } from "./ComponentDoc-SiXXhka1.js";
11
11
  /* empty css */
12
12
  import { b as ye } from "./mobile-client-O3yr9h6t.js";
13
- import { a as ve, s as we } from "./send-default-agent-team-message-3Uyy88s_.js";
13
+ import { a as ve, s as we } from "./send-default-agent-team-message-DYytBtLc.js";
14
14
  const Ne = 5e3, E = 9, Ce = 10 * 1024 * 1024, Se = /^image\//i, Ie = /\.(png|jpe?g|gif|bmp|webp)$/i;
15
15
  function ke(a) {
16
16
  return a.type && Se.test(a.type) ? !0 : Ie.test(a.name || "");
@@ -109,7 +109,7 @@ function Xe() {
109
109
  async (e, r) => {
110
110
  if (k.current)
111
111
  return;
112
- k.current = !0, R("loading"), F([]), g("正在按场景创建工程…");
112
+ k.current = !0, R("loading"), F([]), g("正在按专家团创建工程…");
113
113
  const n = e.slice(0, J), i = c.getState().token;
114
114
  try {
115
115
  let s = [];
@@ -187,7 +187,7 @@ function Xe() {
187
187
  e && (T(""), te(e, Ue(y)));
188
188
  }, O = K(() => {
189
189
  const e = _.trim().slice(0, J);
190
- return `场景 ${o}${e ? ` · ${e}` : ""}`;
190
+ return `专家团 ${o}${e ? ` · ${e}` : ""}`;
191
191
  }, [_, o]);
192
192
  if (C || j && M === "form")
193
193
  return /* @__PURE__ */ t("div", { className: "build-by-form-page", children: /* @__PURE__ */ t(
@@ -1,13 +1,13 @@
1
1
  import { jsx as n, jsxs as p, Fragment as J } from "react/jsx-runtime";
2
- import { S as An, P as Dn } from "./webide-BsF30aLX.js";
2
+ import { S as An, P as Dn } from "./webide-JAalC_Wr.js";
3
3
  import { Dropdown as en } from "antd";
4
4
  import { PlayCircleOutlined as Pn, FileTextOutlined as cn, PlusOutlined as $n, ClockCircleOutlined as jn, AppstoreOutlined as xn, UnorderedListOutlined as En, SettingOutlined as Rn } from "@ant-design/icons";
5
5
  import { useState as d, useRef as Ne, useEffect as I, useCallback as B, useMemo as L } from "react";
6
- import { u as X, o as Mn, q as Kn, t as Fn, n as z, v as Bn, w as ke, x as Hn, y as Wn } from "./ComponentDoc-KyD5wtuW.js";
7
- import { s, T as _n, R as De, D as we, f as Zn, a as Gn, F as Pe, P as Vn, L as Un, A as Qn, C as zn, b as Jn, c as Xn, p as Yn, d as qn, e as nn, g as tn, h as et, W as nt, i as tt, S as st, j as at, k as lt, l as sn, m as ot, r as it, n as ct, U as rt, o as dt, q as ut, t as pt } from "./index-DxZEpsT6.js";
8
- import { u as rn, i as ht, s as an, c as mt } from "./createWorkspaceWsHandler-DCokPv4M.js";
9
- import { h as ft, f as gt } from "./index-ZqDoLUxb.js";
10
- import { S as bt, P as yt, L as kt, a as Nt, E as wt, C as Tt, W as ln, b as on, T as vt, c as Ct } from "./ScheduledTasks-QGmD7Uhz.js";
6
+ import { u as X, o as Mn, q as Kn, t as Fn, n as z, v as Bn, w as ke, x as Hn, y as Wn } from "./ComponentDoc-SiXXhka1.js";
7
+ import { s, T as _n, R as De, D as we, f as Zn, a as Gn, F as Pe, P as Vn, L as Un, A as Qn, C as zn, b as Jn, c as Xn, p as Yn, d as qn, e as nn, g as tn, h as et, W as nt, i as tt, S as st, j as at, k as lt, l as sn, m as ot, r as it, n as ct, U as rt, o as dt, q as ut, t as pt } from "./index-DDOfdrn4.js";
8
+ import { u as rn, i as ht, s as an, c as mt } from "./createWorkspaceWsHandler-5MHgQGfJ.js";
9
+ import { h as ft, f as gt } from "./index-DULYXalY.js";
10
+ import { S as bt, P as yt, L as kt, a as Nt, E as wt, C as Tt, W as ln, b as on, T as vt, c as Ct } from "./ScheduledTasks-Cn_CEZ-B.js";
11
11
  import { TodoTab as St } from "@yuku123/z-task-component";
12
12
  const It = [
13
13
  "帮我排查一个线上问题",
@@ -1,6 +1,6 @@
1
1
  import { AppLayout as v, ErrorBoundary as V, LoginPage as _, StatusTag as j, defaultStatusMap as z } from "@yuku123/z-frontend-common";
2
- import { d as y } from "./ComponentDoc-KyD5wtuW.js";
3
- import { G as J, H as Q, I as X, M as Y, J as Z, O as $, K as ee, R as te, L as re, N as ae, Q as oe, U as ne, V as le, V as ie, W as se } from "./ComponentDoc-KyD5wtuW.js";
2
+ import { d as y } from "./ComponentDoc-SiXXhka1.js";
3
+ import { G as J, H as Q, I as X, M as Y, J as Z, O as $, K as ee, R as te, L as re, N as ae, Q as oe, U as ne, V as le, V as ie, W as se } from "./ComponentDoc-SiXXhka1.js";
4
4
  import { jsxs as r, Fragment as h, jsx as e } from "react/jsx-runtime";
5
5
  import { useState as n, useEffect as R } from "react";
6
6
  import { Alert as I, Space as x, Button as l, Tag as c, Result as T } from "antd";