@wandox/sdk 0.1.38 → 0.1.40

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