@mcp-use/inspector 20.0.0-beta.6 → 20.0.0-beta.8

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 (189) hide show
  1. package/dist/cdn/{AnimatePresence-Dcw-FOy8.js → AnimatePresence-D1bZ5_-l.js} +79 -78
  2. package/dist/cdn/{ChatTab-D6J3Gyp7.js → ChatTab-C-Ysv6Zf.js} +1951 -1932
  3. package/dist/cdn/CheckboxIndicator-BjF73mGX.js +252 -0
  4. package/dist/cdn/{ConnectionSettingsForm-CWQueI8J.js → ConnectionSettingsForm-CNuMa6jp.js} +202 -202
  5. package/dist/cdn/{ConnectionSettingsTab-FGyt3QaI.js → ConnectionSettingsTab-qSVQ1aIF.js} +36 -35
  6. package/dist/cdn/{ElicitationTab-CL1KJ0bz.js → ElicitationTab-PEmEDvC5.js} +47 -46
  7. package/dist/cdn/{FormContext-tmgN_Vdr.js → FormContext-NtUiZclE.js} +26 -26
  8. package/dist/cdn/{InspectorContext-UjtEbNod.js → InspectorContext-BBKCdfmK.js} +1 -1
  9. package/dist/cdn/{JSONDisplay-BFxf5oEu.js → JSONDisplay-BJqMz7Ny.js} +22 -22
  10. package/dist/cdn/{ListTabHeader-Cv-GmtGF.js → ListTabHeader-DzmTtN1e.js} +20 -19
  11. package/dist/cdn/{WidgetWrapper-CruwjBOd.js → MCPAppsDebugControls-BpP-Ifap.js} +514 -550
  12. package/dist/cdn/{ManufactOAuthCallback-B98kSYCj.js → ManufactOAuthCallback-ChbbjFIT.js} +2 -2
  13. package/dist/cdn/{MarkdownRenderer-gLqUICEd.js → MarkdownRenderer-CK_6n3T9.js} +23 -23
  14. package/dist/cdn/McpAppsViewPanel-jlsYQ7uS.js +56 -0
  15. package/dist/cdn/{NotificationsTab-CeImSrhx.js → NotificationsTab-B7uebqMV.js} +21 -21
  16. package/dist/cdn/{OAuthCallback-Bg2bP-o9.js → OAuthCallback--NZdLoWx.js} +3 -3
  17. package/dist/cdn/PromptsTab-DSGYL32k.js +902 -0
  18. package/dist/cdn/{ResourcesTab-CQkKni-P.js → ResourcesTab-d3wxN7xC.js} +116 -114
  19. package/dist/cdn/{SamplingTab-D8q-iCMc.js → SamplingTab-DETdWNJk.js} +34 -33
  20. package/dist/cdn/{ServerMetadataTab-CvrKX8fz.js → ServerMetadataTab-BM3VhSLf.js} +9 -9
  21. package/dist/cdn/{StatusIcon-D0-ARyOh.js → StatusIcon-Q3n3YRtE.js} +10 -11
  22. package/dist/cdn/{ToolsTab-6xaVH43x.js → ToolsTab-BMcnfEWg.js} +665 -653
  23. package/dist/cdn/{ViewPreview-Ohh6JwOn.js → ViewPreview-CBhrVdwx.js} +3 -3
  24. package/dist/cdn/{WidgetDebugContext-D4usL_MA.js → WidgetDebugContext-B6yoOVVV.js} +1 -11
  25. package/dist/cdn/WidgetWrapper-BlbQAh_X.js +12 -0
  26. package/dist/cdn/{bell-CGjAO_0s.js → bell-GrTZcnD2.js} +1 -1
  27. package/dist/cdn/{browser-CbQIH4w2.js → browser-DG2Z8392.js} +1 -1
  28. package/dist/cdn/{brush-B_mKhyxG.js → brush-CelVvMGp.js} +1 -1
  29. package/dist/cdn/button-CB4uOoUV.js +2509 -0
  30. package/dist/cdn/card-BA-DQk-G.js +41 -0
  31. package/dist/cdn/{checkbox-By0FklhG.js → checkbox-kwVa4gRX.js} +7 -7
  32. package/dist/cdn/{clock-CmUbSx_B.js → clock-YMF8Gtw5.js} +1 -1
  33. package/dist/cdn/{code-V_0nf5rg.js → code-C8sN2OGR.js} +1 -1
  34. package/dist/cdn/{jsx-runtime-CIxvMpEo.js → createLucideIcon-BONxC1L5.js} +57 -24
  35. package/dist/cdn/{dialog-BsDpuJd3.js → dialog-CJGnC5Ag.js} +171 -171
  36. package/dist/cdn/{dist-DaMB0Su9.js → dist-CTJnCYmk.js} +1 -1
  37. package/dist/cdn/{dist-CXHFvGre.js → dist-SxRsB1iS.js} +3 -3
  38. package/dist/cdn/{external-link-CjmfT6rW.js → external-link-Bo4lQxr1.js} +1 -1
  39. package/dist/cdn/{eye-B7H96av8.js → eye-pSGG7nvf.js} +1 -1
  40. package/dist/cdn/{folder-open-B3lu2rG_.js → folder-open-aM8CPtBO.js} +1 -1
  41. package/dist/cdn/{hash-BVQnWi7q.js → hash-DDs2vE1k.js} +1 -1
  42. package/dist/cdn/{history-Csw4rb44.js → history-BfUFpL1d.js} +1 -1
  43. package/dist/cdn/{index-browser-DkQOzkvX.js → index-browser-Dm3R1Mfe.js} +1 -1
  44. package/dist/cdn/{info-CNiOwqkf.js → info-BMkB68mB.js} +1 -1
  45. package/dist/cdn/{input-C2OBd4PJ.js → input-BCpgLXU1.js} +2993 -5499
  46. package/dist/cdn/inspector.css +1 -1
  47. package/dist/cdn/inspector.js +7106 -7140
  48. package/dist/cdn/{label-B9Jmm9be.js → label-A0UGV8FE.js} +9 -9
  49. package/dist/cdn/{loader-circle-BLy9A_pp.js → loader-circle-BKRHJEB7.js} +1 -1
  50. package/dist/cdn/{maximize-2-CH5Lq90B.js → maximize-2-DdrB_spi.js} +1 -1
  51. package/dist/cdn/{maximize-BALCV_ep.js → maximize-hSOCz133.js} +1 -1
  52. package/dist/cdn/{message-square-BnxdpJxZ.js → message-square-D3tKB3uJ.js} +1 -1
  53. package/dist/cdn/{not-found-DEtSM_Wd.js → not-found-BajFyZpp.js} +9 -11
  54. package/dist/cdn/{play-vuZ5PLnI.js → play-B1leulYf.js} +1 -1
  55. package/dist/cdn/providerMeta-CjGU4rID.js +436 -0
  56. package/dist/cdn/{react-BLtCruam.js → react-Bl-hSkvn.js} +562 -512
  57. package/dist/cdn/{refresh-cw-BXY-Pa0U.js → refresh-cw-CyvXrS91.js} +1 -1
  58. package/dist/cdn/{save-Tgil_AJZ.js → save-CmdEPUAm.js} +1 -1
  59. package/dist/cdn/{select-DDdiIPR2.js → select-CCFHjOGk.js} +808 -807
  60. package/dist/cdn/{servers-Dm72iTpY.js → servers-Dd0Vcp81.js} +5 -1
  61. package/dist/cdn/{shared-DaILIQPP.js → shared-CJVHJhag.js} +36 -36
  62. package/dist/cdn/{sheet-Br_l2kry.js → sheet-oyq1mIyg.js} +620 -619
  63. package/dist/cdn/{sparkles-BntO2rDR.js → sparkles-CxeZpVtX.js} +1 -1
  64. package/dist/cdn/spinner-Be1GlSGX.js +15 -0
  65. package/dist/cdn/{square-check-big-BvwQ17Bl.js → square-check-big-C_4wbfwF.js} +1 -1
  66. package/dist/cdn/{switch-C3IyQuid.js → switch-DHXEA_N5.js} +190 -189
  67. package/dist/cdn/{tabs-subtle-CkdI6Mac.js → tabs-subtle-Dubd6Kj8.js} +269 -268
  68. package/dist/cdn/{telemetry-C7Ytz2BG.js → telemetry-DjQn_Xm9.js} +2 -2
  69. package/dist/cdn/{textarea-DSbwcFVt.js → textarea-CwmI8_uI.js} +6 -6
  70. package/dist/cdn/{trash-2-RwpJY5SL.js → trash-2-BhumJAFE.js} +1 -1
  71. package/dist/cdn/{useAriaLabelledBy-DqAdnppm.js → useAriaLabelledBy-Cra6w3YY.js} +2 -1
  72. package/dist/cdn/{useCompositeItem-BRqEzYh-.js → useCompositeItem-Dhnm-7el.js} +3 -3
  73. package/dist/cdn/{useConfig-BW6uQf2m.js → useConfig-B_adtnP1.js} +2 -2
  74. package/dist/cdn/{useSavedRequests-Ci2I919u.js → useSavedRequests-mSIsDd4c.js} +1 -1
  75. package/dist/cdn/{useViewHostProps-CINeSkth.js → useViewHostProps-CDOm2w6u.js} +124 -109
  76. package/dist/cdn/{wrench-DzGmCfnb.js → wrench-DvK20LUT.js} +1 -1
  77. package/dist/cdn/{x-C3vRQIYu.js → x-EilKPiCX.js} +1 -1
  78. package/dist/cdn/{zap-Mb-pbw2X.js → zap-0Wr9QO7N.js} +1 -1
  79. package/dist/cli.js +61 -2
  80. package/dist/client/components/ChatTab.d.ts.map +1 -1
  81. package/dist/client/components/MCPAppsDebugControls.d.ts.map +1 -1
  82. package/dist/client/components/ToolsTab.d.ts.map +1 -1
  83. package/dist/client/components/chat/ConfigurationDialog.d.ts.map +1 -1
  84. package/dist/client/components/chat/ToolResultRenderer.d.ts.map +1 -1
  85. package/dist/client/components/mcp-apps/McpAppsViewPanel.d.ts +29 -0
  86. package/dist/client/components/mcp-apps/McpAppsViewPanel.d.ts.map +1 -0
  87. package/dist/client/components/tools/ToolExecutionPanel.d.ts.map +1 -1
  88. package/dist/client/components/tools/ToolResultDisplay.d.ts +2 -1
  89. package/dist/client/components/tools/ToolResultDisplay.d.ts.map +1 -1
  90. package/dist/client/components/tools/useToolsTabNavigation.d.ts.map +1 -1
  91. package/dist/client/components/ui/MeshGradientCanvas.d.ts.map +1 -1
  92. package/dist/client/components/ui/mesh-animation-pause.d.ts +14 -0
  93. package/dist/client/components/ui/mesh-animation-pause.d.ts.map +1 -0
  94. package/dist/client/components/ui/mesh-gradient-colors.d.ts +6 -0
  95. package/dist/client/components/ui/mesh-gradient-colors.d.ts.map +1 -0
  96. package/dist/client/components/ui/mesh-tab-background.d.ts +1 -1
  97. package/dist/client/components/ui/mesh-tab-background.d.ts.map +1 -1
  98. package/dist/client/components/ui/not-found.d.ts.map +1 -1
  99. package/dist/client/context/WidgetDebugContext.d.ts +1 -11
  100. package/dist/client/context/WidgetDebugContext.d.ts.map +1 -1
  101. package/dist/client/hooks/useDeviceViewport.d.ts +1 -5
  102. package/dist/client/hooks/useDeviceViewport.d.ts.map +1 -1
  103. package/dist/client/hooks/useViewHostProps.d.ts +1 -1
  104. package/dist/client/hooks/useViewHostProps.d.ts.map +1 -1
  105. package/dist/client/index.js +2087 -1861
  106. package/dist/client/utils/servers.d.ts +5 -0
  107. package/dist/client/utils/servers.d.ts.map +1 -1
  108. package/dist/server/cdn-shell.d.ts.map +1 -1
  109. package/dist/server/cdn-shell.js +2 -2
  110. package/dist/server/{chunk-GBY4WAVP.js → chunk-BD3ROXCC.js} +1 -1
  111. package/dist/server/{chunk-NUHI6MJ6.js → chunk-BPXKTFQ5.js} +1 -1
  112. package/dist/server/{chunk-IFF5T5J4.js → chunk-XTVIGRTB.js} +61 -2
  113. package/dist/server/cli.js +2 -2
  114. package/dist/server/index.js +3 -3
  115. package/dist/server/middleware.js +3 -3
  116. package/dist/server/version.js +1 -1
  117. package/dist/web/assets/AnimatePresence-FfDQQNFJ.js +9 -0
  118. package/dist/web/assets/ChatTab-DxD-KLW_.js +18 -0
  119. package/dist/web/assets/ConnectionSettingsTab-pO6p0U0f.js +1 -0
  120. package/dist/web/assets/ElicitationTab-o5_z6gqe.js +1 -0
  121. package/dist/web/assets/FormContext-sV-yByKz.js +1 -0
  122. package/dist/web/assets/ListTabHeader-CrGae306.js +1 -0
  123. package/dist/web/assets/MCPAppsDebugControls-CZW1uZdH.js +34 -0
  124. package/dist/web/assets/{ManufactOAuthCallback-BRO6TPkZ.js → ManufactOAuthCallback-BnWhf5bW.js} +1 -1
  125. package/dist/web/assets/{MarkdownRenderer-gaJFjbtr.js → MarkdownRenderer-gUUHRIm1.js} +2 -2
  126. package/dist/web/assets/McpAppsViewPanel-CDJDb4t-.js +1 -0
  127. package/dist/web/assets/{NotificationsTab-LYcfRjyd.js → NotificationsTab-CkJ5E_sR.js} +1 -1
  128. package/dist/web/assets/{OAuthCallback-D8UItgTB.js → OAuthCallback-Dv_mFcua.js} +1 -1
  129. package/dist/web/assets/PromptsTab-CLwWFf6d.js +15 -0
  130. package/dist/web/assets/ResourcesTab-B8cnuq-m.js +2 -0
  131. package/dist/web/assets/SamplingTab-BjYHYRHX.js +1 -0
  132. package/dist/web/assets/ServerMetadataTab-CPlclbb7.js +1 -0
  133. package/dist/web/assets/ToolsTab-BSSwvp4Q.js +8 -0
  134. package/dist/web/assets/{ViewPreview--z6jL0Zg.js → ViewPreview-C_LJdgt9.js} +1 -1
  135. package/dist/web/assets/WidgetWrapper-cv_BM1bY.js +1 -0
  136. package/dist/web/assets/{brush--0LobUi4.js → brush-DX0UZ_pI.js} +1 -1
  137. package/dist/web/assets/button-C8Xa2k4x.js +1 -0
  138. package/dist/web/assets/checkbox-BuuDhnpk.js +1 -0
  139. package/dist/web/assets/code-B14rVdNt.js +1 -0
  140. package/dist/web/assets/createLucideIcon-BEHeJH0M.js +1 -0
  141. package/dist/web/assets/{dist-B8sA8Zml.js → dist-C39gcmyH.js} +4 -4
  142. package/dist/web/assets/index-CyvvaDNR.js +499 -0
  143. package/dist/web/assets/index-bCIH1Sdx.css +1 -0
  144. package/dist/web/assets/input-C0OQCUZy.js +1 -0
  145. package/dist/web/assets/{label-Cdim77Jw.js → label-CI7JWQOo.js} +1 -1
  146. package/dist/web/assets/{maximize-2-BTT9QQU9.js → maximize-2-Br1WQzT2.js} +1 -1
  147. package/dist/web/assets/{maximize-_O55kFcr.js → maximize-CJNgRe6S.js} +1 -1
  148. package/dist/web/assets/{refresh-cw-C9wQl8_d.js → refresh-cw-B5iaAZKn.js} +1 -1
  149. package/dist/web/assets/{save-B-MsgxX9.js → save-TM6fvNrt.js} +1 -1
  150. package/dist/web/assets/select-D6jzbLJn.js +1 -0
  151. package/dist/web/assets/shared-Chk1rURG.js +1 -0
  152. package/dist/web/assets/{sparkles-2OAsc1aP.js → sparkles-BGYTDThM.js} +1 -1
  153. package/dist/web/assets/tabs-subtle-CK4nucyB.js +1 -0
  154. package/dist/web/assets/textarea-CRTXuRmE.js +1 -0
  155. package/dist/web/assets/{useConfig-BAsKhUxf.js → useConfig-CgQbKjVT.js} +1 -1
  156. package/dist/web/assets/useViewHostProps-DFI7Ywo7.js +1 -0
  157. package/dist/web/assets/{zap-Du2Uc5pa.js → zap-BDWHCVHU.js} +1 -1
  158. package/dist/web/index.html +10 -10
  159. package/package.json +2 -2
  160. package/dist/cdn/CheckboxIndicator-Bt4IICtv.js +0 -251
  161. package/dist/cdn/PromptsTab-C4LuwyWN.js +0 -901
  162. package/dist/cdn/card-DgiYnSg-.js +0 -41
  163. package/dist/cdn/createLucideIcon-C5fZZ6oB.js +0 -38
  164. package/dist/cdn/providerMeta-BQIfHuNL.js +0 -379
  165. package/dist/cdn/spinner-jQtC7EBj.js +0 -15
  166. package/dist/web/assets/AnimatePresence-C5p0yiY1.js +0 -9
  167. package/dist/web/assets/ChatTab-CsBPVCSc.js +0 -18
  168. package/dist/web/assets/ConnectionSettingsTab-DQTXfnl1.js +0 -1
  169. package/dist/web/assets/ElicitationTab-_FKB7nNG.js +0 -1
  170. package/dist/web/assets/FormContext-DH2caWKO.js +0 -1
  171. package/dist/web/assets/ListTabHeader-R17w_JsB.js +0 -1
  172. package/dist/web/assets/PromptsTab-B2uVMRR2.js +0 -15
  173. package/dist/web/assets/ResourcesTab-DhOZYPjE.js +0 -2
  174. package/dist/web/assets/SamplingTab-C-oY2hoi.js +0 -1
  175. package/dist/web/assets/ServerMetadataTab-BkTxO5KS.js +0 -1
  176. package/dist/web/assets/ToolsTab-DupHgo7A.js +0 -8
  177. package/dist/web/assets/WidgetWrapper-CZaEVEw4.js +0 -34
  178. package/dist/web/assets/checkbox-BQ9mI_6k.js +0 -1
  179. package/dist/web/assets/code-tME-5H6D.js +0 -1
  180. package/dist/web/assets/createLucideIcon-B3b8EU0b.js +0 -1
  181. package/dist/web/assets/index-C_fCIJ4C.js +0 -492
  182. package/dist/web/assets/index-fBX3akc8.css +0 -1
  183. package/dist/web/assets/input-CLYhA7PK.js +0 -1
  184. package/dist/web/assets/jsx-runtime-Cjj9sGSy.js +0 -1
  185. package/dist/web/assets/select-CJ57-Bor.js +0 -1
  186. package/dist/web/assets/shared-CCC9rTz4.js +0 -1
  187. package/dist/web/assets/tabs-subtle-246ABJqx.js +0 -1
  188. package/dist/web/assets/textarea-DLAmNVf_.js +0 -1
  189. package/dist/web/assets/useViewHostProps-CV5zBxUb.js +0 -1
@@ -1,106 +1,107 @@
1
1
  import { s as e, t } from "./react-BIs9pQ3H.js";
