@yuku123/z-team-component 0.2.102 → 0.2.104
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/{ChangeLogView-BIlT58NX.js → ChangeLogView-DG-ogBff.js} +1 -1
- package/dist/{ComponentDoc-bhNM4jiY.js → ComponentDoc-BW1SyDxk.js} +3 -3
- package/dist/{InvitationManagementPage-9AmXUw6E.js → InvitationManagementPage-hYvoPEcm.js} +1 -1
- package/dist/{OnboardingPage-B9oWippy.js → OnboardingPage-KDp-DrzY.js} +2 -2
- package/dist/{ScheduledTasks-CkNxtgeb.js → ScheduledTasks-CErSDgyW.js} +6 -6
- package/dist/{SystemShell-Cz3bn2dt.js → SystemShell-DvrY4Bl7.js} +4 -4
- package/dist/{admin-logs-BuwxECUY.js → admin-logs-uPnnclwN.js} +1 -1
- package/dist/{api-DL_MM5cW.js → api-B__qdRIf.js} +1 -1
- package/dist/{createWorkspaceWsHandler-B6LYCL3Q.js → createWorkspaceWsHandler-BXbn5-Ft.js} +3 -3
- package/dist/{index-B5F1N9_V.js → index-0smeCTnr.js} +6 -6
- package/dist/{index-B1AYMWHS.js → index-2isWwv1X.js} +8 -8
- package/dist/{index-BPqoN-aE.js → index-BC8f-JP9.js} +3 -3
- package/dist/{index-2dGExnjZ.js → index-BK3YDeXH.js} +6 -6
- package/dist/{index-mwtsohOK.js → index-BOJm25by.js} +208 -160
- package/dist/{index-BdmM-NHL.js → index-BnJ8UEeZ.js} +3 -3
- package/dist/{index-BmHFHD_e.js → index-BwJPAN8f.js} +3 -3
- package/dist/{index-C1wsTstT.js → index-ByhCWenF.js} +1 -1
- package/dist/{index-BTs7b4SV.js → index-C2_tfpEj.js} +2 -2
- package/dist/{index-DU-PHfEr.js → index-C9fGup9t.js} +3 -3
- package/dist/{index-BZBxvwcT.js → index-Cb88Xdh4.js} +3 -3
- package/dist/{index-BYMhgsLe.js → index-Cih0yoxc.js} +2 -2
- package/dist/{index-DKgyKXWm.js → index-CkWKJORv.js} +582 -577
- package/dist/{index-DvTMESfc.js → index-CsaGecGX.js} +2 -2
- package/dist/{index-fl0m6QYf.js → index-D-xPVrY3.js} +1 -1
- package/dist/{index-CsweV-yM.js → index-DAGa9v8r.js} +2 -2
- package/dist/{index-qd4awhFI.js → index-DBnH-lRh.js} +1 -1
- package/dist/{index-DQHEr9-I.js → index-DIFIvVWE.js} +2 -2
- package/dist/{index-lux3nNJP.js → index-DOgCfVB2.js} +2 -2
- package/dist/{index-D3vyICxK.js → index-DcurzowX.js} +4 -4
- package/dist/{index-BZCQSW-G.js → index-Dpii3P5J.js} +523 -443
- package/dist/{index-C1wtrBjM.js → index-DtHoMz1H.js} +1 -1
- package/dist/{index-CbH8YeqA.js → index-YVtm1SRy.js} +2 -2
- package/dist/{index-BIXeUFLa.js → index-aI2EXKED.js} +5 -5
- package/dist/{index-B8O2io7L.js → index-q_TPea69.js} +3 -3
- package/dist/index.js +1 -1
- package/dist/{instance-4ACm8YFK.js → instance-pdQ_wAhB.js} +1 -1
- package/dist/{menuPermission-C7yt7uNG.js → menuPermission-CCQjJVXg.js} +3 -3
- package/dist/pages.js +1 -1
- package/dist/{send-default-agent-team-message-YRd0CkeT.js → send-default-agent-team-message-BzeR4ahf.js} +1 -1
- package/dist/{sso-user-GnlYnP83.js → sso-user-DI7oiDdc.js} +1 -1
- package/dist/{training-CyK00fwu.js → training-Bz7Sr5yC.js} +1 -1
- package/dist/{webide-SjnHsCZF.js → webide-NcHLDiSn.js} +3 -3
- package/dist/z-team-component.css +1 -1
- package/package.json +1 -1
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { jsxs as s, jsx as e } from "react/jsx-runtime";
|
|
2
|
-
import { CopyOutlined as oe, ReloadOutlined as
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { d as
|
|
2
|
+
import { CopyOutlined as oe, ReloadOutlined as Te, PlusOutlined as Se, DeleteOutlined as Ue, ClearOutlined as Re, CloseOutlined as De, SendOutlined as He, RobotOutlined as we, CloudServerOutlined as ze, MessageOutlined as Fe, KeyOutlined as je, ApiOutlined as qe, ToolOutlined as Ge, BarChartOutlined as Je } from "@ant-design/icons";
|
|
3
|
+
import { useState as N, useEffect as X, useCallback as j, useRef as ue, useMemo as Ae, Suspense as We, lazy as Qe } from "react";
|
|
4
|
+
import { Tooltip as Y, Tabs as Be, Input as ke, Button as H, Modal as he, Drawer as xe, Spin as Z, Statistic as E, Table as Me, message as J, Tag as W, Select as Ve, Checkbox as Ye } from "antd";
|
|
5
|
+
import { d as be } from "./ComponentDoc-BW1SyDxk.js";
|
|
6
6
|
import { AgentAppList as Xe, McpPage as Ze, SkillMarket as et } from "@yuku123/z-agent-component";
|
|
7
|
-
const
|
|
7
|
+
const re = "ft_gateway_default_ak", Ie = "system-default", ee = "", ge = "";
|
|
8
8
|
function te(a = {}) {
|
|
9
9
|
const n = { Accept: "application/json", ...a };
|
|
10
10
|
try {
|
|
11
|
-
const
|
|
12
|
-
|
|
11
|
+
const l = localStorage.getItem("token");
|
|
12
|
+
l && (n.Authorization = `Bearer ${l}`);
|
|
13
13
|
} catch {
|
|
14
14
|
}
|
|
15
15
|
return n;
|
|
@@ -44,14 +44,14 @@ async function fe() {
|
|
|
44
44
|
} catch {
|
|
45
45
|
throw new Error("模型列表返回格式异常(非 JSON)");
|
|
46
46
|
}
|
|
47
|
-
const
|
|
48
|
-
if (!Array.isArray(
|
|
47
|
+
const l = n != null && n.success ? n.data : (n == null ? void 0 : n.data) ?? n;
|
|
48
|
+
if (!Array.isArray(l))
|
|
49
49
|
throw new Error("模型列表返回格式异常(非数组)");
|
|
50
|
-
return
|
|
50
|
+
return l.map(tt);
|
|
51
51
|
}
|
|
52
|
-
async function at(a, n,
|
|
53
|
-
var
|
|
54
|
-
const u = await fetch(`${
|
|
52
|
+
async function at(a, n, l, c) {
|
|
53
|
+
var M, U, A;
|
|
54
|
+
const u = await fetch(`${ge}/v1/chat/completions`, {
|
|
55
55
|
method: "POST",
|
|
56
56
|
headers: {
|
|
57
57
|
"Content-Type": "application/json",
|
|
@@ -60,84 +60,84 @@ async function at(a, n, r, i) {
|
|
|
60
60
|
},
|
|
61
61
|
body: JSON.stringify({
|
|
62
62
|
model: n,
|
|
63
|
-
messages:
|
|
63
|
+
messages: l,
|
|
64
64
|
stream: !0
|
|
65
65
|
}),
|
|
66
|
-
signal:
|
|
66
|
+
signal: c.signal
|
|
67
67
|
});
|
|
68
68
|
if (!u.ok || !u.body) {
|
|
69
69
|
const C = await u.text().catch(() => "");
|
|
70
70
|
if (/<!doctype html/i.test(C.slice(0, 200)))
|
|
71
71
|
throw new Error("模型网关未接入(/v1/chat/completions 落到主壳 SPA,无网关响应)");
|
|
72
|
-
let
|
|
72
|
+
let T = `HTTP ${u.status}`;
|
|
73
73
|
try {
|
|
74
|
-
const
|
|
75
|
-
|
|
74
|
+
const p = JSON.parse(C);
|
|
75
|
+
T = ((M = p == null ? void 0 : p.error) == null ? void 0 : M.message) ?? T;
|
|
76
76
|
} catch {
|
|
77
|
-
C && (
|
|
77
|
+
C && (T = C);
|
|
78
78
|
}
|
|
79
|
-
throw new Error(
|
|
79
|
+
throw new Error(T);
|
|
80
80
|
}
|
|
81
81
|
const f = u.body.getReader(), y = new TextDecoder();
|
|
82
|
-
let _ = "",
|
|
82
|
+
let _ = "", k;
|
|
83
83
|
try {
|
|
84
84
|
for (; ; ) {
|
|
85
|
-
const { done: C, value:
|
|
85
|
+
const { done: C, value: T } = await f.read();
|
|
86
86
|
if (C) break;
|
|
87
|
-
_ += y.decode(
|
|
88
|
-
const
|
|
87
|
+
_ += y.decode(T, { stream: !0 });
|
|
88
|
+
const p = _.split(`
|
|
89
89
|
|
|
90
90
|
`);
|
|
91
|
-
_ =
|
|
92
|
-
for (const
|
|
93
|
-
let
|
|
94
|
-
for (const m of
|
|
91
|
+
_ = p.pop() ?? "";
|
|
92
|
+
for (const i of p) {
|
|
93
|
+
let g = "";
|
|
94
|
+
for (const m of i.split(`
|
|
95
95
|
`))
|
|
96
|
-
m.startsWith("data:") && (
|
|
97
|
-
if (!
|
|
98
|
-
if (
|
|
99
|
-
|
|
96
|
+
m.startsWith("data:") && (g += m.slice(5).trim());
|
|
97
|
+
if (!g || g === "[DONE]") {
|
|
98
|
+
if (g === "[DONE]") {
|
|
99
|
+
c.onDone(k);
|
|
100
100
|
return;
|
|
101
101
|
}
|
|
102
102
|
continue;
|
|
103
103
|
}
|
|
104
104
|
try {
|
|
105
|
-
const m = JSON.parse(
|
|
105
|
+
const m = JSON.parse(g), B = m == null ? void 0 : m.choices;
|
|
106
106
|
if (m != null && m.usage) {
|
|
107
107
|
const I = {
|
|
108
108
|
promptTokens: m.usage.prompt_tokens ?? 0,
|
|
109
109
|
completionTokens: m.usage.completion_tokens ?? 0,
|
|
110
110
|
totalTokens: m.usage.total_tokens ?? 0
|
|
111
111
|
};
|
|
112
|
-
(!
|
|
112
|
+
(!k || I.totalTokens > 0) && (k = I);
|
|
113
113
|
}
|
|
114
|
-
if (Array.isArray(
|
|
115
|
-
const I = (
|
|
116
|
-
I != null && I.content &&
|
|
114
|
+
if (Array.isArray(B) && B.length > 0) {
|
|
115
|
+
const I = (U = B[0]) == null ? void 0 : U.delta;
|
|
116
|
+
I != null && I.content && c.onDelta(I.content);
|
|
117
117
|
continue;
|
|
118
118
|
}
|
|
119
|
-
|
|
119
|
+
c.onDone(k);
|
|
120
120
|
return;
|
|
121
121
|
} catch {
|
|
122
122
|
}
|
|
123
123
|
}
|
|
124
124
|
}
|
|
125
|
-
|
|
125
|
+
c.onDone(k);
|
|
126
126
|
} catch (C) {
|
|
127
|
-
if ((
|
|
128
|
-
throw
|
|
127
|
+
if ((A = c.signal) != null && A.aborted) return;
|
|
128
|
+
throw c.onError(C instanceof Error ? C : new Error(String(C))), C;
|
|
129
129
|
}
|
|
130
130
|
}
|
|
131
131
|
async function ne(a, n) {
|
|
132
|
-
const
|
|
132
|
+
const l = await a.text();
|
|
133
133
|
if (!a.ok)
|
|
134
|
-
throw new Error(`${n}失败 HTTP ${a.status}${
|
|
135
|
-
if (/<!doctype html/i.test(
|
|
134
|
+
throw new Error(`${n}失败 HTTP ${a.status}${l ? `: ${l.slice(0, 120)}` : ""}`);
|
|
135
|
+
if (/<!doctype html/i.test(l.slice(0, 200)))
|
|
136
136
|
throw new Error("AK 接口落到主壳 SPA(无后端响应)");
|
|
137
137
|
try {
|
|
138
|
-
return JSON.parse(
|
|
138
|
+
return JSON.parse(l);
|
|
139
139
|
} catch {
|
|
140
|
-
throw new Error(`${n}返回非 JSON:${
|
|
140
|
+
throw new Error(`${n}返回非 JSON:${l.slice(0, 120)}`);
|
|
141
141
|
}
|
|
142
142
|
}
|
|
143
143
|
function nt(a) {
|
|
@@ -162,27 +162,27 @@ function nt(a) {
|
|
|
162
162
|
secret: a.secret_key
|
|
163
163
|
};
|
|
164
164
|
}
|
|
165
|
-
async function
|
|
166
|
-
const
|
|
165
|
+
async function Pe(a, n, l) {
|
|
166
|
+
const c = await fetch(`${ee}/api/ak/create`, {
|
|
167
167
|
method: "POST",
|
|
168
168
|
headers: te({ Accept: "application/json", "Content-Type": "application/json" }),
|
|
169
169
|
credentials: "include",
|
|
170
170
|
body: JSON.stringify({
|
|
171
|
-
akName:
|
|
172
|
-
description:
|
|
171
|
+
akName: l || `AK-${n || a}`,
|
|
172
|
+
description: l,
|
|
173
173
|
akType: "PERSONAL",
|
|
174
174
|
ownerUserId: a,
|
|
175
175
|
ownerUserName: n
|
|
176
176
|
})
|
|
177
|
-
}), u = await ne(
|
|
177
|
+
}), u = await ne(c, "创建 AK"), f = (u == null ? void 0 : u.data) ?? {}, y = f.accessKey ?? "", _ = f.secretKey ?? "";
|
|
178
178
|
return y && _ && ye(y, _), { apiKey: _, akPrefix: y, message: "AK 已创建,secretKey 仅创建时可见" };
|
|
179
179
|
}
|
|
180
|
-
async function
|
|
180
|
+
async function ce(a) {
|
|
181
181
|
const n = await fetch(
|
|
182
182
|
`${ee}/api/ak/list`,
|
|
183
183
|
{ headers: te({ Accept: "application/json" }), credentials: "include" }
|
|
184
|
-
),
|
|
185
|
-
return (a ?
|
|
184
|
+
), l = await ne(n, "获取 AK 列表"), c = Array.isArray(l == null ? void 0 : l.data) ? l.data : [];
|
|
185
|
+
return (a ? c.filter((f) => (f.owner_user_id == null || f.owner_user_id === "" ? Ie : String(f.owner_user_id)) === String(a)) : c).filter((f) => (f.is_deleted ?? 0) === 0).map(nt);
|
|
186
186
|
}
|
|
187
187
|
async function st(a) {
|
|
188
188
|
const n = await fetch(`${ee}/api/ak/delete?id=${encodeURIComponent(String(a))}`, {
|
|
@@ -192,22 +192,22 @@ async function st(a) {
|
|
|
192
192
|
});
|
|
193
193
|
await ne(n, "吊销 AK");
|
|
194
194
|
}
|
|
195
|
-
async function
|
|
196
|
-
var C,
|
|
195
|
+
async function Ke(a) {
|
|
196
|
+
var C, T;
|
|
197
197
|
const n = await fetch(
|
|
198
198
|
`${ee}/api/admin/llm-call-monitor/stats?hours=168`,
|
|
199
199
|
{ headers: te({ Accept: "application/json" }), credentials: "include" }
|
|
200
|
-
),
|
|
200
|
+
), l = await ne(n, "获取调用统计"), u = ((l == null ? void 0 : l.data) ?? {}).summary ?? {};
|
|
201
201
|
let f = [];
|
|
202
202
|
try {
|
|
203
|
-
const
|
|
203
|
+
const p = await fetch(
|
|
204
204
|
`${ee}/api/admin/llm-call-monitor/recent?page=1&size=20`,
|
|
205
205
|
{ headers: te({ Accept: "application/json" }), credentials: "include" }
|
|
206
|
-
),
|
|
207
|
-
f = (Array.isArray((C =
|
|
206
|
+
), i = await ne(p, "获取调用明细");
|
|
207
|
+
f = (Array.isArray((C = i == null ? void 0 : i.data) == null ? void 0 : C.records) ? i.data.records : []).map((m, B) => {
|
|
208
208
|
const I = Number(m.promptTokens ?? 0), G = Number(m.completionTokens ?? 0);
|
|
209
209
|
return {
|
|
210
|
-
id: Number(m.id ??
|
|
210
|
+
id: Number(m.id ?? B),
|
|
211
211
|
apiKeyId: a,
|
|
212
212
|
protocol: "chat/completions",
|
|
213
213
|
model: String(m.model ?? ""),
|
|
@@ -224,23 +224,23 @@ async function Pe(a) {
|
|
|
224
224
|
} catch {
|
|
225
225
|
}
|
|
226
226
|
const y = {}, _ = {};
|
|
227
|
-
for (const
|
|
228
|
-
const
|
|
229
|
-
|
|
230
|
-
const
|
|
231
|
-
if (
|
|
232
|
-
const m = _[
|
|
233
|
-
m[0] += 1, m[1] +=
|
|
227
|
+
for (const p of f) {
|
|
228
|
+
const i = y[T = p.model] || (y[T] = [0, 0, 0]);
|
|
229
|
+
i[0] += 1, i[1] += p.promptTokens, i[2] += p.completionTokens;
|
|
230
|
+
const g = (p.createTime || "").slice(0, 10);
|
|
231
|
+
if (g) {
|
|
232
|
+
const m = _[g] || (_[g] = [0, 0, 0]);
|
|
233
|
+
m[0] += 1, m[1] += p.promptTokens, m[2] += p.completionTokens;
|
|
234
234
|
}
|
|
235
235
|
}
|
|
236
|
-
const
|
|
236
|
+
const k = Number(u.totalTokens ?? 0), M = f.reduce((p, i) => p + i.totalTokens, 0), U = f.reduce((p, i) => p + i.promptTokens, 0), A = f.reduce((p, i) => p + i.completionTokens, 0);
|
|
237
237
|
return {
|
|
238
238
|
totalRequests: Number(u.totalCount ?? 0),
|
|
239
239
|
// 汇总口径优先用后端整窗合计(后端 selectStats 才有 token 合计),
|
|
240
240
|
// 明细只有最近一页 ⇒ 只在汇总缺失时用明细兜底。
|
|
241
|
-
totalPromptTokens: Number(u.totalPromptTokens ?? 0) ||
|
|
242
|
-
totalCompletionTokens: Number(u.totalCompletionTokens ?? 0) ||
|
|
243
|
-
totalTokens:
|
|
241
|
+
totalPromptTokens: Number(u.totalPromptTokens ?? 0) || U,
|
|
242
|
+
totalCompletionTokens: Number(u.totalCompletionTokens ?? 0) || A,
|
|
243
|
+
totalTokens: k || M,
|
|
244
244
|
avgLatencyMs: Number(u.avgDurationMs ?? 0),
|
|
245
245
|
errorCount: Number(u.failCount ?? 0),
|
|
246
246
|
daily: _,
|
|
@@ -249,142 +249,143 @@ async function Pe(a) {
|
|
|
249
249
|
};
|
|
250
250
|
}
|
|
251
251
|
function ot() {
|
|
252
|
-
return typeof window < "u" ? `${window.location.origin}${
|
|
252
|
+
return typeof window < "u" ? `${window.location.origin}${ge}` : ge;
|
|
253
253
|
}
|
|
254
254
|
const _e = "ft_gateway_ak_cache";
|
|
255
255
|
function ye(a, n) {
|
|
256
256
|
try {
|
|
257
|
-
const
|
|
258
|
-
|
|
257
|
+
const l = JSON.parse(localStorage.getItem(_e) || "{}");
|
|
258
|
+
l[a] = n, localStorage.setItem(_e, JSON.stringify(l));
|
|
259
259
|
} catch {
|
|
260
260
|
}
|
|
261
261
|
}
|
|
262
|
-
function
|
|
262
|
+
function lt(a) {
|
|
263
263
|
try {
|
|
264
264
|
return JSON.parse(localStorage.getItem(_e) || "{}")[a] || null;
|
|
265
265
|
} catch {
|
|
266
266
|
return null;
|
|
267
267
|
}
|
|
268
268
|
}
|
|
269
|
-
async function
|
|
269
|
+
async function rt() {
|
|
270
270
|
try {
|
|
271
|
-
const
|
|
272
|
-
if (
|
|
271
|
+
const c = localStorage.getItem(re);
|
|
272
|
+
if (c) return c;
|
|
273
273
|
} catch {
|
|
274
274
|
}
|
|
275
|
-
const n = (await
|
|
275
|
+
const n = (await ce("").catch(() => [])).find((c) => c.active && c.secret);
|
|
276
276
|
if (n != null && n.secret) {
|
|
277
277
|
try {
|
|
278
|
-
localStorage.setItem(
|
|
278
|
+
localStorage.setItem(re, n.secret);
|
|
279
279
|
} catch {
|
|
280
280
|
}
|
|
281
281
|
return n.akPrefix && ye(n.akPrefix, n.secret), n.secret;
|
|
282
282
|
}
|
|
283
|
-
const
|
|
283
|
+
const l = await Pe(
|
|
284
284
|
"system-default",
|
|
285
285
|
"系统默认",
|
|
286
286
|
"智能工作台默认AK(自动创建)"
|
|
287
287
|
);
|
|
288
|
-
if (!
|
|
288
|
+
if (!l.apiKey)
|
|
289
289
|
throw new Error("AK 创建成功但未返回 secretKey");
|
|
290
290
|
try {
|
|
291
|
-
localStorage.setItem(
|
|
291
|
+
localStorage.setItem(re, l.apiKey);
|
|
292
292
|
} catch {
|
|
293
293
|
}
|
|
294
|
-
return
|
|
294
|
+
return l.apiKey;
|
|
295
295
|
}
|
|
296
|
-
function
|
|
296
|
+
function Ee() {
|
|
297
297
|
try {
|
|
298
|
-
localStorage.removeItem(
|
|
298
|
+
localStorage.removeItem(re);
|
|
299
299
|
} catch {
|
|
300
300
|
}
|
|
301
301
|
}
|
|
302
|
-
const
|
|
303
|
-
container:
|
|
304
|
-
sidebar:
|
|
302
|
+
const ct = "_container_18ocl_7", it = "_sidebar_18ocl_16", dt = "_menuList_18ocl_26", mt = "_menuItem_18ocl_35", ut = "_menuItemActive_18ocl_53", ht = "_menuIcon_18ocl_59", pt = "_menuLabel_18ocl_64", kt = "_panelArea_18ocl_70", gt = "_modelMgmtHeader_18ocl_82", _t = "_modelMgmtTitle_18ocl_86", ft = "_modelMgmtSubtitle_18ocl_93", yt = "_modelGrid_18ocl_99", Ct = "_modelCard_18ocl_105", Nt = "_modelCardSelected_18ocl_134", vt = "_modelCardHeader_18ocl_139", Tt = "_modelIconWrap_18ocl_146", St = "_modelCardInfo_18ocl_159", wt = "_modelName_18ocl_164", At = "_modelTags_18ocl_173", Bt = "_modelEndpoint_18ocl_189", xt = "_modelCardFooter_18ocl_198", Mt = "_modelCheckbox_18ocl_206", bt = "_modelActionBar_18ocl_213", It = "_modelSelectionCount_18ocl_227", Pt = "_chatContainer_18ocl_236", Kt = "_chatHeader_18ocl_243", Et = "_chatTitle_18ocl_251", $t = "_chatPanels_18ocl_258", Lt = "_chatPanel_18ocl_258", Ot = "_chatPanelHeader_18ocl_285", Ut = "_chatPanelClose_18ocl_295", Rt = "_chatPanelBody_18ocl_307", Dt = "_chatMsgUser_18ocl_316", Ht = "_chatMsgAI_18ocl_328", zt = "_chatMsgError_18ocl_341", Ft = "_chatStreamingCursor_18ocl_351", jt = "_chatUsageBar_18ocl_370", qt = "_chatThinkBlock_18ocl_380", Gt = "_chatInputBar_18ocl_429", Jt = "_chatInput_18ocl_429", Wt = "_addPanelBtn_18ocl_442", Qt = "_akContainer_18ocl_471", Vt = "_akIntegrationPanel_18ocl_477", Yt = "_akIntegrationTitle_18ocl_484", Xt = "_akIntegrationGrid_18ocl_491", Zt = "_akCodeBlock_18ocl_497", ea = "_akCodeLabel_18ocl_509", ta = "_akCard_18ocl_516", aa = "_akCardRow_18ocl_534", na = "_akTitle_18ocl_541", sa = "_akPrefixSmall_18ocl_551", oa = "_akStatus_18ocl_557", la = "_akStatusActive_18ocl_563", ra = "_akStatusRevoked_18ocl_569", ca = "_akCardActions_18ocl_575", ia = "_akCardRow2_18ocl_582", da = "_akMiniBar_18ocl_588", ma = "_akMiniBarFill_18ocl_597", ua = "_akUsageText_18ocl_604", ha = "_akMetaText_18ocl_611", pa = "_akEmpty_18ocl_617", ka = "_akBaseUrlRow_18ocl_625", ga = "_akBaseUrlItem_18ocl_631", _a = "_akBaseUrlLabel_18ocl_641", fa = "_akBaseUrlValue_18ocl_647", ya = "_akCopyIcon_18ocl_657", Ca = "_usageDrawerContent_18ocl_671", Na = "_usageStatsGrid_18ocl_677", va = "_usageSection_18ocl_683", Ta = "_usageSectionTitle_18ocl_687", Sa = "_usageBarChart_18ocl_697", wa = "_usageBarCol_18ocl_706", Aa = "_usageBar_18ocl_697", Ba = "_usageBarLabel_18ocl_729", xa = "_modelBreakdown_18ocl_737", Ma = "_modelBreakdownRow_18ocl_743", ba = "_modelBreakdownName_18ocl_749", Ia = "_modelBreakdownBar_18ocl_759", Pa = "_modelBreakdownFill_18ocl_767", Ka = "_modelBreakdownCount_18ocl_774", Ea = "_usageEmpty_18ocl_781", t = {
|
|
303
|
+
container: ct,
|
|
304
|
+
sidebar: it,
|
|
305
305
|
menuList: dt,
|
|
306
306
|
menuItem: mt,
|
|
307
307
|
menuItemActive: ut,
|
|
308
308
|
menuIcon: ht,
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
309
|
+
menuLabel: pt,
|
|
310
|
+
panelArea: kt,
|
|
311
|
+
modelMgmtHeader: gt,
|
|
312
|
+
modelMgmtTitle: _t,
|
|
313
|
+
modelMgmtSubtitle: ft,
|
|
314
|
+
modelGrid: yt,
|
|
315
|
+
modelCard: Ct,
|
|
316
|
+
modelCardSelected: Nt,
|
|
317
|
+
modelCardHeader: vt,
|
|
318
|
+
modelIconWrap: Tt,
|
|
319
|
+
modelCardInfo: St,
|
|
320
|
+
modelName: wt,
|
|
321
|
+
modelTags: At,
|
|
322
|
+
modelEndpoint: Bt,
|
|
323
|
+
modelCardFooter: xt,
|
|
324
|
+
modelCheckbox: Mt,
|
|
325
|
+
modelActionBar: bt,
|
|
326
|
+
modelSelectionCount: It,
|
|
327
|
+
chatContainer: Pt,
|
|
328
|
+
chatHeader: Kt,
|
|
329
|
+
chatTitle: Et,
|
|
330
|
+
chatPanels: $t,
|
|
331
|
+
chatPanel: Lt,
|
|
332
|
+
chatPanelHeader: Ot,
|
|
333
|
+
chatPanelClose: Ut,
|
|
334
|
+
chatPanelBody: Rt,
|
|
335
|
+
chatMsgUser: Dt,
|
|
336
|
+
chatMsgAI: Ht,
|
|
337
|
+
chatMsgError: zt,
|
|
338
|
+
chatStreamingCursor: Ft,
|
|
339
|
+
chatUsageBar: jt,
|
|
340
|
+
chatThinkBlock: qt,
|
|
341
|
+
chatInputBar: Gt,
|
|
342
|
+
chatInput: Jt,
|
|
343
|
+
addPanelBtn: Wt,
|
|
344
|
+
akContainer: Qt,
|
|
345
|
+
akIntegrationPanel: Vt,
|
|
346
|
+
akIntegrationTitle: Yt,
|
|
347
|
+
akIntegrationGrid: Xt,
|
|
348
|
+
akCodeBlock: Zt,
|
|
349
|
+
akCodeLabel: ea,
|
|
350
|
+
akCard: ta,
|
|
351
|
+
akCardRow: aa,
|
|
352
|
+
akTitle: na,
|
|
353
|
+
akPrefixSmall: sa,
|
|
354
|
+
akStatus: oa,
|
|
355
|
+
akStatusActive: la,
|
|
355
356
|
akStatusRevoked: ra,
|
|
356
|
-
akCardActions:
|
|
357
|
+
akCardActions: ca,
|
|
357
358
|
akCardRow2: ia,
|
|
358
|
-
akMiniBar:
|
|
359
|
-
akMiniBarFill:
|
|
360
|
-
akUsageText:
|
|
361
|
-
akMetaText:
|
|
362
|
-
akEmpty:
|
|
363
|
-
akBaseUrlRow:
|
|
364
|
-
akBaseUrlItem:
|
|
365
|
-
akBaseUrlLabel:
|
|
366
|
-
akBaseUrlValue:
|
|
367
|
-
akCopyIcon:
|
|
368
|
-
usageDrawerContent:
|
|
369
|
-
usageStatsGrid:
|
|
370
|
-
usageSection:
|
|
371
|
-
usageSectionTitle:
|
|
372
|
-
usageBarChart:
|
|
373
|
-
usageBarCol:
|
|
374
|
-
usageBar:
|
|
375
|
-
usageBarLabel:
|
|
376
|
-
modelBreakdown:
|
|
377
|
-
modelBreakdownRow:
|
|
378
|
-
modelBreakdownName:
|
|
379
|
-
modelBreakdownBar:
|
|
380
|
-
modelBreakdownFill:
|
|
381
|
-
modelBreakdownCount:
|
|
382
|
-
usageEmpty:
|
|
359
|
+
akMiniBar: da,
|
|
360
|
+
akMiniBarFill: ma,
|
|
361
|
+
akUsageText: ua,
|
|
362
|
+
akMetaText: ha,
|
|
363
|
+
akEmpty: pa,
|
|
364
|
+
akBaseUrlRow: ka,
|
|
365
|
+
akBaseUrlItem: ga,
|
|
366
|
+
akBaseUrlLabel: _a,
|
|
367
|
+
akBaseUrlValue: fa,
|
|
368
|
+
akCopyIcon: ya,
|
|
369
|
+
usageDrawerContent: Ca,
|
|
370
|
+
usageStatsGrid: Na,
|
|
371
|
+
usageSection: va,
|
|
372
|
+
usageSectionTitle: Ta,
|
|
373
|
+
usageBarChart: Sa,
|
|
374
|
+
usageBarCol: wa,
|
|
375
|
+
usageBar: Aa,
|
|
376
|
+
usageBarLabel: Ba,
|
|
377
|
+
modelBreakdown: xa,
|
|
378
|
+
modelBreakdownRow: Ma,
|
|
379
|
+
modelBreakdownName: ba,
|
|
380
|
+
modelBreakdownBar: Ia,
|
|
381
|
+
modelBreakdownFill: Pa,
|
|
382
|
+
modelBreakdownCount: Ka,
|
|
383
|
+
usageEmpty: Ea
|
|
383
384
|
};
|
|
384
385
|
function Ne(a) {
|
|
385
386
|
return a >= 1e6 ? `${(a / 1e6).toFixed(1)}M` : a >= 1e3 ? `${(a / 1e3).toFixed(1)}K` : `${a}`;
|
|
386
387
|
}
|
|
387
|
-
function
|
|
388
|
+
function $a(a, n) {
|
|
388
389
|
return `# OpenAI 兼容
|
|
389
390
|
curl -X POST ${a}/v1/chat/completions \\
|
|
390
391
|
-H "Content-Type: application/json" \\
|
|
@@ -395,7 +396,7 @@ curl -X POST ${a}/v1/chat/completions \\
|
|
|
395
396
|
"stream": true
|
|
396
397
|
}'`;
|
|
397
398
|
}
|
|
398
|
-
function
|
|
399
|
+
function La(a, n) {
|
|
399
400
|
return `# Anthropic 兼容
|
|
400
401
|
curl -X POST ${a}/v1/messages \\
|
|
401
402
|
-H "Content-Type: application/json" \\
|
|
@@ -405,57 +406,57 @@ curl -X POST ${a}/v1/messages \\
|
|
|
405
406
|
"messages": [{"role":"user","content":"你好"}]
|
|
406
407
|
}'`;
|
|
407
408
|
}
|
|
408
|
-
function
|
|
409
|
-
const [a, n] = N("personal"), [
|
|
410
|
-
|
|
409
|
+
function Oa() {
|
|
410
|
+
const [a, n] = N("personal"), [l, c] = N([]), [u, f] = N([]), [y, _] = N(!0), [k, M] = N(!1), [U, A] = N(!1), [C, T] = N(""), [p, i] = N({ open: !1 }), [g, m] = N(null), [B, I] = N(null), [G, Q] = N(!1), z = be((d) => d.currentUser), r = String((z == null ? void 0 : z.id) ?? ""), P = (z == null ? void 0 : z.username) ?? "", [R, o] = N(""), h = ot(), [w, K] = N("<model-name>");
|
|
411
|
+
X(() => {
|
|
411
412
|
let d = !1;
|
|
412
|
-
return fe().then((
|
|
413
|
-
!d &&
|
|
413
|
+
return fe().then((S) => {
|
|
414
|
+
!d && S.length > 0 && K(S[0].modelName);
|
|
414
415
|
}).catch(() => {
|
|
415
416
|
}), () => {
|
|
416
417
|
d = !0;
|
|
417
418
|
};
|
|
418
419
|
}, []);
|
|
419
|
-
const
|
|
420
|
+
const x = j(async () => {
|
|
420
421
|
_(!0);
|
|
421
422
|
try {
|
|
422
|
-
const d =
|
|
423
|
-
|
|
423
|
+
const d = r ? await ce(r).catch(() => []) : [], [S] = await Promise.all([
|
|
424
|
+
ce("system-default").catch(() => [])
|
|
424
425
|
]);
|
|
425
|
-
|
|
426
|
+
c(S), f(d);
|
|
426
427
|
} finally {
|
|
427
428
|
_(!1);
|
|
428
429
|
}
|
|
429
|
-
}, [
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
}, [
|
|
433
|
-
const
|
|
434
|
-
|
|
430
|
+
}, [r]);
|
|
431
|
+
X(() => {
|
|
432
|
+
x();
|
|
433
|
+
}, [x]);
|
|
434
|
+
const b = () => {
|
|
435
|
+
T(""), A(!0);
|
|
435
436
|
}, q = async () => {
|
|
436
437
|
if (!C.trim()) {
|
|
437
438
|
J.warning("请输入 AK 名称");
|
|
438
439
|
return;
|
|
439
440
|
}
|
|
440
|
-
if (!
|
|
441
|
+
if (!r) {
|
|
441
442
|
J.warning("登录态不可用,无法生成 AK");
|
|
442
443
|
return;
|
|
443
444
|
}
|
|
444
|
-
|
|
445
|
+
M(!0);
|
|
445
446
|
try {
|
|
446
|
-
const d = await
|
|
447
|
-
ye(d.akPrefix, d.apiKey),
|
|
447
|
+
const d = await Pe(r, P, C.trim());
|
|
448
|
+
ye(d.akPrefix, d.apiKey), A(!1), i({
|
|
448
449
|
open: !0,
|
|
449
450
|
apiKey: d.apiKey,
|
|
450
451
|
akPrefix: d.akPrefix
|
|
451
|
-
}),
|
|
452
|
+
}), x();
|
|
452
453
|
} catch (d) {
|
|
453
454
|
J.error(d instanceof Error ? d.message : "创建 AK 失败");
|
|
454
455
|
} finally {
|
|
455
|
-
|
|
456
|
+
M(!1);
|
|
456
457
|
}
|
|
457
|
-
},
|
|
458
|
-
|
|
458
|
+
}, ie = (d) => {
|
|
459
|
+
he.confirm({
|
|
459
460
|
title: "确认吊销此 AK?",
|
|
460
461
|
content: "吊销后此 AK 将立即失效,无法恢复。",
|
|
461
462
|
okText: "确认吊销",
|
|
@@ -463,69 +464,69 @@ function $a() {
|
|
|
463
464
|
cancelText: "取消",
|
|
464
465
|
onOk: async () => {
|
|
465
466
|
try {
|
|
466
|
-
await st(d), J.success("AK 已吊销"),
|
|
467
|
-
} catch (
|
|
468
|
-
J.error(
|
|
467
|
+
await st(d), J.success("AK 已吊销"), x(), Ee();
|
|
468
|
+
} catch (S) {
|
|
469
|
+
J.error(S instanceof Error ? S.message : "吊销失败");
|
|
469
470
|
}
|
|
470
471
|
}
|
|
471
472
|
});
|
|
472
|
-
},
|
|
473
|
+
}, $ = (d) => {
|
|
473
474
|
navigator.clipboard.writeText(d).then(() => J.success("已复制到剪贴板")).catch(() => J.warning("复制失败,请手动复制"));
|
|
474
475
|
}, F = (d) => {
|
|
475
|
-
const
|
|
476
|
-
|
|
476
|
+
const S = lt(d.akPrefix);
|
|
477
|
+
S ? $(S) : ($(d.akPrefix), J.info("完整 AK 未在本地缓存(可能在本设备外创建),已复制前缀"));
|
|
477
478
|
}, se = async (d) => {
|
|
478
479
|
m(d), Q(!0), I(null);
|
|
479
480
|
try {
|
|
480
|
-
const
|
|
481
|
-
I(
|
|
482
|
-
} catch (
|
|
483
|
-
J.error(
|
|
481
|
+
const S = await Ke(d.id);
|
|
482
|
+
I(S);
|
|
483
|
+
} catch (S) {
|
|
484
|
+
J.error(S instanceof Error ? S.message : "获取用量失败");
|
|
484
485
|
} finally {
|
|
485
486
|
Q(!1);
|
|
486
487
|
}
|
|
487
488
|
}, de = () => {
|
|
488
489
|
m(null), I(null);
|
|
489
|
-
},
|
|
490
|
-
const
|
|
491
|
-
if (
|
|
490
|
+
}, $e = (d) => {
|
|
491
|
+
const S = Object.entries(d);
|
|
492
|
+
if (S.length === 0)
|
|
492
493
|
return /* @__PURE__ */ e("span", { className: t.usageEmpty, children: "暂无数据" });
|
|
493
|
-
const V = Math.max(...
|
|
494
|
-
return /* @__PURE__ */ e("div", { className: t.usageBarChart, children:
|
|
495
|
-
const
|
|
494
|
+
const V = Math.max(...S.map(([, L]) => L[1] + L[2]), 1);
|
|
495
|
+
return /* @__PURE__ */ e("div", { className: t.usageBarChart, children: S.map(([L, D]) => {
|
|
496
|
+
const v = D[1] + D[2], me = v / V * 100;
|
|
496
497
|
return /* @__PURE__ */ s("div", { className: t.usageBarCol, children: [
|
|
497
|
-
/* @__PURE__ */ e(Y, { title: `${
|
|
498
|
+
/* @__PURE__ */ e(Y, { title: `${L}: ${D[0]}次 / ${v} tokens`, children: /* @__PURE__ */ e(
|
|
498
499
|
"div",
|
|
499
500
|
{
|
|
500
501
|
className: t.usageBar,
|
|
501
502
|
style: { height: `${Math.max(me, 2)}%` }
|
|
502
503
|
}
|
|
503
504
|
) }),
|
|
504
|
-
/* @__PURE__ */ e("span", { className: t.usageBarLabel, children:
|
|
505
|
-
] },
|
|
505
|
+
/* @__PURE__ */ e("span", { className: t.usageBarLabel, children: L })
|
|
506
|
+
] }, L);
|
|
506
507
|
}) });
|
|
507
|
-
},
|
|
508
|
-
const
|
|
509
|
-
if (
|
|
508
|
+
}, Le = (d) => {
|
|
509
|
+
const S = Object.entries(d);
|
|
510
|
+
if (S.length === 0)
|
|
510
511
|
return /* @__PURE__ */ e("span", { className: t.usageEmpty, children: "暂无数据" });
|
|
511
|
-
const V = Math.max(...
|
|
512
|
-
return /* @__PURE__ */ e("div", { className: t.modelBreakdown, children:
|
|
513
|
-
/* @__PURE__ */ e("span", { className: t.modelBreakdownName, children:
|
|
512
|
+
const V = Math.max(...S.map(([, L]) => L[0]), 1);
|
|
513
|
+
return /* @__PURE__ */ e("div", { className: t.modelBreakdown, children: S.sort((L, D) => D[1][0] - L[1][0]).map(([L, D]) => /* @__PURE__ */ s("div", { className: t.modelBreakdownRow, children: [
|
|
514
|
+
/* @__PURE__ */ e("span", { className: t.modelBreakdownName, children: L }),
|
|
514
515
|
/* @__PURE__ */ e("div", { className: t.modelBreakdownBar, children: /* @__PURE__ */ e(
|
|
515
516
|
"div",
|
|
516
517
|
{
|
|
517
518
|
className: t.modelBreakdownFill,
|
|
518
|
-
style: { width: `${
|
|
519
|
+
style: { width: `${D[0] / V * 100}%` }
|
|
519
520
|
}
|
|
520
521
|
) }),
|
|
521
522
|
/* @__PURE__ */ s("span", { className: t.modelBreakdownCount, children: [
|
|
522
|
-
|
|
523
|
+
D[0],
|
|
523
524
|
"次 / ",
|
|
524
|
-
|
|
525
|
+
D[1] + (D[2] || 0),
|
|
525
526
|
"tokens"
|
|
526
527
|
] })
|
|
527
|
-
] },
|
|
528
|
-
},
|
|
528
|
+
] }, L)) });
|
|
529
|
+
}, Oe = [
|
|
529
530
|
{
|
|
530
531
|
title: "时间",
|
|
531
532
|
dataIndex: "createTime",
|
|
@@ -573,29 +574,29 @@ function $a() {
|
|
|
573
574
|
width: 60,
|
|
574
575
|
render: (d) => d ? /* @__PURE__ */ e(W, { color: d < 400 ? "green" : "red", children: d }) : "-"
|
|
575
576
|
}
|
|
576
|
-
], Ce = (d,
|
|
577
|
-
const V = Array.isArray(d) ? d : [],
|
|
578
|
-
(
|
|
577
|
+
], Ce = (d, S) => {
|
|
578
|
+
const V = Array.isArray(d) ? d : [], L = R.trim().toLowerCase(), D = L ? V.filter(
|
|
579
|
+
(v) => `${v.description || ""} ${v.akPrefix || ""} ${v.defaultModel || ""}`.toLowerCase().includes(L)
|
|
579
580
|
) : V;
|
|
580
|
-
return y ? /* @__PURE__ */ e("div", { style: { textAlign: "center", padding: 40 }, children: /* @__PURE__ */ e(
|
|
581
|
+
return y ? /* @__PURE__ */ e("div", { style: { textAlign: "center", padding: 40 }, children: /* @__PURE__ */ e(Z, { tip: "加载中..." }) }) : V.length === 0 ? /* @__PURE__ */ e("div", { className: t.akEmpty, children: S ? "暂无应用 AK" : "暂无个人 AK,点击上方按钮生成" }) : D.length === 0 ? /* @__PURE__ */ e("div", { className: t.akEmpty, children: "无匹配 AK" }) : /* @__PURE__ */ e("div", { style: { display: "flex", flexDirection: "column", gap: 8 }, children: D.map((v) => /* @__PURE__ */ s(
|
|
581
582
|
"div",
|
|
582
583
|
{
|
|
583
584
|
className: t.akCard,
|
|
584
|
-
onClick: () => se(
|
|
585
|
+
onClick: () => se(v),
|
|
585
586
|
children: [
|
|
586
587
|
/* @__PURE__ */ s("div", { className: t.akCardRow, children: [
|
|
587
|
-
/* @__PURE__ */ e("span", { className: t.akTitle, children:
|
|
588
|
-
/* @__PURE__ */ e("code", { className: t.akPrefixSmall, children:
|
|
588
|
+
/* @__PURE__ */ e("span", { className: t.akTitle, children: v.description || v.akPrefix.replace("...", "**") }),
|
|
589
|
+
/* @__PURE__ */ e("code", { className: t.akPrefixSmall, children: v.akPrefix.replace("...", "**") }),
|
|
589
590
|
/* @__PURE__ */ e(
|
|
590
591
|
"span",
|
|
591
592
|
{
|
|
592
|
-
className: `${t.akStatus} ${
|
|
593
|
-
children:
|
|
593
|
+
className: `${t.akStatus} ${v.active ? t.akStatusActive : t.akStatusRevoked}`,
|
|
594
|
+
children: v.active ? "活跃" : "已吊销"
|
|
594
595
|
}
|
|
595
596
|
),
|
|
596
|
-
|
|
597
|
+
v.defaultModel && /* @__PURE__ */ s(W, { style: { fontSize: 11 }, children: [
|
|
597
598
|
"默认: ",
|
|
598
|
-
|
|
599
|
+
v.defaultModel
|
|
599
600
|
] }),
|
|
600
601
|
/* @__PURE__ */ s(
|
|
601
602
|
"div",
|
|
@@ -604,21 +605,21 @@ function $a() {
|
|
|
604
605
|
onClick: (me) => me.stopPropagation(),
|
|
605
606
|
children: [
|
|
606
607
|
/* @__PURE__ */ e(Y, { title: "复制完整 AK", children: /* @__PURE__ */ e(
|
|
607
|
-
|
|
608
|
+
H,
|
|
608
609
|
{
|
|
609
610
|
size: "small",
|
|
610
611
|
icon: /* @__PURE__ */ e(oe, {}),
|
|
611
|
-
onClick: () => F(
|
|
612
|
+
onClick: () => F(v),
|
|
612
613
|
children: "复制"
|
|
613
614
|
}
|
|
614
615
|
) }),
|
|
615
|
-
!
|
|
616
|
-
|
|
616
|
+
!S && v.active && /* @__PURE__ */ e(
|
|
617
|
+
H,
|
|
617
618
|
{
|
|
618
619
|
size: "small",
|
|
619
620
|
danger: !0,
|
|
620
|
-
icon: /* @__PURE__ */ e(
|
|
621
|
-
onClick: () =>
|
|
621
|
+
icon: /* @__PURE__ */ e(Ue, {}),
|
|
622
|
+
onClick: () => ie(v.id),
|
|
622
623
|
children: "吊销"
|
|
623
624
|
}
|
|
624
625
|
)
|
|
@@ -627,28 +628,28 @@ function $a() {
|
|
|
627
628
|
)
|
|
628
629
|
] }),
|
|
629
630
|
/* @__PURE__ */ s("div", { className: t.akCardRow2, children: [
|
|
630
|
-
|
|
631
|
+
v.tokenQuota > 0 && /* @__PURE__ */ e("div", { className: t.akMiniBar, children: /* @__PURE__ */ e(
|
|
631
632
|
"div",
|
|
632
633
|
{
|
|
633
634
|
className: t.akMiniBarFill,
|
|
634
635
|
style: {
|
|
635
636
|
width: `${Math.min(
|
|
636
|
-
(
|
|
637
|
+
(v.totalTokens || 0) / v.tokenQuota * 100,
|
|
637
638
|
100
|
|
638
639
|
)}%`
|
|
639
640
|
}
|
|
640
641
|
}
|
|
641
642
|
) }),
|
|
642
643
|
/* @__PURE__ */ s("span", { className: t.akUsageText, children: [
|
|
643
|
-
Ne(
|
|
644
|
-
|
|
644
|
+
Ne(v.totalTokens || 0),
|
|
645
|
+
v.tokenQuota > 0 ? ` / ${Ne(v.tokenQuota)}` : " tokens"
|
|
645
646
|
] }),
|
|
646
|
-
/* @__PURE__ */ e("span", { className: t.akMetaText, children:
|
|
647
|
-
/* @__PURE__ */ e("span", { className: t.akMetaText, children: new Date(
|
|
647
|
+
/* @__PURE__ */ e("span", { className: t.akMetaText, children: v.lastUsedAt ? `最近使用 ${v.lastUsedAt}` : "尚未使用" }),
|
|
648
|
+
/* @__PURE__ */ e("span", { className: t.akMetaText, children: new Date(v.createTime).toLocaleDateString("zh-CN") })
|
|
648
649
|
] })
|
|
649
650
|
]
|
|
650
651
|
},
|
|
651
|
-
|
|
652
|
+
v.id
|
|
652
653
|
)) });
|
|
653
654
|
};
|
|
654
655
|
return /* @__PURE__ */ s("div", { className: t.akContainer, children: [
|
|
@@ -662,7 +663,7 @@ function $a() {
|
|
|
662
663
|
oe,
|
|
663
664
|
{
|
|
664
665
|
className: t.akCopyIcon,
|
|
665
|
-
onClick: () =>
|
|
666
|
+
onClick: () => $(h)
|
|
666
667
|
}
|
|
667
668
|
) })
|
|
668
669
|
] }),
|
|
@@ -673,7 +674,7 @@ function $a() {
|
|
|
673
674
|
oe,
|
|
674
675
|
{
|
|
675
676
|
className: t.akCopyIcon,
|
|
676
|
-
onClick: () =>
|
|
677
|
+
onClick: () => $(h)
|
|
677
678
|
}
|
|
678
679
|
) })
|
|
679
680
|
] })
|
|
@@ -681,11 +682,11 @@ function $a() {
|
|
|
681
682
|
/* @__PURE__ */ s("div", { className: t.akIntegrationGrid, children: [
|
|
682
683
|
/* @__PURE__ */ s("div", { children: [
|
|
683
684
|
/* @__PURE__ */ e("p", { className: t.akCodeLabel, children: "OpenAI 兼容 — curl 示例" }),
|
|
684
|
-
/* @__PURE__ */ e("pre", { className: t.akCodeBlock, children:
|
|
685
|
+
/* @__PURE__ */ e("pre", { className: t.akCodeBlock, children: $a(h, w) })
|
|
685
686
|
] }),
|
|
686
687
|
/* @__PURE__ */ s("div", { children: [
|
|
687
688
|
/* @__PURE__ */ e("p", { className: t.akCodeLabel, children: "Anthropic 兼容 — curl 示例" }),
|
|
688
|
-
/* @__PURE__ */ e("pre", { className: t.akCodeBlock, children:
|
|
689
|
+
/* @__PURE__ */ e("pre", { className: t.akCodeBlock, children: La(h, w) })
|
|
689
690
|
] })
|
|
690
691
|
] })
|
|
691
692
|
] }),
|
|
@@ -701,7 +702,7 @@ function $a() {
|
|
|
701
702
|
},
|
|
702
703
|
children: [
|
|
703
704
|
/* @__PURE__ */ e(
|
|
704
|
-
|
|
705
|
+
Be,
|
|
705
706
|
{
|
|
706
707
|
activeKey: a,
|
|
707
708
|
onChange: (d) => n(d),
|
|
@@ -714,7 +715,7 @@ function $a() {
|
|
|
714
715
|
),
|
|
715
716
|
/* @__PURE__ */ s("div", { style: { display: "flex", gap: 8 }, children: [
|
|
716
717
|
/* @__PURE__ */ e(
|
|
717
|
-
|
|
718
|
+
ke.Search,
|
|
718
719
|
{
|
|
719
720
|
allowClear: !0,
|
|
720
721
|
placeholder: "按名称 / 前缀过滤",
|
|
@@ -722,14 +723,14 @@ function $a() {
|
|
|
722
723
|
onChange: (d) => o(d.target.value)
|
|
723
724
|
}
|
|
724
725
|
),
|
|
725
|
-
/* @__PURE__ */ e(
|
|
726
|
+
/* @__PURE__ */ e(H, { icon: /* @__PURE__ */ e(Te, {}), onClick: x, size: "small", children: "刷新" }),
|
|
726
727
|
a === "personal" && /* @__PURE__ */ e(
|
|
727
|
-
|
|
728
|
+
H,
|
|
728
729
|
{
|
|
729
730
|
type: "primary",
|
|
730
|
-
icon: /* @__PURE__ */ e(
|
|
731
|
-
onClick:
|
|
732
|
-
loading:
|
|
731
|
+
icon: /* @__PURE__ */ e(Se, {}),
|
|
732
|
+
onClick: b,
|
|
733
|
+
loading: k,
|
|
733
734
|
children: "生成 AK"
|
|
734
735
|
}
|
|
735
736
|
)
|
|
@@ -737,18 +738,18 @@ function $a() {
|
|
|
737
738
|
]
|
|
738
739
|
}
|
|
739
740
|
),
|
|
740
|
-
a === "app" ? Ce(
|
|
741
|
+
a === "app" ? Ce(l, !0) : Ce(u, !1)
|
|
741
742
|
] }),
|
|
742
743
|
/* @__PURE__ */ s(
|
|
743
|
-
|
|
744
|
+
he,
|
|
744
745
|
{
|
|
745
|
-
open:
|
|
746
|
+
open: U,
|
|
746
747
|
title: "生成新 AK",
|
|
747
|
-
onCancel: () =>
|
|
748
|
+
onCancel: () => A(!1),
|
|
748
749
|
onOk: q,
|
|
749
750
|
okText: "确认生成",
|
|
750
751
|
cancelText: "取消",
|
|
751
|
-
confirmLoading:
|
|
752
|
+
confirmLoading: k,
|
|
752
753
|
children: [
|
|
753
754
|
/* @__PURE__ */ e(
|
|
754
755
|
"div",
|
|
@@ -762,11 +763,11 @@ function $a() {
|
|
|
762
763
|
}
|
|
763
764
|
),
|
|
764
765
|
/* @__PURE__ */ e(
|
|
765
|
-
|
|
766
|
+
ke,
|
|
766
767
|
{
|
|
767
768
|
placeholder: "例如:测试用 AK、生产网关 AK",
|
|
768
769
|
value: C,
|
|
769
|
-
onChange: (d) =>
|
|
770
|
+
onChange: (d) => T(d.target.value),
|
|
770
771
|
onPressEnter: q,
|
|
771
772
|
maxLength: 50,
|
|
772
773
|
autoFocus: !0
|
|
@@ -776,26 +777,26 @@ function $a() {
|
|
|
776
777
|
}
|
|
777
778
|
),
|
|
778
779
|
/* @__PURE__ */ s(
|
|
779
|
-
|
|
780
|
+
he,
|
|
780
781
|
{
|
|
781
|
-
open:
|
|
782
|
+
open: p.open,
|
|
782
783
|
title: "AK 创建成功",
|
|
783
|
-
onCancel: () =>
|
|
784
|
+
onCancel: () => i({ open: !1 }),
|
|
784
785
|
footer: [
|
|
785
786
|
/* @__PURE__ */ e(
|
|
786
|
-
|
|
787
|
+
H,
|
|
787
788
|
{
|
|
788
789
|
icon: /* @__PURE__ */ e(oe, {}),
|
|
789
|
-
onClick: () =>
|
|
790
|
+
onClick: () => p.apiKey && $(p.apiKey),
|
|
790
791
|
children: "复制 AK"
|
|
791
792
|
},
|
|
792
793
|
"copy"
|
|
793
794
|
),
|
|
794
795
|
/* @__PURE__ */ e(
|
|
795
|
-
|
|
796
|
+
H,
|
|
796
797
|
{
|
|
797
798
|
type: "primary",
|
|
798
|
-
onClick: () =>
|
|
799
|
+
onClick: () => i({ open: !1 }),
|
|
799
800
|
children: "我已保存"
|
|
800
801
|
},
|
|
801
802
|
"close"
|
|
@@ -815,88 +816,88 @@ function $a() {
|
|
|
815
816
|
wordBreak: "break-all",
|
|
816
817
|
userSelect: "all"
|
|
817
818
|
},
|
|
818
|
-
children:
|
|
819
|
+
children: p.apiKey
|
|
819
820
|
}
|
|
820
821
|
),
|
|
821
822
|
/* @__PURE__ */ s("div", { style: { marginTop: 8, fontSize: 12, color: "var(--text-muted)" }, children: [
|
|
822
823
|
"前缀: ",
|
|
823
|
-
|
|
824
|
+
p.akPrefix
|
|
824
825
|
] })
|
|
825
826
|
]
|
|
826
827
|
}
|
|
827
828
|
),
|
|
828
829
|
/* @__PURE__ */ e(
|
|
829
|
-
|
|
830
|
+
xe,
|
|
830
831
|
{
|
|
831
|
-
title:
|
|
832
|
+
title: g ? /* @__PURE__ */ s("span", { children: [
|
|
832
833
|
"AK 详情 — ",
|
|
833
|
-
/* @__PURE__ */ e("code", { children:
|
|
834
|
+
/* @__PURE__ */ e("code", { children: g.akPrefix })
|
|
834
835
|
] }) : "AK 详情",
|
|
835
|
-
open: !!
|
|
836
|
+
open: !!g,
|
|
836
837
|
onClose: de,
|
|
837
838
|
size: "large",
|
|
838
|
-
children: G ? /* @__PURE__ */ e("div", { style: { textAlign: "center", padding: 60 }, children: /* @__PURE__ */ e(
|
|
839
|
+
children: G ? /* @__PURE__ */ e("div", { style: { textAlign: "center", padding: 60 }, children: /* @__PURE__ */ e(Z, { tip: "加载用量数据..." }) }) : B ? /* @__PURE__ */ s("div", { className: t.usageDrawerContent, children: [
|
|
839
840
|
/* @__PURE__ */ e("div", { style: { fontSize: 12, color: "#8c8c8c", marginBottom: 12 }, children: "以下为网关全局调用统计(近 7 天窗口), 监控侧不按 AK 留存;该 AK 自身的累计消耗见下方「本 AK 累计 Token」。" }),
|
|
840
841
|
/* @__PURE__ */ s("div", { className: t.usageStatsGrid, children: [
|
|
841
|
-
/* @__PURE__ */ e(
|
|
842
|
-
/* @__PURE__ */ e(
|
|
842
|
+
/* @__PURE__ */ e(E, { title: "总请求数", value: B.totalRequests }),
|
|
843
|
+
/* @__PURE__ */ e(E, { title: "总 Token", value: B.totalTokens }),
|
|
843
844
|
/* @__PURE__ */ e(
|
|
844
|
-
|
|
845
|
+
E,
|
|
845
846
|
{
|
|
846
847
|
title: "输入 Token",
|
|
847
|
-
value:
|
|
848
|
+
value: B.totalPromptTokens
|
|
848
849
|
}
|
|
849
850
|
),
|
|
850
851
|
/* @__PURE__ */ e(
|
|
851
|
-
|
|
852
|
+
E,
|
|
852
853
|
{
|
|
853
854
|
title: "输出 Token",
|
|
854
|
-
value:
|
|
855
|
+
value: B.totalCompletionTokens
|
|
855
856
|
}
|
|
856
857
|
),
|
|
857
858
|
/* @__PURE__ */ e(
|
|
858
|
-
|
|
859
|
+
E,
|
|
859
860
|
{
|
|
860
861
|
title: "平均耗时",
|
|
861
|
-
value:
|
|
862
|
+
value: B.avgLatencyMs,
|
|
862
863
|
suffix: "ms"
|
|
863
864
|
}
|
|
864
865
|
),
|
|
865
866
|
/* @__PURE__ */ e(
|
|
866
|
-
|
|
867
|
+
E,
|
|
867
868
|
{
|
|
868
869
|
title: "错误数",
|
|
869
|
-
value:
|
|
870
|
+
value: B.errorCount,
|
|
870
871
|
styles: {
|
|
871
872
|
content: {
|
|
872
|
-
color:
|
|
873
|
+
color: B.errorCount > 0 ? "#ff4d4f" : void 0
|
|
873
874
|
}
|
|
874
875
|
}
|
|
875
876
|
}
|
|
876
877
|
),
|
|
877
878
|
/* @__PURE__ */ e(
|
|
878
|
-
|
|
879
|
+
E,
|
|
879
880
|
{
|
|
880
881
|
title: "本 AK 累计 Token",
|
|
881
|
-
value: (
|
|
882
|
+
value: (g == null ? void 0 : g.totalTokens) ?? 0
|
|
882
883
|
}
|
|
883
884
|
)
|
|
884
885
|
] }),
|
|
885
886
|
/* @__PURE__ */ s("div", { className: t.usageSection, children: [
|
|
886
887
|
/* @__PURE__ */ e("h4", { className: t.usageSectionTitle, children: "每日调用曲线(按最近调用明细聚合)" }),
|
|
887
|
-
|
|
888
|
+
$e(B.daily)
|
|
888
889
|
] }),
|
|
889
890
|
/* @__PURE__ */ s("div", { className: t.usageSection, children: [
|
|
890
891
|
/* @__PURE__ */ e("h4", { className: t.usageSectionTitle, children: "模型用量分布" }),
|
|
891
|
-
|
|
892
|
+
Le(B.models)
|
|
892
893
|
] }),
|
|
893
894
|
/* @__PURE__ */ s("div", { className: t.usageSection, children: [
|
|
894
895
|
/* @__PURE__ */ e("h4", { className: t.usageSectionTitle, children: "最近调用记录" }),
|
|
895
896
|
/* @__PURE__ */ e(
|
|
896
|
-
|
|
897
|
+
Me,
|
|
897
898
|
{
|
|
898
|
-
columns:
|
|
899
|
-
dataSource:
|
|
899
|
+
columns: Oe,
|
|
900
|
+
dataSource: B.recent,
|
|
900
901
|
rowKey: "id",
|
|
901
902
|
size: "small",
|
|
902
903
|
pagination: {
|
|
@@ -915,62 +916,62 @@ function $a() {
|
|
|
915
916
|
)
|
|
916
917
|
] });
|
|
917
918
|
}
|
|
918
|
-
function
|
|
919
|
+
function Ua(a) {
|
|
919
920
|
const n = [];
|
|
920
921
|
if (!a) return n;
|
|
921
|
-
const
|
|
922
|
-
let
|
|
923
|
-
for (; (u =
|
|
924
|
-
u.index >
|
|
925
|
-
return
|
|
922
|
+
const l = /<(think|thinking|reasoning)>([\s\S]*?)<\/\1>/gi;
|
|
923
|
+
let c = 0, u;
|
|
924
|
+
for (; (u = l.exec(a)) !== null; )
|
|
925
|
+
u.index > c && n.push({ type: "text", text: a.slice(c, u.index) }), n.push({ type: "think", text: u[2] }), c = u.index + u[0].length;
|
|
926
|
+
return c < a.length && n.push({ type: "text", text: a.slice(c) }), n;
|
|
926
927
|
}
|
|
927
|
-
const
|
|
928
|
-
let
|
|
929
|
-
function
|
|
930
|
-
const [n,
|
|
931
|
-
|
|
928
|
+
const le = 4;
|
|
929
|
+
let Ra = 0;
|
|
930
|
+
function Da({ initialModels: a }) {
|
|
931
|
+
const [n, l] = N([]), [c, u] = N([]), [f, y] = N(!0), [_, k] = N(null), [M, U] = N(""), [A, C] = N(!1), T = ue(""), p = ue(/* @__PURE__ */ new Map()), i = ue(/* @__PURE__ */ new Map());
|
|
932
|
+
X(() => {
|
|
932
933
|
(async () => {
|
|
933
934
|
try {
|
|
934
935
|
const o = await fe();
|
|
935
936
|
u(o), y(!1);
|
|
936
|
-
const h = a.length > 0 ? a : o.slice(0, 1).map((
|
|
937
|
-
|
|
937
|
+
const h = a.length > 0 ? a : o.slice(0, 1).map((w) => w.modelName);
|
|
938
|
+
l(h.slice(0, le).map((w) => pe(w)));
|
|
938
939
|
} catch (o) {
|
|
939
|
-
y(!1),
|
|
940
|
+
y(!1), k(o instanceof Error ? o.message : "模型列表加载失败");
|
|
940
941
|
}
|
|
941
942
|
})();
|
|
942
|
-
}, []),
|
|
943
|
-
if (a.length > 0 &&
|
|
944
|
-
const o = a.slice(0,
|
|
945
|
-
|
|
943
|
+
}, []), X(() => {
|
|
944
|
+
if (a.length > 0 && c.length > 0) {
|
|
945
|
+
const o = a.slice(0, le).map((h) => pe(h));
|
|
946
|
+
l(o);
|
|
946
947
|
}
|
|
947
948
|
}, [a.join(",")]);
|
|
948
|
-
const
|
|
949
|
-
const h =
|
|
949
|
+
const g = j((o) => {
|
|
950
|
+
const h = i.current.get(o);
|
|
950
951
|
h && (h.scrollTop = h.scrollHeight);
|
|
951
952
|
}, []), m = j(
|
|
952
953
|
(o, h) => {
|
|
953
|
-
|
|
954
|
+
l((w) => w.map((K) => K.id === o ? h(K) : K));
|
|
954
955
|
},
|
|
955
956
|
[]
|
|
956
|
-
),
|
|
957
|
-
if (
|
|
958
|
-
const o = await
|
|
959
|
-
return
|
|
957
|
+
), B = j(async () => {
|
|
958
|
+
if (T.current) return T.current;
|
|
959
|
+
const o = await rt();
|
|
960
|
+
return T.current = o, o;
|
|
960
961
|
}, []), I = j(async () => {
|
|
961
|
-
const o =
|
|
962
|
-
if (!o ||
|
|
962
|
+
const o = M.trim();
|
|
963
|
+
if (!o || A) return;
|
|
963
964
|
let h;
|
|
964
965
|
try {
|
|
965
|
-
h = await
|
|
966
|
+
h = await B();
|
|
966
967
|
} catch {
|
|
967
968
|
return;
|
|
968
969
|
}
|
|
969
|
-
|
|
970
|
-
const
|
|
971
|
-
...
|
|
970
|
+
U(""), C(!0);
|
|
971
|
+
const w = n.map((b) => ({
|
|
972
|
+
...b,
|
|
972
973
|
messages: [
|
|
973
|
-
...
|
|
974
|
+
...b.messages,
|
|
974
975
|
{ role: "user", content: o },
|
|
975
976
|
{ role: "assistant", content: "" }
|
|
976
977
|
],
|
|
@@ -979,61 +980,61 @@ function Ua({ initialModels: a }) {
|
|
|
979
980
|
error: null,
|
|
980
981
|
usage: null
|
|
981
982
|
}));
|
|
982
|
-
|
|
983
|
-
const
|
|
984
|
-
|
|
983
|
+
l(w);
|
|
984
|
+
const K = w;
|
|
985
|
+
K.forEach((b) => {
|
|
985
986
|
const q = new AbortController();
|
|
986
|
-
|
|
987
|
-
const
|
|
988
|
-
at(h,
|
|
989
|
-
onDelta: (
|
|
990
|
-
m(
|
|
987
|
+
p.current.set(b.id, q);
|
|
988
|
+
const ie = b.messages.slice(0, -1);
|
|
989
|
+
at(h, b.model, ie, {
|
|
990
|
+
onDelta: ($) => {
|
|
991
|
+
m(b.id, (F) => ({
|
|
991
992
|
...F,
|
|
992
|
-
streamingContent: F.streamingContent +
|
|
993
|
+
streamingContent: F.streamingContent + $,
|
|
993
994
|
messages: F.messages.map(
|
|
994
|
-
(se, de) => de === F.messages.length - 1 ? { ...se, content: F.streamingContent +
|
|
995
|
+
(se, de) => de === F.messages.length - 1 ? { ...se, content: F.streamingContent + $ } : se
|
|
995
996
|
)
|
|
996
|
-
})),
|
|
997
|
+
})), g(b.id);
|
|
997
998
|
},
|
|
998
|
-
onDone: (
|
|
999
|
-
m(
|
|
999
|
+
onDone: ($) => {
|
|
1000
|
+
m(b.id, (F) => ({
|
|
1000
1001
|
...F,
|
|
1001
1002
|
isStreaming: !1,
|
|
1002
|
-
usage:
|
|
1003
|
-
promptTokens:
|
|
1004
|
-
completionTokens:
|
|
1005
|
-
totalTokens:
|
|
1003
|
+
usage: $ ? {
|
|
1004
|
+
promptTokens: $.promptTokens,
|
|
1005
|
+
completionTokens: $.completionTokens,
|
|
1006
|
+
totalTokens: $.totalTokens
|
|
1006
1007
|
} : null
|
|
1007
|
-
})),
|
|
1008
|
+
})), p.current.delete(b.id);
|
|
1008
1009
|
},
|
|
1009
|
-
onError: (
|
|
1010
|
-
(
|
|
1010
|
+
onError: ($) => {
|
|
1011
|
+
($.message.includes("401") || $.message.includes("API key")) && (Ee(), T.current = ""), m(b.id, (F) => ({
|
|
1011
1012
|
...F,
|
|
1012
1013
|
isStreaming: !1,
|
|
1013
|
-
error:
|
|
1014
|
-
})),
|
|
1014
|
+
error: $.message
|
|
1015
|
+
})), p.current.delete(b.id);
|
|
1015
1016
|
},
|
|
1016
1017
|
signal: q.signal
|
|
1017
1018
|
}).catch(() => {
|
|
1018
1019
|
});
|
|
1019
1020
|
});
|
|
1020
|
-
const
|
|
1021
|
-
|
|
1022
|
-
(q) => !
|
|
1023
|
-
) && (clearInterval(
|
|
1021
|
+
const x = setInterval(() => {
|
|
1022
|
+
K.every(
|
|
1023
|
+
(q) => !p.current.has(q.id)
|
|
1024
|
+
) && (clearInterval(x), C(!1));
|
|
1024
1025
|
}, 200);
|
|
1025
1026
|
setTimeout(() => {
|
|
1026
|
-
clearInterval(
|
|
1027
|
+
clearInterval(x), C(!1);
|
|
1027
1028
|
}, 300 * 1e3);
|
|
1028
|
-
}, [
|
|
1029
|
-
|
|
1029
|
+
}, [M, A, n, B, m, g]), G = j(() => {
|
|
1030
|
+
p.current.forEach((o) => o.abort()), p.current.clear(), l((o) => o.map((h) => ({ ...h, isStreaming: !1 }))), C(!1);
|
|
1030
1031
|
}, []), Q = j(() => {
|
|
1031
1032
|
var h;
|
|
1032
|
-
if (n.length >=
|
|
1033
|
-
const o = (h =
|
|
1034
|
-
o &&
|
|
1035
|
-
}, [n,
|
|
1036
|
-
|
|
1033
|
+
if (n.length >= le) return;
|
|
1034
|
+
const o = (h = c.find((w) => !n.some((K) => K.model === w.modelName))) == null ? void 0 : h.modelName;
|
|
1035
|
+
o && l((w) => [...w, pe(o)]);
|
|
1036
|
+
}, [n, c]), z = j(() => {
|
|
1037
|
+
p.current.forEach((o) => o.abort()), p.current.clear(), l(
|
|
1037
1038
|
(o) => o.map((h) => ({
|
|
1038
1039
|
...h,
|
|
1039
1040
|
messages: [],
|
|
@@ -1043,19 +1044,19 @@ function Ua({ initialModels: a }) {
|
|
|
1043
1044
|
usage: null
|
|
1044
1045
|
}))
|
|
1045
1046
|
), C(!1);
|
|
1046
|
-
}, [
|
|
1047
|
-
const h =
|
|
1048
|
-
h && h.abort(),
|
|
1049
|
-
}, []),
|
|
1047
|
+
}, [A, n]), r = j((o) => {
|
|
1048
|
+
const h = p.current.get(o);
|
|
1049
|
+
h && h.abort(), p.current.delete(o), l((w) => w.filter((K) => K.id !== o));
|
|
1050
|
+
}, []), P = j(
|
|
1050
1051
|
(o, h) => {
|
|
1051
|
-
m(o, (
|
|
1052
|
+
m(o, (w) => ({ ...w, model: h }));
|
|
1052
1053
|
},
|
|
1053
1054
|
[m]
|
|
1054
|
-
),
|
|
1055
|
+
), R = c.map((o) => ({
|
|
1055
1056
|
label: o.modelName,
|
|
1056
1057
|
value: o.modelName
|
|
1057
1058
|
}));
|
|
1058
|
-
return f ? /* @__PURE__ */ e("div", { style: { textAlign: "center", padding: 60 }, children: /* @__PURE__ */ e(
|
|
1059
|
+
return f ? /* @__PURE__ */ e("div", { style: { textAlign: "center", padding: 60 }, children: /* @__PURE__ */ e(Z, { tip: "加载模型列表..." }) }) : _ ? /* @__PURE__ */ s("div", { className: t.chatContainer, children: [
|
|
1059
1060
|
/* @__PURE__ */ e("div", { className: t.chatHeader, children: /* @__PURE__ */ e("h3", { className: t.chatTitle, children: "模型对话" }) }),
|
|
1060
1061
|
/* @__PURE__ */ s("div", { className: t.akEmpty, children: [
|
|
1061
1062
|
"模型列表加载失败:",
|
|
@@ -1071,12 +1072,12 @@ function Ua({ initialModels: a }) {
|
|
|
1071
1072
|
] })
|
|
1072
1073
|
] }),
|
|
1073
1074
|
/* @__PURE__ */ e(
|
|
1074
|
-
|
|
1075
|
+
H,
|
|
1075
1076
|
{
|
|
1076
1077
|
size: "small",
|
|
1077
|
-
icon: /* @__PURE__ */ e(
|
|
1078
|
-
onClick:
|
|
1079
|
-
disabled:
|
|
1078
|
+
icon: /* @__PURE__ */ e(Re, {}),
|
|
1079
|
+
onClick: z,
|
|
1080
|
+
disabled: A || n.every((o) => o.messages.length === 0),
|
|
1080
1081
|
children: "清空重新来"
|
|
1081
1082
|
}
|
|
1082
1083
|
)
|
|
@@ -1085,12 +1086,12 @@ function Ua({ initialModels: a }) {
|
|
|
1085
1086
|
n.map((o) => /* @__PURE__ */ s("div", { className: t.chatPanel, children: [
|
|
1086
1087
|
/* @__PURE__ */ s("div", { className: t.chatPanelHeader, children: [
|
|
1087
1088
|
/* @__PURE__ */ e(
|
|
1088
|
-
|
|
1089
|
+
Ve,
|
|
1089
1090
|
{
|
|
1090
1091
|
size: "small",
|
|
1091
1092
|
value: o.model,
|
|
1092
|
-
onChange: (h) =>
|
|
1093
|
-
options:
|
|
1093
|
+
onChange: (h) => P(o.id, h),
|
|
1094
|
+
options: R,
|
|
1094
1095
|
style: { minWidth: 140, flex: 1 },
|
|
1095
1096
|
showSearch: !0,
|
|
1096
1097
|
optionFilterProp: "label"
|
|
@@ -1100,8 +1101,8 @@ function Ua({ initialModels: a }) {
|
|
|
1100
1101
|
"span",
|
|
1101
1102
|
{
|
|
1102
1103
|
className: t.chatPanelClose,
|
|
1103
|
-
onClick: () =>
|
|
1104
|
-
children: /* @__PURE__ */ e(
|
|
1104
|
+
onClick: () => r(o.id),
|
|
1105
|
+
children: /* @__PURE__ */ e(De, {})
|
|
1105
1106
|
}
|
|
1106
1107
|
)
|
|
1107
1108
|
] }),
|
|
@@ -1110,31 +1111,31 @@ function Ua({ initialModels: a }) {
|
|
|
1110
1111
|
{
|
|
1111
1112
|
className: t.chatPanelBody,
|
|
1112
1113
|
ref: (h) => {
|
|
1113
|
-
|
|
1114
|
+
i.current.set(o.id, h);
|
|
1114
1115
|
},
|
|
1115
1116
|
children: [
|
|
1116
|
-
o.messages.map((h,
|
|
1117
|
+
o.messages.map((h, w) => /* @__PURE__ */ s(
|
|
1117
1118
|
"div",
|
|
1118
1119
|
{
|
|
1119
1120
|
className: h.role === "user" ? t.chatMsgUser : t.chatMsgAI,
|
|
1120
1121
|
children: [
|
|
1121
|
-
h.role === "assistant" ?
|
|
1122
|
-
(
|
|
1122
|
+
h.role === "assistant" ? Ua(h.content).map(
|
|
1123
|
+
(K, x) => K.type === "think" ? /* @__PURE__ */ s(
|
|
1123
1124
|
"details",
|
|
1124
1125
|
{
|
|
1125
1126
|
className: t.chatThinkBlock,
|
|
1126
1127
|
children: [
|
|
1127
1128
|
/* @__PURE__ */ e("summary", { children: "思考过程" }),
|
|
1128
|
-
/* @__PURE__ */ e("pre", { children:
|
|
1129
|
+
/* @__PURE__ */ e("pre", { children: K.text })
|
|
1129
1130
|
]
|
|
1130
1131
|
},
|
|
1131
|
-
|
|
1132
|
-
) : /* @__PURE__ */ e("span", { style: { whiteSpace: "pre-wrap" }, children:
|
|
1132
|
+
x
|
|
1133
|
+
) : /* @__PURE__ */ e("span", { style: { whiteSpace: "pre-wrap" }, children: K.text }, x)
|
|
1133
1134
|
) : /* @__PURE__ */ e("span", { style: { whiteSpace: "pre-wrap" }, children: h.content }),
|
|
1134
|
-
o.isStreaming &&
|
|
1135
|
+
o.isStreaming && w === o.messages.length - 1 && h.role === "assistant" && /* @__PURE__ */ e("span", { className: t.chatStreamingCursor })
|
|
1135
1136
|
]
|
|
1136
1137
|
},
|
|
1137
|
-
|
|
1138
|
+
w
|
|
1138
1139
|
)),
|
|
1139
1140
|
o.error && /* @__PURE__ */ e("div", { className: t.chatMsgError, children: o.error }),
|
|
1140
1141
|
o.usage && /* @__PURE__ */ s("div", { className: t.chatUsageBar, children: [
|
|
@@ -1151,33 +1152,33 @@ function Ua({ initialModels: a }) {
|
|
|
1151
1152
|
}
|
|
1152
1153
|
)
|
|
1153
1154
|
] }, o.id)),
|
|
1154
|
-
n.length <
|
|
1155
|
+
n.length < le && /* @__PURE__ */ e(Y, { title: "添加面板", children: /* @__PURE__ */ e("div", { className: t.addPanelBtn, onClick: Q, children: /* @__PURE__ */ e(Se, {}) }) })
|
|
1155
1156
|
] }),
|
|
1156
1157
|
/* @__PURE__ */ s("div", { className: t.chatInputBar, children: [
|
|
1157
1158
|
/* @__PURE__ */ e(
|
|
1158
|
-
|
|
1159
|
+
ke.TextArea,
|
|
1159
1160
|
{
|
|
1160
1161
|
className: t.chatInput,
|
|
1161
|
-
value:
|
|
1162
|
-
onChange: (o) =>
|
|
1162
|
+
value: M,
|
|
1163
|
+
onChange: (o) => U(o.target.value),
|
|
1163
1164
|
placeholder: "输入消息,所有面板将同时收到并流式输出...",
|
|
1164
1165
|
autoSize: { minRows: 1, maxRows: 4 },
|
|
1165
1166
|
onPressEnter: (o) => {
|
|
1166
1167
|
o.shiftKey || (o.preventDefault(), I());
|
|
1167
1168
|
},
|
|
1168
|
-
disabled:
|
|
1169
|
+
disabled: A
|
|
1169
1170
|
}
|
|
1170
1171
|
),
|
|
1171
|
-
|
|
1172
|
-
/* @__PURE__ */ e(
|
|
1172
|
+
A ? /* @__PURE__ */ e(H, { danger: !0, onClick: G, children: "停止" }) : /* @__PURE__ */ s(H, { type: "primary", onClick: I, disabled: !M.trim(), children: [
|
|
1173
|
+
/* @__PURE__ */ e(He, {}),
|
|
1173
1174
|
" 发送"
|
|
1174
1175
|
] })
|
|
1175
1176
|
] })
|
|
1176
1177
|
] });
|
|
1177
1178
|
}
|
|
1178
|
-
function
|
|
1179
|
+
function pe(a) {
|
|
1179
1180
|
return {
|
|
1180
|
-
id: ++
|
|
1181
|
+
id: ++Ra,
|
|
1181
1182
|
model: a,
|
|
1182
1183
|
messages: [],
|
|
1183
1184
|
streamingContent: "",
|
|
@@ -1186,32 +1187,32 @@ function ge(a) {
|
|
|
1186
1187
|
usage: null
|
|
1187
1188
|
};
|
|
1188
1189
|
}
|
|
1189
|
-
function
|
|
1190
|
-
const [n,
|
|
1191
|
-
u(!0), y(null), fe().then((
|
|
1192
|
-
|
|
1193
|
-
}).catch((
|
|
1194
|
-
|
|
1190
|
+
function Ha({ onStartChat: a }) {
|
|
1191
|
+
const [n, l] = N([]), [c, u] = N(!0), [f, y] = N(null), [_, k] = N(/* @__PURE__ */ new Set()), M = () => {
|
|
1192
|
+
u(!0), y(null), fe().then((i) => {
|
|
1193
|
+
l(i), u(!1);
|
|
1194
|
+
}).catch((i) => {
|
|
1195
|
+
l([]), y(i instanceof Error ? i.message : "加载失败"), u(!1);
|
|
1195
1196
|
});
|
|
1196
1197
|
};
|
|
1197
|
-
|
|
1198
|
-
|
|
1198
|
+
X(() => {
|
|
1199
|
+
M();
|
|
1199
1200
|
}, []);
|
|
1200
|
-
const
|
|
1201
|
-
|
|
1202
|
-
const m = new Set(
|
|
1203
|
-
return m.has(
|
|
1201
|
+
const U = (i) => {
|
|
1202
|
+
k((g) => {
|
|
1203
|
+
const m = new Set(g);
|
|
1204
|
+
return m.has(i) ? m.delete(i) : m.add(i), m;
|
|
1204
1205
|
});
|
|
1205
|
-
},
|
|
1206
|
-
a([
|
|
1207
|
-
},
|
|
1208
|
-
|
|
1209
|
-
},
|
|
1210
|
-
if (!
|
|
1211
|
-
const
|
|
1212
|
-
return
|
|
1206
|
+
}, A = Array.from(_), C = (i) => {
|
|
1207
|
+
a([i]);
|
|
1208
|
+
}, T = () => {
|
|
1209
|
+
A.length > 0 && a(A);
|
|
1210
|
+
}, p = (i) => {
|
|
1211
|
+
if (!i) return "default";
|
|
1212
|
+
const g = i.toLowerCase();
|
|
1213
|
+
return g.includes("aliyun") || g.includes("ali") ? "blue" : g.includes("zhipu") || g.includes("glm") ? "purple" : g.includes("moonshot") || g.includes("kimi") ? "cyan" : g.includes("minimax") ? "orange" : "default";
|
|
1213
1214
|
};
|
|
1214
|
-
return
|
|
1215
|
+
return c ? /* @__PURE__ */ e("div", { style: { textAlign: "center", padding: 60 }, children: /* @__PURE__ */ e(Z, { tip: "加载模型列表..." }) }) : f ? /* @__PURE__ */ s("div", { children: [
|
|
1215
1216
|
/* @__PURE__ */ s("div", { className: t.modelMgmtHeader, children: [
|
|
1216
1217
|
/* @__PURE__ */ e("h3", { className: t.modelMgmtTitle, children: "模型管理" }),
|
|
1217
1218
|
/* @__PURE__ */ e("p", { className: t.modelMgmtSubtitle, children: "数据库管理的可用模型,可选择单个或多个模型发起对话对比" })
|
|
@@ -1219,7 +1220,7 @@ function Ra({ onStartChat: a }) {
|
|
|
1219
1220
|
/* @__PURE__ */ s("div", { className: t.akEmpty, children: [
|
|
1220
1221
|
"模型列表加载失败:",
|
|
1221
1222
|
f,
|
|
1222
|
-
/* @__PURE__ */ e("div", { style: { marginTop: 16 }, children: /* @__PURE__ */ e(
|
|
1223
|
+
/* @__PURE__ */ e("div", { style: { marginTop: 16 }, children: /* @__PURE__ */ e(H, { type: "primary", onClick: M, children: "重试" }) })
|
|
1223
1224
|
] })
|
|
1224
1225
|
] }) : /* @__PURE__ */ s("div", { children: [
|
|
1225
1226
|
/* @__PURE__ */ s("div", { className: t.modelMgmtHeader, children: [
|
|
@@ -1227,123 +1228,123 @@ function Ra({ onStartChat: a }) {
|
|
|
1227
1228
|
/* @__PURE__ */ e("p", { className: t.modelMgmtSubtitle, children: "数据库管理的可用模型,可选择单个或多个模型发起对话对比" })
|
|
1228
1229
|
] }),
|
|
1229
1230
|
n.length === 0 && /* @__PURE__ */ e("div", { className: t.akEmpty, children: "后端暂无启用模型(z_team_model_config 中 enable=1 的行),请先在数据库或网关配置中启用" }),
|
|
1230
|
-
/* @__PURE__ */ e("div", { className: t.modelGrid, children: n.map((
|
|
1231
|
-
const
|
|
1231
|
+
/* @__PURE__ */ e("div", { className: t.modelGrid, children: n.map((i) => {
|
|
1232
|
+
const g = _.has(i.modelName);
|
|
1232
1233
|
return /* @__PURE__ */ s(
|
|
1233
1234
|
"div",
|
|
1234
1235
|
{
|
|
1235
|
-
className: `${t.modelCard} ${
|
|
1236
|
-
onClick: () =>
|
|
1236
|
+
className: `${t.modelCard} ${g ? t.modelCardSelected : ""}`,
|
|
1237
|
+
onClick: () => U(i.modelName),
|
|
1237
1238
|
children: [
|
|
1238
1239
|
/* @__PURE__ */ e(
|
|
1239
|
-
|
|
1240
|
+
Ye,
|
|
1240
1241
|
{
|
|
1241
1242
|
className: t.modelCheckbox,
|
|
1242
|
-
checked:
|
|
1243
|
+
checked: g,
|
|
1243
1244
|
onChange: (m) => {
|
|
1244
|
-
m.stopPropagation(),
|
|
1245
|
+
m.stopPropagation(), U(i.modelName);
|
|
1245
1246
|
}
|
|
1246
1247
|
}
|
|
1247
1248
|
),
|
|
1248
1249
|
/* @__PURE__ */ s("div", { className: t.modelCardHeader, children: [
|
|
1249
|
-
/* @__PURE__ */ e("div", { className: t.modelIconWrap, children: /* @__PURE__ */ e(
|
|
1250
|
+
/* @__PURE__ */ e("div", { className: t.modelIconWrap, children: /* @__PURE__ */ e(we, {}) }),
|
|
1250
1251
|
/* @__PURE__ */ s("div", { className: t.modelCardInfo, children: [
|
|
1251
|
-
/* @__PURE__ */ e("h4", { className: t.modelName, children:
|
|
1252
|
+
/* @__PURE__ */ e("h4", { className: t.modelName, children: i.modelName }),
|
|
1252
1253
|
/* @__PURE__ */ s("div", { className: t.modelTags, children: [
|
|
1253
|
-
|
|
1254
|
+
i.modelProvider && /* @__PURE__ */ e(
|
|
1254
1255
|
W,
|
|
1255
1256
|
{
|
|
1256
|
-
color:
|
|
1257
|
+
color: p(i.modelProvider),
|
|
1257
1258
|
style: { fontSize: 11, margin: 0 },
|
|
1258
|
-
children:
|
|
1259
|
+
children: i.modelProvider
|
|
1259
1260
|
}
|
|
1260
1261
|
),
|
|
1261
|
-
/* @__PURE__ */ e(W, { style: { fontSize: 11, margin: 0 }, children:
|
|
1262
|
+
/* @__PURE__ */ e(W, { style: { fontSize: 11, margin: 0 }, children: i.apiType })
|
|
1262
1263
|
] })
|
|
1263
1264
|
] })
|
|
1264
1265
|
] }),
|
|
1265
|
-
/* @__PURE__ */ e("p", { className: t.modelEndpoint, children:
|
|
1266
|
+
/* @__PURE__ */ e("p", { className: t.modelEndpoint, children: i.endpoint }),
|
|
1266
1267
|
/* @__PURE__ */ e("div", { className: t.modelCardFooter, children: /* @__PURE__ */ e(
|
|
1267
|
-
|
|
1268
|
+
H,
|
|
1268
1269
|
{
|
|
1269
1270
|
type: "link",
|
|
1270
1271
|
size: "small",
|
|
1271
1272
|
onClick: (m) => {
|
|
1272
|
-
m.stopPropagation(), C(
|
|
1273
|
+
m.stopPropagation(), C(i.modelName);
|
|
1273
1274
|
},
|
|
1274
1275
|
children: "发起对话"
|
|
1275
1276
|
}
|
|
1276
1277
|
) })
|
|
1277
1278
|
]
|
|
1278
1279
|
},
|
|
1279
|
-
|
|
1280
|
+
i.modelName
|
|
1280
1281
|
);
|
|
1281
1282
|
}) }),
|
|
1282
|
-
|
|
1283
|
+
A.length > 0 && /* @__PURE__ */ s("div", { className: t.modelActionBar, children: [
|
|
1283
1284
|
/* @__PURE__ */ s("span", { className: t.modelSelectionCount, children: [
|
|
1284
1285
|
"已选择 ",
|
|
1285
|
-
|
|
1286
|
+
A.length,
|
|
1286
1287
|
" 个模型"
|
|
1287
1288
|
] }),
|
|
1288
1289
|
/* @__PURE__ */ e(
|
|
1289
|
-
|
|
1290
|
+
H,
|
|
1290
1291
|
{
|
|
1291
1292
|
type: "primary",
|
|
1292
|
-
onClick:
|
|
1293
|
-
disabled:
|
|
1293
|
+
onClick: T,
|
|
1294
|
+
disabled: A.length === 0,
|
|
1294
1295
|
children: "批量对比"
|
|
1295
1296
|
}
|
|
1296
1297
|
)
|
|
1297
1298
|
] })
|
|
1298
1299
|
] });
|
|
1299
1300
|
}
|
|
1300
|
-
const
|
|
1301
|
-
container:
|
|
1302
|
-
page:
|
|
1303
|
-
kpiGrid:
|
|
1304
|
-
kpiCard:
|
|
1305
|
-
sectionCard:
|
|
1306
|
-
sectionHead:
|
|
1307
|
-
sectionHint:
|
|
1308
|
-
akList:
|
|
1309
|
-
errorState:
|
|
1310
|
-
errorTitle:
|
|
1311
|
-
errorDetail:
|
|
1312
|
-
},
|
|
1301
|
+
const za = "_container_15pgq_5", Fa = "_page_15pgq_10", ja = "_kpiGrid_15pgq_16", qa = "_kpiCard_15pgq_22", Ga = "_sectionCard_15pgq_29", Ja = "_sectionHead_15pgq_36", Wa = "_sectionHint_15pgq_42", Qa = "_akList_15pgq_47", Va = "_errorState_15pgq_54", Ya = "_errorTitle_15pgq_66", Xa = "_errorDetail_15pgq_72", O = {
|
|
1302
|
+
container: za,
|
|
1303
|
+
page: Fa,
|
|
1304
|
+
kpiGrid: ja,
|
|
1305
|
+
kpiCard: qa,
|
|
1306
|
+
sectionCard: Ga,
|
|
1307
|
+
sectionHead: Ja,
|
|
1308
|
+
sectionHint: Wa,
|
|
1309
|
+
akList: Qa,
|
|
1310
|
+
errorState: Va,
|
|
1311
|
+
errorTitle: Ya,
|
|
1312
|
+
errorDetail: Xa
|
|
1313
|
+
}, Za = Qe(
|
|
1313
1314
|
() => import("@yuku123/z-agent-component").then((a) => ({ default: a.AgentDashboard }))
|
|
1314
1315
|
);
|
|
1315
1316
|
function ae(a) {
|
|
1316
1317
|
return a >= 1e6 ? `${(a / 1e6).toFixed(2)}M` : a >= 1e3 ? `${(a / 1e3).toFixed(1)}K` : String(a ?? 0);
|
|
1317
1318
|
}
|
|
1318
|
-
function
|
|
1319
|
+
function en({ daily: a }) {
|
|
1319
1320
|
const n = Object.entries(a);
|
|
1320
1321
|
if (n.length === 0) return /* @__PURE__ */ e("span", { className: t.usageEmpty, children: "暂无数据" });
|
|
1321
|
-
const
|
|
1322
|
-
return /* @__PURE__ */ e("div", { className: t.usageBarChart, children: n.map(([
|
|
1322
|
+
const l = Math.max(...n.map(([, c]) => c[1] + c[2]), 1);
|
|
1323
|
+
return /* @__PURE__ */ e("div", { className: t.usageBarChart, children: n.map(([c, u]) => {
|
|
1323
1324
|
const f = u[1] + u[2];
|
|
1324
1325
|
return /* @__PURE__ */ s("div", { className: t.usageBarCol, children: [
|
|
1325
|
-
/* @__PURE__ */ e(Y, { title: `${
|
|
1326
|
+
/* @__PURE__ */ e(Y, { title: `${c}: ${u[0]}次 / ${f} tokens`, children: /* @__PURE__ */ e(
|
|
1326
1327
|
"div",
|
|
1327
1328
|
{
|
|
1328
1329
|
className: t.usageBar,
|
|
1329
|
-
style: { height: `${Math.max(f /
|
|
1330
|
+
style: { height: `${Math.max(f / l * 100, 2)}%` }
|
|
1330
1331
|
}
|
|
1331
1332
|
) }),
|
|
1332
|
-
/* @__PURE__ */ e("span", { className: t.usageBarLabel, children:
|
|
1333
|
-
] },
|
|
1333
|
+
/* @__PURE__ */ e("span", { className: t.usageBarLabel, children: c })
|
|
1334
|
+
] }, c);
|
|
1334
1335
|
}) });
|
|
1335
1336
|
}
|
|
1336
|
-
function
|
|
1337
|
+
function ve({ models: a }) {
|
|
1337
1338
|
const n = Object.entries(a);
|
|
1338
1339
|
if (n.length === 0) return /* @__PURE__ */ e("span", { className: t.usageEmpty, children: "暂无数据" });
|
|
1339
|
-
const
|
|
1340
|
-
return /* @__PURE__ */ e("div", { className: t.modelBreakdown, children: n.sort((
|
|
1341
|
-
/* @__PURE__ */ e("span", { className: t.modelBreakdownName, children:
|
|
1340
|
+
const l = Math.max(...n.map(([, c]) => c[0]), 1);
|
|
1341
|
+
return /* @__PURE__ */ e("div", { className: t.modelBreakdown, children: n.sort((c, u) => u[1][0] - c[1][0]).map(([c, u]) => /* @__PURE__ */ s("div", { className: t.modelBreakdownRow, children: [
|
|
1342
|
+
/* @__PURE__ */ e("span", { className: t.modelBreakdownName, children: c }),
|
|
1342
1343
|
/* @__PURE__ */ e("div", { className: t.modelBreakdownBar, children: /* @__PURE__ */ e(
|
|
1343
1344
|
"div",
|
|
1344
1345
|
{
|
|
1345
1346
|
className: t.modelBreakdownFill,
|
|
1346
|
-
style: { width: `${u[0] /
|
|
1347
|
+
style: { width: `${u[0] / l * 100}%` }
|
|
1347
1348
|
}
|
|
1348
1349
|
) }),
|
|
1349
1350
|
/* @__PURE__ */ s("span", { className: t.modelBreakdownCount, children: [
|
|
@@ -1352,9 +1353,9 @@ function xe({ models: a }) {
|
|
|
1352
1353
|
ae(u[1] + (u[2] || 0)),
|
|
1353
1354
|
"tokens"
|
|
1354
1355
|
] })
|
|
1355
|
-
] },
|
|
1356
|
+
] }, c)) });
|
|
1356
1357
|
}
|
|
1357
|
-
const
|
|
1358
|
+
const tn = [
|
|
1358
1359
|
{
|
|
1359
1360
|
title: "时间",
|
|
1360
1361
|
dataIndex: "createTime",
|
|
@@ -1376,113 +1377,113 @@ const en = [
|
|
|
1376
1377
|
render: (a) => a ? /* @__PURE__ */ e(W, { color: a < 400 ? "green" : "red", children: a }) : "-"
|
|
1377
1378
|
}
|
|
1378
1379
|
];
|
|
1379
|
-
function
|
|
1380
|
+
function an(a) {
|
|
1380
1381
|
var n;
|
|
1381
1382
|
return ((n = a == null ? void 0 : a.stats) == null ? void 0 : n.recent) ?? [];
|
|
1382
1383
|
}
|
|
1383
|
-
function
|
|
1384
|
-
var
|
|
1385
|
-
const [a, n] = N(!0), [
|
|
1386
|
-
var
|
|
1387
|
-
return ((
|
|
1388
|
-
})),
|
|
1389
|
-
new Set([
|
|
1384
|
+
function nn() {
|
|
1385
|
+
var g, m, B, I, G, Q, z;
|
|
1386
|
+
const [a, n] = N(!0), [l, c] = N(null), [u, f] = N([]), [y, _] = N(null), [k, M] = N(null), U = String(be((r) => {
|
|
1387
|
+
var P;
|
|
1388
|
+
return ((P = r.currentUser) == null ? void 0 : P.id) ?? "";
|
|
1389
|
+
})), A = Array.from(
|
|
1390
|
+
new Set([U, Ie].filter((r) => r !== ""))
|
|
1390
1391
|
), C = j(async () => {
|
|
1391
|
-
n(!0),
|
|
1392
|
+
n(!0), c(null);
|
|
1392
1393
|
try {
|
|
1393
|
-
const
|
|
1394
|
-
|
|
1395
|
-
),
|
|
1394
|
+
const r = await Promise.allSettled(
|
|
1395
|
+
A.map((x) => ce(x))
|
|
1396
|
+
), P = [], R = /* @__PURE__ */ new Set();
|
|
1396
1397
|
let o = 0;
|
|
1397
|
-
for (const
|
|
1398
|
-
if (
|
|
1399
|
-
for (const
|
|
1400
|
-
const q = String(
|
|
1401
|
-
|
|
1398
|
+
for (const x of r)
|
|
1399
|
+
if (x.status === "fulfilled")
|
|
1400
|
+
for (const b of x.value) {
|
|
1401
|
+
const q = String(b.id ?? b.akPrefix ?? "");
|
|
1402
|
+
R.has(q) || (R.add(q), P.push(b));
|
|
1402
1403
|
}
|
|
1403
1404
|
else o += 1;
|
|
1404
|
-
if (o ===
|
|
1405
|
+
if (o === r.length)
|
|
1405
1406
|
throw new Error("网关不可达:无法获取 AK 列表");
|
|
1406
|
-
|
|
1407
|
-
let h = null,
|
|
1407
|
+
P.sort((x, b) => (x.id ?? 0) - (b.id ?? 0));
|
|
1408
|
+
let h = null, w = null;
|
|
1408
1409
|
try {
|
|
1409
|
-
h = await
|
|
1410
|
-
} catch (
|
|
1411
|
-
|
|
1410
|
+
h = await Ke(0);
|
|
1411
|
+
} catch (x) {
|
|
1412
|
+
w = x instanceof Error ? x.message : "获取用量失败";
|
|
1412
1413
|
}
|
|
1413
1414
|
_(h);
|
|
1414
|
-
const
|
|
1415
|
-
key:
|
|
1415
|
+
const K = P.map((x) => ({
|
|
1416
|
+
key: x,
|
|
1416
1417
|
stats: h,
|
|
1417
|
-
statsError:
|
|
1418
|
+
statsError: w
|
|
1418
1419
|
}));
|
|
1419
|
-
f(
|
|
1420
|
-
} catch (
|
|
1421
|
-
|
|
1420
|
+
f(K);
|
|
1421
|
+
} catch (r) {
|
|
1422
|
+
c(r instanceof Error ? r.message : "加载失败");
|
|
1422
1423
|
} finally {
|
|
1423
1424
|
n(!1);
|
|
1424
1425
|
}
|
|
1425
|
-
}, [
|
|
1426
|
-
|
|
1426
|
+
}, [A.join(",")]);
|
|
1427
|
+
X(() => {
|
|
1427
1428
|
C();
|
|
1428
1429
|
}, [C]);
|
|
1429
|
-
const
|
|
1430
|
-
const
|
|
1431
|
-
for (const [
|
|
1432
|
-
|
|
1430
|
+
const T = Ae(() => {
|
|
1431
|
+
const r = y, P = {};
|
|
1432
|
+
for (const [R, o] of Object.entries((r == null ? void 0 : r.models) ?? {}))
|
|
1433
|
+
P[R] = [o[0] ?? 0, o[1] ?? 0, o[2] ?? 0];
|
|
1433
1434
|
return {
|
|
1434
|
-
requests: (
|
|
1435
|
-
tokens: (
|
|
1436
|
-
avgLatency: (
|
|
1437
|
-
errors: (
|
|
1438
|
-
models:
|
|
1435
|
+
requests: (r == null ? void 0 : r.totalRequests) ?? 0,
|
|
1436
|
+
tokens: (r == null ? void 0 : r.totalTokens) ?? 0,
|
|
1437
|
+
avgLatency: (r == null ? void 0 : r.avgLatencyMs) ?? 0,
|
|
1438
|
+
errors: (r == null ? void 0 : r.errorCount) ?? 0,
|
|
1439
|
+
models: P
|
|
1439
1440
|
};
|
|
1440
|
-
}, [y]),
|
|
1441
|
-
/* @__PURE__ */ e("div", { className:
|
|
1442
|
-
/* @__PURE__ */ e("div", { className:
|
|
1443
|
-
/* @__PURE__ */ e(
|
|
1444
|
-
] }) : /* @__PURE__ */ s("div", { className:
|
|
1445
|
-
/* @__PURE__ */ s("div", { className:
|
|
1446
|
-
/* @__PURE__ */ e("div", { className:
|
|
1447
|
-
/* @__PURE__ */ e("div", { className:
|
|
1448
|
-
/* @__PURE__ */ e("div", { className:
|
|
1449
|
-
/* @__PURE__ */ e("div", { className:
|
|
1450
|
-
|
|
1441
|
+
}, [y]), p = u.reduce((r, P) => r + (P.key.tokenQuota || 0), 0), i = () => a ? /* @__PURE__ */ e("div", { style: { textAlign: "center", padding: 60 }, children: /* @__PURE__ */ e(Z, { tip: "加载监控数据..." }) }) : l ? /* @__PURE__ */ s("div", { className: O.errorState, children: [
|
|
1442
|
+
/* @__PURE__ */ e("div", { className: O.errorTitle, children: "模型监控数据加载失败" }),
|
|
1443
|
+
/* @__PURE__ */ e("div", { className: O.errorDetail, children: l }),
|
|
1444
|
+
/* @__PURE__ */ e(H, { icon: /* @__PURE__ */ e(Te, {}), onClick: C, type: "primary", children: "重试" })
|
|
1445
|
+
] }) : /* @__PURE__ */ s("div", { className: O.page, children: [
|
|
1446
|
+
/* @__PURE__ */ s("div", { className: O.kpiGrid, children: [
|
|
1447
|
+
/* @__PURE__ */ e("div", { className: O.kpiCard, children: /* @__PURE__ */ e(E, { title: "总请求(近7天)", value: T.requests }) }),
|
|
1448
|
+
/* @__PURE__ */ e("div", { className: O.kpiCard, children: /* @__PURE__ */ e(E, { title: "总 Tokens", value: ae(T.tokens) }) }),
|
|
1449
|
+
/* @__PURE__ */ e("div", { className: O.kpiCard, children: /* @__PURE__ */ e(E, { title: "平均延迟", value: T.avgLatency, suffix: "ms" }) }),
|
|
1450
|
+
/* @__PURE__ */ e("div", { className: O.kpiCard, children: /* @__PURE__ */ e(
|
|
1451
|
+
E,
|
|
1451
1452
|
{
|
|
1452
1453
|
title: "错误数",
|
|
1453
|
-
value:
|
|
1454
|
-
valueStyle:
|
|
1454
|
+
value: T.errors,
|
|
1455
|
+
valueStyle: T.errors > 0 ? { color: "#ff4d4f" } : void 0
|
|
1455
1456
|
}
|
|
1456
1457
|
) })
|
|
1457
1458
|
] }),
|
|
1458
|
-
/* @__PURE__ */ s("div", { className:
|
|
1459
|
-
/* @__PURE__ */ s("div", { className:
|
|
1459
|
+
/* @__PURE__ */ s("div", { className: O.sectionCard, children: [
|
|
1460
|
+
/* @__PURE__ */ s("div", { className: O.sectionHead, children: [
|
|
1460
1461
|
/* @__PURE__ */ e("span", { className: t.usageSectionTitle, children: "AK 用量" }),
|
|
1461
|
-
|
|
1462
|
+
p > 0 && /* @__PURE__ */ s("span", { className: O.sectionHint, children: [
|
|
1462
1463
|
"合计额度 ",
|
|
1463
|
-
ae(
|
|
1464
|
+
ae(p),
|
|
1464
1465
|
" tokens"
|
|
1465
1466
|
] })
|
|
1466
1467
|
] }),
|
|
1467
|
-
u.length === 0 ? /* @__PURE__ */ e("div", { className: t.akEmpty, children: "网关下暂无 AK" }) : /* @__PURE__ */ e("div", { className:
|
|
1468
|
-
const
|
|
1468
|
+
u.length === 0 ? /* @__PURE__ */ e("div", { className: t.akEmpty, children: "网关下暂无 AK" }) : /* @__PURE__ */ e("div", { className: O.akList, children: u.map((r) => {
|
|
1469
|
+
const P = r.key.totalTokens ?? 0, R = r.key.tokenQuota || 0, o = R > 0 ? Math.min(P / R * 100, 100) : 0;
|
|
1469
1470
|
return /* @__PURE__ */ s(
|
|
1470
1471
|
"div",
|
|
1471
1472
|
{
|
|
1472
1473
|
className: t.akCard,
|
|
1473
|
-
onClick: () =>
|
|
1474
|
+
onClick: () => M(r),
|
|
1474
1475
|
children: [
|
|
1475
1476
|
/* @__PURE__ */ s("div", { className: t.akCardRow, children: [
|
|
1476
|
-
/* @__PURE__ */ e("span", { className: t.akTitle, children:
|
|
1477
|
-
/* @__PURE__ */ e("span", { className: t.akPrefixSmall, children:
|
|
1477
|
+
/* @__PURE__ */ e("span", { className: t.akTitle, children: r.key.description || r.key.userName || `AK #${r.key.id}` }),
|
|
1478
|
+
/* @__PURE__ */ e("span", { className: t.akPrefixSmall, children: r.key.akPrefix }),
|
|
1478
1479
|
/* @__PURE__ */ e(
|
|
1479
1480
|
"span",
|
|
1480
1481
|
{
|
|
1481
|
-
className: `${t.akStatus} ${
|
|
1482
|
-
children:
|
|
1482
|
+
className: `${t.akStatus} ${r.key.active ? t.akStatusActive : t.akStatusRevoked}`,
|
|
1483
|
+
children: r.key.active ? "启用" : "吊销"
|
|
1483
1484
|
}
|
|
1484
1485
|
),
|
|
1485
|
-
/* @__PURE__ */ e("span", { className: t.akMetaText, children:
|
|
1486
|
+
/* @__PURE__ */ e("span", { className: t.akMetaText, children: r.key.userId === "system-default" ? "系统对话" : r.key.userId })
|
|
1486
1487
|
] }),
|
|
1487
1488
|
/* @__PURE__ */ s("div", { className: t.akCardRow2, children: [
|
|
1488
1489
|
/* @__PURE__ */ e("div", { className: t.akMiniBar, children: /* @__PURE__ */ e(
|
|
@@ -1493,96 +1494,96 @@ function an() {
|
|
|
1493
1494
|
}
|
|
1494
1495
|
) }),
|
|
1495
1496
|
/* @__PURE__ */ s("span", { className: t.akUsageText, children: [
|
|
1496
|
-
ae(
|
|
1497
|
-
|
|
1497
|
+
ae(P),
|
|
1498
|
+
R > 0 ? ` / ${ae(R)}` : "",
|
|
1498
1499
|
" tokens"
|
|
1499
1500
|
] }),
|
|
1500
|
-
/* @__PURE__ */ e("span", { className: t.akMetaText, children:
|
|
1501
|
+
/* @__PURE__ */ e("span", { className: t.akMetaText, children: r.statsError ? r.statsError : r.key.lastUsedAt ? `最近使用 ${r.key.lastUsedAt}` : "尚未使用" })
|
|
1501
1502
|
] })
|
|
1502
1503
|
]
|
|
1503
1504
|
},
|
|
1504
|
-
|
|
1505
|
+
r.key.id
|
|
1505
1506
|
);
|
|
1506
1507
|
}) })
|
|
1507
1508
|
] }),
|
|
1508
|
-
/* @__PURE__ */ s("div", { className:
|
|
1509
|
+
/* @__PURE__ */ s("div", { className: O.sectionCard, children: [
|
|
1509
1510
|
/* @__PURE__ */ e("span", { className: t.usageSectionTitle, children: "模型用量分布(网关全局)" }),
|
|
1510
|
-
/* @__PURE__ */ e(
|
|
1511
|
+
/* @__PURE__ */ e(ve, { models: T.models })
|
|
1511
1512
|
] })
|
|
1512
1513
|
] });
|
|
1513
|
-
return /* @__PURE__ */ s("div", { className:
|
|
1514
|
+
return /* @__PURE__ */ s("div", { className: O.container, children: [
|
|
1514
1515
|
/* @__PURE__ */ s("div", { className: t.modelMgmtHeader, children: [
|
|
1515
1516
|
/* @__PURE__ */ e("h2", { className: t.modelMgmtTitle, children: "模型监控" }),
|
|
1516
1517
|
/* @__PURE__ */ e("p", { className: t.modelMgmtSubtitle, children: "大模型网关管控视图 — 网关全局聚合调用量、Tokens 与延迟(近 7 天)" })
|
|
1517
1518
|
] }),
|
|
1518
1519
|
/* @__PURE__ */ e(
|
|
1519
|
-
|
|
1520
|
+
Be,
|
|
1520
1521
|
{
|
|
1521
1522
|
defaultActiveKey: "usage",
|
|
1522
1523
|
items: [
|
|
1523
|
-
{ key: "usage", label: "模型用量", children:
|
|
1524
|
+
{ key: "usage", label: "模型用量", children: i() },
|
|
1524
1525
|
{
|
|
1525
1526
|
key: "sessions",
|
|
1526
1527
|
label: "会话统计",
|
|
1527
|
-
children: /* @__PURE__ */ e(
|
|
1528
|
+
children: /* @__PURE__ */ e(We, { fallback: /* @__PURE__ */ e(Z, { tip: "加载会话统计..." }), children: /* @__PURE__ */ e(Za, {}) })
|
|
1528
1529
|
}
|
|
1529
1530
|
]
|
|
1530
1531
|
}
|
|
1531
1532
|
),
|
|
1532
1533
|
/* @__PURE__ */ e(
|
|
1533
|
-
|
|
1534
|
+
xe,
|
|
1534
1535
|
{
|
|
1535
|
-
title:
|
|
1536
|
+
title: k ? `AK 用量 — ${k.key.description || k.key.akPrefix}` : "",
|
|
1536
1537
|
width: 860,
|
|
1537
|
-
open: !!
|
|
1538
|
-
onClose: () =>
|
|
1538
|
+
open: !!k,
|
|
1539
|
+
onClose: () => M(null),
|
|
1539
1540
|
destroyOnHidden: !0,
|
|
1540
|
-
children:
|
|
1541
|
+
children: k && /* @__PURE__ */ s("div", { className: t.usageDrawerContent, children: [
|
|
1541
1542
|
/* @__PURE__ */ e("div", { style: { fontSize: 12, color: "#8c8c8c", marginBottom: 12 }, children: "调用监控是网关全局维度(不按 AK 留存),以下统计覆盖全部 AK; 该 AK 自身的累计消耗见「本 AK 累计 Token」。" }),
|
|
1542
1543
|
/* @__PURE__ */ s("div", { className: t.usageStatsGrid, children: [
|
|
1543
|
-
/* @__PURE__ */ e(
|
|
1544
|
-
/* @__PURE__ */ e(
|
|
1545
|
-
/* @__PURE__ */ e(
|
|
1546
|
-
/* @__PURE__ */ e(
|
|
1547
|
-
/* @__PURE__ */ e(
|
|
1544
|
+
/* @__PURE__ */ e(E, { title: "总请求", value: ((g = k.stats) == null ? void 0 : g.totalRequests) ?? 0 }),
|
|
1545
|
+
/* @__PURE__ */ e(E, { title: "总 Tokens", value: ((m = k.stats) == null ? void 0 : m.totalTokens) ?? 0 }),
|
|
1546
|
+
/* @__PURE__ */ e(E, { title: "平均延迟", value: ((B = k.stats) == null ? void 0 : B.avgLatencyMs) ?? 0, suffix: "ms" }),
|
|
1547
|
+
/* @__PURE__ */ e(E, { title: "输入 Tokens", value: ((I = k.stats) == null ? void 0 : I.totalPromptTokens) ?? 0 }),
|
|
1548
|
+
/* @__PURE__ */ e(E, { title: "输出 Tokens", value: ((G = k.stats) == null ? void 0 : G.totalCompletionTokens) ?? 0 }),
|
|
1548
1549
|
/* @__PURE__ */ e(
|
|
1549
|
-
|
|
1550
|
+
E,
|
|
1550
1551
|
{
|
|
1551
1552
|
title: "本 AK 累计 Token",
|
|
1552
|
-
value:
|
|
1553
|
+
value: k.key.totalTokens ?? 0
|
|
1553
1554
|
}
|
|
1554
1555
|
),
|
|
1555
1556
|
/* @__PURE__ */ e(
|
|
1556
|
-
|
|
1557
|
+
E,
|
|
1557
1558
|
{
|
|
1558
1559
|
title: "错误数",
|
|
1559
|
-
value: ((Q =
|
|
1560
|
-
valueStyle: (((
|
|
1560
|
+
value: ((Q = k.stats) == null ? void 0 : Q.errorCount) ?? 0,
|
|
1561
|
+
valueStyle: (((z = k.stats) == null ? void 0 : z.errorCount) ?? 0) > 0 ? { color: "#ff4d4f" } : void 0
|
|
1561
1562
|
}
|
|
1562
1563
|
)
|
|
1563
1564
|
] }),
|
|
1564
1565
|
/* @__PURE__ */ s("div", { className: t.usageSection, children: [
|
|
1565
1566
|
/* @__PURE__ */ e("span", { className: t.usageSectionTitle, children: "每日用量(按最近调用明细聚合)" }),
|
|
1566
|
-
|
|
1567
|
+
k.stats ? /* @__PURE__ */ e(en, { daily: k.stats.daily ?? {} }) : /* @__PURE__ */ e("span", { className: t.usageEmpty, children: k.statsError ?? "暂无数据" })
|
|
1567
1568
|
] }),
|
|
1568
1569
|
/* @__PURE__ */ s("div", { className: t.usageSection, children: [
|
|
1569
1570
|
/* @__PURE__ */ e("span", { className: t.usageSectionTitle, children: "模型用量分布(按最近调用明细聚合)" }),
|
|
1570
|
-
|
|
1571
|
+
k.stats ? /* @__PURE__ */ e(ve, { models: k.stats.models ?? {} }) : /* @__PURE__ */ e("span", { className: t.usageEmpty, children: k.statsError ?? "暂无数据" })
|
|
1571
1572
|
] }),
|
|
1572
1573
|
/* @__PURE__ */ s("div", { className: t.usageSection, children: [
|
|
1573
1574
|
/* @__PURE__ */ e("span", { className: t.usageSectionTitle, children: "最近调用" }),
|
|
1574
1575
|
/* @__PURE__ */ e(
|
|
1575
|
-
|
|
1576
|
+
Me,
|
|
1576
1577
|
{
|
|
1577
1578
|
size: "small",
|
|
1578
|
-
columns:
|
|
1579
|
-
dataSource:
|
|
1579
|
+
columns: tn,
|
|
1580
|
+
dataSource: an(k),
|
|
1580
1581
|
rowKey: "id",
|
|
1581
1582
|
pagination: {
|
|
1582
1583
|
pageSize: 8,
|
|
1583
1584
|
showSizeChanger: !0,
|
|
1584
1585
|
pageSizeOptions: ["8", "20", "50", "100"],
|
|
1585
|
-
showTotal: (
|
|
1586
|
+
showTotal: (r) => `共 ${r} 条`
|
|
1586
1587
|
}
|
|
1587
1588
|
}
|
|
1588
1589
|
)
|
|
@@ -1592,49 +1593,53 @@ function an() {
|
|
|
1592
1593
|
)
|
|
1593
1594
|
] });
|
|
1594
1595
|
}
|
|
1595
|
-
const
|
|
1596
|
-
{ key: "model-management", label: "模型管理", icon: /* @__PURE__ */ e(
|
|
1596
|
+
const sn = [
|
|
1597
|
+
{ key: "model-management", label: "模型管理", icon: /* @__PURE__ */ e(ze, {}) },
|
|
1597
1598
|
{ key: "model-chat", label: "模型对话", icon: /* @__PURE__ */ e(Fe, {}) },
|
|
1598
1599
|
{ key: "ak-management", label: "AK 管理", icon: /* @__PURE__ */ e(je, {}) },
|
|
1599
|
-
{ key: "agent-app", label: "Agent 应用", icon: /* @__PURE__ */ e(
|
|
1600
|
+
{ key: "agent-app", label: "Agent 应用", icon: /* @__PURE__ */ e(we, {}) },
|
|
1600
1601
|
{ key: "mcp-service", label: "MCP 服务", icon: /* @__PURE__ */ e(qe, {}) },
|
|
1601
1602
|
{ key: "skill-market", label: "技能市场", icon: /* @__PURE__ */ e(Ge, {}) },
|
|
1602
1603
|
{ key: "model-monitor", label: "模型监控", icon: /* @__PURE__ */ e(Je, {}) }
|
|
1603
1604
|
];
|
|
1604
|
-
function
|
|
1605
|
-
const [a, n] = N("model-management"), [
|
|
1606
|
-
|
|
1607
|
-
}, f =
|
|
1605
|
+
function un() {
|
|
1606
|
+
const [a, n] = N("model-management"), [l, c] = N([]), u = (_) => {
|
|
1607
|
+
c(_), n("model-chat");
|
|
1608
|
+
}, f = Ae(() => sn, []), y = (_, k, M = !1) => /* @__PURE__ */ e(
|
|
1608
1609
|
"div",
|
|
1609
1610
|
{
|
|
1610
1611
|
style: {
|
|
1611
|
-
display: a === _ ?
|
|
1612
|
+
display: a === _ ? M ? "flex" : "block" : "none",
|
|
1612
1613
|
height: "100%",
|
|
1613
|
-
...
|
|
1614
|
+
...M ? { flexDirection: "column" } : {}
|
|
1614
1615
|
},
|
|
1615
|
-
children:
|
|
1616
|
+
children: k
|
|
1616
1617
|
}
|
|
1617
1618
|
);
|
|
1618
1619
|
return /* @__PURE__ */ s("div", { className: t.container, children: [
|
|
1619
|
-
/* @__PURE__ */ e("aside", { className: t.sidebar, children: /* @__PURE__ */ e("nav", { className: t.menuList, children: f.map((_) => /* @__PURE__ */
|
|
1620
|
+
/* @__PURE__ */ e("aside", { className: t.sidebar, children: /* @__PURE__ */ e("nav", { className: t.menuList, children: f.map((_) => /* @__PURE__ */ s(
|
|
1620
1621
|
"div",
|
|
1621
1622
|
{
|
|
1622
1623
|
className: `${t.menuItem} ${a === _.key ? t.menuItemActive : ""}`,
|
|
1623
1624
|
onClick: () => n(_.key),
|
|
1624
|
-
children:
|
|
1625
|
-
|
|
1626
|
-
|
|
1625
|
+
children: [
|
|
1626
|
+
/* @__PURE__ */ e("span", { className: t.menuIcon, children: _.icon }),
|
|
1627
|
+
/* @__PURE__ */ e("span", { className: t.menuLabel, children: _.label })
|
|
1628
|
+
]
|
|
1629
|
+
},
|
|
1630
|
+
_.key
|
|
1631
|
+
)) }) }),
|
|
1627
1632
|
/* @__PURE__ */ s("main", { className: t.panelArea, children: [
|
|
1628
|
-
y("model-management", /* @__PURE__ */ e(
|
|
1629
|
-
y("model-chat", /* @__PURE__ */ e(
|
|
1630
|
-
y("ak-management", /* @__PURE__ */ e(
|
|
1633
|
+
y("model-management", /* @__PURE__ */ e(Ha, { onStartChat: u })),
|
|
1634
|
+
y("model-chat", /* @__PURE__ */ e(Da, { initialModels: l }), !0),
|
|
1635
|
+
y("ak-management", /* @__PURE__ */ e(Oa, {})),
|
|
1631
1636
|
y("agent-app", /* @__PURE__ */ e(Xe, {})),
|
|
1632
1637
|
y("mcp-service", /* @__PURE__ */ e(Ze, {})),
|
|
1633
1638
|
y("skill-market", /* @__PURE__ */ e(et, {})),
|
|
1634
|
-
y("model-monitor", /* @__PURE__ */ e(
|
|
1639
|
+
y("model-monitor", /* @__PURE__ */ e(nn, {}))
|
|
1635
1640
|
] })
|
|
1636
1641
|
] });
|
|
1637
1642
|
}
|
|
1638
1643
|
export {
|
|
1639
|
-
|
|
1644
|
+
un as default
|
|
1640
1645
|
};
|