@wandox/sdk 0.1.38 → 0.1.39
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-D4MDOCK8.cjs → V1Workbench-BL9TCe-h.cjs} +1 -1
- package/dist/{V1Workbench-CX2TY1nY.js → V1Workbench-GjmMHW_z.js} +3 -3
- package/dist/V2Workbench-C0Ak3rdn.cjs +2 -0
- package/dist/{V2Workbench-B9hpG29_.js → V2Workbench-C4uOgIer.js} +634 -614
- package/dist/{WorkbenchRuntime-DFoqujXl.js → WorkbenchRuntime-ButbDrvB.js} +2 -2
- package/dist/{WorkbenchRuntime-CcgVGiw7.cjs → WorkbenchRuntime-jXXGAqkE.cjs} +1 -1
- package/dist/{arc-BoXgqEyE.cjs → arc-BK_aujia.cjs} +1 -1
- package/dist/{arc-DRkZQWMH.js → arc-CE1S54RP.js} +1 -1
- package/dist/{architectureDiagram-3BPJPVTR-JB1cjWXS.cjs → architectureDiagram-3BPJPVTR-CCe2Qwas.cjs} +1 -1
- package/dist/{architectureDiagram-3BPJPVTR-Cvjm2RUg.js → architectureDiagram-3BPJPVTR-mquQ4A04.js} +3 -3
- package/dist/{blockDiagram-GPEHLZMM-LAE7xfhz.js → blockDiagram-GPEHLZMM-DnZ4oEXt.js} +3 -3
- package/dist/{blockDiagram-GPEHLZMM-BMrbXpB3.cjs → blockDiagram-GPEHLZMM-Dr9swVG2.cjs} +1 -1
- package/dist/{c4Diagram-AAUBKEIU-CZcPU-n2.js → c4Diagram-AAUBKEIU-DTz0ipr3.js} +2 -2
- package/dist/{c4Diagram-AAUBKEIU-T_tWuHKf.cjs → c4Diagram-AAUBKEIU-DtaJYesx.cjs} +1 -1
- package/dist/{channel-B8LPCyPH.js → channel-BeVy-ZIF.js} +1 -1
- package/dist/{channel-BaiWA2t8.cjs → channel-CDc0Yn2X.cjs} +1 -1
- package/dist/{chunk-2J33WTMH-BibdqHFp.cjs → chunk-2J33WTMH-2Z5D00s4.cjs} +1 -1
- package/dist/{chunk-2J33WTMH-C5be9lBd.js → chunk-2J33WTMH-lCahilst.js} +1 -1
- package/dist/{chunk-4BX2VUAB-DMFsq4KZ.js → chunk-4BX2VUAB-BfG82Y4D.js} +1 -1
- package/dist/{chunk-4BX2VUAB-D0KvmKPe.cjs → chunk-4BX2VUAB-C9W5QDsy.cjs} +1 -1
- package/dist/{chunk-55IACEB6-DmSQDD1d.js → chunk-55IACEB6-DDuaa7-s.js} +1 -1
- package/dist/{chunk-55IACEB6-CqaRoYMg.cjs → chunk-55IACEB6-F1nM7WdQ.cjs} +1 -1
- package/dist/{chunk-727SXJPM-slxRZHEn.cjs → chunk-727SXJPM-D9vGz_R5.cjs} +1 -1
- package/dist/{chunk-727SXJPM-zPDeBLwO.js → chunk-727SXJPM-DCpsumhn.js} +5 -5
- package/dist/{chunk-AQP2D5EJ-CAbt8thT.js → chunk-AQP2D5EJ-BiJG2fDP.js} +3 -3
- package/dist/{chunk-AQP2D5EJ-DInpQ3Bk.cjs → chunk-AQP2D5EJ-DBFNgb2V.cjs} +1 -1
- package/dist/{chunk-FMBD7UC4-7r_t9A1F.cjs → chunk-FMBD7UC4-BhyGm-GT.cjs} +1 -1
- package/dist/{chunk-FMBD7UC4-IX1Bs9Jl.js → chunk-FMBD7UC4-cWskSZrE.js} +1 -1
- package/dist/{chunk-ND2GUHAM-BDBw_eej.js → chunk-ND2GUHAM-DGIC-ZW-.js} +1 -1
- package/dist/{chunk-ND2GUHAM-BKWetS2i.cjs → chunk-ND2GUHAM-DRY6nzyy.cjs} +1 -1
- package/dist/{chunk-QZHKN3VN-CaXwA0Ch.cjs → chunk-QZHKN3VN-C7JxoAX-.cjs} +1 -1
- package/dist/{chunk-QZHKN3VN-DYLGrKqP.js → chunk-QZHKN3VN-HwaVssHs.js} +1 -1
- package/dist/{classDiagram-4FO5ZUOK-C8Col58-.cjs → classDiagram-4FO5ZUOK-CygibmXb.cjs} +1 -1
- package/dist/{classDiagram-4FO5ZUOK-BfPbGLow.js → classDiagram-4FO5ZUOK-mzJYvOZu.js} +2 -2
- package/dist/{classDiagram-v2-Q7XG4LA2-BBAMvpEX.js → classDiagram-v2-Q7XG4LA2-B1YHuxBu.js} +2 -2
- package/dist/{classDiagram-v2-Q7XG4LA2-C8Col58-.cjs → classDiagram-v2-Q7XG4LA2-CygibmXb.cjs} +1 -1
- package/dist/{cose-bilkent-S5V4N54A-BWdSLpNe.js → cose-bilkent-S5V4N54A-D8IZat0h.js} +2 -2
- package/dist/{cose-bilkent-S5V4N54A-BAGhd7Pv.cjs → cose-bilkent-S5V4N54A-Rhluulxd.cjs} +1 -1
- package/dist/{dagre-BM42HDAG-Bx9eEuWz.cjs → dagre-BM42HDAG-Bvc4ohUU.cjs} +1 -1
- package/dist/{dagre-BM42HDAG-BeqXhsH3.js → dagre-BM42HDAG-C9fviEf-.js} +1 -1
- package/dist/{diagram-2AECGRRQ-C1_rnEMZ.cjs → diagram-2AECGRRQ-CkQq6ZGh.cjs} +1 -1
- package/dist/{diagram-2AECGRRQ-CD5HRvtt.js → diagram-2AECGRRQ-paI55ZVp.js} +2 -2
- package/dist/{diagram-5GNKFQAL-hnwUnNop.js → diagram-5GNKFQAL-CDMHctmr.js} +3 -3
- package/dist/{diagram-5GNKFQAL-BGP7CKfK.cjs → diagram-5GNKFQAL-DWCFHwPd.cjs} +1 -1
- package/dist/{diagram-KO2AKTUF-C-lTMkbh.js → diagram-KO2AKTUF-BWWzWP62.js} +2 -2
- package/dist/{diagram-KO2AKTUF-Cj5RbuFk.cjs → diagram-KO2AKTUF-spfSwB_X.cjs} +1 -1
- package/dist/{diagram-LMA3HP47-DNNxuzUF.js → diagram-LMA3HP47-BT-BShmi.js} +2 -2
- package/dist/{diagram-LMA3HP47-qynJFlE9.cjs → diagram-LMA3HP47-RAfpkFKr.cjs} +1 -1
- package/dist/{diagram-OG6HWLK6-D-mFnPam.js → diagram-OG6HWLK6-CIN-4ftA.js} +3 -3
- package/dist/{diagram-OG6HWLK6-BEw06BpQ.cjs → diagram-OG6HWLK6-CqDudF-0.cjs} +1 -1
- package/dist/{erDiagram-TEJ5UH35-DlHPKqjs.js → erDiagram-TEJ5UH35-D0fhsTuc.js} +4 -4
- package/dist/{erDiagram-TEJ5UH35-ihaFG4EG.cjs → erDiagram-TEJ5UH35-TOCz7Y2q.cjs} +1 -1
- package/dist/{flowDiagram-I6XJVG4X-D7D28W3h.js → flowDiagram-I6XJVG4X-4f3A04iK.js} +6 -6
- package/dist/{flowDiagram-I6XJVG4X-Rn9cXbM4.cjs → flowDiagram-I6XJVG4X-BInalcH7.cjs} +1 -1
- package/dist/{ganttDiagram-6RSMTGT7-C3CGnJzh.js → ganttDiagram-6RSMTGT7-C8ScPSHu.js} +3 -3
- package/dist/{ganttDiagram-6RSMTGT7-BpYlzTOm.cjs → ganttDiagram-6RSMTGT7-DEF_FmRR.cjs} +1 -1
- package/dist/{gitGraphDiagram-PVQCEYII-CM_EMfS6.js → gitGraphDiagram-PVQCEYII-CnKH0PHp.js} +3 -3
- package/dist/{gitGraphDiagram-PVQCEYII-DR7ogqPB.cjs → gitGraphDiagram-PVQCEYII-DBwXskFh.cjs} +1 -1
- package/dist/{index-Mn9BkUmO.cjs → index-DGyUqlaQ.cjs} +1 -1
- package/dist/{index-OiJ3pN8N.cjs → index-DeLd859U.cjs} +24 -24
- package/dist/{index-RR6eNszd.js → index-NXlUEMwG.js} +1464 -1440
- package/dist/{index-B86Di0kD.js → index-pGTHB93u.js} +2 -2
- package/dist/{infoDiagram-5YYISTIA-DeiTjOtd.js → infoDiagram-5YYISTIA-D79y7lhu.js} +1 -1
- package/dist/{infoDiagram-5YYISTIA-CIxPF8Ny.cjs → infoDiagram-5YYISTIA-DOOxpQu0.cjs} +1 -1
- package/dist/{ishikawaDiagram-YF4QCWOH-1xm7obKK.cjs → ishikawaDiagram-YF4QCWOH-3amMX1JK.cjs} +1 -1
- package/dist/{ishikawaDiagram-YF4QCWOH-D5sHNiN0.js → ishikawaDiagram-YF4QCWOH-D7ka4Dej.js} +1 -1
- package/dist/{journeyDiagram-JHISSGLW-Bj3pR1r8.cjs → journeyDiagram-JHISSGLW-BARqx_B3.cjs} +1 -1
- package/dist/{journeyDiagram-JHISSGLW-B7vkaR-O.js → journeyDiagram-JHISSGLW-EBn4X8-a.js} +4 -4
- package/dist/{kanban-definition-UN3LZRKU-SSN_awCf.js → kanban-definition-UN3LZRKU-CBAKDyvM.js} +2 -2
- package/dist/{kanban-definition-UN3LZRKU-C2BvNLvg.cjs → kanban-definition-UN3LZRKU-D8iz27bT.cjs} +1 -1
- package/dist/{linear-CrtlOpJC.js → linear-B2QSw8ao.js} +1 -1
- package/dist/{linear-BPGTGVZF.cjs → linear-Fv7CLeZq.cjs} +1 -1
- package/dist/{mermaid.core-BMFdNVmT.js → mermaid.core-ChK_QlLI.js} +35 -35
- package/dist/{mermaid.core-CzUM8ZFm.cjs → mermaid.core-HBdKo8dE.cjs} +3 -3
- package/dist/{mindmap-definition-RKZ34NQL-CQ_AvUYl.js → mindmap-definition-RKZ34NQL-C3uHES2i.js} +3 -3
- package/dist/{mindmap-definition-RKZ34NQL-BzoMooEA.cjs → mindmap-definition-RKZ34NQL-PqVfSh0o.cjs} +1 -1
- package/dist/{pieDiagram-4H26LBE5-DZA6EYmY.js → pieDiagram-4H26LBE5-aJvbTpKH.js} +3 -3
- package/dist/{pieDiagram-4H26LBE5--B008aOr.cjs → pieDiagram-4H26LBE5-slbguXAu.cjs} +1 -1
- package/dist/{quadrantDiagram-W4KKPZXB-DkJ_1r5Q.js → quadrantDiagram-W4KKPZXB-B1BYMfPp.js} +2 -2
- package/dist/{quadrantDiagram-W4KKPZXB-CUgU7n5W.cjs → quadrantDiagram-W4KKPZXB-Cqvftrp-.cjs} +1 -1
- package/dist/{requirementDiagram-4Y6WPE33-C9c_OdBu.cjs → requirementDiagram-4Y6WPE33-CgVm8oUv.cjs} +1 -1
- package/dist/{requirementDiagram-4Y6WPE33-D-Rhgay0.js → requirementDiagram-4Y6WPE33-Cn7GQxPf.js} +3 -3
- package/dist/{sankeyDiagram-5OEKKPKP-CjqPY4DA.cjs → sankeyDiagram-5OEKKPKP-D7Lkmywe.cjs} +1 -1
- package/dist/{sankeyDiagram-5OEKKPKP-D4c7ZW3L.js → sankeyDiagram-5OEKKPKP-aWGj-ZP4.js} +1 -1
- package/dist/{sequenceDiagram-3UESZ5HK-BFZ_dS_o.js → sequenceDiagram-3UESZ5HK-CLsU-4UM.js} +3 -3
- package/dist/{sequenceDiagram-3UESZ5HK-CvSm5Cdr.cjs → sequenceDiagram-3UESZ5HK-PwX7e0rY.cjs} +1 -1
- package/dist/{stateDiagram-AJRCARHV-_zVtg-ny.js → stateDiagram-AJRCARHV-CqgrATuU.js} +2 -2
- package/dist/{stateDiagram-AJRCARHV-l6UNFX0d.cjs → stateDiagram-AJRCARHV-vGqcl-KV.cjs} +1 -1
- package/dist/{stateDiagram-v2-BHNVJYJU-RSGFy9G6.cjs → stateDiagram-v2-BHNVJYJU-HtcVKaju.cjs} +1 -1
- package/dist/{stateDiagram-v2-BHNVJYJU-eyWoWwdr.js → stateDiagram-v2-BHNVJYJU-i2ltnCUr.js} +2 -2
- package/dist/{timeline-definition-PNZ67QCA-Dz0DlRBT.cjs → timeline-definition-PNZ67QCA-BK6Um61-.cjs} +1 -1
- package/dist/{timeline-definition-PNZ67QCA-B9ePHeNX.js → timeline-definition-PNZ67QCA-CcAR4rsb.js} +2 -2
- package/dist/{vennDiagram-CIIHVFJN-DB7dFqUU.cjs → vennDiagram-CIIHVFJN-Cm13ds7X.cjs} +1 -1
- package/dist/{vennDiagram-CIIHVFJN-DTMVqRLj.js → vennDiagram-CIIHVFJN-Cp8snzHu.js} +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 +339 -339
- package/dist/{wardleyDiagram-YWT4CUSO-CLgLoevL.js → wardleyDiagram-YWT4CUSO-CSbrbJrc.js} +2 -2
- package/dist/{wardleyDiagram-YWT4CUSO-llCStOjH.cjs → wardleyDiagram-YWT4CUSO-D9nb2LzZ.cjs} +1 -1
- package/dist/{xychartDiagram-2RQKCTM6-Co8C1pBL.cjs → xychartDiagram-2RQKCTM6-6BlgLg2e.cjs} +1 -1
- package/dist/{xychartDiagram-2RQKCTM6-B9AnuRIT.js → xychartDiagram-2RQKCTM6-DpAMV2MM.js} +2 -2
- package/package.json +1 -1
- package/dist/V2Workbench-3OIxKrwT.cjs +0 -2
|
@@ -1,48 +1,48 @@
|
|
|
1
|
-
import { dt as a, af as
|
|
2
|
-
import { n as Fn, A as On, l as es, m as
|
|
3
|
-
import { Drawer as Gn, Divider as Qn } from "./index-
|
|
1
|
+
import { dt as a, af as js, d0 as e, a_ as ta, ai as ks, a$ as ms, aR as ca, bL as la, b0 as Za, d_ as ia, K as Qs, aa as Xa, a9 as hs, d6 as Ys, Q as en, P as sn, a6 as an, a4 as nn, T as on, da as ra, dG as N, ci as tn, S as cn, J as xs, c_ as ln, cO as rn, dO as dn, cd as un, cH as mn, cG as hn, as as xn, ap as pn, o as _n, m as bn, v as fn, b1 as da, b2 as wn, bC as ps, aO as yn, b3 as _s, n as gn, ar as jn, A as kn, aq as vn, bz as Nn, bB as Cn, i as Xe, aA as Sn, y as Rn, cI as In, cJ as $n, aE as Js, b4 as En, aZ as An, b5 as Zs, b6 as Pn, b7 as Tn, b8 as Mn, b9 as Ln, ek as Dn } from "./index-NXlUEMwG.js";
|
|
2
|
+
import { n as Fn, A as On, l as es, m as bs, p as Vn, h as ua, R as fs, c as ma, a as ha, d as xa, e as Xs, Q as Bn, i as zn, f as qn, u as Wn, j as Hn, o as ea, b as Un, S as Kn } from "./WorkbenchRuntime-ButbDrvB.js";
|
|
3
|
+
import { Drawer as Gn, Divider as Qn } from "./index-pGTHB93u.js";
|
|
4
4
|
var Yn = { 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
|
|
6
|
-
return
|
|
5
|
+
function ws() {
|
|
6
|
+
return ws = Object.assign ? Object.assign.bind() : function(o) {
|
|
7
7
|
for (var i = 1; i < arguments.length; i++) {
|
|
8
8
|
var h = arguments[i];
|
|
9
9
|
for (var m in h)
|
|
10
10
|
Object.prototype.hasOwnProperty.call(h, m) && (o[m] = h[m]);
|
|
11
11
|
}
|
|
12
12
|
return o;
|
|
13
|
-
},
|
|
13
|
+
}, ws.apply(this, arguments);
|
|
14
14
|
}
|
|
15
|
-
const Jn = (o, i) => /* @__PURE__ */ a.createElement(
|
|
15
|
+
const Jn = (o, i) => /* @__PURE__ */ a.createElement(js, ws({}, o, {
|
|
16
16
|
ref: i,
|
|
17
17
|
icon: Yn
|
|
18
18
|
})), Zn = /* @__PURE__ */ a.forwardRef(Jn);
|
|
19
19
|
var Xn = { 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" };
|
|
20
|
-
function
|
|
21
|
-
return
|
|
20
|
+
function ys() {
|
|
21
|
+
return ys = Object.assign ? Object.assign.bind() : function(o) {
|
|
22
22
|
for (var i = 1; i < arguments.length; i++) {
|
|
23
23
|
var h = arguments[i];
|
|
24
24
|
for (var m in h)
|
|
25
25
|
Object.prototype.hasOwnProperty.call(h, m) && (o[m] = h[m]);
|
|
26
26
|
}
|
|
27
27
|
return o;
|
|
28
|
-
},
|
|
28
|
+
}, ys.apply(this, arguments);
|
|
29
29
|
}
|
|
30
|
-
const eo = (o, i) => /* @__PURE__ */ a.createElement(
|
|
30
|
+
const eo = (o, i) => /* @__PURE__ */ a.createElement(js, ys({}, o, {
|
|
31
31
|
ref: i,
|
|
32
32
|
icon: Xn
|
|
33
33
|
})), pa = /* @__PURE__ */ a.forwardRef(eo);
|
|
34
34
|
var so = { 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" };
|
|
35
|
-
function
|
|
36
|
-
return
|
|
35
|
+
function gs() {
|
|
36
|
+
return gs = Object.assign ? Object.assign.bind() : function(o) {
|
|
37
37
|
for (var i = 1; i < arguments.length; i++) {
|
|
38
38
|
var h = arguments[i];
|
|
39
39
|
for (var m in h)
|
|
40
40
|
Object.prototype.hasOwnProperty.call(h, m) && (o[m] = h[m]);
|
|
41
41
|
}
|
|
42
42
|
return o;
|
|
43
|
-
},
|
|
43
|
+
}, gs.apply(this, arguments);
|
|
44
44
|
}
|
|
45
|
-
const ao = (o, i) => /* @__PURE__ */ a.createElement(
|
|
45
|
+
const ao = (o, i) => /* @__PURE__ */ a.createElement(js, gs({}, o, {
|
|
46
46
|
ref: i,
|
|
47
47
|
icon: so
|
|
48
48
|
})), no = /* @__PURE__ */ a.forwardRef(ao);
|
|
@@ -70,7 +70,7 @@ function ba(o) {
|
|
|
70
70
|
const i = Math.floor(o / 60), h = String(Math.floor(o % 60)).padStart(2, "0");
|
|
71
71
|
return `${i}:${h}`;
|
|
72
72
|
}
|
|
73
|
-
const
|
|
73
|
+
const ds = "__all__", sa = "__my__", us = "__library_all__", oo = "__library__:", to = [
|
|
74
74
|
{ key: "all", label: "全部场景" },
|
|
75
75
|
{ key: "my", label: "我的场景" },
|
|
76
76
|
{ key: "map", label: "使用地图" }
|
|
@@ -84,20 +84,20 @@ function lo({
|
|
|
84
84
|
categories: h,
|
|
85
85
|
categoryKey: m,
|
|
86
86
|
search: p,
|
|
87
|
-
cards:
|
|
87
|
+
cards: j,
|
|
88
88
|
executing: A,
|
|
89
89
|
loadingPlaybookId: _,
|
|
90
90
|
onClose: S,
|
|
91
|
-
onSourceChange:
|
|
92
|
-
onCategoryChange:
|
|
93
|
-
onSearchChange:
|
|
94
|
-
onSelectScene:
|
|
91
|
+
onSourceChange: D,
|
|
92
|
+
onCategoryChange: ne,
|
|
93
|
+
onSearchChange: Y,
|
|
94
|
+
onSelectScene: le
|
|
95
95
|
}) {
|
|
96
|
-
const [R,
|
|
96
|
+
const [R, H] = a.useState(null), P = a.useMemo(
|
|
97
97
|
() => R ? _a(R) : null,
|
|
98
98
|
[R]
|
|
99
|
-
), C = a.useCallback((u,
|
|
100
|
-
u.stopPropagation(),
|
|
99
|
+
), C = a.useCallback((u, F) => {
|
|
100
|
+
u.stopPropagation(), H(F);
|
|
101
101
|
}, []);
|
|
102
102
|
return /* @__PURE__ */ e.jsxs(
|
|
103
103
|
Gn,
|
|
@@ -128,7 +128,7 @@ function lo({
|
|
|
128
128
|
{
|
|
129
129
|
type: "button",
|
|
130
130
|
className: i === u.key ? "is-active" : "",
|
|
131
|
-
onClick: () =>
|
|
131
|
+
onClick: () => D(u.key),
|
|
132
132
|
children: u.label
|
|
133
133
|
},
|
|
134
134
|
u.key
|
|
@@ -150,13 +150,13 @@ function lo({
|
|
|
150
150
|
i !== "my" && /* @__PURE__ */ e.jsxs("aside", { className: "wandox-console-chat__drawer-cats", children: [
|
|
151
151
|
/* @__PURE__ */ e.jsx("div", { className: "wandox-console-chat__drawer-catslabel", children: "场景分类" }),
|
|
152
152
|
h.map((u) => {
|
|
153
|
-
const
|
|
153
|
+
const F = u.key === m;
|
|
154
154
|
return /* @__PURE__ */ e.jsxs(
|
|
155
155
|
"button",
|
|
156
156
|
{
|
|
157
157
|
type: "button",
|
|
158
|
-
className: `wandox-console-chat__drawer-cat${
|
|
159
|
-
onClick: () =>
|
|
158
|
+
className: `wandox-console-chat__drawer-cat${F ? " wandox-console-chat__drawer-cat--active" : ""}`,
|
|
159
|
+
onClick: () => ne(u.key),
|
|
160
160
|
children: [
|
|
161
161
|
/* @__PURE__ */ e.jsx("span", { className: "wandox-console-chat__drawer-cat-name", children: u.name }),
|
|
162
162
|
/* @__PURE__ */ e.jsx("span", { className: "wandox-console-chat__drawer-cat-count", children: u.count })
|
|
@@ -168,17 +168,17 @@ function lo({
|
|
|
168
168
|
] }),
|
|
169
169
|
/* @__PURE__ */ e.jsxs("div", { className: "wandox-console-chat__drawer-body", children: [
|
|
170
170
|
/* @__PURE__ */ e.jsx("div", { className: "wandox-console-chat__drawer-toolbar", children: /* @__PURE__ */ e.jsx(
|
|
171
|
-
|
|
171
|
+
ks,
|
|
172
172
|
{
|
|
173
173
|
allowClear: !0,
|
|
174
|
-
prefix: /* @__PURE__ */ e.jsx(
|
|
174
|
+
prefix: /* @__PURE__ */ e.jsx(ms, {}),
|
|
175
175
|
placeholder: co(i),
|
|
176
176
|
value: p,
|
|
177
|
-
onChange: (u) =>
|
|
177
|
+
onChange: (u) => Y(u.target.value)
|
|
178
178
|
}
|
|
179
179
|
) }),
|
|
180
|
-
|
|
181
|
-
const
|
|
180
|
+
j.length === 0 ? /* @__PURE__ */ e.jsx("div", { className: "wandox-console-chat__drawer-empty", children: p ? "没有匹配的场景" : "暂无可用场景" }) : /* @__PURE__ */ e.jsx("div", { className: "wandox-console-scenes", children: j.map((u) => {
|
|
181
|
+
const F = _ === u.playbook_id;
|
|
182
182
|
return /* @__PURE__ */ e.jsxs("div", { className: "wandox-console-scene-wrap", children: [
|
|
183
183
|
/* @__PURE__ */ e.jsx(
|
|
184
184
|
"button",
|
|
@@ -186,8 +186,8 @@ function lo({
|
|
|
186
186
|
type: "button",
|
|
187
187
|
className: "wandox-console-scene",
|
|
188
188
|
disabled: A || !!_,
|
|
189
|
-
"aria-busy":
|
|
190
|
-
onClick: () => void
|
|
189
|
+
"aria-busy": F,
|
|
190
|
+
onClick: () => void le(u),
|
|
191
191
|
children: /* @__PURE__ */ e.jsxs("div", { className: "wandox-console-scene__body", children: [
|
|
192
192
|
/* @__PURE__ */ e.jsx("strong", { title: u.title, children: u.title }),
|
|
193
193
|
u.desc && /* @__PURE__ */ e.jsx(
|
|
@@ -198,7 +198,7 @@ function lo({
|
|
|
198
198
|
children: u.desc
|
|
199
199
|
}
|
|
200
200
|
),
|
|
201
|
-
|
|
201
|
+
F && /* @__PURE__ */ e.jsx("span", { className: "wandox-console-scene__loading", children: "正在读取场景..." })
|
|
202
202
|
] })
|
|
203
203
|
}
|
|
204
204
|
),
|
|
@@ -208,7 +208,7 @@ function lo({
|
|
|
208
208
|
type: "button",
|
|
209
209
|
className: "wandox-console-scene__video",
|
|
210
210
|
"aria-label": `播放${u.title}演示视频`,
|
|
211
|
-
onClick: (
|
|
211
|
+
onClick: (ie) => C(ie, u),
|
|
212
212
|
children: [
|
|
213
213
|
"▶ ",
|
|
214
214
|
ba(u.video_duration),
|
|
@@ -225,7 +225,7 @@ function lo({
|
|
|
225
225
|
ca,
|
|
226
226
|
{
|
|
227
227
|
playbook: P,
|
|
228
|
-
onClose: () =>
|
|
228
|
+
onClose: () => H(null)
|
|
229
229
|
}
|
|
230
230
|
)
|
|
231
231
|
]
|
|
@@ -242,10 +242,10 @@ function fa({
|
|
|
242
242
|
uploading: h,
|
|
243
243
|
fileNameMap: m,
|
|
244
244
|
getOptionState: p,
|
|
245
|
-
onChange:
|
|
245
|
+
onChange: j,
|
|
246
246
|
onUpload: A
|
|
247
247
|
}) {
|
|
248
|
-
const _ = Fn(o.type), S = A ?? ((
|
|
248
|
+
const _ = Fn(o.type), S = A ?? ((D, ne) => io);
|
|
249
249
|
return /* @__PURE__ */ e.jsxs("div", { className: "wandox-console-field", children: [
|
|
250
250
|
/* @__PURE__ */ e.jsxs("label", { htmlFor: `wc-param-${o.name}`, children: [
|
|
251
251
|
/* @__PURE__ */ e.jsx("span", { className: "wandox-console-field__label-text", children: o.label || o.name }),
|
|
@@ -266,9 +266,9 @@ function fa({
|
|
|
266
266
|
uploading: h,
|
|
267
267
|
fileNameMap: m,
|
|
268
268
|
getOptionState: p,
|
|
269
|
-
onChange:
|
|
269
|
+
onChange: j,
|
|
270
270
|
onUpload: S,
|
|
271
|
-
onDownloadTemplate: (
|
|
271
|
+
onDownloadTemplate: (D) => window.open(D.path, "_blank", "noopener,noreferrer")
|
|
272
272
|
}
|
|
273
273
|
)
|
|
274
274
|
] });
|
|
@@ -284,57 +284,57 @@ function uo({
|
|
|
284
284
|
playbookId: h,
|
|
285
285
|
playbookParams: m,
|
|
286
286
|
initialMessage: p,
|
|
287
|
-
initialAttachments:
|
|
287
|
+
initialAttachments: j,
|
|
288
288
|
useMapCards: A = [],
|
|
289
289
|
useMapCategories: _ = [],
|
|
290
290
|
playbooks: S = [],
|
|
291
|
-
userPlaybooks:
|
|
292
|
-
agents:
|
|
293
|
-
onChangeAgent:
|
|
294
|
-
onBack:
|
|
291
|
+
userPlaybooks: D = [],
|
|
292
|
+
agents: ne = [],
|
|
293
|
+
onChangeAgent: Y,
|
|
294
|
+
onBack: le,
|
|
295
295
|
onSelectScene: R,
|
|
296
|
-
onReady:
|
|
296
|
+
onReady: H
|
|
297
297
|
}) {
|
|
298
|
-
const P = localStorage.getItem("sso_token") || "", C = localStorage.getItem("sso_domain") || "maiduo", u = localStorage.getItem("sso_company") || "",
|
|
298
|
+
const P = localStorage.getItem("sso_token") || "", C = localStorage.getItem("sso_domain") || "maiduo", u = localStorage.getItem("sso_company") || "", F = a.useRef(null), ie = a.useRef(!1), [O, $] = a.useState(!1), [U, oe] = a.useState(""), [te, K] = a.useState(""), [V, G] = a.useState("map"), [J, re] = a.useState(ds), [I, B] = a.useState(null), ge = a.useRef(null), xe = a.useRef(null), [de, we] = a.useState(!1), [pe, Re] = a.useState([]), [Z, je] = a.useState("");
|
|
299
299
|
a.useEffect(() => {
|
|
300
|
-
if (
|
|
300
|
+
if (!I || O) return;
|
|
301
301
|
const s = setTimeout(() => {
|
|
302
302
|
var n;
|
|
303
|
-
(n =
|
|
303
|
+
(n = ge.current) == null || n.focus();
|
|
304
304
|
}, 120);
|
|
305
305
|
return () => clearTimeout(s);
|
|
306
|
-
}, [
|
|
307
|
-
if (
|
|
306
|
+
}, [I, O]), a.useEffect(() => {
|
|
307
|
+
if (!I || O) return;
|
|
308
308
|
const s = (n) => {
|
|
309
|
-
const c =
|
|
309
|
+
const c = xe.current, l = n.target;
|
|
310
310
|
!c || !(l instanceof Node) || c.contains(l) || l instanceof Element && l.closest(
|
|
311
311
|
".ant-select-dropdown, .ant-picker-dropdown, .ant-tooltip, .ant-dropdown, .ant-popover, .ant-modal-wrap, .ant-drawer-content-wrapper, .ant-message, .ant-notification"
|
|
312
|
-
) || (
|
|
312
|
+
) || (B(null), ce([]), q({}));
|
|
313
313
|
};
|
|
314
314
|
return document.addEventListener("mousedown", s), () => document.removeEventListener("mousedown", s);
|
|
315
|
-
}, [
|
|
316
|
-
const [
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
),
|
|
321
|
-
() => es(
|
|
322
|
-
(s) => s.required &&
|
|
315
|
+
}, [I, O]);
|
|
316
|
+
const [X, ce] = a.useState([]), [T, q] = a.useState({}), E = ia(
|
|
317
|
+
X,
|
|
318
|
+
T,
|
|
319
|
+
q
|
|
320
|
+
), ke = a.useMemo(
|
|
321
|
+
() => es(X, T).filter(
|
|
322
|
+
(s) => s.required && bs(T[s.name])
|
|
323
323
|
),
|
|
324
|
-
[
|
|
325
|
-
), [
|
|
324
|
+
[X, T]
|
|
325
|
+
), [se, x] = a.useState("chat"), [k, ye] = a.useState([]), [z, ve] = a.useState(null), [ue, Ae] = a.useState("results"), [ss, Ie] = a.useState(!1), [ee, t] = a.useState([]), [f, y] = a.useState(!1), [b, v] = a.useState([]), [me, Ne] = a.useState([]), [W, Q] = a.useState({}), [$e, Ce] = a.useState(!1), [M, Pe] = a.useState(null), [Ve, Ee] = a.useState(void 0), [Be, ze] = a.useState(!1), [wa, vs] = a.useState(!1);
|
|
326
326
|
a.useEffect(() => {
|
|
327
|
-
|
|
327
|
+
H == null || H({
|
|
328
328
|
showInspectionResults: (s) => {
|
|
329
|
-
x("robot"),
|
|
329
|
+
x("robot"), Ae("results"), ve(s || null);
|
|
330
330
|
}
|
|
331
331
|
});
|
|
332
|
-
}, [
|
|
333
|
-
const [
|
|
332
|
+
}, [H]);
|
|
333
|
+
const [Te, ya] = a.useState([]), [Me, Se] = a.useState(!1), [qe, ga] = a.useState(void 0), [Ns, Cs] = a.useState([]), [as, Ss] = a.useState(""), [ns, ja] = a.useState(
|
|
334
334
|
"map"
|
|
335
|
-
), [ka, Le] = a.useState(void 0), We = a.useRef(0), De = a.useRef(0), [He,
|
|
335
|
+
), [ka, Le] = a.useState(void 0), We = a.useRef(0), De = a.useRef(0), [He, Rs] = a.useState(
|
|
336
336
|
Qs
|
|
337
|
-
), [os,
|
|
337
|
+
), [os, Is] = a.useState({}), [Ue, $s] = a.useState(
|
|
338
338
|
() => /* @__PURE__ */ new Set()
|
|
339
339
|
), ts = a.useCallback(
|
|
340
340
|
(s, n, c) => ({
|
|
@@ -352,32 +352,32 @@ function uo({
|
|
|
352
352
|
}),
|
|
353
353
|
[]
|
|
354
354
|
), Fe = a.useMemo(() => {
|
|
355
|
-
const s =
|
|
355
|
+
const s = D.map(
|
|
356
356
|
(d) => ts(d, sa, "我的场景")
|
|
357
357
|
), n = /* @__PURE__ */ new Map();
|
|
358
358
|
for (const d of S) {
|
|
359
|
-
const
|
|
360
|
-
|
|
359
|
+
const g = d.category_name || d.category || d.type || "默认场景", w = `${oo}${g}`, fe = n.get(w) || [];
|
|
360
|
+
fe.push(ts(d, w, g)), n.set(w, fe);
|
|
361
361
|
}
|
|
362
362
|
const c = Array.from(n.values()).flat(), l = [
|
|
363
363
|
{
|
|
364
|
-
key:
|
|
364
|
+
key: us,
|
|
365
365
|
name: "全部场景",
|
|
366
366
|
count: c.length,
|
|
367
367
|
cards: c
|
|
368
368
|
},
|
|
369
|
-
...Array.from(n, ([d,
|
|
369
|
+
...Array.from(n, ([d, g]) => {
|
|
370
370
|
var w;
|
|
371
371
|
return {
|
|
372
372
|
key: d,
|
|
373
|
-
name: ((w =
|
|
374
|
-
count:
|
|
375
|
-
cards:
|
|
373
|
+
name: ((w = g[0]) == null ? void 0 : w.reason) || "默认场景",
|
|
374
|
+
count: g.length,
|
|
375
|
+
cards: g
|
|
376
376
|
};
|
|
377
377
|
})
|
|
378
378
|
], r = [
|
|
379
379
|
{
|
|
380
|
-
key:
|
|
380
|
+
key: ds,
|
|
381
381
|
name: "全部场景",
|
|
382
382
|
count: A.length,
|
|
383
383
|
cards: A
|
|
@@ -386,7 +386,7 @@ function uo({
|
|
|
386
386
|
key: d.key,
|
|
387
387
|
name: d.name,
|
|
388
388
|
count: d.count,
|
|
389
|
-
cards: A.filter((
|
|
389
|
+
cards: A.filter((g) => g.categoryKey === d.key)
|
|
390
390
|
}))
|
|
391
391
|
];
|
|
392
392
|
return { allCategories: l, mapCategories: r, myCards: s };
|
|
@@ -396,8 +396,8 @@ function uo({
|
|
|
396
396
|
ts,
|
|
397
397
|
A,
|
|
398
398
|
_,
|
|
399
|
-
|
|
400
|
-
]), cs = a.useMemo(() =>
|
|
399
|
+
D
|
|
400
|
+
]), cs = a.useMemo(() => V === "all" ? Fe.allCategories : V === "map" ? Fe.mapCategories : [], [Fe, V]), Ke = a.useMemo(
|
|
401
401
|
() => A.map(
|
|
402
402
|
(s) => ({
|
|
403
403
|
category: null,
|
|
@@ -424,12 +424,12 @@ function uo({
|
|
|
424
424
|
const s = /* @__PURE__ */ new Map();
|
|
425
425
|
for (const n of [
|
|
426
426
|
...S,
|
|
427
|
-
...
|
|
427
|
+
...D,
|
|
428
428
|
...Ke
|
|
429
429
|
])
|
|
430
430
|
n.playbook_id && s.set(n.playbook_id, n);
|
|
431
431
|
return Array.from(s.values());
|
|
432
|
-
}, [S,
|
|
432
|
+
}, [S, D, Ke]), Na = a.useMemo(() => {
|
|
433
433
|
const s = /* @__PURE__ */ new Map();
|
|
434
434
|
for (const n of S) {
|
|
435
435
|
const c = n.category_name || n.category || n.type || "默认场景", l = s.get(c) || [];
|
|
@@ -457,23 +457,23 @@ function uo({
|
|
|
457
457
|
}));
|
|
458
458
|
}, [A, _, Ke]), Sa = ns === "map" ? Ca : Na, Ra = a.useMemo(() => {
|
|
459
459
|
var c;
|
|
460
|
-
const s =
|
|
460
|
+
const s = te.trim().toLowerCase(), n = V === "my" ? Fe.myCards : ((c = cs.find((l) => l.key === J)) == null ? void 0 : c.cards) || [];
|
|
461
461
|
return s ? n.filter(
|
|
462
462
|
(l) => l.title.toLowerCase().includes(s) || l.desc.toLowerCase().includes(s)
|
|
463
463
|
) : n;
|
|
464
464
|
}, [
|
|
465
465
|
cs,
|
|
466
|
-
|
|
466
|
+
J,
|
|
467
467
|
Fe.myCards,
|
|
468
|
-
|
|
469
|
-
|
|
468
|
+
V,
|
|
469
|
+
te
|
|
470
470
|
]), Ia = a.useCallback((s) => {
|
|
471
471
|
const n = Array.isArray(s) ? s : [];
|
|
472
|
-
ya(n),
|
|
473
|
-
}, []),
|
|
474
|
-
() =>
|
|
475
|
-
[
|
|
476
|
-
), { messageData: $a, executing:
|
|
472
|
+
ya(n), Se(n.length > 0);
|
|
473
|
+
}, []), he = a.useMemo(
|
|
474
|
+
() => ne.find((s) => s.id === o),
|
|
475
|
+
[ne, o]
|
|
476
|
+
), { messageData: $a, executing: L, stopping: Ea, actions: Aa } = Vn({
|
|
477
477
|
activeAgent: o,
|
|
478
478
|
ssoToken: P,
|
|
479
479
|
ssoDomain: C,
|
|
@@ -481,22 +481,22 @@ function uo({
|
|
|
481
481
|
onRecommendationsUpdate: Ia
|
|
482
482
|
}), {
|
|
483
483
|
sendMessage: Ge,
|
|
484
|
-
executePlaybook:
|
|
485
|
-
respondToProposal:
|
|
484
|
+
executePlaybook: Es,
|
|
485
|
+
respondToProposal: As,
|
|
486
486
|
stopCurrent: Pa,
|
|
487
|
-
retrigger:
|
|
487
|
+
retrigger: Ps
|
|
488
488
|
} = Aa, {
|
|
489
|
-
messages:
|
|
490
|
-
messagesTotal:
|
|
489
|
+
messages: _e,
|
|
490
|
+
messagesTotal: Ts,
|
|
491
491
|
loading: Ms,
|
|
492
|
-
loadMessages:
|
|
493
|
-
loadMoreMessages:
|
|
492
|
+
loadMessages: Ls,
|
|
493
|
+
loadMoreMessages: Ds
|
|
494
494
|
} = $a, Qe = a.useMemo(() => {
|
|
495
|
-
for (let s =
|
|
496
|
-
if (
|
|
497
|
-
}, [
|
|
495
|
+
for (let s = _e.length - 1; s >= 0; s--)
|
|
496
|
+
if (_e[s].role === "assistant") return _e[s].id;
|
|
497
|
+
}, [_e]), Ye = a.useCallback(async () => {
|
|
498
498
|
if (!o || !P) {
|
|
499
|
-
|
|
499
|
+
Cs([]);
|
|
500
500
|
return;
|
|
501
501
|
}
|
|
502
502
|
try {
|
|
@@ -504,44 +504,44 @@ function uo({
|
|
|
504
504
|
agent_id: o,
|
|
505
505
|
limit: 8
|
|
506
506
|
});
|
|
507
|
-
|
|
507
|
+
Cs(Array.isArray(s.data) ? s.data : []);
|
|
508
508
|
} catch {
|
|
509
509
|
}
|
|
510
510
|
}, [o, P]);
|
|
511
511
|
a.useEffect(() => {
|
|
512
512
|
Ye();
|
|
513
513
|
}, [Ye]);
|
|
514
|
-
const
|
|
514
|
+
const ae = a.useCallback(
|
|
515
515
|
async (s) => {
|
|
516
|
-
await
|
|
516
|
+
await Es(s), Ye();
|
|
517
517
|
},
|
|
518
|
-
[
|
|
519
|
-
),
|
|
518
|
+
[Es, Ye]
|
|
519
|
+
), Fs = a.useCallback(async (s) => {
|
|
520
520
|
const n = String(s.playbook_id || "").trim();
|
|
521
521
|
if (!n) throw new Error("场景缺少 playbook_id");
|
|
522
|
-
const { data: c } = await
|
|
522
|
+
const { data: c } = await hs({
|
|
523
523
|
playbook_id: n
|
|
524
524
|
});
|
|
525
525
|
return Ys(s, c);
|
|
526
526
|
}, []);
|
|
527
527
|
a.useEffect(() => {
|
|
528
|
-
|
|
529
|
-
if (await
|
|
528
|
+
ie.current || (ie.current = !0, (async () => {
|
|
529
|
+
if (await Ls(), h) {
|
|
530
530
|
const s = (p == null ? void 0 : p.trim()) || "执行场景";
|
|
531
|
-
|
|
531
|
+
ae({
|
|
532
532
|
message: s,
|
|
533
533
|
playbook_id: h,
|
|
534
534
|
playbook_params: m || {}
|
|
535
535
|
});
|
|
536
|
-
} else p != null && p.trim() && Ge(p.trim(), void 0,
|
|
536
|
+
} else p != null && p.trim() && Ge(p.trim(), void 0, j);
|
|
537
537
|
})());
|
|
538
538
|
}, [
|
|
539
539
|
h,
|
|
540
540
|
p,
|
|
541
|
-
|
|
541
|
+
j,
|
|
542
542
|
m,
|
|
543
|
-
|
|
544
|
-
|
|
543
|
+
ae,
|
|
544
|
+
Ls,
|
|
545
545
|
Ge
|
|
546
546
|
]), a.useEffect(() => {
|
|
547
547
|
if (!o) return;
|
|
@@ -551,9 +551,9 @@ function uo({
|
|
|
551
551
|
const { data: n } = await en({ agent_id: o });
|
|
552
552
|
if (s) return;
|
|
553
553
|
const c = (n == null ? void 0 : n.children) || [];
|
|
554
|
-
|
|
554
|
+
ye(c), ve(null);
|
|
555
555
|
} catch {
|
|
556
|
-
|
|
556
|
+
ye([]);
|
|
557
557
|
}
|
|
558
558
|
})(), () => {
|
|
559
559
|
s = !0;
|
|
@@ -561,14 +561,14 @@ function uo({
|
|
|
561
561
|
}, [o]), a.useEffect(() => {
|
|
562
562
|
Qe && Qe !== qe && ga(Qe);
|
|
563
563
|
}, [Qe, qe]), a.useEffect(() => {
|
|
564
|
-
if (
|
|
565
|
-
|
|
564
|
+
if (se !== "robot" || ue !== "history" || !z) {
|
|
565
|
+
t([]);
|
|
566
566
|
return;
|
|
567
567
|
}
|
|
568
|
-
const s =
|
|
568
|
+
const s = k.find((c) => c.name === z);
|
|
569
569
|
if (!s) return;
|
|
570
570
|
let n = !1;
|
|
571
|
-
return
|
|
571
|
+
return Ie(!0), (async () => {
|
|
572
572
|
try {
|
|
573
573
|
const c = await sn({
|
|
574
574
|
agent_id: s.agent_id,
|
|
@@ -576,8 +576,8 @@ function uo({
|
|
|
576
576
|
});
|
|
577
577
|
if (n) return;
|
|
578
578
|
const r = (Array.isArray(c == null ? void 0 : c.data) ? c.data : []).map(
|
|
579
|
-
(d,
|
|
580
|
-
id: d.id || d.execute_id || `record_${
|
|
579
|
+
(d, g) => ({
|
|
580
|
+
id: d.id || d.execute_id || `record_${g}`,
|
|
581
581
|
action_name: d.action_name || d.display_name || "未知动作",
|
|
582
582
|
status: d.status || "pending",
|
|
583
583
|
created_at: d.created_at || "",
|
|
@@ -586,20 +586,20 @@ function uo({
|
|
|
586
586
|
error: d.error
|
|
587
587
|
})
|
|
588
588
|
);
|
|
589
|
-
|
|
589
|
+
t(r);
|
|
590
590
|
} catch {
|
|
591
|
-
|
|
591
|
+
t([]);
|
|
592
592
|
} finally {
|
|
593
|
-
n ||
|
|
593
|
+
n || Ie(!1);
|
|
594
594
|
}
|
|
595
595
|
})(), () => {
|
|
596
596
|
n = !0;
|
|
597
597
|
};
|
|
598
|
-
}, [
|
|
599
|
-
const
|
|
598
|
+
}, [se, ue, z, k]);
|
|
599
|
+
const Os = a.useCallback(async () => {
|
|
600
600
|
try {
|
|
601
601
|
const s = await an({});
|
|
602
|
-
Array.isArray(s == null ? void 0 : s.data) &&
|
|
602
|
+
Array.isArray(s == null ? void 0 : s.data) && Ne(
|
|
603
603
|
s.data.map((n) => ({
|
|
604
604
|
webhook_id: n.webhook_id || "",
|
|
605
605
|
name: n.name || "未命名渠道",
|
|
@@ -612,7 +612,7 @@ function uo({
|
|
|
612
612
|
try {
|
|
613
613
|
const s = {};
|
|
614
614
|
await Promise.all(
|
|
615
|
-
|
|
615
|
+
k.map(async (n) => {
|
|
616
616
|
var c;
|
|
617
617
|
try {
|
|
618
618
|
const l = await nn(
|
|
@@ -623,12 +623,12 @@ function uo({
|
|
|
623
623
|
} catch {
|
|
624
624
|
}
|
|
625
625
|
})
|
|
626
|
-
),
|
|
626
|
+
), Q(s);
|
|
627
627
|
} catch {
|
|
628
628
|
}
|
|
629
|
-
}, [
|
|
629
|
+
}, [k]), Vs = a.useCallback(async () => {
|
|
630
630
|
if (o) {
|
|
631
|
-
|
|
631
|
+
y(!0);
|
|
632
632
|
try {
|
|
633
633
|
const s = await on({
|
|
634
634
|
agent_id: o,
|
|
@@ -648,23 +648,23 @@ function uo({
|
|
|
648
648
|
}).sort(
|
|
649
649
|
(l, r) => new Date(r.timestamp || 0).getTime() - new Date(l.timestamp || 0).getTime()
|
|
650
650
|
);
|
|
651
|
-
|
|
651
|
+
v(c);
|
|
652
652
|
} catch {
|
|
653
|
-
|
|
653
|
+
v([]);
|
|
654
654
|
} finally {
|
|
655
|
-
|
|
655
|
+
y(!1);
|
|
656
656
|
}
|
|
657
657
|
}
|
|
658
658
|
}, [o]);
|
|
659
659
|
a.useEffect(() => {
|
|
660
|
-
|
|
661
|
-
}, [
|
|
662
|
-
|
|
663
|
-
}, [
|
|
664
|
-
const
|
|
665
|
-
|
|
666
|
-
},
|
|
667
|
-
if (!
|
|
660
|
+
Os(), k.length > 0 && Je();
|
|
661
|
+
}, [k, Os, Je]), a.useEffect(() => {
|
|
662
|
+
se === "robot" && ue === "results" && Vs();
|
|
663
|
+
}, [se, ue, Vs]);
|
|
664
|
+
const Ta = (s) => {
|
|
665
|
+
Pe(s), Ee(W[s.agent_id]), Ce(!0);
|
|
666
|
+
}, Ma = async () => {
|
|
667
|
+
if (!M || !Ve) {
|
|
668
668
|
N.warning("请选择通知渠道");
|
|
669
669
|
return;
|
|
670
670
|
}
|
|
@@ -672,32 +672,32 @@ function uo({
|
|
|
672
672
|
ze(!0), await Sn(
|
|
673
673
|
{},
|
|
674
674
|
{
|
|
675
|
-
agent_id:
|
|
676
|
-
webhook_id:
|
|
675
|
+
agent_id: M.agent_id,
|
|
676
|
+
webhook_id: Ve
|
|
677
677
|
}
|
|
678
|
-
), N.success("绑定成功"),
|
|
678
|
+
), N.success("绑定成功"), Ce(!1), await Je();
|
|
679
679
|
} catch (s) {
|
|
680
680
|
N.error((s == null ? void 0 : s.message) || "绑定失败");
|
|
681
681
|
} finally {
|
|
682
682
|
ze(!1);
|
|
683
683
|
}
|
|
684
684
|
}, La = async () => {
|
|
685
|
-
if (
|
|
685
|
+
if (M)
|
|
686
686
|
try {
|
|
687
687
|
ze(!0), await Rn(
|
|
688
|
-
|
|
688
|
+
M.agent_id,
|
|
689
689
|
{}
|
|
690
|
-
), N.success("解绑成功"),
|
|
690
|
+
), N.success("解绑成功"), Ce(!1), Ee(void 0), await Je();
|
|
691
691
|
} catch (s) {
|
|
692
692
|
N.error((s == null ? void 0 : s.message) || "解绑失败");
|
|
693
693
|
} finally {
|
|
694
694
|
ze(!1);
|
|
695
695
|
}
|
|
696
|
-
},
|
|
696
|
+
}, ls = a.useMemo(() => z ? b.filter((s) => {
|
|
697
697
|
var l;
|
|
698
698
|
const n = (l = s.title) == null ? void 0 : l.match(/^(.+?)\s*巡检结果$/);
|
|
699
|
-
return (n ? n[1] : s.agent_name) ===
|
|
700
|
-
}) :
|
|
699
|
+
return (n ? n[1] : s.agent_name) === z;
|
|
700
|
+
}) : b, [b, z]), Da = (s) => {
|
|
701
701
|
if (!s) return "";
|
|
702
702
|
try {
|
|
703
703
|
return new Date(s).toLocaleString("zh-CN", {
|
|
@@ -709,10 +709,10 @@ function uo({
|
|
|
709
709
|
} catch {
|
|
710
710
|
return s;
|
|
711
711
|
}
|
|
712
|
-
},
|
|
712
|
+
}, is = a.useCallback(
|
|
713
713
|
(s, n, c) => {
|
|
714
|
-
if (
|
|
715
|
-
|
|
714
|
+
if (Se(!1), n) {
|
|
715
|
+
ae({
|
|
716
716
|
message: s,
|
|
717
717
|
playbook_id: n
|
|
718
718
|
});
|
|
@@ -720,18 +720,18 @@ function uo({
|
|
|
720
720
|
}
|
|
721
721
|
Ge(s, void 0, c);
|
|
722
722
|
},
|
|
723
|
-
[
|
|
723
|
+
[ae, Ge]
|
|
724
724
|
), Fa = a.useCallback((s) => {
|
|
725
|
-
|
|
726
|
-
s === "all" ?
|
|
727
|
-
),
|
|
725
|
+
G(s), re(
|
|
726
|
+
s === "all" ? us : s === "map" ? ds : sa
|
|
727
|
+
), K(""), B(null), ce([]), q({});
|
|
728
728
|
}, []), Oa = a.useCallback(() => {
|
|
729
|
-
|
|
729
|
+
G("all"), re(us), K(""), B(null), ce([]), q({}), $(!0);
|
|
730
730
|
}, []), Va = a.useCallback(() => {
|
|
731
|
-
|
|
732
|
-
}, []),
|
|
731
|
+
$(!1), B(null), ce([]), q({});
|
|
732
|
+
}, []), be = a.useCallback(
|
|
733
733
|
(s, n = {}) => {
|
|
734
|
-
|
|
734
|
+
B({
|
|
735
735
|
key: s.playbook_id,
|
|
736
736
|
playbook_id: s.playbook_id,
|
|
737
737
|
title: s.name,
|
|
@@ -742,19 +742,19 @@ function uo({
|
|
|
742
742
|
input_fields: s.input_fields || []
|
|
743
743
|
});
|
|
744
744
|
const c = ra(s.input_fields || []);
|
|
745
|
-
|
|
745
|
+
ce(c), q(ua(c, n));
|
|
746
746
|
},
|
|
747
747
|
[]
|
|
748
748
|
), Ba = a.useCallback(
|
|
749
749
|
async (s) => {
|
|
750
750
|
var c;
|
|
751
|
-
if (
|
|
751
|
+
if (L || U) return;
|
|
752
752
|
const n = String(s.playbook_id || "").trim();
|
|
753
753
|
if (!n) {
|
|
754
754
|
N.error("场景缺少 playbook_id");
|
|
755
755
|
return;
|
|
756
756
|
}
|
|
757
|
-
|
|
757
|
+
oe(n);
|
|
758
758
|
try {
|
|
759
759
|
const l = {
|
|
760
760
|
category: null,
|
|
@@ -767,47 +767,47 @@ function uo({
|
|
|
767
767
|
scope: "",
|
|
768
768
|
status: "available",
|
|
769
769
|
sub_category: null,
|
|
770
|
-
tags: s.tags.map((
|
|
770
|
+
tags: s.tags.map((g) => g.name),
|
|
771
771
|
type: "",
|
|
772
772
|
version: "",
|
|
773
773
|
input_fields: s.input_fields,
|
|
774
774
|
video_url: s.video_url,
|
|
775
775
|
video_duration: s.video_duration,
|
|
776
776
|
view_count: s.view_count
|
|
777
|
-
}, { data: r } = await
|
|
777
|
+
}, { data: r } = await hs({
|
|
778
778
|
playbook_id: n
|
|
779
779
|
});
|
|
780
780
|
if (!r || typeof r != "object" || Array.isArray(r))
|
|
781
781
|
throw new Error("场景详情为空");
|
|
782
782
|
const d = Ys(l, r);
|
|
783
|
-
if (
|
|
784
|
-
|
|
783
|
+
if ($(!1), (c = d.input_fields) != null && c.length) {
|
|
784
|
+
be(d);
|
|
785
785
|
return;
|
|
786
786
|
}
|
|
787
|
-
|
|
787
|
+
is(d.name, d.playbook_id), R == null || R(s);
|
|
788
788
|
} catch (l) {
|
|
789
789
|
const r = l instanceof Error ? l.message : "场景加载失败";
|
|
790
790
|
N.error(r);
|
|
791
791
|
} finally {
|
|
792
|
-
|
|
792
|
+
oe("");
|
|
793
793
|
}
|
|
794
794
|
},
|
|
795
795
|
[
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
796
|
+
L,
|
|
797
|
+
be,
|
|
798
|
+
is,
|
|
799
799
|
R,
|
|
800
|
-
|
|
800
|
+
U
|
|
801
801
|
]
|
|
802
802
|
), Bs = a.useCallback(
|
|
803
803
|
async (s) => {
|
|
804
|
-
if (!
|
|
805
|
-
if (
|
|
806
|
-
|
|
804
|
+
if (!L) {
|
|
805
|
+
if (Se(!1), s.input_fields && s.input_fields.length > 0) {
|
|
806
|
+
be(s);
|
|
807
807
|
return;
|
|
808
808
|
}
|
|
809
809
|
try {
|
|
810
|
-
await
|
|
810
|
+
await ae({
|
|
811
811
|
message: s.name,
|
|
812
812
|
playbook_id: s.playbook_id
|
|
813
813
|
});
|
|
@@ -817,21 +817,21 @@ function uo({
|
|
|
817
817
|
}
|
|
818
818
|
}
|
|
819
819
|
},
|
|
820
|
-
[
|
|
820
|
+
[L, ae, be]
|
|
821
821
|
), za = a.useCallback(
|
|
822
822
|
async (s) => {
|
|
823
823
|
var c;
|
|
824
|
-
if (
|
|
824
|
+
if (L || as) return;
|
|
825
825
|
const n = String(s.playbook_id || "").trim();
|
|
826
826
|
if (n) {
|
|
827
|
-
|
|
827
|
+
Ss(n), Se(!1);
|
|
828
828
|
try {
|
|
829
|
-
const l = tn(s), r = await
|
|
829
|
+
const l = tn(s), r = await Fs(s);
|
|
830
830
|
if ((c = r.input_fields) != null && c.length) {
|
|
831
|
-
|
|
831
|
+
be(r, l);
|
|
832
832
|
return;
|
|
833
833
|
}
|
|
834
|
-
await
|
|
834
|
+
await ae({
|
|
835
835
|
message: r.name,
|
|
836
836
|
playbook_id: r.playbook_id
|
|
837
837
|
});
|
|
@@ -839,32 +839,32 @@ function uo({
|
|
|
839
839
|
const r = l instanceof Error ? l.message : "场景参数加载失败";
|
|
840
840
|
N.error(r);
|
|
841
841
|
} finally {
|
|
842
|
-
|
|
842
|
+
Ss("");
|
|
843
843
|
}
|
|
844
844
|
}
|
|
845
845
|
},
|
|
846
846
|
[
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
847
|
+
L,
|
|
848
|
+
ae,
|
|
849
|
+
be,
|
|
850
|
+
Fs,
|
|
851
851
|
as
|
|
852
852
|
]
|
|
853
853
|
), qa = a.useCallback(async () => {
|
|
854
|
-
if (
|
|
855
|
-
const n = es(
|
|
856
|
-
(r) => r.required &&
|
|
854
|
+
if (!I || L) return;
|
|
855
|
+
const n = es(X, T).filter(
|
|
856
|
+
(r) => r.required && bs(T[r.name])
|
|
857
857
|
);
|
|
858
858
|
if (n.length > 0) {
|
|
859
859
|
N.warning(`请先填写 ${n.length} 项必填参数`);
|
|
860
860
|
return;
|
|
861
861
|
}
|
|
862
|
-
|
|
863
|
-
const c =
|
|
864
|
-
|
|
862
|
+
$(!1), Se(!1);
|
|
863
|
+
const c = I, l = T;
|
|
864
|
+
B(null), ce([]), q({});
|
|
865
865
|
try {
|
|
866
866
|
const r = c.title || (p == null ? void 0 : p.trim()) || "执行场景";
|
|
867
|
-
await
|
|
867
|
+
await ae({
|
|
868
868
|
message: r,
|
|
869
869
|
playbook_id: c.playbook_id,
|
|
870
870
|
playbook_params: l
|
|
@@ -874,11 +874,11 @@ function uo({
|
|
|
874
874
|
N.error(d);
|
|
875
875
|
}
|
|
876
876
|
}, [
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
877
|
+
I,
|
|
878
|
+
X,
|
|
879
|
+
T,
|
|
880
|
+
L,
|
|
881
|
+
ae,
|
|
882
882
|
p,
|
|
883
883
|
R
|
|
884
884
|
]), Wa = a.useCallback((s) => {
|
|
@@ -919,7 +919,7 @@ function uo({
|
|
|
919
919
|
);
|
|
920
920
|
}, []), Ka = /* @__PURE__ */ e.jsxs("div", { className: "wandox-console-chat__scene-quick", children: [
|
|
921
921
|
/* @__PURE__ */ e.jsx(
|
|
922
|
-
|
|
922
|
+
xs,
|
|
923
923
|
{
|
|
924
924
|
menu: {
|
|
925
925
|
selectedKeys: [ns],
|
|
@@ -938,7 +938,7 @@ function uo({
|
|
|
938
938
|
{
|
|
939
939
|
type: "button",
|
|
940
940
|
className: "wandox-console-chat__scene-source",
|
|
941
|
-
disabled:
|
|
941
|
+
disabled: L,
|
|
942
942
|
children: [
|
|
943
943
|
/* @__PURE__ */ e.jsx("span", { children: ns === "map" ? "使用地图" : "全部场景" }),
|
|
944
944
|
/* @__PURE__ */ e.jsx(
|
|
@@ -965,7 +965,7 @@ function uo({
|
|
|
965
965
|
{
|
|
966
966
|
type: "button",
|
|
967
967
|
className: "wandox-console-chat__choose-scene",
|
|
968
|
-
disabled:
|
|
968
|
+
disabled: L,
|
|
969
969
|
onClick: () => s.key === "__my__" ? Ha() : Wa(s.playbooks),
|
|
970
970
|
children: s.label
|
|
971
971
|
},
|
|
@@ -975,14 +975,14 @@ function uo({
|
|
|
975
975
|
var d;
|
|
976
976
|
const n = (d = s.meta_content) != null && d.playbook_id ? "数据报表" : "对话内容", c = (/* @__PURE__ */ new Date()).toISOString().slice(0, 10);
|
|
977
977
|
if (ln(s)) {
|
|
978
|
-
const
|
|
979
|
-
if (!
|
|
978
|
+
const g = rn(s);
|
|
979
|
+
if (!g) {
|
|
980
980
|
N.warning("没有可导出的表格数据");
|
|
981
981
|
return;
|
|
982
982
|
}
|
|
983
|
-
const w =
|
|
984
|
-
(
|
|
985
|
-
), Ya = `\uFEFF${[w, ...
|
|
983
|
+
const w = g.fields.map((rs) => rs.label).join(","), fe = g.rows.map(
|
|
984
|
+
(rs) => g.fields.map((Ja) => dn(rs[Ja.name])).join(",")
|
|
985
|
+
), Ya = `\uFEFF${[w, ...fe].join(`
|
|
986
986
|
`)}`;
|
|
987
987
|
un(
|
|
988
988
|
new Blob([Ya], { type: "text/csv;charset=utf-8;" }),
|
|
@@ -1009,16 +1009,16 @@ function uo({
|
|
|
1009
1009
|
};
|
|
1010
1010
|
}, []), qs = a.useCallback(
|
|
1011
1011
|
(s) => {
|
|
1012
|
-
var r, d,
|
|
1013
|
-
const n =
|
|
1012
|
+
var r, d, g;
|
|
1013
|
+
const n = _e.find(
|
|
1014
1014
|
(w) => w.message_id === s || w.id === s
|
|
1015
1015
|
), c = mn(n);
|
|
1016
1016
|
if (!c) {
|
|
1017
1017
|
N.warning("缺少场景 ID,无法配置定时触发");
|
|
1018
1018
|
return;
|
|
1019
1019
|
}
|
|
1020
|
-
const l = ((d = (r = n == null ? void 0 : n.actions) == null ? void 0 : r.find((w) => w.playbook_id === c)) == null ? void 0 : d.display_name) || ((
|
|
1021
|
-
|
|
1020
|
+
const l = ((d = (r = n == null ? void 0 : n.actions) == null ? void 0 : r.find((w) => w.playbook_id === c)) == null ? void 0 : d.display_name) || ((g = n == null ? void 0 : n.meta_content) == null ? void 0 : g.playbook_name) || c;
|
|
1021
|
+
Rs({
|
|
1022
1022
|
visible: !0,
|
|
1023
1023
|
messageId: s,
|
|
1024
1024
|
agentId: o,
|
|
@@ -1026,9 +1026,9 @@ function uo({
|
|
|
1026
1026
|
playbookName: l
|
|
1027
1027
|
});
|
|
1028
1028
|
},
|
|
1029
|
-
[o,
|
|
1029
|
+
[o, _e]
|
|
1030
1030
|
), Ga = a.useCallback(() => {
|
|
1031
|
-
|
|
1031
|
+
Rs(Qs);
|
|
1032
1032
|
}, []), Ze = a.useCallback(
|
|
1033
1033
|
(s) => {
|
|
1034
1034
|
const n = s.message_id;
|
|
@@ -1037,24 +1037,24 @@ function uo({
|
|
|
1037
1037
|
[os]
|
|
1038
1038
|
), Ws = a.useCallback(
|
|
1039
1039
|
async (s, n, c) => {
|
|
1040
|
-
var
|
|
1040
|
+
var g;
|
|
1041
1041
|
const l = s.message_id;
|
|
1042
1042
|
if (!l || Ue.has(l)) return !1;
|
|
1043
1043
|
const r = Ze(s), d = In(
|
|
1044
1044
|
r,
|
|
1045
1045
|
n
|
|
1046
1046
|
);
|
|
1047
|
-
|
|
1047
|
+
Is((w) => ({
|
|
1048
1048
|
...w,
|
|
1049
1049
|
[l]: d
|
|
1050
|
-
})),
|
|
1050
|
+
})), $s((w) => new Set(w).add(l));
|
|
1051
1051
|
try {
|
|
1052
1052
|
const w = await xn(
|
|
1053
1053
|
{ domain: C },
|
|
1054
1054
|
{
|
|
1055
1055
|
message_id: l,
|
|
1056
1056
|
rating: d,
|
|
1057
|
-
tags: (
|
|
1057
|
+
tags: (g = c == null ? void 0 : c.tags) != null && g.length ? c.tags : void 0,
|
|
1058
1058
|
text: (c == null ? void 0 : c.text) || void 0
|
|
1059
1059
|
}
|
|
1060
1060
|
);
|
|
@@ -1062,37 +1062,37 @@ function uo({
|
|
|
1062
1062
|
throw new Error(w.message || "反馈提交失败");
|
|
1063
1063
|
return !0;
|
|
1064
1064
|
} catch (w) {
|
|
1065
|
-
return
|
|
1066
|
-
...
|
|
1065
|
+
return Is((fe) => ({
|
|
1066
|
+
...fe,
|
|
1067
1067
|
[l]: r
|
|
1068
1068
|
})), N.error(
|
|
1069
1069
|
w instanceof Error ? w.message : "反馈提交失败,请稍后重试"
|
|
1070
1070
|
), !1;
|
|
1071
1071
|
} finally {
|
|
1072
|
-
|
|
1073
|
-
const
|
|
1074
|
-
return
|
|
1072
|
+
$s((w) => {
|
|
1073
|
+
const fe = new Set(w);
|
|
1074
|
+
return fe.delete(l), fe;
|
|
1075
1075
|
});
|
|
1076
1076
|
}
|
|
1077
1077
|
},
|
|
1078
1078
|
[Ue, Ze, C]
|
|
1079
1079
|
), Hs = a.useCallback(
|
|
1080
1080
|
async (s) => {
|
|
1081
|
-
|
|
1081
|
+
Se(!1);
|
|
1082
1082
|
try {
|
|
1083
|
-
await
|
|
1083
|
+
await Ps(s);
|
|
1084
1084
|
} catch (n) {
|
|
1085
1085
|
const c = n instanceof Error ? n.message : "重新生成失败";
|
|
1086
1086
|
N.error(c);
|
|
1087
1087
|
}
|
|
1088
1088
|
},
|
|
1089
|
-
[
|
|
1089
|
+
[Ps]
|
|
1090
1090
|
), Us = a.useCallback(() => {
|
|
1091
|
-
|
|
1091
|
+
Se((s) => !s);
|
|
1092
1092
|
}, []), Ks = a.useCallback(
|
|
1093
1093
|
(s, n) => {
|
|
1094
1094
|
if (s.role !== "assistant" || s.execution_status === "executing") return null;
|
|
1095
|
-
const l = n && s.id === qe &&
|
|
1095
|
+
const l = n && s.id === qe && Te.length > 0, r = Me ? "隐藏推荐" : l ? `显示推荐(${Te.length})` : "推荐";
|
|
1096
1096
|
return /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
1097
1097
|
/* @__PURE__ */ e.jsx(
|
|
1098
1098
|
pn,
|
|
@@ -1111,24 +1111,24 @@ function uo({
|
|
|
1111
1111
|
"button",
|
|
1112
1112
|
{
|
|
1113
1113
|
type: "button",
|
|
1114
|
-
className: `wandox-console-chat__toolbar-toggle${
|
|
1114
|
+
className: `wandox-console-chat__toolbar-toggle${Me ? " is-active" : ""}`,
|
|
1115
1115
|
"aria-label": r,
|
|
1116
|
-
"aria-expanded":
|
|
1116
|
+
"aria-expanded": Me,
|
|
1117
1117
|
onClick: Us,
|
|
1118
1118
|
children: [
|
|
1119
1119
|
/* @__PURE__ */ e.jsx(no, {}),
|
|
1120
|
-
/* @__PURE__ */ e.jsx("span", { className: "wandox-console-chat__toolbar-toggle-count", children:
|
|
1120
|
+
/* @__PURE__ */ e.jsx("span", { className: "wandox-console-chat__toolbar-toggle-count", children: Te.length })
|
|
1121
1121
|
]
|
|
1122
1122
|
}
|
|
1123
1123
|
) }) : null
|
|
1124
1124
|
}
|
|
1125
1125
|
),
|
|
1126
|
-
l &&
|
|
1126
|
+
l && Me && /* @__PURE__ */ e.jsx(
|
|
1127
1127
|
"ul",
|
|
1128
1128
|
{
|
|
1129
1129
|
className: "wandox-console-chat__recommendations",
|
|
1130
1130
|
"aria-label": "推荐场景",
|
|
1131
|
-
children:
|
|
1131
|
+
children: Te.map((d, g) => /* @__PURE__ */ e.jsx(
|
|
1132
1132
|
"li",
|
|
1133
1133
|
{
|
|
1134
1134
|
className: "wandox-console-chat__recommendations-item",
|
|
@@ -1137,26 +1137,26 @@ function uo({
|
|
|
1137
1137
|
{
|
|
1138
1138
|
type: "button",
|
|
1139
1139
|
className: "wandox-console-chat__recommendations-pill",
|
|
1140
|
-
disabled:
|
|
1140
|
+
disabled: L,
|
|
1141
1141
|
onClick: () => {
|
|
1142
1142
|
Bs(d);
|
|
1143
1143
|
},
|
|
1144
1144
|
title: d.description || d.name,
|
|
1145
1145
|
children: [
|
|
1146
1146
|
/* @__PURE__ */ e.jsx("span", { className: "wandox-console-chat__recommendations-pill-label", children: d.name }),
|
|
1147
|
-
/* @__PURE__ */ e.jsx("span", { className: "wandox-console-chat__recommendations-pill-arrow", children: /* @__PURE__ */ e.jsx(
|
|
1147
|
+
/* @__PURE__ */ e.jsx("span", { className: "wandox-console-chat__recommendations-pill-arrow", children: /* @__PURE__ */ e.jsx(fs, {}) })
|
|
1148
1148
|
]
|
|
1149
1149
|
}
|
|
1150
1150
|
)
|
|
1151
1151
|
},
|
|
1152
|
-
`${d.playbook_id || d.name}-${
|
|
1152
|
+
`${d.playbook_id || d.name}-${g}`
|
|
1153
1153
|
))
|
|
1154
1154
|
}
|
|
1155
1155
|
)
|
|
1156
1156
|
] });
|
|
1157
1157
|
},
|
|
1158
1158
|
[
|
|
1159
|
-
|
|
1159
|
+
L,
|
|
1160
1160
|
Ue,
|
|
1161
1161
|
Ze,
|
|
1162
1162
|
Bs,
|
|
@@ -1164,15 +1164,15 @@ function uo({
|
|
|
1164
1164
|
Ws,
|
|
1165
1165
|
qs,
|
|
1166
1166
|
Hs,
|
|
1167
|
-
Me,
|
|
1168
|
-
qe,
|
|
1169
1167
|
Te,
|
|
1168
|
+
qe,
|
|
1169
|
+
Me,
|
|
1170
1170
|
C,
|
|
1171
1171
|
Us
|
|
1172
1172
|
]
|
|
1173
1173
|
), Gs = a.useCallback(
|
|
1174
1174
|
(s, n) => {
|
|
1175
|
-
|
|
1175
|
+
je(s), Re(n), we(!0);
|
|
1176
1176
|
},
|
|
1177
1177
|
[]
|
|
1178
1178
|
), Qa = a.useMemo(
|
|
@@ -1180,16 +1180,34 @@ function uo({
|
|
|
1180
1180
|
/* @__PURE__ */ e.jsx(
|
|
1181
1181
|
_n,
|
|
1182
1182
|
{
|
|
1183
|
-
messages:
|
|
1184
|
-
executing:
|
|
1183
|
+
messages: _e,
|
|
1184
|
+
executing: L,
|
|
1185
1185
|
ssoToken: P,
|
|
1186
1186
|
ssoDomain: C,
|
|
1187
1187
|
ssoCompany: u,
|
|
1188
|
-
onExecutePlaybook:
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1188
|
+
onExecutePlaybook: ae,
|
|
1189
|
+
onFillPlaybookParams: (s) => be(
|
|
1190
|
+
{
|
|
1191
|
+
category: null,
|
|
1192
|
+
domain: "",
|
|
1193
|
+
id: 0,
|
|
1194
|
+
name: s.playbookName,
|
|
1195
|
+
playbook_id: s.playbookId,
|
|
1196
|
+
scope: "",
|
|
1197
|
+
status: "available",
|
|
1198
|
+
sub_category: null,
|
|
1199
|
+
tags: null,
|
|
1200
|
+
type: "",
|
|
1201
|
+
version: "",
|
|
1202
|
+
input_fields: s.inputFields,
|
|
1203
|
+
playbook_type: s.playbookType
|
|
1204
|
+
},
|
|
1205
|
+
s.initialParams ?? {}
|
|
1206
|
+
),
|
|
1207
|
+
onRespondToProposal: As,
|
|
1208
|
+
containerRef: F,
|
|
1209
|
+
messagesTotal: Ts,
|
|
1210
|
+
loadMoreMessages: Ds,
|
|
1193
1211
|
loading: Ms,
|
|
1194
1212
|
initialLoadingContent: /* @__PURE__ */ e.jsx(bn, {}),
|
|
1195
1213
|
conversationKey: o,
|
|
@@ -1200,23 +1218,24 @@ function uo({
|
|
|
1200
1218
|
/* @__PURE__ */ e.jsx(
|
|
1201
1219
|
fn,
|
|
1202
1220
|
{
|
|
1203
|
-
messages:
|
|
1204
|
-
scrollContainerRef:
|
|
1221
|
+
messages: _e,
|
|
1222
|
+
scrollContainerRef: F,
|
|
1205
1223
|
mode: "deepseek"
|
|
1206
1224
|
}
|
|
1207
1225
|
)
|
|
1208
1226
|
] }),
|
|
1209
1227
|
[
|
|
1210
1228
|
o,
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1229
|
+
ae,
|
|
1230
|
+
L,
|
|
1231
|
+
be,
|
|
1232
|
+
Ds,
|
|
1233
|
+
_e,
|
|
1215
1234
|
Ms,
|
|
1216
|
-
|
|
1235
|
+
Ts,
|
|
1217
1236
|
Gs,
|
|
1218
1237
|
Ks,
|
|
1219
|
-
|
|
1238
|
+
As,
|
|
1220
1239
|
u,
|
|
1221
1240
|
C,
|
|
1222
1241
|
P
|
|
@@ -1231,7 +1250,7 @@ function uo({
|
|
|
1231
1250
|
{
|
|
1232
1251
|
type: "button",
|
|
1233
1252
|
className: "wandox-console-chat__back",
|
|
1234
|
-
onClick:
|
|
1253
|
+
onClick: le,
|
|
1235
1254
|
children: [
|
|
1236
1255
|
/* @__PURE__ */ e.jsx(ma, {}),
|
|
1237
1256
|
/* @__PURE__ */ e.jsx("span", { children: "返回" })
|
|
@@ -1239,10 +1258,10 @@ function uo({
|
|
|
1239
1258
|
}
|
|
1240
1259
|
),
|
|
1241
1260
|
/* @__PURE__ */ e.jsx("div", { className: "wandox-console-chat__agent-selector", children: /* @__PURE__ */ e.jsx(
|
|
1242
|
-
|
|
1261
|
+
xs,
|
|
1243
1262
|
{
|
|
1244
1263
|
menu: {
|
|
1245
|
-
items:
|
|
1264
|
+
items: ne.map((s) => ({
|
|
1246
1265
|
key: s.id,
|
|
1247
1266
|
disabled: s.id === o,
|
|
1248
1267
|
label: /* @__PURE__ */ e.jsxs("span", { className: "wandox-console-agent-menu-item", children: [
|
|
@@ -1251,7 +1270,7 @@ function uo({
|
|
|
1251
1270
|
s.id === o && /* @__PURE__ */ e.jsx(wn, { className: "wandox-console-agent-menu-item__check" })
|
|
1252
1271
|
] })
|
|
1253
1272
|
})),
|
|
1254
|
-
onClick: ({ key: s }) =>
|
|
1273
|
+
onClick: ({ key: s }) => Y == null ? void 0 : Y(s)
|
|
1255
1274
|
},
|
|
1256
1275
|
trigger: ["click"],
|
|
1257
1276
|
placement: "bottomLeft",
|
|
@@ -1263,8 +1282,8 @@ function uo({
|
|
|
1263
1282
|
"aria-label": "切换智能体",
|
|
1264
1283
|
title: "切换智能体",
|
|
1265
1284
|
children: [
|
|
1266
|
-
(
|
|
1267
|
-
/* @__PURE__ */ e.jsx("span", { className: "wandox-console-chat__title-name", children: i || (
|
|
1285
|
+
(he == null ? void 0 : he.icon) && /* @__PURE__ */ e.jsx("span", { className: "wandox-console-chat__title-icon", children: he.icon }),
|
|
1286
|
+
/* @__PURE__ */ e.jsx("span", { className: "wandox-console-chat__title-name", children: i || (he == null ? void 0 : he.name) || "智能体" }),
|
|
1268
1287
|
/* @__PURE__ */ e.jsx(da, { className: "wandox-console-chat__title-arrow" })
|
|
1269
1288
|
]
|
|
1270
1289
|
}
|
|
@@ -1276,7 +1295,7 @@ function uo({
|
|
|
1276
1295
|
{
|
|
1277
1296
|
type: "button",
|
|
1278
1297
|
className: "wandox-console-chat__all-scenes",
|
|
1279
|
-
disabled:
|
|
1298
|
+
disabled: L,
|
|
1280
1299
|
onClick: Oa,
|
|
1281
1300
|
children: [
|
|
1282
1301
|
/* @__PURE__ */ e.jsx(Zn, {}),
|
|
@@ -1284,14 +1303,14 @@ function uo({
|
|
|
1284
1303
|
]
|
|
1285
1304
|
}
|
|
1286
1305
|
),
|
|
1287
|
-
/* @__PURE__ */ e.jsx(ha, { benefit:
|
|
1306
|
+
/* @__PURE__ */ e.jsx(ha, { benefit: he == null ? void 0 : he.packageBenefit })
|
|
1288
1307
|
] }),
|
|
1289
1308
|
/* @__PURE__ */ e.jsxs("nav", { className: "wandox-console-chat__topbar", children: [
|
|
1290
1309
|
/* @__PURE__ */ e.jsx(
|
|
1291
1310
|
"button",
|
|
1292
1311
|
{
|
|
1293
1312
|
type: "button",
|
|
1294
|
-
className: `wandox-console-chat__topbar-tab ${
|
|
1313
|
+
className: `wandox-console-chat__topbar-tab ${se === "chat" ? "active" : ""}`,
|
|
1295
1314
|
onClick: () => x("chat"),
|
|
1296
1315
|
children: "智能体会话"
|
|
1297
1316
|
}
|
|
@@ -1300,38 +1319,38 @@ function uo({
|
|
|
1300
1319
|
"button",
|
|
1301
1320
|
{
|
|
1302
1321
|
type: "button",
|
|
1303
|
-
className: `wandox-console-chat__topbar-tab ${
|
|
1322
|
+
className: `wandox-console-chat__topbar-tab ${se === "robot" ? "active" : ""}`,
|
|
1304
1323
|
onClick: () => {
|
|
1305
|
-
x("robot"),
|
|
1324
|
+
x("robot"), ve(null);
|
|
1306
1325
|
},
|
|
1307
1326
|
children: /* @__PURE__ */ e.jsx("span", { children: "巡检机器人" })
|
|
1308
1327
|
}
|
|
1309
1328
|
)
|
|
1310
1329
|
] }),
|
|
1311
|
-
|
|
1312
|
-
/* @__PURE__ */ e.jsx("div", { className: "wandox-console-chat__robot-chips", children:
|
|
1313
|
-
|
|
1330
|
+
se === "chat" ? Qa : /* @__PURE__ */ e.jsxs("div", { className: "wandox-console-chat__robot", children: [
|
|
1331
|
+
/* @__PURE__ */ e.jsx("div", { className: "wandox-console-chat__robot-chips", children: k.length === 0 ? /* @__PURE__ */ e.jsx("div", { className: "wandox-console-chat__robot-empty", children: "该智能体暂无巡检机器人" }) : /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
1332
|
+
k.length > 0 && /* @__PURE__ */ e.jsx(
|
|
1314
1333
|
"button",
|
|
1315
1334
|
{
|
|
1316
1335
|
type: "button",
|
|
1317
|
-
className: `wandox-console-chat__robot-chip ${
|
|
1318
|
-
onClick: () =>
|
|
1336
|
+
className: `wandox-console-chat__robot-chip ${z === null ? "active" : ""}`,
|
|
1337
|
+
onClick: () => ve(null),
|
|
1319
1338
|
children: "全部"
|
|
1320
1339
|
}
|
|
1321
1340
|
),
|
|
1322
|
-
|
|
1323
|
-
const n = !!
|
|
1341
|
+
k.map((s) => {
|
|
1342
|
+
const n = !!W[s.agent_id];
|
|
1324
1343
|
return /* @__PURE__ */ e.jsxs(
|
|
1325
1344
|
"div",
|
|
1326
1345
|
{
|
|
1327
|
-
className: `wandox-console-chat__robot-chip-compound ${
|
|
1346
|
+
className: `wandox-console-chat__robot-chip-compound ${z === s.name ? "active" : ""}`,
|
|
1328
1347
|
children: [
|
|
1329
1348
|
/* @__PURE__ */ e.jsx(
|
|
1330
1349
|
"button",
|
|
1331
1350
|
{
|
|
1332
1351
|
type: "button",
|
|
1333
1352
|
className: "wandox-console-chat__robot-chip-name",
|
|
1334
|
-
onClick: () =>
|
|
1353
|
+
onClick: () => ve(s.name),
|
|
1335
1354
|
children: s.name
|
|
1336
1355
|
}
|
|
1337
1356
|
),
|
|
@@ -1340,7 +1359,7 @@ function uo({
|
|
|
1340
1359
|
{
|
|
1341
1360
|
type: "button",
|
|
1342
1361
|
className: `wandox-console-chat__robot-chip-bind ${n ? "bound" : ""}`,
|
|
1343
|
-
onClick: () =>
|
|
1362
|
+
onClick: () => Ta(s),
|
|
1344
1363
|
title: n ? "已绑定通知渠道,点击修改" : "绑定通知渠道",
|
|
1345
1364
|
children: n ? /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
1346
1365
|
/* @__PURE__ */ e.jsx(
|
|
@@ -1368,8 +1387,8 @@ function uo({
|
|
|
1368
1387
|
"button",
|
|
1369
1388
|
{
|
|
1370
1389
|
type: "button",
|
|
1371
|
-
className: `wandox-console-chat__robot-tab ${
|
|
1372
|
-
onClick: () =>
|
|
1390
|
+
className: `wandox-console-chat__robot-tab ${ue === "results" ? "active" : ""}`,
|
|
1391
|
+
onClick: () => Ae("results"),
|
|
1373
1392
|
children: "巡检结果"
|
|
1374
1393
|
}
|
|
1375
1394
|
),
|
|
@@ -1377,58 +1396,59 @@ function uo({
|
|
|
1377
1396
|
"button",
|
|
1378
1397
|
{
|
|
1379
1398
|
type: "button",
|
|
1380
|
-
className: `wandox-console-chat__robot-tab ${
|
|
1381
|
-
onClick: () =>
|
|
1399
|
+
className: `wandox-console-chat__robot-tab ${ue === "history" ? "active" : ""}`,
|
|
1400
|
+
onClick: () => Ae("history"),
|
|
1382
1401
|
children: [
|
|
1383
1402
|
"执行记录",
|
|
1384
|
-
|
|
1403
|
+
ue === "history" && z && ee.length > 0 && /* @__PURE__ */ e.jsx("span", { className: "wandox-console-chat__robot-tab-badge", children: ee.length })
|
|
1385
1404
|
]
|
|
1386
1405
|
}
|
|
1387
1406
|
)
|
|
1388
1407
|
] }),
|
|
1389
|
-
/* @__PURE__ */ e.jsx("div", { className: "wandox-console-chat__robot-content", children:
|
|
1390
|
-
/* @__PURE__ */ e.jsx(
|
|
1408
|
+
/* @__PURE__ */ e.jsx("div", { className: "wandox-console-chat__robot-content", children: ue === "results" ? f ? /* @__PURE__ */ e.jsxs("div", { className: "wandox-console-chat__robot-loading", children: [
|
|
1409
|
+
/* @__PURE__ */ e.jsx(ps, { size: "small" }),
|
|
1391
1410
|
/* @__PURE__ */ e.jsx("span", { children: "加载中..." })
|
|
1392
|
-
] }) :
|
|
1411
|
+
] }) : ls.length === 0 ? /* @__PURE__ */ e.jsxs("div", { className: "wandox-console-chat__robot-empty", children: [
|
|
1393
1412
|
/* @__PURE__ */ e.jsx("div", { className: "wandox-console-chat__robot-empty-icon", children: /* @__PURE__ */ e.jsx(Xs, {}) }),
|
|
1394
|
-
/* @__PURE__ */ e.jsx("div", { className: "wandox-console-chat__robot-empty-title", children:
|
|
1413
|
+
/* @__PURE__ */ e.jsx("div", { className: "wandox-console-chat__robot-empty-title", children: z ? `${z} 暂无巡检结果` : "暂无巡检结果" }),
|
|
1395
1414
|
/* @__PURE__ */ e.jsx("div", { className: "wandox-console-chat__robot-empty-desc", children: "巡检结果会在机器人执行后展示在这里" })
|
|
1396
|
-
] }) : /* @__PURE__ */ e.jsx("ul", { className: "wandox-console-chat__robot-
|
|
1415
|
+
] }) : /* @__PURE__ */ e.jsx("ul", { className: "wandox-console-chat__robot-timeline", children: ls.map((s, n) => {
|
|
1397
1416
|
const c = {
|
|
1398
1417
|
high: "#ff4d4f",
|
|
1399
1418
|
medium: "#faad14",
|
|
1400
1419
|
low: "#52c41a"
|
|
1401
|
-
};
|
|
1420
|
+
}, l = n === ls.length - 1;
|
|
1402
1421
|
return /* @__PURE__ */ e.jsxs(
|
|
1403
1422
|
"li",
|
|
1404
1423
|
{
|
|
1405
|
-
className: "wandox-console-chat__robot-
|
|
1424
|
+
className: "wandox-console-chat__robot-timeline-item",
|
|
1406
1425
|
children: [
|
|
1407
|
-
/* @__PURE__ */ e.jsxs("div", { className: "wandox-console-chat__robot-
|
|
1426
|
+
/* @__PURE__ */ e.jsxs("div", { className: "wandox-console-chat__robot-timeline-axis", children: [
|
|
1427
|
+
/* @__PURE__ */ e.jsx("span", { className: "wandox-console-chat__robot-timeline-time", children: Da(s.timestamp) }),
|
|
1408
1428
|
/* @__PURE__ */ e.jsx(
|
|
1409
1429
|
"span",
|
|
1410
1430
|
{
|
|
1411
|
-
className: "wandox-console-chat__robot-
|
|
1431
|
+
className: "wandox-console-chat__robot-timeline-dot",
|
|
1412
1432
|
style: {
|
|
1413
1433
|
background: c[s.priority]
|
|
1414
1434
|
}
|
|
1415
1435
|
}
|
|
1416
1436
|
),
|
|
1417
|
-
/* @__PURE__ */ e.jsx("span", { className: "wandox-console-chat__robot-
|
|
1437
|
+
!l && /* @__PURE__ */ e.jsx("span", { className: "wandox-console-chat__robot-timeline-line" })
|
|
1418
1438
|
] }),
|
|
1419
|
-
/* @__PURE__ */ e.jsxs("div", { className: "wandox-console-chat__robot-
|
|
1420
|
-
/* @__PURE__ */ e.jsx("div", { className: "wandox-console-chat__robot-
|
|
1421
|
-
s.summary && /* @__PURE__ */ e.jsx("div", { className: "wandox-console-chat__robot-
|
|
1422
|
-
s.ui_payload && /* @__PURE__ */ e.jsx("div", { className: "wandox-console-chat__robot-
|
|
1439
|
+
/* @__PURE__ */ e.jsxs("div", { className: "wandox-console-chat__robot-timeline-card", children: [
|
|
1440
|
+
/* @__PURE__ */ e.jsx("div", { className: "wandox-console-chat__robot-timeline-title", children: s.title }),
|
|
1441
|
+
s.summary && /* @__PURE__ */ e.jsx("div", { className: "wandox-console-chat__robot-timeline-summary", children: s.summary }),
|
|
1442
|
+
s.ui_payload && /* @__PURE__ */ e.jsx("div", { className: "wandox-console-chat__robot-timeline-content wandox-markdown-content", children: /* @__PURE__ */ e.jsx(yn, { payload: s.ui_payload }) })
|
|
1423
1443
|
] })
|
|
1424
1444
|
]
|
|
1425
1445
|
},
|
|
1426
1446
|
s.id || `result_${n}`
|
|
1427
1447
|
);
|
|
1428
|
-
}) }) :
|
|
1429
|
-
/* @__PURE__ */ e.jsx(
|
|
1448
|
+
}) }) : z ? ss ? /* @__PURE__ */ e.jsxs("div", { className: "wandox-console-chat__robot-loading", children: [
|
|
1449
|
+
/* @__PURE__ */ e.jsx(ps, { size: "small" }),
|
|
1430
1450
|
/* @__PURE__ */ e.jsx("span", { children: "加载中..." })
|
|
1431
|
-
] }) :
|
|
1451
|
+
] }) : ee.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: ee.map((s) => /* @__PURE__ */ e.jsxs(
|
|
1432
1452
|
"li",
|
|
1433
1453
|
{
|
|
1434
1454
|
className: `wandox-console-chat__robot-history-item wandox-console-chat__robot-history-item--${s.status}`,
|
|
@@ -1466,12 +1486,12 @@ function uo({
|
|
|
1466
1486
|
/* @__PURE__ */ e.jsx("div", { className: "wandox-console-chat__robot-empty-desc", children: "在上方选择机器人以查看其执行记录" })
|
|
1467
1487
|
] }) })
|
|
1468
1488
|
] }),
|
|
1469
|
-
|
|
1489
|
+
se === "chat" && Ns.length > 0 && !(I && !O) && /* @__PURE__ */ e.jsx("div", { className: "wandox-console-chat__recent", children: /* @__PURE__ */ e.jsx("div", { className: "wandox-console-chat__recent-bar", children: Ns.map((s, n) => /* @__PURE__ */ e.jsx(
|
|
1470
1490
|
"button",
|
|
1471
1491
|
{
|
|
1472
1492
|
type: "button",
|
|
1473
1493
|
className: "wandox-console-chat__recent-chip",
|
|
1474
|
-
disabled:
|
|
1494
|
+
disabled: L || !!as,
|
|
1475
1495
|
title: s.description || s.name,
|
|
1476
1496
|
onClick: () => {
|
|
1477
1497
|
za(s);
|
|
@@ -1480,16 +1500,16 @@ function uo({
|
|
|
1480
1500
|
},
|
|
1481
1501
|
`${s.playbook_id || s.name}-${n}`
|
|
1482
1502
|
)) }) }),
|
|
1483
|
-
|
|
1503
|
+
se === "chat" && /* @__PURE__ */ e.jsx("div", { className: "wandox-console-chat__input", children: I && !O ? /* @__PURE__ */ e.jsxs(
|
|
1484
1504
|
"div",
|
|
1485
1505
|
{
|
|
1486
|
-
ref:
|
|
1506
|
+
ref: xe,
|
|
1487
1507
|
className: "wandox-console-input-playbook wandox-console-prompt",
|
|
1488
1508
|
children: [
|
|
1489
1509
|
/* @__PURE__ */ e.jsxs("div", { className: "wandox-console-prompt__head", children: [
|
|
1490
1510
|
/* @__PURE__ */ e.jsxs("div", { className: "wandox-console-scenechoice", children: [
|
|
1491
1511
|
/* @__PURE__ */ e.jsx("span", { children: "已选择场景" }),
|
|
1492
|
-
/* @__PURE__ */ e.jsx("strong", { children:
|
|
1512
|
+
/* @__PURE__ */ e.jsx("strong", { children: I.title })
|
|
1493
1513
|
] }),
|
|
1494
1514
|
/* @__PURE__ */ e.jsx(
|
|
1495
1515
|
"button",
|
|
@@ -1497,7 +1517,7 @@ function uo({
|
|
|
1497
1517
|
type: "button",
|
|
1498
1518
|
className: "wandox-console-changescene",
|
|
1499
1519
|
onClick: () => {
|
|
1500
|
-
|
|
1520
|
+
B(null), ce([]), q({});
|
|
1501
1521
|
},
|
|
1502
1522
|
children: "重新选择"
|
|
1503
1523
|
}
|
|
@@ -1506,34 +1526,34 @@ function uo({
|
|
|
1506
1526
|
/* @__PURE__ */ e.jsx(
|
|
1507
1527
|
"div",
|
|
1508
1528
|
{
|
|
1509
|
-
ref:
|
|
1529
|
+
ref: ge,
|
|
1510
1530
|
tabIndex: -1,
|
|
1511
1531
|
className: "wandox-console-taskarea wandox-console-taskarea--static",
|
|
1512
|
-
children:
|
|
1532
|
+
children: I.desc || I.title
|
|
1513
1533
|
}
|
|
1514
1534
|
),
|
|
1515
|
-
|
|
1535
|
+
X.length > 0 && /* @__PURE__ */ e.jsxs("div", { className: "wandox-console-paramarea", children: [
|
|
1516
1536
|
/* @__PURE__ */ e.jsxs("div", { className: "wandox-console-paramhead", children: [
|
|
1517
1537
|
/* @__PURE__ */ e.jsx(pa, {}),
|
|
1518
1538
|
/* @__PURE__ */ e.jsx("strong", { children: "确认分析范围" }),
|
|
1519
1539
|
/* @__PURE__ */ e.jsxs("span", { className: "wandox-console-paramhead__status", children: [
|
|
1520
|
-
/* @__PURE__ */ e.jsx(
|
|
1540
|
+
/* @__PURE__ */ e.jsx(_s, {}),
|
|
1521
1541
|
" ",
|
|
1522
|
-
|
|
1542
|
+
ke.length > 0 ? `待填 ${ke.length} 项必填参数` : "参数已就绪"
|
|
1523
1543
|
] })
|
|
1524
1544
|
] }),
|
|
1525
1545
|
/* @__PURE__ */ e.jsx("div", { className: "wandox-console-params", children: es(
|
|
1526
|
-
|
|
1527
|
-
|
|
1546
|
+
X,
|
|
1547
|
+
T
|
|
1528
1548
|
).map((s) => /* @__PURE__ */ e.jsx(
|
|
1529
1549
|
fa,
|
|
1530
1550
|
{
|
|
1531
1551
|
field: s,
|
|
1532
|
-
value:
|
|
1552
|
+
value: T[s.name],
|
|
1533
1553
|
uploading: !1,
|
|
1534
1554
|
fileNameMap: {},
|
|
1535
|
-
getOptionState:
|
|
1536
|
-
onChange: (n, c) =>
|
|
1555
|
+
getOptionState: E.getFieldState,
|
|
1556
|
+
onChange: (n, c) => q((l) => ({
|
|
1537
1557
|
...l,
|
|
1538
1558
|
[n]: c
|
|
1539
1559
|
}))
|
|
@@ -1548,11 +1568,11 @@ function uo({
|
|
|
1548
1568
|
{
|
|
1549
1569
|
type: "button",
|
|
1550
1570
|
className: "wandox-console-start",
|
|
1551
|
-
disabled:
|
|
1571
|
+
disabled: !I || L || ke.length > 0,
|
|
1552
1572
|
onClick: qa,
|
|
1553
1573
|
children: [
|
|
1554
1574
|
"开始执行",
|
|
1555
|
-
/* @__PURE__ */ e.jsx(
|
|
1575
|
+
/* @__PURE__ */ e.jsx(fs, {})
|
|
1556
1576
|
]
|
|
1557
1577
|
}
|
|
1558
1578
|
)
|
|
@@ -1562,8 +1582,8 @@ function uo({
|
|
|
1562
1582
|
) : /* @__PURE__ */ e.jsx(
|
|
1563
1583
|
gn,
|
|
1564
1584
|
{
|
|
1565
|
-
onSend:
|
|
1566
|
-
executing:
|
|
1585
|
+
onSend: is,
|
|
1586
|
+
executing: L,
|
|
1567
1587
|
stopping: Ea,
|
|
1568
1588
|
onStop: Pa,
|
|
1569
1589
|
placeholder: " / 快速调用场景",
|
|
@@ -1576,26 +1596,26 @@ function uo({
|
|
|
1576
1596
|
mentionTriggerChar: "/",
|
|
1577
1597
|
mentionListRequest: ka,
|
|
1578
1598
|
onMentionListRequestHandled: Ua,
|
|
1579
|
-
autoFocusInput:
|
|
1599
|
+
autoFocusInput: !I,
|
|
1580
1600
|
playbooks: va,
|
|
1581
|
-
onRequestPlaybookParams:
|
|
1601
|
+
onRequestPlaybookParams: be
|
|
1582
1602
|
}
|
|
1583
1603
|
) }),
|
|
1584
1604
|
/* @__PURE__ */ e.jsx(
|
|
1585
1605
|
lo,
|
|
1586
1606
|
{
|
|
1587
|
-
open:
|
|
1588
|
-
source:
|
|
1607
|
+
open: O,
|
|
1608
|
+
source: V,
|
|
1589
1609
|
categories: cs,
|
|
1590
|
-
categoryKey:
|
|
1591
|
-
search:
|
|
1610
|
+
categoryKey: J,
|
|
1611
|
+
search: te,
|
|
1592
1612
|
cards: Ra,
|
|
1593
|
-
executing:
|
|
1594
|
-
loadingPlaybookId:
|
|
1613
|
+
executing: L,
|
|
1614
|
+
loadingPlaybookId: U,
|
|
1595
1615
|
onClose: Va,
|
|
1596
1616
|
onSourceChange: Fa,
|
|
1597
|
-
onCategoryChange:
|
|
1598
|
-
onSearchChange:
|
|
1617
|
+
onCategoryChange: re,
|
|
1618
|
+
onSearchChange: K,
|
|
1599
1619
|
onSelectScene: Ba
|
|
1600
1620
|
}
|
|
1601
1621
|
),
|
|
@@ -1612,27 +1632,27 @@ function uo({
|
|
|
1612
1632
|
P && C && u && /* @__PURE__ */ e.jsx(
|
|
1613
1633
|
kn,
|
|
1614
1634
|
{
|
|
1615
|
-
open:
|
|
1616
|
-
title:
|
|
1617
|
-
actions:
|
|
1635
|
+
open: de,
|
|
1636
|
+
title: Z,
|
|
1637
|
+
actions: pe,
|
|
1618
1638
|
ssoToken: P,
|
|
1619
1639
|
ssoDomain: C,
|
|
1620
1640
|
ssoCompany: u,
|
|
1621
|
-
onClose: () =>
|
|
1641
|
+
onClose: () => we(!1)
|
|
1622
1642
|
}
|
|
1623
1643
|
),
|
|
1624
1644
|
/* @__PURE__ */ e.jsx(
|
|
1625
1645
|
vn,
|
|
1626
1646
|
{
|
|
1627
1647
|
title: "配置通知渠道",
|
|
1628
|
-
open:
|
|
1648
|
+
open: $e,
|
|
1629
1649
|
onCancel: () => {
|
|
1630
|
-
|
|
1650
|
+
Ce(!1), Pe(null), Ee(void 0);
|
|
1631
1651
|
},
|
|
1632
1652
|
width: 520,
|
|
1633
1653
|
centered: !0,
|
|
1634
1654
|
footer: [
|
|
1635
|
-
|
|
1655
|
+
W[(M == null ? void 0 : M.agent_id) || ""] ? /* @__PURE__ */ e.jsx(
|
|
1636
1656
|
Xe,
|
|
1637
1657
|
{
|
|
1638
1658
|
danger: !0,
|
|
@@ -1648,7 +1668,7 @@ function uo({
|
|
|
1648
1668
|
{
|
|
1649
1669
|
disabled: Be,
|
|
1650
1670
|
onClick: () => {
|
|
1651
|
-
|
|
1671
|
+
Ce(!1), Pe(null), Ee(void 0);
|
|
1652
1672
|
},
|
|
1653
1673
|
children: "取消"
|
|
1654
1674
|
},
|
|
@@ -1659,8 +1679,8 @@ function uo({
|
|
|
1659
1679
|
{
|
|
1660
1680
|
type: "primary",
|
|
1661
1681
|
loading: Be,
|
|
1662
|
-
disabled: !
|
|
1663
|
-
onClick:
|
|
1682
|
+
disabled: !Ve,
|
|
1683
|
+
onClick: Ma,
|
|
1664
1684
|
children: "保存"
|
|
1665
1685
|
},
|
|
1666
1686
|
"ok"
|
|
@@ -1689,7 +1709,7 @@ function uo({
|
|
|
1689
1709
|
color: "#1a1a1a",
|
|
1690
1710
|
fontWeight: 500
|
|
1691
1711
|
},
|
|
1692
|
-
children:
|
|
1712
|
+
children: M == null ? void 0 : M.name
|
|
1693
1713
|
}
|
|
1694
1714
|
)
|
|
1695
1715
|
]
|
|
@@ -1712,10 +1732,10 @@ function uo({
|
|
|
1712
1732
|
{
|
|
1713
1733
|
style: { width: "100%" },
|
|
1714
1734
|
placeholder: "请选择通知渠道",
|
|
1715
|
-
value:
|
|
1716
|
-
onChange:
|
|
1735
|
+
value: Ve,
|
|
1736
|
+
onChange: Ee,
|
|
1717
1737
|
disabled: Be,
|
|
1718
|
-
options:
|
|
1738
|
+
options: me.map((s) => ({
|
|
1719
1739
|
label: `${s.name}(${s.platform === "dingtalk" ? "钉钉" : s.platform === "feishu" ? "飞书" : "企业微信"})`,
|
|
1720
1740
|
value: s.webhook_id
|
|
1721
1741
|
})),
|
|
@@ -1727,14 +1747,14 @@ function uo({
|
|
|
1727
1747
|
{
|
|
1728
1748
|
type: "text",
|
|
1729
1749
|
icon: /* @__PURE__ */ e.jsx("span", { children: "+" }),
|
|
1730
|
-
onClick: () =>
|
|
1750
|
+
onClick: () => vs(!0),
|
|
1731
1751
|
children: "添加新的通知渠道"
|
|
1732
1752
|
}
|
|
1733
1753
|
) })
|
|
1734
1754
|
] })
|
|
1735
1755
|
}
|
|
1736
1756
|
),
|
|
1737
|
-
|
|
1757
|
+
me.length === 0 && /* @__PURE__ */ e.jsx(
|
|
1738
1758
|
"div",
|
|
1739
1759
|
{
|
|
1740
1760
|
style: {
|
|
@@ -1756,177 +1776,177 @@ function uo({
|
|
|
1756
1776
|
Bn,
|
|
1757
1777
|
{
|
|
1758
1778
|
open: wa,
|
|
1759
|
-
onClose: () =>
|
|
1779
|
+
onClose: () => vs(!1),
|
|
1760
1780
|
onSuccess: (s) => {
|
|
1761
|
-
|
|
1781
|
+
Ne((n) => [...n, s]), Ee(s.webhook_id);
|
|
1762
1782
|
}
|
|
1763
1783
|
}
|
|
1764
1784
|
)
|
|
1765
1785
|
] })
|
|
1766
1786
|
);
|
|
1767
1787
|
}
|
|
1768
|
-
const { TextArea: mo } =
|
|
1788
|
+
const { TextArea: mo } = ks;
|
|
1769
1789
|
function ho({
|
|
1770
1790
|
useMapCards: o,
|
|
1771
1791
|
useMapCategories: i,
|
|
1772
1792
|
playbooks: h = [],
|
|
1773
1793
|
selectedCategoryKey: m,
|
|
1774
1794
|
onCategorySelect: p,
|
|
1775
|
-
loading:
|
|
1795
|
+
loading: j,
|
|
1776
1796
|
useMapError: A,
|
|
1777
1797
|
onRetry: _,
|
|
1778
1798
|
onStartAnalysis: S,
|
|
1779
|
-
agents:
|
|
1780
|
-
selectedAgentId:
|
|
1781
|
-
onAgentSelect:
|
|
1782
|
-
onOpenAgentChat:
|
|
1799
|
+
agents: D,
|
|
1800
|
+
selectedAgentId: ne,
|
|
1801
|
+
onAgentSelect: Y,
|
|
1802
|
+
onOpenAgentChat: le
|
|
1783
1803
|
}) {
|
|
1784
|
-
const [R,
|
|
1804
|
+
const [R, H] = a.useState(""), [P, C] = a.useState(""), [u, F] = a.useState(null), ie = a.useRef(null), [O, $] = a.useState([]), [U, oe] = a.useState(!1), [te, K] = a.useState(""), V = a.useRef(0), [G, J] = a.useState({}), [re, I] = a.useState({}), [B, ge] = a.useState({}), [xe, de] = a.useState([]), [we, pe] = a.useState(!1), Re = a.useRef(null), Z = a.useMemo(
|
|
1785
1805
|
() => o.length > 0 ? o : zn(h),
|
|
1786
1806
|
[o, h]
|
|
1787
|
-
),
|
|
1807
|
+
), je = a.useMemo(() => m ? Z.filter((t) => t.categoryKey === m) : Z, [Z, m]), X = a.useMemo(() => {
|
|
1788
1808
|
const t = P.trim().toLowerCase();
|
|
1789
|
-
return t ?
|
|
1790
|
-
(
|
|
1791
|
-
) :
|
|
1792
|
-
}, [
|
|
1809
|
+
return t ? je.filter(
|
|
1810
|
+
(f) => f.title.toLowerCase().includes(t) || f.desc.toLowerCase().includes(t)
|
|
1811
|
+
) : je;
|
|
1812
|
+
}, [je, P]), ce = j || A && Z.length === 0 || X.length > 0, [T, q] = a.useState("");
|
|
1793
1813
|
a.useEffect(() => {
|
|
1794
|
-
|
|
1814
|
+
V.current += 1, q(""), H(""), $([]), J({}), oe(!1), K("");
|
|
1795
1815
|
}, [m]), a.useEffect(() => {
|
|
1796
|
-
|
|
1797
|
-
}, [
|
|
1798
|
-
const
|
|
1799
|
-
() =>
|
|
1800
|
-
[
|
|
1801
|
-
),
|
|
1816
|
+
T && !Z.some((t) => t.playbook_id === T) && (V.current += 1, q(""), H(""), $([]), J({}), oe(!1), K(""));
|
|
1817
|
+
}, [T, Z]);
|
|
1818
|
+
const E = a.useMemo(
|
|
1819
|
+
() => Z.find((t) => t.playbook_id === T) ?? null,
|
|
1820
|
+
[Z, T]
|
|
1821
|
+
), ke = a.useMemo(
|
|
1802
1822
|
() => u ? _a(u) : null,
|
|
1803
1823
|
[u]
|
|
1804
|
-
),
|
|
1805
|
-
t.stopPropagation(),
|
|
1824
|
+
), se = a.useCallback((t, f) => {
|
|
1825
|
+
t.stopPropagation(), F(f);
|
|
1806
1826
|
}, []);
|
|
1807
1827
|
a.useEffect(() => {
|
|
1808
|
-
if (
|
|
1828
|
+
if (j || E) return;
|
|
1809
1829
|
const t = window.setTimeout(() => {
|
|
1810
|
-
var y,
|
|
1811
|
-
const
|
|
1812
|
-
|
|
1830
|
+
var y, b;
|
|
1831
|
+
const f = (b = (y = ie.current) == null ? void 0 : y.resizableTextArea) == null ? void 0 : b.textArea;
|
|
1832
|
+
f == null || f.focus();
|
|
1813
1833
|
}, 0);
|
|
1814
1834
|
return () => window.clearTimeout(t);
|
|
1815
|
-
}, [
|
|
1816
|
-
const
|
|
1817
|
-
const
|
|
1818
|
-
if (!
|
|
1835
|
+
}, [j, E]);
|
|
1836
|
+
const x = a.useCallback(async (t) => {
|
|
1837
|
+
const f = String(t.playbook_id || "").trim();
|
|
1838
|
+
if (!f) {
|
|
1819
1839
|
N.error("场景缺少 playbook_id");
|
|
1820
1840
|
return;
|
|
1821
1841
|
}
|
|
1822
|
-
const y = ++
|
|
1823
|
-
|
|
1842
|
+
const y = ++V.current;
|
|
1843
|
+
q(f), $([]), J({}), I({}), ge({}), oe(!0), K("");
|
|
1824
1844
|
try {
|
|
1825
|
-
const { data:
|
|
1826
|
-
playbook_id:
|
|
1845
|
+
const { data: b } = await hs({
|
|
1846
|
+
playbook_id: f
|
|
1827
1847
|
});
|
|
1828
|
-
if (y !==
|
|
1829
|
-
if (!
|
|
1848
|
+
if (y !== V.current) return;
|
|
1849
|
+
if (!b || typeof b != "object" || Array.isArray(b))
|
|
1830
1850
|
throw new Error("场景详情为空");
|
|
1831
1851
|
const v = ra(
|
|
1832
|
-
$n(
|
|
1852
|
+
$n(b)
|
|
1833
1853
|
);
|
|
1834
|
-
|
|
1835
|
-
} catch (
|
|
1836
|
-
if (y !==
|
|
1837
|
-
const v =
|
|
1838
|
-
|
|
1854
|
+
$(v), J(ua(v));
|
|
1855
|
+
} catch (b) {
|
|
1856
|
+
if (y !== V.current) return;
|
|
1857
|
+
const v = b instanceof Error ? b.message : "场景参数加载失败";
|
|
1858
|
+
K(v), N.error("场景参数加载失败,请稍后重试");
|
|
1839
1859
|
} finally {
|
|
1840
|
-
y ===
|
|
1860
|
+
y === V.current && oe(!1);
|
|
1841
1861
|
}
|
|
1842
|
-
}, []),
|
|
1843
|
-
|
|
1844
|
-
},
|
|
1845
|
-
() => es(
|
|
1846
|
-
[
|
|
1847
|
-
),
|
|
1848
|
-
|
|
1849
|
-
}, []),
|
|
1850
|
-
(t,
|
|
1851
|
-
var
|
|
1852
|
-
|
|
1862
|
+
}, []), k = () => {
|
|
1863
|
+
V.current += 1, q(""), H(""), $([]), J({}), oe(!1), K("");
|
|
1864
|
+
}, ye = ia(O, G, J), z = a.useMemo(
|
|
1865
|
+
() => es(O, G),
|
|
1866
|
+
[O, G]
|
|
1867
|
+
), ve = a.useCallback((t, f) => {
|
|
1868
|
+
J((y) => ({ ...y, [t]: f }));
|
|
1869
|
+
}, []), ue = a.useCallback(
|
|
1870
|
+
(t, f) => async ({ file: y, onSuccess: b, onError: v }) => {
|
|
1871
|
+
var me, Ne;
|
|
1872
|
+
I((W) => ({ ...W, [t]: !0 }));
|
|
1853
1873
|
try {
|
|
1854
|
-
const
|
|
1855
|
-
if (
|
|
1856
|
-
|
|
1857
|
-
if (
|
|
1858
|
-
const
|
|
1859
|
-
return { ...
|
|
1860
|
-
}),
|
|
1861
|
-
} catch (
|
|
1862
|
-
const
|
|
1863
|
-
v == null || v(
|
|
1874
|
+
const W = y, Q = await Js(W), $e = (me = Q == null ? void 0 : Q.data) == null ? void 0 : me.url, Ce = ((Ne = Q == null ? void 0 : Q.data) == null ? void 0 : Ne.name) || W.name;
|
|
1875
|
+
if (!$e) throw new Error("上传结果缺少文件地址");
|
|
1876
|
+
ge((M) => ({ ...M, [$e]: Ce })), J((M) => {
|
|
1877
|
+
if (f <= 1) return { ...M, [t]: $e };
|
|
1878
|
+
const Pe = Array.isArray(M[t]) ? M[t] : M[t] ? [M[t]] : [];
|
|
1879
|
+
return { ...M, [t]: [...Pe, $e] };
|
|
1880
|
+
}), b == null || b(Q), N.success("上传成功");
|
|
1881
|
+
} catch (W) {
|
|
1882
|
+
const Q = W instanceof Error ? W : new Error("上传失败");
|
|
1883
|
+
v == null || v(Q), N.error(Q.message);
|
|
1864
1884
|
} finally {
|
|
1865
|
-
|
|
1885
|
+
I((W) => ({ ...W, [t]: !1 }));
|
|
1866
1886
|
}
|
|
1867
1887
|
},
|
|
1868
1888
|
[]
|
|
1869
|
-
),
|
|
1889
|
+
), Ae = a.useCallback(
|
|
1870
1890
|
async (t) => {
|
|
1871
|
-
const
|
|
1872
|
-
if (t.target.value = "",
|
|
1873
|
-
|
|
1891
|
+
const f = Array.from(t.target.files ?? []);
|
|
1892
|
+
if (t.target.value = "", f.length !== 0) {
|
|
1893
|
+
pe(!0);
|
|
1874
1894
|
try {
|
|
1875
1895
|
const y = await Promise.all(
|
|
1876
|
-
|
|
1877
|
-
var
|
|
1878
|
-
const v = await Js(
|
|
1879
|
-
if (!
|
|
1896
|
+
f.map(async (b) => {
|
|
1897
|
+
var W, Q;
|
|
1898
|
+
const v = await Js(b), me = (W = v == null ? void 0 : v.data) == null ? void 0 : W.url, Ne = ((Q = v == null ? void 0 : v.data) == null ? void 0 : Q.name) || b.name;
|
|
1899
|
+
if (!me) throw new Error("上传结果缺少文件地址");
|
|
1880
1900
|
return {
|
|
1881
|
-
type:
|
|
1882
|
-
url:
|
|
1901
|
+
type: b.type.startsWith("image/") ? "image" : "file",
|
|
1902
|
+
url: me,
|
|
1883
1903
|
name: Ne,
|
|
1884
|
-
mime_type:
|
|
1904
|
+
mime_type: b.type
|
|
1885
1905
|
};
|
|
1886
1906
|
})
|
|
1887
1907
|
);
|
|
1888
|
-
|
|
1908
|
+
de((b) => [...b, ...y]), N.success(`已添加 ${y.length} 个附件`);
|
|
1889
1909
|
} catch (y) {
|
|
1890
1910
|
N.error(y instanceof Error ? y.message : "上传失败");
|
|
1891
1911
|
} finally {
|
|
1892
|
-
|
|
1912
|
+
pe(!1);
|
|
1893
1913
|
}
|
|
1894
1914
|
}
|
|
1895
1915
|
},
|
|
1896
1916
|
[]
|
|
1897
|
-
),
|
|
1898
|
-
|
|
1899
|
-
}, []),
|
|
1900
|
-
() =>
|
|
1901
|
-
(t) => t.required &&
|
|
1917
|
+
), ss = a.useCallback((t) => {
|
|
1918
|
+
de((f) => f.filter((y) => y.url !== t));
|
|
1919
|
+
}, []), Ie = a.useMemo(
|
|
1920
|
+
() => z.filter(
|
|
1921
|
+
(t) => t.required && bs(G[t.name])
|
|
1902
1922
|
),
|
|
1903
|
-
[
|
|
1904
|
-
),
|
|
1905
|
-
() =>
|
|
1906
|
-
[
|
|
1923
|
+
[z, G]
|
|
1924
|
+
), ee = a.useMemo(
|
|
1925
|
+
() => D.find((t) => t.id === ne) ?? D.find((t) => t.current) ?? D[0],
|
|
1926
|
+
[D, ne]
|
|
1907
1927
|
);
|
|
1908
1928
|
return /* @__PURE__ */ e.jsxs("div", { className: "wandox-console-view", children: [
|
|
1909
1929
|
/* @__PURE__ */ e.jsxs("div", { className: "wandox-console-homecenter", children: [
|
|
1910
1930
|
/* @__PURE__ */ e.jsxs("div", { className: "wandox-console-homecenter-hero", children: [
|
|
1911
|
-
|
|
1931
|
+
ee && /* @__PURE__ */ e.jsxs("div", { className: "wandox-console-home-header", children: [
|
|
1912
1932
|
/* @__PURE__ */ e.jsxs("div", { className: "wandox-console-home-header__agent", children: [
|
|
1913
|
-
/* @__PURE__ */ e.jsx("span", { className: "wandox-console-home-header__avatar", children:
|
|
1933
|
+
/* @__PURE__ */ e.jsx("span", { className: "wandox-console-home-header__avatar", children: ee.icon }),
|
|
1914
1934
|
/* @__PURE__ */ e.jsxs("div", { className: "wandox-console-home-header__identity", children: [
|
|
1915
1935
|
/* @__PURE__ */ e.jsxs("div", { className: "wandox-console-home-header__selector-row", children: [
|
|
1916
1936
|
/* @__PURE__ */ e.jsx(
|
|
1917
|
-
|
|
1937
|
+
xs,
|
|
1918
1938
|
{
|
|
1919
1939
|
menu: {
|
|
1920
|
-
items:
|
|
1940
|
+
items: D.map((t) => ({
|
|
1921
1941
|
key: t.id,
|
|
1922
|
-
disabled: t.id ===
|
|
1942
|
+
disabled: t.id === ee.id,
|
|
1923
1943
|
label: /* @__PURE__ */ e.jsxs("span", { className: "wandox-console-agent-menu-item", children: [
|
|
1924
1944
|
/* @__PURE__ */ e.jsx("span", { className: "wandox-console-agent-menu-item__icon", children: t.icon }),
|
|
1925
1945
|
/* @__PURE__ */ e.jsx("span", { className: "wandox-console-agent-menu-item__name", children: t.name }),
|
|
1926
|
-
t.id ===
|
|
1946
|
+
t.id === ee.id && /* @__PURE__ */ e.jsx(_s, { className: "wandox-console-agent-menu-item__check" })
|
|
1927
1947
|
] })
|
|
1928
1948
|
})),
|
|
1929
|
-
onClick: ({ key: t }) =>
|
|
1949
|
+
onClick: ({ key: t }) => Y == null ? void 0 : Y(t)
|
|
1930
1950
|
},
|
|
1931
1951
|
trigger: ["click"],
|
|
1932
1952
|
placement: "bottomLeft",
|
|
@@ -1937,21 +1957,21 @@ function ho({
|
|
|
1937
1957
|
className: "wandox-console-home-header__selector",
|
|
1938
1958
|
"aria-label": "切换智能体",
|
|
1939
1959
|
children: [
|
|
1940
|
-
/* @__PURE__ */ e.jsx("span", { className: "wandox-console-home-header__name", children:
|
|
1960
|
+
/* @__PURE__ */ e.jsx("span", { className: "wandox-console-home-header__name", children: ee.name }),
|
|
1941
1961
|
/* @__PURE__ */ e.jsx(da, { className: "wandox-console-home-header__arrow" })
|
|
1942
1962
|
]
|
|
1943
1963
|
}
|
|
1944
1964
|
)
|
|
1945
1965
|
}
|
|
1946
1966
|
),
|
|
1947
|
-
/* @__PURE__ */ e.jsx(ha, { benefit:
|
|
1967
|
+
/* @__PURE__ */ e.jsx(ha, { benefit: ee.packageBenefit })
|
|
1948
1968
|
] }),
|
|
1949
|
-
|
|
1969
|
+
ee.desc && /* @__PURE__ */ e.jsx(
|
|
1950
1970
|
"p",
|
|
1951
1971
|
{
|
|
1952
1972
|
className: "wandox-console-home-header__description",
|
|
1953
|
-
title:
|
|
1954
|
-
children:
|
|
1973
|
+
title: ee.desc,
|
|
1974
|
+
children: ee.desc
|
|
1955
1975
|
}
|
|
1956
1976
|
)
|
|
1957
1977
|
] })
|
|
@@ -1961,7 +1981,7 @@ function ho({
|
|
|
1961
1981
|
{
|
|
1962
1982
|
type: "button",
|
|
1963
1983
|
className: "wandox-console-home-header__history",
|
|
1964
|
-
onClick: () =>
|
|
1984
|
+
onClick: () => le == null ? void 0 : le(),
|
|
1965
1985
|
children: [
|
|
1966
1986
|
/* @__PURE__ */ e.jsx("span", { children: "会话记录" }),
|
|
1967
1987
|
/* @__PURE__ */ e.jsx(En, { className: "wandox-console-home-header__history-arrow" })
|
|
@@ -1970,44 +1990,44 @@ function ho({
|
|
|
1970
1990
|
)
|
|
1971
1991
|
] }),
|
|
1972
1992
|
/* @__PURE__ */ e.jsxs("div", { className: "wandox-console-prompt", children: [
|
|
1973
|
-
|
|
1993
|
+
E && /* @__PURE__ */ e.jsxs("div", { className: "wandox-console-prompt__head", children: [
|
|
1974
1994
|
/* @__PURE__ */ e.jsxs("div", { className: "wandox-console-scenechoice", children: [
|
|
1975
1995
|
/* @__PURE__ */ e.jsx("span", { children: "已选择场景" }),
|
|
1976
|
-
/* @__PURE__ */ e.jsx("strong", { children:
|
|
1996
|
+
/* @__PURE__ */ e.jsx("strong", { children: E.title })
|
|
1977
1997
|
] }),
|
|
1978
1998
|
/* @__PURE__ */ e.jsx(
|
|
1979
1999
|
"button",
|
|
1980
2000
|
{
|
|
1981
2001
|
type: "button",
|
|
1982
2002
|
className: "wandox-console-changescene",
|
|
1983
|
-
onClick:
|
|
2003
|
+
onClick: k,
|
|
1984
2004
|
children: "重新选择"
|
|
1985
2005
|
}
|
|
1986
2006
|
)
|
|
1987
2007
|
] }),
|
|
1988
|
-
|
|
2008
|
+
E ? /* @__PURE__ */ e.jsx("div", { className: "wandox-console-taskarea wandox-console-taskarea--static", children: E.desc || E.title }) : /* @__PURE__ */ e.jsx("div", { className: "wandox-console-taskarea", children: /* @__PURE__ */ e.jsx(
|
|
1989
2009
|
mo,
|
|
1990
2010
|
{
|
|
1991
|
-
ref:
|
|
2011
|
+
ref: ie,
|
|
1992
2012
|
value: R,
|
|
1993
|
-
onChange: (t) =>
|
|
2013
|
+
onChange: (t) => H(t.target.value),
|
|
1994
2014
|
autoSize: { minRows: 2 },
|
|
1995
2015
|
variant: "borderless",
|
|
1996
2016
|
placeholder: "直接描述你的问题,或选择一个场景开始"
|
|
1997
2017
|
}
|
|
1998
2018
|
) }),
|
|
1999
|
-
|
|
2019
|
+
E && U && /* @__PURE__ */ e.jsxs("div", { className: "wandox-console-paramarea wandox-console-paramarea--state", children: [
|
|
2000
2020
|
/* @__PURE__ */ e.jsx(An, {}),
|
|
2001
2021
|
/* @__PURE__ */ e.jsx("span", { children: "正在读取场景参数..." })
|
|
2002
2022
|
] }),
|
|
2003
|
-
|
|
2023
|
+
E && !U && te && /* @__PURE__ */ e.jsxs("div", { className: "wandox-console-paramarea wandox-console-paramarea--state", children: [
|
|
2004
2024
|
/* @__PURE__ */ e.jsx("span", { children: "场景参数加载失败" }),
|
|
2005
2025
|
/* @__PURE__ */ e.jsxs(
|
|
2006
2026
|
"button",
|
|
2007
2027
|
{
|
|
2008
2028
|
type: "button",
|
|
2009
2029
|
className: "wandox-console-paramarea__retry",
|
|
2010
|
-
onClick: () => void
|
|
2030
|
+
onClick: () => void x(E),
|
|
2011
2031
|
children: [
|
|
2012
2032
|
/* @__PURE__ */ e.jsx(Zs, {}),
|
|
2013
2033
|
"重试"
|
|
@@ -2015,26 +2035,26 @@ function ho({
|
|
|
2015
2035
|
}
|
|
2016
2036
|
)
|
|
2017
2037
|
] }),
|
|
2018
|
-
|
|
2038
|
+
E && !U && !te && z.length > 0 && /* @__PURE__ */ e.jsxs("div", { className: "wandox-console-paramarea", children: [
|
|
2019
2039
|
/* @__PURE__ */ e.jsxs("div", { className: "wandox-console-paramhead", children: [
|
|
2020
2040
|
/* @__PURE__ */ e.jsx(pa, {}),
|
|
2021
2041
|
/* @__PURE__ */ e.jsx("strong", { children: "确认分析范围" }),
|
|
2022
2042
|
/* @__PURE__ */ e.jsxs("span", { className: "wandox-console-paramhead__status", children: [
|
|
2023
|
-
/* @__PURE__ */ e.jsx(
|
|
2043
|
+
/* @__PURE__ */ e.jsx(_s, {}),
|
|
2024
2044
|
" ",
|
|
2025
|
-
|
|
2045
|
+
Ie.length > 0 ? `待填 ${Ie.length} 项必填参数` : "参数已就绪"
|
|
2026
2046
|
] })
|
|
2027
2047
|
] }),
|
|
2028
|
-
/* @__PURE__ */ e.jsx("div", { className: "wandox-console-params", children:
|
|
2048
|
+
/* @__PURE__ */ e.jsx("div", { className: "wandox-console-params", children: z.map((t) => /* @__PURE__ */ e.jsx(
|
|
2029
2049
|
fa,
|
|
2030
2050
|
{
|
|
2031
2051
|
field: t,
|
|
2032
|
-
value:
|
|
2033
|
-
uploading: !!
|
|
2034
|
-
fileNameMap:
|
|
2035
|
-
getOptionState:
|
|
2036
|
-
onChange:
|
|
2037
|
-
onUpload:
|
|
2052
|
+
value: G[t.name],
|
|
2053
|
+
uploading: !!re[t.name],
|
|
2054
|
+
fileNameMap: B,
|
|
2055
|
+
getOptionState: ye.getFieldState,
|
|
2056
|
+
onChange: ve,
|
|
2057
|
+
onUpload: ue
|
|
2038
2058
|
},
|
|
2039
2059
|
t.name
|
|
2040
2060
|
)) })
|
|
@@ -2042,50 +2062,50 @@ function ho({
|
|
|
2042
2062
|
/* @__PURE__ */ e.jsxs(
|
|
2043
2063
|
"div",
|
|
2044
2064
|
{
|
|
2045
|
-
className: `wandox-console-prompt__foot${
|
|
2065
|
+
className: `wandox-console-prompt__foot${E ? " wandox-console-prompt__foot--scene" : ""}`,
|
|
2046
2066
|
children: [
|
|
2047
|
-
!
|
|
2067
|
+
!E && /* @__PURE__ */ e.jsx(
|
|
2048
2068
|
"button",
|
|
2049
2069
|
{
|
|
2050
2070
|
type: "button",
|
|
2051
2071
|
className: "wandox-console-attach",
|
|
2052
2072
|
onClick: () => {
|
|
2053
2073
|
var t;
|
|
2054
|
-
return (t =
|
|
2074
|
+
return (t = Re.current) == null ? void 0 : t.click();
|
|
2055
2075
|
},
|
|
2056
|
-
disabled:
|
|
2057
|
-
title:
|
|
2076
|
+
disabled: we,
|
|
2077
|
+
title: we ? "上传中…" : "附件",
|
|
2058
2078
|
children: /* @__PURE__ */ e.jsx(Pn, {})
|
|
2059
2079
|
}
|
|
2060
2080
|
),
|
|
2061
2081
|
/* @__PURE__ */ e.jsx(
|
|
2062
2082
|
"input",
|
|
2063
2083
|
{
|
|
2064
|
-
ref:
|
|
2084
|
+
ref: Re,
|
|
2065
2085
|
type: "file",
|
|
2066
2086
|
multiple: !0,
|
|
2067
2087
|
accept: "image/*,.pdf,.doc,.docx,.xls,.xlsx,.ppt,.pptx,.txt,.csv,.zip",
|
|
2068
2088
|
hidden: !0,
|
|
2069
|
-
onChange:
|
|
2089
|
+
onChange: Ae
|
|
2070
2090
|
}
|
|
2071
2091
|
),
|
|
2072
|
-
|
|
2092
|
+
E ? /* @__PURE__ */ e.jsxs(
|
|
2073
2093
|
"button",
|
|
2074
2094
|
{
|
|
2075
2095
|
type: "button",
|
|
2076
2096
|
className: "wandox-console-start",
|
|
2077
|
-
disabled:
|
|
2097
|
+
disabled: U || !!te || Ie.length > 0,
|
|
2078
2098
|
onClick: () => {
|
|
2079
2099
|
S == null || S({
|
|
2080
|
-
playbookId:
|
|
2081
|
-
playbookParams:
|
|
2082
|
-
message:
|
|
2083
|
-
attachments:
|
|
2100
|
+
playbookId: E.playbook_id,
|
|
2101
|
+
playbookParams: G,
|
|
2102
|
+
message: E.title,
|
|
2103
|
+
attachments: xe
|
|
2084
2104
|
});
|
|
2085
2105
|
},
|
|
2086
2106
|
children: [
|
|
2087
2107
|
"开始执行",
|
|
2088
|
-
/* @__PURE__ */ e.jsx(
|
|
2108
|
+
/* @__PURE__ */ e.jsx(fs, {})
|
|
2089
2109
|
]
|
|
2090
2110
|
}
|
|
2091
2111
|
) : /* @__PURE__ */ e.jsx("div", { className: "wandox-console-prompt__foot-right", children: /* @__PURE__ */ e.jsx(
|
|
@@ -2098,18 +2118,18 @@ function ho({
|
|
|
2098
2118
|
S == null || S({
|
|
2099
2119
|
playbookParams: {},
|
|
2100
2120
|
message: R.trim(),
|
|
2101
|
-
attachments:
|
|
2121
|
+
attachments: xe
|
|
2102
2122
|
});
|
|
2103
2123
|
},
|
|
2104
2124
|
"aria-label": "发送",
|
|
2105
|
-
children: /* @__PURE__ */ e.jsx(
|
|
2125
|
+
children: /* @__PURE__ */ e.jsx(Tn, {})
|
|
2106
2126
|
}
|
|
2107
2127
|
) })
|
|
2108
2128
|
]
|
|
2109
2129
|
}
|
|
2110
2130
|
)
|
|
2111
2131
|
] }),
|
|
2112
|
-
|
|
2132
|
+
xe.length > 0 && /* @__PURE__ */ e.jsx("div", { className: "wandox-console-attachments", children: xe.map((t) => /* @__PURE__ */ e.jsxs("span", { className: "wandox-console-attach-item", children: [
|
|
2113
2133
|
t.type === "image" ? /* @__PURE__ */ e.jsx(
|
|
2114
2134
|
"img",
|
|
2115
2135
|
{
|
|
@@ -2117,7 +2137,7 @@ function ho({
|
|
|
2117
2137
|
alt: t.name,
|
|
2118
2138
|
className: "wandox-console-attach-item__thumb"
|
|
2119
2139
|
}
|
|
2120
|
-
) : /* @__PURE__ */ e.jsx(
|
|
2140
|
+
) : /* @__PURE__ */ e.jsx(Mn, { className: "wandox-console-attach-item__icon" }),
|
|
2121
2141
|
/* @__PURE__ */ e.jsx(
|
|
2122
2142
|
"span",
|
|
2123
2143
|
{
|
|
@@ -2132,7 +2152,7 @@ function ho({
|
|
|
2132
2152
|
type: "button",
|
|
2133
2153
|
className: "wandox-console-attach-item__remove",
|
|
2134
2154
|
"aria-label": "移除附件",
|
|
2135
|
-
onClick: () =>
|
|
2155
|
+
onClick: () => ss(t.url),
|
|
2136
2156
|
children: /* @__PURE__ */ e.jsx(ta, {})
|
|
2137
2157
|
}
|
|
2138
2158
|
)
|
|
@@ -2159,10 +2179,10 @@ function ho({
|
|
|
2159
2179
|
}
|
|
2160
2180
|
),
|
|
2161
2181
|
/* @__PURE__ */ e.jsx("div", { className: "wandox-console-scenesearch", children: /* @__PURE__ */ e.jsx(
|
|
2162
|
-
|
|
2182
|
+
ks,
|
|
2163
2183
|
{
|
|
2164
2184
|
allowClear: !0,
|
|
2165
|
-
prefix: /* @__PURE__ */ e.jsx(
|
|
2185
|
+
prefix: /* @__PURE__ */ e.jsx(ms, {}),
|
|
2166
2186
|
placeholder: "搜索当前地图下的场景",
|
|
2167
2187
|
value: P,
|
|
2168
2188
|
onChange: (t) => C(t.target.value)
|
|
@@ -2170,24 +2190,24 @@ function ho({
|
|
|
2170
2190
|
) })
|
|
2171
2191
|
] })
|
|
2172
2192
|
] }),
|
|
2173
|
-
|
|
2193
|
+
ce && /* @__PURE__ */ e.jsxs(
|
|
2174
2194
|
"section",
|
|
2175
2195
|
{
|
|
2176
2196
|
className: "wandox-console-scene-section",
|
|
2177
2197
|
"aria-label": "个性化场景",
|
|
2178
2198
|
children: [
|
|
2179
2199
|
/* @__PURE__ */ e.jsx("div", { className: "wandox-console-scene-section__header", children: /* @__PURE__ */ e.jsx("div", { children: /* @__PURE__ */ e.jsx("h2", { children: "为你推荐" }) }) }),
|
|
2180
|
-
|
|
2200
|
+
j ? /* @__PURE__ */ e.jsxs(
|
|
2181
2201
|
"div",
|
|
2182
2202
|
{
|
|
2183
2203
|
className: "wandox-console-agents__loading",
|
|
2184
2204
|
style: { justifyContent: "center", padding: "40px 0" },
|
|
2185
2205
|
children: [
|
|
2186
|
-
/* @__PURE__ */ e.jsx(
|
|
2206
|
+
/* @__PURE__ */ e.jsx(ps, { size: "small" }),
|
|
2187
2207
|
/* @__PURE__ */ e.jsx("span", { children: "正在加载场景..." })
|
|
2188
2208
|
]
|
|
2189
2209
|
}
|
|
2190
|
-
) : A &&
|
|
2210
|
+
) : A && Z.length === 0 ? /* @__PURE__ */ e.jsxs(
|
|
2191
2211
|
"div",
|
|
2192
2212
|
{
|
|
2193
2213
|
className: "wandox-console-agents__error",
|
|
@@ -2200,26 +2220,26 @@ function ho({
|
|
|
2200
2220
|
] })
|
|
2201
2221
|
]
|
|
2202
2222
|
}
|
|
2203
|
-
) :
|
|
2204
|
-
/* @__PURE__ */ e.jsx(
|
|
2223
|
+
) : X.length === 0 ? /* @__PURE__ */ e.jsxs("div", { className: "wandox-console-scene-section__empty", children: [
|
|
2224
|
+
/* @__PURE__ */ e.jsx(ms, {}),
|
|
2205
2225
|
/* @__PURE__ */ e.jsx("span", { children: P ? "没有匹配的场景" : "当前分类暂无场景" })
|
|
2206
|
-
] }) : /* @__PURE__ */ e.jsx("div", { className: "wandox-console-scenes-wrap", children: /* @__PURE__ */ e.jsx("div", { className: "wandox-console-scenes", children:
|
|
2207
|
-
const
|
|
2226
|
+
] }) : /* @__PURE__ */ e.jsx("div", { className: "wandox-console-scenes-wrap", children: /* @__PURE__ */ e.jsx("div", { className: "wandox-console-scenes", children: X.map((t) => {
|
|
2227
|
+
const f = po(t), y = xo(t), b = _o(t.tags);
|
|
2208
2228
|
return /* @__PURE__ */ e.jsxs("div", { className: "wandox-console-scene-wrap", children: [
|
|
2209
2229
|
/* @__PURE__ */ e.jsx(
|
|
2210
2230
|
"button",
|
|
2211
2231
|
{
|
|
2212
2232
|
type: "button",
|
|
2213
|
-
className: `wandox-console-scene${y ? " wandox-console-scene--featured" : ""}${
|
|
2214
|
-
onClick: () =>
|
|
2233
|
+
className: `wandox-console-scene${y ? " wandox-console-scene--featured" : ""}${T === t.playbook_id ? " wandox-console-scene--selected" : ""}`,
|
|
2234
|
+
onClick: () => x(t),
|
|
2215
2235
|
children: /* @__PURE__ */ e.jsxs("div", { className: "wandox-console-scene__body", children: [
|
|
2216
2236
|
/* @__PURE__ */ e.jsxs("div", { className: "wandox-console-scene__head", children: [
|
|
2217
2237
|
/* @__PURE__ */ e.jsx("strong", { title: t.title, children: t.title }),
|
|
2218
|
-
|
|
2238
|
+
f && /* @__PURE__ */ e.jsx(
|
|
2219
2239
|
"span",
|
|
2220
2240
|
{
|
|
2221
|
-
className: `wandox-console-scene__badge wandox-console-scene__badge--${
|
|
2222
|
-
children:
|
|
2241
|
+
className: `wandox-console-scene__badge wandox-console-scene__badge--${f.kind}`,
|
|
2242
|
+
children: f.text
|
|
2223
2243
|
}
|
|
2224
2244
|
)
|
|
2225
2245
|
] }),
|
|
@@ -2231,16 +2251,16 @@ function ho({
|
|
|
2231
2251
|
children: t.desc
|
|
2232
2252
|
}
|
|
2233
2253
|
),
|
|
2234
|
-
(y ||
|
|
2254
|
+
(y || b.length > 0) && /* @__PURE__ */ e.jsxs("div", { className: "wandox-console-scene__tags", children: [
|
|
2235
2255
|
y && /* @__PURE__ */ e.jsx("span", { className: "wandox-console-scene__tag wandox-console-scene__tag--featured", children: "精品" }),
|
|
2236
|
-
|
|
2256
|
+
b.map((v, me) => /* @__PURE__ */ e.jsx(
|
|
2237
2257
|
"span",
|
|
2238
2258
|
{
|
|
2239
2259
|
className: "wandox-console-scene__tag",
|
|
2240
2260
|
style: bo(v),
|
|
2241
2261
|
children: v.name
|
|
2242
2262
|
},
|
|
2243
|
-
`${v.name}-${
|
|
2263
|
+
`${v.name}-${me}`
|
|
2244
2264
|
))
|
|
2245
2265
|
] })
|
|
2246
2266
|
] })
|
|
@@ -2252,7 +2272,7 @@ function ho({
|
|
|
2252
2272
|
type: "button",
|
|
2253
2273
|
className: "wandox-console-scene__video",
|
|
2254
2274
|
"aria-label": `播放${t.title}演示视频`,
|
|
2255
|
-
onClick: (v) =>
|
|
2275
|
+
onClick: (v) => se(v, t),
|
|
2256
2276
|
children: [
|
|
2257
2277
|
"▶ ",
|
|
2258
2278
|
ba(t.video_duration),
|
|
@@ -2269,8 +2289,8 @@ function ho({
|
|
|
2269
2289
|
/* @__PURE__ */ e.jsx(
|
|
2270
2290
|
ca,
|
|
2271
2291
|
{
|
|
2272
|
-
playbook:
|
|
2273
|
-
onClose: () =>
|
|
2292
|
+
playbook: ke,
|
|
2293
|
+
onClose: () => F(null)
|
|
2274
2294
|
}
|
|
2275
2295
|
)
|
|
2276
2296
|
] });
|
|
@@ -2297,8 +2317,8 @@ function bo(o) {
|
|
|
2297
2317
|
function aa(o, i) {
|
|
2298
2318
|
const h = o.trim().replace("#", "");
|
|
2299
2319
|
if (!/^[0-9a-fA-F]{6}$/.test(h)) return o;
|
|
2300
|
-
const m = Number.parseInt(h.slice(0, 2), 16), p = Number.parseInt(h.slice(2, 4), 16),
|
|
2301
|
-
return `rgba(${m}, ${p}, ${
|
|
2320
|
+
const m = Number.parseInt(h.slice(0, 2), 16), p = Number.parseInt(h.slice(2, 4), 16), j = Number.parseInt(h.slice(4, 6), 16);
|
|
2321
|
+
return `rgba(${m}, ${p}, ${j}, ${i})`;
|
|
2302
2322
|
}
|
|
2303
2323
|
const fo = [
|
|
2304
2324
|
{
|
|
@@ -2451,59 +2471,59 @@ function vo({
|
|
|
2451
2471
|
onReady: p
|
|
2452
2472
|
} = {}) {
|
|
2453
2473
|
const {
|
|
2454
|
-
agents:
|
|
2474
|
+
agents: j,
|
|
2455
2475
|
agentLoading: A,
|
|
2456
2476
|
selectedAgentId: _,
|
|
2457
2477
|
selectedAgent: S,
|
|
2458
|
-
selectAgent:
|
|
2459
|
-
...
|
|
2460
|
-
} = Wn({ presetAgents: o, initialAgentId: i }), [
|
|
2478
|
+
selectAgent: D,
|
|
2479
|
+
...ne
|
|
2480
|
+
} = Wn({ presetAgents: o, initialAgentId: i }), [Y, le] = a.useState(null), R = a.useRef(null), H = a.useRef(!1), [P, C] = a.useState("home"), [u, F] = a.useState(
|
|
2461
2481
|
null
|
|
2462
|
-
), [
|
|
2482
|
+
), [ie, O] = a.useState(!1), [$, U] = a.useState(null), [oe, te] = a.useState(""), K = S == null ? void 0 : S.name, V = a.useCallback((x) => {
|
|
2463
2483
|
if (R.current) {
|
|
2464
2484
|
R.current.showInspectionResults(x);
|
|
2465
2485
|
return;
|
|
2466
2486
|
}
|
|
2467
|
-
|
|
2487
|
+
le({ robotName: x });
|
|
2468
2488
|
}, []);
|
|
2469
2489
|
a.useEffect(() => {
|
|
2470
|
-
p == null || p({ showInspectionResults:
|
|
2471
|
-
}, [
|
|
2472
|
-
!
|
|
2490
|
+
p == null || p({ showInspectionResults: V });
|
|
2491
|
+
}, [V, p]), a.useEffect(() => {
|
|
2492
|
+
!Y || R.current || !_ || P === "chat" || (U({
|
|
2473
2493
|
agentId: _,
|
|
2474
|
-
agentName:
|
|
2494
|
+
agentName: K,
|
|
2475
2495
|
playbookParams: {},
|
|
2476
2496
|
message: ""
|
|
2477
2497
|
}), C("chat"));
|
|
2478
|
-
}, [P,
|
|
2479
|
-
|
|
2498
|
+
}, [P, Y, _, K]), a.useEffect(() => {
|
|
2499
|
+
te("");
|
|
2480
2500
|
}, [_]);
|
|
2481
2501
|
const {
|
|
2482
|
-
playbooks:
|
|
2483
|
-
userPlaybooks:
|
|
2484
|
-
useMapCategories:
|
|
2485
|
-
useMapCards:
|
|
2486
|
-
sceneLoading:
|
|
2487
|
-
useMapError:
|
|
2488
|
-
reload:
|
|
2489
|
-
} =
|
|
2490
|
-
() =>
|
|
2491
|
-
[
|
|
2502
|
+
playbooks: G,
|
|
2503
|
+
userPlaybooks: J,
|
|
2504
|
+
useMapCategories: re,
|
|
2505
|
+
useMapCards: I,
|
|
2506
|
+
sceneLoading: B,
|
|
2507
|
+
useMapError: ge,
|
|
2508
|
+
reload: xe
|
|
2509
|
+
} = ne, de = a.useMemo(
|
|
2510
|
+
() => re.length > 0 ? re : Hn(G),
|
|
2511
|
+
[re, G]
|
|
2492
2512
|
);
|
|
2493
2513
|
a.useEffect(() => {
|
|
2494
|
-
if (
|
|
2495
|
-
|
|
2496
|
-
(
|
|
2497
|
-
) ||
|
|
2498
|
-
}, [
|
|
2499
|
-
const
|
|
2514
|
+
if (de.length === 0) return;
|
|
2515
|
+
de.some(
|
|
2516
|
+
(k) => k.key === oe
|
|
2517
|
+
) || te(de[0].key);
|
|
2518
|
+
}, [de]);
|
|
2519
|
+
const we = a.useRef(!1);
|
|
2500
2520
|
a.useEffect(() => {
|
|
2501
|
-
if (
|
|
2521
|
+
if (we.current || !h || !_ || B)
|
|
2502
2522
|
return;
|
|
2503
|
-
const x =
|
|
2504
|
-
(
|
|
2523
|
+
const x = j.find(
|
|
2524
|
+
(k) => k.id === _ && ea(k, i)
|
|
2505
2525
|
);
|
|
2506
|
-
x && (
|
|
2526
|
+
x && (we.current = !0, U({
|
|
2507
2527
|
agentId: _,
|
|
2508
2528
|
agentName: x.name,
|
|
2509
2529
|
playbookId: h,
|
|
@@ -2511,112 +2531,112 @@ function vo({
|
|
|
2511
2531
|
message: ""
|
|
2512
2532
|
}), C("chat"));
|
|
2513
2533
|
}, [
|
|
2514
|
-
|
|
2515
|
-
|
|
2534
|
+
B,
|
|
2535
|
+
j,
|
|
2516
2536
|
i,
|
|
2517
2537
|
h,
|
|
2518
2538
|
m,
|
|
2519
2539
|
_,
|
|
2520
|
-
|
|
2540
|
+
K
|
|
2521
2541
|
]), a.useEffect(() => {
|
|
2522
|
-
if (
|
|
2542
|
+
if (H.current || !i || h || !_ || B)
|
|
2523
2543
|
return;
|
|
2524
|
-
const x =
|
|
2525
|
-
(
|
|
2544
|
+
const x = j.find(
|
|
2545
|
+
(k) => k.id === _ && ea(k, i)
|
|
2526
2546
|
);
|
|
2527
|
-
x && (
|
|
2547
|
+
x && (H.current = !0, U({
|
|
2528
2548
|
agentId: x.id,
|
|
2529
2549
|
agentName: x.name,
|
|
2530
2550
|
playbookParams: {},
|
|
2531
2551
|
message: ""
|
|
2532
2552
|
}), C("chat"));
|
|
2533
|
-
}, [
|
|
2534
|
-
const [
|
|
2553
|
+
}, [j, B, i, h, _]);
|
|
2554
|
+
const [pe, Re] = a.useState(!0), [Z, je] = a.useState(!1);
|
|
2535
2555
|
a.useEffect(() => {
|
|
2536
|
-
if (!
|
|
2537
|
-
|
|
2538
|
-
const
|
|
2539
|
-
return () => clearTimeout(
|
|
2540
|
-
}, [A,
|
|
2541
|
-
const
|
|
2542
|
-
C("home"),
|
|
2543
|
-
}, []),
|
|
2556
|
+
if (!pe || !(!A && j.length > 0 && !!_ && !B)) return;
|
|
2557
|
+
je(!0);
|
|
2558
|
+
const ye = setTimeout(() => Re(!1), 280);
|
|
2559
|
+
return () => clearTimeout(ye);
|
|
2560
|
+
}, [A, j.length, _, B, pe]);
|
|
2561
|
+
const X = a.useCallback(() => {
|
|
2562
|
+
C("home"), F(null), O(!1);
|
|
2563
|
+
}, []), ce = a.useCallback(
|
|
2544
2564
|
(x) => {
|
|
2545
2565
|
if (x === "conversation") {
|
|
2546
|
-
|
|
2566
|
+
X();
|
|
2547
2567
|
return;
|
|
2548
2568
|
}
|
|
2549
|
-
|
|
2569
|
+
O(!1), F(x);
|
|
2550
2570
|
},
|
|
2551
|
-
[
|
|
2552
|
-
),
|
|
2553
|
-
|
|
2554
|
-
},
|
|
2571
|
+
[X]
|
|
2572
|
+
), T = (x) => {
|
|
2573
|
+
D(x), C("home");
|
|
2574
|
+
}, q = (x) => {
|
|
2555
2575
|
if (x === _) return;
|
|
2556
|
-
const
|
|
2557
|
-
|
|
2576
|
+
const k = j.find((ye) => ye.id === x);
|
|
2577
|
+
D(x), U({
|
|
2558
2578
|
agentId: x,
|
|
2559
|
-
agentName:
|
|
2579
|
+
agentName: k == null ? void 0 : k.name,
|
|
2560
2580
|
playbookParams: {},
|
|
2561
2581
|
message: ""
|
|
2562
2582
|
});
|
|
2563
|
-
},
|
|
2564
|
-
_ && (
|
|
2583
|
+
}, E = () => {
|
|
2584
|
+
_ && (U({
|
|
2565
2585
|
agentId: _,
|
|
2566
|
-
agentName:
|
|
2586
|
+
agentName: K,
|
|
2567
2587
|
playbookParams: {},
|
|
2568
2588
|
message: ""
|
|
2569
2589
|
}), C("chat"));
|
|
2570
|
-
},
|
|
2571
|
-
|
|
2590
|
+
}, ke = (x) => {
|
|
2591
|
+
U({
|
|
2572
2592
|
agentId: _,
|
|
2573
|
-
agentName:
|
|
2593
|
+
agentName: K,
|
|
2574
2594
|
playbookId: x.playbookId,
|
|
2575
2595
|
playbookParams: x.playbookParams,
|
|
2576
2596
|
message: x.message,
|
|
2577
2597
|
attachments: x.attachments
|
|
2578
2598
|
}), C("chat");
|
|
2579
2599
|
};
|
|
2580
|
-
return P === "chat" &&
|
|
2600
|
+
return P === "chat" && $ ? /* @__PURE__ */ e.jsxs("div", { className: "wandox-console-chat-shell", children: [
|
|
2581
2601
|
/* @__PURE__ */ e.jsx(
|
|
2582
2602
|
uo,
|
|
2583
2603
|
{
|
|
2584
|
-
agentId:
|
|
2585
|
-
agentName:
|
|
2586
|
-
playbookId:
|
|
2587
|
-
playbookParams:
|
|
2588
|
-
initialMessage:
|
|
2589
|
-
initialAttachments:
|
|
2590
|
-
useMapCards:
|
|
2591
|
-
useMapCategories:
|
|
2592
|
-
playbooks:
|
|
2593
|
-
userPlaybooks:
|
|
2594
|
-
agents:
|
|
2604
|
+
agentId: $.agentId,
|
|
2605
|
+
agentName: $.agentName,
|
|
2606
|
+
playbookId: $.playbookId,
|
|
2607
|
+
playbookParams: $.playbookParams,
|
|
2608
|
+
initialMessage: $.message,
|
|
2609
|
+
initialAttachments: $.attachments,
|
|
2610
|
+
useMapCards: I,
|
|
2611
|
+
useMapCategories: re,
|
|
2612
|
+
playbooks: G,
|
|
2613
|
+
userPlaybooks: J,
|
|
2614
|
+
agents: j,
|
|
2595
2615
|
onReady: (x) => {
|
|
2596
|
-
R.current = x,
|
|
2616
|
+
R.current = x, Y && (x.showInspectionResults(Y.robotName), le(null));
|
|
2597
2617
|
},
|
|
2598
|
-
onChangeAgent:
|
|
2618
|
+
onChangeAgent: q,
|
|
2599
2619
|
onBack: () => {
|
|
2600
2620
|
R.current = null, C("home");
|
|
2601
2621
|
},
|
|
2602
2622
|
onSelectScene: () => {
|
|
2603
2623
|
}
|
|
2604
2624
|
},
|
|
2605
|
-
`${
|
|
2625
|
+
`${$.agentId}:${$.playbookId || "free-chat"}`
|
|
2606
2626
|
),
|
|
2607
|
-
|
|
2627
|
+
pe && /* @__PURE__ */ e.jsx(na, { fading: Z })
|
|
2608
2628
|
] }) : /* @__PURE__ */ e.jsxs(
|
|
2609
2629
|
"div",
|
|
2610
2630
|
{
|
|
2611
|
-
className: `wandox-console${
|
|
2631
|
+
className: `wandox-console${ie ? " wandox-console--secondary" : ""}`,
|
|
2612
2632
|
children: [
|
|
2613
|
-
|
|
2614
|
-
!
|
|
2633
|
+
pe && /* @__PURE__ */ e.jsx(na, { fading: Z }),
|
|
2634
|
+
!ie && /* @__PURE__ */ e.jsx(
|
|
2615
2635
|
wo,
|
|
2616
2636
|
{
|
|
2617
2637
|
features: fo,
|
|
2618
2638
|
activeId: u ?? "conversation",
|
|
2619
|
-
onOpenFeature:
|
|
2639
|
+
onOpenFeature: ce
|
|
2620
2640
|
}
|
|
2621
2641
|
),
|
|
2622
2642
|
/* @__PURE__ */ e.jsxs("main", { className: "wandox-console-main", children: [
|
|
@@ -2624,15 +2644,15 @@ function vo({
|
|
|
2624
2644
|
oa,
|
|
2625
2645
|
{
|
|
2626
2646
|
title: "自动化",
|
|
2627
|
-
onBack: () =>
|
|
2647
|
+
onBack: () => F(null),
|
|
2628
2648
|
hideHeader: !0,
|
|
2629
2649
|
className: "wandox-console-featureview--automation",
|
|
2630
2650
|
children: /* @__PURE__ */ e.jsx(
|
|
2631
2651
|
Un,
|
|
2632
2652
|
{
|
|
2633
|
-
onCockpitEnter: () =>
|
|
2634
|
-
onCockpitExit: () =>
|
|
2635
|
-
onInboxEnter: () =>
|
|
2653
|
+
onCockpitEnter: () => O(!0),
|
|
2654
|
+
onCockpitExit: () => O(!1),
|
|
2655
|
+
onInboxEnter: () => O(!0)
|
|
2636
2656
|
}
|
|
2637
2657
|
)
|
|
2638
2658
|
}
|
|
@@ -2641,7 +2661,7 @@ function vo({
|
|
|
2641
2661
|
oa,
|
|
2642
2662
|
{
|
|
2643
2663
|
title: "通知配置",
|
|
2644
|
-
onBack: () =>
|
|
2664
|
+
onBack: () => F(null),
|
|
2645
2665
|
hideHeader: !0,
|
|
2646
2666
|
children: /* @__PURE__ */ e.jsx(Kn, {})
|
|
2647
2667
|
}
|
|
@@ -2649,19 +2669,19 @@ function vo({
|
|
|
2649
2669
|
!u && /* @__PURE__ */ e.jsx(
|
|
2650
2670
|
ho,
|
|
2651
2671
|
{
|
|
2652
|
-
useMapCards:
|
|
2653
|
-
useMapCategories:
|
|
2654
|
-
playbooks:
|
|
2655
|
-
selectedCategoryKey:
|
|
2656
|
-
onCategorySelect:
|
|
2657
|
-
loading:
|
|
2658
|
-
useMapError:
|
|
2659
|
-
onRetry:
|
|
2660
|
-
onStartAnalysis:
|
|
2661
|
-
agents:
|
|
2672
|
+
useMapCards: I,
|
|
2673
|
+
useMapCategories: de,
|
|
2674
|
+
playbooks: G,
|
|
2675
|
+
selectedCategoryKey: oe,
|
|
2676
|
+
onCategorySelect: te,
|
|
2677
|
+
loading: B,
|
|
2678
|
+
useMapError: ge,
|
|
2679
|
+
onRetry: xe,
|
|
2680
|
+
onStartAnalysis: ke,
|
|
2681
|
+
agents: j,
|
|
2662
2682
|
selectedAgentId: _,
|
|
2663
|
-
onAgentSelect:
|
|
2664
|
-
onOpenAgentChat:
|
|
2683
|
+
onAgentSelect: T,
|
|
2684
|
+
onOpenAgentChat: E
|
|
2665
2685
|
}
|
|
2666
2686
|
)
|
|
2667
2687
|
] })
|