@mcp-use/inspector 20.0.0-beta.1 → 20.0.0-beta.10

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 (276) hide show
  1. package/README.md +7 -18
  2. package/dist/cdn/{AnimatePresence-B4HhIdgq.js → AnimatePresence-D1bZ5_-l.js} +80 -79
  3. package/dist/cdn/ChatTab-DRn-AnBV.js +6811 -0
  4. package/dist/cdn/{CheckboxIndicator-BF2cKfbA.js → CheckboxIndicator-BjF73mGX.js} +74 -73
  5. package/dist/cdn/ConnectionSettingsForm-CsG61Iyd.js +929 -0
  6. package/dist/cdn/ConnectionSettingsTab-CTJJK4hj.js +151 -0
  7. package/dist/cdn/{ElicitationTab-upPXq2q7.js → ElicitationTab-PEmEDvC5.js} +48 -47
  8. package/dist/cdn/{FormContext-Cl51-7O7.js → FormContext-NtUiZclE.js} +26 -26
  9. package/dist/cdn/{InspectorContext-DzXtgyTx.js → InspectorContext-BBKCdfmK.js} +2 -22
  10. package/dist/cdn/{JSONDisplay-D3RcyO9z.js → JSONDisplay-BJqMz7Ny.js} +23 -23
  11. package/dist/cdn/{ListTabHeader-8lULn-90.js → ListTabHeader-DzmTtN1e.js} +21 -20
  12. package/dist/cdn/{WidgetWrapper-D29YDxIu.js → MCPAppsDebugControls-C5-knSKL.js} +583 -620
  13. package/dist/cdn/{ManufactOAuthCallback-DEM8mhWD.js → ManufactOAuthCallback-ChbbjFIT.js} +3 -3
  14. package/dist/cdn/MarkdownRenderer-uUvyteZT.js +3610 -0
  15. package/dist/cdn/McpAppsViewPanel-Bj-1E9_v.js +56 -0
  16. package/dist/cdn/{NotificationsTab-CWopTIzT.js → NotificationsTab-B7uebqMV.js} +13 -13
  17. package/dist/cdn/{OAuthCallback-k3oeLtIC.js → OAuthCallback-Hdtybeu0.js} +3 -3
  18. package/dist/cdn/PromptsTab-b4UpzPPY.js +902 -0
  19. package/dist/cdn/{ResourcesTab-KfamsM6-.js → ResourcesTab-BCA0_b8c.js} +106 -124
  20. package/dist/cdn/{SamplingTab-vcufuK24.js → SamplingTab-CuPYqFyA.js} +43 -42
  21. package/dist/cdn/{ServerMetadataTab-DS0eiyyD.js → ServerMetadataTab-BM3VhSLf.js} +14 -14
  22. package/dist/cdn/{StatusIcon-BGXOEU2u.js → StatusIcon-Q3n3YRtE.js} +8 -9
  23. package/dist/cdn/{ToolsTab-DRjcZnpu.js → ToolsTab-4lvUZRQq.js} +671 -693
  24. package/dist/cdn/{ViewPreview-B_onhcUB.js → ViewPreview-BGClMNvo.js} +5 -4
  25. package/dist/cdn/{WidgetDebugContext-D4usL_MA.js → WidgetDebugContext-B6yoOVVV.js} +1 -11
  26. package/dist/cdn/WidgetWrapper-BlbQAh_X.js +12 -0
  27. package/dist/cdn/{bell-CGjAO_0s.js → bell-GrTZcnD2.js} +1 -1
  28. package/dist/cdn/{browser-CbQIH4w2.js → browser-DG2Z8392.js} +1 -1
  29. package/dist/cdn/{brush-B_mKhyxG.js → brush-CelVvMGp.js} +1 -1
  30. package/dist/cdn/button-CB4uOoUV.js +2509 -0
  31. package/dist/cdn/{card-DqjqAq0o.js → card-BA-DQk-G.js} +2 -2
  32. package/dist/cdn/{checkbox-B4oUG6Rr.js → checkbox-kwVa4gRX.js} +4 -4
  33. package/dist/cdn/{clock-CmUbSx_B.js → clock-YMF8Gtw5.js} +1 -1
  34. package/dist/cdn/{code-V_0nf5rg.js → code-C8sN2OGR.js} +1 -1
  35. package/dist/cdn/{jsx-runtime-CIxvMpEo.js → createLucideIcon-BONxC1L5.js} +57 -24
  36. package/dist/cdn/{dialog-Dnl-pZsY.js → dialog-CJGnC5Ag.js} +165 -165
  37. package/dist/cdn/{dist-DjXr_YO3.js → dist-CTJnCYmk.js} +1 -1
  38. package/dist/cdn/{dist-mRDqCgKU.js → dist-dw0FdK5Y.js} +116 -114
  39. package/dist/cdn/{external-link-CjmfT6rW.js → external-link-Bo4lQxr1.js} +1 -1
  40. package/dist/cdn/{eye-B7H96av8.js → eye-pSGG7nvf.js} +1 -1
  41. package/dist/cdn/{folder-open-B3lu2rG_.js → folder-open-aM8CPtBO.js} +1 -1
  42. package/dist/cdn/{hash-BVQnWi7q.js → hash-DDs2vE1k.js} +1 -1
  43. package/dist/cdn/{history-Csw4rb44.js → history-BfUFpL1d.js} +1 -1
  44. package/dist/cdn/{index-browser-CVUwR-Bu.js → index-browser-B1xWyLr0.js} +113 -201
  45. package/dist/cdn/{info-CNiOwqkf.js → info-BMkB68mB.js} +1 -1
  46. package/dist/cdn/{input-BLxOA7V-.js → input-BCpgLXU1.js} +3039 -3600
  47. package/dist/cdn/inspector.css +1 -1
  48. package/dist/cdn/inspector.js +7797 -7857
  49. package/dist/cdn/{label-CBvG613A.js → label-A0UGV8FE.js} +8 -8
  50. package/dist/cdn/{loader-circle-BLy9A_pp.js → loader-circle-BKRHJEB7.js} +1 -1
  51. package/dist/cdn/{manufact-auth-0TVxpeTA.js → manufact-auth-BQMHhbLV.js} +142 -106
  52. package/dist/cdn/{maximize-2-CH5Lq90B.js → maximize-2-DdrB_spi.js} +1 -1
  53. package/dist/cdn/{maximize-BALCV_ep.js → maximize-hSOCz133.js} +1 -1
  54. package/dist/cdn/{message-square-BnxdpJxZ.js → message-square-D3tKB3uJ.js} +1 -1
  55. package/dist/cdn/{not-found-BcNNsTjS.js → not-found-BajFyZpp.js} +4 -6
  56. package/dist/cdn/{play-vuZ5PLnI.js → play-B1leulYf.js} +1 -1
  57. package/dist/cdn/providerMeta-CjGU4rID.js +436 -0
  58. package/dist/cdn/{react-BxO-uEDZ.js → react-BoOQpLwo.js} +838 -849
  59. package/dist/cdn/{refresh-cw-BXY-Pa0U.js → refresh-cw-CyvXrS91.js} +1 -1
  60. package/dist/cdn/{save-Tgil_AJZ.js → save-CmdEPUAm.js} +1 -1
  61. package/dist/cdn/{select-BZ_IoKxg.js → select-CCFHjOGk.js} +843 -842
  62. package/dist/cdn/{servers-Dm72iTpY.js → servers-Dd0Vcp81.js} +5 -1
  63. package/dist/cdn/{shared-uMiV6Fx1.js → shared-CJVHJhag.js} +35 -35
  64. package/dist/cdn/sheet-oyq1mIyg.js +2078 -0
  65. package/dist/cdn/{sparkles-BntO2rDR.js → sparkles-CxeZpVtX.js} +1 -1
  66. package/dist/cdn/{spinner-CWcJhIY_.js → spinner-Be1GlSGX.js} +3 -3
  67. package/dist/cdn/{square-check-big-BvwQ17Bl.js → square-check-big-C_4wbfwF.js} +1 -1
  68. package/dist/cdn/{switch-DtQOLb9R.js → switch-DHXEA_N5.js} +211 -210
  69. package/dist/cdn/{tabs-subtle-C5cy35sY.js → tabs-subtle-Dubd6Kj8.js} +259 -258
  70. package/dist/cdn/{telemetry-Ct6pVkM1.js → telemetry-C7bt_ifQ.js} +38 -70
  71. package/dist/cdn/{textarea-Bj-CT7hC.js → textarea-CwmI8_uI.js} +2 -2
  72. package/dist/cdn/{trash-2-RwpJY5SL.js → trash-2-BhumJAFE.js} +1 -1
  73. package/dist/cdn/{useAriaLabelledBy-Bm9qHGK6.js → useAriaLabelledBy-Cra6w3YY.js} +2 -1
  74. package/dist/cdn/{useCompositeItem-CNJ6MXdi.js → useCompositeItem-Dhnm-7el.js} +3 -3
  75. package/dist/cdn/{useConfig-CwxZ6Quj.js → useConfig-DiOY6evp.js} +73 -46
  76. package/dist/cdn/{useSavedRequests-Ci2I919u.js → useSavedRequests-mSIsDd4c.js} +1 -1
  77. package/dist/cdn/{useViewHostProps-Dr6W2ooF.js → useViewHostProps-D1emxC9m.js} +124 -108
  78. package/dist/cdn/{wrench-DzGmCfnb.js → wrench-DvK20LUT.js} +1 -1
  79. package/dist/cdn/{x-C3vRQIYu.js → x-EilKPiCX.js} +1 -1
  80. package/dist/cdn/{zap-Mb-pbw2X.js → zap-0Wr9QO7N.js} +1 -1
  81. package/dist/cli.js +87 -14
  82. package/dist/client/auth/manufact-auth.d.ts +3 -1
  83. package/dist/client/auth/manufact-auth.d.ts.map +1 -1
  84. package/dist/client/components/ChatTab.d.ts +1 -8
  85. package/dist/client/components/ChatTab.d.ts.map +1 -1
  86. package/dist/client/components/MCPAppsDebugControls.d.ts.map +1 -1
  87. package/dist/client/components/ResourcesTab.d.ts.map +1 -1
  88. package/dist/client/components/ToolsTab.d.ts.map +1 -1
  89. package/dist/client/components/chat/ChatHeader.d.ts +7 -2
  90. package/dist/client/components/chat/ChatHeader.d.ts.map +1 -1
  91. package/dist/client/components/chat/ChatLandingForm.d.ts +4 -2
  92. package/dist/client/components/chat/ChatLandingForm.d.ts.map +1 -1
  93. package/dist/client/components/chat/ChatManagedNotice.d.ts +10 -0
  94. package/dist/client/components/chat/ChatManagedNotice.d.ts.map +1 -0
  95. package/dist/client/components/chat/ChatScrollTopFade.d.ts +7 -0
  96. package/dist/client/components/chat/ChatScrollTopFade.d.ts.map +1 -0
  97. package/dist/client/components/chat/ConfigurationDialog.d.ts +11 -9
  98. package/dist/client/components/chat/ConfigurationDialog.d.ts.map +1 -1
  99. package/dist/client/components/chat/ConfigureEmptyState.d.ts +1 -6
  100. package/dist/client/components/chat/ConfigureEmptyState.d.ts.map +1 -1
  101. package/dist/client/components/chat/MessageList.d.ts +1 -0
  102. package/dist/client/components/chat/MessageList.d.ts.map +1 -1
  103. package/dist/client/components/chat/StreamingAssistantContent.d.ts.map +1 -1
  104. package/dist/client/components/chat/ToolResultRenderer.d.ts.map +1 -1
  105. package/dist/client/components/chat/chatModeStorage.d.ts +11 -0
  106. package/dist/client/components/chat/chatModeStorage.d.ts.map +1 -0
  107. package/dist/client/components/chat/managedChatNotice.d.ts +16 -0
  108. package/dist/client/components/chat/managedChatNotice.d.ts.map +1 -0
  109. package/dist/client/components/chat/partialToolArgs.d.ts +10 -0
  110. package/dist/client/components/chat/partialToolArgs.d.ts.map +1 -0
  111. package/dist/client/components/chat/providerMeta.d.ts +11 -0
  112. package/dist/client/components/chat/providerMeta.d.ts.map +1 -1
  113. package/dist/client/components/chat/types.d.ts +1 -0
  114. package/dist/client/components/chat/types.d.ts.map +1 -1
  115. package/dist/client/components/chat/useChatMessages.d.ts +7 -5
  116. package/dist/client/components/chat/useChatMessages.d.ts.map +1 -1
  117. package/dist/client/components/chat/useChatMessagesClientSide.d.ts +4 -6
  118. package/dist/client/components/chat/useChatMessagesClientSide.d.ts.map +1 -1
  119. package/dist/client/components/chat/useChatScrollToBottom.d.ts +1 -0
  120. package/dist/client/components/chat/useChatScrollToBottom.d.ts.map +1 -1
  121. package/dist/client/components/chat/useConfig.d.ts +1 -1
  122. package/dist/client/components/chat/useConfig.d.ts.map +1 -1
  123. package/dist/client/components/chat/useHostedChatMode.d.ts +1 -1
  124. package/dist/client/components/chat/useHostedChatMode.d.ts.map +1 -1
  125. package/dist/client/components/mcp-apps/McpAppsViewPanel.d.ts +29 -0
  126. package/dist/client/components/mcp-apps/McpAppsViewPanel.d.ts.map +1 -0
  127. package/dist/client/components/shared/MarkdownRenderer.d.ts +2 -1
  128. package/dist/client/components/shared/MarkdownRenderer.d.ts.map +1 -1
  129. package/dist/client/components/tools/ToolExecutionPanel.d.ts.map +1 -1
  130. package/dist/client/components/tools/ToolResultDisplay.d.ts +2 -1
  131. package/dist/client/components/tools/ToolResultDisplay.d.ts.map +1 -1
  132. package/dist/client/components/tools/useToolsTabNavigation.d.ts.map +1 -1
  133. package/dist/client/components/ui/MeshGradientCanvas.d.ts +13 -0
  134. package/dist/client/components/ui/MeshGradientCanvas.d.ts.map +1 -0
  135. package/dist/client/components/ui/chat-message.d.ts +1 -1
  136. package/dist/client/components/ui/chat-message.d.ts.map +1 -1
  137. package/dist/client/components/ui/file-thumbnail.d.ts.map +1 -1
  138. package/dist/client/components/ui/mesh-animation-pause.d.ts +14 -0
  139. package/dist/client/components/ui/mesh-animation-pause.d.ts.map +1 -0
  140. package/dist/client/components/ui/mesh-gradient-colors.d.ts +6 -0
  141. package/dist/client/components/ui/mesh-gradient-colors.d.ts.map +1 -0
  142. package/dist/client/components/ui/mesh-tab-background.d.ts +3 -1
  143. package/dist/client/components/ui/mesh-tab-background.d.ts.map +1 -1
  144. package/dist/client/components/ui/not-found.d.ts.map +1 -1
  145. package/dist/client/context/InspectorContext.d.ts.map +1 -1
  146. package/dist/client/context/WidgetDebugContext.d.ts +1 -11
  147. package/dist/client/context/WidgetDebugContext.d.ts.map +1 -1
  148. package/dist/client/hooks/useDeviceViewport.d.ts +1 -5
  149. package/dist/client/hooks/useDeviceViewport.d.ts.map +1 -1
  150. package/dist/client/hooks/useViewHostProps.d.ts +1 -1
  151. package/dist/client/hooks/useViewHostProps.d.ts.map +1 -1
  152. package/dist/client/index.js +4202 -3491
  153. package/dist/client/telemetry/init.d.ts.map +1 -1
  154. package/dist/client/telemetry/utils.d.ts.map +1 -1
  155. package/dist/client/utils/servers.d.ts +5 -0
  156. package/dist/client/utils/servers.d.ts.map +1 -1
  157. package/dist/server/asset-urls.d.ts +4 -0
  158. package/dist/server/asset-urls.d.ts.map +1 -1
  159. package/dist/server/asset-urls.js +7 -3
  160. package/dist/server/cdn-shell.d.ts.map +1 -1
  161. package/dist/server/cdn-shell.js +3 -3
  162. package/dist/server/{chunk-IXYK6ZOY.js → chunk-5XMQ5UJR.js} +2 -2
  163. package/dist/server/{chunk-KBVKS4J5.js → chunk-H6ZCIKBS.js} +10 -0
  164. package/dist/server/{chunk-VDUV6LR6.js → chunk-KTPQKADO.js} +75 -5
  165. package/dist/server/{chunk-Y2GBQOQW.js → chunk-LMLZJR2K.js} +2 -9
  166. package/dist/server/{chunk-K2V2SDQD.js → chunk-OWR2BIBW.js} +1 -1
  167. package/dist/server/{chunk-5B3SXGZP.js → chunk-UJLXHNQP.js} +1 -1
  168. package/dist/server/{chunk-6XWDZEFF.js → chunk-XCNS5CIW.js} +8 -3
  169. package/dist/server/cli.js +5 -5
  170. package/dist/server/create-dev-api-app.js +3 -3
  171. package/dist/server/dev-callback-redirect.d.ts +3 -0
  172. package/dist/server/dev-callback-redirect.d.ts.map +1 -0
  173. package/dist/server/dev-callback-redirect.js +18 -0
  174. package/dist/server/index.js +6 -6
  175. package/dist/server/middleware.js +6 -6
  176. package/dist/server/proxy/index.js +1 -1
  177. package/dist/server/proxy/mcp-proxy.d.ts +2 -0
  178. package/dist/server/proxy/mcp-proxy.d.ts.map +1 -1
  179. package/dist/server/proxy/mcp-proxy.js +3 -1
  180. package/dist/server/proxy-routes.js +2 -2
  181. package/dist/server/server.js +3 -3
  182. package/dist/server/version.js +1 -1
  183. package/dist/server/vite-dev-api-plugin.js +3 -3
  184. package/dist/web/assets/AnimatePresence-FfDQQNFJ.js +9 -0
  185. package/dist/web/assets/ChatTab-x6dg7xyx.js +18 -0
  186. package/dist/web/assets/ConnectionSettingsTab-DUwCNYXJ.js +1 -0
  187. package/dist/web/assets/ElicitationTab-Dk04sjRw.js +1 -0
  188. package/dist/web/assets/FormContext-sV-yByKz.js +1 -0
  189. package/dist/web/assets/ListTabHeader-CrGae306.js +1 -0
  190. package/dist/web/assets/MCPAppsDebugControls-Kh10bYHm.js +34 -0
  191. package/dist/web/assets/{ManufactOAuthCallback-DCLbW-mz.js → ManufactOAuthCallback-Bq00h5wq.js} +1 -1
  192. package/dist/web/assets/MarkdownRenderer--ZbJc80m.js +47 -0
  193. package/dist/web/assets/McpAppsViewPanel-BM7S0O6E.js +1 -0
  194. package/dist/web/assets/{NotificationsTab-JevzvJTg.js → NotificationsTab-DTcas5xQ.js} +1 -1
  195. package/dist/web/assets/{OAuthCallback-BjcRxLh5.js → OAuthCallback-CZ5PbMLP.js} +1 -1
  196. package/dist/web/assets/PromptsTab-Ce9hFDPL.js +15 -0
  197. package/dist/web/assets/ResourcesTab-CfV_CTOT.js +2 -0
  198. package/dist/web/assets/SamplingTab-7FoVfzSl.js +1 -0
  199. package/dist/web/assets/ServerMetadataTab-DfOYnm2P.js +1 -0
  200. package/dist/web/assets/ToolsTab-CeDM6lbc.js +8 -0
  201. package/dist/web/assets/ViewPreview-DMpWAByN.js +1 -0
  202. package/dist/web/assets/WidgetWrapper-cv_BM1bY.js +1 -0
  203. package/dist/web/assets/{brush--0LobUi4.js → brush-DX0UZ_pI.js} +1 -1
  204. package/dist/web/assets/button-C8Xa2k4x.js +1 -0
  205. package/dist/web/assets/checkbox-ocTkuPLe.js +1 -0
  206. package/dist/web/assets/code-B14rVdNt.js +1 -0
  207. package/dist/web/assets/createLucideIcon-BEHeJH0M.js +1 -0
  208. package/dist/web/assets/dist-D6mojCV5.js +21 -0
  209. package/dist/web/assets/index-BfmL5fRO.js +499 -0
  210. package/dist/web/assets/index-bCIH1Sdx.css +1 -0
  211. package/dist/web/assets/input-C0OQCUZy.js +1 -0
  212. package/dist/web/assets/{label-B5Q_Zr8M.js → label-CI7JWQOo.js} +1 -1
  213. package/dist/web/assets/{maximize-2-BTT9QQU9.js → maximize-2-Br1WQzT2.js} +1 -1
  214. package/dist/web/assets/{maximize-_O55kFcr.js → maximize-CJNgRe6S.js} +1 -1
  215. package/dist/web/assets/{refresh-cw-C9wQl8_d.js → refresh-cw-B5iaAZKn.js} +1 -1
  216. package/dist/web/assets/{save-B-MsgxX9.js → save-TM6fvNrt.js} +1 -1
  217. package/dist/web/assets/select-D6jzbLJn.js +1 -0
  218. package/dist/web/assets/shared-BaJnSpaR.js +1 -0
  219. package/dist/web/assets/{sparkles-2OAsc1aP.js → sparkles-BGYTDThM.js} +1 -1
  220. package/dist/web/assets/tabs-subtle-C3U3Xswq.js +1 -0
  221. package/dist/web/assets/textarea-CRTXuRmE.js +1 -0
  222. package/dist/web/assets/useConfig-tIq2w5rV.js +1 -0
  223. package/dist/web/assets/useViewHostProps--1CXsG5i.js +1 -0
  224. package/dist/web/assets/{zap-Du2Uc5pa.js → zap-BDWHCVHU.js} +1 -1
  225. package/dist/web/index.html +10 -11
  226. package/package.json +5 -12
  227. package/dist/cdn/ChatTab-D8uwCHAf.js +0 -13218
  228. package/dist/cdn/ConnectionSettingsForm-BNS6bOMD.js +0 -873
  229. package/dist/cdn/ConnectionSettingsTab-B97gPPJW.js +0 -145
  230. package/dist/cdn/PromptsTab-Cspfnl6n.js +0 -4400
  231. package/dist/cdn/bundle-mjs-B0nmHDtp.js +0 -1953
  232. package/dist/cdn/chunk-BO2N2NFS-Cy167e0X.js +0 -17500
  233. package/dist/cdn/createLucideIcon-C5fZZ6oB.js +0 -38
  234. package/dist/cdn/highlighted-body-OFNGDK62-CoReNbTX.js +0 -36
  235. package/dist/cdn/mermaid-GHXKKRXX-DgVIbk-D.js +0 -2
  236. package/dist/cdn/pdf-CxFT9FER.js +0 -16291
  237. package/dist/cdn/popover-C_SSrXT0.js +0 -2005
  238. package/dist/cdn/sheet-CerCdhxz.js +0 -78
  239. package/dist/cdn/useHostedSession-BA39Aegc.js +0 -153
  240. package/dist/cdn/useMCPPrompts-D3_Hla_z.js +0 -104
  241. package/dist/client/components/chat/streamdown-code-slim.d.ts +0 -4
  242. package/dist/client/components/chat/streamdown-code-slim.d.ts.map +0 -1
  243. package/dist/web/assets/AnimatePresence-CthXziG2.js +0 -9
  244. package/dist/web/assets/ChatTab-Cy8eyFYI.js +0 -460
  245. package/dist/web/assets/ConnectionSettingsTab-sDZGaUJn.js +0 -1
  246. package/dist/web/assets/ElicitationTab-wDKgU1qL.js +0 -1
  247. package/dist/web/assets/FormContext-Cqc_A12u.js +0 -1
  248. package/dist/web/assets/ListTabHeader-G-nQX18m.js +0 -1
  249. package/dist/web/assets/PromptsTab-DsQVOjKH.js +0 -61
  250. package/dist/web/assets/ResourcesTab-Bw8_p6M1.js +0 -2
  251. package/dist/web/assets/SamplingTab-BrcF1zJF.js +0 -1
  252. package/dist/web/assets/ServerMetadataTab-Bydeh1Po.js +0 -1
  253. package/dist/web/assets/ToolsTab-DJWF7Q_x.js +0 -8
  254. package/dist/web/assets/ViewPreview-jgeU7bY9.js +0 -1
  255. package/dist/web/assets/WidgetWrapper-B_vJU9uF.js +0 -34
  256. package/dist/web/assets/bundle-mjs-8puS6ou7.js +0 -1
  257. package/dist/web/assets/checkbox-BA-XURSj.js +0 -1
  258. package/dist/web/assets/chunk-BO2N2NFS-CGbd3eLY.js +0 -131
  259. package/dist/web/assets/code-tME-5H6D.js +0 -1
  260. package/dist/web/assets/createLucideIcon-B3b8EU0b.js +0 -1
  261. package/dist/web/assets/dist-BcAQZluc.js +0 -21
  262. package/dist/web/assets/highlighted-body-OFNGDK62-BBJFbIMp.js +0 -1
  263. package/dist/web/assets/index-BjH-Qp85.css +0 -1
  264. package/dist/web/assets/index-D2UxaT9v.js +0 -475
  265. package/dist/web/assets/input-CjmxOFr6.js +0 -1
  266. package/dist/web/assets/jsx-runtime-Cjj9sGSy.js +0 -1
  267. package/dist/web/assets/mermaid-GHXKKRXX-B4MKVODA.js +0 -1
  268. package/dist/web/assets/pdf-CuwKm9zO.js +0 -54
  269. package/dist/web/assets/select-C0xlfLAa.js +0 -1
  270. package/dist/web/assets/shared-DQE60Op-.js +0 -1
  271. package/dist/web/assets/sheet-7TIkLdpr.js +0 -1
  272. package/dist/web/assets/tabs-subtle-AkJZvdxS.js +0 -1
  273. package/dist/web/assets/textarea-Ci09-en6.js +0 -1
  274. package/dist/web/assets/useConfig-Qglo4xs1.js +0 -1
  275. package/dist/web/assets/useMCPPrompts-USLYc1I4.js +0 -1
  276. package/dist/web/assets/useViewHostProps-DXAD1g7g.js +0 -1
