@yuku123/z-team-component 0.2.44 → 0.2.45
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/{ComponentDoc-DWnW6JUe.js → ComponentDoc-DtDTj8G-.js} +1 -1
- package/dist/{InvitationManagementPage-B0b0PQD2.js → InvitationManagementPage-C3e8FONl.js} +1 -1
- package/dist/{OnboardingPage-Ddb_NzR_.js → OnboardingPage-JJTsN4II.js} +2 -2
- package/dist/{SystemShell-BUcxfXI4.js → SystemShell-BBK1x8og.js} +1 -1
- package/dist/{api-C0GU_eBD.js → api-DLT_RIhW.js} +1 -1
- package/dist/{index-QX_VEngE.js → index-C66-7XZO.js} +203 -187
- package/dist/{index-c0IQjzQE.js → index-CK695ZYz.js} +1 -1
- package/dist/{index-CN68mjC6.js → index-CVXAthwM.js} +2 -2
- package/dist/{index-Co4c3HUe.js → index-Co97c_ul.js} +2 -2
- package/dist/{index-B_BXiKYP.js → index-Cr1LrASF.js} +2 -2
- package/dist/{index-DXyOudOi.js → index-CtxZJJXW.js} +1 -1
- package/dist/{index-CmzNxi0H.js → index-D_j2Qydx.js} +1 -1
- package/dist/index.js +1 -1
- package/dist/pages.js +1 -1
- package/package.json +1 -1
|
@@ -9,7 +9,7 @@ import He from "axios";
|
|
|
9
9
|
const X = (t) => {
|
|
10
10
|
const i = xt(t);
|
|
11
11
|
return (r) => /* @__PURE__ */ e(wt, { fallback: null, children: /* @__PURE__ */ e(i, { ...r }) });
|
|
12
|
-
}, oe = X(() => import("./index-
|
|
12
|
+
}, oe = X(() => import("./index-CVXAthwM.js").then((t) => t.H)), Zt = X(() => import("./index-7nSly-MA.js")), Jt = X(() => import("./index-BX1Wd9x9.js")), Vt = X(() => import("./index-ClA0896K.js")), Wt = X(() => import("./index-qK6pyAGy.js")), Xt = X(() => import("./index-Bdu31aRV.js"));
|
|
13
13
|
X(() => import("./index-BfRlRsfj.js"));
|
|
14
14
|
const Yt = X(() => import("./index-C815hPWS.js")), Qt = X(() => import("./index-UsGqMo11.js")), en = X(() => import("./index-BkX0I2aB.js")), tn = X(() => import("./index-D9AqC2O-.js")), nn = X(() => import("./index-DpcrvKsK.js")), rn = X(() => import("./index-DFY3lzq0.js"));
|
|
15
15
|
function Qn({ forcedMode: t }) {
|
|
@@ -2,7 +2,7 @@ import { jsxs as i, jsx as e, Fragment as A } from "react/jsx-runtime";
|
|
|
2
2
|
import { useState as o, useEffect as oe } from "react";
|
|
3
3
|
import { Form as m, message as l, Button as d, Input as B, Row as ae, Col as z, Card as v, Statistic as O, Alert as T, Space as p, Typography as se, Tabs as de, Popconfirm as F, Tag as h, Tooltip as ce, Modal as he, Radio as S, Select as w, InputNumber as ue } from "antd";
|
|
4
4
|
import { PlusOutlined as me, ClockCircleOutlined as _, CheckCircleOutlined as $, LinkOutlined as D, CopyOutlined as b, QrcodeOutlined as U, UserDeleteOutlined as K, TeamOutlined as pe, MailOutlined as j, DeleteOutlined as ye, UserAddOutlined as q, CloseCircleOutlined as N } from "@ant-design/icons";
|
|
5
|
-
import { l as fe, b as ge, g as ve, c as we, d as be, e as Ce, f as xe } from "./api-
|
|
5
|
+
import { l as fe, b as ge, g as ve, c as we, d as be, e as Ce, f as xe } from "./api-DLT_RIhW.js";
|
|
6
6
|
import { PageHeader as Ie, TableToolbar as ke, ListTable as W } from "@yuku123/z-frontend-common/ui";
|
|
7
7
|
const { Text: c } = se, Me = () => {
|
|
8
8
|
const [C] = m.useForm(), [M, P] = o(!1), [y, G] = o([]), [L, H] = o([]), [J, Q] = o(null), [u, V] = o(""), [X, x] = o(!1), [Y, R] = o(!1), [a, E] = o(null), [r, Z] = o(localStorage.getItem("userInfo") && JSON.parse(localStorage.getItem("userInfo") || "{}").tenantCode || "");
|
|
@@ -3,8 +3,8 @@ import { useState as a, useMemo as oe, useEffect as W } from "react";
|
|
|
3
3
|
import { useNavigate as le, useSearchParams as se } from "react-router-dom";
|
|
4
4
|
import { Form as c, message as o, Spin as ce, Typography as de, Card as d, Tag as x, Empty as me, Row as he, Col as fe, Space as S, Avatar as ge, Pagination as pe, Button as T, Result as ue, Modal as E, Input as k, Alert as U } from "antd";
|
|
5
5
|
import { RocketOutlined as q, ApartmentOutlined as ye, CheckCircleOutlined as Ce, PlusOutlined as z, KeyOutlined as m, GiftOutlined as ve, HomeOutlined as we, CrownOutlined as be } from "@ant-design/icons";
|
|
6
|
-
import { g as xe, a as Se, s as Te, r as ke } from "./api-
|
|
7
|
-
import { a as ze } from "./ComponentDoc-
|
|
6
|
+
import { g as xe, a as Se, s as Te, r as ke } from "./api-DLT_RIhW.js";
|
|
7
|
+
import { a as ze } from "./ComponentDoc-DtDTj8G-.js";
|
|
8
8
|
const { Title: u, Text: O, Paragraph: Oe } = de, y = 12, Me = () => {
|
|
9
9
|
const L = le(), [H] = se(), [_, I] = a(!0), [i, $] = a(null), [l, G] = a([]), [A, F] = a(0), [h, B] = a(""), [C, K] = a(1), X = oe(() => {
|
|
10
10
|
const e = (C - 1) * y;
|
|
@@ -456,7 +456,7 @@ const He = "_shell_10jrt_6", je = "_main_10jrt_21", qe = "_empty_10jrt_31", Ee =
|
|
|
456
456
|
empty: qe,
|
|
457
457
|
emptyIcon: Ee,
|
|
458
458
|
emptyText: Re
|
|
459
|
-
}, t = (c, s) => u(() => c().then((i) => ({ default: i[s] }))), $e = t(() => import("@yuku123/z-ctc-component"), "AccountManagement"), Be = t(() => import("@yuku123/z-ctc-component"), "ApplicationManagement"), We = t(() => import("@yuku123/z-ctc-component"), "AuditPage"), Ue = t(() => import("@yuku123/z-ctc-component"), "CtcOverview"), Fe = t(() => import("@yuku123/z-ctc-component"), "DictPage"), Ke = t(() => import("@yuku123/z-ctc-component"), "OrgPage"), Qe = t(() => import("@yuku123/z-ctc-component"), "PermissionManagement"), Ze = t(() => import("@yuku123/z-ctc-component"), "RoleManagement"), j = t(() => import("@yuku123/z-ctc-component"), "SurlManagement"), Ve = t(() => import("@yuku123/z-ctc-component"), "TenantManagement"), Ye = t(() => import("@yuku123/z-agent-component"), "AgentAppList"), Je = t(() => import("@yuku123/z-agent-component"), "AgentDashboard"), Xe = t(() => import("@yuku123/z-agent-component"), "AkManage"), et = t(() => import("@yuku123/z-agent-component"), "BucketList"), tt = t(() => import("@yuku123/z-agent-component"), "LlmManage"), nt = t(() => import("@yuku123/z-agent-component"), "McpPage"), at = t(() => import("@yuku123/z-agent-component"), "ObjectBrowser"), ot = t(() => import("@yuku123/z-agent-component"), "ScriptCenterPage"), ct = t(() => import("@yuku123/z-agent-component"), "ScriptProductizationPage"), lt = t(() => import("@yuku123/z-agent-component"), "SkillMarket"), st = t(() => import("./index-
|
|
459
|
+
}, t = (c, s) => u(() => c().then((i) => ({ default: i[s] }))), $e = t(() => import("@yuku123/z-ctc-component"), "AccountManagement"), Be = t(() => import("@yuku123/z-ctc-component"), "ApplicationManagement"), We = t(() => import("@yuku123/z-ctc-component"), "AuditPage"), Ue = t(() => import("@yuku123/z-ctc-component"), "CtcOverview"), Fe = t(() => import("@yuku123/z-ctc-component"), "DictPage"), Ke = t(() => import("@yuku123/z-ctc-component"), "OrgPage"), Qe = t(() => import("@yuku123/z-ctc-component"), "PermissionManagement"), Ze = t(() => import("@yuku123/z-ctc-component"), "RoleManagement"), j = t(() => import("@yuku123/z-ctc-component"), "SurlManagement"), Ve = t(() => import("@yuku123/z-ctc-component"), "TenantManagement"), Ye = t(() => import("@yuku123/z-agent-component"), "AgentAppList"), Je = t(() => import("@yuku123/z-agent-component"), "AgentDashboard"), Xe = t(() => import("@yuku123/z-agent-component"), "AkManage"), et = t(() => import("@yuku123/z-agent-component"), "BucketList"), tt = t(() => import("@yuku123/z-agent-component"), "LlmManage"), nt = t(() => import("@yuku123/z-agent-component"), "McpPage"), at = t(() => import("@yuku123/z-agent-component"), "ObjectBrowser"), ot = t(() => import("@yuku123/z-agent-component"), "ScriptCenterPage"), ct = t(() => import("@yuku123/z-agent-component"), "ScriptProductizationPage"), lt = t(() => import("@yuku123/z-agent-component"), "SkillMarket"), st = t(() => import("./index-Co97c_ul.js"), "AgentTeamIM"), q = t(() => import("./index-Co97c_ul.js"), "DebugPlayground"), pt = t(() => import("./index-Co97c_ul.js"), "Overview"), E = t(() => import("./index-Co97c_ul.js"), "Webide"), it = u(() => import("./OnboardingPage-JJTsN4II.js")), rt = u(() => import("./InvitationManagementPage-C3e8FONl.js")), mt = t(() => import("@yuku123/z-config-component"), "ConfigApp"), ut = t(() => import("@yuku123/z-task-component"), "TaskApp"), dt = t(() => import("@yuku123/z-wf-component"), "WorkflowApp"), ht = t(() => import("@yuku123/z-schedule-component"), "ScheduleApp"), bt = t(() => import("@yuku123/z-mist-component"), "MistApp"), gt = t(() => import("@yuku123/z-meta-component"), "MetaApp"), _t = t(() => import("@yuku123/z-msg-component"), "MsgApp"), kt = t(() => import("@yuku123/z-rpc-component"), "RpcApp"), yt = u(() => import("./ComponentDoc-DtDTj8G-.js").then((c) => c.k)), St = u(() => import("./ComponentDoc-DtDTj8G-.js").then((c) => c.l)), At = t(() => import("@yuku123/z-config-component"), "ComponentDocPage"), wt = t(() => import("@yuku123/z-task-component"), "ComponentDocPage"), vt = t(() => import("@yuku123/z-wf-component"), "ComponentDocPage"), Dt = t(() => import("@yuku123/z-schedule-component"), "ComponentDocPage"), Pt = t(() => import("@yuku123/z-mist-component"), "ComponentDocPage"), ft = t(() => import("@yuku123/z-meta-component"), "ComponentDocPage"), Ct = t(() => import("@yuku123/z-msg-component"), "ComponentDocPage"), Gt = t(() => import("@yuku123/z-rpc-component"), "ComponentDocPage"), It = t(() => import("@yuku123/z-kb-component"), "ComponentDocPage"), Mt = t(() => import("@yuku123/z-product-component"), "ComponentDocPage"), Ot = t(() => import("@yuku123/z-oss-component"), "ComponentDocPage"), Nt = t(() => import("@yuku123/z-vector-component"), "ComponentDocPage"), Lt = t(() => import("@yuku123/z-graph-component"), "ComponentDocPage"), zt = t(() => import("@yuku123/z-gw-component"), "ComponentDocPage"), Tt = t(() => import("@yuku123/z-cache-component"), "ComponentDocPage"), xt = t(() => import("@yuku123/z-mq-component"), "ComponentDocPage"), Ht = t(() => import("@yuku123/z-ctc-component"), "ComponentDocPage"), jt = t(() => import("@yuku123/z-agent-component"), "ComponentDocPage"), qt = t(() => import("@yuku123/z-lc-component"), "ComponentDocPage"), Et = t(() => import("@yuku123/z-qa-component"), "ComponentDocPage"), Rt = u(() => import("./ComponentDoc-DtDTj8G-.js").then((c) => c.j)), R = u(() => import("@yuku123/z-qa-component"));
|
|
460
460
|
function $t() {
|
|
461
461
|
return /* @__PURE__ */ p("div", { className: h.empty, children: [
|
|
462
462
|
/* @__PURE__ */ e("div", { className: h.emptyIcon, children: "📋" }),
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsxs as s, jsx as e } from "react/jsx-runtime";
|
|
2
2
|
import { CopyOutlined as se, ReloadOutlined as Ne, PlusOutlined as ve, DeleteOutlined as Pe, ClearOutlined as Ie, CloseOutlined as Be, SendOutlined as $e, RobotOutlined as Te, CloudServerOutlined as Oe, MessageOutlined as De, KeyOutlined as Le, ApiOutlined as ze, ToolOutlined as Re, BarChartOutlined as Ue } from "@ant-design/icons";
|
|
3
|
-
import { Tooltip as Q, Tabs as Ce, Button as z, Modal as ce, Input as Se, Drawer as
|
|
3
|
+
import { Tooltip as Q, Tabs as Ce, Button as z, Modal as ce, Input as Se, Drawer as Ae, Spin as V, Statistic as P, Table as we, message as F, Tag as G, Select as He, Checkbox as qe } from "antd";
|
|
4
4
|
import { useState as S, useCallback as H, useEffect as ae, useRef as de, useMemo as xe, Suspense as je, lazy as Fe } from "react";
|
|
5
5
|
import { s as t } from "./SmartWorkbench.module-xRRmpTTw.js";
|
|
6
6
|
import { AgentAppList as Ge, McpPage as Je, SkillMarket as Qe } from "@yuku123/z-agent-component";
|
|
@@ -23,7 +23,7 @@ function We(a) {
|
|
|
23
23
|
apiType: String(a.apiType ?? a.api_type ?? "OpenAPI")
|
|
24
24
|
};
|
|
25
25
|
}
|
|
26
|
-
async function
|
|
26
|
+
async function Ke() {
|
|
27
27
|
let a;
|
|
28
28
|
try {
|
|
29
29
|
a = await fetch(`${X}/api/scenario-instances/0/models`, {
|
|
@@ -50,7 +50,7 @@ async function _e() {
|
|
|
50
50
|
return l.map(We);
|
|
51
51
|
}
|
|
52
52
|
async function Ye(a, n, l, o) {
|
|
53
|
-
var
|
|
53
|
+
var k, K, B, C;
|
|
54
54
|
const d = await fetch(`${ue}/v1/chat/completions`, {
|
|
55
55
|
method: "POST",
|
|
56
56
|
headers: {
|
|
@@ -69,26 +69,26 @@ async function Ye(a, n, l, o) {
|
|
|
69
69
|
const T = await d.text().catch(() => "");
|
|
70
70
|
if (/<!doctype html/i.test(T.slice(0, 200)))
|
|
71
71
|
throw new Error("模型网关未接入(/v1/chat/completions 落到主壳 SPA,无网关响应)");
|
|
72
|
-
let
|
|
72
|
+
let _ = `HTTP ${d.status}`;
|
|
73
73
|
try {
|
|
74
74
|
const p = JSON.parse(T);
|
|
75
|
-
|
|
75
|
+
_ = ((k = p == null ? void 0 : p.error) == null ? void 0 : k.message) ?? _;
|
|
76
76
|
} catch {
|
|
77
|
-
T && (
|
|
77
|
+
T && (_ = T);
|
|
78
78
|
}
|
|
79
|
-
throw new Error(
|
|
79
|
+
throw new Error(_);
|
|
80
80
|
}
|
|
81
81
|
const N = d.body.getReader(), v = new TextDecoder();
|
|
82
|
-
let
|
|
82
|
+
let f = "";
|
|
83
83
|
try {
|
|
84
84
|
for (; ; ) {
|
|
85
|
-
const { done: T, value:
|
|
85
|
+
const { done: T, value: _ } = await N.read();
|
|
86
86
|
if (T) break;
|
|
87
|
-
|
|
88
|
-
const p =
|
|
87
|
+
f += v.decode(_, { stream: !0 });
|
|
88
|
+
const p = f.split(`
|
|
89
89
|
|
|
90
90
|
`);
|
|
91
|
-
|
|
91
|
+
f = p.pop() ?? "";
|
|
92
92
|
for (const c of p) {
|
|
93
93
|
let g = "";
|
|
94
94
|
for (const i of c.split(`
|
|
@@ -102,10 +102,10 @@ async function Ye(a, n, l, o) {
|
|
|
102
102
|
continue;
|
|
103
103
|
}
|
|
104
104
|
try {
|
|
105
|
-
const i = JSON.parse(g),
|
|
106
|
-
if (Array.isArray(
|
|
107
|
-
const
|
|
108
|
-
if (
|
|
105
|
+
const i = JSON.parse(g), A = i == null ? void 0 : i.choices;
|
|
106
|
+
if (Array.isArray(A) && A.length > 0) {
|
|
107
|
+
const b = (K = A[0]) == null ? void 0 : K.delta;
|
|
108
|
+
if (b != null && b.content && o.onDelta(b.content), (B = A[0]) == null ? void 0 : B.finish_reason) {
|
|
109
109
|
const m = i != null && i.usage ? {
|
|
110
110
|
promptTokens: i.usage.prompt_tokens ?? 0,
|
|
111
111
|
completionTokens: i.usage.completion_tokens ?? 0,
|
|
@@ -116,12 +116,12 @@ async function Ye(a, n, l, o) {
|
|
|
116
116
|
}
|
|
117
117
|
}
|
|
118
118
|
if (i != null && i.usage) {
|
|
119
|
-
const
|
|
119
|
+
const b = {
|
|
120
120
|
promptTokens: i.usage.prompt_tokens ?? 0,
|
|
121
121
|
completionTokens: i.usage.completion_tokens ?? 0,
|
|
122
122
|
totalTokens: i.usage.total_tokens ?? 0
|
|
123
123
|
};
|
|
124
|
-
o.onDone(
|
|
124
|
+
o.onDone(b);
|
|
125
125
|
return;
|
|
126
126
|
}
|
|
127
127
|
} catch {
|
|
@@ -168,7 +168,7 @@ function Ve(a) {
|
|
|
168
168
|
secret: a.secret_key
|
|
169
169
|
};
|
|
170
170
|
}
|
|
171
|
-
async function
|
|
171
|
+
async function _e(a, n, l) {
|
|
172
172
|
const o = await fetch(`${X}/api/ak/create`, {
|
|
173
173
|
method: "POST",
|
|
174
174
|
headers: Z({ Accept: "application/json", "Content-Type": "application/json" }),
|
|
@@ -180,8 +180,8 @@ async function Me(a, n, l) {
|
|
|
180
180
|
ownerUserId: a,
|
|
181
181
|
ownerUserName: n
|
|
182
182
|
})
|
|
183
|
-
}), d = await ne(o, "创建 AK"), N = (d == null ? void 0 : d.data) ?? {}, v = N.accessKey ?? "",
|
|
184
|
-
return v &&
|
|
183
|
+
}), d = await ne(o, "创建 AK"), N = (d == null ? void 0 : d.data) ?? {}, v = N.accessKey ?? "", f = N.secretKey ?? "";
|
|
184
|
+
return v && f && pe(v, f), { apiKey: f, akPrefix: v, message: "AK 已创建,secretKey 仅创建时可见" };
|
|
185
185
|
}
|
|
186
186
|
async function ie(a) {
|
|
187
187
|
const n = await fetch(
|
|
@@ -198,8 +198,8 @@ async function Xe(a) {
|
|
|
198
198
|
});
|
|
199
199
|
await ne(n, "吊销 AK");
|
|
200
200
|
}
|
|
201
|
-
async function
|
|
202
|
-
var T,
|
|
201
|
+
async function Me(a) {
|
|
202
|
+
var T, _;
|
|
203
203
|
const n = await fetch(
|
|
204
204
|
`${X}/api/admin/llm-call-monitor/stats?hours=168`,
|
|
205
205
|
{ headers: Z({ Accept: "application/json" }), credentials: "include" }
|
|
@@ -210,17 +210,17 @@ async function be(a) {
|
|
|
210
210
|
`${X}/api/admin/llm-call-monitor/recent?page=1&size=20`,
|
|
211
211
|
{ headers: Z({ Accept: "application/json" }), credentials: "include" }
|
|
212
212
|
), c = await ne(p, "获取调用明细");
|
|
213
|
-
N = (Array.isArray((T = c == null ? void 0 : c.data) == null ? void 0 : T.records) ? c.data.records : []).map((i,
|
|
214
|
-
const
|
|
213
|
+
N = (Array.isArray((T = c == null ? void 0 : c.data) == null ? void 0 : T.records) ? c.data.records : []).map((i, A) => {
|
|
214
|
+
const b = Number(i.promptTokens ?? 0), q = Number(i.completionTokens ?? 0);
|
|
215
215
|
return {
|
|
216
|
-
id: Number(i.id ??
|
|
216
|
+
id: Number(i.id ?? A),
|
|
217
217
|
apiKeyId: a,
|
|
218
218
|
protocol: "chat/completions",
|
|
219
219
|
model: String(i.model ?? ""),
|
|
220
220
|
stream: Number(i.stream ?? 0),
|
|
221
|
-
promptTokens:
|
|
221
|
+
promptTokens: b,
|
|
222
222
|
completionTokens: q,
|
|
223
|
-
totalTokens: Number(i.totalTokens ??
|
|
223
|
+
totalTokens: Number(i.totalTokens ?? b + q),
|
|
224
224
|
latencyMs: Number(i.durationMs ?? 0),
|
|
225
225
|
statusCode: i.success === !1 || i.success === 0 ? 500 : 200,
|
|
226
226
|
errorMsg: i.errorType ?? null,
|
|
@@ -229,27 +229,27 @@ async function be(a) {
|
|
|
229
229
|
});
|
|
230
230
|
} catch {
|
|
231
231
|
}
|
|
232
|
-
const v = {},
|
|
232
|
+
const v = {}, f = {};
|
|
233
233
|
for (const p of N) {
|
|
234
|
-
const c = v[
|
|
234
|
+
const c = v[_ = p.model] || (v[_] = [0, 0, 0]);
|
|
235
235
|
c[0] += 1, c[1] += p.promptTokens, c[2] += p.completionTokens;
|
|
236
236
|
const g = (p.createTime || "").slice(0, 10);
|
|
237
237
|
if (g) {
|
|
238
|
-
const i =
|
|
238
|
+
const i = f[g] || (f[g] = [0, 0, 0]);
|
|
239
239
|
i[0] += 1, i[1] += p.promptTokens, i[2] += p.completionTokens;
|
|
240
240
|
}
|
|
241
241
|
}
|
|
242
|
-
const
|
|
242
|
+
const k = Number(d.totalTokens ?? 0), K = N.reduce((p, c) => p + c.totalTokens, 0), B = N.reduce((p, c) => p + c.promptTokens, 0), C = N.reduce((p, c) => p + c.completionTokens, 0);
|
|
243
243
|
return {
|
|
244
244
|
totalRequests: Number(d.totalCount ?? 0),
|
|
245
245
|
// 汇总口径优先用后端整窗合计(后端 selectStats 才有 token 合计),
|
|
246
246
|
// 明细只有最近一页 ⇒ 只在汇总缺失时用明细兜底。
|
|
247
|
-
totalPromptTokens: Number(d.totalPromptTokens ?? 0) ||
|
|
247
|
+
totalPromptTokens: Number(d.totalPromptTokens ?? 0) || B,
|
|
248
248
|
totalCompletionTokens: Number(d.totalCompletionTokens ?? 0) || C,
|
|
249
|
-
totalTokens:
|
|
249
|
+
totalTokens: k || K,
|
|
250
250
|
avgLatencyMs: Number(d.avgDurationMs ?? 0),
|
|
251
251
|
errorCount: Number(d.failCount ?? 0),
|
|
252
|
-
daily:
|
|
252
|
+
daily: f,
|
|
253
253
|
models: v,
|
|
254
254
|
recent: N
|
|
255
255
|
};
|
|
@@ -286,7 +286,7 @@ async function tt() {
|
|
|
286
286
|
}
|
|
287
287
|
return n.akPrefix && pe(n.akPrefix, n.secret), n.secret;
|
|
288
288
|
}
|
|
289
|
-
const l = await
|
|
289
|
+
const l = await _e(
|
|
290
290
|
"system-default",
|
|
291
291
|
"系统默认",
|
|
292
292
|
"智能工作台默认AK(自动创建)"
|
|
@@ -299,7 +299,7 @@ async function tt() {
|
|
|
299
299
|
}
|
|
300
300
|
return l.apiKey;
|
|
301
301
|
}
|
|
302
|
-
function
|
|
302
|
+
function be() {
|
|
303
303
|
try {
|
|
304
304
|
localStorage.removeItem(le);
|
|
305
305
|
} catch {
|
|
@@ -331,31 +331,31 @@ curl -X POST ${a}/v1/messages \\
|
|
|
331
331
|
}'`;
|
|
332
332
|
}
|
|
333
333
|
function st() {
|
|
334
|
-
const [a, n] = S("personal"), [l, o] = S([]), [d, N] = S([]), [v,
|
|
335
|
-
|
|
334
|
+
const [a, n] = S("personal"), [l, o] = S([]), [d, N] = S([]), [v, f] = S(!0), [k, K] = S(!1), [B, C] = S(!1), [T, _] = S(""), [p, c] = S({ open: !1 }), [g, i] = S(null), [A, b] = S(null), [q, m] = S(!1), I = "zifang", D = "zifang", E = Ze(), j = H(async () => {
|
|
335
|
+
f(!0);
|
|
336
336
|
try {
|
|
337
337
|
const [h, x] = await Promise.all([
|
|
338
338
|
ie("system-default").catch(() => []),
|
|
339
|
-
ie(
|
|
339
|
+
ie(I).catch(() => [])
|
|
340
340
|
]);
|
|
341
341
|
o(h), N(x);
|
|
342
342
|
} finally {
|
|
343
|
-
|
|
343
|
+
f(!1);
|
|
344
344
|
}
|
|
345
|
-
}, [
|
|
345
|
+
}, [I]);
|
|
346
346
|
ae(() => {
|
|
347
347
|
j();
|
|
348
348
|
}, [j]);
|
|
349
349
|
const r = () => {
|
|
350
|
-
|
|
350
|
+
_(""), C(!0);
|
|
351
351
|
}, u = async () => {
|
|
352
352
|
if (!T.trim()) {
|
|
353
353
|
F.warning("请输入 AK 名称");
|
|
354
354
|
return;
|
|
355
355
|
}
|
|
356
|
-
|
|
356
|
+
K(!0);
|
|
357
357
|
try {
|
|
358
|
-
const h = await
|
|
358
|
+
const h = await _e(I, D, T.trim());
|
|
359
359
|
pe(h.akPrefix, h.apiKey), C(!1), c({
|
|
360
360
|
open: !0,
|
|
361
361
|
apiKey: h.apiKey,
|
|
@@ -364,9 +364,9 @@ function st() {
|
|
|
364
364
|
} catch (h) {
|
|
365
365
|
F.error(h instanceof Error ? h.message : "创建 AK 失败");
|
|
366
366
|
} finally {
|
|
367
|
-
|
|
367
|
+
K(!1);
|
|
368
368
|
}
|
|
369
|
-
},
|
|
369
|
+
}, w = (h) => {
|
|
370
370
|
ce.confirm({
|
|
371
371
|
title: "确认吊销此 AK?",
|
|
372
372
|
content: "吊销后此 AK 将立即失效,无法恢复。",
|
|
@@ -375,29 +375,29 @@ function st() {
|
|
|
375
375
|
cancelText: "取消",
|
|
376
376
|
onOk: async () => {
|
|
377
377
|
try {
|
|
378
|
-
await Xe(h), F.success("AK 已吊销"), j(),
|
|
378
|
+
await Xe(h), F.success("AK 已吊销"), j(), be();
|
|
379
379
|
} catch (x) {
|
|
380
380
|
F.error(x instanceof Error ? x.message : "吊销失败");
|
|
381
381
|
}
|
|
382
382
|
}
|
|
383
383
|
});
|
|
384
|
-
},
|
|
384
|
+
}, M = (h) => {
|
|
385
385
|
navigator.clipboard.writeText(h).then(() => F.success("已复制到剪贴板")).catch(() => F.warning("复制失败,请手动复制"));
|
|
386
386
|
}, J = (h) => {
|
|
387
387
|
const x = et(h.akPrefix);
|
|
388
|
-
x ?
|
|
388
|
+
x ? M(x) : (M(h.akPrefix), F.info("完整 AK 未在本地缓存(可能在本设备外创建),已复制前缀"));
|
|
389
389
|
}, $ = async (h) => {
|
|
390
|
-
i(h), m(!0),
|
|
390
|
+
i(h), m(!0), b(null);
|
|
391
391
|
try {
|
|
392
|
-
const x = await
|
|
393
|
-
|
|
392
|
+
const x = await Me(h.id);
|
|
393
|
+
b(x);
|
|
394
394
|
} catch (x) {
|
|
395
395
|
F.error(x instanceof Error ? x.message : "获取用量失败");
|
|
396
396
|
} finally {
|
|
397
397
|
m(!1);
|
|
398
398
|
}
|
|
399
399
|
}, W = () => {
|
|
400
|
-
i(null),
|
|
400
|
+
i(null), b(null);
|
|
401
401
|
}, oe = (h) => {
|
|
402
402
|
const x = Object.entries(h);
|
|
403
403
|
if (x.length === 0)
|
|
@@ -528,7 +528,7 @@ function st() {
|
|
|
528
528
|
size: "small",
|
|
529
529
|
danger: !0,
|
|
530
530
|
icon: /* @__PURE__ */ e(Pe, {}),
|
|
531
|
-
onClick: () =>
|
|
531
|
+
onClick: () => w(y.id),
|
|
532
532
|
children: "吊销"
|
|
533
533
|
}
|
|
534
534
|
)
|
|
@@ -577,7 +577,7 @@ function st() {
|
|
|
577
577
|
se,
|
|
578
578
|
{
|
|
579
579
|
className: t.akCopyIcon,
|
|
580
|
-
onClick: () =>
|
|
580
|
+
onClick: () => M(E)
|
|
581
581
|
}
|
|
582
582
|
) })
|
|
583
583
|
] }),
|
|
@@ -588,7 +588,7 @@ function st() {
|
|
|
588
588
|
se,
|
|
589
589
|
{
|
|
590
590
|
className: t.akCopyIcon,
|
|
591
|
-
onClick: () =>
|
|
591
|
+
onClick: () => M(E)
|
|
592
592
|
}
|
|
593
593
|
) })
|
|
594
594
|
] })
|
|
@@ -635,7 +635,7 @@ function st() {
|
|
|
635
635
|
type: "primary",
|
|
636
636
|
icon: /* @__PURE__ */ e(ve, {}),
|
|
637
637
|
onClick: r,
|
|
638
|
-
loading:
|
|
638
|
+
loading: k,
|
|
639
639
|
children: "生成 AK"
|
|
640
640
|
}
|
|
641
641
|
)
|
|
@@ -648,13 +648,13 @@ function st() {
|
|
|
648
648
|
/* @__PURE__ */ s(
|
|
649
649
|
ce,
|
|
650
650
|
{
|
|
651
|
-
open:
|
|
651
|
+
open: B,
|
|
652
652
|
title: "生成新 AK",
|
|
653
653
|
onCancel: () => C(!1),
|
|
654
654
|
onOk: u,
|
|
655
655
|
okText: "确认生成",
|
|
656
656
|
cancelText: "取消",
|
|
657
|
-
confirmLoading:
|
|
657
|
+
confirmLoading: k,
|
|
658
658
|
children: [
|
|
659
659
|
/* @__PURE__ */ e(
|
|
660
660
|
"div",
|
|
@@ -672,7 +672,7 @@ function st() {
|
|
|
672
672
|
{
|
|
673
673
|
placeholder: "例如:测试用 AK、生产网关 AK",
|
|
674
674
|
value: T,
|
|
675
|
-
onChange: (h) =>
|
|
675
|
+
onChange: (h) => _(h.target.value),
|
|
676
676
|
onPressEnter: u,
|
|
677
677
|
maxLength: 50,
|
|
678
678
|
autoFocus: !0
|
|
@@ -692,7 +692,7 @@ function st() {
|
|
|
692
692
|
z,
|
|
693
693
|
{
|
|
694
694
|
icon: /* @__PURE__ */ e(se, {}),
|
|
695
|
-
onClick: () => p.apiKey &&
|
|
695
|
+
onClick: () => p.apiKey && M(p.apiKey),
|
|
696
696
|
children: "复制 AK"
|
|
697
697
|
},
|
|
698
698
|
"copy"
|
|
@@ -732,7 +732,7 @@ function st() {
|
|
|
732
732
|
}
|
|
733
733
|
),
|
|
734
734
|
/* @__PURE__ */ e(
|
|
735
|
-
|
|
735
|
+
Ae,
|
|
736
736
|
{
|
|
737
737
|
title: g ? /* @__PURE__ */ s("span", { children: [
|
|
738
738
|
"AK 详情 — ",
|
|
@@ -741,60 +741,68 @@ function st() {
|
|
|
741
741
|
open: !!g,
|
|
742
742
|
onClose: W,
|
|
743
743
|
size: "large",
|
|
744
|
-
children: q ? /* @__PURE__ */ e("div", { style: { textAlign: "center", padding: 60 }, children: /* @__PURE__ */ e(V, { tip: "加载用量数据..." }) }) :
|
|
744
|
+
children: q ? /* @__PURE__ */ e("div", { style: { textAlign: "center", padding: 60 }, children: /* @__PURE__ */ e(V, { tip: "加载用量数据..." }) }) : A ? /* @__PURE__ */ s("div", { className: t.usageDrawerContent, children: [
|
|
745
|
+
/* @__PURE__ */ e("div", { style: { fontSize: 12, color: "#8c8c8c", marginBottom: 12 }, children: "以下为网关全局调用统计(近 7 天窗口), 监控侧不按 AK 留存;该 AK 自身的累计消耗见下方「本 AK 累计 Token」。" }),
|
|
745
746
|
/* @__PURE__ */ s("div", { className: t.usageStatsGrid, children: [
|
|
746
|
-
/* @__PURE__ */ e(
|
|
747
|
-
/* @__PURE__ */ e(
|
|
747
|
+
/* @__PURE__ */ e(P, { title: "总请求数", value: A.totalRequests }),
|
|
748
|
+
/* @__PURE__ */ e(P, { title: "总 Token", value: A.totalTokens }),
|
|
748
749
|
/* @__PURE__ */ e(
|
|
749
|
-
|
|
750
|
+
P,
|
|
750
751
|
{
|
|
751
752
|
title: "输入 Token",
|
|
752
|
-
value:
|
|
753
|
+
value: A.totalPromptTokens
|
|
753
754
|
}
|
|
754
755
|
),
|
|
755
756
|
/* @__PURE__ */ e(
|
|
756
|
-
|
|
757
|
+
P,
|
|
757
758
|
{
|
|
758
759
|
title: "输出 Token",
|
|
759
|
-
value:
|
|
760
|
+
value: A.totalCompletionTokens
|
|
760
761
|
}
|
|
761
762
|
),
|
|
762
763
|
/* @__PURE__ */ e(
|
|
763
|
-
|
|
764
|
+
P,
|
|
764
765
|
{
|
|
765
766
|
title: "平均耗时",
|
|
766
|
-
value:
|
|
767
|
+
value: A.avgLatencyMs,
|
|
767
768
|
suffix: "ms"
|
|
768
769
|
}
|
|
769
770
|
),
|
|
770
771
|
/* @__PURE__ */ e(
|
|
771
|
-
|
|
772
|
+
P,
|
|
772
773
|
{
|
|
773
774
|
title: "错误数",
|
|
774
|
-
value:
|
|
775
|
+
value: A.errorCount,
|
|
775
776
|
styles: {
|
|
776
777
|
content: {
|
|
777
|
-
color:
|
|
778
|
+
color: A.errorCount > 0 ? "#ff4d4f" : void 0
|
|
778
779
|
}
|
|
779
780
|
}
|
|
780
781
|
}
|
|
782
|
+
),
|
|
783
|
+
/* @__PURE__ */ e(
|
|
784
|
+
P,
|
|
785
|
+
{
|
|
786
|
+
title: "本 AK 累计 Token",
|
|
787
|
+
value: (g == null ? void 0 : g.totalTokens) ?? 0
|
|
788
|
+
}
|
|
781
789
|
)
|
|
782
790
|
] }),
|
|
783
791
|
/* @__PURE__ */ s("div", { className: t.usageSection, children: [
|
|
784
|
-
/* @__PURE__ */ e("h4", { className: t.usageSectionTitle, children: "
|
|
785
|
-
oe(
|
|
792
|
+
/* @__PURE__ */ e("h4", { className: t.usageSectionTitle, children: "每日调用曲线(按最近调用明细聚合)" }),
|
|
793
|
+
oe(A.daily)
|
|
786
794
|
] }),
|
|
787
795
|
/* @__PURE__ */ s("div", { className: t.usageSection, children: [
|
|
788
796
|
/* @__PURE__ */ e("h4", { className: t.usageSectionTitle, children: "模型用量分布" }),
|
|
789
|
-
L(
|
|
797
|
+
L(A.models)
|
|
790
798
|
] }),
|
|
791
799
|
/* @__PURE__ */ s("div", { className: t.usageSection, children: [
|
|
792
800
|
/* @__PURE__ */ e("h4", { className: t.usageSectionTitle, children: "最近调用记录" }),
|
|
793
801
|
/* @__PURE__ */ e(
|
|
794
|
-
|
|
802
|
+
we,
|
|
795
803
|
{
|
|
796
804
|
columns: U,
|
|
797
|
-
dataSource:
|
|
805
|
+
dataSource: A.recent,
|
|
798
806
|
rowKey: "id",
|
|
799
807
|
size: "small",
|
|
800
808
|
pagination: {
|
|
@@ -825,16 +833,16 @@ function rt(a) {
|
|
|
825
833
|
const re = 4;
|
|
826
834
|
let lt = 0;
|
|
827
835
|
function it({ initialModels: a }) {
|
|
828
|
-
const [n, l] = S([]), [o, d] = S([]), [N, v] = S(!0), [
|
|
836
|
+
const [n, l] = S([]), [o, d] = S([]), [N, v] = S(!0), [f, k] = S(null), [K, B] = S(""), [C, T] = S(!1), _ = de(""), p = de(/* @__PURE__ */ new Map()), c = de(/* @__PURE__ */ new Map());
|
|
829
837
|
ae(() => {
|
|
830
838
|
(async () => {
|
|
831
839
|
try {
|
|
832
|
-
const r = await
|
|
840
|
+
const r = await Ke();
|
|
833
841
|
d(r), v(!1);
|
|
834
|
-
const u = a.length > 0 ? a : r.slice(0, 1).map((
|
|
835
|
-
l(u.slice(0, re).map((
|
|
842
|
+
const u = a.length > 0 ? a : r.slice(0, 1).map((w) => w.modelName);
|
|
843
|
+
l(u.slice(0, re).map((w) => me(w)));
|
|
836
844
|
} catch (r) {
|
|
837
|
-
v(!1),
|
|
845
|
+
v(!1), k(r instanceof Error ? r.message : "模型列表加载失败");
|
|
838
846
|
}
|
|
839
847
|
})();
|
|
840
848
|
}, []), ae(() => {
|
|
@@ -848,24 +856,24 @@ function it({ initialModels: a }) {
|
|
|
848
856
|
u && (u.scrollTop = u.scrollHeight);
|
|
849
857
|
}, []), i = H(
|
|
850
858
|
(r, u) => {
|
|
851
|
-
l((
|
|
859
|
+
l((w) => w.map((M) => M.id === r ? u(M) : M));
|
|
852
860
|
},
|
|
853
861
|
[]
|
|
854
|
-
),
|
|
855
|
-
if (
|
|
862
|
+
), A = H(async () => {
|
|
863
|
+
if (_.current) return _.current;
|
|
856
864
|
const r = await tt();
|
|
857
|
-
return
|
|
858
|
-
}, []),
|
|
859
|
-
const r =
|
|
865
|
+
return _.current = r, r;
|
|
866
|
+
}, []), b = H(async () => {
|
|
867
|
+
const r = K.trim();
|
|
860
868
|
if (!r || C) return;
|
|
861
869
|
let u;
|
|
862
870
|
try {
|
|
863
|
-
u = await
|
|
871
|
+
u = await A();
|
|
864
872
|
} catch {
|
|
865
873
|
return;
|
|
866
874
|
}
|
|
867
|
-
|
|
868
|
-
const
|
|
875
|
+
B(""), T(!0);
|
|
876
|
+
const w = n.map(($) => ({
|
|
869
877
|
...$,
|
|
870
878
|
messages: [
|
|
871
879
|
...$.messages,
|
|
@@ -877,9 +885,9 @@ function it({ initialModels: a }) {
|
|
|
877
885
|
error: null,
|
|
878
886
|
usage: null
|
|
879
887
|
}));
|
|
880
|
-
l(
|
|
881
|
-
const
|
|
882
|
-
|
|
888
|
+
l(w);
|
|
889
|
+
const M = w;
|
|
890
|
+
M.forEach(($) => {
|
|
883
891
|
const W = new AbortController();
|
|
884
892
|
p.current.set($.id, W);
|
|
885
893
|
const oe = $.messages.slice(0, -1);
|
|
@@ -905,7 +913,7 @@ function it({ initialModels: a }) {
|
|
|
905
913
|
})), p.current.delete($.id);
|
|
906
914
|
},
|
|
907
915
|
onError: (L) => {
|
|
908
|
-
(L.message.includes("401") || L.message.includes("API key")) && (
|
|
916
|
+
(L.message.includes("401") || L.message.includes("API key")) && (be(), _.current = ""), i($.id, (U) => ({
|
|
909
917
|
...U,
|
|
910
918
|
isStreaming: !1,
|
|
911
919
|
error: L.message
|
|
@@ -916,21 +924,21 @@ function it({ initialModels: a }) {
|
|
|
916
924
|
});
|
|
917
925
|
});
|
|
918
926
|
const J = setInterval(() => {
|
|
919
|
-
|
|
927
|
+
M.every(
|
|
920
928
|
(W) => !p.current.has(W.id)
|
|
921
929
|
) && (clearInterval(J), T(!1));
|
|
922
930
|
}, 200);
|
|
923
931
|
setTimeout(() => {
|
|
924
932
|
clearInterval(J), T(!1);
|
|
925
933
|
}, 300 * 1e3);
|
|
926
|
-
}, [
|
|
934
|
+
}, [K, C, n, A, i, g]), q = H(() => {
|
|
927
935
|
p.current.forEach((r) => r.abort()), p.current.clear(), l((r) => r.map((u) => ({ ...u, isStreaming: !1 }))), T(!1);
|
|
928
936
|
}, []), m = H(() => {
|
|
929
937
|
var u;
|
|
930
938
|
if (n.length >= re) return;
|
|
931
|
-
const r = (u = o.find((
|
|
932
|
-
r && l((
|
|
933
|
-
}, [n, o]),
|
|
939
|
+
const r = (u = o.find((w) => !n.some((M) => M.model === w.modelName))) == null ? void 0 : u.modelName;
|
|
940
|
+
r && l((w) => [...w, me(r)]);
|
|
941
|
+
}, [n, o]), I = H(() => {
|
|
934
942
|
p.current.forEach((r) => r.abort()), p.current.clear(), l(
|
|
935
943
|
(r) => r.map((u) => ({
|
|
936
944
|
...u,
|
|
@@ -943,21 +951,21 @@ function it({ initialModels: a }) {
|
|
|
943
951
|
), T(!1);
|
|
944
952
|
}, [C, n]), D = H((r) => {
|
|
945
953
|
const u = p.current.get(r);
|
|
946
|
-
u && u.abort(), p.current.delete(r), l((
|
|
954
|
+
u && u.abort(), p.current.delete(r), l((w) => w.filter((M) => M.id !== r));
|
|
947
955
|
}, []), E = H(
|
|
948
956
|
(r, u) => {
|
|
949
|
-
i(r, (
|
|
957
|
+
i(r, (w) => ({ ...w, model: u }));
|
|
950
958
|
},
|
|
951
959
|
[i]
|
|
952
960
|
), j = o.map((r) => ({
|
|
953
961
|
label: r.modelName,
|
|
954
962
|
value: r.modelName
|
|
955
963
|
}));
|
|
956
|
-
return N ? /* @__PURE__ */ e("div", { style: { textAlign: "center", padding: 60 }, children: /* @__PURE__ */ e(V, { tip: "加载模型列表..." }) }) :
|
|
964
|
+
return N ? /* @__PURE__ */ e("div", { style: { textAlign: "center", padding: 60 }, children: /* @__PURE__ */ e(V, { tip: "加载模型列表..." }) }) : f ? /* @__PURE__ */ s("div", { className: t.chatContainer, children: [
|
|
957
965
|
/* @__PURE__ */ e("div", { className: t.chatHeader, children: /* @__PURE__ */ e("h3", { className: t.chatTitle, children: "模型对话" }) }),
|
|
958
966
|
/* @__PURE__ */ s("div", { className: t.akEmpty, children: [
|
|
959
967
|
"模型列表加载失败:",
|
|
960
|
-
|
|
968
|
+
f
|
|
961
969
|
] })
|
|
962
970
|
] }) : /* @__PURE__ */ s("div", { className: t.chatContainer, children: [
|
|
963
971
|
/* @__PURE__ */ s("div", { className: t.chatHeader, children: [
|
|
@@ -973,7 +981,7 @@ function it({ initialModels: a }) {
|
|
|
973
981
|
{
|
|
974
982
|
size: "small",
|
|
975
983
|
icon: /* @__PURE__ */ e(Ie, {}),
|
|
976
|
-
onClick:
|
|
984
|
+
onClick: I,
|
|
977
985
|
disabled: C || n.every((r) => r.messages.length === 0),
|
|
978
986
|
children: "清空重新来"
|
|
979
987
|
}
|
|
@@ -1011,28 +1019,28 @@ function it({ initialModels: a }) {
|
|
|
1011
1019
|
c.current.set(r.id, u);
|
|
1012
1020
|
},
|
|
1013
1021
|
children: [
|
|
1014
|
-
r.messages.map((u,
|
|
1022
|
+
r.messages.map((u, w) => /* @__PURE__ */ s(
|
|
1015
1023
|
"div",
|
|
1016
1024
|
{
|
|
1017
1025
|
className: u.role === "user" ? t.chatMsgUser : t.chatMsgAI,
|
|
1018
1026
|
children: [
|
|
1019
1027
|
u.role === "assistant" ? rt(u.content).map(
|
|
1020
|
-
(
|
|
1028
|
+
(M, J) => M.type === "think" ? /* @__PURE__ */ s(
|
|
1021
1029
|
"details",
|
|
1022
1030
|
{
|
|
1023
1031
|
className: t.chatThinkBlock,
|
|
1024
1032
|
children: [
|
|
1025
1033
|
/* @__PURE__ */ e("summary", { children: "思考过程" }),
|
|
1026
|
-
/* @__PURE__ */ e("pre", { children:
|
|
1034
|
+
/* @__PURE__ */ e("pre", { children: M.text })
|
|
1027
1035
|
]
|
|
1028
1036
|
},
|
|
1029
1037
|
J
|
|
1030
|
-
) : /* @__PURE__ */ e("span", { style: { whiteSpace: "pre-wrap" }, children:
|
|
1038
|
+
) : /* @__PURE__ */ e("span", { style: { whiteSpace: "pre-wrap" }, children: M.text }, J)
|
|
1031
1039
|
) : /* @__PURE__ */ e("span", { style: { whiteSpace: "pre-wrap" }, children: u.content }),
|
|
1032
|
-
r.isStreaming &&
|
|
1040
|
+
r.isStreaming && w === r.messages.length - 1 && u.role === "assistant" && /* @__PURE__ */ e("span", { className: t.chatStreamingCursor })
|
|
1033
1041
|
]
|
|
1034
1042
|
},
|
|
1035
|
-
|
|
1043
|
+
w
|
|
1036
1044
|
)),
|
|
1037
1045
|
r.error && /* @__PURE__ */ e("div", { className: t.chatMsgError, children: r.error }),
|
|
1038
1046
|
r.usage && /* @__PURE__ */ s("div", { className: t.chatUsageBar, children: [
|
|
@@ -1056,17 +1064,17 @@ function it({ initialModels: a }) {
|
|
|
1056
1064
|
Se.TextArea,
|
|
1057
1065
|
{
|
|
1058
1066
|
className: t.chatInput,
|
|
1059
|
-
value:
|
|
1060
|
-
onChange: (r) =>
|
|
1067
|
+
value: K,
|
|
1068
|
+
onChange: (r) => B(r.target.value),
|
|
1061
1069
|
placeholder: "输入消息,所有面板将同时收到并流式输出...",
|
|
1062
1070
|
autoSize: { minRows: 1, maxRows: 4 },
|
|
1063
1071
|
onPressEnter: (r) => {
|
|
1064
|
-
r.shiftKey || (r.preventDefault(),
|
|
1072
|
+
r.shiftKey || (r.preventDefault(), b());
|
|
1065
1073
|
},
|
|
1066
1074
|
disabled: C
|
|
1067
1075
|
}
|
|
1068
1076
|
),
|
|
1069
|
-
C ? /* @__PURE__ */ e(z, { danger: !0, onClick: q, children: "停止" }) : /* @__PURE__ */ s(z, { type: "primary", onClick:
|
|
1077
|
+
C ? /* @__PURE__ */ e(z, { danger: !0, onClick: q, children: "停止" }) : /* @__PURE__ */ s(z, { type: "primary", onClick: b, disabled: !K.trim(), children: [
|
|
1070
1078
|
/* @__PURE__ */ e($e, {}),
|
|
1071
1079
|
" 发送"
|
|
1072
1080
|
] })
|
|
@@ -1085,24 +1093,24 @@ function me(a) {
|
|
|
1085
1093
|
};
|
|
1086
1094
|
}
|
|
1087
1095
|
function ot({ onStartChat: a }) {
|
|
1088
|
-
const [n, l] = S([]), [o, d] = S(!0), [N, v] = S(null), [
|
|
1089
|
-
d(!0), v(null),
|
|
1096
|
+
const [n, l] = S([]), [o, d] = S(!0), [N, v] = S(null), [f, k] = S(/* @__PURE__ */ new Set()), K = () => {
|
|
1097
|
+
d(!0), v(null), Ke().then((c) => {
|
|
1090
1098
|
l(c), d(!1);
|
|
1091
1099
|
}).catch((c) => {
|
|
1092
1100
|
l([]), v(c instanceof Error ? c.message : "加载失败"), d(!1);
|
|
1093
1101
|
});
|
|
1094
1102
|
};
|
|
1095
1103
|
ae(() => {
|
|
1096
|
-
|
|
1104
|
+
K();
|
|
1097
1105
|
}, []);
|
|
1098
|
-
const
|
|
1099
|
-
|
|
1106
|
+
const B = (c) => {
|
|
1107
|
+
k((g) => {
|
|
1100
1108
|
const i = new Set(g);
|
|
1101
1109
|
return i.has(c) ? i.delete(c) : i.add(c), i;
|
|
1102
1110
|
});
|
|
1103
|
-
}, C = Array.from(
|
|
1111
|
+
}, C = Array.from(f), T = (c) => {
|
|
1104
1112
|
a([c]);
|
|
1105
|
-
},
|
|
1113
|
+
}, _ = () => {
|
|
1106
1114
|
C.length > 0 && a(C);
|
|
1107
1115
|
}, p = (c) => {
|
|
1108
1116
|
if (!c) return "default";
|
|
@@ -1117,7 +1125,7 @@ function ot({ onStartChat: a }) {
|
|
|
1117
1125
|
/* @__PURE__ */ s("div", { className: t.akEmpty, children: [
|
|
1118
1126
|
"模型列表加载失败:",
|
|
1119
1127
|
N,
|
|
1120
|
-
/* @__PURE__ */ e("div", { style: { marginTop: 16 }, children: /* @__PURE__ */ e(z, { type: "primary", onClick:
|
|
1128
|
+
/* @__PURE__ */ e("div", { style: { marginTop: 16 }, children: /* @__PURE__ */ e(z, { type: "primary", onClick: K, children: "重试" }) })
|
|
1121
1129
|
] })
|
|
1122
1130
|
] }) : /* @__PURE__ */ s("div", { children: [
|
|
1123
1131
|
/* @__PURE__ */ s("div", { className: t.modelMgmtHeader, children: [
|
|
@@ -1126,12 +1134,12 @@ function ot({ onStartChat: a }) {
|
|
|
1126
1134
|
] }),
|
|
1127
1135
|
n.length === 0 && /* @__PURE__ */ e("div", { className: t.akEmpty, children: "后端暂无启用模型(z_team_model_config 中 enable=1 的行),请先在数据库或网关配置中启用" }),
|
|
1128
1136
|
/* @__PURE__ */ e("div", { className: t.modelGrid, children: n.map((c) => {
|
|
1129
|
-
const g =
|
|
1137
|
+
const g = f.has(c.modelName);
|
|
1130
1138
|
return /* @__PURE__ */ s(
|
|
1131
1139
|
"div",
|
|
1132
1140
|
{
|
|
1133
1141
|
className: `${t.modelCard} ${g ? t.modelCardSelected : ""}`,
|
|
1134
|
-
onClick: () =>
|
|
1142
|
+
onClick: () => B(c.modelName),
|
|
1135
1143
|
children: [
|
|
1136
1144
|
/* @__PURE__ */ e(
|
|
1137
1145
|
qe,
|
|
@@ -1139,7 +1147,7 @@ function ot({ onStartChat: a }) {
|
|
|
1139
1147
|
className: t.modelCheckbox,
|
|
1140
1148
|
checked: g,
|
|
1141
1149
|
onChange: (i) => {
|
|
1142
|
-
i.stopPropagation(),
|
|
1150
|
+
i.stopPropagation(), B(c.modelName);
|
|
1143
1151
|
}
|
|
1144
1152
|
}
|
|
1145
1153
|
),
|
|
@@ -1187,7 +1195,7 @@ function ot({ onStartChat: a }) {
|
|
|
1187
1195
|
z,
|
|
1188
1196
|
{
|
|
1189
1197
|
type: "primary",
|
|
1190
|
-
onClick:
|
|
1198
|
+
onClick: _,
|
|
1191
1199
|
disabled: C.length === 0,
|
|
1192
1200
|
children: "批量对比"
|
|
1193
1201
|
}
|
|
@@ -1274,32 +1282,32 @@ const St = [
|
|
|
1274
1282
|
render: (a) => a ? /* @__PURE__ */ e(G, { color: a < 400 ? "green" : "red", children: a }) : "-"
|
|
1275
1283
|
}
|
|
1276
1284
|
];
|
|
1277
|
-
function
|
|
1285
|
+
function At(a) {
|
|
1278
1286
|
var n;
|
|
1279
1287
|
return ((n = a == null ? void 0 : a.stats) == null ? void 0 : n.recent) ?? [];
|
|
1280
1288
|
}
|
|
1281
|
-
function
|
|
1282
|
-
var p, c, g, i,
|
|
1283
|
-
const [a, n] = S(!0), [l, o] = S(null), [d, N] = S([]), [v,
|
|
1289
|
+
function wt() {
|
|
1290
|
+
var p, c, g, i, A, b, q;
|
|
1291
|
+
const [a, n] = S(!0), [l, o] = S(null), [d, N] = S([]), [v, f] = S(null), [k, K] = S(null), B = H(async () => {
|
|
1284
1292
|
n(!0), o(null);
|
|
1285
1293
|
try {
|
|
1286
1294
|
const m = await Promise.allSettled(
|
|
1287
1295
|
Tt.map((u) => ie(u))
|
|
1288
|
-
),
|
|
1296
|
+
), I = [];
|
|
1289
1297
|
let D = 0;
|
|
1290
1298
|
for (const u of m)
|
|
1291
|
-
u.status === "fulfilled" ?
|
|
1299
|
+
u.status === "fulfilled" ? I.push(...u.value) : D += 1;
|
|
1292
1300
|
if (D === m.length)
|
|
1293
1301
|
throw new Error("网关不可达:无法获取 AK 列表");
|
|
1294
|
-
|
|
1302
|
+
I.sort((u, w) => (u.id ?? 0) - (w.id ?? 0));
|
|
1295
1303
|
let E = null, j = null;
|
|
1296
1304
|
try {
|
|
1297
|
-
E = await
|
|
1305
|
+
E = await Me(0);
|
|
1298
1306
|
} catch (u) {
|
|
1299
1307
|
j = u instanceof Error ? u.message : "获取用量失败";
|
|
1300
1308
|
}
|
|
1301
|
-
|
|
1302
|
-
const r =
|
|
1309
|
+
f(E);
|
|
1310
|
+
const r = I.map((u) => ({
|
|
1303
1311
|
key: u,
|
|
1304
1312
|
stats: E,
|
|
1305
1313
|
statsError: j
|
|
@@ -1312,30 +1320,30 @@ function At() {
|
|
|
1312
1320
|
}
|
|
1313
1321
|
}, []);
|
|
1314
1322
|
ae(() => {
|
|
1315
|
-
|
|
1316
|
-
}, [
|
|
1323
|
+
B();
|
|
1324
|
+
}, [B]);
|
|
1317
1325
|
const C = xe(() => {
|
|
1318
|
-
const m = v,
|
|
1326
|
+
const m = v, I = {};
|
|
1319
1327
|
for (const [D, E] of Object.entries((m == null ? void 0 : m.models) ?? {}))
|
|
1320
|
-
|
|
1328
|
+
I[D] = [E[0] ?? 0, E[1] ?? 0, E[2] ?? 0];
|
|
1321
1329
|
return {
|
|
1322
1330
|
requests: (m == null ? void 0 : m.totalRequests) ?? 0,
|
|
1323
1331
|
tokens: (m == null ? void 0 : m.totalTokens) ?? 0,
|
|
1324
1332
|
avgLatency: (m == null ? void 0 : m.avgLatencyMs) ?? 0,
|
|
1325
1333
|
errors: (m == null ? void 0 : m.errorCount) ?? 0,
|
|
1326
|
-
models:
|
|
1334
|
+
models: I
|
|
1327
1335
|
};
|
|
1328
|
-
}, [v]), T = d.reduce((m,
|
|
1336
|
+
}, [v]), T = d.reduce((m, I) => m + (I.key.tokenQuota || 0), 0), _ = () => a ? /* @__PURE__ */ e("div", { style: { textAlign: "center", padding: 60 }, children: /* @__PURE__ */ e(V, { tip: "加载监控数据..." }) }) : l ? /* @__PURE__ */ s("div", { className: O.errorState, children: [
|
|
1329
1337
|
/* @__PURE__ */ e("div", { className: O.errorTitle, children: "模型监控数据加载失败" }),
|
|
1330
1338
|
/* @__PURE__ */ e("div", { className: O.errorDetail, children: l }),
|
|
1331
|
-
/* @__PURE__ */ e(z, { icon: /* @__PURE__ */ e(Ne, {}), onClick:
|
|
1339
|
+
/* @__PURE__ */ e(z, { icon: /* @__PURE__ */ e(Ne, {}), onClick: B, type: "primary", children: "重试" })
|
|
1332
1340
|
] }) : /* @__PURE__ */ s("div", { className: O.page, children: [
|
|
1333
1341
|
/* @__PURE__ */ s("div", { className: O.kpiGrid, children: [
|
|
1334
|
-
/* @__PURE__ */ e("div", { className: O.kpiCard, children: /* @__PURE__ */ e(
|
|
1335
|
-
/* @__PURE__ */ e("div", { className: O.kpiCard, children: /* @__PURE__ */ e(
|
|
1336
|
-
/* @__PURE__ */ e("div", { className: O.kpiCard, children: /* @__PURE__ */ e(
|
|
1342
|
+
/* @__PURE__ */ e("div", { className: O.kpiCard, children: /* @__PURE__ */ e(P, { title: "总请求(近7天)", value: C.requests }) }),
|
|
1343
|
+
/* @__PURE__ */ e("div", { className: O.kpiCard, children: /* @__PURE__ */ e(P, { title: "总 Tokens", value: te(C.tokens) }) }),
|
|
1344
|
+
/* @__PURE__ */ e("div", { className: O.kpiCard, children: /* @__PURE__ */ e(P, { title: "平均延迟", value: C.avgLatency, suffix: "ms" }) }),
|
|
1337
1345
|
/* @__PURE__ */ e("div", { className: O.kpiCard, children: /* @__PURE__ */ e(
|
|
1338
|
-
|
|
1346
|
+
P,
|
|
1339
1347
|
{
|
|
1340
1348
|
title: "错误数",
|
|
1341
1349
|
value: C.errors,
|
|
@@ -1353,12 +1361,12 @@ function At() {
|
|
|
1353
1361
|
] })
|
|
1354
1362
|
] }),
|
|
1355
1363
|
d.length === 0 ? /* @__PURE__ */ e("div", { className: t.akEmpty, children: "网关下暂无 AK" }) : /* @__PURE__ */ e("div", { className: O.akList, children: d.map((m) => {
|
|
1356
|
-
const
|
|
1364
|
+
const I = m.key.totalTokens ?? 0, D = m.key.tokenQuota || 0, E = D > 0 ? Math.min(I / D * 100, 100) : 0;
|
|
1357
1365
|
return /* @__PURE__ */ s(
|
|
1358
1366
|
"div",
|
|
1359
1367
|
{
|
|
1360
1368
|
className: t.akCard,
|
|
1361
|
-
onClick: () =>
|
|
1369
|
+
onClick: () => K(m),
|
|
1362
1370
|
children: [
|
|
1363
1371
|
/* @__PURE__ */ s("div", { className: t.akCardRow, children: [
|
|
1364
1372
|
/* @__PURE__ */ e("span", { className: t.akTitle, children: m.key.description || m.key.userName || `AK #${m.key.id}` }),
|
|
@@ -1381,7 +1389,7 @@ function At() {
|
|
|
1381
1389
|
}
|
|
1382
1390
|
) }),
|
|
1383
1391
|
/* @__PURE__ */ s("span", { className: t.akUsageText, children: [
|
|
1384
|
-
te(
|
|
1392
|
+
te(I),
|
|
1385
1393
|
D > 0 ? ` / ${te(D)}` : "",
|
|
1386
1394
|
" tokens"
|
|
1387
1395
|
] }),
|
|
@@ -1401,14 +1409,14 @@ function At() {
|
|
|
1401
1409
|
return /* @__PURE__ */ s("div", { className: O.container, children: [
|
|
1402
1410
|
/* @__PURE__ */ s("div", { className: t.modelMgmtHeader, children: [
|
|
1403
1411
|
/* @__PURE__ */ e("h2", { className: t.modelMgmtTitle, children: "模型监控" }),
|
|
1404
|
-
/* @__PURE__ */ e("p", { className: t.modelMgmtSubtitle, children: "大模型网关管控视图 —
|
|
1412
|
+
/* @__PURE__ */ e("p", { className: t.modelMgmtSubtitle, children: "大模型网关管控视图 — 网关全局聚合调用量、Tokens 与延迟(近 7 天)" })
|
|
1405
1413
|
] }),
|
|
1406
1414
|
/* @__PURE__ */ e(
|
|
1407
1415
|
Ce,
|
|
1408
1416
|
{
|
|
1409
1417
|
defaultActiveKey: "usage",
|
|
1410
1418
|
items: [
|
|
1411
|
-
{ key: "usage", label: "模型用量", children:
|
|
1419
|
+
{ key: "usage", label: "模型用量", children: _() },
|
|
1412
1420
|
{
|
|
1413
1421
|
key: "sessions",
|
|
1414
1422
|
label: "会话统计",
|
|
@@ -1418,45 +1426,53 @@ function At() {
|
|
|
1418
1426
|
}
|
|
1419
1427
|
),
|
|
1420
1428
|
/* @__PURE__ */ e(
|
|
1421
|
-
|
|
1429
|
+
Ae,
|
|
1422
1430
|
{
|
|
1423
|
-
title:
|
|
1431
|
+
title: k ? `AK 用量 — ${k.key.description || k.key.akPrefix}` : "",
|
|
1424
1432
|
width: 860,
|
|
1425
|
-
open: !!
|
|
1426
|
-
onClose: () =>
|
|
1433
|
+
open: !!k,
|
|
1434
|
+
onClose: () => K(null),
|
|
1427
1435
|
destroyOnHidden: !0,
|
|
1428
|
-
children:
|
|
1436
|
+
children: k && /* @__PURE__ */ s("div", { className: t.usageDrawerContent, children: [
|
|
1437
|
+
/* @__PURE__ */ e("div", { style: { fontSize: 12, color: "#8c8c8c", marginBottom: 12 }, children: "调用监控是网关全局维度(不按 AK 留存),以下统计覆盖全部 AK; 该 AK 自身的累计消耗见「本 AK 累计 Token」。" }),
|
|
1429
1438
|
/* @__PURE__ */ s("div", { className: t.usageStatsGrid, children: [
|
|
1430
|
-
/* @__PURE__ */ e(
|
|
1431
|
-
/* @__PURE__ */ e(
|
|
1432
|
-
/* @__PURE__ */ e(
|
|
1433
|
-
/* @__PURE__ */ e(
|
|
1434
|
-
/* @__PURE__ */ e(
|
|
1439
|
+
/* @__PURE__ */ e(P, { title: "总请求", value: ((p = k.stats) == null ? void 0 : p.totalRequests) ?? 0 }),
|
|
1440
|
+
/* @__PURE__ */ e(P, { title: "总 Tokens", value: ((c = k.stats) == null ? void 0 : c.totalTokens) ?? 0 }),
|
|
1441
|
+
/* @__PURE__ */ e(P, { title: "平均延迟", value: ((g = k.stats) == null ? void 0 : g.avgLatencyMs) ?? 0, suffix: "ms" }),
|
|
1442
|
+
/* @__PURE__ */ e(P, { title: "输入 Tokens", value: ((i = k.stats) == null ? void 0 : i.totalPromptTokens) ?? 0 }),
|
|
1443
|
+
/* @__PURE__ */ e(P, { title: "输出 Tokens", value: ((A = k.stats) == null ? void 0 : A.totalCompletionTokens) ?? 0 }),
|
|
1444
|
+
/* @__PURE__ */ e(
|
|
1445
|
+
P,
|
|
1446
|
+
{
|
|
1447
|
+
title: "本 AK 累计 Token",
|
|
1448
|
+
value: k.key.totalTokens ?? 0
|
|
1449
|
+
}
|
|
1450
|
+
),
|
|
1435
1451
|
/* @__PURE__ */ e(
|
|
1436
|
-
|
|
1452
|
+
P,
|
|
1437
1453
|
{
|
|
1438
1454
|
title: "错误数",
|
|
1439
|
-
value: ((
|
|
1440
|
-
valueStyle: (((q =
|
|
1455
|
+
value: ((b = k.stats) == null ? void 0 : b.errorCount) ?? 0,
|
|
1456
|
+
valueStyle: (((q = k.stats) == null ? void 0 : q.errorCount) ?? 0) > 0 ? { color: "#ff4d4f" } : void 0
|
|
1441
1457
|
}
|
|
1442
1458
|
)
|
|
1443
1459
|
] }),
|
|
1444
1460
|
/* @__PURE__ */ s("div", { className: t.usageSection, children: [
|
|
1445
|
-
/* @__PURE__ */ e("span", { className: t.usageSectionTitle, children: "
|
|
1446
|
-
|
|
1461
|
+
/* @__PURE__ */ e("span", { className: t.usageSectionTitle, children: "每日用量(按最近调用明细聚合)" }),
|
|
1462
|
+
k.stats ? /* @__PURE__ */ e(Ct, { daily: k.stats.daily ?? {} }) : /* @__PURE__ */ e("span", { className: t.usageEmpty, children: k.statsError ?? "暂无数据" })
|
|
1447
1463
|
] }),
|
|
1448
1464
|
/* @__PURE__ */ s("div", { className: t.usageSection, children: [
|
|
1449
|
-
/* @__PURE__ */ e("span", { className: t.usageSectionTitle, children: "
|
|
1450
|
-
|
|
1465
|
+
/* @__PURE__ */ e("span", { className: t.usageSectionTitle, children: "模型用量分布(按最近调用明细聚合)" }),
|
|
1466
|
+
k.stats ? /* @__PURE__ */ e(ye, { models: k.stats.models ?? {} }) : /* @__PURE__ */ e("span", { className: t.usageEmpty, children: k.statsError ?? "暂无数据" })
|
|
1451
1467
|
] }),
|
|
1452
1468
|
/* @__PURE__ */ s("div", { className: t.usageSection, children: [
|
|
1453
1469
|
/* @__PURE__ */ e("span", { className: t.usageSectionTitle, children: "最近调用" }),
|
|
1454
1470
|
/* @__PURE__ */ e(
|
|
1455
|
-
|
|
1471
|
+
we,
|
|
1456
1472
|
{
|
|
1457
1473
|
size: "small",
|
|
1458
1474
|
columns: St,
|
|
1459
|
-
dataSource:
|
|
1475
|
+
dataSource: At(k),
|
|
1460
1476
|
rowKey: "id",
|
|
1461
1477
|
pagination: {
|
|
1462
1478
|
pageSize: 8,
|
|
@@ -1482,28 +1498,28 @@ const xt = [
|
|
|
1482
1498
|
{ key: "model-monitor", label: "模型监控", icon: /* @__PURE__ */ e(Ue, {}) }
|
|
1483
1499
|
];
|
|
1484
1500
|
function It() {
|
|
1485
|
-
const [a, n] = S("model-management"), [l, o] = S([]), d = (
|
|
1486
|
-
o(
|
|
1487
|
-
}, N = xe(() => xt, []), v = (
|
|
1501
|
+
const [a, n] = S("model-management"), [l, o] = S([]), d = (f) => {
|
|
1502
|
+
o(f), n("model-chat");
|
|
1503
|
+
}, N = xe(() => xt, []), v = (f, k, K = !1) => /* @__PURE__ */ e(
|
|
1488
1504
|
"div",
|
|
1489
1505
|
{
|
|
1490
1506
|
style: {
|
|
1491
|
-
display: a ===
|
|
1507
|
+
display: a === f ? K ? "flex" : "block" : "none",
|
|
1492
1508
|
height: "100%",
|
|
1493
|
-
...
|
|
1509
|
+
...K ? { flexDirection: "column" } : {}
|
|
1494
1510
|
},
|
|
1495
|
-
children:
|
|
1511
|
+
children: k
|
|
1496
1512
|
}
|
|
1497
1513
|
);
|
|
1498
1514
|
return /* @__PURE__ */ s("div", { className: t.container, children: [
|
|
1499
|
-
/* @__PURE__ */ e("aside", { className: t.sidebar, children: /* @__PURE__ */ e("nav", { className: t.menuList, children: N.map((
|
|
1515
|
+
/* @__PURE__ */ e("aside", { className: t.sidebar, children: /* @__PURE__ */ e("nav", { className: t.menuList, children: N.map((f) => /* @__PURE__ */ e(Q, { title: f.label, placement: "right", children: /* @__PURE__ */ e(
|
|
1500
1516
|
"div",
|
|
1501
1517
|
{
|
|
1502
|
-
className: `${t.menuItem} ${a ===
|
|
1503
|
-
onClick: () => n(
|
|
1504
|
-
children: /* @__PURE__ */ e("span", { className: t.menuIcon, children:
|
|
1518
|
+
className: `${t.menuItem} ${a === f.key ? t.menuItemActive : ""}`,
|
|
1519
|
+
onClick: () => n(f.key),
|
|
1520
|
+
children: /* @__PURE__ */ e("span", { className: t.menuIcon, children: f.icon })
|
|
1505
1521
|
}
|
|
1506
|
-
) },
|
|
1522
|
+
) }, f.key)) }) }),
|
|
1507
1523
|
/* @__PURE__ */ s("main", { className: t.panelArea, children: [
|
|
1508
1524
|
v("model-management", /* @__PURE__ */ e(ot, { onStartChat: d })),
|
|
1509
1525
|
v("model-chat", /* @__PURE__ */ e(it, { initialModels: l }), !0),
|
|
@@ -1511,7 +1527,7 @@ function It() {
|
|
|
1511
1527
|
v("agent-app", /* @__PURE__ */ e(Ge, {})),
|
|
1512
1528
|
v("mcp-service", /* @__PURE__ */ e(Je, {})),
|
|
1513
1529
|
v("skill-market", /* @__PURE__ */ e(Qe, {})),
|
|
1514
|
-
v("model-monitor", /* @__PURE__ */ e(
|
|
1530
|
+
v("model-monitor", /* @__PURE__ */ e(wt, {}))
|
|
1515
1531
|
] })
|
|
1516
1532
|
] });
|
|
1517
1533
|
}
|
|
@@ -3,7 +3,7 @@ import { useNavigate as G, useParams as pe, useLocation as he, useRoutes as ue }
|
|
|
3
3
|
import { useState as _, useEffect as M, useMemo as me } from "react";
|
|
4
4
|
import { RocketOutlined as ye, AppstoreOutlined as le, BellOutlined as ae, PlayCircleOutlined as V, CheckCircleOutlined as Q, CloseCircleOutlined as X, BulbOutlined as Y, PlusOutlined as B, EditOutlined as ge, CopyOutlined as ne, DeleteOutlined as fe, ArrowLeftOutlined as be, SaveOutlined as we, ReloadOutlined as Ie, ShopOutlined as ie, StarFilled as _e, CloudDownloadOutlined as ke, DashboardOutlined as ve, InfoCircleOutlined as xe } from "@ant-design/icons";
|
|
5
5
|
import { Typography as $, Row as H, Col as O, Card as F, Statistic as P, Table as se, Tag as b, Form as h, Input as N, Button as y, Space as S, Popconfirm as de, Drawer as J, Select as z, message as g, Tabs as Ce, InputNumber as Te, Switch as Ae, Descriptions as R, Timeline as Ee, Spin as Ne } from "antd";
|
|
6
|
-
import { r as w } from "./ComponentDoc-
|
|
6
|
+
import { r as w } from "./ComponentDoc-DtDTj8G-.js";
|
|
7
7
|
import { ListTable as K } from "@yuku123/z-frontend-common/ui";
|
|
8
8
|
const { Title: Se, Paragraph: Oe } = $;
|
|
9
9
|
function q() {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsxs as a, jsx as e, Fragment as vt } from "react/jsx-runtime";
|
|
2
2
|
import { a as Se, v as Qe, f as Be, B as Oe, u as dn, T as Ut, ai as To, K as kn, t as Dt, aj as en, ak as Lo, al as xo, c as $o, ag as Po, am as to, k as It, an as Ao, y as Mo, H as Eo, i as no, ao as Do, o as Fo, l as Ro, n as Bo, m as Oo, e as jo, ap as Wo } from "./api-C78tCfne.js";
|
|
3
3
|
import { s as Ho, r as tn, f as Uo } from "./ctc-sso-DtJHC-2M.js";
|
|
4
|
-
import { i as zo } from "./ComponentDoc-
|
|
4
|
+
import { i as zo } from "./ComponentDoc-DtDTj8G-.js";
|
|
5
5
|
import { r as Go, h as Tn, s as Ln } from "./sso-user-Bi9_l9yi.js";
|
|
6
6
|
import { Input as Gt, Tooltip as qt, Spin as ot, Tabs as Nn, Popconfirm as fn, Button as ft, Empty as nn, Modal as Kt, Form as Wt, Checkbox as qo, Tag as Ko, Select as Vo, Popover as Jo, Dropdown as Yo, Avatar as Qo, message as xn } from "antd";
|
|
7
7
|
import zt from "query-string";
|
|
@@ -5074,7 +5074,7 @@ const il = "_layout_i9evc_1", cl = "_banner_i9evc_8", ll = "_bannerLeft_i9evc_20
|
|
|
5074
5074
|
modeToggleBtn: cd,
|
|
5075
5075
|
modeToggleBtnActive: ld,
|
|
5076
5076
|
smartWorkbenchArea: dd
|
|
5077
|
-
}, md = it(() => import("./index-
|
|
5077
|
+
}, md = it(() => import("./index-CtxZJJXW.js")), ud = it(() => import("./index-C66-7XZO.js")), pd = it(() => import("./index-BAK7UDvY.js")), hd = it(() => import("./index-Cr1LrASF.js").then((t) => t.i)), fd = it(() => import("./index-CcpWacSZ.js")), gd = it(() => import("./index-BfRlRsfj.js")), yd = it(() => import("./index-C0EIMJI2.js")), _d = it(() => import("./index-D4tQ0KN9.js")), vd = it(() => import("./index-CK695ZYz.js")), kd = it(() => import("./index-JMzBzwiO.js")), Yn = it(() => import("./SystemShell-BBK1x8og.js")), bd = `${window.publicPath ?? "/"}logo.svg`, wd = [
|
|
5078
5078
|
"/ctc/",
|
|
5079
5079
|
"/ai/",
|
|
5080
5080
|
"/config/",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { AppLayout as H, ErrorBoundary as _, LoginPage as j, StatusTag as z, defaultStatusMap as F } from "@yuku123/z-frontend-common";
|
|
2
|
-
import { a as y } from "./ComponentDoc-
|
|
3
|
-
import { b as J, E as Q, c as X, M as Y, d as Z, O as $, e as ee, R as te, f as re, g as ae, T as oe, h as ne, r as le, r as ie, s as se } from "./ComponentDoc-
|
|
2
|
+
import { a as y } from "./ComponentDoc-DtDTj8G-.js";
|
|
3
|
+
import { b as J, E as Q, c as X, M as Y, d as Z, O as $, e as ee, R as te, f as re, g as ae, T as oe, h as ne, r as le, r as ie, s as se } from "./ComponentDoc-DtDTj8G-.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 T } from "react";
|
|
6
6
|
import { Alert as I, Space as g, Button as l, Tag as c, Result as R } from "antd";
|
|
@@ -8,7 +8,7 @@ import Vp from "rehype-highlight";
|
|
|
8
8
|
import gp from "remark-gfm";
|
|
9
9
|
import { ag as la, ah as KA } from "./api-C78tCfne.js";
|
|
10
10
|
import { u as Dp } from "./useAppStore-ibJyVIAX.js";
|
|
11
|
-
import { f as xa, u as jA, c as oA, r as fA, a as lA, b as xA, d as iA, e as cA, w as hp, i as TA, g as up, t as Yp, h as yp, j as vA, k as FA, l as dA, m as OA } from "./index-
|
|
11
|
+
import { f as xa, u as jA, c as oA, r as fA, a as lA, b as xA, d as iA, e as cA, w as hp, i as TA, g as up, t as Yp, h as yp, j as vA, k as FA, l as dA, m as OA } from "./index-CVXAthwM.js";
|
|
12
12
|
import { u as XA, a as RA, f as NA, b as kA, d as Ip, e as WA, g as DA, r as qA, h as uA, i as mA, j as wA, k as BA, l as GA, m as LA, n as zA } from "./createWorkspaceWsHandler-mq-UTF2O.js";
|
|
13
13
|
import { h as r } from "./index.module-CAa-2T7m.js";
|
|
14
14
|
const VA = "_editorView_as93v_7", gA = "_editorTopBar_as93v_16", JA = "_backBtn_as93v_25", bA = "_titleInput_as93v_39", MA = "_summaryBar_as93v_50", sA = "_summaryInput_as93v_55", QA = "_mdToolbar_as93v_67", hA = "_mdBtn_as93v_77", YA = "_mdSep_as93v_84", yA = "_editorBody_as93v_93", IA = "_tocPanel_as93v_100", CA = "_tocHeader_as93v_108", ZA = "_tocList_as93v_117", EA = "_tocItem_as93v_122", _A = "_tocEmpty_as93v_137", $A = "_textarea_as93v_144", pt = "_half_as93v_160", at = "_preview_as93v_163", At = "_markdown_as93v_173", tt = "_videoEmbed_as93v_185", w = {
|
|
@@ -1682,7 +1682,7 @@ const Xt = [
|
|
|
1682
1682
|
draftDeleteBtn: c0,
|
|
1683
1683
|
markdown: T0
|
|
1684
1684
|
}, v0 = rA(
|
|
1685
|
-
() => import("./index-
|
|
1685
|
+
() => import("./index-D_j2Qydx.js").then((a) => ({ default: a.MarketContent }))
|
|
1686
1686
|
);
|
|
1687
1687
|
function F0(a) {
|
|
1688
1688
|
const n = [], l = a.split(`
|
|
@@ -4,7 +4,7 @@ import { RightOutlined as ts, PlusOutlined as cn, LeftOutlined as sl, CheckOutli
|
|
|
4
4
|
import { createElement as Pl, useState as o, useRef as Ae, useMemo as Le, useEffect as oe, useCallback as F, Fragment as Ol } from "react";
|
|
5
5
|
import { createPortal as Hl } from "react-dom";
|
|
6
6
|
import { a as Yt, f as Qt, B as Xt, u as Zt, au as jl, av as qn, k as yt, aw as Fl, t as _s, ax as Gl, ay as zl, az as Ul, K as Wl, aA as gs, aB as ql, aC as Kl, q as Vl, aD as Jl, am as Yl, T as Ql, ao as fs, aE as Xl, aF as ys, aG as Zl, aH as eo, aI as to, aJ as no, aK as vs, aL as ao } from "./api-C78tCfne.js";
|
|
7
|
-
import { n as bs, o as $n, p as so, q as lo, s as oo, v as io, x as ro, y as Ns, z as _a, A as ks, B as co, C as Cs, D as Kn, E as uo, F as mo, G as ho } from "./index-
|
|
7
|
+
import { n as bs, o as $n, p as so, q as lo, s as oo, v as io, x as ro, y as Ns, z as _a, A as ks, B as co, C as Cs, D as Kn, E as uo, F as mo, G as ho } from "./index-CVXAthwM.js";
|
|
8
8
|
import { u as Ye, s as mn } from "./useAppStore-ibJyVIAX.js";
|
|
9
9
|
import { s as po } from "./admin-logs-D6HtRcK6.js";
|
|
10
10
|
import { h as Tn, b as _o, f as go, s as fo, c as yo, d as vo, u as bo, e as No, t as ko, r as Co, m as wo, a as So } from "./schedule-Dstx5SE_.js";
|
|
@@ -7,7 +7,7 @@ import { message as U, Input as H, Tooltip as se, Button as g, Spin as ce, Empty
|
|
|
7
7
|
import ve from "react-markdown";
|
|
8
8
|
import _e from "rehype-highlight";
|
|
9
9
|
import ge from "remark-gfm";
|
|
10
|
-
import { M as oa } from "./index-
|
|
10
|
+
import { M as oa } from "./index-Cr1LrASF.js";
|
|
11
11
|
function j(a) {
|
|
12
12
|
return a ? `?token=${encodeURIComponent(a)}` : "";
|
|
13
13
|
}
|
package/dist/index.js
CHANGED
package/dist/pages.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { createElement as e } from "react";
|
|
2
2
|
import { ReadOutlined as t } from "@ant-design/icons";
|
|
3
|
-
import { S as o, P as a, C as r, Z as m } from "./ComponentDoc-
|
|
3
|
+
import { S as o, P as a, C as r, Z as m } from "./ComponentDoc-DtDTj8G-.js";
|
|
4
4
|
import "react/jsx-runtime";
|
|
5
5
|
import "react-router-dom";
|
|
6
6
|
import "antd";
|