@yuku123/z-team-component 0.2.138 → 0.2.139
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{AdminModuleContent-9gH_G78B.js → AdminModuleContent-B1IJbLVN.js} +11463 -12034
- package/dist/{ChangeLogView-DzFmZVBw.js → ChangeLogView-BVKf3AZn.js} +1 -1
- package/dist/{index-BHfNKXIA.js → CollabPersonalHost-BY6RqeQJ.js} +3 -3
- package/dist/{ComponentDoc-KyD5wtuW.js → ComponentDoc-BIX-e69A.js} +204 -212
- package/dist/{index-DXA0r7Co.js → DevWorkbench-BtiPE_V4.js} +2 -2
- package/dist/{InvitationManagementPage-6-0uZNuO.js → InvitationManagementPage-DRC_8AiO.js} +1 -1
- package/dist/{index-C9NwYJh-.js → KnowledgeGraphTab-BfhDEyvW.js} +1 -1
- package/dist/{index-DC1fQH0J.js → Market-C2vkBzDr.js} +2 -2
- package/dist/{OnboardingPage-tLarxnp5.js → OnboardingPage-B4GQTFCS.js} +2 -2
- package/dist/{index-DZcMGMHV.js → OpsWorkbench-D8RF2p4X.js} +292 -292
- package/dist/{index-Cwptuq_d.js → ProductWorkspace-PSO7Q9m-.js} +7 -7
- package/dist/{ScheduledTasks-QGmD7Uhz.js → ScheduledTasks-CoaHVU6e.js} +3104 -3141
- package/dist/{index-CNmSLd0s.js → SmartWorkbench-BkdfSgqx.js} +611 -638
- package/dist/{SystemShell-CWawiWOn.js → SystemShell-CANwRSyW.js} +149 -148
- package/dist/SystemWorkbench.module-DpLM0zgA.js +36 -0
- package/dist/{index-BgdqkNkT.js → TrainingAdminShell-CgnQM4Nb.js} +3 -3
- package/dist/{index-BdEokzAv.js → WorkBuddyShell-DCrPpMd5.js} +6 -6
- package/dist/{admin-logs-DXjxD-y2.js → admin-logs-DK00NEUv.js} +1 -1
- package/dist/{index-4icVyiM3.js → admin-ryysUJ9z.js} +6 -6
- package/dist/{api-DOjASQ0k.js → api-C_9xZbZr.js} +1 -1
- package/dist/{api-Dzr8HLsU.js → api-DBemNteG.js} +1 -1
- package/dist/{index-0AjMJyFL.js → build-by-form-CXxXrXvw.js} +5 -5
- package/dist/{index-DarTFF-M.js → change-log-CcmXtywx.js} +1 -1
- package/dist/{index-4NOi2xz4.js → chat-DKwMolQV.js} +2 -2
- package/dist/{index-8VddM67M.js → common-Bcnlb4nY.js} +2 -2
- package/dist/{createWorkspaceWsHandler-DCokPv4M.js → createWorkspaceWsHandler-6xyLJ14H.js} +3417 -3479
- package/dist/{index-CjYmL2yJ.js → docs-A-g6sqaE.js} +2 -2
- package/dist/{index-CUOByyqy.js → from-scenario-D8CIJLDn.js} +5 -5
- package/dist/{index-Crzx3zh2.js → from-ticket-D0oQPEf1.js} +2 -2
- package/dist/{index-DGdtqBi4.js → index-BGAG77Nt.js} +4 -4
- package/dist/index-BM6KEb8k.js +576 -0
- package/dist/{index-B75TTql4.js → index-BgCxUeRF.js} +2 -2
- package/dist/{index-ZqDoLUxb.js → index-BlfOXOZM.js} +1 -1
- package/dist/index-Bs_WMKyt.js +9527 -0
- package/dist/{index-nj-cjKsf.js → index-Dlf6mERD.js} +1950 -1910
- package/dist/index.js +1 -1
- package/dist/{instance-CDA6R8yG.js → instance-B9ZKD5cL.js} +1 -1
- package/dist/{menuPermission-LCjN8Osm.js → menuPermission-C4EVCwjs.js} +3 -3
- package/dist/{menuTree-Ctcz41N8.js → menuTree-BjchjhUw.js} +25 -23
- package/dist/pages.js +1 -1
- package/dist/{index-CLP0LnEz.js → phone-BU4g7eHI.js} +5 -5
- package/dist/portal-QNpTaU--.js +237 -0
- package/dist/{index-VqKcDrn3.js → scenario-DOpFkfNV.js} +2 -2
- package/dist/{send-default-agent-team-message-3Uyy88s_.js → send-default-agent-team-message-1L9Jv1eJ.js} +1 -1
- package/dist/{sso-user-DX2FYQCh.js → sso-user-Co71Xi9I.js} +1 -1
- package/dist/{training-BgYM7EV-.js → training-BqYfINRR.js} +1 -1
- package/dist/{webide-BsF30aLX.js → webide-AknolY0B.js} +213 -213
- package/dist/{index-PJZV-bFc.js → welcome-BBLRGBWu.js} +1 -1
- package/dist/z-team-component.css +1 -1
- package/package.json +12 -4
- package/dist/SystemWorkbench.module-CZv_ruUa.js +0 -36
- package/dist/index-DhDdFRHC.js +0 -279
- package/dist/index-DxZEpsT6.js +0 -10339
- /package/dist/{index-DrDFy5jN.js → CognitionWorkbench-DrDFy5jN.js} +0 -0
- /package/dist/{index-C815hPWS.js → chatdemo-C815hPWS.js} +0 -0
- /package/dist/{index-B_LJRFsK.js → download-B_LJRFsK.js} +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsxs as n, jsx as e } from "react/jsx-runtime";
|
|
2
2
|
import { useState as N, useRef as _, useEffect as r, useCallback as h } from "react";
|
|
3
3
|
import { h as o } from "./history-BlrA1eaW.js";
|
|
4
|
-
import { C as A } from "./ChangeLogView-
|
|
4
|
+
import { C as A } from "./ChangeLogView-BVKf3AZn.js";
|
|
5
5
|
const T = "_docs_3auja_12", p = "_bgLayer_3auja_59", v = "_bgGrid_3auja_70", y = "_navbar_3auja_87", f = "_navLeft_3auja_103", z = "_navBack_3auja_110", j = "_navBrand_3auja_132", C = "_navLogo_3auja_139", k = "_navTitle_3auja_154", L = "_navLink_3auja_164", I = "_layout_3auja_191", B = "_sidebar_3auja_202", S = "_sidebarInner_3auja_213", O = "_sidebarTitle_3auja_217", q = "_tocItem_3auja_227", P = "_tocActive_3auja_249", E = "_tocNum_3auja_260", D = "_content_3auja_275", G = "_section_3auja_285", K = "_secTitle_3auja_290", w = "_subTitle_3auja_301", M = "_lead_3auja_309", x = "_list_3auja_329", R = "_olist_3auja_360", Z = "_archLayer_3auja_397", F = "_archHead_3auja_412", W = "_archNum_3auja_420", H = "_archHeadText_3auja_432", Q = "_archLabel_3auja_439", U = "_archEn_3auja_446", V = "_archTagline_3auja_453", $ = "_callout_3auja_487", J = "_calloutBlue_3auja_488", Y = "_calloutGreen_3auja_489", X = "_calloutRed_3auja_490", ee = "_inlineCode_3auja_531", le = "_codeBlock_3auja_544", ne = "_tableWrap_3auja_560", ce = "_table_3auja_560", ae = "_tableKey_3auja_602", ie = "_tableIcon_3auja_607", te = "_statusDot_3auja_613", se = "_tone_pending_3auja_622", de = "_tone_running_3auja_626", re = "_tone_suspended_3auja_631", he = "_tone_done_3auja_636", oe = "_tone_failed_3auja_641", me = "_tone_cancelled_3auja_646", ge = "_markGood_3auja_652", ue = "_markBad_3auja_653", be = "_faqList_3auja_667", Ne = "_faqItem_3auja_673", _e = "_faqQ_3auja_687", Ae = "_faqA_3auja_694", Te = "_changelogEmbed_3auja_701", pe = "_changelogTip_3auja_709", ve = "_changelogLink_3auja_715", ye = "_docFooter_3auja_727", fe = "_backBtn_3auja_738", ze = "_docFooterText_3auja_761", l = {
|
|
6
6
|
docs: T,
|
|
7
7
|
bgLayer: p,
|
|
@@ -127,7 +127,7 @@ const T = "_docs_3auja_12", p = "_bgLayer_3auja_59", v = "_bgGrid_3auja_70", y =
|
|
|
127
127
|
en: "Middleware",
|
|
128
128
|
tagline: "数据面模块只向下打 z-util / z-boot,不互依",
|
|
129
129
|
modules: [
|
|
130
|
-
"z-util / z-cache / z-mq / z-config / z-schedule / z-
|
|
130
|
+
"z-util / z-cache / z-mq / z-config / z-schedule / z-wf",
|
|
131
131
|
"z-rpc / z-gw / z-graph / z-vector / z-kb / z-ctc / z-mist / z-msg",
|
|
132
132
|
"z-oss / z-indexer / z-observer / z-dms / z-etl"
|
|
133
133
|
]
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { jsx as r, jsxs as x } from "react/jsx-runtime";
|
|
2
2
|
import { f as z, r as T } from "./ctc-sso-DtJHC-2M.js";
|
|
3
|
-
import { r as D, h as U, s as F } from "./sso-user-
|
|
3
|
+
import { r as D, h as U, s as F } from "./sso-user-Co71Xi9I.js";
|
|
4
4
|
import { CheckCircleFilled as W } from "@ant-design/icons";
|
|
5
5
|
import { Result as B, Button as H, Spin as G } from "antd";
|
|
6
6
|
import J from "query-string";
|
|
7
7
|
import { useState as d, useRef as K, useCallback as O, useMemo as R, useEffect as E } from "react";
|
|
8
8
|
import { useLocation as Q } from "react-router-dom";
|
|
9
9
|
import { h as b } from "./history-BlrA1eaW.js";
|
|
10
|
-
import { u as s, j as V, k as X } from "./ComponentDoc-
|
|
10
|
+
import { u as s, j as V, k as X } from "./ComponentDoc-BIX-e69A.js";
|
|
11
11
|
import { b as Y } from "./mobile-client-O3yr9h6t.js";
|
|
12
|
-
import { s as Z } from "./send-default-agent-team-message-
|
|
12
|
+
import { s as Z } from "./send-default-agent-team-message-1L9Jv1eJ.js";
|
|
13
13
|
function ue() {
|
|
14
14
|
const h = Q(), f = J.parse(h.search), c = String(
|
|
15
15
|
f.scenarioCode ?? f.scenario_code ?? ""
|
|
@@ -81,7 +81,7 @@ function ue() {
|
|
|
81
81
|
!j || C.current || (C.current = !0, (async () => {
|
|
82
82
|
try {
|
|
83
83
|
const e = s.getState().token;
|
|
84
|
-
p("
|
|
84
|
+
p("正在按专家团创建工程…");
|
|
85
85
|
const t = await V(
|
|
86
86
|
{
|
|
87
87
|
name: a,
|
|
@@ -129,7 +129,7 @@ function ue() {
|
|
|
129
129
|
const N = R(() => {
|
|
130
130
|
if (n)
|
|
131
131
|
return "";
|
|
132
|
-
const e = [
|
|
132
|
+
const e = [`专家团 ${c}`, `工程 ${a}`];
|
|
133
133
|
return i && e.push("含首条协作消息"), e.join(" · ");
|
|
134
134
|
}, [i, n, a, c]);
|
|
135
135
|
return w ? /* @__PURE__ */ r("div", { className: "from-scenario-page", children: /* @__PURE__ */ r(
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { jsx as c, jsxs as _ } from "react/jsx-runtime";
|
|
2
|
-
import { e as $, u as j, t as x, p as O, g as v, h as F } from "./ComponentDoc-
|
|
2
|
+
import { e as $, u as j, t as x, p as O, g as v, h as F } from "./ComponentDoc-BIX-e69A.js";
|
|
3
3
|
import { CheckCircleFilled as b } from "@ant-design/icons";
|
|
4
4
|
import { Result as D, Button as R, Spin as U } from "antd";
|
|
5
5
|
import B from "query-string";
|
|
6
6
|
import { useMemo as y, useState as f, useRef as q, useCallback as A, useEffect as J } from "react";
|
|
7
7
|
import { useLocation as W } from "react-router-dom";
|
|
8
8
|
import { h as w } from "./history-BlrA1eaW.js";
|
|
9
|
-
import { l as Z, j as z, f as H, b as L, p as M } from "./instance-
|
|
9
|
+
import { l as Z, j as z, f as H, b as L, p as M } from "./instance-B9ZKD5cL.js";
|
|
10
10
|
import { b as N } from "./mobile-client-O3yr9h6t.js";
|
|
11
11
|
function nt() {
|
|
12
12
|
const m = W(), p = B.parse(m.search), o = String(
|
|
@@ -6,9 +6,9 @@ import { useState as F, useRef as fp, useEffect as Y, useMemo as Wp, useCallback
|
|
|
6
6
|
import Vp, { defaultUrlTransform as KA } from "react-markdown";
|
|
7
7
|
import gp from "rehype-highlight";
|
|
8
8
|
import Jp from "remark-gfm";
|
|
9
|
-
import { a5 as la, a6 as jA, u as Dp } from "./ComponentDoc-
|
|
10
|
-
import { u as xa, v as oA, x as fA, y as lA, h as xA, z as iA, B as cA, E as TA, G as vA, H as up, I as hp, J as mp, K as Yp, M as yp, O as FA, Q as dA, V as OA, X as XA } from "./index-
|
|
11
|
-
import { b as RA, d as NA, f as kA, e as WA, g as Ip, h as DA, j as qA, r as uA, k as mA, l as wA, m as BA, n as GA, o as LA, p as zA, q as VA } from "./createWorkspaceWsHandler-
|
|
9
|
+
import { a5 as la, a6 as jA, u as Dp } from "./ComponentDoc-BIX-e69A.js";
|
|
10
|
+
import { u as xa, v as oA, x as fA, y as lA, h as xA, z as iA, B as cA, E as TA, G as vA, H as up, I as hp, J as mp, K as Yp, M as yp, O as FA, Q as dA, V as OA, X as XA } from "./index-Bs_WMKyt.js";
|
|
11
|
+
import { b as RA, d as NA, f as kA, e as WA, g as Ip, h as DA, j as qA, r as uA, k as mA, l as wA, m as BA, n as GA, o as LA, p as zA, q as VA } from "./createWorkspaceWsHandler-6xyLJ14H.js";
|
|
12
12
|
import { h as r } from "./index.module-CAa-2T7m.js";
|
|
13
13
|
const gA = "_editorView_as93v_7", JA = "_editorTopBar_as93v_16", bA = "_backBtn_as93v_25", MA = "_titleInput_as93v_39", sA = "_summaryBar_as93v_50", QA = "_summaryInput_as93v_55", hA = "_mdToolbar_as93v_67", YA = "_mdBtn_as93v_77", yA = "_mdSep_as93v_84", IA = "_editorBody_as93v_93", CA = "_tocPanel_as93v_100", ZA = "_tocHeader_as93v_108", EA = "_tocList_as93v_117", _A = "_tocItem_as93v_122", $A = "_tocEmpty_as93v_137", pt = "_textarea_as93v_144", at = "_half_as93v_160", At = "_preview_as93v_163", tt = "_markdown_as93v_173", et = "_videoEmbed_as93v_185", w = {
|
|
14
14
|
editorView: gA,
|
|
@@ -1681,7 +1681,7 @@ const Rt = [
|
|
|
1681
1681
|
draftDeleteBtn: T0,
|
|
1682
1682
|
markdown: v0
|
|
1683
1683
|
}, F0 = HA(
|
|
1684
|
-
() => import("./
|
|
1684
|
+
() => import("./Market-C2vkBzDr.js").then((a) => ({ default: a.MarketContent }))
|
|
1685
1685
|
);
|
|
1686
1686
|
function d0(a) {
|
|
1687
1687
|
const n = [], x = a.split(`
|
|
@@ -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-BIX-e69A.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, "&").replace(/</g, "<").replace(/>/g, ">").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
|
+
};
|