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