@wandox/sdk 0.1.39 → 0.1.40
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/{V1Workbench-GjmMHW_z.js → V1Workbench-Bkmf1K42.js} +62 -62
- package/dist/{V1Workbench-BL9TCe-h.cjs → V1Workbench-CItNelpx.cjs} +3 -3
- package/dist/{V2Workbench-C4uOgIer.js → V2Workbench-CzVA0I0C.js} +1239 -1174
- package/dist/V2Workbench-Du9Rjdb9.cjs +2 -0
- package/dist/{WorkbenchRuntime-ButbDrvB.js → WorkbenchRuntime-BtaB5WWj.js} +2 -2
- package/dist/{WorkbenchRuntime-jXXGAqkE.cjs → WorkbenchRuntime-WgDNtkfm.cjs} +1 -1
- package/dist/{arc-BK_aujia.cjs → arc-Dp6HGkPf.cjs} +1 -1
- package/dist/{arc-CE1S54RP.js → arc-p2evs-YP.js} +1 -1
- package/dist/{architectureDiagram-3BPJPVTR-CCe2Qwas.cjs → architectureDiagram-3BPJPVTR-DLW47m6f.cjs} +1 -1
- package/dist/{architectureDiagram-3BPJPVTR-mquQ4A04.js → architectureDiagram-3BPJPVTR-S5Nk8_Ym.js} +3 -3
- package/dist/{blockDiagram-GPEHLZMM-DnZ4oEXt.js → blockDiagram-GPEHLZMM-CnAR5dM8.js} +3 -3
- package/dist/{blockDiagram-GPEHLZMM-Dr9swVG2.cjs → blockDiagram-GPEHLZMM-DaROF8fd.cjs} +1 -1
- package/dist/{c4Diagram-AAUBKEIU-DtaJYesx.cjs → c4Diagram-AAUBKEIU-B4dU2Qlc.cjs} +1 -1
- package/dist/{c4Diagram-AAUBKEIU-DTz0ipr3.js → c4Diagram-AAUBKEIU-C-Fj0O2Q.js} +2 -2
- package/dist/{channel-CDc0Yn2X.cjs → channel-BBbxPnTi.cjs} +1 -1
- package/dist/{channel-BeVy-ZIF.js → channel-BZZ2huJO.js} +1 -1
- package/dist/{chunk-2J33WTMH-lCahilst.js → chunk-2J33WTMH-BCVkaWvn.js} +1 -1
- package/dist/{chunk-2J33WTMH-2Z5D00s4.cjs → chunk-2J33WTMH-BslFwdPd.cjs} +1 -1
- package/dist/{chunk-4BX2VUAB-C9W5QDsy.cjs → chunk-4BX2VUAB-BHzIlLga.cjs} +1 -1
- package/dist/{chunk-4BX2VUAB-BfG82Y4D.js → chunk-4BX2VUAB-D6Udw9Mc.js} +1 -1
- package/dist/{chunk-55IACEB6-F1nM7WdQ.cjs → chunk-55IACEB6-0b2j3Xbg.cjs} +1 -1
- package/dist/{chunk-55IACEB6-DDuaa7-s.js → chunk-55IACEB6-Cz6uJPeB.js} +1 -1
- package/dist/{chunk-727SXJPM-D9vGz_R5.cjs → chunk-727SXJPM-BaM2sDB9.cjs} +1 -1
- package/dist/{chunk-727SXJPM-DCpsumhn.js → chunk-727SXJPM-C36Anem5.js} +5 -5
- package/dist/{chunk-AQP2D5EJ-DBFNgb2V.cjs → chunk-AQP2D5EJ-B7gqs7oW.cjs} +1 -1
- package/dist/{chunk-AQP2D5EJ-BiJG2fDP.js → chunk-AQP2D5EJ-ZE_DySvS.js} +3 -3
- package/dist/{chunk-FMBD7UC4-BhyGm-GT.cjs → chunk-FMBD7UC4-DPnttxo-.cjs} +1 -1
- package/dist/{chunk-FMBD7UC4-cWskSZrE.js → chunk-FMBD7UC4-DtqMssXQ.js} +1 -1
- package/dist/{chunk-ND2GUHAM-DRY6nzyy.cjs → chunk-ND2GUHAM-CI8ify2b.cjs} +1 -1
- package/dist/{chunk-ND2GUHAM-DGIC-ZW-.js → chunk-ND2GUHAM-GyysshWQ.js} +1 -1
- package/dist/{chunk-QZHKN3VN-C7JxoAX-.cjs → chunk-QZHKN3VN-CLLJT-iu.cjs} +1 -1
- package/dist/{chunk-QZHKN3VN-HwaVssHs.js → chunk-QZHKN3VN-CogEQqcp.js} +1 -1
- package/dist/{classDiagram-4FO5ZUOK-mzJYvOZu.js → classDiagram-4FO5ZUOK-BKPODxxw.js} +2 -2
- package/dist/{classDiagram-4FO5ZUOK-CygibmXb.cjs → classDiagram-4FO5ZUOK-BYg4Pa6H.cjs} +1 -1
- package/dist/{classDiagram-v2-Q7XG4LA2-CygibmXb.cjs → classDiagram-v2-Q7XG4LA2-BYg4Pa6H.cjs} +1 -1
- package/dist/{classDiagram-v2-Q7XG4LA2-B1YHuxBu.js → classDiagram-v2-Q7XG4LA2-CEIG7BUg.js} +2 -2
- package/dist/{cose-bilkent-S5V4N54A-D8IZat0h.js → cose-bilkent-S5V4N54A-Bh_LjYJa.js} +2 -2
- package/dist/{cose-bilkent-S5V4N54A-Rhluulxd.cjs → cose-bilkent-S5V4N54A-CIO6lXK4.cjs} +1 -1
- package/dist/{dagre-BM42HDAG-Bvc4ohUU.cjs → dagre-BM42HDAG-B0imV5xh.cjs} +1 -1
- package/dist/{dagre-BM42HDAG-C9fviEf-.js → dagre-BM42HDAG-B1zhDnbU.js} +1 -1
- package/dist/{diagram-2AECGRRQ-paI55ZVp.js → diagram-2AECGRRQ-BXFpQz5l.js} +2 -2
- package/dist/{diagram-2AECGRRQ-CkQq6ZGh.cjs → diagram-2AECGRRQ-nWXbUHwt.cjs} +1 -1
- package/dist/{diagram-5GNKFQAL-CDMHctmr.js → diagram-5GNKFQAL-BelQYxW2.js} +3 -3
- package/dist/{diagram-5GNKFQAL-DWCFHwPd.cjs → diagram-5GNKFQAL-CxxJicHI.cjs} +1 -1
- package/dist/{diagram-KO2AKTUF-BWWzWP62.js → diagram-KO2AKTUF-CZEeDH7M.js} +2 -2
- package/dist/{diagram-KO2AKTUF-spfSwB_X.cjs → diagram-KO2AKTUF-DjnQxEUp.cjs} +1 -1
- package/dist/{diagram-LMA3HP47-RAfpkFKr.cjs → diagram-LMA3HP47-D6J2F4J0.cjs} +1 -1
- package/dist/{diagram-LMA3HP47-BT-BShmi.js → diagram-LMA3HP47-unuJ3SHU.js} +2 -2
- package/dist/{diagram-OG6HWLK6-CqDudF-0.cjs → diagram-OG6HWLK6-BP5DzAWo.cjs} +1 -1
- package/dist/{diagram-OG6HWLK6-CIN-4ftA.js → diagram-OG6HWLK6-lal84-fO.js} +3 -3
- package/dist/{erDiagram-TEJ5UH35-TOCz7Y2q.cjs → erDiagram-TEJ5UH35-BDzac_yS.cjs} +1 -1
- package/dist/{erDiagram-TEJ5UH35-D0fhsTuc.js → erDiagram-TEJ5UH35-eUkSOPMA.js} +4 -4
- package/dist/{flowDiagram-I6XJVG4X-BInalcH7.cjs → flowDiagram-I6XJVG4X-BsdsU4VU.cjs} +1 -1
- package/dist/{flowDiagram-I6XJVG4X-4f3A04iK.js → flowDiagram-I6XJVG4X-DCzTSref.js} +6 -6
- package/dist/{ganttDiagram-6RSMTGT7-DEF_FmRR.cjs → ganttDiagram-6RSMTGT7-VdCKv9lI.cjs} +1 -1
- package/dist/{ganttDiagram-6RSMTGT7-C8ScPSHu.js → ganttDiagram-6RSMTGT7-pyd5uyfC.js} +3 -3
- package/dist/{gitGraphDiagram-PVQCEYII-DBwXskFh.cjs → gitGraphDiagram-PVQCEYII-CHSRixtX.cjs} +1 -1
- package/dist/{gitGraphDiagram-PVQCEYII-CnKH0PHp.js → gitGraphDiagram-PVQCEYII-uaeRcwRX.js} +3 -3
- package/dist/{index-DGyUqlaQ.cjs → index-C6UznrWn.cjs} +1 -1
- package/dist/{index-NXlUEMwG.js → index-Ca9Ql6S9.js} +8 -8
- package/dist/{index-pGTHB93u.js → index-DsH5dPnp.js} +58 -58
- package/dist/{index-DeLd859U.cjs → index-NH-U1YoC.cjs} +6 -6
- package/dist/{infoDiagram-5YYISTIA-DOOxpQu0.cjs → infoDiagram-5YYISTIA-BuB-FkRS.cjs} +1 -1
- package/dist/{infoDiagram-5YYISTIA-D79y7lhu.js → infoDiagram-5YYISTIA-CLtsqBN1.js} +1 -1
- package/dist/{ishikawaDiagram-YF4QCWOH-D7ka4Dej.js → ishikawaDiagram-YF4QCWOH-14uoP_Zp.js} +1 -1
- package/dist/{ishikawaDiagram-YF4QCWOH-3amMX1JK.cjs → ishikawaDiagram-YF4QCWOH-CocvPDlS.cjs} +1 -1
- package/dist/{journeyDiagram-JHISSGLW-BARqx_B3.cjs → journeyDiagram-JHISSGLW-8xy8wS-h.cjs} +1 -1
- package/dist/{journeyDiagram-JHISSGLW-EBn4X8-a.js → journeyDiagram-JHISSGLW-B7dpJRIo.js} +4 -4
- package/dist/{kanban-definition-UN3LZRKU-D8iz27bT.cjs → kanban-definition-UN3LZRKU-D18GwLQS.cjs} +1 -1
- package/dist/{kanban-definition-UN3LZRKU-CBAKDyvM.js → kanban-definition-UN3LZRKU-vunuCqsW.js} +2 -2
- package/dist/{linear-Fv7CLeZq.cjs → linear-D2jSS9Kp.cjs} +1 -1
- package/dist/{linear-B2QSw8ao.js → linear-sc1nZZBl.js} +1 -1
- package/dist/{mermaid.core-HBdKo8dE.cjs → mermaid.core-CBIohIEC.cjs} +3 -3
- package/dist/{mermaid.core-ChK_QlLI.js → mermaid.core-Cj7H_j_o.js} +35 -35
- package/dist/{mindmap-definition-RKZ34NQL-PqVfSh0o.cjs → mindmap-definition-RKZ34NQL-DcYPxTLy.cjs} +1 -1
- package/dist/{mindmap-definition-RKZ34NQL-C3uHES2i.js → mindmap-definition-RKZ34NQL-Dwhdy2Lv.js} +3 -3
- package/dist/{pieDiagram-4H26LBE5-slbguXAu.cjs → pieDiagram-4H26LBE5-BiBh5z_4.cjs} +1 -1
- package/dist/{pieDiagram-4H26LBE5-aJvbTpKH.js → pieDiagram-4H26LBE5-CZEVmlfR.js} +3 -3
- package/dist/{quadrantDiagram-W4KKPZXB-B1BYMfPp.js → quadrantDiagram-W4KKPZXB-BuuPBESZ.js} +2 -2
- package/dist/{quadrantDiagram-W4KKPZXB-Cqvftrp-.cjs → quadrantDiagram-W4KKPZXB-DszFlk-S.cjs} +1 -1
- package/dist/{requirementDiagram-4Y6WPE33-CgVm8oUv.cjs → requirementDiagram-4Y6WPE33-ByH8B2ZH.cjs} +1 -1
- package/dist/{requirementDiagram-4Y6WPE33-Cn7GQxPf.js → requirementDiagram-4Y6WPE33-CBVeO6ga.js} +3 -3
- package/dist/{sankeyDiagram-5OEKKPKP-aWGj-ZP4.js → sankeyDiagram-5OEKKPKP-CPMEaHn3.js} +1 -1
- package/dist/{sankeyDiagram-5OEKKPKP-D7Lkmywe.cjs → sankeyDiagram-5OEKKPKP-Dhk-rR8_.cjs} +1 -1
- package/dist/{sequenceDiagram-3UESZ5HK-CLsU-4UM.js → sequenceDiagram-3UESZ5HK-CjnhgM39.js} +3 -3
- package/dist/{sequenceDiagram-3UESZ5HK-PwX7e0rY.cjs → sequenceDiagram-3UESZ5HK-nuywC0l5.cjs} +1 -1
- package/dist/{stateDiagram-AJRCARHV-vGqcl-KV.cjs → stateDiagram-AJRCARHV-0CUDhISM.cjs} +1 -1
- package/dist/{stateDiagram-AJRCARHV-CqgrATuU.js → stateDiagram-AJRCARHV-cJ2GiNH4.js} +2 -2
- package/dist/{stateDiagram-v2-BHNVJYJU-HtcVKaju.cjs → stateDiagram-v2-BHNVJYJU-Bvyir8PP.cjs} +1 -1
- package/dist/{stateDiagram-v2-BHNVJYJU-i2ltnCUr.js → stateDiagram-v2-BHNVJYJU-nlH8p5aD.js} +2 -2
- package/dist/{timeline-definition-PNZ67QCA-BK6Um61-.cjs → timeline-definition-PNZ67QCA-BJOWbfT_.cjs} +1 -1
- package/dist/{timeline-definition-PNZ67QCA-CcAR4rsb.js → timeline-definition-PNZ67QCA-BR5rGmv7.js} +2 -2
- package/dist/{vennDiagram-CIIHVFJN-Cp8snzHu.js → vennDiagram-CIIHVFJN-BdO9p0AW.js} +1 -1
- package/dist/{vennDiagram-CIIHVFJN-Cm13ds7X.cjs → vennDiagram-CIIHVFJN-CwEezNL4.cjs} +1 -1
- package/dist/wandox.cjs +1 -1
- package/dist/wandox.css +1 -1
- package/dist/wandox.js +1 -1
- package/dist/wandox.umd.js +563 -563
- package/dist/{wardleyDiagram-YWT4CUSO-CSbrbJrc.js → wardleyDiagram-YWT4CUSO-Clxin-yE.js} +2 -2
- package/dist/{wardleyDiagram-YWT4CUSO-D9nb2LzZ.cjs → wardleyDiagram-YWT4CUSO-DNTHPpN6.cjs} +1 -1
- package/dist/{xychartDiagram-2RQKCTM6-6BlgLg2e.cjs → xychartDiagram-2RQKCTM6-BM-DXVP1.cjs} +1 -1
- package/dist/{xychartDiagram-2RQKCTM6-DpAMV2MM.js → xychartDiagram-2RQKCTM6-V_uIcNZ1.js} +2 -2
- package/package.json +1 -1
- package/dist/V2Workbench-C0Ak3rdn.cjs +0 -2
|
@@ -1,52 +1,82 @@
|
|
|
1
|
-
import { dt as
|
|
2
|
-
import { n as
|
|
3
|
-
import { Drawer as
|
|
4
|
-
var
|
|
5
|
-
function
|
|
6
|
-
return
|
|
7
|
-
for (var
|
|
8
|
-
var
|
|
9
|
-
for (var
|
|
10
|
-
Object.prototype.hasOwnProperty.call(
|
|
1
|
+
import { dt as s, af as ze, d0 as e, a_ as rs, ai as Ra, a$ as _a, aR as ds, bL as us, b0 as an, d_ as ms, K as Xa, aa as sn, a9 as ba, d6 as es, Q as nn, P as on, a6 as tn, a4 as cn, T as ln, da as hs, dG as C, ci as rn, S as dn, J as fa, c_ as un, cO as mn, dO as hn, cd as xn, cH as pn, cG as _n, as as bn, ap as fn, o as wn, m as yn, v as gn, b1 as xs, b2 as jn, bC as wa, aO as vn, b3 as ya, n as kn, ar as Nn, A as Cn, aq as Sn, bz as Rn, bB as $n, i as sa, aA as In, y as En, cI as An, cJ as Pn, aE as as, b4 as Mn, aZ as Ln, b5 as ss, b6 as Tn, b7 as On, b8 as Dn, b9 as Fn, ek as Vn } from "./index-Ca9Ql6S9.js";
|
|
2
|
+
import { n as Bn, A as zn, l as na, m as ga, p as qn, h as ps, R as ja, c as _s, a as bs, d as fs, e as ns, Q as Wn, i as Hn, f as Un, u as Kn, j as Gn, o as os, b as Qn, S as Yn } from "./WorkbenchRuntime-BtaB5WWj.js";
|
|
3
|
+
import { Drawer as Zn, Divider as Jn } from "./index-DsH5dPnp.js";
|
|
4
|
+
var Xn = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M864 144H560c-8.8 0-16 7.2-16 16v304c0 8.8 7.2 16 16 16h304c8.8 0 16-7.2 16-16V160c0-8.8-7.2-16-16-16zm0 400H560c-8.8 0-16 7.2-16 16v304c0 8.8 7.2 16 16 16h304c8.8 0 16-7.2 16-16V560c0-8.8-7.2-16-16-16zM464 144H160c-8.8 0-16 7.2-16 16v304c0 8.8 7.2 16 16 16h304c8.8 0 16-7.2 16-16V160c0-8.8-7.2-16-16-16zm0 400H160c-8.8 0-16 7.2-16 16v304c0 8.8 7.2 16 16 16h304c8.8 0 16-7.2 16-16V560c0-8.8-7.2-16-16-16z" } }] }, name: "appstore", theme: "filled" };
|
|
5
|
+
function va() {
|
|
6
|
+
return va = Object.assign ? Object.assign.bind() : function(o) {
|
|
7
|
+
for (var l = 1; l < arguments.length; l++) {
|
|
8
|
+
var u = arguments[l];
|
|
9
|
+
for (var r in u)
|
|
10
|
+
Object.prototype.hasOwnProperty.call(u, r) && (o[r] = u[r]);
|
|
11
11
|
}
|
|
12
12
|
return o;
|
|
13
|
-
},
|
|
13
|
+
}, va.apply(this, arguments);
|
|
14
14
|
}
|
|
15
|
-
const
|
|
16
|
-
ref:
|
|
17
|
-
icon:
|
|
18
|
-
})),
|
|
19
|
-
var
|
|
20
|
-
function
|
|
21
|
-
return
|
|
22
|
-
for (var
|
|
23
|
-
var
|
|
24
|
-
for (var
|
|
25
|
-
Object.prototype.hasOwnProperty.call(
|
|
15
|
+
const eo = (o, l) => /* @__PURE__ */ s.createElement(ze, va({}, o, {
|
|
16
|
+
ref: l,
|
|
17
|
+
icon: Xn
|
|
18
|
+
})), ao = /* @__PURE__ */ s.forwardRef(eo);
|
|
19
|
+
var so = { icon: { tag: "svg", attrs: { viewBox: "0 0 1024 1024", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M689 165.1L308.2 493.5c-10.9 9.4-10.9 27.5 0 37L689 858.9c14.2 12.2 35 1.2 35-18.5V183.6c0-19.7-20.8-30.7-35-18.5z" } }] }, name: "caret-left", theme: "filled" };
|
|
20
|
+
function ka() {
|
|
21
|
+
return ka = Object.assign ? Object.assign.bind() : function(o) {
|
|
22
|
+
for (var l = 1; l < arguments.length; l++) {
|
|
23
|
+
var u = arguments[l];
|
|
24
|
+
for (var r in u)
|
|
25
|
+
Object.prototype.hasOwnProperty.call(u, r) && (o[r] = u[r]);
|
|
26
26
|
}
|
|
27
27
|
return o;
|
|
28
|
-
},
|
|
28
|
+
}, ka.apply(this, arguments);
|
|
29
29
|
}
|
|
30
|
-
const
|
|
31
|
-
ref:
|
|
32
|
-
icon:
|
|
33
|
-
})),
|
|
34
|
-
var
|
|
35
|
-
function
|
|
36
|
-
return
|
|
37
|
-
for (var
|
|
38
|
-
var
|
|
39
|
-
for (var
|
|
40
|
-
Object.prototype.hasOwnProperty.call(
|
|
30
|
+
const no = (o, l) => /* @__PURE__ */ s.createElement(ze, ka({}, o, {
|
|
31
|
+
ref: l,
|
|
32
|
+
icon: so
|
|
33
|
+
})), oo = /* @__PURE__ */ s.forwardRef(no);
|
|
34
|
+
var to = { icon: { tag: "svg", attrs: { viewBox: "0 0 1024 1024", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M715.8 493.5L335 165.1c-14.2-12.2-35-1.2-35 18.5v656.8c0 19.7 20.8 30.7 35 18.5l380.8-328.4c10.9-9.4 10.9-27.6 0-37z" } }] }, name: "caret-right", theme: "filled" };
|
|
35
|
+
function Na() {
|
|
36
|
+
return Na = Object.assign ? Object.assign.bind() : function(o) {
|
|
37
|
+
for (var l = 1; l < arguments.length; l++) {
|
|
38
|
+
var u = arguments[l];
|
|
39
|
+
for (var r in u)
|
|
40
|
+
Object.prototype.hasOwnProperty.call(u, r) && (o[r] = u[r]);
|
|
41
41
|
}
|
|
42
42
|
return o;
|
|
43
|
-
},
|
|
43
|
+
}, Na.apply(this, arguments);
|
|
44
44
|
}
|
|
45
|
-
const
|
|
46
|
-
ref:
|
|
47
|
-
icon:
|
|
48
|
-
})),
|
|
49
|
-
|
|
45
|
+
const co = (o, l) => /* @__PURE__ */ s.createElement(ze, Na({}, o, {
|
|
46
|
+
ref: l,
|
|
47
|
+
icon: to
|
|
48
|
+
})), lo = /* @__PURE__ */ s.forwardRef(co);
|
|
49
|
+
var io = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M320 224h-66v-56c0-4.4-3.6-8-8-8h-52c-4.4 0-8 3.6-8 8v56h-66c-4.4 0-8 3.6-8 8v560c0 4.4 3.6 8 8 8h66v56c0 4.4 3.6 8 8 8h52c4.4 0 8-3.6 8-8v-56h66c4.4 0 8-3.6 8-8V232c0-4.4-3.6-8-8-8zm-60 508h-80V292h80v440zm644-436h-66v-96c0-4.4-3.6-8-8-8h-52c-4.4 0-8 3.6-8 8v96h-66c-4.4 0-8 3.6-8 8v416c0 4.4 3.6 8 8 8h66v96c0 4.4 3.6 8 8 8h52c4.4 0 8-3.6 8-8v-96h66c4.4 0 8-3.6 8-8V304c0-4.4-3.6-8-8-8zm-60 364h-80V364h80v296zM612 404h-66V232c0-4.4-3.6-8-8-8h-52c-4.4 0-8 3.6-8 8v172h-66c-4.4 0-8 3.6-8 8v200c0 4.4 3.6 8 8 8h66v172c0 4.4 3.6 8 8 8h52c4.4 0 8-3.6 8-8V620h66c4.4 0 8-3.6 8-8V412c0-4.4-3.6-8-8-8zm-60 145a3 3 0 01-3 3h-74a3 3 0 01-3-3v-74a3 3 0 013-3h74a3 3 0 013 3v74z" } }] }, name: "sliders", theme: "outlined" };
|
|
50
|
+
function Ca() {
|
|
51
|
+
return Ca = Object.assign ? Object.assign.bind() : function(o) {
|
|
52
|
+
for (var l = 1; l < arguments.length; l++) {
|
|
53
|
+
var u = arguments[l];
|
|
54
|
+
for (var r in u)
|
|
55
|
+
Object.prototype.hasOwnProperty.call(u, r) && (o[r] = u[r]);
|
|
56
|
+
}
|
|
57
|
+
return o;
|
|
58
|
+
}, Ca.apply(this, arguments);
|
|
59
|
+
}
|
|
60
|
+
const ro = (o, l) => /* @__PURE__ */ s.createElement(ze, Ca({}, o, {
|
|
61
|
+
ref: l,
|
|
62
|
+
icon: io
|
|
63
|
+
})), ws = /* @__PURE__ */ s.forwardRef(ro);
|
|
64
|
+
var uo = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M912 192H328c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h584c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 284H328c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h584c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 284H328c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h584c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM104 228a56 56 0 10112 0 56 56 0 10-112 0zm0 284a56 56 0 10112 0 56 56 0 10-112 0zm0 284a56 56 0 10112 0 56 56 0 10-112 0z" } }] }, name: "unordered-list", theme: "outlined" };
|
|
65
|
+
function Sa() {
|
|
66
|
+
return Sa = Object.assign ? Object.assign.bind() : function(o) {
|
|
67
|
+
for (var l = 1; l < arguments.length; l++) {
|
|
68
|
+
var u = arguments[l];
|
|
69
|
+
for (var r in u)
|
|
70
|
+
Object.prototype.hasOwnProperty.call(u, r) && (o[r] = u[r]);
|
|
71
|
+
}
|
|
72
|
+
return o;
|
|
73
|
+
}, Sa.apply(this, arguments);
|
|
74
|
+
}
|
|
75
|
+
const mo = (o, l) => /* @__PURE__ */ s.createElement(ze, Sa({}, o, {
|
|
76
|
+
ref: l,
|
|
77
|
+
icon: uo
|
|
78
|
+
})), ho = /* @__PURE__ */ s.forwardRef(mo);
|
|
79
|
+
function ys(o) {
|
|
50
80
|
return {
|
|
51
81
|
category: null,
|
|
52
82
|
description: o.desc,
|
|
@@ -65,45 +95,45 @@ function _a(o) {
|
|
|
65
95
|
view_count: o.view_count
|
|
66
96
|
};
|
|
67
97
|
}
|
|
68
|
-
function
|
|
98
|
+
function gs(o) {
|
|
69
99
|
if (!o || o <= 0) return "0:00";
|
|
70
|
-
const
|
|
71
|
-
return `${
|
|
100
|
+
const l = Math.floor(o / 60), u = String(Math.floor(o % 60)).padStart(2, "0");
|
|
101
|
+
return `${l}:${u}`;
|
|
72
102
|
}
|
|
73
|
-
const
|
|
103
|
+
const xa = "__all__", ts = "__my__", pa = "__library_all__", xo = "__library__:", po = [
|
|
74
104
|
{ key: "all", label: "全部场景" },
|
|
75
105
|
{ key: "my", label: "我的场景" },
|
|
76
106
|
{ key: "map", label: "使用地图" }
|
|
77
107
|
];
|
|
78
|
-
function
|
|
108
|
+
function _o(o) {
|
|
79
109
|
return o === "map" ? "搜索当前地图下的场景" : o === "my" ? "搜索我的场景" : "搜索全部场景";
|
|
80
110
|
}
|
|
81
|
-
function
|
|
111
|
+
function bo({
|
|
82
112
|
open: o,
|
|
83
|
-
source:
|
|
84
|
-
categories:
|
|
85
|
-
categoryKey:
|
|
113
|
+
source: l,
|
|
114
|
+
categories: u,
|
|
115
|
+
categoryKey: r,
|
|
86
116
|
search: p,
|
|
87
|
-
cards:
|
|
88
|
-
executing:
|
|
117
|
+
cards: k,
|
|
118
|
+
executing: P,
|
|
89
119
|
loadingPlaybookId: _,
|
|
90
|
-
onClose:
|
|
91
|
-
onSourceChange:
|
|
92
|
-
onCategoryChange:
|
|
93
|
-
onSearchChange:
|
|
120
|
+
onClose: R,
|
|
121
|
+
onSourceChange: T,
|
|
122
|
+
onCategoryChange: ae,
|
|
123
|
+
onSearchChange: Q,
|
|
94
124
|
onSelectScene: le
|
|
95
125
|
}) {
|
|
96
|
-
const [
|
|
97
|
-
() =>
|
|
98
|
-
[
|
|
99
|
-
),
|
|
100
|
-
|
|
126
|
+
const [$, q] = s.useState(null), M = s.useMemo(
|
|
127
|
+
() => $ ? ys($) : null,
|
|
128
|
+
[$]
|
|
129
|
+
), S = s.useCallback((h, D) => {
|
|
130
|
+
h.stopPropagation(), q(D);
|
|
101
131
|
}, []);
|
|
102
132
|
return /* @__PURE__ */ e.jsxs(
|
|
103
|
-
|
|
133
|
+
Zn,
|
|
104
134
|
{
|
|
105
135
|
open: o,
|
|
106
|
-
onClose:
|
|
136
|
+
onClose: R,
|
|
107
137
|
placement: "bottom",
|
|
108
138
|
height: "min(82vh, 780px)",
|
|
109
139
|
destroyOnClose: !1,
|
|
@@ -123,15 +153,15 @@ function lo({
|
|
|
123
153
|
{
|
|
124
154
|
className: "wandox-console-chat__drawer-tabs",
|
|
125
155
|
"aria-label": "场景来源",
|
|
126
|
-
children:
|
|
156
|
+
children: po.map((h) => /* @__PURE__ */ e.jsx(
|
|
127
157
|
"button",
|
|
128
158
|
{
|
|
129
159
|
type: "button",
|
|
130
|
-
className:
|
|
131
|
-
onClick: () =>
|
|
132
|
-
children:
|
|
160
|
+
className: l === h.key ? "is-active" : "",
|
|
161
|
+
onClick: () => T(h.key),
|
|
162
|
+
children: h.label
|
|
133
163
|
},
|
|
134
|
-
|
|
164
|
+
h.key
|
|
135
165
|
))
|
|
136
166
|
}
|
|
137
167
|
) }),
|
|
@@ -140,117 +170,117 @@ function lo({
|
|
|
140
170
|
{
|
|
141
171
|
type: "button",
|
|
142
172
|
className: "wandox-console-chat__drawer-close",
|
|
143
|
-
onClick:
|
|
173
|
+
onClick: R,
|
|
144
174
|
"aria-label": "关闭",
|
|
145
|
-
children: /* @__PURE__ */ e.jsx(
|
|
175
|
+
children: /* @__PURE__ */ e.jsx(rs, {})
|
|
146
176
|
}
|
|
147
177
|
)
|
|
148
178
|
] }),
|
|
149
179
|
/* @__PURE__ */ e.jsxs("div", { className: "wandox-console-chat__drawer-middle", children: [
|
|
150
|
-
|
|
180
|
+
l !== "my" && /* @__PURE__ */ e.jsxs("aside", { className: "wandox-console-chat__drawer-cats", children: [
|
|
151
181
|
/* @__PURE__ */ e.jsx("div", { className: "wandox-console-chat__drawer-catslabel", children: "场景分类" }),
|
|
152
|
-
|
|
153
|
-
const
|
|
182
|
+
u.map((h) => {
|
|
183
|
+
const D = h.key === r;
|
|
154
184
|
return /* @__PURE__ */ e.jsxs(
|
|
155
185
|
"button",
|
|
156
186
|
{
|
|
157
187
|
type: "button",
|
|
158
|
-
className: `wandox-console-chat__drawer-cat${
|
|
159
|
-
onClick: () =>
|
|
188
|
+
className: `wandox-console-chat__drawer-cat${D ? " wandox-console-chat__drawer-cat--active" : ""}`,
|
|
189
|
+
onClick: () => ae(h.key),
|
|
160
190
|
children: [
|
|
161
|
-
/* @__PURE__ */ e.jsx("span", { className: "wandox-console-chat__drawer-cat-name", children:
|
|
162
|
-
/* @__PURE__ */ e.jsx("span", { className: "wandox-console-chat__drawer-cat-count", children:
|
|
191
|
+
/* @__PURE__ */ e.jsx("span", { className: "wandox-console-chat__drawer-cat-name", children: h.name }),
|
|
192
|
+
/* @__PURE__ */ e.jsx("span", { className: "wandox-console-chat__drawer-cat-count", children: h.count })
|
|
163
193
|
]
|
|
164
194
|
},
|
|
165
|
-
|
|
195
|
+
h.key
|
|
166
196
|
);
|
|
167
197
|
})
|
|
168
198
|
] }),
|
|
169
199
|
/* @__PURE__ */ e.jsxs("div", { className: "wandox-console-chat__drawer-body", children: [
|
|
170
200
|
/* @__PURE__ */ e.jsx("div", { className: "wandox-console-chat__drawer-toolbar", children: /* @__PURE__ */ e.jsx(
|
|
171
|
-
|
|
201
|
+
Ra,
|
|
172
202
|
{
|
|
173
203
|
allowClear: !0,
|
|
174
|
-
prefix: /* @__PURE__ */ e.jsx(
|
|
175
|
-
placeholder:
|
|
204
|
+
prefix: /* @__PURE__ */ e.jsx(_a, {}),
|
|
205
|
+
placeholder: _o(l),
|
|
176
206
|
value: p,
|
|
177
|
-
onChange: (
|
|
207
|
+
onChange: (h) => Q(h.target.value)
|
|
178
208
|
}
|
|
179
209
|
) }),
|
|
180
|
-
|
|
181
|
-
const
|
|
210
|
+
k.length === 0 ? /* @__PURE__ */ e.jsx("div", { className: "wandox-console-chat__drawer-empty", children: p ? "没有匹配的场景" : "暂无可用场景" }) : /* @__PURE__ */ e.jsx("div", { className: "wandox-console-scenes", children: k.map((h) => {
|
|
211
|
+
const D = _ === h.playbook_id;
|
|
182
212
|
return /* @__PURE__ */ e.jsxs("div", { className: "wandox-console-scene-wrap", children: [
|
|
183
213
|
/* @__PURE__ */ e.jsx(
|
|
184
214
|
"button",
|
|
185
215
|
{
|
|
186
216
|
type: "button",
|
|
187
217
|
className: "wandox-console-scene",
|
|
188
|
-
disabled:
|
|
189
|
-
"aria-busy":
|
|
190
|
-
onClick: () => void le(
|
|
218
|
+
disabled: P || !!_,
|
|
219
|
+
"aria-busy": D,
|
|
220
|
+
onClick: () => void le(h),
|
|
191
221
|
children: /* @__PURE__ */ e.jsxs("div", { className: "wandox-console-scene__body", children: [
|
|
192
|
-
/* @__PURE__ */ e.jsx("strong", { title:
|
|
193
|
-
|
|
222
|
+
/* @__PURE__ */ e.jsx("strong", { title: h.title, children: h.title }),
|
|
223
|
+
h.desc && /* @__PURE__ */ e.jsx(
|
|
194
224
|
"span",
|
|
195
225
|
{
|
|
196
226
|
className: "wandox-console-scene__desc",
|
|
197
|
-
title:
|
|
198
|
-
children:
|
|
227
|
+
title: h.desc,
|
|
228
|
+
children: h.desc
|
|
199
229
|
}
|
|
200
230
|
),
|
|
201
|
-
|
|
231
|
+
D && /* @__PURE__ */ e.jsx("span", { className: "wandox-console-scene__loading", children: "正在读取场景..." })
|
|
202
232
|
] })
|
|
203
233
|
}
|
|
204
234
|
),
|
|
205
|
-
|
|
235
|
+
h.video_url && /* @__PURE__ */ e.jsxs(
|
|
206
236
|
"button",
|
|
207
237
|
{
|
|
208
238
|
type: "button",
|
|
209
239
|
className: "wandox-console-scene__video",
|
|
210
|
-
"aria-label": `播放${
|
|
211
|
-
onClick: (ie) =>
|
|
240
|
+
"aria-label": `播放${h.title}演示视频`,
|
|
241
|
+
onClick: (ie) => S(ie, h),
|
|
212
242
|
children: [
|
|
213
243
|
"▶ ",
|
|
214
|
-
|
|
244
|
+
gs(h.video_duration),
|
|
215
245
|
" 演示"
|
|
216
246
|
]
|
|
217
247
|
}
|
|
218
248
|
)
|
|
219
|
-
] },
|
|
249
|
+
] }, h.key);
|
|
220
250
|
}) })
|
|
221
251
|
] })
|
|
222
252
|
] })
|
|
223
253
|
] }),
|
|
224
254
|
/* @__PURE__ */ e.jsx(
|
|
225
|
-
|
|
255
|
+
ds,
|
|
226
256
|
{
|
|
227
|
-
playbook:
|
|
228
|
-
onClose: () =>
|
|
257
|
+
playbook: M,
|
|
258
|
+
onClose: () => q(null)
|
|
229
259
|
}
|
|
230
260
|
)
|
|
231
261
|
]
|
|
232
262
|
}
|
|
233
263
|
);
|
|
234
264
|
}
|
|
235
|
-
const
|
|
236
|
-
const { onError:
|
|
237
|
-
|
|
265
|
+
const fo = (o) => {
|
|
266
|
+
const { onError: l } = o;
|
|
267
|
+
l == null || l(new Error("该场景暂不支持文件上传"));
|
|
238
268
|
};
|
|
239
|
-
function
|
|
269
|
+
function js({
|
|
240
270
|
field: o,
|
|
241
|
-
value:
|
|
242
|
-
uploading:
|
|
243
|
-
fileNameMap:
|
|
271
|
+
value: l,
|
|
272
|
+
uploading: u,
|
|
273
|
+
fileNameMap: r,
|
|
244
274
|
getOptionState: p,
|
|
245
|
-
onChange:
|
|
246
|
-
onUpload:
|
|
275
|
+
onChange: k,
|
|
276
|
+
onUpload: P
|
|
247
277
|
}) {
|
|
248
|
-
const _ =
|
|
278
|
+
const _ = Bn(o.type), R = P ?? ((T, ae) => fo);
|
|
249
279
|
return /* @__PURE__ */ e.jsxs("div", { className: "wandox-console-field", children: [
|
|
250
280
|
/* @__PURE__ */ e.jsxs("label", { htmlFor: `wc-param-${o.name}`, children: [
|
|
251
281
|
/* @__PURE__ */ e.jsx("span", { className: "wandox-console-field__label-text", children: o.label || o.name }),
|
|
252
|
-
o.description || o.hint ? /* @__PURE__ */ e.jsx(
|
|
253
|
-
|
|
282
|
+
o.description || o.hint ? /* @__PURE__ */ e.jsx(us, { title: o.description || o.hint, children: /* @__PURE__ */ e.jsx(
|
|
283
|
+
an,
|
|
254
284
|
{
|
|
255
285
|
"aria-label": `${o.label || o.name}说明`
|
|
256
286
|
}
|
|
@@ -259,193 +289,193 @@ function fa({
|
|
|
259
289
|
_ && /* @__PURE__ */ e.jsx("span", { className: "wandox-console-field__required", children: "多值" })
|
|
260
290
|
] }),
|
|
261
291
|
/* @__PURE__ */ e.jsx(
|
|
262
|
-
|
|
292
|
+
zn,
|
|
263
293
|
{
|
|
264
294
|
field: o,
|
|
265
|
-
value:
|
|
266
|
-
uploading:
|
|
267
|
-
fileNameMap:
|
|
295
|
+
value: l,
|
|
296
|
+
uploading: u,
|
|
297
|
+
fileNameMap: r,
|
|
268
298
|
getOptionState: p,
|
|
269
|
-
onChange:
|
|
270
|
-
onUpload:
|
|
271
|
-
onDownloadTemplate: (
|
|
299
|
+
onChange: k,
|
|
300
|
+
onUpload: R,
|
|
301
|
+
onDownloadTemplate: (T) => window.open(T.path, "_blank", "noopener,noreferrer")
|
|
272
302
|
}
|
|
273
303
|
)
|
|
274
304
|
] });
|
|
275
305
|
}
|
|
276
|
-
function
|
|
306
|
+
function wo(o) {
|
|
277
307
|
if (Array.isArray(o)) return o;
|
|
278
|
-
const
|
|
279
|
-
return Array.isArray(
|
|
308
|
+
const l = o;
|
|
309
|
+
return Array.isArray(l == null ? void 0 : l.user_playbooks) ? l.user_playbooks : [];
|
|
280
310
|
}
|
|
281
|
-
function
|
|
311
|
+
function yo({
|
|
282
312
|
agentId: o,
|
|
283
|
-
agentName:
|
|
284
|
-
playbookId:
|
|
285
|
-
playbookParams:
|
|
313
|
+
agentName: l,
|
|
314
|
+
playbookId: u,
|
|
315
|
+
playbookParams: r,
|
|
286
316
|
initialMessage: p,
|
|
287
|
-
initialAttachments:
|
|
288
|
-
useMapCards:
|
|
317
|
+
initialAttachments: k,
|
|
318
|
+
useMapCards: P = [],
|
|
289
319
|
useMapCategories: _ = [],
|
|
290
|
-
playbooks:
|
|
291
|
-
userPlaybooks:
|
|
292
|
-
agents:
|
|
293
|
-
onChangeAgent:
|
|
320
|
+
playbooks: R = [],
|
|
321
|
+
userPlaybooks: T = [],
|
|
322
|
+
agents: ae = [],
|
|
323
|
+
onChangeAgent: Q,
|
|
294
324
|
onBack: le,
|
|
295
|
-
onSelectScene:
|
|
296
|
-
onReady:
|
|
325
|
+
onSelectScene: $,
|
|
326
|
+
onReady: q
|
|
297
327
|
}) {
|
|
298
|
-
const
|
|
299
|
-
|
|
300
|
-
if (!I ||
|
|
301
|
-
const
|
|
328
|
+
const M = localStorage.getItem("sso_token") || "", S = localStorage.getItem("sso_domain") || "maiduo", h = localStorage.getItem("sso_company") || "", D = s.useRef(null), ie = s.useRef(!1), [F, E] = s.useState(!1), [W, oe] = s.useState(""), [te, H] = s.useState(""), [V, U] = s.useState("map"), [Y, re] = s.useState(xa), [I, B] = s.useState(null), ke = s.useRef(null), xe = s.useRef(null), [de, je] = s.useState(!1), [pe, Re] = s.useState([]), [$e, Ne] = s.useState("");
|
|
329
|
+
s.useEffect(() => {
|
|
330
|
+
if (!I || F) return;
|
|
331
|
+
const a = setTimeout(() => {
|
|
302
332
|
var n;
|
|
303
|
-
(n =
|
|
333
|
+
(n = ke.current) == null || n.focus();
|
|
304
334
|
}, 120);
|
|
305
|
-
return () => clearTimeout(
|
|
306
|
-
}, [I,
|
|
307
|
-
if (!I ||
|
|
308
|
-
const
|
|
309
|
-
const c = xe.current,
|
|
310
|
-
!c || !(
|
|
335
|
+
return () => clearTimeout(a);
|
|
336
|
+
}, [I, F]), s.useEffect(() => {
|
|
337
|
+
if (!I || F) return;
|
|
338
|
+
const a = (n) => {
|
|
339
|
+
const c = xe.current, i = n.target;
|
|
340
|
+
!c || !(i instanceof Node) || c.contains(i) || i instanceof Element && i.closest(
|
|
311
341
|
".ant-select-dropdown, .ant-picker-dropdown, .ant-tooltip, .ant-dropdown, .ant-popover, .ant-modal-wrap, .ant-drawer-content-wrapper, .ant-message, .ant-notification"
|
|
312
|
-
) || (B(null),
|
|
342
|
+
) || (B(null), K([]), X({}));
|
|
313
343
|
};
|
|
314
|
-
return document.addEventListener("mousedown",
|
|
315
|
-
}, [I,
|
|
316
|
-
const [
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
),
|
|
321
|
-
() =>
|
|
322
|
-
(
|
|
344
|
+
return document.addEventListener("mousedown", a), () => document.removeEventListener("mousedown", a);
|
|
345
|
+
}, [I, F]);
|
|
346
|
+
const [Z, K] = s.useState([]), [G, X] = s.useState({}), ee = ms(
|
|
347
|
+
Z,
|
|
348
|
+
G,
|
|
349
|
+
X
|
|
350
|
+
), _e = s.useMemo(
|
|
351
|
+
() => na(Z, G).filter(
|
|
352
|
+
(a) => a.required && ga(G[a.name])
|
|
323
353
|
),
|
|
324
|
-
[
|
|
325
|
-
), [
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
showInspectionResults: (
|
|
329
|
-
x("robot"),
|
|
354
|
+
[Z, G]
|
|
355
|
+
), [J, x] = s.useState("chat"), [b, ce] = s.useState([]), [f, Ce] = s.useState(null), [ue, Ie] = s.useState("results"), [oa, qe] = s.useState(!1), [be, Pe] = s.useState([]), [ta, We] = s.useState(!1), [Me, Ee] = s.useState([]), [se, t] = s.useState([]), [w, N] = s.useState({}), [j, y] = s.useState(!1), [O, ve] = s.useState(null), [z, A] = s.useState(void 0), [fe, Ae] = s.useState(!1), [me, He] = s.useState(!1);
|
|
356
|
+
s.useEffect(() => {
|
|
357
|
+
q == null || q({
|
|
358
|
+
showInspectionResults: (a) => {
|
|
359
|
+
x("robot"), Ie("results"), Ce(a || null);
|
|
330
360
|
}
|
|
331
361
|
});
|
|
332
|
-
}, [
|
|
333
|
-
const [
|
|
362
|
+
}, [q]);
|
|
363
|
+
const [Le, vs] = s.useState([]), [Te, Se] = s.useState(!1), [Ue, ks] = s.useState(void 0), [$a, Ia] = s.useState([]), [ca, Ea] = s.useState(""), [la, Ns] = s.useState(
|
|
334
364
|
"map"
|
|
335
|
-
), [
|
|
336
|
-
|
|
337
|
-
), [
|
|
365
|
+
), [Cs, Oe] = s.useState(void 0), Ke = s.useRef(0), De = s.useRef(0), [Ge, Aa] = s.useState(
|
|
366
|
+
Xa
|
|
367
|
+
), [ia, Pa] = s.useState({}), [Qe, Ma] = s.useState(
|
|
338
368
|
() => /* @__PURE__ */ new Set()
|
|
339
|
-
),
|
|
340
|
-
(
|
|
341
|
-
key: `${n}-${
|
|
342
|
-
title:
|
|
343
|
-
desc:
|
|
369
|
+
), ra = s.useCallback(
|
|
370
|
+
(a, n, c) => ({
|
|
371
|
+
key: `${n}-${a.playbook_id}`,
|
|
372
|
+
title: a.name || "未命名场景",
|
|
373
|
+
desc: a.description || "",
|
|
344
374
|
reason: c,
|
|
345
375
|
tags: [],
|
|
346
|
-
playbook_id:
|
|
347
|
-
input_fields:
|
|
376
|
+
playbook_id: a.playbook_id,
|
|
377
|
+
input_fields: a.input_fields || [],
|
|
348
378
|
categoryKey: n,
|
|
349
|
-
video_url:
|
|
350
|
-
video_duration:
|
|
351
|
-
view_count:
|
|
379
|
+
video_url: a.video_url,
|
|
380
|
+
video_duration: a.video_duration,
|
|
381
|
+
view_count: a.view_count
|
|
352
382
|
}),
|
|
353
383
|
[]
|
|
354
|
-
), Fe =
|
|
355
|
-
const
|
|
356
|
-
(
|
|
384
|
+
), Fe = s.useMemo(() => {
|
|
385
|
+
const a = T.map(
|
|
386
|
+
(m) => ra(m, ts, "我的场景")
|
|
357
387
|
), n = /* @__PURE__ */ new Map();
|
|
358
|
-
for (const
|
|
359
|
-
const
|
|
360
|
-
|
|
388
|
+
for (const m of R) {
|
|
389
|
+
const v = m.category_name || m.category || m.type || "默认场景", g = `${xo}${v}`, ge = n.get(g) || [];
|
|
390
|
+
ge.push(ra(m, g, v)), n.set(g, ge);
|
|
361
391
|
}
|
|
362
|
-
const c = Array.from(n.values()).flat(),
|
|
392
|
+
const c = Array.from(n.values()).flat(), i = [
|
|
363
393
|
{
|
|
364
|
-
key:
|
|
394
|
+
key: pa,
|
|
365
395
|
name: "全部场景",
|
|
366
396
|
count: c.length,
|
|
367
397
|
cards: c
|
|
368
398
|
},
|
|
369
|
-
...Array.from(n, ([
|
|
370
|
-
var
|
|
399
|
+
...Array.from(n, ([m, v]) => {
|
|
400
|
+
var g;
|
|
371
401
|
return {
|
|
372
|
-
key:
|
|
373
|
-
name: ((
|
|
374
|
-
count:
|
|
375
|
-
cards:
|
|
402
|
+
key: m,
|
|
403
|
+
name: ((g = v[0]) == null ? void 0 : g.reason) || "默认场景",
|
|
404
|
+
count: v.length,
|
|
405
|
+
cards: v
|
|
376
406
|
};
|
|
377
407
|
})
|
|
378
|
-
],
|
|
408
|
+
], d = [
|
|
379
409
|
{
|
|
380
|
-
key:
|
|
410
|
+
key: xa,
|
|
381
411
|
name: "全部场景",
|
|
382
|
-
count:
|
|
383
|
-
cards:
|
|
412
|
+
count: P.length,
|
|
413
|
+
cards: P
|
|
384
414
|
},
|
|
385
|
-
..._.map((
|
|
386
|
-
key:
|
|
387
|
-
name:
|
|
388
|
-
count:
|
|
389
|
-
cards:
|
|
415
|
+
..._.map((m) => ({
|
|
416
|
+
key: m.key,
|
|
417
|
+
name: m.name,
|
|
418
|
+
count: m.count,
|
|
419
|
+
cards: P.filter((v) => v.categoryKey === m.key)
|
|
390
420
|
}))
|
|
391
421
|
];
|
|
392
|
-
return { allCategories:
|
|
422
|
+
return { allCategories: i, mapCategories: d, myCards: a };
|
|
393
423
|
}, [
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
424
|
+
l,
|
|
425
|
+
R,
|
|
426
|
+
ra,
|
|
427
|
+
P,
|
|
398
428
|
_,
|
|
399
|
-
|
|
400
|
-
]),
|
|
401
|
-
() =>
|
|
402
|
-
(
|
|
429
|
+
T
|
|
430
|
+
]), da = s.useMemo(() => V === "all" ? Fe.allCategories : V === "map" ? Fe.mapCategories : [], [Fe, V]), Ye = s.useMemo(
|
|
431
|
+
() => P.map(
|
|
432
|
+
(a) => ({
|
|
403
433
|
category: null,
|
|
404
|
-
category_name:
|
|
405
|
-
description:
|
|
434
|
+
category_name: a.reason,
|
|
435
|
+
description: a.desc,
|
|
406
436
|
domain: "",
|
|
407
437
|
id: 0,
|
|
408
|
-
name:
|
|
409
|
-
playbook_id:
|
|
438
|
+
name: a.title,
|
|
439
|
+
playbook_id: a.playbook_id,
|
|
410
440
|
scope: "usemap",
|
|
411
441
|
status: "available",
|
|
412
442
|
sub_category: null,
|
|
413
|
-
tags:
|
|
414
|
-
input_fields:
|
|
415
|
-
video_url:
|
|
416
|
-
video_duration:
|
|
417
|
-
view_count:
|
|
443
|
+
tags: a.tags.map((n) => n.name),
|
|
444
|
+
input_fields: a.input_fields,
|
|
445
|
+
video_url: a.video_url,
|
|
446
|
+
video_duration: a.video_duration,
|
|
447
|
+
view_count: a.view_count,
|
|
418
448
|
type: "",
|
|
419
449
|
version: ""
|
|
420
450
|
})
|
|
421
451
|
),
|
|
422
|
-
[
|
|
423
|
-
),
|
|
424
|
-
const
|
|
452
|
+
[P]
|
|
453
|
+
), Ss = s.useMemo(() => {
|
|
454
|
+
const a = /* @__PURE__ */ new Map();
|
|
425
455
|
for (const n of [
|
|
426
|
-
...
|
|
427
|
-
...
|
|
428
|
-
...
|
|
456
|
+
...R,
|
|
457
|
+
...T,
|
|
458
|
+
...Ye
|
|
429
459
|
])
|
|
430
|
-
n.playbook_id &&
|
|
431
|
-
return Array.from(
|
|
432
|
-
}, [
|
|
433
|
-
const
|
|
434
|
-
for (const n of
|
|
435
|
-
const c = n.category_name || n.category || n.type || "默认场景",
|
|
436
|
-
|
|
460
|
+
n.playbook_id && a.set(n.playbook_id, n);
|
|
461
|
+
return Array.from(a.values());
|
|
462
|
+
}, [R, T, Ye]), Rs = s.useMemo(() => {
|
|
463
|
+
const a = /* @__PURE__ */ new Map();
|
|
464
|
+
for (const n of R) {
|
|
465
|
+
const c = n.category_name || n.category || n.type || "默认场景", i = a.get(c) || [];
|
|
466
|
+
i.push(n), a.set(c, i);
|
|
437
467
|
}
|
|
438
468
|
return [
|
|
439
469
|
{ key: "__my__", label: "我的场景", playbooks: [] },
|
|
440
|
-
...Array.from(
|
|
470
|
+
...Array.from(a, ([n, c]) => ({
|
|
441
471
|
key: `all:${n}`,
|
|
442
472
|
label: n,
|
|
443
473
|
playbooks: c
|
|
444
474
|
}))
|
|
445
475
|
];
|
|
446
|
-
}, [
|
|
447
|
-
const
|
|
448
|
-
|
|
476
|
+
}, [R]), $s = s.useMemo(() => {
|
|
477
|
+
const a = new Map(
|
|
478
|
+
Ye.map((n) => [
|
|
449
479
|
n.playbook_id,
|
|
450
480
|
n
|
|
451
481
|
])
|
|
@@ -453,154 +483,154 @@ function uo({
|
|
|
453
483
|
return _.map((n) => ({
|
|
454
484
|
key: `map:${n.key}`,
|
|
455
485
|
label: n.name,
|
|
456
|
-
playbooks:
|
|
486
|
+
playbooks: P.filter((c) => c.categoryKey === n.key).map((c) => a.get(c.playbook_id)).filter((c) => !!c)
|
|
457
487
|
}));
|
|
458
|
-
}, [
|
|
488
|
+
}, [P, _, Ye]), Is = la === "map" ? $s : Rs, Es = s.useMemo(() => {
|
|
459
489
|
var c;
|
|
460
|
-
const
|
|
461
|
-
return
|
|
462
|
-
(
|
|
490
|
+
const a = te.trim().toLowerCase(), n = V === "my" ? Fe.myCards : ((c = da.find((i) => i.key === Y)) == null ? void 0 : c.cards) || [];
|
|
491
|
+
return a ? n.filter(
|
|
492
|
+
(i) => i.title.toLowerCase().includes(a) || i.desc.toLowerCase().includes(a)
|
|
463
493
|
) : n;
|
|
464
494
|
}, [
|
|
465
|
-
|
|
466
|
-
|
|
495
|
+
da,
|
|
496
|
+
Y,
|
|
467
497
|
Fe.myCards,
|
|
468
498
|
V,
|
|
469
499
|
te
|
|
470
|
-
]),
|
|
471
|
-
const n = Array.isArray(
|
|
472
|
-
|
|
473
|
-
}, []), he =
|
|
474
|
-
() =>
|
|
475
|
-
[
|
|
476
|
-
), { messageData:
|
|
500
|
+
]), As = s.useCallback((a) => {
|
|
501
|
+
const n = Array.isArray(a) ? a : [];
|
|
502
|
+
vs(n), Se(n.length > 0);
|
|
503
|
+
}, []), he = s.useMemo(
|
|
504
|
+
() => ae.find((a) => a.id === o),
|
|
505
|
+
[ae, o]
|
|
506
|
+
), { messageData: Ps, executing: L, stopping: Ms, actions: Ls } = qn({
|
|
477
507
|
activeAgent: o,
|
|
478
|
-
ssoToken:
|
|
479
|
-
ssoDomain:
|
|
480
|
-
ssoCompany:
|
|
481
|
-
onRecommendationsUpdate:
|
|
508
|
+
ssoToken: M,
|
|
509
|
+
ssoDomain: S,
|
|
510
|
+
ssoCompany: h,
|
|
511
|
+
onRecommendationsUpdate: As
|
|
482
512
|
}), {
|
|
483
|
-
sendMessage:
|
|
484
|
-
executePlaybook:
|
|
485
|
-
respondToProposal:
|
|
486
|
-
stopCurrent:
|
|
487
|
-
retrigger:
|
|
488
|
-
} =
|
|
489
|
-
messages:
|
|
490
|
-
messagesTotal:
|
|
491
|
-
loading:
|
|
492
|
-
loadMessages:
|
|
493
|
-
loadMoreMessages:
|
|
494
|
-
} =
|
|
495
|
-
for (let
|
|
496
|
-
if (
|
|
497
|
-
}, [
|
|
498
|
-
if (!o || !
|
|
499
|
-
|
|
513
|
+
sendMessage: Ze,
|
|
514
|
+
executePlaybook: La,
|
|
515
|
+
respondToProposal: Ta,
|
|
516
|
+
stopCurrent: Ts,
|
|
517
|
+
retrigger: Oa
|
|
518
|
+
} = Ls, {
|
|
519
|
+
messages: we,
|
|
520
|
+
messagesTotal: Da,
|
|
521
|
+
loading: Fa,
|
|
522
|
+
loadMessages: Va,
|
|
523
|
+
loadMoreMessages: Ba
|
|
524
|
+
} = Ps, Je = s.useMemo(() => {
|
|
525
|
+
for (let a = we.length - 1; a >= 0; a--)
|
|
526
|
+
if (we[a].role === "assistant") return we[a].id;
|
|
527
|
+
}, [we]), Xe = s.useCallback(async () => {
|
|
528
|
+
if (!o || !M) {
|
|
529
|
+
Ia([]);
|
|
500
530
|
return;
|
|
501
531
|
}
|
|
502
532
|
try {
|
|
503
|
-
const
|
|
533
|
+
const a = await sn({
|
|
504
534
|
agent_id: o,
|
|
505
535
|
limit: 8
|
|
506
536
|
});
|
|
507
|
-
|
|
537
|
+
Ia(Array.isArray(a.data) ? a.data : []);
|
|
508
538
|
} catch {
|
|
509
539
|
}
|
|
510
|
-
}, [o,
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
}, [
|
|
514
|
-
const
|
|
515
|
-
async (
|
|
516
|
-
await
|
|
540
|
+
}, [o, M]);
|
|
541
|
+
s.useEffect(() => {
|
|
542
|
+
Xe();
|
|
543
|
+
}, [Xe]);
|
|
544
|
+
const ne = s.useCallback(
|
|
545
|
+
async (a) => {
|
|
546
|
+
await La(a), Xe();
|
|
517
547
|
},
|
|
518
|
-
[
|
|
519
|
-
),
|
|
520
|
-
const n = String(
|
|
548
|
+
[La, Xe]
|
|
549
|
+
), za = s.useCallback(async (a) => {
|
|
550
|
+
const n = String(a.playbook_id || "").trim();
|
|
521
551
|
if (!n) throw new Error("场景缺少 playbook_id");
|
|
522
|
-
const { data: c } = await
|
|
552
|
+
const { data: c } = await ba({
|
|
523
553
|
playbook_id: n
|
|
524
554
|
});
|
|
525
|
-
return
|
|
555
|
+
return es(a, c);
|
|
526
556
|
}, []);
|
|
527
|
-
|
|
557
|
+
s.useEffect(() => {
|
|
528
558
|
ie.current || (ie.current = !0, (async () => {
|
|
529
|
-
if (await
|
|
530
|
-
const
|
|
531
|
-
|
|
532
|
-
message:
|
|
533
|
-
playbook_id:
|
|
534
|
-
playbook_params:
|
|
559
|
+
if (await Va(), u) {
|
|
560
|
+
const a = (p == null ? void 0 : p.trim()) || "执行场景";
|
|
561
|
+
ne({
|
|
562
|
+
message: a,
|
|
563
|
+
playbook_id: u,
|
|
564
|
+
playbook_params: r || {}
|
|
535
565
|
});
|
|
536
|
-
} else p != null && p.trim() &&
|
|
566
|
+
} else p != null && p.trim() && Ze(p.trim(), void 0, k);
|
|
537
567
|
})());
|
|
538
568
|
}, [
|
|
539
|
-
|
|
569
|
+
u,
|
|
540
570
|
p,
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
]),
|
|
571
|
+
k,
|
|
572
|
+
r,
|
|
573
|
+
ne,
|
|
574
|
+
Va,
|
|
575
|
+
Ze
|
|
576
|
+
]), s.useEffect(() => {
|
|
547
577
|
if (!o) return;
|
|
548
|
-
let
|
|
578
|
+
let a = !1;
|
|
549
579
|
return (async () => {
|
|
550
580
|
try {
|
|
551
|
-
const { data: n } = await
|
|
552
|
-
if (
|
|
581
|
+
const { data: n } = await nn({ agent_id: o });
|
|
582
|
+
if (a) return;
|
|
553
583
|
const c = (n == null ? void 0 : n.children) || [];
|
|
554
|
-
|
|
584
|
+
ce(c), Ce(null);
|
|
555
585
|
} catch {
|
|
556
|
-
|
|
586
|
+
ce([]);
|
|
557
587
|
}
|
|
558
588
|
})(), () => {
|
|
559
|
-
|
|
589
|
+
a = !0;
|
|
560
590
|
};
|
|
561
|
-
}, [o]),
|
|
562
|
-
|
|
563
|
-
}, [
|
|
564
|
-
if (
|
|
565
|
-
|
|
591
|
+
}, [o]), s.useEffect(() => {
|
|
592
|
+
Je && Je !== Ue && ks(Je);
|
|
593
|
+
}, [Je, Ue]), s.useEffect(() => {
|
|
594
|
+
if (J !== "robot" || ue !== "history" || !f) {
|
|
595
|
+
Pe([]);
|
|
566
596
|
return;
|
|
567
597
|
}
|
|
568
|
-
const
|
|
569
|
-
if (!
|
|
598
|
+
const a = b.find((c) => c.name === f);
|
|
599
|
+
if (!a) return;
|
|
570
600
|
let n = !1;
|
|
571
|
-
return
|
|
601
|
+
return qe(!0), (async () => {
|
|
572
602
|
try {
|
|
573
|
-
const c = await
|
|
574
|
-
agent_id:
|
|
603
|
+
const c = await on({
|
|
604
|
+
agent_id: a.agent_id,
|
|
575
605
|
limit: 50
|
|
576
606
|
});
|
|
577
607
|
if (n) return;
|
|
578
|
-
const
|
|
579
|
-
(
|
|
580
|
-
id:
|
|
581
|
-
action_name:
|
|
582
|
-
status:
|
|
583
|
-
created_at:
|
|
584
|
-
completed_at:
|
|
585
|
-
output_data:
|
|
586
|
-
error:
|
|
608
|
+
const d = (Array.isArray(c == null ? void 0 : c.data) ? c.data : []).map(
|
|
609
|
+
(m, v) => ({
|
|
610
|
+
id: m.id || m.execute_id || `record_${v}`,
|
|
611
|
+
action_name: m.action_name || m.display_name || "未知动作",
|
|
612
|
+
status: m.status || "pending",
|
|
613
|
+
created_at: m.created_at || "",
|
|
614
|
+
completed_at: m.completed_at,
|
|
615
|
+
output_data: m.output_data,
|
|
616
|
+
error: m.error
|
|
587
617
|
})
|
|
588
618
|
);
|
|
589
|
-
|
|
619
|
+
Pe(d);
|
|
590
620
|
} catch {
|
|
591
|
-
|
|
621
|
+
Pe([]);
|
|
592
622
|
} finally {
|
|
593
|
-
n ||
|
|
623
|
+
n || qe(!1);
|
|
594
624
|
}
|
|
595
625
|
})(), () => {
|
|
596
626
|
n = !0;
|
|
597
627
|
};
|
|
598
|
-
}, [
|
|
599
|
-
const
|
|
628
|
+
}, [J, ue, f, b]);
|
|
629
|
+
const qa = s.useCallback(async () => {
|
|
600
630
|
try {
|
|
601
|
-
const
|
|
602
|
-
Array.isArray(
|
|
603
|
-
|
|
631
|
+
const a = await tn({});
|
|
632
|
+
Array.isArray(a == null ? void 0 : a.data) && t(
|
|
633
|
+
a.data.map((n) => ({
|
|
604
634
|
webhook_id: n.webhook_id || "",
|
|
605
635
|
name: n.name || "未命名渠道",
|
|
606
636
|
platform: n.platform || ""
|
|
@@ -608,288 +638,288 @@ function uo({
|
|
|
608
638
|
);
|
|
609
639
|
} catch {
|
|
610
640
|
}
|
|
611
|
-
}, []),
|
|
641
|
+
}, []), ea = s.useCallback(async () => {
|
|
612
642
|
try {
|
|
613
|
-
const
|
|
643
|
+
const a = {};
|
|
614
644
|
await Promise.all(
|
|
615
|
-
|
|
645
|
+
b.map(async (n) => {
|
|
616
646
|
var c;
|
|
617
647
|
try {
|
|
618
|
-
const
|
|
648
|
+
const i = await cn(
|
|
619
649
|
n.agent_id,
|
|
620
650
|
{}
|
|
621
|
-
),
|
|
622
|
-
|
|
651
|
+
), d = (c = i == null ? void 0 : i.data) == null ? void 0 : c.webhook_id;
|
|
652
|
+
d && (a[n.agent_id] = d);
|
|
623
653
|
} catch {
|
|
624
654
|
}
|
|
625
655
|
})
|
|
626
|
-
),
|
|
656
|
+
), N(a);
|
|
627
657
|
} catch {
|
|
628
658
|
}
|
|
629
|
-
}, [
|
|
659
|
+
}, [b]), Wa = s.useCallback(async () => {
|
|
630
660
|
if (o) {
|
|
631
|
-
|
|
661
|
+
We(!0);
|
|
632
662
|
try {
|
|
633
|
-
const
|
|
663
|
+
const a = await ln({
|
|
634
664
|
agent_id: o,
|
|
635
665
|
limit: 20,
|
|
636
666
|
use_cache: !1
|
|
637
|
-
}), c = (Array.isArray(
|
|
638
|
-
const
|
|
667
|
+
}), c = (Array.isArray(a == null ? void 0 : a.data) ? a.data : []).map((i) => {
|
|
668
|
+
const d = i.ui_payload || i.outputs || void 0;
|
|
639
669
|
return {
|
|
640
|
-
id:
|
|
641
|
-
title:
|
|
642
|
-
summary:
|
|
643
|
-
priority:
|
|
644
|
-
timestamp:
|
|
645
|
-
ui_payload:
|
|
646
|
-
agent_name:
|
|
670
|
+
id: i.inbox_id || i.id || "",
|
|
671
|
+
title: i.title || "巡检结果",
|
|
672
|
+
summary: i.summary || "",
|
|
673
|
+
priority: i.priority || "medium",
|
|
674
|
+
timestamp: i.created_at || "",
|
|
675
|
+
ui_payload: d,
|
|
676
|
+
agent_name: i.agent_name || i.agent_id || ""
|
|
647
677
|
};
|
|
648
678
|
}).sort(
|
|
649
|
-
(
|
|
679
|
+
(i, d) => new Date(d.timestamp || 0).getTime() - new Date(i.timestamp || 0).getTime()
|
|
650
680
|
);
|
|
651
|
-
|
|
681
|
+
Ee(c);
|
|
652
682
|
} catch {
|
|
653
|
-
|
|
683
|
+
Ee([]);
|
|
654
684
|
} finally {
|
|
655
|
-
|
|
685
|
+
We(!1);
|
|
656
686
|
}
|
|
657
687
|
}
|
|
658
688
|
}, [o]);
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
}, [
|
|
662
|
-
|
|
663
|
-
}, [
|
|
664
|
-
const
|
|
665
|
-
|
|
666
|
-
},
|
|
667
|
-
if (!
|
|
668
|
-
|
|
689
|
+
s.useEffect(() => {
|
|
690
|
+
qa(), b.length > 0 && ea();
|
|
691
|
+
}, [b, qa, ea]), s.useEffect(() => {
|
|
692
|
+
J === "robot" && ue === "results" && Wa();
|
|
693
|
+
}, [J, ue, Wa]);
|
|
694
|
+
const Os = (a) => {
|
|
695
|
+
ve(a), A(w[a.agent_id]), y(!0);
|
|
696
|
+
}, Ds = async () => {
|
|
697
|
+
if (!O || !z) {
|
|
698
|
+
C.warning("请选择通知渠道");
|
|
669
699
|
return;
|
|
670
700
|
}
|
|
671
701
|
try {
|
|
672
|
-
|
|
702
|
+
Ae(!0), await In(
|
|
673
703
|
{},
|
|
674
704
|
{
|
|
675
|
-
agent_id:
|
|
676
|
-
webhook_id:
|
|
705
|
+
agent_id: O.agent_id,
|
|
706
|
+
webhook_id: z
|
|
677
707
|
}
|
|
678
|
-
),
|
|
679
|
-
} catch (
|
|
680
|
-
|
|
708
|
+
), C.success("绑定成功"), y(!1), await ea();
|
|
709
|
+
} catch (a) {
|
|
710
|
+
C.error((a == null ? void 0 : a.message) || "绑定失败");
|
|
681
711
|
} finally {
|
|
682
|
-
|
|
712
|
+
Ae(!1);
|
|
683
713
|
}
|
|
684
|
-
},
|
|
685
|
-
if (
|
|
714
|
+
}, Fs = async () => {
|
|
715
|
+
if (O)
|
|
686
716
|
try {
|
|
687
|
-
|
|
688
|
-
|
|
717
|
+
Ae(!0), await En(
|
|
718
|
+
O.agent_id,
|
|
689
719
|
{}
|
|
690
|
-
),
|
|
691
|
-
} catch (
|
|
692
|
-
|
|
720
|
+
), C.success("解绑成功"), y(!1), A(void 0), await ea();
|
|
721
|
+
} catch (a) {
|
|
722
|
+
C.error((a == null ? void 0 : a.message) || "解绑失败");
|
|
693
723
|
} finally {
|
|
694
|
-
|
|
724
|
+
Ae(!1);
|
|
695
725
|
}
|
|
696
|
-
},
|
|
697
|
-
var
|
|
698
|
-
const n = (
|
|
699
|
-
return (n ? n[1] :
|
|
700
|
-
}) :
|
|
701
|
-
if (!
|
|
726
|
+
}, ua = s.useMemo(() => f ? Me.filter((a) => {
|
|
727
|
+
var i;
|
|
728
|
+
const n = (i = a.title) == null ? void 0 : i.match(/^(.+?)\s*巡检结果$/);
|
|
729
|
+
return (n ? n[1] : a.agent_name) === f;
|
|
730
|
+
}) : Me, [Me, f]), Vs = (a) => {
|
|
731
|
+
if (!a) return "";
|
|
702
732
|
try {
|
|
703
|
-
return new Date(
|
|
733
|
+
return new Date(a).toLocaleString("zh-CN", {
|
|
704
734
|
month: "2-digit",
|
|
705
735
|
day: "2-digit",
|
|
706
736
|
hour: "2-digit",
|
|
707
737
|
minute: "2-digit"
|
|
708
738
|
});
|
|
709
739
|
} catch {
|
|
710
|
-
return
|
|
740
|
+
return a;
|
|
711
741
|
}
|
|
712
|
-
},
|
|
713
|
-
(
|
|
742
|
+
}, ma = s.useCallback(
|
|
743
|
+
(a, n, c) => {
|
|
714
744
|
if (Se(!1), n) {
|
|
715
|
-
|
|
716
|
-
message:
|
|
745
|
+
ne({
|
|
746
|
+
message: a,
|
|
717
747
|
playbook_id: n
|
|
718
748
|
});
|
|
719
749
|
return;
|
|
720
750
|
}
|
|
721
|
-
|
|
751
|
+
Ze(a, void 0, c);
|
|
722
752
|
},
|
|
723
|
-
[
|
|
724
|
-
),
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
),
|
|
728
|
-
}, []),
|
|
729
|
-
|
|
730
|
-
}, []),
|
|
731
|
-
|
|
732
|
-
}, []),
|
|
733
|
-
(
|
|
753
|
+
[ne, Ze]
|
|
754
|
+
), Bs = s.useCallback((a) => {
|
|
755
|
+
U(a), re(
|
|
756
|
+
a === "all" ? pa : a === "map" ? xa : ts
|
|
757
|
+
), H(""), B(null), K([]), X({});
|
|
758
|
+
}, []), zs = s.useCallback(() => {
|
|
759
|
+
U("all"), re(pa), H(""), B(null), K([]), X({}), E(!0);
|
|
760
|
+
}, []), qs = s.useCallback(() => {
|
|
761
|
+
E(!1), B(null), K([]), X({});
|
|
762
|
+
}, []), ye = s.useCallback(
|
|
763
|
+
(a, n = {}) => {
|
|
734
764
|
B({
|
|
735
|
-
key:
|
|
736
|
-
playbook_id:
|
|
737
|
-
title:
|
|
738
|
-
desc:
|
|
765
|
+
key: a.playbook_id,
|
|
766
|
+
playbook_id: a.playbook_id,
|
|
767
|
+
title: a.name,
|
|
768
|
+
desc: a.description ?? "",
|
|
739
769
|
reason: "",
|
|
740
770
|
tags: [],
|
|
741
771
|
categoryKey: "",
|
|
742
|
-
input_fields:
|
|
772
|
+
input_fields: a.input_fields || []
|
|
743
773
|
});
|
|
744
|
-
const c =
|
|
745
|
-
|
|
774
|
+
const c = hs(a.input_fields || []);
|
|
775
|
+
K(c), X(ps(c, n));
|
|
746
776
|
},
|
|
747
777
|
[]
|
|
748
|
-
),
|
|
749
|
-
async (
|
|
778
|
+
), Ws = s.useCallback(
|
|
779
|
+
async (a) => {
|
|
750
780
|
var c;
|
|
751
|
-
if (L ||
|
|
752
|
-
const n = String(
|
|
781
|
+
if (L || W) return;
|
|
782
|
+
const n = String(a.playbook_id || "").trim();
|
|
753
783
|
if (!n) {
|
|
754
|
-
|
|
784
|
+
C.error("场景缺少 playbook_id");
|
|
755
785
|
return;
|
|
756
786
|
}
|
|
757
787
|
oe(n);
|
|
758
788
|
try {
|
|
759
|
-
const
|
|
789
|
+
const i = {
|
|
760
790
|
category: null,
|
|
761
|
-
category_name:
|
|
762
|
-
description:
|
|
791
|
+
category_name: a.reason || void 0,
|
|
792
|
+
description: a.desc,
|
|
763
793
|
domain: "",
|
|
764
794
|
id: 0,
|
|
765
|
-
name:
|
|
795
|
+
name: a.title,
|
|
766
796
|
playbook_id: n,
|
|
767
797
|
scope: "",
|
|
768
798
|
status: "available",
|
|
769
799
|
sub_category: null,
|
|
770
|
-
tags:
|
|
800
|
+
tags: a.tags.map((v) => v.name),
|
|
771
801
|
type: "",
|
|
772
802
|
version: "",
|
|
773
|
-
input_fields:
|
|
774
|
-
video_url:
|
|
775
|
-
video_duration:
|
|
776
|
-
view_count:
|
|
777
|
-
}, { data:
|
|
803
|
+
input_fields: a.input_fields,
|
|
804
|
+
video_url: a.video_url,
|
|
805
|
+
video_duration: a.video_duration,
|
|
806
|
+
view_count: a.view_count
|
|
807
|
+
}, { data: d } = await ba({
|
|
778
808
|
playbook_id: n
|
|
779
809
|
});
|
|
780
|
-
if (!
|
|
810
|
+
if (!d || typeof d != "object" || Array.isArray(d))
|
|
781
811
|
throw new Error("场景详情为空");
|
|
782
|
-
const
|
|
783
|
-
if (
|
|
784
|
-
|
|
812
|
+
const m = es(i, d);
|
|
813
|
+
if (E(!1), (c = m.input_fields) != null && c.length) {
|
|
814
|
+
ye(m);
|
|
785
815
|
return;
|
|
786
816
|
}
|
|
787
|
-
|
|
788
|
-
} catch (
|
|
789
|
-
const
|
|
790
|
-
|
|
817
|
+
ma(m.name, m.playbook_id), $ == null || $(a);
|
|
818
|
+
} catch (i) {
|
|
819
|
+
const d = i instanceof Error ? i.message : "场景加载失败";
|
|
820
|
+
C.error(d);
|
|
791
821
|
} finally {
|
|
792
822
|
oe("");
|
|
793
823
|
}
|
|
794
824
|
},
|
|
795
825
|
[
|
|
796
826
|
L,
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
827
|
+
ye,
|
|
828
|
+
ma,
|
|
829
|
+
$,
|
|
830
|
+
W
|
|
801
831
|
]
|
|
802
|
-
),
|
|
803
|
-
async (
|
|
832
|
+
), Ha = s.useCallback(
|
|
833
|
+
async (a) => {
|
|
804
834
|
if (!L) {
|
|
805
|
-
if (Se(!1),
|
|
806
|
-
|
|
835
|
+
if (Se(!1), a.input_fields && a.input_fields.length > 0) {
|
|
836
|
+
ye(a);
|
|
807
837
|
return;
|
|
808
838
|
}
|
|
809
839
|
try {
|
|
810
|
-
await
|
|
811
|
-
message:
|
|
812
|
-
playbook_id:
|
|
840
|
+
await ne({
|
|
841
|
+
message: a.name,
|
|
842
|
+
playbook_id: a.playbook_id
|
|
813
843
|
});
|
|
814
844
|
} catch (n) {
|
|
815
845
|
const c = n instanceof Error ? n.message : "执行失败";
|
|
816
|
-
|
|
846
|
+
C.error(c);
|
|
817
847
|
}
|
|
818
848
|
}
|
|
819
849
|
},
|
|
820
|
-
[L,
|
|
821
|
-
),
|
|
822
|
-
async (
|
|
850
|
+
[L, ne, ye]
|
|
851
|
+
), Hs = s.useCallback(
|
|
852
|
+
async (a) => {
|
|
823
853
|
var c;
|
|
824
|
-
if (L ||
|
|
825
|
-
const n = String(
|
|
854
|
+
if (L || ca) return;
|
|
855
|
+
const n = String(a.playbook_id || "").trim();
|
|
826
856
|
if (n) {
|
|
827
|
-
|
|
857
|
+
Ea(n), Se(!1);
|
|
828
858
|
try {
|
|
829
|
-
const
|
|
830
|
-
if ((c =
|
|
831
|
-
|
|
859
|
+
const i = rn(a), d = await za(a);
|
|
860
|
+
if ((c = d.input_fields) != null && c.length) {
|
|
861
|
+
ye(d, i);
|
|
832
862
|
return;
|
|
833
863
|
}
|
|
834
|
-
await
|
|
835
|
-
message:
|
|
836
|
-
playbook_id:
|
|
864
|
+
await ne({
|
|
865
|
+
message: d.name,
|
|
866
|
+
playbook_id: d.playbook_id
|
|
837
867
|
});
|
|
838
|
-
} catch (
|
|
839
|
-
const
|
|
840
|
-
|
|
868
|
+
} catch (i) {
|
|
869
|
+
const d = i instanceof Error ? i.message : "场景参数加载失败";
|
|
870
|
+
C.error(d);
|
|
841
871
|
} finally {
|
|
842
|
-
|
|
872
|
+
Ea("");
|
|
843
873
|
}
|
|
844
874
|
}
|
|
845
875
|
},
|
|
846
876
|
[
|
|
847
877
|
L,
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
878
|
+
ne,
|
|
879
|
+
ye,
|
|
880
|
+
za,
|
|
881
|
+
ca
|
|
852
882
|
]
|
|
853
|
-
),
|
|
883
|
+
), Us = s.useCallback(async () => {
|
|
854
884
|
if (!I || L) return;
|
|
855
|
-
const n =
|
|
856
|
-
(
|
|
885
|
+
const n = na(Z, G).filter(
|
|
886
|
+
(d) => d.required && ga(G[d.name])
|
|
857
887
|
);
|
|
858
888
|
if (n.length > 0) {
|
|
859
|
-
|
|
889
|
+
C.warning(`请先填写 ${n.length} 项必填参数`);
|
|
860
890
|
return;
|
|
861
891
|
}
|
|
862
|
-
|
|
863
|
-
const c = I,
|
|
864
|
-
B(null),
|
|
892
|
+
E(!1), Se(!1);
|
|
893
|
+
const c = I, i = G;
|
|
894
|
+
B(null), K([]), X({});
|
|
865
895
|
try {
|
|
866
|
-
const
|
|
867
|
-
await
|
|
868
|
-
message:
|
|
896
|
+
const d = c.title || (p == null ? void 0 : p.trim()) || "执行场景";
|
|
897
|
+
await ne({
|
|
898
|
+
message: d,
|
|
869
899
|
playbook_id: c.playbook_id,
|
|
870
|
-
playbook_params:
|
|
871
|
-
}),
|
|
872
|
-
} catch (
|
|
873
|
-
const
|
|
874
|
-
|
|
900
|
+
playbook_params: i
|
|
901
|
+
}), $ == null || $(c);
|
|
902
|
+
} catch (d) {
|
|
903
|
+
const m = d instanceof Error ? d.message : "执行失败";
|
|
904
|
+
C.error(m);
|
|
875
905
|
}
|
|
876
906
|
}, [
|
|
877
907
|
I,
|
|
878
|
-
|
|
879
|
-
|
|
908
|
+
Z,
|
|
909
|
+
G,
|
|
880
910
|
L,
|
|
881
|
-
|
|
911
|
+
ne,
|
|
882
912
|
p,
|
|
883
|
-
|
|
884
|
-
]),
|
|
885
|
-
De.current += 1,
|
|
886
|
-
requestId: ++
|
|
887
|
-
playbooks:
|
|
913
|
+
$
|
|
914
|
+
]), Ks = s.useCallback((a) => {
|
|
915
|
+
De.current += 1, Oe({
|
|
916
|
+
requestId: ++Ke.current,
|
|
917
|
+
playbooks: a
|
|
888
918
|
});
|
|
889
|
-
}, []),
|
|
890
|
-
const
|
|
891
|
-
|
|
892
|
-
requestId: ++
|
|
919
|
+
}, []), Gs = s.useCallback(() => {
|
|
920
|
+
const a = ++De.current;
|
|
921
|
+
Oe({
|
|
922
|
+
requestId: ++Ke.current,
|
|
893
923
|
playbooks: [],
|
|
894
924
|
loading: !0
|
|
895
925
|
}), (async () => {
|
|
@@ -897,38 +927,38 @@ function uo({
|
|
|
897
927
|
window.requestAnimationFrame(() => n());
|
|
898
928
|
});
|
|
899
929
|
try {
|
|
900
|
-
const { data: n } = await
|
|
930
|
+
const { data: n } = await dn({
|
|
901
931
|
agent_id: o
|
|
902
932
|
});
|
|
903
|
-
if (
|
|
904
|
-
|
|
905
|
-
requestId: ++
|
|
906
|
-
playbooks:
|
|
933
|
+
if (a !== De.current) return;
|
|
934
|
+
Oe({
|
|
935
|
+
requestId: ++Ke.current,
|
|
936
|
+
playbooks: wo(n)
|
|
907
937
|
});
|
|
908
938
|
} catch {
|
|
909
|
-
if (
|
|
910
|
-
|
|
911
|
-
requestId: ++
|
|
939
|
+
if (a !== De.current) return;
|
|
940
|
+
C.error("我的场景加载失败"), Oe({
|
|
941
|
+
requestId: ++Ke.current,
|
|
912
942
|
playbooks: []
|
|
913
943
|
});
|
|
914
944
|
}
|
|
915
945
|
})();
|
|
916
|
-
}, [o]),
|
|
917
|
-
|
|
918
|
-
(n) => (n == null ? void 0 : n.requestId) ===
|
|
946
|
+
}, [o]), Qs = s.useCallback((a) => {
|
|
947
|
+
Oe(
|
|
948
|
+
(n) => (n == null ? void 0 : n.requestId) === a ? void 0 : n
|
|
919
949
|
);
|
|
920
|
-
}, []),
|
|
950
|
+
}, []), Ys = /* @__PURE__ */ e.jsxs("div", { className: "wandox-console-chat__scene-quick", children: [
|
|
921
951
|
/* @__PURE__ */ e.jsx(
|
|
922
|
-
|
|
952
|
+
fa,
|
|
923
953
|
{
|
|
924
954
|
menu: {
|
|
925
|
-
selectedKeys: [
|
|
955
|
+
selectedKeys: [la],
|
|
926
956
|
items: [
|
|
927
957
|
{ key: "all", label: "全部场景" },
|
|
928
958
|
{ key: "map", label: "使用地图" }
|
|
929
959
|
],
|
|
930
|
-
onClick: ({ key:
|
|
931
|
-
De.current += 1,
|
|
960
|
+
onClick: ({ key: a }) => {
|
|
961
|
+
De.current += 1, Ns(a);
|
|
932
962
|
}
|
|
933
963
|
},
|
|
934
964
|
trigger: ["click"],
|
|
@@ -940,7 +970,7 @@ function uo({
|
|
|
940
970
|
className: "wandox-console-chat__scene-source",
|
|
941
971
|
disabled: L,
|
|
942
972
|
children: [
|
|
943
|
-
/* @__PURE__ */ e.jsx("span", { children:
|
|
973
|
+
/* @__PURE__ */ e.jsx("span", { children: la === "map" ? "使用地图" : "全部场景" }),
|
|
944
974
|
/* @__PURE__ */ e.jsx(
|
|
945
975
|
"svg",
|
|
946
976
|
{
|
|
@@ -960,175 +990,175 @@ function uo({
|
|
|
960
990
|
}
|
|
961
991
|
),
|
|
962
992
|
/* @__PURE__ */ e.jsx("span", { className: "wandox-console-chat__scene-separator", "aria-hidden": !0, children: "|" }),
|
|
963
|
-
/* @__PURE__ */ e.jsx("div", { className: "wandox-console-chat__scene-categories", children:
|
|
993
|
+
/* @__PURE__ */ e.jsx("div", { className: "wandox-console-chat__scene-categories", children: Is.map((a) => /* @__PURE__ */ e.jsx(
|
|
964
994
|
"button",
|
|
965
995
|
{
|
|
966
996
|
type: "button",
|
|
967
997
|
className: "wandox-console-chat__choose-scene",
|
|
968
998
|
disabled: L,
|
|
969
|
-
onClick: () =>
|
|
970
|
-
children:
|
|
999
|
+
onClick: () => a.key === "__my__" ? Gs() : Ks(a.playbooks),
|
|
1000
|
+
children: a.label
|
|
971
1001
|
},
|
|
972
|
-
|
|
1002
|
+
a.key
|
|
973
1003
|
)) })
|
|
974
|
-
] }),
|
|
975
|
-
var
|
|
976
|
-
const n = (
|
|
977
|
-
if (
|
|
978
|
-
const
|
|
979
|
-
if (!
|
|
980
|
-
|
|
1004
|
+
] }), Ua = s.useCallback(async (a) => {
|
|
1005
|
+
var m;
|
|
1006
|
+
const n = (m = a.meta_content) != null && m.playbook_id ? "数据报表" : "对话内容", c = (/* @__PURE__ */ new Date()).toISOString().slice(0, 10);
|
|
1007
|
+
if (un(a)) {
|
|
1008
|
+
const v = mn(a);
|
|
1009
|
+
if (!v) {
|
|
1010
|
+
C.warning("没有可导出的表格数据");
|
|
981
1011
|
return;
|
|
982
1012
|
}
|
|
983
|
-
const
|
|
984
|
-
(
|
|
985
|
-
),
|
|
1013
|
+
const g = v.fields.map((ha) => ha.label).join(","), ge = v.rows.map(
|
|
1014
|
+
(ha) => v.fields.map((en) => hn(ha[en.name])).join(",")
|
|
1015
|
+
), Xs = `\uFEFF${[g, ...ge].join(`
|
|
986
1016
|
`)}`;
|
|
987
|
-
|
|
988
|
-
new Blob([
|
|
1017
|
+
xn(
|
|
1018
|
+
new Blob([Xs], { type: "text/csv;charset=utf-8;" }),
|
|
989
1019
|
`${n}_${c}.csv`
|
|
990
1020
|
);
|
|
991
1021
|
return;
|
|
992
1022
|
}
|
|
993
|
-
const
|
|
994
|
-
`[data-message-id="${
|
|
1023
|
+
const i = document.querySelector(
|
|
1024
|
+
`[data-message-id="${a.message_id || a.id}"] .wandox-message-content`
|
|
995
1025
|
);
|
|
996
|
-
if (!
|
|
997
|
-
|
|
1026
|
+
if (!i) {
|
|
1027
|
+
C.warning("无法定位消息内容");
|
|
998
1028
|
return;
|
|
999
1029
|
}
|
|
1000
|
-
const
|
|
1001
|
-
if (!
|
|
1002
|
-
|
|
1030
|
+
const d = window.open("", "_blank");
|
|
1031
|
+
if (!d) {
|
|
1032
|
+
C.warning("请允许弹出窗口");
|
|
1003
1033
|
return;
|
|
1004
1034
|
}
|
|
1005
|
-
|
|
1006
|
-
`<!DOCTYPE html><html><head><meta charset="utf-8"><title>${n}_${c}</title><style>body{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,sans-serif;padding:20px;color:#333}table{border-collapse:collapse;width:100%}th,td{border:1px solid #d9d9d9;padding:6px 8px;font-size:13px;text-align:left}th{background:#fafafa}img{max-width:100%}pre{white-space:pre-wrap;word-break:break-all;font-size:12px;background:#f5f5f5;padding:12px;border-radius:4px}button,.ant-btn,.ant-tooltip-open{display:none!important}</style></head><body>${
|
|
1007
|
-
),
|
|
1008
|
-
|
|
1035
|
+
d.document.write(
|
|
1036
|
+
`<!DOCTYPE html><html><head><meta charset="utf-8"><title>${n}_${c}</title><style>body{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,sans-serif;padding:20px;color:#333}table{border-collapse:collapse;width:100%}th,td{border:1px solid #d9d9d9;padding:6px 8px;font-size:13px;text-align:left}th{background:#fafafa}img{max-width:100%}pre{white-space:pre-wrap;word-break:break-all;font-size:12px;background:#f5f5f5;padding:12px;border-radius:4px}button,.ant-btn,.ant-tooltip-open{display:none!important}</style></head><body>${i.innerHTML}</body></html>`
|
|
1037
|
+
), d.document.close(), d.onload = () => {
|
|
1038
|
+
d.print(), d.close();
|
|
1009
1039
|
};
|
|
1010
|
-
}, []),
|
|
1011
|
-
(
|
|
1012
|
-
var
|
|
1013
|
-
const n =
|
|
1014
|
-
(
|
|
1015
|
-
), c =
|
|
1040
|
+
}, []), Ka = s.useCallback(
|
|
1041
|
+
(a) => {
|
|
1042
|
+
var d, m, v;
|
|
1043
|
+
const n = we.find(
|
|
1044
|
+
(g) => g.message_id === a || g.id === a
|
|
1045
|
+
), c = pn(n);
|
|
1016
1046
|
if (!c) {
|
|
1017
|
-
|
|
1047
|
+
C.warning("缺少场景 ID,无法配置定时触发");
|
|
1018
1048
|
return;
|
|
1019
1049
|
}
|
|
1020
|
-
const
|
|
1021
|
-
|
|
1050
|
+
const i = ((m = (d = n == null ? void 0 : n.actions) == null ? void 0 : d.find((g) => g.playbook_id === c)) == null ? void 0 : m.display_name) || ((v = n == null ? void 0 : n.meta_content) == null ? void 0 : v.playbook_name) || c;
|
|
1051
|
+
Aa({
|
|
1022
1052
|
visible: !0,
|
|
1023
|
-
messageId:
|
|
1053
|
+
messageId: a,
|
|
1024
1054
|
agentId: o,
|
|
1025
1055
|
playbookId: c,
|
|
1026
|
-
playbookName:
|
|
1056
|
+
playbookName: i
|
|
1027
1057
|
});
|
|
1028
1058
|
},
|
|
1029
|
-
[o,
|
|
1030
|
-
),
|
|
1031
|
-
|
|
1032
|
-
}, []),
|
|
1033
|
-
(
|
|
1034
|
-
const n =
|
|
1035
|
-
return n && Object.prototype.hasOwnProperty.call(
|
|
1059
|
+
[o, we]
|
|
1060
|
+
), Zs = s.useCallback(() => {
|
|
1061
|
+
Aa(Xa);
|
|
1062
|
+
}, []), aa = s.useCallback(
|
|
1063
|
+
(a) => {
|
|
1064
|
+
const n = a.message_id;
|
|
1065
|
+
return n && Object.prototype.hasOwnProperty.call(ia, n) ? ia[n] : _n(a);
|
|
1036
1066
|
},
|
|
1037
|
-
[
|
|
1038
|
-
),
|
|
1039
|
-
async (
|
|
1040
|
-
var
|
|
1041
|
-
const
|
|
1042
|
-
if (!
|
|
1043
|
-
const
|
|
1044
|
-
|
|
1067
|
+
[ia]
|
|
1068
|
+
), Ga = s.useCallback(
|
|
1069
|
+
async (a, n, c) => {
|
|
1070
|
+
var v;
|
|
1071
|
+
const i = a.message_id;
|
|
1072
|
+
if (!i || Qe.has(i)) return !1;
|
|
1073
|
+
const d = aa(a), m = An(
|
|
1074
|
+
d,
|
|
1045
1075
|
n
|
|
1046
1076
|
);
|
|
1047
|
-
|
|
1048
|
-
...
|
|
1049
|
-
[
|
|
1050
|
-
})),
|
|
1077
|
+
Pa((g) => ({
|
|
1078
|
+
...g,
|
|
1079
|
+
[i]: m
|
|
1080
|
+
})), Ma((g) => new Set(g).add(i));
|
|
1051
1081
|
try {
|
|
1052
|
-
const
|
|
1053
|
-
{ domain:
|
|
1082
|
+
const g = await bn(
|
|
1083
|
+
{ domain: S },
|
|
1054
1084
|
{
|
|
1055
|
-
message_id:
|
|
1056
|
-
rating:
|
|
1057
|
-
tags: (
|
|
1085
|
+
message_id: i,
|
|
1086
|
+
rating: m,
|
|
1087
|
+
tags: (v = c == null ? void 0 : c.tags) != null && v.length ? c.tags : void 0,
|
|
1058
1088
|
text: (c == null ? void 0 : c.text) || void 0
|
|
1059
1089
|
}
|
|
1060
1090
|
);
|
|
1061
|
-
if ((
|
|
1062
|
-
throw new Error(
|
|
1091
|
+
if ((g == null ? void 0 : g.success) === !1)
|
|
1092
|
+
throw new Error(g.message || "反馈提交失败");
|
|
1063
1093
|
return !0;
|
|
1064
|
-
} catch (
|
|
1065
|
-
return
|
|
1066
|
-
...
|
|
1067
|
-
[
|
|
1068
|
-
})),
|
|
1069
|
-
|
|
1094
|
+
} catch (g) {
|
|
1095
|
+
return Pa((ge) => ({
|
|
1096
|
+
...ge,
|
|
1097
|
+
[i]: d
|
|
1098
|
+
})), C.error(
|
|
1099
|
+
g instanceof Error ? g.message : "反馈提交失败,请稍后重试"
|
|
1070
1100
|
), !1;
|
|
1071
1101
|
} finally {
|
|
1072
|
-
|
|
1073
|
-
const
|
|
1074
|
-
return
|
|
1102
|
+
Ma((g) => {
|
|
1103
|
+
const ge = new Set(g);
|
|
1104
|
+
return ge.delete(i), ge;
|
|
1075
1105
|
});
|
|
1076
1106
|
}
|
|
1077
1107
|
},
|
|
1078
|
-
[
|
|
1079
|
-
),
|
|
1080
|
-
async (
|
|
1108
|
+
[Qe, aa, S]
|
|
1109
|
+
), Qa = s.useCallback(
|
|
1110
|
+
async (a) => {
|
|
1081
1111
|
Se(!1);
|
|
1082
1112
|
try {
|
|
1083
|
-
await
|
|
1113
|
+
await Oa(a);
|
|
1084
1114
|
} catch (n) {
|
|
1085
1115
|
const c = n instanceof Error ? n.message : "重新生成失败";
|
|
1086
|
-
|
|
1116
|
+
C.error(c);
|
|
1087
1117
|
}
|
|
1088
1118
|
},
|
|
1089
|
-
[
|
|
1090
|
-
),
|
|
1091
|
-
Se((
|
|
1092
|
-
}, []),
|
|
1093
|
-
(
|
|
1094
|
-
if (
|
|
1095
|
-
const
|
|
1119
|
+
[Oa]
|
|
1120
|
+
), Ya = s.useCallback(() => {
|
|
1121
|
+
Se((a) => !a);
|
|
1122
|
+
}, []), Za = s.useCallback(
|
|
1123
|
+
(a, n) => {
|
|
1124
|
+
if (a.role !== "assistant" || a.execution_status === "executing") return null;
|
|
1125
|
+
const i = n && a.id === Ue && Le.length > 0, d = Te ? "隐藏推荐" : i ? `显示推荐(${Le.length})` : "推荐";
|
|
1096
1126
|
return /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
1097
1127
|
/* @__PURE__ */ e.jsx(
|
|
1098
|
-
|
|
1128
|
+
fn,
|
|
1099
1129
|
{
|
|
1100
|
-
msg:
|
|
1101
|
-
domain:
|
|
1102
|
-
onExportMessage:
|
|
1130
|
+
msg: a,
|
|
1131
|
+
domain: S,
|
|
1132
|
+
onExportMessage: Ua,
|
|
1103
1133
|
exportIcon: "copy",
|
|
1104
1134
|
showSolidify: !1,
|
|
1105
|
-
onOpenScheduleDialog:
|
|
1106
|
-
onRetrigger:
|
|
1107
|
-
feedbackRating:
|
|
1108
|
-
feedbackPending: !!
|
|
1109
|
-
onFeedback:
|
|
1110
|
-
extraActions:
|
|
1135
|
+
onOpenScheduleDialog: Ka,
|
|
1136
|
+
onRetrigger: Qa,
|
|
1137
|
+
feedbackRating: aa(a),
|
|
1138
|
+
feedbackPending: !!a.message_id && Qe.has(a.message_id),
|
|
1139
|
+
onFeedback: Ga,
|
|
1140
|
+
extraActions: i ? /* @__PURE__ */ e.jsx(us, { title: d, children: /* @__PURE__ */ e.jsxs(
|
|
1111
1141
|
"button",
|
|
1112
1142
|
{
|
|
1113
1143
|
type: "button",
|
|
1114
|
-
className: `wandox-console-chat__toolbar-toggle${
|
|
1115
|
-
"aria-label":
|
|
1116
|
-
"aria-expanded":
|
|
1117
|
-
onClick:
|
|
1144
|
+
className: `wandox-console-chat__toolbar-toggle${Te ? " is-active" : ""}`,
|
|
1145
|
+
"aria-label": d,
|
|
1146
|
+
"aria-expanded": Te,
|
|
1147
|
+
onClick: Ya,
|
|
1118
1148
|
children: [
|
|
1119
|
-
/* @__PURE__ */ e.jsx(
|
|
1120
|
-
/* @__PURE__ */ e.jsx("span", { className: "wandox-console-chat__toolbar-toggle-count", children:
|
|
1149
|
+
/* @__PURE__ */ e.jsx(ho, {}),
|
|
1150
|
+
/* @__PURE__ */ e.jsx("span", { className: "wandox-console-chat__toolbar-toggle-count", children: Le.length })
|
|
1121
1151
|
]
|
|
1122
1152
|
}
|
|
1123
1153
|
) }) : null
|
|
1124
1154
|
}
|
|
1125
1155
|
),
|
|
1126
|
-
|
|
1156
|
+
i && Te && /* @__PURE__ */ e.jsx(
|
|
1127
1157
|
"ul",
|
|
1128
1158
|
{
|
|
1129
1159
|
className: "wandox-console-chat__recommendations",
|
|
1130
1160
|
"aria-label": "推荐场景",
|
|
1131
|
-
children:
|
|
1161
|
+
children: Le.map((m, v) => /* @__PURE__ */ e.jsx(
|
|
1132
1162
|
"li",
|
|
1133
1163
|
{
|
|
1134
1164
|
className: "wandox-console-chat__recommendations-item",
|
|
@@ -1139,17 +1169,17 @@ function uo({
|
|
|
1139
1169
|
className: "wandox-console-chat__recommendations-pill",
|
|
1140
1170
|
disabled: L,
|
|
1141
1171
|
onClick: () => {
|
|
1142
|
-
|
|
1172
|
+
Ha(m);
|
|
1143
1173
|
},
|
|
1144
|
-
title:
|
|
1174
|
+
title: m.description || m.name,
|
|
1145
1175
|
children: [
|
|
1146
|
-
/* @__PURE__ */ e.jsx("span", { className: "wandox-console-chat__recommendations-pill-label", children:
|
|
1147
|
-
/* @__PURE__ */ e.jsx("span", { className: "wandox-console-chat__recommendations-pill-arrow", children: /* @__PURE__ */ e.jsx(
|
|
1176
|
+
/* @__PURE__ */ e.jsx("span", { className: "wandox-console-chat__recommendations-pill-label", children: m.name }),
|
|
1177
|
+
/* @__PURE__ */ e.jsx("span", { className: "wandox-console-chat__recommendations-pill-arrow", children: /* @__PURE__ */ e.jsx(ja, {}) })
|
|
1148
1178
|
]
|
|
1149
1179
|
}
|
|
1150
1180
|
)
|
|
1151
1181
|
},
|
|
1152
|
-
`${
|
|
1182
|
+
`${m.playbook_id || m.name}-${v}`
|
|
1153
1183
|
))
|
|
1154
1184
|
}
|
|
1155
1185
|
)
|
|
@@ -1157,88 +1187,88 @@ function uo({
|
|
|
1157
1187
|
},
|
|
1158
1188
|
[
|
|
1159
1189
|
L,
|
|
1190
|
+
Qe,
|
|
1191
|
+
aa,
|
|
1192
|
+
Ha,
|
|
1193
|
+
Ua,
|
|
1194
|
+
Ga,
|
|
1195
|
+
Ka,
|
|
1196
|
+
Qa,
|
|
1197
|
+
Le,
|
|
1160
1198
|
Ue,
|
|
1161
|
-
Ze,
|
|
1162
|
-
Bs,
|
|
1163
|
-
zs,
|
|
1164
|
-
Ws,
|
|
1165
|
-
qs,
|
|
1166
|
-
Hs,
|
|
1167
1199
|
Te,
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
C,
|
|
1171
|
-
Us
|
|
1200
|
+
S,
|
|
1201
|
+
Ya
|
|
1172
1202
|
]
|
|
1173
|
-
),
|
|
1174
|
-
(
|
|
1175
|
-
|
|
1203
|
+
), Ja = s.useCallback(
|
|
1204
|
+
(a, n) => {
|
|
1205
|
+
Ne(a), Re(n), je(!0);
|
|
1176
1206
|
},
|
|
1177
1207
|
[]
|
|
1178
|
-
),
|
|
1208
|
+
), Js = s.useMemo(
|
|
1179
1209
|
() => /* @__PURE__ */ e.jsxs("div", { className: "wandox-console-chat__body", children: [
|
|
1180
1210
|
/* @__PURE__ */ e.jsx(
|
|
1181
|
-
|
|
1211
|
+
wn,
|
|
1182
1212
|
{
|
|
1183
|
-
messages:
|
|
1213
|
+
messages: we,
|
|
1184
1214
|
executing: L,
|
|
1185
|
-
ssoToken:
|
|
1186
|
-
ssoDomain:
|
|
1187
|
-
ssoCompany:
|
|
1188
|
-
onExecutePlaybook:
|
|
1189
|
-
onFillPlaybookParams: (
|
|
1215
|
+
ssoToken: M,
|
|
1216
|
+
ssoDomain: S,
|
|
1217
|
+
ssoCompany: h,
|
|
1218
|
+
onExecutePlaybook: ne,
|
|
1219
|
+
onFillPlaybookParams: (a) => ye(
|
|
1190
1220
|
{
|
|
1191
1221
|
category: null,
|
|
1192
1222
|
domain: "",
|
|
1193
1223
|
id: 0,
|
|
1194
|
-
name:
|
|
1195
|
-
playbook_id:
|
|
1224
|
+
name: a.playbookName,
|
|
1225
|
+
playbook_id: a.playbookId,
|
|
1196
1226
|
scope: "",
|
|
1197
1227
|
status: "available",
|
|
1198
1228
|
sub_category: null,
|
|
1199
1229
|
tags: null,
|
|
1200
1230
|
type: "",
|
|
1201
1231
|
version: "",
|
|
1202
|
-
input_fields:
|
|
1203
|
-
playbook_type:
|
|
1232
|
+
input_fields: a.inputFields,
|
|
1233
|
+
playbook_type: a.playbookType
|
|
1204
1234
|
},
|
|
1205
|
-
|
|
1235
|
+
a.initialParams ?? {}
|
|
1206
1236
|
),
|
|
1207
|
-
onRespondToProposal:
|
|
1208
|
-
containerRef:
|
|
1209
|
-
messagesTotal:
|
|
1210
|
-
loadMoreMessages:
|
|
1211
|
-
loading:
|
|
1212
|
-
initialLoadingContent: /* @__PURE__ */ e.jsx(
|
|
1237
|
+
onRespondToProposal: Ta,
|
|
1238
|
+
containerRef: D,
|
|
1239
|
+
messagesTotal: Da,
|
|
1240
|
+
loadMoreMessages: Ba,
|
|
1241
|
+
loading: Fa,
|
|
1242
|
+
initialLoadingContent: /* @__PURE__ */ e.jsx(yn, {}),
|
|
1213
1243
|
conversationKey: o,
|
|
1214
|
-
messageToolbar:
|
|
1215
|
-
onOpenActionDrawer:
|
|
1244
|
+
messageToolbar: Za,
|
|
1245
|
+
onOpenActionDrawer: Ja
|
|
1216
1246
|
}
|
|
1217
1247
|
),
|
|
1218
1248
|
/* @__PURE__ */ e.jsx(
|
|
1219
|
-
|
|
1249
|
+
gn,
|
|
1220
1250
|
{
|
|
1221
|
-
messages:
|
|
1222
|
-
scrollContainerRef:
|
|
1251
|
+
messages: we,
|
|
1252
|
+
scrollContainerRef: D,
|
|
1223
1253
|
mode: "deepseek"
|
|
1224
1254
|
}
|
|
1225
1255
|
)
|
|
1226
1256
|
] }),
|
|
1227
1257
|
[
|
|
1228
1258
|
o,
|
|
1229
|
-
|
|
1259
|
+
ne,
|
|
1230
1260
|
L,
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
|
|
1261
|
+
ye,
|
|
1262
|
+
Ba,
|
|
1263
|
+
we,
|
|
1264
|
+
Fa,
|
|
1265
|
+
Da,
|
|
1266
|
+
Ja,
|
|
1267
|
+
Za,
|
|
1268
|
+
Ta,
|
|
1269
|
+
h,
|
|
1270
|
+
S,
|
|
1271
|
+
M
|
|
1242
1272
|
]
|
|
1243
1273
|
);
|
|
1244
1274
|
return (
|
|
@@ -1252,25 +1282,25 @@ function uo({
|
|
|
1252
1282
|
className: "wandox-console-chat__back",
|
|
1253
1283
|
onClick: le,
|
|
1254
1284
|
children: [
|
|
1255
|
-
/* @__PURE__ */ e.jsx(
|
|
1285
|
+
/* @__PURE__ */ e.jsx(_s, {}),
|
|
1256
1286
|
/* @__PURE__ */ e.jsx("span", { children: "返回" })
|
|
1257
1287
|
]
|
|
1258
1288
|
}
|
|
1259
1289
|
),
|
|
1260
1290
|
/* @__PURE__ */ e.jsx("div", { className: "wandox-console-chat__agent-selector", children: /* @__PURE__ */ e.jsx(
|
|
1261
|
-
|
|
1291
|
+
fa,
|
|
1262
1292
|
{
|
|
1263
1293
|
menu: {
|
|
1264
|
-
items:
|
|
1265
|
-
key:
|
|
1266
|
-
disabled:
|
|
1294
|
+
items: ae.map((a) => ({
|
|
1295
|
+
key: a.id,
|
|
1296
|
+
disabled: a.id === o,
|
|
1267
1297
|
label: /* @__PURE__ */ e.jsxs("span", { className: "wandox-console-agent-menu-item", children: [
|
|
1268
|
-
/* @__PURE__ */ e.jsx("span", { className: "wandox-console-agent-menu-item__icon", children:
|
|
1269
|
-
/* @__PURE__ */ e.jsx("span", { className: "wandox-console-agent-menu-item__name", children:
|
|
1270
|
-
|
|
1298
|
+
/* @__PURE__ */ e.jsx("span", { className: "wandox-console-agent-menu-item__icon", children: a.icon }),
|
|
1299
|
+
/* @__PURE__ */ e.jsx("span", { className: "wandox-console-agent-menu-item__name", children: a.name }),
|
|
1300
|
+
a.id === o && /* @__PURE__ */ e.jsx(jn, { className: "wandox-console-agent-menu-item__check" })
|
|
1271
1301
|
] })
|
|
1272
1302
|
})),
|
|
1273
|
-
onClick: ({ key:
|
|
1303
|
+
onClick: ({ key: a }) => Q == null ? void 0 : Q(a)
|
|
1274
1304
|
},
|
|
1275
1305
|
trigger: ["click"],
|
|
1276
1306
|
placement: "bottomLeft",
|
|
@@ -1283,8 +1313,8 @@ function uo({
|
|
|
1283
1313
|
title: "切换智能体",
|
|
1284
1314
|
children: [
|
|
1285
1315
|
(he == null ? void 0 : he.icon) && /* @__PURE__ */ e.jsx("span", { className: "wandox-console-chat__title-icon", children: he.icon }),
|
|
1286
|
-
/* @__PURE__ */ e.jsx("span", { className: "wandox-console-chat__title-name", children:
|
|
1287
|
-
/* @__PURE__ */ e.jsx(
|
|
1316
|
+
/* @__PURE__ */ e.jsx("span", { className: "wandox-console-chat__title-name", children: l || (he == null ? void 0 : he.name) || "智能体" }),
|
|
1317
|
+
/* @__PURE__ */ e.jsx(xs, { className: "wandox-console-chat__title-arrow" })
|
|
1288
1318
|
]
|
|
1289
1319
|
}
|
|
1290
1320
|
)
|
|
@@ -1296,21 +1326,21 @@ function uo({
|
|
|
1296
1326
|
type: "button",
|
|
1297
1327
|
className: "wandox-console-chat__all-scenes",
|
|
1298
1328
|
disabled: L,
|
|
1299
|
-
onClick:
|
|
1329
|
+
onClick: zs,
|
|
1300
1330
|
children: [
|
|
1301
|
-
/* @__PURE__ */ e.jsx(
|
|
1331
|
+
/* @__PURE__ */ e.jsx(ao, {}),
|
|
1302
1332
|
/* @__PURE__ */ e.jsx("span", { children: "全部场景" })
|
|
1303
1333
|
]
|
|
1304
1334
|
}
|
|
1305
1335
|
),
|
|
1306
|
-
/* @__PURE__ */ e.jsx(
|
|
1336
|
+
/* @__PURE__ */ e.jsx(bs, { benefit: he == null ? void 0 : he.packageBenefit })
|
|
1307
1337
|
] }),
|
|
1308
1338
|
/* @__PURE__ */ e.jsxs("nav", { className: "wandox-console-chat__topbar", children: [
|
|
1309
1339
|
/* @__PURE__ */ e.jsx(
|
|
1310
1340
|
"button",
|
|
1311
1341
|
{
|
|
1312
1342
|
type: "button",
|
|
1313
|
-
className: `wandox-console-chat__topbar-tab ${
|
|
1343
|
+
className: `wandox-console-chat__topbar-tab ${J === "chat" ? "active" : ""}`,
|
|
1314
1344
|
onClick: () => x("chat"),
|
|
1315
1345
|
children: "智能体会话"
|
|
1316
1346
|
}
|
|
@@ -1319,39 +1349,39 @@ function uo({
|
|
|
1319
1349
|
"button",
|
|
1320
1350
|
{
|
|
1321
1351
|
type: "button",
|
|
1322
|
-
className: `wandox-console-chat__topbar-tab ${
|
|
1352
|
+
className: `wandox-console-chat__topbar-tab ${J === "robot" ? "active" : ""}`,
|
|
1323
1353
|
onClick: () => {
|
|
1324
|
-
x("robot"),
|
|
1354
|
+
x("robot"), Ce(null);
|
|
1325
1355
|
},
|
|
1326
1356
|
children: /* @__PURE__ */ e.jsx("span", { children: "巡检机器人" })
|
|
1327
1357
|
}
|
|
1328
1358
|
)
|
|
1329
1359
|
] }),
|
|
1330
|
-
|
|
1331
|
-
/* @__PURE__ */ e.jsx("div", { className: "wandox-console-chat__robot-chips", children:
|
|
1332
|
-
|
|
1360
|
+
J === "chat" ? Js : /* @__PURE__ */ e.jsxs("div", { className: "wandox-console-chat__robot", children: [
|
|
1361
|
+
/* @__PURE__ */ e.jsx("div", { className: "wandox-console-chat__robot-chips", children: b.length === 0 ? /* @__PURE__ */ e.jsx("div", { className: "wandox-console-chat__robot-empty", children: "该智能体暂无巡检机器人" }) : /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
1362
|
+
b.length > 0 && /* @__PURE__ */ e.jsx(
|
|
1333
1363
|
"button",
|
|
1334
1364
|
{
|
|
1335
1365
|
type: "button",
|
|
1336
|
-
className: `wandox-console-chat__robot-chip ${
|
|
1337
|
-
onClick: () =>
|
|
1366
|
+
className: `wandox-console-chat__robot-chip ${f === null ? "active" : ""}`,
|
|
1367
|
+
onClick: () => Ce(null),
|
|
1338
1368
|
children: "全部"
|
|
1339
1369
|
}
|
|
1340
1370
|
),
|
|
1341
|
-
|
|
1342
|
-
const n = !!
|
|
1371
|
+
b.map((a) => {
|
|
1372
|
+
const n = !!w[a.agent_id];
|
|
1343
1373
|
return /* @__PURE__ */ e.jsxs(
|
|
1344
1374
|
"div",
|
|
1345
1375
|
{
|
|
1346
|
-
className: `wandox-console-chat__robot-chip-compound ${
|
|
1376
|
+
className: `wandox-console-chat__robot-chip-compound ${f === a.name ? "active" : ""}`,
|
|
1347
1377
|
children: [
|
|
1348
1378
|
/* @__PURE__ */ e.jsx(
|
|
1349
1379
|
"button",
|
|
1350
1380
|
{
|
|
1351
1381
|
type: "button",
|
|
1352
1382
|
className: "wandox-console-chat__robot-chip-name",
|
|
1353
|
-
onClick: () =>
|
|
1354
|
-
children:
|
|
1383
|
+
onClick: () => Ce(a.name),
|
|
1384
|
+
children: a.name
|
|
1355
1385
|
}
|
|
1356
1386
|
),
|
|
1357
1387
|
/* @__PURE__ */ e.jsx(
|
|
@@ -1359,7 +1389,7 @@ function uo({
|
|
|
1359
1389
|
{
|
|
1360
1390
|
type: "button",
|
|
1361
1391
|
className: `wandox-console-chat__robot-chip-bind ${n ? "bound" : ""}`,
|
|
1362
|
-
onClick: () =>
|
|
1392
|
+
onClick: () => Os(a),
|
|
1363
1393
|
title: n ? "已绑定通知渠道,点击修改" : "绑定通知渠道",
|
|
1364
1394
|
children: n ? /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
1365
1395
|
/* @__PURE__ */ e.jsx(
|
|
@@ -1371,14 +1401,14 @@ function uo({
|
|
|
1371
1401
|
),
|
|
1372
1402
|
/* @__PURE__ */ e.jsx("span", { children: "已通知" })
|
|
1373
1403
|
] }) : /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
1374
|
-
/* @__PURE__ */ e.jsx(
|
|
1404
|
+
/* @__PURE__ */ e.jsx(fs, {}),
|
|
1375
1405
|
/* @__PURE__ */ e.jsx("span", { children: "通知" })
|
|
1376
1406
|
] })
|
|
1377
1407
|
}
|
|
1378
1408
|
)
|
|
1379
1409
|
]
|
|
1380
1410
|
},
|
|
1381
|
-
|
|
1411
|
+
a.agent_id
|
|
1382
1412
|
);
|
|
1383
1413
|
})
|
|
1384
1414
|
] }) }),
|
|
@@ -1388,7 +1418,7 @@ function uo({
|
|
|
1388
1418
|
{
|
|
1389
1419
|
type: "button",
|
|
1390
1420
|
className: `wandox-console-chat__robot-tab ${ue === "results" ? "active" : ""}`,
|
|
1391
|
-
onClick: () =>
|
|
1421
|
+
onClick: () => Ie("results"),
|
|
1392
1422
|
children: "巡检结果"
|
|
1393
1423
|
}
|
|
1394
1424
|
),
|
|
@@ -1397,65 +1427,65 @@ function uo({
|
|
|
1397
1427
|
{
|
|
1398
1428
|
type: "button",
|
|
1399
1429
|
className: `wandox-console-chat__robot-tab ${ue === "history" ? "active" : ""}`,
|
|
1400
|
-
onClick: () =>
|
|
1430
|
+
onClick: () => Ie("history"),
|
|
1401
1431
|
children: [
|
|
1402
1432
|
"执行记录",
|
|
1403
|
-
ue === "history" &&
|
|
1433
|
+
ue === "history" && f && be.length > 0 && /* @__PURE__ */ e.jsx("span", { className: "wandox-console-chat__robot-tab-badge", children: be.length })
|
|
1404
1434
|
]
|
|
1405
1435
|
}
|
|
1406
1436
|
)
|
|
1407
1437
|
] }),
|
|
1408
|
-
/* @__PURE__ */ e.jsx("div", { className: "wandox-console-chat__robot-content", children: ue === "results" ?
|
|
1409
|
-
/* @__PURE__ */ e.jsx(
|
|
1438
|
+
/* @__PURE__ */ e.jsx("div", { className: "wandox-console-chat__robot-content", children: ue === "results" ? ta ? /* @__PURE__ */ e.jsxs("div", { className: "wandox-console-chat__robot-loading", children: [
|
|
1439
|
+
/* @__PURE__ */ e.jsx(wa, { size: "small" }),
|
|
1410
1440
|
/* @__PURE__ */ e.jsx("span", { children: "加载中..." })
|
|
1411
|
-
] }) :
|
|
1412
|
-
/* @__PURE__ */ e.jsx("div", { className: "wandox-console-chat__robot-empty-icon", children: /* @__PURE__ */ e.jsx(
|
|
1413
|
-
/* @__PURE__ */ e.jsx("div", { className: "wandox-console-chat__robot-empty-title", children:
|
|
1441
|
+
] }) : ua.length === 0 ? /* @__PURE__ */ e.jsxs("div", { className: "wandox-console-chat__robot-empty", children: [
|
|
1442
|
+
/* @__PURE__ */ e.jsx("div", { className: "wandox-console-chat__robot-empty-icon", children: /* @__PURE__ */ e.jsx(ns, {}) }),
|
|
1443
|
+
/* @__PURE__ */ e.jsx("div", { className: "wandox-console-chat__robot-empty-title", children: f ? `${f} 暂无巡检结果` : "暂无巡检结果" }),
|
|
1414
1444
|
/* @__PURE__ */ e.jsx("div", { className: "wandox-console-chat__robot-empty-desc", children: "巡检结果会在机器人执行后展示在这里" })
|
|
1415
|
-
] }) : /* @__PURE__ */ e.jsx("ul", { className: "wandox-console-chat__robot-timeline", children:
|
|
1445
|
+
] }) : /* @__PURE__ */ e.jsx("ul", { className: "wandox-console-chat__robot-timeline", children: ua.map((a, n) => {
|
|
1416
1446
|
const c = {
|
|
1417
1447
|
high: "#ff4d4f",
|
|
1418
1448
|
medium: "#faad14",
|
|
1419
1449
|
low: "#52c41a"
|
|
1420
|
-
},
|
|
1450
|
+
}, i = n === ua.length - 1;
|
|
1421
1451
|
return /* @__PURE__ */ e.jsxs(
|
|
1422
1452
|
"li",
|
|
1423
1453
|
{
|
|
1424
1454
|
className: "wandox-console-chat__robot-timeline-item",
|
|
1425
1455
|
children: [
|
|
1426
1456
|
/* @__PURE__ */ e.jsxs("div", { className: "wandox-console-chat__robot-timeline-axis", children: [
|
|
1427
|
-
/* @__PURE__ */ e.jsx("span", { className: "wandox-console-chat__robot-timeline-time", children:
|
|
1457
|
+
/* @__PURE__ */ e.jsx("span", { className: "wandox-console-chat__robot-timeline-time", children: Vs(a.timestamp) }),
|
|
1428
1458
|
/* @__PURE__ */ e.jsx(
|
|
1429
1459
|
"span",
|
|
1430
1460
|
{
|
|
1431
1461
|
className: "wandox-console-chat__robot-timeline-dot",
|
|
1432
1462
|
style: {
|
|
1433
|
-
background: c[
|
|
1463
|
+
background: c[a.priority]
|
|
1434
1464
|
}
|
|
1435
1465
|
}
|
|
1436
1466
|
),
|
|
1437
|
-
!
|
|
1467
|
+
!i && /* @__PURE__ */ e.jsx("span", { className: "wandox-console-chat__robot-timeline-line" })
|
|
1438
1468
|
] }),
|
|
1439
1469
|
/* @__PURE__ */ e.jsxs("div", { className: "wandox-console-chat__robot-timeline-card", children: [
|
|
1440
|
-
/* @__PURE__ */ e.jsx("div", { className: "wandox-console-chat__robot-timeline-title", children:
|
|
1441
|
-
|
|
1442
|
-
|
|
1470
|
+
/* @__PURE__ */ e.jsx("div", { className: "wandox-console-chat__robot-timeline-title", children: a.title }),
|
|
1471
|
+
a.summary && /* @__PURE__ */ e.jsx("div", { className: "wandox-console-chat__robot-timeline-summary", children: a.summary }),
|
|
1472
|
+
a.ui_payload && /* @__PURE__ */ e.jsx("div", { className: "wandox-console-chat__robot-timeline-content wandox-markdown-content", children: /* @__PURE__ */ e.jsx(vn, { payload: a.ui_payload }) })
|
|
1443
1473
|
] })
|
|
1444
1474
|
]
|
|
1445
1475
|
},
|
|
1446
|
-
|
|
1476
|
+
a.id || `result_${n}`
|
|
1447
1477
|
);
|
|
1448
|
-
}) }) :
|
|
1449
|
-
/* @__PURE__ */ e.jsx(
|
|
1478
|
+
}) }) : f ? oa ? /* @__PURE__ */ e.jsxs("div", { className: "wandox-console-chat__robot-loading", children: [
|
|
1479
|
+
/* @__PURE__ */ e.jsx(wa, { size: "small" }),
|
|
1450
1480
|
/* @__PURE__ */ e.jsx("span", { children: "加载中..." })
|
|
1451
|
-
] }) :
|
|
1481
|
+
] }) : be.length === 0 ? /* @__PURE__ */ e.jsx("div", { className: "wandox-console-chat__robot-empty", children: /* @__PURE__ */ e.jsx("div", { className: "wandox-console-chat__robot-empty-title", children: "暂无执行记录" }) }) : /* @__PURE__ */ e.jsx("ul", { className: "wandox-console-chat__robot-history", children: be.map((a) => /* @__PURE__ */ e.jsxs(
|
|
1452
1482
|
"li",
|
|
1453
1483
|
{
|
|
1454
|
-
className: `wandox-console-chat__robot-history-item wandox-console-chat__robot-history-item--${
|
|
1484
|
+
className: `wandox-console-chat__robot-history-item wandox-console-chat__robot-history-item--${a.status}`,
|
|
1455
1485
|
children: [
|
|
1456
1486
|
/* @__PURE__ */ e.jsxs("div", { className: "wandox-console-chat__robot-history-info", children: [
|
|
1457
|
-
/* @__PURE__ */ e.jsx("span", { className: "wandox-console-chat__robot-history-name", children:
|
|
1458
|
-
/* @__PURE__ */ e.jsx("span", { className: "wandox-console-chat__robot-history-time", children:
|
|
1487
|
+
/* @__PURE__ */ e.jsx("span", { className: "wandox-console-chat__robot-history-name", children: a.action_name }),
|
|
1488
|
+
/* @__PURE__ */ e.jsx("span", { className: "wandox-console-chat__robot-history-time", children: a.created_at ? new Date(a.created_at).toLocaleString(
|
|
1459
1489
|
"zh-CN",
|
|
1460
1490
|
{
|
|
1461
1491
|
month: "2-digit",
|
|
@@ -1468,39 +1498,39 @@ function uo({
|
|
|
1468
1498
|
/* @__PURE__ */ e.jsx(
|
|
1469
1499
|
"span",
|
|
1470
1500
|
{
|
|
1471
|
-
className: `wandox-console-chat__robot-history-status wandox-console-chat__robot-history-status--${
|
|
1501
|
+
className: `wandox-console-chat__robot-history-status wandox-console-chat__robot-history-status--${a.status}`,
|
|
1472
1502
|
children: {
|
|
1473
1503
|
pending: "等待中",
|
|
1474
1504
|
running: "执行中",
|
|
1475
1505
|
success: "成功",
|
|
1476
1506
|
failed: "失败"
|
|
1477
|
-
}[
|
|
1507
|
+
}[a.status] || a.status
|
|
1478
1508
|
}
|
|
1479
1509
|
)
|
|
1480
1510
|
]
|
|
1481
1511
|
},
|
|
1482
|
-
|
|
1512
|
+
a.id
|
|
1483
1513
|
)) }) : /* @__PURE__ */ e.jsxs("div", { className: "wandox-console-chat__robot-empty", children: [
|
|
1484
|
-
/* @__PURE__ */ e.jsx("div", { className: "wandox-console-chat__robot-empty-icon", children: /* @__PURE__ */ e.jsx(
|
|
1514
|
+
/* @__PURE__ */ e.jsx("div", { className: "wandox-console-chat__robot-empty-icon", children: /* @__PURE__ */ e.jsx(ns, {}) }),
|
|
1485
1515
|
/* @__PURE__ */ e.jsx("div", { className: "wandox-console-chat__robot-empty-title", children: "请先选择机器人" }),
|
|
1486
1516
|
/* @__PURE__ */ e.jsx("div", { className: "wandox-console-chat__robot-empty-desc", children: "在上方选择机器人以查看其执行记录" })
|
|
1487
1517
|
] }) })
|
|
1488
1518
|
] }),
|
|
1489
|
-
|
|
1519
|
+
J === "chat" && $a.length > 0 && !(I && !F) && /* @__PURE__ */ e.jsx("div", { className: "wandox-console-chat__recent", children: /* @__PURE__ */ e.jsx("div", { className: "wandox-console-chat__recent-bar", children: $a.map((a, n) => /* @__PURE__ */ e.jsx(
|
|
1490
1520
|
"button",
|
|
1491
1521
|
{
|
|
1492
1522
|
type: "button",
|
|
1493
1523
|
className: "wandox-console-chat__recent-chip",
|
|
1494
|
-
disabled: L || !!
|
|
1495
|
-
title:
|
|
1524
|
+
disabled: L || !!ca,
|
|
1525
|
+
title: a.description || a.name,
|
|
1496
1526
|
onClick: () => {
|
|
1497
|
-
|
|
1527
|
+
Hs(a);
|
|
1498
1528
|
},
|
|
1499
|
-
children:
|
|
1529
|
+
children: a.name
|
|
1500
1530
|
},
|
|
1501
|
-
`${
|
|
1531
|
+
`${a.playbook_id || a.name}-${n}`
|
|
1502
1532
|
)) }) }),
|
|
1503
|
-
|
|
1533
|
+
J === "chat" && /* @__PURE__ */ e.jsx("div", { className: "wandox-console-chat__input", children: I && !F ? /* @__PURE__ */ e.jsxs(
|
|
1504
1534
|
"div",
|
|
1505
1535
|
{
|
|
1506
1536
|
ref: xe,
|
|
@@ -1517,7 +1547,7 @@ function uo({
|
|
|
1517
1547
|
type: "button",
|
|
1518
1548
|
className: "wandox-console-changescene",
|
|
1519
1549
|
onClick: () => {
|
|
1520
|
-
B(null),
|
|
1550
|
+
B(null), K([]), X({});
|
|
1521
1551
|
},
|
|
1522
1552
|
children: "重新选择"
|
|
1523
1553
|
}
|
|
@@ -1526,39 +1556,39 @@ function uo({
|
|
|
1526
1556
|
/* @__PURE__ */ e.jsx(
|
|
1527
1557
|
"div",
|
|
1528
1558
|
{
|
|
1529
|
-
ref:
|
|
1559
|
+
ref: ke,
|
|
1530
1560
|
tabIndex: -1,
|
|
1531
1561
|
className: "wandox-console-taskarea wandox-console-taskarea--static",
|
|
1532
1562
|
children: I.desc || I.title
|
|
1533
1563
|
}
|
|
1534
1564
|
),
|
|
1535
|
-
|
|
1565
|
+
Z.length > 0 && /* @__PURE__ */ e.jsxs("div", { className: "wandox-console-paramarea", children: [
|
|
1536
1566
|
/* @__PURE__ */ e.jsxs("div", { className: "wandox-console-paramhead", children: [
|
|
1537
|
-
/* @__PURE__ */ e.jsx(
|
|
1567
|
+
/* @__PURE__ */ e.jsx(ws, {}),
|
|
1538
1568
|
/* @__PURE__ */ e.jsx("strong", { children: "确认分析范围" }),
|
|
1539
1569
|
/* @__PURE__ */ e.jsxs("span", { className: "wandox-console-paramhead__status", children: [
|
|
1540
|
-
/* @__PURE__ */ e.jsx(
|
|
1570
|
+
/* @__PURE__ */ e.jsx(ya, {}),
|
|
1541
1571
|
" ",
|
|
1542
|
-
|
|
1572
|
+
_e.length > 0 ? `待填 ${_e.length} 项必填参数` : "参数已就绪"
|
|
1543
1573
|
] })
|
|
1544
1574
|
] }),
|
|
1545
|
-
/* @__PURE__ */ e.jsx("div", { className: "wandox-console-params", children:
|
|
1546
|
-
|
|
1547
|
-
|
|
1548
|
-
).map((
|
|
1549
|
-
|
|
1575
|
+
/* @__PURE__ */ e.jsx("div", { className: "wandox-console-params", children: na(
|
|
1576
|
+
Z,
|
|
1577
|
+
G
|
|
1578
|
+
).map((a) => /* @__PURE__ */ e.jsx(
|
|
1579
|
+
js,
|
|
1550
1580
|
{
|
|
1551
|
-
field:
|
|
1552
|
-
value:
|
|
1581
|
+
field: a,
|
|
1582
|
+
value: G[a.name],
|
|
1553
1583
|
uploading: !1,
|
|
1554
1584
|
fileNameMap: {},
|
|
1555
|
-
getOptionState:
|
|
1556
|
-
onChange: (n, c) =>
|
|
1557
|
-
...
|
|
1585
|
+
getOptionState: ee.getFieldState,
|
|
1586
|
+
onChange: (n, c) => X((i) => ({
|
|
1587
|
+
...i,
|
|
1558
1588
|
[n]: c
|
|
1559
1589
|
}))
|
|
1560
1590
|
},
|
|
1561
|
-
|
|
1591
|
+
a.name
|
|
1562
1592
|
)) })
|
|
1563
1593
|
] }),
|
|
1564
1594
|
/* @__PURE__ */ e.jsxs("div", { className: "wandox-console-prompt__foot", children: [
|
|
@@ -1568,11 +1598,11 @@ function uo({
|
|
|
1568
1598
|
{
|
|
1569
1599
|
type: "button",
|
|
1570
1600
|
className: "wandox-console-start",
|
|
1571
|
-
disabled: !I || L ||
|
|
1572
|
-
onClick:
|
|
1601
|
+
disabled: !I || L || _e.length > 0,
|
|
1602
|
+
onClick: Us,
|
|
1573
1603
|
children: [
|
|
1574
1604
|
"开始执行",
|
|
1575
|
-
/* @__PURE__ */ e.jsx(
|
|
1605
|
+
/* @__PURE__ */ e.jsx(ja, {})
|
|
1576
1606
|
]
|
|
1577
1607
|
}
|
|
1578
1608
|
)
|
|
@@ -1580,107 +1610,107 @@ function uo({
|
|
|
1580
1610
|
]
|
|
1581
1611
|
}
|
|
1582
1612
|
) : /* @__PURE__ */ e.jsx(
|
|
1583
|
-
|
|
1613
|
+
kn,
|
|
1584
1614
|
{
|
|
1585
|
-
onSend:
|
|
1615
|
+
onSend: ma,
|
|
1586
1616
|
executing: L,
|
|
1587
|
-
stopping:
|
|
1588
|
-
onStop:
|
|
1617
|
+
stopping: Ms,
|
|
1618
|
+
onStop: Ts,
|
|
1589
1619
|
placeholder: " / 快速调用场景",
|
|
1590
|
-
ssoToken:
|
|
1591
|
-
ssoDomain:
|
|
1592
|
-
ssoCompany:
|
|
1593
|
-
leadingActions:
|
|
1620
|
+
ssoToken: M,
|
|
1621
|
+
ssoDomain: S,
|
|
1622
|
+
ssoCompany: h,
|
|
1623
|
+
leadingActions: Ys,
|
|
1594
1624
|
uploadButtonAsLeading: !0,
|
|
1595
1625
|
uploadButtonLabel: "添加文件",
|
|
1596
1626
|
mentionTriggerChar: "/",
|
|
1597
|
-
mentionListRequest:
|
|
1598
|
-
onMentionListRequestHandled:
|
|
1627
|
+
mentionListRequest: Cs,
|
|
1628
|
+
onMentionListRequestHandled: Qs,
|
|
1599
1629
|
autoFocusInput: !I,
|
|
1600
|
-
playbooks:
|
|
1601
|
-
onRequestPlaybookParams:
|
|
1630
|
+
playbooks: Ss,
|
|
1631
|
+
onRequestPlaybookParams: ye
|
|
1602
1632
|
}
|
|
1603
1633
|
) }),
|
|
1604
1634
|
/* @__PURE__ */ e.jsx(
|
|
1605
|
-
|
|
1635
|
+
bo,
|
|
1606
1636
|
{
|
|
1607
|
-
open:
|
|
1637
|
+
open: F,
|
|
1608
1638
|
source: V,
|
|
1609
|
-
categories:
|
|
1610
|
-
categoryKey:
|
|
1639
|
+
categories: da,
|
|
1640
|
+
categoryKey: Y,
|
|
1611
1641
|
search: te,
|
|
1612
|
-
cards:
|
|
1642
|
+
cards: Es,
|
|
1613
1643
|
executing: L,
|
|
1614
|
-
loadingPlaybookId:
|
|
1615
|
-
onClose:
|
|
1616
|
-
onSourceChange:
|
|
1644
|
+
loadingPlaybookId: W,
|
|
1645
|
+
onClose: qs,
|
|
1646
|
+
onSourceChange: Bs,
|
|
1617
1647
|
onCategoryChange: re,
|
|
1618
|
-
onSearchChange:
|
|
1619
|
-
onSelectScene:
|
|
1648
|
+
onSearchChange: H,
|
|
1649
|
+
onSelectScene: Ws
|
|
1620
1650
|
}
|
|
1621
1651
|
),
|
|
1622
1652
|
/* @__PURE__ */ e.jsx(
|
|
1623
|
-
|
|
1653
|
+
Nn,
|
|
1624
1654
|
{
|
|
1625
|
-
open:
|
|
1626
|
-
agentId:
|
|
1627
|
-
playbookId:
|
|
1628
|
-
playbookName:
|
|
1629
|
-
onClose:
|
|
1655
|
+
open: Ge.visible,
|
|
1656
|
+
agentId: Ge.agentId,
|
|
1657
|
+
playbookId: Ge.playbookId,
|
|
1658
|
+
playbookName: Ge.playbookName,
|
|
1659
|
+
onClose: Zs
|
|
1630
1660
|
}
|
|
1631
1661
|
),
|
|
1632
|
-
|
|
1633
|
-
|
|
1662
|
+
M && S && h && /* @__PURE__ */ e.jsx(
|
|
1663
|
+
Cn,
|
|
1634
1664
|
{
|
|
1635
1665
|
open: de,
|
|
1636
|
-
title:
|
|
1666
|
+
title: $e,
|
|
1637
1667
|
actions: pe,
|
|
1638
|
-
ssoToken:
|
|
1639
|
-
ssoDomain:
|
|
1640
|
-
ssoCompany:
|
|
1641
|
-
onClose: () =>
|
|
1668
|
+
ssoToken: M,
|
|
1669
|
+
ssoDomain: S,
|
|
1670
|
+
ssoCompany: h,
|
|
1671
|
+
onClose: () => je(!1)
|
|
1642
1672
|
}
|
|
1643
1673
|
),
|
|
1644
1674
|
/* @__PURE__ */ e.jsx(
|
|
1645
|
-
|
|
1675
|
+
Sn,
|
|
1646
1676
|
{
|
|
1647
1677
|
title: "配置通知渠道",
|
|
1648
|
-
open:
|
|
1678
|
+
open: j,
|
|
1649
1679
|
onCancel: () => {
|
|
1650
|
-
|
|
1680
|
+
y(!1), ve(null), A(void 0);
|
|
1651
1681
|
},
|
|
1652
1682
|
width: 520,
|
|
1653
1683
|
centered: !0,
|
|
1654
1684
|
footer: [
|
|
1655
|
-
|
|
1656
|
-
|
|
1685
|
+
w[(O == null ? void 0 : O.agent_id) || ""] ? /* @__PURE__ */ e.jsx(
|
|
1686
|
+
sa,
|
|
1657
1687
|
{
|
|
1658
1688
|
danger: !0,
|
|
1659
|
-
loading:
|
|
1689
|
+
loading: fe,
|
|
1660
1690
|
style: { marginRight: "auto" },
|
|
1661
|
-
onClick:
|
|
1691
|
+
onClick: Fs,
|
|
1662
1692
|
children: "解除绑定"
|
|
1663
1693
|
},
|
|
1664
1694
|
"unbind"
|
|
1665
1695
|
) : null,
|
|
1666
1696
|
/* @__PURE__ */ e.jsx(
|
|
1667
|
-
|
|
1697
|
+
sa,
|
|
1668
1698
|
{
|
|
1669
|
-
disabled:
|
|
1699
|
+
disabled: fe,
|
|
1670
1700
|
onClick: () => {
|
|
1671
|
-
|
|
1701
|
+
y(!1), ve(null), A(void 0);
|
|
1672
1702
|
},
|
|
1673
1703
|
children: "取消"
|
|
1674
1704
|
},
|
|
1675
1705
|
"cancel"
|
|
1676
1706
|
),
|
|
1677
1707
|
/* @__PURE__ */ e.jsx(
|
|
1678
|
-
|
|
1708
|
+
sa,
|
|
1679
1709
|
{
|
|
1680
1710
|
type: "primary",
|
|
1681
|
-
loading:
|
|
1682
|
-
disabled: !
|
|
1683
|
-
onClick:
|
|
1711
|
+
loading: fe,
|
|
1712
|
+
disabled: !z,
|
|
1713
|
+
onClick: Ds,
|
|
1684
1714
|
children: "保存"
|
|
1685
1715
|
},
|
|
1686
1716
|
"ok"
|
|
@@ -1709,7 +1739,7 @@ function uo({
|
|
|
1709
1739
|
color: "#1a1a1a",
|
|
1710
1740
|
fontWeight: 500
|
|
1711
1741
|
},
|
|
1712
|
-
children:
|
|
1742
|
+
children: O == null ? void 0 : O.name
|
|
1713
1743
|
}
|
|
1714
1744
|
)
|
|
1715
1745
|
]
|
|
@@ -1728,33 +1758,33 @@ function uo({
|
|
|
1728
1758
|
}
|
|
1729
1759
|
),
|
|
1730
1760
|
/* @__PURE__ */ e.jsx(
|
|
1731
|
-
|
|
1761
|
+
Rn,
|
|
1732
1762
|
{
|
|
1733
1763
|
style: { width: "100%" },
|
|
1734
1764
|
placeholder: "请选择通知渠道",
|
|
1735
|
-
value:
|
|
1736
|
-
onChange:
|
|
1737
|
-
disabled:
|
|
1738
|
-
options:
|
|
1739
|
-
label: `${
|
|
1740
|
-
value:
|
|
1765
|
+
value: z,
|
|
1766
|
+
onChange: A,
|
|
1767
|
+
disabled: fe,
|
|
1768
|
+
options: se.map((a) => ({
|
|
1769
|
+
label: `${a.name}(${a.platform === "dingtalk" ? "钉钉" : a.platform === "feishu" ? "飞书" : "企业微信"})`,
|
|
1770
|
+
value: a.webhook_id
|
|
1741
1771
|
})),
|
|
1742
|
-
popupRender: (
|
|
1743
|
-
|
|
1744
|
-
/* @__PURE__ */ e.jsx(
|
|
1745
|
-
/* @__PURE__ */ e.jsx(
|
|
1746
|
-
|
|
1772
|
+
popupRender: (a) => /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
1773
|
+
a,
|
|
1774
|
+
/* @__PURE__ */ e.jsx(Jn, { style: { margin: "8px 0" } }),
|
|
1775
|
+
/* @__PURE__ */ e.jsx($n, { style: { padding: "0 8px 4px" }, children: /* @__PURE__ */ e.jsx(
|
|
1776
|
+
sa,
|
|
1747
1777
|
{
|
|
1748
1778
|
type: "text",
|
|
1749
1779
|
icon: /* @__PURE__ */ e.jsx("span", { children: "+" }),
|
|
1750
|
-
onClick: () =>
|
|
1780
|
+
onClick: () => He(!0),
|
|
1751
1781
|
children: "添加新的通知渠道"
|
|
1752
1782
|
}
|
|
1753
1783
|
) })
|
|
1754
1784
|
] })
|
|
1755
1785
|
}
|
|
1756
1786
|
),
|
|
1757
|
-
|
|
1787
|
+
se.length === 0 && /* @__PURE__ */ e.jsx(
|
|
1758
1788
|
"div",
|
|
1759
1789
|
{
|
|
1760
1790
|
style: {
|
|
@@ -1773,180 +1803,193 @@ function uo({
|
|
|
1773
1803
|
}
|
|
1774
1804
|
),
|
|
1775
1805
|
/* @__PURE__ */ e.jsx(
|
|
1776
|
-
|
|
1806
|
+
Wn,
|
|
1777
1807
|
{
|
|
1778
|
-
open:
|
|
1779
|
-
onClose: () =>
|
|
1780
|
-
onSuccess: (
|
|
1781
|
-
|
|
1808
|
+
open: me,
|
|
1809
|
+
onClose: () => He(!1),
|
|
1810
|
+
onSuccess: (a) => {
|
|
1811
|
+
t((n) => [...n, a]), A(a.webhook_id);
|
|
1782
1812
|
}
|
|
1783
1813
|
}
|
|
1784
1814
|
)
|
|
1785
1815
|
] })
|
|
1786
1816
|
);
|
|
1787
1817
|
}
|
|
1788
|
-
const { TextArea:
|
|
1789
|
-
function
|
|
1818
|
+
const { TextArea: go } = Ra, Ve = 5;
|
|
1819
|
+
function jo({
|
|
1790
1820
|
useMapCards: o,
|
|
1791
|
-
useMapCategories:
|
|
1792
|
-
playbooks:
|
|
1793
|
-
selectedCategoryKey:
|
|
1821
|
+
useMapCategories: l,
|
|
1822
|
+
playbooks: u = [],
|
|
1823
|
+
selectedCategoryKey: r,
|
|
1794
1824
|
onCategorySelect: p,
|
|
1795
|
-
loading:
|
|
1796
|
-
useMapError:
|
|
1825
|
+
loading: k,
|
|
1826
|
+
useMapError: P,
|
|
1797
1827
|
onRetry: _,
|
|
1798
|
-
onStartAnalysis:
|
|
1799
|
-
agents:
|
|
1800
|
-
selectedAgentId:
|
|
1801
|
-
onAgentSelect:
|
|
1828
|
+
onStartAnalysis: R,
|
|
1829
|
+
agents: T,
|
|
1830
|
+
selectedAgentId: ae,
|
|
1831
|
+
onAgentSelect: Q,
|
|
1802
1832
|
onOpenAgentChat: le
|
|
1803
1833
|
}) {
|
|
1804
|
-
const [
|
|
1805
|
-
|
|
1806
|
-
|
|
1807
|
-
),
|
|
1808
|
-
|
|
1809
|
-
|
|
1810
|
-
|
|
1811
|
-
)
|
|
1812
|
-
|
|
1813
|
-
|
|
1814
|
-
|
|
1815
|
-
|
|
1816
|
-
|
|
1817
|
-
|
|
1818
|
-
|
|
1819
|
-
|
|
1820
|
-
|
|
1821
|
-
|
|
1822
|
-
|
|
1823
|
-
|
|
1824
|
-
|
|
1825
|
-
|
|
1834
|
+
const [$, q] = s.useState(""), [M, S] = s.useState(""), [h, D] = s.useState(null), ie = s.useRef(null), [F, E] = s.useState([]), [W, oe] = s.useState(!1), [te, H] = s.useState(""), V = s.useRef(0), [U, Y] = s.useState({}), [re, I] = s.useState({}), [B, ke] = s.useState({}), [xe, de] = s.useState([]), [je, pe] = s.useState(!1), Re = s.useRef(null), [$e, Ne] = s.useState(0), Z = Math.max(
|
|
1835
|
+
1,
|
|
1836
|
+
Math.ceil(l.length / Ve)
|
|
1837
|
+
), K = Math.min($e, Z - 1), G = l.length > Ve, X = s.useMemo(
|
|
1838
|
+
() => l.slice(
|
|
1839
|
+
K * Ve,
|
|
1840
|
+
K * Ve + Ve
|
|
1841
|
+
),
|
|
1842
|
+
[l, K]
|
|
1843
|
+
);
|
|
1844
|
+
s.useEffect(() => {
|
|
1845
|
+
Ne(0);
|
|
1846
|
+
}, [ae]);
|
|
1847
|
+
const ee = s.useMemo(
|
|
1848
|
+
() => o.length > 0 ? o : Hn(u),
|
|
1849
|
+
[o, u]
|
|
1850
|
+
), _e = s.useMemo(() => r ? ee.filter((t) => t.categoryKey === r) : ee, [ee, r]), J = s.useMemo(() => {
|
|
1851
|
+
const t = M.trim().toLowerCase();
|
|
1852
|
+
return t ? _e.filter(
|
|
1853
|
+
(w) => w.title.toLowerCase().includes(t) || w.desc.toLowerCase().includes(t)
|
|
1854
|
+
) : _e;
|
|
1855
|
+
}, [_e, M]), x = k || P && ee.length === 0 || J.length > 0, [b, ce] = s.useState("");
|
|
1856
|
+
s.useEffect(() => {
|
|
1857
|
+
V.current += 1, ce(""), q(""), E([]), Y({}), oe(!1), H("");
|
|
1858
|
+
}, [r]), s.useEffect(() => {
|
|
1859
|
+
b && !ee.some((t) => t.playbook_id === b) && (V.current += 1, ce(""), q(""), E([]), Y({}), oe(!1), H(""));
|
|
1860
|
+
}, [b, ee]);
|
|
1861
|
+
const f = s.useMemo(
|
|
1862
|
+
() => ee.find((t) => t.playbook_id === b) ?? null,
|
|
1863
|
+
[ee, b]
|
|
1864
|
+
), Ce = s.useMemo(
|
|
1865
|
+
() => h ? ys(h) : null,
|
|
1866
|
+
[h]
|
|
1867
|
+
), ue = s.useCallback((t, w) => {
|
|
1868
|
+
t.stopPropagation(), D(w);
|
|
1826
1869
|
}, []);
|
|
1827
|
-
|
|
1828
|
-
if (
|
|
1870
|
+
s.useEffect(() => {
|
|
1871
|
+
if (k || f) return;
|
|
1829
1872
|
const t = window.setTimeout(() => {
|
|
1830
|
-
var
|
|
1831
|
-
const
|
|
1832
|
-
|
|
1873
|
+
var N, j;
|
|
1874
|
+
const w = (j = (N = ie.current) == null ? void 0 : N.resizableTextArea) == null ? void 0 : j.textArea;
|
|
1875
|
+
w == null || w.focus();
|
|
1833
1876
|
}, 0);
|
|
1834
1877
|
return () => window.clearTimeout(t);
|
|
1835
|
-
}, [
|
|
1836
|
-
const
|
|
1837
|
-
const
|
|
1838
|
-
if (!
|
|
1839
|
-
|
|
1878
|
+
}, [k, f]);
|
|
1879
|
+
const Ie = s.useCallback(async (t) => {
|
|
1880
|
+
const w = String(t.playbook_id || "").trim();
|
|
1881
|
+
if (!w) {
|
|
1882
|
+
C.error("场景缺少 playbook_id");
|
|
1840
1883
|
return;
|
|
1841
1884
|
}
|
|
1842
|
-
const
|
|
1843
|
-
|
|
1885
|
+
const N = ++V.current;
|
|
1886
|
+
ce(w), E([]), Y({}), I({}), ke({}), oe(!0), H("");
|
|
1844
1887
|
try {
|
|
1845
|
-
const { data:
|
|
1846
|
-
playbook_id:
|
|
1888
|
+
const { data: j } = await ba({
|
|
1889
|
+
playbook_id: w
|
|
1847
1890
|
});
|
|
1848
|
-
if (
|
|
1849
|
-
if (!
|
|
1891
|
+
if (N !== V.current) return;
|
|
1892
|
+
if (!j || typeof j != "object" || Array.isArray(j))
|
|
1850
1893
|
throw new Error("场景详情为空");
|
|
1851
|
-
const
|
|
1852
|
-
|
|
1894
|
+
const y = hs(
|
|
1895
|
+
Pn(j)
|
|
1853
1896
|
);
|
|
1854
|
-
|
|
1855
|
-
} catch (
|
|
1856
|
-
if (
|
|
1857
|
-
const
|
|
1858
|
-
|
|
1897
|
+
E(y), Y(ps(y));
|
|
1898
|
+
} catch (j) {
|
|
1899
|
+
if (N !== V.current) return;
|
|
1900
|
+
const y = j instanceof Error ? j.message : "场景参数加载失败";
|
|
1901
|
+
H(y), C.error("场景参数加载失败,请稍后重试");
|
|
1859
1902
|
} finally {
|
|
1860
|
-
|
|
1903
|
+
N === V.current && oe(!1);
|
|
1861
1904
|
}
|
|
1862
|
-
}, []),
|
|
1863
|
-
V.current += 1,
|
|
1864
|
-
},
|
|
1865
|
-
() =>
|
|
1866
|
-
[
|
|
1867
|
-
),
|
|
1868
|
-
|
|
1869
|
-
}, []),
|
|
1870
|
-
(t,
|
|
1871
|
-
var
|
|
1872
|
-
I((
|
|
1905
|
+
}, []), oa = () => {
|
|
1906
|
+
V.current += 1, ce(""), q(""), E([]), Y({}), oe(!1), H("");
|
|
1907
|
+
}, qe = ms(F, U, Y), be = s.useMemo(
|
|
1908
|
+
() => na(F, U),
|
|
1909
|
+
[F, U]
|
|
1910
|
+
), Pe = s.useCallback((t, w) => {
|
|
1911
|
+
Y((N) => ({ ...N, [t]: w }));
|
|
1912
|
+
}, []), ta = s.useCallback(
|
|
1913
|
+
(t, w) => async ({ file: N, onSuccess: j, onError: y }) => {
|
|
1914
|
+
var O, ve;
|
|
1915
|
+
I((z) => ({ ...z, [t]: !0 }));
|
|
1873
1916
|
try {
|
|
1874
|
-
const
|
|
1875
|
-
if (
|
|
1876
|
-
|
|
1877
|
-
if (
|
|
1878
|
-
const
|
|
1879
|
-
return { ...
|
|
1880
|
-
}),
|
|
1881
|
-
} catch (
|
|
1882
|
-
const
|
|
1883
|
-
|
|
1917
|
+
const z = N, A = await as(z), fe = (O = A == null ? void 0 : A.data) == null ? void 0 : O.url, Ae = ((ve = A == null ? void 0 : A.data) == null ? void 0 : ve.name) || z.name;
|
|
1918
|
+
if (!fe) throw new Error("上传结果缺少文件地址");
|
|
1919
|
+
ke((me) => ({ ...me, [fe]: Ae })), Y((me) => {
|
|
1920
|
+
if (w <= 1) return { ...me, [t]: fe };
|
|
1921
|
+
const He = Array.isArray(me[t]) ? me[t] : me[t] ? [me[t]] : [];
|
|
1922
|
+
return { ...me, [t]: [...He, fe] };
|
|
1923
|
+
}), j == null || j(A), C.success("上传成功");
|
|
1924
|
+
} catch (z) {
|
|
1925
|
+
const A = z instanceof Error ? z : new Error("上传失败");
|
|
1926
|
+
y == null || y(A), C.error(A.message);
|
|
1884
1927
|
} finally {
|
|
1885
|
-
I((
|
|
1928
|
+
I((z) => ({ ...z, [t]: !1 }));
|
|
1886
1929
|
}
|
|
1887
1930
|
},
|
|
1888
1931
|
[]
|
|
1889
|
-
),
|
|
1932
|
+
), We = s.useCallback(
|
|
1890
1933
|
async (t) => {
|
|
1891
|
-
const
|
|
1892
|
-
if (t.target.value = "",
|
|
1934
|
+
const w = Array.from(t.target.files ?? []);
|
|
1935
|
+
if (t.target.value = "", w.length !== 0) {
|
|
1893
1936
|
pe(!0);
|
|
1894
1937
|
try {
|
|
1895
|
-
const
|
|
1896
|
-
|
|
1897
|
-
var
|
|
1898
|
-
const
|
|
1899
|
-
if (!
|
|
1938
|
+
const N = await Promise.all(
|
|
1939
|
+
w.map(async (j) => {
|
|
1940
|
+
var z, A;
|
|
1941
|
+
const y = await as(j), O = (z = y == null ? void 0 : y.data) == null ? void 0 : z.url, ve = ((A = y == null ? void 0 : y.data) == null ? void 0 : A.name) || j.name;
|
|
1942
|
+
if (!O) throw new Error("上传结果缺少文件地址");
|
|
1900
1943
|
return {
|
|
1901
|
-
type:
|
|
1902
|
-
url:
|
|
1903
|
-
name:
|
|
1904
|
-
mime_type:
|
|
1944
|
+
type: j.type.startsWith("image/") ? "image" : "file",
|
|
1945
|
+
url: O,
|
|
1946
|
+
name: ve,
|
|
1947
|
+
mime_type: j.type
|
|
1905
1948
|
};
|
|
1906
1949
|
})
|
|
1907
1950
|
);
|
|
1908
|
-
de((
|
|
1909
|
-
} catch (
|
|
1910
|
-
|
|
1951
|
+
de((j) => [...j, ...N]), C.success(`已添加 ${N.length} 个附件`);
|
|
1952
|
+
} catch (N) {
|
|
1953
|
+
C.error(N instanceof Error ? N.message : "上传失败");
|
|
1911
1954
|
} finally {
|
|
1912
1955
|
pe(!1);
|
|
1913
1956
|
}
|
|
1914
1957
|
}
|
|
1915
1958
|
},
|
|
1916
1959
|
[]
|
|
1917
|
-
),
|
|
1918
|
-
de((
|
|
1919
|
-
}, []),
|
|
1920
|
-
() =>
|
|
1921
|
-
(t) => t.required &&
|
|
1960
|
+
), Me = s.useCallback((t) => {
|
|
1961
|
+
de((w) => w.filter((N) => N.url !== t));
|
|
1962
|
+
}, []), Ee = s.useMemo(
|
|
1963
|
+
() => be.filter(
|
|
1964
|
+
(t) => t.required && ga(U[t.name])
|
|
1922
1965
|
),
|
|
1923
|
-
[
|
|
1924
|
-
),
|
|
1925
|
-
() =>
|
|
1926
|
-
[
|
|
1966
|
+
[be, U]
|
|
1967
|
+
), se = s.useMemo(
|
|
1968
|
+
() => T.find((t) => t.id === ae) ?? T.find((t) => t.current) ?? T[0],
|
|
1969
|
+
[T, ae]
|
|
1927
1970
|
);
|
|
1928
1971
|
return /* @__PURE__ */ e.jsxs("div", { className: "wandox-console-view", children: [
|
|
1929
1972
|
/* @__PURE__ */ e.jsxs("div", { className: "wandox-console-homecenter", children: [
|
|
1930
1973
|
/* @__PURE__ */ e.jsxs("div", { className: "wandox-console-homecenter-hero", children: [
|
|
1931
|
-
|
|
1974
|
+
se && /* @__PURE__ */ e.jsxs("div", { className: "wandox-console-home-header", children: [
|
|
1932
1975
|
/* @__PURE__ */ e.jsxs("div", { className: "wandox-console-home-header__agent", children: [
|
|
1933
|
-
/* @__PURE__ */ e.jsx("span", { className: "wandox-console-home-header__avatar", children:
|
|
1976
|
+
/* @__PURE__ */ e.jsx("span", { className: "wandox-console-home-header__avatar", children: se.icon }),
|
|
1934
1977
|
/* @__PURE__ */ e.jsxs("div", { className: "wandox-console-home-header__identity", children: [
|
|
1935
1978
|
/* @__PURE__ */ e.jsxs("div", { className: "wandox-console-home-header__selector-row", children: [
|
|
1936
1979
|
/* @__PURE__ */ e.jsx(
|
|
1937
|
-
|
|
1980
|
+
fa,
|
|
1938
1981
|
{
|
|
1939
1982
|
menu: {
|
|
1940
|
-
items:
|
|
1983
|
+
items: T.map((t) => ({
|
|
1941
1984
|
key: t.id,
|
|
1942
|
-
disabled: t.id ===
|
|
1985
|
+
disabled: t.id === se.id,
|
|
1943
1986
|
label: /* @__PURE__ */ e.jsxs("span", { className: "wandox-console-agent-menu-item", children: [
|
|
1944
1987
|
/* @__PURE__ */ e.jsx("span", { className: "wandox-console-agent-menu-item__icon", children: t.icon }),
|
|
1945
1988
|
/* @__PURE__ */ e.jsx("span", { className: "wandox-console-agent-menu-item__name", children: t.name }),
|
|
1946
|
-
t.id ===
|
|
1989
|
+
t.id === se.id && /* @__PURE__ */ e.jsx(ya, { className: "wandox-console-agent-menu-item__check" })
|
|
1947
1990
|
] })
|
|
1948
1991
|
})),
|
|
1949
|
-
onClick: ({ key: t }) =>
|
|
1992
|
+
onClick: ({ key: t }) => Q == null ? void 0 : Q(t)
|
|
1950
1993
|
},
|
|
1951
1994
|
trigger: ["click"],
|
|
1952
1995
|
placement: "bottomLeft",
|
|
@@ -1957,21 +2000,21 @@ function ho({
|
|
|
1957
2000
|
className: "wandox-console-home-header__selector",
|
|
1958
2001
|
"aria-label": "切换智能体",
|
|
1959
2002
|
children: [
|
|
1960
|
-
/* @__PURE__ */ e.jsx("span", { className: "wandox-console-home-header__name", children:
|
|
1961
|
-
/* @__PURE__ */ e.jsx(
|
|
2003
|
+
/* @__PURE__ */ e.jsx("span", { className: "wandox-console-home-header__name", children: se.name }),
|
|
2004
|
+
/* @__PURE__ */ e.jsx(xs, { className: "wandox-console-home-header__arrow" })
|
|
1962
2005
|
]
|
|
1963
2006
|
}
|
|
1964
2007
|
)
|
|
1965
2008
|
}
|
|
1966
2009
|
),
|
|
1967
|
-
/* @__PURE__ */ e.jsx(
|
|
2010
|
+
/* @__PURE__ */ e.jsx(bs, { benefit: se.packageBenefit })
|
|
1968
2011
|
] }),
|
|
1969
|
-
|
|
2012
|
+
se.desc && /* @__PURE__ */ e.jsx(
|
|
1970
2013
|
"p",
|
|
1971
2014
|
{
|
|
1972
2015
|
className: "wandox-console-home-header__description",
|
|
1973
|
-
title:
|
|
1974
|
-
children:
|
|
2016
|
+
title: se.desc,
|
|
2017
|
+
children: se.desc
|
|
1975
2018
|
}
|
|
1976
2019
|
)
|
|
1977
2020
|
] })
|
|
@@ -1984,77 +2027,77 @@ function ho({
|
|
|
1984
2027
|
onClick: () => le == null ? void 0 : le(),
|
|
1985
2028
|
children: [
|
|
1986
2029
|
/* @__PURE__ */ e.jsx("span", { children: "会话记录" }),
|
|
1987
|
-
/* @__PURE__ */ e.jsx(
|
|
2030
|
+
/* @__PURE__ */ e.jsx(Mn, { className: "wandox-console-home-header__history-arrow" })
|
|
1988
2031
|
]
|
|
1989
2032
|
}
|
|
1990
2033
|
)
|
|
1991
2034
|
] }),
|
|
1992
2035
|
/* @__PURE__ */ e.jsxs("div", { className: "wandox-console-prompt", children: [
|
|
1993
|
-
|
|
2036
|
+
f && /* @__PURE__ */ e.jsxs("div", { className: "wandox-console-prompt__head", children: [
|
|
1994
2037
|
/* @__PURE__ */ e.jsxs("div", { className: "wandox-console-scenechoice", children: [
|
|
1995
2038
|
/* @__PURE__ */ e.jsx("span", { children: "已选择场景" }),
|
|
1996
|
-
/* @__PURE__ */ e.jsx("strong", { children:
|
|
2039
|
+
/* @__PURE__ */ e.jsx("strong", { children: f.title })
|
|
1997
2040
|
] }),
|
|
1998
2041
|
/* @__PURE__ */ e.jsx(
|
|
1999
2042
|
"button",
|
|
2000
2043
|
{
|
|
2001
2044
|
type: "button",
|
|
2002
2045
|
className: "wandox-console-changescene",
|
|
2003
|
-
onClick:
|
|
2046
|
+
onClick: oa,
|
|
2004
2047
|
children: "重新选择"
|
|
2005
2048
|
}
|
|
2006
2049
|
)
|
|
2007
2050
|
] }),
|
|
2008
|
-
|
|
2009
|
-
|
|
2051
|
+
f ? /* @__PURE__ */ e.jsx("div", { className: "wandox-console-taskarea wandox-console-taskarea--static", children: f.desc || f.title }) : /* @__PURE__ */ e.jsx("div", { className: "wandox-console-taskarea", children: /* @__PURE__ */ e.jsx(
|
|
2052
|
+
go,
|
|
2010
2053
|
{
|
|
2011
2054
|
ref: ie,
|
|
2012
|
-
value:
|
|
2013
|
-
onChange: (t) =>
|
|
2055
|
+
value: $,
|
|
2056
|
+
onChange: (t) => q(t.target.value),
|
|
2014
2057
|
autoSize: { minRows: 2 },
|
|
2015
2058
|
variant: "borderless",
|
|
2016
2059
|
placeholder: "直接描述你的问题,或选择一个场景开始"
|
|
2017
2060
|
}
|
|
2018
2061
|
) }),
|
|
2019
|
-
|
|
2020
|
-
/* @__PURE__ */ e.jsx(
|
|
2062
|
+
f && W && /* @__PURE__ */ e.jsxs("div", { className: "wandox-console-paramarea wandox-console-paramarea--state", children: [
|
|
2063
|
+
/* @__PURE__ */ e.jsx(Ln, {}),
|
|
2021
2064
|
/* @__PURE__ */ e.jsx("span", { children: "正在读取场景参数..." })
|
|
2022
2065
|
] }),
|
|
2023
|
-
|
|
2066
|
+
f && !W && te && /* @__PURE__ */ e.jsxs("div", { className: "wandox-console-paramarea wandox-console-paramarea--state", children: [
|
|
2024
2067
|
/* @__PURE__ */ e.jsx("span", { children: "场景参数加载失败" }),
|
|
2025
2068
|
/* @__PURE__ */ e.jsxs(
|
|
2026
2069
|
"button",
|
|
2027
2070
|
{
|
|
2028
2071
|
type: "button",
|
|
2029
2072
|
className: "wandox-console-paramarea__retry",
|
|
2030
|
-
onClick: () => void
|
|
2073
|
+
onClick: () => void Ie(f),
|
|
2031
2074
|
children: [
|
|
2032
|
-
/* @__PURE__ */ e.jsx(
|
|
2075
|
+
/* @__PURE__ */ e.jsx(ss, {}),
|
|
2033
2076
|
"重试"
|
|
2034
2077
|
]
|
|
2035
2078
|
}
|
|
2036
2079
|
)
|
|
2037
2080
|
] }),
|
|
2038
|
-
|
|
2081
|
+
f && !W && !te && be.length > 0 && /* @__PURE__ */ e.jsxs("div", { className: "wandox-console-paramarea", children: [
|
|
2039
2082
|
/* @__PURE__ */ e.jsxs("div", { className: "wandox-console-paramhead", children: [
|
|
2040
|
-
/* @__PURE__ */ e.jsx(
|
|
2083
|
+
/* @__PURE__ */ e.jsx(ws, {}),
|
|
2041
2084
|
/* @__PURE__ */ e.jsx("strong", { children: "确认分析范围" }),
|
|
2042
2085
|
/* @__PURE__ */ e.jsxs("span", { className: "wandox-console-paramhead__status", children: [
|
|
2043
|
-
/* @__PURE__ */ e.jsx(
|
|
2086
|
+
/* @__PURE__ */ e.jsx(ya, {}),
|
|
2044
2087
|
" ",
|
|
2045
|
-
|
|
2088
|
+
Ee.length > 0 ? `待填 ${Ee.length} 项必填参数` : "参数已就绪"
|
|
2046
2089
|
] })
|
|
2047
2090
|
] }),
|
|
2048
|
-
/* @__PURE__ */ e.jsx("div", { className: "wandox-console-params", children:
|
|
2049
|
-
|
|
2091
|
+
/* @__PURE__ */ e.jsx("div", { className: "wandox-console-params", children: be.map((t) => /* @__PURE__ */ e.jsx(
|
|
2092
|
+
js,
|
|
2050
2093
|
{
|
|
2051
2094
|
field: t,
|
|
2052
|
-
value:
|
|
2095
|
+
value: U[t.name],
|
|
2053
2096
|
uploading: !!re[t.name],
|
|
2054
2097
|
fileNameMap: B,
|
|
2055
|
-
getOptionState:
|
|
2056
|
-
onChange:
|
|
2057
|
-
onUpload:
|
|
2098
|
+
getOptionState: qe.getFieldState,
|
|
2099
|
+
onChange: Pe,
|
|
2100
|
+
onUpload: ta
|
|
2058
2101
|
},
|
|
2059
2102
|
t.name
|
|
2060
2103
|
)) })
|
|
@@ -2062,9 +2105,9 @@ function ho({
|
|
|
2062
2105
|
/* @__PURE__ */ e.jsxs(
|
|
2063
2106
|
"div",
|
|
2064
2107
|
{
|
|
2065
|
-
className: `wandox-console-prompt__foot${
|
|
2108
|
+
className: `wandox-console-prompt__foot${f ? " wandox-console-prompt__foot--scene" : ""}`,
|
|
2066
2109
|
children: [
|
|
2067
|
-
!
|
|
2110
|
+
!f && /* @__PURE__ */ e.jsx(
|
|
2068
2111
|
"button",
|
|
2069
2112
|
{
|
|
2070
2113
|
type: "button",
|
|
@@ -2073,9 +2116,9 @@ function ho({
|
|
|
2073
2116
|
var t;
|
|
2074
2117
|
return (t = Re.current) == null ? void 0 : t.click();
|
|
2075
2118
|
},
|
|
2076
|
-
disabled:
|
|
2077
|
-
title:
|
|
2078
|
-
children: /* @__PURE__ */ e.jsx(
|
|
2119
|
+
disabled: je,
|
|
2120
|
+
title: je ? "上传中…" : "附件",
|
|
2121
|
+
children: /* @__PURE__ */ e.jsx(Tn, {})
|
|
2079
2122
|
}
|
|
2080
2123
|
),
|
|
2081
2124
|
/* @__PURE__ */ e.jsx(
|
|
@@ -2086,26 +2129,26 @@ function ho({
|
|
|
2086
2129
|
multiple: !0,
|
|
2087
2130
|
accept: "image/*,.pdf,.doc,.docx,.xls,.xlsx,.ppt,.pptx,.txt,.csv,.zip",
|
|
2088
2131
|
hidden: !0,
|
|
2089
|
-
onChange:
|
|
2132
|
+
onChange: We
|
|
2090
2133
|
}
|
|
2091
2134
|
),
|
|
2092
|
-
|
|
2135
|
+
f ? /* @__PURE__ */ e.jsxs(
|
|
2093
2136
|
"button",
|
|
2094
2137
|
{
|
|
2095
2138
|
type: "button",
|
|
2096
2139
|
className: "wandox-console-start",
|
|
2097
|
-
disabled:
|
|
2140
|
+
disabled: W || !!te || Ee.length > 0,
|
|
2098
2141
|
onClick: () => {
|
|
2099
|
-
|
|
2100
|
-
playbookId:
|
|
2101
|
-
playbookParams:
|
|
2102
|
-
message:
|
|
2142
|
+
R == null || R({
|
|
2143
|
+
playbookId: f.playbook_id,
|
|
2144
|
+
playbookParams: U,
|
|
2145
|
+
message: f.title,
|
|
2103
2146
|
attachments: xe
|
|
2104
2147
|
});
|
|
2105
2148
|
},
|
|
2106
2149
|
children: [
|
|
2107
2150
|
"开始执行",
|
|
2108
|
-
/* @__PURE__ */ e.jsx(
|
|
2151
|
+
/* @__PURE__ */ e.jsx(ja, {})
|
|
2109
2152
|
]
|
|
2110
2153
|
}
|
|
2111
2154
|
) : /* @__PURE__ */ e.jsx("div", { className: "wandox-console-prompt__foot-right", children: /* @__PURE__ */ e.jsx(
|
|
@@ -2113,16 +2156,16 @@ function ho({
|
|
|
2113
2156
|
{
|
|
2114
2157
|
type: "button",
|
|
2115
2158
|
className: "wandox-console-prompt__send",
|
|
2116
|
-
disabled:
|
|
2159
|
+
disabled: !$.trim(),
|
|
2117
2160
|
onClick: () => {
|
|
2118
|
-
|
|
2161
|
+
R == null || R({
|
|
2119
2162
|
playbookParams: {},
|
|
2120
|
-
message:
|
|
2163
|
+
message: $.trim(),
|
|
2121
2164
|
attachments: xe
|
|
2122
2165
|
});
|
|
2123
2166
|
},
|
|
2124
2167
|
"aria-label": "发送",
|
|
2125
|
-
children: /* @__PURE__ */ e.jsx(
|
|
2168
|
+
children: /* @__PURE__ */ e.jsx(On, {})
|
|
2126
2169
|
}
|
|
2127
2170
|
) })
|
|
2128
2171
|
]
|
|
@@ -2137,7 +2180,7 @@ function ho({
|
|
|
2137
2180
|
alt: t.name,
|
|
2138
2181
|
className: "wandox-console-attach-item__thumb"
|
|
2139
2182
|
}
|
|
2140
|
-
) : /* @__PURE__ */ e.jsx(
|
|
2183
|
+
) : /* @__PURE__ */ e.jsx(Dn, { className: "wandox-console-attach-item__icon" }),
|
|
2141
2184
|
/* @__PURE__ */ e.jsx(
|
|
2142
2185
|
"span",
|
|
2143
2186
|
{
|
|
@@ -2152,25 +2195,36 @@ function ho({
|
|
|
2152
2195
|
type: "button",
|
|
2153
2196
|
className: "wandox-console-attach-item__remove",
|
|
2154
2197
|
"aria-label": "移除附件",
|
|
2155
|
-
onClick: () =>
|
|
2156
|
-
children: /* @__PURE__ */ e.jsx(
|
|
2198
|
+
onClick: () => Me(t.url),
|
|
2199
|
+
children: /* @__PURE__ */ e.jsx(rs, {})
|
|
2157
2200
|
}
|
|
2158
2201
|
)
|
|
2159
2202
|
] }, t.url)) }),
|
|
2160
2203
|
/* @__PURE__ */ e.jsxs("div", { className: "wandox-console-scenehead", children: [
|
|
2204
|
+
G && /* @__PURE__ */ e.jsx(
|
|
2205
|
+
"button",
|
|
2206
|
+
{
|
|
2207
|
+
type: "button",
|
|
2208
|
+
className: "wandox-console-chipnav",
|
|
2209
|
+
"aria-label": "上一页分类",
|
|
2210
|
+
disabled: K === 0,
|
|
2211
|
+
onClick: () => Ne((t) => Math.max(0, t - 1)),
|
|
2212
|
+
children: /* @__PURE__ */ e.jsx(oo, {})
|
|
2213
|
+
}
|
|
2214
|
+
),
|
|
2161
2215
|
/* @__PURE__ */ e.jsx(
|
|
2162
2216
|
"div",
|
|
2163
2217
|
{
|
|
2164
2218
|
className: "wandox-console-chips",
|
|
2165
2219
|
role: "tablist",
|
|
2166
2220
|
"aria-label": "场景分类",
|
|
2167
|
-
children:
|
|
2221
|
+
children: X.map((t) => /* @__PURE__ */ e.jsx(
|
|
2168
2222
|
"button",
|
|
2169
2223
|
{
|
|
2170
2224
|
type: "button",
|
|
2171
2225
|
role: "tab",
|
|
2172
|
-
"aria-selected":
|
|
2173
|
-
className: `wandox-console-chip${
|
|
2226
|
+
"aria-selected": r === t.key,
|
|
2227
|
+
className: `wandox-console-chip${r === t.key ? " wandox-console-chip--active" : ""}`,
|
|
2174
2228
|
onClick: () => p == null ? void 0 : p(t.key),
|
|
2175
2229
|
children: /* @__PURE__ */ e.jsx("span", { children: t.name })
|
|
2176
2230
|
},
|
|
@@ -2178,68 +2232,79 @@ function ho({
|
|
|
2178
2232
|
))
|
|
2179
2233
|
}
|
|
2180
2234
|
),
|
|
2235
|
+
G && /* @__PURE__ */ e.jsx(
|
|
2236
|
+
"button",
|
|
2237
|
+
{
|
|
2238
|
+
type: "button",
|
|
2239
|
+
className: "wandox-console-chipnav",
|
|
2240
|
+
"aria-label": "下一页分类",
|
|
2241
|
+
disabled: K === Z - 1,
|
|
2242
|
+
onClick: () => Ne((t) => Math.min(Z - 1, t + 1)),
|
|
2243
|
+
children: /* @__PURE__ */ e.jsx(lo, {})
|
|
2244
|
+
}
|
|
2245
|
+
),
|
|
2181
2246
|
/* @__PURE__ */ e.jsx("div", { className: "wandox-console-scenesearch", children: /* @__PURE__ */ e.jsx(
|
|
2182
|
-
|
|
2247
|
+
Ra,
|
|
2183
2248
|
{
|
|
2184
2249
|
allowClear: !0,
|
|
2185
|
-
prefix: /* @__PURE__ */ e.jsx(
|
|
2250
|
+
prefix: /* @__PURE__ */ e.jsx(_a, {}),
|
|
2186
2251
|
placeholder: "搜索当前地图下的场景",
|
|
2187
|
-
value:
|
|
2188
|
-
onChange: (t) =>
|
|
2252
|
+
value: M,
|
|
2253
|
+
onChange: (t) => S(t.target.value)
|
|
2189
2254
|
}
|
|
2190
2255
|
) })
|
|
2191
2256
|
] })
|
|
2192
2257
|
] }),
|
|
2193
|
-
|
|
2258
|
+
x && /* @__PURE__ */ e.jsxs(
|
|
2194
2259
|
"section",
|
|
2195
2260
|
{
|
|
2196
2261
|
className: "wandox-console-scene-section",
|
|
2197
2262
|
"aria-label": "个性化场景",
|
|
2198
2263
|
children: [
|
|
2199
2264
|
/* @__PURE__ */ e.jsx("div", { className: "wandox-console-scene-section__header", children: /* @__PURE__ */ e.jsx("div", { children: /* @__PURE__ */ e.jsx("h2", { children: "为你推荐" }) }) }),
|
|
2200
|
-
|
|
2265
|
+
k ? /* @__PURE__ */ e.jsxs(
|
|
2201
2266
|
"div",
|
|
2202
2267
|
{
|
|
2203
2268
|
className: "wandox-console-agents__loading",
|
|
2204
2269
|
style: { justifyContent: "center", padding: "40px 0" },
|
|
2205
2270
|
children: [
|
|
2206
|
-
/* @__PURE__ */ e.jsx(
|
|
2271
|
+
/* @__PURE__ */ e.jsx(wa, { size: "small" }),
|
|
2207
2272
|
/* @__PURE__ */ e.jsx("span", { children: "正在加载场景..." })
|
|
2208
2273
|
]
|
|
2209
2274
|
}
|
|
2210
|
-
) :
|
|
2275
|
+
) : P && ee.length === 0 ? /* @__PURE__ */ e.jsxs(
|
|
2211
2276
|
"div",
|
|
2212
2277
|
{
|
|
2213
2278
|
className: "wandox-console-agents__error",
|
|
2214
2279
|
style: { alignItems: "center", padding: "32px 0" },
|
|
2215
2280
|
children: [
|
|
2216
|
-
/* @__PURE__ */ e.jsx("span", { children:
|
|
2281
|
+
/* @__PURE__ */ e.jsx("span", { children: P }),
|
|
2217
2282
|
/* @__PURE__ */ e.jsxs("button", { type: "button", onClick: _, children: [
|
|
2218
|
-
/* @__PURE__ */ e.jsx(
|
|
2283
|
+
/* @__PURE__ */ e.jsx(ss, {}),
|
|
2219
2284
|
"重试"
|
|
2220
2285
|
] })
|
|
2221
2286
|
]
|
|
2222
2287
|
}
|
|
2223
|
-
) :
|
|
2224
|
-
/* @__PURE__ */ e.jsx(
|
|
2225
|
-
/* @__PURE__ */ e.jsx("span", { children:
|
|
2226
|
-
] }) : /* @__PURE__ */ e.jsx("div", { className: "wandox-console-scenes-wrap", children: /* @__PURE__ */ e.jsx("div", { className: "wandox-console-scenes", children:
|
|
2227
|
-
const
|
|
2288
|
+
) : J.length === 0 ? /* @__PURE__ */ e.jsxs("div", { className: "wandox-console-scene-section__empty", children: [
|
|
2289
|
+
/* @__PURE__ */ e.jsx(_a, {}),
|
|
2290
|
+
/* @__PURE__ */ e.jsx("span", { children: M ? "没有匹配的场景" : "当前分类暂无场景" })
|
|
2291
|
+
] }) : /* @__PURE__ */ e.jsx("div", { className: "wandox-console-scenes-wrap", children: /* @__PURE__ */ e.jsx("div", { className: "wandox-console-scenes", children: J.map((t) => {
|
|
2292
|
+
const w = ko(t), N = vo(t), j = No(t.tags);
|
|
2228
2293
|
return /* @__PURE__ */ e.jsxs("div", { className: "wandox-console-scene-wrap", children: [
|
|
2229
2294
|
/* @__PURE__ */ e.jsx(
|
|
2230
2295
|
"button",
|
|
2231
2296
|
{
|
|
2232
2297
|
type: "button",
|
|
2233
|
-
className: `wandox-console-scene${
|
|
2234
|
-
onClick: () =>
|
|
2298
|
+
className: `wandox-console-scene${N ? " wandox-console-scene--featured" : ""}${b === t.playbook_id ? " wandox-console-scene--selected" : ""}`,
|
|
2299
|
+
onClick: () => Ie(t),
|
|
2235
2300
|
children: /* @__PURE__ */ e.jsxs("div", { className: "wandox-console-scene__body", children: [
|
|
2236
2301
|
/* @__PURE__ */ e.jsxs("div", { className: "wandox-console-scene__head", children: [
|
|
2237
2302
|
/* @__PURE__ */ e.jsx("strong", { title: t.title, children: t.title }),
|
|
2238
|
-
|
|
2303
|
+
w && /* @__PURE__ */ e.jsx(
|
|
2239
2304
|
"span",
|
|
2240
2305
|
{
|
|
2241
|
-
className: `wandox-console-scene__badge wandox-console-scene__badge--${
|
|
2242
|
-
children:
|
|
2306
|
+
className: `wandox-console-scene__badge wandox-console-scene__badge--${w.kind}`,
|
|
2307
|
+
children: w.text
|
|
2243
2308
|
}
|
|
2244
2309
|
)
|
|
2245
2310
|
] }),
|
|
@@ -2251,16 +2316,16 @@ function ho({
|
|
|
2251
2316
|
children: t.desc
|
|
2252
2317
|
}
|
|
2253
2318
|
),
|
|
2254
|
-
(
|
|
2255
|
-
|
|
2256
|
-
|
|
2319
|
+
(N || j.length > 0) && /* @__PURE__ */ e.jsxs("div", { className: "wandox-console-scene__tags", children: [
|
|
2320
|
+
N && /* @__PURE__ */ e.jsx("span", { className: "wandox-console-scene__tag wandox-console-scene__tag--featured", children: "精品" }),
|
|
2321
|
+
j.map((y, O) => /* @__PURE__ */ e.jsx(
|
|
2257
2322
|
"span",
|
|
2258
2323
|
{
|
|
2259
2324
|
className: "wandox-console-scene__tag",
|
|
2260
|
-
style:
|
|
2261
|
-
children:
|
|
2325
|
+
style: Co(y),
|
|
2326
|
+
children: y.name
|
|
2262
2327
|
},
|
|
2263
|
-
`${
|
|
2328
|
+
`${y.name}-${O}`
|
|
2264
2329
|
))
|
|
2265
2330
|
] })
|
|
2266
2331
|
] })
|
|
@@ -2272,10 +2337,10 @@ function ho({
|
|
|
2272
2337
|
type: "button",
|
|
2273
2338
|
className: "wandox-console-scene__video",
|
|
2274
2339
|
"aria-label": `播放${t.title}演示视频`,
|
|
2275
|
-
onClick: (
|
|
2340
|
+
onClick: (y) => ue(y, t),
|
|
2276
2341
|
children: [
|
|
2277
2342
|
"▶ ",
|
|
2278
|
-
|
|
2343
|
+
gs(t.video_duration),
|
|
2279
2344
|
" 演示"
|
|
2280
2345
|
]
|
|
2281
2346
|
}
|
|
@@ -2287,83 +2352,83 @@ function ho({
|
|
|
2287
2352
|
)
|
|
2288
2353
|
] }),
|
|
2289
2354
|
/* @__PURE__ */ e.jsx(
|
|
2290
|
-
|
|
2355
|
+
ds,
|
|
2291
2356
|
{
|
|
2292
|
-
playbook:
|
|
2293
|
-
onClose: () =>
|
|
2357
|
+
playbook: Ce,
|
|
2358
|
+
onClose: () => D(null)
|
|
2294
2359
|
}
|
|
2295
2360
|
)
|
|
2296
2361
|
] });
|
|
2297
2362
|
}
|
|
2298
|
-
function
|
|
2363
|
+
function vo(o) {
|
|
2299
2364
|
return o.is_featured === !0 || o.badge === "featured";
|
|
2300
2365
|
}
|
|
2301
|
-
function
|
|
2366
|
+
function ko(o) {
|
|
2302
2367
|
return o.badge === "recommend" ? { text: "推荐", kind: "recommend" } : o.badge === "new" ? { text: "New", kind: "new" } : null;
|
|
2303
2368
|
}
|
|
2304
|
-
function
|
|
2369
|
+
function No(o) {
|
|
2305
2370
|
return Array.isArray(o) ? o.filter(
|
|
2306
|
-
(
|
|
2371
|
+
(l) => typeof (l == null ? void 0 : l.name) == "string" && l.name.trim() !== ""
|
|
2307
2372
|
) : [];
|
|
2308
2373
|
}
|
|
2309
|
-
function
|
|
2374
|
+
function Co(o) {
|
|
2310
2375
|
if (!(o.variant !== "soft" || !o.color))
|
|
2311
2376
|
return {
|
|
2312
2377
|
color: o.color,
|
|
2313
|
-
borderColor:
|
|
2314
|
-
backgroundColor:
|
|
2378
|
+
borderColor: cs(o.color, 0.28),
|
|
2379
|
+
backgroundColor: cs(o.color, 0.08)
|
|
2315
2380
|
};
|
|
2316
2381
|
}
|
|
2317
|
-
function
|
|
2318
|
-
const
|
|
2319
|
-
if (!/^[0-9a-fA-F]{6}$/.test(
|
|
2320
|
-
const
|
|
2321
|
-
return `rgba(${
|
|
2382
|
+
function cs(o, l) {
|
|
2383
|
+
const u = o.trim().replace("#", "");
|
|
2384
|
+
if (!/^[0-9a-fA-F]{6}$/.test(u)) return o;
|
|
2385
|
+
const r = Number.parseInt(u.slice(0, 2), 16), p = Number.parseInt(u.slice(2, 4), 16), k = Number.parseInt(u.slice(4, 6), 16);
|
|
2386
|
+
return `rgba(${r}, ${p}, ${k}, ${l})`;
|
|
2322
2387
|
}
|
|
2323
|
-
const
|
|
2388
|
+
const So = [
|
|
2324
2389
|
{
|
|
2325
2390
|
id: "conversation",
|
|
2326
2391
|
title: "智能体",
|
|
2327
2392
|
desc: "与智能体自由对话或选择场景执行任务",
|
|
2328
|
-
icon: /* @__PURE__ */ e.jsx(
|
|
2393
|
+
icon: /* @__PURE__ */ e.jsx(Un, {}),
|
|
2329
2394
|
accent: "#4f46e5"
|
|
2330
2395
|
},
|
|
2331
2396
|
{
|
|
2332
2397
|
id: "automation",
|
|
2333
2398
|
title: "自动化",
|
|
2334
2399
|
desc: "管理与执行自动化流程、定时任务与驾驶舱",
|
|
2335
|
-
icon: /* @__PURE__ */ e.jsx(
|
|
2400
|
+
icon: /* @__PURE__ */ e.jsx(Fn, {}),
|
|
2336
2401
|
accent: "#4f46e5"
|
|
2337
2402
|
}
|
|
2338
|
-
],
|
|
2403
|
+
], Be = {
|
|
2339
2404
|
id: "notification",
|
|
2340
2405
|
title: "通知配置",
|
|
2341
|
-
icon: /* @__PURE__ */ e.jsx(
|
|
2406
|
+
icon: /* @__PURE__ */ e.jsx(fs, {}),
|
|
2342
2407
|
accent: "#e0730c"
|
|
2343
2408
|
};
|
|
2344
|
-
function
|
|
2409
|
+
function Ro({
|
|
2345
2410
|
features: o,
|
|
2346
|
-
onOpenFeature:
|
|
2347
|
-
activeId:
|
|
2411
|
+
onOpenFeature: l,
|
|
2412
|
+
activeId: u
|
|
2348
2413
|
}) {
|
|
2349
2414
|
return /* @__PURE__ */ e.jsxs("header", { className: "wandox-console-topnav", "aria-label": "控制台顶部导航", children: [
|
|
2350
|
-
/* @__PURE__ */ e.jsx("nav", { className: "wandox-console-topnav__pill", "aria-label": "工作台", children: o.map((
|
|
2351
|
-
const p =
|
|
2415
|
+
/* @__PURE__ */ e.jsx("nav", { className: "wandox-console-topnav__pill", "aria-label": "工作台", children: o.map((r) => {
|
|
2416
|
+
const p = u === r.id;
|
|
2352
2417
|
return /* @__PURE__ */ e.jsxs(
|
|
2353
2418
|
"button",
|
|
2354
2419
|
{
|
|
2355
2420
|
type: "button",
|
|
2356
2421
|
className: `wandox-console-topnav__pill-btn${p ? " wandox-console-topnav__pill-btn--active" : ""}`,
|
|
2357
|
-
title:
|
|
2358
|
-
"aria-label":
|
|
2422
|
+
title: r.title,
|
|
2423
|
+
"aria-label": r.title,
|
|
2359
2424
|
"aria-current": p ? "page" : void 0,
|
|
2360
|
-
onClick: () =>
|
|
2425
|
+
onClick: () => l(r.id),
|
|
2361
2426
|
children: [
|
|
2362
|
-
/* @__PURE__ */ e.jsx("span", { className: "wandox-console-topnav__pill-icon", children:
|
|
2363
|
-
/* @__PURE__ */ e.jsx("span", { className: "wandox-console-topnav__pill-text", children:
|
|
2427
|
+
/* @__PURE__ */ e.jsx("span", { className: "wandox-console-topnav__pill-icon", children: r.icon }),
|
|
2428
|
+
/* @__PURE__ */ e.jsx("span", { className: "wandox-console-topnav__pill-text", children: r.title })
|
|
2364
2429
|
]
|
|
2365
2430
|
},
|
|
2366
|
-
|
|
2431
|
+
r.id
|
|
2367
2432
|
);
|
|
2368
2433
|
}) }),
|
|
2369
2434
|
/* @__PURE__ */ e.jsx(
|
|
@@ -2372,32 +2437,32 @@ function wo({
|
|
|
2372
2437
|
type: "button",
|
|
2373
2438
|
className: "wandox-console-topnav__notify",
|
|
2374
2439
|
style: {
|
|
2375
|
-
"--notify-accent":
|
|
2440
|
+
"--notify-accent": Be.accent
|
|
2376
2441
|
},
|
|
2377
|
-
title:
|
|
2378
|
-
"aria-label":
|
|
2379
|
-
onClick: () =>
|
|
2380
|
-
children: /* @__PURE__ */ e.jsx("span", { className: "wandox-console-topnav__notify-icon", children:
|
|
2442
|
+
title: Be.title,
|
|
2443
|
+
"aria-label": Be.title,
|
|
2444
|
+
onClick: () => l(Be.id),
|
|
2445
|
+
children: /* @__PURE__ */ e.jsx("span", { className: "wandox-console-topnav__notify-icon", children: Be.icon })
|
|
2381
2446
|
}
|
|
2382
2447
|
)
|
|
2383
2448
|
] });
|
|
2384
2449
|
}
|
|
2385
|
-
function
|
|
2450
|
+
function $o({
|
|
2386
2451
|
className: o = "",
|
|
2387
|
-
state:
|
|
2452
|
+
state: l = "idle"
|
|
2388
2453
|
}) {
|
|
2389
2454
|
return /* @__PURE__ */ e.jsx(
|
|
2390
2455
|
"img",
|
|
2391
2456
|
{
|
|
2392
2457
|
className: `wandox-console-companion${o ? ` ${o}` : ""}`,
|
|
2393
|
-
"data-state":
|
|
2394
|
-
src:
|
|
2458
|
+
"data-state": l,
|
|
2459
|
+
src: Vn,
|
|
2395
2460
|
alt: "",
|
|
2396
2461
|
"aria-hidden": "true"
|
|
2397
2462
|
}
|
|
2398
2463
|
);
|
|
2399
2464
|
}
|
|
2400
|
-
function
|
|
2465
|
+
function ls({ fading: o }) {
|
|
2401
2466
|
return /* @__PURE__ */ e.jsxs(
|
|
2402
2467
|
"div",
|
|
2403
2468
|
{
|
|
@@ -2408,7 +2473,7 @@ function na({ fading: o }) {
|
|
|
2408
2473
|
/* @__PURE__ */ e.jsx("div", { className: "wandox-console-init__halo wandox-console-init__halo--b" }),
|
|
2409
2474
|
/* @__PURE__ */ e.jsxs("div", { className: "wandox-console-init__inner", children: [
|
|
2410
2475
|
/* @__PURE__ */ e.jsx(
|
|
2411
|
-
|
|
2476
|
+
$o,
|
|
2412
2477
|
{
|
|
2413
2478
|
className: "wandox-console-init__companion",
|
|
2414
2479
|
state: "thinking"
|
|
@@ -2431,27 +2496,27 @@ function na({ fading: o }) {
|
|
|
2431
2496
|
}
|
|
2432
2497
|
);
|
|
2433
2498
|
}
|
|
2434
|
-
function
|
|
2499
|
+
function is({
|
|
2435
2500
|
title: o,
|
|
2436
|
-
onBack:
|
|
2437
|
-
hideHeader:
|
|
2438
|
-
className:
|
|
2501
|
+
onBack: l,
|
|
2502
|
+
hideHeader: u = !1,
|
|
2503
|
+
className: r,
|
|
2439
2504
|
children: p
|
|
2440
2505
|
}) {
|
|
2441
2506
|
return /* @__PURE__ */ e.jsxs(
|
|
2442
2507
|
"div",
|
|
2443
2508
|
{
|
|
2444
|
-
className: `wandox-console-featureview${
|
|
2509
|
+
className: `wandox-console-featureview${r ? ` ${r}` : ""}`,
|
|
2445
2510
|
children: [
|
|
2446
|
-
!
|
|
2511
|
+
!u && /* @__PURE__ */ e.jsxs("div", { className: "wandox-console-featureview__bar", children: [
|
|
2447
2512
|
/* @__PURE__ */ e.jsxs(
|
|
2448
2513
|
"button",
|
|
2449
2514
|
{
|
|
2450
2515
|
type: "button",
|
|
2451
2516
|
className: "wandox-console-featureview__back",
|
|
2452
|
-
onClick:
|
|
2517
|
+
onClick: l,
|
|
2453
2518
|
children: [
|
|
2454
|
-
/* @__PURE__ */ e.jsx(
|
|
2519
|
+
/* @__PURE__ */ e.jsx(_s, {}),
|
|
2455
2520
|
"返回控制台"
|
|
2456
2521
|
]
|
|
2457
2522
|
}
|
|
@@ -2463,225 +2528,225 @@ function oa({
|
|
|
2463
2528
|
}
|
|
2464
2529
|
);
|
|
2465
2530
|
}
|
|
2466
|
-
function
|
|
2531
|
+
function Po({
|
|
2467
2532
|
agents: o,
|
|
2468
|
-
initialAgentId:
|
|
2469
|
-
initialPlaybookId:
|
|
2470
|
-
initialPlaybookParams:
|
|
2533
|
+
initialAgentId: l,
|
|
2534
|
+
initialPlaybookId: u,
|
|
2535
|
+
initialPlaybookParams: r,
|
|
2471
2536
|
onReady: p
|
|
2472
2537
|
} = {}) {
|
|
2473
2538
|
const {
|
|
2474
|
-
agents:
|
|
2475
|
-
agentLoading:
|
|
2539
|
+
agents: k,
|
|
2540
|
+
agentLoading: P,
|
|
2476
2541
|
selectedAgentId: _,
|
|
2477
|
-
selectedAgent:
|
|
2478
|
-
selectAgent:
|
|
2479
|
-
...
|
|
2480
|
-
} =
|
|
2542
|
+
selectedAgent: R,
|
|
2543
|
+
selectAgent: T,
|
|
2544
|
+
...ae
|
|
2545
|
+
} = Kn({ presetAgents: o, initialAgentId: l }), [Q, le] = s.useState(null), $ = s.useRef(null), q = s.useRef(!1), [M, S] = s.useState("home"), [h, D] = s.useState(
|
|
2481
2546
|
null
|
|
2482
|
-
), [ie,
|
|
2483
|
-
if (
|
|
2484
|
-
|
|
2547
|
+
), [ie, F] = s.useState(!1), [E, W] = s.useState(null), [oe, te] = s.useState(""), H = R == null ? void 0 : R.name, V = s.useCallback((x) => {
|
|
2548
|
+
if ($.current) {
|
|
2549
|
+
$.current.showInspectionResults(x);
|
|
2485
2550
|
return;
|
|
2486
2551
|
}
|
|
2487
2552
|
le({ robotName: x });
|
|
2488
2553
|
}, []);
|
|
2489
|
-
|
|
2554
|
+
s.useEffect(() => {
|
|
2490
2555
|
p == null || p({ showInspectionResults: V });
|
|
2491
|
-
}, [V, p]),
|
|
2492
|
-
!
|
|
2556
|
+
}, [V, p]), s.useEffect(() => {
|
|
2557
|
+
!Q || $.current || !_ || M === "chat" || (W({
|
|
2493
2558
|
agentId: _,
|
|
2494
|
-
agentName:
|
|
2559
|
+
agentName: H,
|
|
2495
2560
|
playbookParams: {},
|
|
2496
2561
|
message: ""
|
|
2497
|
-
}),
|
|
2498
|
-
}, [
|
|
2562
|
+
}), S("chat"));
|
|
2563
|
+
}, [M, Q, _, H]), s.useEffect(() => {
|
|
2499
2564
|
te("");
|
|
2500
2565
|
}, [_]);
|
|
2501
2566
|
const {
|
|
2502
|
-
playbooks:
|
|
2503
|
-
userPlaybooks:
|
|
2567
|
+
playbooks: U,
|
|
2568
|
+
userPlaybooks: Y,
|
|
2504
2569
|
useMapCategories: re,
|
|
2505
2570
|
useMapCards: I,
|
|
2506
2571
|
sceneLoading: B,
|
|
2507
|
-
useMapError:
|
|
2572
|
+
useMapError: ke,
|
|
2508
2573
|
reload: xe
|
|
2509
|
-
} =
|
|
2510
|
-
() => re.length > 0 ? re :
|
|
2511
|
-
[re,
|
|
2574
|
+
} = ae, de = s.useMemo(
|
|
2575
|
+
() => re.length > 0 ? re : Gn(U),
|
|
2576
|
+
[re, U]
|
|
2512
2577
|
);
|
|
2513
|
-
|
|
2578
|
+
s.useEffect(() => {
|
|
2514
2579
|
if (de.length === 0) return;
|
|
2515
2580
|
de.some(
|
|
2516
|
-
(
|
|
2581
|
+
(b) => b.key === oe
|
|
2517
2582
|
) || te(de[0].key);
|
|
2518
2583
|
}, [de]);
|
|
2519
|
-
const
|
|
2520
|
-
|
|
2521
|
-
if (
|
|
2584
|
+
const je = s.useRef(!1);
|
|
2585
|
+
s.useEffect(() => {
|
|
2586
|
+
if (je.current || !u || !_ || B)
|
|
2522
2587
|
return;
|
|
2523
|
-
const x =
|
|
2524
|
-
(
|
|
2588
|
+
const x = k.find(
|
|
2589
|
+
(b) => b.id === _ && os(b, l)
|
|
2525
2590
|
);
|
|
2526
|
-
x && (
|
|
2591
|
+
x && (je.current = !0, W({
|
|
2527
2592
|
agentId: _,
|
|
2528
2593
|
agentName: x.name,
|
|
2529
|
-
playbookId:
|
|
2530
|
-
playbookParams:
|
|
2594
|
+
playbookId: u,
|
|
2595
|
+
playbookParams: r || {},
|
|
2531
2596
|
message: ""
|
|
2532
|
-
}),
|
|
2597
|
+
}), S("chat"));
|
|
2533
2598
|
}, [
|
|
2534
2599
|
B,
|
|
2535
|
-
|
|
2536
|
-
|
|
2537
|
-
|
|
2538
|
-
|
|
2600
|
+
k,
|
|
2601
|
+
l,
|
|
2602
|
+
u,
|
|
2603
|
+
r,
|
|
2539
2604
|
_,
|
|
2540
|
-
|
|
2541
|
-
]),
|
|
2542
|
-
if (
|
|
2605
|
+
H
|
|
2606
|
+
]), s.useEffect(() => {
|
|
2607
|
+
if (q.current || !l || u || !_ || B)
|
|
2543
2608
|
return;
|
|
2544
|
-
const x =
|
|
2545
|
-
(
|
|
2609
|
+
const x = k.find(
|
|
2610
|
+
(b) => b.id === _ && os(b, l)
|
|
2546
2611
|
);
|
|
2547
|
-
x && (
|
|
2612
|
+
x && (q.current = !0, W({
|
|
2548
2613
|
agentId: x.id,
|
|
2549
2614
|
agentName: x.name,
|
|
2550
2615
|
playbookParams: {},
|
|
2551
2616
|
message: ""
|
|
2552
|
-
}),
|
|
2553
|
-
}, [
|
|
2554
|
-
const [pe, Re] =
|
|
2555
|
-
|
|
2556
|
-
if (!pe || !(!
|
|
2557
|
-
|
|
2558
|
-
const
|
|
2559
|
-
return () => clearTimeout(
|
|
2560
|
-
}, [
|
|
2561
|
-
const
|
|
2562
|
-
|
|
2563
|
-
}, []),
|
|
2617
|
+
}), S("chat"));
|
|
2618
|
+
}, [k, B, l, u, _]);
|
|
2619
|
+
const [pe, Re] = s.useState(!0), [$e, Ne] = s.useState(!1);
|
|
2620
|
+
s.useEffect(() => {
|
|
2621
|
+
if (!pe || !(!P && k.length > 0 && !!_ && !B)) return;
|
|
2622
|
+
Ne(!0);
|
|
2623
|
+
const ce = setTimeout(() => Re(!1), 280);
|
|
2624
|
+
return () => clearTimeout(ce);
|
|
2625
|
+
}, [P, k.length, _, B, pe]);
|
|
2626
|
+
const Z = s.useCallback(() => {
|
|
2627
|
+
S("home"), D(null), F(!1);
|
|
2628
|
+
}, []), K = s.useCallback(
|
|
2564
2629
|
(x) => {
|
|
2565
2630
|
if (x === "conversation") {
|
|
2566
|
-
|
|
2631
|
+
Z();
|
|
2567
2632
|
return;
|
|
2568
2633
|
}
|
|
2569
|
-
|
|
2634
|
+
F(!1), D(x);
|
|
2570
2635
|
},
|
|
2571
|
-
[
|
|
2572
|
-
),
|
|
2573
|
-
|
|
2574
|
-
},
|
|
2636
|
+
[Z]
|
|
2637
|
+
), G = (x) => {
|
|
2638
|
+
T(x), S("home");
|
|
2639
|
+
}, X = (x) => {
|
|
2575
2640
|
if (x === _) return;
|
|
2576
|
-
const
|
|
2577
|
-
|
|
2641
|
+
const b = k.find((ce) => ce.id === x);
|
|
2642
|
+
T(x), W({
|
|
2578
2643
|
agentId: x,
|
|
2579
|
-
agentName:
|
|
2644
|
+
agentName: b == null ? void 0 : b.name,
|
|
2580
2645
|
playbookParams: {},
|
|
2581
2646
|
message: ""
|
|
2582
2647
|
});
|
|
2583
|
-
},
|
|
2584
|
-
_ && (
|
|
2648
|
+
}, ee = () => {
|
|
2649
|
+
_ && (W({
|
|
2585
2650
|
agentId: _,
|
|
2586
|
-
agentName:
|
|
2651
|
+
agentName: H,
|
|
2587
2652
|
playbookParams: {},
|
|
2588
2653
|
message: ""
|
|
2589
|
-
}),
|
|
2590
|
-
},
|
|
2591
|
-
|
|
2654
|
+
}), S("chat"));
|
|
2655
|
+
}, _e = (x) => {
|
|
2656
|
+
W({
|
|
2592
2657
|
agentId: _,
|
|
2593
|
-
agentName:
|
|
2658
|
+
agentName: H,
|
|
2594
2659
|
playbookId: x.playbookId,
|
|
2595
2660
|
playbookParams: x.playbookParams,
|
|
2596
2661
|
message: x.message,
|
|
2597
2662
|
attachments: x.attachments
|
|
2598
|
-
}),
|
|
2663
|
+
}), S("chat");
|
|
2599
2664
|
};
|
|
2600
|
-
return
|
|
2665
|
+
return M === "chat" && E ? /* @__PURE__ */ e.jsxs("div", { className: "wandox-console-chat-shell", children: [
|
|
2601
2666
|
/* @__PURE__ */ e.jsx(
|
|
2602
|
-
|
|
2667
|
+
yo,
|
|
2603
2668
|
{
|
|
2604
|
-
agentId:
|
|
2605
|
-
agentName:
|
|
2606
|
-
playbookId:
|
|
2607
|
-
playbookParams:
|
|
2608
|
-
initialMessage:
|
|
2609
|
-
initialAttachments:
|
|
2669
|
+
agentId: E.agentId,
|
|
2670
|
+
agentName: E.agentName,
|
|
2671
|
+
playbookId: E.playbookId,
|
|
2672
|
+
playbookParams: E.playbookParams,
|
|
2673
|
+
initialMessage: E.message,
|
|
2674
|
+
initialAttachments: E.attachments,
|
|
2610
2675
|
useMapCards: I,
|
|
2611
2676
|
useMapCategories: re,
|
|
2612
|
-
playbooks:
|
|
2613
|
-
userPlaybooks:
|
|
2614
|
-
agents:
|
|
2677
|
+
playbooks: U,
|
|
2678
|
+
userPlaybooks: Y,
|
|
2679
|
+
agents: k,
|
|
2615
2680
|
onReady: (x) => {
|
|
2616
|
-
|
|
2681
|
+
$.current = x, Q && (x.showInspectionResults(Q.robotName), le(null));
|
|
2617
2682
|
},
|
|
2618
|
-
onChangeAgent:
|
|
2683
|
+
onChangeAgent: X,
|
|
2619
2684
|
onBack: () => {
|
|
2620
|
-
|
|
2685
|
+
$.current = null, S("home");
|
|
2621
2686
|
},
|
|
2622
2687
|
onSelectScene: () => {
|
|
2623
2688
|
}
|
|
2624
2689
|
},
|
|
2625
|
-
`${
|
|
2690
|
+
`${E.agentId}:${E.playbookId || "free-chat"}`
|
|
2626
2691
|
),
|
|
2627
|
-
pe && /* @__PURE__ */ e.jsx(
|
|
2692
|
+
pe && /* @__PURE__ */ e.jsx(ls, { fading: $e })
|
|
2628
2693
|
] }) : /* @__PURE__ */ e.jsxs(
|
|
2629
2694
|
"div",
|
|
2630
2695
|
{
|
|
2631
2696
|
className: `wandox-console${ie ? " wandox-console--secondary" : ""}`,
|
|
2632
2697
|
children: [
|
|
2633
|
-
pe && /* @__PURE__ */ e.jsx(
|
|
2698
|
+
pe && /* @__PURE__ */ e.jsx(ls, { fading: $e }),
|
|
2634
2699
|
!ie && /* @__PURE__ */ e.jsx(
|
|
2635
|
-
|
|
2700
|
+
Ro,
|
|
2636
2701
|
{
|
|
2637
|
-
features:
|
|
2638
|
-
activeId:
|
|
2639
|
-
onOpenFeature:
|
|
2702
|
+
features: So,
|
|
2703
|
+
activeId: h ?? "conversation",
|
|
2704
|
+
onOpenFeature: K
|
|
2640
2705
|
}
|
|
2641
2706
|
),
|
|
2642
2707
|
/* @__PURE__ */ e.jsxs("main", { className: "wandox-console-main", children: [
|
|
2643
|
-
|
|
2644
|
-
|
|
2708
|
+
h === "automation" && /* @__PURE__ */ e.jsx(
|
|
2709
|
+
is,
|
|
2645
2710
|
{
|
|
2646
2711
|
title: "自动化",
|
|
2647
|
-
onBack: () =>
|
|
2712
|
+
onBack: () => D(null),
|
|
2648
2713
|
hideHeader: !0,
|
|
2649
2714
|
className: "wandox-console-featureview--automation",
|
|
2650
2715
|
children: /* @__PURE__ */ e.jsx(
|
|
2651
|
-
|
|
2716
|
+
Qn,
|
|
2652
2717
|
{
|
|
2653
|
-
onCockpitEnter: () =>
|
|
2654
|
-
onCockpitExit: () =>
|
|
2655
|
-
onInboxEnter: () =>
|
|
2718
|
+
onCockpitEnter: () => F(!0),
|
|
2719
|
+
onCockpitExit: () => F(!1),
|
|
2720
|
+
onInboxEnter: () => F(!0)
|
|
2656
2721
|
}
|
|
2657
2722
|
)
|
|
2658
2723
|
}
|
|
2659
2724
|
),
|
|
2660
|
-
|
|
2661
|
-
|
|
2725
|
+
h === "notification" && /* @__PURE__ */ e.jsx(
|
|
2726
|
+
is,
|
|
2662
2727
|
{
|
|
2663
2728
|
title: "通知配置",
|
|
2664
|
-
onBack: () =>
|
|
2729
|
+
onBack: () => D(null),
|
|
2665
2730
|
hideHeader: !0,
|
|
2666
|
-
children: /* @__PURE__ */ e.jsx(
|
|
2731
|
+
children: /* @__PURE__ */ e.jsx(Yn, {})
|
|
2667
2732
|
}
|
|
2668
2733
|
),
|
|
2669
|
-
!
|
|
2670
|
-
|
|
2734
|
+
!h && /* @__PURE__ */ e.jsx(
|
|
2735
|
+
jo,
|
|
2671
2736
|
{
|
|
2672
2737
|
useMapCards: I,
|
|
2673
2738
|
useMapCategories: de,
|
|
2674
|
-
playbooks:
|
|
2739
|
+
playbooks: U,
|
|
2675
2740
|
selectedCategoryKey: oe,
|
|
2676
2741
|
onCategorySelect: te,
|
|
2677
2742
|
loading: B,
|
|
2678
|
-
useMapError:
|
|
2743
|
+
useMapError: ke,
|
|
2679
2744
|
onRetry: xe,
|
|
2680
|
-
onStartAnalysis:
|
|
2681
|
-
agents:
|
|
2745
|
+
onStartAnalysis: _e,
|
|
2746
|
+
agents: k,
|
|
2682
2747
|
selectedAgentId: _,
|
|
2683
|
-
onAgentSelect:
|
|
2684
|
-
onOpenAgentChat:
|
|
2748
|
+
onAgentSelect: G,
|
|
2749
|
+
onOpenAgentChat: ee
|
|
2685
2750
|
}
|
|
2686
2751
|
)
|
|
2687
2752
|
] })
|
|
@@ -2690,5 +2755,5 @@ function vo({
|
|
|
2690
2755
|
);
|
|
2691
2756
|
}
|
|
2692
2757
|
export {
|
|
2693
|
-
|
|
2758
|
+
Po as default
|
|
2694
2759
|
};
|