@wandox/sdk 0.1.39 → 0.1.40

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (104) hide show
  1. package/dist/{V1Workbench-GjmMHW_z.js → V1Workbench-Bkmf1K42.js} +62 -62
  2. package/dist/{V1Workbench-BL9TCe-h.cjs → V1Workbench-CItNelpx.cjs} +3 -3
  3. package/dist/{V2Workbench-C4uOgIer.js → V2Workbench-CzVA0I0C.js} +1239 -1174
  4. package/dist/V2Workbench-Du9Rjdb9.cjs +2 -0
  5. package/dist/{WorkbenchRuntime-ButbDrvB.js → WorkbenchRuntime-BtaB5WWj.js} +2 -2
  6. package/dist/{WorkbenchRuntime-jXXGAqkE.cjs → WorkbenchRuntime-WgDNtkfm.cjs} +1 -1
  7. package/dist/{arc-BK_aujia.cjs → arc-Dp6HGkPf.cjs} +1 -1
  8. package/dist/{arc-CE1S54RP.js → arc-p2evs-YP.js} +1 -1
  9. package/dist/{architectureDiagram-3BPJPVTR-CCe2Qwas.cjs → architectureDiagram-3BPJPVTR-DLW47m6f.cjs} +1 -1
  10. package/dist/{architectureDiagram-3BPJPVTR-mquQ4A04.js → architectureDiagram-3BPJPVTR-S5Nk8_Ym.js} +3 -3
  11. package/dist/{blockDiagram-GPEHLZMM-DnZ4oEXt.js → blockDiagram-GPEHLZMM-CnAR5dM8.js} +3 -3
  12. package/dist/{blockDiagram-GPEHLZMM-Dr9swVG2.cjs → blockDiagram-GPEHLZMM-DaROF8fd.cjs} +1 -1
  13. package/dist/{c4Diagram-AAUBKEIU-DtaJYesx.cjs → c4Diagram-AAUBKEIU-B4dU2Qlc.cjs} +1 -1
  14. package/dist/{c4Diagram-AAUBKEIU-DTz0ipr3.js → c4Diagram-AAUBKEIU-C-Fj0O2Q.js} +2 -2
  15. package/dist/{channel-CDc0Yn2X.cjs → channel-BBbxPnTi.cjs} +1 -1
  16. package/dist/{channel-BeVy-ZIF.js → channel-BZZ2huJO.js} +1 -1
  17. package/dist/{chunk-2J33WTMH-lCahilst.js → chunk-2J33WTMH-BCVkaWvn.js} +1 -1
  18. package/dist/{chunk-2J33WTMH-2Z5D00s4.cjs → chunk-2J33WTMH-BslFwdPd.cjs} +1 -1
  19. package/dist/{chunk-4BX2VUAB-C9W5QDsy.cjs → chunk-4BX2VUAB-BHzIlLga.cjs} +1 -1
  20. package/dist/{chunk-4BX2VUAB-BfG82Y4D.js → chunk-4BX2VUAB-D6Udw9Mc.js} +1 -1
  21. package/dist/{chunk-55IACEB6-F1nM7WdQ.cjs → chunk-55IACEB6-0b2j3Xbg.cjs} +1 -1
  22. package/dist/{chunk-55IACEB6-DDuaa7-s.js → chunk-55IACEB6-Cz6uJPeB.js} +1 -1
  23. package/dist/{chunk-727SXJPM-D9vGz_R5.cjs → chunk-727SXJPM-BaM2sDB9.cjs} +1 -1
  24. package/dist/{chunk-727SXJPM-DCpsumhn.js → chunk-727SXJPM-C36Anem5.js} +5 -5
  25. package/dist/{chunk-AQP2D5EJ-DBFNgb2V.cjs → chunk-AQP2D5EJ-B7gqs7oW.cjs} +1 -1
  26. package/dist/{chunk-AQP2D5EJ-BiJG2fDP.js → chunk-AQP2D5EJ-ZE_DySvS.js} +3 -3
  27. package/dist/{chunk-FMBD7UC4-BhyGm-GT.cjs → chunk-FMBD7UC4-DPnttxo-.cjs} +1 -1
  28. package/dist/{chunk-FMBD7UC4-cWskSZrE.js → chunk-FMBD7UC4-DtqMssXQ.js} +1 -1
  29. package/dist/{chunk-ND2GUHAM-DRY6nzyy.cjs → chunk-ND2GUHAM-CI8ify2b.cjs} +1 -1
  30. package/dist/{chunk-ND2GUHAM-DGIC-ZW-.js → chunk-ND2GUHAM-GyysshWQ.js} +1 -1
  31. package/dist/{chunk-QZHKN3VN-C7JxoAX-.cjs → chunk-QZHKN3VN-CLLJT-iu.cjs} +1 -1
  32. package/dist/{chunk-QZHKN3VN-HwaVssHs.js → chunk-QZHKN3VN-CogEQqcp.js} +1 -1
  33. package/dist/{classDiagram-4FO5ZUOK-mzJYvOZu.js → classDiagram-4FO5ZUOK-BKPODxxw.js} +2 -2
  34. package/dist/{classDiagram-4FO5ZUOK-CygibmXb.cjs → classDiagram-4FO5ZUOK-BYg4Pa6H.cjs} +1 -1
  35. package/dist/{classDiagram-v2-Q7XG4LA2-CygibmXb.cjs → classDiagram-v2-Q7XG4LA2-BYg4Pa6H.cjs} +1 -1
  36. package/dist/{classDiagram-v2-Q7XG4LA2-B1YHuxBu.js → classDiagram-v2-Q7XG4LA2-CEIG7BUg.js} +2 -2
  37. package/dist/{cose-bilkent-S5V4N54A-D8IZat0h.js → cose-bilkent-S5V4N54A-Bh_LjYJa.js} +2 -2
  38. package/dist/{cose-bilkent-S5V4N54A-Rhluulxd.cjs → cose-bilkent-S5V4N54A-CIO6lXK4.cjs} +1 -1
  39. package/dist/{dagre-BM42HDAG-Bvc4ohUU.cjs → dagre-BM42HDAG-B0imV5xh.cjs} +1 -1
  40. package/dist/{dagre-BM42HDAG-C9fviEf-.js → dagre-BM42HDAG-B1zhDnbU.js} +1 -1
  41. package/dist/{diagram-2AECGRRQ-paI55ZVp.js → diagram-2AECGRRQ-BXFpQz5l.js} +2 -2
  42. package/dist/{diagram-2AECGRRQ-CkQq6ZGh.cjs → diagram-2AECGRRQ-nWXbUHwt.cjs} +1 -1
  43. package/dist/{diagram-5GNKFQAL-CDMHctmr.js → diagram-5GNKFQAL-BelQYxW2.js} +3 -3
  44. package/dist/{diagram-5GNKFQAL-DWCFHwPd.cjs → diagram-5GNKFQAL-CxxJicHI.cjs} +1 -1
  45. package/dist/{diagram-KO2AKTUF-BWWzWP62.js → diagram-KO2AKTUF-CZEeDH7M.js} +2 -2
  46. package/dist/{diagram-KO2AKTUF-spfSwB_X.cjs → diagram-KO2AKTUF-DjnQxEUp.cjs} +1 -1
  47. package/dist/{diagram-LMA3HP47-RAfpkFKr.cjs → diagram-LMA3HP47-D6J2F4J0.cjs} +1 -1
  48. package/dist/{diagram-LMA3HP47-BT-BShmi.js → diagram-LMA3HP47-unuJ3SHU.js} +2 -2
  49. package/dist/{diagram-OG6HWLK6-CqDudF-0.cjs → diagram-OG6HWLK6-BP5DzAWo.cjs} +1 -1
  50. package/dist/{diagram-OG6HWLK6-CIN-4ftA.js → diagram-OG6HWLK6-lal84-fO.js} +3 -3
  51. package/dist/{erDiagram-TEJ5UH35-TOCz7Y2q.cjs → erDiagram-TEJ5UH35-BDzac_yS.cjs} +1 -1
  52. package/dist/{erDiagram-TEJ5UH35-D0fhsTuc.js → erDiagram-TEJ5UH35-eUkSOPMA.js} +4 -4
  53. package/dist/{flowDiagram-I6XJVG4X-BInalcH7.cjs → flowDiagram-I6XJVG4X-BsdsU4VU.cjs} +1 -1
  54. package/dist/{flowDiagram-I6XJVG4X-4f3A04iK.js → flowDiagram-I6XJVG4X-DCzTSref.js} +6 -6
  55. package/dist/{ganttDiagram-6RSMTGT7-DEF_FmRR.cjs → ganttDiagram-6RSMTGT7-VdCKv9lI.cjs} +1 -1
  56. package/dist/{ganttDiagram-6RSMTGT7-C8ScPSHu.js → ganttDiagram-6RSMTGT7-pyd5uyfC.js} +3 -3
  57. package/dist/{gitGraphDiagram-PVQCEYII-DBwXskFh.cjs → gitGraphDiagram-PVQCEYII-CHSRixtX.cjs} +1 -1
  58. package/dist/{gitGraphDiagram-PVQCEYII-CnKH0PHp.js → gitGraphDiagram-PVQCEYII-uaeRcwRX.js} +3 -3
  59. package/dist/{index-DGyUqlaQ.cjs → index-C6UznrWn.cjs} +1 -1
  60. package/dist/{index-NXlUEMwG.js → index-Ca9Ql6S9.js} +8 -8
  61. package/dist/{index-pGTHB93u.js → index-DsH5dPnp.js} +58 -58
  62. package/dist/{index-DeLd859U.cjs → index-NH-U1YoC.cjs} +6 -6
  63. package/dist/{infoDiagram-5YYISTIA-DOOxpQu0.cjs → infoDiagram-5YYISTIA-BuB-FkRS.cjs} +1 -1
  64. package/dist/{infoDiagram-5YYISTIA-D79y7lhu.js → infoDiagram-5YYISTIA-CLtsqBN1.js} +1 -1
  65. package/dist/{ishikawaDiagram-YF4QCWOH-D7ka4Dej.js → ishikawaDiagram-YF4QCWOH-14uoP_Zp.js} +1 -1
  66. package/dist/{ishikawaDiagram-YF4QCWOH-3amMX1JK.cjs → ishikawaDiagram-YF4QCWOH-CocvPDlS.cjs} +1 -1
  67. package/dist/{journeyDiagram-JHISSGLW-BARqx_B3.cjs → journeyDiagram-JHISSGLW-8xy8wS-h.cjs} +1 -1
  68. package/dist/{journeyDiagram-JHISSGLW-EBn4X8-a.js → journeyDiagram-JHISSGLW-B7dpJRIo.js} +4 -4
  69. package/dist/{kanban-definition-UN3LZRKU-D8iz27bT.cjs → kanban-definition-UN3LZRKU-D18GwLQS.cjs} +1 -1
  70. package/dist/{kanban-definition-UN3LZRKU-CBAKDyvM.js → kanban-definition-UN3LZRKU-vunuCqsW.js} +2 -2
  71. package/dist/{linear-Fv7CLeZq.cjs → linear-D2jSS9Kp.cjs} +1 -1
  72. package/dist/{linear-B2QSw8ao.js → linear-sc1nZZBl.js} +1 -1
  73. package/dist/{mermaid.core-HBdKo8dE.cjs → mermaid.core-CBIohIEC.cjs} +3 -3
  74. package/dist/{mermaid.core-ChK_QlLI.js → mermaid.core-Cj7H_j_o.js} +35 -35
  75. package/dist/{mindmap-definition-RKZ34NQL-PqVfSh0o.cjs → mindmap-definition-RKZ34NQL-DcYPxTLy.cjs} +1 -1
  76. package/dist/{mindmap-definition-RKZ34NQL-C3uHES2i.js → mindmap-definition-RKZ34NQL-Dwhdy2Lv.js} +3 -3
  77. package/dist/{pieDiagram-4H26LBE5-slbguXAu.cjs → pieDiagram-4H26LBE5-BiBh5z_4.cjs} +1 -1
  78. package/dist/{pieDiagram-4H26LBE5-aJvbTpKH.js → pieDiagram-4H26LBE5-CZEVmlfR.js} +3 -3
  79. package/dist/{quadrantDiagram-W4KKPZXB-B1BYMfPp.js → quadrantDiagram-W4KKPZXB-BuuPBESZ.js} +2 -2
  80. package/dist/{quadrantDiagram-W4KKPZXB-Cqvftrp-.cjs → quadrantDiagram-W4KKPZXB-DszFlk-S.cjs} +1 -1
  81. package/dist/{requirementDiagram-4Y6WPE33-CgVm8oUv.cjs → requirementDiagram-4Y6WPE33-ByH8B2ZH.cjs} +1 -1
  82. package/dist/{requirementDiagram-4Y6WPE33-Cn7GQxPf.js → requirementDiagram-4Y6WPE33-CBVeO6ga.js} +3 -3
  83. package/dist/{sankeyDiagram-5OEKKPKP-aWGj-ZP4.js → sankeyDiagram-5OEKKPKP-CPMEaHn3.js} +1 -1
  84. package/dist/{sankeyDiagram-5OEKKPKP-D7Lkmywe.cjs → sankeyDiagram-5OEKKPKP-Dhk-rR8_.cjs} +1 -1
  85. package/dist/{sequenceDiagram-3UESZ5HK-CLsU-4UM.js → sequenceDiagram-3UESZ5HK-CjnhgM39.js} +3 -3
  86. package/dist/{sequenceDiagram-3UESZ5HK-PwX7e0rY.cjs → sequenceDiagram-3UESZ5HK-nuywC0l5.cjs} +1 -1
  87. package/dist/{stateDiagram-AJRCARHV-vGqcl-KV.cjs → stateDiagram-AJRCARHV-0CUDhISM.cjs} +1 -1
  88. package/dist/{stateDiagram-AJRCARHV-CqgrATuU.js → stateDiagram-AJRCARHV-cJ2GiNH4.js} +2 -2
  89. package/dist/{stateDiagram-v2-BHNVJYJU-HtcVKaju.cjs → stateDiagram-v2-BHNVJYJU-Bvyir8PP.cjs} +1 -1
  90. package/dist/{stateDiagram-v2-BHNVJYJU-i2ltnCUr.js → stateDiagram-v2-BHNVJYJU-nlH8p5aD.js} +2 -2
  91. package/dist/{timeline-definition-PNZ67QCA-BK6Um61-.cjs → timeline-definition-PNZ67QCA-BJOWbfT_.cjs} +1 -1
  92. package/dist/{timeline-definition-PNZ67QCA-CcAR4rsb.js → timeline-definition-PNZ67QCA-BR5rGmv7.js} +2 -2
  93. package/dist/{vennDiagram-CIIHVFJN-Cp8snzHu.js → vennDiagram-CIIHVFJN-BdO9p0AW.js} +1 -1
  94. package/dist/{vennDiagram-CIIHVFJN-Cm13ds7X.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 +563 -563
  99. package/dist/{wardleyDiagram-YWT4CUSO-CSbrbJrc.js → wardleyDiagram-YWT4CUSO-Clxin-yE.js} +2 -2
  100. package/dist/{wardleyDiagram-YWT4CUSO-D9nb2LzZ.cjs → wardleyDiagram-YWT4CUSO-DNTHPpN6.cjs} +1 -1
  101. package/dist/{xychartDiagram-2RQKCTM6-6BlgLg2e.cjs → xychartDiagram-2RQKCTM6-BM-DXVP1.cjs} +1 -1
  102. package/dist/{xychartDiagram-2RQKCTM6-DpAMV2MM.js → xychartDiagram-2RQKCTM6-V_uIcNZ1.js} +2 -2
  103. package/package.json +1 -1
  104. package/dist/V2Workbench-C0Ak3rdn.cjs +0 -2
@@ -1,52 +1,82 @@
1
- import { dt as a, af as js, d0 as e, a_ as ta, ai as ks, a$ as ms, aR as ca, bL as la, b0 as Za, d_ as ia, K as Qs, aa as Xa, a9 as hs, d6 as Ys, Q as en, P as sn, a6 as an, a4 as nn, T as on, da as ra, dG as N, ci as tn, S as cn, J as xs, c_ as ln, cO as rn, dO as dn, cd as un, cH as mn, cG as hn, as as xn, ap as pn, o as _n, m as bn, v as fn, b1 as da, b2 as wn, bC as ps, aO as yn, b3 as _s, n as gn, ar as jn, A as kn, aq as vn, bz as Nn, bB as Cn, i as Xe, aA as Sn, y as Rn, cI as In, cJ as $n, aE as Js, b4 as En, aZ as An, b5 as Zs, b6 as Pn, b7 as Tn, b8 as Mn, b9 as Ln, ek as Dn } from "./index-NXlUEMwG.js";
2
- import { n as Fn, A as On, l as es, m as bs, p as Vn, h as ua, R as fs, c as ma, a as ha, d as xa, e as Xs, Q as Bn, i as zn, f as qn, u as Wn, j as Hn, o as ea, b as Un, S as Kn } from "./WorkbenchRuntime-ButbDrvB.js";
3
- import { Drawer as Gn, Divider as Qn } from "./index-pGTHB93u.js";
4
- 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 ws() {
6
- return ws = 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
- }, ws.apply(this, arguments);
13
+ }, va.apply(this, arguments);
14
14
  }