@@ -1,106 +1,107 @@
1
1
  import { s as e, t } from "./react-BIs9pQ3H.js";
2
- import { t as n } from "./jsx-runtime-CIxvMpEo.js";
3
- import { Pr as r, Rr as i, a, cr as o, f as s, n as c, r as l, sr as u, t as d, ur as f } from "./input-BLxOA7V-.js";
4
- import { t as p } from "./label-CBvG613A.js";
5
- import { t as m } from "./AnimatePresence-B4HhIdgq.js";
6
- import { a as h, i as g, n as _, r as v, t as y } from "./select-BZ_IoKxg.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-Dnl-pZsY.js";
9
- import { n as P, r as F, t as I } from "./WidgetWrapper-D29YDxIu.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-D3RcyO9z.js";
14
- import { a as U, i as ne, n as W, o as re, r as G, s as ie } from "./shared-uMiV6Fx1.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-DtQOLb9R.js";
24
- import { t as pe } from "./not-found-BcNNsTjS.js";
25
- import { _ as me, t as he, v as ge } from "./telemetry-Ct6pVkM1.js";
26
- import { c as _e, o as ve, r as ye } from "./react-BxO-uEDZ.js";
27
- import { n as be } from "./dist-DjXr_YO3.js";
28
- import { t as Y } from "./spinner-CWcJhIY_.js";
29
- import { n as xe } from "./InspectorContext-DzXtgyTx.js";
30
- import { t as Se } from "./textarea-Bj-CT7hC.js";
31
- import { t as Ce } from "./useViewHostProps-Dr6W2ooF.js";
32
- import { t as we } from "./ListTabHeader-8lULn-90.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-C5-knSKL.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-C7bt_ifQ.js";
26
+ import { c as Y, o as ge } from "./react-BoOQpLwo.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-Bj-1E9_v.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 = n();
37
- function Ee({ savedRequests: e, selectedRequest: t, onLoadRequest: n, onDeleteRequest: r, focusedIndex: i }) {
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, s) => /* @__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: i === s,
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)(c, { children: [/* @__PURE__ */ (0, Z.jsx)(a, {
74
- render: /* @__PURE__ */ (0, Z.jsx)(u, {
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)(l, { 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)(d, {
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)(u, {
116
+ children: [/* @__PURE__ */ (0, Q.jsx)(p, {
116
117
  variant: "outline",
117
118
  onClick: a,
118
119
  children: "Cancel"
119
- }), /* @__PURE__ */ (0, Z.jsxs)(u, {
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 || [], u = 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 u ? /* @__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 u = $(c, e?.inputSchema || {}), m = Ae(u), b = u.type === "string" && m !== null, x = u, 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)(d, {
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: r, isConnected: s, onArgChange: d, 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 && !r && s && (t.preventDefault(), p()), t.key === "Escape" && r && 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
- r,
390
+ o,
390
391
  s,
391
- p,
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)(c, { children: [/* @__PURE__ */ (0, Z.jsx)(a, {
408
- render: /* @__PURE__ */ (0, Z.jsxs)(u, {
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
- disabled: r,
413
+ disabled: o,
413
414
  size: "sm",
414
- className: i(f, 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)(l, { children: /* @__PURE__ */ (0, Z.jsx)("p", { children: "View tool definition metadata" }) })] }),
423
- /* @__PURE__ */ (0, Z.jsxs)(c, { children: [/* @__PURE__ */ (0, Z.jsx)(a, {
424
- render: /* @__PURE__ */ (0, Z.jsxs)(u, {
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
- disabled: r,
433
+ disabled: o,
433
434
  size: "sm",
434
- className: i(f, 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)(l, { children: /* @__PURE__ */ (0, Z.jsx)("p", { children: "Copy payload as JSON" }) })] }),
443
- /* @__PURE__ */ (0, Z.jsxs)(c, { children: [/* @__PURE__ */ (0, Z.jsx)(a, {
444
- render: /* @__PURE__ */ (0, Z.jsxs)(u, {
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
- disabled: r,
449
+ disabled: o,
449
450
  size: "sm",
450
- className: i(f, 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)(l, { children: /* @__PURE__ */ (0, Z.jsx)("p", { children: "Save request" }) })] }),
459
- r && h ? /* @__PURE__ */ (0, Z.jsxs)(c, {
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)(a, {
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)(u, {
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: i(o, 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)(l, { children: /* @__PURE__ */ (0, Z.jsx)("p", { children: "Hover to cancel (or press Esc)" }) })]
490
- }) : /* @__PURE__ */ (0, Z.jsx)(u, {
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: r || !s,
493
+ onClick: l,
494
+ disabled: o || !s,
494
495
  size: "sm",
495
- className: i(o, T, E),
496
- children: r ? /* @__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: r, 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: d,
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: r, 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: r, 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: r, 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, l] = (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 && l(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)(u, {
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)(u, {
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(),
1010
- onValueChange: (e) => l(parseInt(e)),
1011
- children: [/* @__PURE__ */ (0, Z.jsx)(g, {
983
+ E.length > 1 && /* @__PURE__ */ (0, Q.jsxs)(b, {
984
+ value: l.toString(),
985
+ onValueChange: (e) => u(parseInt(e)),
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)(u, {
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,127 +1119,127 @@ 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: n, focusedIndex: i }) {
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, s) => {
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)(r, {
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)(c, { children: [/* @__PURE__ */ (0, Z.jsx)(a, {
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)(l, { 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: i === s,
1161
+ isFocused: s === l,
1182
1162
  title: e.name,
1183
1163
  description: e.description,
1184
1164
  metadata: h,
1185
- onClick: () => n(e)
1165
+ onClick: () => r(e)
1186
1166
  }, e.name);
1187
1167
  }) });
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: i("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: i("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: i("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: i("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: i("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: i("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)(u, {
1231
+ function $e({ className: e, ...t }) {
1232
+ return /* @__PURE__ */ (0, Q.jsx)(p, {
1253
1233
  "data-slot": "alert-dialog-action",
1254
- className: i(e),
1234
+ className: u(e),
1255
1235
  ...t
1256
1236
  });
1257
1237
  }
1258
- function nt({ className: e, variant: t = "outline", size: n = "default", ...r }) {
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: i(e),
1262
- render: /* @__PURE__ */ (0, Z.jsx)(u, {
1241
+ className: u(e),
1242
+ render: /* @__PURE__ */ (0, Q.jsx)(p, {
1263
1243
  variant: t,
1264
1244
  size: n
1265
1245
  }),
@@ -1268,8 +1248,8 @@ function nt({ className: e, variant: t = "outline", size: n = "default", ...r })
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,45 +1435,11 @@ function it({ ref: e, activeTab: t, filteredTools: n, savedRequests: r, searchQu
1453
1435
  n,
1454
1436
  r,
1455
1437
  t
1456
- ]), (0, X.useEffect)(() => {
1457
- if (fetch("http://127.0.0.1:7371/ingest/4e7482c5-571f-4071-bd09-762c357289f4", {
1458
- method: "POST",
1459
- headers: {
1460
- "Content-Type": "application/json",
1461
- "X-Debug-Session-Id": "831b88"
1462
- },
1463
- body: JSON.stringify({
1464
- sessionId: "831b88",
1465
- location: "useToolsTabNavigation.ts:auto-select",
1466
- message: "tools auto-select effect",
1467
- data: {
1468
- selectedToolName: f,
1469
- toolsCount: p.length,
1470
- toolNames: p.slice(0, 5).map((e) => e.name),
1471
- toolFound: f ? !!p.find((e) => e.name === f) : !1,
1472
- currentSelected: o?.name ?? null
1473
- },
1474
- timestamp: Date.now(),
1475
- hypothesisId: "H2"
1476
- })
1477
- }).catch(() => {}), !f || p.length === 0) return;
1438
+ ]), (0, Z.useEffect)(() => {
1439
+ if (!f || p.length === 0) return;
1478
1440
  let e = p.find((e) => e.name === f);
1479
1441
  if (e) {
1480
- fetch("http://127.0.0.1:7371/ingest/4e7482c5-571f-4071-bd09-762c357289f4", {
1481
- method: "POST",
1482
- headers: {
1483
- "Content-Type": "application/json",
1484
- "X-Debug-Session-Id": "831b88"
1485
- },
1486
- body: JSON.stringify({
1487
- sessionId: "831b88",
1488
- location: "useToolsTabNavigation.ts:auto-select-apply",
1489
- message: "scheduling handleToolSelect",
1490
- data: { toolName: e.name },
1491
- timestamp: Date.now(),
1492
- hypothesisId: "H4"
1493
- })
1494
- }).catch(() => {}), m(null);
1442
+ m(null);
1495
1443
  let t = setTimeout(() => {
1496
1444
  l(e), document.getElementById(`tool-${e.name}`)?.scrollIntoView({
1497
1445
  behavior: "smooth",
@@ -1520,45 +1468,46 @@ function it({ ref: e, activeTab: t, filteredTools: n, savedRequests: r, searchQu
1520
1468
  }
1521
1469
  //#endregion
1522
1470
  //#region src/client/components/ToolsTab.tsx
1523
- function at({ ref: e, tools: t, callTool: n, readResource: r, serverId: i, isConnected: a, refreshTools: o }) {
1524
- let [c, l] = (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)({
1525
1474
  open: !1,
1526
1475
  parsedObject: {},
1527
1476
  fieldsToUpdate: [],
1528
1477
  newFields: [],
1529
1478
  resolve: null
1530
- }), [I, L] = (0, X.useState)(/* @__PURE__ */ new Set()), R = ie(), z = ie(), te = (0, X.useCallback)(() => {
1531
- 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));
1532
1481
  }, [
1533
1482
  M,
1534
- R,
1483
+ L,
1535
1484
  z
1536
- ]), V = (0, X.useMemo)(() => {
1485
+ ]), K = (0, Z.useMemo)(() => {
1537
1486
  if (!S.trim()) return t;
1538
1487
  let e = S.toLowerCase();
1539
1488
  return t.filter((t) => t.name.toLowerCase().includes(e) || t.description?.toLowerCase().includes(e));
1540
- }, [t, S]), H = (0, X.useCallback)((e) => {
1489
+ }, [t, S]), se = (0, Z.useCallback)((e) => {
1541
1490
  l(e);
1542
1491
  let t = {}, n = /* @__PURE__ */ new Set();
1543
1492
  e.inputSchema?.properties && Object.entries(e.inputSchema.properties).forEach(([e, r]) => {
1544
1493
  let i = r;
1545
1494
  i.default !== void 0 && (t[e] = i.default, n.add(e));
1546
1495
  }), _(t), y(n), x(/* @__PURE__ */ new Set());
1547
- }, []), G = (0, X.useCallback)((e) => {
1496
+ }, []), le = (0, Z.useCallback)((e) => {
1548
1497
  let n = t.find((t) => t.name === e.toolName);
1549
- n && (l(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));
1550
1499
  }, [t]);
1551
- (0, X.useEffect)(() => {
1500
+ (0, Z.useEffect)(() => {
1552
1501
  if (c) {
1553
1502
  let e = t.find((e) => e.name === c.name);
1554
- 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), 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));
1555
1504
  }
1556
1505
  }, [
1557
1506
  t,
1558
1507
  c,
1559
- h
1508
+ m
1560
1509
  ]);
1561
- let K = (0, X.useCallback)((e, t) => {
1510
+ let q = (0, Z.useCallback)((e, t) => {
1562
1511
  let n = c?.inputSchema || {}, r = c?.inputSchema?.properties?.[e], i = r ? ke(r, n) : "string", a;
1563
1512
  a = i === "object" || i === "array" || i === "string" ? t : Me(t, i), _((t) => ({
1564
1513
  ...t,
@@ -1572,7 +1521,7 @@ function at({ ref: e, tools: t, callTool: n, readResource: r, serverId: i, isCon
1572
1521
  let n = new Set(t);
1573
1522
  return n.delete(e), n;
1574
1523
  });
1575
- }, [c]), ae = (0, X.useCallback)((e, t, n) => {
1524
+ }, [c]), de = (0, Z.useCallback)((e, t, n) => {
1576
1525
  if (n) {
1577
1526
  let n = t === "array" ? "[]" : t === "object" ? "{}" : "";
1578
1527
  _((t) => ({
@@ -1586,7 +1535,7 @@ function at({ ref: e, tools: t, callTool: n, readResource: r, serverId: i, isCon
1586
1535
  let n = new Set(t);
1587
1536
  return n.delete(e), n;
1588
1537
  });
1589
- }, []), oe = (0, X.useCallback)(async (e, t) => {
1538
+ }, []), fe = (0, Z.useCallback)(async (e, t) => {
1590
1539
  if (!c) return !1;
1591
1540
  let n = Fe(e);
1592
1541
  if (!n) return !1;
@@ -1600,10 +1549,10 @@ function at({ ref: e, tools: t, callTool: n, readResource: r, serverId: i, isCon
1600
1549
  key: e,
1601
1550
  oldValue: l,
1602
1551
  newValue: c
1603
- }) : (s.push(e), K(e, String(c)));
1552
+ }) : (s.push(e), q(e, String(c)));
1604
1553
  }
1605
- }), o.length === 0 && s.length === 0 ? !1 : o.length === 0 ? (L(new Set(s)), setTimeout(() => L(/* @__PURE__ */ new Set()), 2e3), !0) : new Promise((e) => {
1606
- 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({
1607
1556
  open: !0,
1608
1557
  parsedObject: n,
1609
1558
  fieldsToUpdate: o,
@@ -1614,29 +1563,29 @@ function at({ ref: e, tools: t, callTool: n, readResource: r, serverId: i, isCon
1614
1563
  }, [
1615
1564
  c,
1616
1565
  g,
1617
- K
1618
- ]), se = (0, X.useCallback)(() => {
1566
+ q
1567
+ ]), pe = (0, Z.useCallback)(() => {
1619
1568
  if (!N.resolve) return;
1620
1569
  N.fieldsToUpdate.forEach(({ key: e, newValue: t }) => {
1621
- K(e, String(t));
1570
+ q(e, String(t));
1622
1571
  });
1623
1572
  let e = [...N.fieldsToUpdate.map((e) => e.key), ...N.newFields];
1624
- 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({
1625
1574
  open: !1,
1626
1575
  parsedObject: {},
1627
1576
  fieldsToUpdate: [],
1628
1577
  newFields: [],
1629
1578
  resolve: null
1630
1579
  });
1631
- }, [N, K]), ce = (0, X.useCallback)(() => {
1632
- N.resolve && (N.resolve(!1), P({
1580
+ }, [N, q]), J = (0, Z.useCallback)(() => {
1581
+ N.resolve && (N.resolve(!1), F({
1633
1582
  open: !1,
1634
1583
  parsedObject: {},
1635
1584
  fieldsToUpdate: [],
1636
1585
  newFields: [],
1637
1586
  resolve: null
1638
1587
  }));
1639
- }, [N]), q = (0, X.useMemo)(() => {
1588
+ }, [N]), Y = (0, Z.useMemo)(() => {
1640
1589
  if (!c?.inputSchema?.properties) return {};
1641
1590
  let e = c.inputSchema || {}, t = {};
1642
1591
  for (let n of v) {
@@ -1651,110 +1600,132 @@ function at({ ref: e, tools: t, callTool: n, readResource: r, serverId: i, isCon
1651
1600
  g,
1652
1601
  v,
1653
1602
  b
1654
- ]), { 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({
1655
1604
  selectedTool: c,
1656
- payloadToSend: q,
1605
+ payloadToSend: Y,
1657
1606
  toolArgs: g,
1658
1607
  callTool: n,
1659
- readResource: r,
1660
- serverId: i
1661
- }), { 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({
1662
1633
  ref: e,
1663
1634
  activeTab: w,
1664
- filteredTools: V,
1635
+ filteredTools: K,
1665
1636
  savedRequests: E,
1666
1637
  searchQuery: S,
1667
1638
  setSearchQuery: C,
1668
1639
  selectedTool: c,
1669
- results: be,
1670
- isExecuting: ue,
1671
- handleToolSelect: H,
1672
- loadSavedRequest: G,
1673
- refreshTools: o,
1674
- selectedToolName: p,
1640
+ results: De,
1641
+ isExecuting: ge,
1642
+ handleToolSelect: se,
1643
+ loadSavedRequest: le,
1644
+ refreshTools: s,
1645
+ selectedToolName: f,
1675
1646
  tools: t,
1676
- setSelectedToolName: h
1677
- }), Ie = (0, X.useCallback)(() => {
1647
+ setSelectedToolName: m
1648
+ }), at = (0, Z.useCallback)(() => {
1678
1649
  c && (j(""), k(!0));
1679
- }, [c]), Re = (0, X.useCallback)(() => {
1650
+ }, [c]), ot = (0, Z.useCallback)(() => {
1680
1651
  if (!c) return;
1681
1652
  let e = {
1682
1653
  id: `${Date.now()}-${Math.random()}`,
1683
1654
  name: A.trim() || `${c.name} - ${(/* @__PURE__ */ new Date()).toLocaleString()}`,
1684
1655
  toolName: c.name,
1685
- args: q,
1656
+ args: Y,
1686
1657
  savedAt: Date.now(),
1687
1658
  serverId: c._serverId,
1688
1659
  serverName: c._serverName
1689
1660
  };
1690
- D([...E, e]), he(new ge({
1661
+ D([...E, e]), me(new he({
1691
1662
  toolName: c.name,
1692
- serverId: i
1663
+ serverId: a
1693
1664
  })).catch(() => {}), k(!1), j("");
1694
1665
  }, [
1695
1666
  c,
1696
1667
  A,
1697
- q,
1668
+ Y,
1698
1669
  E,
1699
1670
  D,
1700
- i
1701
- ]), ze = (0, X.useCallback)((e) => {
1702
- 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);
1703
1674
  }, [
1704
1675
  E,
1705
1676
  D,
1706
- d
1677
+ u
1707
1678
  ]);
1708
- return Oe ? /* @__PURE__ */ (0, Z.jsxs)("div", {
1679
+ return Be ? /* @__PURE__ */ (0, Q.jsxs)("div", {
1709
1680
  className: "h-full flex flex-col overflow-hidden relative bg-background",
1710
1681
  children: [
1711
- Q !== "list" && /* @__PURE__ */ (0, Z.jsxs)("div", {
1682
+ $ !== "list" && /* @__PURE__ */ (0, Q.jsxs)("div", {
1712
1683
  className: "flex items-center gap-2 p-2 border-b shrink-0 bg-background z-10",
1713
- children: [/* @__PURE__ */ (0, Z.jsx)(u, {
1684
+ children: [/* @__PURE__ */ (0, Q.jsx)(p, {
1714
1685
  variant: "ghost",
1715
1686
  size: "sm",
1716
1687
  onClick: () => {
1717
- Q === "response" ? $("detail") : (l(null), $("list"));
1688
+ $ === "response" ? Ve("detail") : (l(null), Ve("list"));
1718
1689
  },
1719
1690
  className: "p-0 h-8 w-8",
1720
- children: /* @__PURE__ */ (0, Z.jsx)(B, { className: "h-4 w-4" })
1721
- }), /* @__PURE__ */ (0, Z.jsxs)("div", {
1691
+ children: /* @__PURE__ */ (0, Q.jsx)(R, { className: "h-4 w-4" })
1692
+ }), /* @__PURE__ */ (0, Q.jsxs)("div", {
1722
1693
  className: "flex items-center text-sm font-medium",
1723
1694
  children: [
1724
- /* @__PURE__ */ (0, Z.jsx)("button", {
1695
+ /* @__PURE__ */ (0, Q.jsx)("button", {
1725
1696
  onClick: () => {
1726
- l(null), $("list");
1697
+ l(null), Ve("list");
1727
1698
  },
1728
1699
  className: "text-muted-foreground hover:text-foreground hover:underline cursor-pointer",
1729
1700
  children: "Tools"
1730
1701
  }),
1731
- 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", {
1732
1703
  className: "mx-2 text-muted-foreground",
1733
1704
  children: "/"
1734
- }), /* @__PURE__ */ (0, Z.jsx)("button", {
1705
+ }), /* @__PURE__ */ (0, Q.jsx)("button", {
1735
1706
  onClick: () => {
1736
- $("response");
1707
+ Ve("response");
1737
1708
  },
1738
- 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",
1739
1710
  children: "Execute"
1740
1711
  })] }),
1741
- 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", {
1742
1713
  className: "mx-2 text-muted-foreground",
1743
1714
  children: "/"
1744
- }), /* @__PURE__ */ (0, Z.jsx)("span", {
1715
+ }), /* @__PURE__ */ (0, Q.jsx)("span", {
1745
1716
  className: "text-foreground",
1746
1717
  children: "Response"
1747
1718
  })] })
1748
1719
  ]
1749
1720
  })]
1750
1721
  }),
1751
- /* @__PURE__ */ (0, Z.jsx)("div", {
1722
+ /* @__PURE__ */ (0, Q.jsx)("div", {
1752
1723
  className: "flex-1 relative overflow-hidden",
1753
- children: /* @__PURE__ */ (0, Z.jsxs)(m, {
1724
+ children: /* @__PURE__ */ (0, Q.jsxs)(h, {
1754
1725
  initial: !1,
1755
1726
  mode: "popLayout",
1756
1727
  children: [
1757
- Q === "list" && /* @__PURE__ */ (0, Z.jsx)(s.div, {
1728
+ $ === "list" && /* @__PURE__ */ (0, Q.jsx)(r.div, {
1758
1729
  initial: { x: "-100%" },
1759
1730
  animate: { x: 0 },
1760
1731
  exit: { x: "-100%" },
@@ -1764,41 +1735,41 @@ function at({ ref: e, tools: t, callTool: n, readResource: r, serverId: i, isCon
1764
1735
  damping: 30
1765
1736
  },
1766
1737
  className: "absolute inset-0 flex flex-col bg-background z-0",
1767
- 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, {
1768
1739
  isScrolled: e,
1769
1740
  activeTab: w,
1770
- isSearchExpanded: Y,
1741
+ isSearchExpanded: Pe,
1771
1742
  searchQuery: S,
1772
1743
  primaryTabName: "tools",
1773
1744
  secondaryTabName: "saved",
1774
1745
  primaryTabTitle: "Tools",
1775
1746
  secondaryTabTitle: "Saved",
1776
- primaryCount: V.length,
1747
+ primaryCount: K.length,
1777
1748
  secondaryCount: E.length,
1778
- primaryIcon: de,
1779
- secondaryIcon: F,
1749
+ primaryIcon: ue,
1750
+ secondaryIcon: P,
1780
1751
  searchPlaceholder: "Search tools...",
1781
- onSearchExpand: () => Se(!0),
1752
+ onSearchExpand: () => Ie(!0),
1782
1753
  onSearchChange: C,
1783
- onSearchBlur: je,
1754
+ onSearchBlur: Ke,
1784
1755
  onTabSwitch: () => T(w === "tools" ? "saved" : "tools"),
1785
- searchInputRef: Te,
1786
- onRefresh: o ? Pe : void 0,
1787
- isRefreshing: Ae
1788
- }), w === "tools" ? /* @__PURE__ */ (0, Z.jsx)(Ge, {
1789
- 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,
1790
1761
  selectedTool: c,
1791
- onToolSelect: H,
1792
- focusedIndex: Ce
1793
- }) : /* @__PURE__ */ (0, Z.jsx)(Ee, {
1762
+ onToolSelect: se,
1763
+ focusedIndex: Re
1764
+ }) : /* @__PURE__ */ (0, Q.jsx)(we, {
1794
1765
  savedRequests: E,
1795
- selectedRequest: d,
1796
- onLoadRequest: G,
1797
- onDeleteRequest: ze,
1798
- focusedIndex: Ce
1766
+ selectedRequest: u,
1767
+ onLoadRequest: le,
1768
+ onDeleteRequest: st,
1769
+ focusedIndex: Re
1799
1770
  })] }) })
1800
1771
  }, "list"),
1801
- Q === "detail" && /* @__PURE__ */ (0, Z.jsx)(s.div, {
1772
+ $ === "detail" && /* @__PURE__ */ (0, Q.jsx)(r.div, {
1802
1773
  initial: { x: "100%" },
1803
1774
  animate: { x: 0 },
1804
1775
  exit: { x: "-100%" },
@@ -1808,23 +1779,23 @@ function at({ ref: e, tools: t, callTool: n, readResource: r, serverId: i, isCon
1808
1779
  damping: 30
1809
1780
  },
1810
1781
  className: "absolute inset-0 bg-background z-10",
1811
- children: /* @__PURE__ */ (0, Z.jsx)(Le, {
1782
+ children: /* @__PURE__ */ (0, Q.jsx)(Le, {
1812
1783
  selectedTool: c,
1813
1784
  toolArgs: g,
1814
- payloadToSend: q,
1815
- isExecuting: ue,
1816
- isConnected: a,
1817
- onArgChange: K,
1818
- onExecute: J,
1819
- onSave: Ie,
1820
- onBulkPaste: oe,
1821
- 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,
1822
1793
  setFields: v,
1823
1794
  sendEmptyFields: b,
1824
- onToggleEmpty: ae
1795
+ onToggleEmpty: de
1825
1796
  })
1826
1797
  }, "detail"),
1827
- Q === "response" && /* @__PURE__ */ (0, Z.jsx)(s.div, {
1798
+ $ === "response" && /* @__PURE__ */ (0, Q.jsx)(r.div, {
1828
1799
  initial: { x: "100%" },
1829
1800
  animate: { x: 0 },
1830
1801
  exit: { x: "100%" },
@@ -1834,228 +1805,235 @@ function at({ ref: e, tools: t, callTool: n, readResource: r, serverId: i, isCon
1834
1805
  damping: 30
1835
1806
  },
1836
1807
  className: "absolute inset-0 bg-background z-20",
1837
- children: /* @__PURE__ */ (0, Z.jsx)(We, {
1838
- results: ve,
1839
- copiedResult: fe,
1840
- serverId: i,
1841
- readResource: r,
1842
- onCopy: pe,
1843
- onDelete: me,
1844
- onFullscreen: _e,
1845
- 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
1846
1817
  })
1847
1818
  }, "response")
1848
1819
  ]
1849
1820
  })
1850
1821
  }),
1851
- /* @__PURE__ */ (0, Z.jsx)(De, {
1822
+ /* @__PURE__ */ (0, Q.jsx)(Te, {
1852
1823
  isOpen: O,
1853
1824
  requestName: A,
1854
1825
  defaultPlaceholder: `${c?.name} - ${(/* @__PURE__ */ new Date()).toLocaleString()}`,
1855
1826
  onRequestNameChange: j,
1856
- onSave: Re,
1827
+ onSave: ot,
1857
1828
  onCancel: () => k(!1)
1858
1829
  }),
1859
- /* @__PURE__ */ (0, Z.jsx)(qe, {
1830
+ /* @__PURE__ */ (0, Q.jsx)(Ge, {
1860
1831
  open: N.open,
1861
1832
  onOpenChange: (e) => {
1862
- e || ce();
1833
+ e || J();
1863
1834
  },
1864
- 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", {
1865
1836
  className: "mb-3",
1866
- children: [/* @__PURE__ */ (0, Z.jsx)("p", {
1837
+ children: [/* @__PURE__ */ (0, Q.jsx)("p", {
1867
1838
  className: "font-medium mb-2",
1868
1839
  children: "The following fields will be updated:"
1869
- }), /* @__PURE__ */ (0, Z.jsx)("ul", {
1840
+ }), /* @__PURE__ */ (0, Q.jsx)("ul", {
1870
1841
  className: "text-sm space-y-1 max-h-[200px] overflow-y-auto",
1871
- 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", {
1872
1843
  className: "font-mono",
1873
1844
  children: [
1874
- /* @__PURE__ */ (0, Z.jsxs)("span", {
1845
+ /* @__PURE__ */ (0, Q.jsxs)("span", {
1875
1846
  className: "font-semibold",
1876
1847
  children: [e, ":"]
1877
1848
  }),
1878
1849
  " ",
1879
- /* @__PURE__ */ (0, Z.jsx)("span", {
1850
+ /* @__PURE__ */ (0, Q.jsx)("span", {
1880
1851
  className: "text-red-600 dark:text-red-400 line-through",
1881
1852
  children: typeof t == "object" ? JSON.stringify(t).substring(0, 30) + "..." : String(t).substring(0, 30)
1882
1853
  }),
1883
1854
  " ",
1884
1855
  "→",
1885
1856
  " ",
1886
- /* @__PURE__ */ (0, Z.jsx)("span", {
1857
+ /* @__PURE__ */ (0, Q.jsx)("span", {
1887
1858
  className: "text-green-600 dark:text-green-400",
1888
1859
  children: typeof n == "string" && n.length > 30 ? n.substring(0, 30) + "..." : String(n).substring(0, 30)
1889
1860
  })
1890
1861
  ]
1891
1862
  }, e))
1892
1863
  })]
1893
- }), 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", {
1894
1865
  className: "font-medium mb-1",
1895
1866
  children: "New fields to be filled:"
1896
- }), /* @__PURE__ */ (0, Z.jsx)("p", {
1867
+ }), /* @__PURE__ */ (0, Q.jsx)("p", {
1897
1868
  className: "text-sm font-mono",
1898
1869
  children: N.newFields.join(", ")
1899
- })] })] })] }), /* @__PURE__ */ (0, Z.jsxs)(Qe, { children: [/* @__PURE__ */ (0, Z.jsx)(nt, {
1900
- onClick: ce,
1870
+ })] })] })] }), /* @__PURE__ */ (0, Q.jsxs)(Xe, { children: [/* @__PURE__ */ (0, Q.jsx)(et, {
1871
+ onClick: J,
1901
1872
  children: "Cancel"
1902
- }), /* @__PURE__ */ (0, Z.jsx)(tt, {
1903
- onClick: se,
1873
+ }), /* @__PURE__ */ (0, Q.jsx)($e, {
1874
+ onClick: pe,
1904
1875
  children: "Auto-fill"
1905
1876
  })] })] })
1906
1877
  })
1907
1878
  ]
1908
- }) : /* @__PURE__ */ (0, Z.jsxs)(re, {
1879
+ }) : /* @__PURE__ */ (0, Q.jsxs)(G, {
1909
1880
  orientation: "horizontal",
1910
1881
  className: "h-full",
1911
1882
  children: [
1912
- /* @__PURE__ */ (0, Z.jsx)(U, {
1883
+ /* @__PURE__ */ (0, Q.jsx)(H, {
1913
1884
  id: "left-panel",
1914
1885
  defaultSize: "33%",
1915
1886
  minSize: 250,
1916
1887
  collapsedSize: 0,
1917
1888
  collapsible: !0,
1918
1889
  className: "flex flex-col h-full relative",
1919
- panelRef: R,
1920
- children: /* @__PURE__ */ (0, Z.jsx)("div", {
1921
- className: "flex h-full flex-col overflow-hidden border-r dark:border-zinc-700",
1922
- 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, {
1923
1894
  isScrolled: e,
1924
1895
  activeTab: w,
1925
- isSearchExpanded: Y,
1896
+ isSearchExpanded: Pe,
1926
1897
  searchQuery: S,
1927
1898
  primaryTabName: "tools",
1928
1899
  secondaryTabName: "saved",
1929
1900
  primaryTabTitle: "Tools",
1930
1901
  secondaryTabTitle: "Saved",
1931
- primaryCount: V.length,
1902
+ primaryCount: K.length,
1932
1903
  secondaryCount: E.length,
1933
- primaryIcon: de,
1934
- secondaryIcon: F,
1904
+ primaryIcon: ue,
1905
+ secondaryIcon: P,
1935
1906
  searchPlaceholder: "Search tools...",
1936
- onSearchExpand: () => Se(!0),
1907
+ onSearchExpand: () => Ie(!0),
1937
1908
  onSearchChange: C,
1938
- onSearchBlur: je,
1909
+ onSearchBlur: Ke,
1939
1910
  onTabSwitch: () => T(w === "tools" ? "saved" : "tools"),
1940
- searchInputRef: Te,
1941
- onRefresh: o ? Pe : void 0,
1942
- isRefreshing: Ae
1943
- }), w === "tools" ? /* @__PURE__ */ (0, Z.jsx)(Ge, {
1944
- 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,
1945
1916
  selectedTool: c,
1946
- onToolSelect: H,
1947
- focusedIndex: Ce
1948
- }) : /* @__PURE__ */ (0, Z.jsx)(Ee, {
1917
+ onToolSelect: se,
1918
+ focusedIndex: Re
1919
+ }) : /* @__PURE__ */ (0, Q.jsx)(we, {
1949
1920
  savedRequests: E,
1950
- selectedRequest: d,
1951
- onLoadRequest: G,
1952
- onDeleteRequest: ze,
1953
- focusedIndex: Ce
1921
+ selectedRequest: u,
1922
+ onLoadRequest: le,
1923
+ onDeleteRequest: st,
1924
+ focusedIndex: Re
1954
1925
  })] }) })
1955
1926
  })
1956
1927
  }),
1957
- /* @__PURE__ */ (0, Z.jsx)(ne, { withHandle: !0 }),
1958
- /* @__PURE__ */ (0, Z.jsx)(U, {
1928
+ /* @__PURE__ */ (0, Q.jsx)(U, { withHandle: !0 }),
1929
+ /* @__PURE__ */ (0, Q.jsx)(H, {
1959
1930
  defaultSize: "67%",
1960
- children: /* @__PURE__ */ (0, Z.jsxs)(re, {
1931
+ children: /* @__PURE__ */ (0, Q.jsxs)(G, {
1961
1932
  orientation: "vertical",
1933
+ elementRef: V,
1934
+ onLayoutChanged: Ae,
1962
1935
  children: [
1963
- /* @__PURE__ */ (0, Z.jsx)(U, {
1936
+ /* @__PURE__ */ (0, Q.jsx)(H, {
1937
+ id: "tool-params",
1964
1938
  defaultSize: "40%",
1939
+ minSize: `${rt}px`,
1965
1940
  collapsible: !0,
1966
1941
  panelRef: z,
1967
- children: /* @__PURE__ */ (0, Z.jsx)(Le, {
1942
+ children: /* @__PURE__ */ (0, Q.jsx)(Le, {
1968
1943
  selectedTool: c,
1969
1944
  toolArgs: g,
1970
- payloadToSend: q,
1971
- isExecuting: ue,
1972
- isConnected: a,
1973
- onArgChange: K,
1974
- onExecute: J,
1975
- onSave: Ie,
1976
- onCancel: ye,
1977
- onBulkPaste: oe,
1978
- 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,
1979
1954
  setFields: v,
1980
1955
  sendEmptyFields: b,
1981
- onToggleEmpty: ae
1956
+ onToggleEmpty: de
1982
1957
  })
1983
1958
  }),
1984
- /* @__PURE__ */ (0, Z.jsx)(ne, { withHandle: !0 }),
1985
- /* @__PURE__ */ (0, Z.jsx)(U, {
1959
+ /* @__PURE__ */ (0, Q.jsx)(U, { withHandle: !0 }),
1960
+ /* @__PURE__ */ (0, Q.jsx)(H, {
1961
+ id: "tool-result",
1986
1962
  defaultSize: "60%",
1987
- children: /* @__PURE__ */ (0, Z.jsx)("div", {
1963
+ panelRef: B,
1964
+ children: /* @__PURE__ */ (0, Q.jsx)("div", {
1988
1965
  className: "flex flex-col h-full",
1989
- children: /* @__PURE__ */ (0, Z.jsx)(We, {
1990
- results: ve,
1991
- copiedResult: fe,
1992
- serverId: i,
1993
- readResource: r,
1994
- onCopy: pe,
1995
- onDelete: me,
1996
- onFullscreen: _e,
1997
- 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,
1998
1975
  isMaximized: M,
1999
- onRerunTool: J
1976
+ onRerunTool: X,
1977
+ onWidgetHeightChange: je
2000
1978
  })
2001
1979
  })
2002
1980
  })
2003
1981
  ]
2004
1982
  })
2005
1983
  }),
2006
- /* @__PURE__ */ (0, Z.jsx)(De, {
1984
+ /* @__PURE__ */ (0, Q.jsx)(Te, {
2007
1985
  isOpen: O,
2008
1986
  requestName: A,
2009
1987
  defaultPlaceholder: `${c?.name} - ${(/* @__PURE__ */ new Date()).toLocaleString()}`,
2010
1988
  onRequestNameChange: j,
2011
- onSave: Re,
1989
+ onSave: ot,
2012
1990
  onCancel: () => k(!1)
2013
1991
  }),
2014
- /* @__PURE__ */ (0, Z.jsx)(qe, {
1992
+ /* @__PURE__ */ (0, Q.jsx)(Ge, {
2015
1993
  open: N.open,
2016
1994
  onOpenChange: (e) => {
2017
- e || ce();
1995
+ e || J();
2018
1996
  },
2019
- 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", {
2020
1998
  className: "mb-3",
2021
- children: [/* @__PURE__ */ (0, Z.jsx)("p", {
1999
+ children: [/* @__PURE__ */ (0, Q.jsx)("p", {
2022
2000
  className: "font-medium mb-2",
2023
2001
  children: "The following fields will be updated:"
2024
- }), /* @__PURE__ */ (0, Z.jsx)("ul", {
2002
+ }), /* @__PURE__ */ (0, Q.jsx)("ul", {
2025
2003
  className: "text-sm space-y-1 max-h-[200px] overflow-y-auto",
2026
- 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", {
2027
2005
  className: "font-mono",
2028
2006
  children: [
2029
- /* @__PURE__ */ (0, Z.jsxs)("span", {
2007
+ /* @__PURE__ */ (0, Q.jsxs)("span", {
2030
2008
  className: "font-semibold",
2031
2009
  children: [e, ":"]
2032
2010
  }),
2033
2011
  " ",
2034
- /* @__PURE__ */ (0, Z.jsx)("span", {
2012
+ /* @__PURE__ */ (0, Q.jsx)("span", {
2035
2013
  className: "text-red-600 dark:text-red-400 line-through",
2036
2014
  children: typeof t == "object" ? JSON.stringify(t).substring(0, 30) + "..." : String(t).substring(0, 30)
2037
2015
  }),
2038
2016
  " ",
2039
2017
  "→",
2040
2018
  " ",
2041
- /* @__PURE__ */ (0, Z.jsx)("span", {
2019
+ /* @__PURE__ */ (0, Q.jsx)("span", {
2042
2020
  className: "text-green-600 dark:text-green-400",
2043
2021
  children: typeof n == "string" && n.length > 30 ? n.substring(0, 30) + "..." : String(n).substring(0, 30)
2044
2022
  })
2045
2023
  ]
2046
2024
  }, e))
2047
2025
  })]
2048
- }), 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", {
2049
2027
  className: "font-medium mb-1",
2050
2028
  children: "New fields to be filled:"
2051
- }), /* @__PURE__ */ (0, Z.jsx)("p", {
2029
+ }), /* @__PURE__ */ (0, Q.jsx)("p", {
2052
2030
  className: "text-sm font-mono",
2053
2031
  children: N.newFields.join(", ")
2054
- })] })] })] }), /* @__PURE__ */ (0, Z.jsxs)(Qe, { children: [/* @__PURE__ */ (0, Z.jsx)(nt, {
2055
- onClick: ce,
2032
+ })] })] })] }), /* @__PURE__ */ (0, Q.jsxs)(Xe, { children: [/* @__PURE__ */ (0, Q.jsx)(et, {
2033
+ onClick: J,
2056
2034
  children: "Cancel"
2057
- }), /* @__PURE__ */ (0, Z.jsx)(tt, {
2058
- onClick: se,
2035
+ }), /* @__PURE__ */ (0, Q.jsx)($e, {
2036
+ onClick: pe,
2059
2037
  children: "Auto-fill"
2060
2038
  })] })] })
2061
2039
  })