2
- import { Pr as n, Rr as r, a as i, cr as a, f as o, n as s, r as c, sr as l, t as u, ur as d } from "./input-C2OBd4PJ.js";
3
- import { t as f } from "./jsx-runtime-CIxvMpEo.js";
4
- import { t as p } from "./label-B9Jmm9be.js";
5
- import { t as m } from "./AnimatePresence-Dcw-FOy8.js";
6
- import { a as h, i as g, n as _, r as v, t as y } from "./select-DDdiIPR2.js";
7
- import { t as b } from "./createLucideIcon-C5fZZ6oB.js";
8
- import { A as x, _ as S, c as C, d as w, g as T, h as E, m as D, n as O, o as k, p as A, r as j, s as M, t as ee, v as N } from "./dialog-BsDpuJd3.js";
9
- import { n as P, r as F, t as I } from "./WidgetWrapper-CruwjBOd.js";
10
- import { a as L, i as R, t as z } from "./browser-CbQIH4w2.js";
11
- import { n as B, t as te } from "./zap-Mb-pbw2X.js";
12
- import { t as V } from "./code-V_0nf5rg.js";
13
- import { t as H } from "./JSONDisplay-BFxf5oEu.js";
14
- import { a as U, i as ne, n as W, o as re, r as G, s as ie } from "./shared-DaILIQPP.js";
15
- import { t as K } from "./history-Csw4rb44.js";
16
- import { t as ae } from "./maximize-BALCV_ep.js";
17
- import { n as oe, t as se } from "./save-Tgil_AJZ.js";
18
- import { n as ce, t as le } from "./useSavedRequests-Ci2I919u.js";
19
- import { t as q } from "./play-vuZ5PLnI.js";
20
- import { t as ue } from "./trash-2-RwpJY5SL.js";
21
- import { t as de } from "./wrench-DzGmCfnb.js";
22
- import { t as fe } from "./x-C3vRQIYu.js";
23
- import { t as J } from "./switch-C3IyQuid.js";
24
- import { t as pe } from "./not-found-DEtSM_Wd.js";
25
- import { _ as me, t as he, v as ge } from "./telemetry-C7Ytz2BG.js";
26
- import { c as _e, o as ve, r as ye } from "./react-BLtCruam.js";
27
- import { n as be } from "./dist-DaMB0Su9.js";
28
- import { t as Y } from "./spinner-jQtC7EBj.js";
29
- import { n as xe } from "./InspectorContext-UjtEbNod.js";
30
- import { t as Se } from "./textarea-DSbwcFVt.js";
31
- import { t as Ce } from "./useViewHostProps-CINeSkth.js";
32
- import { t as we } from "./ListTabHeader-Cv-GmtGF.js";
33
- var Te = b("chevron-up", [["path", {
2
+ import { a as n, f as r, n as i, r as a, sr as o, t as s } from "./input-BCpgLXU1.js";
3
+ import { n as c, t as l } from "./createLucideIcon-BONxC1L5.js";
4
+ import { U as u, i as d, n as f, t as p } from "./button-CB4uOoUV.js";
5
+ import { t as m } from "./label-A0UGV8FE.js";
6
+ import { t as h } from "./AnimatePresence-D1bZ5_-l.js";
7
+ import { a as g, i as _, n as v, r as y, t as b } from "./select-CCFHjOGk.js";
8
+ import { A as x, _ as S, c as C, d as w, g as T, h as E, m as D, n as O, o as k, p as A, r as j, s as M, t as ee, v as N } from "./dialog-CJGnC5Ag.js";
9
+ import { n as P, t as F } from "./MCPAppsDebugControls-BpP-Ifap.js";
10
+ import { a as te, i as I, t as L } from "./browser-DG2Z8392.js";
11
+ import { n as R, t as z } from "./zap-0Wr9QO7N.js";
12
+ import { t as B } from "./code-C8sN2OGR.js";
13
+ import { t as V } from "./JSONDisplay-BJqMz7Ny.js";
14
+ import { a as H, i as U, n as W, o as G, r as ne, s as re } from "./shared-CJVHJhag.js";
15
+ import { t as ie } from "./history-BfUFpL1d.js";
16
+ import { t as ae } from "./maximize-hSOCz133.js";
17
+ import { n as oe, t as K } from "./save-CmdEPUAm.js";
18
+ import { n as se, t as ce } from "./useSavedRequests-mSIsDd4c.js";
19
+ import { t as le } from "./play-B1leulYf.js";
20
+ import { t as q } from "./trash-2-BhumJAFE.js";
21
+ import { t as ue } from "./wrench-DvK20LUT.js";
22
+ import { t as de } from "./x-EilKPiCX.js";
23
+ import { t as fe } from "./switch-DHXEA_N5.js";
24
+ import { t as pe } from "./not-found-BajFyZpp.js";
25
+ import { _ as J, t as me, v as he } from "./telemetry-DjQn_Xm9.js";
26
+ import { c as Y, o as ge } from "./react-Bl-hSkvn.js";
27
+ import { n as _e } from "./dist-CTJnCYmk.js";
28
+ import { t as X } from "./spinner-Be1GlSGX.js";
29
+ import { n as ve } from "./InspectorContext-BBKCdfmK.js";
30
+ import { t as ye } from "./textarea-CwmI8_uI.js";
31
+ import { t as be } from "./WidgetWrapper-BlbQAh_X.js";
32
+ import { t as xe } from "./McpAppsViewPanel-jlsYQ7uS.js";
33
+ import { t as Se } from "./ListTabHeader-DzmTtN1e.js";
34
+ var Ce = l("chevron-up", [["path", {
34
35
  d: "m18 15-6-6-6 6",
35
36
  key: "153udz"
36
- }]]), X = /* @__PURE__ */ e(t(), 1), Z = f();
37
- function Ee({ savedRequests: e, selectedRequest: t, onLoadRequest: n, onDeleteRequest: r, focusedIndex: a }) {
38
- if (e.length === 0) return /* @__PURE__ */ (0, Z.jsxs)("div", {
37
+ }]]), Z = /* @__PURE__ */ e(t(), 1), Q = c();
38
+ function we({ savedRequests: e, selectedRequest: t, onLoadRequest: r, onDeleteRequest: o, focusedIndex: s }) {
39
+ if (e.length === 0) return /* @__PURE__ */ (0, Q.jsxs)("div", {
39
40
  className: "flex flex-1 flex-col items-center justify-center p-4 text-center",
40
41
  children: [
41
- /* @__PURE__ */ (0, Z.jsx)(F, { className: "h-12 w-12 text-gray-400 dark:text-gray-600 mb-3" }),
42
- /* @__PURE__ */ (0, Z.jsx)("p", {
42
+ /* @__PURE__ */ (0, Q.jsx)(P, { className: "h-12 w-12 text-gray-400 dark:text-gray-600 mb-3" }),
43
+ /* @__PURE__ */ (0, Q.jsx)("p", {
43
44
  className: "text-gray-500 dark:text-gray-400 mb-2",
44
45
  children: "No saved requests yet"
45
46
  }),
46
- /* @__PURE__ */ (0, Z.jsx)("p", {
47
+ /* @__PURE__ */ (0, Q.jsx)("p", {
47
48
  className: "text-xs text-gray-400 dark:text-gray-500",
48
49
  children: "Execute a tool and click Save to store requests"
49
50
  })
50
51
  ]
51
52
  });
52
- let o = (e, t) => {
53
+ let c = (e, t) => {
53
54
  e.stopPropagation(), t();
54
55
  };
55
- return /* @__PURE__ */ (0, Z.jsx)("div", { children: e.map((e, u) => /* @__PURE__ */ (0, Z.jsxs)("div", {
56
+ return /* @__PURE__ */ (0, Q.jsx)("div", { children: e.map((e, l) => /* @__PURE__ */ (0, Q.jsxs)("div", {
56
57
  className: "relative group",
57
- children: [/* @__PURE__ */ (0, Z.jsx)(G, {
58
+ children: [/* @__PURE__ */ (0, Q.jsx)(ne, {
58
59
  id: `saved-${e.id}`,
59
60
  isSelected: t?.id === e.id,
60
- isFocused: a === u,
61
+ isFocused: s === l,
61
62
  title: e.name,
62
63
  description: e.toolName,
63
- metadata: /* @__PURE__ */ (0, Z.jsx)("div", {
64
+ metadata: /* @__PURE__ */ (0, Q.jsx)("div", {
64
65
  className: "flex flex-col gap-1",
65
- children: /* @__PURE__ */ (0, Z.jsx)("span", {
66
+ children: /* @__PURE__ */ (0, Q.jsx)("span", {
66
67
  className: "text-xs text-gray-400 dark:text-gray-500",
67
68
  children: new Date(e.savedAt).toLocaleString()
68
69
  })
69
70
  }),
70
- onClick: () => n(e)
71
- }), /* @__PURE__ */ (0, Z.jsx)("div", {
71
+ onClick: () => r(e)
72
+ }), /* @__PURE__ */ (0, Q.jsx)("div", {
72
73
  className: "absolute top-1/2 right-2 -translate-y-1/2 opacity-0 group-hover:opacity-100 transition-opacity z-10",
73
- children: /* @__PURE__ */ (0, Z.jsxs)(s, { children: [/* @__PURE__ */ (0, Z.jsx)(i, {
74
- render: /* @__PURE__ */ (0, Z.jsx)(l, {
74
+ children: /* @__PURE__ */ (0, Q.jsxs)(i, { children: [/* @__PURE__ */ (0, Q.jsx)(n, {
75
+ render: /* @__PURE__ */ (0, Q.jsx)(p, {
75
76
  variant: "secondary",
76
77
  size: "sm",
77
- onClick: (t) => o(t, () => r(e.id)),
78
+ onClick: (t) => c(t, () => o(e.id)),
78
79
  className: "h-8 w-8 p-0",
79
- children: /* @__PURE__ */ (0, Z.jsx)(ue, { className: "h-4 w-4" })
80
+ children: /* @__PURE__ */ (0, Q.jsx)(q, { className: "h-4 w-4" })
80
81
  }),
81
82
  nativeButton: !0
82
- }), /* @__PURE__ */ (0, Z.jsx)(c, { children: /* @__PURE__ */ (0, Z.jsx)("p", { children: "Delete saved request" }) })] })
83
+ }), /* @__PURE__ */ (0, Q.jsx)(a, { children: /* @__PURE__ */ (0, Q.jsx)("p", { children: "Delete saved request" }) })] })
83
84
  })]
84
85
  }, e.id)) });
85
86
  }
86
87
  //#endregion
87
88
  //#region src/client/components/tools/SaveRequestDialog.tsx
88
- function De({ isOpen: e, requestName: t, defaultPlaceholder: n, onRequestNameChange: r, onSave: i, onCancel: a }) {
89
- return e ? /* @__PURE__ */ (0, Z.jsx)("div", {
89
+ function Te({ isOpen: e, requestName: t, defaultPlaceholder: n, onRequestNameChange: r, onSave: i, onCancel: a }) {
90
+ return e ? /* @__PURE__ */ (0, Q.jsx)("div", {
90
91
  className: "fixed inset-0 bg-black/50 flex items-center justify-center z-50",
91
92
  onClick: a,
92
- children: /* @__PURE__ */ (0, Z.jsxs)("div", {
93
+ children: /* @__PURE__ */ (0, Q.jsxs)("div", {
93
94
  className: "bg-white dark:bg-zinc-800 rounded-lg p-6 w-[400px] shadow-xl border border-gray-200 dark:border-zinc-700",
94
95
  onClick: (e) => e.stopPropagation(),
95
- children: [/* @__PURE__ */ (0, Z.jsx)("h3", {
96
+ children: [/* @__PURE__ */ (0, Q.jsx)("h3", {
96
97
  className: "text-lg font-semibold mb-4 text-gray-900 dark:text-gray-100",
97
98
  children: "Save Request"
98
- }), /* @__PURE__ */ (0, Z.jsxs)("div", {
99
+ }), /* @__PURE__ */ (0, Q.jsxs)("div", {
99
100
  className: "space-y-4",
100
- children: [/* @__PURE__ */ (0, Z.jsxs)("div", { children: [/* @__PURE__ */ (0, Z.jsx)(p, {
101
+ children: [/* @__PURE__ */ (0, Q.jsxs)("div", { children: [/* @__PURE__ */ (0, Q.jsx)(m, {
101
102
  htmlFor: "request-name",
102
103
  children: "Request Name (optional)"
103
- }), /* @__PURE__ */ (0, Z.jsx)(u, {
104
+ }), /* @__PURE__ */ (0, Q.jsx)(s, {
104
105
  id: "request-name",
105
106
  value: t,
106
107
  onChange: (e) => r(e.target.value),
@@ -110,15 +111,15 @@ function De({ isOpen: e, requestName: t, defaultPlaceholder: n, onRequestNameCha
110
111
  e.key === "Enter" && i();
111
112
  },
112
113
  autoFocus: !0
113
- })] }), /* @__PURE__ */ (0, Z.jsxs)("div", {
114
+ })] }), /* @__PURE__ */ (0, Q.jsxs)("div", {
114
115
  className: "flex justify-end gap-2",
115
- children: [/* @__PURE__ */ (0, Z.jsx)(l, {
116
+ children: [/* @__PURE__ */ (0, Q.jsx)(p, {
116
117
  variant: "outline",
117
118
  onClick: a,
118
119
  children: "Cancel"
119
- }), /* @__PURE__ */ (0, Z.jsxs)(l, {
120
+ }), /* @__PURE__ */ (0, Q.jsxs)(p, {
120
121
  onClick: i,
121
- children: [/* @__PURE__ */ (0, Z.jsx)(se, { className: "h-4 w-4 mr-2" }), "Save"]
122
+ children: [/* @__PURE__ */ (0, Q.jsx)(K, { className: "h-4 w-4 mr-2" }), "Save"]
122
123
  })]
123
124
  })]
124
125
  })]
@@ -127,7 +128,7 @@ function De({ isOpen: e, requestName: t, defaultPlaceholder: n, onRequestNameCha
127
128
  }
128
129
  //#endregion
129
130
  //#region src/client/components/tools/schema-utils.ts
130
- function Oe(e, t) {
131
+ function Ee(e, t) {
131
132
  if (!e?.$ref) return e;
132
133
  let n = e.$ref;
133
134
  if (!n.startsWith("#/")) return e;
@@ -136,22 +137,22 @@ function Oe(e, t) {
136
137
  else return e;
137
138
  return i;
138
139
  }
139
- function Q(e, t) {
140
+ function De(e, t) {
140
141
  if (e?.anyOf && Array.isArray(e.anyOf)) {
141
- let n = e.anyOf.find((e) => Oe(e, t)?.type !== "null");
142
+ let n = e.anyOf.find((e) => Ee(e, t)?.type !== "null");
142
143
  if (n) return {
143
- ...Oe(n, t),
144
+ ...Ee(n, t),
144
145
  nullable: !0
145
146
  };
146
147
  }
147
148
  return e;
148
149
  }
149
- function $(e, t) {
150
- let n = Q(e || {}, t);
151
- return n = Oe(n, t), n;
150
+ function Oe(e, t) {
151
+ let n = De(e || {}, t);
152
+ return n = Ee(n, t), n;
152
153
  }
153
154
  function ke(e, t) {
154
- let n = $(e, t);
155
+ let n = Oe(e, t);
155
156
  if (typeof n.type == "string") return n.type;
156
157
  if (Array.isArray(n.type)) {
157
158
  let e = n.type.find((e) => e !== "null");
@@ -250,46 +251,46 @@ function Fe(e) {
250
251
  }
251
252
  //#endregion
252
253
  //#region src/client/components/tools/ToolInputForm.tsx
253
- function Ie({ selectedTool: e, toolArgs: t, onArgChange: n, onBulkPaste: r, autoFilledFields: i, setFields: a, sendEmptyFields: o, onToggleEmpty: s }) {
254
- let c = e?.inputSchema?.properties || {}, l = e?.inputSchema?.required || [], d = Object.keys(c).length > 0, f = async (e, t) => {
254
+ function Ie({ selectedTool: e, toolArgs: t, onArgChange: n, onBulkPaste: r, autoFilledFields: i, setFields: a, sendEmptyFields: o, onToggleEmpty: c }) {
255
+ let l = e?.inputSchema?.properties || {}, u = e?.inputSchema?.required || [], d = Object.keys(l).length > 0, f = async (e, t) => {
255
256
  r && await r(e.clipboardData.getData("text"), t) && e.preventDefault();
256
257
  };
257
- return d ? /* @__PURE__ */ (0, Z.jsx)("div", {
258
+ return d ? /* @__PURE__ */ (0, Q.jsx)("div", {
258
259
  className: "space-y-4",
259
- children: Object.entries(c).map(([r, c]) => {
260
- let d = $(c, e?.inputSchema || {}), m = Ae(d), b = d.type === "string" && m !== null, x = d, S = l.includes(r), C = t[r], w = "";
260
+ children: Object.entries(l).map(([r, l]) => {
261
+ let d = Oe(l, e?.inputSchema || {}), p = Ae(d), h = d.type === "string" && p !== null, x = d, S = u.includes(r), C = t[r], w = "";
261
262
  C != null && (w = typeof C == "string" ? C : typeof C == "object" && C ? JSON.stringify(C, null, 2) : String(C));
262
- let T = x.type === "object" || x.type === "array", E = T ? x.type === "array" ? "array" : "object" : "string", D = a?.has(r) ?? !0, O = s && (x.type === "string" || T);
263
- return T ? /* @__PURE__ */ (0, Z.jsxs)("div", {
263
+ let T = x.type === "object" || x.type === "array", E = T ? x.type === "array" ? "array" : "object" : "string", D = a?.has(r) ?? !0, O = c && (x.type === "string" || T);
264
+ return T ? /* @__PURE__ */ (0, Q.jsxs)("div", {
264
265
  className: "space-y-2",
265
- children: [/* @__PURE__ */ (0, Z.jsxs)("div", {
266
+ children: [/* @__PURE__ */ (0, Q.jsxs)("div", {
266
267
  className: "flex items-start justify-between gap-2",
267
- children: [/* @__PURE__ */ (0, Z.jsxs)("div", {
268
+ children: [/* @__PURE__ */ (0, Q.jsxs)("div", {
268
269
  className: "min-w-0 flex-1",
269
- children: [/* @__PURE__ */ (0, Z.jsxs)(p, {
270
+ children: [/* @__PURE__ */ (0, Q.jsxs)(m, {
270
271
  htmlFor: r,
271
272
  className: "text-sm font-medium",
272
- children: [r, S && /* @__PURE__ */ (0, Z.jsx)("span", {
273
+ children: [r, S && /* @__PURE__ */ (0, Q.jsx)("span", {
273
274
  className: "text-red-500 ml-1",
274
275
  children: "*"
275
276
  })]
276
- }), x?.description && /* @__PURE__ */ (0, Z.jsx)("p", {
277
+ }), x?.description && /* @__PURE__ */ (0, Q.jsx)("p", {
277
278
  className: "mt-0.5 text-xs text-gray-500 dark:text-gray-400",
278
279
  children: x.description
279
280
  })]
280
- }), O && s && /* @__PURE__ */ (0, Z.jsxs)("div", {
281
+ }), O && c && /* @__PURE__ */ (0, Q.jsxs)("div", {
281
282
  className: "flex items-center gap-2 shrink-0",
282
- children: [/* @__PURE__ */ (0, Z.jsx)("span", {
283
+ children: [/* @__PURE__ */ (0, Q.jsx)("span", {
283
284
  className: "text-xs text-muted-foreground whitespace-nowrap",
284
285
  children: E === "array" ? "Send empty array explicitly" : "Send empty object explicitly"
285
- }), /* @__PURE__ */ (0, Z.jsx)(J, {
286
+ }), /* @__PURE__ */ (0, Q.jsx)(fe, {
286
287
  checked: o?.has(r) ?? !1,
287
- onCheckedChange: (e) => s(r, E, e),
288
+ onCheckedChange: (e) => c(r, E, e),
288
289
  "aria-label": E === "array" ? "Send empty array" : "Send empty object",
289
290
  title: E === "array" ? "Send empty array []" : "Send empty object {}"
290
291
  })]
291
292
  })]
292
- }), /* @__PURE__ */ (0, Z.jsx)(Se, {
293
+ }), /* @__PURE__ */ (0, Q.jsx)(ye, {
293
294
  id: r,
294
295
  "data-testid": `tool-param-${r}`,
295
296
  value: w,
@@ -299,61 +300,61 @@ function Ie({ selectedTool: e, toolArgs: t, onArgChange: n, onBulkPaste: r, auto
299
300
  disabled: o?.has(r) ?? !1,
300
301
  className: `min-h-[100px] ${D ? "" : "opacity-70"} ${i?.has(r) ? "animate-pulse ring-2 ring-green-500 dark:ring-green-400" : ""}`
301
302
  })]
302
- }, r) : b && m ? /* @__PURE__ */ (0, Z.jsxs)("div", {
303
+ }, r) : h && p ? /* @__PURE__ */ (0, Q.jsxs)("div", {
303
304
  className: "space-y-2",
304
- children: [/* @__PURE__ */ (0, Z.jsxs)("div", { children: [/* @__PURE__ */ (0, Z.jsxs)(p, {
305
+ children: [/* @__PURE__ */ (0, Q.jsxs)("div", { children: [/* @__PURE__ */ (0, Q.jsxs)(m, {
305
306
  htmlFor: r,
306
307
  className: "text-sm font-medium",
307
- children: [r, S && /* @__PURE__ */ (0, Z.jsx)("span", {
308
+ children: [r, S && /* @__PURE__ */ (0, Q.jsx)("span", {
308
309
  className: "text-red-500 ml-1",
309
310
  children: "*"
310
311
  })]
311
- }), x.description && /* @__PURE__ */ (0, Z.jsx)("p", {
312
+ }), x.description && /* @__PURE__ */ (0, Q.jsx)("p", {
312
313
  className: "mt-0.5 text-xs text-gray-500 dark:text-gray-400",
313
314
  children: x.description
314
- })] }), /* @__PURE__ */ (0, Z.jsxs)(y, {
315
+ })] }), /* @__PURE__ */ (0, Q.jsxs)(b, {
315
316
  value: String(t[r] || ""),
316
317
  onValueChange: (e) => n(r, e),
317
- children: [/* @__PURE__ */ (0, Z.jsx)(g, {
318
+ children: [/* @__PURE__ */ (0, Q.jsx)(_, {
318
319
  id: r,
319
320
  className: `w-full ${D ? "" : "opacity-70"}`,
320
321
  "data-testid": `tool-param-${r}`,
321
- children: /* @__PURE__ */ (0, Z.jsx)(h, { placeholder: "Select an option" })
322
- }), /* @__PURE__ */ (0, Z.jsx)(_, { children: m.map((e, t) => /* @__PURE__ */ (0, Z.jsx)(v, {
322
+ children: /* @__PURE__ */ (0, Q.jsx)(g, { placeholder: "Select an option" })
323
+ }), /* @__PURE__ */ (0, Q.jsx)(v, { children: p.map((e, t) => /* @__PURE__ */ (0, Q.jsx)(y, {
323
324
  value: e,
324
325
  children: x.enumNames?.[t] || e
325
326
  }, e)) })]
326
327
  })]
327
- }, r) : /* @__PURE__ */ (0, Z.jsxs)("div", {
328
+ }, r) : /* @__PURE__ */ (0, Q.jsxs)("div", {
328
329
  className: "space-y-2",
329
- children: [/* @__PURE__ */ (0, Z.jsxs)("div", {
330
+ children: [/* @__PURE__ */ (0, Q.jsxs)("div", {
330
331
  className: "flex items-start justify-between gap-2",
331
- children: [/* @__PURE__ */ (0, Z.jsxs)("div", {
332
+ children: [/* @__PURE__ */ (0, Q.jsxs)("div", {
332
333
  className: "min-w-0 flex-1",
333
- children: [/* @__PURE__ */ (0, Z.jsxs)(p, {
334
+ children: [/* @__PURE__ */ (0, Q.jsxs)(m, {
334
335
  htmlFor: r,
335
336
  className: "text-sm font-medium",
336
- children: [r, S && /* @__PURE__ */ (0, Z.jsx)("span", {
337
+ children: [r, S && /* @__PURE__ */ (0, Q.jsx)("span", {
337
338
  className: "text-red-500 ml-1",
338
339
  children: "*"
339
340
  })]
340
- }), x?.description && /* @__PURE__ */ (0, Z.jsx)("p", {
341
+ }), x?.description && /* @__PURE__ */ (0, Q.jsx)("p", {
341
342
  className: "mt-0.5 text-xs text-gray-500 dark:text-gray-400",
342
343
  children: x.description
343
344
  })]
344
- }), O && s && /* @__PURE__ */ (0, Z.jsxs)("div", {
345
+ }), O && c && /* @__PURE__ */ (0, Q.jsxs)("div", {
345
346
  className: "flex items-center gap-2 shrink-0",
346
- children: [/* @__PURE__ */ (0, Z.jsx)("span", {
347
+ children: [/* @__PURE__ */ (0, Q.jsx)("span", {
347
348
  className: "text-xs text-muted-foreground whitespace-nowrap",
348
349
  children: "Send empty string"
349
- }), /* @__PURE__ */ (0, Z.jsx)(J, {
350
+ }), /* @__PURE__ */ (0, Q.jsx)(fe, {
350
351
  checked: o?.has(r) ?? !1,
351
- onCheckedChange: (e) => s(r, "string", e),
352
+ onCheckedChange: (e) => c(r, "string", e),
352
353
  "aria-label": "Send empty string",
353
354
  title: "Send empty string"
354
355
  })]
355
356
  })]
356
- }), /* @__PURE__ */ (0, Z.jsx)(u, {
357
+ }), /* @__PURE__ */ (0, Q.jsx)(s, {
357
358
  id: r,
358
359
  "data-testid": `tool-param-${r}`,
359
360
  value: w,
@@ -365,144 +366,144 @@ function Ie({ selectedTool: e, toolArgs: t, onArgChange: n, onBulkPaste: r, auto
365
366
  })]
366
367
  }, r);
367
368
  })
368
- }) : /* @__PURE__ */ (0, Z.jsx)("div", {
369
+ }) : /* @__PURE__ */ (0, Q.jsx)("div", {
369
370
  className: "flex items-center justify-center h-32 text-gray-500 dark:text-gray-400 text-sm",
370
371
  children: "No parameters required"
371
372
  });
372
373
  }
373
374
  //#endregion
374
375
  //#region src/client/components/tools/ToolExecutionPanel.tsx
375
- function Le({ selectedTool: e, toolArgs: t, payloadToSend: n, isExecuting: o, isConnected: u, onArgChange: f, onExecute: p, onSave: m, onCancel: h, onBulkPaste: g, autoFilledFields: _, setFields: v, sendEmptyFields: y, onToggleEmpty: b }) {
376
- let S = "hidden @[700px]/tool-exec:inline", w = "hidden @[700px]/tool-exec:inline shrink-0 text-[10px] leading-none border border-current/30 p-1 rounded-full", T = "max-[699px]/tool-exec:size-8 max-[699px]/tool-exec:min-w-8 max-[699px]/tool-exec:shrink-0 max-[699px]/tool-exec:gap-0 max-[699px]/tool-exec:rounded-full max-[699px]/tool-exec:px-0 max-[699px]/tool-exec:py-0", E = "max-[699px]/tool-exec:!pr-0", [D, A] = (0, X.useState)(!1), [N, P] = (0, X.useState)(!1), [F, I] = (0, X.useState)(!1), [B, te] = (0, X.useState)(!1), [U, ne] = (0, X.useState)(!1), W = (0, X.useRef)(null);
377
- return (0, X.useEffect)(() => {
378
- if (W.current && e?.description) {
379
- let e = W.current, t = parseFloat(getComputedStyle(e).lineHeight), n = e.scrollHeight;
380
- ne(Math.round(n / t) > 3), te(!1);
376
+ function Le({ selectedTool: e, toolArgs: t, payloadToSend: r, isExecuting: o, isConnected: s, onArgChange: c, onExecute: l, onSave: m, onCancel: h, onBulkPaste: g, autoFilledFields: _, setFields: v, sendEmptyFields: y, onToggleEmpty: b }) {
377
+ let S = "hidden @[700px]/tool-exec:inline", w = "hidden @[700px]/tool-exec:inline shrink-0 text-[10px] leading-none border border-current/30 p-1 rounded-full", T = "@max-[699px]/tool-exec:size-8 @max-[699px]/tool-exec:min-w-8 @max-[699px]/tool-exec:shrink-0 @max-[699px]/tool-exec:gap-0 @max-[699px]/tool-exec:rounded-full @max-[699px]/tool-exec:!px-0 @max-[699px]/tool-exec:!py-0", E = "@max-[699px]/tool-exec:!pr-0", [D, A] = (0, Z.useState)(!1), [N, P] = (0, Z.useState)(!1), [F, R] = (0, Z.useState)(!1), [z, H] = (0, Z.useState)(!1), [U, W] = (0, Z.useState)(!1), G = (0, Z.useRef)(null);
378
+ return (0, Z.useEffect)(() => {
379
+ if (G.current && e?.description) {
380
+ let e = G.current, t = parseFloat(getComputedStyle(e).lineHeight), n = e.scrollHeight;
381
+ W(Math.round(n / t) > 3), H(!1);
381
382
  }
382
- }, [e?.description]), (0, X.useEffect)(() => {
383
+ }, [e?.description]), (0, Z.useEffect)(() => {
383
384
  let t = (t) => {
384
- (t.metaKey || t.ctrlKey) && t.key === "Enter" && e && !o && u && (t.preventDefault(), p()), t.key === "Escape" && o && h && (t.preventDefault(), h());
385
+ (t.metaKey || t.ctrlKey) && t.key === "Enter" && e && !o && s && (t.preventDefault(), l()), t.key === "Escape" && o && h && (t.preventDefault(), h());
385
386
  };
386
387
  return document.addEventListener("keydown", t), () => document.removeEventListener("keydown", t);
387
388
  }, [
388
389
  e,
389
390
  o,
390
- u,
391
- p,
391
+ s,
392
+ l,
392
393
  h
393
- ]), e ? /* @__PURE__ */ (0, Z.jsxs)("div", {
394
+ ]), e ? /* @__PURE__ */ (0, Q.jsxs)("div", {
394
395
  className: "flex flex-col h-full @container/tool-exec",
395
396
  children: [
396
- /* @__PURE__ */ (0, Z.jsx)("div", {
397
+ /* @__PURE__ */ (0, Q.jsx)("div", {
397
398
  className: "shrink-0 p-3 sm:p-5 pt-3 sm:pt-4 pb-2 sm:pb-2 sm:pr-4",
398
- children: /* @__PURE__ */ (0, Z.jsx)("div", { children: /* @__PURE__ */ (0, Z.jsxs)("div", {
399
+ children: /* @__PURE__ */ (0, Q.jsx)("div", { children: /* @__PURE__ */ (0, Q.jsxs)("div", {
399
400
  className: "flex flex-row items-center justify-between mb-0 gap-2",
400
- children: [/* @__PURE__ */ (0, Z.jsx)("h3", {
401
+ children: [/* @__PURE__ */ (0, Q.jsx)("h3", {
401
402
  className: "text-base sm:text-lg font-semibold",
402
403
  "data-testid": "tool-execution-title",
403
404
  children: e.name
404
- }), /* @__PURE__ */ (0, Z.jsxs)("div", {
405
+ }), /* @__PURE__ */ (0, Q.jsxs)("div", {
405
406
  className: "flex gap-2 shrink-0",
406
407
  children: [
407
- /* @__PURE__ */ (0, Z.jsxs)(s, { children: [/* @__PURE__ */ (0, Z.jsx)(i, {
408
- render: /* @__PURE__ */ (0, Z.jsxs)(l, {
408
+ /* @__PURE__ */ (0, Q.jsxs)(i, { children: [/* @__PURE__ */ (0, Q.jsx)(n, {
409
+ render: /* @__PURE__ */ (0, Q.jsxs)(p, {
409
410
  "data-testid": "tool-execution-metadata-button",
410
411
  variant: N ? "default" : "outline",
411
412
  onClick: () => P(!N),
412
413
  disabled: o,
413
414
  size: "sm",
414
- className: r(d, T),
415
+ className: u(d, T),
415
416
  title: "View tool metadata",
416
- children: [/* @__PURE__ */ (0, Z.jsx)(V, {}), /* @__PURE__ */ (0, Z.jsx)("span", {
417
+ children: [/* @__PURE__ */ (0, Q.jsx)(B, {}), /* @__PURE__ */ (0, Q.jsx)("span", {
417
418
  className: S,
418
419
  children: "Metadata"
419
420
  })]
420
421
  }),
421
422
  nativeButton: !0
422
- }), /* @__PURE__ */ (0, Z.jsx)(c, { children: /* @__PURE__ */ (0, Z.jsx)("p", { children: "View tool definition metadata" }) })] }),
423
- /* @__PURE__ */ (0, Z.jsxs)(s, { children: [/* @__PURE__ */ (0, Z.jsx)(i, {
424
- render: /* @__PURE__ */ (0, Z.jsxs)(l, {
423
+ }), /* @__PURE__ */ (0, Q.jsx)(a, { children: /* @__PURE__ */ (0, Q.jsx)("p", { children: "View tool definition metadata" }) })] }),
424
+ /* @__PURE__ */ (0, Q.jsxs)(i, { children: [/* @__PURE__ */ (0, Q.jsx)(n, {
425
+ render: /* @__PURE__ */ (0, Q.jsxs)(p, {
425
426
  "data-testid": "tool-execution-copy-payload-button",
426
427
  variant: "outline",
427
428
  onClick: async () => {
428
429
  if (e) try {
429
- await z(JSON.stringify(n ?? t, null, 2)), I(!0), setTimeout(() => I(!1), 2e3);
430
+ await L(JSON.stringify(r ?? t, null, 2)), R(!0), setTimeout(() => R(!1), 2e3);
430
431
  } catch {}
431
432
  },
432
433
  disabled: o,
433
434
  size: "sm",
434
- className: r(d, T),
435
+ className: u(d, T),
435
436
  title: "Copy payload as JSON",
436
- children: [F ? /* @__PURE__ */ (0, Z.jsx)(L, { className: "text-green-600" }) : /* @__PURE__ */ (0, Z.jsx)(R, {}), /* @__PURE__ */ (0, Z.jsx)("span", {
437
+ children: [F ? /* @__PURE__ */ (0, Q.jsx)(te, { className: "text-green-600" }) : /* @__PURE__ */ (0, Q.jsx)(I, {}), /* @__PURE__ */ (0, Q.jsx)("span", {
437
438
  className: S,
438
439
  children: F ? "Copied!" : "Payload"
439
440
  })]
440
441
  }),
441
442
  nativeButton: !0
442
- }), /* @__PURE__ */ (0, Z.jsx)(c, { children: /* @__PURE__ */ (0, Z.jsx)("p", { children: "Copy payload as JSON" }) })] }),
443
- /* @__PURE__ */ (0, Z.jsxs)(s, { children: [/* @__PURE__ */ (0, Z.jsx)(i, {
444
- render: /* @__PURE__ */ (0, Z.jsxs)(l, {
443
+ }), /* @__PURE__ */ (0, Q.jsx)(a, { children: /* @__PURE__ */ (0, Q.jsx)("p", { children: "Copy payload as JSON" }) })] }),
444
+ /* @__PURE__ */ (0, Q.jsxs)(i, { children: [/* @__PURE__ */ (0, Q.jsx)(n, {
445
+ render: /* @__PURE__ */ (0, Q.jsxs)(p, {
445
446
  "data-testid": "tool-execution-save-button",
446
447
  variant: "outline",
447
448
  onClick: m,
448
449
  disabled: o,
449
450
  size: "sm",
450
- className: r(d, T),
451
+ className: u(d, T),
451
452
  title: "Save request",
452
- children: [/* @__PURE__ */ (0, Z.jsx)(se, {}), /* @__PURE__ */ (0, Z.jsx)("span", {
453
+ children: [/* @__PURE__ */ (0, Q.jsx)(K, {}), /* @__PURE__ */ (0, Q.jsx)("span", {
453
454
  className: S,
454
455
  children: "Save"
455
456
  })]
456
457
  }),
457
458
  nativeButton: !0
458
- }), /* @__PURE__ */ (0, Z.jsx)(c, { children: /* @__PURE__ */ (0, Z.jsx)("p", { children: "Save request" }) })] }),
459
- o && h ? /* @__PURE__ */ (0, Z.jsxs)(s, {
459
+ }), /* @__PURE__ */ (0, Q.jsx)(a, { children: /* @__PURE__ */ (0, Q.jsx)("p", { children: "Save request" }) })] }),
460
+ o && h ? /* @__PURE__ */ (0, Q.jsxs)(i, {
460
461
  open: D ? void 0 : !1,
461
- children: [/* @__PURE__ */ (0, Z.jsx)(i, {
462
- render: /* @__PURE__ */ (0, Z.jsx)("div", {
462
+ children: [/* @__PURE__ */ (0, Q.jsx)(n, {
463
+ render: /* @__PURE__ */ (0, Q.jsx)("div", {
463
464
  onMouseEnter: () => A(!0),
464
465
  onMouseLeave: () => A(!1),
465
466
  className: "relative",
466
- children: /* @__PURE__ */ (0, Z.jsx)(l, {
467
+ children: /* @__PURE__ */ (0, Q.jsx)(p, {
467
468
  "data-testid": "tool-execution-cancel-button",
468
469
  onClick: h,
469
470
  variant: D ? "destructive" : "default",
470
471
  size: "sm",
471
- className: r(a, T, E, "transition-all"),
472
- children: D ? /* @__PURE__ */ (0, Z.jsxs)(Z.Fragment, { children: [
473
- /* @__PURE__ */ (0, Z.jsx)(fe, {}),
474
- /* @__PURE__ */ (0, Z.jsx)("span", {
472
+ className: u(f, T, E, "transition-all"),
473
+ children: D ? /* @__PURE__ */ (0, Q.jsxs)(Q.Fragment, { children: [
474
+ /* @__PURE__ */ (0, Q.jsx)(de, {}),
475
+ /* @__PURE__ */ (0, Q.jsx)("span", {
475
476
  className: S,
476
477
  children: "Cancel"
477
478
  }),
478
- /* @__PURE__ */ (0, Z.jsx)("span", {
479
+ /* @__PURE__ */ (0, Q.jsx)("span", {
479
480
  className: w,
480
481
  children: "Esc"
481
482
  })
482
- ] }) : /* @__PURE__ */ (0, Z.jsxs)(Z.Fragment, { children: [/* @__PURE__ */ (0, Z.jsx)(Y, {}), /* @__PURE__ */ (0, Z.jsx)("span", {
483
+ ] }) : /* @__PURE__ */ (0, Q.jsxs)(Q.Fragment, { children: [/* @__PURE__ */ (0, Q.jsx)(X, {}), /* @__PURE__ */ (0, Q.jsx)("span", {
483
484
  className: S,
484
485
  children: "Executing..."
485
486
  })] })
486
487
  })
487
488
  }),
488
489
  nativeButton: !1
489
- }), /* @__PURE__ */ (0, Z.jsx)(c, { children: /* @__PURE__ */ (0, Z.jsx)("p", { children: "Hover to cancel (or press Esc)" }) })]
490
- }) : /* @__PURE__ */ (0, Z.jsx)(l, {
490
+ }), /* @__PURE__ */ (0, Q.jsx)(a, { children: /* @__PURE__ */ (0, Q.jsx)("p", { children: "Hover to cancel (or press Esc)" }) })]
491
+ }) : /* @__PURE__ */ (0, Q.jsx)(p, {
491
492
  "data-testid": "tool-execution-execute-button",
492
- onClick: p,
493
- disabled: o || !u,
493
+ onClick: l,
494
+ disabled: o || !s,
494
495
  size: "sm",
495
- className: r(a, T, E),
496
- children: o ? /* @__PURE__ */ (0, Z.jsxs)(Z.Fragment, { children: [/* @__PURE__ */ (0, Z.jsx)(Y, {}), /* @__PURE__ */ (0, Z.jsx)("span", {
496
+ className: u(f, T, E),
497
+ children: o ? /* @__PURE__ */ (0, Q.jsxs)(Q.Fragment, { children: [/* @__PURE__ */ (0, Q.jsx)(X, {}), /* @__PURE__ */ (0, Q.jsx)("span", {
497
498
  className: S,
498
499
  children: "Executing..."
499
- })] }) : /* @__PURE__ */ (0, Z.jsxs)(Z.Fragment, { children: [
500
- /* @__PURE__ */ (0, Z.jsx)(q, {}),
501
- /* @__PURE__ */ (0, Z.jsx)("span", {
500
+ })] }) : /* @__PURE__ */ (0, Q.jsxs)(Q.Fragment, { children: [
501
+ /* @__PURE__ */ (0, Q.jsx)(le, {}),
502
+ /* @__PURE__ */ (0, Q.jsx)("span", {
502
503
  className: S,
503
504
  children: "Execute"
504
505
  }),
505
- /* @__PURE__ */ (0, Z.jsx)("span", {
506
+ /* @__PURE__ */ (0, Q.jsx)("span", {
506
507
  className: w,
507
508
  children: "⌘↵"
508
509
  })
@@ -512,30 +513,30 @@ function Le({ selectedTool: e, toolArgs: t, payloadToSend: n, isExecuting: o, is
512
513
  })]
513
514
  }) })
514
515
  }),
515
- /* @__PURE__ */ (0, Z.jsxs)("div", {
516
+ /* @__PURE__ */ (0, Q.jsxs)("div", {
516
517
  className: "flex-1 overflow-y-auto px-3 sm:px-5 pb-4 pr-3",
517
- children: [e.description && /* @__PURE__ */ (0, Z.jsxs)("div", {
518
+ children: [e.description && /* @__PURE__ */ (0, Q.jsxs)("div", {
518
519
  className: "relative mb-6",
519
- children: [/* @__PURE__ */ (0, Z.jsxs)("div", {
520
+ children: [/* @__PURE__ */ (0, Q.jsxs)("div", {
520
521
  className: "relative",
521
- children: [/* @__PURE__ */ (0, Z.jsx)("p", {
522
- ref: W,
522
+ children: [/* @__PURE__ */ (0, Q.jsx)("p", {
523
+ ref: G,
523
524
  "data-testid": "tool-execution-description",
524
- className: `text-sm text-gray-600 dark:text-gray-400 leading-relaxed transition-all duration-300 ${!B && U ? "line-clamp-3" : ""}`,
525
+ className: `text-sm text-gray-600 dark:text-gray-400 leading-relaxed transition-all duration-300 ${!z && U ? "line-clamp-3" : ""}`,
525
526
  children: e.description
526
- }), U && !B && /* @__PURE__ */ (0, Z.jsx)("div", { className: "absolute bottom-0 left-0 right-0 h-[1.4em] bg-linear-to-t from-white/95 dark:from-black/95 via-white/55 dark:via-black/55 to-transparent pointer-events-none" })]
527
- }), U && /* @__PURE__ */ (0, Z.jsx)("div", {
527
+ }), U && !z && /* @__PURE__ */ (0, Q.jsx)("div", { className: "absolute bottom-0 left-0 right-0 h-[1.4em] bg-linear-to-t from-white/95 dark:from-black/95 via-white/55 dark:via-black/55 to-transparent pointer-events-none" })]
528
+ }), U && /* @__PURE__ */ (0, Q.jsx)("div", {
528
529
  className: "flex justify-end",
529
- children: /* @__PURE__ */ (0, Z.jsx)("button", {
530
- onClick: () => te(!B),
530
+ children: /* @__PURE__ */ (0, Q.jsx)("button", {
531
+ onClick: () => H(!z),
531
532
  className: "relative z-10 inline-flex items-center gap-1 text-xs text-blue-600 dark:text-blue-400 hover:text-blue-700 dark:hover:text-blue-300 mt-1 transition-colors",
532
- children: B ? /* @__PURE__ */ (0, Z.jsxs)(Z.Fragment, { children: ["Show less", /* @__PURE__ */ (0, Z.jsx)(Te, { className: "h-3 w-3" })] }) : /* @__PURE__ */ (0, Z.jsxs)(Z.Fragment, { children: ["Show more", /* @__PURE__ */ (0, Z.jsx)(x, { className: "h-3 w-3" })] })
533
+ children: z ? /* @__PURE__ */ (0, Q.jsxs)(Q.Fragment, { children: ["Show less", /* @__PURE__ */ (0, Q.jsx)(Ce, { className: "h-3 w-3" })] }) : /* @__PURE__ */ (0, Q.jsxs)(Q.Fragment, { children: ["Show more", /* @__PURE__ */ (0, Q.jsx)(x, { className: "h-3 w-3" })] })
533
534
  })
534
535
  })]
535
- }), /* @__PURE__ */ (0, Z.jsx)(Ie, {
536
+ }), /* @__PURE__ */ (0, Q.jsx)(Ie, {
536
537
  selectedTool: e,
537
538
  toolArgs: t,
538
- onArgChange: f,
539
+ onArgChange: c,
539
540
  onBulkPaste: g,
540
541
  autoFilledFields: _,
541
542
  setFields: v,
@@ -543,20 +544,20 @@ function Le({ selectedTool: e, toolArgs: t, payloadToSend: n, isExecuting: o, is
543
544
  onToggleEmpty: b
544
545
  })]
545
546
  }),
546
- /* @__PURE__ */ (0, Z.jsx)(ee, {
547
+ /* @__PURE__ */ (0, Q.jsx)(ee, {
547
548
  open: N,
548
549
  onOpenChange: P,
549
- children: /* @__PURE__ */ (0, Z.jsxs)(j, {
550
+ children: /* @__PURE__ */ (0, Q.jsxs)(j, {
550
551
  scrollable: !0,
551
552
  className: "max-w-3xl max-h-[80vh]",
552
- children: [/* @__PURE__ */ (0, Z.jsx)(k, {
553
+ children: [/* @__PURE__ */ (0, Q.jsx)(k, {
553
554
  sticky: !0,
554
- children: /* @__PURE__ */ (0, Z.jsx)(C, { children: "Tool Definition" })
555
- }), /* @__PURE__ */ (0, Z.jsx)(O, { children: /* @__PURE__ */ (0, Z.jsx)(M, {
555
+ children: /* @__PURE__ */ (0, Q.jsx)(C, { children: "Tool Definition" })
556
+ }), /* @__PURE__ */ (0, Q.jsx)(O, { children: /* @__PURE__ */ (0, Q.jsx)(M, {
556
557
  onCopy: async () => {
557
- e && await z(JSON.stringify(e, null, 2));
558
+ e && await L(JSON.stringify(e, null, 2));
558
559
  },
559
- children: /* @__PURE__ */ (0, Z.jsx)(H, {
560
+ children: /* @__PURE__ */ (0, Q.jsx)(V, {
560
561
  data: e,
561
562
  filename: `tool-definition-${e.name}-${Date.now()}.json`
562
563
  })
@@ -564,12 +565,12 @@ function Le({ selectedTool: e, toolArgs: t, payloadToSend: n, isExecuting: o, is
564
565
  })
565
566
  })
566
567
  ]
567
- }) : /* @__PURE__ */ (0, Z.jsxs)("div", {
568
+ }) : /* @__PURE__ */ (0, Q.jsxs)("div", {
568
569
  className: "flex flex-col items-center justify-center h-full p-4 text-center",
569
- children: [/* @__PURE__ */ (0, Z.jsx)("p", {
570
+ children: [/* @__PURE__ */ (0, Q.jsx)("p", {
570
571
  className: "text-gray-500 dark:text-gray-400 mb-2",
571
572
  children: "Select a tool to get started"
572
- }), /* @__PURE__ */ (0, Z.jsx)("p", {
573
+ }), /* @__PURE__ */ (0, Q.jsx)("p", {
573
574
  className: "text-xs text-gray-400 dark:text-gray-500",
574
575
  children: "Choose a tool from the list to view its details and execute it"
575
576
  })]
@@ -578,13 +579,13 @@ function Le({ selectedTool: e, toolArgs: t, payloadToSend: n, isExecuting: o, is
578
579
  //#endregion
579
580
  //#region src/client/components/tools/ToolResultDisplay.tsx
580
581
  function Re({ timestamp: e }) {
581
- let [t, n] = (0, X.useState)(() => ze(e));
582
- return (0, X.useEffect)(() => {
582
+ let [t, n] = (0, Z.useState)(() => ze(e));
583
+ return (0, Z.useEffect)(() => {
583
584
  let t = () => n(ze(e));
584
585
  t();
585
586
  let r = setInterval(t, 1e3);
586
587
  return () => clearInterval(r);
587
- }, [e]), /* @__PURE__ */ (0, Z.jsx)("span", { children: t });
588
+ }, [e]), /* @__PURE__ */ (0, Q.jsx)("span", { children: t });
588
589
  }
589
590
  function ze(e) {
590
591
  let t = Date.now() - e, n = Math.floor(t / 1e3), r = Math.floor(n / 60), i = Math.floor(r / 60), a = Math.floor(i / 24);
@@ -599,73 +600,73 @@ function Be(e) {
599
600
  }
600
601
  return "An error occurred";
601
602
  }
602
- function Ve(e) {
603
+ function $(e) {
603
604
  try {
604
605
  return JSON.parse(e), !0;
605
606
  } catch {
606
607
  return !1;
607
608
  }
608
609
  }
609
- function He({ content: e }) {
610
- let [t, n] = (0, X.useState)(/* @__PURE__ */ new Set()), r = (0, X.useCallback)((e) => {
610
+ function Ve({ content: e }) {
611
+ let [t, n] = (0, Z.useState)(/* @__PURE__ */ new Set()), r = (0, Z.useCallback)((e) => {
611
612
  n((t) => {
612
613
  let n = new Set(t);
613
614
  return n.has(e) ? n.delete(e) : n.add(e), n;
614
615
  });
615
616
  }, []);
616
- return !Array.isArray(e) || e.length === 0 ? /* @__PURE__ */ (0, Z.jsx)("div", {
617
+ return !Array.isArray(e) || e.length === 0 ? /* @__PURE__ */ (0, Q.jsx)("div", {
617
618
  className: "text-sm text-gray-500 dark:text-gray-400",
618
619
  children: "No content"
619
- }) : /* @__PURE__ */ (0, Z.jsx)("div", {
620
+ }) : /* @__PURE__ */ (0, Q.jsx)("div", {
620
621
  className: "space-y-4",
621
622
  children: e.map((e, n) => {
622
623
  if (e.type === "text") {
623
- let i = e.text || "", a = t.has(n), o = Ve(i), s = o ? (() => {
624
+ let i = e.text || "", a = t.has(n), o = $(i), s = o ? (() => {
624
625
  try {
625
626
  return JSON.parse(i);
626
627
  } catch {
627
628
  return null;
628
629
  }
629
630
  })() : null;
630
- return /* @__PURE__ */ (0, Z.jsxs)("div", {
631
+ return /* @__PURE__ */ (0, Q.jsxs)("div", {
631
632
  className: "space-y-2",
632
- children: [/* @__PURE__ */ (0, Z.jsxs)("div", {
633
+ children: [/* @__PURE__ */ (0, Q.jsxs)("div", {
633
634
  className: "flex items-center justify-between gap-2",
634
- children: [/* @__PURE__ */ (0, Z.jsxs)("div", {
635
+ children: [/* @__PURE__ */ (0, Q.jsxs)("div", {
635
636
  className: "text-xs font-medium text-gray-500 dark:text-gray-400",
636
637
  children: ["Text Content", a ? " (formatted)" : ""]
637
- }), o && /* @__PURE__ */ (0, Z.jsx)("button", {
638
+ }), o && /* @__PURE__ */ (0, Q.jsx)("button", {
638
639
  type: "button",
639
640
  onClick: () => r(n),
640
641
  className: "text-xs text-blue-600 dark:text-blue-400 hover:underline",
641
642
  "data-testid": `tool-result-format-toggle-${n}`,
642
643
  children: a ? "Show as text" : "Try to format"
643
644
  })]
644
- }), a && s !== null ? /* @__PURE__ */ (0, Z.jsx)(H, {
645
+ }), a && s !== null ? /* @__PURE__ */ (0, Q.jsx)(V, {
645
646
  data: s,
646
647
  filename: `content-${n}.json`
647
- }) : /* @__PURE__ */ (0, Z.jsx)("div", {
648
+ }) : /* @__PURE__ */ (0, Q.jsx)("div", {
648
649
  className: "bg-gray-50 dark:bg-zinc-900 rounded-lg p-3 font-mono text-sm whitespace-pre-wrap break-words",
649
650
  "data-testid": "tool-execution-results-text-content",
650
651
  children: i
651
652
  })]
652
653
  }, n);
653
654
  }
654
- if (e.type === "image") return /* @__PURE__ */ (0, Z.jsxs)("div", {
655
+ if (e.type === "image") return /* @__PURE__ */ (0, Q.jsxs)("div", {
655
656
  className: "space-y-2",
656
- children: [/* @__PURE__ */ (0, Z.jsx)("div", {
657
+ children: [/* @__PURE__ */ (0, Q.jsx)("div", {
657
658
  className: "text-xs font-medium text-gray-500 dark:text-gray-400",
658
659
  children: "Image Content"
659
- }), /* @__PURE__ */ (0, Z.jsxs)("div", {
660
+ }), /* @__PURE__ */ (0, Q.jsxs)("div", {
660
661
  className: "bg-gray-50 dark:bg-zinc-900 rounded-lg p-3",
661
- children: [/* @__PURE__ */ (0, Z.jsx)("img", {
662
+ children: [/* @__PURE__ */ (0, Q.jsx)("img", {
662
663
  src: `data:${e.mimeType || "image/png"};base64,${e.data}`,
663
664
  alt: "Result",
664
665
  className: "max-w-full rounded",
665
666
  "data-testid": "tool-execution-results-image-content"
666
- }), e.annotations && /* @__PURE__ */ (0, Z.jsx)("div", {
667
+ }), e.annotations && /* @__PURE__ */ (0, Q.jsx)("div", {
667
668
  className: "mt-2 text-xs text-gray-500 dark:text-gray-400",
668
- children: /* @__PURE__ */ (0, Z.jsx)(H, {
669
+ children: /* @__PURE__ */ (0, Q.jsx)(V, {
669
670
  data: e.annotations,
670
671
  filename: `image-annotations-${n}.json`,
671
672
  "data-testid": "tool-execution-results-image-annotations"
@@ -673,21 +674,21 @@ function He({ content: e }) {
673
674
  })]
674
675
  })]
675
676
  }, n);
676
- if (e.type === "audio") return /* @__PURE__ */ (0, Z.jsxs)("div", {
677
+ if (e.type === "audio") return /* @__PURE__ */ (0, Q.jsxs)("div", {
677
678
  className: "space-y-2",
678
- children: [/* @__PURE__ */ (0, Z.jsx)("div", {
679
+ children: [/* @__PURE__ */ (0, Q.jsx)("div", {
679
680
  className: "text-xs font-medium text-gray-500 dark:text-gray-400",
680
681
  children: "Audio Content"
681
- }), /* @__PURE__ */ (0, Z.jsxs)("div", {
682
+ }), /* @__PURE__ */ (0, Q.jsxs)("div", {
682
683
  className: "bg-gray-50 dark:bg-zinc-900 rounded-lg p-3",
683
- children: [/* @__PURE__ */ (0, Z.jsx)("audio", {
684
+ children: [/* @__PURE__ */ (0, Q.jsx)("audio", {
684
685
  controls: !0,
685
686
  src: `data:${e.mimeType || "audio/wav"};base64,${e.data}`,
686
687
  className: "w-full",
687
688
  "data-testid": "tool-execution-results-audio-content"
688
- }), e.annotations && /* @__PURE__ */ (0, Z.jsx)("div", {
689
+ }), e.annotations && /* @__PURE__ */ (0, Q.jsx)("div", {
689
690
  className: "mt-2 text-xs text-gray-500 dark:text-gray-400",
690
- children: /* @__PURE__ */ (0, Z.jsx)(H, {
691
+ children: /* @__PURE__ */ (0, Q.jsx)(V, {
691
692
  data: e.annotations,
692
693
  filename: `audio-annotations-${n}.json`,
693
694
  "data-testid": "tool-execution-results-audio-annotations"
@@ -695,18 +696,18 @@ function He({ content: e }) {
695
696
  })]
696
697
  })]
697
698
  }, n);
698
- if (e.type === "resource_link") return /* @__PURE__ */ (0, Z.jsxs)("div", {
699
+ if (e.type === "resource_link") return /* @__PURE__ */ (0, Q.jsxs)("div", {
699
700
  className: "space-y-2",
700
- children: [/* @__PURE__ */ (0, Z.jsx)("div", {
701
+ children: [/* @__PURE__ */ (0, Q.jsx)("div", {
701
702
  className: "text-xs font-medium text-gray-500 dark:text-gray-400",
702
703
  children: "Resource Link"
703
- }), /* @__PURE__ */ (0, Z.jsxs)("div", {
704
+ }), /* @__PURE__ */ (0, Q.jsxs)("div", {
704
705
  className: "bg-gray-50 dark:bg-zinc-900 rounded-lg p-3 space-y-2",
705
706
  children: [
706
- /* @__PURE__ */ (0, Z.jsxs)("div", {
707
+ /* @__PURE__ */ (0, Q.jsxs)("div", {
707
708
  className: "font-mono text-sm break-all",
708
709
  children: [
709
- /* @__PURE__ */ (0, Z.jsx)("span", {
710
+ /* @__PURE__ */ (0, Q.jsx)("span", {
710
711
  className: "text-gray-600 dark:text-gray-400",
711
712
  children: "URI:"
712
713
  }),
@@ -714,10 +715,10 @@ function He({ content: e }) {
714
715
  e.uri
715
716
  ]
716
717
  }),
717
- e.name && /* @__PURE__ */ (0, Z.jsxs)("div", {
718
+ e.name && /* @__PURE__ */ (0, Q.jsxs)("div", {
718
719
  className: "text-sm",
719
720
  children: [
720
- /* @__PURE__ */ (0, Z.jsx)("span", {
721
+ /* @__PURE__ */ (0, Q.jsx)("span", {
721
722
  className: "text-gray-600 dark:text-gray-400",
722
723
  children: "Name:"
723
724
  }),
@@ -725,10 +726,10 @@ function He({ content: e }) {
725
726
  e.name
726
727
  ]
727
728
  }),
728
- e.description && /* @__PURE__ */ (0, Z.jsxs)("div", {
729
+ e.description && /* @__PURE__ */ (0, Q.jsxs)("div", {
729
730
  className: "text-sm",
730
731
  children: [
731
- /* @__PURE__ */ (0, Z.jsx)("span", {
732
+ /* @__PURE__ */ (0, Q.jsx)("span", {
732
733
  className: "text-gray-600 dark:text-gray-400",
733
734
  children: "Description:"
734
735
  }),
@@ -736,10 +737,10 @@ function He({ content: e }) {
736
737
  e.description
737
738
  ]
738
739
  }),
739
- e.mimeType && /* @__PURE__ */ (0, Z.jsxs)("div", {
740
+ e.mimeType && /* @__PURE__ */ (0, Q.jsxs)("div", {
740
741
  className: "text-sm",
741
742
  children: [
742
- /* @__PURE__ */ (0, Z.jsx)("span", {
743
+ /* @__PURE__ */ (0, Q.jsx)("span", {
743
744
  className: "text-gray-600 dark:text-gray-400",
744
745
  children: "MIME Type:"
745
746
  }),
@@ -747,12 +748,12 @@ function He({ content: e }) {
747
748
  e.mimeType
748
749
  ]
749
750
  }),
750
- e.annotations && /* @__PURE__ */ (0, Z.jsxs)("div", {
751
+ e.annotations && /* @__PURE__ */ (0, Q.jsxs)("div", {
751
752
  className: "mt-2",
752
- children: [/* @__PURE__ */ (0, Z.jsx)("div", {
753
+ children: [/* @__PURE__ */ (0, Q.jsx)("div", {
753
754
  className: "text-xs text-gray-500 dark:text-gray-400 mb-1",
754
755
  children: "Annotations:"
755
- }), /* @__PURE__ */ (0, Z.jsx)(H, {
756
+ }), /* @__PURE__ */ (0, Q.jsx)(V, {
756
757
  data: e.annotations,
757
758
  filename: `resource-link-annotations-${n}.json`,
758
759
  "data-testid": "tool-execution-results-resource-link-annotations"
@@ -763,19 +764,19 @@ function He({ content: e }) {
763
764
  }, n);
764
765
  if (e.type === "resource") {
765
766
  let t = e.resource || {};
766
- return /* @__PURE__ */ (0, Z.jsxs)("div", {
767
+ return /* @__PURE__ */ (0, Q.jsxs)("div", {
767
768
  className: "space-y-2",
768
- children: [/* @__PURE__ */ (0, Z.jsx)("div", {
769
+ children: [/* @__PURE__ */ (0, Q.jsx)("div", {
769
770
  className: "text-xs font-medium text-gray-500 dark:text-gray-400",
770
771
  children: "Embedded Resource"
771
- }), /* @__PURE__ */ (0, Z.jsxs)("div", {
772
+ }), /* @__PURE__ */ (0, Q.jsxs)("div", {
772
773
  className: "bg-gray-50 dark:bg-zinc-900 rounded-lg p-3 space-y-2",
773
774
  children: [
774
- /* @__PURE__ */ (0, Z.jsxs)("div", {
775
+ /* @__PURE__ */ (0, Q.jsxs)("div", {
775
776
  className: "font-mono text-sm break-all",
776
777
  "data-testid": "tool-execution-results-resource-uri",
777
778
  children: [
778
- /* @__PURE__ */ (0, Z.jsx)("span", {
779
+ /* @__PURE__ */ (0, Q.jsx)("span", {
779
780
  className: "text-gray-600 dark:text-gray-400",
780
781
  children: "URI:"
781
782
  }),
@@ -783,10 +784,10 @@ function He({ content: e }) {
783
784
  t.uri
784
785
  ]
785
786
  }),
786
- t.mimeType && /* @__PURE__ */ (0, Z.jsxs)("div", {
787
+ t.mimeType && /* @__PURE__ */ (0, Q.jsxs)("div", {
787
788
  className: "text-sm",
788
789
  children: [
789
- /* @__PURE__ */ (0, Z.jsx)("span", {
790
+ /* @__PURE__ */ (0, Q.jsx)("span", {
790
791
  className: "text-gray-600 dark:text-gray-400",
791
792
  "data-testid": "tool-execution-results-mime-type",
792
793
  children: "MIME Type:"
@@ -795,17 +796,17 @@ function He({ content: e }) {
795
796
  t.mimeType
796
797
  ]
797
798
  }),
798
- t.text && /* @__PURE__ */ (0, Z.jsxs)("div", {
799
+ t.text && /* @__PURE__ */ (0, Q.jsxs)("div", {
799
800
  "data-testid": "tool-execution-results-resource-text-content",
800
- children: [/* @__PURE__ */ (0, Z.jsx)("div", {
801
+ children: [/* @__PURE__ */ (0, Q.jsx)("div", {
801
802
  className: "text-xs text-gray-500 dark:text-gray-400 mb-1",
802
803
  children: "Content:"
803
- }), /* @__PURE__ */ (0, Z.jsx)("div", {
804
+ }), /* @__PURE__ */ (0, Q.jsx)("div", {
804
805
  className: "bg-white dark:bg-black rounded p-2 font-mono text-sm whitespace-pre-wrap break-words max-h-60 overflow-y-auto",
805
806
  children: t.text
806
807
  })]
807
808
  }),
808
- t.blob && /* @__PURE__ */ (0, Z.jsxs)("div", {
809
+ t.blob && /* @__PURE__ */ (0, Q.jsxs)("div", {
809
810
  className: "text-sm text-gray-600 dark:text-gray-400",
810
811
  children: [
811
812
  "[Binary content: ",
@@ -813,12 +814,12 @@ function He({ content: e }) {
813
814
  " bytes]"
814
815
  ]
815
816
  }),
816
- t.annotations && /* @__PURE__ */ (0, Z.jsxs)("div", {
817
+ t.annotations && /* @__PURE__ */ (0, Q.jsxs)("div", {
817
818
  className: "mt-2",
818
- children: [/* @__PURE__ */ (0, Z.jsx)("div", {
819
+ children: [/* @__PURE__ */ (0, Q.jsx)("div", {
819
820
  className: "text-xs text-gray-500 dark:text-gray-400 mb-1",
820
821
  children: "Annotations:"
821
- }), /* @__PURE__ */ (0, Z.jsx)(H, {
822
+ }), /* @__PURE__ */ (0, Q.jsx)(V, {
822
823
  data: t.annotations,
823
824
  filename: `resource-annotations-${n}.json`,
824
825
  "data-testid": "tool-execution-results-resource-annotations"
@@ -828,12 +829,12 @@ function He({ content: e }) {
828
829
  })]
829
830
  }, n);
830
831
  }
831
- return /* @__PURE__ */ (0, Z.jsxs)("div", {
832
+ return /* @__PURE__ */ (0, Q.jsxs)("div", {
832
833
  className: "space-y-2",
833
- children: [/* @__PURE__ */ (0, Z.jsxs)("div", {
834
+ children: [/* @__PURE__ */ (0, Q.jsxs)("div", {
834
835
  className: "text-xs font-medium text-gray-500 dark:text-gray-400",
835
836
  children: ["Unknown Content Type: ", e.type || "N/A"]
836
- }), /* @__PURE__ */ (0, Z.jsx)(H, {
837
+ }), /* @__PURE__ */ (0, Q.jsx)(V, {
837
838
  data: e,
838
839
  filename: `content-${n}.json`,
839
840
  "data-testid": "tool-execution-results-unknown-content"
@@ -842,86 +843,60 @@ function He({ content: e }) {
842
843
  })
843
844
  });
844
845
  }
845
- function Ue({ serverId: e, viewId: t, toolName: n, resourceUri: r, toolInput: i, toolOutput: a, toolMetadata: o, readResource: s, customProps: c, displayMode: l, onDisplayModeChange: u, onSendFollowUp: d }) {
846
- let f = Ce({
847
- serverId: e,
848
- viewId: t,
849
- resourceUri: r,
850
- toolName: n,
851
- toolInput: i,
852
- toolOutput: a,
853
- toolMetadata: o,
854
- readResource: s,
855
- displayMode: l,
856
- onDisplayModeChange: u
857
- });
858
- if (!f) return /* @__PURE__ */ (0, Z.jsx)(I, {
859
- className: "w-full h-full min-h-[240px]",
860
- children: /* @__PURE__ */ (0, Z.jsx)(Y, { className: "size-5" })
861
- });
862
- let p = l === "inline" ? "w-full h-full flex items-center justify-center relative p-4 min-h-0" : "w-full h-full relative p-4", m = c ? JSON.stringify(c) : "no-custom-props";
863
- return /* @__PURE__ */ (0, Z.jsx)(I, {
864
- className: "w-full h-full min-h-[240px]",
865
- children: /* @__PURE__ */ (0, Z.jsx)(ye, {
866
- viewId: t,
867
- toolName: n,
868
- toolInput: i,
869
- toolOutput: a,
870
- customProps: c,
871
- className: p,
872
- onMessage: (e) => {
873
- e.length > 0 && d && d(e);
874
- },
875
- ...f
876
- }, m)
877
- });
878
- }
879
- function We({ results: e, copiedResult: t, serverId: n, readResource: r, onCopy: i, onMaximize: a, isMaximized: o = !1, onRerunTool: s }) {
880
- let [c, u] = (0, X.useState)(0), [d, f] = (0, X.useState)(!0), [p, m] = (0, X.useState)(null), [h, b] = (0, X.useState)("inline"), [x, S] = (0, X.useState)(null), C = (0, X.useRef)(!1), w = e[0], T = w ? e.filter((e) => e.toolName === w.toolName) : [], E = T[c] || T[0], D = e.findIndex((e) => e === E), O = (E ? E.error || Be(E.result) : null) ?? (E == null ? "" : JSON.stringify(E.result, null, 2));
881
- (0, X.useEffect)(() => {
882
- T.length > 0 && c >= T.length && u(0);
883
- }, [T.length, c]), (0, X.useEffect)(() => {
884
- C.current = !1, m(null);
885
- }, [w?.toolName]);
886
- let k = (0, X.useMemo)(() => E?.args, [E?.timestamp, c]), A = (0, X.useMemo)(() => E?.result, [
887
- E?.timestamp,
888
- E?.duration,
889
- c
890
- ]), j = (0, X.useCallback)((e) => r(e), [r]), M = (0, X.useCallback)((e) => {
846
+ function He({ results: e, copiedResult: t, serverId: n, readResource: r, onCopy: i, onMaximize: a, isMaximized: o = !1, onRerunTool: s, onWidgetHeightChange: c }) {
847
+ let [l, u] = (0, Z.useState)(0), [d, f] = (0, Z.useState)(!0), [m, h] = (0, Z.useState)(null), [g, x] = (0, Z.useState)("inline"), [S, C] = (0, Z.useState)(null), w = (0, Z.useRef)(!1), T = e[0], E = T ? e.filter((e) => e.toolName === T.toolName) : [], D = E[l] || E[0], O = e.findIndex((e) => e === D), k = (D ? D.error || Be(D.result) : null) ?? (D == null ? "" : JSON.stringify(D.result, null, 2));
848
+ (0, Z.useEffect)(() => {
849
+ E.length > 0 && l >= E.length && u(0);
850
+ }, [E.length, l]), (0, Z.useEffect)(() => {
851
+ w.current = !1, h(null);
852
+ }, [T?.toolName]);
853
+ let A = (0, Z.useMemo)(() => D?.args, [D?.timestamp, l]), j = (0, Z.useMemo)(() => D?.result, [
854
+ D?.timestamp,
855
+ D?.duration,
856
+ l
857
+ ]), M = (0, Z.useCallback)((e) => r(e), [r]), ee = (0, Z.useCallback)((e) => {
891
858
  let t = e.filter((e) => e.type === "text" && "text" in e).map((e) => e.text).join("\n"), n = e.filter((e) => e.type === "image").length, r = e.filter((e) => e.type === "resource").length, i = [n > 0 && `${n} image${n > 1 ? "s" : ""}`, r > 0 && `${r} resource${r > 1 ? "s" : ""}`].filter(Boolean).join(", ");
892
- be.info("Widget follow-up", {
859
+ _e.info("Widget follow-up", {
893
860
  description: [t, i].filter(Boolean).join(" — "),
894
861
  duration: 5e3
895
862
  });
896
- }, []), ee = (0, X.useMemo)(() => E && _e(E.toolMeta) ? "mcp-apps" : null, [E]), N = (0, X.useMemo)(() => E?.toolMeta ? ve(E.toolMeta) : null, [E?.toolMeta]), F = (0, X.useMemo)(() => ee === "mcp-apps" && !!N, [ee, N]), I = (0, X.useMemo)(() => E?.result?.content || [], [E]), z = (0, X.useMemo)(() => N || null, [N]), B = (0, X.useMemo)(() => !!(I && I.length > 0 || E?.result?.structuredContent), [I, E]), V = (0, X.useMemo)(() => !F && B, [F, B]), U = (0, X.useMemo)(() => {
863
+ }, []), N = (0, Z.useMemo)(() => D && Y(D.toolMeta) ? "mcp-apps" : null, [D]), P = (0, Z.useMemo)(() => D?.toolMeta ? ge(D.toolMeta) : null, [D?.toolMeta]), L = (0, Z.useMemo)(() => N === "mcp-apps" && !!P, [N, P]), R = (0, Z.useMemo)(() => D?.result?.content || [], [D]), B = (0, Z.useMemo)(() => P || null, [P]), H = (0, Z.useMemo)(() => !!(R && R.length > 0 || D?.result?.structuredContent), [R, D]), U = (0, Z.useMemo)(() => !L && H, [L, H]), W = (0, Z.useMemo)(() => {
897
864
  let e = [];
898
- return F && N && e.push({
865
+ return L && P && e.push({
899
866
  mode: "mcp-apps",
900
867
  label: "Component (MCP Apps)"
901
868
  }), e.push({
902
869
  mode: "json",
903
870
  label: "Raw JSON"
904
871
  }), e;
905
- }, [F, N]);
906
- return (0, X.useEffect)(() => {
907
- if (U.length === 0) return;
908
- let e = p && U.some((e) => e.mode === p), t = U.find((e) => e.mode !== "json");
872
+ }, [L, P]);
873
+ return (0, Z.useEffect)(() => {
874
+ if (W.length === 0) return;
875
+ let e = m && W.some((e) => e.mode === m), t = W.find((e) => e.mode !== "json");
909
876
  if (t) {
910
- let n = C.current;
911
- if (C.current = !0, !p || !e || p === "json" && !n) {
912
- m(t.mode);
877
+ let n = w.current;
878
+ if (w.current = !0, !m || !e || m === "json" && !n) {
879
+ h(t.mode);
913
880
  return;
914
881
  }
915
- } else (!p || !e) && m("json");
916
- }, [U, p]), e.length === 0 ? /* @__PURE__ */ (0, Z.jsx)("div", {
917
- className: "flex flex-col h-full bg-white dark:bg-black border-t dark:border-zinc-700",
918
- children: /* @__PURE__ */ (0, Z.jsx)("div", {
882
+ } else (!m || !e) && h("json");
883
+ }, [W, m]), (0, Z.useEffect)(() => {
884
+ c && (e.length === 0 || m !== "mcp-apps" || g !== "inline" || !L) && c(null);
885
+ }, [
886
+ c,
887
+ e.length,
888
+ m,
889
+ g,
890
+ L
891
+ ]), e.length === 0 ? /* @__PURE__ */ (0, Q.jsx)("div", {
892
+ className: "flex flex-col h-full bg-white dark:bg-black",
893
+ children: /* @__PURE__ */ (0, Q.jsx)("div", {
919
894
  className: "flex-1 overflow-y-auto h-full",
920
- children: /* @__PURE__ */ (0, Z.jsx)("div", {
895
+ children: /* @__PURE__ */ (0, Q.jsx)("div", {
921
896
  className: "flex items-center justify-center h-full",
922
- children: /* @__PURE__ */ (0, Z.jsx)("div", {
897
+ children: /* @__PURE__ */ (0, Q.jsx)("div", {
923
898
  className: "text-center",
924
- children: /* @__PURE__ */ (0, Z.jsx)(pe, {
899
+ children: /* @__PURE__ */ (0, Q.jsx)(pe, {
925
900
  vertical: !0,
926
901
  noBorder: !0,
927
902
  message: "No Results yet"
@@ -929,99 +904,99 @@ function We({ results: e, copiedResult: t, serverId: n, readResource: r, onCopy:
929
904
  })
930
905
  })
931
906
  })
932
- }) : /* @__PURE__ */ (0, Z.jsxs)("div", {
933
- className: "relative flex flex-col h-full bg-white dark:bg-black border-t dark:border-zinc-700",
934
- children: [/* @__PURE__ */ (0, Z.jsx)("div", {
907
+ }) : /* @__PURE__ */ (0, Q.jsxs)("div", {
908
+ className: "relative flex flex-col h-full bg-white dark:bg-black",
909
+ children: [/* @__PURE__ */ (0, Q.jsx)("div", {
935
910
  className: "flex-1 overflow-y-auto h-full",
936
- children: /* @__PURE__ */ (0, Z.jsxs)("div", {
911
+ children: /* @__PURE__ */ (0, Q.jsxs)("div", {
937
912
  className: "space-y-0 flex flex-col flex-1 h-full",
938
- children: [/* @__PURE__ */ (0, Z.jsxs)("div", {
939
- className: `sticky top-0 z-40 flex items-center gap-2 px-4 pt-2 backdrop-blur-xs bg-white/50 dark:bg-black/50 ${F || V ? "border-b border-gray-200 dark:border-zinc-600 pb-2" : ""}`,
913
+ children: [/* @__PURE__ */ (0, Q.jsxs)("div", {
914
+ className: `sticky top-0 z-40 flex items-center gap-2 px-4 pt-2 backdrop-blur-xs bg-white/50 dark:bg-black/50 ${L || U ? "border-b border-gray-200 dark:border-zinc-600 pb-2" : ""}`,
940
915
  children: [
941
- /* @__PURE__ */ (0, Z.jsx)("h3", {
916
+ /* @__PURE__ */ (0, Q.jsx)("h3", {
942
917
  className: "text-sm font-medium hidden sm:block",
943
918
  children: "Response"
944
919
  }),
945
- E.duration !== void 0 && /* @__PURE__ */ (0, Z.jsxs)("div", {
920
+ D.duration !== void 0 && /* @__PURE__ */ (0, Q.jsxs)("div", {
946
921
  className: "hidden sm:flex items-center gap-1",
947
- children: [/* @__PURE__ */ (0, Z.jsx)(te, { className: "h-3 w-3 text-gray-400" }), /* @__PURE__ */ (0, Z.jsxs)("span", {
922
+ children: [/* @__PURE__ */ (0, Q.jsx)(z, { className: "h-3 w-3 text-gray-400" }), /* @__PURE__ */ (0, Q.jsxs)("span", {
948
923
  className: "text-xs text-gray-500 dark:text-gray-400",
949
- children: [E.duration, "ms"]
924
+ children: [D.duration, "ms"]
950
925
  })]
951
926
  }),
952
- F && /* @__PURE__ */ (0, Z.jsx)("div", {
927
+ L && /* @__PURE__ */ (0, Q.jsx)("div", {
953
928
  className: "flex items-center gap-4 sm:ml-4",
954
- children: /* @__PURE__ */ (0, Z.jsx)("div", {
929
+ children: /* @__PURE__ */ (0, Q.jsx)("div", {
955
930
  className: "flex items-center gap-2",
956
- children: U.map((e, t) => /* @__PURE__ */ (0, Z.jsxs)(X.Fragment, { children: [t > 0 && /* @__PURE__ */ (0, Z.jsx)("span", {
931
+ children: W.map((e, t) => /* @__PURE__ */ (0, Q.jsxs)(Z.Fragment, { children: [t > 0 && /* @__PURE__ */ (0, Q.jsx)("span", {
957
932
  className: "text-xs text-zinc-400",
958
933
  children: "|"
959
- }), /* @__PURE__ */ (0, Z.jsx)("button", {
934
+ }), /* @__PURE__ */ (0, Q.jsx)("button", {
960
935
  "data-testid": `tool-result-view-${e.mode}`,
961
- onClick: () => m(e.mode),
962
- className: `text-xs font-medium ${p === e.mode ? "text-black dark:text-white" : "text-zinc-500 dark:text-zinc-400"}`,
936
+ onClick: () => h(e.mode),
937
+ className: `text-xs font-medium ${m === e.mode ? "text-black dark:text-white" : "text-zinc-500 dark:text-zinc-400"}`,
963
938
  children: e.label
964
939
  })] }, e.mode))
965
940
  })
966
941
  }),
967
- V && /* @__PURE__ */ (0, Z.jsxs)("div", {
942
+ U && /* @__PURE__ */ (0, Q.jsxs)("div", {
968
943
  className: "flex items-center gap-2 sm:ml-4",
969
944
  children: [
970
- /* @__PURE__ */ (0, Z.jsx)("button", {
945
+ /* @__PURE__ */ (0, Q.jsx)("button", {
971
946
  onClick: () => f(!0),
972
947
  className: `text-xs font-medium ${d ? "text-black dark:text-white" : "text-zinc-500 dark:text-zinc-400"}`,
973
948
  children: "Formatted"
974
949
  }),
975
- /* @__PURE__ */ (0, Z.jsx)("span", {
950
+ /* @__PURE__ */ (0, Q.jsx)("span", {
976
951
  className: "text-xs text-zinc-400",
977
952
  children: "|"
978
953
  }),
979
- /* @__PURE__ */ (0, Z.jsx)("button", {
954
+ /* @__PURE__ */ (0, Q.jsx)("button", {
980
955
  onClick: () => f(!1),
981
956
  className: `text-xs font-medium ${d ? "text-zinc-500 dark:text-zinc-400" : "text-black dark:text-white"}`,
982
957
  children: "Raw"
983
958
  })
984
959
  ]
985
960
  }),
986
- /* @__PURE__ */ (0, Z.jsxs)("div", {
961
+ /* @__PURE__ */ (0, Q.jsxs)("div", {
987
962
  className: "ml-auto flex items-center gap-1",
988
963
  children: [
989
- o && s && /* @__PURE__ */ (0, Z.jsxs)(l, {
964
+ o && s && /* @__PURE__ */ (0, Q.jsxs)(p, {
990
965
  "data-testid": "tool-result-rerun",
991
966
  variant: "ghost",
992
967
  size: "sm",
993
968
  onClick: s,
994
969
  title: "Re-run with same arguments",
995
- children: [/* @__PURE__ */ (0, Z.jsx)(q, { className: "h-4 w-4" }), /* @__PURE__ */ (0, Z.jsx)("span", {
970
+ children: [/* @__PURE__ */ (0, Q.jsx)(le, { className: "h-4 w-4" }), /* @__PURE__ */ (0, Q.jsx)("span", {
996
971
  className: "hidden sm:inline ml-1",
997
972
  children: "Re-run"
998
973
  })]
999
974
  }),
1000
- F && a && /* @__PURE__ */ (0, Z.jsx)(l, {
975
+ L && a && /* @__PURE__ */ (0, Q.jsx)(p, {
1001
976
  "data-testid": "tool-result-maximize",
1002
977
  variant: "ghost",
1003
978
  size: "sm",
1004
979
  onClick: a,
1005
980
  title: o ? "Restore" : "Maximize",
1006
- children: o ? /* @__PURE__ */ (0, Z.jsx)(oe, { className: "h-4 w-4" }) : /* @__PURE__ */ (0, Z.jsx)(ae, { className: "h-4 w-4" })
981
+ children: o ? /* @__PURE__ */ (0, Q.jsx)(oe, { className: "h-4 w-4" }) : /* @__PURE__ */ (0, Q.jsx)(ae, { className: "h-4 w-4" })
1007
982
  }),
1008
- T.length > 1 && /* @__PURE__ */ (0, Z.jsxs)(y, {
1009
- value: c.toString(),
983
+ E.length > 1 && /* @__PURE__ */ (0, Q.jsxs)(b, {
984
+ value: l.toString(),
1010
985
  onValueChange: (e) => u(parseInt(e)),
1011
- children: [/* @__PURE__ */ (0, Z.jsx)(g, {
986
+ children: [/* @__PURE__ */ (0, Q.jsx)(_, {
1012
987
  className: "w-[140px] h-8 text-xs",
1013
- leading: /* @__PURE__ */ (0, Z.jsxs)("div", {
988
+ leading: /* @__PURE__ */ (0, Q.jsxs)("div", {
1014
989
  className: "flex items-center gap-1",
1015
- children: [/* @__PURE__ */ (0, Z.jsx)(K, { className: "h-3 w-3" }), /* @__PURE__ */ (0, Z.jsx)(Re, { timestamp: E.timestamp })]
990
+ children: [/* @__PURE__ */ (0, Q.jsx)(ie, { className: "h-3 w-3" }), /* @__PURE__ */ (0, Q.jsx)(Re, { timestamp: D.timestamp })]
1016
991
  })
1017
- }), /* @__PURE__ */ (0, Z.jsx)(_, { children: T.map((e, t) => /* @__PURE__ */ (0, Z.jsx)(v, {
992
+ }), /* @__PURE__ */ (0, Q.jsx)(v, { children: E.map((e, t) => /* @__PURE__ */ (0, Q.jsx)(y, {
1018
993
  value: t.toString(),
1019
- children: /* @__PURE__ */ (0, Z.jsxs)("div", {
994
+ children: /* @__PURE__ */ (0, Q.jsxs)("div", {
1020
995
  className: "flex items-center gap-2",
1021
996
  children: [
1022
- /* @__PURE__ */ (0, Z.jsx)(K, { className: "h-3 w-3" }),
1023
- /* @__PURE__ */ (0, Z.jsx)("span", { children: ze(e.timestamp) }),
1024
- /* @__PURE__ */ (0, Z.jsxs)("span", {
997
+ /* @__PURE__ */ (0, Q.jsx)(ie, { className: "h-3 w-3" }),
998
+ /* @__PURE__ */ (0, Q.jsx)("span", { children: ze(e.timestamp) }),
999
+ /* @__PURE__ */ (0, Q.jsxs)("span", {
1025
1000
  className: "text-xs text-muted-foreground",
1026
1001
  children: [
1027
1002
  "(",
@@ -1033,93 +1008,98 @@ function We({ results: e, copiedResult: t, serverId: n, readResource: r, onCopy:
1033
1008
  })
1034
1009
  }, t)) })]
1035
1010
  }),
1036
- /* @__PURE__ */ (0, Z.jsx)(l, {
1037
- "data-testid": `tool-result-copy-${D}`,
1011
+ /* @__PURE__ */ (0, Q.jsx)(p, {
1012
+ "data-testid": `tool-result-copy-${O}`,
1038
1013
  variant: "ghost",
1039
1014
  size: "sm",
1040
- onClick: () => i(D, O),
1041
- children: t === D ? /* @__PURE__ */ (0, Z.jsx)(L, { className: "h-4 w-4" }) : /* @__PURE__ */ (0, Z.jsx)(R, { className: "h-4 w-4" })
1015
+ onClick: () => i(O, k),
1016
+ children: t === O ? /* @__PURE__ */ (0, Q.jsx)(te, { className: "h-4 w-4" }) : /* @__PURE__ */ (0, Q.jsx)(I, { className: "h-4 w-4" })
1042
1017
  })
1043
1018
  ]
1044
1019
  })
1045
1020
  ]
1046
1021
  }), (() => {
1047
- let e = E.error || Be(E.result);
1048
- return e ? /* @__PURE__ */ (0, Z.jsxs)("div", {
1049
- className: "bg-red-50 dark:bg-red-900/20 border border-red-200 dark:border-red-800 rounded p-3 mx-4",
1050
- children: [/* @__PURE__ */ (0, Z.jsx)("p", {
1022
+ let e = D.error || Be(D.result);
1023
+ return e ? /* @__PURE__ */ (0, Q.jsxs)("div", {
1024
+ className: "bg-red-50 dark:bg-red-900/20 border border-red-200 dark:border-red-800 rounded p-3 mx-4 mt-4",
1025
+ children: [/* @__PURE__ */ (0, Q.jsx)("p", {
1051
1026
  className: "text-red-800 dark:text-red-300 font-medium",
1052
1027
  children: "Error:"
1053
- }), /* @__PURE__ */ (0, Z.jsx)("p", {
1028
+ }), /* @__PURE__ */ (0, Q.jsx)("p", {
1054
1029
  className: "text-red-700 dark:text-red-400 text-sm",
1055
1030
  children: e
1056
1031
  })]
1057
1032
  }) : (() => {
1058
- if (!p) return /* @__PURE__ */ (0, Z.jsx)("div", {
1033
+ if (!m) return /* @__PURE__ */ (0, Q.jsx)("div", {
1059
1034
  className: "flex items-center justify-center w-full h-[200px]",
1060
- children: /* @__PURE__ */ (0, Z.jsx)(Y, { className: "size-5" })
1035
+ children: /* @__PURE__ */ (0, Q.jsx)(X, { className: "size-5" })
1061
1036
  });
1062
- switch (p) {
1063
- case "mcp-apps": return !F || !N ? /* @__PURE__ */ (0, Z.jsx)("div", {
1037
+ switch (m) {
1038
+ case "mcp-apps": return !L || !P ? /* @__PURE__ */ (0, Q.jsx)("div", {
1064
1039
  className: "px-4 pt-4",
1065
- children: /* @__PURE__ */ (0, Z.jsx)("div", {
1040
+ children: /* @__PURE__ */ (0, Q.jsx)("div", {
1066
1041
  className: "bg-red-50 dark:bg-red-900/20 border border-red-200 dark:border-red-800 rounded p-3",
1067
- children: /* @__PURE__ */ (0, Z.jsx)("p", {
1042
+ children: /* @__PURE__ */ (0, Q.jsx)("p", {
1068
1043
  className: "text-sm text-red-600 dark:text-red-400",
1069
1044
  children: "MCP Apps resource not available"
1070
1045
  })
1071
1046
  })
1072
- }) : /* @__PURE__ */ (0, Z.jsxs)("div", {
1073
- className: "flex flex-1 relative flex-col min-h-0",
1074
- children: [/* @__PURE__ */ (0, Z.jsx)("div", {
1047
+ }) : /* @__PURE__ */ (0, Q.jsxs)(be, {
1048
+ className: "relative flex flex-1 w-full min-h-[240px] items-stretch",
1049
+ children: [/* @__PURE__ */ (0, Q.jsx)("div", {
1075
1050
  className: "absolute top-2 right-2 z-30 flex items-center gap-2",
1076
- children: /* @__PURE__ */ (0, Z.jsx)(P, {
1077
- toolCallId: `tool-${E.timestamp}`,
1078
- displayMode: h,
1079
- onDisplayModeChange: b,
1051
+ children: /* @__PURE__ */ (0, Q.jsx)(F, {
1052
+ toolCallId: `tool-${D.timestamp}`,
1053
+ displayMode: g,
1054
+ onDisplayModeChange: x,
1080
1055
  propsContext: "tool",
1081
- resourceUri: N,
1082
- toolInput: E.args,
1083
- resourceAnnotations: E.toolMeta,
1056
+ resourceUri: P,
1057
+ toolInput: D.args,
1058
+ resourceAnnotations: D.toolMeta,
1084
1059
  llmConfig: null,
1085
1060
  resource: null,
1086
- onPropsChange: S
1061
+ onPropsChange: C
1087
1062
  })
1088
- }), /* @__PURE__ */ (0, Z.jsx)(Ue, {
1089
- serverId: n,
1090
- viewId: `tool-${E.timestamp}`,
1091
- toolName: E.toolName,
1092
- toolInput: k,
1093
- toolOutput: A,
1094
- toolMetadata: E.toolMeta,
1095
- resourceUri: N,
1096
- readResource: j,
1097
- customProps: x || void 0,
1098
- displayMode: h,
1099
- onDisplayModeChange: b,
1100
- onSendFollowUp: M
1101
- }, `mcp-apps-${E.timestamp}`)]
1063
+ }), /* @__PURE__ */ (0, Q.jsx)("div", {
1064
+ className: "flex min-h-0 flex-1 flex-col pt-11",
1065
+ children: /* @__PURE__ */ (0, Q.jsx)(xe, {
1066
+ serverId: n,
1067
+ viewId: `tool-${D.timestamp}`,
1068
+ toolName: D.toolName,
1069
+ toolInput: A,
1070
+ toolOutput: j,
1071
+ toolMetadata: D.toolMeta,
1072
+ resourceUri: P,
1073
+ readResource: M,
1074
+ customProps: S || void 0,
1075
+ displayMode: g,
1076
+ onDisplayModeChange: x,
1077
+ onSendFollowUp: ee,
1078
+ onWidgetHeightChange: c ? (e) => c(e) : void 0,
1079
+ noWrapper: !0
1080
+ }, `mcp-apps-${D.timestamp}`)
1081
+ })]
1102
1082
  });
1103
1083
  case "json":
1104
- if (V && d) {
1105
- let e = E.result?.structuredContent;
1106
- return /* @__PURE__ */ (0, Z.jsxs)("div", {
1084
+ if (U && d) {
1085
+ let e = D.result?.structuredContent;
1086
+ return /* @__PURE__ */ (0, Q.jsxs)("div", {
1107
1087
  className: "px-4 pt-4 space-y-4",
1108
1088
  "data-testid": "tool-execution-results-content",
1109
1089
  children: [
1110
- e && /* @__PURE__ */ (0, Z.jsxs)("div", {
1090
+ e && /* @__PURE__ */ (0, Q.jsxs)("div", {
1111
1091
  className: "space-y-2",
1112
1092
  "data-testid": "tool-execution-results-structured-content",
1113
- children: [/* @__PURE__ */ (0, Z.jsx)("div", {
1093
+ children: [/* @__PURE__ */ (0, Q.jsx)("div", {
1114
1094
  className: "text-xs font-medium text-gray-500 dark:text-gray-400",
1115
1095
  children: "Structured Content"
1116
- }), /* @__PURE__ */ (0, Z.jsx)(H, {
1096
+ }), /* @__PURE__ */ (0, Q.jsx)(V, {
1117
1097
  data: e,
1118
- filename: `structured-content-${E.toolName}-${Date.now()}.json`
1098
+ filename: `structured-content-${D.toolName}-${Date.now()}.json`
1119
1099
  })]
1120
1100
  }),
1121
- I && I.length > 0 && /* @__PURE__ */ (0, Z.jsx)(He, { content: I }),
1122
- !e && (!I || I.length === 0) && /* @__PURE__ */ (0, Z.jsx)("div", {
1101
+ R && R.length > 0 && /* @__PURE__ */ (0, Q.jsx)(Ve, { content: R }),
1102
+ !e && (!R || R.length === 0) && /* @__PURE__ */ (0, Q.jsx)("div", {
1123
1103
  className: "text-sm text-gray-500 dark:text-gray-400",
1124
1104
  "data-testid": "tool-execution-results-no-content",
1125
1105
  children: "No content to display"
@@ -1127,11 +1107,11 @@ function We({ results: e, copiedResult: t, serverId: n, readResource: r, onCopy:
1127
1107
  ]
1128
1108
  });
1129
1109
  }
1130
- return /* @__PURE__ */ (0, Z.jsx)("div", {
1110
+ return /* @__PURE__ */ (0, Q.jsx)("div", {
1131
1111
  className: "px-4 pt-4",
1132
- children: /* @__PURE__ */ (0, Z.jsx)(H, {
1133
- data: E.result,
1134
- filename: `tool-result-${E.toolName}-${Date.now()}.json`
1112
+ children: /* @__PURE__ */ (0, Q.jsx)(V, {
1113
+ data: D.result,
1114
+ filename: `tool-result-${D.toolName}-${Date.now()}.json`
1135
1115
  })
1136
1116
  });
1137
1117
  default: return null;
@@ -1139,46 +1119,46 @@ function We({ results: e, copiedResult: t, serverId: n, readResource: r, onCopy:
1139
1119
  })();
1140
1120
  })()]
1141
1121
  })
1142
- }), z && p === "mcp-apps" && /* @__PURE__ */ (0, Z.jsx)("div", {
1122
+ }), B && m === "mcp-apps" && /* @__PURE__ */ (0, Q.jsx)("div", {
1143
1123
  className: "absolute bottom-0 left-1/2 -translate-x-1/2 z-40 pointer-events-none",
1144
- children: /* @__PURE__ */ (0, Z.jsx)("span", {
1124
+ children: /* @__PURE__ */ (0, Q.jsx)("span", {
1145
1125
  className: "text-[11px] bg-gray-200 dark:bg-zinc-800 text-gray-500 dark:text-gray-400 px-3 py-0.5 rounded-t-xl font-mono max-w-[320px] truncate block",
1146
- children: z
1126
+ children: B
1147
1127
  })
1148
1128
  })]
1149
1129
  });
1150
1130
  }
1151
1131
  //#endregion
1152
1132
  //#region src/client/components/tools/ToolsList.tsx
1153
- function Ge({ tools: e, selectedTool: t, onToolSelect: r, focusedIndex: a }) {
1154
- if (e.length === 0) return /* @__PURE__ */ (0, Z.jsxs)("div", {
1133
+ function Ue({ tools: e, selectedTool: t, onToolSelect: r, focusedIndex: s }) {
1134
+ if (e.length === 0) return /* @__PURE__ */ (0, Q.jsxs)("div", {
1155
1135
  className: "flex flex-1 flex-col items-center justify-center p-4 text-center",
1156
- children: [/* @__PURE__ */ (0, Z.jsx)(de, { className: "h-12 w-12 text-gray-400 dark:text-gray-600 mb-3" }), /* @__PURE__ */ (0, Z.jsx)("p", {
1136
+ children: [/* @__PURE__ */ (0, Q.jsx)(ue, { className: "h-12 w-12 text-gray-400 dark:text-gray-600 mb-3" }), /* @__PURE__ */ (0, Q.jsx)("p", {
1157
1137
  className: "text-gray-500 dark:text-gray-400",
1158
1138
  children: "No tools available"
1159
1139
  })]
1160
1140
  });
1161
- let o = e.some((e) => e.inputSchema?.properties && Object.keys(e.inputSchema.properties).length > 0);
1162
- return /* @__PURE__ */ (0, Z.jsx)("div", { children: e.map((e, l) => {
1163
- let u = e._meta, d = _e(u) ? "mcp-apps" : null, f = e.inputSchema?.properties, p = f ? Object.keys(f).length : 0, m = o && p > 0 && /* @__PURE__ */ (0, Z.jsxs)(n, {
1141
+ let c = e.some((e) => e.inputSchema?.properties && Object.keys(e.inputSchema.properties).length > 0);
1142
+ return /* @__PURE__ */ (0, Q.jsx)("div", { children: e.map((e, l) => {
1143
+ let u = e._meta, d = Y(u) ? "mcp-apps" : null, f = e.inputSchema?.properties, p = f ? Object.keys(f).length : 0, m = c && p > 0 && /* @__PURE__ */ (0, Q.jsxs)(o, {
1164
1144
  variant: "outline",
1165
1145
  className: "text-xs border-gray-300 dark:border-zinc-600 text-gray-600 dark:text-gray-400",
1166
1146
  children: [p, " params"]
1167
- }), h = d === "mcp-apps" || m ? /* @__PURE__ */ (0, Z.jsxs)("div", {
1147
+ }), h = d === "mcp-apps" || m ? /* @__PURE__ */ (0, Q.jsxs)("div", {
1168
1148
  className: "flex items-center gap-1.5",
1169
- children: [d === "mcp-apps" && /* @__PURE__ */ (0, Z.jsxs)(s, { children: [/* @__PURE__ */ (0, Z.jsx)(i, {
1170
- render: /* @__PURE__ */ (0, Z.jsx)("span", {
1149
+ children: [d === "mcp-apps" && /* @__PURE__ */ (0, Q.jsxs)(i, { children: [/* @__PURE__ */ (0, Q.jsx)(n, {
1150
+ render: /* @__PURE__ */ (0, Q.jsx)("span", {
1171
1151
  className: "inline-flex",
1172
- children: /* @__PURE__ */ (0, Z.jsx)(ce, { className: "h-3.5 w-3.5" })
1152
+ children: /* @__PURE__ */ (0, Q.jsx)(se, { className: "h-3.5 w-3.5" })
1173
1153
  }),
1174
1154
  nativeButton: !1
1175
- }), /* @__PURE__ */ (0, Z.jsx)(c, { children: /* @__PURE__ */ (0, Z.jsx)("p", { children: "UI widget" }) })] }), m]
1155
+ }), /* @__PURE__ */ (0, Q.jsx)(a, { children: /* @__PURE__ */ (0, Q.jsx)("p", { children: "UI widget" }) })] }), m]
1176
1156
  }) : void 0;
1177
- return /* @__PURE__ */ (0, Z.jsx)(G, {
1157
+ return /* @__PURE__ */ (0, Q.jsx)(ne, {
1178
1158
  id: `tool-${e.name}`,
1179
1159
  "data-testid": `tool-item-${e.name}`,
1180
1160
  isSelected: t?.name === e.name,
1181
- isFocused: a === l,
1161
+ isFocused: s === l,
1182
1162
  title: e.name,
1183
1163
  description: e.description,
1184
1164
  metadata: h,
@@ -1188,88 +1168,88 @@ function Ge({ tools: e, selectedTool: t, onToolSelect: r, focusedIndex: a }) {
1188
1168
  }
1189
1169
  //#endregion
1190
1170
  //#region ../../node_modules/.pnpm/@base-ui+react@1.6.0_@types+react@19.2.17_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/@base-ui/react/alert-dialog/root/AlertDialogRoot.mjs
1191
- function Ke(e) {
1171
+ function We(e) {
1192
1172
  return A(e, "alert-dialog");
1193
1173
  }
1194
1174
  //#endregion
1195
1175
  //#region src/client/components/ui/alert-dialog.tsx
1196
- function qe({ ...e }) {
1197
- return /* @__PURE__ */ (0, Z.jsx)(Ke, {
1176
+ function Ge({ ...e }) {
1177
+ return /* @__PURE__ */ (0, Q.jsx)(We, {
1198
1178
  "data-slot": "alert-dialog",
1199
1179
  ...e
1200
1180
  });
1201
1181
  }
1202
- function Je({ ...e }) {
1203
- return /* @__PURE__ */ (0, Z.jsx)(D, {
1182
+ function Ke({ ...e }) {
1183
+ return /* @__PURE__ */ (0, Q.jsx)(D, {
1204
1184
  "data-slot": "alert-dialog-portal",
1205
1185
  ...e
1206
1186
  });
1207
1187
  }
1208
- function Ye({ className: e, ...t }) {
1209
- return /* @__PURE__ */ (0, Z.jsx)(N, {
1188
+ function qe({ className: e, ...t }) {
1189
+ return /* @__PURE__ */ (0, Q.jsx)(N, {
1210
1190
  "data-slot": "alert-dialog-overlay",
1211
- className: r("fixed inset-0 isolate z-50 bg-black/50 duration-100 data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0", e),
1191
+ className: u("fixed inset-0 isolate z-50 bg-black/50 duration-100 data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0", e),
1212
1192
  ...t
1213
1193
  });
1214
1194
  }
1215
- function Xe({ className: e, size: t = "default", ...n }) {
1216
- return /* @__PURE__ */ (0, Z.jsxs)(Je, { children: [/* @__PURE__ */ (0, Z.jsx)(Ye, {}), /* @__PURE__ */ (0, Z.jsx)(E, {
1195
+ function Je({ className: e, size: t = "default", ...n }) {
1196
+ return /* @__PURE__ */ (0, Q.jsxs)(Ke, { children: [/* @__PURE__ */ (0, Q.jsx)(qe, {}), /* @__PURE__ */ (0, Q.jsx)(E, {
1217
1197
  "data-slot": "alert-dialog-content",
1218
1198
  "data-size": t,
1219
- className: r("group/alert-dialog-content fixed top-1/2 left-1/2 z-50 grid w-full -translate-x-1/2 -translate-y-1/2 gap-6 rounded-xl bg-popover p-6 text-popover-foreground ring-1 ring-foreground/10 duration-100 outline-none data-[size=default]:max-w-xs data-[size=sm]:max-w-xs data-[size=default]:sm:max-w-lg data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95", e),
1199
+ className: u("group/alert-dialog-content fixed top-1/2 left-1/2 z-50 grid w-full -translate-x-1/2 -translate-y-1/2 gap-6 rounded-xl bg-popover p-6 text-popover-foreground ring-1 ring-foreground/10 duration-100 outline-none data-[size=default]:max-w-xs data-[size=sm]:max-w-xs data-[size=default]:sm:max-w-lg data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95", e),
1220
1200
  ...n
1221
1201
  })] });
1222
1202
  }
1223
- function Ze({ className: e, ...t }) {
1224
- return /* @__PURE__ */ (0, Z.jsx)("div", {
1203
+ function Ye({ className: e, ...t }) {
1204
+ return /* @__PURE__ */ (0, Q.jsx)("div", {
1225
1205
  "data-slot": "alert-dialog-header",
1226
- className: r("grid grid-rows-[auto_1fr] place-items-center gap-1.5 text-center has-data-[slot=alert-dialog-media]:grid-rows-[auto_auto_1fr] has-data-[slot=alert-dialog-media]:gap-x-6 sm:group-data-[size=default]/alert-dialog-content:place-items-start sm:group-data-[size=default]/alert-dialog-content:text-left sm:group-data-[size=default]/alert-dialog-content:has-data-[slot=alert-dialog-media]:grid-rows-[auto_1fr]", e),
1206
+ className: u("grid grid-rows-[auto_1fr] place-items-center gap-1.5 text-center has-data-[slot=alert-dialog-media]:grid-rows-[auto_auto_1fr] has-data-[slot=alert-dialog-media]:gap-x-6 sm:group-data-[size=default]/alert-dialog-content:place-items-start sm:group-data-[size=default]/alert-dialog-content:text-left sm:group-data-[size=default]/alert-dialog-content:has-data-[slot=alert-dialog-media]:grid-rows-[auto_1fr]", e),
1227
1207
  ...t
1228
1208
  });
1229
1209
  }
1230
- function Qe({ className: e, ...t }) {
1231
- return /* @__PURE__ */ (0, Z.jsx)("div", {
1210
+ function Xe({ className: e, ...t }) {
1211
+ return /* @__PURE__ */ (0, Q.jsx)("div", {
1232
1212
  "data-slot": "alert-dialog-footer",
1233
- className: r("flex flex-col-reverse gap-2 group-data-[size=sm]/alert-dialog-content:grid group-data-[size=sm]/alert-dialog-content:grid-cols-2 sm:flex-row sm:justify-end", e),
1213
+ className: u("flex flex-col-reverse gap-2 group-data-[size=sm]/alert-dialog-content:grid group-data-[size=sm]/alert-dialog-content:grid-cols-2 sm:flex-row sm:justify-end", e),
1234
1214
  ...t
1235
1215
  });
1236
1216
  }
1237
- function $e({ className: e, ...t }) {
1238
- return /* @__PURE__ */ (0, Z.jsx)(w, {
1217
+ function Ze({ className: e, ...t }) {
1218
+ return /* @__PURE__ */ (0, Q.jsx)(w, {
1239
1219
  "data-slot": "alert-dialog-title",
1240
- className: r("text-lg font-medium sm:group-data-[size=default]/alert-dialog-content:group-has-data-[slot=alert-dialog-media]/alert-dialog-content:col-start-2", e),
1220
+ className: u("text-lg font-medium sm:group-data-[size=default]/alert-dialog-content:group-has-data-[slot=alert-dialog-media]/alert-dialog-content:col-start-2", e),
1241
1221
  ...t
1242
1222
  });
1243
1223
  }
1244
- function et({ className: e, ...t }) {
1245
- return /* @__PURE__ */ (0, Z.jsx)(T, {
1224
+ function Qe({ className: e, ...t }) {
1225
+ return /* @__PURE__ */ (0, Q.jsx)(T, {
1246
1226
  "data-slot": "alert-dialog-description",
1247
- className: r("text-sm text-balance text-muted-foreground md:text-pretty *:[a]:underline *:[a]:underline-offset-3 *:[a]:hover:text-foreground", e),
1227
+ className: u("text-sm text-balance text-muted-foreground md:text-pretty *:[a]:underline *:[a]:underline-offset-3 *:[a]:hover:text-foreground", e),
1248
1228
  ...t
1249
1229
  });
1250
1230
  }
1251
- function tt({ className: e, ...t }) {
1252
- return /* @__PURE__ */ (0, Z.jsx)(l, {
1231
+ function $e({ className: e, ...t }) {
1232
+ return /* @__PURE__ */ (0, Q.jsx)(p, {
1253
1233
  "data-slot": "alert-dialog-action",
1254
- className: r(e),
1234
+ className: u(e),
1255
1235
  ...t
1256
1236
  });
1257
1237
  }
1258
- function nt({ className: e, variant: t = "outline", size: n = "default", ...i }) {
1259
- return /* @__PURE__ */ (0, Z.jsx)(S, {
1238
+ function et({ className: e, variant: t = "outline", size: n = "default", ...r }) {
1239
+ return /* @__PURE__ */ (0, Q.jsx)(S, {
1260
1240
  "data-slot": "alert-dialog-cancel",
1261
- className: r(e),
1262
- render: /* @__PURE__ */ (0, Z.jsx)(l, {
1241
+ className: u(e),
1242
+ render: /* @__PURE__ */ (0, Q.jsx)(p, {
1263
1243
  variant: t,
1264
1244
  size: n
1265
1245
  }),
1266
- ...i
1246
+ ...r
1267
1247
  });
1268
1248
  }
1269
1249
  //#endregion
1270
1250
  //#region src/client/components/tools/useToolExecution.ts
1271
- function rt({ selectedTool: e, payloadToSend: t, toolArgs: n, callTool: r, readResource: i, serverId: a }) {
1272
- let [o, s] = (0, X.useState)([]), [c, l] = (0, X.useState)(!1), [u, d] = (0, X.useState)(null), [f, p] = (0, X.useState)(null), m = (0, X.useCallback)(async () => {
1251
+ function tt({ selectedTool: e, payloadToSend: t, toolArgs: n, callTool: r, readResource: i, serverId: a }) {
1252
+ let [o, s] = (0, Z.useState)([]), [c, l] = (0, Z.useState)(!1), [u, d] = (0, Z.useState)(null), [f, p] = (0, Z.useState)(null), m = (0, Z.useCallback)(async () => {
1273
1253
  if (!e || c) return;
1274
1254
  let o = new AbortController();
1275
1255
  p(o), l(!0);
@@ -1294,7 +1274,7 @@ function rt({ selectedTool: e, payloadToSend: t, toolArgs: n, callTool: r, readR
1294
1274
  resetTimeoutOnProgress: !0,
1295
1275
  signal: o.signal
1296
1276
  }), p = Date.now() - u, m = f?._meta ?? l;
1297
- he(new me({
1277
+ me(new J({
1298
1278
  toolName: e.name,
1299
1279
  serverId: a,
1300
1280
  success: !0,
@@ -1314,7 +1294,7 @@ function rt({ selectedTool: e, payloadToSend: t, toolArgs: n, callTool: r, readR
1314
1294
  }, ...t]);
1315
1295
  } catch (t) {
1316
1296
  let r = Date.now() - u;
1317
- he(new me({
1297
+ me(new J({
1318
1298
  toolName: e.name,
1319
1299
  serverId: a,
1320
1300
  success: !1,
@@ -1342,15 +1322,15 @@ function rt({ selectedTool: e, payloadToSend: t, toolArgs: n, callTool: r, readR
1342
1322
  r,
1343
1323
  i,
1344
1324
  a
1345
- ]), h = (0, X.useCallback)(async (e, t) => {
1325
+ ]), h = (0, Z.useCallback)(async (e, t) => {
1346
1326
  try {
1347
- await z(t), d(e), setTimeout(() => d(null), 2e3);
1327
+ await L(t), d(e), setTimeout(() => d(null), 2e3);
1348
1328
  } catch (e) {
1349
1329
  console.error("[ToolsTab] Failed to copy result:", e);
1350
1330
  }
1351
- }, []), g = (0, X.useCallback)((e) => {
1331
+ }, []), g = (0, Z.useCallback)((e) => {
1352
1332
  s((t) => t.filter((t, n) => n !== e));
1353
- }, []), _ = (0, X.useMemo)(() => e ? o.filter((t) => t.toolName === e.name) : [], [o, e]);
1333
+ }, []), _ = (0, Z.useMemo)(() => e ? o.filter((t) => t.toolName === e.name) : [], [o, e]);
1354
1334
  return {
1355
1335
  results: o,
1356
1336
  setResults: s,
@@ -1359,7 +1339,7 @@ function rt({ selectedTool: e, payloadToSend: t, toolArgs: n, callTool: r, readR
1359
1339
  executeTool: m,
1360
1340
  handleCopyResult: h,
1361
1341
  handleDeleteResult: g,
1362
- handleFullscreen: (0, X.useCallback)((e) => {
1342
+ handleFullscreen: (0, Z.useCallback)((e) => {
1363
1343
  let t = _[e];
1364
1344
  if (!t) return;
1365
1345
  let n = window.open("", "_blank", "width=800,height=600");
@@ -1371,39 +1351,41 @@ function rt({ selectedTool: e, payloadToSend: t, toolArgs: n, callTool: r, readR
1371
1351
  `), n.document.close());
1372
1352
  }, [_]),
1373
1353
  filteredResults: _,
1374
- cancelExecution: (0, X.useCallback)(() => {
1354
+ cancelExecution: (0, Z.useCallback)(() => {
1375
1355
  f?.abort(), p(null), l(!1);
1376
1356
  }, [f])
1377
1357
  };
1378
1358
  }
1379
1359
  //#endregion
1380
1360
  //#region src/client/components/tools/useToolsTabNavigation.ts
1381
- function it({ ref: e, activeTab: t, filteredTools: n, savedRequests: r, searchQuery: i, setSearchQuery: a, selectedTool: o, results: s, isExecuting: c, handleToolSelect: l, loadSavedRequest: u, refreshTools: d, selectedToolName: f, tools: p, setSelectedToolName: m }) {
1382
- let [h, g] = (0, X.useState)(!1), [_, v] = (0, X.useState)(-1), y = (0, X.useRef)(null), [b, x] = (0, X.useState)(!1), [S, C] = (0, X.useState)("list"), [w, T] = (0, X.useState)(!1);
1383
- (0, X.useEffect)(() => {
1361
+ function nt({ ref: e, activeTab: t, filteredTools: n, savedRequests: r, searchQuery: i, setSearchQuery: a, selectedTool: o, results: s, isExecuting: c, handleToolSelect: l, loadSavedRequest: u, refreshTools: d, selectedToolName: f, tools: p, setSelectedToolName: m }) {
1362
+ let [h, g] = (0, Z.useState)(!1), [_, v] = (0, Z.useState)(-1), y = (0, Z.useRef)(null), [b, x] = (0, Z.useState)(!1), [S, C] = (0, Z.useState)("list"), [w, T] = (0, Z.useState)(!1);
1363
+ (0, Z.useEffect)(() => {
1384
1364
  let e = () => x(window.innerWidth < 1024);
1385
1365
  return e(), window.addEventListener("resize", e), () => window.removeEventListener("resize", e);
1386
- }, []), (0, X.useEffect)(() => {
1366
+ }, []), (0, Z.useEffect)(() => {
1387
1367
  C(o ? "detail" : "list");
1388
- }, [o]), (0, X.useEffect)(() => {
1389
- b && s.length > 0 && !c && C("response");
1368
+ }, [o]), (0, Z.useEffect)(() => {
1369
+ if (!b || s.length === 0) return;
1370
+ let e = s[0];
1371
+ (!c || e?.result === null) && C("response");
1390
1372
  }, [
1391
1373
  s,
1392
1374
  c,
1393
1375
  b
1394
- ]), (0, X.useImperativeHandle)(e, () => ({
1376
+ ]), (0, Z.useImperativeHandle)(e, () => ({
1395
1377
  focusSearch: () => {
1396
1378
  g(!0), setTimeout(() => y.current?.focus(), 0);
1397
1379
  },
1398
1380
  blurSearch: () => {
1399
1381
  a(""), g(!1), y.current?.blur();
1400
1382
  }
1401
- })), (0, X.useEffect)(() => {
1383
+ })), (0, Z.useEffect)(() => {
1402
1384
  h && y.current?.focus();
1403
1385
  }, [h]);
1404
- let E = (0, X.useCallback)(() => {
1386
+ let E = (0, Z.useCallback)(() => {
1405
1387
  i.trim() || g(!1);
1406
- }, [i]), D = (0, X.useCallback)(async () => {
1388
+ }, [i]), D = (0, Z.useCallback)(async () => {
1407
1389
  if (d) {
1408
1390
  T(!0);
1409
1391
  try {
@@ -1413,11 +1395,11 @@ function it({ ref: e, activeTab: t, filteredTools: n, savedRequests: r, searchQu
1413
1395
  }
1414
1396
  }
1415
1397
  }, [d]);
1416
- return (0, X.useEffect)(() => {
1398
+ return (0, Z.useEffect)(() => {
1417
1399
  t !== "tools" && g(!1);
1418
- }, [t]), (0, X.useEffect)(() => {
1400
+ }, [t]), (0, Z.useEffect)(() => {
1419
1401
  v(-1);
1420
- }, [i, t]), (0, X.useEffect)(() => {
1402
+ }, [i, t]), (0, Z.useEffect)(() => {
1421
1403
  let e = (e) => {
1422
1404
  let i = e.target;
1423
1405
  if (i.tagName === "INPUT" || i.tagName === "TEXTAREA" || i.contentEditable === "true" || e.metaKey || e.ctrlKey || e.altKey) return;
@@ -1440,7 +1422,7 @@ function it({ ref: e, activeTab: t, filteredTools: n, savedRequests: r, searchQu
1440
1422
  t,
1441
1423
  l,
1442
1424
  u
1443
- ]), (0, X.useEffect)(() => {
1425
+ ]), (0, Z.useEffect)(() => {
1444
1426
  if (_ >= 0) {
1445
1427
  let e = t === "tools" ? `tool-${n[_]?.name}` : `saved-${r[_]?.id}`;
1446
1428
  document.getElementById(e)?.scrollIntoView({
@@ -1453,7 +1435,7 @@ function it({ ref: e, activeTab: t, filteredTools: n, savedRequests: r, searchQu
1453
1435
  n,
1454
1436
  r,
1455
1437
  t
1456
- ]), (0, X.useEffect)(() => {
1438
+ ]), (0, Z.useEffect)(() => {
1457
1439
  if (!f || p.length === 0) return;
1458
1440
  let e = p.find((e) => e.name === f);
1459
1441
  if (e) {
@@ -1486,45 +1468,46 @@ function it({ ref: e, activeTab: t, filteredTools: n, savedRequests: r, searchQu
1486
1468
  }
1487
1469
  //#endregion
1488
1470
  //#region src/client/components/ToolsTab.tsx
1489
- function at({ ref: e, tools: t, callTool: n, readResource: r, serverId: i, isConnected: a, refreshTools: s }) {
1490
- let [c, u] = (0, X.useState)(null), [d, f] = (0, X.useState)(null), { selectedToolName: p, setSelectedToolName: h } = xe(), [g, _] = (0, X.useState)({}), [v, y] = (0, X.useState)(/* @__PURE__ */ new Set()), [b, x] = (0, X.useState)(/* @__PURE__ */ new Set()), [S, C] = (0, X.useState)(""), [w, T] = (0, X.useState)("tools"), { savedRequests: E, saveSavedRequests: D } = le(), [O, k] = (0, X.useState)(!1), [A, j] = (0, X.useState)(""), [M, ee] = (0, X.useState)(!1), [N, P] = (0, X.useState)({
1471
+ var rt = 200, it = 140;
1472
+ function at({ ref: e, tools: t, callTool: n, readResource: i, serverId: a, isConnected: o, refreshTools: s }) {
1473
+ let [c, l] = (0, Z.useState)(null), [u, d] = (0, Z.useState)(null), { selectedToolName: f, setSelectedToolName: m } = ve(), [g, _] = (0, Z.useState)({}), [v, y] = (0, Z.useState)(/* @__PURE__ */ new Set()), [b, x] = (0, Z.useState)(/* @__PURE__ */ new Set()), [S, C] = (0, Z.useState)(""), [w, T] = (0, Z.useState)("tools"), { savedRequests: E, saveSavedRequests: D } = ce(), [O, k] = (0, Z.useState)(!1), [A, j] = (0, Z.useState)(""), [M, ee] = (0, Z.useState)(!1), [N, F] = (0, Z.useState)({
1491
1474
  open: !1,
1492
1475
  parsedObject: {},
1493
1476
  fieldsToUpdate: [],
1494
1477
  newFields: [],
1495
1478
  resolve: null
1496
- }), [I, L] = (0, X.useState)(/* @__PURE__ */ new Set()), R = ie(), z = ie(), te = (0, X.useCallback)(() => {
1497
- M ? (R.current && R.current.expand(), z.current && z.current.expand(), ee(!1)) : (R.current && R.current.collapse(), z.current && z.current.collapse(), ee(!0));
1479
+ }), [te, I] = (0, Z.useState)(/* @__PURE__ */ new Set()), L = re(), z = re(), B = re(), V = (0, Z.useRef)(null), ne = (0, Z.useRef)(!1), ie = (0, Z.useRef)(!1), ae = (0, Z.useRef)(!0), oe = (0, Z.useCallback)(() => {
1480
+ M ? (L.current && L.current.expand(), z.current && z.current.expand(), ee(!1)) : (L.current && L.current.collapse(), z.current && z.current.collapse(), ee(!0));
1498
1481
  }, [
1499
1482
  M,
1500
- R,
1483
+ L,
1501
1484
  z
1502
- ]), V = (0, X.useMemo)(() => {
1485
+ ]), K = (0, Z.useMemo)(() => {
1503
1486
  if (!S.trim()) return t;
1504
1487
  let e = S.toLowerCase();
1505
1488
  return t.filter((t) => t.name.toLowerCase().includes(e) || t.description?.toLowerCase().includes(e));
1506
- }, [t, S]), H = (0, X.useCallback)((e) => {
1507
- u(e);
1489
+ }, [t, S]), se = (0, Z.useCallback)((e) => {
1490
+ l(e);
1508
1491
  let t = {}, n = /* @__PURE__ */ new Set();
1509
1492
  e.inputSchema?.properties && Object.entries(e.inputSchema.properties).forEach(([e, r]) => {
1510
1493
  let i = r;
1511
1494
  i.default !== void 0 && (t[e] = i.default, n.add(e));
1512
1495
  }), _(t), y(n), x(/* @__PURE__ */ new Set());
1513
- }, []), G = (0, X.useCallback)((e) => {
1496
+ }, []), le = (0, Z.useCallback)((e) => {
1514
1497
  let n = t.find((t) => t.name === e.toolName);
1515
- n && (u(n), _(e.args), y(new Set(Object.keys(e.args))), x(/* @__PURE__ */ new Set()), f(e));
1498
+ n && (l(n), _(e.args), y(new Set(Object.keys(e.args))), x(/* @__PURE__ */ new Set()), d(e));
1516
1499
  }, [t]);
1517
- (0, X.useEffect)(() => {
1500
+ (0, Z.useEffect)(() => {
1518
1501
  if (c) {
1519
1502
  let e = t.find((e) => e.name === c.name);
1520
- e ? e !== c && (JSON.stringify(e.inputSchema) !== JSON.stringify(c.inputSchema) || e.description !== c.description || JSON.stringify(e?._meta) !== JSON.stringify(c?._meta)) && u(e) : (u(null), h(null));
1503
+ e ? e !== c && (JSON.stringify(e.inputSchema) !== JSON.stringify(c.inputSchema) || e.description !== c.description || JSON.stringify(e?._meta) !== JSON.stringify(c?._meta)) && l(e) : (l(null), m(null));
1521
1504
  }
1522
1505
  }, [
1523
1506
  t,
1524
1507
  c,
1525
- h
1508
+ m
1526
1509
  ]);
1527
- let K = (0, X.useCallback)((e, t) => {
1510
+ let q = (0, Z.useCallback)((e, t) => {
1528
1511
  let n = c?.inputSchema || {}, r = c?.inputSchema?.properties?.[e], i = r ? ke(r, n) : "string", a;
1529
1512
  a = i === "object" || i === "array" || i === "string" ? t : Me(t, i), _((t) => ({
1530
1513
  ...t,
@@ -1538,7 +1521,7 @@ function at({ ref: e, tools: t, callTool: n, readResource: r, serverId: i, isCon
1538
1521
  let n = new Set(t);
1539
1522
  return n.delete(e), n;
1540
1523
  });
1541
- }, [c]), ae = (0, X.useCallback)((e, t, n) => {
1524
+ }, [c]), de = (0, Z.useCallback)((e, t, n) => {
1542
1525
  if (n) {
1543
1526
  let n = t === "array" ? "[]" : t === "object" ? "{}" : "";
1544
1527
  _((t) => ({
@@ -1552,7 +1535,7 @@ function at({ ref: e, tools: t, callTool: n, readResource: r, serverId: i, isCon
1552
1535
  let n = new Set(t);
1553
1536
  return n.delete(e), n;
1554
1537
  });
1555
- }, []), oe = (0, X.useCallback)(async (e, t) => {
1538
+ }, []), fe = (0, Z.useCallback)(async (e, t) => {
1556
1539
  if (!c) return !1;
1557
1540
  let n = Fe(e);
1558
1541
  if (!n) return !1;
@@ -1566,10 +1549,10 @@ function at({ ref: e, tools: t, callTool: n, readResource: r, serverId: i, isCon
1566
1549
  key: e,
1567
1550
  oldValue: l,
1568
1551
  newValue: c
1569
- }) : (s.push(e), K(e, String(c)));
1552
+ }) : (s.push(e), q(e, String(c)));
1570
1553
  }
1571
- }), o.length === 0 && s.length === 0 ? !1 : o.length === 0 ? (L(new Set(s)), setTimeout(() => L(/* @__PURE__ */ new Set()), 2e3), !0) : new Promise((e) => {
1572
- P({
1554
+ }), o.length === 0 && s.length === 0 ? !1 : o.length === 0 ? (I(new Set(s)), setTimeout(() => I(/* @__PURE__ */ new Set()), 2e3), !0) : new Promise((e) => {
1555
+ F({
1573
1556
  open: !0,
1574
1557
  parsedObject: n,
1575
1558
  fieldsToUpdate: o,
@@ -1580,29 +1563,29 @@ function at({ ref: e, tools: t, callTool: n, readResource: r, serverId: i, isCon
1580
1563
  }, [
1581
1564
  c,
1582
1565
  g,
1583
- K
1584
- ]), se = (0, X.useCallback)(() => {
1566
+ q
1567
+ ]), pe = (0, Z.useCallback)(() => {
1585
1568
  if (!N.resolve) return;
1586
1569
  N.fieldsToUpdate.forEach(({ key: e, newValue: t }) => {
1587
- K(e, String(t));
1570
+ q(e, String(t));
1588
1571
  });
1589
1572
  let e = [...N.fieldsToUpdate.map((e) => e.key), ...N.newFields];
1590
- L(new Set(e)), setTimeout(() => L(/* @__PURE__ */ new Set()), 2e3), N.resolve(!0), P({
1573
+ I(new Set(e)), setTimeout(() => I(/* @__PURE__ */ new Set()), 2e3), N.resolve(!0), F({
1591
1574
  open: !1,
1592
1575
  parsedObject: {},
1593
1576
  fieldsToUpdate: [],
1594
1577
  newFields: [],
1595
1578
  resolve: null
1596
1579
  });
1597
- }, [N, K]), ce = (0, X.useCallback)(() => {
1598
- N.resolve && (N.resolve(!1), P({
1580
+ }, [N, q]), J = (0, Z.useCallback)(() => {
1581
+ N.resolve && (N.resolve(!1), F({
1599
1582
  open: !1,
1600
1583
  parsedObject: {},
1601
1584
  fieldsToUpdate: [],
1602
1585
  newFields: [],
1603
1586
  resolve: null
1604
1587
  }));
1605
- }, [N]), q = (0, X.useMemo)(() => {
1588
+ }, [N]), Y = (0, Z.useMemo)(() => {
1606
1589
  if (!c?.inputSchema?.properties) return {};
1607
1590
  let e = c.inputSchema || {}, t = {};
1608
1591
  for (let n of v) {
@@ -1617,110 +1600,132 @@ function at({ ref: e, tools: t, callTool: n, readResource: r, serverId: i, isCon
1617
1600
  g,
1618
1601
  v,
1619
1602
  b
1620
- ]), { isExecuting: ue, copiedResult: fe, executeTool: J, handleCopyResult: pe, handleDeleteResult: me, handleFullscreen: _e, filteredResults: ve, cancelExecution: ye, results: be } = rt({
1603
+ ]), { isExecuting: ge, copiedResult: _e, executeTool: X, handleCopyResult: ye, handleDeleteResult: be, handleFullscreen: xe, filteredResults: Ce, cancelExecution: Ee, results: De } = tt({
1621
1604
  selectedTool: c,
1622
- payloadToSend: q,
1605
+ payloadToSend: Y,
1623
1606
  toolArgs: g,
1624
1607
  callTool: n,
1625
- readResource: r,
1626
- serverId: i
1627
- }), { isSearchExpanded: Y, setIsSearchExpanded: Se, focusedIndex: Ce, searchInputRef: Te, isMobile: Oe, mobileView: Q, setMobileView: $, isRefreshing: Ae, handleSearchBlur: je, handleRefresh: Pe } = it({
1608
+ readResource: i,
1609
+ serverId: a
1610
+ }), Oe = Ce[0]?.timestamp;
1611
+ (0, Z.useEffect)(() => {
1612
+ ne.current = !1, ae.current = !0;
1613
+ let e = requestAnimationFrame(() => {
1614
+ ae.current = !1;
1615
+ });
1616
+ return () => cancelAnimationFrame(e);
1617
+ }, [Oe]);
1618
+ let Ae = (0, Z.useCallback)(() => {
1619
+ ie.current || ae.current || (ne.current = !0);
1620
+ }, []), je = (0, Z.useCallback)((e) => {
1621
+ if (e === null || M || ne.current) return;
1622
+ let t = B.current, n = V.current;
1623
+ if (!t || !n) return;
1624
+ let r = n.offsetHeight;
1625
+ if (r <= 0) return;
1626
+ let i = t.getSize().inPixels, a = e + it, o = r - rt;
1627
+ if (a <= i || o <= i) return;
1628
+ let s = Math.min(a, o);
1629
+ s <= i || (ie.current = !0, t.resize(s), requestAnimationFrame(() => {
1630
+ ie.current = !1;
1631
+ }));
1632
+ }, [M, B]), { isSearchExpanded: Pe, setIsSearchExpanded: Ie, focusedIndex: Re, searchInputRef: ze, isMobile: Be, mobileView: $, setMobileView: Ve, isRefreshing: We, handleSearchBlur: Ke, handleRefresh: qe } = nt({
1628
1633
  ref: e,
1629
1634
  activeTab: w,
1630
- filteredTools: V,
1635
+ filteredTools: K,
1631
1636
  savedRequests: E,
1632
1637
  searchQuery: S,
1633
1638
  setSearchQuery: C,
1634
1639
  selectedTool: c,
1635
- results: be,
1636
- isExecuting: ue,
1637
- handleToolSelect: H,
1638
- loadSavedRequest: G,
1640
+ results: De,
1641
+ isExecuting: ge,
1642
+ handleToolSelect: se,
1643
+ loadSavedRequest: le,
1639
1644
  refreshTools: s,
1640
- selectedToolName: p,
1645
+ selectedToolName: f,
1641
1646
  tools: t,
1642
- setSelectedToolName: h
1643
- }), Ie = (0, X.useCallback)(() => {
1647
+ setSelectedToolName: m
1648
+ }), at = (0, Z.useCallback)(() => {
1644
1649
  c && (j(""), k(!0));
1645
- }, [c]), Re = (0, X.useCallback)(() => {
1650
+ }, [c]), ot = (0, Z.useCallback)(() => {
1646
1651
  if (!c) return;
1647
1652
  let e = {
1648
1653
  id: `${Date.now()}-${Math.random()}`,
1649
1654
  name: A.trim() || `${c.name} - ${(/* @__PURE__ */ new Date()).toLocaleString()}`,
1650
1655
  toolName: c.name,
1651
- args: q,
1656
+ args: Y,
1652
1657
  savedAt: Date.now(),
1653
1658
  serverId: c._serverId,
1654
1659
  serverName: c._serverName
1655
1660
  };
1656
- D([...E, e]), he(new ge({
1661
+ D([...E, e]), me(new he({
1657
1662
  toolName: c.name,
1658
- serverId: i
1663
+ serverId: a
1659
1664
  })).catch(() => {}), k(!1), j("");
1660
1665
  }, [
1661
1666
  c,
1662
1667
  A,
1663
- q,
1668
+ Y,
1664
1669
  E,
1665
1670
  D,
1666
- i
1667
- ]), ze = (0, X.useCallback)((e) => {
1668
- D(E.filter((t) => t.id !== e)), d?.id === e && f(null);
1671
+ a
1672
+ ]), st = (0, Z.useCallback)((e) => {
1673
+ D(E.filter((t) => t.id !== e)), u?.id === e && d(null);
1669
1674
  }, [
1670
1675
  E,
1671
1676
  D,
1672
- d
1677
+ u
1673
1678
  ]);
1674
- return Oe ? /* @__PURE__ */ (0, Z.jsxs)("div", {
1679
+ return Be ? /* @__PURE__ */ (0, Q.jsxs)("div", {
1675
1680
  className: "h-full flex flex-col overflow-hidden relative bg-background",
1676
1681
  children: [
1677
- Q !== "list" && /* @__PURE__ */ (0, Z.jsxs)("div", {
1682
+ $ !== "list" && /* @__PURE__ */ (0, Q.jsxs)("div", {
1678
1683
  className: "flex items-center gap-2 p-2 border-b shrink-0 bg-background z-10",
1679
- children: [/* @__PURE__ */ (0, Z.jsx)(l, {
1684
+ children: [/* @__PURE__ */ (0, Q.jsx)(p, {
1680
1685
  variant: "ghost",
1681
1686
  size: "sm",
1682
1687
  onClick: () => {
1683
- Q === "response" ? $("detail") : (u(null), $("list"));
1688
+ $ === "response" ? Ve("detail") : (l(null), Ve("list"));
1684
1689
  },
1685
1690
  className: "p-0 h-8 w-8",
1686
- children: /* @__PURE__ */ (0, Z.jsx)(B, { className: "h-4 w-4" })
1687
- }), /* @__PURE__ */ (0, Z.jsxs)("div", {
1691
+ children: /* @__PURE__ */ (0, Q.jsx)(R, { className: "h-4 w-4" })
1692
+ }), /* @__PURE__ */ (0, Q.jsxs)("div", {
1688
1693
  className: "flex items-center text-sm font-medium",
1689
1694
  children: [
1690
- /* @__PURE__ */ (0, Z.jsx)("button", {
1695
+ /* @__PURE__ */ (0, Q.jsx)("button", {
1691
1696
  onClick: () => {
1692
- u(null), $("list");
1697
+ l(null), Ve("list");
1693
1698
  },
1694
1699
  className: "text-muted-foreground hover:text-foreground hover:underline cursor-pointer",
1695
1700
  children: "Tools"
1696
1701
  }),
1697
- Q === "detail" && /* @__PURE__ */ (0, Z.jsxs)(Z.Fragment, { children: [/* @__PURE__ */ (0, Z.jsx)("span", {
1702
+ $ === "detail" && /* @__PURE__ */ (0, Q.jsxs)(Q.Fragment, { children: [/* @__PURE__ */ (0, Q.jsx)("span", {
1698
1703
  className: "mx-2 text-muted-foreground",
1699
1704
  children: "/"
1700
- }), /* @__PURE__ */ (0, Z.jsx)("button", {
1705
+ }), /* @__PURE__ */ (0, Q.jsx)("button", {
1701
1706
  onClick: () => {
1702
- $("response");
1707
+ Ve("response");
1703
1708
  },
1704
- className: Q === "detail" ? "text-foreground hover:underline" : Q === "response" ? "text-muted-foreground hover:text-foreground hover:underline cursor-pointer" : "text-muted-foreground",
1709
+ className: $ === "detail" ? "text-foreground hover:underline" : $ === "response" ? "text-muted-foreground hover:text-foreground hover:underline cursor-pointer" : "text-muted-foreground",
1705
1710
  children: "Execute"
1706
1711
  })] }),
1707
- Q === "response" && /* @__PURE__ */ (0, Z.jsxs)(Z.Fragment, { children: [/* @__PURE__ */ (0, Z.jsx)("span", {
1712
+ $ === "response" && /* @__PURE__ */ (0, Q.jsxs)(Q.Fragment, { children: [/* @__PURE__ */ (0, Q.jsx)("span", {
1708
1713
  className: "mx-2 text-muted-foreground",
1709
1714
  children: "/"
1710
- }), /* @__PURE__ */ (0, Z.jsx)("span", {
1715
+ }), /* @__PURE__ */ (0, Q.jsx)("span", {
1711
1716
  className: "text-foreground",
1712
1717
  children: "Response"
1713
1718
  })] })
1714
1719
  ]
1715
1720
  })]
1716
1721
  }),
1717
- /* @__PURE__ */ (0, Z.jsx)("div", {
1722
+ /* @__PURE__ */ (0, Q.jsx)("div", {
1718
1723
  className: "flex-1 relative overflow-hidden",
1719
- children: /* @__PURE__ */ (0, Z.jsxs)(m, {
1724
+ children: /* @__PURE__ */ (0, Q.jsxs)(h, {
1720
1725
  initial: !1,
1721
1726
  mode: "popLayout",
1722
1727
  children: [
1723
- Q === "list" && /* @__PURE__ */ (0, Z.jsx)(o.div, {
1728
+ $ === "list" && /* @__PURE__ */ (0, Q.jsx)(r.div, {
1724
1729
  initial: { x: "-100%" },
1725
1730
  animate: { x: 0 },
1726
1731
  exit: { x: "-100%" },
@@ -1730,41 +1735,41 @@ function at({ ref: e, tools: t, callTool: n, readResource: r, serverId: i, isCon
1730
1735
  damping: 30
1731
1736
  },
1732
1737
  className: "absolute inset-0 flex flex-col bg-background z-0",
1733
- children: /* @__PURE__ */ (0, Z.jsx)(W, { children: (e) => /* @__PURE__ */ (0, Z.jsxs)(Z.Fragment, { children: [/* @__PURE__ */ (0, Z.jsx)(we, {
1738
+ children: /* @__PURE__ */ (0, Q.jsx)(W, { children: (e) => /* @__PURE__ */ (0, Q.jsxs)(Q.Fragment, { children: [/* @__PURE__ */ (0, Q.jsx)(Se, {
1734
1739
  isScrolled: e,
1735
1740
  activeTab: w,
1736
- isSearchExpanded: Y,
1741
+ isSearchExpanded: Pe,
1737
1742
  searchQuery: S,
1738
1743
  primaryTabName: "tools",
1739
1744
  secondaryTabName: "saved",
1740
1745
  primaryTabTitle: "Tools",
1741
1746
  secondaryTabTitle: "Saved",
1742
- primaryCount: V.length,
1747
+ primaryCount: K.length,
1743
1748
  secondaryCount: E.length,
1744
- primaryIcon: de,
1745
- secondaryIcon: F,
1749
+ primaryIcon: ue,
1750
+ secondaryIcon: P,
1746
1751
  searchPlaceholder: "Search tools...",
1747
- onSearchExpand: () => Se(!0),
1752
+ onSearchExpand: () => Ie(!0),
1748
1753
  onSearchChange: C,
1749
- onSearchBlur: je,
1754
+ onSearchBlur: Ke,
1750
1755
  onTabSwitch: () => T(w === "tools" ? "saved" : "tools"),
1751
- searchInputRef: Te,
1752
- onRefresh: s ? Pe : void 0,
1753
- isRefreshing: Ae
1754
- }), w === "tools" ? /* @__PURE__ */ (0, Z.jsx)(Ge, {
1755
- tools: V,
1756
+ searchInputRef: ze,
1757
+ onRefresh: s ? qe : void 0,
1758
+ isRefreshing: We
1759
+ }), w === "tools" ? /* @__PURE__ */ (0, Q.jsx)(Ue, {
1760
+ tools: K,
1756
1761
  selectedTool: c,
1757
- onToolSelect: H,
1758
- focusedIndex: Ce
1759
- }) : /* @__PURE__ */ (0, Z.jsx)(Ee, {
1762
+ onToolSelect: se,
1763
+ focusedIndex: Re
1764
+ }) : /* @__PURE__ */ (0, Q.jsx)(we, {
1760
1765
  savedRequests: E,
1761
- selectedRequest: d,
1762
- onLoadRequest: G,
1763
- onDeleteRequest: ze,
1764
- focusedIndex: Ce
1766
+ selectedRequest: u,
1767
+ onLoadRequest: le,
1768
+ onDeleteRequest: st,
1769
+ focusedIndex: Re
1765
1770
  })] }) })
1766
1771
  }, "list"),
1767
- Q === "detail" && /* @__PURE__ */ (0, Z.jsx)(o.div, {
1772
+ $ === "detail" && /* @__PURE__ */ (0, Q.jsx)(r.div, {
1768
1773
  initial: { x: "100%" },
1769
1774
  animate: { x: 0 },
1770
1775
  exit: { x: "-100%" },
@@ -1774,23 +1779,23 @@ function at({ ref: e, tools: t, callTool: n, readResource: r, serverId: i, isCon
1774
1779
  damping: 30
1775
1780
  },
1776
1781
  className: "absolute inset-0 bg-background z-10",
1777
- children: /* @__PURE__ */ (0, Z.jsx)(Le, {
1782
+ children: /* @__PURE__ */ (0, Q.jsx)(Le, {
1778
1783
  selectedTool: c,
1779
1784
  toolArgs: g,
1780
- payloadToSend: q,
1781
- isExecuting: ue,
1782
- isConnected: a,
1783
- onArgChange: K,
1784
- onExecute: J,
1785
- onSave: Ie,
1786
- onBulkPaste: oe,
1787
- autoFilledFields: I,
1785
+ payloadToSend: Y,
1786
+ isExecuting: ge,
1787
+ isConnected: o,
1788
+ onArgChange: q,
1789
+ onExecute: X,
1790
+ onSave: at,
1791
+ onBulkPaste: fe,
1792
+ autoFilledFields: te,
1788
1793
  setFields: v,
1789
1794
  sendEmptyFields: b,
1790
- onToggleEmpty: ae
1795
+ onToggleEmpty: de
1791
1796
  })
1792
1797
  }, "detail"),
1793
- Q === "response" && /* @__PURE__ */ (0, Z.jsx)(o.div, {
1798
+ $ === "response" && /* @__PURE__ */ (0, Q.jsx)(r.div, {
1794
1799
  initial: { x: "100%" },
1795
1800
  animate: { x: 0 },
1796
1801
  exit: { x: "100%" },
@@ -1800,228 +1805,235 @@ function at({ ref: e, tools: t, callTool: n, readResource: r, serverId: i, isCon
1800
1805
  damping: 30
1801
1806
  },
1802
1807
  className: "absolute inset-0 bg-background z-20",
1803
- children: /* @__PURE__ */ (0, Z.jsx)(We, {
1804
- results: ve,
1805
- copiedResult: fe,
1806
- serverId: i,
1807
- readResource: r,
1808
- onCopy: pe,
1809
- onDelete: me,
1810
- onFullscreen: _e,
1811
- onRerunTool: J
1808
+ children: /* @__PURE__ */ (0, Q.jsx)(He, {
1809
+ results: Ce,
1810
+ copiedResult: _e,
1811
+ serverId: a,
1812
+ readResource: i,
1813
+ onCopy: ye,
1814
+ onDelete: be,
1815
+ onFullscreen: xe,
1816
+ onRerunTool: X
1812
1817
  })
1813
1818
  }, "response")
1814
1819
  ]
1815
1820
  })
1816
1821
  }),
1817
- /* @__PURE__ */ (0, Z.jsx)(De, {
1822
+ /* @__PURE__ */ (0, Q.jsx)(Te, {
1818
1823
  isOpen: O,
1819
1824
  requestName: A,
1820
1825
  defaultPlaceholder: `${c?.name} - ${(/* @__PURE__ */ new Date()).toLocaleString()}`,
1821
1826
  onRequestNameChange: j,
1822
- onSave: Re,
1827
+ onSave: ot,
1823
1828
  onCancel: () => k(!1)
1824
1829
  }),
1825
- /* @__PURE__ */ (0, Z.jsx)(qe, {
1830
+ /* @__PURE__ */ (0, Q.jsx)(Ge, {
1826
1831
  open: N.open,
1827
1832
  onOpenChange: (e) => {
1828
- e || ce();
1833
+ e || J();
1829
1834
  },
1830
- children: /* @__PURE__ */ (0, Z.jsxs)(Xe, { children: [/* @__PURE__ */ (0, Z.jsxs)(Ze, { children: [/* @__PURE__ */ (0, Z.jsx)($e, { children: "Auto-fill fields from pasted object?" }), /* @__PURE__ */ (0, Z.jsxs)(et, { children: [N.fieldsToUpdate.length > 0 && /* @__PURE__ */ (0, Z.jsxs)("div", {
1835
+ children: /* @__PURE__ */ (0, Q.jsxs)(Je, { children: [/* @__PURE__ */ (0, Q.jsxs)(Ye, { children: [/* @__PURE__ */ (0, Q.jsx)(Ze, { children: "Auto-fill fields from pasted object?" }), /* @__PURE__ */ (0, Q.jsxs)(Qe, { children: [N.fieldsToUpdate.length > 0 && /* @__PURE__ */ (0, Q.jsxs)("div", {
1831
1836
  className: "mb-3",
1832
- children: [/* @__PURE__ */ (0, Z.jsx)("p", {
1837
+ children: [/* @__PURE__ */ (0, Q.jsx)("p", {
1833
1838
  className: "font-medium mb-2",
1834
1839
  children: "The following fields will be updated:"
1835
- }), /* @__PURE__ */ (0, Z.jsx)("ul", {
1840
+ }), /* @__PURE__ */ (0, Q.jsx)("ul", {
1836
1841
  className: "text-sm space-y-1 max-h-[200px] overflow-y-auto",
1837
- children: N.fieldsToUpdate.map(({ key: e, oldValue: t, newValue: n }) => /* @__PURE__ */ (0, Z.jsxs)("li", {
1842
+ children: N.fieldsToUpdate.map(({ key: e, oldValue: t, newValue: n }) => /* @__PURE__ */ (0, Q.jsxs)("li", {
1838
1843
  className: "font-mono",
1839
1844
  children: [
1840
- /* @__PURE__ */ (0, Z.jsxs)("span", {
1845
+ /* @__PURE__ */ (0, Q.jsxs)("span", {
1841
1846
  className: "font-semibold",
1842
1847
  children: [e, ":"]
1843
1848
  }),
1844
1849
  " ",
1845
- /* @__PURE__ */ (0, Z.jsx)("span", {
1850
+ /* @__PURE__ */ (0, Q.jsx)("span", {
1846
1851
  className: "text-red-600 dark:text-red-400 line-through",
1847
1852
  children: typeof t == "object" ? JSON.stringify(t).substring(0, 30) + "..." : String(t).substring(0, 30)
1848
1853
  }),
1849
1854
  " ",
1850
1855
  "→",
1851
1856
  " ",
1852
- /* @__PURE__ */ (0, Z.jsx)("span", {
1857
+ /* @__PURE__ */ (0, Q.jsx)("span", {
1853
1858
  className: "text-green-600 dark:text-green-400",
1854
1859
  children: typeof n == "string" && n.length > 30 ? n.substring(0, 30) + "..." : String(n).substring(0, 30)
1855
1860
  })
1856
1861
  ]
1857
1862
  }, e))
1858
1863
  })]
1859
- }), N.newFields.length > 0 && /* @__PURE__ */ (0, Z.jsxs)("div", { children: [/* @__PURE__ */ (0, Z.jsx)("p", {
1864
+ }), N.newFields.length > 0 && /* @__PURE__ */ (0, Q.jsxs)("div", { children: [/* @__PURE__ */ (0, Q.jsx)("p", {
1860
1865
  className: "font-medium mb-1",
1861
1866
  children: "New fields to be filled:"
1862
- }), /* @__PURE__ */ (0, Z.jsx)("p", {
1867
+ }), /* @__PURE__ */ (0, Q.jsx)("p", {
1863
1868
  className: "text-sm font-mono",
1864
1869
  children: N.newFields.join(", ")
1865
- })] })] })] }), /* @__PURE__ */ (0, Z.jsxs)(Qe, { children: [/* @__PURE__ */ (0, Z.jsx)(nt, {
1866
- onClick: ce,
1870
+ })] })] })] }), /* @__PURE__ */ (0, Q.jsxs)(Xe, { children: [/* @__PURE__ */ (0, Q.jsx)(et, {
1871
+ onClick: J,
1867
1872
  children: "Cancel"
1868
- }), /* @__PURE__ */ (0, Z.jsx)(tt, {
1869
- onClick: se,
1873
+ }), /* @__PURE__ */ (0, Q.jsx)($e, {
1874
+ onClick: pe,
1870
1875
  children: "Auto-fill"
1871
1876
  })] })] })
1872
1877
  })
1873
1878
  ]
1874
- }) : /* @__PURE__ */ (0, Z.jsxs)(re, {
1879
+ }) : /* @__PURE__ */ (0, Q.jsxs)(G, {
1875
1880
  orientation: "horizontal",
1876
1881
  className: "h-full",
1877
1882
  children: [
1878
- /* @__PURE__ */ (0, Z.jsx)(U, {
1883
+ /* @__PURE__ */ (0, Q.jsx)(H, {
1879
1884
  id: "left-panel",
1880
1885
  defaultSize: "33%",
1881
1886
  minSize: 250,
1882
1887
  collapsedSize: 0,
1883
1888
  collapsible: !0,
1884
1889
  className: "flex flex-col h-full relative",
1885
- panelRef: R,
1886
- children: /* @__PURE__ */ (0, Z.jsx)("div", {
1887
- className: "flex h-full flex-col overflow-hidden border-r dark:border-zinc-700",
1888
- children: /* @__PURE__ */ (0, Z.jsx)(W, { children: (e) => /* @__PURE__ */ (0, Z.jsxs)(Z.Fragment, { children: [/* @__PURE__ */ (0, Z.jsx)(we, {
1890
+ panelRef: L,
1891
+ children: /* @__PURE__ */ (0, Q.jsx)("div", {
1892
+ className: "flex h-full flex-col overflow-hidden",
1893
+ children: /* @__PURE__ */ (0, Q.jsx)(W, { children: (e) => /* @__PURE__ */ (0, Q.jsxs)(Q.Fragment, { children: [/* @__PURE__ */ (0, Q.jsx)(Se, {
1889
1894
  isScrolled: e,
1890
1895
  activeTab: w,
1891
- isSearchExpanded: Y,
1896
+ isSearchExpanded: Pe,
1892
1897
  searchQuery: S,
1893
1898
  primaryTabName: "tools",
1894
1899
  secondaryTabName: "saved",
1895
1900
  primaryTabTitle: "Tools",
1896
1901
  secondaryTabTitle: "Saved",
1897
- primaryCount: V.length,
1902
+ primaryCount: K.length,
1898
1903
  secondaryCount: E.length,
1899
- primaryIcon: de,
1900
- secondaryIcon: F,
1904
+ primaryIcon: ue,
1905
+ secondaryIcon: P,
1901
1906
  searchPlaceholder: "Search tools...",
1902
- onSearchExpand: () => Se(!0),
1907
+ onSearchExpand: () => Ie(!0),
1903
1908
  onSearchChange: C,
1904
- onSearchBlur: je,
1909
+ onSearchBlur: Ke,
1905
1910
  onTabSwitch: () => T(w === "tools" ? "saved" : "tools"),
1906
- searchInputRef: Te,
1907
- onRefresh: s ? Pe : void 0,
1908
- isRefreshing: Ae
1909
- }), w === "tools" ? /* @__PURE__ */ (0, Z.jsx)(Ge, {
1910
- tools: V,
1911
+ searchInputRef: ze,
1912
+ onRefresh: s ? qe : void 0,
1913
+ isRefreshing: We
1914
+ }), w === "tools" ? /* @__PURE__ */ (0, Q.jsx)(Ue, {
1915
+ tools: K,
1911
1916
  selectedTool: c,
1912
- onToolSelect: H,
1913
- focusedIndex: Ce
1914
- }) : /* @__PURE__ */ (0, Z.jsx)(Ee, {
1917
+ onToolSelect: se,
1918
+ focusedIndex: Re
1919
+ }) : /* @__PURE__ */ (0, Q.jsx)(we, {
1915
1920
  savedRequests: E,
1916
- selectedRequest: d,
1917
- onLoadRequest: G,
1918
- onDeleteRequest: ze,
1919
- focusedIndex: Ce
1921
+ selectedRequest: u,
1922
+ onLoadRequest: le,
1923
+ onDeleteRequest: st,
1924
+ focusedIndex: Re
1920
1925
  })] }) })
1921
1926
  })
1922
1927
  }),
1923
- /* @__PURE__ */ (0, Z.jsx)(ne, { withHandle: !0 }),
1924
- /* @__PURE__ */ (0, Z.jsx)(U, {
1928
+ /* @__PURE__ */ (0, Q.jsx)(U, { withHandle: !0 }),
1929
+ /* @__PURE__ */ (0, Q.jsx)(H, {
1925
1930
  defaultSize: "67%",
1926
- children: /* @__PURE__ */ (0, Z.jsxs)(re, {
1931
+ children: /* @__PURE__ */ (0, Q.jsxs)(G, {
1927
1932
  orientation: "vertical",
1933
+ elementRef: V,
1934
+ onLayoutChanged: Ae,
1928
1935
  children: [
1929
- /* @__PURE__ */ (0, Z.jsx)(U, {
1936
+ /* @__PURE__ */ (0, Q.jsx)(H, {
1937
+ id: "tool-params",
1930
1938
  defaultSize: "40%",
1939
+ minSize: `${rt}px`,
1931
1940
  collapsible: !0,
1932
1941
  panelRef: z,
1933
- children: /* @__PURE__ */ (0, Z.jsx)(Le, {
1942
+ children: /* @__PURE__ */ (0, Q.jsx)(Le, {
1934
1943
  selectedTool: c,
1935
1944
  toolArgs: g,
1936
- payloadToSend: q,
1937
- isExecuting: ue,
1938
- isConnected: a,
1939
- onArgChange: K,
1940
- onExecute: J,
1941
- onSave: Ie,
1942
- onCancel: ye,
1943
- onBulkPaste: oe,
1944
- autoFilledFields: I,
1945
+ payloadToSend: Y,
1946
+ isExecuting: ge,
1947
+ isConnected: o,
1948
+ onArgChange: q,
1949
+ onExecute: X,
1950
+ onSave: at,
1951
+ onCancel: Ee,
1952
+ onBulkPaste: fe,
1953
+ autoFilledFields: te,
1945
1954
  setFields: v,
1946
1955
  sendEmptyFields: b,
1947
- onToggleEmpty: ae
1956
+ onToggleEmpty: de
1948
1957
  })
1949
1958
  }),
1950
- /* @__PURE__ */ (0, Z.jsx)(ne, { withHandle: !0 }),
1951
- /* @__PURE__ */ (0, Z.jsx)(U, {
1959
+ /* @__PURE__ */ (0, Q.jsx)(U, { withHandle: !0 }),
1960
+ /* @__PURE__ */ (0, Q.jsx)(H, {
1961
+ id: "tool-result",
1952
1962
  defaultSize: "60%",
1953
- children: /* @__PURE__ */ (0, Z.jsx)("div", {
1963
+ panelRef: B,
1964
+ children: /* @__PURE__ */ (0, Q.jsx)("div", {
1954
1965
  className: "flex flex-col h-full",
1955
- children: /* @__PURE__ */ (0, Z.jsx)(We, {
1956
- results: ve,
1957
- copiedResult: fe,
1958
- serverId: i,
1959
- readResource: r,
1960
- onCopy: pe,
1961
- onDelete: me,
1962
- onFullscreen: _e,
1963
- onMaximize: te,
1966
+ children: /* @__PURE__ */ (0, Q.jsx)(He, {
1967
+ results: Ce,
1968
+ copiedResult: _e,
1969
+ serverId: a,
1970
+ readResource: i,
1971
+ onCopy: ye,
1972
+ onDelete: be,
1973
+ onFullscreen: xe,
1974
+ onMaximize: oe,
1964
1975
  isMaximized: M,
1965
- onRerunTool: J
1976
+ onRerunTool: X,
1977
+ onWidgetHeightChange: je
1966
1978
  })
1967
1979
  })
1968
1980
  })
1969
1981
  ]
1970
1982
  })
1971
1983
  }),
1972
- /* @__PURE__ */ (0, Z.jsx)(De, {
1984
+ /* @__PURE__ */ (0, Q.jsx)(Te, {
1973
1985
  isOpen: O,
1974
1986
  requestName: A,
1975
1987
  defaultPlaceholder: `${c?.name} - ${(/* @__PURE__ */ new Date()).toLocaleString()}`,
1976
1988
  onRequestNameChange: j,
1977
- onSave: Re,
1989
+ onSave: ot,
1978
1990
  onCancel: () => k(!1)
1979
1991
  }),
1980
- /* @__PURE__ */ (0, Z.jsx)(qe, {
1992
+ /* @__PURE__ */ (0, Q.jsx)(Ge, {
1981
1993
  open: N.open,
1982
1994
  onOpenChange: (e) => {
1983
- e || ce();
1995
+ e || J();
1984
1996
  },
1985
- children: /* @__PURE__ */ (0, Z.jsxs)(Xe, { children: [/* @__PURE__ */ (0, Z.jsxs)(Ze, { children: [/* @__PURE__ */ (0, Z.jsx)($e, { children: "Auto-fill fields from pasted object?" }), /* @__PURE__ */ (0, Z.jsxs)(et, { children: [N.fieldsToUpdate.length > 0 && /* @__PURE__ */ (0, Z.jsxs)("div", {
1997
+ children: /* @__PURE__ */ (0, Q.jsxs)(Je, { children: [/* @__PURE__ */ (0, Q.jsxs)(Ye, { children: [/* @__PURE__ */ (0, Q.jsx)(Ze, { children: "Auto-fill fields from pasted object?" }), /* @__PURE__ */ (0, Q.jsxs)(Qe, { children: [N.fieldsToUpdate.length > 0 && /* @__PURE__ */ (0, Q.jsxs)("div", {
1986
1998
  className: "mb-3",
1987
- children: [/* @__PURE__ */ (0, Z.jsx)("p", {
1999
+ children: [/* @__PURE__ */ (0, Q.jsx)("p", {
1988
2000
  className: "font-medium mb-2",
1989
2001
  children: "The following fields will be updated:"
1990
- }), /* @__PURE__ */ (0, Z.jsx)("ul", {
2002
+ }), /* @__PURE__ */ (0, Q.jsx)("ul", {
1991
2003
  className: "text-sm space-y-1 max-h-[200px] overflow-y-auto",
1992
- children: N.fieldsToUpdate.map(({ key: e, oldValue: t, newValue: n }) => /* @__PURE__ */ (0, Z.jsxs)("li", {
2004
+ children: N.fieldsToUpdate.map(({ key: e, oldValue: t, newValue: n }) => /* @__PURE__ */ (0, Q.jsxs)("li", {
1993
2005
  className: "font-mono",
1994
2006
  children: [
1995
- /* @__PURE__ */ (0, Z.jsxs)("span", {
2007
+ /* @__PURE__ */ (0, Q.jsxs)("span", {
1996
2008
  className: "font-semibold",
1997
2009
  children: [e, ":"]
1998
2010
  }),
1999
2011
  " ",
2000
- /* @__PURE__ */ (0, Z.jsx)("span", {
2012
+ /* @__PURE__ */ (0, Q.jsx)("span", {
2001
2013
  className: "text-red-600 dark:text-red-400 line-through",
2002
2014
  children: typeof t == "object" ? JSON.stringify(t).substring(0, 30) + "..." : String(t).substring(0, 30)
2003
2015
  }),
2004
2016
  " ",
2005
2017
  "→",
2006
2018
  " ",
2007
- /* @__PURE__ */ (0, Z.jsx)("span", {
2019
+ /* @__PURE__ */ (0, Q.jsx)("span", {
2008
2020
  className: "text-green-600 dark:text-green-400",
2009
2021
  children: typeof n == "string" && n.length > 30 ? n.substring(0, 30) + "..." : String(n).substring(0, 30)
2010
2022
  })
2011
2023
  ]
2012
2024
  }, e))
2013
2025
  })]
2014
- }), N.newFields.length > 0 && /* @__PURE__ */ (0, Z.jsxs)("div", { children: [/* @__PURE__ */ (0, Z.jsx)("p", {
2026
+ }), N.newFields.length > 0 && /* @__PURE__ */ (0, Q.jsxs)("div", { children: [/* @__PURE__ */ (0, Q.jsx)("p", {
2015
2027
  className: "font-medium mb-1",
2016
2028
  children: "New fields to be filled:"
2017
- }), /* @__PURE__ */ (0, Z.jsx)("p", {
2029
+ }), /* @__PURE__ */ (0, Q.jsx)("p", {
2018
2030
  className: "text-sm font-mono",
2019
2031
  children: N.newFields.join(", ")
2020
- })] })] })] }), /* @__PURE__ */ (0, Z.jsxs)(Qe, { children: [/* @__PURE__ */ (0, Z.jsx)(nt, {
2021
- onClick: ce,
2032
+ })] })] })] }), /* @__PURE__ */ (0, Q.jsxs)(Xe, { children: [/* @__PURE__ */ (0, Q.jsx)(et, {
2033
+ onClick: J,
2022
2034
  children: "Cancel"
2023
- }), /* @__PURE__ */ (0, Z.jsx)(tt, {
2024
- onClick: se,
2035
+ }), /* @__PURE__ */ (0, Q.jsx)($e, {
2036
+ onClick: pe,
2025
2037
  children: "Auto-fill"
2026
2038
  })] })] })
2027
2039
  })