@wandox/sdk 0.1.34 → 0.1.35

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 (111) hide show
  1. package/dist/{index-BXVFHGjy.js → V1Workbench-Duh15otc.js} +1418 -1739
  2. package/dist/V1Workbench-OnGicnM-.cjs +3 -0
  3. package/dist/V2Workbench-ChqSBXHY.cjs +2 -0
  4. package/dist/V2Workbench-Cwx-XP5u.js +2170 -0
  5. package/dist/{useWorkbenchSession-kwuVHEAF.js → WorkbenchRuntime-B2C8SbrZ.js} +4623 -3816
  6. package/dist/WorkbenchRuntime-QRXyaZ5I.cjs +7 -0
  7. package/dist/{arc-D0KfcB3y.js → arc-C3McnqVx.js} +1 -1
  8. package/dist/{arc-DtBHZfqY.cjs → arc-CfnbUnJa.cjs} +1 -1
  9. package/dist/{architectureDiagram-3BPJPVTR-VUz_J4KY.js → architectureDiagram-3BPJPVTR-DKV9z5FO.js} +3 -3
  10. package/dist/{architectureDiagram-3BPJPVTR-C2P4Wdju.cjs → architectureDiagram-3BPJPVTR-EmeNsmhR.cjs} +1 -1
  11. package/dist/{blockDiagram-GPEHLZMM-DyKZmQ5w.cjs → blockDiagram-GPEHLZMM-B3PO97gR.cjs} +1 -1
  12. package/dist/{blockDiagram-GPEHLZMM-HQFLyzc_.js → blockDiagram-GPEHLZMM-CwMlZLrY.js} +3 -3
  13. package/dist/{c4Diagram-AAUBKEIU-TV86wAk4.cjs → c4Diagram-AAUBKEIU-CIJm8DIv.cjs} +1 -1
  14. package/dist/{c4Diagram-AAUBKEIU-DH1AHWgW.js → c4Diagram-AAUBKEIU-DDvw0p9i.js} +2 -2
  15. package/dist/{channel-AJpjl4EL.cjs → channel-B6D2dt-a.cjs} +1 -1
  16. package/dist/{channel-BlVX_pqv.js → channel-BW_f3mZ1.js} +1 -1
  17. package/dist/{chunk-2J33WTMH-t0efBHaF.js → chunk-2J33WTMH-B9LmfIjP.js} +1 -1
  18. package/dist/{chunk-2J33WTMH-B3QEVdxo.cjs → chunk-2J33WTMH-CAtXTwyr.cjs} +1 -1
  19. package/dist/{chunk-4BX2VUAB-B6_TK6LC.js → chunk-4BX2VUAB-C_E82st1.js} +1 -1
  20. package/dist/{chunk-4BX2VUAB-B3PBOdBd.cjs → chunk-4BX2VUAB-TTJvrk_8.cjs} +1 -1
  21. package/dist/{chunk-55IACEB6-DrbqgVSi.cjs → chunk-55IACEB6-Co8MIdgs.cjs} +1 -1
  22. package/dist/{chunk-55IACEB6-Dn6M7DjU.js → chunk-55IACEB6-CuKoQ8P-.js} +1 -1
  23. package/dist/{chunk-727SXJPM-CZZ8vzvu.js → chunk-727SXJPM-Cs8uS9SJ.js} +5 -5
  24. package/dist/{chunk-727SXJPM-BxPLhhtr.cjs → chunk-727SXJPM-Cup_K8Hg.cjs} +1 -1
  25. package/dist/{chunk-AQP2D5EJ-DEFjJjvF.cjs → chunk-AQP2D5EJ-BJ2GPeyZ.cjs} +1 -1
  26. package/dist/{chunk-AQP2D5EJ-B5tlMkxW.js → chunk-AQP2D5EJ-Ck3VZgwQ.js} +3 -3
  27. package/dist/{chunk-FMBD7UC4-gFc5W2fF.cjs → chunk-FMBD7UC4-ClCmPgT2.cjs} +1 -1
  28. package/dist/{chunk-FMBD7UC4-rlodMWnO.js → chunk-FMBD7UC4-_xpDdMNi.js} +1 -1
  29. package/dist/{chunk-ND2GUHAM-B9qs3P-w.cjs → chunk-ND2GUHAM-5_kT1SOB.cjs} +1 -1
  30. package/dist/{chunk-ND2GUHAM-dJ5LgRGw.js → chunk-ND2GUHAM-BahupltG.js} +1 -1
  31. package/dist/{chunk-QZHKN3VN-D25PBsy4.cjs → chunk-QZHKN3VN-Ca5tmmHx.cjs} +1 -1
  32. package/dist/{chunk-QZHKN3VN-ChUvXVo2.js → chunk-QZHKN3VN-CdL_F3Vv.js} +1 -1
  33. package/dist/{classDiagram-4FO5ZUOK-CPy1KaCR.js → classDiagram-4FO5ZUOK-CnMvmQcX.js} +2 -2
  34. package/dist/{classDiagram-4FO5ZUOK-wFEmQFl-.cjs → classDiagram-4FO5ZUOK-DZ87tNdh.cjs} +1 -1
  35. package/dist/{classDiagram-v2-Q7XG4LA2-CSZEPTC6.js → classDiagram-v2-Q7XG4LA2-90g5yMq9.js} +2 -2
  36. package/dist/{classDiagram-v2-Q7XG4LA2-wFEmQFl-.cjs → classDiagram-v2-Q7XG4LA2-DZ87tNdh.cjs} +1 -1
  37. package/dist/{cose-bilkent-S5V4N54A-C4j5j5T6.cjs → cose-bilkent-S5V4N54A-D9USBZBY.cjs} +1 -1
  38. package/dist/{cose-bilkent-S5V4N54A-uRPNkg7E.js → cose-bilkent-S5V4N54A-DOMJ8Dw0.js} +6 -6
  39. package/dist/{dagre-BM42HDAG-Iv0znKTe.js → dagre-BM42HDAG-BruKrkrz.js} +1 -1
  40. package/dist/{dagre-BM42HDAG-C--V1vcV.cjs → dagre-BM42HDAG-D9xkOYd1.cjs} +1 -1
  41. package/dist/{diagram-2AECGRRQ-BSOkNy0d.js → diagram-2AECGRRQ-B7fBRPEm.js} +2 -2
  42. package/dist/{diagram-2AECGRRQ-DgTZEGRd.cjs → diagram-2AECGRRQ-CHwHxLjN.cjs} +1 -1
  43. package/dist/{diagram-5GNKFQAL-D5Mkr0VI.cjs → diagram-5GNKFQAL-B3sIjwSe.cjs} +1 -1
  44. package/dist/{diagram-5GNKFQAL-C91PObIK.js → diagram-5GNKFQAL-C68LRU93.js} +3 -3
  45. package/dist/{diagram-KO2AKTUF-Bg-zssV4.cjs → diagram-KO2AKTUF-CZkt3wwK.cjs} +1 -1
  46. package/dist/{diagram-KO2AKTUF-CAH3eDcz.js → diagram-KO2AKTUF-Decii5jM.js} +2 -2
  47. package/dist/{diagram-LMA3HP47-hOSm9f_K.js → diagram-LMA3HP47-BRJpaLnd.js} +2 -2
  48. package/dist/{diagram-LMA3HP47-SMfJTnR5.cjs → diagram-LMA3HP47-D7hixvGx.cjs} +1 -1
  49. package/dist/{diagram-OG6HWLK6-B-QlPomq.js → diagram-OG6HWLK6-DwSOhl1j.js} +3 -3
  50. package/dist/{diagram-OG6HWLK6-DNEN_x2d.cjs → diagram-OG6HWLK6-dSSwZ9rN.cjs} +1 -1
  51. package/dist/{erDiagram-TEJ5UH35-CG6J3vIN.cjs → erDiagram-TEJ5UH35-CCZ0q594.cjs} +1 -1
  52. package/dist/{erDiagram-TEJ5UH35-CmiMTzqm.js → erDiagram-TEJ5UH35-ClUTkoiL.js} +4 -4
  53. package/dist/{flowDiagram-I6XJVG4X-BODLJZMQ.cjs → flowDiagram-I6XJVG4X-BN-jwNXL.cjs} +1 -1
  54. package/dist/{flowDiagram-I6XJVG4X-B-oB1PyG.js → flowDiagram-I6XJVG4X-CfhSJE55.js} +6 -6
  55. package/dist/{ganttDiagram-6RSMTGT7-kGQE-0fY.cjs → ganttDiagram-6RSMTGT7-CF1liYk-.cjs} +1 -1
  56. package/dist/{ganttDiagram-6RSMTGT7-4H-Azqhw.js → ganttDiagram-6RSMTGT7-Dq7VvM2M.js} +3 -3
  57. package/dist/{gitGraphDiagram-PVQCEYII-Dj601cg2.cjs → gitGraphDiagram-PVQCEYII-P9t07gif.cjs} +1 -1
  58. package/dist/{gitGraphDiagram-PVQCEYII-ZKxubOBO.js → gitGraphDiagram-PVQCEYII-odnoukk4.js} +3 -3
  59. package/dist/{index-D4dy8yHF.js → index-4FmQg3Zk.js} +29968 -30251
  60. package/dist/{index-D3SW2cEr.cjs → index-BQMJ9VDu.cjs} +1 -1
  61. package/dist/{index-q34Z4QAw.js → index-CFEgQrfn.js} +12 -12
  62. package/dist/{index-5xbDqXDX.cjs → index-CLCe0Dgz.cjs} +1 -1
  63. package/dist/index-CQgUKSVP.cjs +785 -0
  64. package/dist/{index-DkJpASom.js → index-Cq6GT084.js} +34 -34
  65. package/dist/{infoDiagram-5YYISTIA-mdLUb8Pf.js → infoDiagram-5YYISTIA-CzWTUV3i.js} +1 -1
  66. package/dist/{infoDiagram-5YYISTIA-CfJwXJqb.cjs → infoDiagram-5YYISTIA-vIftEDKa.cjs} +1 -1
  67. package/dist/{ishikawaDiagram-YF4QCWOH-CfS3BeT3.js → ishikawaDiagram-YF4QCWOH-5oQSrlLN.js} +1 -1
  68. package/dist/{ishikawaDiagram-YF4QCWOH-BSPYHzHI.cjs → ishikawaDiagram-YF4QCWOH-DoFATknv.cjs} +1 -1
  69. package/dist/{journeyDiagram-JHISSGLW-DUwZdGOg.js → journeyDiagram-JHISSGLW-BHsXT1p8.js} +4 -4
  70. package/dist/{journeyDiagram-JHISSGLW-nnM-h5QJ.cjs → journeyDiagram-JHISSGLW-DUspfQIx.cjs} +1 -1
  71. package/dist/{kanban-definition-UN3LZRKU-Dt1TxPqZ.cjs → kanban-definition-UN3LZRKU-BqKlDwWt.cjs} +1 -1
  72. package/dist/{kanban-definition-UN3LZRKU-BtP29Iaf.js → kanban-definition-UN3LZRKU-CbizhZ4A.js} +2 -2
  73. package/dist/{linear-Bj7ETfty.cjs → linear-BeJA81Is.cjs} +1 -1
  74. package/dist/{linear-DZDNy162.js → linear-O3WIbS9A.js} +1 -1
  75. package/dist/{mermaid.core-Cc1KxlCM.js → mermaid.core-C-YWP2jz.js} +35 -35
  76. package/dist/{mermaid.core-BTaTUIUu.cjs → mermaid.core-EIMF3BAo.cjs} +3 -3
  77. package/dist/{mindmap-definition-RKZ34NQL-Cf0zrR9M.cjs → mindmap-definition-RKZ34NQL-DcaDYCfJ.cjs} +1 -1
  78. package/dist/{mindmap-definition-RKZ34NQL-DZH26qfU.js → mindmap-definition-RKZ34NQL-yQ9g46ph.js} +3 -3
  79. package/dist/{pieDiagram-4H26LBE5-Ddif1ew2.js → pieDiagram-4H26LBE5-BPAmrvlh.js} +3 -3
  80. package/dist/{pieDiagram-4H26LBE5-DRAafsrW.cjs → pieDiagram-4H26LBE5-DDbOWta5.cjs} +1 -1
  81. package/dist/{quadrantDiagram-W4KKPZXB-BbkfZqRA.cjs → quadrantDiagram-W4KKPZXB-7EOeN28t.cjs} +1 -1
  82. package/dist/{quadrantDiagram-W4KKPZXB-Cug5Y7_G.js → quadrantDiagram-W4KKPZXB-CBFKlxRx.js} +2 -2
  83. package/dist/{requirementDiagram-4Y6WPE33-CWZD0-rx.cjs → requirementDiagram-4Y6WPE33-BAkakkMp.cjs} +1 -1
  84. package/dist/{requirementDiagram-4Y6WPE33-DwnBT67e.js → requirementDiagram-4Y6WPE33-BZk_3wFB.js} +3 -3
  85. package/dist/{sankeyDiagram-5OEKKPKP-BFE8-91E.js → sankeyDiagram-5OEKKPKP-CrbL-5cr.js} +1 -1
  86. package/dist/{sankeyDiagram-5OEKKPKP-I3_O-pWr.cjs → sankeyDiagram-5OEKKPKP-DYEggaLM.cjs} +1 -1
  87. package/dist/{sequenceDiagram-3UESZ5HK-ChL5sWeE.js → sequenceDiagram-3UESZ5HK-B2Yk8NuE.js} +3 -3
  88. package/dist/{sequenceDiagram-3UESZ5HK-CfoKZAsg.cjs → sequenceDiagram-3UESZ5HK-cky8-ajI.cjs} +1 -1
  89. package/dist/{stateDiagram-AJRCARHV-DUnFbttq.cjs → stateDiagram-AJRCARHV-4peSgT8x.cjs} +1 -1
  90. package/dist/{stateDiagram-AJRCARHV-DuflU8kG.js → stateDiagram-AJRCARHV-DKppy5jM.js} +2 -2
  91. package/dist/{stateDiagram-v2-BHNVJYJU-Cf7QVlcI.cjs → stateDiagram-v2-BHNVJYJU-CefiWaGq.cjs} +1 -1
  92. package/dist/{stateDiagram-v2-BHNVJYJU-DjhPlTO0.js → stateDiagram-v2-BHNVJYJU-DsQP1CsR.js} +2 -2
  93. package/dist/{timeline-definition-PNZ67QCA-DZfQpSWh.cjs → timeline-definition-PNZ67QCA-CFJYzYQn.cjs} +1 -1
  94. package/dist/{timeline-definition-PNZ67QCA-Iy3R3U3O.js → timeline-definition-PNZ67QCA-snDcaYSq.js} +2 -2
  95. package/dist/types.d.ts +7 -7
  96. package/dist/{vennDiagram-CIIHVFJN-DcNPQahe.js → vennDiagram-CIIHVFJN-BniEMR4w.js} +1 -1
  97. package/dist/{vennDiagram-CIIHVFJN-DxHgY0Ea.cjs → vennDiagram-CIIHVFJN-RPKP_Mb2.cjs} +1 -1
  98. package/dist/wandox.cjs +1 -1
  99. package/dist/wandox.css +1 -1
  100. package/dist/wandox.js +1 -1
  101. package/dist/wandox.umd.js +653 -653
  102. package/dist/{wardleyDiagram-YWT4CUSO-b2m-CjkO.js → wardleyDiagram-YWT4CUSO-DvDYViI5.js} +2 -2
  103. package/dist/{wardleyDiagram-YWT4CUSO-Dy3rxs_V.cjs → wardleyDiagram-YWT4CUSO-msArC69-.cjs} +1 -1
  104. package/dist/{xychartDiagram-2RQKCTM6-TK9Lfh_u.cjs → xychartDiagram-2RQKCTM6-B4nZMXk5.cjs} +1 -1
  105. package/dist/{xychartDiagram-2RQKCTM6-CQEovrBb.js → xychartDiagram-2RQKCTM6-CEcIgPon.js} +2 -2
  106. package/package.json +1 -1
  107. package/dist/index-BPJc-VZw.cjs +0 -785
  108. package/dist/index-BUHRhy1Y.cjs +0 -3
  109. package/dist/index-B_nZ3LrV.js +0 -2379
  110. package/dist/index-DwVmVXmF.cjs +0 -2
  111. package/dist/useWorkbenchSession-CuBY6GKC.cjs +0 -7