15
- const Jn = (o, i) => /* @__PURE__ */ a.createElement(js, ws({}, 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 ys() {
21
- return ys = 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
- }, ys.apply(this, arguments);
28
+ }, ka.apply(this, arguments);
29
29
  }
30
- const eo = (o, i) => /* @__PURE__ */ a.createElement(js, ys({}, 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 gs() {
36
- return gs = 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
- }, gs.apply(this, arguments);
43
+ }, Na.apply(this, arguments);
44
44
  }
45
- const ao = (o, i) => /* @__PURE__ */ a.createElement(js, gs({}, 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 ds = "__all__", sa = "__my__", us = "__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
- cards: j,
88
- executing: A,
117
+ cards: k,
118
+ executing: P,
89
119
  loadingPlaybookId: _,
90
- onClose: S,
91
- onSourceChange: D,
92
- onCategoryChange: ne,
93
- onSearchChange: Y,
120
+ onClose: R,
121
+ onSourceChange: T,
122
+ onCategoryChange: ae,
123
+ onSearchChange: Q,
94
124
  onSelectScene: le
95
125
  }) {
96
- const [R, H] = a.useState(null), P = a.useMemo(
97
- () => R ? _a(R) : null,
98
- [R]
99
- ), C = a.useCallback((u, F) => {
100
- u.stopPropagation(), H(F);
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: () => D(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 F = 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
- className: `wandox-console-chat__drawer-cat${F ? " wandox-console-chat__drawer-cat--active" : ""}`,
159
- onClick: () => ne(u.key),
188
+ className: `wandox-console-chat__drawer-cat${D ? " wandox-console-chat__drawer-cat--active" : ""}`,
189
+ onClick: () => ae(h.key),
160
190
  children: [
161
- /* @__PURE__ */ e.jsx("span", { className: "wandox-console-chat__drawer-cat-name", children: 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
- ks,
201
+ Ra,
172
202
  {
173
203
  allowClear: !0,
174
- prefix: /* @__PURE__ */ e.jsx(ms, {}),
175
- placeholder: co(i),
204
+ prefix: /* @__PURE__ */ e.jsx(_a, {}),
205
+ placeholder: _o(l),
176
206
  value: p,
177
- onChange: (u) => Y(u.target.value)
207
+ onChange: (h) => Q(h.target.value)
178
208
  }
179
209
  ) }),
180
- j.length === 0 ? /* @__PURE__ */ e.jsx("div", { className: "wandox-console-chat__drawer-empty", children: p ? "没有匹配的场景" : "暂无可用场景" }) : /* @__PURE__ */ e.jsx("div", { className: "wandox-console-scenes", children: j.map((u) => {
181
- const F = _ === u.playbook_id;
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 || !!_,
189
- "aria-busy": F,
190
- onClick: () => void le(u),
218
+ disabled: P || !!_,
219
+ "aria-busy": D,
220
+ onClick: () => void le(h),
191
221
  children: /* @__PURE__ */ e.jsxs("div", { className: "wandox-console-scene__body", children: [
192
- /* @__PURE__ */ e.jsx("strong", { title: 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
- F && /* @__PURE__ */ e.jsx("span", { className: "wandox-console-scene__loading", children: "正在读取场景..." })
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: (ie) => C(ie, 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: () => H(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
- onChange: j,
246
- onUpload: A
275
+ onChange: k,
276
+ onUpload: P
247
277
  }) {
248
- const _ = Fn(o.type), S = A ?? ((D, ne) => 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
- onChange: j,
270
- onUpload: S,
271
- onDownloadTemplate: (D) => window.open(D.path, "_blank", "noopener,noreferrer")
299
+ onChange: k,
300
+ onUpload: R,
301
+ onDownloadTemplate: (T) => window.open(T.path, "_blank", "noopener,noreferrer")
272
302
  }
273
303
  )
274
304
  ] });
275
305
  }
276
- function 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
- initialAttachments: j,
288
- useMapCards: A = [],
317
+ initialAttachments: k,
318
+ useMapCards: P = [],
289
319
  useMapCategories: _ = [],
290
- playbooks: S = [],
291
- userPlaybooks: D = [],
292
- agents: ne = [],
293
- onChangeAgent: Y,
320
+ playbooks: R = [],
321
+ userPlaybooks: T = [],
322
+ agents: ae = [],
323
+ onChangeAgent: Q,
294
324
  onBack: le,
295
- onSelectScene: R,
296
- onReady: H
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") || "", F = a.useRef(null), ie = a.useRef(!1), [O, $] = a.useState(!1), [U, oe] = a.useState(""), [te, K] = a.useState(""), [V, G] = a.useState("map"), [J, re] = a.useState(ds), [I, B] = a.useState(null), ge = a.useRef(null), xe = a.useRef(null), [de, we] = a.useState(!1), [pe, Re] = a.useState([]), [Z, je] = a.useState("");
299
- a.useEffect(() => {
300
- if (!I || O) 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 = ge.current) == null || n.focus();
333
+ (n = ke.current) == null || n.focus();
304
334
  }, 120);
305
- return () => clearTimeout(s);
306
- }, [I, O]), a.useEffect(() => {
307
- if (!I || O) return;
308
- const s = (n) => {
309
- const c = xe.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
- ) || (B(null), ce([]), q({}));
342
+ ) || (B(null), K([]), X({}));
313
343
  };
314
- return document.addEventListener("mousedown", s), () => document.removeEventListener("mousedown", s);
315
- }, [I, O]);
316
- const [X, ce] = a.useState([]), [T, q] = a.useState({}), E = ia(
317
- X,
318
- T,
319
- q
320
- ), ke = a.useMemo(
321
- () => es(X, T).filter(
322
- (s) => s.required && bs(T[s.name])
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
- [X, T]
325
- ), [se, x] = a.useState("chat"), [k, ye] = a.useState([]), [z, ve] = a.useState(null), [ue, Ae] = a.useState("results"), [ss, Ie] = a.useState(!1), [ee, t] = a.useState([]), [f, y] = a.useState(!1), [b, v] = a.useState([]), [me, Ne] = a.useState([]), [W, Q] = a.useState({}), [$e, Ce] = a.useState(!1), [M, Pe] = a.useState(null), [Ve, Ee] = a.useState(void 0), [Be, ze] = a.useState(!1), [wa, vs] = a.useState(!1);
326
- a.useEffect(() => {
327
- H == null || H({
328
- showInspectionResults: (s) => {
329
- x("robot"), Ae("results"), ve(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
- }, [H]);
333
- const [Te, ya] = a.useState([]), [Me, Se] = a.useState(!1), [qe, ga] = a.useState(void 0), [Ns, Cs] = a.useState([]), [as, Ss] = a.useState(""), [ns, ja] = a.useState(
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, Rs] = a.useState(
336
- Qs
337
- ), [os, Is] = a.useState({}), [Ue, $s] = 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 = D.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 g = d.category_name || d.category || d.type || "默认场景", w = `${oo}${g}`, fe = n.get(w) || [];
360
- fe.push(ts(d, w, g)), n.set(w, fe);
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: us,
394
+ key: pa,
365
395
  name: "全部场景",
366
396
  count: c.length,
367
397
  cards: c
368
398
  },
369
- ...Array.from(n, ([d, g]) => {
370
- var w;
399
+ ...Array.from(n, ([m, v]) => {
400
+ var g;
371
401
  return {
372
- key: d,
373
- name: ((w = g[0]) == null ? void 0 : w.reason) || "默认场景",
374
- count: g.length,
375
- cards: g
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: ds,
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((g) => g.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
- D
400
- ]), cs = a.useMemo(() => V === "all" ? Fe.allCategories : V === "map" ? Fe.mapCategories : [], [Fe, V]), Ke = a.useMemo(
401
- () => A.map(
402
- (s) => ({
429
+ T
430
+ ]), da = s.useMemo(() => V === "all" ? Fe.allCategories : V === "map" ? Fe.mapCategories : [], [Fe, V]), Ye = s.useMemo(
431
+ () => P.map(
432
+ (a) => ({
403
433
  category: null,
404
- category_name: 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,
427
- ...D,
428
- ...Ke
456
+ ...R,
457
+ ...T,
458
+ ...Ye
429
459
  ])
430
- n.playbook_id && s.set(n.playbook_id, n);
431
- return Array.from(s.values());
432
- }, [S, D, 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 = te.trim().toLowerCase(), n = V === "my" ? Fe.myCards : ((c = cs.find((l) => l.key === J)) == 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
- J,
495
+ da,
496
+ Y,
467
497
  Fe.myCards,
468
498
  V,
469
499
  te
470
- ]), Ia = a.useCallback((s) => {
471
- const n = Array.isArray(s) ? s : [];
472
- ya(n), Se(n.length > 0);
473
- }, []), he = a.useMemo(
474
- () => ne.find((s) => s.id === o),
475
- [ne, o]
476
- ), { messageData: $a, executing: L, stopping: Ea, actions: Aa } = Vn({
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: Es,
485
- respondToProposal: As,
486
- stopCurrent: Pa,
487
- retrigger: Ps
488
- } = Aa, {
489
- messages: _e,
490
- messagesTotal: Ts,
491
- loading: Ms,
492
- loadMessages: Ls,
493
- loadMoreMessages: Ds
494
- } = $a, Qe = a.useMemo(() => {
495
- for (let s = _e.length - 1; s >= 0; s--)
496
- if (_e[s].role === "assistant") return _e[s].id;
497
- }, [_e]), Ye = a.useCallback(async () => {
498
- if (!o || !P) {
499
- Cs([]);
513
+ sendMessage: Ze,
514
+ executePlaybook: La,
515
+ respondToProposal: Ta,
516
+ stopCurrent: Ts,
517
+ retrigger: Oa
518
+ } = Ls, {
519
+ messages: we,
520
+ messagesTotal: Da,
521
+ loading: Fa,
522
+ loadMessages: Va,
523
+ loadMoreMessages: Ba
524
+ } = Ps, Je = s.useMemo(() => {
525
+ for (let a = we.length - 1; a >= 0; a--)
526
+ if (we[a].role === "assistant") return we[a].id;
527
+ }, [we]), Xe = s.useCallback(async () => {
528
+ if (!o || !M) {
529
+ Ia([]);
500
530
  return;
501
531
  }
502
532
  try {
503
- const s = await Xa({
533
+ const a = await sn({
504
534
  agent_id: o,
505
535
  limit: 8
506
536
  });
507
- Cs(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 ae = a.useCallback(
515
- async (s) => {
516
- await Es(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
- [Es, Ye]
519
- ), Fs = 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 hs({
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(() => {
557
+ s.useEffect(() => {
528
558
  ie.current || (ie.current = !0, (async () => {
529
- if (await Ls(), h) {
530
- const s = (p == null ? void 0 : p.trim()) || "执行场景";
531
- ae({
532
- message: s,
533
- playbook_id: h,
534
- playbook_params: m || {}
559
+ if (await Va(), u) {
560
+ const a = (p == null ? void 0 : p.trim()) || "执行场景";
561
+ ne({
562
+ message: a,
563
+ playbook_id: u,
564
+ playbook_params: r || {}
535
565
  });
536
- } else p != null && p.trim() && Ge(p.trim(), void 0, j);
566
+ } else p != null && p.trim() && Ze(p.trim(), void 0, k);
537
567
  })());
538
568
  }, [
539
- h,
569
+ u,
540
570
  p,
541
- j,
542
- m,
543
- ae,
544
- Ls,
545
- Ge
546
- ]), a.useEffect(() => {
571
+ k,
572
+ r,
573
+ ne,
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
- ye(c), ve(null);
584
+ ce(c), Ce(null);
555
585
  } catch {
556
- ye([]);
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 (se !== "robot" || ue !== "history" || !z) {
565
- t([]);
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 = k.find((c) => c.name === z);
569
- if (!s) return;
598
+ const a = b.find((c) => c.name === f);
599
+ if (!a) return;
570
600
  let n = !1;
571
- return Ie(!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, g) => ({
580
- id: d.id || d.execute_id || `record_${g}`,
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
- t(r);
619
+ Pe(d);
590
620
  } catch {
591
- t([]);
621
+ Pe([]);
592
622
  } finally {
593
- n || Ie(!1);
623
+ n || qe(!1);
594
624
  }
595
625
  })(), () => {
596
626
  n = !0;
597
627
  };
598
- }, [se, ue, z, k]);
599
- const Os = 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) && Ne(
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
- k.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
- ), Q(s);
656
+ ), N(a);
627
657
  } catch {
628
658
  }
629
- }, [k]), Vs = a.useCallback(async () => {
659
+ }, [b]), Wa = s.useCallback(async () => {
630
660
  if (o) {
631
- y(!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
- v(c);
681
+ Ee(c);
652
682
  } catch {
653
- v([]);
683
+ Ee([]);
654
684
  } finally {
655
- y(!1);
685
+ We(!1);
656
686
  }
657
687
  }
658
688
  }, [o]);
659
- a.useEffect(() => {
660
- Os(), k.length > 0 && Je();
661
- }, [k, Os, Je]), a.useEffect(() => {
662
- se === "robot" && ue === "results" && Vs();
663
- }, [se, ue, Vs]);
664
- const Ta = (s) => {
665
- Pe(s), Ee(W[s.agent_id]), Ce(!0);
666
- }, Ma = async () => {
667
- if (!M || !Ve) {
668
- 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: M.agent_id,
676
- webhook_id: Ve
705
+ agent_id: O.agent_id,
706
+ webhook_id: z
677
707
  }
678
- ), N.success("绑定成功"), Ce(!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 (M)
714
+ }, Fs = async () => {
715
+ if (O)
686
716
  try {
687
- ze(!0), await Rn(
688
- M.agent_id,
717
+ Ae(!0), await En(
718
+ O.agent_id,
689
719
  {}
690
- ), N.success("解绑成功"), Ce(!1), Ee(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
- }, ls = a.useMemo(() => z ? b.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) === z;
700
- }) : b, [b, z]), 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
- }, is = a.useCallback(
713
- (s, n, c) => {
742
+ }, ma = s.useCallback(
743
+ (a, n, c) => {
714
744
  if (Se(!1), n) {
715
- ae({
716
- message: s,
745
+ ne({
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
- [ae, Ge]
724
- ), Fa = a.useCallback((s) => {
725
- G(s), re(
726
- s === "all" ? us : s === "map" ? ds : sa
727
- ), K(""), B(null), ce([]), q({});
728
- }, []), Oa = a.useCallback(() => {
729
- G("all"), re(us), K(""), B(null), ce([]), q({}), $(!0);
730
- }, []), Va = a.useCallback(() => {
731
- $(!1), B(null), ce([]), q({});
732
- }, []), be = a.useCallback(
733
- (s, n = {}) => {
753
+ [ne, Ze]
754
+ ), Bs = s.useCallback((a) => {
755
+ U(a), re(
756
+ a === "all" ? pa : a === "map" ? xa : ts
757
+ ), H(""), B(null), K([]), X({});
758
+ }, []), zs = s.useCallback(() => {
759
+ U("all"), re(pa), H(""), B(null), K([]), X({}), E(!0);
760
+ }, []), qs = s.useCallback(() => {
761
+ E(!1), B(null), K([]), X({});
762
+ }, []), ye = s.useCallback(
763
+ (a, n = {}) => {
734
764
  B({
735
- key: s.playbook_id,
736
- playbook_id: s.playbook_id,
737
- title: s.name,
738
- desc: s.description ?? "",
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
- ce(c), q(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 (L || U) 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
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((g) => g.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 hs({
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 ($(!1), (c = d.input_fields) != null && c.length) {
784
- be(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
- is(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
822
  oe("");
793
823
  }
794
824
  },
795
825
  [
796
826
  L,
797
- be,
798
- is,
799
- R,
800
- U
827
+ ye,
828
+ ma,
829
+ $,
830
+ W
801
831
  ]
802
- ), Bs = a.useCallback(
803
- async (s) => {
832
+ ), Ha = s.useCallback(
833
+ async (a) => {
804
834
  if (!L) {
805
- if (Se(!1), s.input_fields && s.input_fields.length > 0) {
806
- be(s);
835
+ if (Se(!1), a.input_fields && a.input_fields.length > 0) {
836
+ ye(a);
807
837
  return;
808
838
  }
809
839
  try {
810
- await ae({
811
- message: s.name,
812
- playbook_id: s.playbook_id
840
+ await ne({
841
+ message: a.name,
842
+ playbook_id: a.playbook_id
813
843
  });
814
844
  } catch (n) {
815
845
  const c = n instanceof Error ? n.message : "执行失败";
816
- N.error(c);
846
+ C.error(c);
817
847
  }
818
848
  }
819
849
  },
820
- [L, ae, be]
821
- ), za = a.useCallback(
822
- async (s) => {
850
+ [L, ne, ye]
851
+ ), Hs = s.useCallback(
852
+ async (a) => {
823
853
  var c;
824
- if (L || 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
- Ss(n), Se(!1);
857
+ Ea(n), Se(!1);
828
858
  try {
829
- const l = tn(s), r = await Fs(s);
830
- if ((c = r.input_fields) != null && c.length) {
831
- be(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
- await ae({
835
- message: r.name,
836
- playbook_id: r.playbook_id
864
+ await ne({
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
- Ss("");
872
+ Ea("");
843
873
  }
844
874
  }
845
875
  },
846
876
  [
847
877
  L,
848
- ae,
849
- be,
850
- Fs,
851
- as
878
+ ne,
879
+ ye,
880
+ za,
881
+ ca
852
882
  ]
853
- ), qa = a.useCallback(async () => {
883
+ ), Us = s.useCallback(async () => {
854
884
  if (!I || L) return;
855
- const n = es(X, T).filter(
856
- (r) => r.required && bs(T[r.name])
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
- $(!1), Se(!1);
863
- const c = I, l = T;
864
- B(null), ce([]), q({});
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()) || "执行场景";
867
- await ae({
868
- message: r,
896
+ const d = c.title || (p == null ? void 0 : p.trim()) || "执行场景";
897
+ await ne({
898
+ message: d,
869
899
  playbook_id: c.playbook_id,
870
- playbook_params: 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
907
  I,
878
- X,
879
- T,
908
+ Z,
909
+ G,
880
910
  L,
881
- ae,
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
- xs,
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"],
@@ -940,7 +970,7 @@ function uo({
940
970
  className: "wandox-console-chat__scene-source",
941
971
  disabled: L,
942
972
  children: [
943
- /* @__PURE__ */ e.jsx("span", { children: 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
998
  disabled: L,
969
- onClick: () => s.key === "__my__" ? Ha() : Wa(s.playbooks),
970
- children: s.label
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 g = rn(s);
979
- if (!g) {
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 = g.fields.map((rs) => rs.label).join(","), fe = g.rows.map(
984
- (rs) => g.fields.map((Ja) => dn(rs[Ja.name])).join(",")
985
- ), Ya = `\uFEFF${[w, ...fe].join(`
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, g;
1013
- const n = _e.find(
1014
- (w) => w.message_id === s || w.id === s
1015
- ), c = mn(n);
1040
+ }, []), Ka = s.useCallback(
1041
+ (a) => {
1042
+ var d, m, v;
1043
+ const n = we.find(
1044
+ (g) => g.message_id === a || g.id === a
1045
+ ), c = pn(n);
1016
1046
  if (!c) {
1017
- 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) || ((g = n == null ? void 0 : n.meta_content) == null ? void 0 : g.playbook_name) || c;
1021
- Rs({
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
- [o, _e]
1030
- ), Ga = a.useCallback(() => {
1031
- Rs(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);
1059
+ [o, we]
1060
+ ), Zs = s.useCallback(() => {
1061
+ Aa(Xa);
1062
+ }, []), aa = s.useCallback(
1063
+ (a) => {
1064
+ const n = a.message_id;
1065
+ return n && Object.prototype.hasOwnProperty.call(ia, n) ? ia[n] : _n(a);
1036
1066
  },
1037
- [os]
1038
- ), Ws = a.useCallback(
1039
- async (s, n, c) => {
1040
- var g;
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
- Is((w) => ({
1048
- ...w,
1049
- [l]: d
1050
- })), $s((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: (g = c == null ? void 0 : c.tags) != null && g.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 Is((fe) => ({
1066
- ...fe,
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
- $s((w) => {
1073
- const fe = new Set(w);
1074
- return fe.delete(l), fe;
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) => {
1108
+ [Qe, aa, S]
1109
+ ), Qa = s.useCallback(
1110
+ async (a) => {
1081
1111
  Se(!1);
1082
1112
  try {
1083
- await Ps(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
- [Ps]
1090
- ), Us = a.useCallback(() => {
1091
- Se((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 && Te.length > 0, r = Me ? "隐藏推荐" : l ? `显示推荐(${Te.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
- className: `wandox-console-chat__toolbar-toggle${Me ? " is-active" : ""}`,
1115
- "aria-label": r,
1116
- "aria-expanded": Me,
1117
- onClick: Us,
1144
+ className: `wandox-console-chat__toolbar-toggle${Te ? " is-active" : ""}`,
1145
+ "aria-label": d,
1146
+ "aria-expanded": Te,
1147
+ onClick: Ya,
1118
1148
  children: [
1119
- /* @__PURE__ */ e.jsx(no, {}),
1120
- /* @__PURE__ */ e.jsx("span", { className: "wandox-console-chat__toolbar-toggle-count", children: Te.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 && Me && /* @__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: Te.map((d, g) => /* @__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",
@@ -1139,17 +1169,17 @@ function uo({
1139
1169
  className: "wandox-console-chat__recommendations-pill",
1140
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(fs, {}) })
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}-${g}`
1182
+ `${m.playbook_id || m.name}-${v}`
1153
1183
  ))
1154
1184
  }
1155
1185
  )
@@ -1157,88 +1187,88 @@ function uo({
1157
1187
  },
1158
1188
  [
1159
1189
  L,
1190
+ Qe,
1191
+ aa,
1192
+ Ha,
1193
+ Ua,
1194
+ Ga,
1195
+ Ka,
1196
+ Qa,
1197
+ Le,
1160
1198
  Ue,
1161
- Ze,
1162
- Bs,
1163
- zs,
1164
- Ws,
1165
- qs,
1166
- Hs,
1167
1199
  Te,
1168
- qe,
1169
- Me,
1170
- C,
1171
- Us
1200
+ S,
1201
+ Ya
1172
1202
  ]
1173
- ), Gs = a.useCallback(
1174
- (s, n) => {
1175
- je(s), Re(n), we(!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
- messages: _e,
1213
+ messages: we,
1184
1214
  executing: L,
1185
- ssoToken: P,
1186
- ssoDomain: C,
1187
- ssoCompany: u,
1188
- onExecutePlaybook: ae,
1189
- onFillPlaybookParams: (s) => be(
1215
+ ssoToken: M,
1216
+ ssoDomain: S,
1217
+ ssoCompany: h,
1218
+ onExecutePlaybook: ne,
1219
+ onFillPlaybookParams: (a) => ye(
1190
1220
  {
1191
1221
  category: null,
1192
1222
  domain: "",
1193
1223
  id: 0,
1194
- name: s.playbookName,
1195
- playbook_id: s.playbookId,
1224
+ name: a.playbookName,
1225
+ playbook_id: a.playbookId,
1196
1226
  scope: "",
1197
1227
  status: "available",
1198
1228
  sub_category: null,
1199
1229
  tags: null,
1200
1230
  type: "",
1201
1231
  version: "",
1202
- input_fields: s.inputFields,
1203
- playbook_type: s.playbookType
1232
+ input_fields: a.inputFields,
1233
+ playbook_type: a.playbookType
1204
1234
  },
1205
- s.initialParams ?? {}
1235
+ a.initialParams ?? {}
1206
1236
  ),
1207
- onRespondToProposal: As,
1208
- containerRef: F,
1209
- messagesTotal: Ts,
1210
- loadMoreMessages: Ds,
1211
- loading: Ms,
1212
- initialLoadingContent: /* @__PURE__ */ e.jsx(bn, {}),
1237
+ onRespondToProposal: Ta,
1238
+ containerRef: D,
1239
+ messagesTotal: Da,
1240
+ loadMoreMessages: Ba,
1241
+ loading: Fa,
1242
+ initialLoadingContent: /* @__PURE__ */ e.jsx(yn, {}),
1213
1243
  conversationKey: o,
1214
- messageToolbar: Ks,
1215
- onOpenActionDrawer: Gs
1244
+ messageToolbar: Za,
1245
+ onOpenActionDrawer: Ja
1216
1246
  }
1217
1247
  ),
1218
1248
  /* @__PURE__ */ e.jsx(
1219
- fn,
1249
+ gn,
1220
1250
  {
1221
- messages: _e,
1222
- scrollContainerRef: F,
1251
+ messages: we,
1252
+ scrollContainerRef: D,
1223
1253
  mode: "deepseek"
1224
1254
  }
1225
1255
  )
1226
1256
  ] }),
1227
1257
  [
1228
1258
  o,
1229
- ae,
1259
+ ne,
1230
1260
  L,
1231
- be,
1232
- Ds,
1233
- _e,
1234
- Ms,
1235
- Ts,
1236
- Gs,
1237
- Ks,
1238
- As,
1239
- u,
1240
- C,
1241
- P
1261
+ ye,
1262
+ Ba,
1263
+ we,
1264
+ Fa,
1265
+ Da,
1266
+ Ja,
1267
+ Za,
1268
+ Ta,
1269
+ h,
1270
+ S,
1271
+ M
1242
1272
  ]
1243
1273
  );
1244
1274
  return (
@@ -1252,25 +1282,25 @@ function uo({
1252
1282
  className: "wandox-console-chat__back",
1253
1283
  onClick: le,
1254
1284
  children: [
1255
- /* @__PURE__ */ e.jsx(ma, {}),
1285
+ /* @__PURE__ */ e.jsx(_s, {}),
1256
1286
  /* @__PURE__ */ e.jsx("span", { children: "返回" })
1257
1287
  ]
1258
1288
  }
1259
1289
  ),
1260
1290
  /* @__PURE__ */ e.jsx("div", { className: "wandox-console-chat__agent-selector", children: /* @__PURE__ */ e.jsx(
1261
- xs,
1291
+ fa,
1262
1292
  {
1263
1293
  menu: {
1264
- items: ne.map((s) => ({
1265
- key: s.id,
1266
- disabled: s.id === o,
1294
+ items: ae.map((a) => ({
1295
+ key: a.id,
1296
+ disabled: a.id === o,
1267
1297
  label: /* @__PURE__ */ e.jsxs("span", { className: "wandox-console-agent-menu-item", children: [
1268
- /* @__PURE__ */ e.jsx("span", { className: "wandox-console-agent-menu-item__icon", children: s.icon }),
1269
- /* @__PURE__ */ e.jsx("span", { className: "wandox-console-agent-menu-item__name", children: s.name }),
1270
- 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" })
1271
1301
  ] })
1272
1302
  })),
1273
- onClick: ({ key: s }) => Y == null ? void 0 : Y(s)
1303
+ onClick: ({ key: a }) => Q == null ? void 0 : Q(a)
1274
1304
  },
1275
1305
  trigger: ["click"],
1276
1306
  placement: "bottomLeft",
@@ -1283,8 +1313,8 @@ function uo({
1283
1313
  title: "切换智能体",
1284
1314
  children: [
1285
1315
  (he == null ? void 0 : he.icon) && /* @__PURE__ */ e.jsx("span", { className: "wandox-console-chat__title-icon", children: he.icon }),
1286
- /* @__PURE__ */ e.jsx("span", { className: "wandox-console-chat__title-name", children: i || (he == null ? void 0 : he.name) || "智能体" }),
1287
- /* @__PURE__ */ e.jsx(da, { className: "wandox-console-chat__title-arrow" })
1316
+ /* @__PURE__ */ e.jsx("span", { className: "wandox-console-chat__title-name", children: l || (he == null ? void 0 : he.name) || "智能体" }),
1317
+ /* @__PURE__ */ e.jsx(xs, { className: "wandox-console-chat__title-arrow" })
1288
1318
  ]
1289
1319
  }
1290
1320
  )
@@ -1296,21 +1326,21 @@ function uo({
1296
1326
  type: "button",
1297
1327
  className: "wandox-console-chat__all-scenes",
1298
1328
  disabled: L,
1299
- onClick: Oa,
1329
+ onClick: zs,
1300
1330
  children: [
1301
- /* @__PURE__ */ e.jsx(Zn, {}),
1331
+ /* @__PURE__ */ e.jsx(ao, {}),
1302
1332
  /* @__PURE__ */ e.jsx("span", { children: "全部场景" })
1303
1333
  ]
1304
1334
  }
1305
1335
  ),
1306
- /* @__PURE__ */ e.jsx(ha, { benefit: he == null ? void 0 : he.packageBenefit })
1336
+ /* @__PURE__ */ e.jsx(bs, { benefit: he == null ? void 0 : he.packageBenefit })
1307
1337
  ] }),
1308
1338
  /* @__PURE__ */ e.jsxs("nav", { className: "wandox-console-chat__topbar", children: [
1309
1339
  /* @__PURE__ */ e.jsx(
1310
1340
  "button",
1311
1341
  {
1312
1342
  type: "button",
1313
- className: `wandox-console-chat__topbar-tab ${se === "chat" ? "active" : ""}`,
1343
+ className: `wandox-console-chat__topbar-tab ${J === "chat" ? "active" : ""}`,
1314
1344
  onClick: () => x("chat"),
1315
1345
  children: "智能体会话"
1316
1346
  }
@@ -1319,39 +1349,39 @@ function uo({
1319
1349
  "button",
1320
1350
  {
1321
1351
  type: "button",
1322
- className: `wandox-console-chat__topbar-tab ${se === "robot" ? "active" : ""}`,
1352
+ className: `wandox-console-chat__topbar-tab ${J === "robot" ? "active" : ""}`,
1323
1353
  onClick: () => {
1324
- x("robot"), ve(null);
1354
+ x("robot"), Ce(null);
1325
1355
  },
1326
1356
  children: /* @__PURE__ */ e.jsx("span", { children: "巡检机器人" })
1327
1357
  }
1328
1358
  )
1329
1359
  ] }),
1330
- se === "chat" ? Qa : /* @__PURE__ */ e.jsxs("div", { className: "wandox-console-chat__robot", children: [
1331
- /* @__PURE__ */ e.jsx("div", { className: "wandox-console-chat__robot-chips", children: k.length === 0 ? /* @__PURE__ */ e.jsx("div", { className: "wandox-console-chat__robot-empty", children: "该智能体暂无巡检机器人" }) : /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
1332
- k.length > 0 && /* @__PURE__ */ e.jsx(
1360
+ J === "chat" ? Js : /* @__PURE__ */ e.jsxs("div", { className: "wandox-console-chat__robot", children: [
1361
+ /* @__PURE__ */ e.jsx("div", { className: "wandox-console-chat__robot-chips", children: b.length === 0 ? /* @__PURE__ */ e.jsx("div", { className: "wandox-console-chat__robot-empty", children: "该智能体暂无巡检机器人" }) : /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
1362
+ b.length > 0 && /* @__PURE__ */ e.jsx(
1333
1363
  "button",
1334
1364
  {
1335
1365
  type: "button",
1336
- className: `wandox-console-chat__robot-chip ${z === null ? "active" : ""}`,
1337
- onClick: () => ve(null),
1366
+ className: `wandox-console-chat__robot-chip ${f === null ? "active" : ""}`,
1367
+ onClick: () => Ce(null),
1338
1368
  children: "全部"
1339
1369
  }
1340
1370
  ),
1341
- k.map((s) => {
1342
- const n = !!W[s.agent_id];
1371
+ b.map((a) => {
1372
+ const n = !!w[a.agent_id];
1343
1373
  return /* @__PURE__ */ e.jsxs(
1344
1374
  "div",
1345
1375
  {
1346
- className: `wandox-console-chat__robot-chip-compound ${z === s.name ? "active" : ""}`,
1376
+ className: `wandox-console-chat__robot-chip-compound ${f === a.name ? "active" : ""}`,
1347
1377
  children: [
1348
1378
  /* @__PURE__ */ e.jsx(
1349
1379
  "button",
1350
1380
  {
1351
1381
  type: "button",
1352
1382
  className: "wandox-console-chat__robot-chip-name",
1353
- onClick: () => ve(s.name),
1354
- children: s.name
1383
+ onClick: () => Ce(a.name),
1384
+ children: a.name
1355
1385
  }
1356
1386
  ),
1357
1387
  /* @__PURE__ */ e.jsx(
@@ -1359,7 +1389,7 @@ function uo({
1359
1389
  {
1360
1390
  type: "button",
1361
1391
  className: `wandox-console-chat__robot-chip-bind ${n ? "bound" : ""}`,
1362
- onClick: () => Ta(s),
1392
+ onClick: () => Os(a),
1363
1393
  title: n ? "已绑定通知渠道,点击修改" : "绑定通知渠道",
1364
1394
  children: n ? /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
1365
1395
  /* @__PURE__ */ e.jsx(
@@ -1371,14 +1401,14 @@ function uo({
1371
1401
  ),
1372
1402
  /* @__PURE__ */ e.jsx("span", { children: "已通知" })
1373
1403
  ] }) : /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
1374
- /* @__PURE__ */ e.jsx(xa, {}),
1404
+ /* @__PURE__ */ e.jsx(fs, {}),
1375
1405
  /* @__PURE__ */ e.jsx("span", { children: "通知" })
1376
1406
  ] })
1377
1407
  }
1378
1408
  )
1379
1409
  ]
1380
1410
  },
1381
- s.agent_id
1411
+ a.agent_id
1382
1412
  );
1383
1413
  })
1384
1414
  ] }) }),
@@ -1388,7 +1418,7 @@ function uo({
1388
1418
  {
1389
1419
  type: "button",
1390
1420
  className: `wandox-console-chat__robot-tab ${ue === "results" ? "active" : ""}`,
1391
- onClick: () => Ae("results"),
1421
+ onClick: () => Ie("results"),
1392
1422
  children: "巡检结果"
1393
1423
  }
1394
1424
  ),
@@ -1397,65 +1427,65 @@ function uo({
1397
1427
  {
1398
1428
  type: "button",
1399
1429
  className: `wandox-console-chat__robot-tab ${ue === "history" ? "active" : ""}`,
1400
- onClick: () => Ae("history"),
1430
+ onClick: () => Ie("history"),
1401
1431
  children: [
1402
1432
  "执行记录",
1403
- ue === "history" && z && ee.length > 0 && /* @__PURE__ */ e.jsx("span", { className: "wandox-console-chat__robot-tab-badge", children: ee.length })
1433
+ ue === "history" && f && be.length > 0 && /* @__PURE__ */ e.jsx("span", { className: "wandox-console-chat__robot-tab-badge", children: be.length })
1404
1434
  ]
1405
1435
  }
1406
1436
  )
1407
1437
  ] }),
1408
- /* @__PURE__ */ e.jsx("div", { className: "wandox-console-chat__robot-content", children: ue === "results" ? f ? /* @__PURE__ */ e.jsxs("div", { className: "wandox-console-chat__robot-loading", children: [
1409
- /* @__PURE__ */ e.jsx(ps, { 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" }),
1410
1440
  /* @__PURE__ */ e.jsx("span", { children: "加载中..." })
1411
- ] }) : ls.length === 0 ? /* @__PURE__ */ e.jsxs("div", { className: "wandox-console-chat__robot-empty", children: [
1412
- /* @__PURE__ */ e.jsx("div", { className: "wandox-console-chat__robot-empty-icon", children: /* @__PURE__ */ e.jsx(Xs, {}) }),
1413
- /* @__PURE__ */ e.jsx("div", { className: "wandox-console-chat__robot-empty-title", children: z ? `${z} 暂无巡检结果` : "暂无巡检结果" }),
1441
+ ] }) : ua.length === 0 ? /* @__PURE__ */ e.jsxs("div", { className: "wandox-console-chat__robot-empty", children: [
1442
+ /* @__PURE__ */ e.jsx("div", { className: "wandox-console-chat__robot-empty-icon", children: /* @__PURE__ */ e.jsx(ns, {}) }),
1443
+ /* @__PURE__ */ e.jsx("div", { className: "wandox-console-chat__robot-empty-title", children: f ? `${f} 暂无巡检结果` : "暂无巡检结果" }),
1414
1444
  /* @__PURE__ */ e.jsx("div", { className: "wandox-console-chat__robot-empty-desc", children: "巡检结果会在机器人执行后展示在这里" })
1415
- ] }) : /* @__PURE__ */ e.jsx("ul", { className: "wandox-console-chat__robot-timeline", children: ls.map((s, n) => {
1445
+ ] }) : /* @__PURE__ */ e.jsx("ul", { className: "wandox-console-chat__robot-timeline", children: ua.map((a, n) => {
1416
1446
  const c = {
1417
1447
  high: "#ff4d4f",
1418
1448
  medium: "#faad14",
1419
1449
  low: "#52c41a"
1420
- }, l = n === ls.length - 1;
1450
+ }, i = n === ua.length - 1;
1421
1451
  return /* @__PURE__ */ e.jsxs(
1422
1452
  "li",
1423
1453
  {
1424
1454
  className: "wandox-console-chat__robot-timeline-item",
1425
1455
  children: [
1426
1456
  /* @__PURE__ */ e.jsxs("div", { className: "wandox-console-chat__robot-timeline-axis", children: [
1427
- /* @__PURE__ */ e.jsx("span", { className: "wandox-console-chat__robot-timeline-time", children: Da(s.timestamp) }),
1457
+ /* @__PURE__ */ e.jsx("span", { className: "wandox-console-chat__robot-timeline-time", children: Vs(a.timestamp) }),
1428
1458
  /* @__PURE__ */ e.jsx(
1429
1459
  "span",
1430
1460
  {
1431
1461
  className: "wandox-console-chat__robot-timeline-dot",
1432
1462
  style: {
1433
- background: c[s.priority]
1463
+ background: c[a.priority]
1434
1464
  }
1435
1465
  }
1436
1466
  ),
1437
- !l && /* @__PURE__ */ e.jsx("span", { className: "wandox-console-chat__robot-timeline-line" })
1467
+ !i && /* @__PURE__ */ e.jsx("span", { className: "wandox-console-chat__robot-timeline-line" })
1438
1468
  ] }),
1439
1469
  /* @__PURE__ */ e.jsxs("div", { className: "wandox-console-chat__robot-timeline-card", children: [
1440
- /* @__PURE__ */ e.jsx("div", { className: "wandox-console-chat__robot-timeline-title", children: s.title }),
1441
- s.summary && /* @__PURE__ */ e.jsx("div", { className: "wandox-console-chat__robot-timeline-summary", children: s.summary }),
1442
- s.ui_payload && /* @__PURE__ */ e.jsx("div", { className: "wandox-console-chat__robot-timeline-content wandox-markdown-content", children: /* @__PURE__ */ e.jsx(yn, { payload: s.ui_payload }) })
1470
+ /* @__PURE__ */ e.jsx("div", { className: "wandox-console-chat__robot-timeline-title", children: a.title }),
1471
+ a.summary && /* @__PURE__ */ e.jsx("div", { className: "wandox-console-chat__robot-timeline-summary", children: a.summary }),
1472
+ a.ui_payload && /* @__PURE__ */ e.jsx("div", { className: "wandox-console-chat__robot-timeline-content wandox-markdown-content", children: /* @__PURE__ */ e.jsx(vn, { payload: a.ui_payload }) })
1443
1473
  ] })
1444
1474
  ]
1445
1475
  },
1446
- s.id || `result_${n}`
1476
+ a.id || `result_${n}`
1447
1477
  );
1448
- }) }) : z ? ss ? /* @__PURE__ */ e.jsxs("div", { className: "wandox-console-chat__robot-loading", children: [
1449
- /* @__PURE__ */ e.jsx(ps, { size: "small" }),
1478
+ }) }) : f ? oa ? /* @__PURE__ */ e.jsxs("div", { className: "wandox-console-chat__robot-loading", children: [
1479
+ /* @__PURE__ */ e.jsx(wa, { size: "small" }),
1450
1480
  /* @__PURE__ */ e.jsx("span", { children: "加载中..." })
1451
- ] }) : ee.length === 0 ? /* @__PURE__ */ e.jsx("div", { className: "wandox-console-chat__robot-empty", children: /* @__PURE__ */ e.jsx("div", { className: "wandox-console-chat__robot-empty-title", children: "暂无执行记录" }) }) : /* @__PURE__ */ e.jsx("ul", { className: "wandox-console-chat__robot-history", children: ee.map((s) => /* @__PURE__ */ e.jsxs(
1481
+ ] }) : be.length === 0 ? /* @__PURE__ */ e.jsx("div", { className: "wandox-console-chat__robot-empty", children: /* @__PURE__ */ e.jsx("div", { className: "wandox-console-chat__robot-empty-title", children: "暂无执行记录" }) }) : /* @__PURE__ */ e.jsx("ul", { className: "wandox-console-chat__robot-history", children: be.map((a) => /* @__PURE__ */ e.jsxs(
1452
1482
  "li",
1453
1483
  {
1454
- className: `wandox-console-chat__robot-history-item wandox-console-chat__robot-history-item--${s.status}`,
1484
+ className: `wandox-console-chat__robot-history-item wandox-console-chat__robot-history-item--${a.status}`,
1455
1485
  children: [
1456
1486
  /* @__PURE__ */ e.jsxs("div", { className: "wandox-console-chat__robot-history-info", children: [
1457
- /* @__PURE__ */ e.jsx("span", { className: "wandox-console-chat__robot-history-name", children: s.action_name }),
1458
- /* @__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(
1459
1489
  "zh-CN",
1460
1490
  {
1461
1491
  month: "2-digit",
@@ -1468,39 +1498,39 @@ function uo({
1468
1498
  /* @__PURE__ */ e.jsx(
1469
1499
  "span",
1470
1500
  {
1471
- className: `wandox-console-chat__robot-history-status wandox-console-chat__robot-history-status--${s.status}`,
1501
+ className: `wandox-console-chat__robot-history-status wandox-console-chat__robot-history-status--${a.status}`,
1472
1502
  children: {
1473
1503
  pending: "等待中",
1474
1504
  running: "执行中",
1475
1505
  success: "成功",
1476
1506
  failed: "失败"
1477
- }[s.status] || s.status
1507
+ }[a.status] || a.status
1478
1508
  }
1479
1509
  )
1480
1510
  ]
1481
1511
  },
1482
- s.id
1512
+ a.id
1483
1513
  )) }) : /* @__PURE__ */ e.jsxs("div", { className: "wandox-console-chat__robot-empty", children: [
1484
- /* @__PURE__ */ e.jsx("div", { className: "wandox-console-chat__robot-empty-icon", children: /* @__PURE__ */ e.jsx(Xs, {}) }),
1514
+ /* @__PURE__ */ e.jsx("div", { className: "wandox-console-chat__robot-empty-icon", children: /* @__PURE__ */ e.jsx(ns, {}) }),
1485
1515
  /* @__PURE__ */ e.jsx("div", { className: "wandox-console-chat__robot-empty-title", children: "请先选择机器人" }),
1486
1516
  /* @__PURE__ */ e.jsx("div", { className: "wandox-console-chat__robot-empty-desc", children: "在上方选择机器人以查看其执行记录" })
1487
1517
  ] }) })
1488
1518
  ] }),
1489
- se === "chat" && Ns.length > 0 && !(I && !O) && /* @__PURE__ */ e.jsx("div", { className: "wandox-console-chat__recent", children: /* @__PURE__ */ e.jsx("div", { className: "wandox-console-chat__recent-bar", children: Ns.map((s, n) => /* @__PURE__ */ e.jsx(
1519
+ J === "chat" && $a.length > 0 && !(I && !F) && /* @__PURE__ */ e.jsx("div", { className: "wandox-console-chat__recent", children: /* @__PURE__ */ e.jsx("div", { className: "wandox-console-chat__recent-bar", children: $a.map((a, n) => /* @__PURE__ */ e.jsx(
1490
1520
  "button",
1491
1521
  {
1492
1522
  type: "button",
1493
1523
  className: "wandox-console-chat__recent-chip",
1494
- disabled: L || !!as,
1495
- title: s.description || s.name,
1524
+ disabled: L || !!ca,
1525
+ title: a.description || a.name,
1496
1526
  onClick: () => {
1497
- za(s);
1527
+ Hs(a);
1498
1528
  },
1499
- children: s.name
1529
+ children: a.name
1500
1530
  },
1501
- `${s.playbook_id || s.name}-${n}`
1531
+ `${a.playbook_id || a.name}-${n}`
1502
1532
  )) }) }),
1503
- se === "chat" && /* @__PURE__ */ e.jsx("div", { className: "wandox-console-chat__input", children: I && !O ? /* @__PURE__ */ e.jsxs(
1533
+ J === "chat" && /* @__PURE__ */ e.jsx("div", { className: "wandox-console-chat__input", children: I && !F ? /* @__PURE__ */ e.jsxs(
1504
1534
  "div",
1505
1535
  {
1506
1536
  ref: xe,
@@ -1517,7 +1547,7 @@ function uo({
1517
1547
  type: "button",
1518
1548
  className: "wandox-console-changescene",
1519
1549
  onClick: () => {
1520
- B(null), ce([]), q({});
1550
+ B(null), K([]), X({});
1521
1551
  },
1522
1552
  children: "重新选择"
1523
1553
  }
@@ -1526,39 +1556,39 @@ function uo({
1526
1556
  /* @__PURE__ */ e.jsx(
1527
1557
  "div",
1528
1558
  {
1529
- ref: ge,
1559
+ ref: ke,
1530
1560
  tabIndex: -1,
1531
1561
  className: "wandox-console-taskarea wandox-console-taskarea--static",
1532
1562
  children: I.desc || I.title
1533
1563
  }
1534
1564
  ),
1535
- X.length > 0 && /* @__PURE__ */ e.jsxs("div", { className: "wandox-console-paramarea", children: [
1565
+ Z.length > 0 && /* @__PURE__ */ e.jsxs("div", { className: "wandox-console-paramarea", children: [
1536
1566
  /* @__PURE__ */ e.jsxs("div", { className: "wandox-console-paramhead", children: [
1537
- /* @__PURE__ */ e.jsx(pa, {}),
1567
+ /* @__PURE__ */ e.jsx(ws, {}),
1538
1568
  /* @__PURE__ */ e.jsx("strong", { children: "确认分析范围" }),
1539
1569
  /* @__PURE__ */ e.jsxs("span", { className: "wandox-console-paramhead__status", children: [
1540
- /* @__PURE__ */ e.jsx(_s, {}),
1570
+ /* @__PURE__ */ e.jsx(ya, {}),
1541
1571
  " ",
1542
- ke.length > 0 ? `待填 ${ke.length} 项必填参数` : "参数已就绪"
1572
+ _e.length > 0 ? `待填 ${_e.length} 项必填参数` : "参数已就绪"
1543
1573
  ] })
1544
1574
  ] }),
1545
- /* @__PURE__ */ e.jsx("div", { className: "wandox-console-params", children: es(
1546
- X,
1547
- T
1548
- ).map((s) => /* @__PURE__ */ e.jsx(
1549
- fa,
1575
+ /* @__PURE__ */ e.jsx("div", { className: "wandox-console-params", children: na(
1576
+ Z,
1577
+ G
1578
+ ).map((a) => /* @__PURE__ */ e.jsx(
1579
+ js,
1550
1580
  {
1551
- field: s,
1552
- value: T[s.name],
1581
+ field: a,
1582
+ value: G[a.name],
1553
1583
  uploading: !1,
1554
1584
  fileNameMap: {},
1555
- getOptionState: E.getFieldState,
1556
- onChange: (n, c) => q((l) => ({
1557
- ...l,
1585
+ getOptionState: ee.getFieldState,
1586
+ onChange: (n, c) => X((i) => ({
1587
+ ...i,
1558
1588
  [n]: c
1559
1589
  }))
1560
1590
  },
1561
- s.name
1591
+ a.name
1562
1592
  )) })
1563
1593
  ] }),
1564
1594
  /* @__PURE__ */ e.jsxs("div", { className: "wandox-console-prompt__foot", children: [
@@ -1568,11 +1598,11 @@ function uo({
1568
1598
  {
1569
1599
  type: "button",
1570
1600
  className: "wandox-console-start",
1571
- disabled: !I || L || ke.length > 0,
1572
- onClick: qa,
1601
+ disabled: !I || L || _e.length > 0,
1602
+ onClick: Us,
1573
1603
  children: [
1574
1604
  "开始执行",
1575
- /* @__PURE__ */ e.jsx(fs, {})
1605
+ /* @__PURE__ */ e.jsx(ja, {})
1576
1606
  ]
1577
1607
  }
1578
1608
  )
@@ -1580,107 +1610,107 @@ function uo({
1580
1610
  ]
1581
1611
  }
1582
1612
  ) : /* @__PURE__ */ e.jsx(
1583
- gn,
1613
+ kn,
1584
1614
  {
1585
- onSend: is,
1615
+ onSend: ma,
1586
1616
  executing: L,
1587
- stopping: Ea,
1588
- onStop: Pa,
1617
+ stopping: Ms,
1618
+ onStop: Ts,
1589
1619
  placeholder: " / 快速调用场景",
1590
- ssoToken: P,
1591
- ssoDomain: C,
1592
- ssoCompany: u,
1593
- leadingActions: Ka,
1620
+ ssoToken: M,
1621
+ ssoDomain: S,
1622
+ ssoCompany: h,
1623
+ leadingActions: Ys,
1594
1624
  uploadButtonAsLeading: !0,
1595
1625
  uploadButtonLabel: "添加文件",
1596
1626
  mentionTriggerChar: "/",
1597
- mentionListRequest: ka,
1598
- onMentionListRequestHandled: Ua,
1627
+ mentionListRequest: Cs,
1628
+ onMentionListRequestHandled: Qs,
1599
1629
  autoFocusInput: !I,
1600
- playbooks: va,
1601
- onRequestPlaybookParams: be
1630
+ playbooks: Ss,
1631
+ onRequestPlaybookParams: ye
1602
1632
  }
1603
1633
  ) }),
1604
1634
  /* @__PURE__ */ e.jsx(
1605
- lo,
1635
+ bo,
1606
1636
  {
1607
- open: O,
1637
+ open: F,
1608
1638
  source: V,
1609
- categories: cs,
1610
- categoryKey: J,
1639
+ categories: da,
1640
+ categoryKey: Y,
1611
1641
  search: te,
1612
- cards: Ra,
1642
+ cards: Es,
1613
1643
  executing: L,
1614
- loadingPlaybookId: U,
1615
- onClose: Va,
1616
- onSourceChange: Fa,
1644
+ loadingPlaybookId: W,
1645
+ onClose: qs,
1646
+ onSourceChange: Bs,
1617
1647
  onCategoryChange: re,
1618
- onSearchChange: K,
1619
- onSelectScene: Ba
1648
+ onSearchChange: H,
1649
+ onSelectScene: Ws
1620
1650
  }
1621
1651
  ),
1622
1652
  /* @__PURE__ */ e.jsx(
1623
- jn,
1653
+ Nn,
1624
1654
  {
1625
- open: He.visible,
1626
- agentId: He.agentId,
1627
- playbookId: He.playbookId,
1628
- playbookName: He.playbookName,
1629
- onClose: Ga
1655
+ open: Ge.visible,
1656
+ agentId: Ge.agentId,
1657
+ playbookId: Ge.playbookId,
1658
+ playbookName: Ge.playbookName,
1659
+ onClose: Zs
1630
1660
  }
1631
1661
  ),
1632
- P && C && u && /* @__PURE__ */ e.jsx(
1633
- kn,
1662
+ M && S && h && /* @__PURE__ */ e.jsx(
1663
+ Cn,
1634
1664
  {
1635
1665
  open: de,
1636
- title: Z,
1666
+ title: $e,
1637
1667
  actions: pe,
1638
- ssoToken: P,
1639
- ssoDomain: C,
1640
- ssoCompany: u,
1641
- onClose: () => we(!1)
1668
+ ssoToken: M,
1669
+ ssoDomain: S,
1670
+ ssoCompany: h,
1671
+ onClose: () => je(!1)
1642
1672
  }
1643
1673
  ),
1644
1674
  /* @__PURE__ */ e.jsx(
1645
- vn,
1675
+ Sn,
1646
1676
  {
1647
1677
  title: "配置通知渠道",
1648
- open: $e,
1678
+ open: j,
1649
1679
  onCancel: () => {
1650
- Ce(!1), Pe(null), Ee(void 0);
1680
+ y(!1), ve(null), A(void 0);
1651
1681
  },
1652
1682
  width: 520,
1653
1683
  centered: !0,
1654
1684
  footer: [
1655
- W[(M == null ? void 0 : M.agent_id) || ""] ? /* @__PURE__ */ e.jsx(
1656
- Xe,
1685
+ w[(O == null ? void 0 : O.agent_id) || ""] ? /* @__PURE__ */ e.jsx(
1686
+ sa,
1657
1687
  {
1658
1688
  danger: !0,
1659
- loading: Be,
1689
+ loading: fe,
1660
1690
  style: { marginRight: "auto" },
1661
- onClick: La,
1691
+ onClick: Fs,
1662
1692
  children: "解除绑定"
1663
1693
  },
1664
1694
  "unbind"
1665
1695
  ) : null,
1666
1696
  /* @__PURE__ */ e.jsx(
1667
- Xe,
1697
+ sa,
1668
1698
  {
1669
- disabled: Be,
1699
+ disabled: fe,
1670
1700
  onClick: () => {
1671
- Ce(!1), Pe(null), Ee(void 0);
1701
+ y(!1), ve(null), A(void 0);
1672
1702
  },
1673
1703
  children: "取消"
1674
1704
  },
1675
1705
  "cancel"
1676
1706
  ),
1677
1707
  /* @__PURE__ */ e.jsx(
1678
- Xe,
1708
+ sa,
1679
1709
  {
1680
1710
  type: "primary",
1681
- loading: Be,
1682
- disabled: !Ve,
1683
- onClick: Ma,
1711
+ loading: fe,
1712
+ disabled: !z,
1713
+ onClick: Ds,
1684
1714
  children: "保存"
1685
1715
  },
1686
1716
  "ok"
@@ -1709,7 +1739,7 @@ function uo({
1709
1739
  color: "#1a1a1a",
1710
1740
  fontWeight: 500
1711
1741
  },
1712
- children: M == null ? void 0 : M.name
1742
+ children: O == null ? void 0 : O.name
1713
1743
  }
1714
1744
  )
1715
1745
  ]
@@ -1728,33 +1758,33 @@ function uo({
1728
1758
  }
1729
1759
  ),
1730
1760
  /* @__PURE__ */ e.jsx(
1731
- Nn,
1761
+ Rn,
1732
1762
  {
1733
1763
  style: { width: "100%" },
1734
1764
  placeholder: "请选择通知渠道",
1735
- value: Ve,
1736
- onChange: Ee,
1737
- disabled: Be,
1738
- options: me.map((s) => ({
1739
- label: `${s.name}(${s.platform === "dingtalk" ? "钉钉" : s.platform === "feishu" ? "飞书" : "企业微信"})`,
1740
- 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
1741
1771
  })),
1742
- popupRender: (s) => /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
1743
- s,
1744
- /* @__PURE__ */ e.jsx(Qn, { style: { margin: "8px 0" } }),
1745
- /* @__PURE__ */ e.jsx(Cn, { style: { padding: "0 8px 4px" }, children: /* @__PURE__ */ e.jsx(
1746
- 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,
1747
1777
  {
1748
1778
  type: "text",
1749
1779
  icon: /* @__PURE__ */ e.jsx("span", { children: "+" }),
1750
- onClick: () => vs(!0),
1780
+ onClick: () => He(!0),
1751
1781
  children: "添加新的通知渠道"
1752
1782
  }
1753
1783
  ) })
1754
1784
  ] })
1755
1785
  }
1756
1786
  ),
1757
- me.length === 0 && /* @__PURE__ */ e.jsx(
1787
+ se.length === 0 && /* @__PURE__ */ e.jsx(
1758
1788
  "div",
1759
1789
  {
1760
1790
  style: {
@@ -1773,180 +1803,193 @@ function uo({
1773
1803
  }
1774
1804
  ),
1775
1805
  /* @__PURE__ */ e.jsx(
1776
- Bn,
1806
+ Wn,
1777
1807
  {
1778
- open: wa,
1779
- onClose: () => vs(!1),
1780
- onSuccess: (s) => {
1781
- Ne((n) => [...n, s]), Ee(s.webhook_id);
1808
+ open: me,
1809
+ onClose: () => He(!1),
1810
+ onSuccess: (a) => {
1811
+ t((n) => [...n, a]), A(a.webhook_id);
1782
1812
  }
1783
1813
  }
1784
1814
  )
1785
1815
  ] })
1786
1816
  );
1787
1817
  }
1788
- const { TextArea: mo } = ks;
1789
- function ho({
1818
+ const { TextArea: go } = Ra, Ve = 5;
1819
+ function jo({
1790
1820
  useMapCards: o,
1791
- useMapCategories: i,
1792
- playbooks: h = [],
1793
- selectedCategoryKey: m,
1821
+ useMapCategories: l,
1822
+ playbooks: u = [],
1823
+ selectedCategoryKey: r,
1794
1824
  onCategorySelect: p,
1795
- loading: j,
1796
- useMapError: A,
1825
+ loading: k,
1826
+ useMapError: P,
1797
1827
  onRetry: _,
1798
- onStartAnalysis: S,
1799
- agents: D,
1800
- selectedAgentId: ne,
1801
- onAgentSelect: Y,
1828
+ onStartAnalysis: R,
1829
+ agents: T,
1830
+ selectedAgentId: ae,
1831
+ onAgentSelect: Q,
1802
1832
  onOpenAgentChat: le
1803
1833
  }) {
1804
- const [R, H] = a.useState(""), [P, C] = a.useState(""), [u, F] = a.useState(null), ie = a.useRef(null), [O, $] = a.useState([]), [U, oe] = a.useState(!1), [te, K] = a.useState(""), V = a.useRef(0), [G, J] = a.useState({}), [re, I] = a.useState({}), [B, ge] = a.useState({}), [xe, de] = a.useState([]), [we, pe] = a.useState(!1), Re = a.useRef(null), Z = a.useMemo(
1805
- () => o.length > 0 ? o : zn(h),
1806
- [o, h]
1807
- ), je = a.useMemo(() => m ? Z.filter((t) => t.categoryKey === m) : Z, [Z, m]), X = a.useMemo(() => {
1808
- const t = P.trim().toLowerCase();
1809
- return t ? je.filter(
1810
- (f) => f.title.toLowerCase().includes(t) || f.desc.toLowerCase().includes(t)
1811
- ) : je;
1812
- }, [je, P]), ce = j || A && Z.length === 0 || X.length > 0, [T, q] = a.useState("");
1813
- a.useEffect(() => {
1814
- V.current += 1, q(""), H(""), $([]), J({}), oe(!1), K("");
1815
- }, [m]), a.useEffect(() => {
1816
- T && !Z.some((t) => t.playbook_id === T) && (V.current += 1, q(""), H(""), $([]), J({}), oe(!1), K(""));
1817
- }, [T, Z]);
1818
- const E = a.useMemo(
1819
- () => Z.find((t) => t.playbook_id === T) ?? null,
1820
- [Z, T]
1821
- ), ke = a.useMemo(
1822
- () => u ? _a(u) : null,
1823
- [u]
1824
- ), se = a.useCallback((t, f) => {
1825
- t.stopPropagation(), F(f);
1834
+ const [$, q] = s.useState(""), [M, S] = s.useState(""), [h, D] = s.useState(null), ie = s.useRef(null), [F, E] = s.useState([]), [W, oe] = s.useState(!1), [te, H] = s.useState(""), V = s.useRef(0), [U, Y] = s.useState({}), [re, I] = s.useState({}), [B, ke] = s.useState({}), [xe, de] = s.useState([]), [je, pe] = s.useState(!1), Re = s.useRef(null), [$e, Ne] = s.useState(0), Z = Math.max(
1835
+ 1,
1836
+ Math.ceil(l.length / Ve)
1837
+ ), K = Math.min($e, Z - 1), G = l.length > Ve, X = s.useMemo(
1838
+ () => l.slice(
1839
+ K * Ve,
1840
+ K * Ve + Ve
1841
+ ),
1842
+ [l, K]
1843
+ );
1844
+ s.useEffect(() => {
1845
+ Ne(0);
1846
+ }, [ae]);
1847
+ const ee = s.useMemo(
1848
+ () => o.length > 0 ? o : Hn(u),
1849
+ [o, u]
1850
+ ), _e = s.useMemo(() => r ? ee.filter((t) => t.categoryKey === r) : ee, [ee, r]), J = s.useMemo(() => {
1851
+ const t = M.trim().toLowerCase();
1852
+ return t ? _e.filter(
1853
+ (w) => w.title.toLowerCase().includes(t) || w.desc.toLowerCase().includes(t)
1854
+ ) : _e;
1855
+ }, [_e, M]), x = k || P && ee.length === 0 || J.length > 0, [b, ce] = s.useState("");
1856
+ s.useEffect(() => {
1857
+ V.current += 1, ce(""), q(""), E([]), Y({}), oe(!1), H("");
1858
+ }, [r]), s.useEffect(() => {
1859
+ b && !ee.some((t) => t.playbook_id === b) && (V.current += 1, ce(""), q(""), E([]), Y({}), oe(!1), H(""));
1860
+ }, [b, ee]);
1861
+ const f = s.useMemo(
1862
+ () => ee.find((t) => t.playbook_id === b) ?? null,
1863
+ [ee, b]
1864
+ ), Ce = s.useMemo(
1865
+ () => h ? ys(h) : null,
1866
+ [h]
1867
+ ), ue = s.useCallback((t, w) => {
1868
+ t.stopPropagation(), D(w);
1826
1869
  }, []);
1827
- a.useEffect(() => {
1828
- if (j || E) return;
1870
+ s.useEffect(() => {
1871
+ if (k || f) return;
1829
1872
  const t = window.setTimeout(() => {
1830
- var y, b;
1831
- const f = (b = (y = ie.current) == null ? void 0 : y.resizableTextArea) == null ? void 0 : b.textArea;
1832
- f == null || f.focus();
1873
+ var N, j;
1874
+ const w = (j = (N = ie.current) == null ? void 0 : N.resizableTextArea) == null ? void 0 : j.textArea;
1875
+ w == null || w.focus();
1833
1876
  }, 0);
1834
1877
  return () => window.clearTimeout(t);
1835
- }, [j, E]);
1836
- const x = a.useCallback(async (t) => {
1837
- const f = String(t.playbook_id || "").trim();
1838
- if (!f) {
1839
- 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");
1840
1883
  return;
1841
1884
  }
1842
- const y = ++V.current;
1843
- q(f), $([]), J({}), I({}), ge({}), oe(!0), K("");
1885
+ const N = ++V.current;
1886
+ ce(w), E([]), Y({}), I({}), ke({}), oe(!0), H("");
1844
1887
  try {
1845
- const { data: b } = await hs({
1846
- playbook_id: f
1888
+ const { data: j } = await ba({
1889
+ playbook_id: w
1847
1890
  });
1848
- if (y !== V.current) return;
1849
- if (!b || typeof b != "object" || Array.isArray(b))
1891
+ if (N !== V.current) return;
1892
+ if (!j || typeof j != "object" || Array.isArray(j))
1850
1893
  throw new Error("场景详情为空");
1851
- const v = ra(
1852
- $n(b)
1894
+ const y = hs(
1895
+ Pn(j)
1853
1896
  );
1854
- $(v), J(ua(v));
1855
- } catch (b) {
1856
- if (y !== V.current) return;
1857
- const v = b instanceof Error ? b.message : "场景参数加载失败";
1858
- K(v), N.error("场景参数加载失败,请稍后重试");
1897
+ E(y), Y(ps(y));
1898
+ } catch (j) {
1899
+ if (N !== V.current) return;
1900
+ const y = j instanceof Error ? j.message : "场景参数加载失败";
1901
+ H(y), C.error("场景参数加载失败,请稍后重试");
1859
1902
  } finally {
1860
- y === V.current && oe(!1);
1903
+ N === V.current && oe(!1);
1861
1904
  }
1862
- }, []), k = () => {
1863
- V.current += 1, q(""), H(""), $([]), J({}), oe(!1), K("");
1864
- }, ye = ia(O, G, J), z = a.useMemo(
1865
- () => es(O, G),
1866
- [O, G]
1867
- ), ve = a.useCallback((t, f) => {
1868
- J((y) => ({ ...y, [t]: f }));
1869
- }, []), ue = a.useCallback(
1870
- (t, f) => async ({ file: y, onSuccess: b, onError: v }) => {
1871
- var me, Ne;
1872
- I((W) => ({ ...W, [t]: !0 }));
1905
+ }, []), oa = () => {
1906
+ V.current += 1, ce(""), q(""), E([]), Y({}), oe(!1), H("");
1907
+ }, qe = ms(F, U, Y), be = s.useMemo(
1908
+ () => na(F, U),
1909
+ [F, U]
1910
+ ), Pe = s.useCallback((t, w) => {
1911
+ Y((N) => ({ ...N, [t]: w }));
1912
+ }, []), ta = s.useCallback(
1913
+ (t, w) => async ({ file: N, onSuccess: j, onError: y }) => {
1914
+ var O, ve;
1915
+ I((z) => ({ ...z, [t]: !0 }));
1873
1916
  try {
1874
- const W = y, Q = await Js(W), $e = (me = Q == null ? void 0 : Q.data) == null ? void 0 : me.url, Ce = ((Ne = Q == null ? void 0 : Q.data) == null ? void 0 : Ne.name) || W.name;
1875
- if (!$e) throw new Error("上传结果缺少文件地址");
1876
- ge((M) => ({ ...M, [$e]: Ce })), J((M) => {
1877
- if (f <= 1) return { ...M, [t]: $e };
1878
- const Pe = Array.isArray(M[t]) ? M[t] : M[t] ? [M[t]] : [];
1879
- return { ...M, [t]: [...Pe, $e] };
1880
- }), b == null || b(Q), N.success("上传成功");
1881
- } catch (W) {
1882
- const Q = W instanceof Error ? W : new Error("上传失败");
1883
- v == null || v(Q), N.error(Q.message);
1917
+ const z = N, A = await as(z), fe = (O = A == null ? void 0 : A.data) == null ? void 0 : O.url, Ae = ((ve = A == null ? void 0 : A.data) == null ? void 0 : ve.name) || z.name;
1918
+ if (!fe) throw new Error("上传结果缺少文件地址");
1919
+ ke((me) => ({ ...me, [fe]: Ae })), Y((me) => {
1920
+ if (w <= 1) return { ...me, [t]: fe };
1921
+ const He = Array.isArray(me[t]) ? me[t] : me[t] ? [me[t]] : [];
1922
+ return { ...me, [t]: [...He, fe] };
1923
+ }), j == null || j(A), C.success("上传成功");
1924
+ } catch (z) {
1925
+ const A = z instanceof Error ? z : new Error("上传失败");
1926
+ y == null || y(A), C.error(A.message);
1884
1927
  } finally {
1885
- I((W) => ({ ...W, [t]: !1 }));
1928
+ I((z) => ({ ...z, [t]: !1 }));
1886
1929
  }
1887
1930
  },
1888
1931
  []
1889
- ), Ae = a.useCallback(
1932
+ ), We = s.useCallback(
1890
1933
  async (t) => {
1891
- const f = Array.from(t.target.files ?? []);
1892
- if (t.target.value = "", f.length !== 0) {
1934
+ const w = Array.from(t.target.files ?? []);
1935
+ if (t.target.value = "", w.length !== 0) {
1893
1936
  pe(!0);
1894
1937
  try {
1895
- const y = await Promise.all(
1896
- f.map(async (b) => {
1897
- var W, Q;
1898
- const v = await Js(b), me = (W = v == null ? void 0 : v.data) == null ? void 0 : W.url, Ne = ((Q = v == null ? void 0 : v.data) == null ? void 0 : Q.name) || b.name;
1899
- if (!me) throw new Error("上传结果缺少文件地址");
1938
+ const N = await Promise.all(
1939
+ w.map(async (j) => {
1940
+ var z, A;
1941
+ const y = await as(j), O = (z = y == null ? void 0 : y.data) == null ? void 0 : z.url, ve = ((A = y == null ? void 0 : y.data) == null ? void 0 : A.name) || j.name;
1942
+ if (!O) throw new Error("上传结果缺少文件地址");
1900
1943
  return {
1901
- type: b.type.startsWith("image/") ? "image" : "file",
1902
- url: me,
1903
- name: Ne,
1904
- mime_type: b.type
1944
+ type: j.type.startsWith("image/") ? "image" : "file",
1945
+ url: O,
1946
+ name: ve,
1947
+ mime_type: j.type
1905
1948
  };
1906
1949
  })
1907
1950
  );
1908
- de((b) => [...b, ...y]), N.success(`已添加 ${y.length} 个附件`);
1909
- } catch (y) {
1910
- 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 : "上传失败");
1911
1954
  } finally {
1912
1955
  pe(!1);
1913
1956
  }
1914
1957
  }
1915
1958
  },
1916
1959
  []
1917
- ), ss = a.useCallback((t) => {
1918
- de((f) => f.filter((y) => y.url !== t));
1919
- }, []), Ie = a.useMemo(
1920
- () => z.filter(
1921
- (t) => t.required && bs(G[t.name])
1960
+ ), Me = s.useCallback((t) => {
1961
+ de((w) => w.filter((N) => N.url !== t));
1962
+ }, []), Ee = s.useMemo(
1963
+ () => be.filter(
1964
+ (t) => t.required && ga(U[t.name])
1922
1965
  ),
1923
- [z, G]
1924
- ), ee = a.useMemo(
1925
- () => D.find((t) => t.id === ne) ?? D.find((t) => t.current) ?? D[0],
1926
- [D, ne]
1966
+ [be, U]
1967
+ ), se = s.useMemo(
1968
+ () => T.find((t) => t.id === ae) ?? T.find((t) => t.current) ?? T[0],
1969
+ [T, ae]
1927
1970
  );
1928
1971
  return /* @__PURE__ */ e.jsxs("div", { className: "wandox-console-view", children: [
1929
1972
  /* @__PURE__ */ e.jsxs("div", { className: "wandox-console-homecenter", children: [
1930
1973
  /* @__PURE__ */ e.jsxs("div", { className: "wandox-console-homecenter-hero", children: [
1931
- ee && /* @__PURE__ */ e.jsxs("div", { className: "wandox-console-home-header", children: [
1974
+ se && /* @__PURE__ */ e.jsxs("div", { className: "wandox-console-home-header", children: [
1932
1975
  /* @__PURE__ */ e.jsxs("div", { className: "wandox-console-home-header__agent", children: [
1933
- /* @__PURE__ */ e.jsx("span", { className: "wandox-console-home-header__avatar", children: ee.icon }),
1976
+ /* @__PURE__ */ e.jsx("span", { className: "wandox-console-home-header__avatar", children: se.icon }),
1934
1977
  /* @__PURE__ */ e.jsxs("div", { className: "wandox-console-home-header__identity", children: [
1935
1978
  /* @__PURE__ */ e.jsxs("div", { className: "wandox-console-home-header__selector-row", children: [
1936
1979
  /* @__PURE__ */ e.jsx(
1937
- xs,
1980
+ fa,
1938
1981
  {
1939
1982
  menu: {
1940
- items: D.map((t) => ({
1983
+ items: T.map((t) => ({
1941
1984
  key: t.id,
1942
- disabled: t.id === ee.id,
1985
+ disabled: t.id === se.id,
1943
1986
  label: /* @__PURE__ */ e.jsxs("span", { className: "wandox-console-agent-menu-item", children: [
1944
1987
  /* @__PURE__ */ e.jsx("span", { className: "wandox-console-agent-menu-item__icon", children: t.icon }),
1945
1988
  /* @__PURE__ */ e.jsx("span", { className: "wandox-console-agent-menu-item__name", children: t.name }),
1946
- t.id === ee.id && /* @__PURE__ */ e.jsx(_s, { className: "wandox-console-agent-menu-item__check" })
1989
+ t.id === se.id && /* @__PURE__ */ e.jsx(ya, { className: "wandox-console-agent-menu-item__check" })
1947
1990
  ] })
1948
1991
  })),
1949
- onClick: ({ key: t }) => Y == null ? void 0 : Y(t)
1992
+ onClick: ({ key: t }) => Q == null ? void 0 : Q(t)
1950
1993
  },
1951
1994
  trigger: ["click"],
1952
1995
  placement: "bottomLeft",
@@ -1957,21 +2000,21 @@ function ho({
1957
2000
  className: "wandox-console-home-header__selector",
1958
2001
  "aria-label": "切换智能体",
1959
2002
  children: [
1960
- /* @__PURE__ */ e.jsx("span", { className: "wandox-console-home-header__name", children: ee.name }),
1961
- /* @__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" })
1962
2005
  ]
1963
2006
  }
1964
2007
  )
1965
2008
  }
1966
2009
  ),
1967
- /* @__PURE__ */ e.jsx(ha, { benefit: ee.packageBenefit })
2010
+ /* @__PURE__ */ e.jsx(bs, { benefit: se.packageBenefit })
1968
2011
  ] }),
1969
- ee.desc && /* @__PURE__ */ e.jsx(
2012
+ se.desc && /* @__PURE__ */ e.jsx(
1970
2013
  "p",
1971
2014
  {
1972
2015
  className: "wandox-console-home-header__description",
1973
- title: ee.desc,
1974
- children: ee.desc
2016
+ title: se.desc,
2017
+ children: se.desc
1975
2018
  }
1976
2019
  )
1977
2020
  ] })
@@ -1984,77 +2027,77 @@ function ho({
1984
2027
  onClick: () => le == null ? void 0 : le(),
1985
2028
  children: [
1986
2029
  /* @__PURE__ */ e.jsx("span", { children: "会话记录" }),
1987
- /* @__PURE__ */ e.jsx(En, { className: "wandox-console-home-header__history-arrow" })
2030
+ /* @__PURE__ */ e.jsx(Mn, { className: "wandox-console-home-header__history-arrow" })
1988
2031
  ]
1989
2032
  }
1990
2033
  )
1991
2034
  ] }),
1992
2035
  /* @__PURE__ */ e.jsxs("div", { className: "wandox-console-prompt", children: [
1993
- E && /* @__PURE__ */ e.jsxs("div", { className: "wandox-console-prompt__head", children: [
2036
+ f && /* @__PURE__ */ e.jsxs("div", { className: "wandox-console-prompt__head", children: [
1994
2037
  /* @__PURE__ */ e.jsxs("div", { className: "wandox-console-scenechoice", children: [
1995
2038
  /* @__PURE__ */ e.jsx("span", { children: "已选择场景" }),
1996
- /* @__PURE__ */ e.jsx("strong", { children: E.title })
2039
+ /* @__PURE__ */ e.jsx("strong", { children: f.title })
1997
2040
  ] }),
1998
2041
  /* @__PURE__ */ e.jsx(
1999
2042
  "button",
2000
2043
  {
2001
2044
  type: "button",
2002
2045
  className: "wandox-console-changescene",
2003
- onClick: k,
2046
+ onClick: oa,
2004
2047
  children: "重新选择"
2005
2048
  }
2006
2049
  )
2007
2050
  ] }),
2008
- E ? /* @__PURE__ */ e.jsx("div", { className: "wandox-console-taskarea wandox-console-taskarea--static", children: E.desc || E.title }) : /* @__PURE__ */ e.jsx("div", { className: "wandox-console-taskarea", children: /* @__PURE__ */ e.jsx(
2009
- 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,
2010
2053
  {
2011
2054
  ref: ie,
2012
- value: R,
2013
- onChange: (t) => H(t.target.value),
2055
+ value: $,
2056
+ onChange: (t) => q(t.target.value),
2014
2057
  autoSize: { minRows: 2 },
2015
2058
  variant: "borderless",
2016
2059
  placeholder: "直接描述你的问题,或选择一个场景开始"
2017
2060
  }
2018
2061
  ) }),
2019
- E && U && /* @__PURE__ */ e.jsxs("div", { className: "wandox-console-paramarea wandox-console-paramarea--state", children: [
2020
- /* @__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, {}),
2021
2064
  /* @__PURE__ */ e.jsx("span", { children: "正在读取场景参数..." })
2022
2065
  ] }),
2023
- E && !U && te && /* @__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: [
2024
2067
  /* @__PURE__ */ e.jsx("span", { children: "场景参数加载失败" }),
2025
2068
  /* @__PURE__ */ e.jsxs(
2026
2069
  "button",
2027
2070
  {
2028
2071
  type: "button",
2029
2072
  className: "wandox-console-paramarea__retry",
2030
- onClick: () => void x(E),
2073
+ onClick: () => void Ie(f),
2031
2074
  children: [
2032
- /* @__PURE__ */ e.jsx(Zs, {}),
2075
+ /* @__PURE__ */ e.jsx(ss, {}),
2033
2076
  "重试"
2034
2077
  ]
2035
2078
  }
2036
2079
  )
2037
2080
  ] }),
2038
- E && !U && !te && z.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: [
2039
2082
  /* @__PURE__ */ e.jsxs("div", { className: "wandox-console-paramhead", children: [
2040
- /* @__PURE__ */ e.jsx(pa, {}),
2083
+ /* @__PURE__ */ e.jsx(ws, {}),
2041
2084
  /* @__PURE__ */ e.jsx("strong", { children: "确认分析范围" }),
2042
2085
  /* @__PURE__ */ e.jsxs("span", { className: "wandox-console-paramhead__status", children: [
2043
- /* @__PURE__ */ e.jsx(_s, {}),
2086
+ /* @__PURE__ */ e.jsx(ya, {}),
2044
2087
  " ",
2045
- Ie.length > 0 ? `待填 ${Ie.length} 项必填参数` : "参数已就绪"
2088
+ Ee.length > 0 ? `待填 ${Ee.length} 项必填参数` : "参数已就绪"
2046
2089
  ] })
2047
2090
  ] }),
2048
- /* @__PURE__ */ e.jsx("div", { className: "wandox-console-params", children: z.map((t) => /* @__PURE__ */ e.jsx(
2049
- fa,
2091
+ /* @__PURE__ */ e.jsx("div", { className: "wandox-console-params", children: be.map((t) => /* @__PURE__ */ e.jsx(
2092
+ js,
2050
2093
  {
2051
2094
  field: t,
2052
- value: G[t.name],
2095
+ value: U[t.name],
2053
2096
  uploading: !!re[t.name],
2054
2097
  fileNameMap: B,
2055
- getOptionState: ye.getFieldState,
2056
- onChange: ve,
2057
- onUpload: ue
2098
+ getOptionState: qe.getFieldState,
2099
+ onChange: Pe,
2100
+ onUpload: ta
2058
2101
  },
2059
2102
  t.name
2060
2103
  )) })
@@ -2062,9 +2105,9 @@ function ho({
2062
2105
  /* @__PURE__ */ e.jsxs(
2063
2106
  "div",
2064
2107
  {
2065
- className: `wandox-console-prompt__foot${E ? " wandox-console-prompt__foot--scene" : ""}`,
2108
+ className: `wandox-console-prompt__foot${f ? " wandox-console-prompt__foot--scene" : ""}`,
2066
2109
  children: [
2067
- !E && /* @__PURE__ */ e.jsx(
2110
+ !f && /* @__PURE__ */ e.jsx(
2068
2111
  "button",
2069
2112
  {
2070
2113
  type: "button",
@@ -2073,9 +2116,9 @@ function ho({
2073
2116
  var t;
2074
2117
  return (t = Re.current) == null ? void 0 : t.click();
2075
2118
  },
2076
- disabled: we,
2077
- title: we ? "上传中…" : "附件",
2078
- children: /* @__PURE__ */ e.jsx(Pn, {})
2119
+ disabled: je,
2120
+ title: je ? "上传中…" : "附件",
2121
+ children: /* @__PURE__ */ e.jsx(Tn, {})
2079
2122
  }
2080
2123
  ),
2081
2124
  /* @__PURE__ */ e.jsx(
@@ -2086,26 +2129,26 @@ function ho({
2086
2129
  multiple: !0,
2087
2130
  accept: "image/*,.pdf,.doc,.docx,.xls,.xlsx,.ppt,.pptx,.txt,.csv,.zip",
2088
2131
  hidden: !0,
2089
- onChange: Ae
2132
+ onChange: We
2090
2133
  }
2091
2134
  ),
2092
- E ? /* @__PURE__ */ e.jsxs(
2135
+ f ? /* @__PURE__ */ e.jsxs(
2093
2136
  "button",
2094
2137
  {
2095
2138
  type: "button",
2096
2139
  className: "wandox-console-start",
2097
- disabled: U || !!te || Ie.length > 0,
2140
+ disabled: W || !!te || Ee.length > 0,
2098
2141
  onClick: () => {
2099
- S == null || S({
2100
- playbookId: E.playbook_id,
2101
- playbookParams: G,
2102
- message: E.title,
2142
+ R == null || R({
2143
+ playbookId: f.playbook_id,
2144
+ playbookParams: U,
2145
+ message: f.title,
2103
2146
  attachments: xe
2104
2147
  });
2105
2148
  },
2106
2149
  children: [
2107
2150
  "开始执行",
2108
- /* @__PURE__ */ e.jsx(fs, {})
2151
+ /* @__PURE__ */ e.jsx(ja, {})
2109
2152
  ]
2110
2153
  }
2111
2154
  ) : /* @__PURE__ */ e.jsx("div", { className: "wandox-console-prompt__foot-right", children: /* @__PURE__ */ e.jsx(
@@ -2113,16 +2156,16 @@ function ho({
2113
2156
  {
2114
2157
  type: "button",
2115
2158
  className: "wandox-console-prompt__send",
2116
- disabled: !R.trim(),
2159
+ disabled: !$.trim(),
2117
2160
  onClick: () => {
2118
- S == null || S({
2161
+ R == null || R({
2119
2162
  playbookParams: {},
2120
- message: R.trim(),
2163
+ message: $.trim(),
2121
2164
  attachments: xe
2122
2165
  });
2123
2166
  },
2124
2167
  "aria-label": "发送",
2125
- children: /* @__PURE__ */ e.jsx(Tn, {})
2168
+ children: /* @__PURE__ */ e.jsx(On, {})
2126
2169
  }
2127
2170
  ) })
2128
2171
  ]
@@ -2137,7 +2180,7 @@ function ho({
2137
2180
  alt: t.name,
2138
2181
  className: "wandox-console-attach-item__thumb"
2139
2182
  }
2140
- ) : /* @__PURE__ */ e.jsx(Mn, { className: "wandox-console-attach-item__icon" }),
2183
+ ) : /* @__PURE__ */ e.jsx(Dn, { className: "wandox-console-attach-item__icon" }),
2141
2184
  /* @__PURE__ */ e.jsx(
2142
2185
  "span",
2143
2186
  {
@@ -2152,25 +2195,36 @@ function ho({
2152
2195
  type: "button",
2153
2196
  className: "wandox-console-attach-item__remove",
2154
2197
  "aria-label": "移除附件",
2155
- onClick: () => ss(t.url),
2156
- children: /* @__PURE__ */ e.jsx(ta, {})
2198
+ onClick: () => Me(t.url),
2199
+ children: /* @__PURE__ */ e.jsx(rs, {})
2157
2200
  }
2158
2201
  )
2159
2202
  ] }, t.url)) }),
2160
2203
  /* @__PURE__ */ e.jsxs("div", { className: "wandox-console-scenehead", children: [
2204
+ G && /* @__PURE__ */ e.jsx(
2205
+ "button",
2206
+ {
2207
+ type: "button",
2208
+ className: "wandox-console-chipnav",
2209
+ "aria-label": "上一页分类",
2210
+ disabled: K === 0,
2211
+ onClick: () => Ne((t) => Math.max(0, t - 1)),
2212
+ children: /* @__PURE__ */ e.jsx(oo, {})
2213
+ }
2214
+ ),
2161
2215
  /* @__PURE__ */ e.jsx(
2162
2216
  "div",
2163
2217
  {
2164
2218
  className: "wandox-console-chips",
2165
2219
  role: "tablist",
2166
2220
  "aria-label": "场景分类",
2167
- children: i.slice(0, 5).map((t) => /* @__PURE__ */ e.jsx(
2221
+ children: X.map((t) => /* @__PURE__ */ e.jsx(
2168
2222
  "button",
2169
2223
  {
2170
2224
  type: "button",
2171
2225
  role: "tab",
2172
- "aria-selected": m === t.key,
2173
- 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" : ""}`,
2174
2228
  onClick: () => p == null ? void 0 : p(t.key),
2175
2229
  children: /* @__PURE__ */ e.jsx("span", { children: t.name })
2176
2230
  },
@@ -2178,68 +2232,79 @@ function ho({
2178
2232
  ))
2179
2233
  }
2180
2234
  ),
2235
+ G && /* @__PURE__ */ e.jsx(
2236
+ "button",
2237
+ {
2238
+ type: "button",
2239
+ className: "wandox-console-chipnav",
2240
+ "aria-label": "下一页分类",
2241
+ disabled: K === Z - 1,
2242
+ onClick: () => Ne((t) => Math.min(Z - 1, t + 1)),
2243
+ children: /* @__PURE__ */ e.jsx(lo, {})
2244
+ }
2245
+ ),
2181
2246
  /* @__PURE__ */ e.jsx("div", { className: "wandox-console-scenesearch", children: /* @__PURE__ */ e.jsx(
2182
- ks,
2247
+ Ra,
2183
2248
  {
2184
2249
  allowClear: !0,
2185
- prefix: /* @__PURE__ */ e.jsx(ms, {}),
2250
+ prefix: /* @__PURE__ */ e.jsx(_a, {}),
2186
2251
  placeholder: "搜索当前地图下的场景",
2187
- value: P,
2188
- onChange: (t) => C(t.target.value)
2252
+ value: M,
2253
+ onChange: (t) => S(t.target.value)
2189
2254
  }
2190
2255
  ) })
2191
2256
  ] })
2192
2257
  ] }),
2193
- ce && /* @__PURE__ */ e.jsxs(
2258
+ x && /* @__PURE__ */ e.jsxs(
2194
2259
  "section",
2195
2260
  {
2196
2261
  className: "wandox-console-scene-section",
2197
2262
  "aria-label": "个性化场景",
2198
2263
  children: [
2199
2264
  /* @__PURE__ */ e.jsx("div", { className: "wandox-console-scene-section__header", children: /* @__PURE__ */ e.jsx("div", { children: /* @__PURE__ */ e.jsx("h2", { children: "为你推荐" }) }) }),
2200
- j ? /* @__PURE__ */ e.jsxs(
2265
+ k ? /* @__PURE__ */ e.jsxs(
2201
2266
  "div",
2202
2267
  {
2203
2268
  className: "wandox-console-agents__loading",
2204
2269
  style: { justifyContent: "center", padding: "40px 0" },
2205
2270
  children: [
2206
- /* @__PURE__ */ e.jsx(ps, { size: "small" }),
2271
+ /* @__PURE__ */ e.jsx(wa, { size: "small" }),
2207
2272
  /* @__PURE__ */ e.jsx("span", { children: "正在加载场景..." })
2208
2273
  ]
2209
2274
  }
2210
- ) : A && Z.length === 0 ? /* @__PURE__ */ e.jsxs(
2275
+ ) : P && ee.length === 0 ? /* @__PURE__ */ e.jsxs(
2211
2276
  "div",
2212
2277
  {
2213
2278
  className: "wandox-console-agents__error",
2214
2279
  style: { alignItems: "center", padding: "32px 0" },
2215
2280
  children: [
2216
- /* @__PURE__ */ e.jsx("span", { children: A }),
2281
+ /* @__PURE__ */ e.jsx("span", { children: P }),
2217
2282
  /* @__PURE__ */ e.jsxs("button", { type: "button", onClick: _, children: [
2218
- /* @__PURE__ */ e.jsx(Zs, {}),
2283
+ /* @__PURE__ */ e.jsx(ss, {}),
2219
2284
  "重试"
2220
2285
  ] })
2221
2286
  ]
2222
2287
  }
2223
- ) : X.length === 0 ? /* @__PURE__ */ e.jsxs("div", { className: "wandox-console-scene-section__empty", children: [
2224
- /* @__PURE__ */ e.jsx(ms, {}),
2225
- /* @__PURE__ */ e.jsx("span", { children: P ? "没有匹配的场景" : "当前分类暂无场景" })
2226
- ] }) : /* @__PURE__ */ e.jsx("div", { className: "wandox-console-scenes-wrap", children: /* @__PURE__ */ e.jsx("div", { className: "wandox-console-scenes", children: X.map((t) => {
2227
- const f = po(t), y = xo(t), b = _o(t.tags);
2288
+ ) : J.length === 0 ? /* @__PURE__ */ e.jsxs("div", { className: "wandox-console-scene-section__empty", children: [
2289
+ /* @__PURE__ */ e.jsx(_a, {}),
2290
+ /* @__PURE__ */ e.jsx("span", { children: M ? "没有匹配的场景" : "当前分类暂无场景" })
2291
+ ] }) : /* @__PURE__ */ e.jsx("div", { className: "wandox-console-scenes-wrap", children: /* @__PURE__ */ e.jsx("div", { className: "wandox-console-scenes", children: J.map((t) => {
2292
+ const w = ko(t), N = vo(t), j = No(t.tags);
2228
2293
  return /* @__PURE__ */ e.jsxs("div", { className: "wandox-console-scene-wrap", children: [
2229
2294
  /* @__PURE__ */ e.jsx(
2230
2295
  "button",
2231
2296
  {
2232
2297
  type: "button",
2233
- className: `wandox-console-scene${y ? " wandox-console-scene--featured" : ""}${T === t.playbook_id ? " wandox-console-scene--selected" : ""}`,
2234
- onClick: () => x(t),
2298
+ className: `wandox-console-scene${N ? " wandox-console-scene--featured" : ""}${b === t.playbook_id ? " wandox-console-scene--selected" : ""}`,
2299
+ onClick: () => Ie(t),
2235
2300
  children: /* @__PURE__ */ e.jsxs("div", { className: "wandox-console-scene__body", children: [
2236
2301
  /* @__PURE__ */ e.jsxs("div", { className: "wandox-console-scene__head", children: [
2237
2302
  /* @__PURE__ */ e.jsx("strong", { title: t.title, children: t.title }),
2238
- f && /* @__PURE__ */ e.jsx(
2303
+ w && /* @__PURE__ */ e.jsx(
2239
2304
  "span",
2240
2305
  {
2241
- className: `wandox-console-scene__badge wandox-console-scene__badge--${f.kind}`,
2242
- children: f.text
2306
+ className: `wandox-console-scene__badge wandox-console-scene__badge--${w.kind}`,
2307
+ children: w.text
2243
2308
  }
2244
2309
  )
2245
2310
  ] }),
@@ -2251,16 +2316,16 @@ function ho({
2251
2316
  children: t.desc
2252
2317
  }
2253
2318
  ),
2254
- (y || b.length > 0) && /* @__PURE__ */ e.jsxs("div", { className: "wandox-console-scene__tags", children: [
2255
- y && /* @__PURE__ */ e.jsx("span", { className: "wandox-console-scene__tag wandox-console-scene__tag--featured", children: "精品" }),
2256
- b.map((v, me) => /* @__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(
2257
2322
  "span",
2258
2323
  {
2259
2324
  className: "wandox-console-scene__tag",
2260
- style: bo(v),
2261
- children: v.name
2325
+ style: Co(y),
2326
+ children: y.name
2262
2327
  },
2263
- `${v.name}-${me}`
2328
+ `${y.name}-${O}`
2264
2329
  ))
2265
2330
  ] })
2266
2331
  ] })
@@ -2272,10 +2337,10 @@ function ho({
2272
2337
  type: "button",
2273
2338
  className: "wandox-console-scene__video",
2274
2339
  "aria-label": `播放${t.title}演示视频`,
2275
- onClick: (v) => se(v, t),
2340
+ onClick: (y) => ue(y, t),
2276
2341
  children: [
2277
2342
  "▶ ",
2278
- ba(t.video_duration),
2343
+ gs(t.video_duration),
2279
2344
  " 演示"
2280
2345
  ]
2281
2346
  }
@@ -2287,83 +2352,83 @@ function ho({
2287
2352
  )
2288
2353
  ] }),
2289
2354
  /* @__PURE__ */ e.jsx(
2290
- ca,
2355
+ ds,
2291
2356
  {
2292
- playbook: ke,
2293
- onClose: () => F(null)
2357
+ playbook: Ce,
2358
+ onClose: () => D(null)
2294
2359
  }
2295
2360
  )
2296
2361
  ] });
2297
2362
  }
2298
- function xo(o) {
2363
+ function vo(o) {
2299
2364
  return o.is_featured === !0 || o.badge === "featured";
2300
2365
  }
2301
- function po(o) {
2366
+ function ko(o) {
2302
2367
  return o.badge === "recommend" ? { text: "推荐", kind: "recommend" } : o.badge === "new" ? { text: "New", kind: "new" } : null;
2303
2368
  }
2304
- function _o(o) {
2369
+ function No(o) {
2305
2370
  return Array.isArray(o) ? o.filter(
2306
- (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() !== ""
2307
2372
  ) : [];
2308
2373
  }
2309
- function bo(o) {
2374
+ function Co(o) {
2310
2375
  if (!(o.variant !== "soft" || !o.color))
2311
2376
  return {
2312
2377
  color: o.color,
2313
- borderColor: aa(o.color, 0.28),
2314
- backgroundColor: aa(o.color, 0.08)
2378
+ borderColor: cs(o.color, 0.28),
2379
+ backgroundColor: cs(o.color, 0.08)
2315
2380
  };
2316
2381
  }
2317
- function aa(o, i) {
2318
- const h = o.trim().replace("#", "");
2319
- if (!/^[0-9a-fA-F]{6}$/.test(h)) return o;
2320
- const m = Number.parseInt(h.slice(0, 2), 16), p = Number.parseInt(h.slice(2, 4), 16), j = Number.parseInt(h.slice(4, 6), 16);
2321
- return `rgba(${m}, ${p}, ${j}, ${i})`;
2382
+ function cs(o, l) {
2383
+ const u = o.trim().replace("#", "");
2384
+ if (!/^[0-9a-fA-F]{6}$/.test(u)) return o;
2385
+ const r = Number.parseInt(u.slice(0, 2), 16), p = Number.parseInt(u.slice(2, 4), 16), k = Number.parseInt(u.slice(4, 6), 16);
2386
+ return `rgba(${r}, ${p}, ${k}, ${l})`;
2322
2387
  }
2323
- const fo = [
2388
+ const So = [
2324
2389
  {
2325
2390
  id: "conversation",
2326
2391
  title: "智能体",
2327
2392
  desc: "与智能体自由对话或选择场景执行任务",
2328
- icon: /* @__PURE__ */ e.jsx(qn, {}),
2393
+ icon: /* @__PURE__ */ e.jsx(Un, {}),
2329
2394
  accent: "#4f46e5"
2330
2395
  },
2331
2396
  {
2332
2397
  id: "automation",
2333
2398
  title: "自动化",
2334
2399
  desc: "管理与执行自动化流程、定时任务与驾驶舱",
2335
- icon: /* @__PURE__ */ e.jsx(Ln, {}),
2400
+ icon: /* @__PURE__ */ e.jsx(Fn, {}),
2336
2401
  accent: "#4f46e5"
2337
2402
  }
2338
- ], Oe = {
2403
+ ], Be = {
2339
2404
  id: "notification",
2340
2405
  title: "通知配置",
2341
- icon: /* @__PURE__ */ e.jsx(xa, {}),
2406
+ icon: /* @__PURE__ */ e.jsx(fs, {}),
2342
2407
  accent: "#e0730c"
2343
2408
  };
2344
- function wo({
2409
+ function Ro({
2345
2410
  features: o,
2346
- onOpenFeature: i,
2347
- activeId: h
2411
+ onOpenFeature: l,
2412
+ activeId: u
2348
2413
  }) {
2349
2414
  return /* @__PURE__ */ e.jsxs("header", { className: "wandox-console-topnav", "aria-label": "控制台顶部导航", children: [
2350
- /* @__PURE__ */ e.jsx("nav", { className: "wandox-console-topnav__pill", "aria-label": "工作台", children: o.map((m) => {
2351
- 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;
2352
2417
  return /* @__PURE__ */ e.jsxs(
2353
2418
  "button",
2354
2419
  {
2355
2420
  type: "button",
2356
2421
  className: `wandox-console-topnav__pill-btn${p ? " wandox-console-topnav__pill-btn--active" : ""}`,
2357
- title: m.title,
2358
- "aria-label": m.title,
2422
+ title: r.title,
2423
+ "aria-label": r.title,
2359
2424
  "aria-current": p ? "page" : void 0,
2360
- onClick: () => i(m.id),
2425
+ onClick: () => l(r.id),
2361
2426
  children: [
2362
- /* @__PURE__ */ e.jsx("span", { className: "wandox-console-topnav__pill-icon", children: m.icon }),
2363
- /* @__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 })
2364
2429
  ]
2365
2430
  },
2366
- m.id
2431
+ r.id
2367
2432
  );
2368
2433
  }) }),
2369
2434
  /* @__PURE__ */ e.jsx(
@@ -2372,32 +2437,32 @@ function wo({
2372
2437
  type: "button",
2373
2438
  className: "wandox-console-topnav__notify",
2374
2439
  style: {
2375
- "--notify-accent": Oe.accent
2440
+ "--notify-accent": Be.accent
2376
2441
  },
2377
- title: Oe.title,
2378
- "aria-label": Oe.title,
2379
- onClick: () => i(Oe.id),
2380
- 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 })
2381
2446
  }
2382
2447
  )
2383
2448
  ] });
2384
2449
  }
2385
- function yo({
2450
+ function $o({
2386
2451
  className: o = "",
2387
- state: i = "idle"
2452
+ state: l = "idle"
2388
2453
  }) {
2389
2454
  return /* @__PURE__ */ e.jsx(
2390
2455
  "img",
2391
2456
  {
2392
2457
  className: `wandox-console-companion${o ? ` ${o}` : ""}`,
2393
- "data-state": i,
2394
- src: Dn,
2458
+ "data-state": l,
2459
+ src: Vn,
2395
2460
  alt: "",
2396
2461
  "aria-hidden": "true"
2397
2462
  }
2398
2463
  );
2399
2464
  }
2400
- function na({ fading: o }) {
2465
+ function ls({ fading: o }) {
2401
2466
  return /* @__PURE__ */ e.jsxs(
2402
2467
  "div",
2403
2468
  {
@@ -2408,7 +2473,7 @@ function na({ fading: o }) {
2408
2473
  /* @__PURE__ */ e.jsx("div", { className: "wandox-console-init__halo wandox-console-init__halo--b" }),
2409
2474
  /* @__PURE__ */ e.jsxs("div", { className: "wandox-console-init__inner", children: [
2410
2475
  /* @__PURE__ */ e.jsx(
2411
- yo,
2476
+ $o,
2412
2477
  {
2413
2478
  className: "wandox-console-init__companion",
2414
2479
  state: "thinking"
@@ -2431,27 +2496,27 @@ function na({ fading: o }) {
2431
2496
  }
2432
2497
  );
2433
2498
  }
2434
- function oa({
2499
+ function is({
2435
2500
  title: o,
2436
- onBack: i,
2437
- hideHeader: h = !1,
2438
- className: m,
2501
+ onBack: l,
2502
+ hideHeader: u = !1,
2503
+ className: r,
2439
2504
  children: p
2440
2505
  }) {
2441
2506
  return /* @__PURE__ */ e.jsxs(
2442
2507
  "div",
2443
2508
  {
2444
- className: `wandox-console-featureview${m ? ` ${m}` : ""}`,
2509
+ className: `wandox-console-featureview${r ? ` ${r}` : ""}`,
2445
2510
  children: [
2446
- !h && /* @__PURE__ */ e.jsxs("div", { className: "wandox-console-featureview__bar", children: [
2511
+ !u && /* @__PURE__ */ e.jsxs("div", { className: "wandox-console-featureview__bar", children: [
2447
2512
  /* @__PURE__ */ e.jsxs(
2448
2513
  "button",
2449
2514
  {
2450
2515
  type: "button",
2451
2516
  className: "wandox-console-featureview__back",
2452
- onClick: i,
2517
+ onClick: l,
2453
2518
  children: [
2454
- /* @__PURE__ */ e.jsx(ma, {}),
2519
+ /* @__PURE__ */ e.jsx(_s, {}),
2455
2520
  "返回控制台"
2456
2521
  ]
2457
2522
  }
@@ -2463,225 +2528,225 @@ function oa({
2463
2528
  }
2464
2529
  );
2465
2530
  }
2466
- function vo({
2531
+ function Po({
2467
2532
  agents: o,
2468
- initialAgentId: i,
2469
- initialPlaybookId: h,
2470
- initialPlaybookParams: m,
2533
+ initialAgentId: l,
2534
+ initialPlaybookId: u,
2535
+ initialPlaybookParams: r,
2471
2536
  onReady: p
2472
2537
  } = {}) {
2473
2538
  const {
2474
- agents: j,
2475
- agentLoading: A,
2539
+ agents: k,
2540
+ agentLoading: P,
2476
2541
  selectedAgentId: _,
2477
- selectedAgent: S,
2478
- selectAgent: D,
2479
- ...ne
2480
- } = Wn({ presetAgents: o, initialAgentId: i }), [Y, le] = a.useState(null), R = a.useRef(null), H = a.useRef(!1), [P, C] = a.useState("home"), [u, F] = a.useState(
2542
+ selectedAgent: R,
2543
+ selectAgent: T,
2544
+ ...ae
2545
+ } = Kn({ presetAgents: o, initialAgentId: l }), [Q, le] = s.useState(null), $ = s.useRef(null), q = s.useRef(!1), [M, S] = s.useState("home"), [h, D] = s.useState(
2481
2546
  null
2482
- ), [ie, O] = a.useState(!1), [$, U] = a.useState(null), [oe, te] = a.useState(""), K = S == null ? void 0 : S.name, V = a.useCallback((x) => {
2483
- if (R.current) {
2484
- 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);
2485
2550
  return;
2486
2551
  }
2487
2552
  le({ robotName: x });
2488
2553
  }, []);
2489
- a.useEffect(() => {
2554
+ s.useEffect(() => {
2490
2555
  p == null || p({ showInspectionResults: V });
2491
- }, [V, p]), a.useEffect(() => {
2492
- !Y || R.current || !_ || P === "chat" || (U({
2556
+ }, [V, p]), s.useEffect(() => {
2557
+ !Q || $.current || !_ || M === "chat" || (W({
2493
2558
  agentId: _,
2494
- agentName: K,
2559
+ agentName: H,
2495
2560
  playbookParams: {},
2496
2561
  message: ""
2497
- }), C("chat"));
2498
- }, [P, Y, _, K]), a.useEffect(() => {
2562
+ }), S("chat"));
2563
+ }, [M, Q, _, H]), s.useEffect(() => {
2499
2564
  te("");
2500
2565
  }, [_]);
2501
2566
  const {
2502
- playbooks: G,
2503
- userPlaybooks: J,
2567
+ playbooks: U,
2568
+ userPlaybooks: Y,
2504
2569
  useMapCategories: re,
2505
2570
  useMapCards: I,
2506
2571
  sceneLoading: B,
2507
- useMapError: ge,
2572
+ useMapError: ke,
2508
2573
  reload: xe
2509
- } = ne, de = a.useMemo(
2510
- () => re.length > 0 ? re : Hn(G),
2511
- [re, G]
2574
+ } = ae, de = s.useMemo(
2575
+ () => re.length > 0 ? re : Gn(U),
2576
+ [re, U]
2512
2577
  );
2513
- a.useEffect(() => {
2578
+ s.useEffect(() => {
2514
2579
  if (de.length === 0) return;
2515
2580
  de.some(
2516
- (k) => k.key === oe
2581
+ (b) => b.key === oe
2517
2582
  ) || te(de[0].key);
2518
2583
  }, [de]);
2519
- const we = a.useRef(!1);
2520
- a.useEffect(() => {
2521
- if (we.current || !h || !_ || B)
2584
+ const je = s.useRef(!1);
2585
+ s.useEffect(() => {
2586
+ if (je.current || !u || !_ || B)
2522
2587
  return;
2523
- const x = j.find(
2524
- (k) => k.id === _ && ea(k, i)
2588
+ const x = k.find(
2589
+ (b) => b.id === _ && os(b, l)
2525
2590
  );
2526
- x && (we.current = !0, U({
2591
+ x && (je.current = !0, W({
2527
2592
  agentId: _,
2528
2593
  agentName: x.name,
2529
- playbookId: h,
2530
- playbookParams: m || {},
2594
+ playbookId: u,
2595
+ playbookParams: r || {},
2531
2596
  message: ""
2532
- }), C("chat"));
2597
+ }), S("chat"));
2533
2598
  }, [
2534
2599
  B,
2535
- j,
2536
- i,
2537
- h,
2538
- m,
2600
+ k,
2601
+ l,
2602
+ u,
2603
+ r,
2539
2604
  _,
2540
- K
2541
- ]), a.useEffect(() => {
2542
- if (H.current || !i || h || !_ || B)
2605
+ H
2606
+ ]), s.useEffect(() => {
2607
+ if (q.current || !l || u || !_ || B)
2543
2608
  return;
2544
- const x = j.find(
2545
- (k) => k.id === _ && ea(k, i)
2609
+ const x = k.find(
2610
+ (b) => b.id === _ && os(b, l)
2546
2611
  );
2547
- x && (H.current = !0, U({
2612
+ x && (q.current = !0, W({
2548
2613
  agentId: x.id,
2549
2614
  agentName: x.name,
2550
2615
  playbookParams: {},
2551
2616
  message: ""
2552
- }), C("chat"));
2553
- }, [j, B, i, h, _]);
2554
- const [pe, Re] = a.useState(!0), [Z, je] = a.useState(!1);
2555
- a.useEffect(() => {
2556
- if (!pe || !(!A && j.length > 0 && !!_ && !B)) return;
2557
- je(!0);
2558
- const ye = setTimeout(() => Re(!1), 280);
2559
- return () => clearTimeout(ye);
2560
- }, [A, j.length, _, B, pe]);
2561
- const X = a.useCallback(() => {
2562
- C("home"), F(null), O(!1);
2563
- }, []), ce = a.useCallback(
2617
+ }), S("chat"));
2618
+ }, [k, B, l, u, _]);
2619
+ const [pe, Re] = s.useState(!0), [$e, Ne] = s.useState(!1);
2620
+ s.useEffect(() => {
2621
+ if (!pe || !(!P && k.length > 0 && !!_ && !B)) return;
2622
+ Ne(!0);
2623
+ const ce = setTimeout(() => Re(!1), 280);
2624
+ return () => clearTimeout(ce);
2625
+ }, [P, k.length, _, B, pe]);
2626
+ const Z = s.useCallback(() => {
2627
+ S("home"), D(null), F(!1);
2628
+ }, []), K = s.useCallback(
2564
2629
  (x) => {
2565
2630
  if (x === "conversation") {
2566
- X();
2631
+ Z();
2567
2632
  return;
2568
2633
  }
2569
- O(!1), F(x);
2634
+ F(!1), D(x);
2570
2635
  },
2571
- [X]
2572
- ), T = (x) => {
2573
- D(x), C("home");
2574
- }, q = (x) => {
2636
+ [Z]
2637
+ ), G = (x) => {
2638
+ T(x), S("home");
2639
+ }, X = (x) => {
2575
2640
  if (x === _) return;
2576
- const k = j.find((ye) => ye.id === x);
2577
- D(x), U({
2641
+ const b = k.find((ce) => ce.id === x);
2642
+ T(x), W({
2578
2643
  agentId: x,
2579
- agentName: k == null ? void 0 : k.name,
2644
+ agentName: b == null ? void 0 : b.name,
2580
2645
  playbookParams: {},
2581
2646
  message: ""
2582
2647
  });
2583
- }, E = () => {
2584
- _ && (U({
2648
+ }, ee = () => {
2649
+ _ && (W({
2585
2650
  agentId: _,
2586
- agentName: K,
2651
+ agentName: H,
2587
2652
  playbookParams: {},
2588
2653
  message: ""
2589
- }), C("chat"));
2590
- }, ke = (x) => {
2591
- U({
2654
+ }), S("chat"));
2655
+ }, _e = (x) => {
2656
+ W({
2592
2657
  agentId: _,
2593
- agentName: K,
2658
+ agentName: H,
2594
2659
  playbookId: x.playbookId,
2595
2660
  playbookParams: x.playbookParams,
2596
2661
  message: x.message,
2597
2662
  attachments: x.attachments
2598
- }), C("chat");
2663
+ }), S("chat");
2599
2664
  };
2600
- return P === "chat" && $ ? /* @__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: [
2601
2666
  /* @__PURE__ */ e.jsx(
2602
- uo,
2667
+ yo,
2603
2668
  {
2604
- agentId: $.agentId,
2605
- agentName: $.agentName,
2606
- playbookId: $.playbookId,
2607
- playbookParams: $.playbookParams,
2608
- initialMessage: $.message,
2609
- initialAttachments: $.attachments,
2669
+ agentId: E.agentId,
2670
+ agentName: E.agentName,
2671
+ playbookId: E.playbookId,
2672
+ playbookParams: E.playbookParams,
2673
+ initialMessage: E.message,
2674
+ initialAttachments: E.attachments,
2610
2675
  useMapCards: I,
2611
2676
  useMapCategories: re,
2612
- playbooks: G,
2613
- userPlaybooks: J,
2614
- agents: j,
2677
+ playbooks: U,
2678
+ userPlaybooks: Y,
2679
+ agents: k,
2615
2680
  onReady: (x) => {
2616
- R.current = x, Y && (x.showInspectionResults(Y.robotName), le(null));
2681
+ $.current = x, Q && (x.showInspectionResults(Q.robotName), le(null));
2617
2682
  },
2618
- onChangeAgent: q,
2683
+ onChangeAgent: X,
2619
2684
  onBack: () => {
2620
- R.current = null, C("home");
2685
+ $.current = null, S("home");
2621
2686
  },
2622
2687
  onSelectScene: () => {
2623
2688
  }
2624
2689
  },
2625
- `${$.agentId}:${$.playbookId || "free-chat"}`
2690
+ `${E.agentId}:${E.playbookId || "free-chat"}`
2626
2691
  ),
2627
- pe && /* @__PURE__ */ e.jsx(na, { fading: Z })
2692
+ pe && /* @__PURE__ */ e.jsx(ls, { fading: $e })
2628
2693
  ] }) : /* @__PURE__ */ e.jsxs(
2629
2694
  "div",
2630
2695
  {
2631
2696
  className: `wandox-console${ie ? " wandox-console--secondary" : ""}`,
2632
2697
  children: [
2633
- pe && /* @__PURE__ */ e.jsx(na, { fading: Z }),
2698
+ pe && /* @__PURE__ */ e.jsx(ls, { fading: $e }),
2634
2699
  !ie && /* @__PURE__ */ e.jsx(
2635
- wo,
2700
+ Ro,
2636
2701
  {
2637
- features: fo,
2638
- activeId: u ?? "conversation",
2639
- onOpenFeature: ce
2702
+ features: So,
2703
+ activeId: h ?? "conversation",
2704
+ onOpenFeature: K
2640
2705
  }
2641
2706
  ),
2642
2707
  /* @__PURE__ */ e.jsxs("main", { className: "wandox-console-main", children: [
2643
- u === "automation" && /* @__PURE__ */ e.jsx(
2644
- oa,
2708
+ h === "automation" && /* @__PURE__ */ e.jsx(
2709
+ is,
2645
2710
  {
2646
2711
  title: "自动化",
2647
- onBack: () => F(null),
2712
+ onBack: () => D(null),
2648
2713
  hideHeader: !0,
2649
2714
  className: "wandox-console-featureview--automation",
2650
2715
  children: /* @__PURE__ */ e.jsx(
2651
- Un,
2716
+ Qn,
2652
2717
  {
2653
- onCockpitEnter: () => O(!0),
2654
- onCockpitExit: () => O(!1),
2655
- onInboxEnter: () => O(!0)
2718
+ onCockpitEnter: () => F(!0),
2719
+ onCockpitExit: () => F(!1),
2720
+ onInboxEnter: () => F(!0)
2656
2721
  }
2657
2722
  )
2658
2723
  }
2659
2724
  ),
2660
- u === "notification" && /* @__PURE__ */ e.jsx(
2661
- oa,
2725
+ h === "notification" && /* @__PURE__ */ e.jsx(
2726
+ is,
2662
2727
  {
2663
2728
  title: "通知配置",
2664
- onBack: () => F(null),
2729
+ onBack: () => D(null),
2665
2730
  hideHeader: !0,
2666
- children: /* @__PURE__ */ e.jsx(Kn, {})
2731
+ children: /* @__PURE__ */ e.jsx(Yn, {})
2667
2732
  }
2668
2733
  ),
2669
- !u && /* @__PURE__ */ e.jsx(
2670
- ho,
2734
+ !h && /* @__PURE__ */ e.jsx(
2735
+ jo,
2671
2736
  {
2672
2737
  useMapCards: I,
2673
2738
  useMapCategories: de,
2674
- playbooks: G,
2739
+ playbooks: U,
2675
2740
  selectedCategoryKey: oe,
2676
2741
  onCategorySelect: te,
2677
2742
  loading: B,
2678
- useMapError: ge,
2743
+ useMapError: ke,
2679
2744
  onRetry: xe,
2680
- onStartAnalysis: ke,
2681
- agents: j,
2745
+ onStartAnalysis: _e,
2746
+ agents: k,
2682
2747
  selectedAgentId: _,
2683
- onAgentSelect: T,
2684
- onOpenAgentChat: E
2748
+ onAgentSelect: G,
2749
+ onOpenAgentChat: ee
2685
2750
  }
2686
2751
  )
2687
2752
  ] })
@@ -2690,5 +2755,5 @@ function vo({
2690
2755
  );
2691
2756
  }
2692
2757
  export {
2693
- vo as default
2758
+ Po as default
2694
2759
  };