@yuku123/z-team-component 0.2.124 → 0.2.125
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-CnBBobnM.js → ChangeLogView-BCNmClCn.js} +1 -1
- package/dist/{ComponentDoc-Dfb_rjQu.js → ComponentDoc-DUbdB21y.js} +3 -3
- package/dist/{InvitationManagementPage-Btsr_z3c.js → InvitationManagementPage-BSkhuSG7.js} +1 -1
- package/dist/{OnboardingPage-BpNJH1g3.js → OnboardingPage-BYflka-A.js} +2 -2
- package/dist/{ScheduledTasks-xMw-e26c.js → ScheduledTasks-DhNtpf_h.js} +574 -574
- package/dist/{SystemShell-BxO1dj-t.js → SystemShell-1Nj8U5oA.js} +4 -4
- package/dist/{admin-logs-BEAUmryy.js → admin-logs-Bz9LbaBv.js} +1 -1
- package/dist/{api-DrR_O2R6.js → api-CzRMcBjB.js} +1 -1
- package/dist/{api-Bv9P0qfL.js → api-DMM8bqbG.js} +1 -1
- package/dist/{createWorkspaceWsHandler-Bu3LyHLt.js → createWorkspaceWsHandler-oO2oqrCT.js} +3 -3
- package/dist/{index-B6087_zS.js → index-8yhn34ac.js} +4 -4
- package/dist/{index-1I-_mXPA.js → index-B5v1cx22.js} +1 -1
- package/dist/{index-CDe9_Ydi.js → index-BBYq4ppb.js} +3 -3
- package/dist/{index-CXz_rPPN.js → index-BC7XYopF.js} +1 -1
- package/dist/{index-BTBuIjXR.js → index-BDG94SYZ.js} +3 -3
- package/dist/{index-DyzJM30L.js → index-BE8SfZJn.js} +3 -3
- package/dist/{index-O_mr8Ci8.js → index-BIQrwBjr.js} +3 -3
- package/dist/{index-Dt4CF6Oe.js → index-BKcD8ke6.js} +2 -2
- package/dist/{index-CEI6g8JC.js → index-BO6svfFf.js} +5 -5
- package/dist/{index-BzJ7sD7X.js → index-BRHADkwf.js} +3 -3
- package/dist/{index-CkWhIFZu.js → index-BZFlyy3v.js} +2 -2
- package/dist/{index-CHcyc_B0.js → index-BnU20NG8.js} +1 -1
- package/dist/{index-C_LgdMH7.js → index-BxTHdIKE.js} +3 -3
- package/dist/{index-Dssf8Y4w.js → index-C-oyKUzB.js} +2 -2
- package/dist/{index-C7kq-Zfu.js → index-C2g3oKOG.js} +1 -1
- package/dist/{index-TElNFOKa.js → index-CVjpwaLE.js} +2 -2
- package/dist/{index-ClAdHt2k.js → index-ChcWNrh2.js} +3 -3
- package/dist/{index-CQbIceAm.js → index-Cl7F79v-.js} +6 -6
- package/dist/{index-Bhcp1qg0.js → index-CuTA2Z3L.js} +2 -2
- package/dist/{index-BmdGA6lE.js → index-F3EHd_Bp.js} +2 -2
- package/dist/{index-BXHGbBdb.js → index-O9gJU-ob.js} +2 -2
- package/dist/{index-CSHX8sKC.js → index-Q_PGzJxp.js} +1 -1
- package/dist/{index-Bxs7qEfu.js → index-sIpnyuVL.js} +2 -2
- package/dist/{index-CgjItMTi.js → index-u6RIeHVE.js} +10 -10
- package/dist/{index-Cy_fMBRz.js → index-vqwbINqL.js} +6 -6
- package/dist/index.js +1 -1
- package/dist/{instance-Bpm7F6jh.js → instance-Di3Okyde.js} +1 -1
- package/dist/{menuPermission-Byjpy0tj.js → menuPermission-DDDxCQho.js} +3 -3
- package/dist/pages.js +1 -1
- package/dist/{send-default-agent-team-message-B17nB-kT.js → send-default-agent-team-message-DRltTeoE.js} +1 -1
- package/dist/{sso-user-C4o07uR5.js → sso-user-Bf0ucITy.js} +1 -1
- package/dist/{training-CTify33p.js → training-AHO9f08C.js} +1 -1
- package/dist/{webide-DRmIDuTw.js → webide-xYVV0VjK.js} +3 -3
- package/dist/z-team-component.css +1 -1
- package/package.json +1 -1
|
@@ -1,103 +1,103 @@
|
|
|
1
1
|
import { jsx as e, jsxs as n, Fragment as Be } from "react/jsx-runtime";
|
|
2
|
-
import { RightOutlined as Gs, PlusOutlined as qt, LeftOutlined as qs, CheckOutlined as
|
|
3
|
-
import { useState as
|
|
2
|
+
import { RightOutlined as Gs, PlusOutlined as qt, LeftOutlined as qs, CheckOutlined as ia, LoadingOutlined as an, EditOutlined as gn, DeleteOutlined as ln, FolderOpenOutlined as $t, DownOutlined as zn, UpOutlined as xn, RedoOutlined as Qa, StopOutlined as Xa, CloseOutlined as sn, FolderOutlined as Za, CopyOutlined as Us, ArrowLeftOutlined as Ut, BellOutlined as zs, SaveOutlined as Ws, ProfileOutlined as Vs, MessageOutlined as Ks, SettingOutlined as Js, ThunderboltOutlined as ra, ClockCircleOutlined as Ln, FileTextOutlined as Ys, CommentOutlined as Qs, ToolOutlined as Xs, SyncOutlined as Zs, CheckCircleOutlined as zt, PercentageOutlined as el, FilePptOutlined as tl, ScheduleOutlined as nl, FileImageOutlined as al, MinusOutlined as sl, ArrowUpOutlined as ll, ArrowDownOutlined as il, CodeOutlined as rl, Html5Outlined as ua, OrderedListOutlined as ma, LockOutlined as An, LinkOutlined as ta, SnippetsOutlined as es, SafetyCertificateOutlined as ha, KeyOutlined as ol, DiffOutlined as cl, FontSizeOutlined as dl, ScissorOutlined as ul, ReloadOutlined as rn, CalendarOutlined as pa, BgColorsOutlined as ml, QrcodeOutlined as hl, ApiOutlined as pl, SendOutlined as _l, FileSearchOutlined as ts, PlayCircleOutlined as Ht, FileDoneOutlined as na, CloseCircleOutlined as fl, GiftOutlined as ns, CheckCircleFilled as gl, GoldOutlined as as, EyeOutlined as yl, CrownOutlined as bl, DesktopOutlined as vl, DashboardOutlined as Nl, LaptopOutlined as kl, CloudOutlined as Cl, RobotOutlined as wl } from "@ant-design/icons";
|
|
3
|
+
import { useState as r, useRef as ge, useMemo as Le, useEffect as ee, useCallback as H, Fragment as Sl } from "react";
|
|
4
4
|
import Dn from "react-markdown";
|
|
5
5
|
import ss from "rehype-highlight";
|
|
6
6
|
import Mn from "remark-gfm";
|
|
7
|
-
import { a as ls, f as
|
|
8
|
-
import { _ as us, j as Fl, $ as Vn, a0 as Gl, a1 as ql, a2 as Ul, r as zl, a3 as Wl, a4 as Vl, a5 as ms, a6 as hs, a7 as Kl, a8 as Jl, a9 as ps, aa as _s, ab as fs, ac as gs, ad as ys, ae as Yl, af as Ql, ag as bs, ah as fa, ai as vs, aj as Xl, F as ga, R as oa, L as ya, P as Zl, D as
|
|
9
|
-
import { u as Rn, a as ca, i as ws, T as
|
|
10
|
-
import { message as Ce, Spin as Rt, Input as Ae, Switch as pn, Select as Gt, InputNumber as
|
|
11
|
-
import { f as
|
|
7
|
+
import { a as ls, f as is, B as rs, b as os, u as ct, ag as Tl, ah as cs, n as Ct, ai as Il, t as ds, aj as xl, ak as Bl, al as Ll, a6 as Wn, a8 as _a, a5 as Al, a7 as Rl, o as $l, am as Dl, an as Ml, T as El, ao as Pl, a4 as Ol, ap as Hl, a0 as jl } from "./ComponentDoc-DUbdB21y.js";
|
|
8
|
+
import { _ as us, j as Fl, $ as Vn, a0 as Gl, a1 as ql, a2 as Ul, r as zl, a3 as Wl, a4 as Vl, a5 as ms, a6 as hs, a7 as Kl, a8 as Jl, a9 as ps, aa as _s, ab as fs, ac as gs, ad as ys, ae as Yl, af as Ql, ag as bs, ah as fa, ai as vs, aj as Xl, F as ga, R as oa, L as ya, P as Zl, D as ei, ak as Ns, al as ti, am as ni, an as ai, ao as si, ap as ba, aq as Bn, ar as ks, k as Cs, as as li, at as ii, au as ri, av as oi, aw as Yt } from "./index-u6RIeHVE.js";
|
|
9
|
+
import { u as Rn, a as ca, i as ws, T as ci, t as di, s as ui, v as mi, w as hi, x as Ss, y as pi } from "./createWorkspaceWsHandler-oO2oqrCT.js";
|
|
10
|
+
import { message as Ce, Spin as Rt, Input as Ae, Switch as pn, Select as Gt, InputNumber as _i, Tabs as fi, Card as gi, Tag as de, Table as yi, DatePicker as bi, Segmented as vi, Empty as gt, Modal as Pt, Button as J, Space as Xe, Typography as Ni, Radio as Ot, Row as Lt, Col as et, List as va, Statistic as ki, Tooltip as da, Form as _n, Progress as on } from "antd";
|
|
11
|
+
import { f as Ci, u as wi, a as Si, b as Ti, s as Ii } from "./webide-xYVV0VjK.js";
|
|
12
12
|
import nn from "dayjs";
|
|
13
13
|
import * as $n from "echarts/core";
|
|
14
|
-
import { BarChart as
|
|
15
|
-
import { GridComponent as
|
|
16
|
-
import { CanvasRenderer as
|
|
17
|
-
import { a as
|
|
18
|
-
import { diffLines as
|
|
19
|
-
import
|
|
20
|
-
import { format as
|
|
21
|
-
import { V as Ts, W as
|
|
22
|
-
async function
|
|
14
|
+
import { BarChart as xi, LineChart as Bi, PieChart as Li } from "echarts/charts";
|
|
15
|
+
import { GridComponent as Ai, LegendComponent as Ri, TitleComponent as $i, TooltipComponent as Di } from "echarts/components";
|
|
16
|
+
import { CanvasRenderer as Mi } from "echarts/renderers";
|
|
17
|
+
import { a as Ei } from "./instance-Di3Okyde.js";
|
|
18
|
+
import { diffLines as Pi } from "diff";
|
|
19
|
+
import Oi, { DiffMethod as Hi } from "react-diff-viewer-continued";
|
|
20
|
+
import { format as ji } from "sql-formatter";
|
|
21
|
+
import { V as Ts, W as Fi, k as Gi, h as qi, X as Is, Y as Ui, Z as zi, _ as Na, $ as Wi, a0 as Vi, a1 as xs, a2 as Ki, a3 as Ji, a4 as Yi, a5 as Qi, a6 as Xi, a7 as Zi } from "./training-AHO9f08C.js";
|
|
22
|
+
async function er(t = {}, s = "") {
|
|
23
23
|
const a = new URLSearchParams();
|
|
24
24
|
t.keyword && a.set("keyword", t.keyword), t.category && a.set("category", t.category), t.status !== void 0 && a.set("status", String(t.status)), s && a.set("token", s);
|
|
25
25
|
const l = await ls(
|
|
26
|
-
`${
|
|
27
|
-
|
|
28
|
-
),
|
|
29
|
-
if (Array.isArray(
|
|
30
|
-
const c =
|
|
26
|
+
`${rs}/admin/ft-skills?${a.toString()}`,
|
|
27
|
+
is
|
|
28
|
+
), i = await os(l, "获取 FT skill 列表失败");
|
|
29
|
+
if (Array.isArray(i)) return i;
|
|
30
|
+
const c = i == null ? void 0 : i.items;
|
|
31
31
|
return Array.isArray(c) ? c : [];
|
|
32
32
|
}
|
|
33
|
-
async function
|
|
33
|
+
async function tr(t, s = "") {
|
|
34
34
|
const a = s ? `?token=${encodeURIComponent(s)}` : "", l = await ls(
|
|
35
|
-
`${
|
|
36
|
-
|
|
35
|
+
`${rs}/admin/ft-skills/${t}${a}`,
|
|
36
|
+
is
|
|
37
37
|
);
|
|
38
38
|
return os(l, "获取 FT skill 详情失败");
|
|
39
39
|
}
|
|
40
|
-
const
|
|
41
|
-
container:
|
|
42
|
-
sessionPanel:
|
|
43
|
-
sessionHeader:
|
|
44
|
-
sessionHeaderActions:
|
|
45
|
-
sessionBtnSm:
|
|
46
|
-
sessionList:
|
|
47
|
-
sessionItem:
|
|
48
|
-
sessionItemActive:
|
|
49
|
-
sessionItemTitle:
|
|
50
|
-
sessionLiveDot:
|
|
51
|
-
sessionItemTime:
|
|
52
|
-
sessionDeleteBtn:
|
|
53
|
-
sessionRenameBtn:
|
|
54
|
-
sessionRenameInput:
|
|
55
|
-
sessionCreateRow:
|
|
56
|
-
sessionCreateInput:
|
|
57
|
-
sessionCreateConfirm:
|
|
58
|
-
sessionCreateCancel:
|
|
59
|
-
sessionSearchRow:
|
|
60
|
-
sessionSearchInput:
|
|
61
|
-
sessionSearchClear:
|
|
62
|
-
sessionEmpty:
|
|
63
|
-
sessionExpandBtn:
|
|
64
|
-
chatPanel:
|
|
65
|
-
chatHeader:
|
|
66
|
-
agentAvatar:
|
|
67
|
-
chatHeaderMeta:
|
|
68
|
-
chatHeaderName:
|
|
69
|
-
chatHeaderSession:
|
|
70
|
-
chatHeaderBadge:
|
|
71
|
-
streamingIndicator:
|
|
72
|
-
threadScroll: $
|
|
73
|
-
threadInner:
|
|
74
|
-
landing:
|
|
75
|
-
landingLogo:
|
|
76
|
-
landingTitle:
|
|
77
|
-
landingHint:
|
|
78
|
-
newChatLanding:
|
|
79
|
-
landingComposer:
|
|
80
|
-
landingInput:
|
|
81
|
-
chatEmpty:
|
|
82
|
-
userRow:
|
|
83
|
-
userBubble:
|
|
84
|
-
assistantBlock:
|
|
85
|
-
md:
|
|
86
|
-
mdPreWrap:
|
|
87
|
-
mdPreCopy:
|
|
88
|
-
thinkingHint:
|
|
89
|
-
caretCursor:
|
|
90
|
-
errorBar:
|
|
91
|
-
errorRetryBtn:
|
|
92
|
-
stoppedBar:
|
|
40
|
+
const nr = "_container_beudb_1", ar = "_sessionPanel_beudb_9", sr = "_sessionHeader_beudb_19", lr = "_sessionHeaderActions_beudb_32", ir = "_sessionBtnSm_beudb_37", rr = "_sessionList_beudb_55", or = "_sessionItem_beudb_61", cr = "_sessionItemActive_beudb_79", dr = "_sessionItemTitle_beudb_84", ur = "_sessionLiveDot_beudb_93", mr = "_sessionItemTime_beudb_100", hr = "_sessionDeleteBtn_beudb_106", pr = "_sessionRenameBtn_beudb_127", _r = "_sessionRenameInput_beudb_148", fr = "_sessionCreateRow_beudb_160", gr = "_sessionCreateInput_beudb_166", yr = "_sessionCreateConfirm_beudb_180", br = "_sessionCreateCancel_beudb_181", vr = "_sessionSearchRow_beudb_203", Nr = "_sessionSearchInput_beudb_209", kr = "_sessionSearchClear_beudb_224", Cr = "_sessionEmpty_beudb_245", wr = "_sessionExpandBtn_beudb_255", Sr = "_chatPanel_beudb_275", Tr = "_chatHeader_beudb_284", Ir = "_agentAvatar_beudb_296", xr = "_chatHeaderMeta_beudb_309", Br = "_chatHeaderName_beudb_317", Lr = "_chatHeaderSession_beudb_324", Ar = "_chatHeaderBadge_beudb_332", Rr = "_streamingIndicator_beudb_342", $r = "_threadScroll_beudb_351", Dr = "_threadInner_beudb_357", Mr = "_landing_beudb_368", Er = "_landingLogo_beudb_378", Pr = "_landingTitle_beudb_392", Or = "_landingHint_beudb_398", Hr = "_newChatLanding_beudb_404", jr = "_landingComposer_beudb_415", Fr = "_landingInput_beudb_432", Gr = "_chatEmpty_beudb_448", qr = "_userRow_beudb_459", Ur = "_userBubble_beudb_464", zr = "_assistantBlock_beudb_478", Wr = "_md_beudb_488", Vr = "_mdPreWrap_beudb_546", Kr = "_mdPreCopy_beudb_550", Jr = "_thinkingHint_beudb_585", Yr = "_caretCursor_beudb_600", Qr = "_errorBar_beudb_617", Xr = "_errorRetryBtn_beudb_626", Zr = "_stoppedBar_beudb_641", eo = "_scrollTopBtn_beudb_651", to = "_scrollTopBtnVisible_beudb_673", no = "_composerWrap_beudb_684", ao = "_composer_beudb_684", so = "_composerInput_beudb_706", lo = "_sendBtn_beudb_724", io = "_stopBtn_beudb_725", ro = "_sendBtnReady_beudb_745", oo = "_composerHint_beudb_763", co = "_msgMeta_beudb_773", uo = "_copyBtn_beudb_784", mo = "_copyBtnInline_beudb_814", ho = "_copyBtnDone_beudb_821", po = "_landingChips_beudb_826", _o = "_landingChip_beudb_826", fo = "_userActions_beudb_853", go = "_userActionBtn_beudb_866", yo = "_editingBar_beudb_889", bo = "_pendingBar_beudb_904", vo = "_editingCancel_beudb_925", No = "_workdirBar_beudb_942", ko = "_workdirChip_beudb_951", Co = "_workdirCaret_beudb_978", wo = "_workdirPath_beudb_983", So = "_dirMask_beudb_993", To = "_dirModal_beudb_1003", Io = "_dirHead_beudb_1014", xo = "_dirClose_beudb_1024", Bo = "_dirBar_beudb_1041", Lo = "_dirUp_beudb_1049", Ao = "_dirPathText_beudb_1068", Ro = "_dirList_beudb_1077", $o = "_dirItem_beudb_1084", Do = "_dirEmpty_beudb_1109", Mo = "_dirError_beudb_1119", Eo = "_dirFoot_beudb_1125", Po = "_dirCancel_beudb_1133", Oo = "_dirConfirm_beudb_1134", A = {
|
|
41
|
+
container: nr,
|
|
42
|
+
sessionPanel: ar,
|
|
43
|
+
sessionHeader: sr,
|
|
44
|
+
sessionHeaderActions: lr,
|
|
45
|
+
sessionBtnSm: ir,
|
|
46
|
+
sessionList: rr,
|
|
47
|
+
sessionItem: or,
|
|
48
|
+
sessionItemActive: cr,
|
|
49
|
+
sessionItemTitle: dr,
|
|
50
|
+
sessionLiveDot: ur,
|
|
51
|
+
sessionItemTime: mr,
|
|
52
|
+
sessionDeleteBtn: hr,
|
|
53
|
+
sessionRenameBtn: pr,
|
|
54
|
+
sessionRenameInput: _r,
|
|
55
|
+
sessionCreateRow: fr,
|
|
56
|
+
sessionCreateInput: gr,
|
|
57
|
+
sessionCreateConfirm: yr,
|
|
58
|
+
sessionCreateCancel: br,
|
|
59
|
+
sessionSearchRow: vr,
|
|
60
|
+
sessionSearchInput: Nr,
|
|
61
|
+
sessionSearchClear: kr,
|
|
62
|
+
sessionEmpty: Cr,
|
|
63
|
+
sessionExpandBtn: wr,
|
|
64
|
+
chatPanel: Sr,
|
|
65
|
+
chatHeader: Tr,
|
|
66
|
+
agentAvatar: Ir,
|
|
67
|
+
chatHeaderMeta: xr,
|
|
68
|
+
chatHeaderName: Br,
|
|
69
|
+
chatHeaderSession: Lr,
|
|
70
|
+
chatHeaderBadge: Ar,
|
|
71
|
+
streamingIndicator: Rr,
|
|
72
|
+
threadScroll: $r,
|
|
73
|
+
threadInner: Dr,
|
|
74
|
+
landing: Mr,
|
|
75
|
+
landingLogo: Er,
|
|
76
|
+
landingTitle: Pr,
|
|
77
|
+
landingHint: Or,
|
|
78
|
+
newChatLanding: Hr,
|
|
79
|
+
landingComposer: jr,
|
|
80
|
+
landingInput: Fr,
|
|
81
|
+
chatEmpty: Gr,
|
|
82
|
+
userRow: qr,
|
|
83
|
+
userBubble: Ur,
|
|
84
|
+
assistantBlock: zr,
|
|
85
|
+
md: Wr,
|
|
86
|
+
mdPreWrap: Vr,
|
|
87
|
+
mdPreCopy: Kr,
|
|
88
|
+
thinkingHint: Jr,
|
|
89
|
+
caretCursor: Yr,
|
|
90
|
+
errorBar: Qr,
|
|
91
|
+
errorRetryBtn: Xr,
|
|
92
|
+
stoppedBar: Zr,
|
|
93
93
|
scrollTopBtn: eo,
|
|
94
94
|
scrollTopBtnVisible: to,
|
|
95
95
|
composerWrap: no,
|
|
96
96
|
composer: ao,
|
|
97
97
|
composerInput: so,
|
|
98
98
|
sendBtn: lo,
|
|
99
|
-
stopBtn:
|
|
100
|
-
sendBtnReady:
|
|
99
|
+
stopBtn: io,
|
|
100
|
+
sendBtnReady: ro,
|
|
101
101
|
composerHint: oo,
|
|
102
102
|
msgMeta: co,
|
|
103
103
|
copyBtn: uo,
|
|
@@ -216,9 +216,9 @@ function qo({ text: t }) {
|
|
|
216
216
|
) });
|
|
217
217
|
}
|
|
218
218
|
function Uo({ startedAtMs: t }) {
|
|
219
|
-
const [, s] =
|
|
219
|
+
const [, s] = r(0);
|
|
220
220
|
ee(() => {
|
|
221
|
-
const l = window.setInterval(() => s((
|
|
221
|
+
const l = window.setInterval(() => s((i) => i + 1), 1e3);
|
|
222
222
|
return () => window.clearInterval(l);
|
|
223
223
|
}, []);
|
|
224
224
|
const a = Math.max(1, Math.round((Date.now() - t) / 1e3));
|
|
@@ -246,7 +246,7 @@ function aa({
|
|
|
246
246
|
inline: s,
|
|
247
247
|
label: a = "复制正文"
|
|
248
248
|
}) {
|
|
249
|
-
const [l,
|
|
249
|
+
const [l, i] = r(!1);
|
|
250
250
|
return /* @__PURE__ */ e(
|
|
251
251
|
"button",
|
|
252
252
|
{
|
|
@@ -254,11 +254,11 @@ function aa({
|
|
|
254
254
|
className: `${A.copyBtn} ${s ? A.copyBtnInline : ""} ${l ? A.copyBtnDone : ""}`,
|
|
255
255
|
onClick: () => {
|
|
256
256
|
const c = t();
|
|
257
|
-
!c || !zo(c) || (
|
|
257
|
+
!c || !zo(c) || (i(!0), window.setTimeout(() => i(!1), 1600));
|
|
258
258
|
},
|
|
259
259
|
title: a,
|
|
260
260
|
"aria-label": a,
|
|
261
|
-
children: l ? /* @__PURE__ */ e(
|
|
261
|
+
children: l ? /* @__PURE__ */ e(ia, {}) : /* @__PURE__ */ e(Us, {})
|
|
262
262
|
}
|
|
263
263
|
);
|
|
264
264
|
}
|
|
@@ -273,27 +273,27 @@ function Ik({
|
|
|
273
273
|
newSessionTrigger: s = 0,
|
|
274
274
|
autoSendDraft: a = null,
|
|
275
275
|
onAutoSendConsumed: l,
|
|
276
|
-
openSessionId:
|
|
276
|
+
openSessionId: i = null,
|
|
277
277
|
onOpenSessionConsumed: c,
|
|
278
278
|
onSessionsMutated: p
|
|
279
279
|
}) {
|
|
280
280
|
var wn;
|
|
281
|
-
const { chatPanelWidth: m } = Rn(), u = ct((f) => f.currentUser), d = Rn(), [o, v] =
|
|
281
|
+
const { chatPanelWidth: m } = Rn(), u = ct((f) => f.currentUser), d = Rn(), [o, v] = r([]), [x, R] = r(""), [F, $] = r(null), [O, Q] = r(""), te = ge(!1), Y = Le(() => {
|
|
282
282
|
const f = x.trim().toLowerCase();
|
|
283
283
|
return f ? o.filter((P) => P.title.toLowerCase().includes(f)) : o;
|
|
284
|
-
}, [o, x]), [I, K] =
|
|
284
|
+
}, [o, x]), [I, K] = r(
|
|
285
285
|
null
|
|
286
|
-
), [W, ne] =
|
|
286
|
+
), [W, ne] = r([]), [B, U] = r(""), [T, le] = r(!1), ae = ge(!1), b = ge(null), [L, G] = r(null), X = ge(null), k = ge(null), S = ge(null);
|
|
287
287
|
ee(() => {
|
|
288
288
|
S.current = I;
|
|
289
289
|
}, [I]);
|
|
290
|
-
const
|
|
290
|
+
const ie = ge(/* @__PURE__ */ new Map()), Z = ge(null), he = (f) => {
|
|
291
291
|
ae.current = f, le(f);
|
|
292
|
-
}, [pe, ve] =
|
|
292
|
+
}, [pe, ve] = r(!1), [ye, Se] = r(""), [qe, $e] = r(!1), [Ve, nt] = r(!1), [pt, Ke] = r(""), [tt, bt] = r(
|
|
293
293
|
() => localStorage.getItem("ft_local_session_collapsed") !== "false"
|
|
294
|
-
), [vt, at] =
|
|
294
|
+
), [vt, at] = r(!0), [dt, Je] = r(!1), [Ye, Ee] = r(null), [je, g] = r(
|
|
295
295
|
() => localStorage.getItem(Sa)
|
|
296
|
-
), [
|
|
296
|
+
), [re, Ne] = r(!1), [be, _t] = r(null), [ot, ut] = r(!1), [Qe, mt] = r(null), kt = Le(
|
|
297
297
|
() => {
|
|
298
298
|
var f;
|
|
299
299
|
return ((f = o.find((P) => P.id === I)) == null ? void 0 : f.workdir) ?? null;
|
|
@@ -373,12 +373,12 @@ function Ik({
|
|
|
373
373
|
}, []);
|
|
374
374
|
const Mt = ge(null);
|
|
375
375
|
ee(() => {
|
|
376
|
-
!
|
|
377
|
-
}, [
|
|
376
|
+
!i || Mt.current === i || (Mt.current = i, K(i), c == null || c());
|
|
377
|
+
}, [i, c]), ee(() => {
|
|
378
378
|
const f = Z.current;
|
|
379
379
|
if (f != null && f !== I) {
|
|
380
|
-
|
|
381
|
-
const fe =
|
|
380
|
+
ie.current.set(f, B);
|
|
381
|
+
const fe = ie.current.get(I ?? "") ?? "";
|
|
382
382
|
U(fe), requestAnimationFrame(() => {
|
|
383
383
|
const oe = He.current;
|
|
384
384
|
oe && (oe.style.height = "auto", oe.style.height = Math.min(oe.scrollHeight, 180) + "px");
|
|
@@ -468,10 +468,10 @@ function Ik({
|
|
|
468
468
|
const De = Date.now();
|
|
469
469
|
let ke = {};
|
|
470
470
|
j === "thinking" && Te.thinkingStartMs == null ? ke = { thinkingStartMs: De } : j === "text" && Te.thinkingStartMs != null && Te.thinkingMs == null && (ke = { thinkingMs: De - Te.thinkingStartMs });
|
|
471
|
-
const Pe = [...Te.blocks],
|
|
472
|
-
return
|
|
473
|
-
...
|
|
474
|
-
text:
|
|
471
|
+
const Pe = [...Te.blocks], it = Pe[Pe.length - 1];
|
|
472
|
+
return it != null && (j === "text" && it.type === "text" || j === "thinking" && it.type === "thinking") && it ? Pe[Pe.length - 1] = {
|
|
473
|
+
...it,
|
|
474
|
+
text: it.text + fe
|
|
475
475
|
} : Pe.push({ type: j, text: fe }), { ...Te, ...ke, blocks: Pe };
|
|
476
476
|
})
|
|
477
477
|
);
|
|
@@ -494,9 +494,9 @@ function Ik({
|
|
|
494
494
|
});
|
|
495
495
|
else if (j.kind === "tool_end")
|
|
496
496
|
for (let Pe = ke.length - 1; Pe >= 0; Pe--) {
|
|
497
|
-
const
|
|
498
|
-
if (
|
|
499
|
-
ke[Pe] = { ...
|
|
497
|
+
const it = ke[Pe];
|
|
498
|
+
if (it.type === "tool_call" && j.id && it.id === j.id) {
|
|
499
|
+
ke[Pe] = { ...it, input: j.input };
|
|
500
500
|
break;
|
|
501
501
|
}
|
|
502
502
|
}
|
|
@@ -572,7 +572,7 @@ function Ik({
|
|
|
572
572
|
},
|
|
573
573
|
onError: (ke) => {
|
|
574
574
|
b.current = null, he(!1), Ue.current = null, Ze.current = null;
|
|
575
|
-
const Pe = _.current,
|
|
575
|
+
const Pe = _.current, it = (h) => h.map(
|
|
576
576
|
(M) => M.id === oe ? {
|
|
577
577
|
...M,
|
|
578
578
|
streaming: !1,
|
|
@@ -581,7 +581,7 @@ function Ik({
|
|
|
581
581
|
error: M.blocks.length ? ke.message : `[错误] ${ke.message}`
|
|
582
582
|
} : M
|
|
583
583
|
);
|
|
584
|
-
Pe && Pe.sid === j ? (Pe.messages =
|
|
584
|
+
Pe && Pe.sid === j ? (Pe.messages = it(Pe.messages), S.current === j && ne(Pe.messages)) : ne((h) => it(h));
|
|
585
585
|
const xt = X.current;
|
|
586
586
|
X.current = null, k.current = null, G(null), xt && U((h) => h ? h + `
|
|
587
587
|
` + xt : xt);
|
|
@@ -592,7 +592,7 @@ function Ik({
|
|
|
592
592
|
b.current = null;
|
|
593
593
|
const Pe = _.current;
|
|
594
594
|
_.current = null;
|
|
595
|
-
const
|
|
595
|
+
const it = (M) => M.map(
|
|
596
596
|
(se) => se.id === oe ? {
|
|
597
597
|
...se,
|
|
598
598
|
streaming: !1,
|
|
@@ -602,7 +602,7 @@ function Ik({
|
|
|
602
602
|
usage: se.usage ?? (ke == null ? void 0 : ke.usage)
|
|
603
603
|
} : se
|
|
604
604
|
);
|
|
605
|
-
Pe && Pe.sid === j ? S.current === j && ne(
|
|
605
|
+
Pe && Pe.sid === j ? S.current === j && ne(it(Pe.messages)) : ne((M) => it(M));
|
|
606
606
|
const xt = X.current, h = k.current;
|
|
607
607
|
X.current = null, k.current = null, G(null), xt && (h && S.current === h ? At(xt, h) : U((M) => M ? M + `
|
|
608
608
|
` + xt : xt));
|
|
@@ -661,10 +661,10 @@ function Ik({
|
|
|
661
661
|
if (f) {
|
|
662
662
|
if (T) {
|
|
663
663
|
X.current = X.current ? X.current + `
|
|
664
|
-
` + f : f, k.current = I, G(X.current), U(""),
|
|
664
|
+
` + f : f, k.current = I, G(X.current), U(""), ie.current.delete(I ?? ""), He.current && (He.current.style.height = "auto");
|
|
665
665
|
return;
|
|
666
666
|
}
|
|
667
|
-
if (U(""),
|
|
667
|
+
if (U(""), ie.current.delete(I ?? ""), He.current && (He.current.style.height = "auto"), Ye != null) {
|
|
668
668
|
const P = Ye;
|
|
669
669
|
Ee(null), mn(P, f);
|
|
670
670
|
return;
|
|
@@ -693,7 +693,7 @@ function Ik({
|
|
|
693
693
|
if (oe.type === "thinking")
|
|
694
694
|
fe.push(
|
|
695
695
|
/* @__PURE__ */ e(
|
|
696
|
-
|
|
696
|
+
ci,
|
|
697
697
|
{
|
|
698
698
|
text: oe.text,
|
|
699
699
|
streaming: !!f.streaming,
|
|
@@ -707,7 +707,7 @@ function Ik({
|
|
|
707
707
|
const De = oe.id ? P.get(oe.id) : void 0, ke = oe._t0 != null && (De == null ? void 0 : De._t1) != null ? Math.max(1, De._t1 - oe._t0) : oe.durationMs;
|
|
708
708
|
fe.push(
|
|
709
709
|
/* @__PURE__ */ e(
|
|
710
|
-
|
|
710
|
+
di,
|
|
711
711
|
{
|
|
712
712
|
call: oe,
|
|
713
713
|
result: De,
|
|
@@ -820,7 +820,7 @@ function Ik({
|
|
|
820
820
|
className: A.sessionCreateConfirm,
|
|
821
821
|
onClick: () => void Wt(),
|
|
822
822
|
title: "确认创建",
|
|
823
|
-
children: /* @__PURE__ */ e(
|
|
823
|
+
children: /* @__PURE__ */ e(ia, {})
|
|
824
824
|
}
|
|
825
825
|
),
|
|
826
826
|
/* @__PURE__ */ e(
|
|
@@ -1223,7 +1223,7 @@ function Ik({
|
|
|
1223
1223
|
] })
|
|
1224
1224
|
) : /* @__PURE__ */ e("div", { className: A.chatEmpty, children: "请在左侧选择或创建一个会话" })
|
|
1225
1225
|
] }),
|
|
1226
|
-
|
|
1226
|
+
re && /* @__PURE__ */ e(
|
|
1227
1227
|
"div",
|
|
1228
1228
|
{
|
|
1229
1229
|
className: A.dirMask,
|
|
@@ -1312,7 +1312,7 @@ function Ik({
|
|
|
1312
1312
|
}
|
|
1313
1313
|
);
|
|
1314
1314
|
}
|
|
1315
|
-
const Wo = "_container_oyitu_1", Vo = "_header_oyitu_9", Ko = "_backBtn_oyitu_20", Jo = "_headerTitle_oyitu_40", Yo = "_headerAgentName_oyitu_46", Qo = "_body_oyitu_52", Xo = "_taskListPanel_oyitu_59", Zo = "_taskListHeader_oyitu_69", ec = "_taskListTitle_oyitu_77", tc = "_newTaskBtn_oyitu_83", nc = "_taskList_oyitu_59", ac = "_taskCard_oyitu_105", sc = "_taskCardActive_oyitu_118", lc = "_taskCardHeader_oyitu_123",
|
|
1315
|
+
const Wo = "_container_oyitu_1", Vo = "_header_oyitu_9", Ko = "_backBtn_oyitu_20", Jo = "_headerTitle_oyitu_40", Yo = "_headerAgentName_oyitu_46", Qo = "_body_oyitu_52", Xo = "_taskListPanel_oyitu_59", Zo = "_taskListHeader_oyitu_69", ec = "_taskListTitle_oyitu_77", tc = "_newTaskBtn_oyitu_83", nc = "_taskList_oyitu_59", ac = "_taskCard_oyitu_105", sc = "_taskCardActive_oyitu_118", lc = "_taskCardHeader_oyitu_123", ic = "_taskDot_oyitu_130", rc = "_taskDotEnabled_oyitu_137", oc = "_taskDotDisabled_oyitu_141", cc = "_taskName_oyitu_145", dc = "_taskCron_oyitu_155", uc = "_taskNextRun_oyitu_161", mc = "_detailPanel_oyitu_167", hc = "_emptyState_oyitu_173", pc = "_formGroup_oyitu_183", _c = "_formLabel_oyitu_187", fc = "_formInput_oyitu_195", gc = "_formTextarea_oyitu_213", yc = "_formHint_oyitu_234", bc = "_cronPresets_oyitu_240", vc = "_cronPreset_oyitu_240", Nc = "_actions_oyitu_264", kc = "_btn_oyitu_271", Cc = "_btnPrimary_oyitu_287", wc = "_btnDanger_oyitu_298", Sc = "_logSection_oyitu_309", Tc = "_logSectionTitle_oyitu_313", Ic = "_logList_oyitu_322", xc = "_logItem_oyitu_328", Bc = "_logStatus_oyitu_337", Lc = "_logStatusSuccess_oyitu_349", Ac = "_logStatusFailed_oyitu_354", Rc = "_logStatusRunning_oyitu_359", $c = "_logContent_oyitu_364", Dc = "_logTime_oyitu_369", Mc = "_logSnippet_oyitu_375", Ec = "_logError_oyitu_386", Pc = "_logActions_oyitu_392", Oc = "_pagination_oyitu_408", Hc = "_pageBtn_oyitu_416", jc = "_pageInfo_oyitu_437", Fc = "_statusBadge_oyitu_443", Gc = "_statusBadgeEnabled_oyitu_452", qc = "_statusBadgeDisabled_oyitu_457", Uc = "_createForm_oyitu_463", zc = "_headerRight_oyitu_468", Wc = "_bellBtn_oyitu_476", Vc = "_bellBadge_oyitu_497", Kc = "_notifPanel_oyitu_514", Jc = "_notifPanelHeader_oyitu_530", Yc = "_notifPanelTitle_oyitu_538", Qc = "_notifMarkAllBtn_oyitu_545", Xc = "_notifCloseBtn_oyitu_561", Zc = "_notifList_oyitu_577", ed = "_notifEmpty_oyitu_583", td = "_notifCard_oyitu_590", nd = "_notifCardUnread_oyitu_602", ad = "_notifCardHeader_oyitu_607", sd = "_notifStatusDot_oyitu_614", ld = "_notifStatusSuccess_oyitu_621", id = "_notifStatusFailed_oyitu_625", rd = "_notifTaskName_oyitu_629", od = "_notifTime_oyitu_639", cd = "_notifReadBtn_oyitu_645", dd = "_notifAgentName_oyitu_661", ud = "_notifResult_oyitu_667", md = "_notifError_oyitu_680", hd = "_staffDropdown_oyitu_687", pd = "_staffInputWrap_oyitu_692", _d = "_staffClearBtn_oyitu_696", fd = "_staffResults_oyitu_720", gd = "_staffLoading_oyitu_735", yd = "_staffEmpty_oyitu_736", bd = "_staffItem_oyitu_743", vd = "_staffName_oyitu_761", Nd = "_staffMeta_oyitu_767", kd = "_notifySelected_oyitu_773", Cd = "_notifySelectedName_oyitu_785", wd = "_notifyClearBtn_oyitu_792", Sd = "_taskNotify_oyitu_808", Td = "_logLinkBtn_oyitu_824", Id = "_sessionModalOverlay_oyitu_844", xd = "_sessionModal_oyitu_844", Bd = "_sessionModalHeader_oyitu_870", Ld = "_sessionModalTitle_oyitu_879", Ad = "_sessionModalClose_oyitu_885", Rd = "_sessionModalBody_oyitu_905", $d = "_sessionModalEmpty_oyitu_914", Dd = "_sessionMsgRow_oyitu_921", Md = "_sessionMsgUser_oyitu_927", Ed = "_sessionMsgRole_oyitu_931", Pd = "_sessionMsgBubble_oyitu_937", w = {
|
|
1316
1316
|
container: Wo,
|
|
1317
1317
|
header: Vo,
|
|
1318
1318
|
backBtn: Ko,
|
|
@@ -1327,8 +1327,8 @@ const Wo = "_container_oyitu_1", Vo = "_header_oyitu_9", Ko = "_backBtn_oyitu_20
|
|
|
1327
1327
|
taskCard: ac,
|
|
1328
1328
|
taskCardActive: sc,
|
|
1329
1329
|
taskCardHeader: lc,
|
|
1330
|
-
taskDot:
|
|
1331
|
-
taskDotEnabled:
|
|
1330
|
+
taskDot: ic,
|
|
1331
|
+
taskDotEnabled: rc,
|
|
1332
1332
|
taskDotDisabled: oc,
|
|
1333
1333
|
taskName: cc,
|
|
1334
1334
|
taskCron: dc,
|
|
@@ -1381,8 +1381,8 @@ const Wo = "_container_oyitu_1", Vo = "_header_oyitu_9", Ko = "_backBtn_oyitu_20
|
|
|
1381
1381
|
notifCardHeader: ad,
|
|
1382
1382
|
notifStatusDot: sd,
|
|
1383
1383
|
notifStatusSuccess: ld,
|
|
1384
|
-
notifStatusFailed:
|
|
1385
|
-
notifTaskName:
|
|
1384
|
+
notifStatusFailed: id,
|
|
1385
|
+
notifTaskName: rd,
|
|
1386
1386
|
notifTime: od,
|
|
1387
1387
|
notifReadBtn: cd,
|
|
1388
1388
|
notifAgentName: dd,
|
|
@@ -1441,35 +1441,35 @@ function Od({
|
|
|
1441
1441
|
embedded: a = !1,
|
|
1442
1442
|
initialSessionId: l
|
|
1443
1443
|
}) {
|
|
1444
|
-
const
|
|
1444
|
+
const i = ct((C) => C.token), [c, p] = r([]), [m, u] = r(null), [d, o] = r("empty"), [v, x] = r(!1), [R, F] = r(""), [$, O] = r(""), [Q, te] = r(""), [Y, I] = r(""), [K, W] = r(""), [ne, B] = r(!1), [U, T] = r(""), [le, ae] = r([]), [b, L] = r(!1), [G, X] = r(!1), k = ge(null), [S, ie] = r([]), [Z, he] = r(1), [pe, ve] = r(0), [ye, Se] = r(0), [qe, $e] = r(!1), [Ve, nt] = r(!1), [pt, Ke] = r([]), [tt, bt] = r(0), [vt, at] = r(!1), [dt, Je] = r(null), [Ye, Ee] = r([]), [je, g] = r(!1), re = H(async () => {
|
|
1445
1445
|
x(!0);
|
|
1446
1446
|
try {
|
|
1447
|
-
const C = await ms(t.id,
|
|
1447
|
+
const C = await ms(t.id, i);
|
|
1448
1448
|
p(C);
|
|
1449
1449
|
} catch {
|
|
1450
1450
|
}
|
|
1451
1451
|
x(!1);
|
|
1452
|
-
}, [t.id,
|
|
1452
|
+
}, [t.id, i]), Ne = H(async () => {
|
|
1453
1453
|
try {
|
|
1454
|
-
const C = await hs(
|
|
1454
|
+
const C = await hs(i, 50);
|
|
1455
1455
|
Ke(C.items), bt(C.unread);
|
|
1456
1456
|
} catch {
|
|
1457
1457
|
}
|
|
1458
|
-
}, [
|
|
1458
|
+
}, [i]), be = H(
|
|
1459
1459
|
async (C) => {
|
|
1460
1460
|
Je(C), Ee([]), g(!0);
|
|
1461
1461
|
try {
|
|
1462
|
-
const V = await cs(t.id, C,
|
|
1462
|
+
const V = await cs(t.id, C, i);
|
|
1463
1463
|
Ee(V);
|
|
1464
1464
|
} catch {
|
|
1465
1465
|
}
|
|
1466
1466
|
g(!1);
|
|
1467
1467
|
},
|
|
1468
|
-
[t.id,
|
|
1468
|
+
[t.id, i]
|
|
1469
1469
|
);
|
|
1470
1470
|
ee(() => {
|
|
1471
|
-
|
|
1472
|
-
}, [
|
|
1471
|
+
re(), Ne();
|
|
1472
|
+
}, [re, Ne]), ee(() => {
|
|
1473
1473
|
l && be(l);
|
|
1474
1474
|
}, [l, be]);
|
|
1475
1475
|
const _t = H(
|
|
@@ -1480,7 +1480,7 @@ function Od({
|
|
|
1480
1480
|
}
|
|
1481
1481
|
L(!0), X(!0), k.current = setTimeout(async () => {
|
|
1482
1482
|
try {
|
|
1483
|
-
const V = await Kl(t.id, C,
|
|
1483
|
+
const V = await Kl(t.id, C, i);
|
|
1484
1484
|
ae(V.slice(0, 20));
|
|
1485
1485
|
} catch {
|
|
1486
1486
|
ae([]);
|
|
@@ -1488,7 +1488,7 @@ function Od({
|
|
|
1488
1488
|
L(!1);
|
|
1489
1489
|
}, 300);
|
|
1490
1490
|
},
|
|
1491
|
-
[t.id,
|
|
1491
|
+
[t.id, i]
|
|
1492
1492
|
), ot = (C) => {
|
|
1493
1493
|
I(C.userId), W(C.name), T(C.name), X(!1);
|
|
1494
1494
|
}, ut = () => {
|
|
@@ -1502,14 +1502,14 @@ function Od({
|
|
|
1502
1502
|
C,
|
|
1503
1503
|
V,
|
|
1504
1504
|
10,
|
|
1505
|
-
|
|
1505
|
+
i
|
|
1506
1506
|
);
|
|
1507
|
-
|
|
1507
|
+
ie(ce.items), he(ce.page), ve(ce.total), Se(ce.total_pages);
|
|
1508
1508
|
} catch {
|
|
1509
1509
|
}
|
|
1510
1510
|
$e(!1);
|
|
1511
1511
|
},
|
|
1512
|
-
[t.id,
|
|
1512
|
+
[t.id, i]
|
|
1513
1513
|
);
|
|
1514
1514
|
ee(() => {
|
|
1515
1515
|
m && d === "detail" && Qe(m, 1);
|
|
@@ -1529,8 +1529,8 @@ function Od({
|
|
|
1529
1529
|
Q,
|
|
1530
1530
|
Y,
|
|
1531
1531
|
K,
|
|
1532
|
-
|
|
1533
|
-
), await
|
|
1532
|
+
i
|
|
1533
|
+
), await re(), o("empty");
|
|
1534
1534
|
} catch {
|
|
1535
1535
|
}
|
|
1536
1536
|
B(!1);
|
|
@@ -1549,8 +1549,8 @@ function Od({
|
|
|
1549
1549
|
notify_user_id: Y,
|
|
1550
1550
|
notify_user_name: K
|
|
1551
1551
|
},
|
|
1552
|
-
|
|
1553
|
-
), await
|
|
1552
|
+
i
|
|
1553
|
+
), await re();
|
|
1554
1554
|
} catch {
|
|
1555
1555
|
}
|
|
1556
1556
|
B(!1);
|
|
@@ -1558,31 +1558,31 @@ function Od({
|
|
|
1558
1558
|
}, Bt = async () => {
|
|
1559
1559
|
if (m && confirm("确定删除此定时任务?"))
|
|
1560
1560
|
try {
|
|
1561
|
-
await fs(t.id, m,
|
|
1561
|
+
await fs(t.id, m, i), await re(), o("empty"), u(null);
|
|
1562
1562
|
} catch {
|
|
1563
1563
|
}
|
|
1564
1564
|
}, St = async (C) => {
|
|
1565
1565
|
try {
|
|
1566
|
-
await gs(t.id, C.id, C.enabled !== 1,
|
|
1566
|
+
await gs(t.id, C.id, C.enabled !== 1, i), await re();
|
|
1567
1567
|
} catch {
|
|
1568
1568
|
}
|
|
1569
1569
|
}, Tt = async () => {
|
|
1570
1570
|
if (m) {
|
|
1571
1571
|
nt(!0);
|
|
1572
1572
|
try {
|
|
1573
|
-
await ys(t.id, m,
|
|
1573
|
+
await ys(t.id, m, i), await Qe(m, 1);
|
|
1574
1574
|
} catch {
|
|
1575
1575
|
}
|
|
1576
1576
|
nt(!1);
|
|
1577
1577
|
}
|
|
1578
1578
|
}, ft = async (C) => {
|
|
1579
1579
|
try {
|
|
1580
|
-
await Yl(C,
|
|
1580
|
+
await Yl(C, i), await Ne();
|
|
1581
1581
|
} catch {
|
|
1582
1582
|
}
|
|
1583
1583
|
}, He = async () => {
|
|
1584
1584
|
try {
|
|
1585
|
-
await Ql(
|
|
1585
|
+
await Ql(i), await Ne();
|
|
1586
1586
|
} catch {
|
|
1587
1587
|
}
|
|
1588
1588
|
}, Ue = c.find((C) => Ct(C.id, m)), Ze = /* @__PURE__ */ n("div", { className: w.staffDropdown, children: [
|
|
@@ -1986,7 +1986,7 @@ function Od({
|
|
|
1986
1986
|
"div",
|
|
1987
1987
|
{
|
|
1988
1988
|
className: `${w.logStatus} ${C.status === "success" ? w.logStatusSuccess : C.status === "failed" ? w.logStatusFailed : w.logStatusRunning}`,
|
|
1989
|
-
children: C.status === "success" ? /* @__PURE__ */ e(
|
|
1989
|
+
children: C.status === "success" ? /* @__PURE__ */ e(ia, {}) : C.status === "failed" ? /* @__PURE__ */ e(sn, {}) : "…"
|
|
1990
1990
|
}
|
|
1991
1991
|
),
|
|
1992
1992
|
/* @__PURE__ */ n("div", { className: w.logContent, children: [
|
|
@@ -2089,7 +2089,7 @@ function Od({
|
|
|
2089
2089
|
)
|
|
2090
2090
|
] });
|
|
2091
2091
|
}
|
|
2092
|
-
const Hd = "_container_nbkud_1", jd = "_header_nbkud_10", Fd = "_headerLeft_nbkud_20", Gd = "_headerTitle_nbkud_27", qd = "_headerActions_nbkud_36", Ud = "_backBtn_nbkud_43", zd = "_saveBtn_nbkud_62", Wd = "_tabBar_nbkud_86", Vd = "_tab_nbkud_86", Kd = "_tabActive_nbkud_114", Jd = "_body_nbkud_120", Yd = "_bodyNoPadding_nbkud_126", Qd = "_sectionHead_nbkud_132", Xd = "_sectionTitle_nbkud_136", Zd = "_sectionDesc_nbkud_143", eu = "_sectionDivider_nbkud_150", tu = "_fieldGrid_nbkud_156", nu = "_field_nbkud_156", au = "_fieldLabel_nbkud_166", su = "_required_nbkud_174", lu = "_fieldInput_nbkud_179",
|
|
2092
|
+
const Hd = "_container_nbkud_1", jd = "_header_nbkud_10", Fd = "_headerLeft_nbkud_20", Gd = "_headerTitle_nbkud_27", qd = "_headerActions_nbkud_36", Ud = "_backBtn_nbkud_43", zd = "_saveBtn_nbkud_62", Wd = "_tabBar_nbkud_86", Vd = "_tab_nbkud_86", Kd = "_tabActive_nbkud_114", Jd = "_body_nbkud_120", Yd = "_bodyNoPadding_nbkud_126", Qd = "_sectionHead_nbkud_132", Xd = "_sectionTitle_nbkud_136", Zd = "_sectionDesc_nbkud_143", eu = "_sectionDivider_nbkud_150", tu = "_fieldGrid_nbkud_156", nu = "_field_nbkud_156", au = "_fieldLabel_nbkud_166", su = "_required_nbkud_174", lu = "_fieldInput_nbkud_179", iu = "_fieldHint_nbkud_183", ru = "_switchGrid_nbkud_191", ou = "_switchItem_nbkud_197", cu = "_switchLabel_nbkud_203", du = "_switchHint_nbkud_209", uu = "_loading_nbkud_215", mu = "_filesContainer_nbkud_260", hu = "_fileTreePanel_nbkud_267", pu = "_fileTreeHeader_nbkud_277", _u = "_fileTreeBody_nbkud_286", fu = "_fileTreeNode_nbkud_292", gu = "_fileTreeNodeActive_nbkud_311", yu = "_fileTreeIcon_nbkud_316", bu = "_fileTreeName_nbkud_326", vu = "_fileTreeEmpty_nbkud_332", Nu = "_fileContentPanel_nbkud_342", ku = "_fileContentEmpty_nbkud_350", Cu = "_fileContentInner_nbkud_359", wu = "_fileContentPath_nbkud_366", Su = "_fileContentPre_nbkud_376", Tu = "_markdownBody_nbkud_389", Iu = "_skillsContainer_nbkud_492", xu = "_skillsEmpty_nbkud_499", Bu = "_skillList_nbkud_508", Lu = "_skillCard_nbkud_514", Au = "_skillCardInfo_nbkud_530", Ru = "_skillCardName_nbkud_535", $u = "_skillCardDesc_nbkud_542", Du = "_skillCardMeta_nbkud_554", Mu = "_skillBadge_nbkud_560", Eu = "_skillCode_nbkud_570", Pu = "_skillCardAction_nbkud_579", Ou = "_skillPagination_nbkud_585", Hu = "_pageBtn_nbkud_593", ju = "_pageInfo_nbkud_614", q = {
|
|
2093
2093
|
container: Hd,
|
|
2094
2094
|
header: jd,
|
|
2095
2095
|
headerLeft: Fd,
|
|
@@ -2111,8 +2111,8 @@ const Hd = "_container_nbkud_1", jd = "_header_nbkud_10", Fd = "_headerLeft_nbku
|
|
|
2111
2111
|
fieldLabel: au,
|
|
2112
2112
|
required: su,
|
|
2113
2113
|
fieldInput: lu,
|
|
2114
|
-
fieldHint:
|
|
2115
|
-
switchGrid:
|
|
2114
|
+
fieldHint: iu,
|
|
2115
|
+
switchGrid: ru,
|
|
2116
2116
|
switchItem: ou,
|
|
2117
2117
|
switchLabel: cu,
|
|
2118
2118
|
switchHint: du,
|
|
@@ -2158,17 +2158,17 @@ function xk({
|
|
|
2158
2158
|
initialTab: a,
|
|
2159
2159
|
initialSessionId: l
|
|
2160
2160
|
}) {
|
|
2161
|
-
const
|
|
2161
|
+
const i = ct((V) => V.token), [c, p] = r(!0), [m, u] = r(!1), [d, o] = r(
|
|
2162
2162
|
a === "schedule" ? "schedule" : "basic"
|
|
2163
|
-
), [v, x] =
|
|
2163
|
+
), [v, x] = r(), [R, F] = r([]), [$, O] = r(""), [Q, te] = r(""), [Y, I] = r(""), [K, W] = r(""), [ne, B] = r(""), [U, T] = r(""), [le, ae] = r(""), [b, L] = r(""), [G, X] = r(), [k, S] = r(!1), [ie, Z] = r(!1), [he, pe] = r(!1), [ve, ye] = r(!0), [Se, qe] = r([]), [$e, Ve] = r(/* @__PURE__ */ new Set()), [nt, pt] = r({}), [Ke, tt] = r(null), [bt, vt] = r(""), [at, dt] = r(!1), [Je, Ye] = r(!1), [Ee, je] = r([]), [g, re] = r(1), [Ne, be] = r(0), [_t, ot] = r(0), [ut, Qe] = r(!1), [mt, kt] = r(null);
|
|
2164
2164
|
ee(() => {
|
|
2165
2165
|
let V = !1;
|
|
2166
2166
|
return (async () => {
|
|
2167
2167
|
p(!0);
|
|
2168
2168
|
try {
|
|
2169
2169
|
const [_, _e] = await Promise.all([
|
|
2170
|
-
|
|
2171
|
-
Il(
|
|
2170
|
+
Ci(t.agentCode, i),
|
|
2171
|
+
Il(i)
|
|
2172
2172
|
]);
|
|
2173
2173
|
if (V) return;
|
|
2174
2174
|
const me = _._agenthub_raw ?? {};
|
|
@@ -2193,7 +2193,7 @@ function xk({
|
|
|
2193
2193
|
})(), () => {
|
|
2194
2194
|
V = !0;
|
|
2195
2195
|
};
|
|
2196
|
-
}, [t.agentCode,
|
|
2196
|
+
}, [t.agentCode, i]);
|
|
2197
2197
|
const st = () => ({
|
|
2198
2198
|
agentName: $.trim(),
|
|
2199
2199
|
description: K.trim(),
|
|
@@ -2207,7 +2207,7 @@ function xk({
|
|
|
2207
2207
|
...b.trim() ? { llm: { modelCode: b.trim() } } : {},
|
|
2208
2208
|
modelExt: {
|
|
2209
2209
|
enable_thinking: k,
|
|
2210
|
-
send_thinking:
|
|
2210
|
+
send_thinking: ie
|
|
2211
2211
|
},
|
|
2212
2212
|
sensitiveFilterConfig: { enabled: he }
|
|
2213
2213
|
}), wt = async () => {
|
|
@@ -2221,7 +2221,7 @@ function xk({
|
|
|
2221
2221
|
}
|
|
2222
2222
|
u(!0);
|
|
2223
2223
|
try {
|
|
2224
|
-
await
|
|
2224
|
+
await wi(v, st(), i), Ce.success("配置已保存");
|
|
2225
2225
|
} catch (V) {
|
|
2226
2226
|
Ce.error((V == null ? void 0 : V.userMessage) ?? "保存失败");
|
|
2227
2227
|
} finally {
|
|
@@ -2230,7 +2230,7 @@ function xk({
|
|
|
2230
2230
|
}, Bt = async () => {
|
|
2231
2231
|
dt(!0);
|
|
2232
2232
|
try {
|
|
2233
|
-
const V = await fa(t.id, "",
|
|
2233
|
+
const V = await fa(t.id, "", i);
|
|
2234
2234
|
qe(V);
|
|
2235
2235
|
} catch (V) {
|
|
2236
2236
|
Ce.error((V == null ? void 0 : V.userMessage) ?? "加载文件列表失败");
|
|
@@ -2246,7 +2246,7 @@ function xk({
|
|
|
2246
2246
|
const _ = await fa(
|
|
2247
2247
|
t.id,
|
|
2248
2248
|
V,
|
|
2249
|
-
|
|
2249
|
+
i
|
|
2250
2250
|
);
|
|
2251
2251
|
pt((_e) => ({ ..._e, [V]: _ }));
|
|
2252
2252
|
} catch (_) {
|
|
@@ -2259,7 +2259,7 @@ function xk({
|
|
|
2259
2259
|
const ce = await Xl(
|
|
2260
2260
|
t.id,
|
|
2261
2261
|
V,
|
|
2262
|
-
|
|
2262
|
+
i
|
|
2263
2263
|
);
|
|
2264
2264
|
vt(ce.content);
|
|
2265
2265
|
} catch (ce) {
|
|
@@ -2302,8 +2302,8 @@ function xk({
|
|
|
2302
2302
|
}), Ue = async (V) => {
|
|
2303
2303
|
Qe(!0);
|
|
2304
2304
|
try {
|
|
2305
|
-
const ce = await bs(t.id, V, 20,
|
|
2306
|
-
je(ce.items),
|
|
2305
|
+
const ce = await bs(t.id, V, 20, i);
|
|
2306
|
+
je(ce.items), re(ce.page), be(ce.total), ot(ce.total_pages);
|
|
2307
2307
|
} catch (ce) {
|
|
2308
2308
|
Ce.error((ce == null ? void 0 : ce.userMessage) ?? "加载 Skill 列表失败");
|
|
2309
2309
|
} finally {
|
|
@@ -2312,7 +2312,7 @@ function xk({
|
|
|
2312
2312
|
}, Ze = async (V, ce) => {
|
|
2313
2313
|
kt(V);
|
|
2314
2314
|
try {
|
|
2315
|
-
await vs(t.id, V, ce,
|
|
2315
|
+
await vs(t.id, V, ce, i), je(
|
|
2316
2316
|
(_) => _.map(
|
|
2317
2317
|
(_e) => _e.skill_code === V ? { ..._e, enabled: ce } : _e
|
|
2318
2318
|
)
|
|
@@ -2429,7 +2429,7 @@ function xk({
|
|
|
2429
2429
|
className: `${q.tab} ${d === "skills" ? q.tabActive : ""}`,
|
|
2430
2430
|
onClick: () => o("skills"),
|
|
2431
2431
|
children: [
|
|
2432
|
-
/* @__PURE__ */ e(
|
|
2432
|
+
/* @__PURE__ */ e(ra, {}),
|
|
2433
2433
|
" 技能"
|
|
2434
2434
|
]
|
|
2435
2435
|
}
|
|
@@ -2592,7 +2592,7 @@ function xk({
|
|
|
2592
2592
|
Fe(
|
|
2593
2593
|
"Temperature",
|
|
2594
2594
|
/* @__PURE__ */ e(
|
|
2595
|
-
|
|
2595
|
+
_i,
|
|
2596
2596
|
{
|
|
2597
2597
|
value: G,
|
|
2598
2598
|
onChange: (V) => X(V ?? void 0),
|
|
@@ -2626,7 +2626,7 @@ function xk({
|
|
|
2626
2626
|
/* @__PURE__ */ e(
|
|
2627
2627
|
pn,
|
|
2628
2628
|
{
|
|
2629
|
-
checked:
|
|
2629
|
+
checked: ie,
|
|
2630
2630
|
onChange: Z
|
|
2631
2631
|
}
|
|
2632
2632
|
),
|
|
@@ -2737,7 +2737,7 @@ function xk({
|
|
|
2737
2737
|
)
|
|
2738
2738
|
] });
|
|
2739
2739
|
}
|
|
2740
|
-
const Gu = "
|
|
2740
|
+
const Gu = "_container_miawb_1", qu = "_sessionPanel_miawb_8", Uu = "_sessionHeader_miawb_18", zu = "_sessionHeaderActions_miawb_29", Wu = "_sessionBtnSm_miawb_34", Vu = "_sessionList_miawb_49", Ku = "_sessionItem_miawb_55", Ju = "_sessionItemActive_miawb_73", Yu = "_sessionItemTitle_miawb_78", Qu = "_sessionRenameBtn_miawb_85", Xu = "_sessionDeleteBtn_miawb_107", Zu = "_sessionEmpty_miawb_129", em = "_sessionTabBar_miawb_143", tm = "_sessionTab_miawb_143", nm = "_sessionTabActive_miawb_169", am = "_sessionGroup_miawb_176", sm = "_sessionGroupHeader_miawb_180", lm = "_sessionGroupArrow_miawb_198", im = "_sessionGroupName_miawb_206", rm = "_sessionGroupCount_miawb_213", om = "_sessionItemNested_miawb_224", cm = "_chatPanel_miawb_232", dm = "_scrollTopBtn_miawb_243", um = "_scrollTopBtnVisible_miawb_265", mm = "_chatHeader_miawb_287", hm = "_headerIdentity_miawb_299", pm = "_headerAvatar_miawb_306", _m = "_headerText_miawb_320", fm = "_chatHeaderName_miawb_327", gm = "_chatHeaderSub_miawb_337", ym = "_streamingPill_miawb_346", bm = "_streamingPillDot_miawb_359", vm = "_messageList_miawb_373", Nm = "_transcript_miawb_380", km = "_userRow_miawb_388", Cm = "_userCol_miawb_394", wm = "_userActions_miawb_402", Sm = "_userBubble_miawb_414", Tm = "_assistantRow_miawb_426", Im = "_assistantAvatar_miawb_431", xm = "_assistantCol_miawb_446", Bm = "_assistantHead_miawb_451", Lm = "_assistantName_miawb_458", Am = "_assistantBody_miawb_464", Rm = "_stoppedNote_miawb_473", $m = "_typingRow_miawb_617", Dm = "_typingLabel_miawb_625", Mm = "_typingDots_miawb_630", Em = "_msgActions_miawb_653", Pm = "_msgActionBtn_miawb_665", Om = "_turnMeta_miawb_691", Hm = "_toolBlock_miawb_699", jm = "_toolSummary_miawb_707", Fm = "_toolContent_miawb_741", Gm = "_queuedChip_miawb_755", qm = "_queuedChipText_miawb_769", Um = "_queuedChipCancel_miawb_777", zm = "_promptChips_miawb_799", Wm = "_promptChip_miawb_799", Vm = "_emptyPanel_miawb_827", Km = "_emptyState_miawb_828", Jm = "_emptyIcon_miawb_843", Ym = "_emptyTitle_miawb_857", Qm = "_emptyText_miawb_864", Xm = "_loadingShimmer_miawb_871", Zm = "_chatEmpty_miawb_882", eh = "_messageAvatar_miawb_891", th = "_composerWrap_miawb_906", nh = "_composer_miawb_906", ah = "_composerInput_miawb_928", sh = "_composerBar_miawb_953", lh = "_composerBarLeft_miawb_960", ih = "_attachBtn_miawb_972", rh = "_composerHint_miawb_1002", oh = "_sendCircle_miawb_1009", ch = "_stopCircle_miawb_1044", dh = "_composerNote_miawb_1052", uh = "_imagePreviewBar_miawb_1060", mh = "_imagePreviewItem_miawb_1067", hh = "_imagePreviewRemove_miawb_1083", ph = "_msgImages_miawb_1107", _h = "_msgImageThumb_miawb_1114", fh = "_sessionCreateRow_miawb_1131", gh = "_sessionCreateInput_miawb_1142", yh = "_sessionCreateConfirm_miawb_1157", bh = "_sessionCreateCancel_miawb_1176", vh = "_sessionExpandBtn_miawb_1198", Nh = "_reasoningBlock_miawb_1243", kh = "_reasoningSummary_miawb_1247", Ch = "_reasoningContent_miawb_1284", wh = "_pickerWrap_miawb_1295", Sh = "_pickerChip_miawb_969", Th = "_pickerCaret_miawb_1322", Ih = "_pickerMenu_miawb_967", xh = "_pickerMenuItem_miawb_1345", Bh = "_pickerItemActive_miawb_1365", Lh = "_suggestionRow_miawb_1388", Ah = "_suggestionChip_miawb_1399", N = {
|
|
2741
2741
|
container: Gu,
|
|
2742
2742
|
sessionPanel: qu,
|
|
2743
2743
|
sessionHeader: Uu,
|
|
@@ -2756,8 +2756,8 @@ const Gu = "_container_nh0md_1", qu = "_sessionPanel_nh0md_8", Uu = "_sessionHea
|
|
|
2756
2756
|
sessionGroup: am,
|
|
2757
2757
|
sessionGroupHeader: sm,
|
|
2758
2758
|
sessionGroupArrow: lm,
|
|
2759
|
-
sessionGroupName:
|
|
2760
|
-
sessionGroupCount:
|
|
2759
|
+
sessionGroupName: im,
|
|
2760
|
+
sessionGroupCount: rm,
|
|
2761
2761
|
sessionItemNested: om,
|
|
2762
2762
|
chatPanel: cm,
|
|
2763
2763
|
scrollTopBtn: dm,
|
|
@@ -2810,8 +2810,8 @@ const Gu = "_container_nh0md_1", qu = "_sessionPanel_nh0md_8", Uu = "_sessionHea
|
|
|
2810
2810
|
composerInput: ah,
|
|
2811
2811
|
composerBar: sh,
|
|
2812
2812
|
composerBarLeft: lh,
|
|
2813
|
-
attachBtn:
|
|
2814
|
-
composerHint:
|
|
2813
|
+
attachBtn: ih,
|
|
2814
|
+
composerHint: rh,
|
|
2815
2815
|
sendCircle: oh,
|
|
2816
2816
|
stopCircle: ch,
|
|
2817
2817
|
composerNote: dh,
|
|
@@ -2895,17 +2895,17 @@ function Dh({ content: t }) {
|
|
|
2895
2895
|
{
|
|
2896
2896
|
remarkPlugins: [Mn],
|
|
2897
2897
|
rehypePlugins: [ss],
|
|
2898
|
-
components: { pre:
|
|
2898
|
+
components: { pre: pi },
|
|
2899
2899
|
children: a.text
|
|
2900
2900
|
},
|
|
2901
2901
|
l
|
|
2902
2902
|
);
|
|
2903
2903
|
if (a.type === "tool_call" || a.type === "tool_result") {
|
|
2904
|
-
const
|
|
2904
|
+
const i = a.type === "tool_call";
|
|
2905
2905
|
return /* @__PURE__ */ n("details", { className: N.toolBlock, children: [
|
|
2906
2906
|
/* @__PURE__ */ n("summary", { className: N.toolSummary, children: [
|
|
2907
2907
|
/* @__PURE__ */ e(Xs, {}),
|
|
2908
|
-
/* @__PURE__ */ e("span", { children:
|
|
2908
|
+
/* @__PURE__ */ e("span", { children: i ? a.name || "工具调用" : a.name ? `${a.name} · 结果` : "工具结果" })
|
|
2909
2909
|
] }),
|
|
2910
2910
|
/* @__PURE__ */ e("pre", { className: N.toolContent, children: a.text })
|
|
2911
2911
|
] }, l);
|
|
@@ -2923,31 +2923,31 @@ function Bk({
|
|
|
2923
2923
|
newSessionTrigger: s = 0,
|
|
2924
2924
|
initialSessionId: a = null,
|
|
2925
2925
|
autoSendDraft: l = null,
|
|
2926
|
-
chromeless:
|
|
2926
|
+
chromeless: i = !1,
|
|
2927
2927
|
draftNoAutoPick: c = !1,
|
|
2928
2928
|
agents: p,
|
|
2929
2929
|
onSwitchAgent: m
|
|
2930
2930
|
}) {
|
|
2931
|
-
var
|
|
2932
|
-
const { chatPanelWidth: u } = Rn(), d = ct((h) => h.token), o = Rn(), [v, x] =
|
|
2931
|
+
var it, xt;
|
|
2932
|
+
const { chatPanelWidth: u } = Rn(), d = ct((h) => h.token), o = Rn(), [v, x] = r([]), [R, F] = r(
|
|
2933
2933
|
null
|
|
2934
|
-
), [$, O] =
|
|
2934
|
+
), [$, O] = r([]), [Q, te] = r(""), [Y, I] = r(!1), [K, W] = r(!1), [ne, B] = r(!1), [U, T] = r(""), [le, ae] = r(null), [b, L] = r(""), [G, X] = r(
|
|
2935
2935
|
() => localStorage.getItem("ft_personal_session_collapsed") === "true"
|
|
2936
|
-
), [k, S] =
|
|
2936
|
+
), [k, S] = r("chat"), [ie, Z] = r(
|
|
2937
2937
|
/* @__PURE__ */ new Set()
|
|
2938
|
-
), [he, pe] =
|
|
2938
|
+
), [he, pe] = r(!1), [ve, ye] = r({}), [Se, qe] = r(
|
|
2939
2939
|
/* @__PURE__ */ new Set()
|
|
2940
|
-
), [$e, Ve] =
|
|
2941
|
-
}), be = ge(null), _t = ge(null), ot = ge(!1), ut = ge(!0), Qe = ge(null), mt = ge(null), kt = ge(""), st = ge(null), wt = ge(null), [Bt, St] =
|
|
2940
|
+
), [$e, Ve] = r([]), [nt, pt] = r(!1), [Ke, tt] = r(!1), [bt, vt] = r(0), [at, dt] = r([]), [Je, Ye] = r(""), Ee = ge(""), je = ge(0), g = ge(null), re = ge(R), Ne = ge(() => {
|
|
2941
|
+
}), be = ge(null), _t = ge(null), ot = ge(!1), ut = ge(!0), Qe = ge(null), mt = ge(null), kt = ge(""), st = ge(null), wt = ge(null), [Bt, St] = r(null), [Tt, ft] = r([]), [He, Ue] = r(
|
|
2942
2942
|
[]
|
|
2943
|
-
), [Ze, Fe] =
|
|
2943
|
+
), [Ze, Fe] = r(
|
|
2944
2944
|
() => localStorage.getItem("ft_personal_llm_code") || ""
|
|
2945
|
-
), [C, V] =
|
|
2945
|
+
), [C, V] = r(!1), [ce, _] = r(!1), _e = ge(null), me = ge(null);
|
|
2946
2946
|
ee(() => {
|
|
2947
|
-
|
|
2948
|
-
}, [
|
|
2949
|
-
|
|
2950
|
-
}, [
|
|
2947
|
+
i && xl(d).then((h) => ft(h || [])).catch(console.error);
|
|
2948
|
+
}, [i, d]), ee(() => {
|
|
2949
|
+
i && Bl(d).then((h) => Ue(h || [])).catch(console.error);
|
|
2950
|
+
}, [i, C, d]), ee(() => {
|
|
2951
2951
|
if (!C && !ce) return;
|
|
2952
2952
|
const h = (M) => {
|
|
2953
2953
|
const se = M.target;
|
|
@@ -3143,12 +3143,12 @@ function Bk({
|
|
|
3143
3143
|
if (!c) return;
|
|
3144
3144
|
const We = M.length > 20 ? `${M.slice(0, 20)}…` : M;
|
|
3145
3145
|
try {
|
|
3146
|
-
const
|
|
3146
|
+
const rt = await _a(
|
|
3147
3147
|
t.id,
|
|
3148
3148
|
We || "新会话",
|
|
3149
3149
|
d
|
|
3150
3150
|
);
|
|
3151
|
-
x((Oe) => [
|
|
3151
|
+
x((Oe) => [rt, ...Oe]), ot.current = !0, se = rt.id, F(rt.id);
|
|
3152
3152
|
} catch {
|
|
3153
3153
|
Wn("会话创建失败,请重试", "error");
|
|
3154
3154
|
return;
|
|
@@ -3167,7 +3167,7 @@ function Bk({
|
|
|
3167
3167
|
}
|
|
3168
3168
|
let Me = M;
|
|
3169
3169
|
if (Ie.length > 0) {
|
|
3170
|
-
const We = Ie.map((
|
|
3170
|
+
const We = Ie.map((rt) => ``).join(`
|
|
3171
3171
|
`);
|
|
3172
3172
|
Me = Me ? `${Me}
|
|
3173
3173
|
${We}` : We;
|
|
@@ -3187,12 +3187,12 @@ ${We}` : We;
|
|
|
3187
3187
|
Qe.current = Xt;
|
|
3188
3188
|
const qn = () => je.current ? Date.now() - je.current : 0, Un = () => {
|
|
3189
3189
|
const We = Ee.current;
|
|
3190
|
-
We && (Ee.current = "", Ye(""), te((
|
|
3190
|
+
We && (Ee.current = "", Ye(""), te((rt) => rt ? rt + `
|
|
3191
3191
|
` + We : We));
|
|
3192
3192
|
}, Fs = () => {
|
|
3193
3193
|
const We = Ee.current;
|
|
3194
3194
|
if (We) {
|
|
3195
|
-
if (g.current &&
|
|
3195
|
+
if (g.current && re.current && !Ct(g.current, re.current)) {
|
|
3196
3196
|
Un();
|
|
3197
3197
|
return;
|
|
3198
3198
|
}
|
|
@@ -3205,8 +3205,8 @@ ${We}` : We;
|
|
|
3205
3205
|
Me,
|
|
3206
3206
|
d,
|
|
3207
3207
|
(We) => {
|
|
3208
|
-
O((
|
|
3209
|
-
const Oe = [...
|
|
3208
|
+
O((rt) => {
|
|
3209
|
+
const Oe = [...rt], Ge = Oe[Oe.length - 1];
|
|
3210
3210
|
return Ge && Ge.id === ht.id && (Oe[Oe.length - 1] = {
|
|
3211
3211
|
...Ge,
|
|
3212
3212
|
content: Ge.content + We
|
|
@@ -3214,8 +3214,8 @@ ${We}` : We;
|
|
|
3214
3214
|
});
|
|
3215
3215
|
},
|
|
3216
3216
|
(We) => {
|
|
3217
|
-
const
|
|
3218
|
-
if (I(!1), ot.current = !1, Qe.current = null,
|
|
3217
|
+
const rt = Xt.signal.aborted;
|
|
3218
|
+
if (I(!1), ot.current = !1, Qe.current = null, rt) {
|
|
3219
3219
|
O((Oe) => {
|
|
3220
3220
|
const Ge = [...Oe], Ft = Ge[Ge.length - 1];
|
|
3221
3221
|
return Ft && Ft.id === ht.id && (Ge[Ge.length - 1] = {
|
|
@@ -3241,15 +3241,15 @@ ${We}` : We;
|
|
|
3241
3241
|
() => {
|
|
3242
3242
|
I(!1), ot.current = !1, Qe.current = null;
|
|
3243
3243
|
const We = qn();
|
|
3244
|
-
O((
|
|
3245
|
-
const Oe = [...
|
|
3244
|
+
O((rt) => {
|
|
3245
|
+
const Oe = [...rt], Ge = Oe[Oe.length - 1];
|
|
3246
3246
|
return Ge && Ge.id === ht.id && (Oe[Oe.length - 1] = { ...Ge, elapsedMs: We }), Oe;
|
|
3247
|
-
}), Fs(), o.desktopNotify && document.hidden &&
|
|
3247
|
+
}), Fs(), o.desktopNotify && document.hidden && mi((t == null ? void 0 : t.displayName) || "智能伙伴", "回复已生成,点击查看"), o.suggestReplies && hi(t.id, R, d).then((rt) => dt(Array.isArray(rt) ? rt : [])).catch(() => {
|
|
3248
3248
|
});
|
|
3249
3249
|
},
|
|
3250
3250
|
(We) => {
|
|
3251
|
-
O((
|
|
3252
|
-
const Oe = [...
|
|
3251
|
+
O((rt) => {
|
|
3252
|
+
const Oe = [...rt], Ge = Oe[Oe.length - 1];
|
|
3253
3253
|
return Ge && Ge.id === ht.id && (Oe[Oe.length - 1] = {
|
|
3254
3254
|
...Ge,
|
|
3255
3255
|
content: We
|
|
@@ -3264,7 +3264,7 @@ ${We}` : We;
|
|
|
3264
3264
|
(h = Qe.current) == null || h.abort();
|
|
3265
3265
|
};
|
|
3266
3266
|
ee(() => {
|
|
3267
|
-
|
|
3267
|
+
re.current = R, Ne.current = (h) => void It(h);
|
|
3268
3268
|
}), ee(() => {
|
|
3269
3269
|
if (!Y) return;
|
|
3270
3270
|
const h = (M) => {
|
|
@@ -3286,7 +3286,7 @@ ${We}` : We;
|
|
|
3286
3286
|
}, [G]);
|
|
3287
3287
|
const Gn = (h) => {
|
|
3288
3288
|
ws(h, o.sendKey) && !h.nativeEvent.isComposing && (h.preventDefault(), It());
|
|
3289
|
-
}, [Kt, Cn] =
|
|
3289
|
+
}, [Kt, Cn] = r(null), hn = H(async (h, M) => {
|
|
3290
3290
|
try {
|
|
3291
3291
|
await navigator.clipboard.writeText(M), Cn(h), window.setTimeout(
|
|
3292
3292
|
() => Cn((se) => se === h ? null : se),
|
|
@@ -3336,7 +3336,7 @@ ${We}` : We;
|
|
|
3336
3336
|
className: N.container,
|
|
3337
3337
|
"data-chat-width": u,
|
|
3338
3338
|
children: [
|
|
3339
|
-
!
|
|
3339
|
+
!i && (G ? /* @__PURE__ */ e(
|
|
3340
3340
|
"button",
|
|
3341
3341
|
{
|
|
3342
3342
|
type: "button",
|
|
@@ -3754,7 +3754,7 @@ ${We}` : We;
|
|
|
3754
3754
|
/* 定时任务 Tab */
|
|
3755
3755
|
P.length === 0 ? /* @__PURE__ */ e("div", { className: N.sessionEmpty, children: /* @__PURE__ */ e("span", { children: "暂无定时任务会话" }) }) : Object.entries(j).map(
|
|
3756
3756
|
([h, M]) => {
|
|
3757
|
-
const se =
|
|
3757
|
+
const se = ie.has(h);
|
|
3758
3758
|
return /* @__PURE__ */ n("div", { className: N.sessionGroup, children: [
|
|
3759
3759
|
/* @__PURE__ */ n(
|
|
3760
3760
|
"div",
|
|
@@ -4137,7 +4137,7 @@ ${We}` : We;
|
|
|
4137
4137
|
)
|
|
4138
4138
|
}
|
|
4139
4139
|
),
|
|
4140
|
-
|
|
4140
|
+
i && ((p == null ? void 0 : p.length) ?? 0) > 1 && m && /* @__PURE__ */ n("div", { className: N.pickerWrap, ref: me, children: [
|
|
4141
4141
|
/* @__PURE__ */ n(
|
|
4142
4142
|
"button",
|
|
4143
4143
|
{
|
|
@@ -4165,7 +4165,7 @@ ${We}` : We;
|
|
|
4165
4165
|
h.id
|
|
4166
4166
|
)) })
|
|
4167
4167
|
] }),
|
|
4168
|
-
|
|
4168
|
+
i && (Tt.length > 0 || He.length > 0) && /* @__PURE__ */ n("div", { className: N.pickerWrap, ref: _e, children: [
|
|
4169
4169
|
/* @__PURE__ */ n(
|
|
4170
4170
|
"button",
|
|
4171
4171
|
{
|
|
@@ -4174,7 +4174,7 @@ ${We}` : We;
|
|
|
4174
4174
|
onClick: () => V((h) => !h),
|
|
4175
4175
|
title: "切换对话模型",
|
|
4176
4176
|
children: [
|
|
4177
|
-
/* @__PURE__ */ e("span", { children: Ze ? ((
|
|
4177
|
+
/* @__PURE__ */ e("span", { children: Ze ? ((it = Tt.find((h) => h.service === Ze)) == null ? void 0 : it.modelName) ?? ((xt = He.find(
|
|
4178
4178
|
(h) => h.service === Ze
|
|
4179
4179
|
)) == null ? void 0 : xt.name) ?? Ze : "默认模型" }),
|
|
4180
4180
|
/* @__PURE__ */ e("span", { className: N.pickerCaret, children: "▼" })
|
|
@@ -4228,7 +4228,7 @@ ${We}` : We;
|
|
|
4228
4228
|
}
|
|
4229
4229
|
)
|
|
4230
4230
|
] }),
|
|
4231
|
-
/* @__PURE__ */ e("span", { className: N.composerHint, children: Y ? "Enter 排队 · Esc 停止" :
|
|
4231
|
+
/* @__PURE__ */ e("span", { className: N.composerHint, children: Y ? "Enter 排队 · Esc 停止" : ui(o.sendKey) }),
|
|
4232
4232
|
Y ? /* @__PURE__ */ e(
|
|
4233
4233
|
"button",
|
|
4234
4234
|
{
|
|
@@ -4285,7 +4285,7 @@ ${We}` : We;
|
|
|
4285
4285
|
}
|
|
4286
4286
|
);
|
|
4287
4287
|
}
|
|
4288
|
-
const Eh = "_page_snv35_9", Ph = "_pageHeader_snv35_15", Oh = "_headerLeft_snv35_25", Hh = "_pageTitle_snv35_32", jh = "_headerMeta_snv35_40", Fh = "_headerDot_snv35_52", Gh = "_headerRight_snv35_58", qh = "_scenarioSelect_snv35_66", Uh = "_kpiGrid_snv35_72", zh = "_kpiCard_snv35_80", Wh = "_kpiCardClickable_snv35_90", Vh = "_kpiTop_snv35_107", Kh = "_kpiLabel_snv35_115", Jh = "_kpiIcon_snv35_122", Yh = "_chipBlue_snv35_133", Qh = "_chipCyan_snv35_138", Xh = "_chipGreen_snv35_143", Zh = "_chipAmber_snv35_148", ep = "_kpiValue_snv35_154", tp = "_kpiSuffix_snv35_163", np = "_rateTrack_snv35_171", ap = "_rateFill_snv35_180", sp = "_kpiFooter_snv35_188", lp = "_kpiDeltaUp_snv35_195",
|
|
4288
|
+
const Eh = "_page_snv35_9", Ph = "_pageHeader_snv35_15", Oh = "_headerLeft_snv35_25", Hh = "_pageTitle_snv35_32", jh = "_headerMeta_snv35_40", Fh = "_headerDot_snv35_52", Gh = "_headerRight_snv35_58", qh = "_scenarioSelect_snv35_66", Uh = "_kpiGrid_snv35_72", zh = "_kpiCard_snv35_80", Wh = "_kpiCardClickable_snv35_90", Vh = "_kpiTop_snv35_107", Kh = "_kpiLabel_snv35_115", Jh = "_kpiIcon_snv35_122", Yh = "_chipBlue_snv35_133", Qh = "_chipCyan_snv35_138", Xh = "_chipGreen_snv35_143", Zh = "_chipAmber_snv35_148", ep = "_kpiValue_snv35_154", tp = "_kpiSuffix_snv35_163", np = "_rateTrack_snv35_171", ap = "_rateFill_snv35_180", sp = "_kpiFooter_snv35_188", lp = "_kpiDeltaUp_snv35_195", ip = "_kpiDeltaDown_snv35_204", rp = "_kpiDeltaFlat_snv35_213", op = "_kpiDeltaLabel_snv35_221", cp = "_chartCard_snv35_229", dp = "_chartRow_snv35_238", up = "_chartCardNarrow_snv35_250", mp = "_chartCardWide_snv35_256", hp = "_chartHeader_snv35_262", pp = "_chartTitle_snv35_270", _p = "_chartBreadcrumb_snv35_277", fp = "_chartBreadcrumbLink_snv35_284", gp = "_chartBreadcrumbSep_snv35_300", yp = "_chartSub_snv35_306", bp = "_chartEmpty_snv35_312", ue = {
|
|
4289
4289
|
page: Eh,
|
|
4290
4290
|
pageHeader: Ph,
|
|
4291
4291
|
headerLeft: Oh,
|
|
@@ -4310,8 +4310,8 @@ const Eh = "_page_snv35_9", Ph = "_pageHeader_snv35_15", Oh = "_headerLeft_snv35
|
|
|
4310
4310
|
rateFill: ap,
|
|
4311
4311
|
kpiFooter: sp,
|
|
4312
4312
|
kpiDeltaUp: lp,
|
|
4313
|
-
kpiDeltaDown:
|
|
4314
|
-
kpiDeltaFlat:
|
|
4313
|
+
kpiDeltaDown: ip,
|
|
4314
|
+
kpiDeltaFlat: rp,
|
|
4315
4315
|
kpiDeltaLabel: op,
|
|
4316
4316
|
chartCard: cp,
|
|
4317
4317
|
chartRow: dp,
|
|
@@ -4335,25 +4335,25 @@ const Eh = "_page_snv35_9", Ph = "_pageHeader_snv35_15", Oh = "_headerLeft_snv35
|
|
|
4335
4335
|
filterCount: Ip
|
|
4336
4336
|
};
|
|
4337
4337
|
$n.use([
|
|
4338
|
-
|
|
4339
|
-
|
|
4340
|
-
|
|
4341
|
-
|
|
4342
|
-
|
|
4343
|
-
$
|
|
4344
|
-
|
|
4345
|
-
|
|
4338
|
+
xi,
|
|
4339
|
+
Bi,
|
|
4340
|
+
Li,
|
|
4341
|
+
Ai,
|
|
4342
|
+
Ri,
|
|
4343
|
+
$i,
|
|
4344
|
+
Di,
|
|
4345
|
+
Mi
|
|
4346
4346
|
]);
|
|
4347
4347
|
function Jn({
|
|
4348
4348
|
option: t,
|
|
4349
4349
|
height: s = 260,
|
|
4350
4350
|
onEvents: a
|
|
4351
4351
|
}) {
|
|
4352
|
-
const l = ge(null),
|
|
4352
|
+
const l = ge(null), i = ge(null), c = ge(a);
|
|
4353
4353
|
return c.current = a, ee(() => {
|
|
4354
4354
|
if (!l.current) return;
|
|
4355
|
-
|
|
4356
|
-
const p =
|
|
4355
|
+
i.current || (i.current = $n.init(l.current));
|
|
4356
|
+
const p = i.current;
|
|
4357
4357
|
p.setOption(t, !0);
|
|
4358
4358
|
const m = (d) => {
|
|
4359
4359
|
var o, v;
|
|
@@ -4367,7 +4367,7 @@ function Jn({
|
|
|
4367
4367
|
}, [t]), ee(
|
|
4368
4368
|
() => () => {
|
|
4369
4369
|
var p;
|
|
4370
|
-
(p =
|
|
4370
|
+
(p = i.current) == null || p.dispose(), i.current = null;
|
|
4371
4371
|
},
|
|
4372
4372
|
[]
|
|
4373
4373
|
), /* @__PURE__ */ e("div", { ref: l, style: { width: "100%", height: `${s}px` } });
|
|
@@ -4501,7 +4501,7 @@ function $p({
|
|
|
4501
4501
|
onCreated: a
|
|
4502
4502
|
}) {
|
|
4503
4503
|
var v;
|
|
4504
|
-
const [l,
|
|
4504
|
+
const [l, i] = r(""), [c, p] = r(!1), [m, u] = r(""), d = H(async () => {
|
|
4505
4505
|
var R, F, $;
|
|
4506
4506
|
const x = l.trim();
|
|
4507
4507
|
if ((R = t.inputConfig) != null && R.required && !x) {
|
|
@@ -4571,7 +4571,7 @@ function $p({
|
|
|
4571
4571
|
value: l,
|
|
4572
4572
|
placeholder: t.inputConfig.placeholder,
|
|
4573
4573
|
onChange: (x) => {
|
|
4574
|
-
|
|
4574
|
+
i(x.target.value), m && u("");
|
|
4575
4575
|
},
|
|
4576
4576
|
autoSize: { minRows: 4, maxRows: 10 },
|
|
4577
4577
|
status: m ? "error" : void 0,
|
|
@@ -4583,7 +4583,7 @@ function $p({
|
|
|
4583
4583
|
value: l,
|
|
4584
4584
|
placeholder: t.inputConfig.placeholder,
|
|
4585
4585
|
onChange: (x) => {
|
|
4586
|
-
|
|
4586
|
+
i(x.target.value), m && u("");
|
|
4587
4587
|
},
|
|
4588
4588
|
onKeyDown: (x) => {
|
|
4589
4589
|
x.key === "Enter" && d();
|
|
@@ -4601,7 +4601,7 @@ function $p({
|
|
|
4601
4601
|
function Ma({
|
|
4602
4602
|
onProjectCreated: t
|
|
4603
4603
|
}) {
|
|
4604
|
-
const [s, a] =
|
|
4604
|
+
const [s, a] = r(
|
|
4605
4605
|
null
|
|
4606
4606
|
);
|
|
4607
4607
|
return /* @__PURE__ */ n("div", { style: { padding: 24 }, children: [
|
|
@@ -4615,7 +4615,7 @@ function Ma({
|
|
|
4615
4615
|
gap: 16
|
|
4616
4616
|
},
|
|
4617
4617
|
children: Rp.map((l) => /* @__PURE__ */ n(
|
|
4618
|
-
|
|
4618
|
+
gi,
|
|
4619
4619
|
{
|
|
4620
4620
|
hoverable: !0,
|
|
4621
4621
|
onClick: () => a(l),
|
|
@@ -4634,7 +4634,7 @@ function Ma({
|
|
|
4634
4634
|
/* @__PURE__ */ e("span", { style: { fontSize: 28 }, children: l.icon }),
|
|
4635
4635
|
/* @__PURE__ */ n("div", { children: [
|
|
4636
4636
|
/* @__PURE__ */ e("h3", { style: { margin: 0, fontSize: 16 }, children: l.title }),
|
|
4637
|
-
/* @__PURE__ */ e("div", { style: { marginTop: 4 }, children: l.tags.map((
|
|
4637
|
+
/* @__PURE__ */ e("div", { style: { marginTop: 4 }, children: l.tags.map((i) => /* @__PURE__ */ e(de, { style: { marginRight: 4 }, children: i }, i)) })
|
|
4638
4638
|
] })
|
|
4639
4639
|
]
|
|
4640
4640
|
}
|
|
@@ -4660,7 +4660,7 @@ function Ea({
|
|
|
4660
4660
|
onOpenProject: t,
|
|
4661
4661
|
filterFromNav: s
|
|
4662
4662
|
}) {
|
|
4663
|
-
const a = ct((b) => b.token) || "", [l,
|
|
4663
|
+
const a = ct((b) => b.token) || "", [l, i] = r([]), [c, p] = r(0), [m, u] = r(!1), [d, o] = r(""), [v, x] = r(""), [R, F] = r(""), [$, O] = r(""), [Q, te] = r(""), [Y, I] = r(1), [K, W] = r(20), [ne, B] = r(
|
|
4664
4664
|
[]
|
|
4665
4665
|
), U = ge(null);
|
|
4666
4666
|
ee(() => {
|
|
@@ -4679,7 +4679,7 @@ function Ea({
|
|
|
4679
4679
|
}, []), le = H(async () => {
|
|
4680
4680
|
u(!0);
|
|
4681
4681
|
try {
|
|
4682
|
-
const b = await
|
|
4682
|
+
const b = await Ei(
|
|
4683
4683
|
{
|
|
4684
4684
|
scenario_code: R || void 0,
|
|
4685
4685
|
status: $ || void 0,
|
|
@@ -4690,9 +4690,9 @@ function Ea({
|
|
|
4690
4690
|
},
|
|
4691
4691
|
a
|
|
4692
4692
|
);
|
|
4693
|
-
|
|
4693
|
+
i(b.list || []), p(b.total || 0);
|
|
4694
4694
|
} catch {
|
|
4695
|
-
|
|
4695
|
+
i([]), p(0);
|
|
4696
4696
|
} finally {
|
|
4697
4697
|
u(!1);
|
|
4698
4698
|
}
|
|
@@ -4811,7 +4811,7 @@ function Ea({
|
|
|
4811
4811
|
] })
|
|
4812
4812
|
] }),
|
|
4813
4813
|
/* @__PURE__ */ e(
|
|
4814
|
-
|
|
4814
|
+
yi,
|
|
4815
4815
|
{
|
|
4816
4816
|
dataSource: ae,
|
|
4817
4817
|
loading: m,
|
|
@@ -4930,19 +4930,19 @@ function Pa({
|
|
|
4930
4930
|
currentUser: s,
|
|
4931
4931
|
onNavigateToProjects: a
|
|
4932
4932
|
}) {
|
|
4933
|
-
const [l,
|
|
4933
|
+
const [l, i] = r("30d"), [c, p] = r(null), [m, u] = r(
|
|
4934
4934
|
() => Ap()
|
|
4935
|
-
), [d, o] =
|
|
4935
|
+
), [d, o] = r("root"), v = Le(() => s != null && s.id ? t : [], [t, s]), x = Le(() => {
|
|
4936
4936
|
const k = /* @__PURE__ */ new Map();
|
|
4937
4937
|
for (const S of v) {
|
|
4938
|
-
const
|
|
4939
|
-
k.has(
|
|
4938
|
+
const ie = S.scenario_code || Qn;
|
|
4939
|
+
k.has(ie) || k.set(ie, S.scenario_name || S.scenario_code || "未分类");
|
|
4940
4940
|
}
|
|
4941
|
-
return Array.from(k.entries()).map(([S,
|
|
4941
|
+
return Array.from(k.entries()).map(([S, ie]) => ({ value: S, label: ie })).sort((S, ie) => S.label.localeCompare(ie.label, "zh-Hans-CN"));
|
|
4942
4942
|
}, [v]);
|
|
4943
4943
|
ee(() => {
|
|
4944
4944
|
if (m.length === 0) return;
|
|
4945
|
-
const k = new Set(x.map((
|
|
4945
|
+
const k = new Set(x.map((ie) => ie.value)), S = m.filter((ie) => k.has(ie));
|
|
4946
4946
|
S.length !== m.length && (u(S), Da(S));
|
|
4947
4947
|
}, [x, m]);
|
|
4948
4948
|
const R = H((k) => {
|
|
@@ -4959,17 +4959,17 @@ function Pa({
|
|
|
4959
4959
|
}, [l, c]), Q = Le(() => {
|
|
4960
4960
|
if (!$ || !O) return F;
|
|
4961
4961
|
const k = $.startOf("day").valueOf(), S = O.endOf("day").valueOf();
|
|
4962
|
-
return F.filter((
|
|
4963
|
-
const Z = new Date(
|
|
4962
|
+
return F.filter((ie) => {
|
|
4963
|
+
const Z = new Date(ie.created_at || 0).getTime();
|
|
4964
4964
|
return Z >= k && Z <= S;
|
|
4965
4965
|
});
|
|
4966
4966
|
}, [F, $, O]), te = Le(() => {
|
|
4967
4967
|
if (!$ || !O) return null;
|
|
4968
|
-
const k = $.startOf("day").valueOf(), S = O.endOf("day").valueOf(),
|
|
4968
|
+
const k = $.startOf("day").valueOf(), S = O.endOf("day").valueOf(), ie = k - 1, Z = ie - (S - k);
|
|
4969
4969
|
let he = 0, pe = 0, ve = 0;
|
|
4970
4970
|
for (const Se of F) {
|
|
4971
4971
|
const qe = new Date(Se.created_at || 0).getTime();
|
|
4972
|
-
qe >= Z && qe <=
|
|
4972
|
+
qe >= Z && qe <= ie && (he++, Se.status === "ACTIVE" && pe++, Se.status === "CLOSED" && ve++);
|
|
4973
4973
|
}
|
|
4974
4974
|
const ye = he > 0 ? Math.round(ve / he * 100) : 0;
|
|
4975
4975
|
return { total: he, active: pe, closed: ve, closeRate: ye };
|
|
@@ -4984,23 +4984,23 @@ function Pa({
|
|
|
4984
4984
|
return `已选 ${m.length} 个场景`;
|
|
4985
4985
|
}, [x, m]), K = H(
|
|
4986
4986
|
(k) => {
|
|
4987
|
-
k === "custom" && !c && p([nn().subtract(30, "day"), nn()]),
|
|
4987
|
+
k === "custom" && !c && p([nn().subtract(30, "day"), nn()]), i(k);
|
|
4988
4988
|
},
|
|
4989
4989
|
[c]
|
|
4990
4990
|
), W = Le(() => {
|
|
4991
|
-
const k = Q.length, S = {},
|
|
4991
|
+
const k = Q.length, S = {}, ie = {};
|
|
4992
4992
|
let Z = 0, he = 0;
|
|
4993
4993
|
for (const ve of Q) {
|
|
4994
4994
|
const ye = ve.status || "UNKNOWN";
|
|
4995
4995
|
S[ye] = (S[ye] || 0) + 1, ye === "CLOSED" && Z++, ye === "ACTIVE" && he++;
|
|
4996
4996
|
const Se = ve.scenario_code || Qn, qe = ve.scenario_name || ve.scenario_code || "未分类";
|
|
4997
|
-
|
|
4997
|
+
ie[Se] || (ie[Se] = { count: 0, name: qe }), ie[Se].count++;
|
|
4998
4998
|
}
|
|
4999
4999
|
const pe = k > 0 ? Math.round(Z / k * 100) : 0;
|
|
5000
5000
|
return {
|
|
5001
5001
|
total: k,
|
|
5002
5002
|
byStatus: S,
|
|
5003
|
-
byScenario:
|
|
5003
|
+
byScenario: ie,
|
|
5004
5004
|
closedCount: Z,
|
|
5005
5005
|
activeCount: he,
|
|
5006
5006
|
closeRate: pe
|
|
@@ -5017,13 +5017,13 @@ function Pa({
|
|
|
5017
5017
|
count: S,
|
|
5018
5018
|
percent: W.total > 0 ? Math.round(S / W.total * 100) : 0
|
|
5019
5019
|
})).sort((k, S) => S.count - k.count), [W]), U = Le(() => {
|
|
5020
|
-
let k = 0, S = 0,
|
|
5020
|
+
let k = 0, S = 0, ie = 0;
|
|
5021
5021
|
for (const pe of Q) {
|
|
5022
5022
|
if (pe.status !== "CLOSED") continue;
|
|
5023
5023
|
const ve = Array.isArray(pe.close_tags) ? pe.close_tags : [];
|
|
5024
|
-
ve.includes("ai_effective") ? k++ : ve.includes("ai_ineffective") ? S++ :
|
|
5024
|
+
ve.includes("ai_effective") ? k++ : ve.includes("ai_ineffective") ? S++ : ie++;
|
|
5025
5025
|
}
|
|
5026
|
-
const Z = k + S +
|
|
5026
|
+
const Z = k + S + ie, he = [
|
|
5027
5027
|
{
|
|
5028
5028
|
key: "ai_effective",
|
|
5029
5029
|
label: "AI有效",
|
|
@@ -5037,10 +5037,10 @@ function Pa({
|
|
|
5037
5037
|
color: Yn.ai_ineffective
|
|
5038
5038
|
}
|
|
5039
5039
|
];
|
|
5040
|
-
return
|
|
5040
|
+
return ie > 0 && he.push({
|
|
5041
5041
|
key: "unlabeled",
|
|
5042
5042
|
label: "未标注",
|
|
5043
|
-
count:
|
|
5043
|
+
count: ie,
|
|
5044
5044
|
color: Yn.unlabeled
|
|
5045
5045
|
}), {
|
|
5046
5046
|
closedTotal: Z,
|
|
@@ -5070,16 +5070,16 @@ function Pa({
|
|
|
5070
5070
|
}
|
|
5071
5071
|
}
|
|
5072
5072
|
}
|
|
5073
|
-
let
|
|
5073
|
+
let ie = null, Z = null;
|
|
5074
5074
|
if ($ && O)
|
|
5075
|
-
|
|
5075
|
+
ie = $.startOf("day"), Z = O.endOf("day");
|
|
5076
5076
|
else {
|
|
5077
5077
|
const ye = Object.keys(S).sort();
|
|
5078
|
-
ye.length > 0 && (
|
|
5078
|
+
ye.length > 0 && (ie = nn(ye[0]).startOf("day"), Z = nn().endOf("day"));
|
|
5079
5079
|
}
|
|
5080
|
-
if (!
|
|
5080
|
+
if (!ie || !Z) return [];
|
|
5081
5081
|
const he = [];
|
|
5082
|
-
let pe = 0, ve =
|
|
5082
|
+
let pe = 0, ve = ie;
|
|
5083
5083
|
for (; ve.isBefore(Z) || ve.isSame(Z, "day"); ) {
|
|
5084
5084
|
const ye = ve.format("YYYY-MM-DD"), Se = S[ye] || k();
|
|
5085
5085
|
pe += Se.created, he.push({
|
|
@@ -5200,14 +5200,14 @@ function Pa({
|
|
|
5200
5200
|
name: Z.label,
|
|
5201
5201
|
value: Z.count,
|
|
5202
5202
|
color: Bp[Z.status] || Lp
|
|
5203
|
-
})),
|
|
5203
|
+
})), ie = k ? U.closedTotal : W.total;
|
|
5204
5204
|
return {
|
|
5205
5205
|
tooltip: {
|
|
5206
5206
|
trigger: "item",
|
|
5207
5207
|
textStyle: { fontSize: 12 },
|
|
5208
5208
|
formatter: (Z) => `${$a(Z.name)}<br/>数量:${Z.value}<br/>占比:${Ra(
|
|
5209
5209
|
Z.value,
|
|
5210
|
-
|
|
5210
|
+
ie
|
|
5211
5211
|
)}%`
|
|
5212
5212
|
},
|
|
5213
5213
|
legend: {
|
|
@@ -5256,7 +5256,7 @@ function Pa({
|
|
|
5256
5256
|
textStyle: { fontSize: 12 },
|
|
5257
5257
|
// 通过 dataIndex 回查源数组,tooltip 展示完整场景名 + 数量 + 占比(1 位小数)
|
|
5258
5258
|
formatter: (S) => {
|
|
5259
|
-
const
|
|
5259
|
+
const ie = Array.isArray(S) ? S[0] : S, Z = k[ie.dataIndex];
|
|
5260
5260
|
return Z ? `${$a(Z.scenario)}<br/>数量:${Z.count}<br/>占比:${Ra(Z.count, W.total)}%` : "";
|
|
5261
5261
|
}
|
|
5262
5262
|
},
|
|
@@ -5313,7 +5313,7 @@ function Pa({
|
|
|
5313
5313
|
}
|
|
5314
5314
|
]
|
|
5315
5315
|
};
|
|
5316
|
-
}, [ne, W.total]), G = (k, S,
|
|
5316
|
+
}, [ne, W.total]), G = (k, S, ie) => {
|
|
5317
5317
|
if (S === null)
|
|
5318
5318
|
return /* @__PURE__ */ e("span", { className: ue.kpiDeltaFlat, children: "全部时间累计值" });
|
|
5319
5319
|
const Z = k - S;
|
|
@@ -5324,9 +5324,9 @@ function Pa({
|
|
|
5324
5324
|
] });
|
|
5325
5325
|
const he = Z > 0;
|
|
5326
5326
|
return /* @__PURE__ */ n("span", { className: he ? ue.kpiDeltaUp : ue.kpiDeltaDown, children: [
|
|
5327
|
-
he ? /* @__PURE__ */ e(ll, {}) : /* @__PURE__ */ e(
|
|
5327
|
+
he ? /* @__PURE__ */ e(ll, {}) : /* @__PURE__ */ e(il, {}),
|
|
5328
5328
|
Math.abs(Z),
|
|
5329
|
-
|
|
5329
|
+
ie,
|
|
5330
5330
|
/* @__PURE__ */ e("span", { className: ue.kpiDeltaLabel, children: "较上一周期" })
|
|
5331
5331
|
] });
|
|
5332
5332
|
}, X = [
|
|
@@ -5421,7 +5421,7 @@ function Pa({
|
|
|
5421
5421
|
}
|
|
5422
5422
|
),
|
|
5423
5423
|
l === "custom" && /* @__PURE__ */ e(
|
|
5424
|
-
|
|
5424
|
+
bi.RangePicker,
|
|
5425
5425
|
{
|
|
5426
5426
|
value: c,
|
|
5427
5427
|
allowClear: !1,
|
|
@@ -5430,7 +5430,7 @@ function Pa({
|
|
|
5430
5430
|
}
|
|
5431
5431
|
),
|
|
5432
5432
|
/* @__PURE__ */ e(
|
|
5433
|
-
|
|
5433
|
+
vi,
|
|
5434
5434
|
{
|
|
5435
5435
|
value: l,
|
|
5436
5436
|
onChange: (k) => K(k),
|
|
@@ -5559,7 +5559,7 @@ function Lk({
|
|
|
5559
5559
|
onOpenProject: a,
|
|
5560
5560
|
hideTabs: l = !1
|
|
5561
5561
|
}) {
|
|
5562
|
-
const
|
|
5562
|
+
const i = ct((O) => O.projects), c = ct((O) => O.currentUser), p = ct((O) => O.loadProjects), [m, u] = r("personal"), d = t ?? m, o = s ?? u, [v, x] = r(null);
|
|
5563
5563
|
ee(() => {
|
|
5564
5564
|
p();
|
|
5565
5565
|
}, [p]);
|
|
@@ -5603,14 +5603,14 @@ function Lk({
|
|
|
5603
5603
|
d === "personal" && /* @__PURE__ */ e(
|
|
5604
5604
|
Pa,
|
|
5605
5605
|
{
|
|
5606
|
-
projects:
|
|
5606
|
+
projects: i,
|
|
5607
5607
|
currentUser: c,
|
|
5608
5608
|
onNavigateToProjects: F
|
|
5609
5609
|
}
|
|
5610
5610
|
)
|
|
5611
5611
|
] })
|
|
5612
5612
|
) : /* @__PURE__ */ e(
|
|
5613
|
-
|
|
5613
|
+
fi,
|
|
5614
5614
|
{
|
|
5615
5615
|
activeKey: d,
|
|
5616
5616
|
onChange: o,
|
|
@@ -5643,7 +5643,7 @@ function Lk({
|
|
|
5643
5643
|
children: /* @__PURE__ */ e(
|
|
5644
5644
|
Pa,
|
|
5645
5645
|
{
|
|
5646
|
-
projects:
|
|
5646
|
+
projects: i,
|
|
5647
5647
|
currentUser: c,
|
|
5648
5648
|
onNavigateToProjects: F
|
|
5649
5649
|
}
|
|
@@ -5666,7 +5666,7 @@ const Dp = "_readOnlyCodeView_ioz80_1", Mp = "_header_ioz80_10", Ep = "_title_io
|
|
|
5666
5666
|
value: s,
|
|
5667
5667
|
language: a,
|
|
5668
5668
|
maxLines: l,
|
|
5669
|
-
maxHeight:
|
|
5669
|
+
maxHeight: i,
|
|
5670
5670
|
title: c,
|
|
5671
5671
|
className: p,
|
|
5672
5672
|
showCopy: m = !0,
|
|
@@ -5678,7 +5678,7 @@ const Dp = "_readOnlyCodeView_ioz80_1", Mp = "_header_ioz80_10", Ep = "_title_io
|
|
|
5678
5678
|
} catch {
|
|
5679
5679
|
}
|
|
5680
5680
|
}, v = { ...u || {} };
|
|
5681
|
-
return
|
|
5681
|
+
return i && (v.maxHeight = `${i}px`), l && t.split(`
|
|
5682
5682
|
`).length > l && (v.maxHeight = `${l * 1.5}em`), /* @__PURE__ */ n(
|
|
5683
5683
|
"div",
|
|
5684
5684
|
{
|
|
@@ -5702,7 +5702,7 @@ const Dp = "_readOnlyCodeView_ioz80_1", Mp = "_header_ioz80_10", Ep = "_title_io
|
|
|
5702
5702
|
]
|
|
5703
5703
|
}
|
|
5704
5704
|
);
|
|
5705
|
-
}, jp = "_root_teqr2_6", Fp = "_toolsLayout_teqr2_24", Gp = "_toolSidebar_teqr2_33", qp = "_toolGroup_teqr2_42", Up = "_toolGroupTitle_teqr2_46", zp = "_toolItem_teqr2_56", Wp = "_toolItemActive_teqr2_71", Vp = "_toolIcon_teqr2_76", Kp = "_toolLabel_teqr2_80", Jp = "_toolInfo_teqr2_102", Yp = "_toolDesc_teqr2_113", Qp = "_toolPanel_teqr2_122", Xp = "_websiteCard_teqr2_131", Zp = "_websiteLink_teqr2_140", e_ = "_outputArea_teqr2_145", t_ = "_panelLabel_teqr2_150", n_ = "_diffBox_teqr2_157", a_ = "_jwtPre_teqr2_305", s_ = "_jwtPayload_teqr2_318", l_ = "_jwtRow_teqr2_324",
|
|
5705
|
+
}, jp = "_root_teqr2_6", Fp = "_toolsLayout_teqr2_24", Gp = "_toolSidebar_teqr2_33", qp = "_toolGroup_teqr2_42", Up = "_toolGroupTitle_teqr2_46", zp = "_toolItem_teqr2_56", Wp = "_toolItemActive_teqr2_71", Vp = "_toolIcon_teqr2_76", Kp = "_toolLabel_teqr2_80", Jp = "_toolInfo_teqr2_102", Yp = "_toolDesc_teqr2_113", Qp = "_toolPanel_teqr2_122", Xp = "_websiteCard_teqr2_131", Zp = "_websiteLink_teqr2_140", e_ = "_outputArea_teqr2_145", t_ = "_panelLabel_teqr2_150", n_ = "_diffBox_teqr2_157", a_ = "_jwtPre_teqr2_305", s_ = "_jwtPayload_teqr2_318", l_ = "_jwtRow_teqr2_324", i_ = "_jwtKey_teqr2_336", r_ = "_jwtVal_teqr2_343", o_ = "_hashResult_teqr2_351", c_ = "_hashCode_teqr2_361", d_ = "_caseRow_teqr2_370", u_ = "_parsedBox_teqr2_381", m_ = "_cronDesc_teqr2_393", h_ = "_cronNext_teqr2_404", p_ = "_cronExample_teqr2_414", __ = "_colorPicker_teqr2_426", f_ = "_colorPreview_teqr2_436", g_ = "_colorRow_teqr2_443", y_ = "_httpHeaderRow_teqr2_454", b_ = "_httpResp_teqr2_461", v_ = "_httpRespMeta_teqr2_467", N_ = "_scriptConsole_teqr2_498", k_ = "_scriptConsoleHeader_teqr2_508", C_ = "_scriptConsoleBody_teqr2_521", w_ = "_scriptEmpty_teqr2_528", S_ = "_scriptLine_teqr2_536", T_ = "_scriptTime_teqr2_546", I_ = "_scriptLevelBadge_teqr2_553", x_ = "_scriptContent_teqr2_560", B_ = "_scriptLog_teqr2_570", L_ = "_scriptInfo_teqr2_574", A_ = "_scriptDebug_teqr2_578", R_ = "_scriptWarn_teqr2_582", $_ = "_scriptError_teqr2_587", D_ = "_scriptReturn_teqr2_592", z = {
|
|
5706
5706
|
root: jp,
|
|
5707
5707
|
toolsLayout: Fp,
|
|
5708
5708
|
toolSidebar: Gp,
|
|
@@ -5723,8 +5723,8 @@ const Dp = "_readOnlyCodeView_ioz80_1", Mp = "_header_ioz80_10", Ep = "_title_io
|
|
|
5723
5723
|
jwtPre: a_,
|
|
5724
5724
|
jwtPayload: s_,
|
|
5725
5725
|
jwtRow: l_,
|
|
5726
|
-
jwtKey:
|
|
5727
|
-
jwtVal:
|
|
5726
|
+
jwtKey: i_,
|
|
5727
|
+
jwtVal: r_,
|
|
5728
5728
|
hashResult: o_,
|
|
5729
5729
|
hashCode: c_,
|
|
5730
5730
|
caseRow: d_,
|
|
@@ -5752,7 +5752,7 @@ const Dp = "_readOnlyCodeView_ioz80_1", Mp = "_header_ioz80_10", Ep = "_title_io
|
|
|
5752
5752
|
scriptWarn: R_,
|
|
5753
5753
|
scriptError: $_,
|
|
5754
5754
|
scriptReturn: D_
|
|
5755
|
-
}, { TextArea: Re } = Ae, { Text: Dt, Title: M_ } =
|
|
5755
|
+
}, { TextArea: Re } = Ae, { Text: Dt, Title: M_ } = Ni, As = [
|
|
5756
5756
|
{
|
|
5757
5757
|
key: "formatter",
|
|
5758
5758
|
label: "格式化",
|
|
@@ -5760,7 +5760,7 @@ const Dp = "_readOnlyCodeView_ioz80_1", Mp = "_header_ioz80_10", Ep = "_title_io
|
|
|
5760
5760
|
{
|
|
5761
5761
|
key: "json",
|
|
5762
5762
|
label: "JSON 格式化",
|
|
5763
|
-
icon: /* @__PURE__ */ e(
|
|
5763
|
+
icon: /* @__PURE__ */ e(rl, {}),
|
|
5764
5764
|
description: "格式化 / 压缩 / JSONPath 查询"
|
|
5765
5765
|
},
|
|
5766
5766
|
{
|
|
@@ -5910,7 +5910,7 @@ const Dp = "_readOnlyCodeView_ioz80_1", Mp = "_header_ioz80_10", Ep = "_title_io
|
|
|
5910
5910
|
{
|
|
5911
5911
|
key: "script",
|
|
5912
5912
|
label: "JS 脚本执行",
|
|
5913
|
-
icon: /* @__PURE__ */ e(
|
|
5913
|
+
icon: /* @__PURE__ */ e(ra, {}),
|
|
5914
5914
|
description: "浏览器内执行 JS,捕获 console 输出"
|
|
5915
5915
|
}
|
|
5916
5916
|
]
|
|
@@ -5939,13 +5939,13 @@ function En({
|
|
|
5939
5939
|
input: s,
|
|
5940
5940
|
output: a,
|
|
5941
5941
|
outputError: l,
|
|
5942
|
-
buttons:
|
|
5942
|
+
buttons: i,
|
|
5943
5943
|
extraAbove: c,
|
|
5944
5944
|
extraBelow: p
|
|
5945
5945
|
}) {
|
|
5946
5946
|
return /* @__PURE__ */ n("div", { children: [
|
|
5947
5947
|
c,
|
|
5948
|
-
/* @__PURE__ */ e(Xe, { style: { marginBottom: 12 }, children:
|
|
5948
|
+
/* @__PURE__ */ e(Xe, { style: { marginBottom: 12 }, children: i }),
|
|
5949
5949
|
t && /* @__PURE__ */ e(
|
|
5950
5950
|
"div",
|
|
5951
5951
|
{
|
|
@@ -5968,7 +5968,7 @@ function En({
|
|
|
5968
5968
|
] });
|
|
5969
5969
|
}
|
|
5970
5970
|
function $s() {
|
|
5971
|
-
const [t, s] =
|
|
5971
|
+
const [t, s] = r(""), [a, l] = r(""), [i, c] = r(""), [p, m] = r(""), [u, d] = r(""), o = H(() => {
|
|
5972
5972
|
try {
|
|
5973
5973
|
l(JSON.stringify(JSON.parse(t), null, 2)), c("");
|
|
5974
5974
|
} catch ($) {
|
|
@@ -6035,7 +6035,7 @@ function $s() {
|
|
|
6035
6035
|
className: z.outputArea
|
|
6036
6036
|
}
|
|
6037
6037
|
),
|
|
6038
|
-
|
|
6038
|
+
i && /* @__PURE__ */ e(Dt, { type: "danger", style: { marginTop: 6, display: "block" }, children: i })
|
|
6039
6039
|
] })
|
|
6040
6040
|
] }),
|
|
6041
6041
|
/* @__PURE__ */ n(Xe.Compact, { style: { width: "100%", marginBottom: 8 }, children: [
|
|
@@ -6062,7 +6062,7 @@ function $s() {
|
|
|
6062
6062
|
] });
|
|
6063
6063
|
}
|
|
6064
6064
|
function E_() {
|
|
6065
|
-
const [t, s] =
|
|
6065
|
+
const [t, s] = r(""), [a, l] = r(""), [i, c] = r(""), p = H(() => {
|
|
6066
6066
|
try {
|
|
6067
6067
|
const d = new DOMParser().parseFromString(t, "application/xml"), o = d.querySelector("parsererror");
|
|
6068
6068
|
if (o) {
|
|
@@ -6114,12 +6114,12 @@ function E_() {
|
|
|
6114
6114
|
className: z.outputArea
|
|
6115
6115
|
}
|
|
6116
6116
|
),
|
|
6117
|
-
outputError:
|
|
6117
|
+
outputError: i
|
|
6118
6118
|
}
|
|
6119
6119
|
);
|
|
6120
6120
|
}
|
|
6121
6121
|
function P_(t) {
|
|
6122
|
-
return
|
|
6122
|
+
return ji(t, {
|
|
6123
6123
|
language: "mysql",
|
|
6124
6124
|
// @ts-ignore
|
|
6125
6125
|
tabWidth: 2,
|
|
@@ -6129,7 +6129,7 @@ function P_(t) {
|
|
|
6129
6129
|
});
|
|
6130
6130
|
}
|
|
6131
6131
|
function O_() {
|
|
6132
|
-
const [t, s] =
|
|
6132
|
+
const [t, s] = r(""), [a, l] = r(""), [i, c] = r(""), p = H(() => {
|
|
6133
6133
|
try {
|
|
6134
6134
|
l(P_(t)), c("");
|
|
6135
6135
|
} catch (u) {
|
|
@@ -6163,12 +6163,12 @@ function O_() {
|
|
|
6163
6163
|
style: { height: 390 }
|
|
6164
6164
|
}
|
|
6165
6165
|
),
|
|
6166
|
-
outputError:
|
|
6166
|
+
outputError: i
|
|
6167
6167
|
}
|
|
6168
6168
|
);
|
|
6169
6169
|
}
|
|
6170
6170
|
function H_() {
|
|
6171
|
-
const [t, s] =
|
|
6171
|
+
const [t, s] = r(""), [a, l] = r(""), i = H(() => {
|
|
6172
6172
|
let p = 0;
|
|
6173
6173
|
const m = t.replace(/>\s*</g, `>
|
|
6174
6174
|
<`).split(`
|
|
@@ -6190,7 +6190,7 @@ function H_() {
|
|
|
6190
6190
|
En,
|
|
6191
6191
|
{
|
|
6192
6192
|
buttons: /* @__PURE__ */ n(Be, { children: [
|
|
6193
|
-
/* @__PURE__ */ e(J, { type: "primary", onClick:
|
|
6193
|
+
/* @__PURE__ */ e(J, { type: "primary", onClick: i, children: "格式化" }),
|
|
6194
6194
|
/* @__PURE__ */ e(J, { onClick: c, children: "压缩" }),
|
|
6195
6195
|
a && /* @__PURE__ */ e(yt, { text: a })
|
|
6196
6196
|
] }),
|
|
@@ -6216,7 +6216,7 @@ function H_() {
|
|
|
6216
6216
|
);
|
|
6217
6217
|
}
|
|
6218
6218
|
function j_() {
|
|
6219
|
-
const [t, s] =
|
|
6219
|
+
const [t, s] = r(""), [a, l] = r(""), [i, c] = r(""), p = ge(null), m = H(() => {
|
|
6220
6220
|
try {
|
|
6221
6221
|
l(btoa(unescape(encodeURIComponent(t)))), c("");
|
|
6222
6222
|
} catch {
|
|
@@ -6285,10 +6285,10 @@ function j_() {
|
|
|
6285
6285
|
)
|
|
6286
6286
|
] })
|
|
6287
6287
|
] }),
|
|
6288
|
-
|
|
6288
|
+
i && /* @__PURE__ */ e("div", { style: { marginTop: 12 }, children: /* @__PURE__ */ e(
|
|
6289
6289
|
"img",
|
|
6290
6290
|
{
|
|
6291
|
-
src:
|
|
6291
|
+
src: i,
|
|
6292
6292
|
alt: "preview",
|
|
6293
6293
|
style: {
|
|
6294
6294
|
maxWidth: "100%",
|
|
@@ -6301,7 +6301,7 @@ function j_() {
|
|
|
6301
6301
|
] });
|
|
6302
6302
|
}
|
|
6303
6303
|
function F_() {
|
|
6304
|
-
const [t, s] =
|
|
6304
|
+
const [t, s] = r(""), [a, l] = r(""), [i, c] = r(null), p = H(() => {
|
|
6305
6305
|
l(encodeURIComponent(t)), c(null);
|
|
6306
6306
|
}, [t]), m = H(() => {
|
|
6307
6307
|
try {
|
|
@@ -6360,14 +6360,14 @@ function F_() {
|
|
|
6360
6360
|
)
|
|
6361
6361
|
] })
|
|
6362
6362
|
] }),
|
|
6363
|
-
|
|
6363
|
+
i && /* @__PURE__ */ e("div", { className: z.parsedBox, children: Object.entries(i).map(([d, o]) => /* @__PURE__ */ n("div", { style: { marginBottom: 4 }, children: [
|
|
6364
6364
|
/* @__PURE__ */ e(de, { color: "blue", style: { minWidth: 70 }, children: d }),
|
|
6365
6365
|
/* @__PURE__ */ e(Dt, { style: { whiteSpace: "pre-wrap" }, children: o })
|
|
6366
6366
|
] }, d)) })
|
|
6367
6367
|
] });
|
|
6368
6368
|
}
|
|
6369
6369
|
function G_() {
|
|
6370
|
-
const [t, s] =
|
|
6370
|
+
const [t, s] = r(""), [a, l] = r(""), i = (p) => p.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """).replace(/'/g, "'"), c = (p) => {
|
|
6371
6371
|
const m = document.createElement("textarea");
|
|
6372
6372
|
return m.innerHTML = p, m.value;
|
|
6373
6373
|
};
|
|
@@ -6375,7 +6375,7 @@ function G_() {
|
|
|
6375
6375
|
En,
|
|
6376
6376
|
{
|
|
6377
6377
|
buttons: /* @__PURE__ */ n(Be, { children: [
|
|
6378
|
-
/* @__PURE__ */ e(J, { type: "primary", onClick: () => l(
|
|
6378
|
+
/* @__PURE__ */ e(J, { type: "primary", onClick: () => l(i(t)), children: "转义" }),
|
|
6379
6379
|
/* @__PURE__ */ e(J, { onClick: () => l(c(t)), children: "反转义" }),
|
|
6380
6380
|
a && /* @__PURE__ */ e(yt, { text: a })
|
|
6381
6381
|
] }),
|
|
@@ -6401,7 +6401,7 @@ function G_() {
|
|
|
6401
6401
|
);
|
|
6402
6402
|
}
|
|
6403
6403
|
function q_() {
|
|
6404
|
-
const [t, s] =
|
|
6404
|
+
const [t, s] = r(""), a = Le(() => {
|
|
6405
6405
|
if (!t.trim()) return null;
|
|
6406
6406
|
const c = t.split(".");
|
|
6407
6407
|
if (c.length !== 3) return { error: "JWT 格式不正确,应为 3 段" };
|
|
@@ -6420,7 +6420,7 @@ function q_() {
|
|
|
6420
6420
|
if (!c) return null;
|
|
6421
6421
|
const p = new Date(c * 1e3), m = Date.now() > c * 1e3;
|
|
6422
6422
|
return { expDate: p, expired: m };
|
|
6423
|
-
}, [a]),
|
|
6423
|
+
}, [a]), i = {
|
|
6424
6424
|
sub: "主体 (sub)",
|
|
6425
6425
|
iss: "签发者 (iss)",
|
|
6426
6426
|
aud: "接收方 (aud)",
|
|
@@ -6471,7 +6471,7 @@ function q_() {
|
|
|
6471
6471
|
}
|
|
6472
6472
|
),
|
|
6473
6473
|
/* @__PURE__ */ e("div", { className: z.jwtPayload, children: Object.entries(a.payload).map(([c, p]) => /* @__PURE__ */ n("div", { className: z.jwtRow, children: [
|
|
6474
|
-
/* @__PURE__ */ e("span", { className: z.jwtKey, children:
|
|
6474
|
+
/* @__PURE__ */ e("span", { className: z.jwtKey, children: i[c] || c }),
|
|
6475
6475
|
/* @__PURE__ */ e("span", { className: z.jwtVal, children: c === "exp" || c === "iat" || c === "nbf" ? `${String(p)} (${new Date(
|
|
6476
6476
|
p * 1e3
|
|
6477
6477
|
).toLocaleString()})` : String(p) })
|
|
@@ -6484,10 +6484,10 @@ async function U_(t, s) {
|
|
|
6484
6484
|
if (t === "MD5")
|
|
6485
6485
|
return (await import("./spark-md5-Dld54a-T.js").then((c) => c.s)).default.hash(s);
|
|
6486
6486
|
const a = new TextEncoder(), l = await crypto.subtle.digest(t, a.encode(s));
|
|
6487
|
-
return Array.from(new Uint8Array(l)).map((
|
|
6487
|
+
return Array.from(new Uint8Array(l)).map((i) => i.toString(16).padStart(2, "0")).join("");
|
|
6488
6488
|
}
|
|
6489
6489
|
function z_() {
|
|
6490
|
-
const [t, s] =
|
|
6490
|
+
const [t, s] = r(""), [a, l] = r("SHA-256"), [i, c] = r(""), [p, m] = r(!1), u = H(async () => {
|
|
6491
6491
|
if (t) {
|
|
6492
6492
|
m(!0);
|
|
6493
6493
|
try {
|
|
@@ -6511,7 +6511,7 @@ function z_() {
|
|
|
6511
6511
|
}
|
|
6512
6512
|
),
|
|
6513
6513
|
/* @__PURE__ */ e(J, { type: "primary", loading: p, onClick: u, children: "计算哈希" }),
|
|
6514
|
-
|
|
6514
|
+
i && /* @__PURE__ */ e(yt, { text: i })
|
|
6515
6515
|
] }),
|
|
6516
6516
|
/* @__PURE__ */ e("div", { className: z.panelLabel, children: "输入文本" }),
|
|
6517
6517
|
/* @__PURE__ */ e(
|
|
@@ -6524,37 +6524,37 @@ function z_() {
|
|
|
6524
6524
|
style: { marginBottom: 12 }
|
|
6525
6525
|
}
|
|
6526
6526
|
),
|
|
6527
|
-
|
|
6527
|
+
i && /* @__PURE__ */ n("div", { className: z.hashResult, children: [
|
|
6528
6528
|
/* @__PURE__ */ e(de, { children: a }),
|
|
6529
|
-
/* @__PURE__ */ e("code", { className: z.hashCode, children:
|
|
6529
|
+
/* @__PURE__ */ e("code", { className: z.hashCode, children: i })
|
|
6530
6530
|
] })
|
|
6531
6531
|
] });
|
|
6532
6532
|
}
|
|
6533
6533
|
async function W_(t, s, a) {
|
|
6534
|
-
const l = new TextEncoder(),
|
|
6534
|
+
const l = new TextEncoder(), i = await crypto.subtle.importKey(
|
|
6535
6535
|
"raw",
|
|
6536
6536
|
l.encode(s),
|
|
6537
6537
|
{ name: "HMAC", hash: t },
|
|
6538
6538
|
!1,
|
|
6539
6539
|
["sign"]
|
|
6540
|
-
), c = await crypto.subtle.sign("HMAC",
|
|
6540
|
+
), c = await crypto.subtle.sign("HMAC", i, l.encode(a));
|
|
6541
6541
|
return Array.from(new Uint8Array(c)).map((p) => p.toString(16).padStart(2, "0")).join("");
|
|
6542
6542
|
}
|
|
6543
6543
|
function V_() {
|
|
6544
|
-
const [t, s] =
|
|
6544
|
+
const [t, s] = r(""), [a, l] = r(""), [i, c] = r("SHA-256"), [p, m] = r(""), [u, d] = r(!1), o = H(async () => {
|
|
6545
6545
|
if (!t || !a) {
|
|
6546
6546
|
Ce.warning("消息和密钥不能为空");
|
|
6547
6547
|
return;
|
|
6548
6548
|
}
|
|
6549
6549
|
d(!0);
|
|
6550
6550
|
try {
|
|
6551
|
-
m(await W_(
|
|
6551
|
+
m(await W_(i, a, t));
|
|
6552
6552
|
} catch {
|
|
6553
6553
|
Ce.error("计算失败");
|
|
6554
6554
|
} finally {
|
|
6555
6555
|
d(!1);
|
|
6556
6556
|
}
|
|
6557
|
-
}, [t, a,
|
|
6557
|
+
}, [t, a, i]);
|
|
6558
6558
|
return /* @__PURE__ */ n("div", { children: [
|
|
6559
6559
|
/* @__PURE__ */ n(Lt, { gutter: 12, style: { marginBottom: 12 }, children: [
|
|
6560
6560
|
/* @__PURE__ */ n(et, { span: 12, children: [
|
|
@@ -6586,7 +6586,7 @@ function V_() {
|
|
|
6586
6586
|
/* @__PURE__ */ e(
|
|
6587
6587
|
Gt,
|
|
6588
6588
|
{
|
|
6589
|
-
value:
|
|
6589
|
+
value: i,
|
|
6590
6590
|
onChange: c,
|
|
6591
6591
|
options: ["SHA-256", "SHA-384", "SHA-512"].map((v) => ({
|
|
6592
6592
|
value: v,
|
|
@@ -6601,7 +6601,7 @@ function V_() {
|
|
|
6601
6601
|
p && /* @__PURE__ */ n("div", { className: z.hashResult, children: [
|
|
6602
6602
|
/* @__PURE__ */ n(de, { children: [
|
|
6603
6603
|
"HMAC-",
|
|
6604
|
-
|
|
6604
|
+
i
|
|
6605
6605
|
] }),
|
|
6606
6606
|
/* @__PURE__ */ e("code", { className: z.hashCode, children: p })
|
|
6607
6607
|
] })
|
|
@@ -6609,17 +6609,17 @@ function V_() {
|
|
|
6609
6609
|
}
|
|
6610
6610
|
function K_(t, s) {
|
|
6611
6611
|
if (!t && !s) return { add: 0, remove: 0 };
|
|
6612
|
-
const a =
|
|
6613
|
-
let l = 0,
|
|
6612
|
+
const a = Pi(t, s);
|
|
6613
|
+
let l = 0, i = 0;
|
|
6614
6614
|
for (const c of a) {
|
|
6615
6615
|
const p = c.value.split(`
|
|
6616
6616
|
`);
|
|
6617
|
-
p[p.length - 1] === "" && p.pop(), c.added ? l += p.length : c.removed && (
|
|
6617
|
+
p[p.length - 1] === "" && p.pop(), c.added ? l += p.length : c.removed && (i += p.length);
|
|
6618
6618
|
}
|
|
6619
|
-
return { add: l, remove:
|
|
6619
|
+
return { add: l, remove: i };
|
|
6620
6620
|
}
|
|
6621
6621
|
function J_() {
|
|
6622
|
-
const [t, s] =
|
|
6622
|
+
const [t, s] = r(""), [a, l] = r(""), [i, c] = r(!0), [p, m] = r({ add: 0, remove: 0 }), u = ge(null);
|
|
6623
6623
|
return ee(() => {
|
|
6624
6624
|
if (!t && !a) {
|
|
6625
6625
|
m({ add: 0, remove: 0 });
|
|
@@ -6664,7 +6664,7 @@ function J_() {
|
|
|
6664
6664
|
Ot.Group,
|
|
6665
6665
|
{
|
|
6666
6666
|
size: "small",
|
|
6667
|
-
value:
|
|
6667
|
+
value: i ? "split" : "inline",
|
|
6668
6668
|
onChange: (d) => c(d.target.value === "split"),
|
|
6669
6669
|
children: [
|
|
6670
6670
|
/* @__PURE__ */ e(Ot.Button, { value: "split", children: "左右对比" }),
|
|
@@ -6686,13 +6686,13 @@ function J_() {
|
|
|
6686
6686
|
] })
|
|
6687
6687
|
] }) }) }),
|
|
6688
6688
|
(t || a) && /* @__PURE__ */ e("div", { className: z.diffBox, children: /* @__PURE__ */ e(
|
|
6689
|
-
|
|
6689
|
+
Oi,
|
|
6690
6690
|
{
|
|
6691
6691
|
oldValue: t,
|
|
6692
6692
|
newValue: a,
|
|
6693
|
-
splitView:
|
|
6693
|
+
splitView: i,
|
|
6694
6694
|
showDiffOnly: !1,
|
|
6695
|
-
compareMethod:
|
|
6695
|
+
compareMethod: Hi.LINES,
|
|
6696
6696
|
hideLineNumbers: !1,
|
|
6697
6697
|
extraLinesSurroundingDiff: 3,
|
|
6698
6698
|
styles: {
|
|
@@ -6731,7 +6731,7 @@ function X_(t) {
|
|
|
6731
6731
|
return t.replace(/[-_]/g, " ").replace(/\b\w/g, (s) => s.toUpperCase());
|
|
6732
6732
|
}
|
|
6733
6733
|
function Z_() {
|
|
6734
|
-
const [t, s] =
|
|
6734
|
+
const [t, s] = r(""), a = Le(
|
|
6735
6735
|
() => [
|
|
6736
6736
|
{ label: "camelCase", value: Ds(t) },
|
|
6737
6737
|
{ label: "PascalCase", value: Y_(t) },
|
|
@@ -6774,10 +6774,10 @@ function Z_() {
|
|
|
6774
6774
|
] });
|
|
6775
6775
|
}
|
|
6776
6776
|
function ef() {
|
|
6777
|
-
const [t, s] =
|
|
6778
|
-
const l = t.length,
|
|
6777
|
+
const [t, s] = r(""), a = Le(() => {
|
|
6778
|
+
const l = t.length, i = t ? t.split(`
|
|
6779
6779
|
`).length : 0, c = t.trim() ? t.trim().split(/\s+/).length : 0, p = (t.match(/[\u4e00-\u9fa5]/g) || []).length, m = (t.match(/[a-zA-Z]/g) || []).length, u = (t.match(/[0-9]/g) || []).length, d = t.replace(/\s/g, "").length;
|
|
6780
|
-
return { chars: l, lines:
|
|
6780
|
+
return { chars: l, lines: i, words: c, chinese: p, english: m, numbers: u, noSpace: d };
|
|
6781
6781
|
}, [t]);
|
|
6782
6782
|
return /* @__PURE__ */ n("div", { children: [
|
|
6783
6783
|
/* @__PURE__ */ e("div", { className: z.panelLabel, children: "输入文本" }),
|
|
@@ -6800,7 +6800,7 @@ function ef() {
|
|
|
6800
6800
|
{ title: "英文字母", value: a.english },
|
|
6801
6801
|
{ title: "数字", value: a.numbers }
|
|
6802
6802
|
].map((l) => /* @__PURE__ */ e(et, { xs: 12, sm: 8, md: 6, children: /* @__PURE__ */ e(
|
|
6803
|
-
|
|
6803
|
+
ki,
|
|
6804
6804
|
{
|
|
6805
6805
|
title: l.title,
|
|
6806
6806
|
value: l.value,
|
|
@@ -6810,22 +6810,22 @@ function ef() {
|
|
|
6810
6810
|
] });
|
|
6811
6811
|
}
|
|
6812
6812
|
function tf() {
|
|
6813
|
-
const [t, s] =
|
|
6813
|
+
const [t, s] = r(""), [a, l] = r("g"), [i, c] = r(""), [p, m] = r([]), [u, d] = r(""), o = H(() => {
|
|
6814
6814
|
try {
|
|
6815
6815
|
const v = [], x = new RegExp(t, a);
|
|
6816
6816
|
if (a.includes("g")) {
|
|
6817
6817
|
let R;
|
|
6818
|
-
for (; (R = x.exec(
|
|
6818
|
+
for (; (R = x.exec(i)) !== null && (v.push(R[0]), R[0] !== ""); )
|
|
6819
6819
|
;
|
|
6820
6820
|
} else {
|
|
6821
|
-
const R = x.exec(
|
|
6821
|
+
const R = x.exec(i);
|
|
6822
6822
|
R && v.push(R[0]);
|
|
6823
6823
|
}
|
|
6824
6824
|
m(v), d("");
|
|
6825
6825
|
} catch (v) {
|
|
6826
6826
|
d(v instanceof Error ? v.message : "正则错误"), m([]);
|
|
6827
6827
|
}
|
|
6828
|
-
}, [t, a,
|
|
6828
|
+
}, [t, a, i]);
|
|
6829
6829
|
return /* @__PURE__ */ n("div", { children: [
|
|
6830
6830
|
/* @__PURE__ */ n(Xe, { wrap: !0, style: { marginBottom: 12 }, children: [
|
|
6831
6831
|
/* @__PURE__ */ n(Xe.Compact, { children: [
|
|
@@ -6856,7 +6856,7 @@ function tf() {
|
|
|
6856
6856
|
Re,
|
|
6857
6857
|
{
|
|
6858
6858
|
rows: 10,
|
|
6859
|
-
value:
|
|
6859
|
+
value: i,
|
|
6860
6860
|
onChange: (v) => c(v.target.value),
|
|
6861
6861
|
placeholder: "粘贴要匹配的文本...",
|
|
6862
6862
|
style: { marginBottom: 12 }
|
|
@@ -6884,11 +6884,11 @@ function tf() {
|
|
|
6884
6884
|
] })
|
|
6885
6885
|
}
|
|
6886
6886
|
)
|
|
6887
|
-
] }) :
|
|
6887
|
+
] }) : i && t ? /* @__PURE__ */ e(Dt, { type: "secondary", children: "无匹配" }) : null
|
|
6888
6888
|
] });
|
|
6889
6889
|
}
|
|
6890
6890
|
function nf() {
|
|
6891
|
-
const [t, s] =
|
|
6891
|
+
const [t, s] = r([]), [a, l] = r(1), [i, c] = r(16), [p, m] = r([]), u = H(() => {
|
|
6892
6892
|
const o = [];
|
|
6893
6893
|
for (let v = 0; v < Math.max(1, Math.min(a, 50)); v++)
|
|
6894
6894
|
o.push(
|
|
@@ -6903,12 +6903,12 @@ function nf() {
|
|
|
6903
6903
|
for (let x = 0; x < Math.max(1, Math.min(a, 50)); x++)
|
|
6904
6904
|
v.push(
|
|
6905
6905
|
Array.from(
|
|
6906
|
-
{ length: Math.max(1,
|
|
6906
|
+
{ length: Math.max(1, i) },
|
|
6907
6907
|
() => o.charAt(Math.floor(Math.random() * o.length))
|
|
6908
6908
|
).join("")
|
|
6909
6909
|
);
|
|
6910
6910
|
s(v), m((x) => [...v, ...x].slice(0, 20));
|
|
6911
|
-
}, [a,
|
|
6911
|
+
}, [a, i]);
|
|
6912
6912
|
return /* @__PURE__ */ n("div", { children: [
|
|
6913
6913
|
/* @__PURE__ */ n(Xe, { wrap: !0, style: { marginBottom: 12 }, children: [
|
|
6914
6914
|
/* @__PURE__ */ e(
|
|
@@ -6929,7 +6929,7 @@ function nf() {
|
|
|
6929
6929
|
type: "number",
|
|
6930
6930
|
min: 1,
|
|
6931
6931
|
max: 128,
|
|
6932
|
-
value:
|
|
6932
|
+
value: i,
|
|
6933
6933
|
onChange: (o) => c(Number(o.target.value)),
|
|
6934
6934
|
addonBefore: "长度(随机串)",
|
|
6935
6935
|
style: { width: 160 }
|
|
@@ -6987,7 +6987,7 @@ function nf() {
|
|
|
6987
6987
|
] });
|
|
6988
6988
|
}
|
|
6989
6989
|
function af() {
|
|
6990
|
-
const [t, s] =
|
|
6990
|
+
const [t, s] = r(String(Math.floor(Date.now() / 1e3))), [a, l] = r((/* @__PURE__ */ new Date()).toISOString().slice(0, 19)), [i, c] = r("local"), p = H(() => {
|
|
6991
6991
|
const d = Number(t);
|
|
6992
6992
|
if (!Number.isFinite(d)) {
|
|
6993
6993
|
Ce.error("时间戳格式错误");
|
|
@@ -6995,9 +6995,9 @@ function af() {
|
|
|
6995
6995
|
}
|
|
6996
6996
|
const o = new Date(d > 1e12 ? d : d * 1e3);
|
|
6997
6997
|
l(
|
|
6998
|
-
|
|
6998
|
+
i === "utc" ? o.toISOString().slice(0, 19) : o.toLocaleString("sv-SE").replace(" ", "T")
|
|
6999
6999
|
);
|
|
7000
|
-
}, [t,
|
|
7000
|
+
}, [t, i]), m = H(() => {
|
|
7001
7001
|
const d = new Date(a);
|
|
7002
7002
|
if (Number.isNaN(d.getTime())) {
|
|
7003
7003
|
Ce.error("日期格式错误");
|
|
@@ -7014,7 +7014,7 @@ function af() {
|
|
|
7014
7014
|
/* @__PURE__ */ n(
|
|
7015
7015
|
Ot.Group,
|
|
7016
7016
|
{
|
|
7017
|
-
value:
|
|
7017
|
+
value: i,
|
|
7018
7018
|
onChange: (d) => c(d.target.value),
|
|
7019
7019
|
buttonStyle: "solid",
|
|
7020
7020
|
children: [
|
|
@@ -7074,9 +7074,9 @@ function af() {
|
|
|
7074
7074
|
] });
|
|
7075
7075
|
}
|
|
7076
7076
|
function sf() {
|
|
7077
|
-
const [t, s] =
|
|
7077
|
+
const [t, s] = r("0 9 * * 1-5"), [a, l] = r(
|
|
7078
7078
|
null
|
|
7079
|
-
), [
|
|
7079
|
+
), [i, c] = r(""), p = H(async () => {
|
|
7080
7080
|
try {
|
|
7081
7081
|
const { CronExpressionParser: u } = await import("./index-nj-cjKsf.js").then((K) => K.i), d = u.parse(t, {
|
|
7082
7082
|
tz: "Asia/Shanghai"
|
|
@@ -7131,7 +7131,7 @@ function sf() {
|
|
|
7131
7131
|
},
|
|
7132
7132
|
u
|
|
7133
7133
|
)) }),
|
|
7134
|
-
|
|
7134
|
+
i && /* @__PURE__ */ e(Dt, { type: "danger", children: i }),
|
|
7135
7135
|
a && /* @__PURE__ */ n(Be, { children: [
|
|
7136
7136
|
/* @__PURE__ */ e("div", { className: z.cronDesc, children: a.desc }),
|
|
7137
7137
|
/* @__PURE__ */ e("div", { className: z.panelLabel, style: { marginTop: 12 }, children: "最近 5 次触发时间" }),
|
|
@@ -7148,12 +7148,12 @@ function lf(t) {
|
|
|
7148
7148
|
}
|
|
7149
7149
|
function rf(t, s, a) {
|
|
7150
7150
|
t /= 255, s /= 255, a /= 255;
|
|
7151
|
-
const l = Math.max(t, s, a),
|
|
7151
|
+
const l = Math.max(t, s, a), i = Math.min(t, s, a);
|
|
7152
7152
|
let c = 0, p = 0;
|
|
7153
|
-
const m = (l +
|
|
7154
|
-
if (l !==
|
|
7155
|
-
const u = l -
|
|
7156
|
-
switch (p = m > 0.5 ? u / (2 - l -
|
|
7153
|
+
const m = (l + i) / 2;
|
|
7154
|
+
if (l !== i) {
|
|
7155
|
+
const u = l - i;
|
|
7156
|
+
switch (p = m > 0.5 ? u / (2 - l - i) : u / (l + i), l) {
|
|
7157
7157
|
case t:
|
|
7158
7158
|
c = ((s - a) / u + (s < a ? 6 : 0)) / 6;
|
|
7159
7159
|
break;
|
|
@@ -7168,7 +7168,7 @@ function rf(t, s, a) {
|
|
|
7168
7168
|
return [Math.round(c * 360), Math.round(p * 100), Math.round(m * 100)];
|
|
7169
7169
|
}
|
|
7170
7170
|
function of() {
|
|
7171
|
-
const [t, s] =
|
|
7171
|
+
const [t, s] = r("#4285f4"), [a, l] = r("#4285f4"), i = lf(t), c = i ? rf(...i) : null, p = (m) => {
|
|
7172
7172
|
s(m), /^#[0-9a-fA-F]{6}$/.test(m) && l(m);
|
|
7173
7173
|
};
|
|
7174
7174
|
return /* @__PURE__ */ n("div", { children: [
|
|
@@ -7199,7 +7199,7 @@ function of() {
|
|
|
7199
7199
|
)
|
|
7200
7200
|
] })
|
|
7201
7201
|
] }),
|
|
7202
|
-
|
|
7202
|
+
i && c && /* @__PURE__ */ n(Be, { children: [
|
|
7203
7203
|
/* @__PURE__ */ e("div", { className: z.colorPreview, style: { background: t } }),
|
|
7204
7204
|
/* @__PURE__ */ e(
|
|
7205
7205
|
"div",
|
|
@@ -7214,17 +7214,17 @@ function of() {
|
|
|
7214
7214
|
{ label: "HEX", value: t, copy: t },
|
|
7215
7215
|
{
|
|
7216
7216
|
label: "RGB",
|
|
7217
|
-
value: `rgb(${
|
|
7218
|
-
copy: `rgb(${
|
|
7217
|
+
value: `rgb(${i.join(", ")})`,
|
|
7218
|
+
copy: `rgb(${i.join(", ")})`
|
|
7219
7219
|
},
|
|
7220
7220
|
{
|
|
7221
7221
|
label: "HSL",
|
|
7222
7222
|
value: `hsl(${c[0]}, ${c[1]}%, ${c[2]}%)`,
|
|
7223
7223
|
copy: `hsl(${c[0]}, ${c[1]}%, ${c[2]}%)`
|
|
7224
7224
|
},
|
|
7225
|
-
{ label: "R", value: String(
|
|
7226
|
-
{ label: "G", value: String(
|
|
7227
|
-
{ label: "B", value: String(
|
|
7225
|
+
{ label: "R", value: String(i[0]), copy: String(i[0]) },
|
|
7226
|
+
{ label: "G", value: String(i[1]), copy: String(i[1]) },
|
|
7227
|
+
{ label: "B", value: String(i[2]), copy: String(i[2]) }
|
|
7228
7228
|
].map((m) => /* @__PURE__ */ n("div", { className: z.colorRow, children: [
|
|
7229
7229
|
/* @__PURE__ */ e(de, { style: { minWidth: 40 }, children: m.label }),
|
|
7230
7230
|
/* @__PURE__ */ e("code", { style: { fontSize: 13, flex: 1 }, children: m.value }),
|
|
@@ -7236,14 +7236,14 @@ function of() {
|
|
|
7236
7236
|
] });
|
|
7237
7237
|
}
|
|
7238
7238
|
function cf() {
|
|
7239
|
-
const [t, s] =
|
|
7239
|
+
const [t, s] = r(""), [a, l] = r(""), i = ge(null), c = H(async () => {
|
|
7240
7240
|
if (!t.trim()) {
|
|
7241
7241
|
Ce.warning("请输入内容");
|
|
7242
7242
|
return;
|
|
7243
7243
|
}
|
|
7244
7244
|
try {
|
|
7245
7245
|
const m = (await import("./browser-jb_PFvU3.js").then((d) => d.b)).default, u = await m.toDataURL(t, { width: 256, margin: 2 });
|
|
7246
|
-
l(u),
|
|
7246
|
+
l(u), i.current && await m.toCanvas(i.current, t, {
|
|
7247
7247
|
width: 256,
|
|
7248
7248
|
margin: 2
|
|
7249
7249
|
});
|
|
@@ -7283,7 +7283,7 @@ function cf() {
|
|
|
7283
7283
|
}
|
|
7284
7284
|
}
|
|
7285
7285
|
),
|
|
7286
|
-
/* @__PURE__ */ e("canvas", { ref:
|
|
7286
|
+
/* @__PURE__ */ e("canvas", { ref: i, style: { display: "none" } }),
|
|
7287
7287
|
/* @__PURE__ */ n("div", { children: [
|
|
7288
7288
|
/* @__PURE__ */ e("div", { className: z.panelLabel, children: "Data URI(可嵌入 img src)" }),
|
|
7289
7289
|
/* @__PURE__ */ e(
|
|
@@ -7305,7 +7305,7 @@ function df(t) {
|
|
|
7305
7305
|
var p, m, u;
|
|
7306
7306
|
const s = t.replace(/\\\n/g, " ").replace(/\s+/g, " ").trim().match(/(?:[^\s"']+|"[^"]*"|'[^']*')+/g) ?? [];
|
|
7307
7307
|
let a = "GET", l = "";
|
|
7308
|
-
const
|
|
7308
|
+
const i = [];
|
|
7309
7309
|
let c = "";
|
|
7310
7310
|
for (let d = 0; d < s.length; d++) {
|
|
7311
7311
|
const o = s[d].replace(/^'+|'+$/g, "").replace(/^"+|"+$/g, "");
|
|
@@ -7314,18 +7314,18 @@ function df(t) {
|
|
|
7314
7314
|
a = ((p = s[++d]) == null ? void 0 : p.replace(/^['"]|['"]$/g, "")) ?? a;
|
|
7315
7315
|
else if (o === "-H" || o === "--header") {
|
|
7316
7316
|
const v = ((m = s[++d]) == null ? void 0 : m.replace(/^['"]|['"]$/g, "")) ?? "", x = v.indexOf(":");
|
|
7317
|
-
x > 0 &&
|
|
7317
|
+
x > 0 && i.push({
|
|
7318
7318
|
key: v.slice(0, x).trim(),
|
|
7319
7319
|
value: v.slice(x + 1).trim(),
|
|
7320
7320
|
enabled: !0
|
|
7321
7321
|
});
|
|
7322
7322
|
} else o === "-d" || o === "--data" || o === "--data-raw" || o === "--data-binary" ? (c = ((u = s[++d]) == null ? void 0 : u.replace(/^['"]|['"]$/g, "")) ?? "", a === "GET" && (a = "POST")) : !o.startsWith("-") && !l && (l = o);
|
|
7323
7323
|
}
|
|
7324
|
-
return { method: a, url: l, headers:
|
|
7324
|
+
return { method: a, url: l, headers: i, body: c };
|
|
7325
7325
|
}
|
|
7326
7326
|
function uf(t, s, a, l) {
|
|
7327
|
-
const
|
|
7328
|
-
return a.filter((c) => c.enabled && c.key).forEach((c) =>
|
|
7327
|
+
const i = [`curl -X ${t}`];
|
|
7328
|
+
return a.filter((c) => c.enabled && c.key).forEach((c) => i.push(` -H '${c.key}: ${c.value}'`)), l && i.push(` -d '${l.replace(/'/g, "'\\''")}'`), i.push(` '${s}'`), i.join(` \\
|
|
7329
7329
|
`);
|
|
7330
7330
|
}
|
|
7331
7331
|
const mf = [
|
|
@@ -7338,9 +7338,9 @@ const mf = [
|
|
|
7338
7338
|
"OPTIONS"
|
|
7339
7339
|
];
|
|
7340
7340
|
function hf() {
|
|
7341
|
-
const [t, s] =
|
|
7341
|
+
const [t, s] = r("GET"), [a, l] = r(""), [i, c] = r([
|
|
7342
7342
|
{ key: "Content-Type", value: "application/json", enabled: !0 }
|
|
7343
|
-
]), [p, m] =
|
|
7343
|
+
]), [p, m] = r(""), [u, d] = r(""), [o, v] = r(!1), [x, R] = r(null), [F, $] = r(""), [O, Q] = r(""), [te, Y] = r(null), [I, K] = r("body"), [W, ne] = r(!1), B = H(() => {
|
|
7344
7344
|
const L = df(u);
|
|
7345
7345
|
s(L.method), l(L.url), c(
|
|
7346
7346
|
L.headers.length ? L.headers : [{ key: "Content-Type", value: "application/json", enabled: !0 }]
|
|
@@ -7350,8 +7350,8 @@ function hf() {
|
|
|
7350
7350
|
Ce.warning("请先填写 URL");
|
|
7351
7351
|
return;
|
|
7352
7352
|
}
|
|
7353
|
-
Rs(uf(t, a,
|
|
7354
|
-
}, [t, a,
|
|
7353
|
+
Rs(uf(t, a, i, p));
|
|
7354
|
+
}, [t, a, i, p]), T = H(async () => {
|
|
7355
7355
|
if (!a.trim()) {
|
|
7356
7356
|
Ce.warning("请先填写 URL");
|
|
7357
7357
|
return;
|
|
@@ -7360,14 +7360,14 @@ function hf() {
|
|
|
7360
7360
|
const L = Date.now();
|
|
7361
7361
|
try {
|
|
7362
7362
|
const G = {};
|
|
7363
|
-
|
|
7363
|
+
i.filter((pe) => pe.enabled && pe.key).forEach((pe) => G[pe.key] = pe.value);
|
|
7364
7364
|
const X = { method: t, headers: G };
|
|
7365
7365
|
p && t !== "GET" && t !== "HEAD" && (X.body = p);
|
|
7366
|
-
const k = await fetch(a, X), S = Date.now() - L,
|
|
7366
|
+
const k = await fetch(a, X), S = Date.now() - L, ie = await k.text(), Z = [];
|
|
7367
7367
|
k.headers.forEach((pe, ve) => Z.push(`${ve}: ${pe}`));
|
|
7368
|
-
let he =
|
|
7368
|
+
let he = ie;
|
|
7369
7369
|
try {
|
|
7370
|
-
he = JSON.stringify(JSON.parse(
|
|
7370
|
+
he = JSON.stringify(JSON.parse(ie), null, 2);
|
|
7371
7371
|
} catch {
|
|
7372
7372
|
}
|
|
7373
7373
|
R(k.status), $(Z.join(`
|
|
@@ -7379,8 +7379,8 @@ function hf() {
|
|
|
7379
7379
|
} finally {
|
|
7380
7380
|
v(!1);
|
|
7381
7381
|
}
|
|
7382
|
-
}, [t, a,
|
|
7383
|
-
(k) => k.map((S,
|
|
7382
|
+
}, [t, a, i, p]), le = () => c((L) => [...L, { key: "", value: "", enabled: !0 }]), ae = (L) => c((G) => G.filter((X, k) => k !== L)), b = (L, G, X) => c(
|
|
7383
|
+
(k) => k.map((S, ie) => ie === L ? { ...S, [G]: X } : S)
|
|
7384
7384
|
);
|
|
7385
7385
|
return /* @__PURE__ */ n("div", { children: [
|
|
7386
7386
|
/* @__PURE__ */ n(Xe.Compact, { style: { width: "100%", marginBottom: 12 }, children: [
|
|
@@ -7424,7 +7424,7 @@ function hf() {
|
|
|
7424
7424
|
] }),
|
|
7425
7425
|
/* @__PURE__ */ n("div", { style: { marginBottom: 12 }, children: [
|
|
7426
7426
|
/* @__PURE__ */ e("div", { className: z.panelLabel, children: "Request Headers" }),
|
|
7427
|
-
|
|
7427
|
+
i.map((L, G) => /* @__PURE__ */ n("div", { className: z.httpHeaderRow, children: [
|
|
7428
7428
|
/* @__PURE__ */ e(
|
|
7429
7429
|
"input",
|
|
7430
7430
|
{
|
|
@@ -7597,7 +7597,7 @@ batch.forEach((id, i) => console.log(i + 1, id));`
|
|
|
7597
7597
|
}
|
|
7598
7598
|
];
|
|
7599
7599
|
function _f() {
|
|
7600
|
-
const [t, s] =
|
|
7600
|
+
const [t, s] = r(
|
|
7601
7601
|
`// 在浏览器内执行 JavaScript,支持 async/await
|
|
7602
7602
|
console.log("Hello, World!");
|
|
7603
7603
|
console.log("当前时间:", new Date().toLocaleString());
|
|
@@ -7606,7 +7606,7 @@ console.log("当前时间:", new Date().toLocaleString());
|
|
|
7606
7606
|
const nums = Array.from({length: 10}, () => Math.floor(Math.random() * 100));
|
|
7607
7607
|
console.log("随机数:", nums);
|
|
7608
7608
|
console.log("排序后:", [...nums].sort((a,b) => a-b));`
|
|
7609
|
-
), [a, l] =
|
|
7609
|
+
), [a, l] = r([]), [i, c] = r(!1), p = ge(null), m = H(async () => {
|
|
7610
7610
|
c(!0);
|
|
7611
7611
|
const o = [], v = () => (/* @__PURE__ */ new Date()).toLocaleTimeString("zh-CN", { hour12: !1 }), x = {}, R = ["log", "warn", "error", "info", "debug"], F = { ...console };
|
|
7612
7612
|
R.forEach(($) => {
|
|
@@ -7693,8 +7693,8 @@ ${t}
|
|
|
7693
7693
|
{
|
|
7694
7694
|
type: "primary",
|
|
7695
7695
|
size: "small",
|
|
7696
|
-
icon: /* @__PURE__ */ e(
|
|
7697
|
-
loading:
|
|
7696
|
+
icon: /* @__PURE__ */ e(ra, {}),
|
|
7697
|
+
loading: i,
|
|
7698
7698
|
onClick: m,
|
|
7699
7699
|
children: "执行"
|
|
7700
7700
|
}
|
|
@@ -7823,7 +7823,7 @@ function vf({
|
|
|
7823
7823
|
category: t.category || ""
|
|
7824
7824
|
}) : l.resetFields();
|
|
7825
7825
|
}, [l, t]);
|
|
7826
|
-
const
|
|
7826
|
+
const i = H(() => {
|
|
7827
7827
|
l.validateFields().then((c) => {
|
|
7828
7828
|
var p;
|
|
7829
7829
|
a({
|
|
@@ -7840,7 +7840,7 @@ function vf({
|
|
|
7840
7840
|
open: !0,
|
|
7841
7841
|
title: t ? "编辑网站" : "添加常用网站",
|
|
7842
7842
|
onCancel: s,
|
|
7843
|
-
onOk:
|
|
7843
|
+
onOk: i,
|
|
7844
7844
|
okText: "保存",
|
|
7845
7845
|
children: /* @__PURE__ */ n(_n, { form: l, layout: "vertical", autoComplete: "off", children: [
|
|
7846
7846
|
/* @__PURE__ */ e(
|
|
@@ -7880,7 +7880,7 @@ function Nf({
|
|
|
7880
7880
|
websites: t,
|
|
7881
7881
|
onChange: s
|
|
7882
7882
|
}) {
|
|
7883
|
-
const [a, l] =
|
|
7883
|
+
const [a, l] = r(null), [i, c] = r(!1), p = H(
|
|
7884
7884
|
(d) => {
|
|
7885
7885
|
s(a ? t.map((o) => o.id === d.id ? d : o) : [...t, d]), l(null), c(!1);
|
|
7886
7886
|
},
|
|
@@ -7984,7 +7984,7 @@ function Nf({
|
|
|
7984
7984
|
]
|
|
7985
7985
|
}
|
|
7986
7986
|
) }, d.id)) }),
|
|
7987
|
-
(
|
|
7987
|
+
(i || a) && /* @__PURE__ */ e(
|
|
7988
7988
|
vf,
|
|
7989
7989
|
{
|
|
7990
7990
|
item: a,
|
|
@@ -8000,22 +8000,22 @@ function Ak({
|
|
|
8000
8000
|
showTools: t = !0,
|
|
8001
8001
|
showWebsites: s = !0
|
|
8002
8002
|
}) {
|
|
8003
|
-
const [a, l] =
|
|
8003
|
+
const [a, l] = r(() => {
|
|
8004
8004
|
try {
|
|
8005
8005
|
const m = localStorage.getItem(Fa);
|
|
8006
8006
|
if (m && Oa.some((u) => u.key === m)) return m;
|
|
8007
8007
|
} catch {
|
|
8008
8008
|
}
|
|
8009
8009
|
return Oa[0].key;
|
|
8010
|
-
}), [
|
|
8010
|
+
}), [i, c] = r(gf);
|
|
8011
8011
|
ee(() => {
|
|
8012
8012
|
try {
|
|
8013
8013
|
localStorage.setItem(Fa, a);
|
|
8014
8014
|
} catch {
|
|
8015
8015
|
}
|
|
8016
8016
|
}, [a]), ee(() => {
|
|
8017
|
-
yf(
|
|
8018
|
-
}, [
|
|
8017
|
+
yf(i);
|
|
8018
|
+
}, [i]);
|
|
8019
8019
|
const p = ff[a] || $s;
|
|
8020
8020
|
return /* @__PURE__ */ n("div", { className: z.root, children: [
|
|
8021
8021
|
t && /* @__PURE__ */ e(
|
|
@@ -8055,10 +8055,10 @@ function Ak({
|
|
|
8055
8055
|
] })
|
|
8056
8056
|
}
|
|
8057
8057
|
),
|
|
8058
|
-
s && /* @__PURE__ */ e(Nf, { websites:
|
|
8058
|
+
s && /* @__PURE__ */ e(Nf, { websites: i, onChange: c })
|
|
8059
8059
|
] });
|
|
8060
8060
|
}
|
|
8061
|
-
const kf = "_tabWrap_1hjjv_3", Cf = "_viewHeader_1hjjv_10", wf = "_viewTitle_1hjjv_17", Sf = "_viewSub_1hjjv_22", Tf = "_cardGrid_1hjjv_27", If = "_learnCard_1hjjv_33", xf = "_cardTitleRow_1hjjv_48", Bf = "_cardTitle_1hjjv_48", Lf = "_cardDesc_1hjjv_62", Af = "_cardFooter_1hjjv_73", Rf = "_learnLayout_1hjjv_91", $f = "_materialList_1hjjv_97", Df = "_materialItem_1hjjv_111", Mf = "_materialItemActive_1hjjv_125", Ef = "_materialTitleRow_1hjjv_130", Pf = "_materialTitle_1hjjv_130", Of = "_materialMeta_1hjjv_144", Hf = "_docPanel_1hjjv_152", jf = "_docContent_1hjjv_163", Ff = "_finishBar_1hjjv_176", Gf = "_pathBoard_1hjjv_187", qf = "_stageHeader_1hjjv_194", Uf = "_nodeColumn_1hjjv_201", zf = "_nodeCard_1hjjv_208", Wf = "_nodeCardDone_1hjjv_227", Vf = "_nodeCardDoing_1hjjv_232", Kf = "_nodeCardLocked_1hjjv_237", Jf = "_nodeLink_1hjjv_243", Yf = "_nodeIndex_1hjjv_249", Qf = "_nodeIndexDone_1hjjv_262", Xf = "_nodeIndexDoing_1hjjv_267", Zf = "_nodeBody_1hjjv_272", eg = "_nodeTitle_1hjjv_277", tg = "_nodeMeta_1hjjv_282", ng = "_mapGrid_1hjjv_288", ag = "_examWrap_1hjjv_295", sg = "_examMetaRow_1hjjv_304", lg = "_questionCard_1hjjv_314",
|
|
8061
|
+
const kf = "_tabWrap_1hjjv_3", Cf = "_viewHeader_1hjjv_10", wf = "_viewTitle_1hjjv_17", Sf = "_viewSub_1hjjv_22", Tf = "_cardGrid_1hjjv_27", If = "_learnCard_1hjjv_33", xf = "_cardTitleRow_1hjjv_48", Bf = "_cardTitle_1hjjv_48", Lf = "_cardDesc_1hjjv_62", Af = "_cardFooter_1hjjv_73", Rf = "_learnLayout_1hjjv_91", $f = "_materialList_1hjjv_97", Df = "_materialItem_1hjjv_111", Mf = "_materialItemActive_1hjjv_125", Ef = "_materialTitleRow_1hjjv_130", Pf = "_materialTitle_1hjjv_130", Of = "_materialMeta_1hjjv_144", Hf = "_docPanel_1hjjv_152", jf = "_docContent_1hjjv_163", Ff = "_finishBar_1hjjv_176", Gf = "_pathBoard_1hjjv_187", qf = "_stageHeader_1hjjv_194", Uf = "_nodeColumn_1hjjv_201", zf = "_nodeCard_1hjjv_208", Wf = "_nodeCardDone_1hjjv_227", Vf = "_nodeCardDoing_1hjjv_232", Kf = "_nodeCardLocked_1hjjv_237", Jf = "_nodeLink_1hjjv_243", Yf = "_nodeIndex_1hjjv_249", Qf = "_nodeIndexDone_1hjjv_262", Xf = "_nodeIndexDoing_1hjjv_267", Zf = "_nodeBody_1hjjv_272", eg = "_nodeTitle_1hjjv_277", tg = "_nodeMeta_1hjjv_282", ng = "_mapGrid_1hjjv_288", ag = "_examWrap_1hjjv_295", sg = "_examMetaRow_1hjjv_304", lg = "_questionCard_1hjjv_314", ig = "_questionTitle_1hjjv_322", rg = "_optionRow_1hjjv_329", og = "_optionRowSelected_1hjjv_344", cg = "_answerBlock_1hjjv_348", dg = "_examResultCard_1hjjv_358", ug = "_examScore_1hjjv_363", mg = "_gloryGrid_1hjjv_369", E = {
|
|
8062
8062
|
tabWrap: kf,
|
|
8063
8063
|
viewHeader: Cf,
|
|
8064
8064
|
viewTitle: wf,
|
|
@@ -8097,8 +8097,8 @@ const kf = "_tabWrap_1hjjv_3", Cf = "_viewHeader_1hjjv_10", wf = "_viewTitle_1hj
|
|
|
8097
8097
|
examWrap: ag,
|
|
8098
8098
|
examMetaRow: sg,
|
|
8099
8099
|
questionCard: lg,
|
|
8100
|
-
questionTitle:
|
|
8101
|
-
optionRow:
|
|
8100
|
+
questionTitle: ig,
|
|
8101
|
+
optionRow: rg,
|
|
8102
8102
|
optionRowSelected: og,
|
|
8103
8103
|
answerBlock: cg,
|
|
8104
8104
|
examResultCard: dg,
|
|
@@ -8117,13 +8117,13 @@ function pg({
|
|
|
8117
8117
|
onBack: s,
|
|
8118
8118
|
onOpenExam: a
|
|
8119
8119
|
}) {
|
|
8120
|
-
const l = ct((G) => G.token), [
|
|
8120
|
+
const l = ct((G) => G.token), [i, c] = r(null), [p, m] = r(!0), [u, d] = r(null), [o, v] = r(null), [x, R] = r(!1), [F, $] = r({}), [O, Q] = r(!1), [te, Y] = r(!1), [I, K] = r(
|
|
8121
8121
|
{}
|
|
8122
8122
|
);
|
|
8123
8123
|
ee(() => {
|
|
8124
8124
|
Ts(t, l).then((G) => {
|
|
8125
8125
|
const X = {}, k = [...G].sort(
|
|
8126
|
-
(S,
|
|
8126
|
+
(S, ie) => String(ie.submitTime ?? "").localeCompare(String(S.submitTime ?? ""))
|
|
8127
8127
|
);
|
|
8128
8128
|
for (const S of k)
|
|
8129
8129
|
S.paperId != null && X[S.paperId] == null && (X[S.paperId] = S.examId);
|
|
@@ -8134,7 +8134,7 @@ function pg({
|
|
|
8134
8134
|
const W = H(async () => {
|
|
8135
8135
|
m(!0);
|
|
8136
8136
|
try {
|
|
8137
|
-
const G = await
|
|
8137
|
+
const G = await Fi(t, l);
|
|
8138
8138
|
c(G), d((X) => {
|
|
8139
8139
|
var k, S;
|
|
8140
8140
|
return X ?? ((S = (k = G.materials) == null ? void 0 : k[0]) == null ? void 0 : S.materialId) ?? null;
|
|
@@ -8147,12 +8147,12 @@ function pg({
|
|
|
8147
8147
|
ee(() => {
|
|
8148
8148
|
W();
|
|
8149
8149
|
}, [W]), ee(() => {
|
|
8150
|
-
|
|
8150
|
+
Gi("", "", l).then((G) => $(Object.fromEntries(G.map((X) => [X.id, X])))).catch(() => {
|
|
8151
8151
|
});
|
|
8152
8152
|
}, [l]), ee(() => {
|
|
8153
|
-
u && (R(!0),
|
|
8153
|
+
u && (R(!0), qi(u, l).then(v).catch(() => v(null)).finally(() => R(!1)));
|
|
8154
8154
|
}, [u, l]);
|
|
8155
|
-
const ne = (
|
|
8155
|
+
const ne = (i == null ? void 0 : i.materials) ?? [], B = i != null && i.finalPaperId ? I[i.finalPaperId] ?? null : null, U = Le(
|
|
8156
8156
|
() => ne.find((G) => G.materialId === u) ?? null,
|
|
8157
8157
|
[ne, u]
|
|
8158
8158
|
), T = async () => {
|
|
@@ -8167,7 +8167,7 @@ function pg({
|
|
|
8167
8167
|
if (U) {
|
|
8168
8168
|
Y(!0);
|
|
8169
8169
|
try {
|
|
8170
|
-
await
|
|
8170
|
+
await Ui(t, U.materialId, l), Ce.success("已记录学习进度"), W();
|
|
8171
8171
|
} catch {
|
|
8172
8172
|
} finally {
|
|
8173
8173
|
Y(!1);
|
|
@@ -8176,14 +8176,14 @@ function pg({
|
|
|
8176
8176
|
};
|
|
8177
8177
|
if (p)
|
|
8178
8178
|
return /* @__PURE__ */ e("div", { style: { textAlign: "center", padding: "80px 0" }, children: /* @__PURE__ */ e(Rt, {}) });
|
|
8179
|
-
if (!
|
|
8179
|
+
if (!i)
|
|
8180
8180
|
return /* @__PURE__ */ e("div", { style: { textAlign: "center", padding: "60px 0", color: "#999" }, children: "课程不存在或已被下线" });
|
|
8181
|
-
const ae =
|
|
8181
|
+
const ae = i.progressTotal ?? ne.length, b = i.progressDone ?? 0, L = ae > 0 ? Math.round(b / ae * 100) : 0;
|
|
8182
8182
|
return /* @__PURE__ */ n("div", { children: [
|
|
8183
8183
|
/* @__PURE__ */ n("div", { className: E.viewHeader, children: [
|
|
8184
8184
|
/* @__PURE__ */ e(J, { type: "text", icon: /* @__PURE__ */ e(Ut, {}), onClick: s }),
|
|
8185
|
-
/* @__PURE__ */ e("span", { className: E.viewTitle, children:
|
|
8186
|
-
|
|
8185
|
+
/* @__PURE__ */ e("span", { className: E.viewTitle, children: i.title }),
|
|
8186
|
+
i.enrollStatus === 1 ? /* @__PURE__ */ e(de, { color: "success", icon: /* @__PURE__ */ e(zt, {}), children: "已完成" }) : i.enrolled ? /* @__PURE__ */ e(de, { color: "processing", children: "学习中" }) : null,
|
|
8187
8187
|
/* @__PURE__ */ n("div", { style: { marginLeft: "auto", width: 180 }, children: [
|
|
8188
8188
|
/* @__PURE__ */ e(on, { percent: L, size: "small" }),
|
|
8189
8189
|
/* @__PURE__ */ n("div", { className: E.viewSub, style: { textAlign: "right" }, children: [
|
|
@@ -8194,7 +8194,7 @@ function pg({
|
|
|
8194
8194
|
] })
|
|
8195
8195
|
] })
|
|
8196
8196
|
] }),
|
|
8197
|
-
!
|
|
8197
|
+
!i.enrolled && /* @__PURE__ */ n(
|
|
8198
8198
|
"div",
|
|
8199
8199
|
{
|
|
8200
8200
|
style: {
|
|
@@ -8239,7 +8239,7 @@ function pg({
|
|
|
8239
8239
|
},
|
|
8240
8240
|
G.materialId
|
|
8241
8241
|
)),
|
|
8242
|
-
|
|
8242
|
+
i.finalPaperId ? /* @__PURE__ */ n(
|
|
8243
8243
|
"div",
|
|
8244
8244
|
{
|
|
8245
8245
|
style: {
|
|
@@ -8249,9 +8249,9 @@ function pg({
|
|
|
8249
8249
|
},
|
|
8250
8250
|
children: [
|
|
8251
8251
|
/* @__PURE__ */ e("div", { style: { fontSize: 13, fontWeight: 600, marginBottom: 6 }, children: "结业考试" }),
|
|
8252
|
-
|
|
8252
|
+
i.finalPaperPassed ? /* @__PURE__ */ n(Be, { children: [
|
|
8253
8253
|
/* @__PURE__ */ n(de, { color: "success", icon: /* @__PURE__ */ e(zt, {}), children: [
|
|
8254
|
-
|
|
8254
|
+
i.finalPaperTitle ?? "结业卷",
|
|
8255
8255
|
" 已通过"
|
|
8256
8256
|
] }),
|
|
8257
8257
|
B ? /* @__PURE__ */ e(
|
|
@@ -8262,7 +8262,7 @@ function pg({
|
|
|
8262
8262
|
icon: /* @__PURE__ */ e(ts, {}),
|
|
8263
8263
|
style: { marginTop: 8 },
|
|
8264
8264
|
onClick: () => a(
|
|
8265
|
-
|
|
8265
|
+
i.finalPaperId,
|
|
8266
8266
|
t,
|
|
8267
8267
|
null,
|
|
8268
8268
|
B
|
|
@@ -8278,9 +8278,9 @@ function pg({
|
|
|
8278
8278
|
type: "primary",
|
|
8279
8279
|
ghost: !0,
|
|
8280
8280
|
icon: /* @__PURE__ */ e(Ht, {}),
|
|
8281
|
-
disabled: !
|
|
8282
|
-
onClick: () => a(
|
|
8283
|
-
children:
|
|
8281
|
+
disabled: !i.enrolled,
|
|
8282
|
+
onClick: () => a(i.finalPaperId, t, null),
|
|
8283
|
+
children: i.finalPaperTitle ?? "参加结业考试"
|
|
8284
8284
|
}
|
|
8285
8285
|
)
|
|
8286
8286
|
]
|
|
@@ -8317,7 +8317,7 @@ function pg({
|
|
|
8317
8317
|
J,
|
|
8318
8318
|
{
|
|
8319
8319
|
icon: /* @__PURE__ */ e(Ht, {}),
|
|
8320
|
-
disabled: !
|
|
8320
|
+
disabled: !i.enrolled,
|
|
8321
8321
|
onClick: () => a(
|
|
8322
8322
|
U.paperId,
|
|
8323
8323
|
t,
|
|
@@ -8332,7 +8332,7 @@ function pg({
|
|
|
8332
8332
|
type: "primary",
|
|
8333
8333
|
icon: /* @__PURE__ */ e(na, {}),
|
|
8334
8334
|
loading: te,
|
|
8335
|
-
disabled: !
|
|
8335
|
+
disabled: !i.enrolled || (U == null ? void 0 : U.read),
|
|
8336
8336
|
onClick: () => void le(),
|
|
8337
8337
|
children: U != null && U.read ? "已标记学完" : "标记学完"
|
|
8338
8338
|
}
|
|
@@ -8354,7 +8354,7 @@ function _g({
|
|
|
8354
8354
|
index: s,
|
|
8355
8355
|
active: a,
|
|
8356
8356
|
onSelect: l,
|
|
8357
|
-
onOpenRecord:
|
|
8357
|
+
onOpenRecord: i
|
|
8358
8358
|
}) {
|
|
8359
8359
|
return /* @__PURE__ */ n(
|
|
8360
8360
|
"div",
|
|
@@ -8382,7 +8382,7 @@ function _g({
|
|
|
8382
8382
|
"考试已过",
|
|
8383
8383
|
t.bestScore != null ? ` ${t.bestScore}分` : ""
|
|
8384
8384
|
] }),
|
|
8385
|
-
|
|
8385
|
+
i ? /* @__PURE__ */ e(
|
|
8386
8386
|
J,
|
|
8387
8387
|
{
|
|
8388
8388
|
type: "link",
|
|
@@ -8390,7 +8390,7 @@ function _g({
|
|
|
8390
8390
|
icon: /* @__PURE__ */ e(ts, {}),
|
|
8391
8391
|
style: { padding: 0, height: "auto", fontSize: 12 },
|
|
8392
8392
|
onClick: (c) => {
|
|
8393
|
-
c.stopPropagation(),
|
|
8393
|
+
c.stopPropagation(), i();
|
|
8394
8394
|
},
|
|
8395
8395
|
children: "成绩单"
|
|
8396
8396
|
}
|
|
@@ -8464,24 +8464,24 @@ function bg({
|
|
|
8464
8464
|
courseId: s,
|
|
8465
8465
|
materialId: a,
|
|
8466
8466
|
recordExamId: l,
|
|
8467
|
-
assignedExamId:
|
|
8467
|
+
assignedExamId: i,
|
|
8468
8468
|
onBack: c
|
|
8469
8469
|
}) {
|
|
8470
|
-
const p = ct((b) => b.token), [m, u] =
|
|
8470
|
+
const p = ct((b) => b.token), [m, u] = r("loading"), [d, o] = r(null), [v, x] = r({}), [R, F] = r(!1), [$, O] = r(null), [Q, te] = r(null), Y = ge(!1), I = H(async () => {
|
|
8471
8471
|
u("loading"), O(null), x({}), Y.current = !1;
|
|
8472
8472
|
try {
|
|
8473
|
-
const b = await
|
|
8473
|
+
const b = await zi(
|
|
8474
8474
|
t,
|
|
8475
8475
|
s,
|
|
8476
8476
|
a,
|
|
8477
8477
|
p,
|
|
8478
|
-
|
|
8478
|
+
i
|
|
8479
8479
|
);
|
|
8480
8480
|
o(b), te(b.durationLimitMin ? b.durationLimitMin * 60 : null), u("answering");
|
|
8481
8481
|
} catch {
|
|
8482
8482
|
u("failed");
|
|
8483
8483
|
}
|
|
8484
|
-
}, [t, s, a, p,
|
|
8484
|
+
}, [t, s, a, p, i]);
|
|
8485
8485
|
ee(() => {
|
|
8486
8486
|
if (l) {
|
|
8487
8487
|
u("loading"), Na(l, p).then((b) => {
|
|
@@ -8496,12 +8496,12 @@ function bg({
|
|
|
8496
8496
|
if (!(!d || R)) {
|
|
8497
8497
|
F(!0);
|
|
8498
8498
|
try {
|
|
8499
|
-
const L = await
|
|
8499
|
+
const L = await Wi(
|
|
8500
8500
|
{
|
|
8501
8501
|
paperId: t,
|
|
8502
8502
|
courseId: s ?? null,
|
|
8503
8503
|
materialId: a ?? null,
|
|
8504
|
-
examId:
|
|
8504
|
+
examId: i ?? null,
|
|
8505
8505
|
answers: d.questions.map((X) => ({
|
|
8506
8506
|
questionId: X.questionId,
|
|
8507
8507
|
answer: v[X.questionId] ?? ""
|
|
@@ -8523,7 +8523,7 @@ function bg({
|
|
|
8523
8523
|
s,
|
|
8524
8524
|
a,
|
|
8525
8525
|
p,
|
|
8526
|
-
|
|
8526
|
+
i
|
|
8527
8527
|
]);
|
|
8528
8528
|
ee(() => {
|
|
8529
8529
|
if (m !== "answering" || Q == null) return;
|
|
@@ -8570,7 +8570,7 @@ function bg({
|
|
|
8570
8570
|
/* @__PURE__ */ e(J, { onClick: c, children: "返回" })
|
|
8571
8571
|
] });
|
|
8572
8572
|
if (m === "result" && $) {
|
|
8573
|
-
const b = !l && !
|
|
8573
|
+
const b = !l && !i && (!d || d.retryLimit == null || (d.retryCount ?? 0) + 1 < d.retryLimit);
|
|
8574
8574
|
return /* @__PURE__ */ e(
|
|
8575
8575
|
Ng,
|
|
8576
8576
|
{
|
|
@@ -8679,7 +8679,7 @@ function vg({
|
|
|
8679
8679
|
index: s,
|
|
8680
8680
|
value: a,
|
|
8681
8681
|
onPick: l,
|
|
8682
|
-
onToggle:
|
|
8682
|
+
onToggle: i,
|
|
8683
8683
|
onWrite: c
|
|
8684
8684
|
}) {
|
|
8685
8685
|
const p = t.type === "FREE" ? [] : gg(t.options);
|
|
@@ -8699,7 +8699,7 @@ function vg({
|
|
|
8699
8699
|
"div",
|
|
8700
8700
|
{
|
|
8701
8701
|
className: `${E.optionRow} ${u ? E.optionRowSelected : ""}`,
|
|
8702
|
-
onClick: () => t.type === "MULTI" ?
|
|
8702
|
+
onClick: () => t.type === "MULTI" ? i(m.key) : l(m.key),
|
|
8703
8703
|
children: [
|
|
8704
8704
|
/* @__PURE__ */ n(
|
|
8705
8705
|
"span",
|
|
@@ -8735,7 +8735,7 @@ function Ng({
|
|
|
8735
8735
|
onBack: s,
|
|
8736
8736
|
onRetry: a
|
|
8737
8737
|
}) {
|
|
8738
|
-
const l = t.status === "GRADED",
|
|
8738
|
+
const l = t.status === "GRADED", i = l ? t.totalScore : t.objectiveScore;
|
|
8739
8739
|
return /* @__PURE__ */ n("div", { className: E.examWrap, children: [
|
|
8740
8740
|
/* @__PURE__ */ n("div", { className: E.viewHeader, children: [
|
|
8741
8741
|
/* @__PURE__ */ e(J, { type: "text", icon: /* @__PURE__ */ e(Ut, {}), onClick: s }),
|
|
@@ -8743,7 +8743,7 @@ function Ng({
|
|
|
8743
8743
|
] }),
|
|
8744
8744
|
/* @__PURE__ */ n("div", { className: E.examResultCard, children: [
|
|
8745
8745
|
/* @__PURE__ */ n("div", { className: E.examScore, children: [
|
|
8746
|
-
|
|
8746
|
+
i ?? "--",
|
|
8747
8747
|
/* @__PURE__ */ n("span", { style: { fontSize: 16, color: "#999", fontWeight: 400 }, children: [
|
|
8748
8748
|
" ",
|
|
8749
8749
|
"/ ",
|
|
@@ -8871,10 +8871,10 @@ function Ig({
|
|
|
8871
8871
|
onOpenCourse: a
|
|
8872
8872
|
}) {
|
|
8873
8873
|
var I;
|
|
8874
|
-
const l = ct((K) => K.token), [
|
|
8874
|
+
const l = ct((K) => K.token), [i, c] = r(null), [p, m] = r(!0), [u, d] = r(!1), o = H(async () => {
|
|
8875
8875
|
m(!0);
|
|
8876
8876
|
try {
|
|
8877
|
-
c(await
|
|
8877
|
+
c(await Vi(t, l));
|
|
8878
8878
|
} catch {
|
|
8879
8879
|
} finally {
|
|
8880
8880
|
m(!1);
|
|
@@ -8898,7 +8898,7 @@ function Ig({
|
|
|
8898
8898
|
}
|
|
8899
8899
|
a(K.courseId);
|
|
8900
8900
|
}, R = Le(() => {
|
|
8901
|
-
const K = ((
|
|
8901
|
+
const K = ((i == null ? void 0 : i.nodes) ?? []).slice();
|
|
8902
8902
|
K.sort(
|
|
8903
8903
|
(ne, B) => (ne.stage ?? 1) - (B.stage ?? 1) || (ne.sortOrder ?? 0) - (B.sortOrder ?? 0)
|
|
8904
8904
|
);
|
|
@@ -8908,18 +8908,18 @@ function Ig({
|
|
|
8908
8908
|
U ? U.nodes.push(ne) : W.push({ stage: B, nodes: [ne] });
|
|
8909
8909
|
}
|
|
8910
8910
|
return W;
|
|
8911
|
-
}, [
|
|
8911
|
+
}, [i]);
|
|
8912
8912
|
if (p)
|
|
8913
8913
|
return /* @__PURE__ */ e("div", { style: { textAlign: "center", padding: "80px 0" }, children: /* @__PURE__ */ e(Rt, {}) });
|
|
8914
|
-
if (!
|
|
8914
|
+
if (!i)
|
|
8915
8915
|
return /* @__PURE__ */ e("div", { style: { textAlign: "center", padding: "60px 0", color: "#999" }, children: "路径不存在或已下线" });
|
|
8916
|
-
const F =
|
|
8916
|
+
const F = i.totalCount ?? 0, $ = i.doneCount ?? 0, O = F > 0 ? Math.round($ / F * 100) : 0, Q = i.renderTemplate === "MAP", te = R.length > 1;
|
|
8917
8917
|
let Y = 0;
|
|
8918
8918
|
return /* @__PURE__ */ n("div", { children: [
|
|
8919
8919
|
/* @__PURE__ */ n("div", { className: E.viewHeader, children: [
|
|
8920
8920
|
/* @__PURE__ */ e(J, { type: "text", icon: /* @__PURE__ */ e(Ut, {}), onClick: s }),
|
|
8921
|
-
/* @__PURE__ */ e("span", { className: E.viewTitle, children:
|
|
8922
|
-
|
|
8921
|
+
/* @__PURE__ */ e("span", { className: E.viewTitle, children: i.title }),
|
|
8922
|
+
i.pathStatus === 1 ? /* @__PURE__ */ e(de, { color: "success", icon: /* @__PURE__ */ e(zt, {}), children: "已完成" }) : null,
|
|
8923
8923
|
/* @__PURE__ */ n("div", { style: { marginLeft: "auto", width: 180 }, children: [
|
|
8924
8924
|
/* @__PURE__ */ e(on, { percent: O, size: "small" }),
|
|
8925
8925
|
/* @__PURE__ */ n("div", { className: E.viewSub, style: { textAlign: "right" }, children: [
|
|
@@ -8936,20 +8936,20 @@ function Ig({
|
|
|
8936
8936
|
className: E.viewSub,
|
|
8937
8937
|
style: { marginBottom: 12, lineHeight: 1.8 },
|
|
8938
8938
|
children: [
|
|
8939
|
-
|
|
8939
|
+
i.description ? /* @__PURE__ */ e("div", { children: i.description }) : null,
|
|
8940
8940
|
/* @__PURE__ */ n("div", { children: [
|
|
8941
8941
|
"解锁规则:",
|
|
8942
|
-
Cg[
|
|
8943
|
-
(I =
|
|
8942
|
+
Cg[i.unlockRule ?? "SEQUENTIAL"] ?? i.unlockRule,
|
|
8943
|
+
(I = i.rewardNames) != null && I.length ? /* @__PURE__ */ n("span", { style: { marginLeft: 12, color: "#d48806" }, children: [
|
|
8944
8944
|
/* @__PURE__ */ e(ns, {}),
|
|
8945
8945
|
" 完成可得:",
|
|
8946
|
-
|
|
8946
|
+
i.rewardNames.join("、")
|
|
8947
8947
|
] }) : null
|
|
8948
8948
|
] })
|
|
8949
8949
|
]
|
|
8950
8950
|
}
|
|
8951
8951
|
),
|
|
8952
|
-
!
|
|
8952
|
+
!i.joined && /* @__PURE__ */ n(
|
|
8953
8953
|
"div",
|
|
8954
8954
|
{
|
|
8955
8955
|
style: {
|
|
@@ -9042,11 +9042,11 @@ const Ps = {
|
|
|
9042
9042
|
MAP: "地图"
|
|
9043
9043
|
};
|
|
9044
9044
|
function Rk() {
|
|
9045
|
-
const [t, s] =
|
|
9045
|
+
const [t, s] = r([
|
|
9046
9046
|
{ type: "tabs", sub: "my-paths" }
|
|
9047
9047
|
]), a = t[t.length - 1], l = H((p) => {
|
|
9048
9048
|
s((m) => [...m, p]), requestAnimationFrame(() => window.scrollTo(0, 0));
|
|
9049
|
-
}, []),
|
|
9049
|
+
}, []), i = H(() => {
|
|
9050
9050
|
s((p) => p.length > 1 ? p.slice(0, -1) : p);
|
|
9051
9051
|
}, []), c = H((p, m) => {
|
|
9052
9052
|
s((u) => u[u.length - 1].type === "tabs" ? [...u.slice(0, -1), { type: "tabs", sub: p }, m] : [...u, m]), requestAnimationFrame(() => window.scrollTo(0, 0));
|
|
@@ -9055,14 +9055,14 @@ function Rk() {
|
|
|
9055
9055
|
pg,
|
|
9056
9056
|
{
|
|
9057
9057
|
courseId: a.courseId,
|
|
9058
|
-
onBack:
|
|
9058
|
+
onBack: i,
|
|
9059
9059
|
onOpenExam: (p, m, u, d) => l({ type: "exam", paperId: p, courseId: m, materialId: u, recordExamId: d })
|
|
9060
9060
|
}
|
|
9061
9061
|
) }) : a.type === "path-learn" ? /* @__PURE__ */ e("div", { className: E.tabWrap, children: /* @__PURE__ */ e(
|
|
9062
9062
|
Ig,
|
|
9063
9063
|
{
|
|
9064
9064
|
pathId: a.pathId,
|
|
9065
|
-
onBack:
|
|
9065
|
+
onBack: i,
|
|
9066
9066
|
onOpenCourse: (p) => l({ type: "course-learn", courseId: p })
|
|
9067
9067
|
}
|
|
9068
9068
|
) }) : a.type === "exam" ? /* @__PURE__ */ e("div", { className: E.tabWrap, children: /* @__PURE__ */ e(
|
|
@@ -9073,7 +9073,7 @@ function Rk() {
|
|
|
9073
9073
|
materialId: a.materialId ?? null,
|
|
9074
9074
|
recordExamId: a.recordExamId ?? null,
|
|
9075
9075
|
assignedExamId: a.assignedExamId ?? null,
|
|
9076
|
-
onBack:
|
|
9076
|
+
onBack: i
|
|
9077
9077
|
}
|
|
9078
9078
|
) }) : /* @__PURE__ */ e(
|
|
9079
9079
|
Bg,
|
|
@@ -9097,8 +9097,8 @@ function Bg({
|
|
|
9097
9097
|
onPush: s,
|
|
9098
9098
|
onPushExam: a
|
|
9099
9099
|
}) {
|
|
9100
|
-
const [l,
|
|
9101
|
-
return ee(() =>
|
|
9100
|
+
const [l, i] = r(t);
|
|
9101
|
+
return ee(() => i(t), [t]), /* @__PURE__ */ n("div", { className: E.tabWrap, children: [
|
|
9102
9102
|
/* @__PURE__ */ n("div", { className: E.viewHeader, children: [
|
|
9103
9103
|
/* @__PURE__ */ e("span", { className: E.viewTitle, children: "培训中心" }),
|
|
9104
9104
|
/* @__PURE__ */ e("span", { className: E.viewSub, children: "课程学习 · 考试认证 · 荣耀收集" })
|
|
@@ -9116,7 +9116,7 @@ function Bg({
|
|
|
9116
9116
|
"button",
|
|
9117
9117
|
{
|
|
9118
9118
|
type: "button",
|
|
9119
|
-
onClick: () =>
|
|
9119
|
+
onClick: () => i(c.key),
|
|
9120
9120
|
style: {
|
|
9121
9121
|
border: "none",
|
|
9122
9122
|
background: "transparent",
|
|
@@ -9138,14 +9138,14 @@ function Bg({
|
|
|
9138
9138
|
Lg,
|
|
9139
9139
|
{
|
|
9140
9140
|
onOpenPath: (c) => s({ type: "path-learn", pathId: c }),
|
|
9141
|
-
onGotoOverview: () =>
|
|
9141
|
+
onGotoOverview: () => i("path-overview")
|
|
9142
9142
|
}
|
|
9143
9143
|
),
|
|
9144
9144
|
l === "my-courses" && /* @__PURE__ */ e(
|
|
9145
9145
|
Ag,
|
|
9146
9146
|
{
|
|
9147
9147
|
onOpenCourse: (c) => s({ type: "course-learn", courseId: c }),
|
|
9148
|
-
onGotoOverview: () =>
|
|
9148
|
+
onGotoOverview: () => i("course-overview")
|
|
9149
9149
|
}
|
|
9150
9150
|
),
|
|
9151
9151
|
l === "my-exams" && /* @__PURE__ */ e(
|
|
@@ -9180,10 +9180,10 @@ function Lg({
|
|
|
9180
9180
|
onOpenPath: t,
|
|
9181
9181
|
onGotoOverview: s
|
|
9182
9182
|
}) {
|
|
9183
|
-
const a = ct((u) => u.token), [l,
|
|
9183
|
+
const a = ct((u) => u.token), [l, i] = r([]), [c, p] = r(!0), m = H(async () => {
|
|
9184
9184
|
p(!0);
|
|
9185
9185
|
try {
|
|
9186
|
-
|
|
9186
|
+
i(await Ki(a));
|
|
9187
9187
|
} catch {
|
|
9188
9188
|
} finally {
|
|
9189
9189
|
p(!1);
|
|
@@ -9227,10 +9227,10 @@ function Ag({
|
|
|
9227
9227
|
onOpenCourse: t,
|
|
9228
9228
|
onGotoOverview: s
|
|
9229
9229
|
}) {
|
|
9230
|
-
const a = ct((u) => u.token), [l,
|
|
9230
|
+
const a = ct((u) => u.token), [l, i] = r([]), [c, p] = r(!0), m = H(async () => {
|
|
9231
9231
|
p(!0);
|
|
9232
9232
|
try {
|
|
9233
|
-
|
|
9233
|
+
i(await Ji(a));
|
|
9234
9234
|
} catch {
|
|
9235
9235
|
} finally {
|
|
9236
9236
|
p(!1);
|
|
@@ -9270,13 +9270,13 @@ function Ag({
|
|
|
9270
9270
|
}) });
|
|
9271
9271
|
}
|
|
9272
9272
|
function Rg() {
|
|
9273
|
-
const t = ct((m) => m.token), [s, a] =
|
|
9274
|
-
|
|
9273
|
+
const t = ct((m) => m.token), [s, a] = r([]), [l, i] = r(!0), c = H(async () => {
|
|
9274
|
+
i(!0);
|
|
9275
9275
|
try {
|
|
9276
|
-
a(await
|
|
9276
|
+
a(await Yi(t));
|
|
9277
9277
|
} catch {
|
|
9278
9278
|
} finally {
|
|
9279
|
-
|
|
9279
|
+
i(!1);
|
|
9280
9280
|
}
|
|
9281
9281
|
}, [t]);
|
|
9282
9282
|
if (ee(() => {
|
|
@@ -9292,7 +9292,7 @@ function Rg() {
|
|
|
9292
9292
|
);
|
|
9293
9293
|
const p = async (m) => {
|
|
9294
9294
|
try {
|
|
9295
|
-
await
|
|
9295
|
+
await Zi(m, t), Ce.success("已提交兑换申请,等待运营确认发放"), c();
|
|
9296
9296
|
} catch {
|
|
9297
9297
|
}
|
|
9298
9298
|
};
|
|
@@ -9337,7 +9337,7 @@ const $g = {
|
|
|
9337
9337
|
function Dg({
|
|
9338
9338
|
onOpenExam: t
|
|
9339
9339
|
}) {
|
|
9340
|
-
const s = ct((u) => u.token), [a, l] =
|
|
9340
|
+
const s = ct((u) => u.token), [a, l] = r([]), [i, c] = r(!0), p = H(async () => {
|
|
9341
9341
|
c(!0);
|
|
9342
9342
|
try {
|
|
9343
9343
|
l(await Ts(null, s));
|
|
@@ -9348,7 +9348,7 @@ function Dg({
|
|
|
9348
9348
|
}, [s]);
|
|
9349
9349
|
if (ee(() => {
|
|
9350
9350
|
p();
|
|
9351
|
-
}, [p]),
|
|
9351
|
+
}, [p]), i) return /* @__PURE__ */ e(cn, {});
|
|
9352
9352
|
if (a.length === 0)
|
|
9353
9353
|
return /* @__PURE__ */ e(
|
|
9354
9354
|
gt,
|
|
@@ -9429,10 +9429,10 @@ function Dg({
|
|
|
9429
9429
|
function Mg({
|
|
9430
9430
|
onOpenPath: t
|
|
9431
9431
|
}) {
|
|
9432
|
-
const s = ct((o) => o.token), [a, l] =
|
|
9432
|
+
const s = ct((o) => o.token), [a, l] = r([]), [i, c] = r(!0), [p, m] = r(null), u = H(async () => {
|
|
9433
9433
|
c(!0);
|
|
9434
9434
|
try {
|
|
9435
|
-
l(await
|
|
9435
|
+
l(await Qi(s));
|
|
9436
9436
|
} catch {
|
|
9437
9437
|
} finally {
|
|
9438
9438
|
c(!1);
|
|
@@ -9440,7 +9440,7 @@ function Mg({
|
|
|
9440
9440
|
}, [s]);
|
|
9441
9441
|
if (ee(() => {
|
|
9442
9442
|
u();
|
|
9443
|
-
}, [u]),
|
|
9443
|
+
}, [u]), i) return /* @__PURE__ */ e(cn, {});
|
|
9444
9444
|
if (a.length === 0)
|
|
9445
9445
|
return /* @__PURE__ */ e(gt, { description: "暂无上线的路径,敬请期待", style: { marginTop: 60 } });
|
|
9446
9446
|
const d = async (o) => {
|
|
@@ -9518,10 +9518,10 @@ function Mg({
|
|
|
9518
9518
|
function Eg({
|
|
9519
9519
|
onOpenCourse: t
|
|
9520
9520
|
}) {
|
|
9521
|
-
const s = ct((o) => o.token), [a, l] =
|
|
9521
|
+
const s = ct((o) => o.token), [a, l] = r([]), [i, c] = r(!0), [p, m] = r(null), u = H(async () => {
|
|
9522
9522
|
c(!0);
|
|
9523
9523
|
try {
|
|
9524
|
-
l(await
|
|
9524
|
+
l(await Xi(s));
|
|
9525
9525
|
} catch {
|
|
9526
9526
|
} finally {
|
|
9527
9527
|
c(!1);
|
|
@@ -9529,7 +9529,7 @@ function Eg({
|
|
|
9529
9529
|
}, [s]);
|
|
9530
9530
|
if (ee(() => {
|
|
9531
9531
|
u();
|
|
9532
|
-
}, [u]),
|
|
9532
|
+
}, [u]), i) return /* @__PURE__ */ e(cn, {});
|
|
9533
9533
|
if (a.length === 0)
|
|
9534
9534
|
return /* @__PURE__ */ e(gt, { description: "暂无上线课程,敬请期待", style: { marginTop: 60 } });
|
|
9535
9535
|
const d = async (o) => {
|
|
@@ -9665,14 +9665,14 @@ const Zn = {
|
|
|
9665
9665
|
path: ""
|
|
9666
9666
|
};
|
|
9667
9667
|
function $k() {
|
|
9668
|
-
const t = ct((B) => B.currentUser), s = t == null ? void 0 : t.id, [a, l] =
|
|
9668
|
+
const t = ct((B) => B.currentUser), s = t == null ? void 0 : t.id, [a, l] = r([]), [i, c] = r([]), [p, m] = r(!1), [u, d] = r(!1), [o, v] = r(Zn), [x, R] = r(!1), [F, $] = r(null);
|
|
9669
9669
|
ee(() => {
|
|
9670
9670
|
l(ly(s));
|
|
9671
9671
|
}, [s]);
|
|
9672
9672
|
const O = H(async () => {
|
|
9673
9673
|
m(!0);
|
|
9674
9674
|
try {
|
|
9675
|
-
const B = await
|
|
9675
|
+
const B = await Si();
|
|
9676
9676
|
c(Array.isArray(B) ? B : []);
|
|
9677
9677
|
} catch (B) {
|
|
9678
9678
|
console.warn("[WebIdeTab] fetch instances failed", B), c([]);
|
|
@@ -9684,7 +9684,7 @@ function $k() {
|
|
|
9684
9684
|
O();
|
|
9685
9685
|
}, [O]);
|
|
9686
9686
|
const Q = H((B) => {
|
|
9687
|
-
const U =
|
|
9687
|
+
const U = Ti(B);
|
|
9688
9688
|
window.open(U, "_blank", "noopener,noreferrer");
|
|
9689
9689
|
}, []), te = H((B) => {
|
|
9690
9690
|
!B.machineIp || !B.port || window.open(
|
|
@@ -9737,7 +9737,7 @@ function $k() {
|
|
|
9737
9737
|
async (B) => {
|
|
9738
9738
|
$(B.id);
|
|
9739
9739
|
try {
|
|
9740
|
-
await
|
|
9740
|
+
await Ii(B.id), Ce.success("实例已停止"), O();
|
|
9741
9741
|
} catch (U) {
|
|
9742
9742
|
Ce.error(U instanceof Error ? U.message : "停止失败");
|
|
9743
9743
|
} finally {
|
|
@@ -9767,8 +9767,8 @@ function $k() {
|
|
|
9767
9767
|
},
|
|
9768
9768
|
[O]
|
|
9769
9769
|
), ne = Le(
|
|
9770
|
-
() =>
|
|
9771
|
-
[
|
|
9770
|
+
() => i.filter((B) => B.status === 1).length,
|
|
9771
|
+
[i]
|
|
9772
9772
|
);
|
|
9773
9773
|
return /* @__PURE__ */ n("div", { className: xe.root, children: [
|
|
9774
9774
|
/* @__PURE__ */ n("div", { className: xe.section, children: [
|
|
@@ -9829,7 +9829,7 @@ function $k() {
|
|
|
9829
9829
|
/* @__PURE__ */ e("span", { className: xe.sectionTitle, children: "code-server 实例" }),
|
|
9830
9830
|
/* @__PURE__ */ n("span", { className: xe.sectionDesc, children: [
|
|
9831
9831
|
"来自 z-team-webide,共 ",
|
|
9832
|
-
|
|
9832
|
+
i.length,
|
|
9833
9833
|
" 个,运行中 ",
|
|
9834
9834
|
ne,
|
|
9835
9835
|
" 个"
|
|
@@ -9845,20 +9845,20 @@ function $k() {
|
|
|
9845
9845
|
}
|
|
9846
9846
|
)
|
|
9847
9847
|
] }),
|
|
9848
|
-
p &&
|
|
9848
|
+
p && i.length === 0 ? /* @__PURE__ */ e("div", { className: xe.loadingWrap, children: /* @__PURE__ */ e(Rt, {}) }) : i.length === 0 ? /* @__PURE__ */ e(
|
|
9849
9849
|
gt,
|
|
9850
9850
|
{
|
|
9851
9851
|
className: xe.empty,
|
|
9852
9852
|
description: "暂无实例(打开工作空间后会自动出现)"
|
|
9853
9853
|
}
|
|
9854
|
-
) : /* @__PURE__ */ e("div", { className: xe.instanceList, children:
|
|
9854
|
+
) : /* @__PURE__ */ e("div", { className: xe.instanceList, children: i.map((B) => /* @__PURE__ */ n("div", { className: xe.instanceRow, children: [
|
|
9855
9855
|
/* @__PURE__ */ n("div", { className: xe.instanceInfo, children: [
|
|
9856
9856
|
/* @__PURE__ */ e(
|
|
9857
9857
|
"span",
|
|
9858
9858
|
{
|
|
9859
9859
|
className: xe.instanceName,
|
|
9860
9860
|
title: B.name || B.workspaceDir,
|
|
9861
|
-
children: B.name ||
|
|
9861
|
+
children: B.name || iy(B.workspaceDir) || `实例 #${B.id}`
|
|
9862
9862
|
}
|
|
9863
9863
|
),
|
|
9864
9864
|
/* @__PURE__ */ e(de, { color: B.status === 1 ? "green" : "default", children: B.status === 1 ? "运行中" : "已停止" }),
|
|
@@ -10005,13 +10005,13 @@ function Ua(t) {
|
|
|
10005
10005
|
}
|
|
10006
10006
|
return t.path || "—";
|
|
10007
10007
|
}
|
|
10008
|
-
function
|
|
10008
|
+
function iy(t) {
|
|
10009
10009
|
if (!t) return "";
|
|
10010
10010
|
const s = t.replace(/\/+$/, ""), a = s.lastIndexOf("/");
|
|
10011
10011
|
return a >= 0 ? s.substring(a + 1) : s;
|
|
10012
10012
|
}
|
|
10013
|
-
const
|
|
10014
|
-
host:
|
|
10013
|
+
const ry = "_host_b3oa5_1", oy = "_header_b3oa5_11", cy = "_headerMain_b3oa5_18", dy = "_backBtn_b3oa5_25", uy = "_title_b3oa5_45", my = "_subtitle_b3oa5_52", hy = "_searchWrap_b3oa5_58", py = "_searchClear_b3oa5_74", _y = "_searchIcon_b3oa5_96", fy = "_searchInput_b3oa5_101", gy = "_dimBar_b3oa5_115", yy = "_dimBarLabel_b3oa5_122", by = "_dimChip_b3oa5_127", vy = "_dimChipActive_b3oa5_145", Ny = "_dimOrder_b3oa5_151", ky = "_dimReset_b3oa5_164", Cy = "_dimSummary_b3oa5_177", wy = "_listHost_b3oa5_184", Sy = "_groupHeader_b3oa5_190", Ty = "_groupCaret_b3oa5_207", Iy = "_groupCaretOpen_b3oa5_214", xy = "_groupLabel_b3oa5_218", By = "_groupCount_b3oa5_224", Ly = "_rowWrap_b3oa5_232", Ay = "_row_b3oa5_232", Ry = "_agentDot_b3oa5_261", $y = "_rowTitle_b3oa5_274", Dy = "_spacePill_b3oa5_284", My = "_rowAgent_b3oa5_300", Ey = "_rowTime_b3oa5_314", Py = "_rowActions_b3oa5_322", Oy = "_rowActionBtn_b3oa5_330", Hy = "_rowActionBtnActive_b3oa5_346", jy = "_rowUpdating_b3oa5_359", Fy = "_menuMask_b3oa5_364", Gy = "_empty_b3oa5_371", qy = "_emptySpinner_b3oa5_381", Uy = "_emptyTitle_b3oa5_385", zy = "_rowSummary_b3oa5_392", we = {
|
|
10014
|
+
host: ry,
|
|
10015
10015
|
header: oy,
|
|
10016
10016
|
headerMain: cy,
|
|
10017
10017
|
backBtn: dy,
|
|
@@ -10069,12 +10069,12 @@ function Ky(t) {
|
|
|
10069
10069
|
if (!s) return ["5", "未知时间"];
|
|
10070
10070
|
const a = new Date(s.replace(" ", "T"));
|
|
10071
10071
|
if (Number.isNaN(a.getTime())) return ["5", "未知时间"];
|
|
10072
|
-
const l = /* @__PURE__ */ new Date(),
|
|
10072
|
+
const l = /* @__PURE__ */ new Date(), i = new Date(
|
|
10073
10073
|
l.getFullYear(),
|
|
10074
10074
|
l.getMonth(),
|
|
10075
10075
|
l.getDate()
|
|
10076
10076
|
).getTime(), c = a.getTime();
|
|
10077
|
-
return c >=
|
|
10077
|
+
return c >= i ? ["1", "今天"] : c >= i - 864e5 ? ["2", "昨天"] : c >= i - 7 * 864e5 ? ["3", "近7天"] : ["4", "更早"];
|
|
10078
10078
|
}
|
|
10079
10079
|
function Dk({
|
|
10080
10080
|
agents: t,
|
|
@@ -10082,7 +10082,7 @@ function Dk({
|
|
|
10082
10082
|
onOpenSession: a,
|
|
10083
10083
|
onBack: l
|
|
10084
10084
|
}) {
|
|
10085
|
-
const [
|
|
10085
|
+
const [i, c] = r([]), [p, m] = r(!0), [u, d] = r(() => {
|
|
10086
10086
|
try {
|
|
10087
10087
|
const T = localStorage.getItem(Wa);
|
|
10088
10088
|
return (T ? JSON.parse(T) : []).filter(
|
|
@@ -10091,9 +10091,9 @@ function Dk({
|
|
|
10091
10091
|
} catch {
|
|
10092
10092
|
return [];
|
|
10093
10093
|
}
|
|
10094
|
-
}), [o, v] =
|
|
10094
|
+
}), [o, v] = r(
|
|
10095
10095
|
/* @__PURE__ */ new Set()
|
|
10096
|
-
), [x, R] =
|
|
10096
|
+
), [x, R] = r(""), [F, $] = r(null), [O, Q] = r(null);
|
|
10097
10097
|
ee(() => {
|
|
10098
10098
|
let T = !0;
|
|
10099
10099
|
return m(!0), Ol(s).then((le) => {
|
|
@@ -10122,9 +10122,9 @@ function Dk({
|
|
|
10122
10122
|
return ae.has(T) ? ae.delete(T) : ae.add(T), ae;
|
|
10123
10123
|
});
|
|
10124
10124
|
}, []), K = Le(() => {
|
|
10125
|
-
const T = x.trim().toLowerCase(), le = T ?
|
|
10125
|
+
const T = x.trim().toLowerCase(), le = T ? i.filter(
|
|
10126
10126
|
(L) => (L.title || "").toLowerCase().includes(T) || (L.summary || "").toLowerCase().includes(T)
|
|
10127
|
-
) :
|
|
10127
|
+
) : i;
|
|
10128
10128
|
if (u.length === 0)
|
|
10129
10129
|
return [{ key: "__all__", label: "", rawKey: "", sessions: le }];
|
|
10130
10130
|
function ae(L, G) {
|
|
@@ -10146,13 +10146,13 @@ function Dk({
|
|
|
10146
10146
|
}
|
|
10147
10147
|
function b(L, G, X) {
|
|
10148
10148
|
if (G.length === 0) return [];
|
|
10149
|
-
const [k, ...S] = G,
|
|
10149
|
+
const [k, ...S] = G, ie = /* @__PURE__ */ new Map();
|
|
10150
10150
|
for (const he of L) {
|
|
10151
10151
|
const [pe, ve] = ae(he, k);
|
|
10152
|
-
|
|
10152
|
+
ie.has(pe) || ie.set(pe, { label: ve, items: [] }), ie.get(pe).items.push(he);
|
|
10153
10153
|
}
|
|
10154
10154
|
const Z = [];
|
|
10155
|
-
for (const [he, { label: pe, items: ve }] of
|
|
10155
|
+
for (const [he, { label: pe, items: ve }] of ie) {
|
|
10156
10156
|
const ye = `${X}::${k}=${he}`;
|
|
10157
10157
|
Z.push({
|
|
10158
10158
|
key: ye,
|
|
@@ -10167,7 +10167,7 @@ function Dk({
|
|
|
10167
10167
|
), Z;
|
|
10168
10168
|
}
|
|
10169
10169
|
return b(le, u, "");
|
|
10170
|
-
}, [
|
|
10170
|
+
}, [i, u, x, te]), W = Le(
|
|
10171
10171
|
() => K.reduce((T, le) => T + le.sessions.length, 0),
|
|
10172
10172
|
[K]
|
|
10173
10173
|
), ne = H(
|
|
@@ -10277,7 +10277,7 @@ function Dk({
|
|
|
10277
10277
|
"aria-expanded": !ae,
|
|
10278
10278
|
children: [
|
|
10279
10279
|
/* @__PURE__ */ e(
|
|
10280
|
-
|
|
10280
|
+
ei,
|
|
10281
10281
|
{
|
|
10282
10282
|
className: `${we.groupCaret} ${ae ? "" : we.groupCaretOpen}`
|
|
10283
10283
|
}
|
|
@@ -10373,10 +10373,10 @@ function Dk({
|
|
|
10373
10373
|
/* @__PURE__ */ e("div", { className: we.listHost, children: p ? /* @__PURE__ */ n("div", { className: we.empty, children: [
|
|
10374
10374
|
/* @__PURE__ */ e(ya, { className: we.emptySpinner }),
|
|
10375
10375
|
/* @__PURE__ */ e("span", { children: "正在加载聊天记录…" })
|
|
10376
|
-
] }) : W === 0 ? /* @__PURE__ */ e("div", { className: we.empty, children: /* @__PURE__ */ e("span", { className: we.emptyTitle, children:
|
|
10376
|
+
] }) : W === 0 ? /* @__PURE__ */ e("div", { className: we.empty, children: /* @__PURE__ */ e("span", { className: we.emptyTitle, children: i.length === 0 ? "还没有会话,去新建任务开始第一段对话吧" : "没有匹配的会话" }) }) : K.map((T) => U(T, 0)) })
|
|
10377
10377
|
] });
|
|
10378
10378
|
}
|
|
10379
|
-
const Jy = "_host_1madr_1", Yy = "_header_1madr_11", Qy = "_title_1madr_17", Xy = "_subtitle_1madr_24", Zy = "_subTabs_1madr_33", eb = "_subTab_1madr_33", tb = "_subTabActive_1madr_65", nb = "_subTabIcon_1madr_71", ab = "_subTabDivider_1madr_81", sb = "_subTabOut_1madr_90", lb = "_subTabPrimary_1madr_109",
|
|
10379
|
+
const Jy = "_host_1madr_1", Yy = "_header_1madr_11", Qy = "_title_1madr_17", Xy = "_subtitle_1madr_24", Zy = "_subTabs_1madr_33", eb = "_subTab_1madr_33", tb = "_subTabActive_1madr_65", nb = "_subTabIcon_1madr_71", ab = "_subTabDivider_1madr_81", sb = "_subTabOut_1madr_90", lb = "_subTabPrimary_1madr_109", ib = "_section_1madr_113", rb = "_sectionHead_1madr_119", ob = "_sectionIcon_1madr_125", cb = "_sectionTitle_1madr_131", db = "_sectionDesc_1madr_137", ub = "_empty_1madr_142", mb = "_agentList_1madr_152", hb = "_agentRow_1madr_161", pb = "_agentDot_1madr_173", _b = "_agentMain_1madr_186", fb = "_agentName_1madr_194", gb = "_sharedBadge_1madr_203", yb = "_agentCode_1madr_212", bb = "_rowBtn_1madr_220", vb = "_rowBtnGhost_1madr_239", Nb = "_createRow_1madr_243", kb = "_createInput_1madr_250", Cb = "_createBtn_1madr_265", wb = "_skillGrid_1madr_285", Sb = "_skillCard_1madr_291", Tb = "_skillHead_1madr_301", Ib = "_skillName_1madr_308", xb = "_skillToggle_1madr_314", Bb = "_skillToggleOn_1madr_337", Lb = "_skillToggling_1madr_345", Ab = "_skillCategory_1madr_350", Rb = "_skillDesc_1madr_359", $b = "_marketToolbar_1madr_369", Db = "_marketSearch_1madr_375", Mb = "_marketSearchIcon_1madr_390", Eb = "_chipRow_1madr_407", Pb = "_chipRowLabel_1madr_414", Ob = "_tagChip_1madr_422", Hb = "_chip_1madr_407", jb = "_chipActive_1madr_444", Fb = "_marketGroups_1madr_451", Gb = "_marketGroup_1madr_451", qb = "_marketGroupHead_1madr_463", Ub = "_marketGroupName_1madr_471", zb = "_marketGroupCount_1madr_477", Wb = "_marketGrid_1madr_482", Vb = "_marketCard_1madr_488", Kb = "_cardHead_1madr_510", Jb = "_cardIcon_1madr_516", Yb = "_cardTitle_1madr_528", Qb = "_cardName_1madr_535", Xb = "_cardCode_1madr_544", Zb = "_cardDesc_1madr_553", ev = "_tagRow_1madr_562", tv = "_tagPill_1madr_568", nv = "_cardSymptom_1madr_578", av = "_cardFoot_1madr_598", sv = "_footTag_1madr_606", lv = "_footMeta_1madr_615", iv = "_detailMask_1madr_625", rv = "_detailPanel_1madr_632", ov = "_detailHead_1madr_650", cv = "_detailTitleWrap_1madr_657", dv = "_detailTitle_1madr_657", uv = "_detailCode_1madr_670", mv = "_detailClose_1madr_676", hv = "_detailMeta_1madr_693", pv = "_metaItem_1madr_699", _v = "_detailSymptoms_1madr_707", fv = "_detailSymptomLabel_1madr_718", gv = "_detailBody_1madr_725", yv = "_detailRefs_1madr_740", bv = "_detailRefsBody_1madr_746", vv = "_detailNote_1madr_761", Nv = "_placeholderGrid_1madr_769", kv = "_placeholderCard_1madr_775", Cv = "_placeholderName_1madr_784", wv = "_placeholderDesc_1madr_790", y = {
|
|
10380
10380
|
host: Jy,
|
|
10381
10381
|
header: Yy,
|
|
10382
10382
|
title: Qy,
|
|
@@ -10388,8 +10388,8 @@ const Jy = "_host_1madr_1", Yy = "_header_1madr_11", Qy = "_title_1madr_17", Xy
|
|
|
10388
10388
|
subTabDivider: ab,
|
|
10389
10389
|
subTabOut: sb,
|
|
10390
10390
|
subTabPrimary: lb,
|
|
10391
|
-
section:
|
|
10392
|
-
sectionHead:
|
|
10391
|
+
section: ib,
|
|
10392
|
+
sectionHead: rb,
|
|
10393
10393
|
sectionIcon: ob,
|
|
10394
10394
|
sectionTitle: cb,
|
|
10395
10395
|
sectionDesc: db,
|
|
@@ -10442,8 +10442,8 @@ const Jy = "_host_1madr_1", Yy = "_header_1madr_11", Qy = "_title_1madr_17", Xy
|
|
|
10442
10442
|
cardFoot: av,
|
|
10443
10443
|
footTag: sv,
|
|
10444
10444
|
footMeta: lv,
|
|
10445
|
-
detailMask:
|
|
10446
|
-
detailPanel:
|
|
10445
|
+
detailMask: iv,
|
|
10446
|
+
detailPanel: rv,
|
|
10447
10447
|
detailHead: ov,
|
|
10448
10448
|
detailTitleWrap: cv,
|
|
10449
10449
|
detailTitle: dv,
|
|
@@ -10472,7 +10472,7 @@ function Mk({
|
|
|
10472
10472
|
loading: s,
|
|
10473
10473
|
skillsAgent: a,
|
|
10474
10474
|
token: l,
|
|
10475
|
-
currentUser:
|
|
10475
|
+
currentUser: i,
|
|
10476
10476
|
lane: c = "cloud",
|
|
10477
10477
|
onChat: p,
|
|
10478
10478
|
onConfig: m,
|
|
@@ -10483,11 +10483,11 @@ function Mk({
|
|
|
10483
10483
|
capTabRequest: x
|
|
10484
10484
|
}) {
|
|
10485
10485
|
var ce;
|
|
10486
|
-
const R = t.filter((_) => !_.isLocal), F = c === "local", [$, O] =
|
|
10486
|
+
const R = t.filter((_) => !_.isLocal), F = c === "local", [$, O] = r("agents");
|
|
10487
10487
|
ee(() => {
|
|
10488
10488
|
x && O(x.tab);
|
|
10489
10489
|
}, [x == null ? void 0 : x.ts, x == null ? void 0 : x.tab]);
|
|
10490
|
-
const [Q, te] =
|
|
10490
|
+
const [Q, te] = r([]), [Y, I] = r(!1), [K, W] = r(null), [ne, B] = r([]), [U, T] = r(!1), [le, ae] = r([]), [b, L] = r(!1), [G, X] = r(""), [k, S] = r(""), [ie, Z] = r(!1), [he, pe] = r(""), [ve, ye] = r(!1), [Se, qe] = r([]), [$e, Ve] = r(!1), [nt, pt] = r(""), [Ke, tt] = r(""), [bt, vt] = r(""), [at, dt] = r(null), [Je, Ye] = r(null), [Ee, je] = r(!1), [g, re] = r(null), [Ne, be] = r(null), [_t, ot] = r(!1);
|
|
10491
10491
|
ee(() => {
|
|
10492
10492
|
const _ = setTimeout(() => vt(Ke.trim()), 300);
|
|
10493
10493
|
return () => clearTimeout(_);
|
|
@@ -10499,7 +10499,7 @@ function Mk({
|
|
|
10499
10499
|
}
|
|
10500
10500
|
Ve(!0), pt("");
|
|
10501
10501
|
try {
|
|
10502
|
-
const _ = await
|
|
10502
|
+
const _ = await er(
|
|
10503
10503
|
{ status: 1, keyword: bt || void 0 },
|
|
10504
10504
|
l
|
|
10505
10505
|
);
|
|
@@ -10529,10 +10529,10 @@ function Mk({
|
|
|
10529
10529
|
group: _,
|
|
10530
10530
|
items: Bt.filter((_e) => kt(_e) === _)
|
|
10531
10531
|
})).filter((_) => _.items.length > 0), Tt = async (_) => {
|
|
10532
|
-
if (
|
|
10532
|
+
if (re(_), be(null), je(!0), !!_.id) {
|
|
10533
10533
|
ot(!0);
|
|
10534
10534
|
try {
|
|
10535
|
-
be(await
|
|
10535
|
+
be(await tr(_.id, l));
|
|
10536
10536
|
} catch {
|
|
10537
10537
|
be(null);
|
|
10538
10538
|
} finally {
|
|
@@ -10543,7 +10543,7 @@ function Mk({
|
|
|
10543
10543
|
if (F) {
|
|
10544
10544
|
L(!0);
|
|
10545
10545
|
try {
|
|
10546
|
-
const _ = await
|
|
10546
|
+
const _ = await ti(null);
|
|
10547
10547
|
ae(Array.isArray(_) ? _ : []);
|
|
10548
10548
|
} catch {
|
|
10549
10549
|
ae([]);
|
|
@@ -10576,7 +10576,7 @@ function Mk({
|
|
|
10576
10576
|
if (F) {
|
|
10577
10577
|
T(!0);
|
|
10578
10578
|
try {
|
|
10579
|
-
const _ = await
|
|
10579
|
+
const _ = await ni();
|
|
10580
10580
|
B(Array.isArray(_) ? _ : []);
|
|
10581
10581
|
} catch {
|
|
10582
10582
|
B([]);
|
|
@@ -10611,7 +10611,7 @@ function Mk({
|
|
|
10611
10611
|
if (!K) {
|
|
10612
10612
|
W(_.skill_code);
|
|
10613
10613
|
try {
|
|
10614
|
-
await
|
|
10614
|
+
await li(_.skill_code, !_.enabled), ae(
|
|
10615
10615
|
(_e) => _e.map(
|
|
10616
10616
|
(me) => me.skill_code === _.skill_code ? { ...me, enabled: !_.enabled } : me
|
|
10617
10617
|
)
|
|
@@ -10623,10 +10623,10 @@ function Mk({
|
|
|
10623
10623
|
}
|
|
10624
10624
|
}, Fe = async () => {
|
|
10625
10625
|
const _ = G.trim();
|
|
10626
|
-
if (!(!_ ||
|
|
10626
|
+
if (!(!_ || ie)) {
|
|
10627
10627
|
Z(!0);
|
|
10628
10628
|
try {
|
|
10629
|
-
await
|
|
10629
|
+
await ii({
|
|
10630
10630
|
name: _,
|
|
10631
10631
|
description: k.trim(),
|
|
10632
10632
|
category: "通用"
|
|
@@ -10642,7 +10642,7 @@ function Mk({
|
|
|
10642
10642
|
ye(!0);
|
|
10643
10643
|
try {
|
|
10644
10644
|
if (F) {
|
|
10645
|
-
await
|
|
10645
|
+
await ri(_), pe(""), await He();
|
|
10646
10646
|
return;
|
|
10647
10647
|
}
|
|
10648
10648
|
const _e = await jl(_, l);
|
|
@@ -10654,7 +10654,7 @@ function Mk({
|
|
|
10654
10654
|
}
|
|
10655
10655
|
}, V = async (_) => {
|
|
10656
10656
|
try {
|
|
10657
|
-
await
|
|
10657
|
+
await oi(_), await He();
|
|
10658
10658
|
} catch {
|
|
10659
10659
|
}
|
|
10660
10660
|
};
|
|
@@ -10690,12 +10690,12 @@ function Mk({
|
|
|
10690
10690
|
title: "打开聊天记录(离开本页)",
|
|
10691
10691
|
onClick: v,
|
|
10692
10692
|
children: [
|
|
10693
|
-
/* @__PURE__ */ e("span", { className: y.subTabIcon, children: /* @__PURE__ */ e(
|
|
10693
|
+
/* @__PURE__ */ e("span", { className: y.subTabIcon, children: /* @__PURE__ */ e(ai, {}) }),
|
|
10694
10694
|
"聊天记录"
|
|
10695
10695
|
]
|
|
10696
10696
|
}
|
|
10697
10697
|
),
|
|
10698
|
-
|
|
10698
|
+
si(i).map((_) => /* @__PURE__ */ n(
|
|
10699
10699
|
"button",
|
|
10700
10700
|
{
|
|
10701
10701
|
type: "button",
|
|
@@ -11013,7 +11013,7 @@ function Mk({
|
|
|
11013
11013
|
{
|
|
11014
11014
|
type: "button",
|
|
11015
11015
|
className: y.createBtn,
|
|
11016
|
-
disabled: !G.trim() ||
|
|
11016
|
+
disabled: !G.trim() || ie,
|
|
11017
11017
|
onClick: () => void Fe(),
|
|
11018
11018
|
children: [
|
|
11019
11019
|
/* @__PURE__ */ e(ba, {}),
|
|
@@ -11142,7 +11142,7 @@ async function Qt(t, s) {
|
|
|
11142
11142
|
async function Tv(t) {
|
|
11143
11143
|
const a = await Yt("/v1/local/schedules");
|
|
11144
11144
|
if (!a.ok) throw new Error(await Qt(a, "获取本地定时任务失败"));
|
|
11145
|
-
return ((await a.json().catch(() => ({}))).tasks ?? []).map((
|
|
11145
|
+
return ((await a.json().catch(() => ({}))).tasks ?? []).map((i) => Pn(i));
|
|
11146
11146
|
}
|
|
11147
11147
|
async function Iv(t) {
|
|
11148
11148
|
const s = await Yt("/v1/local/schedules", {
|
|
@@ -11193,18 +11193,18 @@ async function Rv(t = 1, s = 20) {
|
|
|
11193
11193
|
a.set("page", String(t)), a.set("size", String(s));
|
|
11194
11194
|
const l = await Yt(`/v1/local/schedules/runs?${a.toString()}`);
|
|
11195
11195
|
if (!l.ok) throw new Error(await Qt(l, "获取本地执行记录失败"));
|
|
11196
|
-
const
|
|
11196
|
+
const i = await l.json().catch(() => ({}));
|
|
11197
11197
|
return {
|
|
11198
|
-
items: (
|
|
11198
|
+
items: (i.items ?? []).map(
|
|
11199
11199
|
(c) => js(c)
|
|
11200
11200
|
),
|
|
11201
|
-
total: Number(
|
|
11202
|
-
page: Number(
|
|
11203
|
-
size: Number(
|
|
11204
|
-
totalPages: Number(
|
|
11201
|
+
total: Number(i.total ?? 0),
|
|
11202
|
+
page: Number(i.page ?? t),
|
|
11203
|
+
size: Number(i.size ?? s),
|
|
11204
|
+
totalPages: Number(i.total_pages ?? 0)
|
|
11205
11205
|
};
|
|
11206
11206
|
}
|
|
11207
|
-
const $v = "_host_16scq_1", Dv = "_header_16scq_11", Mv = "_title_16scq_18", Ev = "_subtitle_16scq_25", Pv = "_headerActions_16scq_31", Ov = "_refreshBtn_16scq_38", Hv = "_newBtn_16scq_39", jv = "_laneTabs_16scq_70", Fv = "_laneTab_16scq_70", Gv = "_laneTabActive_16scq_109", qv = "_laneIcon_16scq_118", Uv = "_offlineBanner_16scq_123", zv = "_statusDot_16scq_133", Wv = "_bannerText_16scq_141", Vv = "_bannerTitle_16scq_148", Kv = "_bannerDesc_16scq_154", Jv = "_errorBar_16scq_159", Yv = "_sectionHead_16scq_170", Qv = "_sectionTitle_16scq_177", Xv = "_sectionCount_16scq_183", Zv = "_taskList_16scq_189", eN = "_taskRow_16scq_195", tN = "_taskRowOff_16scq_205", nN = "_taskMain_16scq_205", aN = "_toggle_16scq_209", sN = "_toggleOn_16scq_234", lN = "_taskName_16scq_250",
|
|
11207
|
+
const $v = "_host_16scq_1", Dv = "_header_16scq_11", Mv = "_title_16scq_18", Ev = "_subtitle_16scq_25", Pv = "_headerActions_16scq_31", Ov = "_refreshBtn_16scq_38", Hv = "_newBtn_16scq_39", jv = "_laneTabs_16scq_70", Fv = "_laneTab_16scq_70", Gv = "_laneTabActive_16scq_109", qv = "_laneIcon_16scq_118", Uv = "_offlineBanner_16scq_123", zv = "_statusDot_16scq_133", Wv = "_bannerText_16scq_141", Vv = "_bannerTitle_16scq_148", Kv = "_bannerDesc_16scq_154", Jv = "_errorBar_16scq_159", Yv = "_sectionHead_16scq_170", Qv = "_sectionTitle_16scq_177", Xv = "_sectionCount_16scq_183", Zv = "_taskList_16scq_189", eN = "_taskRow_16scq_195", tN = "_taskRowOff_16scq_205", nN = "_taskMain_16scq_205", aN = "_toggle_16scq_209", sN = "_toggleOn_16scq_234", lN = "_taskName_16scq_250", iN = "_taskDesc_16scq_256", rN = "_taskMeta_16scq_264", oN = "_metaLine_16scq_273", cN = "_metaNext_16scq_281", dN = "_taskActions_16scq_290", uN = "_iconBtn_16scq_297", mN = "_iconBtnDanger_16scq_324", hN = "_recordList_16scq_330", pN = "_recordRow_16scq_336", _N = "_runStatus_16scq_346", fN = "_run_success_16scq_356", gN = "_run_failed_16scq_361", yN = "_run_running_16scq_366", bN = "_recordMain_16scq_371", vN = "_recordTask_16scq_379", NN = "_recordSummary_16scq_385", kN = "_recordMeta_16scq_393", CN = "_empty_16scq_404", wN = "_emptyBtn_16scq_416", SN = "_modalMask_16scq_436", TN = "_dirMask_16scq_446", IN = "_modal_16scq_436", xN = "_modalHead_16scq_461", BN = "_modalTitle_16scq_468", LN = "_laneBadge_16scq_474", AN = "_modalClose_16scq_482", RN = "_formBody_16scq_500", $N = "_field_16scq_510", DN = "_fieldLabel_16scq_516", MN = "_input_16scq_522", EN = "_textarea_16scq_523", PN = "_select_16scq_524", ON = "_workdirRow_16scq_555", HN = "_pickBtn_16scq_566", jN = "_clearBtn_16scq_586", FN = "_presets_16scq_604", GN = "_preset_16scq_604", qN = "_presetActive_16scq_629", UN = "_hint_16scq_636", zN = "_formError_16scq_641", WN = "_modalFoot_16scq_650", VN = "_cancelBtn_16scq_658", KN = "_saveBtn_16scq_659", JN = "_dirModal_16scq_686", YN = "_dirBar_16scq_697", QN = "_dirUp_16scq_705", XN = "_dirPathText_16scq_724", ZN = "_dirList_16scq_733", ek = "_dirItem_16scq_740", tk = "_dirEmpty_16scq_765", nk = "_dirError_16scq_775", D = {
|
|
11208
11208
|
host: $v,
|
|
11209
11209
|
header: Dv,
|
|
11210
11210
|
title: Mv,
|
|
@@ -11232,8 +11232,8 @@ const $v = "_host_16scq_1", Dv = "_header_16scq_11", Mv = "_title_16scq_18", Ev
|
|
|
11232
11232
|
toggle: aN,
|
|
11233
11233
|
toggleOn: sN,
|
|
11234
11234
|
taskName: lN,
|
|
11235
|
-
taskDesc:
|
|
11236
|
-
taskMeta:
|
|
11235
|
+
taskDesc: iN,
|
|
11236
|
+
taskMeta: rN,
|
|
11237
11237
|
metaLine: oN,
|
|
11238
11238
|
metaNext: cN,
|
|
11239
11239
|
taskActions: dN,
|
|
@@ -11313,22 +11313,22 @@ const $v = "_host_16scq_1", Dv = "_header_16scq_11", Mv = "_title_16scq_18", Ev
|
|
|
11313
11313
|
};
|
|
11314
11314
|
function Ja(t) {
|
|
11315
11315
|
const s = t.trim().split(/\s+/);
|
|
11316
|
-
let a = "0", l,
|
|
11316
|
+
let a = "0", l, i, c, p, m;
|
|
11317
11317
|
if (s.length === 6)
|
|
11318
|
-
[a, l,
|
|
11318
|
+
[a, l, i, c, p, m] = s;
|
|
11319
11319
|
else if (s.length === 5)
|
|
11320
|
-
[l,
|
|
11320
|
+
[l, i, c, p, m] = s;
|
|
11321
11321
|
else
|
|
11322
11322
|
return t;
|
|
11323
11323
|
if (p !== "*" || c !== "*" && c !== "?") return t;
|
|
11324
11324
|
m === "?" && (m = "*");
|
|
11325
11325
|
const u = (x) => x.padStart(2, "0"), d = /^\d+$/.test(a) && a !== "0" ? `:${u(a)}` : "";
|
|
11326
|
-
if (l === "*" &&
|
|
11326
|
+
if (l === "*" && i === "*")
|
|
11327
11327
|
return /^\d+$/.test(a) && a !== "0" ? `每分钟第 ${a} 秒` : "每分钟";
|
|
11328
|
-
if (
|
|
11328
|
+
if (i === "*")
|
|
11329
11329
|
return /^\d+$/.test(l) ? `每小时第 ${l} 分` : t;
|
|
11330
|
-
if (!/^\d+$/.test(l) || !/^\d+$/.test(
|
|
11331
|
-
const o = `${u(
|
|
11330
|
+
if (!/^\d+$/.test(l) || !/^\d+$/.test(i)) return t;
|
|
11331
|
+
const o = `${u(i)}:${u(l)}${d}`;
|
|
11332
11332
|
if (m === "*") return `每天 ${o}`;
|
|
11333
11333
|
if (m === "1-5") return `工作日 ${o}`;
|
|
11334
11334
|
const v = sk[m.toUpperCase()];
|
|
@@ -11358,7 +11358,7 @@ function lk(t) {
|
|
|
11358
11358
|
function Jt(t, s) {
|
|
11359
11359
|
return t instanceof Error && t.message ? t.message : s;
|
|
11360
11360
|
}
|
|
11361
|
-
const
|
|
11361
|
+
const ik = {
|
|
11362
11362
|
success: "成功",
|
|
11363
11363
|
failed: "失败",
|
|
11364
11364
|
running: "进行中"
|
|
@@ -11368,30 +11368,30 @@ function Ek({
|
|
|
11368
11368
|
agents: s = [],
|
|
11369
11369
|
token: a = "",
|
|
11370
11370
|
localAgents: l = [],
|
|
11371
|
-
defaultLane:
|
|
11371
|
+
defaultLane: i = "local",
|
|
11372
11372
|
defaultAgentId: c = null
|
|
11373
11373
|
}) {
|
|
11374
|
-
const [p, m] = i
|
|
11375
|
-
var
|
|
11376
|
-
return ((
|
|
11374
|
+
const [p, m] = r(i), [u, d] = r([]), [o, v] = r([]), [x, R] = r([]), [F, $] = r([]), [O, Q] = r(!1), [te, Y] = r(null), [I, K] = r(null), [W, ne] = r(!1), [B, U] = r(null), [T, le] = r(null), [ae, b] = r(!1), [L, G] = r(null), [X, k] = r(!1), [S, ie] = r(null), Z = Le(() => {
|
|
11375
|
+
var re;
|
|
11376
|
+
return ((re = l.find((Ne) => Ne.type === "jar") ?? l[0]) == null ? void 0 : re.id) ?? "";
|
|
11377
11377
|
}, [l]), he = Le(() => {
|
|
11378
|
-
var
|
|
11378
|
+
var re;
|
|
11379
11379
|
const g = s.find((Ne) => Ne.id === c);
|
|
11380
|
-
return String((g == null ? void 0 : g.id) ?? ((
|
|
11380
|
+
return String((g == null ? void 0 : g.id) ?? ((re = s[0]) == null ? void 0 : re.id) ?? "");
|
|
11381
11381
|
}, [s, c]);
|
|
11382
11382
|
ee(() => {
|
|
11383
|
-
m(
|
|
11384
|
-
}, [
|
|
11383
|
+
m(i);
|
|
11384
|
+
}, [i]);
|
|
11385
11385
|
const pe = H(async (g = !1) => {
|
|
11386
11386
|
g || Q(!0), Y(null);
|
|
11387
11387
|
try {
|
|
11388
|
-
const [
|
|
11388
|
+
const [re, Ne] = await Promise.all([
|
|
11389
11389
|
Tv(),
|
|
11390
11390
|
Rv(1, 50)
|
|
11391
11391
|
]);
|
|
11392
|
-
d(
|
|
11393
|
-
} catch (
|
|
11394
|
-
Y(Jt(
|
|
11392
|
+
d(re), v(Ne.items);
|
|
11393
|
+
} catch (re) {
|
|
11394
|
+
Y(Jt(re, "读取本地定时任务失败"));
|
|
11395
11395
|
} finally {
|
|
11396
11396
|
g || Q(!1);
|
|
11397
11397
|
}
|
|
@@ -11399,7 +11399,7 @@ function Ek({
|
|
|
11399
11399
|
async (g = !1) => {
|
|
11400
11400
|
g || Q(!0), Y(null);
|
|
11401
11401
|
try {
|
|
11402
|
-
const
|
|
11402
|
+
const re = await Promise.all(
|
|
11403
11403
|
s.map(async (Ne) => {
|
|
11404
11404
|
try {
|
|
11405
11405
|
return (await ms(Ne.id, a)).map((_t) => ({ task: _t, agent: Ne }));
|
|
@@ -11408,30 +11408,30 @@ function Ek({
|
|
|
11408
11408
|
}
|
|
11409
11409
|
})
|
|
11410
11410
|
);
|
|
11411
|
-
R(
|
|
11411
|
+
R(re.flat());
|
|
11412
11412
|
try {
|
|
11413
11413
|
const Ne = await hs(a, 50);
|
|
11414
11414
|
$(Ne.items);
|
|
11415
11415
|
} catch {
|
|
11416
11416
|
$([]);
|
|
11417
11417
|
}
|
|
11418
|
-
} catch (
|
|
11419
|
-
Y(Jt(
|
|
11418
|
+
} catch (re) {
|
|
11419
|
+
Y(Jt(re, "读取云端定时任务失败"));
|
|
11420
11420
|
} finally {
|
|
11421
11421
|
g || Q(!1);
|
|
11422
11422
|
}
|
|
11423
11423
|
},
|
|
11424
11424
|
[s, a]
|
|
11425
11425
|
), ye = H(
|
|
11426
|
-
async (g,
|
|
11426
|
+
async (g, re = !1) => {
|
|
11427
11427
|
if (g === "local") {
|
|
11428
11428
|
if (!t) {
|
|
11429
11429
|
d([]), v([]);
|
|
11430
11430
|
return;
|
|
11431
11431
|
}
|
|
11432
|
-
await pe(
|
|
11432
|
+
await pe(re);
|
|
11433
11433
|
} else
|
|
11434
|
-
await ve(
|
|
11434
|
+
await ve(re);
|
|
11435
11435
|
},
|
|
11436
11436
|
[t, pe, ve]
|
|
11437
11437
|
);
|
|
@@ -11440,7 +11440,7 @@ function Ek({
|
|
|
11440
11440
|
}, [p, ye]);
|
|
11441
11441
|
const Se = Le(
|
|
11442
11442
|
() => u.map((g) => {
|
|
11443
|
-
const
|
|
11443
|
+
const re = l.find((Ne) => Ne.id === g.agentId);
|
|
11444
11444
|
return {
|
|
11445
11445
|
key: `local-${g.id}`,
|
|
11446
11446
|
lane: "local",
|
|
@@ -11449,7 +11449,7 @@ function Ek({
|
|
|
11449
11449
|
prompt: g.prompt,
|
|
11450
11450
|
cron: g.cronExpression,
|
|
11451
11451
|
agentId: g.agentId,
|
|
11452
|
-
agentName: (
|
|
11452
|
+
agentName: (re == null ? void 0 : re.name) ?? g.agentId,
|
|
11453
11453
|
workdir: g.workdir,
|
|
11454
11454
|
enabled: g.enabled === 1,
|
|
11455
11455
|
nextRun: g.nextRunTime,
|
|
@@ -11458,15 +11458,15 @@ function Ek({
|
|
|
11458
11458
|
}),
|
|
11459
11459
|
[u, l]
|
|
11460
11460
|
), qe = Le(
|
|
11461
|
-
() => x.map(({ task: g, agent:
|
|
11461
|
+
() => x.map(({ task: g, agent: re }) => ({
|
|
11462
11462
|
key: `cloud-${g.id}`,
|
|
11463
11463
|
lane: "cloud",
|
|
11464
11464
|
id: String(g.id),
|
|
11465
11465
|
name: g.name,
|
|
11466
11466
|
prompt: g.prompt,
|
|
11467
11467
|
cron: g.cronExpression,
|
|
11468
|
-
agentId: String(g.personalAgentId ??
|
|
11469
|
-
agentName:
|
|
11468
|
+
agentId: String(g.personalAgentId ?? re.id),
|
|
11469
|
+
agentName: re.displayName,
|
|
11470
11470
|
workdir: null,
|
|
11471
11471
|
enabled: g.enabled === 1,
|
|
11472
11472
|
nextRun: ea(g.nextRunTime),
|
|
@@ -11475,13 +11475,13 @@ function Ek({
|
|
|
11475
11475
|
[x]
|
|
11476
11476
|
), $e = p === "local" ? Se : qe, Ve = Le(() => {
|
|
11477
11477
|
if (p === "local") {
|
|
11478
|
-
const g = new Map(u.map((
|
|
11479
|
-
return o.map((
|
|
11480
|
-
key: `local-${
|
|
11481
|
-
taskName: g.get(
|
|
11482
|
-
status: Ya(
|
|
11483
|
-
summary:
|
|
11484
|
-
time:
|
|
11478
|
+
const g = new Map(u.map((re) => [re.id, re.name]));
|
|
11479
|
+
return o.map((re) => ({
|
|
11480
|
+
key: `local-${re.id}`,
|
|
11481
|
+
taskName: g.get(re.taskId) ?? "本地任务",
|
|
11482
|
+
status: Ya(re.status),
|
|
11483
|
+
summary: re.resultSnippet || re.errorMessage || "—",
|
|
11484
|
+
time: re.startedAt
|
|
11485
11485
|
}));
|
|
11486
11486
|
}
|
|
11487
11487
|
return F.map((g) => ({
|
|
@@ -11492,7 +11492,7 @@ function Ek({
|
|
|
11492
11492
|
time: ea(g.createTime) ?? 0
|
|
11493
11493
|
}));
|
|
11494
11494
|
}, [p, u, o, F]), nt = Le(
|
|
11495
|
-
() => [...Ve].sort((g,
|
|
11495
|
+
() => [...Ve].sort((g, re) => re.time - g.time).slice(0, 50),
|
|
11496
11496
|
[Ve]
|
|
11497
11497
|
), pt = H(() => {
|
|
11498
11498
|
ye(p);
|
|
@@ -11518,12 +11518,12 @@ function Ek({
|
|
|
11518
11518
|
});
|
|
11519
11519
|
}, bt = async () => {
|
|
11520
11520
|
if (!I) return;
|
|
11521
|
-
const g = I.name.trim(),
|
|
11521
|
+
const g = I.name.trim(), re = I.prompt.trim(), Ne = I.cron.trim();
|
|
11522
11522
|
if (!g) {
|
|
11523
11523
|
U("请填写任务名称");
|
|
11524
11524
|
return;
|
|
11525
11525
|
}
|
|
11526
|
-
if (!
|
|
11526
|
+
if (!re) {
|
|
11527
11527
|
U("请填写执行指令");
|
|
11528
11528
|
return;
|
|
11529
11529
|
}
|
|
@@ -11543,23 +11543,23 @@ function Ek({
|
|
|
11543
11543
|
const be = I.workdir.trim();
|
|
11544
11544
|
I.taskId == null ? await Iv({
|
|
11545
11545
|
name: g,
|
|
11546
|
-
prompt:
|
|
11546
|
+
prompt: re,
|
|
11547
11547
|
cronExpression: Ne,
|
|
11548
11548
|
agentId: I.agentId,
|
|
11549
11549
|
workdir: be || null
|
|
11550
11550
|
}) : await xv(I.taskId, {
|
|
11551
11551
|
name: g,
|
|
11552
|
-
prompt:
|
|
11552
|
+
prompt: re,
|
|
11553
11553
|
cronExpression: Ne,
|
|
11554
11554
|
agentId: I.agentId,
|
|
11555
11555
|
workdir: be
|
|
11556
11556
|
});
|
|
11557
11557
|
} else {
|
|
11558
11558
|
const be = Number(I.agentId);
|
|
11559
|
-
I.taskId == null ? await ps(be, g,
|
|
11559
|
+
I.taskId == null ? await ps(be, g, re, Ne, "", "", a) : await _s(
|
|
11560
11560
|
be,
|
|
11561
11561
|
Number(I.taskId),
|
|
11562
|
-
{ name: g, prompt:
|
|
11562
|
+
{ name: g, prompt: re, cron_expression: Ne },
|
|
11563
11563
|
a
|
|
11564
11564
|
);
|
|
11565
11565
|
}
|
|
@@ -11587,24 +11587,24 @@ function Ek({
|
|
|
11587
11587
|
!g.enabled,
|
|
11588
11588
|
a
|
|
11589
11589
|
), await ye(g.lane, !0);
|
|
11590
|
-
} catch (
|
|
11591
|
-
Y(Jt(
|
|
11590
|
+
} catch (re) {
|
|
11591
|
+
Y(Jt(re, "切换任务状态失败"));
|
|
11592
11592
|
}
|
|
11593
11593
|
}, dt = async (g) => {
|
|
11594
11594
|
le(g.key), Y(null);
|
|
11595
11595
|
try {
|
|
11596
11596
|
g.lane === "local" ? await Av(g.id) : await ys(Number(g.agentId), Number(g.id), a), await ye(g.lane, !0);
|
|
11597
|
-
} catch (
|
|
11598
|
-
Y(Jt(
|
|
11597
|
+
} catch (re) {
|
|
11598
|
+
Y(Jt(re, "执行定时任务失败"));
|
|
11599
11599
|
} finally {
|
|
11600
11600
|
le(null);
|
|
11601
11601
|
}
|
|
11602
11602
|
}, Je = H(async (g) => {
|
|
11603
|
-
k(!0),
|
|
11603
|
+
k(!0), ie(null);
|
|
11604
11604
|
try {
|
|
11605
11605
|
G(await us(g));
|
|
11606
|
-
} catch (
|
|
11607
|
-
|
|
11606
|
+
} catch (re) {
|
|
11607
|
+
ie(Jt(re, "读取目录失败"));
|
|
11608
11608
|
} finally {
|
|
11609
11609
|
k(!1);
|
|
11610
11610
|
}
|
|
@@ -11825,7 +11825,7 @@ function Ek({
|
|
|
11825
11825
|
"span",
|
|
11826
11826
|
{
|
|
11827
11827
|
className: `${D.runStatus} ${D[`run_${g.status}`]}`,
|
|
11828
|
-
children:
|
|
11828
|
+
children: ik[g.status]
|
|
11829
11829
|
}
|
|
11830
11830
|
),
|
|
11831
11831
|
/* @__PURE__ */ n("div", { className: D.recordMain, children: [
|