@@ -1,345 +1,152 @@
1
- import { ds as s, af as Ue, d0 as e, bK as ss, b9 as at, ba as Ss, cs as Pe, bb as nt, d9 as it, dZ as ot, aE as lt, dF as oe, N as ze, aZ as rt, bB as dt, bA as Cs, i as _e, e1 as Is, ai as Ve, L as bs, aq as ds, F as ct, bM as ut, ct as As, a6 as ht, a4 as xt, P as mt, aS as pt, B as ys, b1 as ft, aO as Xe, A as gt, by as Ps, y as bt, aA as yt, cv as Rs, ea as wt, J as jt, b0 as vt, aV as _t, bc as kt, o as Nt, v as St, n as Es, b4 as Ct, bz as pe, b3 as It, bR as At, eb as Ls, ck as ts, cu as as, R as Pt, Q as Rt, c0 as Et, S as Lt, T as Tt, ab as $t, aG as ws, a9 as Mt, aH as Dt, aF as Bt, d3 as Ae, d4 as Ot, cZ as zt, am as Wt, a as qt, ah as Vt, G as Ut, l as Qt, aQ as Gt, ad as Ft, aP as Kt } from "./index-D4dy8yHF.js";
2
- import { e as Zt, d as Ht, g as Yt, f as Xt, A as Jt, i as ea, Q as sa, u as ta, a as aa, S as na } from "./useWorkbenchSession-kwuVHEAF.js";
3
- import { D as Ts } from "./index-DkJpASom.js";
4
- import { Divider as ia } from "./index-q34Z4QAw.js";
5
- var oa = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "defs", attrs: {}, children: [{ tag: "style", attrs: {} }] }, { tag: "path", attrs: { d: "M952 474H829.8C812.5 327.6 696.4 211.5 550 194.2V72c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v122.2C327.6 211.5 211.5 327.6 194.2 474H72c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h122.2C211.5 696.4 327.6 812.5 474 829.8V952c0 4.4 3.6 8 8 8h60c4.4 0 8-3.6 8-8V829.8C696.4 812.5 812.5 696.4 829.8 550H952c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8zM512 756c-134.8 0-244-109.2-244-244s109.2-244 244-244 244 109.2 244 244-109.2 244-244 244z" } }, { tag: "path", attrs: { d: "M512 392c-32.1 0-62.1 12.4-84.8 35.2-22.7 22.7-35.2 52.7-35.2 84.8s12.5 62.1 35.2 84.8C449.9 619.4 480 632 512 632s62.1-12.5 84.8-35.2C619.4 574.1 632 544 632 512s-12.5-62.1-35.2-84.8A118.57 118.57 0 00512 392z" } }] }, name: "aim", theme: "outlined" };
1
+ import { ds as s, af as Qe, d9 as Xs, dZ as Js, aE as et, dF as he, c$ as e, N as ze, bK as ss, a$ as st, bB as tt, bA as _s, i as ve, e1 as ks, ai as qe, L as fs, aq as ls, F as at, bM as nt, cs as Ns, a6 as it, a4 as ot, P as lt, aO as Xe, A as dt, by as Ss, y as rt, aA as ct, b9 as ut, ba as Cs, bb as ht, cu as Is, ea as xt, J as mt, b0 as pt, aV as ft, bc as gt, o as wt, v as bt, n as Ps, b4 as yt, bz as xe, b3 as jt, T as vt, ab as _t, aG as gs, eb as kt, a9 as Nt, aH as St, aF as Ct, ck as It, d2 as Pe, d3 as Pt, cY as At, am as Et, a as Rt, ah as $t, G as Mt, l as Lt, aQ as Tt, ct as Dt, ad as Ot, aP as Bt } from "./index-4FmQg3Zk.js";
2
+ import { l as zt, h as Wt, A as Vt, m as qt, a as Qt, Q as Ut, k as Ae, f as Ft, e as Gt, g as Kt, u as Zt, p as Ht, b as Yt, S as Xt } from "./WorkbenchRuntime-B2C8SbrZ.js";
3
+ import { D as As } from "./index-Cq6GT084.js";
4
+ import { Divider as Jt } from "./index-CFEgQrfn.js";
5
+ var ea = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "defs", attrs: {}, children: [{ tag: "style", attrs: {} }] }, { tag: "path", attrs: { d: "M952 474H829.8C812.5 327.6 696.4 211.5 550 194.2V72c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v122.2C327.6 211.5 211.5 327.6 194.2 474H72c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h122.2C211.5 696.4 327.6 812.5 474 829.8V952c0 4.4 3.6 8 8 8h60c4.4 0 8-3.6 8-8V829.8C696.4 812.5 812.5 696.4 829.8 550H952c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8zM512 756c-134.8 0-244-109.2-244-244s109.2-244 244-244 244 109.2 244 244-109.2 244-244 244z" } }, { tag: "path", attrs: { d: "M512 392c-32.1 0-62.1 12.4-84.8 35.2-22.7 22.7-35.2 52.7-35.2 84.8s12.5 62.1 35.2 84.8C449.9 619.4 480 632 512 632s62.1-12.5 84.8-35.2C619.4 574.1 632 544 632 512s-12.5-62.1-35.2-84.8A118.57 118.57 0 00512 392z" } }] }, name: "aim", theme: "outlined" };
6
+ function ts() {
7
+ return ts = Object.assign ? Object.assign.bind() : function(n) {
8
+ for (var a = 1; a < arguments.length; a++) {
9
+ var o = arguments[a];
10
+ for (var l in o)
11
+ Object.prototype.hasOwnProperty.call(o, l) && (n[l] = o[l]);
12
+ }
13
+ return n;
14
+ }, ts.apply(this, arguments);
15
+ }
16
+ const sa = (n, a) => /* @__PURE__ */ s.createElement(Qe, ts({}, n, {
17
+ ref: a,
18
+ icon: ea
19
+ })), ta = /* @__PURE__ */ s.forwardRef(sa);
20
+ var aa = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M888.3 693.2c-42.5-24.6-94.3-18-129.2 12.8l-53-30.7V523.6c0-15.7-8.4-30.3-22-38.1l-136-78.3v-67.1c44.2-15 76-56.8 76-106.1 0-61.9-50.1-112-112-112s-112 50.1-112 112c0 49.3 31.8 91.1 76 106.1v67.1l-136 78.3c-13.6 7.8-22 22.4-22 38.1v151.6l-53 30.7c-34.9-30.8-86.8-37.4-129.2-12.8-53.5 31-71.7 99.4-41 152.9 30.8 53.5 98.9 71.9 152.2 41 42.5-24.6 62.7-73 53.6-118.8l48.7-28.3 140.6 81c6.8 3.9 14.4 5.9 22 5.9s15.2-2 22-5.9L674.5 740l48.7 28.3c-9.1 45.7 11.2 94.2 53.6 118.8 53.3 30.9 121.5 12.6 152.2-41 30.8-53.6 12.6-122-40.7-152.9zm-673 138.4a47.6 47.6 0 01-65.2-17.6c-13.2-22.9-5.4-52.3 17.5-65.5a47.6 47.6 0 0165.2 17.6c13.2 22.9 5.4 52.3-17.5 65.5zM522 463.8zM464 234a48.01 48.01 0 0196 0 48.01 48.01 0 01-96 0zm170 446.2l-122 70.3-122-70.3V539.8l122-70.3 122 70.3v140.4zm239.9 133.9c-13.2 22.9-42.4 30.8-65.2 17.6-22.8-13.2-30.7-42.6-17.5-65.5s42.4-30.8 65.2-17.6c22.9 13.2 30.7 42.5 17.5 65.5z" } }] }, name: "deployment-unit", theme: "outlined" };
21
+ function as() {
22
+ return as = Object.assign ? Object.assign.bind() : function(n) {
23
+ for (var a = 1; a < arguments.length; a++) {
24
+ var o = arguments[a];
25
+ for (var l in o)
26
+ Object.prototype.hasOwnProperty.call(o, l) && (n[l] = o[l]);
27
+ }
28
+ return n;
29
+ }, as.apply(this, arguments);
30
+ }
31
+ const na = (n, a) => /* @__PURE__ */ s.createElement(Qe, as({}, n, {
32
+ ref: a,
33
+ icon: aa
34
+ })), ia = /* @__PURE__ */ s.forwardRef(na);
35
+ var oa = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M904 160H120c-4.4 0-8 3.6-8 8v64c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-64c0-4.4-3.6-8-8-8zm0 624H120c-4.4 0-8 3.6-8 8v64c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-64c0-4.4-3.6-8-8-8zm0-312H120c-4.4 0-8 3.6-8 8v64c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-64c0-4.4-3.6-8-8-8z" } }] }, name: "menu", theme: "outlined" };
6
36
  function ns() {
7
37
  return ns = Object.assign ? Object.assign.bind() : function(n) {
8
- for (var t = 1; t < arguments.length; t++) {
9
- var i = arguments[t];
10
- for (var l in i)
11
- Object.prototype.hasOwnProperty.call(i, l) && (n[l] = i[l]);
38
+ for (var a = 1; a < arguments.length; a++) {
39
+ var o = arguments[a];
40
+ for (var l in o)
41
+ Object.prototype.hasOwnProperty.call(o, l) && (n[l] = o[l]);
12
42
  }
13
43
  return n;
14
44
  }, ns.apply(this, arguments);
15
45
  }
16
- const la = (n, t) => /* @__PURE__ */ s.createElement(Ue, ns({}, n, {
17
- ref: t,
46
+ const la = (n, a) => /* @__PURE__ */ s.createElement(Qe, ns({}, n, {
47
+ ref: a,
18
48
  icon: oa
19
- })), ra = /* @__PURE__ */ s.forwardRef(la);
20
- var da = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M888.3 693.2c-42.5-24.6-94.3-18-129.2 12.8l-53-30.7V523.6c0-15.7-8.4-30.3-22-38.1l-136-78.3v-67.1c44.2-15 76-56.8 76-106.1 0-61.9-50.1-112-112-112s-112 50.1-112 112c0 49.3 31.8 91.1 76 106.1v67.1l-136 78.3c-13.6 7.8-22 22.4-22 38.1v151.6l-53 30.7c-34.9-30.8-86.8-37.4-129.2-12.8-53.5 31-71.7 99.4-41 152.9 30.8 53.5 98.9 71.9 152.2 41 42.5-24.6 62.7-73 53.6-118.8l48.7-28.3 140.6 81c6.8 3.9 14.4 5.9 22 5.9s15.2-2 22-5.9L674.5 740l48.7 28.3c-9.1 45.7 11.2 94.2 53.6 118.8 53.3 30.9 121.5 12.6 152.2-41 30.8-53.6 12.6-122-40.7-152.9zm-673 138.4a47.6 47.6 0 01-65.2-17.6c-13.2-22.9-5.4-52.3 17.5-65.5a47.6 47.6 0 0165.2 17.6c13.2 22.9 5.4 52.3-17.5 65.5zM522 463.8zM464 234a48.01 48.01 0 0196 0 48.01 48.01 0 01-96 0zm170 446.2l-122 70.3-122-70.3V539.8l122-70.3 122 70.3v140.4zm239.9 133.9c-13.2 22.9-42.4 30.8-65.2 17.6-22.8-13.2-30.7-42.6-17.5-65.5s42.4-30.8 65.2-17.6c22.9 13.2 30.7 42.5 17.5 65.5z" } }] }, name: "deployment-unit", theme: "outlined" };
49
+ })), ws = /* @__PURE__ */ s.forwardRef(la);
50
+ var da = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M705.6 124.9a8 8 0 00-11.6 7.2v64.2c0 5.5 2.9 10.6 7.5 13.6a352.2 352.2 0 0162.2 49.8c32.7 32.8 58.4 70.9 76.3 113.3a355 355 0 0127.9 138.7c0 48.1-9.4 94.8-27.9 138.7a355.92 355.92 0 01-76.3 113.3 353.06 353.06 0 01-113.2 76.4c-43.8 18.6-90.5 28-138.5 28s-94.7-9.4-138.5-28a353.06 353.06 0 01-113.2-76.4A355.92 355.92 0 01184 650.4a355 355 0 01-27.9-138.7c0-48.1 9.4-94.8 27.9-138.7 17.9-42.4 43.6-80.5 76.3-113.3 19-19 39.8-35.6 62.2-49.8 4.7-2.9 7.5-8.1 7.5-13.6V132c0-6-6.3-9.8-11.6-7.2C178.5 195.2 82 339.3 80 506.3 77.2 745.1 272.5 943.5 511.2 944c239 .5 432.8-193.3 432.8-432.4 0-169.2-97-315.7-238.4-386.7zM480 560h64c4.4 0 8-3.6 8-8V88c0-4.4-3.6-8-8-8h-64c-4.4 0-8 3.6-8 8v464c0 4.4 3.6 8 8 8z" } }] }, name: "poweroff", theme: "outlined" };
21
51
  function is() {
22
52
  return is = Object.assign ? Object.assign.bind() : function(n) {
23
- for (var t = 1; t < arguments.length; t++) {
24
- var i = arguments[t];
25
- for (var l in i)
26
- Object.prototype.hasOwnProperty.call(i, l) && (n[l] = i[l]);
53
+ for (var a = 1; a < arguments.length; a++) {
54
+ var o = arguments[a];
55
+ for (var l in o)
56
+ Object.prototype.hasOwnProperty.call(o, l) && (n[l] = o[l]);
27
57
  }
28
58
  return n;
29
59
  }, is.apply(this, arguments);
30
60
  }
31
- const ca = (n, t) => /* @__PURE__ */ s.createElement(Ue, is({}, n, {
32
- ref: t,
61
+ const ra = (n, a) => /* @__PURE__ */ s.createElement(Qe, is({}, n, {
62
+ ref: a,
33
63
  icon: da
34
- })), ua = /* @__PURE__ */ s.forwardRef(ca);
35
- var ha = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M904 160H120c-4.4 0-8 3.6-8 8v64c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-64c0-4.4-3.6-8-8-8zm0 624H120c-4.4 0-8 3.6-8 8v64c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-64c0-4.4-3.6-8-8-8zm0-312H120c-4.4 0-8 3.6-8 8v64c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-64c0-4.4-3.6-8-8-8z" } }] }, name: "menu", theme: "outlined" };
64
+ })), ca = /* @__PURE__ */ s.forwardRef(ra);
65
+ var ua = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M876.6 239.5c-.5-.9-1.2-1.8-2-2.5-5-5-13.1-5-18.1 0L684.2 409.3l-67.9-67.9L788.7 169c.8-.8 1.4-1.6 2-2.5 3.6-6.1 1.6-13.9-4.5-17.5-98.2-58-226.8-44.7-311.3 39.7-67 67-89.2 162-66.5 247.4l-293 293c-3 3-2.8 7.9.3 11l169.7 169.7c3.1 3.1 8.1 3.3 11 .3l292.9-292.9c85.5 22.8 180.5.7 247.6-66.4 84.4-84.5 97.7-213.1 39.7-311.3zM786 499.8c-58.1 58.1-145.3 69.3-214.6 33.6l-8.8 8.8-.1-.1-274 274.1-79.2-79.2 230.1-230.1s0 .1.1.1l52.8-52.8c-35.7-69.3-24.5-156.5 33.6-214.6a184.2 184.2 0 01144-53.5L537 318.9a32.05 32.05 0 000 45.3l124.5 124.5a32.05 32.05 0 0045.3 0l132.8-132.8c3.7 51.8-14.4 104.8-53.6 143.9z" } }] }, name: "tool", theme: "outlined" };
36
66
  function os() {
37
67
  return os = Object.assign ? Object.assign.bind() : function(n) {
38
- for (var t = 1; t < arguments.length; t++) {
39
- var i = arguments[t];
40
- for (var l in i)
41
- Object.prototype.hasOwnProperty.call(i, l) && (n[l] = i[l]);
68
+ for (var a = 1; a < arguments.length; a++) {
69
+ var o = arguments[a];
70
+ for (var l in o)
71
+ Object.prototype.hasOwnProperty.call(o, l) && (n[l] = o[l]);
42
72
  }
43
73
  return n;
44
74
  }, os.apply(this, arguments);
45
75
  }
46
- const xa = (n, t) => /* @__PURE__ */ s.createElement(Ue, os({}, n, {
47
- ref: t,
48
- icon: ha
49
- })), js = /* @__PURE__ */ s.forwardRef(xa);
50
- var ma = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M705.6 124.9a8 8 0 00-11.6 7.2v64.2c0 5.5 2.9 10.6 7.5 13.6a352.2 352.2 0 0162.2 49.8c32.7 32.8 58.4 70.9 76.3 113.3a355 355 0 0127.9 138.7c0 48.1-9.4 94.8-27.9 138.7a355.92 355.92 0 01-76.3 113.3 353.06 353.06 0 01-113.2 76.4c-43.8 18.6-90.5 28-138.5 28s-94.7-9.4-138.5-28a353.06 353.06 0 01-113.2-76.4A355.92 355.92 0 01184 650.4a355 355 0 01-27.9-138.7c0-48.1 9.4-94.8 27.9-138.7 17.9-42.4 43.6-80.5 76.3-113.3 19-19 39.8-35.6 62.2-49.8 4.7-2.9 7.5-8.1 7.5-13.6V132c0-6-6.3-9.8-11.6-7.2C178.5 195.2 82 339.3 80 506.3 77.2 745.1 272.5 943.5 511.2 944c239 .5 432.8-193.3 432.8-432.4 0-169.2-97-315.7-238.4-386.7zM480 560h64c4.4 0 8-3.6 8-8V88c0-4.4-3.6-8-8-8h-64c-4.4 0-8 3.6-8 8v464c0 4.4 3.6 8 8 8z" } }] }, name: "poweroff", theme: "outlined" };
51
- function ls() {
52
- return ls = Object.assign ? Object.assign.bind() : function(n) {
53
- for (var t = 1; t < arguments.length; t++) {
54
- var i = arguments[t];
55
- for (var l in i)
56
- Object.prototype.hasOwnProperty.call(i, l) && (n[l] = i[l]);
57
- }
58
- return n;
59
- }, ls.apply(this, arguments);
60
- }
61
- const pa = (n, t) => /* @__PURE__ */ s.createElement(Ue, ls({}, n, {
62
- ref: t,
63
- icon: ma
64
- })), fa = /* @__PURE__ */ s.forwardRef(pa);
65
- var ga = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M876.6 239.5c-.5-.9-1.2-1.8-2-2.5-5-5-13.1-5-18.1 0L684.2 409.3l-67.9-67.9L788.7 169c.8-.8 1.4-1.6 2-2.5 3.6-6.1 1.6-13.9-4.5-17.5-98.2-58-226.8-44.7-311.3 39.7-67 67-89.2 162-66.5 247.4l-293 293c-3 3-2.8 7.9.3 11l169.7 169.7c3.1 3.1 8.1 3.3 11 .3l292.9-292.9c85.5 22.8 180.5.7 247.6-66.4 84.4-84.5 97.7-213.1 39.7-311.3zM786 499.8c-58.1 58.1-145.3 69.3-214.6 33.6l-8.8 8.8-.1-.1-274 274.1-79.2-79.2 230.1-230.1s0 .1.1.1l52.8-52.8c-35.7-69.3-24.5-156.5 33.6-214.6a184.2 184.2 0 01144-53.5L537 318.9a32.05 32.05 0 000 45.3l124.5 124.5a32.05 32.05 0 0045.3 0l132.8-132.8c3.7 51.8-14.4 104.8-53.6 143.9z" } }] }, name: "tool", theme: "outlined" };
66
- function rs() {
67
- return rs = Object.assign ? Object.assign.bind() : function(n) {
68
- for (var t = 1; t < arguments.length; t++) {
69
- var i = arguments[t];
70
- for (var l in i)
71
- Object.prototype.hasOwnProperty.call(i, l) && (n[l] = i[l]);
72
- }
73
- return n;
74
- }, rs.apply(this, arguments);
75
- }
76
- const ba = (n, t) => /* @__PURE__ */ s.createElement(Ue, rs({}, n, {
77
- ref: t,
78
- icon: ga
79
- })), ya = /* @__PURE__ */ s.forwardRef(ba);
80
- function wa({
81
- active: n,
82
- agents: t,
83
- collapsed: i,
84
- onToggle: l,
85
- className: c,
86
- activeView: f = "chat",
87
- onViewChange: d,
88
- onToolboxOpen: m,
89
- showLogout: k,
90
- onLogout: v,
91
- sidebarAgentMode: w = !1,
92
- onToggleSidebarMode: x,
93
- onAgentSelect: j
94
- }) {
95
- const b = localStorage.getItem("sso_domain") || "", V = [
96
- { key: "chat", icon: /* @__PURE__ */ e.jsx(Zt, {}), title: "对话" },
97
- ...["maiduo", "eccang"].includes(b) ? [
98
- {
99
- key: "plan",
100
- icon: /* @__PURE__ */ e.jsx(ua, {}),
101
- title: "自动化Beta"
102
- }
103
- ] : [],
104
- {
105
- key: "professional",
106
- icon: /* @__PURE__ */ e.jsx(nt, {}),
107
- title: "专业智能体"
108
- }
109
- ], y = [
110
- ...b === "yunduo" ? [] : [
111
- { key: "toolbox", icon: /* @__PURE__ */ e.jsx(ya, {}), label: "工具箱" },
112
- { key: "goals", icon: /* @__PURE__ */ e.jsx(ra, {}), label: "目标追踪" }
113
- ],
114
- { key: "settings", icon: /* @__PURE__ */ e.jsx(Ht, {}), label: "通知配置" }
115
- ];
116
- return /* @__PURE__ */ e.jsx("div", { className: "wandox-aside-wrap", children: /* @__PURE__ */ e.jsxs(
117
- "div",
118
- {
119
- className: `wandox-aside ${i ? "wandox-aside--collapsed" : ""} ${c || ""}`,
120
- "aria-hidden": i,
121
- children: [
122
- /* @__PURE__ */ e.jsxs("div", { className: "wandox-aside-header", children: [
123
- /* @__PURE__ */ e.jsx("span", { className: "wandox-aside-header__title", children: "AI 智能体" }),
124
- l && /* @__PURE__ */ e.jsx(
125
- "button",
126
- {
127
- type: "button",
128
- className: "wandox-aside-header-toggle",
129
- onClick: l,
130
- "aria-label": i ? "展开侧边栏" : "收起侧边栏",
131
- title: i ? "展开侧边栏" : "收起侧边栏",
132
- children: /* @__PURE__ */ e.jsxs(
133
- "svg",
134
- {
135
- xmlns: "http://www.w3.org/2000/svg",
136
- width: "18",
137
- height: "18",
138
- fill: "none",
139
- viewBox: "0 0 24 24",
140
- children: [
141
- /* @__PURE__ */ e.jsx("title", { children: i ? "展开侧边栏" : "收起侧边栏" }),
142
- /* @__PURE__ */ e.jsx(
143
- "path",
144
- {
145
- fill: "currentColor",
146
- d: "M21 5H11v14h10zM3 5h6v14H3zm0-2a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h18a2 2 0 0 0 2-2V5a2 2 0 0 0-2-2zm2 4.25a.75.75 0 0 0 0 1.5h2a.75.75 0 0 0 0-1.5zm-.75 3.5A.75.75 0 0 1 5 10h2a.75.75 0 0 1 0 1.5H5a.75.75 0 0 1-.75-.75m.75 2a.75.75 0 0 0 0 1.5h2a.75.75 0 0 0 0-1.5z"
147
- }
148
- )
149
- ]
150
- }
151
- )
152
- }
153
- )
154
- ] }),
155
- /* @__PURE__ */ e.jsx("div", { className: "wandox-aside-main-nav", children: /* @__PURE__ */ e.jsx("div", { className: "wandox-aside-nav-list", children: V.map((r) => {
156
- const u = f === r.key, C = r.key === "professional";
157
- return /* @__PURE__ */ e.jsxs("div", { children: [
158
- /* @__PURE__ */ e.jsxs(
159
- "div",
160
- {
161
- className: `wandox-aside-nav-item-wrap${u ? " wandox-aside-nav-item-wrap--active" : ""}`,
162
- children: [
163
- /* @__PURE__ */ e.jsxs(
164
- "button",
165
- {
166
- type: "button",
167
- onClick: () => d == null ? void 0 : d(r.key),
168
- className: `wandox-aside-nav-item${u ? " wandox-aside-nav-item--active" : ""}`,
169
- children: [
170
- /* @__PURE__ */ e.jsx("span", { className: "wandox-aside-nav-icon", children: r.icon }),
171
- /* @__PURE__ */ e.jsx("span", { className: "wandox-aside-nav-title", children: r.title })
172
- ]
173
- }
174
- ),
175
- C && !i && x && /* @__PURE__ */ e.jsx(
176
- ss,
177
- {
178
- title: w ? "收起列表" : "展开列表",
179
- placement: "right",
180
- children: /* @__PURE__ */ e.jsx(
181
- "button",
182
- {
183
- type: "button",
184
- className: `wandox-aside-mode-toggle${w ? " wandox-aside-mode-toggle--active" : ""}`,
185
- onClick: (_) => {
186
- _.stopPropagation(), x();
187
- },
188
- children: w ? /* @__PURE__ */ e.jsx(at, { style: { fontSize: 11 } }) : /* @__PURE__ */ e.jsx(Ss, { style: { fontSize: 11 } })
189
- }
190
- )
191
- }
192
- )
193
- ]
194
- }
195
- ),
196
- C && (w || i) && /* @__PURE__ */ e.jsx("div", { className: "wandox-aside-agent-list", children: t.map((_) => {
197
- const O = _.agent_id;
198
- if (!O) return null;
199
- const N = n === O && f === "professional";
200
- return /* @__PURE__ */ e.jsx(
201
- ss,
202
- {
203
- title: _.name,
204
- placement: "right",
205
- children: /* @__PURE__ */ e.jsxs(
206
- "button",
207
- {
208
- type: "button",
209
- className: `wandox-aside-agent-item${N ? " wandox-aside-agent-item--active" : ""}`,
210
- onClick: () => {
211
- j == null || j(O), f !== "professional" && (d == null || d("professional"));
212
- },
213
- children: [
214
- /* @__PURE__ */ e.jsx("span", { className: "wandox-aside-agent-icon", children: Pe(_.icon) }),
215
- /* @__PURE__ */ e.jsx("span", { className: "wandox-aside-agent-name", children: _.name })
216
- ]
217
- }
218
- )
219
- },
220
- O
221
- );
222
- }) })
223
- ] }, r.key);
224
- }) }) }),
225
- /* @__PURE__ */ e.jsxs("div", { className: "wandox-aside-bottom", children: [
226
- /* @__PURE__ */ e.jsx("p", { className: "wandox-aside-group-label", children: "系统功能" }),
227
- /* @__PURE__ */ e.jsxs("div", { className: "wandox-aside-nav-list wandox-aside-nav-list--bottom", children: [
228
- y.map((r) => {
229
- const u = r.key !== "toolbox" && f === r.key;
230
- return /* @__PURE__ */ e.jsxs(
231
- "button",
232
- {
233
- type: "button",
234
- onClick: () => {
235
- if (r.key === "toolbox") {
236
- m == null || m();
237
- return;
238
- }
239
- d == null || d(r.key);
240
- },
241
- className: `wandox-aside-nav-item${u ? " wandox-aside-nav-item--active" : ""}`,
242
- children: [
243
- /* @__PURE__ */ e.jsx("span", { className: "wandox-aside-nav-icon", children: r.icon }),
244
- /* @__PURE__ */ e.jsx("span", { className: "wandox-aside-nav-title", children: r.label })
245
- ]
246
- },
247
- r.key
248
- );
249
- }),
250
- k && /* @__PURE__ */ e.jsxs(
251
- "button",
252
- {
253
- type: "button",
254
- onClick: v,
255
- className: "wandox-aside-nav-item wandox-aside-nav-item--logout",
256
- children: [
257
- /* @__PURE__ */ e.jsx("span", { className: "wandox-aside-nav-icon", children: /* @__PURE__ */ e.jsx(fa, {}) }),
258
- /* @__PURE__ */ e.jsx("span", { className: "wandox-aside-nav-title", children: "退出登录" })
259
- ]
260
- }
261
- )
262
- ] }),
263
- /* @__PURE__ */ e.jsx("div", { style: { height: 8 } })
264
- ] })
265
- ]
266
- }
267
- ) });
268
- }
269
- function ja(n) {
270
- const { children: t } = n;
271
- return /* @__PURE__ */ e.jsx("div", { className: "wandox-layout wandox-root", children: /* @__PURE__ */ e.jsx("main", { className: "wandox-layout-content", style: { padding: 0 }, children: t }) });
272
- }
273
- function va(n) {
76
+ const ha = (n, a) => /* @__PURE__ */ s.createElement(Qe, os({}, n, {
77
+ ref: a,
78
+ icon: ua
79
+ })), xa = /* @__PURE__ */ s.forwardRef(ha);
80
+ function ma(n) {
274
81
  return n instanceof Error ? n.message : "上传失败";
275
82
  }
276
- function _a({
83
+ function pa({
277
84
  open: n,
278
- playbook: t,
279
- onClose: i,
85
+ playbook: a,
86
+ onClose: o,
280
87
  onSubmit: l
281
88
  }) {
282
- const c = s.useMemo(
283
- () => it(t == null ? void 0 : t.input_fields),
284
- [t]
285
- ), [f, d] = s.useState({}), [m, k] = s.useState({}), [v, w] = s.useState({}), x = ot(c, f, d), j = s.useMemo(
286
- () => Yt(c, f),
287
- [c, f]
89
+ const f = s.useMemo(
90
+ () => Xs(a == null ? void 0 : a.input_fields),
91
+ [a]
92
+ ), [g, r] = s.useState({}), [x, N] = s.useState({}), [v, y] = s.useState({}), m = Js(f, g, r), j = s.useMemo(
93
+ () => zt(f, g),
94
+ [f, g]
288
95
  );
289
96
  s.useEffect(() => {
290
- n && (d(Xt(c, (t == null ? void 0 : t.initial_params) ?? {})), k({}), w({}));
291
- }, [c, n, t == null ? void 0 : t.initial_params]);
292
- const b = s.useCallback((y, r) => {
293
- d((u) => ({ ...u, [y]: r }));
294
- }, []), V = s.useCallback(
295
- (y, r) => async ({ file: u, onSuccess: C, onError: _ }) => {
296
- var O, N;
297
- k((F) => ({ ...F, [y]: !0 }));
97
+ n && (r(Wt(f, (a == null ? void 0 : a.initial_params) ?? {})), N({}), y({}));
98
+ }, [f, n, a == null ? void 0 : a.initial_params]);
99
+ const w = s.useCallback((b, d) => {
100
+ r((c) => ({ ...c, [b]: d }));
101
+ }, []), O = s.useCallback(
102
+ (b, d) => async ({ file: c, onSuccess: I, onError: _ }) => {
103
+ var M, P;
104
+ N((Q) => ({ ...Q, [b]: !0 }));
298
105
  try {
299
- const F = u, E = await lt(F), W = (O = E == null ? void 0 : E.data) == null ? void 0 : O.url, P = ((N = E == null ? void 0 : E.data) == null ? void 0 : N.name) || F.name;
300
- if (!W) throw new Error("上传结果缺少文件地址");
301
- w((R) => ({ ...R, [W]: P })), d((R) => {
302
- if (r <= 1) return { ...R, [y]: W };
303
- const z = Array.isArray(R[y]) ? R[y] : R[y] ? [R[y]] : [];
304
- return { ...R, [y]: [...z, W] };
305
- }), C == null || C(E), oe.success("上传成功");
306
- } catch (F) {
307
- const E = F instanceof Error ? F : new Error(va(F));
308
- _ == null || _(E), oe.error(E.message);
106
+ const Q = c, L = await et(Q), B = (M = L == null ? void 0 : L.data) == null ? void 0 : M.url, A = ((P = L == null ? void 0 : L.data) == null ? void 0 : P.name) || Q.name;
107
+ if (!B) throw new Error("上传结果缺少文件地址");
108
+ y((E) => ({ ...E, [B]: A })), r((E) => {
109
+ if (d <= 1) return { ...E, [b]: B };
110
+ const U = Array.isArray(E[b]) ? E[b] : E[b] ? [E[b]] : [];
111
+ return { ...E, [b]: [...U, B] };
112
+ }), I == null || I(L), he.success("上传成功");
113
+ } catch (Q) {
114
+ const L = Q instanceof Error ? Q : new Error(ma(Q));
115
+ _ == null || _(L), he.error(L.message);
309
116
  } finally {
310
- k((F) => ({ ...F, [y]: !1 }));
117
+ N((Q) => ({ ...Q, [b]: !1 }));
311
118
  }
312
119
  },
313
120
  []
314
- ), Q = () => {
315
- if (!t) return;
316
- const y = j.filter(
317
- (r) => r.required && ea(f[r.name])
121
+ ), W = () => {
122
+ if (!a) return;
123
+ const b = j.filter(
124
+ (d) => d.required && qt(g[d.name])
318
125
  );
319
- if (y.length > 0) {
320
- oe.warning(
321
- `请填写必填参数:${y.map((r) => r.label).join("、")}`
126
+ if (b.length > 0) {
127
+ he.warning(
128
+ `请填写必填参数:${b.map((d) => d.label).join("、")}`
322
129
  );
323
130
  return;
324
131
  }
325
- l(t, f);
132
+ l(a, g);
326
133
  };
327
134
  return /* @__PURE__ */ e.jsxs(
328
- Ts,
135
+ As,
329
136
  {
330
137
  className: "wandox-playbook-params-drawer",
331
138
  title: /* @__PURE__ */ e.jsxs("div", { className: "wandox-playbook-params-drawer__title", children: [
332
139
  /* @__PURE__ */ e.jsx("span", { className: "wandox-playbook-params-drawer__title-main", children: "填写执行参数" }),
333
- /* @__PURE__ */ e.jsx("span", { className: "wandox-playbook-params-drawer__title-sub", children: t == null ? void 0 : t.name })
140
+ /* @__PURE__ */ e.jsx("span", { className: "wandox-playbook-params-drawer__title-sub", children: a == null ? void 0 : a.name })
334
141
  ] }),
335
142
  open: n,
336
143
  size: 640,
337
144
  destroyOnHidden: !0,
338
145
  maskClosable: !1,
339
- onClose: i,
340
- footer: /* @__PURE__ */ e.jsx("div", { className: "wandox-playbook-params-drawer__footer", children: /* @__PURE__ */ e.jsxs(Cs, { children: [
341
- /* @__PURE__ */ e.jsx(_e, { onClick: i, children: "取消" }),
342
- /* @__PURE__ */ e.jsx(_e, { type: "primary", onClick: Q, children: "开始执行" })
146
+ onClose: o,
147
+ footer: /* @__PURE__ */ e.jsx("div", { className: "wandox-playbook-params-drawer__footer", children: /* @__PURE__ */ e.jsxs(_s, { children: [
148
+ /* @__PURE__ */ e.jsx(ve, { onClick: o, children: "取消" }),
149
+ /* @__PURE__ */ e.jsx(ve, { type: "primary", onClick: W, children: "开始执行" })
343
150
  ] }) }),
344
151
  children: [
345
152
  /* @__PURE__ */ e.jsxs("div", { className: "wandox-playbook-params-drawer__intro", children: [
@@ -350,32 +157,32 @@ function _a({
350
157
  ] })
351
158
  ] }),
352
159
  /* @__PURE__ */ e.jsxs(ze, { layout: "vertical", className: "wandox-playbook-params-drawer__form", children: [
353
- j.map((y) => /* @__PURE__ */ e.jsx(
160
+ j.map((b) => /* @__PURE__ */ e.jsx(
354
161
  ze.Item,
355
162
  {
356
- required: y.required,
163
+ required: b.required,
357
164
  label: /* @__PURE__ */ e.jsxs("span", { className: "wandox-playbook-params-drawer__label", children: [
358
- y.label,
359
- y.description || y.hint ? /* @__PURE__ */ e.jsx(ss, { title: y.description || y.hint, children: /* @__PURE__ */ e.jsx(rt, { "aria-label": `${y.label}说明` }) }) : null
165
+ b.label,
166
+ b.description || b.hint ? /* @__PURE__ */ e.jsx(ss, { title: b.description || b.hint, children: /* @__PURE__ */ e.jsx(st, { "aria-label": `${b.label}说明` }) }) : null
360
167
  ] }),
361
168
  children: /* @__PURE__ */ e.jsx(
362
- Jt,
169
+ Vt,
363
170
  {
364
- field: y,
365
- value: f[y.name],
366
- uploading: !!m[y.name],
171
+ field: b,
172
+ value: g[b.name],
173
+ uploading: !!x[b.name],
367
174
  fileNameMap: v,
368
- getOptionState: x.getFieldState,
369
- onChange: b,
370
- onUpload: V,
371
- onDownloadTemplate: (r) => window.open(r.path, "_blank", "noopener,noreferrer")
175
+ getOptionState: m.getFieldState,
176
+ onChange: w,
177
+ onUpload: O,
178
+ onDownloadTemplate: (d) => window.open(d.path, "_blank", "noopener,noreferrer")
372
179
  }
373
180
  )
374
181
  },
375
- y.name
182
+ b.name
376
183
  )),
377
184
  j.length === 0 ? /* @__PURE__ */ e.jsxs("div", { className: "wandox-playbook-params-drawer__empty", children: [
378
- /* @__PURE__ */ e.jsx(dt, { size: "small" }),
185
+ /* @__PURE__ */ e.jsx(tt, { size: "small" }),
379
186
  " 正在读取参数配置"
380
187
  ] }) : null
381
188
  ] })
@@ -383,60 +190,60 @@ function _a({
383
190
  }
384
191
  );
385
192
  }
386
- function ka({
193
+ function fa({
387
194
  playbooks: n,
388
- onPlaybookClick: t,
389
- onPlaybookDelete: i,
195
+ onPlaybookClick: a,
196
+ onPlaybookDelete: o,
390
197
  activePlaybookId: l
391
198
  }) {
392
- const { t: c } = Is(), [f, d] = s.useState(""), [m, k] = s.useState(!1), [v, w] = s.useState(
199
+ const { t: f } = ks(), [g, r] = s.useState(""), [x, N] = s.useState(!1), [v, y] = s.useState(
393
200
  null
394
- ), [x, j] = s.useState(!1), b = n.filter(
395
- (r) => {
396
- var u;
397
- return r.name.toLowerCase().includes(f.toLowerCase()) || ((u = r.description) == null ? void 0 : u.toLowerCase().includes(f.toLowerCase()));
201
+ ), [m, j] = s.useState(!1), w = n.filter(
202
+ (d) => {
203
+ var c;
204
+ return d.name.toLowerCase().includes(g.toLowerCase()) || ((c = d.description) == null ? void 0 : c.toLowerCase().includes(g.toLowerCase()));
398
205
  }
399
- ), V = (r, u) => {
400
- u.stopPropagation(), w(r), k(!0);
401
- }, Q = async () => {
206
+ ), O = (d, c) => {
207
+ c.stopPropagation(), y(d), N(!0);
208
+ }, W = async () => {
402
209
  if (v) {
403
210
  j(!0);
404
211
  try {
405
- await ct(
212
+ await at(
406
213
  v.playbook_id
407
- ), i == null || i(v.playbook_id), k(!1), w(null);
214
+ ), o == null || o(v.playbook_id), N(!1), y(null);
408
215
  } catch {
409
216
  } finally {
410
217
  j(!1);
411
218
  }
412
219
  }
413
- }, y = () => {
414
- k(!1), w(null);
220
+ }, b = () => {
221
+ N(!1), y(null);
415
222
  };
416
223
  return /* @__PURE__ */ e.jsxs("div", { className: "wandox-solidified-list", children: [
417
224
  /* @__PURE__ */ e.jsx("div", { className: "wandox-solidified-list-search", children: /* @__PURE__ */ e.jsx(
418
- Ve.Search,
225
+ qe.Search,
419
226
  {
420
227
  placeholder: "搜索",
421
- value: f,
422
- onChange: (r) => d(r.target.value),
228
+ value: g,
229
+ onChange: (d) => r(d.target.value),
423
230
  allowClear: !0,
424
231
  enterButton: !1
425
232
  }
426
233
  ) }),
427
- /* @__PURE__ */ e.jsx("div", { className: "wandox-solidified-list-content", children: b.length === 0 ? /* @__PURE__ */ e.jsx(
428
- bs,
234
+ /* @__PURE__ */ e.jsx("div", { className: "wandox-solidified-list-content", children: w.length === 0 ? /* @__PURE__ */ e.jsx(
235
+ fs,
429
236
  {
430
- description: c(f ? "noData" : "solidified.empty"),
431
- image: bs.PRESENTED_IMAGE_SIMPLE
237
+ description: f(g ? "noData" : "solidified.empty"),
238
+ image: fs.PRESENTED_IMAGE_SIMPLE
432
239
  }
433
- ) : /* @__PURE__ */ e.jsx("div", { className: "wandox-solidified-list-grid", children: b.map((r) => /* @__PURE__ */ e.jsxs(
240
+ ) : /* @__PURE__ */ e.jsx("div", { className: "wandox-solidified-list-grid", children: w.map((d) => /* @__PURE__ */ e.jsxs(
434
241
  "div",
435
242
  {
436
- className: `wandox-solidified-card ${l === r.playbook_id ? "active" : ""}`,
437
- onClick: () => t == null ? void 0 : t(r.playbook_id),
438
- onKeyDown: (u) => {
439
- (u.key === "Enter" || u.key === " ") && (t == null || t(r.playbook_id));
243
+ className: `wandox-solidified-card ${l === d.playbook_id ? "active" : ""}`,
244
+ onClick: () => a == null ? void 0 : a(d.playbook_id),
245
+ onKeyDown: (c) => {
246
+ (c.key === "Enter" || c.key === " ") && (a == null || a(d.playbook_id));
440
247
  },
441
248
  role: "button",
442
249
  tabIndex: 0,
@@ -477,16 +284,16 @@ function ka({
477
284
  }
478
285
  ) }),
479
286
  /* @__PURE__ */ e.jsxs("div", { className: "wandox-solidified-card-content", children: [
480
- /* @__PURE__ */ e.jsx("div", { className: "wandox-solidified-card-name", children: r.name }),
481
- r.description && /* @__PURE__ */ e.jsx("div", { className: "wandox-solidified-card-desc", children: r.description })
287
+ /* @__PURE__ */ e.jsx("div", { className: "wandox-solidified-card-name", children: d.name }),
288
+ d.description && /* @__PURE__ */ e.jsx("div", { className: "wandox-solidified-card-desc", children: d.description })
482
289
  ] }),
483
290
  /* @__PURE__ */ e.jsx(
484
291
  "button",
485
292
  {
486
293
  type: "button",
487
294
  className: "wandox-solidified-card-delete",
488
- onClick: (u) => V(r, u),
489
- title: c("solidified.delete"),
295
+ onClick: (c) => O(d, c),
296
+ title: f("solidified.delete"),
490
297
  children: /* @__PURE__ */ e.jsx(
491
298
  "svg",
492
299
  {
@@ -512,20 +319,20 @@ function ka({
512
319
  )
513
320
  ]
514
321
  },
515
- r.playbook_id
322
+ d.playbook_id
516
323
  )) }) }),
517
324
  /* @__PURE__ */ e.jsx(
518
- ds,
325
+ ls,
519
326
  {
520
- title: c("solidified.deleteConfirm"),
521
- open: m,
522
- onOk: Q,
523
- onCancel: y,
524
- okText: c("confirm"),
525
- cancelText: c("cancel"),
526
- okButtonProps: { danger: !0, loading: x },
327
+ title: f("solidified.deleteConfirm"),
328
+ open: x,
329
+ onOk: W,
330
+ onCancel: b,
331
+ okText: f("confirm"),
332
+ cancelText: f("cancel"),
333
+ okButtonProps: { danger: !0, loading: m },
527
334
  children: /* @__PURE__ */ e.jsxs("p", { children: [
528
- c("solidified.deleteConfirm"),
335
+ f("solidified.deleteConfirm"),
529
336
  " 「",
530
337
  v == null ? void 0 : v.name,
531
338
  "」?"
@@ -534,41 +341,41 @@ function ka({
534
341
  )
535
342
  ] });
536
343
  }
537
- function Na({
344
+ function ga({
538
345
  inputParams: n,
539
- onSearch: t,
540
- loading: i = !1
346
+ onSearch: a,
347
+ loading: o = !1
541
348
  }) {
542
349
  const [l] = ze.useForm();
543
350
  s.useEffect(() => {
544
- const d = {};
545
- for (const m of n)
546
- m.default !== void 0 && m.default !== null && m.default !== "" && (d[m.name] = m.default);
547
- l.setFieldsValue(d);
351
+ const r = {};
352
+ for (const x of n)
353
+ x.default !== void 0 && x.default !== null && x.default !== "" && (r[x.name] = x.default);
354
+ l.setFieldsValue(r);
548
355
  }, [n, l]);
549
- const c = () => {
550
- l.validateFields().then((d) => {
551
- const m = {};
552
- for (const k of Object.keys(d)) {
553
- const v = d[k];
554
- v != null && v !== "" && (m[k] = v);
356
+ const f = () => {
357
+ l.validateFields().then((r) => {
358
+ const x = {};
359
+ for (const N of Object.keys(r)) {
360
+ const v = r[N];
361
+ v != null && v !== "" && (x[N] = v);
555
362
  }
556
- t(m);
363
+ a(x);
557
364
  });
558
- }, f = (d) => {
559
- const { name: m, type: k, description: v } = d, w = {
560
- placeholder: v || `请输入${m}`
365
+ }, g = (r) => {
366
+ const { name: x, type: N, description: v } = r, y = {
367
+ placeholder: v || `请输入${x}`
561
368
  };
562
- switch (k) {
369
+ switch (N) {
563
370
  case "integer":
564
- return /* @__PURE__ */ e.jsx(ut, { ...w, style: { width: "100%" } });
371
+ return /* @__PURE__ */ e.jsx(nt, { ...y, style: { width: "100%" } });
565
372
  case "array":
566
- return /* @__PURE__ */ e.jsx(Ve, { ...w });
373
+ return /* @__PURE__ */ e.jsx(qe, { ...y });
567
374
  case "boolean":
568
- return /* @__PURE__ */ e.jsx(Ve, { ...w });
375
+ return /* @__PURE__ */ e.jsx(qe, { ...y });
569
376
  case "string":
570
377
  default:
571
- return /* @__PURE__ */ e.jsx(Ve, { ...w });
378
+ return /* @__PURE__ */ e.jsx(qe, { ...y });
572
379
  }
573
380
  };
574
381
  return /* @__PURE__ */ e.jsx("div", { className: "wandox-solidify-params-form", children: /* @__PURE__ */ e.jsxs(
@@ -576,254 +383,254 @@ function Na({
576
383
  {
577
384
  form: l,
578
385
  layout: "inline",
579
- onFinish: c,
386
+ onFinish: f,
580
387
  style: { marginBottom: 16 },
581
388
  children: [
582
- n.map((d) => /* @__PURE__ */ e.jsx(
389
+ n.map((r) => /* @__PURE__ */ e.jsx(
583
390
  ze.Item,
584
391
  {
585
- name: d.name,
586
- label: d.description || d.name,
392
+ name: r.name,
393
+ label: r.description || r.name,
587
394
  rules: [
588
395
  {
589
- required: d.required,
590
- message: `请输入${d.description || d.name}`
396
+ required: r.required,
397
+ message: `请输入${r.description || r.name}`
591
398
  }
592
399
  ],
593
400
  style: { marginBottom: 8 },
594
- children: f(d)
401
+ children: g(r)
595
402
  },
596
- d.name
403
+ r.name
597
404
  )),
598
- /* @__PURE__ */ e.jsx(ze.Item, { style: { marginBottom: 8 }, children: /* @__PURE__ */ e.jsx(_e, { type: "primary", htmlType: "submit", loading: i, children: "查询" }) })
405
+ /* @__PURE__ */ e.jsx(ze.Item, { style: { marginBottom: 8 }, children: /* @__PURE__ */ e.jsx(ve, { type: "primary", htmlType: "submit", loading: o, children: "查询" }) })
599
406
  ]
600
407
  }
601
408
  ) });
602
409
  }
603
- function Sa({
410
+ function wa({
604
411
  open: n,
605
- loading: t,
606
- playbooks: i,
412
+ loading: a,
413
+ playbooks: o,
607
414
  activePlaybookId: l,
608
- onClose: c,
609
- onPlaybookClick: f,
610
- onPlaybookDelete: d
415
+ onClose: f,
416
+ onPlaybookClick: g,
417
+ onPlaybookDelete: r
611
418
  }) {
612
419
  return /* @__PURE__ */ e.jsx(
613
- Ts,
420
+ As,
614
421
  {
615
422
  title: "工具箱",
616
423
  placement: "right",
617
424
  size: "min(440px, 100vw)",
618
425
  open: n,
619
- loading: t,
620
- onClose: c,
426
+ loading: a,
427
+ onClose: f,
621
428
  getContainer: !1,
622
429
  rootClassName: "wandox-toolbox-drawer",
623
430
  styles: { body: { padding: 0, overflow: "hidden" } },
624
431
  children: /* @__PURE__ */ e.jsx(
625
- ka,
432
+ fa,
626
433
  {
627
- playbooks: i,
628
- onPlaybookClick: f,
629
- onPlaybookDelete: d,
434
+ playbooks: o,
435
+ onPlaybookClick: g,
436
+ onPlaybookDelete: r,
630
437
  activePlaybookId: l
631
438
  }
632
439
  )
633
440
  }
634
441
  );
635
442
  }
636
- const Ca = "https://ai.maiduox.com/#/aitools/operation/product";
637
- function Ia(n) {
443
+ const ba = "https://ai.maiduox.com/#/aitools/operation/product";
444
+ function ya(n) {
638
445
  const {
639
- title: t,
640
- widgets: i,
446
+ title: a,
447
+ widgets: o,
641
448
  ssoDomain: l,
642
- ssoToken: c,
643
- ssoCompany: f,
644
- onExecuteComplete: d,
645
- activeAgent: m,
646
- agents: k,
449
+ ssoToken: f,
450
+ ssoCompany: g,
451
+ onExecuteComplete: r,
452
+ activeAgent: x,
453
+ agents: N,
647
454
  childAgents: v,
648
- externalRobotName: w,
649
- externalShowPanel: x,
455
+ externalRobotName: y,
456
+ externalShowPanel: m,
650
457
  agentSwitcher: j
651
458
  } = n;
652
- n.onWidgetsUpdate, n.count, Is();
653
- const [b, V] = s.useState(!1), [Q, y] = s.useState(!1), [r, u] = s.useState(null), [C, _] = s.useState(null), [O, N] = s.useState("results"), [F, E] = s.useState(!1), [W, P] = s.useState([]), [R, z] = s.useState(
459
+ n.onWidgetsUpdate, n.count, ks();
460
+ const [w, O] = s.useState(!1), [W, b] = s.useState(!1), [d, c] = s.useState(null), [I, _] = s.useState(null), [M, P] = s.useState("results"), [Q, L] = s.useState(!1), [B, A] = s.useState([]), [E, U] = s.useState(
654
461
  null
655
- ), [q, $] = s.useState({}), [L, T] = s.useState([]), [se, Y] = s.useState(!1), [ee, fe] = s.useState(null), [ne, le] = s.useState(void 0), [Z, ue] = s.useState(!1), [he, ke] = s.useState(!1), X = s.useMemo(() => (v || []).map((a) => a.name), [v]), xe = s.useMemo(() => !m || m === "default" ? null : (k == null ? void 0 : k.find(
656
- (p) => p.agent_id === m || p.agent_code === m
657
- )) || null, [m, k]), M = s.useMemo(
658
- () => As(xe),
659
- [xe]
462
+ ), [F, _e] = s.useState({}), [se, te] = s.useState([]), [be, J] = s.useState(!1), [Z, me] = s.useState(null), [X, ne] = s.useState(void 0), [V, de] = s.useState(!1), [re, ke] = s.useState(!1), G = s.useMemo(() => (v || []).map((t) => t.name), [v]), ce = s.useMemo(() => !x || x === "default" ? null : (N == null ? void 0 : N.find(
463
+ (u) => u.agent_id === x || u.agent_code === x
464
+ )) || null, [x, N]), ae = s.useMemo(
465
+ () => Ns(ce),
466
+ [ce]
660
467
  );
661
468
  s.useEffect(() => {
662
469
  _(null);
663
- }, [m]), s.useEffect(() => {
664
- Re(), v && v.length > 0 && I();
470
+ }, [x]), s.useEffect(() => {
471
+ Ee(), v && v.length > 0 && S();
665
472
  }, [v]), s.useEffect(() => {
666
- if (x && (V(!0), w)) {
667
- const a = X.find(
668
- (p) => p === w
473
+ if (m && (O(!0), y)) {
474
+ const t = G.find(
475
+ (u) => u === y
669
476
  );
670
- a ? _(a) : X.length > 0;
477
+ t ? _(t) : G.length > 0;
671
478
  }
672
- }, [x, w, X]);
673
- const Re = async () => {
479
+ }, [m, y, G]);
480
+ const Ee = async () => {
674
481
  try {
675
- const a = await ht({});
676
- a != null && a.data && T(
677
- a.data.map((p) => ({
678
- webhook_id: p.webhook_id,
679
- name: p.name,
680
- platform: p.platform
482
+ const t = await it({});
483
+ t != null && t.data && te(
484
+ t.data.map((u) => ({
485
+ webhook_id: u.webhook_id,
486
+ name: u.name,
487
+ platform: u.platform
681
488
  }))
682
489
  );
683
490
  } catch {
684
491
  }
685
- }, I = async () => {
492
+ }, S = async () => {
686
493
  try {
687
- const a = {};
494
+ const t = {};
688
495
  await Promise.all(
689
- v.map(async (p) => {
690
- var G;
496
+ v.map(async (u) => {
497
+ var D;
691
498
  try {
692
- const A = await xt(
693
- p.agent_id,
499
+ const C = await ot(
500
+ u.agent_id,
694
501
  {}
695
502
  );
696
- (G = A == null ? void 0 : A.data) != null && G.webhook_id && (a[p.agent_id] = A.data.webhook_id);
503
+ (D = C == null ? void 0 : C.data) != null && D.webhook_id && (t[u.agent_id] = C.data.webhook_id);
697
504
  } catch {
698
505
  }
699
506
  })
700
- ), $(a);
507
+ ), _e(t);
701
508
  } catch {
702
509
  }
703
- }, K = s.useMemo(() => C ? i.filter((a) => {
704
- var A;
705
- const p = (A = a.title) == null ? void 0 : A.match(/^(.+?)\s*巡检结果$/);
706
- return (p ? p[1] : a.agent_name) === C;
707
- }) : i, [i, C]), ge = s.useMemo(() => {
708
- if (!C) return "";
709
- const a = (v || []).find((p) => p.name === C);
710
- return (a == null ? void 0 : a.agent_id) || "";
711
- }, [C, v]), Ee = l === "maiduo" && C === "差评监控", We = (a) => {
712
- const p = C === a ? null : a;
713
- _(p), p && V(!0);
714
- }, be = (a) => {
715
- fe(a), le(q[a.agent_id]), Y(!0);
716
- }, ie = s.useCallback(async (a) => {
717
- if (a) {
718
- E(!0);
510
+ }, z = s.useMemo(() => I ? o.filter((t) => {
511
+ var C;
512
+ const u = (C = t.title) == null ? void 0 : C.match(/^(.+?)\s*巡检结果$/);
513
+ return (u ? u[1] : t.agent_name) === I;
514
+ }) : o, [o, I]), pe = s.useMemo(() => {
515
+ if (!I) return "";
516
+ const t = (v || []).find((u) => u.name === I);
517
+ return (t == null ? void 0 : t.agent_id) || "";
518
+ }, [I, v]), Re = l === "maiduo" && I === "差评监控", We = (t) => {
519
+ const u = I === t ? null : t;
520
+ _(u), u && O(!0);
521
+ }, fe = (t) => {
522
+ me(t), ne(F[t.agent_id]), J(!0);
523
+ }, ee = s.useCallback(async (t) => {
524
+ if (t) {
525
+ L(!0);
719
526
  try {
720
- const p = await mt({
721
- agent_id: a,
527
+ const u = await lt({
528
+ agent_id: t,
722
529
  limit: 50
723
530
  });
724
- if (p != null && p.data && Array.isArray(p.data)) {
725
- const G = p.data.map(
726
- (A, je) => ({
727
- id: A.id || A.execute_id || `record_${je}`,
728
- action_name: A.action_name || A.display_name || "未知动作",
729
- action_id: A.action_id || "",
730
- status: A.status || "pending",
731
- created_at: A.created_at || "",
732
- completed_at: A.completed_at,
733
- action_params: A.action_params,
734
- output_type: A.output_type,
735
- output_data: A.output_data,
736
- outputs: A.outputs,
737
- error: A.error
531
+ if (u != null && u.data && Array.isArray(u.data)) {
532
+ const D = u.data.map(
533
+ (C, ye) => ({
534
+ id: C.id || C.execute_id || `record_${ye}`,
535
+ action_name: C.action_name || C.display_name || "未知动作",
536
+ action_id: C.action_id || "",
537
+ status: C.status || "pending",
538
+ created_at: C.created_at || "",
539
+ completed_at: C.completed_at,
540
+ action_params: C.action_params,
541
+ output_type: C.output_type,
542
+ output_data: C.output_data,
543
+ outputs: C.outputs,
544
+ error: C.error
738
545
  })
739
546
  ).sort(
740
- (A, je) => new Date(je.created_at).getTime() - new Date(A.created_at).getTime()
547
+ (C, ye) => new Date(ye.created_at).getTime() - new Date(C.created_at).getTime()
741
548
  );
742
- P(G);
549
+ A(D);
743
550
  } else
744
- P([]);
551
+ A([]);
745
552
  } catch {
746
- P([]);
553
+ A([]);
747
554
  } finally {
748
- E(!1);
555
+ L(!1);
749
556
  }
750
557
  }
751
- }, []), re = (a) => {
752
- if (!a) return "";
558
+ }, []), ie = (t) => {
559
+ if (!t) return "";
753
560
  try {
754
- const p = new Date(a), G = p.toLocaleDateString("zh-CN", {
561
+ const u = new Date(t), D = u.toLocaleDateString("zh-CN", {
755
562
  year: "numeric",
756
563
  month: "2-digit",
757
564
  day: "2-digit"
758
- }), A = p.toLocaleTimeString("zh-CN", {
565
+ }), C = u.toLocaleTimeString("zh-CN", {
759
566
  hour: "2-digit",
760
567
  minute: "2-digit"
761
568
  });
762
- return `${G} ${A}`;
569
+ return `${D} ${C}`;
763
570
  } catch {
764
- return a;
571
+ return t;
765
572
  }
766
- }, H = (a) => ({ pending: "等待中", running: "执行中", success: "成功", failed: "失败" })[a] || a, J = (a) => ({
573
+ }, q = (t) => ({ pending: "等待中", running: "执行中", success: "成功", failed: "失败" })[t] || t, K = (t) => ({
767
574
  pending: "wandox-exec-status--pending",
768
575
  running: "wandox-exec-status--running",
769
576
  success: "wandox-exec-status--success",
770
577
  failed: "wandox-exec-status--failed"
771
- })[a] || "";
578
+ })[t] || "";
772
579
  s.useEffect(() => {
773
- O === "history" && ge && ie(ge);
774
- }, [O, ge, ie]);
775
- const D = async () => {
776
- if (!ee || !ne) {
777
- oe.warning("请选择 Webhook");
580
+ M === "history" && pe && ee(pe);
581
+ }, [M, pe, ee]);
582
+ const R = async () => {
583
+ if (!Z || !X) {
584
+ he.warning("请选择 Webhook");
778
585
  return;
779
586
  }
780
587
  try {
781
- ue(!0), await yt(
588
+ de(!0), await ct(
782
589
  {},
783
590
  {
784
- agent_id: ee.agent_id,
785
- webhook_id: ne
591
+ agent_id: Z.agent_id,
592
+ webhook_id: X
786
593
  }
787
- ), oe.success("绑定成功"), Y(!1), I();
788
- } catch (a) {
789
- oe.error((a == null ? void 0 : a.message) || "绑定失败");
594
+ ), he.success("绑定成功"), J(!1), S();
595
+ } catch (t) {
596
+ he.error((t == null ? void 0 : t.message) || "绑定失败");
790
597
  } finally {
791
- ue(!1);
598
+ de(!1);
792
599
  }
793
- }, Le = async () => {
794
- if (ee)
600
+ }, $e = async () => {
601
+ if (Z)
795
602
  try {
796
- ue(!0), await bt(
797
- ee.agent_id,
603
+ de(!0), await rt(
604
+ Z.agent_id,
798
605
  {}
799
- ), oe.success("解绑成功"), Y(!1), le(void 0), I();
800
- } catch (a) {
801
- oe.error((a == null ? void 0 : a.message) || "解绑失败");
606
+ ), he.success("解绑成功"), J(!1), ne(void 0), S();
607
+ } catch (t) {
608
+ he.error((t == null ? void 0 : t.message) || "解绑失败");
802
609
  } finally {
803
- ue(!1);
610
+ de(!1);
804
611
  }
805
- }, Te = (a) => {
806
- u(a), y(!0);
807
- }, $e = () => {
808
- y(!1), u(null);
809
- }, Me = (a) => {
810
- if (!a) return "";
612
+ }, Me = (t) => {
613
+ c(t), b(!0);
614
+ }, Le = () => {
615
+ b(!1), c(null);
616
+ }, Te = (t) => {
617
+ if (!t) return "";
811
618
  try {
812
- const p = new Date(a), G = p.toLocaleDateString("zh-CN", {
619
+ const u = new Date(t), D = u.toLocaleDateString("zh-CN", {
813
620
  year: "numeric",
814
621
  month: "2-digit",
815
622
  day: "2-digit"
816
- }), A = p.toLocaleTimeString("zh-CN", {
623
+ }), C = u.toLocaleTimeString("zh-CN", {
817
624
  hour: "2-digit",
818
625
  minute: "2-digit"
819
626
  });
820
- return `${G}
821
- ${A}`;
627
+ return `${D}
628
+ ${C}`;
822
629
  } catch {
823
- return a;
630
+ return t;
824
631
  }
825
- }, ye = (a, p) => {
826
- const G = {
632
+ }, ge = (t, u) => {
633
+ const D = {
827
634
  high: "#ff4d4f",
828
635
  medium: "#faad14",
829
636
  low: "#52c41a"
@@ -839,27 +646,27 @@ ${A}`;
839
646
  {
840
647
  className: "wandox-timeline-time",
841
648
  style: { whiteSpace: "pre-line" },
842
- children: Me(a.timestamp || "")
649
+ children: Te(t.timestamp || "")
843
650
  }
844
651
  ),
845
652
  /* @__PURE__ */ e.jsx(
846
653
  "div",
847
654
  {
848
655
  className: "wandox-timeline-dot",
849
- style: { background: G[a.priority] }
656
+ style: { background: D[t.priority] }
850
657
  }
851
658
  ),
852
- !p && /* @__PURE__ */ e.jsx("div", { className: "wandox-timeline-line" })
659
+ !u && /* @__PURE__ */ e.jsx("div", { className: "wandox-timeline-line" })
853
660
  ] }),
854
661
  /* @__PURE__ */ e.jsxs("div", { className: "wandox-widget-card", children: [
855
- /* @__PURE__ */ e.jsx("div", { className: "wandox-widget-title", children: a.title }),
856
- a.ui_payload && /* @__PURE__ */ e.jsx("div", { className: "wandox-widget-content wandox-markdown-content", children: /* @__PURE__ */ e.jsx(Xe, { payload: a.ui_payload }) }),
857
- a.actions && a.actions.length > 0 && /* @__PURE__ */ e.jsx("div", { className: "wandox-widget-actions", children: /* @__PURE__ */ e.jsxs(
662
+ /* @__PURE__ */ e.jsx("div", { className: "wandox-widget-title", children: t.title }),
663
+ t.ui_payload && /* @__PURE__ */ e.jsx("div", { className: "wandox-widget-content wandox-markdown-content", children: /* @__PURE__ */ e.jsx(Xe, { payload: t.ui_payload }) }),
664
+ t.actions && t.actions.length > 0 && /* @__PURE__ */ e.jsx("div", { className: "wandox-widget-actions", children: /* @__PURE__ */ e.jsxs(
858
665
  "button",
859
666
  {
860
667
  type: "button",
861
668
  className: "wandox-widget-view-detail-btn",
862
- onClick: () => Te(a),
669
+ onClick: () => Me(t),
863
670
  children: [
864
671
  /* @__PURE__ */ e.jsxs(
865
672
  "svg",
@@ -883,7 +690,7 @@ ${A}`;
883
690
  }
884
691
  ),
885
692
  "快速执行 (",
886
- a.actions.length,
693
+ t.actions.length,
887
694
  ")"
888
695
  ]
889
696
  }
@@ -891,237 +698,22 @@ ${A}`;
891
698
  ] })
892
699
  ]
893
700
  },
894
- a.id || `${a.type}_${a.title}_${a.timestamp}`
701
+ t.id || `${t.type}_${t.title}_${t.timestamp}`
895
702
  );
896
703
  };
897
704
  return /* @__PURE__ */ e.jsxs("div", { className: "wandox-widget-section", children: [
898
705
  /* @__PURE__ */ e.jsxs("div", { className: "wandox-section-header", children: [
899
706
  /* @__PURE__ */ e.jsxs("div", { style: { display: "flex", alignItems: "center", gap: "8px" }, children: [
900
- j ?? /* @__PURE__ */ e.jsx("span", { className: "wandox-widget-section-title", children: t }),
901
- M && /* @__PURE__ */ e.jsx(
902
- pt,
903
- {
904
- title: /* @__PURE__ */ e.jsx(
905
- "div",
906
- {
907
- style: {
908
- paddingBottom: "8px",
909
- borderBottom: "1px solid #f0f0f0"
910
- },
911
- children: /* @__PURE__ */ e.jsxs(
912
- "div",
913
- {
914
- style: {
915
- display: "flex",
916
- alignItems: "center",
917
- justifyContent: "space-between",
918
- gap: "8px"
919
- },
920
- children: [
921
- /* @__PURE__ */ e.jsxs("div", { children: [
922
- /* @__PURE__ */ e.jsx("strong", { children: M.packageName }),
923
- M.subtitle && /* @__PURE__ */ e.jsx(
924
- "div",
925
- {
926
- style: {
927
- color: "#999",
928
- fontSize: "11px",
929
- fontWeight: 400
930
- },
931
- children: M.subtitle
932
- }
933
- )
934
- ] }),
935
- /* @__PURE__ */ e.jsx(
936
- ys,
937
- {
938
- count: "生效中",
939
- style: {
940
- backgroundColor: "#52c41a",
941
- fontSize: "10px",
942
- lineHeight: "18px",
943
- height: "18px",
944
- minWidth: "50px"
945
- }
946
- }
947
- )
948
- ]
949
- }
950
- )
951
- }
952
- ),
953
- content: /* @__PURE__ */ e.jsxs(
954
- "div",
955
- {
956
- style: {
957
- fontSize: "12px",
958
- lineHeight: "1.6",
959
- minWidth: "280px"
960
- },
961
- children: [
962
- /* @__PURE__ */ e.jsxs(
963
- "div",
964
- {
965
- style: {
966
- marginBottom: "8px",
967
- display: "flex",
968
- justifyContent: "space-between"
969
- },
970
- children: [
971
- /* @__PURE__ */ e.jsx("div", { style: { color: "#999" }, children: "套餐类型:" }),
972
- /* @__PURE__ */ e.jsx("strong", { children: M.packageName })
973
- ]
974
- }
975
- ),
976
- M.asinUsage && /* @__PURE__ */ e.jsxs(
977
- "div",
978
- {
979
- style: {
980
- marginBottom: M.asinUsagePercent != null ? "4px" : "8px",
981
- display: "flex",
982
- justifyContent: "space-between",
983
- gap: "16px"
984
- },
985
- children: [
986
- /* @__PURE__ */ e.jsx("div", { style: { color: "#999" }, children: "ASIN 已用:" }),
987
- /* @__PURE__ */ e.jsx("strong", { style: { color: "#9444f5" }, children: M.asinUsage })
988
- ]
989
- }
990
- ),
991
- M.asinUsagePercent != null && /* @__PURE__ */ e.jsx("div", { style: { marginBottom: "8px" }, children: /* @__PURE__ */ e.jsx(
992
- "div",
993
- {
994
- style: {
995
- height: "6px",
996
- borderRadius: "3px",
997
- background: "#f0eaff",
998
- overflow: "hidden"
999
- },
1000
- children: /* @__PURE__ */ e.jsx(
1001
- "div",
1002
- {
1003
- style: {
1004
- height: "100%",
1005
- width: `${M.asinUsagePercent}%`,
1006
- borderRadius: "3px",
1007
- background: "linear-gradient(90deg, #9444f5, #b47aff)",
1008
- transition: "width 0.3s ease"
1009
- }
1010
- }
1011
- )
1012
- }
1013
- ) }),
1014
- /* @__PURE__ */ e.jsxs(
1015
- "div",
1016
- {
1017
- style: {
1018
- marginBottom: "8px",
1019
- display: "flex",
1020
- justifyContent: "space-between"
1021
- },
1022
- children: [
1023
- /* @__PURE__ */ e.jsx("div", { style: { color: "#999" }, children: M.remainingLabel }),
1024
- /* @__PURE__ */ e.jsx("strong", { style: { color: "#9444f5", fontWeight: "bold" }, children: M.remainingValue })
1025
- ]
1026
- }
1027
- ),
1028
- /* @__PURE__ */ e.jsxs(
1029
- "div",
1030
- {
1031
- style: {
1032
- marginBottom: "8px",
1033
- display: "flex",
1034
- justifyContent: "space-between"
1035
- },
1036
- children: [
1037
- /* @__PURE__ */ e.jsx("div", { style: { color: "#999" }, children: "到期时间:" }),
1038
- /* @__PURE__ */ e.jsx("strong", { children: M.endTime })
1039
- ]
1040
- }
1041
- ),
1042
- /* @__PURE__ */ e.jsxs(
1043
- "div",
1044
- {
1045
- style: {
1046
- marginBottom: "8px",
1047
- display: "flex",
1048
- justifyContent: "space-between"
1049
- },
1050
- children: [
1051
- /* @__PURE__ */ e.jsx("div", { style: { color: "#999" }, children: "开通时间:" }),
1052
- /* @__PURE__ */ e.jsx("strong", { children: M.startTime })
1053
- ]
1054
- }
1055
- ),
1056
- M.coverageItems.length > 0 && /* @__PURE__ */ e.jsxs(
1057
- "div",
1058
- {
1059
- style: {
1060
- padding: "8px 12px",
1061
- background: "#faf8ff",
1062
- borderRadius: "8px"
1063
- },
1064
- children: [
1065
- /* @__PURE__ */ e.jsx(
1066
- "div",
1067
- {
1068
- style: {
1069
- marginBottom: "4px",
1070
- color: "#9444f5",
1071
- fontSize: "13px",
1072
- fontWeight: "bold"
1073
- },
1074
- children: M.coverageTitle
1075
- }
1076
- ),
1077
- /* @__PURE__ */ e.jsx(
1078
- "div",
1079
- {
1080
- style: {
1081
- fontSize: "11px",
1082
- color: "#666",
1083
- lineHeight: "2"
1084
- },
1085
- children: M.coverageItems.map((a) => /* @__PURE__ */ e.jsxs("div", { children: [
1086
- /* @__PURE__ */ e.jsx(
1087
- ft,
1088
- {
1089
- style: { marginRight: "6px", color: "#9444f5" }
1090
- }
1091
- ),
1092
- a
1093
- ] }, a))
1094
- }
1095
- )
1096
- ]
1097
- }
1098
- )
1099
- ]
1100
- }
1101
- ),
1102
- placement: "bottom",
1103
- trigger: "hover",
1104
- children: /* @__PURE__ */ e.jsx(
1105
- ys,
1106
- {
1107
- count: M.badgeText,
1108
- style: {
1109
- backgroundColor: M.badgeColor,
1110
- color: M.badgeTextColor,
1111
- cursor: "pointer"
1112
- }
1113
- }
1114
- )
1115
- }
1116
- )
707
+ j ?? /* @__PURE__ */ e.jsx("span", { className: "wandox-widget-section-title", children: a }),
708
+ /* @__PURE__ */ e.jsx(Qt, { benefit: ae })
1117
709
  ] }),
1118
710
  /* @__PURE__ */ e.jsx("div", { className: "wandox-inspection-controls", children: /* @__PURE__ */ e.jsxs(
1119
711
  "button",
1120
712
  {
1121
713
  type: "button",
1122
- className: `wandox-inspection-agent-btn ${b ? "wandox-inspection-agent-btn--expanded" : ""}`,
714
+ className: `wandox-inspection-agent-btn ${w ? "wandox-inspection-agent-btn--expanded" : ""}`,
1123
715
  onClick: () => {
1124
- b ? (V(!1), _(null)) : V(!0);
716
+ w ? (O(!1), _(null)) : O(!0);
1125
717
  },
1126
718
  children: [
1127
719
  /* @__PURE__ */ e.jsxs("span", { className: "wandox-inspection-agent-icon", children: [
@@ -1155,49 +747,49 @@ ${A}`;
1155
747
  ] }),
1156
748
  /* @__PURE__ */ e.jsxs("span", { className: "wandox-inspection-agent-text", children: [
1157
749
  "巡检机器人(",
1158
- X.length,
750
+ G.length,
1159
751
  ")"
1160
752
  ] })
1161
753
  ]
1162
754
  }
1163
755
  ) })
1164
756
  ] }),
1165
- b && /* @__PURE__ */ e.jsxs("div", { className: "wandox-timeline-list", children: [
757
+ w && /* @__PURE__ */ e.jsxs("div", { className: "wandox-timeline-list", children: [
1166
758
  /* @__PURE__ */ e.jsxs("div", { className: "wandox-agent-filter-row wandox-agent-filter-row--with-close", children: [
1167
759
  /* @__PURE__ */ e.jsxs("div", { className: "wandox-agent-filter-chips", children: [
1168
760
  v.length > 0 && /* @__PURE__ */ e.jsx(
1169
761
  "button",
1170
762
  {
1171
763
  type: "button",
1172
- className: `wandox-agent-filter-chip ${C === null ? "active" : ""}`,
764
+ className: `wandox-agent-filter-chip ${I === null ? "active" : ""}`,
1173
765
  onClick: () => _(null),
1174
766
  children: "全部"
1175
767
  }
1176
768
  ),
1177
- v.map((a) => {
1178
- const p = !!q[a.agent_id];
769
+ v.map((t) => {
770
+ const u = !!F[t.agent_id];
1179
771
  return /* @__PURE__ */ e.jsxs(
1180
772
  "div",
1181
773
  {
1182
- className: `wandox-agent-filter-chip-compound ${C === a.name ? "active" : ""}`,
774
+ className: `wandox-agent-filter-chip-compound ${I === t.name ? "active" : ""}`,
1183
775
  children: [
1184
776
  /* @__PURE__ */ e.jsx(
1185
777
  "button",
1186
778
  {
1187
779
  type: "button",
1188
780
  className: "wandox-agent-filter-chip-name",
1189
- onClick: () => We(a.name),
1190
- children: a.name
781
+ onClick: () => We(t.name),
782
+ children: t.name
1191
783
  }
1192
784
  ),
1193
785
  /* @__PURE__ */ e.jsx(
1194
786
  "button",
1195
787
  {
1196
788
  type: "button",
1197
- className: `wandox-agent-filter-chip-webhook ${p ? "bound" : ""}`,
1198
- onClick: () => be(a),
1199
- title: p ? "已绑定 Webhook,点击修改" : "绑定 Webhook 通知",
1200
- children: p ? /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
789
+ className: `wandox-agent-filter-chip-webhook ${u ? "bound" : ""}`,
790
+ onClick: () => fe(t),
791
+ title: u ? "已绑定 Webhook,点击修改" : "绑定 Webhook 通知",
792
+ children: u ? /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
1201
793
  /* @__PURE__ */ e.jsx(
1202
794
  "span",
1203
795
  {
@@ -1221,7 +813,7 @@ ${A}`;
1221
813
  )
1222
814
  ]
1223
815
  },
1224
- a.agent_id
816
+ t.agent_id
1225
817
  );
1226
818
  })
1227
819
  ] }),
@@ -1231,14 +823,14 @@ ${A}`;
1231
823
  type: "button",
1232
824
  className: "wandox-timeline-list-close",
1233
825
  onClick: () => {
1234
- V(!1), _(null), N("results");
826
+ O(!1), _(null), P("results");
1235
827
  },
1236
828
  title: "关闭",
1237
829
  children: "✕"
1238
830
  }
1239
831
  )
1240
832
  ] }),
1241
- Ee && /* @__PURE__ */ e.jsxs("div", { className: "wandox-negative-review-notice", children: [
833
+ Re && /* @__PURE__ */ e.jsxs("div", { className: "wandox-negative-review-notice", children: [
1242
834
  /* @__PURE__ */ e.jsx(
1243
835
  "span",
1244
836
  {
@@ -1252,7 +844,7 @@ ${A}`;
1252
844
  /* @__PURE__ */ e.jsx(
1253
845
  "a",
1254
846
  {
1255
- href: Ca,
847
+ href: ba,
1256
848
  target: "_blank",
1257
849
  rel: "noreferrer",
1258
850
  className: "wandox-negative-review-notice-link",
@@ -1267,11 +859,11 @@ ${A}`;
1267
859
  "button",
1268
860
  {
1269
861
  type: "button",
1270
- className: `wandox-timeline-tab-btn ${O === "results" ? "active" : ""}`,
1271
- onClick: () => N("results"),
862
+ className: `wandox-timeline-tab-btn ${M === "results" ? "active" : ""}`,
863
+ onClick: () => P("results"),
1272
864
  children: [
1273
865
  "巡检结果",
1274
- K.length > 0 && /* @__PURE__ */ e.jsx("span", { className: "wandox-timeline-tab-badge", children: K.length })
866
+ z.length > 0 && /* @__PURE__ */ e.jsx("span", { className: "wandox-timeline-tab-badge", children: z.length })
1275
867
  ]
1276
868
  }
1277
869
  ),
@@ -1279,48 +871,48 @@ ${A}`;
1279
871
  "button",
1280
872
  {
1281
873
  type: "button",
1282
- className: `wandox-timeline-tab-btn ${O === "history" ? "active" : ""}`,
1283
- onClick: () => N("history"),
874
+ className: `wandox-timeline-tab-btn ${M === "history" ? "active" : ""}`,
875
+ onClick: () => P("history"),
1284
876
  children: "执行记录"
1285
877
  }
1286
878
  )
1287
879
  ] }) }),
1288
- O === "results" ? /* @__PURE__ */ e.jsx("div", { className: "wandox-timeline-list-content", children: K.length > 0 ? K.sort((a, p) => {
1289
- const G = a.timestamp ? new Date(a.timestamp).getTime() : 0;
1290
- return (p.timestamp ? new Date(p.timestamp).getTime() : 0) - G;
880
+ M === "results" ? /* @__PURE__ */ e.jsx("div", { className: "wandox-timeline-list-content", children: z.length > 0 ? z.sort((t, u) => {
881
+ const D = t.timestamp ? new Date(t.timestamp).getTime() : 0;
882
+ return (u.timestamp ? new Date(u.timestamp).getTime() : 0) - D;
1291
883
  }).map(
1292
- (a, p, G) => ye(a, p === G.length - 1)
884
+ (t, u, D) => ge(t, u === D.length - 1)
1293
885
  ) : /* @__PURE__ */ e.jsxs("div", { className: "wandox-empty-state", children: [
1294
886
  /* @__PURE__ */ e.jsx("div", { className: "wandox-empty-icon", children: "�" }),
1295
- /* @__PURE__ */ e.jsx("div", { className: "wandox-empty-text", children: C ? "没有符合筛选条件的数据" : "暂无工作区数据" }),
1296
- /* @__PURE__ */ e.jsx("div", { className: "wandox-empty-desc", children: C ? "请调整筛选条件" : "工作区数据将在这里显示" })
1297
- ] }) }) : /* @__PURE__ */ e.jsx("div", { className: "wandox-timeline-list-content wandox-history-panel", children: C ? F ? /* @__PURE__ */ e.jsxs("div", { className: "wandox-loading-state", children: [
887
+ /* @__PURE__ */ e.jsx("div", { className: "wandox-empty-text", children: I ? "没有符合筛选条件的数据" : "暂无工作区数据" }),
888
+ /* @__PURE__ */ e.jsx("div", { className: "wandox-empty-desc", children: I ? "请调整筛选条件" : "工作区数据将在这里显示" })
889
+ ] }) }) : /* @__PURE__ */ e.jsx("div", { className: "wandox-timeline-list-content wandox-history-panel", children: I ? Q ? /* @__PURE__ */ e.jsxs("div", { className: "wandox-loading-state", children: [
1298
890
  /* @__PURE__ */ e.jsx("span", { className: "wandox-spinner wandox-spinner--small" }),
1299
891
  /* @__PURE__ */ e.jsx("span", { children: "加载中..." })
1300
- ] }) : W.length === 0 ? /* @__PURE__ */ e.jsx("div", { className: "wandox-empty-state", children: /* @__PURE__ */ e.jsx("div", { className: "wandox-empty-text", children: "暂无执行记录" }) }) : /* @__PURE__ */ e.jsx("div", { className: "wandox-exec-history-list", children: W.map((a) => /* @__PURE__ */ e.jsxs("div", { className: "wandox-exec-history-item", children: [
892
+ ] }) : B.length === 0 ? /* @__PURE__ */ e.jsx("div", { className: "wandox-empty-state", children: /* @__PURE__ */ e.jsx("div", { className: "wandox-empty-text", children: "暂无执行记录" }) }) : /* @__PURE__ */ e.jsx("div", { className: "wandox-exec-history-list", children: B.map((t) => /* @__PURE__ */ e.jsxs("div", { className: "wandox-exec-history-item", children: [
1301
893
  /* @__PURE__ */ e.jsxs(
1302
894
  "div",
1303
895
  {
1304
896
  className: "wandox-exec-history-header",
1305
- onClick: () => z(
1306
- R === a.id ? null : a.id
897
+ onClick: () => U(
898
+ E === t.id ? null : t.id
1307
899
  ),
1308
- onKeyDown: (p) => p.key === "Enter" && z(
1309
- R === a.id ? null : a.id
900
+ onKeyDown: (u) => u.key === "Enter" && U(
901
+ E === t.id ? null : t.id
1310
902
  ),
1311
903
  role: "button",
1312
904
  tabIndex: 0,
1313
905
  children: [
1314
906
  /* @__PURE__ */ e.jsxs("div", { className: "wandox-exec-history-info", children: [
1315
- /* @__PURE__ */ e.jsx("span", { className: "wandox-exec-history-name", children: a.action_name }),
1316
- /* @__PURE__ */ e.jsx("span", { className: "wandox-exec-history-time", children: re(a.created_at) })
907
+ /* @__PURE__ */ e.jsx("span", { className: "wandox-exec-history-name", children: t.action_name }),
908
+ /* @__PURE__ */ e.jsx("span", { className: "wandox-exec-history-time", children: ie(t.created_at) })
1317
909
  ] }),
1318
910
  /* @__PURE__ */ e.jsxs("div", { className: "wandox-exec-history-status-wrapper", children: [
1319
911
  /* @__PURE__ */ e.jsx(
1320
912
  "span",
1321
913
  {
1322
- className: `wandox-exec-status ${J(a.status)}`,
1323
- children: H(a.status)
914
+ className: `wandox-exec-status ${K(t.status)}`,
915
+ children: q(t.status)
1324
916
  }
1325
917
  ),
1326
918
  /* @__PURE__ */ e.jsx(
@@ -1328,74 +920,74 @@ ${A}`;
1328
920
  {
1329
921
  className: "wandox-exec-history-arrow",
1330
922
  "aria-hidden": "true",
1331
- children: R === a.id ? "▼" : "▶"
923
+ children: E === t.id ? "▼" : "▶"
1332
924
  }
1333
925
  )
1334
926
  ] })
1335
927
  ]
1336
928
  }
1337
929
  ),
1338
- R === a.id && /* @__PURE__ */ e.jsxs("div", { className: "wandox-exec-history-detail", children: [
1339
- a.action_params && Object.keys(a.action_params).length > 0 && /* @__PURE__ */ e.jsxs("div", { className: "wandox-exec-params", children: [
930
+ E === t.id && /* @__PURE__ */ e.jsxs("div", { className: "wandox-exec-history-detail", children: [
931
+ t.action_params && Object.keys(t.action_params).length > 0 && /* @__PURE__ */ e.jsxs("div", { className: "wandox-exec-params", children: [
1340
932
  /* @__PURE__ */ e.jsx("div", { className: "wandox-exec-section-label", children: "执行参数" }),
1341
- /* @__PURE__ */ e.jsx("div", { className: "wandox-exec-params-list", children: Object.entries(a.action_params).map(
1342
- ([p, G]) => /* @__PURE__ */ e.jsxs(
933
+ /* @__PURE__ */ e.jsx("div", { className: "wandox-exec-params-list", children: Object.entries(t.action_params).map(
934
+ ([u, D]) => /* @__PURE__ */ e.jsxs(
1343
935
  "div",
1344
936
  {
1345
937
  className: "wandox-exec-param-item",
1346
938
  children: [
1347
939
  /* @__PURE__ */ e.jsxs("span", { className: "wandox-exec-param-key", children: [
1348
- p,
940
+ u,
1349
941
  ":"
1350
942
  ] }),
1351
- /* @__PURE__ */ e.jsx("span", { className: "wandox-exec-param-value", children: typeof G == "object" ? JSON.stringify(G) : String(G) })
943
+ /* @__PURE__ */ e.jsx("span", { className: "wandox-exec-param-value", children: typeof D == "object" ? JSON.stringify(D) : String(D) })
1352
944
  ]
1353
945
  },
1354
- p
946
+ u
1355
947
  )
1356
948
  ) })
1357
949
  ] }),
1358
- a.error ? /* @__PURE__ */ e.jsxs("div", { className: "wandox-exec-error", children: [
950
+ t.error ? /* @__PURE__ */ e.jsxs("div", { className: "wandox-exec-error", children: [
1359
951
  /* @__PURE__ */ e.jsx("span", { className: "wandox-exec-error-label", children: "错误信息:" }),
1360
- /* @__PURE__ */ e.jsx("span", { className: "wandox-exec-error-msg", children: a.error })
1361
- ] }) : a.output_type && a.output_data ? /* @__PURE__ */ e.jsxs("div", { className: "wandox-exec-outputs", children: [
952
+ /* @__PURE__ */ e.jsx("span", { className: "wandox-exec-error-msg", children: t.error })
953
+ ] }) : t.output_type && t.output_data ? /* @__PURE__ */ e.jsxs("div", { className: "wandox-exec-outputs", children: [
1362
954
  /* @__PURE__ */ e.jsx("div", { className: "wandox-exec-section-label", children: "执行结果" }),
1363
955
  /* @__PURE__ */ e.jsx(
1364
956
  Xe,
1365
957
  {
1366
958
  payload: {
1367
- type: a.output_type,
1368
- ...a.output_data
959
+ type: t.output_type,
960
+ ...t.output_data
1369
961
  }
1370
962
  }
1371
963
  )
1372
- ] }) : a.outputs ? /* @__PURE__ */ e.jsxs("div", { className: "wandox-exec-outputs", children: [
964
+ ] }) : t.outputs ? /* @__PURE__ */ e.jsxs("div", { className: "wandox-exec-outputs", children: [
1373
965
  /* @__PURE__ */ e.jsx("div", { className: "wandox-exec-section-label", children: "执行结果" }),
1374
- /* @__PURE__ */ e.jsx(Xe, { payload: a.outputs })
966
+ /* @__PURE__ */ e.jsx(Xe, { payload: t.outputs })
1375
967
  ] }) : /* @__PURE__ */ e.jsx("div", { className: "wandox-exec-no-output", children: "暂无输出结果" })
1376
968
  ] })
1377
- ] }, a.id)) }) : /* @__PURE__ */ e.jsxs("div", { className: "wandox-empty-state", children: [
969
+ ] }, t.id)) }) : /* @__PURE__ */ e.jsxs("div", { className: "wandox-empty-state", children: [
1378
970
  /* @__PURE__ */ e.jsx("div", { className: "wandox-empty-icon", children: "🤖" }),
1379
971
  /* @__PURE__ */ e.jsx("div", { className: "wandox-empty-text", children: "请先选择机器人" }),
1380
972
  /* @__PURE__ */ e.jsx("div", { className: "wandox-empty-desc", children: "在上方选择一个机器人查看执行记录" })
1381
973
  ] }) })
1382
974
  ] }),
1383
975
  /* @__PURE__ */ e.jsx(
1384
- gt,
976
+ dt,
1385
977
  {
1386
- open: Q,
1387
- title: (r == null ? void 0 : r.title) || "动作详情",
1388
- actions: (r == null ? void 0 : r.actions) || [],
1389
- widgetId: r == null ? void 0 : r.id,
1390
- ssoToken: c,
978
+ open: W,
979
+ title: (d == null ? void 0 : d.title) || "动作详情",
980
+ actions: (d == null ? void 0 : d.actions) || [],
981
+ widgetId: d == null ? void 0 : d.id,
982
+ ssoToken: f,
1391
983
  ssoDomain: l,
1392
- ssoCompany: f,
1393
- onClose: $e,
1394
- onExecuteComplete: d
984
+ ssoCompany: g,
985
+ onClose: Le,
986
+ onExecuteComplete: r
1395
987
  }
1396
988
  ),
1397
989
  /* @__PURE__ */ e.jsx(
1398
- ds,
990
+ ls,
1399
991
  {
1400
992
  title: /* @__PURE__ */ e.jsxs("div", { style: { display: "flex", alignItems: "center", gap: "8px" }, children: [
1401
993
  /* @__PURE__ */ e.jsxs(
@@ -1416,9 +1008,9 @@ ${A}`;
1416
1008
  ),
1417
1009
  /* @__PURE__ */ e.jsx("span", { children: "配置 Webhook 通知" })
1418
1010
  ] }),
1419
- open: se,
1011
+ open: be,
1420
1012
  onCancel: () => {
1421
- Y(!1), fe(null), le(void 0);
1013
+ J(!1), me(null), ne(void 0);
1422
1014
  },
1423
1015
  width: 520,
1424
1016
  footer: null,
@@ -1446,7 +1038,7 @@ ${A}`;
1446
1038
  "div",
1447
1039
  {
1448
1040
  style: { fontSize: "15px", color: "#1a1a1a", fontWeight: 500 },
1449
- children: ee == null ? void 0 : ee.name
1041
+ children: Z == null ? void 0 : Z.name
1450
1042
  }
1451
1043
  )
1452
1044
  ]
@@ -1466,23 +1058,23 @@ ${A}`;
1466
1058
  }
1467
1059
  ),
1468
1060
  /* @__PURE__ */ e.jsx(
1469
- Ps,
1061
+ Ss,
1470
1062
  {
1471
1063
  style: { width: "100%" },
1472
1064
  size: "large",
1473
1065
  placeholder: "请选择 通知地址",
1474
- value: ne,
1475
- onChange: le,
1476
- options: L.map((a) => ({
1477
- label: `${a.name} (${a.platform === "dingtalk" ? "钉钉" : a.platform === "feishu" ? "飞书" : "企业微信"})`,
1478
- value: a.webhook_id
1066
+ value: X,
1067
+ onChange: ne,
1068
+ options: se.map((t) => ({
1069
+ label: `${t.name} (${t.platform === "dingtalk" ? "钉钉" : t.platform === "feishu" ? "飞书" : "企业微信"})`,
1070
+ value: t.webhook_id
1479
1071
  })),
1480
- disabled: Z,
1481
- popupRender: (a) => /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
1482
- a,
1483
- /* @__PURE__ */ e.jsx(ia, { style: { margin: "8px 0" } }),
1484
- /* @__PURE__ */ e.jsx(Cs, { style: { padding: "0 8px 4px" }, children: /* @__PURE__ */ e.jsx(
1485
- _e,
1072
+ disabled: V,
1073
+ popupRender: (t) => /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
1074
+ t,
1075
+ /* @__PURE__ */ e.jsx(Jt, { style: { margin: "8px 0" } }),
1076
+ /* @__PURE__ */ e.jsx(_s, { style: { padding: "0 8px 4px" }, children: /* @__PURE__ */ e.jsx(
1077
+ ve,
1486
1078
  {
1487
1079
  type: "text",
1488
1080
  icon: /* @__PURE__ */ e.jsx("span", { children: "+" }),
@@ -1493,7 +1085,7 @@ ${A}`;
1493
1085
  ] })
1494
1086
  }
1495
1087
  ),
1496
- L.length === 0 && /* @__PURE__ */ e.jsxs(
1088
+ se.length === 0 && /* @__PURE__ */ e.jsxs(
1497
1089
  "div",
1498
1090
  {
1499
1091
  style: {
@@ -1557,12 +1149,12 @@ ${A}`;
1557
1149
  {
1558
1150
  style: { display: "flex", gap: "12px", justifyContent: "flex-end" },
1559
1151
  children: [
1560
- q[(ee == null ? void 0 : ee.agent_id) || ""] && /* @__PURE__ */ e.jsx(
1152
+ F[(Z == null ? void 0 : Z.agent_id) || ""] && /* @__PURE__ */ e.jsx(
1561
1153
  "button",
1562
1154
  {
1563
1155
  type: "button",
1564
- onClick: Le,
1565
- disabled: Z,
1156
+ onClick: $e,
1157
+ disabled: V,
1566
1158
  style: {
1567
1159
  marginRight: "auto",
1568
1160
  padding: "8px 20px",
@@ -1570,17 +1162,17 @@ ${A}`;
1570
1162
  borderRadius: "6px",
1571
1163
  background: "#fff",
1572
1164
  color: "#ff4d4f",
1573
- cursor: Z ? "not-allowed" : "pointer",
1165
+ cursor: V ? "not-allowed" : "pointer",
1574
1166
  fontSize: "14px",
1575
1167
  fontWeight: 500,
1576
1168
  transition: "all 0.2s",
1577
- opacity: Z ? 0.6 : 1
1169
+ opacity: V ? 0.6 : 1
1578
1170
  },
1579
- onMouseEnter: (a) => {
1580
- Z || (a.currentTarget.style.background = "#fff1f0");
1171
+ onMouseEnter: (t) => {
1172
+ V || (t.currentTarget.style.background = "#fff1f0");
1581
1173
  },
1582
- onMouseLeave: (a) => {
1583
- a.currentTarget.style.background = "#fff";
1174
+ onMouseLeave: (t) => {
1175
+ t.currentTarget.style.background = "#fff";
1584
1176
  },
1585
1177
  children: "解除绑定"
1586
1178
  }
@@ -1590,26 +1182,26 @@ ${A}`;
1590
1182
  {
1591
1183
  type: "button",
1592
1184
  onClick: () => {
1593
- Y(!1), fe(null), le(void 0);
1185
+ J(!1), me(null), ne(void 0);
1594
1186
  },
1595
- disabled: Z,
1187
+ disabled: V,
1596
1188
  style: {
1597
1189
  padding: "8px 24px",
1598
1190
  border: "1px solid #d9d9d9",
1599
1191
  borderRadius: "6px",
1600
1192
  background: "#fff",
1601
1193
  color: "#333",
1602
- cursor: Z ? "not-allowed" : "pointer",
1194
+ cursor: V ? "not-allowed" : "pointer",
1603
1195
  fontSize: "14px",
1604
1196
  fontWeight: 500,
1605
1197
  transition: "all 0.2s",
1606
- opacity: Z ? 0.6 : 1
1198
+ opacity: V ? 0.6 : 1
1607
1199
  },
1608
- onMouseEnter: (a) => {
1609
- Z || (a.currentTarget.style.background = "#fafafa");
1200
+ onMouseEnter: (t) => {
1201
+ V || (t.currentTarget.style.background = "#fafafa");
1610
1202
  },
1611
- onMouseLeave: (a) => {
1612
- a.currentTarget.style.background = "#fff";
1203
+ onMouseLeave: (t) => {
1204
+ t.currentTarget.style.background = "#fff";
1613
1205
  },
1614
1206
  children: "取消"
1615
1207
  }
@@ -1618,26 +1210,26 @@ ${A}`;
1618
1210
  "button",
1619
1211
  {
1620
1212
  type: "button",
1621
- onClick: D,
1622
- disabled: Z || !ne,
1213
+ onClick: R,
1214
+ disabled: V || !X,
1623
1215
  style: {
1624
1216
  padding: "8px 24px",
1625
1217
  border: "none",
1626
1218
  borderRadius: "6px",
1627
- background: Z || !ne ? "#d9d9d9" : "#1890ff",
1219
+ background: V || !X ? "#d9d9d9" : "#1890ff",
1628
1220
  color: "#fff",
1629
- cursor: Z || !ne ? "not-allowed" : "pointer",
1221
+ cursor: V || !X ? "not-allowed" : "pointer",
1630
1222
  fontSize: "14px",
1631
1223
  fontWeight: 500,
1632
1224
  transition: "all 0.2s"
1633
1225
  },
1634
- onMouseEnter: (a) => {
1635
- !Z && ne && (a.currentTarget.style.background = "#40a9ff");
1226
+ onMouseEnter: (t) => {
1227
+ !V && X && (t.currentTarget.style.background = "#40a9ff");
1636
1228
  },
1637
- onMouseLeave: (a) => {
1638
- !Z && ne && (a.currentTarget.style.background = "#1890ff");
1229
+ onMouseLeave: (t) => {
1230
+ !V && X && (t.currentTarget.style.background = "#1890ff");
1639
1231
  },
1640
- children: Z ? "保存中..." : "保存"
1232
+ children: V ? "保存中..." : "保存"
1641
1233
  }
1642
1234
  )
1643
1235
  ]
@@ -1647,21 +1239,214 @@ ${A}`;
1647
1239
  }
1648
1240
  ),
1649
1241
  /* @__PURE__ */ e.jsx(
1650
- sa,
1242
+ Ut,
1651
1243
  {
1652
- open: he,
1244
+ open: re,
1653
1245
  onClose: () => ke(!1),
1654
- onSuccess: (a) => {
1655
- T((p) => [...p, a]), le(a.webhook_id);
1246
+ onSuccess: (t) => {
1247
+ te((u) => [...u, t]), ne(t.webhook_id);
1656
1248
  }
1657
1249
  }
1658
1250
  )
1659
1251
  ] });
1660
1252
  }
1661
- function Aa({ queueStatus: n }) {
1253
+ function ja({
1254
+ active: n,
1255
+ agents: a,
1256
+ collapsed: o,
1257
+ onToggle: l,
1258
+ className: f,
1259
+ activeView: g = "chat",
1260
+ onViewChange: r,
1261
+ onToolboxOpen: x,
1262
+ showLogout: N,
1263
+ onLogout: v,
1264
+ sidebarAgentMode: y = !1,
1265
+ onToggleSidebarMode: m,
1266
+ onAgentSelect: j
1267
+ }) {
1268
+ const w = localStorage.getItem("sso_domain") || "", O = [
1269
+ { key: "chat", icon: /* @__PURE__ */ e.jsx(Ft, {}), title: "对话" },
1270
+ ...["maiduo", "eccang"].includes(w) ? [
1271
+ {
1272
+ key: "plan",
1273
+ icon: /* @__PURE__ */ e.jsx(ia, {}),
1274
+ title: "自动化Beta"
1275
+ }
1276
+ ] : [],
1277
+ {
1278
+ key: "professional",
1279
+ icon: /* @__PURE__ */ e.jsx(ht, {}),
1280
+ title: "专业智能体"
1281
+ }
1282
+ ], b = [
1283
+ ...w === "yunduo" ? [] : [
1284
+ { key: "toolbox", icon: /* @__PURE__ */ e.jsx(xa, {}), label: "工具箱" },
1285
+ { key: "goals", icon: /* @__PURE__ */ e.jsx(ta, {}), label: "目标追踪" }
1286
+ ],
1287
+ { key: "settings", icon: /* @__PURE__ */ e.jsx(Gt, {}), label: "通知配置" }
1288
+ ];
1289
+ return /* @__PURE__ */ e.jsx("div", { className: "wandox-aside-wrap", children: /* @__PURE__ */ e.jsxs(
1290
+ "div",
1291
+ {
1292
+ className: `wandox-aside ${o ? "wandox-aside--collapsed" : ""} ${f || ""}`,
1293
+ "aria-hidden": o,
1294
+ children: [
1295
+ /* @__PURE__ */ e.jsxs("div", { className: "wandox-aside-header", children: [
1296
+ /* @__PURE__ */ e.jsx("span", { className: "wandox-aside-header__title", children: "AI 智能体" }),
1297
+ l && /* @__PURE__ */ e.jsx(
1298
+ "button",
1299
+ {
1300
+ type: "button",
1301
+ className: "wandox-aside-header-toggle",
1302
+ onClick: l,
1303
+ "aria-label": o ? "展开侧边栏" : "收起侧边栏",
1304
+ title: o ? "展开侧边栏" : "收起侧边栏",
1305
+ children: /* @__PURE__ */ e.jsxs(
1306
+ "svg",
1307
+ {
1308
+ xmlns: "http://www.w3.org/2000/svg",
1309
+ width: "18",
1310
+ height: "18",
1311
+ fill: "none",
1312
+ viewBox: "0 0 24 24",
1313
+ children: [
1314
+ /* @__PURE__ */ e.jsx("title", { children: o ? "展开侧边栏" : "收起侧边栏" }),
1315
+ /* @__PURE__ */ e.jsx(
1316
+ "path",
1317
+ {
1318
+ fill: "currentColor",
1319
+ d: "M21 5H11v14h10zM3 5h6v14H3zm0-2a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h18a2 2 0 0 0 2-2V5a2 2 0 0 0-2-2zm2 4.25a.75.75 0 0 0 0 1.5h2a.75.75 0 0 0 0-1.5zm-.75 3.5A.75.75 0 0 1 5 10h2a.75.75 0 0 1 0 1.5H5a.75.75 0 0 1-.75-.75m.75 2a.75.75 0 0 0 0 1.5h2a.75.75 0 0 0 0-1.5z"
1320
+ }
1321
+ )
1322
+ ]
1323
+ }
1324
+ )
1325
+ }
1326
+ )
1327
+ ] }),
1328
+ /* @__PURE__ */ e.jsx("div", { className: "wandox-aside-main-nav", children: /* @__PURE__ */ e.jsx("div", { className: "wandox-aside-nav-list", children: O.map((d) => {
1329
+ const c = g === d.key, I = d.key === "professional";
1330
+ return /* @__PURE__ */ e.jsxs("div", { children: [
1331
+ /* @__PURE__ */ e.jsxs(
1332
+ "div",
1333
+ {
1334
+ className: `wandox-aside-nav-item-wrap${c ? " wandox-aside-nav-item-wrap--active" : ""}`,
1335
+ children: [
1336
+ /* @__PURE__ */ e.jsxs(
1337
+ "button",
1338
+ {
1339
+ type: "button",
1340
+ onClick: () => r == null ? void 0 : r(d.key),
1341
+ className: `wandox-aside-nav-item${c ? " wandox-aside-nav-item--active" : ""}`,
1342
+ children: [
1343
+ /* @__PURE__ */ e.jsx("span", { className: "wandox-aside-nav-icon", children: d.icon }),
1344
+ /* @__PURE__ */ e.jsx("span", { className: "wandox-aside-nav-title", children: d.title })
1345
+ ]
1346
+ }
1347
+ ),
1348
+ I && !o && m && /* @__PURE__ */ e.jsx(
1349
+ ss,
1350
+ {
1351
+ title: y ? "收起列表" : "展开列表",
1352
+ placement: "right",
1353
+ children: /* @__PURE__ */ e.jsx(
1354
+ "button",
1355
+ {
1356
+ type: "button",
1357
+ className: `wandox-aside-mode-toggle${y ? " wandox-aside-mode-toggle--active" : ""}`,
1358
+ onClick: (_) => {
1359
+ _.stopPropagation(), m();
1360
+ },
1361
+ children: y ? /* @__PURE__ */ e.jsx(ut, { style: { fontSize: 11 } }) : /* @__PURE__ */ e.jsx(Cs, { style: { fontSize: 11 } })
1362
+ }
1363
+ )
1364
+ }
1365
+ )
1366
+ ]
1367
+ }
1368
+ ),
1369
+ I && (y || o) && /* @__PURE__ */ e.jsx("div", { className: "wandox-aside-agent-list", children: a.map((_) => {
1370
+ const M = _.agent_id;
1371
+ if (!M) return null;
1372
+ const P = n === M && g === "professional";
1373
+ return /* @__PURE__ */ e.jsx(
1374
+ ss,
1375
+ {
1376
+ title: _.name,
1377
+ placement: "right",
1378
+ children: /* @__PURE__ */ e.jsxs(
1379
+ "button",
1380
+ {
1381
+ type: "button",
1382
+ className: `wandox-aside-agent-item${P ? " wandox-aside-agent-item--active" : ""}`,
1383
+ onClick: () => {
1384
+ j == null || j(M), g !== "professional" && (r == null || r("professional"));
1385
+ },
1386
+ children: [
1387
+ /* @__PURE__ */ e.jsx("span", { className: "wandox-aside-agent-icon", children: Ae(_.icon) }),
1388
+ /* @__PURE__ */ e.jsx("span", { className: "wandox-aside-agent-name", children: _.name })
1389
+ ]
1390
+ }
1391
+ )
1392
+ },
1393
+ M
1394
+ );
1395
+ }) })
1396
+ ] }, d.key);
1397
+ }) }) }),
1398
+ /* @__PURE__ */ e.jsxs("div", { className: "wandox-aside-bottom", children: [
1399
+ /* @__PURE__ */ e.jsx("p", { className: "wandox-aside-group-label", children: "系统功能" }),
1400
+ /* @__PURE__ */ e.jsxs("div", { className: "wandox-aside-nav-list wandox-aside-nav-list--bottom", children: [
1401
+ b.map((d) => {
1402
+ const c = d.key !== "toolbox" && g === d.key;
1403
+ return /* @__PURE__ */ e.jsxs(
1404
+ "button",
1405
+ {
1406
+ type: "button",
1407
+ onClick: () => {
1408
+ if (d.key === "toolbox") {
1409
+ x == null || x();
1410
+ return;
1411
+ }
1412
+ r == null || r(d.key);
1413
+ },
1414
+ className: `wandox-aside-nav-item${c ? " wandox-aside-nav-item--active" : ""}`,
1415
+ children: [
1416
+ /* @__PURE__ */ e.jsx("span", { className: "wandox-aside-nav-icon", children: d.icon }),
1417
+ /* @__PURE__ */ e.jsx("span", { className: "wandox-aside-nav-title", children: d.label })
1418
+ ]
1419
+ },
1420
+ d.key
1421
+ );
1422
+ }),
1423
+ N && /* @__PURE__ */ e.jsxs(
1424
+ "button",
1425
+ {
1426
+ type: "button",
1427
+ onClick: v,
1428
+ className: "wandox-aside-nav-item wandox-aside-nav-item--logout",
1429
+ children: [
1430
+ /* @__PURE__ */ e.jsx("span", { className: "wandox-aside-nav-icon", children: /* @__PURE__ */ e.jsx(ca, {}) }),
1431
+ /* @__PURE__ */ e.jsx("span", { className: "wandox-aside-nav-title", children: "退出登录" })
1432
+ ]
1433
+ }
1434
+ )
1435
+ ] }),
1436
+ /* @__PURE__ */ e.jsx("div", { style: { height: 8 } })
1437
+ ] })
1438
+ ]
1439
+ }
1440
+ ) });
1441
+ }
1442
+ function va(n) {
1443
+ const { children: a } = n;
1444
+ return /* @__PURE__ */ e.jsx("div", { className: "wandox-layout wandox-root", children: /* @__PURE__ */ e.jsx("main", { className: "wandox-layout-content", style: { padding: 0 }, children: a }) });
1445
+ }
1446
+ function _a({ queueStatus: n }) {
1662
1447
  if (!n) return null;
1663
- const t = n.status === "waiting";
1664
- return /* @__PURE__ */ e.jsx("div", { className: "wandox-queue-overlay", children: /* @__PURE__ */ e.jsx("div", { className: "wandox-queue-modal", children: t ? /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
1448
+ const a = n.status === "waiting";
1449
+ return /* @__PURE__ */ e.jsx("div", { className: "wandox-queue-overlay", children: /* @__PURE__ */ e.jsx("div", { className: "wandox-queue-modal", children: a ? /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
1665
1450
  /* @__PURE__ */ e.jsx("div", { className: "wandox-queue-icon wandox-queue-icon--waiting", children: /* @__PURE__ */ e.jsxs(
1666
1451
  "svg",
1667
1452
  {
@@ -1749,52 +1534,52 @@ function Aa({ queueStatus: n }) {
1749
1534
  /* @__PURE__ */ e.jsx("div", { className: "wandox-queue-subtitle", children: "正在处理您的请求..." })
1750
1535
  ] }) }) });
1751
1536
  }
1752
- function Pa({
1537
+ function ka({
1753
1538
  open: n,
1754
- actionName: t,
1755
- defaultParams: i = {},
1539
+ actionName: a,
1540
+ defaultParams: o = {},
1756
1541
  onCancel: l,
1757
- onExecute: c
1542
+ onExecute: f
1758
1543
  }) {
1759
- const [f, d] = s.useState({});
1544
+ const [g, r] = s.useState({});
1760
1545
  s.useEffect(() => {
1761
1546
  if (n) {
1762
- const x = {};
1763
- for (const j of Object.keys(i)) {
1764
- const b = i[j];
1765
- (typeof b == "string" || typeof b == "number") && (x[j] = String(b));
1547
+ const m = {};
1548
+ for (const j of Object.keys(o)) {
1549
+ const w = o[j];
1550
+ (typeof w == "string" || typeof w == "number") && (m[j] = String(w));
1766
1551
  }
1767
- d(x);
1552
+ r(m);
1768
1553
  }
1769
- }, [n, i]);
1770
- const m = (x, j) => {
1771
- d((b) => ({ ...b, [x]: j }));
1772
- }, k = (x) => {
1773
- x.preventDefault();
1774
- const j = { ...i };
1775
- for (const b of Object.keys(f))
1776
- j[b] = f[b];
1777
- c(j);
1778
- }, v = (x) => {
1779
- x.target === x.currentTarget && l();
1780
- }, w = (x, j) => typeof j == "object" && j !== null ? null : /* @__PURE__ */ e.jsxs("div", { className: "wandox-form-item", children: [
1781
- /* @__PURE__ */ e.jsx("span", { className: "wandox-form-label", children: x }),
1554
+ }, [n, o]);
1555
+ const x = (m, j) => {
1556
+ r((w) => ({ ...w, [m]: j }));
1557
+ }, N = (m) => {
1558
+ m.preventDefault();
1559
+ const j = { ...o };
1560
+ for (const w of Object.keys(g))
1561
+ j[w] = g[w];
1562
+ f(j);
1563
+ }, v = (m) => {
1564
+ m.target === m.currentTarget && l();
1565
+ }, y = (m, j) => typeof j == "object" && j !== null ? null : /* @__PURE__ */ e.jsxs("div", { className: "wandox-form-item", children: [
1566
+ /* @__PURE__ */ e.jsx("span", { className: "wandox-form-label", children: m }),
1782
1567
  /* @__PURE__ */ e.jsx(
1783
1568
  "input",
1784
1569
  {
1785
1570
  type: "text",
1786
1571
  className: "wandox-form-input",
1787
- placeholder: `请输入 ${x}`,
1788
- value: f[x] || "",
1789
- onChange: (b) => m(x, b.target.value)
1572
+ placeholder: `请输入 ${m}`,
1573
+ value: g[m] || "",
1574
+ onChange: (w) => x(m, w.target.value)
1790
1575
  }
1791
1576
  )
1792
- ] }, x);
1577
+ ] }, m);
1793
1578
  return n ? /* @__PURE__ */ e.jsx("div", { className: "wandox-modal-overlay", onClick: v, children: /* @__PURE__ */ e.jsxs("div", { className: "wandox-modal", style: { width: 600 }, children: [
1794
1579
  /* @__PURE__ */ e.jsxs("div", { className: "wandox-modal-header", children: [
1795
1580
  /* @__PURE__ */ e.jsxs("h3", { className: "wandox-modal-title", children: [
1796
1581
  "执行 Action: ",
1797
- t
1582
+ a
1798
1583
  ] }),
1799
1584
  /* @__PURE__ */ e.jsx(
1800
1585
  "button",
@@ -1809,11 +1594,11 @@ function Pa({
1809
1594
  ] }),
1810
1595
  /* @__PURE__ */ e.jsxs("div", { className: "wandox-modal-body", children: [
1811
1596
  /* @__PURE__ */ e.jsx("div", { className: "wandox-modal-description", children: "以下是默认参数,您可以修改后执行,或直接使用默认值执行" }),
1812
- /* @__PURE__ */ e.jsxs("form", { onSubmit: k, children: [
1813
- Object.keys(i).map(
1814
- (x) => w(x, i[x])
1597
+ /* @__PURE__ */ e.jsxs("form", { onSubmit: N, children: [
1598
+ Object.keys(o).map(
1599
+ (m) => y(m, o[m])
1815
1600
  ),
1816
- Object.keys(i).length === 0 && /* @__PURE__ */ e.jsx("div", { className: "wandox-empty-params", children: "该 Action 无需参数" })
1601
+ Object.keys(o).length === 0 && /* @__PURE__ */ e.jsx("div", { className: "wandox-empty-params", children: "该 Action 无需参数" })
1817
1602
  ] })
1818
1603
  ] }),
1819
1604
  /* @__PURE__ */ e.jsxs("div", { className: "wandox-modal-footer", children: [
@@ -1831,14 +1616,14 @@ function Pa({
1831
1616
  {
1832
1617
  type: "button",
1833
1618
  className: "wandox-button wandox-button-primary",
1834
- onClick: k,
1619
+ onClick: N,
1835
1620
  children: "执行"
1836
1621
  }
1837
1622
  )
1838
1623
  ] })
1839
1624
  ] }) }) : null;
1840
1625
  }
1841
- const vs = [
1626
+ const bs = [
1842
1627
  "要努力呀,为了想要的生活,为了人间的烟火气,为了今天的风和月。",
1843
1628
  "欣赏不来别人视若珍宝的,就该保持沉默。",
1844
1629
  "日子总是有意思的,了无生趣的是打不起精神的你。",
@@ -2035,16 +1820,16 @@ const vs = [
2035
1820
  "生活不在别处,就在此时此刻。",
2036
1821
  "每一段经历,都是人生最好的礼物。"
2037
1822
  ];
2038
- function Ra() {
1823
+ function Na() {
2039
1824
  return /* @__PURE__ */ e.jsxs("div", { className: "wandox-hub-skeleton-card", children: [
2040
1825
  /* @__PURE__ */ e.jsxs("div", { className: "wandox-hub-skeleton-row", children: [
2041
- /* @__PURE__ */ e.jsx(pe.Avatar, { active: !0, size: 28, shape: "circle" }),
2042
- /* @__PURE__ */ e.jsx(pe.Input, { active: !0, style: { width: 120, height: 18 } })
1826
+ /* @__PURE__ */ e.jsx(xe.Avatar, { active: !0, size: 28, shape: "circle" }),
1827
+ /* @__PURE__ */ e.jsx(xe.Input, { active: !0, style: { width: 120, height: 18 } })
2043
1828
  ] }),
2044
1829
  /* @__PURE__ */ e.jsxs("div", { style: { display: "flex", gap: 8 }, children: [
2045
- /* @__PURE__ */ e.jsx(pe.Input, { active: !0, block: !0, style: { height: 40, borderRadius: 10 } }),
1830
+ /* @__PURE__ */ e.jsx(xe.Input, { active: !0, block: !0, style: { height: 40, borderRadius: 10 } }),
2046
1831
  /* @__PURE__ */ e.jsx(
2047
- pe.Button,
1832
+ xe.Button,
2048
1833
  {
2049
1834
  active: !0,
2050
1835
  style: { width: 80, height: 40, borderRadius: 10 }
@@ -2053,10 +1838,10 @@ function Ra() {
2053
1838
  ] })
2054
1839
  ] });
2055
1840
  }
2056
- function Ea() {
1841
+ function Sa() {
2057
1842
  return /* @__PURE__ */ e.jsx("div", { className: "wandox-hub-skeleton-insights", children: [1, 2, 3].map((n) => /* @__PURE__ */ e.jsx("div", { className: "wandox-hub-skeleton-insight-card", children: /* @__PURE__ */ e.jsxs("div", { className: "wandox-hub-skeleton-insight-inner", children: [
2058
1843
  /* @__PURE__ */ e.jsx(
2059
- pe.Input,
1844
+ xe.Input,
2060
1845
  {
2061
1846
  active: !0,
2062
1847
  style: { width: 52, height: 22, borderRadius: 100 }
@@ -2064,181 +1849,181 @@ function Ea() {
2064
1849
  ),
2065
1850
  /* @__PURE__ */ e.jsxs("div", { style: { flex: 1 }, children: [
2066
1851
  /* @__PURE__ */ e.jsx(
2067
- pe.Input,
1852
+ xe.Input,
2068
1853
  {
2069
1854
  active: !0,
2070
1855
  block: !0,
2071
1856
  style: { height: 16, marginBottom: 6 }
2072
1857
  }
2073
1858
  ),
2074
- /* @__PURE__ */ e.jsx(pe.Input, { active: !0, style: { width: "70%", height: 12 } })
1859
+ /* @__PURE__ */ e.jsx(xe.Input, { active: !0, style: { width: "70%", height: 12 } })
2075
1860
  ] })
2076
1861
  ] }) }, n)) });
2077
1862
  }
2078
- function La(n) {
1863
+ function Ca(n) {
2079
1864
  return !!n && /^https?:\/\//.test(n);
2080
1865
  }
2081
1866
  function Je(n) {
2082
1867
  if (!n) return "✦";
2083
- if (La(n)) return /* @__PURE__ */ e.jsx("img", { src: n, alt: "" });
2084
- const t = At.get(n);
2085
- return t ? t.component : n;
1868
+ if (Ca(n)) return /* @__PURE__ */ e.jsx("img", { src: n, alt: "" });
1869
+ const a = Kt.get(n);
1870
+ return a ? a.component : n;
2086
1871
  }
2087
- function Ta(n, t) {
2088
- const i = `${n || ""} ${t || ""}`.toLowerCase();
2089
- return i.includes("red") || i.includes("critical") ? "wandox-insight-severity--red" : i.includes("orange") || i.includes("high") ? "wandox-insight-severity--orange" : i.includes("yellow") || i.includes("medium") ? "wandox-insight-severity--yellow" : "wandox-insight-severity--gray";
1872
+ function Ia(n, a) {
1873
+ const o = `${n || ""} ${a || ""}`.toLowerCase();
1874
+ return o.includes("red") || o.includes("critical") ? "wandox-insight-severity--red" : o.includes("orange") || o.includes("high") ? "wandox-insight-severity--orange" : o.includes("yellow") || o.includes("medium") ? "wandox-insight-severity--yellow" : "wandox-insight-severity--gray";
2090
1875
  }
2091
- function $a(n) {
2092
- const t = n.match(new RegExp("^\\p{Extended_Pictographic}", "u"));
2093
- return (t == null ? void 0 : t[0]) || "📌";
1876
+ function Pa(n) {
1877
+ const a = n.match(new RegExp("^\\p{Extended_Pictographic}", "u"));
1878
+ return (a == null ? void 0 : a[0]) || "📌";
2094
1879
  }
2095
- function _s(n) {
1880
+ function ys(n) {
2096
1881
  return n.replace(new RegExp("^\\p{Extended_Pictographic}\\s*", "u"), "");
2097
1882
  }
2098
- function ks(n) {
2099
- var t;
2100
- return n.bind_type === "playbook" && n.bind_playbook_id && ((t = n.playbook_args) != null && t.length) ? "执行" : n.bind_type === "agent" ? "找智能体聊聊" : n.bind_type === "chat" ? "分析一下" : "查看详情";
1883
+ function js(n) {
1884
+ var a;
1885
+ return n.bind_type === "playbook" && n.bind_playbook_id && ((a = n.playbook_args) != null && a.length) ? "执行" : n.bind_type === "agent" ? "找智能体聊聊" : n.bind_type === "chat" ? "分析一下" : "查看详情";
2101
1886
  }
2102
- function Ma(n, t) {
2103
- const i = n.asin || n.ASIN || n.sku || n.seller_sku, l = n.site || n.marketplace || n.country;
2104
- if (i || l)
2105
- return [i, l && `(${l})`].filter(Boolean).join(" ");
2106
- const c = Object.values(n).find(
2107
- (f) => f != null && String(f).trim()
1887
+ function Aa(n, a) {
1888
+ const o = n.asin || n.ASIN || n.sku || n.seller_sku, l = n.site || n.marketplace || n.country;
1889
+ if (o || l)
1890
+ return [o, l && `(${l})`].filter(Boolean).join(" ");
1891
+ const f = Object.values(n).find(
1892
+ (g) => g != null && String(g).trim()
2108
1893
  );
2109
- return c ? String(c) : `参数 ${t + 1}`;
1894
+ return f ? String(f) : `参数 ${a + 1}`;
2110
1895
  }
2111
- function Da(n, t) {
1896
+ function Ea(n, a) {
2112
1897
  var l;
2113
- const i = (l = n.query_template) == null ? void 0 : l.trim();
2114
- return !i || !t ? n.title : i.replace(
1898
+ const o = (l = n.query_template) == null ? void 0 : l.trim();
1899
+ return !o || !a ? n.title : o.replace(
2115
1900
  /\{\{?\s*([\w.-]+)\s*\}?\}/g,
2116
- (c, f) => {
2117
- const d = t[f];
2118
- return d == null ? c : String(d);
1901
+ (f, g) => {
1902
+ const r = a[g];
1903
+ return r == null ? f : String(r);
2119
1904
  }
2120
1905
  );
2121
1906
  }
2122
- function Ba(n) {
2123
- return !n || n.status === "disabled" || n.status === "error" || !n.scenes ? [] : Object.entries(n.scenes).map(([t, i]) => ({
2124
- name: t,
2125
- total_affected: i.total_affected,
2126
- suggestions_count: i.suggestions_count,
2127
- cards: Array.isArray(i.cards) ? i.cards : []
2128
- })).filter((t) => t.cards.length > 0);
1907
+ function Ra(n) {
1908
+ return !n || n.status === "disabled" || n.status === "error" || !n.scenes ? [] : Object.entries(n.scenes).map(([a, o]) => ({
1909
+ name: a,
1910
+ total_affected: o.total_affected,
1911
+ suggestions_count: o.suggestions_count,
1912
+ cards: Array.isArray(o.cards) ? o.cards : []
1913
+ })).filter((a) => a.cards.length > 0);
2129
1914
  }
2130
- function Oa({
1915
+ function $a({
2131
1916
  agentLoading: n,
2132
- mainAgentForHub: t,
2133
- mainAgentQuestions: i,
1917
+ mainAgentForHub: a,
1918
+ mainAgentQuestions: o,
2134
1919
  agents: l,
2135
- hubChatOpen: c,
2136
- setHubChatOpen: f,
2137
- hubChatInput: d,
2138
- setHubChatInput: m,
2139
- hubScrollIdx: k,
1920
+ hubChatOpen: f,
1921
+ setHubChatOpen: g,
1922
+ hubChatInput: r,
1923
+ setHubChatInput: x,
1924
+ hubScrollIdx: N,
2140
1925
  hubScrollFading: v,
2141
- onHubChatSend: w,
2142
- onHubInputFocus: x,
1926
+ onHubChatSend: y,
1927
+ onHubInputFocus: m,
2143
1928
  onHubInputBlur: j,
2144
- messages: b,
2145
- executing: V,
2146
- hubInlineChatInput: Q,
2147
- setHubInlineChatInput: y,
2148
- onHubInlineSend: r,
2149
- onEnterProfessional: u,
2150
- playbooks: C,
1929
+ messages: w,
1930
+ executing: O,
1931
+ hubInlineChatInput: W,
1932
+ setHubInlineChatInput: b,
1933
+ onHubInlineSend: d,
1934
+ onEnterProfessional: c,
1935
+ playbooks: I,
2151
1936
  executePlaybook: _,
2152
- onRequestPlaybookParams: O,
2153
- onAbort: N,
2154
- onRespondToProposal: F,
2155
- ssoToken: E,
2156
- ssoDomain: W,
2157
- ssoCompany: P
1937
+ onRequestPlaybookParams: M,
1938
+ onAbort: P,
1939
+ onRespondToProposal: Q,
1940
+ ssoToken: L,
1941
+ ssoDomain: B,
1942
+ ssoCompany: A
2158
1943
  }) {
2159
- var G, A, je, De, Ne;
2160
- const R = n && !t, z = localStorage.getItem("sso_username") || "", q = localStorage.getItem("sso_user_id") || "", $ = s.useRef(null), L = s.useRef(null), T = s.useMemo(() => [], []), [se, Y] = s.useState(""), [ee, fe] = s.useState([]), [ne, le] = s.useState(!1), [Z, ue] = s.useState("idle"), [he, ke] = s.useState(0), [X, xe] = s.useState(null), [M, Re] = s.useState(!1), I = l[0], K = (I == null ? void 0 : I.agent_code) || (I == null ? void 0 : I.agent_id) || "", ge = (G = I == null ? void 0 : I.questions) != null && G.length ? I.questions : i, Ee = W !== "yunduo" && ge[k % Math.max(ge.length, 1)] || "今天仓库订单处理的怎么样了?", We = s.useMemo(
2161
- () => vs[Math.floor(Math.random() * vs.length)],
1944
+ var D, C, ye, De, Ne;
1945
+ const E = n && !a, U = localStorage.getItem("sso_username") || "", F = localStorage.getItem("sso_user_id") || "", _e = s.useRef(null), se = s.useRef(null), te = s.useMemo(() => [], []), [be, J] = s.useState(""), [Z, me] = s.useState([]), [X, ne] = s.useState(!1), [V, de] = s.useState("idle"), [re, ke] = s.useState(0), [G, ce] = s.useState(null), [ae, Ee] = s.useState(!1), S = l[0], z = (S == null ? void 0 : S.agent_code) || (S == null ? void 0 : S.agent_id) || "", pe = (D = S == null ? void 0 : S.questions) != null && D.length ? S.questions : o, Re = B !== "yunduo" && pe[N % Math.max(pe.length, 1)] || "今天仓库订单处理的怎么样了?", We = s.useMemo(
1946
+ () => bs[Math.floor(Math.random() * bs.length)],
2162
1947
  []
2163
- ), be = s.useMemo(
1948
+ ), fe = s.useMemo(
2164
1949
  () => ({
2165
- Authorization: `Bearer ${E}`,
2166
- "X-Tenant-ID": P,
2167
- "X-Domain": W,
1950
+ Authorization: `Bearer ${L}`,
1951
+ "X-Tenant-ID": A,
1952
+ "X-Domain": B,
2168
1953
  "Content-Type": "application/json"
2169
1954
  }),
2170
- [E, P, W]
2171
- ), ie = s.useCallback(
2172
- async (o = !1) => {
2173
- if (!(!E || !W)) {
2174
- le(!0);
1955
+ [L, A, B]
1956
+ ), ee = s.useCallback(
1957
+ async (i = !1) => {
1958
+ if (!(!L || !B)) {
1959
+ ne(!0);
2175
1960
  try {
2176
- const S = await fetch(
2177
- `${Rs()}/api/v1/insights/${o ? "refresh" : "recommendations"}`,
1961
+ const k = await fetch(
1962
+ `${Is()}/api/v1/insights/${i ? "refresh" : "recommendations"}`,
2178
1963
  {
2179
- method: o ? "POST" : "GET",
2180
- headers: be
1964
+ method: i ? "POST" : "GET",
1965
+ headers: fe
2181
1966
  }
2182
1967
  );
2183
- if (!S.ok) throw new Error(`HTTP ${S.status}`);
2184
- const me = await S.json(), U = me == null ? void 0 : me.data;
2185
- ue((U == null ? void 0 : U.status) || "error"), ke((U == null ? void 0 : U.total_cards) || 0), fe(Ba(U));
1968
+ if (!k.ok) throw new Error(`HTTP ${k.status}`);
1969
+ const ue = await k.json(), T = ue == null ? void 0 : ue.data;
1970
+ de((T == null ? void 0 : T.status) || "error"), ke((T == null ? void 0 : T.total_cards) || 0), me(Ra(T));
2186
1971
  } catch {
2187
- ue("error"), ke(0), fe([]);
1972
+ de("error"), ke(0), me([]);
2188
1973
  } finally {
2189
- le(!1);
1974
+ ne(!1);
2190
1975
  }
2191
1976
  }
2192
1977
  },
2193
- [be, W, E]
1978
+ [fe, B, L]
2194
1979
  );
2195
1980
  s.useEffect(() => {
2196
- ie();
2197
- }, [ie]), s.useEffect(() => {
2198
- !se && K && Y(K);
2199
- }, [K, se]);
2200
- const re = ee, H = se || K || ((A = T[0]) == null ? void 0 : A.agent_id) || (t == null ? void 0 : t.agent_id), J = wt({
2201
- token: E,
2202
- domain: W,
2203
- tenantId: P,
2204
- agentId: H || "",
1981
+ ee();
1982
+ }, [ee]), s.useEffect(() => {
1983
+ !be && z && J(z);
1984
+ }, [z, be]);
1985
+ const ie = Z, q = be || z || ((C = te[0]) == null ? void 0 : C.agent_id) || (a == null ? void 0 : a.agent_id), K = xt({
1986
+ token: L,
1987
+ domain: B,
1988
+ tenantId: A,
1989
+ agentId: q || "",
2205
1990
  limit: 5
2206
1991
  });
2207
1992
  s.useEffect(() => {
2208
- if (!M || c) {
2209
- J.clear();
1993
+ if (!ae || f) {
1994
+ K.clear();
2210
1995
  return;
2211
1996
  }
2212
- J.search(d);
1997
+ K.search(r);
2213
1998
  }, [
2214
- M,
2215
- d,
2216
- c,
2217
- J.search,
2218
- J.clear
1999
+ ae,
2000
+ r,
2001
+ f,
2002
+ K.search,
2003
+ K.clear
2219
2004
  ]);
2220
- const D = re.length > 0 && re.every((o) => o.cards.length === 1), Le = T.slice(0, 3), Te = T.slice(3), $e = H === K ? I == null ? void 0 : I.name : (je = T.find((o) => o.agent_id === H)) == null ? void 0 : je.name, Me = H === K ? I != null && I.icon ? Pe(I.icon) : Pe("robot") : Je(
2221
- (De = T.find((o) => o.agent_id === H)) == null ? void 0 : De.icon
2222
- ), ye = H === K ? I == null ? void 0 : I.description : (Ne = T.find((o) => o.agent_id === H)) == null ? void 0 : Ne.description, a = (o, S) => {
2223
- if (o.bind_type === "agent" && o.bind_agent_code) {
2224
- u(o.bind_agent_code);
2005
+ const R = ie.length > 0 && ie.every((i) => i.cards.length === 1), $e = te.slice(0, 3), Me = te.slice(3), Le = q === z ? S == null ? void 0 : S.name : (ye = te.find((i) => i.agent_id === q)) == null ? void 0 : ye.name, Te = q === z ? S != null && S.icon ? Ae(S.icon) : Ae("robot") : Je(
2006
+ (De = te.find((i) => i.agent_id === q)) == null ? void 0 : De.icon
2007
+ ), ge = q === z ? S == null ? void 0 : S.description : (Ne = te.find((i) => i.agent_id === q)) == null ? void 0 : Ne.description, t = (i, k) => {
2008
+ if (i.bind_type === "agent" && i.bind_agent_code) {
2009
+ c(i.bind_agent_code);
2225
2010
  return;
2226
2011
  }
2227
- if (o.bind_type === "playbook" && o.bind_playbook_id && S) {
2228
- f(!0), _({
2229
- message: Da(o, S),
2230
- playbook_id: o.bind_playbook_id,
2231
- playbook_params: S
2012
+ if (i.bind_type === "playbook" && i.bind_playbook_id && k) {
2013
+ g(!0), _({
2014
+ message: Ea(i, k),
2015
+ playbook_id: i.bind_playbook_id,
2016
+ playbook_params: k
2232
2017
  });
2233
2018
  return;
2234
2019
  }
2235
- w(H, o.title);
2236
- }, p = (o, S, me, U = !1, Qe = !1) => {
2237
- const Se = Array.isArray(S.playbook_args) ? S.playbook_args : [], ve = S.bind_type === "playbook" && !!S.bind_playbook_id && Se.length > 0;
2020
+ y(q, i.title);
2021
+ }, u = (i, k, ue, T = !1, Ue = !1) => {
2022
+ const Se = Array.isArray(k.playbook_args) ? k.playbook_args : [], je = k.bind_type === "playbook" && !!k.bind_playbook_id && Se.length > 0;
2238
2023
  return /* @__PURE__ */ e.jsxs(
2239
2024
  "article",
2240
2025
  {
2241
- className: `wandox-insight-card${U ? " wandox-insight-card--modal" : ""}${Qe ? " wandox-insight-card--featured" : ""}`,
2026
+ className: `wandox-insight-card${T ? " wandox-insight-card--modal" : ""}${Ue ? " wandox-insight-card--featured" : ""}`,
2242
2027
  children: [
2243
2028
  /* @__PURE__ */ e.jsxs(
2244
2029
  "button",
@@ -2246,54 +2031,54 @@ function Oa({
2246
2031
  type: "button",
2247
2032
  className: "wandox-insight-card-main",
2248
2033
  onClick: () => {
2249
- U && xe(null), a(S, Se[0]);
2034
+ T && ce(null), t(k, Se[0]);
2250
2035
  },
2251
2036
  children: [
2252
2037
  /* @__PURE__ */ e.jsxs("div", { className: "wandox-insight-card-top", children: [
2253
2038
  /* @__PURE__ */ e.jsx(
2254
2039
  "span",
2255
2040
  {
2256
- className: `wandox-insight-severity ${Ta(S.severity_color, S.priority)}`,
2257
- children: S.severity_label || "观察"
2041
+ className: `wandox-insight-severity ${Ia(k.severity_color, k.priority)}`,
2042
+ children: k.severity_label || "观察"
2258
2043
  }
2259
2044
  ),
2260
- S.affected_count && /* @__PURE__ */ e.jsx("span", { children: S.affected_count })
2045
+ k.affected_count && /* @__PURE__ */ e.jsx("span", { children: k.affected_count })
2261
2046
  ] }),
2262
- /* @__PURE__ */ e.jsx("h4", { children: S.title }),
2263
- S.description && /* @__PURE__ */ e.jsx("p", { children: S.description }),
2047
+ /* @__PURE__ */ e.jsx("h4", { children: k.title }),
2048
+ k.description && /* @__PURE__ */ e.jsx("p", { children: k.description }),
2264
2049
  /* @__PURE__ */ e.jsxs("div", { className: "wandox-insight-card-foot", children: [
2265
- /* @__PURE__ */ e.jsx("span", { children: S.value_hint || "建议进一步确认" }),
2266
- !ve && /* @__PURE__ */ e.jsxs("strong", { children: [
2267
- ks(S),
2050
+ /* @__PURE__ */ e.jsx("span", { children: k.value_hint || "建议进一步确认" }),
2051
+ !je && /* @__PURE__ */ e.jsxs("strong", { children: [
2052
+ js(k),
2268
2053
  " →"
2269
2054
  ] })
2270
2055
  ] })
2271
2056
  ]
2272
2057
  }
2273
2058
  ),
2274
- ve && /* @__PURE__ */ e.jsxs("div", { className: "wandox-insight-arg-list", children: [
2275
- Se.slice(0, U ? 10 : 3).map((Ce, te) => /* @__PURE__ */ e.jsxs(
2059
+ je && /* @__PURE__ */ e.jsxs("div", { className: "wandox-insight-arg-list", children: [
2060
+ Se.slice(0, T ? 10 : 3).map((Ce, H) => /* @__PURE__ */ e.jsxs(
2276
2061
  "button",
2277
2062
  {
2278
2063
  type: "button",
2279
2064
  className: "wandox-insight-arg-action",
2280
2065
  onClick: () => {
2281
- U && xe(null), a(S, Ce);
2066
+ T && ce(null), t(k, Ce);
2282
2067
  },
2283
2068
  children: [
2284
- /* @__PURE__ */ e.jsx("span", { children: Ma(Ce, te) }),
2285
- /* @__PURE__ */ e.jsx("strong", { children: ks(S) })
2069
+ /* @__PURE__ */ e.jsx("span", { children: Aa(Ce, H) }),
2070
+ /* @__PURE__ */ e.jsx("strong", { children: js(k) })
2286
2071
  ]
2287
2072
  },
2288
- `${S.title}-${te}`
2073
+ `${k.title}-${H}`
2289
2074
  )),
2290
- !U && Se.length > 3 && /* @__PURE__ */ e.jsxs(
2075
+ !T && Se.length > 3 && /* @__PURE__ */ e.jsxs(
2291
2076
  "button",
2292
2077
  {
2293
2078
  type: "button",
2294
2079
  className: "wandox-insight-arg-more",
2295
- onClick: () => xe(
2296
- re.find((Ce) => Ce.name === o) || null
2080
+ onClick: () => ce(
2081
+ ie.find((Ce) => Ce.name === i) || null
2297
2082
  ),
2298
2083
  children: [
2299
2084
  "还有 ",
@@ -2305,7 +2090,7 @@ function Oa({
2305
2090
  ] })
2306
2091
  ]
2307
2092
  },
2308
- `${o}-${S.title}-${me}`
2093
+ `${i}-${k.title}-${ue}`
2309
2094
  );
2310
2095
  };
2311
2096
  return /* @__PURE__ */ e.jsx("div", { className: "wandox-view-scroll", children: /* @__PURE__ */ e.jsxs("div", { className: "wandox-view-content wandox-hub-v2", children: [
@@ -2313,19 +2098,19 @@ function Oa({
2313
2098
  /* @__PURE__ */ e.jsxs("div", { children: [
2314
2099
  /* @__PURE__ */ e.jsxs("h1", { className: "wandox-hub-v2-title", children: [
2315
2100
  "您好,",
2316
- z || "欢迎回来"
2101
+ U || "欢迎回来"
2317
2102
  ] }),
2318
2103
  /* @__PURE__ */ e.jsx("p", { className: "wandox-hub-v2-subtitle", children: We })
2319
2104
  ] }),
2320
- W !== "yunduo" && /* @__PURE__ */ e.jsxs(
2105
+ B !== "yunduo" && /* @__PURE__ */ e.jsxs(
2321
2106
  "button",
2322
2107
  {
2323
2108
  type: "button",
2324
2109
  className: "wandox-hub-v2-report",
2325
2110
  onClick: () => {
2326
- const o = new URLSearchParams();
2327
- E && o.append("authorization", E), W && o.append("x-domain", W), P && o.append("x-tenant-id", P), q && o.append("user_id", q), z && o.append("username", z), window.open(
2328
- `https://ai.wandox.com/trend-report/trend-report-6.html${o.toString() ? `?${o.toString()}` : ""}`,
2111
+ const i = new URLSearchParams();
2112
+ L && i.append("authorization", L), B && i.append("x-domain", B), A && i.append("x-tenant-id", A), F && i.append("user_id", F), U && i.append("username", U), window.open(
2113
+ `https://ai.wandox.com/trend-report/trend-report-6.html${i.toString() ? `?${i.toString()}` : ""}`,
2329
2114
  "_blank"
2330
2115
  );
2331
2116
  },
@@ -2339,28 +2124,28 @@ function Oa({
2339
2124
  }
2340
2125
  )
2341
2126
  ] }),
2342
- R ? /* @__PURE__ */ e.jsx(Ra, {}) : /* @__PURE__ */ e.jsxs(
2127
+ E ? /* @__PURE__ */ e.jsx(Na, {}) : /* @__PURE__ */ e.jsxs(
2343
2128
  "div",
2344
2129
  {
2345
- ref: $,
2346
- className: `wandox-hub-main-card${c ? " wandox-hub-main-card--open" : ""}`,
2130
+ ref: _e,
2131
+ className: `wandox-hub-main-card${f ? " wandox-hub-main-card--open" : ""}`,
2347
2132
  children: [
2348
2133
  /* @__PURE__ */ e.jsx(
2349
2134
  "div",
2350
2135
  {
2351
2136
  className: "wandox-hub-main-card-search",
2352
2137
  style: {
2353
- opacity: c ? 0 : 1,
2354
- maxHeight: c ? 0 : 520,
2138
+ opacity: f ? 0 : 1,
2139
+ maxHeight: f ? 0 : 520,
2355
2140
  transition: "opacity 0.2s ease, max-height 0.35s cubic-bezier(0.4,0,0.2,1)"
2356
2141
  },
2357
2142
  children: /* @__PURE__ */ e.jsxs("div", { className: "wandox-hub-v2-input-panel", children: [
2358
2143
  /* @__PURE__ */ e.jsxs("div", { className: "wandox-hub-v2-input-head", children: [
2359
2144
  /* @__PURE__ */ e.jsxs("div", { className: "wandox-hub-v2-agent-title", children: [
2360
- /* @__PURE__ */ e.jsx("span", { className: "wandox-hub-v2-agent-mark", children: Me }),
2145
+ /* @__PURE__ */ e.jsx("span", { className: "wandox-hub-v2-agent-mark", children: Te }),
2361
2146
  /* @__PURE__ */ e.jsxs("div", { children: [
2362
- /* @__PURE__ */ e.jsx("strong", { children: $e || (t == null ? void 0 : t.name) || "通用问答" }),
2363
- /* @__PURE__ */ e.jsx("span", { children: ye || "问什么都行,系统会自动分流到对应的专业能力" })
2147
+ /* @__PURE__ */ e.jsx("strong", { children: Le || (a == null ? void 0 : a.name) || "通用问答" }),
2148
+ /* @__PURE__ */ e.jsx("span", { children: ge || "问什么都行,系统会自动分流到对应的专业能力" })
2364
2149
  ] })
2365
2150
  ] }),
2366
2151
  /* @__PURE__ */ e.jsxs(
@@ -2369,45 +2154,45 @@ function Oa({
2369
2154
  className: "wandox-hub-v2-chip-row",
2370
2155
  style: { display: "none" },
2371
2156
  children: [
2372
- K && /* @__PURE__ */ e.jsxs(
2157
+ z && /* @__PURE__ */ e.jsxs(
2373
2158
  "button",
2374
2159
  {
2375
2160
  type: "button",
2376
- className: `wandox-hub-v2-chip${H === K ? " wandox-hub-v2-chip--active" : ""}`,
2377
- onClick: () => Y(K),
2378
- title: (I == null ? void 0 : I.description) || (I == null ? void 0 : I.name) || "全部",
2161
+ className: `wandox-hub-v2-chip${q === z ? " wandox-hub-v2-chip--active" : ""}`,
2162
+ onClick: () => J(z),
2163
+ title: (S == null ? void 0 : S.description) || (S == null ? void 0 : S.name) || "全部",
2379
2164
  children: [
2380
- /* @__PURE__ */ e.jsx("span", { className: "wandox-hub-v2-chip-icon", children: I != null && I.icon ? Pe(I.icon) : "✦" }),
2165
+ /* @__PURE__ */ e.jsx("span", { className: "wandox-hub-v2-chip-icon", children: S != null && S.icon ? Ae(S.icon) : "✦" }),
2381
2166
  "全部"
2382
2167
  ]
2383
2168
  }
2384
2169
  ),
2385
- Le.map((o) => /* @__PURE__ */ e.jsxs(
2170
+ $e.map((i) => /* @__PURE__ */ e.jsxs(
2386
2171
  "button",
2387
2172
  {
2388
2173
  type: "button",
2389
- className: `wandox-hub-v2-chip${o.agent_id === H ? " wandox-hub-v2-chip--active" : ""}`,
2390
- onClick: () => Y(o.agent_id),
2391
- title: o.description || o.name,
2174
+ className: `wandox-hub-v2-chip${i.agent_id === q ? " wandox-hub-v2-chip--active" : ""}`,
2175
+ onClick: () => J(i.agent_id),
2176
+ title: i.description || i.name,
2392
2177
  children: [
2393
- /* @__PURE__ */ e.jsx("span", { className: "wandox-hub-v2-chip-icon", children: Je(o.icon) }),
2394
- o.name
2178
+ /* @__PURE__ */ e.jsx("span", { className: "wandox-hub-v2-chip-icon", children: Je(i.icon) }),
2179
+ i.name
2395
2180
  ]
2396
2181
  },
2397
- o.agent_id
2182
+ i.agent_id
2398
2183
  )),
2399
- Te.length > 0 && /* @__PURE__ */ e.jsx(
2400
- jt,
2184
+ Me.length > 0 && /* @__PURE__ */ e.jsx(
2185
+ mt,
2401
2186
  {
2402
2187
  menu: {
2403
- items: Te.map((o) => ({
2404
- key: o.agent_id,
2188
+ items: Me.map((i) => ({
2189
+ key: i.agent_id,
2405
2190
  label: /* @__PURE__ */ e.jsxs("span", { className: "wandox-hub-v2-more-item", children: [
2406
- /* @__PURE__ */ e.jsx("span", { className: "wandox-hub-v2-chip-icon", children: Je(o.icon) }),
2407
- /* @__PURE__ */ e.jsx("span", { children: o.name })
2191
+ /* @__PURE__ */ e.jsx("span", { className: "wandox-hub-v2-chip-icon", children: Je(i.icon) }),
2192
+ /* @__PURE__ */ e.jsx("span", { children: i.name })
2408
2193
  ] })
2409
2194
  })),
2410
- onClick: ({ key: o }) => Y(String(o))
2195
+ onClick: ({ key: i }) => J(String(i))
2411
2196
  },
2412
2197
  placement: "bottomRight",
2413
2198
  children: /* @__PURE__ */ e.jsxs(
@@ -2417,7 +2202,7 @@ function Oa({
2417
2202
  className: "wandox-hub-v2-chip wandox-hub-v2-chip--more",
2418
2203
  children: [
2419
2204
  "更多 ",
2420
- /* @__PURE__ */ e.jsx(vt, {})
2205
+ /* @__PURE__ */ e.jsx(pt, {})
2421
2206
  ]
2422
2207
  }
2423
2208
  )
@@ -2429,19 +2214,19 @@ function Oa({
2429
2214
  ] }),
2430
2215
  /* @__PURE__ */ e.jsxs("div", { className: "wandox-hub-v2-input-wrap", children: [
2431
2216
  /* @__PURE__ */ e.jsx(
2432
- Ve.TextArea,
2217
+ qe.TextArea,
2433
2218
  {
2434
- value: d,
2435
- onChange: (o) => m(o.target.value),
2436
- onPressEnter: (o) => {
2437
- o.shiftKey || (o.preventDefault(), w(H));
2219
+ value: r,
2220
+ onChange: (i) => x(i.target.value),
2221
+ onPressEnter: (i) => {
2222
+ i.shiftKey || (i.preventDefault(), y(q));
2438
2223
  },
2439
2224
  onFocus: () => {
2440
- Re(!0), x == null || x();
2225
+ Ee(!0), m == null || m();
2441
2226
  },
2442
2227
  onBlur: () => {
2443
2228
  window.setTimeout(
2444
- () => Re(!1),
2229
+ () => Ee(!1),
2445
2230
  120
2446
2231
  ), j == null || j();
2447
2232
  },
@@ -2452,18 +2237,18 @@ function Oa({
2452
2237
  }
2453
2238
  ),
2454
2239
  /* @__PURE__ */ e.jsx(
2455
- _t,
2240
+ ft,
2456
2241
  {
2457
- open: M,
2458
- rewrittenQuestion: J.rewrittenQuestion,
2459
- questions: J.questions,
2460
- loading: J.loading,
2242
+ open: ae,
2243
+ rewrittenQuestion: K.rewrittenQuestion,
2244
+ questions: K.questions,
2245
+ loading: K.loading,
2461
2246
  placement: "bottom",
2462
- onSelectRewrite: (o) => {
2463
- m(o), J.clear();
2247
+ onSelectRewrite: (i) => {
2248
+ x(i), K.clear();
2464
2249
  },
2465
- onSelectQuestion: (o) => {
2466
- m(""), J.clear(), w(H, o.title);
2250
+ onSelectQuestion: (i) => {
2251
+ x(""), K.clear(), y(q, i.title);
2467
2252
  }
2468
2253
  }
2469
2254
  )
@@ -2477,23 +2262,23 @@ function Oa({
2477
2262
  type: "button",
2478
2263
  className: "wandox-hub-v2-example-text",
2479
2264
  onClick: () => {
2480
- m(Ee);
2265
+ x(Re);
2481
2266
  },
2482
2267
  style: {
2483
2268
  opacity: v ? 0 : 1,
2484
2269
  transform: v ? "translateY(-4px)" : "translateY(0)"
2485
2270
  },
2486
- children: Ee
2271
+ children: Re
2487
2272
  }
2488
2273
  )
2489
2274
  ] }),
2490
2275
  /* @__PURE__ */ e.jsx(
2491
- _e,
2276
+ ve,
2492
2277
  {
2493
2278
  type: "primary",
2494
- icon: /* @__PURE__ */ e.jsx(kt, {}),
2279
+ icon: /* @__PURE__ */ e.jsx(gt, {}),
2495
2280
  className: "wandox-hub-v2-send",
2496
- onClick: () => w(H),
2281
+ onClick: () => y(q),
2497
2282
  children: "发送问题"
2498
2283
  }
2499
2284
  )
@@ -2505,22 +2290,22 @@ function Oa({
2505
2290
  "div",
2506
2291
  {
2507
2292
  style: {
2508
- height: c ? "100%" : 0,
2293
+ height: f ? "100%" : 0,
2509
2294
  display: "flex",
2510
2295
  flexDirection: "column",
2511
- opacity: c ? 1 : 0,
2296
+ opacity: f ? 1 : 0,
2512
2297
  overflow: "hidden",
2513
2298
  transition: "opacity 0.3s ease 0.1s, max-height 0.4s cubic-bezier(0.4,0,0.2,1)",
2514
2299
  position: "relative",
2515
- zIndex: c ? 1 : -1
2300
+ zIndex: f ? 1 : -1
2516
2301
  },
2517
2302
  children: [
2518
2303
  /* @__PURE__ */ e.jsxs("div", { className: "wandox-hub-chat-header", children: [
2519
- t && /* @__PURE__ */ e.jsxs("div", { className: "wandox-hub-chat-agent-avatar", children: [
2520
- Pe(t.icon),
2521
- t.is_main && /* @__PURE__ */ e.jsx("div", { className: "wandox-hub-chat-agent-badge" })
2304
+ a && /* @__PURE__ */ e.jsxs("div", { className: "wandox-hub-chat-agent-avatar", children: [
2305
+ Ae(a.icon),
2306
+ a.is_main && /* @__PURE__ */ e.jsx("div", { className: "wandox-hub-chat-agent-badge" })
2522
2307
  ] }),
2523
- /* @__PURE__ */ e.jsx("span", { className: "wandox-hub-chat-agent-name", children: t == null ? void 0 : t.name }),
2308
+ /* @__PURE__ */ e.jsx("span", { className: "wandox-hub-chat-agent-name", children: a == null ? void 0 : a.name }),
2524
2309
  /* @__PURE__ */ e.jsx("span", { className: "wandox-hub-chat-status", children: "对话中" }),
2525
2310
  /* @__PURE__ */ e.jsx(
2526
2311
  "button",
@@ -2528,7 +2313,7 @@ function Oa({
2528
2313
  type: "button",
2529
2314
  className: "wandox-hub-chat-close",
2530
2315
  onClick: () => {
2531
- N(), f(!1);
2316
+ P(), g(!1);
2532
2317
  },
2533
2318
  children: "×"
2534
2319
  }
@@ -2536,47 +2321,47 @@ function Oa({
2536
2321
  ] }),
2537
2322
  /* @__PURE__ */ e.jsxs("div", { className: "wandox-chat-section__body wandox-chat-section__body--hub", children: [
2538
2323
  /* @__PURE__ */ e.jsx(
2539
- Nt,
2324
+ wt,
2540
2325
  {
2541
- messages: b,
2542
- executing: V,
2543
- ssoToken: E,
2544
- ssoDomain: W,
2545
- ssoCompany: P,
2546
- onExecutePlaybook: (o) => _(o),
2547
- onFillPlaybookParams: (o) => O({
2548
- playbook_id: o.playbookId,
2549
- name: o.playbookName,
2550
- input_fields: o.inputFields,
2551
- initial_params: o.initialParams,
2552
- playbook_type: o.playbookType
2326
+ messages: w,
2327
+ executing: O,
2328
+ ssoToken: L,
2329
+ ssoDomain: B,
2330
+ ssoCompany: A,
2331
+ onExecutePlaybook: (i) => _(i),
2332
+ onFillPlaybookParams: (i) => M({
2333
+ playbook_id: i.playbookId,
2334
+ name: i.playbookName,
2335
+ input_fields: i.inputFields,
2336
+ initial_params: i.initialParams,
2337
+ playbook_type: i.playbookType
2553
2338
  }),
2554
- onRespondToProposal: F,
2555
- containerRef: L,
2339
+ onRespondToProposal: Q,
2340
+ containerRef: se,
2556
2341
  className: "wandox-hub-messages"
2557
2342
  }
2558
2343
  ),
2559
2344
  /* @__PURE__ */ e.jsx(
2560
- St,
2345
+ bt,
2561
2346
  {
2562
- messages: b,
2563
- scrollContainerRef: L
2347
+ messages: w,
2348
+ scrollContainerRef: se
2564
2349
  }
2565
2350
  )
2566
2351
  ] }),
2567
2352
  /* @__PURE__ */ e.jsx("div", { className: "wandox-hub-chat-input-row", children: /* @__PURE__ */ e.jsx(
2568
- Es,
2353
+ Ps,
2569
2354
  {
2570
- executing: V,
2571
- onSend: r,
2572
- playbooks: C,
2573
- value: Q,
2574
- onValueChange: y,
2355
+ executing: O,
2356
+ onSend: d,
2357
+ playbooks: I,
2358
+ value: W,
2359
+ onValueChange: b,
2575
2360
  placeholder: "继续提问…",
2576
- ssoToken: E,
2577
- ssoDomain: W,
2578
- ssoCompany: P,
2579
- onRequestPlaybookParams: O
2361
+ ssoToken: L,
2362
+ ssoDomain: B,
2363
+ ssoCompany: A,
2364
+ onRequestPlaybookParams: M
2580
2365
  }
2581
2366
  ) }),
2582
2367
  /* @__PURE__ */ e.jsx("div", { className: "wandox-hub-chat-footer", children: /* @__PURE__ */ e.jsx(
@@ -2584,7 +2369,7 @@ function Oa({
2584
2369
  {
2585
2370
  type: "button",
2586
2371
  className: "wandox-hub-chat-enter-link",
2587
- onClick: () => u(),
2372
+ onClick: () => c(),
2588
2373
  children: "进入完整对话视图 →"
2589
2374
  }
2590
2375
  ) })
@@ -2594,7 +2379,7 @@ function Oa({
2594
2379
  ]
2595
2380
  }
2596
2381
  ),
2597
- (ne || Z === "error" || Z === "success" && he >= 0) && Z !== "disabled" && /* @__PURE__ */ e.jsxs("div", { className: "wandox-hub-section wandox-hub-v2-insights", children: [
2382
+ (X || V === "error" || V === "success" && re >= 0) && V !== "disabled" && /* @__PURE__ */ e.jsxs("div", { className: "wandox-hub-section wandox-hub-v2-insights", children: [
2598
2383
  /* @__PURE__ */ e.jsxs("div", { className: "wandox-hub-v2-section-heading", children: [
2599
2384
  /* @__PURE__ */ e.jsxs("div", { children: [
2600
2385
  /* @__PURE__ */ e.jsxs("div", { className: "wandox-hub-v2-section-kicker", children: [
@@ -2604,42 +2389,42 @@ function Oa({
2604
2389
  /* @__PURE__ */ e.jsx("p", { children: "系统每天扫描你的店铺数据,自动识别出值得处理的场景" })
2605
2390
  ] }),
2606
2391
  /* @__PURE__ */ e.jsx(
2607
- _e,
2392
+ ve,
2608
2393
  {
2609
2394
  type: "text",
2610
2395
  size: "small",
2611
- icon: /* @__PURE__ */ e.jsx(Ct, {}),
2396
+ icon: /* @__PURE__ */ e.jsx(yt, {}),
2612
2397
  className: "wandox-hub-v2-refresh",
2613
- onClick: () => ie(!0),
2398
+ onClick: () => ee(!0),
2614
2399
  children: "换一批"
2615
2400
  }
2616
2401
  )
2617
2402
  ] }),
2618
- ne ? /* @__PURE__ */ e.jsx(Ea, {}) : Z === "error" ? /* @__PURE__ */ e.jsxs("div", { className: "wandox-insight-empty", children: [
2403
+ X ? /* @__PURE__ */ e.jsx(Sa, {}) : V === "error" ? /* @__PURE__ */ e.jsxs("div", { className: "wandox-insight-empty", children: [
2619
2404
  /* @__PURE__ */ e.jsx("strong", { children: "数据获取失败,请稍后重试" }),
2620
2405
  /* @__PURE__ */ e.jsx(
2621
- _e,
2406
+ ve,
2622
2407
  {
2623
2408
  type: "link",
2624
2409
  size: "small",
2625
- onClick: () => ie(),
2410
+ onClick: () => ee(),
2626
2411
  children: "重试"
2627
2412
  }
2628
2413
  )
2629
- ] }) : re.length === 0 ? /* @__PURE__ */ e.jsxs("div", { className: "wandox-insight-empty", children: [
2414
+ ] }) : ie.length === 0 ? /* @__PURE__ */ e.jsxs("div", { className: "wandox-insight-empty", children: [
2630
2415
  /* @__PURE__ */ e.jsx("strong", { children: "暂无场景推荐,数据正常" }),
2631
2416
  /* @__PURE__ */ e.jsx("span", { children: "当前没有扫描到需要优先处理的运营场景" })
2632
2417
  ] }) : /* @__PURE__ */ e.jsx(
2633
2418
  "div",
2634
2419
  {
2635
- className: `wandox-insight-scene-list${D ? " wandox-insight-scene-list--single-cards" : ""}${re.length === 1 ? " wandox-insight-scene-list--one-scene" : ""}`,
2636
- children: re.map((o) => /* @__PURE__ */ e.jsxs("section", { className: "wandox-insight-scene", children: [
2420
+ className: `wandox-insight-scene-list${R ? " wandox-insight-scene-list--single-cards" : ""}${ie.length === 1 ? " wandox-insight-scene-list--one-scene" : ""}`,
2421
+ children: ie.map((i) => /* @__PURE__ */ e.jsxs("section", { className: "wandox-insight-scene", children: [
2637
2422
  /* @__PURE__ */ e.jsx("div", { className: "wandox-insight-scene-head", children: /* @__PURE__ */ e.jsxs("div", { children: [
2638
- /* @__PURE__ */ e.jsx("strong", { children: _s(o.name) }),
2423
+ /* @__PURE__ */ e.jsx("strong", { children: ys(i.name) }),
2639
2424
  /* @__PURE__ */ e.jsxs("span", { children: [
2640
2425
  "扫描到",
2641
2426
  " ",
2642
- o.suggestions_count ?? o.cards.length,
2427
+ i.suggestions_count ?? i.cards.length,
2643
2428
  " ",
2644
2429
  "条建议"
2645
2430
  ] })
@@ -2647,32 +2432,32 @@ function Oa({
2647
2432
  /* @__PURE__ */ e.jsx(
2648
2433
  "div",
2649
2434
  {
2650
- className: `wandox-insight-card-row${o.cards.length === 1 ? " wandox-insight-card-row--single" : ""}`,
2651
- children: o.cards.slice(0, 4).map(
2652
- (S, me) => p(
2653
- o.name,
2654
- S,
2655
- me,
2435
+ className: `wandox-insight-card-row${i.cards.length === 1 ? " wandox-insight-card-row--single" : ""}`,
2436
+ children: i.cards.slice(0, 4).map(
2437
+ (k, ue) => u(
2438
+ i.name,
2439
+ k,
2440
+ ue,
2656
2441
  !1,
2657
- o.cards.length === 1
2442
+ i.cards.length === 1
2658
2443
  )
2659
2444
  )
2660
2445
  }
2661
2446
  ),
2662
- o.cards.length > 4 && /* @__PURE__ */ e.jsxs(
2447
+ i.cards.length > 4 && /* @__PURE__ */ e.jsxs(
2663
2448
  "button",
2664
2449
  {
2665
2450
  type: "button",
2666
2451
  className: "wandox-insight-view-all",
2667
- onClick: () => xe(o),
2452
+ onClick: () => ce(i),
2668
2453
  children: [
2669
2454
  "查看全部 ",
2670
- o.cards.length,
2455
+ i.cards.length,
2671
2456
  " 条建议 →"
2672
2457
  ]
2673
2458
  }
2674
2459
  )
2675
- ] }, o.name))
2460
+ ] }, i.name))
2676
2461
  }
2677
2462
  )
2678
2463
  ] }),
@@ -2686,24 +2471,24 @@ function Oa({
2686
2471
  /* @__PURE__ */ e.jsx("p", { children: "直接进入对应专家,按业务流程一步步处理" })
2687
2472
  ] }),
2688
2473
  /* @__PURE__ */ e.jsx(
2689
- _e,
2474
+ ve,
2690
2475
  {
2691
2476
  type: "link",
2692
2477
  size: "small",
2693
2478
  className: "wandox-hub-v2-refresh",
2694
- onClick: () => u(),
2479
+ onClick: () => c(),
2695
2480
  children: "全部 →"
2696
2481
  }
2697
2482
  )
2698
2483
  ] }),
2699
- R ? /* @__PURE__ */ e.jsx("div", { className: "wandox-agent-grid", children: [1, 2, 3].map((o) => /* @__PURE__ */ e.jsxs(
2484
+ E ? /* @__PURE__ */ e.jsx("div", { className: "wandox-agent-grid", children: [1, 2, 3].map((i) => /* @__PURE__ */ e.jsxs(
2700
2485
  "div",
2701
2486
  {
2702
2487
  className: "wandox-agent-entry-card",
2703
2488
  style: { pointerEvents: "none" },
2704
2489
  children: [
2705
2490
  /* @__PURE__ */ e.jsx(
2706
- pe.Avatar,
2491
+ xe.Avatar,
2707
2492
  {
2708
2493
  active: !0,
2709
2494
  size: 36,
@@ -2713,7 +2498,7 @@ function Oa({
2713
2498
  ),
2714
2499
  /* @__PURE__ */ e.jsxs("div", { style: { flex: 1 }, children: [
2715
2500
  /* @__PURE__ */ e.jsx(
2716
- pe.Input,
2501
+ xe.Input,
2717
2502
  {
2718
2503
  active: !0,
2719
2504
  block: !0,
@@ -2721,7 +2506,7 @@ function Oa({
2721
2506
  }
2722
2507
  ),
2723
2508
  /* @__PURE__ */ e.jsx(
2724
- pe.Input,
2509
+ xe.Input,
2725
2510
  {
2726
2511
  active: !0,
2727
2512
  style: { width: "80%", height: 11 }
@@ -2730,656 +2515,550 @@ function Oa({
2730
2515
  ] })
2731
2516
  ]
2732
2517
  },
2733
- o
2734
- )) }) : /* @__PURE__ */ e.jsx("div", { className: "wandox-agent-grid", children: l.filter((o) => !o.is_main).slice(0, 4).map((o) => {
2735
- const S = As(o);
2518
+ i
2519
+ )) }) : /* @__PURE__ */ e.jsx("div", { className: "wandox-agent-grid", children: l.filter((i) => !i.is_main).slice(0, 4).map((i) => {
2520
+ const k = Ns(i);
2736
2521
  return /* @__PURE__ */ e.jsxs(
2737
2522
  "button",
2738
2523
  {
2739
2524
  type: "button",
2740
- className: `wandox-agent-entry-card${S ? " wandox-agent-entry-card--with-badge" : ""}`,
2741
- onClick: () => u(o.agent_id || void 0),
2525
+ className: `wandox-agent-entry-card${k ? " wandox-agent-entry-card--with-badge" : ""}`,
2526
+ onClick: () => c(i.agent_id || void 0),
2742
2527
  children: [
2743
- /* @__PURE__ */ e.jsx("div", { className: "wandox-agent-entry-icon", children: Pe(o.icon) }),
2528
+ /* @__PURE__ */ e.jsx("div", { className: "wandox-agent-entry-icon", children: Ae(i.icon) }),
2744
2529
  /* @__PURE__ */ e.jsxs("div", { className: "wandox-agent-entry-info", children: [
2745
- /* @__PURE__ */ e.jsx("div", { className: "wandox-agent-entry-name", children: o.name }),
2746
- /* @__PURE__ */ e.jsx("div", { className: "wandox-agent-entry-desc", children: o.description })
2530
+ /* @__PURE__ */ e.jsx("div", { className: "wandox-agent-entry-name", children: i.name }),
2531
+ /* @__PURE__ */ e.jsx("div", { className: "wandox-agent-entry-desc", children: i.description })
2747
2532
  ] }),
2748
- /* @__PURE__ */ e.jsx(It, { className: "wandox-agent-entry-arrow" }),
2749
- S && /* @__PURE__ */ e.jsx(
2533
+ /* @__PURE__ */ e.jsx(jt, { className: "wandox-agent-entry-arrow" }),
2534
+ k && /* @__PURE__ */ e.jsx(
2750
2535
  "span",
2751
2536
  {
2752
- className: `wandox-agent-entry-badge wandox-agent-entry-badge--${S.kind}`,
2537
+ className: `wandox-agent-entry-badge wandox-agent-entry-badge--${k.kind}`,
2753
2538
  style: {
2754
- background: S.badgeColor,
2755
- color: S.badgeTextColor
2539
+ background: k.badgeColor,
2540
+ color: k.badgeTextColor
2756
2541
  },
2757
- children: S.badgeText
2542
+ children: k.badgeText
2758
2543
  }
2759
2544
  )
2760
2545
  ]
2761
2546
  },
2762
- o.agent_id
2547
+ i.agent_id
2763
2548
  );
2764
2549
  }) })
2765
2550
  ] }),
2766
2551
  /* @__PURE__ */ e.jsx(
2767
- ds,
2552
+ ls,
2768
2553
  {
2769
- open: !!X,
2770
- onCancel: () => xe(null),
2554
+ open: !!G,
2555
+ onCancel: () => ce(null),
2771
2556
  footer: null,
2772
2557
  width: 920,
2773
2558
  centered: !0,
2774
2559
  className: "wandox-insight-modal",
2775
- title: X ? /* @__PURE__ */ e.jsxs("div", { className: "wandox-insight-modal-title", children: [
2776
- /* @__PURE__ */ e.jsx("span", { children: $a(X.name) }),
2560
+ title: G ? /* @__PURE__ */ e.jsxs("div", { className: "wandox-insight-modal-title", children: [
2561
+ /* @__PURE__ */ e.jsx("span", { children: Pa(G.name) }),
2777
2562
  /* @__PURE__ */ e.jsxs("div", { children: [
2778
- /* @__PURE__ */ e.jsx("strong", { children: _s(X.name) }),
2563
+ /* @__PURE__ */ e.jsx("strong", { children: ys(G.name) }),
2779
2564
  /* @__PURE__ */ e.jsxs("small", { children: [
2780
- X.cards.length,
2565
+ G.cards.length,
2781
2566
  " 条数据建议"
2782
2567
  ] })
2783
2568
  ] })
2784
2569
  ] }) : null,
2785
2570
  styles: { container: { padding: 0 } },
2786
- children: X && /* @__PURE__ */ e.jsx("div", { className: "wandox-insight-modal-grid", children: X.cards.map(
2787
- (o, S) => p(X.name, o, S, !0)
2571
+ children: G && /* @__PURE__ */ e.jsx("div", { className: "wandox-insight-modal-grid", children: G.cards.map(
2572
+ (i, k) => u(G.name, i, k, !0)
2788
2573
  ) })
2789
2574
  }
2790
2575
  )
2791
2576
  ] }) });
2792
2577
  }
2793
- function za(n = {}) {
2794
- const { presetAgents: t, initialAgentId: i } = n, { setAllQuestions: l } = Ls(), [c, f] = s.useState("default"), [d, m] = s.useState([]), [k, v] = s.useState([]), [w, x] = s.useState([]), [j, b] = s.useState(!1), [V, Q] = s.useState([]), [y, r] = s.useState([]), [u, C] = s.useState(!1), [_, O] = s.useState(!1), N = s.useRef(c), F = s.useRef(0), E = s.useRef(0);
2795
- N.current = c;
2796
- const W = s.useCallback(async () => {
2797
- var z, q;
2798
- if (t && t.length > 0) {
2799
- m(t), f((L) => {
2800
- var T, se;
2801
- if (L && L !== "default" && t.some((Y) => Y.agent_code === L || Y.agent_id === L))
2802
- return L;
2803
- if (i) {
2804
- const Y = ts(t, i);
2805
- if (Y) return as(Y);
2806
- oe.error("指定的智能体不存在,已切换到默认智能体");
2807
- }
2808
- return ((T = t[0]) == null ? void 0 : T.agent_code) || ((se = t[0]) == null ? void 0 : se.agent_id) || "";
2809
- });
2810
- const $ = [];
2811
- for (const L of t)
2812
- if (L.questions && Array.isArray(L.questions) && $.push(...L.questions), L.children)
2813
- for (const T of L.children)
2814
- T.questions && Array.isArray(T.questions) && $.push(...T.questions);
2815
- l($);
2816
- return;
2817
- }
2818
- C(!0);
2819
- try {
2820
- const { data: $ } = await Pt({ page: 1, page_size: 99 });
2821
- if (m($.filter((T) => !T.hidden) || []), i) {
2822
- const T = ts($ || [], i);
2823
- T ? f(as(T)) : (oe.error("指定的智能体不存在,已切换到默认智能体"), f(((z = $[0]) == null ? void 0 : z.agent_code) || ""));
2824
- } else
2825
- f(((q = $[0]) == null ? void 0 : q.agent_code) || "");
2826
- const L = [];
2827
- for (const T of $ || [])
2828
- if (T.questions && Array.isArray(T.questions) && L.push(...T.questions), T.children)
2829
- for (const se of T.children)
2830
- se.questions && Array.isArray(se.questions) && L.push(...se.questions);
2831
- l(L);
2832
- } catch {
2833
- }
2834
- C(!1);
2835
- }, [t, l, i]), P = s.useCallback(async () => {
2836
- if (!c || c === "default") return;
2837
- const z = c, q = ++F.current;
2838
- C(!0), O(!1), x([]);
2839
- try {
2840
- const { data: $ } = await Rt({ agent_id: z });
2841
- if (q !== F.current || N.current !== z) return;
2842
- v(Et($));
2843
- const L = $.playbook_groups || [];
2844
- Q(L);
2845
- const T = $.children || [];
2846
- r(T);
2847
- } catch {
2848
- if (q !== F.current || N.current !== z) return;
2849
- x([]);
2850
- } finally {
2851
- q === F.current && N.current === z && (C(!1), O(!0));
2852
- }
2853
- }, [c]), R = s.useCallback(async () => {
2854
- if (!c || c === "default") {
2855
- x([]);
2856
- return;
2857
- }
2858
- const z = c, q = ++E.current;
2859
- b(!0);
2860
- try {
2861
- const { data: $ } = await Lt({ agent_id: z });
2862
- if (q !== E.current || N.current !== z) return;
2863
- const L = Array.isArray($) ? $ : Array.isArray($ == null ? void 0 : $.user_playbooks) ? $.user_playbooks : [];
2864
- x(L);
2865
- } catch {
2866
- if (q !== E.current || N.current !== z) return;
2867
- x([]), oe.error("我的场景加载失败");
2868
- } finally {
2869
- q === E.current && N.current === z && b(!1);
2870
- }
2871
- }, [c]);
2872
- return {
2873
- // 状态
2874
- activeAgent: c,
2875
- setActiveAgent: f,
2876
- agents: d,
2877
- playbooks: k,
2878
- userPlaybooks: w,
2879
- userPlaybooksLoading: j,
2880
- playbookGroups: V,
2881
- childAgents: y,
2882
- loading: u,
2883
- setLoading: C,
2884
- playbooksLoaded: _,
2885
- // 操作
2886
- loadAgents: W,
2887
- loadPlaybooks: P,
2888
- loadUserPlaybooks: R
2889
- };
2890
- }
2891
- function Wa(n) {
2892
- const t = n.toLocaleDateString("zh-CN", {
2578
+ function Ma(n) {
2579
+ const a = n.toLocaleDateString("zh-CN", {
2893
2580
  year: "numeric",
2894
2581
  month: "2-digit",
2895
2582
  day: "2-digit"
2896
- }), i = n.toLocaleTimeString("zh-CN", {
2583
+ }), o = n.toLocaleTimeString("zh-CN", {
2897
2584
  hour: "2-digit",
2898
2585
  minute: "2-digit"
2899
2586
  });
2900
- return `${t}
2901
- ${i}`;
2587
+ return `${a}
2588
+ ${o}`;
2902
2589
  }
2903
- function es(n, t) {
2904
- return n.activeAgent === t.activeAgent && n.webhookId === t.webhookId && n.ssoToken === t.ssoToken && n.ssoDomain === t.ssoDomain && n.ssoCompany === t.ssoCompany;
2590
+ function es(n, a) {
2591
+ return n.activeAgent === a.activeAgent && n.webhookId === a.webhookId && n.ssoToken === a.ssoToken && n.ssoDomain === a.ssoDomain && n.ssoCompany === a.ssoCompany;
2905
2592
  }
2906
- function qa(n) {
2593
+ function La(n) {
2907
2594
  const {
2908
- activeAgent: t,
2909
- webhookId: i = "",
2595
+ activeAgent: a,
2596
+ webhookId: o = "",
2910
2597
  ssoToken: l = "",
2911
- ssoDomain: c = "",
2912
- ssoCompany: f = ""
2913
- } = n, [d, m] = s.useState([]), k = s.useRef({
2914
- activeAgent: t,
2915
- webhookId: i,
2598
+ ssoDomain: f = "",
2599
+ ssoCompany: g = ""
2600
+ } = n, [r, x] = s.useState([]), N = s.useRef({
2601
+ activeAgent: a,
2602
+ webhookId: o,
2916
2603
  ssoToken: l,
2917
- ssoDomain: c,
2918
- ssoCompany: f
2604
+ ssoDomain: f,
2605
+ ssoCompany: g
2919
2606
  });
2920
2607
  s.useEffect(() => {
2921
- k.current = {
2922
- activeAgent: t,
2923
- webhookId: i,
2608
+ N.current = {
2609
+ activeAgent: a,
2610
+ webhookId: o,
2924
2611
  ssoToken: l,
2925
- ssoDomain: c,
2926
- ssoCompany: f
2927
- }, m([]);
2928
- }, [t, i, l, c, f]);
2612
+ ssoDomain: f,
2613
+ ssoCompany: g
2614
+ }, x([]);
2615
+ }, [a, o, l, f, g]);
2929
2616
  const v = s.useCallback(async () => {
2930
- if (!t) return;
2931
- const w = {
2932
- activeAgent: t,
2933
- webhookId: i,
2617
+ if (!a) return;
2618
+ const y = {
2619
+ activeAgent: a,
2620
+ webhookId: o,
2934
2621
  ssoToken: l,
2935
- ssoDomain: c,
2936
- ssoCompany: f
2622
+ ssoDomain: f,
2623
+ ssoCompany: g
2937
2624
  };
2938
- if (es(k.current, w))
2625
+ if (es(N.current, y))
2939
2626
  try {
2940
- const x = await Tt({
2941
- agent_id: t,
2627
+ const m = await vt({
2628
+ agent_id: a,
2942
2629
  limit: 10,
2943
2630
  use_cache: !1
2944
2631
  });
2945
- if (!es(k.current, w)) return;
2946
- if (x != null && x.data && Array.isArray(x.data)) {
2947
- const j = x.data.map((b) => {
2948
- const V = Array.isArray(b.actions) ? b.actions || [] : [], Q = b.ui_payload, y = Q == null ? void 0 : Q.actions, r = Array.isArray(y) ? y : [], C = [...V, ...r].map((O) => {
2949
- const N = O;
2632
+ if (!es(N.current, y)) return;
2633
+ if (m != null && m.data && Array.isArray(m.data)) {
2634
+ const j = m.data.map((w) => {
2635
+ const O = Array.isArray(w.actions) ? w.actions || [] : [], W = w.ui_payload, b = W == null ? void 0 : W.actions, d = Array.isArray(b) ? b : [], I = [...O, ...d].map((M) => {
2636
+ const P = M;
2950
2637
  return {
2951
- label: N.display_name || N.label || "执行",
2952
- action_id: N.action_id,
2953
- playbook_id: N.playbook_id,
2954
- display_name: N.display_name,
2955
- display_icon: N.display_icon,
2956
- params: N.params,
2957
- params_fields_map: N.params_fields_map,
2958
- type: N.type,
2959
- url: N.url,
2960
- style: N.style,
2961
- status: N.action_status || N.status || void 0,
2962
- sort_order: N.sort_order,
2963
- executed_job_id: N.executed_job_id,
2964
- supports_batch: N.supports_batch === !0,
2965
- batch_max_items: N.batch_max_items,
2966
- batch_id: N.batch_id,
2967
- outputs: N.outputs
2638
+ label: P.display_name || P.label || "执行",
2639
+ action_id: P.action_id,
2640
+ playbook_id: P.playbook_id,
2641
+ display_name: P.display_name,
2642
+ display_icon: P.display_icon,
2643
+ params: P.params,
2644
+ params_fields_map: P.params_fields_map,
2645
+ type: P.type,
2646
+ url: P.url,
2647
+ style: P.style,
2648
+ status: P.action_status || P.status || void 0,
2649
+ sort_order: P.sort_order,
2650
+ executed_job_id: P.executed_job_id,
2651
+ supports_batch: P.supports_batch === !0,
2652
+ batch_max_items: P.batch_max_items,
2653
+ batch_id: P.batch_id,
2654
+ outputs: P.outputs
2968
2655
  };
2969
- }), _ = b.outputs;
2656
+ }), _ = w.outputs;
2970
2657
  return {
2971
- type: b.widget_type || "daily_report",
2972
- priority: b.priority || "medium",
2973
- title: b.title || "每日战报",
2974
- summary: b.summary || "",
2975
- timestamp: b.created_at ? Wa(new Date(b.created_at || "")) : "",
2976
- data: b.card_data || {},
2977
- actions: C,
2978
- id: b.inbox_id || "",
2979
- agent_id: b.agent_id || "",
2980
- read: !!b.is_read,
2981
- ui_payload: _ || Q || {}
2658
+ type: w.widget_type || "daily_report",
2659
+ priority: w.priority || "medium",
2660
+ title: w.title || "每日战报",
2661
+ summary: w.summary || "",
2662
+ timestamp: w.created_at ? Ma(new Date(w.created_at || "")) : "",
2663
+ data: w.card_data || {},
2664
+ actions: I,
2665
+ id: w.inbox_id || "",
2666
+ agent_id: w.agent_id || "",
2667
+ read: !!w.is_read,
2668
+ ui_payload: _ || W || {}
2982
2669
  };
2983
2670
  });
2984
2671
  if (j.length > 0) {
2985
- const b = j.sort((V, Q) => {
2986
- const y = V.timestamp ? new Date(V.timestamp.replace(/\n/g, " ")).getTime() : 0;
2987
- return (Q.timestamp ? new Date(Q.timestamp.replace(/\n/g, " ")).getTime() : 0) - y;
2672
+ const w = j.sort((O, W) => {
2673
+ const b = O.timestamp ? new Date(O.timestamp.replace(/\n/g, " ")).getTime() : 0;
2674
+ return (W.timestamp ? new Date(W.timestamp.replace(/\n/g, " ")).getTime() : 0) - b;
2988
2675
  });
2989
- m(b);
2676
+ x(w);
2990
2677
  } else
2991
- m([]);
2678
+ x([]);
2992
2679
  } else
2993
- m([]);
2994
- } catch (x) {
2995
- if (!es(k.current, w)) return;
2996
- throw m([]), x;
2680
+ x([]);
2681
+ } catch (m) {
2682
+ if (!es(N.current, y)) return;
2683
+ throw x([]), m;
2997
2684
  }
2998
- }, [t, i, l, c, f]);
2685
+ }, [a, o, l, f, g]);
2999
2686
  return {
3000
2687
  // 状态
3001
- widgets: d,
3002
- setWidgets: m,
2688
+ widgets: r,
2689
+ setWidgets: x,
3003
2690
  // 操作
3004
2691
  loadDailyReports: v
3005
2692
  };
3006
2693
  }
3007
- function Va() {
3008
- const [n, t] = s.useState([]), [i, l] = s.useState(!1), [c, f] = s.useState(!1), [d, m] = s.useState(""), [k, v] = s.useState([]), [w, x] = s.useState(!1), [j, b] = s.useState(null), [V, Q] = s.useState(!0), y = s.useRef(null), r = s.useCallback(async () => {
3009
- if (y.current)
3010
- return y.current;
3011
- const P = (async () => {
2694
+ function Ta() {
2695
+ const [n, a] = s.useState([]), [o, l] = s.useState(!1), [f, g] = s.useState(!1), [r, x] = s.useState(""), [N, v] = s.useState([]), [y, m] = s.useState(!1), [j, w] = s.useState(null), [O, W] = s.useState(!0), b = s.useRef(null), d = s.useCallback(async () => {
2696
+ if (b.current)
2697
+ return b.current;
2698
+ const A = (async () => {
3012
2699
  l(!0);
3013
2700
  try {
3014
- const R = await $t({
2701
+ const E = await _t({
3015
2702
  page: 1,
3016
2703
  page_size: 20
3017
2704
  });
3018
- return Array.isArray(R == null ? void 0 : R.data) ? (t(R.data), f(!0), !0) : (f(!1), !1);
2705
+ return Array.isArray(E == null ? void 0 : E.data) ? (a(E.data), g(!0), !0) : (g(!1), !1);
3019
2706
  } catch {
3020
- return f(!1), !1;
2707
+ return g(!1), !1;
3021
2708
  } finally {
3022
- l(!1), y.current = null;
2709
+ l(!1), b.current = null;
3023
2710
  }
3024
2711
  })();
3025
- return y.current = P, P;
3026
- }, []), u = s.useCallback(() => c ? Promise.resolve(!0) : r(), [r, c]), C = s.useCallback((P) => {
3027
- m(P), b({
3028
- session_id: P,
2712
+ return b.current = A, A;
2713
+ }, []), c = s.useCallback(() => f ? Promise.resolve(!0) : d(), [d, f]), I = s.useCallback((A) => {
2714
+ x(A), w({
2715
+ session_id: A,
3029
2716
  type: "dashboard_intent",
3030
2717
  intents: [],
3031
2718
  data: {}
3032
- }), Q(!1), (async (z = {}) => {
3033
- x(!0);
2719
+ }), W(!1), (async (U = {}) => {
2720
+ m(!0);
3034
2721
  try {
3035
- const q = await ws(P, { params: z });
3036
- q.success && q.data && (b(q.data), q.data.input_params && v(q.data.input_params));
2722
+ const F = await gs(A, { params: U });
2723
+ F.success && F.data && (w(F.data), F.data.input_params && v(F.data.input_params));
3037
2724
  } catch {
3038
2725
  } finally {
3039
- x(!1);
2726
+ m(!1);
3040
2727
  }
3041
2728
  })();
3042
- }, []), _ = s.useCallback((P) => {
3043
- if (!d) return;
2729
+ }, []), _ = s.useCallback((A) => {
2730
+ if (!r) return;
3044
2731
  (async () => {
3045
- x(!0);
2732
+ m(!0);
3046
2733
  try {
3047
- const z = await ws(d, { params: P });
3048
- z.success && z.data && b(z.data);
2734
+ const U = await gs(r, { params: A });
2735
+ U.success && U.data && w(U.data);
3049
2736
  } catch {
3050
2737
  } finally {
3051
- x(!1);
2738
+ m(!1);
3052
2739
  }
3053
2740
  })();
3054
- }, [d]), O = s.useCallback((P) => {
3055
- d === P && (m(""), b(null), v([])), r();
3056
- }, [d, r]), N = s.useCallback(() => {
3057
- if (!d) return null;
3058
- const P = n.find((R) => R.playbook_id === d);
3059
- return (P == null ? void 0 : P.name) || null;
3060
- }, [d, n]), F = s.useCallback((P, R) => {
3061
- b(P), Q(R !== void 0 ? R : !0);
3062
- }, []), E = s.useCallback(() => {
3063
- }, []), W = s.useCallback(() => {
3064
- m(""), b(null), v([]);
2741
+ }, [r]), M = s.useCallback((A) => {
2742
+ r === A && (x(""), w(null), v([])), d();
2743
+ }, [r, d]), P = s.useCallback(() => {
2744
+ if (!r) return null;
2745
+ const A = n.find((E) => E.playbook_id === r);
2746
+ return (A == null ? void 0 : A.name) || null;
2747
+ }, [r, n]), Q = s.useCallback((A, E) => {
2748
+ w(A), W(E !== void 0 ? E : !0);
2749
+ }, []), L = s.useCallback(() => {
2750
+ }, []), B = s.useCallback(() => {
2751
+ x(""), w(null), v([]);
3065
2752
  }, []);
3066
2753
  return {
3067
2754
  // 状态
3068
2755
  solidifiedPlaybooks: n,
3069
- solidifiedPlaybooksLoading: i,
3070
- solidifiedPlaybooksLoaded: c,
3071
- activeSolidifiedPlaybook: d,
3072
- setActiveSolidifiedPlaybook: m,
3073
- solidifyInputParams: k,
3074
- solidifyLoading: w,
2756
+ solidifiedPlaybooksLoading: o,
2757
+ solidifiedPlaybooksLoaded: f,
2758
+ activeSolidifiedPlaybook: r,
2759
+ setActiveSolidifiedPlaybook: x,
2760
+ solidifyInputParams: N,
2761
+ solidifyLoading: y,
3075
2762
  dashboardData: j,
3076
- setDashboardData: b,
3077
- dashboardShowSaveButton: V,
3078
- setDashboardShowSaveButton: Q,
2763
+ setDashboardData: w,
2764
+ dashboardShowSaveButton: O,
2765
+ setDashboardShowSaveButton: W,
3079
2766
  // 操作
3080
- loadSolidifiedPlaybooks: r,
3081
- ensureSolidifiedPlaybooksLoaded: u,
3082
- handleSolidifiedPlaybookClick: C,
2767
+ loadSolidifiedPlaybooks: d,
2768
+ ensureSolidifiedPlaybooksLoaded: c,
2769
+ handleSolidifiedPlaybookClick: I,
3083
2770
  handleSolidifyParamsSearch: _,
3084
- handleSolidifiedPlaybookDelete: O,
3085
- getCurrentSolidifiedPlaybookName: N,
3086
- handleDashboardPreview: F,
3087
- handleSolidifyComplete: E,
3088
- clearDashboard: W
2771
+ handleSolidifiedPlaybookDelete: M,
2772
+ getCurrentSolidifiedPlaybookName: P,
2773
+ handleDashboardPreview: Q,
2774
+ handleSolidifyComplete: L,
2775
+ clearDashboard: B
3089
2776
  };
3090
2777
  }
3091
- function Ua() {
3092
- const { allQuestions: n, setCurrentQuestion: t } = Ls();
2778
+ function Da() {
2779
+ const { allQuestions: n, setCurrentQuestion: a } = kt();
3093
2780
  s.useEffect(() => {
3094
2781
  if (n.length === 0) return;
3095
- const i = Math.floor(Math.random() * n.length);
3096
- t(n[i]);
2782
+ const o = Math.floor(Math.random() * n.length);
2783
+ a(n[o]);
3097
2784
  const l = setInterval(() => {
3098
- const c = Math.floor(Math.random() * n.length);
3099
- t(n[c]);
2785
+ const f = Math.floor(Math.random() * n.length);
2786
+ a(n[f]);
3100
2787
  }, 1e4);
3101
2788
  return () => {
3102
2789
  clearInterval(l);
3103
2790
  };
3104
- }, [n, t]);
2791
+ }, [n, a]);
3105
2792
  }
3106
- const Ns = {
2793
+ const vs = {
3107
2794
  chat: { title: "对话", subtitle: "" },
3108
2795
  plan: { title: "自动化", subtitle: "创建、管理并追踪自动化智能体的执行结果,支持定时触发与对内流转" },
3109
2796
  professional: { title: "专业智能体", subtitle: "深度分析与专业领域对话" },
3110
2797
  goals: { title: "目标追踪", subtitle: "跟踪关键业务指标和目标进展" },
3111
2798
  settings: { title: "通知配置", subtitle: "配置 Webhook 通知,实时接收系统重要事件" }
3112
- }, Qa = 5 * 60 * 1e3, Ga = 3;
3113
- function Ya(n = {}) {
2799
+ }, Oa = 5 * 60 * 1e3, Ba = 3;
2800
+ function Qa(n = {}) {
3114
2801
  const {
3115
- showAside: t = !0,
3116
- showLogout: i = !1,
2802
+ showAside: a = !0,
2803
+ showLogout: o = !1,
3117
2804
  onLogout: l,
3118
- presetAgents: c,
3119
- webhookId: f,
3120
- onReady: d,
3121
- initialAgentId: m,
3122
- initialPlaybookId: k,
2805
+ presetAgents: f,
2806
+ webhookId: g,
2807
+ onReady: r,
2808
+ initialAgentId: x,
2809
+ initialPlaybookId: N,
3123
2810
  initialPlaybookParams: v
3124
- } = n, w = localStorage.getItem("sso_token") || "", x = localStorage.getItem("sso_domain") || "maiduo", j = localStorage.getItem("sso_company") || "", V = `${Rs()}/api/v1/oss/upload2`, Q = s.useCallback(async (h) => {
3125
- const { data: B } = await Mt({ playbook_id: h });
3126
- return B;
3127
- }, []), y = s.useCallback((h) => Dt({
2811
+ } = n, y = localStorage.getItem("sso_token") || "", m = localStorage.getItem("sso_domain") || "maiduo", j = localStorage.getItem("sso_company") || "", O = `${Is()}/api/v1/oss/upload2`, W = s.useCallback(async (h) => {
2812
+ const { data: $ } = await Nt({ playbook_id: h });
2813
+ return $;
2814
+ }, []), b = s.useCallback((h) => St({
3128
2815
  session_id: h.session_id || "",
3129
2816
  name: h.name,
3130
2817
  description: h.description
3131
- }), []), r = s.useCallback((h) => Bt({
2818
+ }), []), d = s.useCallback((h) => Ct({
3132
2819
  session_id: h.session_id || "",
3133
2820
  user_hint: h.user_hint || ""
3134
2821
  }), []), {
3135
- activeAgent: u,
3136
- setActiveAgent: C,
3137
- agents: _,
3138
- playbooks: O,
3139
- userPlaybooks: N,
3140
- userPlaybooksLoading: F,
3141
- childAgents: E,
3142
- loading: W,
3143
- loadAgents: P,
3144
- loadPlaybooks: R,
3145
- loadUserPlaybooks: z,
3146
- playbooksLoaded: q
3147
- } = za({ presetAgents: c, initialAgentId: m }), [$, L] = s.useState(() => !!m), [T, se] = s.useState(!1), [Y, ee] = s.useState(!1), [fe, ne] = s.useState([]), [le, Z] = s.useState(0), ue = s.useRef(!1), { executing: he, stopping: ke, executingRef: X, queueStatus: xe, messageData: M, actions: Re } = ta({
3148
- activeAgent: u,
3149
- webhookId: f,
3150
- ssoToken: w,
3151
- ssoDomain: x,
2822
+ activeAgent: c,
2823
+ setActiveAgent: I,
2824
+ sourceAgents: _,
2825
+ playbooks: M,
2826
+ userPlaybooks: P,
2827
+ userPlaybooksLoading: Q,
2828
+ childAgents: L,
2829
+ agentLoading: B,
2830
+ sceneLoading: A,
2831
+ loadUserPlaybooks: E,
2832
+ playbooksLoaded: U
2833
+ } = Zt({ presetAgents: f, initialAgentId: x }), F = B || A, [_e, se] = s.useState(() => !!x), [te, be] = s.useState(!1), [J, Z] = s.useState(!1), [me, X] = s.useState([]), [ne, V] = s.useState(0), de = s.useRef(!1), { executing: re, stopping: ke, executingRef: G, queueStatus: ce, messageData: ae, actions: Ee } = Ht({
2834
+ activeAgent: c,
2835
+ webhookId: g,
2836
+ ssoToken: y,
2837
+ ssoDomain: m,
3152
2838
  ssoCompany: j,
3153
- onRecommendationsUpdate: ne
3154
- }), { sendMessage: I, executePlaybook: K, respondToProposal: ge, stopCurrent: Ee, retrigger: We, abort: be, clearMessages: ie } = Re;
2839
+ onRecommendationsUpdate: X
2840
+ }), { sendMessage: S, executePlaybook: z, respondToProposal: pe, stopCurrent: Re, retrigger: We, abort: fe, clearMessages: ee } = Ee;
3155
2841
  s.useEffect(() => {
3156
- ue.current && !he && Z((h) => h + 1), ue.current = he;
3157
- }, [he]);
3158
- const { widgets: re, setWidgets: H, loadDailyReports: J } = qa({
3159
- activeAgent: u,
3160
- webhookId: f,
3161
- ssoToken: w,
3162
- ssoDomain: x,
2842
+ de.current && !re && V((h) => h + 1), de.current = re;
2843
+ }, [re]);
2844
+ const { widgets: ie, setWidgets: q, loadDailyReports: K } = La({
2845
+ activeAgent: c,
2846
+ webhookId: g,
2847
+ ssoToken: y,
2848
+ ssoDomain: m,
3163
2849
  ssoCompany: j
3164
- }), D = Va();
3165
- Ua();
3166
- const [Le, Te] = s.useState(() => localStorage.getItem("wandox_sidebar_agent_mode") === "true"), $e = s.useCallback(() => {
3167
- Te((h) => {
3168
- const B = !h;
3169
- return localStorage.setItem("wandox_sidebar_agent_mode", String(B)), B;
2850
+ }), R = Ta();
2851
+ Da();
2852
+ const [$e, Me] = s.useState(() => localStorage.getItem("wandox_sidebar_agent_mode") === "true"), Le = s.useCallback(() => {
2853
+ Me((h) => {
2854
+ const $ = !h;
2855
+ return localStorage.setItem("wandox_sidebar_agent_mode", String($)), $;
3170
2856
  });
3171
- }, []), [Me, ye] = s.useState(!1), [a, p] = s.useState(!1), [G, A] = s.useState(!1), [je, De] = s.useState(!1), [Ne, o] = s.useState(null), [S, me] = s.useState(!1), [U, Qe] = s.useState(null), [Se, ve] = s.useState(""), [Ce, te] = s.useState(null), [de, we] = s.useState("chat"), [Ge, $s] = s.useState(null), Ms = s.useCallback(() => {
3172
- ye(!0), p(!1);
3173
- }, []), Ds = s.useCallback(() => {
3174
- ye(!1), p(!1);
3175
- }, []), [cs, us] = s.useState(""), [hs, xs] = s.useState(0), [Bs, Ke] = s.useState(!1), [ms, ps] = s.useState(!1), [Os, fs] = s.useState(!1), [zs, Ws] = s.useState(""), Fe = s.useRef(null), qe = s.useRef(!1), [qs, Vs] = s.useState(null), [Us, Qs] = s.useState(!1), Gs = W || M.loading, Fs = s.useCallback((h) => {
3176
- o(() => h);
2857
+ }, []), [Te, ge] = s.useState(!1), [t, u] = s.useState(!1), [D, C] = s.useState(!1), [ye, De] = s.useState(!1), [Ne, i] = s.useState(null), [k, ue] = s.useState(!1), [T, Ue] = s.useState(null), [Se, je] = s.useState(""), [Ce, H] = s.useState(null), [oe, we] = s.useState("chat"), [Fe, Es] = s.useState(null), Rs = s.useCallback(() => {
2858
+ ge(!0), u(!1);
2859
+ }, []), $s = s.useCallback(() => {
2860
+ ge(!1), u(!1);
2861
+ }, []), [ds, rs] = s.useState(""), [cs, us] = s.useState(0), [Ms, Ke] = s.useState(!1), [hs, xs] = s.useState(!1), [Ls, ms] = s.useState(!1), [Ts, Ds] = s.useState(""), Ge = s.useRef(null), Ve = s.useRef(!1), [Os, Bs] = s.useState(null), [zs, Ws] = s.useState(!1), Vs = F || ae.loading, qs = s.useCallback((h) => {
2862
+ i(() => h);
3177
2863
  }, []);
3178
2864
  s.useEffect(() => {
3179
- d && d({
2865
+ r && r({
3180
2866
  showInspectionResults: (h) => {
3181
- Vs(h || null), Qs(!0);
2867
+ Bs(h || null), Ws(!0);
3182
2868
  }
3183
2869
  });
3184
- }, [d]), s.useEffect(() => {
3185
- L(!!m), se(!1), ee(!1);
3186
- }, [m, k, v]);
3187
- const Ks = s.useMemo(
3188
- () => (c || []).map((h) => h.agent_id || h.agent_code || "").join("|"),
3189
- [c]
3190
- );
3191
- s.useEffect(() => {
3192
- P();
3193
- }, [Ks]), s.useEffect(() => {
3194
- if (u)
3195
- return ne([]), R(), () => {
3196
- X.current && be();
2870
+ }, [r]), s.useEffect(() => {
2871
+ se(!!x), be(!1), Z(!1);
2872
+ }, [x, N, v]), s.useEffect(() => {
2873
+ if (c)
2874
+ return X([]), () => {
2875
+ G.current && fe();
3197
2876
  };
3198
- }, [u, f, w, x, j]), s.useEffect(() => {
3199
- if (de !== "professional") {
3200
- qe.current = !1;
2877
+ }, [c, g, y, m, j]), s.useEffect(() => {
2878
+ if (oe !== "professional") {
2879
+ Ve.current = !1;
3201
2880
  return;
3202
2881
  }
3203
- if (!u) return;
3204
- qe.current || (M.loadMessagesAndDailyReport(), J()), qe.current = !1;
3205
- let h = 0, B = null;
3206
- return B = setInterval(async () => {
2882
+ if (!c) return;
2883
+ Ve.current || (ae.loadMessagesAndDailyReport(), K()), Ve.current = !1;
2884
+ let h = 0, $ = null;
2885
+ return $ = setInterval(async () => {
3207
2886
  try {
3208
- await J(), h = 0;
2887
+ await K(), h = 0;
3209
2888
  } catch {
3210
- h++, h >= Ga && B && (clearInterval(B), B = null);
2889
+ h++, h >= Ba && $ && (clearInterval($), $ = null);
3211
2890
  }
3212
- }, Qa), () => {
3213
- B && clearInterval(B);
2891
+ }, Oa), () => {
2892
+ $ && clearInterval($);
3214
2893
  };
3215
- }, [de, u, f, w, x, j]);
3216
- const ae = _.find((h) => h.is_main) ?? _[0], Be = (ae == null ? void 0 : ae.questions) || [];
2894
+ }, [oe, c, g, y, m, j]);
2895
+ const Y = _.find((h) => h.is_main) ?? _[0], Oe = (Y == null ? void 0 : Y.questions) || [];
3217
2896
  s.useEffect(() => {
3218
- xs(0), Ke(!1);
3219
- }, [ae == null ? void 0 : ae.agent_id]), s.useEffect(() => {
3220
- if (Be.length <= 1 || ms) return;
2897
+ us(0), Ke(!1);
2898
+ }, [Y == null ? void 0 : Y.agent_id]), s.useEffect(() => {
2899
+ if (Oe.length <= 1 || hs) return;
3221
2900
  let h;
3222
- const B = setInterval(() => {
2901
+ const $ = setInterval(() => {
3223
2902
  Ke(!0), h = setTimeout(() => {
3224
- xs((g) => (g + 1) % Be.length), Ke(!1);
2903
+ us((p) => (p + 1) % Oe.length), Ke(!1);
3225
2904
  }, 350);
3226
2905
  }, 3500);
3227
2906
  return () => {
3228
- clearInterval(B), clearTimeout(h);
2907
+ clearInterval($), clearTimeout(h);
3229
2908
  };
3230
- }, [Be.length, ms]), s.useEffect(() => {
3231
- if (Fe.current && u && u !== "default") {
3232
- const h = Fe.current;
3233
- Fe.current = null, I(h);
2909
+ }, [Oe.length, hs]), s.useEffect(() => {
2910
+ if (Ge.current && c && c !== "default") {
2911
+ const h = Ge.current;
2912
+ Ge.current = null, S(h);
3234
2913
  }
3235
- }, [u, I]), s.useEffect(() => {
3236
- if (!m || !$ || !u || u === "default" || _.length === 0) return;
3237
- !!ts(_, m) || L(!1);
3238
- }, [m, $, u, _]), s.useEffect(() => {
3239
- !m || k || T || !u || u === "default" || !_.find(
3240
- (B) => Ae(B, u) && Ae(B, m)
3241
- ) || (se(!0), we("professional"), D.clearDashboard(), L(!1));
3242
- }, [m, k, T, u, _, D]), s.useEffect(() => {
3243
- var gs;
3244
- if (!m || !k || Y || !u || u === "default" || !q || !_.find(
3245
- (Ie) => Ae(Ie, u) && Ae(Ie, m)
2914
+ }, [c, S]), s.useEffect(() => {
2915
+ if (!x || !_e || !c || c === "default" || _.length === 0) return;
2916
+ !!It(_, x) || se(!1);
2917
+ }, [x, _e, c, _]), s.useEffect(() => {
2918
+ !x || N || te || !c || c === "default" || !_.find(
2919
+ ($) => Pe($, c) && Pe($, x)
2920
+ ) || (be(!0), we("professional"), R.clearDashboard(), se(!1));
2921
+ }, [x, N, te, c, _, R]), s.useEffect(() => {
2922
+ var ps;
2923
+ if (!x || !N || J || !c || c === "default" || !U || !_.find(
2924
+ (Ie) => Pe(Ie, c) && Pe(Ie, x)
3246
2925
  )) return;
3247
- const B = O.find((Ie) => Ot(Ie, k));
3248
- if (!B) {
3249
- we("professional"), oe.error(`指定的剧本(${k})不存在,已切换到智能体界面`), ee(!0), L(!1);
2926
+ const $ = M.find((Ie) => Pt(Ie, N));
2927
+ if (!$) {
2928
+ we("professional"), he.error(`指定的场景(${N})不存在,已切换到智能体界面`), Z(!0), se(!1);
3250
2929
  return;
3251
2930
  }
3252
- ee(!0), we("professional"), qe.current = !0, ie(), D.clearDashboard(), te(null), ve("");
3253
- const g = v || {}, ce = Object.keys(g).length > 0, He = (B.input_fields ?? []).filter((Ie) => {
2931
+ Z(!0), we("professional"), Ve.current = !0, ee(), R.clearDashboard(), H(null), je("");
2932
+ const p = v || {}, le = Object.keys(p).length > 0, He = ($.input_fields ?? []).filter((Ie) => {
3254
2933
  if (!Ie.required) return !1;
3255
- const Ye = g[Ie.name];
2934
+ const Ye = p[Ie.name];
3256
2935
  return Ye == null || Ye === "";
3257
2936
  });
3258
- if ((((gs = B.input_fields) == null ? void 0 : gs.length) ?? 0) > 0 && (!ce || He.length > 0)) {
3259
- te(B), L(!1);
2937
+ if ((((ps = $.input_fields) == null ? void 0 : ps.length) ?? 0) > 0 && (!le || He.length > 0)) {
2938
+ H($), se(!1);
3260
2939
  return;
3261
2940
  }
3262
- K({
3263
- message: B.name,
3264
- playbook_id: k,
3265
- playbook_params: g
3266
- }), L(!1);
3267
- }, [m, k, Y, u, q, _, O, v]);
2941
+ z({
2942
+ message: $.name,
2943
+ playbook_id: N,
2944
+ playbook_params: p
2945
+ }), se(!1);
2946
+ }, [x, N, J, c, U, _, M, v]);
3268
2947
  const Ze = s.useCallback((h) => {
3269
- zt(_, u, h) || (X.current && (be(), oe.info("已中止当前剧本,切换智能体")), C(h), ve(""), te(null), D.clearDashboard(), ie(), H([]));
3270
- }, [be, u, _, ie, X, C, D, H]), Zs = (h, B) => {
3271
- const g = (B ?? cs).trim() || Be[hs % Be.length] || "", ce = h || (ae == null ? void 0 : ae.agent_id);
3272
- !g || !ce || (us(""), fs(!0), ie(), u === ce ? I(g) : (qe.current = !0, Fe.current = g, C(ce)));
3273
- }, Hs = (h, B) => {
3274
- D.handleDashboardPreview(h, B), we("chat"), C("default");
3275
- }, Ys = () => {
3276
- D.handleSolidifyComplete(), we("chat"), C("default");
3277
- }, Xs = (h) => {
3278
- we(h), (h === "goals" || h === "settings" || h === "plan" || h === "chat") && D.clearDashboard();
3279
- }, Js = () => {
3280
- p(!1), De(!0), D.ensureSolidifiedPlaybooksLoaded();
3281
- }, et = (h) => {
3282
- De(!1), D.handleSolidifiedPlaybookClick(h), we("chat"), C("default"), ve(""), te(null);
3283
- }, st = () => {
3284
- var h, B;
3285
- if (D.dashboardData)
2948
+ At(_, c, h) || (G.current && (fe(), he.info("已中止当前场景,切换智能体")), I(h), je(""), H(null), R.clearDashboard(), ee(), q([]));
2949
+ }, [fe, c, _, ee, G, I, R, q]), Qs = (h, $) => {
2950
+ const p = ($ ?? ds).trim() || Oe[cs % Oe.length] || "", le = h || (Y == null ? void 0 : Y.agent_id);
2951
+ !p || !le || (rs(""), ms(!0), ee(), c === le ? S(p) : (Ve.current = !0, Ge.current = p, I(le)));
2952
+ }, Us = (h, $) => {
2953
+ R.handleDashboardPreview(h, $), we("chat"), I("default");
2954
+ }, Fs = () => {
2955
+ R.handleSolidifyComplete(), we("chat"), I("default");
2956
+ }, Gs = (h) => {
2957
+ we(h), (h === "goals" || h === "settings" || h === "plan" || h === "chat") && R.clearDashboard();
2958
+ }, Ks = () => {
2959
+ u(!1), De(!0), R.ensureSolidifiedPlaybooksLoaded();
2960
+ }, Zs = (h) => {
2961
+ De(!1), R.handleSolidifiedPlaybookClick(h), we("chat"), I("default"), je(""), H(null);
2962
+ }, Hs = () => {
2963
+ var h, $;
2964
+ if (R.dashboardData)
3286
2965
  return /* @__PURE__ */ e.jsx(
3287
- Ut,
2966
+ Mt,
3288
2967
  {
3289
- data: D.dashboardData,
3290
- showSaveButton: D.dashboardShowSaveButton,
3291
- onSaveSuccess: D.loadSolidifiedPlaybooks,
3292
- onSaveDashboard: y,
3293
- onPreviewDashboard: r,
3294
- title: D.getCurrentSolidifiedPlaybookName() || void 0,
3295
- customParamsForm: D.solidifyInputParams.length > 0 ? /* @__PURE__ */ e.jsx(
3296
- Na,
2968
+ data: R.dashboardData,
2969
+ showSaveButton: R.dashboardShowSaveButton,
2970
+ onSaveSuccess: R.loadSolidifiedPlaybooks,
2971
+ onSaveDashboard: b,
2972
+ onPreviewDashboard: d,
2973
+ title: R.getCurrentSolidifiedPlaybookName() || void 0,
2974
+ customParamsForm: R.solidifyInputParams.length > 0 ? /* @__PURE__ */ e.jsx(
2975
+ ga,
3297
2976
  {
3298
- inputParams: D.solidifyInputParams,
3299
- onSearch: D.handleSolidifyParamsSearch,
3300
- loading: D.solidifyLoading
2977
+ inputParams: R.solidifyInputParams,
2978
+ onSearch: R.handleSolidifyParamsSearch,
2979
+ loading: R.solidifyLoading
3301
2980
  }
3302
2981
  ) : void 0,
3303
- showGlobalFilter: D.solidifyInputParams.length > 0
2982
+ showGlobalFilter: R.solidifyInputParams.length > 0
3304
2983
  }
3305
2984
  );
3306
- switch (de) {
2985
+ switch (oe) {
3307
2986
  case "chat":
3308
- return /* @__PURE__ */ e.jsx(Kt.Provider, { value: {
3309
- onExecutePlaybook: K,
3310
- getPlaybookDetail: Q,
3311
- ossUploadUrl: V,
3312
- ssoToken: w,
3313
- ssoDomain: x,
2987
+ return /* @__PURE__ */ e.jsx(Bt.Provider, { value: {
2988
+ onExecutePlaybook: z,
2989
+ getPlaybookDetail: W,
2990
+ ossUploadUrl: O,
2991
+ ssoToken: y,
2992
+ ssoDomain: m,
3314
2993
  ssoCompany: j,
3315
- onFillPlaybookParams: (g) => {
3316
- const ce = {
3317
- playbook_id: g.playbookId,
3318
- name: g.playbookName,
3319
- input_fields: g.inputFields,
3320
- initial_params: g.initialParams,
3321
- playbook_type: g.playbookType
2994
+ onFillPlaybookParams: (p) => {
2995
+ const le = {
2996
+ playbook_id: p.playbookId,
2997
+ name: p.playbookName,
2998
+ input_fields: p.inputFields,
2999
+ initial_params: p.initialParams,
3000
+ playbook_type: p.playbookType
3322
3001
  };
3323
- te(ce), we("professional");
3002
+ H(le), we("professional");
3324
3003
  }
3325
3004
  }, children: /* @__PURE__ */ e.jsx(
3326
- Oa,
3005
+ $a,
3327
3006
  {
3328
- agentLoading: W,
3329
- mainAgentForHub: ae,
3330
- mainAgentQuestions: Be,
3007
+ agentLoading: F,
3008
+ mainAgentForHub: Y,
3009
+ mainAgentQuestions: Oe,
3331
3010
  agents: _,
3332
- hubChatOpen: Os,
3333
- setHubChatOpen: fs,
3334
- hubChatInput: cs,
3335
- setHubChatInput: us,
3336
- hubScrollIdx: hs,
3337
- hubScrollFading: Bs,
3338
- onHubChatSend: Zs,
3339
- onHubInputFocus: () => ps(!0),
3340
- onHubInputBlur: () => ps(!1),
3341
- messages: M.messages,
3342
- executing: he,
3343
- hubInlineChatInput: zs,
3344
- setHubInlineChatInput: Ws,
3345
- onHubInlineSend: (g, ce, He) => {
3346
- ae != null && ae.agent_id && (u !== ae.agent_id && C(ae.agent_id), I(g, ce, He));
3011
+ hubChatOpen: Ls,
3012
+ setHubChatOpen: ms,
3013
+ hubChatInput: ds,
3014
+ setHubChatInput: rs,
3015
+ hubScrollIdx: cs,
3016
+ hubScrollFading: Ms,
3017
+ onHubChatSend: Qs,
3018
+ onHubInputFocus: () => xs(!0),
3019
+ onHubInputBlur: () => xs(!1),
3020
+ messages: ae.messages,
3021
+ executing: re,
3022
+ hubInlineChatInput: Ts,
3023
+ setHubInlineChatInput: Ds,
3024
+ onHubInlineSend: (p, le, He) => {
3025
+ Y != null && Y.agent_id && (c !== Y.agent_id && I(Y.agent_id), S(p, le, He));
3347
3026
  },
3348
- onEnterProfessional: (g) => {
3349
- g && C(g), ve(""), te(null), D.clearDashboard(), H([]), we("professional");
3027
+ onEnterProfessional: (p) => {
3028
+ p && I(p), je(""), H(null), R.clearDashboard(), q([]), we("professional");
3350
3029
  },
3351
- playbooks: O,
3352
- executePlaybook: K,
3353
- onRequestPlaybookParams: te,
3354
- clearMessages: ie,
3355
- onAbort: be,
3356
- onRespondToProposal: ge,
3357
- ssoToken: w,
3358
- ssoDomain: x,
3030
+ playbooks: M,
3031
+ executePlaybook: z,
3032
+ onRequestPlaybookParams: H,
3033
+ clearMessages: ee,
3034
+ onAbort: fe,
3035
+ onRespondToProposal: pe,
3036
+ ssoToken: y,
3037
+ ssoDomain: m,
3359
3038
  ssoCompany: j
3360
3039
  }
3361
3040
  ) });
3362
3041
  case "goals":
3363
- return /* @__PURE__ */ e.jsx(Ft, {});
3042
+ return /* @__PURE__ */ e.jsx(Ot, {});
3364
3043
  case "settings":
3365
- return /* @__PURE__ */ e.jsx(na, {});
3044
+ return /* @__PURE__ */ e.jsx(Xt, {});
3366
3045
  case "plan":
3367
3046
  return /* @__PURE__ */ e.jsx(
3368
- aa,
3047
+ Yt,
3369
3048
  {
3370
3049
  embedded: !0,
3371
- onHeaderChange: $s,
3372
- onCockpitEnter: Ms,
3373
- onCockpitExit: Ds
3050
+ onHeaderChange: Es,
3051
+ onCockpitEnter: Rs,
3052
+ onCockpitExit: $s
3374
3053
  }
3375
3054
  );
3376
3055
  case "professional":
3377
3056
  return /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
3378
3057
  /* @__PURE__ */ e.jsx(
3379
- Ia,
3058
+ ya,
3380
3059
  {
3381
- title: ((h = _.find((g) => Ae(g, u))) == null ? void 0 : h.name) || "Wandox智能体",
3382
- agentSwitcher: Le ? void 0 : /* @__PURE__ */ e.jsxs("div", { style: {
3060
+ title: ((h = _.find((p) => Pe(p, c))) == null ? void 0 : h.name) || "Wandox智能体",
3061
+ agentSwitcher: $e ? void 0 : /* @__PURE__ */ e.jsxs("div", { style: {
3383
3062
  display: "inline-flex",
3384
3063
  alignItems: "center",
3385
3064
  height: 34,
@@ -3390,15 +3069,15 @@ function Ya(n = {}) {
3390
3069
  overflow: "hidden"
3391
3070
  }, children: [
3392
3071
  /* @__PURE__ */ e.jsxs("div", { style: { display: "flex", alignItems: "center", padding: "0 0 0 8px" }, children: [
3393
- /* @__PURE__ */ e.jsx("div", { style: { width: 22, height: 22, flexShrink: 0 }, children: Pe((B = _.find((g) => Ae(g, u))) == null ? void 0 : B.icon) }),
3072
+ /* @__PURE__ */ e.jsx("div", { style: { width: 22, height: 22, flexShrink: 0 }, children: Ae(($ = _.find((p) => Pe(p, c))) == null ? void 0 : $.icon) }),
3394
3073
  /* @__PURE__ */ e.jsx(
3395
- Ps,
3074
+ Ss,
3396
3075
  {
3397
- value: u,
3398
- onChange: (g) => Ze(g),
3399
- options: _.map((g) => ({ value: g.agent_id, label: g.name })),
3076
+ value: c,
3077
+ onChange: (p) => Ze(p),
3078
+ options: _.map((p) => ({ value: p.agent_id, label: p.name })),
3400
3079
  variant: "borderless",
3401
- suffixIcon: /* @__PURE__ */ e.jsx(Ss, { style: { color: "#9275ff", verticalAlign: "middle" } }),
3080
+ suffixIcon: /* @__PURE__ */ e.jsx(Cs, { style: { color: "#9275ff", verticalAlign: "middle" } }),
3402
3081
  style: { fontWeight: 600, fontSize: 14, minWidth: 100, color: "#4a3a6a" },
3403
3082
  popupMatchSelectWidth: !1
3404
3083
  }
@@ -3408,7 +3087,7 @@ function Ya(n = {}) {
3408
3087
  "button",
3409
3088
  {
3410
3089
  type: "button",
3411
- onClick: $e,
3090
+ onClick: Le,
3412
3091
  title: "切换为侧边栏选择",
3413
3092
  style: {
3414
3093
  display: "flex",
@@ -3424,109 +3103,109 @@ function Ya(n = {}) {
3424
3103
  border: "none",
3425
3104
  padding: 0
3426
3105
  },
3427
- onMouseEnter: (g) => {
3428
- g.currentTarget.style.color = "#7c3aed", g.currentTarget.style.background = "#f5f0ff";
3106
+ onMouseEnter: (p) => {
3107
+ p.currentTarget.style.color = "#7c3aed", p.currentTarget.style.background = "#f5f0ff";
3429
3108
  },
3430
- onMouseLeave: (g) => {
3431
- g.currentTarget.style.color = "#b0a0c8", g.currentTarget.style.background = "transparent";
3109
+ onMouseLeave: (p) => {
3110
+ p.currentTarget.style.color = "#b0a0c8", p.currentTarget.style.background = "transparent";
3432
3111
  },
3433
- children: /* @__PURE__ */ e.jsx(js, { style: { fontSize: 13 } })
3112
+ children: /* @__PURE__ */ e.jsx(ws, { style: { fontSize: 13 } })
3434
3113
  }
3435
3114
  )
3436
3115
  ] }),
3437
- count: re.length,
3438
- widgets: re,
3439
- activeAgent: u,
3116
+ count: ie.length,
3117
+ widgets: ie,
3118
+ activeAgent: c,
3440
3119
  agents: _,
3441
- childAgents: E,
3442
- ssoDomain: x,
3443
- ssoToken: w,
3120
+ childAgents: L,
3121
+ ssoDomain: m,
3122
+ ssoToken: y,
3444
3123
  ssoCompany: j,
3445
- onWidgetsUpdate: H,
3124
+ onWidgetsUpdate: q,
3446
3125
  onExecuteComplete: () => {
3447
- J();
3126
+ K();
3448
3127
  },
3449
- externalRobotName: qs,
3450
- externalShowPanel: Us
3128
+ externalRobotName: Os,
3129
+ externalShowPanel: zs
3451
3130
  }
3452
3131
  ),
3453
3132
  /* @__PURE__ */ e.jsx(
3454
- Qt,
3133
+ Lt,
3455
3134
  {
3456
- messages: M.messages,
3457
- playbooks: O,
3458
- messagesTotal: M.messagesTotal,
3459
- loadMoreMessages: M.loadMoreMessages,
3460
- loading: Gs,
3461
- executing: he,
3462
- ssoToken: w,
3463
- ssoDomain: x,
3135
+ messages: ae.messages,
3136
+ playbooks: M,
3137
+ messagesTotal: ae.messagesTotal,
3138
+ loadMoreMessages: ae.loadMoreMessages,
3139
+ loading: Vs,
3140
+ executing: re,
3141
+ ssoToken: y,
3142
+ ssoDomain: m,
3464
3143
  ssoCompany: j,
3465
- activeAgent: u,
3466
- webhookId: f,
3467
- onExecutePlaybook: K,
3468
- onSolidifySuccess: D.loadSolidifiedPlaybooks,
3469
- onDashboardPreview: Hs,
3470
- onSolidifyComplete: Ys,
3471
- onFillPlaybookParams: (g) => {
3472
- const ce = {
3473
- playbook_id: g.playbookId,
3474
- name: g.playbookName,
3475
- input_fields: g.inputFields,
3476
- initial_params: g.initialParams,
3477
- playbook_type: g.playbookType
3144
+ activeAgent: c,
3145
+ webhookId: g,
3146
+ onExecutePlaybook: z,
3147
+ onSolidifySuccess: R.loadSolidifiedPlaybooks,
3148
+ onDashboardPreview: Us,
3149
+ onSolidifyComplete: Fs,
3150
+ onFillPlaybookParams: (p) => {
3151
+ const le = {
3152
+ playbook_id: p.playbookId,
3153
+ name: p.playbookName,
3154
+ input_fields: p.inputFields,
3155
+ initial_params: p.initialParams,
3156
+ playbook_type: p.playbookType
3478
3157
  };
3479
- te(ce);
3158
+ H(le);
3480
3159
  },
3481
- onActionClick: (g) => {
3482
- g.action_id ? (A(!0), Ne && Ne({
3483
- action_id: g.action_id,
3484
- action_params: g.params
3485
- })) : g.playbook_id && K({
3486
- message: g.display_name || "执行",
3487
- playbook_id: g.playbook_id,
3488
- ...g.params ? { playbook_params: g.params } : {}
3160
+ onActionClick: (p) => {
3161
+ p.action_id ? (C(!0), Ne && Ne({
3162
+ action_id: p.action_id,
3163
+ action_params: p.params
3164
+ })) : p.playbook_id && z({
3165
+ message: p.display_name || "执行",
3166
+ playbook_id: p.playbook_id,
3167
+ ...p.params ? { playbook_params: p.params } : {}
3489
3168
  });
3490
3169
  },
3491
3170
  onExecuteComplete: () => {
3492
- J();
3171
+ K();
3493
3172
  },
3494
- onRespondToProposal: ge,
3173
+ onRespondToProposal: pe,
3495
3174
  onRetrigger: We
3496
3175
  }
3497
3176
  ),
3498
3177
  /* @__PURE__ */ e.jsxs("div", { className: "chat-input-area", children: [
3499
3178
  /* @__PURE__ */ e.jsx(
3500
- Gt,
3179
+ Tt,
3501
3180
  {
3502
- playbooks: O,
3503
- playbookLoading: W,
3504
- onPlaybookClick: K,
3505
- onSelectPlaybook: (g) => {
3506
- te(g);
3181
+ playbooks: M,
3182
+ playbookLoading: F,
3183
+ onPlaybookClick: z,
3184
+ onSelectPlaybook: (p) => {
3185
+ H(p);
3507
3186
  },
3508
- recommendations: fe,
3509
- userPlaybooks: N,
3510
- userPlaybooksLoading: F,
3511
- onLoadUserPlaybooks: z,
3512
- agentId: as(_.find((g) => Ae(g, u))) || u,
3513
- recentRefreshKey: le
3187
+ recommendations: me,
3188
+ userPlaybooks: P,
3189
+ userPlaybooksLoading: Q,
3190
+ onLoadUserPlaybooks: E,
3191
+ agentId: Dt(_.find((p) => Pe(p, c))) || c,
3192
+ recentRefreshKey: ne
3514
3193
  }
3515
3194
  ),
3516
3195
  /* @__PURE__ */ e.jsx(
3517
- Es,
3196
+ Ps,
3518
3197
  {
3519
- executing: he,
3198
+ executing: re,
3520
3199
  stopping: ke,
3521
- onStop: Ee,
3522
- onSend: I,
3523
- playbooks: O,
3524
- recommendations: fe,
3200
+ onStop: Re,
3201
+ onSend: S,
3202
+ playbooks: M,
3203
+ recommendations: me,
3525
3204
  value: Se,
3526
- onValueChange: ve,
3527
- onRequestPlaybookParams: te,
3528
- ssoToken: w,
3529
- ssoDomain: x,
3205
+ onValueChange: je,
3206
+ onRequestPlaybookParams: H,
3207
+ ssoToken: y,
3208
+ ssoDomain: m,
3530
3209
  ssoCompany: j
3531
3210
  }
3532
3211
  )
@@ -3535,49 +3214,49 @@ function Ya(n = {}) {
3535
3214
  default:
3536
3215
  return null;
3537
3216
  }
3538
- }, Oe = de === "plan" ? Ge ?? Ns.plan : Ns[de], tt = (de === "plan" || !D.dashboardData) && de !== "professional" && de !== "chat";
3539
- return /* @__PURE__ */ e.jsx(Wt, { children: /* @__PURE__ */ e.jsxs(ja, { children: [
3217
+ }, Be = oe === "plan" ? Fe ?? vs.plan : vs[oe], Ys = (oe === "plan" || !R.dashboardData) && oe !== "professional" && oe !== "chat";
3218
+ return /* @__PURE__ */ e.jsx(Et, { children: /* @__PURE__ */ e.jsxs(va, { children: [
3540
3219
  /* @__PURE__ */ e.jsx(
3541
3220
  "div",
3542
3221
  {
3543
- className: `wandox-aside-overlay ${a ? "wandox-aside-overlay--visible" : ""}`,
3544
- onClick: () => p(!1),
3545
- onKeyDown: (h) => h.key === "Escape" && p(!1),
3222
+ className: `wandox-aside-overlay ${t ? "wandox-aside-overlay--visible" : ""}`,
3223
+ onClick: () => u(!1),
3224
+ onKeyDown: (h) => h.key === "Escape" && u(!1),
3546
3225
  role: "button",
3547
3226
  tabIndex: 0,
3548
3227
  "aria-label": "关闭侧边栏"
3549
3228
  }
3550
3229
  ),
3551
- t && /* @__PURE__ */ e.jsx(
3552
- wa,
3230
+ a && /* @__PURE__ */ e.jsx(
3231
+ ja,
3553
3232
  {
3554
- active: u,
3233
+ active: c,
3555
3234
  agents: _,
3556
3235
  onChange: (h) => {
3557
- p(!1), Ze(h);
3236
+ u(!1), Ze(h);
3558
3237
  },
3559
- collapsed: Me,
3560
- onToggle: () => ye((h) => !h),
3561
- className: a ? "wandox-aside--mobile-open" : "",
3562
- activeView: de,
3563
- onViewChange: Xs,
3564
- onToolboxOpen: Js,
3565
- showLogout: i,
3238
+ collapsed: Te,
3239
+ onToggle: () => ge((h) => !h),
3240
+ className: t ? "wandox-aside--mobile-open" : "",
3241
+ activeView: oe,
3242
+ onViewChange: Gs,
3243
+ onToolboxOpen: Ks,
3244
+ showLogout: o,
3566
3245
  onLogout: l,
3567
- sidebarAgentMode: Le,
3568
- onToggleSidebarMode: $e,
3246
+ sidebarAgentMode: $e,
3247
+ onToggleSidebarMode: Le,
3569
3248
  onAgentSelect: (h) => Ze(h)
3570
3249
  }
3571
3250
  ),
3572
- t && Me && /* @__PURE__ */ e.jsx(
3251
+ a && Te && /* @__PURE__ */ e.jsx(
3573
3252
  "button",
3574
3253
  {
3575
3254
  type: "button",
3576
3255
  className: "wandox-aside-floating-open",
3577
- onClick: () => ye(!1),
3256
+ onClick: () => ge(!1),
3578
3257
  "aria-label": "展开侧边栏",
3579
3258
  title: "展开侧边栏",
3580
- children: /* @__PURE__ */ e.jsx(js, {})
3259
+ children: /* @__PURE__ */ e.jsx(ws, {})
3581
3260
  }
3582
3261
  ),
3583
3262
  /* @__PURE__ */ e.jsxs("div", { className: "wandox-workspace", children: [
@@ -3588,13 +3267,13 @@ function Ya(n = {}) {
3588
3267
  type: "button",
3589
3268
  className: "wandox-mobile-menu-btn",
3590
3269
  onClick: () => {
3591
- ye(!1), p(!0);
3270
+ ge(!1), u(!0);
3592
3271
  },
3593
3272
  children: "☰"
3594
3273
  }
3595
3274
  ),
3596
3275
  /* @__PURE__ */ e.jsx("h1", { className: "wandox-mobile-title", children: "Wandox" }),
3597
- i && l ? /* @__PURE__ */ e.jsx(
3276
+ o && l ? /* @__PURE__ */ e.jsx(
3598
3277
  "button",
3599
3278
  {
3600
3279
  type: "button",
@@ -3604,80 +3283,80 @@ function Ya(n = {}) {
3604
3283
  }
3605
3284
  ) : /* @__PURE__ */ e.jsx("div", { style: { width: 40 } })
3606
3285
  ] }),
3607
- tt && /* @__PURE__ */ e.jsxs("div", { className: "wandox-workspace-topbar", children: [
3286
+ Ys && /* @__PURE__ */ e.jsxs("div", { className: "wandox-workspace-topbar", children: [
3608
3287
  /* @__PURE__ */ e.jsxs("div", { className: "wandox-workspace-topbar-info", children: [
3609
- /* @__PURE__ */ e.jsx("h1", { className: "wandox-workspace-topbar-title", children: (Oe == null ? void 0 : Oe.title) ?? "您好,欢迎使用 AI 智能体" }),
3610
- /* @__PURE__ */ e.jsx("p", { className: "wandox-workspace-topbar-subtitle", children: (Oe == null ? void 0 : Oe.subtitle) ?? "" })
3288
+ /* @__PURE__ */ e.jsx("h1", { className: "wandox-workspace-topbar-title", children: (Be == null ? void 0 : Be.title) ?? "您好,欢迎使用 AI 智能体" }),
3289
+ /* @__PURE__ */ e.jsx("p", { className: "wandox-workspace-topbar-subtitle", children: (Be == null ? void 0 : Be.subtitle) ?? "" })
3611
3290
  ] }),
3612
- /* @__PURE__ */ e.jsx("div", { className: "wandox-workspace-topbar-actions", children: de === "plan" ? Ge == null ? void 0 : Ge.actions : null })
3291
+ /* @__PURE__ */ e.jsx("div", { className: "wandox-workspace-topbar-actions", children: oe === "plan" ? Fe == null ? void 0 : Fe.actions : null })
3613
3292
  ] }),
3614
- /* @__PURE__ */ e.jsx("div", { className: `wandox-workspace-container${de === "plan" ? " wandox-workspace-container--automation" : ""}`, children: st() })
3293
+ /* @__PURE__ */ e.jsx("div", { className: `wandox-workspace-container${oe === "plan" ? " wandox-workspace-container--automation" : ""}`, children: Hs() })
3615
3294
  ] }),
3616
3295
  /* @__PURE__ */ e.jsx(
3617
- Sa,
3296
+ wa,
3618
3297
  {
3619
- open: je,
3620
- loading: D.solidifiedPlaybooksLoading,
3621
- playbooks: D.solidifiedPlaybooks,
3622
- activePlaybookId: D.activeSolidifiedPlaybook,
3298
+ open: ye,
3299
+ loading: R.solidifiedPlaybooksLoading,
3300
+ playbooks: R.solidifiedPlaybooks,
3301
+ activePlaybookId: R.activeSolidifiedPlaybook,
3623
3302
  onClose: () => De(!1),
3624
- onPlaybookClick: et,
3625
- onPlaybookDelete: D.handleSolidifiedPlaybookDelete
3303
+ onPlaybookClick: Zs,
3304
+ onPlaybookDelete: R.handleSolidifiedPlaybookDelete
3626
3305
  }
3627
3306
  ),
3628
3307
  /* @__PURE__ */ e.jsx(
3629
- qt,
3308
+ Rt,
3630
3309
  {
3631
- open: G,
3632
- ssoToken: w,
3633
- ssoDomain: x,
3310
+ open: D,
3311
+ ssoToken: y,
3312
+ ssoDomain: m,
3634
3313
  ssoCompany: j,
3635
- onClose: () => A(!1),
3636
- onExecuteAction: Fs,
3314
+ onClose: () => C(!1),
3315
+ onExecuteAction: qs,
3637
3316
  onExecuteComplete: () => {
3638
3317
  setTimeout(() => {
3639
- J();
3318
+ K();
3640
3319
  }, 1e3);
3641
3320
  }
3642
3321
  }
3643
3322
  ),
3644
3323
  /* @__PURE__ */ e.jsx(
3645
- Pa,
3324
+ ka,
3646
3325
  {
3647
- open: S,
3648
- actionId: (U == null ? void 0 : U.action_id) || "",
3649
- actionName: (U == null ? void 0 : U.display_name) || "",
3650
- defaultParams: U == null ? void 0 : U.params,
3326
+ open: k,
3327
+ actionId: (T == null ? void 0 : T.action_id) || "",
3328
+ actionName: (T == null ? void 0 : T.display_name) || "",
3329
+ defaultParams: T == null ? void 0 : T.params,
3651
3330
  onCancel: () => {
3652
- me(!1), Qe(null);
3331
+ ue(!1), Ue(null);
3653
3332
  },
3654
3333
  onExecute: (h) => {
3655
- me(!1), A(!0), Ne && U && Ne({
3656
- action_id: U.action_id,
3334
+ ue(!1), C(!0), Ne && T && Ne({
3335
+ action_id: T.action_id,
3657
3336
  action_params: h
3658
- }), Qe(null);
3337
+ }), Ue(null);
3659
3338
  }
3660
3339
  }
3661
3340
  ),
3662
3341
  /* @__PURE__ */ e.jsx(
3663
- _a,
3342
+ pa,
3664
3343
  {
3665
3344
  open: !!Ce,
3666
3345
  playbook: Ce,
3667
- onClose: () => te(null),
3668
- onSubmit: (h, B) => {
3669
- te(null), K({
3346
+ onClose: () => H(null),
3347
+ onSubmit: (h, $) => {
3348
+ H(null), z({
3670
3349
  message: h.name,
3671
3350
  playbook_id: h.playbook_id,
3672
- playbook_params: B
3351
+ playbook_params: $
3673
3352
  });
3674
3353
  }
3675
3354
  }
3676
3355
  ),
3677
- $ && /* @__PURE__ */ e.jsx(Vt, {}),
3678
- /* @__PURE__ */ e.jsx(Aa, { queueStatus: xe })
3356
+ _e && /* @__PURE__ */ e.jsx($t, {}),
3357
+ /* @__PURE__ */ e.jsx(_a, { queueStatus: ce })
3679
3358
  ] }) });
3680
3359
  }
3681
3360
  export {
3682
- Ya as default
3361
+ Qa as default
3683
3362
  };