@wandox/sdk 0.1.43 → 0.1.45

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