@marimo-team/islands 0.23.7-dev2 → 0.23.7-dev22

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 (511) hide show
  1. package/dist/{ConnectedDataExplorerComponent-PmilQqXR.js → ConnectedDataExplorerComponent-2lBNiUv6.js} +14 -14
  2. package/dist/{ErrorBoundary-Da4UeYxT.js → ErrorBoundary-D3wrPNma.js} +1 -1
  3. package/dist/{any-language-editor-BVR0l12r.js → any-language-editor-VWs_7v27.js} +15 -15
  4. package/dist/apl-Bdc61P1y.js +4 -0
  5. package/dist/{arc-CHF8PiiF.js → arc-DfkSnvZm.js} +2 -2
  6. package/dist/{architecture-7HQA4BMR-D0JB_3hE.js → architecture-7HQA4BMR-CS9jOrqM.js} +1 -1
  7. package/dist/{architectureDiagram-VXUJARFQ-BXQEUDtK.js → architectureDiagram-VXUJARFQ-CXVJxFhH.js} +16 -16
  8. package/dist/asciiarmor-DVRHDGzT.js +4 -0
  9. package/dist/asn1-BmuKfkfu.js +4 -0
  10. package/dist/assets/__vite-browser-external-CAdMKBac.js +1 -0
  11. package/dist/assets/worker-CpBbwbQo.js +73 -0
  12. package/dist/{blockDiagram-VD42YOAC-DhJe-Y9i.js → blockDiagram-VD42YOAC-DGDaxR8I.js} +11 -11
  13. package/dist/brainfuck-DPrRpyTV.js +4 -0
  14. package/dist/{button-CA5pI2YF.js → button-Dj4BTre0.js} +5 -0
  15. package/dist/{c4Diagram-YG6GDRKO-9dSfzOFR.js → c4Diagram-YG6GDRKO-C2hc6ne8.js} +5 -5
  16. package/dist/{capabilities-6laDasij.js → capabilities-C9rrYCzf.js} +1 -1
  17. package/dist/{channel-MqYIiKgS.js → channel-BBoIVUrJ.js} +1 -1
  18. package/dist/{chat-ui-B-gbqk_F.js → chat-ui-Den2QMz-.js} +621 -235
  19. package/dist/{check-CFM2mVDr.js → check-BcUIXnUT.js} +1 -1
  20. package/dist/{chunk-4BX2VUAB-BwfrWBqN.js → chunk-4BX2VUAB-CzXltWHN.js} +1 -1
  21. package/dist/{chunk-55IACEB6-D8THf2mi.js → chunk-55IACEB6-B-1mjMMC.js} +1 -1
  22. package/dist/{chunk-5FQGJX7Z-CO1e63h_.js → chunk-5FQGJX7Z-BOg95xG5.js} +2 -2
  23. package/dist/{chunk-ABZYJK2D-BrBb_0yY.js → chunk-ABZYJK2D-D0cLy8Bb.js} +2 -2
  24. package/dist/{chunk-ATLVNIR6-D-0XqNah.js → chunk-ATLVNIR6-BXsEjlHF.js} +2 -2
  25. package/dist/{chunk-B4BG7PRW-8iRKvugR.js → chunk-B4BG7PRW-Q1usn6T3.js} +7 -7
  26. package/dist/{chunk-CVBHYZKI-B6xhgaBd.js → chunk-CVBHYZKI-B_c5YBcW.js} +1 -1
  27. package/dist/{chunk-DI55MBZ5-C0_2D4m4.js → chunk-DI55MBZ5-D1qLYNrb.js} +6 -6
  28. package/dist/{chunk-EXTU4WIE-Jiw9ca1u.js → chunk-EXTU4WIE-BKNXdLmD.js} +2 -2
  29. package/dist/{chunk-FMBD7UC4-CHdus51S.js → chunk-FMBD7UC4-Ie8M9q0W.js} +1 -1
  30. package/dist/{chunk-HN2XXSSU-2Vfbq-kU.js → chunk-HN2XXSSU-E3n-Ys7Z.js} +1 -1
  31. package/dist/{chunk-JA3XYJ7Z-6wbaigKe.js → chunk-JA3XYJ7Z-D6c6cOBG.js} +3 -3
  32. package/dist/{chunk-JZLCHNYA-_rfptlUP.js → chunk-JZLCHNYA-BvsPHJmL.js} +6 -6
  33. package/dist/{chunk-MI3HLSF2-Do0-KRc0.js → chunk-MI3HLSF2-CUYEasXO.js} +1 -1
  34. package/dist/{chunk-N4CR4FBY-DIZG9dVD.js → chunk-N4CR4FBY-8ycT-O9a.js} +7 -7
  35. package/dist/{chunk-QN33PNHL-Cc64y40m.js → chunk-QN33PNHL-Bb-eUBW3.js} +2 -2
  36. package/dist/{chunk-QXUST7PY-BDG0-0Or.js → chunk-QXUST7PY-DV8yRwBd.js} +10 -10
  37. package/dist/{chunk-QZHKN3VN-B_Mdb8GC.js → chunk-QZHKN3VN-DRjXVwuJ.js} +1 -1
  38. package/dist/{chunk-S3R3BYOJ-DphMP0FA.js → chunk-S3R3BYOJ-mQeCz5CE.js} +4 -4
  39. package/dist/{chunk-TZMSLE5B-C9LUoYkc.js → chunk-TZMSLE5B-BqW10dHe.js} +3 -3
  40. package/dist/classDiagram-2ON5EDUG--Yh__LHb.js +30 -0
  41. package/dist/classDiagram-v2-WZHVMYZB-BC7X7Xtc.js +30 -0
  42. package/dist/{clike-sBZrGeF8.js → clike-DTxNUn7l.js} +1 -1
  43. package/dist/clojure-DEttQW5T.js +4 -0
  44. package/dist/cmake-jNlx_DaM.js +4 -0
  45. package/dist/cobol-BvvIm5MJ.js +4 -0
  46. package/dist/{code-block-37QAKDTI-0JNwiPGv.js → code-block-37QAKDTI-BsGy1AOJ.js} +1 -1
  47. package/dist/{code-visibility-BZocwq8O.js → code-visibility-geywCqhR.js} +573 -585
  48. package/dist/coffeescript-DTpBMyFU.js +4 -0
  49. package/dist/commonlisp-BmmUG8jb.js +4 -0
  50. package/dist/{copy-TGGAUEWp.js → copy-DLf4aN7I.js} +2 -2
  51. package/dist/{cose-bilkent-S5V4N54A-DXHZkJKX.js → cose-bilkent-S5V4N54A-kjoZoid4.js} +2 -2
  52. package/dist/crystal-BxyqmEWC.js +4 -0
  53. package/dist/css-BGoCtuG3.js +4 -0
  54. package/dist/cypher-BmCbdl3u.js +4 -0
  55. package/dist/d-CFrlbjZt.js +4 -0
  56. package/dist/{dagre-6UL2VRFP-tH87fkPA.js → dagre-6UL2VRFP-DRBWoQUw.js} +10 -10
  57. package/dist/{data-grid-overlay-editor-CWUN78-s.js → data-grid-overlay-editor-efe5ZagF.js} +2 -2
  58. package/dist/{diagram-PSM6KHXK-2VjPSCDn.js → diagram-PSM6KHXK-H66ATWP2.js} +18 -18
  59. package/dist/{diagram-QEK2KX5R-CiLmNyta.js → diagram-QEK2KX5R-DItl5Wns.js} +14 -14
  60. package/dist/{diagram-S2PKOQOG-Zha_1CLx.js → diagram-S2PKOQOG-CtuW_ZuL.js} +14 -14
  61. package/dist/diff-D6XwL6P8.js +4 -0
  62. package/dist/{dist-Brkazupz.js → dist--sWVZwjW.js} +1 -1
  63. package/dist/{dist-FN0ZA_8F.js → dist-21ButRCu.js} +1 -1
  64. package/dist/{dist-BetEKbPG.js → dist-B8RaFTRF.js} +1 -1
  65. package/dist/dist-BoHGySTM.js +5 -0
  66. package/dist/dist-ByAz19Qc.js +5 -0
  67. package/dist/dist-C93EysN4.js +5 -0
  68. package/dist/{dist-BHnX0ia_.js → dist-CY-lVor6.js} +1 -1
  69. package/dist/{dist-YP-G7W0f.js → dist-CYDuv4bR.js} +1 -1
  70. package/dist/{dist-CMjD5MQb.js → dist-Cfo5EE2t.js} +1 -1
  71. package/dist/dist-CjivSDvN.js +5 -0
  72. package/dist/dist-Cqwx-MH7.js +5 -0
  73. package/dist/{dist-ESg7xyoD.js → dist-D3ZI9nhS.js} +2 -2
  74. package/dist/{dist-DkC6YEo0.js → dist-DMZNjfX4.js} +1 -1
  75. package/dist/{dist-ChC1BhqM.js → dist-DbpcoFAV.js} +1 -1
  76. package/dist/dist-FUNenbiQ.js +5 -0
  77. package/dist/{dist-BEOU2g1b.js → dist-zhSud5X3.js} +1 -1
  78. package/dist/{dockerfile-COvlVLcE.js → dockerfile-twL37N91.js} +1 -1
  79. package/dist/dtd-Bw0lRN0-.js +4 -0
  80. package/dist/dylan-B55eBHTt.js +4 -0
  81. package/dist/ecl-C8G4p0wn.js +4 -0
  82. package/dist/eiffel-BmH46VJl.js +4 -0
  83. package/dist/elm-DhzeFqkl.js +4 -0
  84. package/dist/{erDiagram-Q2GNP2WA-biHZS05w.js → erDiagram-Q2GNP2WA--19X2kU5.js} +14 -14
  85. package/dist/erlang-CY-wdlsU.js +4 -0
  86. package/dist/{error-banner-DnBPzEWg.js → error-banner-CVkfBUT3.js} +2 -2
  87. package/dist/{esm-Dd1z1auZ.js → esm-CWp0KQeK.js} +1 -1
  88. package/dist/{esm-CYEyrE3Y.js → esm-DjNnlmpf.js} +96 -96
  89. package/dist/{extends-CzJgxo2J.js → extends-vAi97cpa.js} +4 -4
  90. package/dist/{factor-C2GT7jfQ.js → factor-CajWS6mS.js} +1 -1
  91. package/dist/factor-DWkgl0xw.js +4 -0
  92. package/dist/{flowDiagram-NV44I4VS-CWWlUpBR.js → flowDiagram-NV44I4VS-DQmWlo7f.js} +16 -16
  93. package/dist/{formats-CgaK7Gmx.js → formats-CpgZM9BM.js} +3 -3
  94. package/dist/forth-Cij_ie2t.js +4 -0
  95. package/dist/fortran-Br3X9cfm.js +4 -0
  96. package/dist/{ganttDiagram-JELNMOA3-D7B2c4Z9.js → ganttDiagram-JELNMOA3-BOGXJ8Lk.js} +7 -7
  97. package/dist/gas-DYsGcMN2.js +4 -0
  98. package/dist/gherkin-eVgXQ0fQ.js +4 -0
  99. package/dist/{gitGraph-G5XIXVHT-BdepdFa_.js → gitGraph-G5XIXVHT-DGlbae5m.js} +1 -1
  100. package/dist/{gitGraphDiagram-V2S2FVAM-CtLvNR1S.js → gitGraphDiagram-V2S2FVAM-DjzxfF0P.js} +14 -14
  101. package/dist/{glide-data-editor-CvlvtPWJ.js → glide-data-editor-BK9s_dqy.js} +13 -13
  102. package/dist/groovy-_NFHIXG7.js +4 -0
  103. package/dist/haskell-D6xNG_bH.js +4 -0
  104. package/dist/haxe-sU_rzAwn.js +5 -0
  105. package/dist/{html-to-image-hMMPiNe_.js → html-to-image-DxWM1HVj.js} +2395 -2301
  106. package/dist/idl-Ds_VbrUx.js +4 -0
  107. package/dist/{info-VBDWY6EO--JNA2rNu.js → info-VBDWY6EO-D2lvLLw5.js} +1 -1
  108. package/dist/{infoDiagram-HS3SLOUP-BbZyOxsP.js → infoDiagram-HS3SLOUP-ChNufFsP.js} +12 -12
  109. package/dist/{input-BAOe64zx.js → input-Cc1Vvw9A.js} +6 -6
  110. package/dist/javascript-CztfIl0i.js +4 -0
  111. package/dist/{journeyDiagram-XKPGCS4Q-BU2mjjzl.js → journeyDiagram-XKPGCS4Q-BO_O4Ij1.js} +6 -6
  112. package/dist/julia-DDv40QMV.js +4 -0
  113. package/dist/{kanban-definition-3W4ZIXB7-BlmczUuw.js → kanban-definition-3W4ZIXB7-CPpiiiWk.js} +11 -11
  114. package/dist/{katex-qPqrBHZ8.js → katex-9-9QRhxz.js} +1 -1
  115. package/dist/{label-BCWi-Oqu.js → label-BLqV33b1.js} +2 -2
  116. package/dist/{line-BWRi3U3S.js → line-C5s_12ee.js} +3 -3
  117. package/dist/{linear-DnHwODZa.js → linear-2NnK4cxi.js} +2 -2
  118. package/dist/livescript-BEOngLLc.js +4 -0
  119. package/dist/{loader-BvW0-YWZ.js → loader-Dr8Qem8p.js} +1 -1
  120. package/dist/lua-9-7BhQ4Y.js +4 -0
  121. package/dist/main.js +1181 -1144
  122. package/dist/mathematica-DDa0Pfxm.js +4 -0
  123. package/dist/mbox-iO03mmoE.js +4 -0
  124. package/dist/{mermaid-4DMBBIKO-CG1ECj5W.js → mermaid-4DMBBIKO-B7VQMwJx.js} +1 -1
  125. package/dist/{mermaid-DJ1NyBGw.js → mermaid-DO-Daq7u.js} +72 -69
  126. package/dist/{mermaid-parser.core-CleJseNW.js → mermaid-parser.core-DreccfmS.js} +7 -7
  127. package/dist/{mhchem-BwoRNwg_.js → mhchem-yiCCuiEF.js} +1 -1
  128. package/dist/{mindmap-definition-VGOIOE7T-CcSYqYP9.js → mindmap-definition-VGOIOE7T-CC1_Vl0f.js} +13 -13
  129. package/dist/mirc-C9z5LT4X.js +4 -0
  130. package/dist/mllike-jGJbdm_C.js +6 -0
  131. package/dist/modelica-DzF7oIEL.js +4 -0
  132. package/dist/mscgen-DB-u125o.js +6 -0
  133. package/dist/mumps-CRTFHhzh.js +4 -0
  134. package/dist/nsis-C4NPTuox.js +4 -0
  135. package/dist/{nsis-B5K1qoyo.js → nsis-ClF3r5Tr.js} +1 -1
  136. package/dist/ntriples-BCOoGph1.js +4 -0
  137. package/dist/{number-overlay-editor-_GnlYFHC.js → number-overlay-editor-CpKi64Fy.js} +1 -1
  138. package/dist/octave-DTwNlazz.js +4 -0
  139. package/dist/{ordinal-2jIulmcR.js → ordinal-B43ZeR68.js} +1 -1
  140. package/dist/oz-DD38AzSz.js +4 -0
  141. package/dist/{packet-DYOGHKS2-CBxXGWNr.js → packet-DYOGHKS2-CmWtF3uO.js} +1 -1
  142. package/dist/pascal-BohSp9jV.js +4 -0
  143. package/dist/perl-f5OutoPM.js +4 -0
  144. package/dist/{pie-VRWISCQL-Bmdnqjip.js → pie-VRWISCQL-B6u8vus8.js} +1 -1
  145. package/dist/{pieDiagram-ADFJNKIX-DNyLF5H2.js → pieDiagram-ADFJNKIX-Di34MOFQ.js} +19 -19
  146. package/dist/pig-Dv7wSmHb.js +4 -0
  147. package/dist/powershell-rYgjKB39.js +4 -0
  148. package/dist/{process-output-Bza_GK7Q.js → process-output-DBYxXdrN.js} +30 -25
  149. package/dist/properties-BFUNLRDN.js +4 -0
  150. package/dist/protobuf-B9QJQPPv.js +4 -0
  151. package/dist/{pug-tjbzJCFk.js → pug-B_rby2yb.js} +1 -1
  152. package/dist/pug-DzvWpaMC.js +4 -0
  153. package/dist/puppet-B_K-n_xK.js +4 -0
  154. package/dist/python-CAiFcaA2.js +4 -0
  155. package/dist/q-cLeFIBLK.js +4 -0
  156. package/dist/{quadrantDiagram-AYHSOK5B-rXwjifrj.js → quadrantDiagram-AYHSOK5B-B9kVk1ny.js} +3 -3
  157. package/dist/r-04Y-Wco3.js +4 -0
  158. package/dist/{radar-ZZBFDIW7-BmCWDffL.js → radar-ZZBFDIW7-XAmXSa8s.js} +1 -1
  159. package/dist/{react-vega-B-rkEqtS.js → react-vega-Cavbrg4l.js} +1 -1
  160. package/dist/{react-vega-k9ODWPlI.js → react-vega-Dh6-UKKe.js} +13 -13
  161. package/dist/{requirementDiagram-UZGBJVZJ-DBdrMVbs.js → requirementDiagram-UZGBJVZJ-BxGfGYEx.js} +13 -13
  162. package/dist/{reveal-component-CP9dWJEm.js → reveal-component-BYYXwJoo.js} +10 -10
  163. package/dist/rpm-FUdrIia9.js +5 -0
  164. package/dist/ruby-DMjFXuEW.js +4 -0
  165. package/dist/{sankeyDiagram-TZEHDZUN-CxmzalGv.js → sankeyDiagram-TZEHDZUN-D09PBJ-n.js} +4 -4
  166. package/dist/sas-DzHZxjXK.js +4 -0
  167. package/dist/scheme-DxHd_Rb9.js +4 -0
  168. package/dist/semaphore-CNDGTzkX.js +46 -0
  169. package/dist/{sequenceDiagram-WL72ISMW-CVCDsJ9h.js → sequenceDiagram-WL72ISMW-t_Dpemj0.js} +7 -7
  170. package/dist/shell-C8Kwypgf.js +4 -0
  171. package/dist/sieve-DdyqOKXZ.js +4 -0
  172. package/dist/smalltalk-pB7X1D9y.js +4 -0
  173. package/dist/sparql-NhBO6oOa.js +4 -0
  174. package/dist/{spec-DSIuqd3f.js → spec-hVaaZsY5.js} +4 -4
  175. package/dist/{src-BY0BGg6V.js → src-Bf2iLOlr.js} +1 -1
  176. package/dist/{stateDiagram-FKZM4ZOC-D_2djEhW.js → stateDiagram-FKZM4ZOC-B18gTP_j.js} +16 -16
  177. package/dist/stateDiagram-v2-4FDKWEC3-B6e_t14A.js +29 -0
  178. package/dist/{step-DGAGWg3y.js → step-CWipAYTY.js} +1 -1
  179. package/dist/{strings-B_FOH6eV.js → strings-BiIhGaI8.js} +4 -4
  180. package/dist/style.css +1 -1
  181. package/dist/stylus-SfWSnzPv.js +4 -0
  182. package/dist/swift-jRPdq2zR.js +4 -0
  183. package/dist/{swiper-component-KkEVUDd3.js → swiper-component-DlD2GU2g.js} +2 -2
  184. package/dist/tcl-_hpTHGX3.js +4 -0
  185. package/dist/textile-C9h8slqH.js +4 -0
  186. package/dist/{time-CMdrp3hw.js → time-C1SGcFMH.js} +2 -2
  187. package/dist/{timeline-definition-IT6M3QCI-E4NzxCs3.js → timeline-definition-IT6M3QCI-DJnh1ks5.js} +3 -3
  188. package/dist/{toDate-CHtl9vts.js → toDate-CJWlVNGD.js} +3 -3
  189. package/dist/toml-DWvtinD4.js +4 -0
  190. package/dist/{tooltip-B0mtKTXm.js → tooltip-DRaMBu06.js} +3 -3
  191. package/dist/{treemap-GDKQZRPO-CoKHPxa7.js → treemap-GDKQZRPO-Du95DV6u.js} +1 -1
  192. package/dist/troff-Dwo_A0y7.js +4 -0
  193. package/dist/ttcn-V--CPFKq.js +4 -0
  194. package/dist/ttcn-cfg-CPSMchTG.js +4 -0
  195. package/dist/turtle-B4rPGBWu.js +4 -0
  196. package/dist/{types-DBtDeUKD.js → types-Dzuoc3LN.js} +1 -1
  197. package/dist/{useAsyncData-B6hCGywC.js → useAsyncData-C56Khv_R.js} +1 -1
  198. package/dist/{useDateFormatter-B3mCQMP3.js → useDateFormatter-B_9k85Ex.js} +2 -2
  199. package/dist/{useDeepCompareMemoize-CmwDuYUH.js → useDeepCompareMemoize-Dt98v2ua.js} +1 -1
  200. package/dist/{useIframeCapabilities-DbdLoEDm.js → useIframeCapabilities-BkYHTrss.js} +1 -1
  201. package/dist/{useLifecycle-CjMjllqy.js → useLifecycle-BF6-z62y.js} +3 -3
  202. package/dist/{useTheme-CByZUW0p.js → useTheme-DykuNHR2.js} +2 -2
  203. package/dist/vb-DaMBBd4j.js +4 -0
  204. package/dist/vbscript-BMJQqcE2.js +4 -0
  205. package/dist/{vega-component-CC8TqWWV.js → vega-component-BtvQ-Kc4.js} +26 -24
  206. package/dist/velocity-CGq2QRq2.js +4 -0
  207. package/dist/verilog-CUNo8F5u.js +4 -0
  208. package/dist/vhdl-CCzA0msW.js +4 -0
  209. package/dist/webidl-CqIMDIBL.js +4 -0
  210. package/dist/xquery-XC5Kbr-1.js +4 -0
  211. package/dist/{xychartDiagram-PRI3JC2R-CuxTvjw5.js → xychartDiagram-PRI3JC2R-Dk2d_bX0.js} +10 -10
  212. package/dist/yacas-CGOv7Dzy.js +4 -0
  213. package/dist/z80-CXhVmi-f.js +4 -0
  214. package/dist/{zod-BxdsqRPd.js → zod-BWkcDORu.js} +1 -1
  215. package/package.json +4 -4
  216. package/src/components/chat/chat-components.tsx +47 -0
  217. package/src/components/chat/chat-display.tsx +41 -7
  218. package/src/components/chat/chat-panel.tsx +37 -10
  219. package/src/components/chat/chat-utils.ts +42 -20
  220. package/src/components/chat/reasoning-accordion.tsx +14 -3
  221. package/src/components/chat/tool-call/shared.ts +13 -0
  222. package/src/components/chat/tool-call/tool-approval-card.tsx +62 -0
  223. package/src/components/chat/tool-call/tool-args.tsx +26 -0
  224. package/src/components/chat/tool-call/tool-call-view.tsx +99 -0
  225. package/src/components/chat/tool-call/tool-error-card.tsx +81 -0
  226. package/src/components/chat/tool-call/tool-history-row.tsx +153 -0
  227. package/src/components/chat/tool-call/tool-result.tsx +101 -0
  228. package/src/components/data-table/TableTopBar.tsx +5 -1
  229. package/src/components/data-table/data-table.tsx +5 -0
  230. package/src/components/data-table/download-policy/atoms.ts +10 -0
  231. package/src/components/data-table/export-actions.tsx +31 -4
  232. package/src/components/editor/actions/useNotebookActions.tsx +3 -1
  233. package/src/components/editor/app-container.tsx +7 -1
  234. package/src/components/editor/controls/Controls.tsx +3 -1
  235. package/src/components/editor/file-tree/requesting-tree.tsx +27 -25
  236. package/src/components/editor/file-tree/upload.tsx +23 -24
  237. package/src/components/editor/header/__tests__/status.test.tsx +108 -0
  238. package/src/components/editor/header/status.tsx +44 -10
  239. package/src/components/editor/navigation/__tests__/clipboard.test.ts +106 -0
  240. package/src/components/editor/navigation/__tests__/navigation.test.ts +70 -0
  241. package/src/components/editor/navigation/clipboard.ts +99 -25
  242. package/src/components/editor/navigation/navigation.ts +15 -1
  243. package/src/components/editor/notebook-cell.tsx +3 -0
  244. package/src/components/pages/run-page.tsx +4 -1
  245. package/src/core/ai/tools/__tests__/registry.test.ts +10 -12
  246. package/src/core/ai/tools/registry.ts +9 -5
  247. package/src/core/cells/__tests__/cells.test.ts +187 -0
  248. package/src/core/cells/__tests__/pending-cut-service.test.tsx +123 -0
  249. package/src/core/cells/cells.ts +102 -17
  250. package/src/core/cells/document-changes.ts +6 -1
  251. package/src/core/cells/pending-cut-service.ts +55 -0
  252. package/src/core/cells/utils.ts +11 -0
  253. package/src/core/codemirror/cells/extensions.ts +10 -0
  254. package/src/core/codemirror/markdown/__tests__/commands.test.ts +3 -3
  255. package/src/core/codemirror/markdown/commands.ts +1 -2
  256. package/src/core/edit-app.tsx +2 -1
  257. package/src/core/hotkeys/hotkeys.ts +5 -0
  258. package/src/core/islands/worker/worker.tsx +3 -2
  259. package/src/core/network/requests-network.ts +21 -3
  260. package/src/core/network/types.ts +12 -1
  261. package/src/core/run-app.tsx +2 -1
  262. package/src/core/wasm/__tests__/utils.test.ts +34 -0
  263. package/src/core/wasm/bridge.ts +14 -1
  264. package/src/core/wasm/utils.ts +14 -0
  265. package/src/core/wasm/worker/bootstrap.ts +3 -2
  266. package/src/core/wasm/worker/worker.ts +3 -2
  267. package/src/core/websocket/__tests__/useMarimoKernelConnection.hook.test.tsx +155 -0
  268. package/src/core/websocket/__tests__/useMarimoKernelConnection.test.ts +137 -0
  269. package/src/core/websocket/transports/basic.ts +2 -0
  270. package/src/core/websocket/transports/transport.ts +1 -0
  271. package/src/core/websocket/useMarimoKernelConnection.tsx +130 -55
  272. package/src/core/websocket/useWebSocket.tsx +5 -2
  273. package/src/css/app/Cell.css +10 -0
  274. package/src/plugins/core/__test__/sanitize.test.ts +8 -0
  275. package/src/plugins/impl/DataTablePlugin.tsx +12 -0
  276. package/src/plugins/impl/TabsPlugin.tsx +35 -7
  277. package/src/plugins/impl/__tests__/TabsPlugin.test.tsx +154 -0
  278. package/src/plugins/impl/data-frames/DataFramePlugin.tsx +6 -0
  279. package/src/plugins/impl/vega/resolve-data.ts +8 -1
  280. package/src/plugins/layout/__test__/MermaidPlugin.test.ts +50 -0
  281. package/src/plugins/layout/mermaid/MermaidPlugin.tsx +11 -1
  282. package/src/plugins/layout/mermaid/mermaid.tsx +7 -3
  283. package/src/utils/__tests__/id-tree.test.ts +71 -0
  284. package/src/utils/__tests__/semaphore.test.ts +218 -0
  285. package/src/utils/fileToBase64.ts +8 -7
  286. package/src/utils/id-tree.tsx +89 -0
  287. package/src/utils/semaphore.ts +88 -0
  288. package/dist/apl-BKoVld9y.js +0 -4
  289. package/dist/asciiarmor-DQrKIjoo.js +0 -4
  290. package/dist/asn1-BZvnj0dq.js +0 -4
  291. package/dist/assets/__vite-browser-external-rrUYDKRl.js +0 -1
  292. package/dist/assets/worker-Bfy15ViQ.js +0 -73
  293. package/dist/brainfuck-D558nlUv.js +0 -4
  294. package/dist/classDiagram-2ON5EDUG-CBHMR6ZU.js +0 -30
  295. package/dist/classDiagram-v2-WZHVMYZB-BsUtUGM_.js +0 -30
  296. package/dist/clojure-Cq8mTSrE.js +0 -4
  297. package/dist/cmake-D8HCovWK.js +0 -4
  298. package/dist/cobol-UolN-9iU.js +0 -4
  299. package/dist/coffeescript-VdNuWrt5.js +0 -4
  300. package/dist/commonlisp-ALX7fpDc.js +0 -4
  301. package/dist/crystal-PbyO9Q_s.js +0 -4
  302. package/dist/css-DFklJkr_.js +0 -4
  303. package/dist/cypher-BifNeYlv.js +0 -4
  304. package/dist/d-BA-JP4PJ.js +0 -4
  305. package/dist/diff-CtkDpav4.js +0 -4
  306. package/dist/dist-BuBwsFva.js +0 -5
  307. package/dist/dist-BzmEQ9u7.js +0 -5
  308. package/dist/dist-Cih01ssx.js +0 -5
  309. package/dist/dist-CqfONiY9.js +0 -5
  310. package/dist/dist-D0iD0Fi9.js +0 -5
  311. package/dist/dist-DtNLXm8d.js +0 -5
  312. package/dist/dtd-DW3_UFEG.js +0 -4
  313. package/dist/dylan-pDhodO2N.js +0 -4
  314. package/dist/ecl-BJT8-YD7.js +0 -4
  315. package/dist/eiffel-Dmns-9vS.js +0 -4
  316. package/dist/elm-Da4sO4Bz.js +0 -4
  317. package/dist/erlang-C-zBsDi7.js +0 -4
  318. package/dist/factor-4xPWlWB5.js +0 -4
  319. package/dist/forth-l-c75zSd.js +0 -4
  320. package/dist/fortran-DIujSODW.js +0 -4
  321. package/dist/gas-CXnG5g_b.js +0 -4
  322. package/dist/gherkin-VPeqd4-X.js +0 -4
  323. package/dist/groovy-CphhZQgg.js +0 -4
  324. package/dist/haskell-CCvlS5Iq.js +0 -4
  325. package/dist/haxe-C_bi66fP.js +0 -5
  326. package/dist/idl-1DcP4Dm8.js +0 -4
  327. package/dist/javascript-DUIGhBvO.js +0 -4
  328. package/dist/julia-Cs2G4PQi.js +0 -4
  329. package/dist/livescript-DMtVFaAN.js +0 -4
  330. package/dist/lua-BAoLtdJg.js +0 -4
  331. package/dist/mathematica-C_NoFtbo.js +0 -4
  332. package/dist/mbox-DcFJFYrH.js +0 -4
  333. package/dist/mirc-71dccf_u.js +0 -4
  334. package/dist/mllike-CWcOFVDq.js +0 -6
  335. package/dist/modelica-Ape2VXxx.js +0 -4
  336. package/dist/mscgen-Cc6TwbSN.js +0 -6
  337. package/dist/mumps-h-ZbdkJ9.js +0 -4
  338. package/dist/nsis-C0p3m7JW.js +0 -4
  339. package/dist/ntriples-c9lEeT5w.js +0 -4
  340. package/dist/octave-DzEgB_74.js +0 -4
  341. package/dist/oz-CAxvHkyQ.js +0 -4
  342. package/dist/pascal-BJzu1sgP.js +0 -4
  343. package/dist/perl--IrOzZ2Z.js +0 -4
  344. package/dist/pig-CiBKKNhC.js +0 -4
  345. package/dist/powershell-KY0j6Qop.js +0 -4
  346. package/dist/properties-BW8q3ziV.js +0 -4
  347. package/dist/protobuf-BGaeuTGV.js +0 -4
  348. package/dist/pug-DjOKK-4J.js +0 -4
  349. package/dist/puppet-DWm2o6zX.js +0 -4
  350. package/dist/python-Bp2gezZy.js +0 -4
  351. package/dist/q-DljPshos.js +0 -4
  352. package/dist/r-BajPMnEu.js +0 -4
  353. package/dist/rpm-BKx-ZZ62.js +0 -5
  354. package/dist/ruby-DJq_HNKc.js +0 -4
  355. package/dist/sas-WANvpcOU.js +0 -4
  356. package/dist/scheme-CliBbhGF.js +0 -4
  357. package/dist/shell-BwhrNUvM.js +0 -4
  358. package/dist/sieve-BIVePvMp.js +0 -4
  359. package/dist/smalltalk-D6G48JmY.js +0 -4
  360. package/dist/sparql-jjc3BmEP.js +0 -4
  361. package/dist/stateDiagram-v2-4FDKWEC3-Cv9Av10H.js +0 -29
  362. package/dist/stylus-WPBPQ4PE.js +0 -4
  363. package/dist/swift-O1Qy6iCm.js +0 -4
  364. package/dist/tcl-BAFdhvsi.js +0 -4
  365. package/dist/textile-DFuzhNLG.js +0 -4
  366. package/dist/toml-DRSTeely.js +0 -4
  367. package/dist/troff-B_ZjwBW0.js +0 -4
  368. package/dist/ttcn-CAyiB3ic.js +0 -4
  369. package/dist/ttcn-cfg-BS5_BGBJ.js +0 -4
  370. package/dist/turtle-CUBEDy3E.js +0 -4
  371. package/dist/vb-DY9S6-U2.js +0 -4
  372. package/dist/vbscript-gaHC39Jq.js +0 -4
  373. package/dist/velocity-TfCOtJZ_.js +0 -4
  374. package/dist/verilog-c2JOX8mv.js +0 -4
  375. package/dist/vhdl-dHBirRiO.js +0 -4
  376. package/dist/webidl-Bauj-i07.js +0 -4
  377. package/dist/xquery-CtaEAOt8.js +0 -4
  378. package/dist/yacas-BZ85agQP.js +0 -4
  379. package/dist/z80-hCgR-L4U.js +0 -4
  380. package/src/components/chat/tool-call-accordion.tsx +0 -247
  381. /package/dist/{ImageComparisonComponent-DaocPIse.js → ImageComparisonComponent-CNHIsPDj.js} +0 -0
  382. /package/dist/{Plot-PIeIvFnD.js → Plot-4wn-lMVn.js} +0 -0
  383. /package/dist/{apl-Dt8GMXYg.js → apl-BCgCq9iM.js} +0 -0
  384. /package/dist/{array-B-MVxRIF.js → array-tvvEqPy7.js} +0 -0
  385. /package/dist/{asciiarmor-CitDQ85h.js → asciiarmor-BtqU-KJQ.js} +0 -0
  386. /package/dist/{asn1-abrf9SMK.js → asn1-Dmb-dTMx.js} +0 -0
  387. /package/dist/{asterisk-BUZwqih-.js → asterisk-DaVJJDnV.js} +0 -0
  388. /package/dist/{brainfuck-BL-Boof0.js → brainfuck-C1HoZKlE.js} +0 -0
  389. /package/dist/{chunk-4F5CHEZ2-C6tO9vjs.js → chunk-4F5CHEZ2-BZq7Kom7.js} +0 -0
  390. /package/dist/{chunk-B2363JML-Ds8wZXyP.js → chunk-B2363JML-D9-XOau1.js} +0 -0
  391. /package/dist/{chunk-DR5Q36YT-CP69aZS_.js → chunk-DR5Q36YT-BflwErH1.js} +0 -0
  392. /package/dist/{chunk-FRFDVMJY-BgQv1HBE.js → chunk-FRFDVMJY-BSBUAX7r.js} +0 -0
  393. /package/dist/{chunk-PL6DKKU2-DHfTUHy8.js → chunk-PL6DKKU2-B0MTXvyc.js} +0 -0
  394. /package/dist/{chunk-SJTYNZTY-Diciw4sx.js → chunk-SJTYNZTY-CEG4F0pB.js} +0 -0
  395. /package/dist/{chunk-TQ3KTPDO-CQfP9npd.js → chunk-TQ3KTPDO-DiCtqVSi.js} +0 -0
  396. /package/dist/{chunk-UMXZTB3W-MSKeGL7W.js → chunk-UMXZTB3W-97iS1iEl.js} +0 -0
  397. /package/dist/{click-outside-container-BZgN7xS_.js → click-outside-container-BDd67_1U.js} +0 -0
  398. /package/dist/{clike-RWg7anhx.js → clike-CdT0yHjt.js} +0 -0
  399. /package/dist/{clojure-DaojKHow.js → clojure-CdyrCpUv.js} +0 -0
  400. /package/dist/{cmake-DN-_v0XE.js → cmake-BFlPxym7.js} +0 -0
  401. /package/dist/{cobol-C3VpMyux.js → cobol-CcJXewp8.js} +0 -0
  402. /package/dist/{coffeescript-DIkz3Tbt.js → coffeescript-DnKuIKRo.js} +0 -0
  403. /package/dist/{colors-Cn2p_FA3.js → colors-CQAOa8cK.js} +0 -0
  404. /package/dist/{common-keywords-hbLeU7VU.js → common-keywords-FBrXPTcz.js} +0 -0
  405. /package/dist/{commonlisp-CB1boOiP.js → commonlisp-B-kok83Z.js} +0 -0
  406. /package/dist/{crystal-DI2oCml6.js → crystal-FYRYjI1I.js} +0 -0
  407. /package/dist/{css-BdEVwQDV.js → css-B45lc2V3.js} +0 -0
  408. /package/dist/{cypher-BNHToqxU.js → cypher-DZMLyVY_.js} +0 -0
  409. /package/dist/{cytoscape.esm-WbbDoCfu.js → cytoscape.esm-ayF70frT.js} +0 -0
  410. /package/dist/{d-D7we7I1b.js → d-x-VVT4o9.js} +0 -0
  411. /package/dist/{diff-Cia6fzjN.js → diff-Dxe2mpXk.js} +0 -0
  412. /package/dist/{dist-BK-3fF4P.js → dist-B4LJpMEg.js} +0 -0
  413. /package/dist/{dist-CxdUraQr.js → dist-B507mf_I.js} +0 -0
  414. /package/dist/{dist-C89sHDXk.js → dist-BGdYVvOu.js} +0 -0
  415. /package/dist/{dist-DquyVv5H.js → dist-BNyrZfqT.js} +0 -0
  416. /package/dist/{dist-Zn0KNbo9.js → dist-Bc5pmZIw.js} +0 -0
  417. /package/dist/{dist-C-J0pt5p.js → dist-BvCfQQQE.js} +0 -0
  418. /package/dist/{dist-D9r7Cmw7.js → dist-C2ej4eOH.js} +0 -0
  419. /package/dist/{dist-HVuryI1a.js → dist-C34oIrQ9.js} +0 -0
  420. /package/dist/{dist-CGLzXdrt.js → dist-CDFZi-QD.js} +0 -0
  421. /package/dist/{dist-C9fmTOin.js → dist-CYEylvZA.js} +0 -0
  422. /package/dist/{dist-DadjmS-4.js → dist-DJ6zJQZ4.js} +0 -0
  423. /package/dist/{dist-CtCY55Jf.js → dist-Dh3wkoyH.js} +0 -0
  424. /package/dist/{dist-C474qFoq.js → dist-Dhk6FMb0.js} +0 -0
  425. /package/dist/{dist-DZjQ_MBo.js → dist-KnujRhFL.js} +0 -0
  426. /package/dist/{dist-CinA9Enb.js → dist-WdPUFc56.js} +0 -0
  427. /package/dist/{dist-DBLeRrPp.js → dist-t_qL7eB8.js} +0 -0
  428. /package/dist/{dist-CyFFzJTb.js → dist-usPCDYx8.js} +0 -0
  429. /package/dist/{dtd-H4Hubdwp.js → dtd-C9VM_Wfu.js} +0 -0
  430. /package/dist/{duckdb-keywords-CZ_ZTscu.js → duckdb-keywords-CvJhR_Yd.js} +0 -0
  431. /package/dist/{dylan-fVO6rnq3.js → dylan-DTSnEIFO.js} +0 -0
  432. /package/dist/{ebnf-WEXPLEWb.js → ebnf-2D4Ctp3y.js} +0 -0
  433. /package/dist/{ecl-B94VPjNR.js → ecl-N04ptnRK.js} +0 -0
  434. /package/dist/{eiffel-C_R6TusS.js → eiffel-Dd8rpqr_.js} +0 -0
  435. /package/dist/{elm-DzCHbO2g.js → elm-GT2E866W.js} +0 -0
  436. /package/dist/{erlang-BGNkx6JU.js → erlang-Cf0Bp5pY.js} +0 -0
  437. /package/dist/{esm-Bb_hbWan.js → esm-BaaaPNGl.js} +0 -0
  438. /package/dist/{fcl-B_Gv5Jfx.js → fcl-Ccj8Z5Xd.js} +0 -0
  439. /package/dist/{forth-Bybw0cJ7.js → forth-wd_XzGTg.js} +0 -0
  440. /package/dist/{fortran-C6PoCLkI.js → fortran-DcwUTZFe.js} +0 -0
  441. /package/dist/{gas-BBlhenj4.js → gas-DeALIER3.js} +0 -0
  442. /package/dist/{gherkin-NXtNG85X.js → gherkin-CKTqaJNX.js} +0 -0
  443. /package/dist/{groovy-BoFYK9xM.js → groovy-Bwdp_d8D.js} +0 -0
  444. /package/dist/{haskell-BtBdvQ1n.js → haskell-DCdCcPLK.js} +0 -0
  445. /package/dist/{haxe-D--o6dr0.js → haxe-DAyktQWJ.js} +0 -0
  446. /package/dist/{http-Dc2fv19V.js → http-_DVAYWoR.js} +0 -0
  447. /package/dist/{idl-AqTq5l7e.js → idl-CBuZiRYu.js} +0 -0
  448. /package/dist/{init-D-g0ONX1.js → init-uv0kkh4g.js} +0 -0
  449. /package/dist/{javascript-DvwNVye9.js → javascript-DzigE11c.js} +0 -0
  450. /package/dist/{julia-DoKiagZC.js → julia-PwfB-0Cm.js} +0 -0
  451. /package/dist/{katex-B7pMJpE0.js → katex-C_XRmjAP.js} +0 -0
  452. /package/dist/{livescript-DxBZMiWB.js → livescript-BJLz1EbT.js} +0 -0
  453. /package/dist/{lua-DmS_0NTu.js → lua-ZC-XC2jf.js} +0 -0
  454. /package/dist/{math-BYK36kWZ.js → math-DFcdCCU8.js} +0 -0
  455. /package/dist/{mathematica-ChlDFeIC.js → mathematica-DCYMx6qB.js} +0 -0
  456. /package/dist/{mbox-CguZuODr.js → mbox-OxMK_9XI.js} +0 -0
  457. /package/dist/{mirc-CFtY8dqz.js → mirc-nJVyhA0H.js} +0 -0
  458. /package/dist/{mllike-C0EJrEOk.js → mllike-DRO89bsU.js} +0 -0
  459. /package/dist/{modelica-C1kO1nfS.js → modelica-Don3E6ZD.js} +0 -0
  460. /package/dist/{mscgen-DEYdr7AY.js → mscgen-DJfqD3bN.js} +0 -0
  461. /package/dist/{mumps-B3NVJs2V.js → mumps-SjGTvDYL.js} +0 -0
  462. /package/dist/{nginx-ComVAAGN.js → nginx-DasThI7R.js} +0 -0
  463. /package/dist/{node-sql-parser-DNGGJ-Rw.js → node-sql-parser-B8nBD36q.js} +0 -0
  464. /package/dist/{ntriples-DHol9X9H.js → ntriples-CNBKRl3I.js} +0 -0
  465. /package/dist/{octave-CYGz0bfo.js → octave-DdeVHNlx.js} +0 -0
  466. /package/dist/{oz-kPxb2ni5.js → oz-CcKSoNvN.js} +0 -0
  467. /package/dist/{pascal-bZ0yrJKy.js → pascal-6leftwNj.js} +0 -0
  468. /package/dist/{path-Du6n3sOU.js → path-BGaWgPKg.js} +0 -0
  469. /package/dist/{perl-z4hvqyqz.js → perl-BhJIwWzN.js} +0 -0
  470. /package/dist/{pig-DZO8QDF9.js → pig-r-xDHqRf.js} +0 -0
  471. /package/dist/{powershell-BSuaDQEC.js → powershell-D-BELeNi.js} +0 -0
  472. /package/dist/{properties-BXhGLlIx.js → properties-CnuDhbll.js} +0 -0
  473. /package/dist/{protobuf-DM6iybWV.js → protobuf-CO8RBhvX.js} +0 -0
  474. /package/dist/{puppet-Bn05sQT8.js → puppet-NmXHjLy8.js} +0 -0
  475. /package/dist/{python-Cvnhm0g7.js → python-DAQXi720.js} +0 -0
  476. /package/dist/{q-B9V8hzex.js → q-DlikXfV0.js} +0 -0
  477. /package/dist/{r-Cf0gFqmq.js → r-CuohilwT.js} +0 -0
  478. /package/dist/{rpm-D-LMkTV1.js → rpm-0Pjwp0Pb.js} +0 -0
  479. /package/dist/{ruby-DeuPikpK.js → ruby-Dq8NJTDG.js} +0 -0
  480. /package/dist/{sas-C9tjgAo9.js → sas-CuwonyVP.js} +0 -0
  481. /package/dist/{scheme-D1_bUF0G.js → scheme-CYU-RRIf.js} +0 -0
  482. /package/dist/{shell-CJBmnks3.js → shell-COPmX2qE.js} +0 -0
  483. /package/dist/{sieve-1fSV75CF.js → sieve-B_3zyLne.js} +0 -0
  484. /package/dist/{simple-mode-B90Wdavj.js → simple-mode-DSBniks8.js} +0 -0
  485. /package/dist/{smalltalk-sZNPD0HO.js → smalltalk-DRft7iPv.js} +0 -0
  486. /package/dist/{solr-DTkyqJ-Z.js → solr-RZ9uTl59.js} +0 -0
  487. /package/dist/{sparql-oHc1nm77.js → sparql-CN6qj55H.js} +0 -0
  488. /package/dist/{spreadsheet-CER0raqY.js → spreadsheet-BNNUNXA2.js} +0 -0
  489. /package/dist/{sql-ByOoEONQ.js → sql-B4x8IkwU.js} +0 -0
  490. /package/dist/{stylus-KzkX6zRB.js → stylus-Bn_ZjOQ3.js} +0 -0
  491. /package/dist/{swift-DqVxZvKo.js → swift-BLUJhMbz.js} +0 -0
  492. /package/dist/{tcl-BtWSwXfA.js → tcl-C86fxecl.js} +0 -0
  493. /package/dist/{textile-CWDbn9Ql.js → textile-DmHh2rsK.js} +0 -0
  494. /package/dist/{tiddlywiki-Cr9xyOY1.js → tiddlywiki-DI0mF2WJ.js} +0 -0
  495. /package/dist/{tiki-D5JONyfZ.js → tiki-2HU6XLLn.js} +0 -0
  496. /package/dist/{timer-D7JVdX9U.js → timer-YZl28NYN.js} +0 -0
  497. /package/dist/{toml-BfehlgmL.js → toml-GWANRNAD.js} +0 -0
  498. /package/dist/{treemap-qFGzn7xk.js → treemap-D-ka1hvx.js} +0 -0
  499. /package/dist/{troff-BZBk6AAu.js → troff-BHTsomIy.js} +0 -0
  500. /package/dist/{ttcn-DVwvXg0_.js → ttcn-DQuhn5Mn.js} +0 -0
  501. /package/dist/{ttcn-cfg-gjbVLf1L.js → ttcn-cfg-HjFYtdB-.js} +0 -0
  502. /package/dist/{turtle-CgxKXorV.js → turtle-nCay33Nv.js} +0 -0
  503. /package/dist/{vb-B9kSwTdM.js → vb-BG-XlqqJ.js} +0 -0
  504. /package/dist/{vbscript-DrUKSCdb.js → vbscript-B6vyW0-D.js} +0 -0
  505. /package/dist/{velocity-AlMYTnMy.js → velocity-CWegueqO.js} +0 -0
  506. /package/dist/{verilog-DLUaM05j.js → verilog-CzSQm4cG.js} +0 -0
  507. /package/dist/{vhdl-DUJOtSmO.js → vhdl-DqnNVL7r.js} +0 -0
  508. /package/dist/{webidl-CQp4aHk_.js → webidl-DXEUpDWH.js} +0 -0
  509. /package/dist/{xquery-IxkjlwOD.js → xquery-Ba_NB5bD.js} +0 -0
  510. /package/dist/{yacas-Bnctn5w8.js → yacas-HKQU6hyk.js} +0 -0
  511. /package/dist/{z80-DrFwhx53.js → z80-CXkHXLdj.js} +0 -0
@@ -2,26 +2,26 @@ var __defProp = Object.defineProperty;
2
2
  var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3
3
  var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
4
4
  import { s as __toESM, t as __commonJSMin } from "./chunk-BNovOVIE.js";
5
- import { _ as Logger, c as Objects, g as cn, l as useEventListener, t as Button } from "./button-CA5pI2YF.js";
5
+ import { _ as Logger, c as Objects, g as cn, l as useEventListener, t as Button } from "./button-Dj4BTre0.js";
6
6
  import { t as require_react } from "./react-DA-nE2FX.js";
7
7
  import { t as require_compiler_runtime } from "./compiler-runtime-CEbnTgxf.js";
8
- import { r as toast } from "./copy-TGGAUEWp.js";
9
- import { C as AccordionContent, D as ChatBubbleIcon, En as Trash2, Ft as jotaiJsonStorage, G as cellErrorsAtom, Ht as allTablesAtom, It as variablesAtom, Kt as getRequestClient, Lt as PluralWord, Nn as Info, Ot as moveToEndOfEditor, P as base64ToDataURL, Rn as CircleX, S as Accordion, T as AccordionTrigger, Tn as Wrench, Tt as createVariableInfoElement, Ut as dataSourceConnectionsAtom, V as renderHTML, Wt as getTableType, Xt as singleFacet, Y as notebookAtom, _ as Boosts, _n as atomWithStorage, b as AIContextProvider, c as Popover, d as PopoverTrigger, f as isOutputEmpty, h as DatasourceContextProvider, jn as LoaderCircle, n as MarkdownRenderer, on as CellOutputId, s as Spinner, t as toPng, tn as ZodLocalStorage, u as PopoverContent, v as Sections, vt as displayCellName, w as AccordionItem, x as AIContextRegistry, y as contextToXml, yn as Anchor2 } from "./html-to-image-hMMPiNe_.js";
10
- import "./chunk-5FQGJX7Z-CO1e63h_.js";
11
- import { u as createLucideIcon } from "./dist-ESg7xyoD.js";
12
- import { F as X, S as logNever, t as Strings } from "./strings-B_FOH6eV.js";
13
- import { a as NumberField, b as DropdownMenuTrigger, d as DropdownMenuContent, p as DropdownMenuItem, r as Input, u as DropdownMenu } from "./input-BAOe64zx.js";
14
- import { v as CircleQuestionMark } from "./toDate-CHtl9vts.js";
15
- import { a as MarimoIncomingMessageEvent, d as File$1, n as blobToString, t as processOutput, u as deserializeBlob } from "./process-output-Bza_GK7Q.js";
8
+ import { r as toast } from "./copy-DLf4aN7I.js";
9
+ import { C as AccordionContent, D as ChatBubbleIcon, En as Trash2, Ft as jotaiJsonStorage, G as cellErrorsAtom, Ht as allTablesAtom, In as ExternalLink, It as variablesAtom, Kt as getRequestClient, Lt as PluralWord, Nn as Info, Ot as moveToEndOfEditor, P as base64ToDataURL, Pn as FileText, S as Accordion, T as AccordionTrigger, Tn as Wrench, Tt as createVariableInfoElement, Ut as dataSourceConnectionsAtom, V as renderHTML, Wt as getTableType, Xt as singleFacet, Y as notebookAtom, _ as Boosts, _n as atomWithStorage, b as AIContextProvider, c as Popover, d as PopoverTrigger, f as isOutputEmpty, h as DatasourceContextProvider, jn as LoaderCircle, n as MarkdownRenderer, on as CellOutputId, s as Spinner, t as toPng, tn as ZodLocalStorage, u as PopoverContent, v as Sections, vt as displayCellName, w as AccordionItem, x as AIContextRegistry, y as contextToXml, yn as Anchor2, zn as CircleX } from "./html-to-image-DxWM1HVj.js";
10
+ import "./chunk-5FQGJX7Z-BOg95xG5.js";
11
+ import { u as createLucideIcon } from "./dist-D3ZI9nhS.js";
12
+ import { F as X, L as ChevronDown, S as logNever, t as Strings } from "./strings-BiIhGaI8.js";
13
+ import { a as NumberField, b as DropdownMenuTrigger, d as DropdownMenuContent, p as DropdownMenuItem, r as Input, u as DropdownMenu } from "./input-Cc1Vvw9A.js";
14
+ import { p as isUrl, v as CircleQuestionMark } from "./toDate-CJWlVNGD.js";
15
+ import { a as MarimoIncomingMessageEvent, d as File$1, n as blobToString, t as processOutput, u as deserializeBlob } from "./process-output-DBYxXdrN.js";
16
16
  import "./react-dom-BWRJ_g_k.js";
17
17
  import { t as require_jsx_runtime } from "./jsx-runtime-COBk7ree.js";
18
- import { B as union, C as any, D as discriminatedUnion, E as custom, H as safeParseAsync, I as record, L as strictObject, M as never, N as number, O as lazy, P as object$1, R as string, S as _null, T as boolean, V as unknown, W as toJSONSchema, b as _enum, k as literal, w as array$1, x as _instanceof } from "./zod-BxdsqRPd.js";
19
- import { n as ErrorBanner } from "./error-banner-DnBPzEWg.js";
20
- import { t as Label } from "./label-BCWi-Oqu.js";
21
- import { t as Tooltip } from "./tooltip-B0mtKTXm.js";
22
- import { f as CopyClipboardIcon } from "./extends-CzJgxo2J.js";
18
+ import { A as looseObject, B as union, C as any, D as discriminatedUnion, E as custom, H as safeParseAsync, I as record, L as strictObject, M as never, N as number, O as lazy, P as object$1, R as string, S as _null, T as boolean, V as unknown, W as toJSONSchema, b as _enum, k as literal, w as array$1, x as _instanceof } from "./zod-BWkcDORu.js";
19
+ import { n as ErrorBanner } from "./error-banner-CVkfBUT3.js";
20
+ import { t as Label } from "./label-BLqV33b1.js";
21
+ import { t as Tooltip } from "./tooltip-DRaMBu06.js";
22
+ import { f as CopyClipboardIcon } from "./extends-vAi97cpa.js";
23
23
  import { t as isEmpty_default } from "./isEmpty-Dd8mx_WL.js";
24
- import { n as useTheme, v as useStore, w as useEvent_default } from "./useTheme-CByZUW0p.js";
24
+ import { n as useTheme, v as useStore, w as useEvent_default } from "./useTheme-DykuNHR2.js";
25
25
  import { $ as ViewPlugin, At as Prec, Dt as EditorState, Ft as StateField, Lt as Transaction, Ot as Facet, Pt as StateEffect, Y as Decoration, Z as EditorView, dt as keymap, et as WidgetType, ut as hoverTooltip } from "./dist-CCADb07R.js";
26
26
  import { n as acceptCompletion, o as closeCompletion, r as autocompletion } from "./dist-JEhxD_cn.js";
27
27
  import "./main-CThhXnXU.js";
@@ -30,10 +30,18 @@ import "./dist-UcOPnRMa.js";
30
30
  import "./dist-BTyJtnNg.js";
31
31
  import "./dist-DGAfI2rB.js";
32
32
  import "./dist-nuW5EDYT.js";
33
- import { n as minimalSetup, t as esm_default } from "./esm-Dd1z1auZ.js";
33
+ import { n as minimalSetup, t as esm_default } from "./esm-CWp0KQeK.js";
34
34
  import "./purify.es-DT70lfR0.js";
35
- import { t as useAsyncData } from "./useAsyncData-B6hCGywC.js";
36
- var BotMessageSquare = createLucideIcon("bot-message-square", [
35
+ import { t as useAsyncData } from "./useAsyncData-C56Khv_R.js";
36
+ var Ban = createLucideIcon("ban", [["path", {
37
+ d: "M4.929 4.929 19.07 19.071",
38
+ key: "196cmz"
39
+ }], ["circle", {
40
+ cx: "12",
41
+ cy: "12",
42
+ r: "10",
43
+ key: "1mglay"
44
+ }]]), BotMessageSquare = createLucideIcon("bot-message-square", [
37
45
  ["path", {
38
46
  d: "M12 6V2H8",
39
47
  key: "1155em"
@@ -87,7 +95,20 @@ var BotMessageSquare = createLucideIcon("bot-message-square", [
87
95
  cy: "12",
88
96
  r: "3",
89
97
  key: "1v7zrd"
90
- }]]);
98
+ }]]), ShieldQuestionMark = createLucideIcon("shield-question-mark", [
99
+ ["path", {
100
+ d: "M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",
101
+ key: "oel41y"
102
+ }],
103
+ ["path", {
104
+ d: "M9.1 9a3 3 0 0 1 5.82 1c0 2-3 3-3 3",
105
+ key: "mhlwft"
106
+ }],
107
+ ["path", {
108
+ d: "M12 17h.01",
109
+ key: "p32p05"
110
+ }]
111
+ ]);
91
112
  require_compiler_runtime();
92
113
  var import_react = /* @__PURE__ */ __toESM(require_react(), 1), marker$2 = "vercel.ai.error", symbol$2 = Symbol.for(marker$2), _a$2, _b$1, AISDKError = class e extends (_b$1 = Error, _a$2 = symbol$2, _b$1) {
93
114
  constructor({ name: e18, message: h, cause: g }) {
@@ -2885,42 +2906,107 @@ var ParseError = class extends Error {
2885
2906
  constructor(e18, h) {
2886
2907
  super(e18), this.name = "ParseError", this.type = h.type, this.field = h.field, this.value = h.value, this.line = h.line;
2887
2908
  }
2888
- };
2909
+ }, LF = 10, CR = 13, SPACE = 32;
2889
2910
  function noop(e18) {
2890
2911
  }
2891
2912
  function createParser(e18) {
2892
2913
  if (typeof e18 == "function") throw TypeError("`callbacks` must be an object, got a function instead. Did you mean `{onEvent: fn}`?");
2893
- let { onEvent: h = noop, onError: g = noop, onRetry: _ = noop, onComment: v } = e18, y = "", b = true, x, S = "", C = "";
2894
- function w(e19) {
2895
- let h2 = b ? e19.replace(/^\xEF\xBB\xBF/, "") : e19, [g2, _2] = splitLines(`${y}${h2}`);
2896
- for (let e20 of g2) T(e20);
2897
- y = _2, b = false;
2898
- }
2914
+ let { onEvent: h = noop, onError: g = noop, onRetry: _ = noop, onComment: v } = e18, y = [], b = true, x, S = "", C = 0, w;
2899
2915
  function T(e19) {
2900
- if (e19 === "") {
2901
- D();
2916
+ if (b && (b = false, e19.charCodeAt(0) === 239 && e19.charCodeAt(1) === 187 && e19.charCodeAt(2) === 191 && (e19 = e19.slice(3))), y.length === 0) {
2917
+ let h3 = E(e19);
2918
+ h3 !== "" && y.push(h3);
2902
2919
  return;
2903
2920
  }
2904
- if (e19.startsWith(":")) {
2905
- v && v(e19.slice(e19.startsWith(": ") ? 2 : 1));
2921
+ if (e19.indexOf("\n") === -1 && e19.indexOf("\r") === -1) {
2922
+ y.push(e19);
2906
2923
  return;
2907
2924
  }
2908
- let h2 = e19.indexOf(":");
2909
- if (h2 !== -1) {
2910
- let g2 = e19.slice(0, h2), _2 = e19[h2 + 1] === " " ? 2 : 1;
2911
- E(g2, e19.slice(h2 + _2), e19);
2925
+ y.push(e19);
2926
+ let h2 = y.join("");
2927
+ y.length = 0;
2928
+ let g2 = E(h2);
2929
+ g2 !== "" && y.push(g2);
2930
+ }
2931
+ function E(e19) {
2932
+ let g2 = 0;
2933
+ if (e19.indexOf("\r") === -1) {
2934
+ let _2 = e19.indexOf("\n", g2);
2935
+ for (; _2 !== -1; ) {
2936
+ if (g2 === _2) {
2937
+ C > 0 && h({
2938
+ id: x,
2939
+ event: w,
2940
+ data: S
2941
+ }), x = void 0, S = "", C = 0, w = void 0, g2 = _2 + 1, _2 = e19.indexOf("\n", g2);
2942
+ continue;
2943
+ }
2944
+ let v2 = e19.charCodeAt(g2);
2945
+ if (isDataPrefix(e19, g2, v2)) {
2946
+ let v3 = e19.charCodeAt(g2 + 5) === SPACE ? g2 + 6 : g2 + 5, y2 = e19.slice(v3, _2);
2947
+ if (C === 0 && e19.charCodeAt(_2 + 1) === LF) {
2948
+ h({
2949
+ id: x,
2950
+ event: w,
2951
+ data: y2
2952
+ }), x = void 0, S = "", w = void 0, g2 = _2 + 2, _2 = e19.indexOf("\n", g2);
2953
+ continue;
2954
+ }
2955
+ S = C === 0 ? y2 : `${S}
2956
+ ${y2}`, C++;
2957
+ } else isEventPrefix(e19, g2, v2) ? w = e19.slice(e19.charCodeAt(g2 + 6) === SPACE ? g2 + 7 : g2 + 6, _2) || void 0 : D(e19, g2, _2);
2958
+ g2 = _2 + 1, _2 = e19.indexOf("\n", g2);
2959
+ }
2960
+ return e19.slice(g2);
2961
+ }
2962
+ for (; g2 < e19.length; ) {
2963
+ let h2 = e19.indexOf("\r", g2), _2 = e19.indexOf("\n", g2), v2 = -1;
2964
+ if (h2 !== -1 && _2 !== -1 ? v2 = h2 < _2 ? h2 : _2 : h2 === -1 ? _2 !== -1 && (v2 = _2) : v2 = h2 === e19.length - 1 ? -1 : h2, v2 === -1) break;
2965
+ D(e19, g2, v2), g2 = v2 + 1, e19.charCodeAt(g2 - 1) === CR && e19.charCodeAt(g2) === LF && g2++;
2966
+ }
2967
+ return e19.slice(g2);
2968
+ }
2969
+ function D(e19, h2, g2) {
2970
+ if (h2 === g2) {
2971
+ k();
2912
2972
  return;
2913
2973
  }
2914
- E(e19, "", e19);
2974
+ let _2 = e19.charCodeAt(h2);
2975
+ if (isDataPrefix(e19, h2, _2)) {
2976
+ let _3 = e19.charCodeAt(h2 + 5) === SPACE ? h2 + 6 : h2 + 5, v2 = e19.slice(_3, g2);
2977
+ S = C === 0 ? v2 : `${S}
2978
+ ${v2}`, C++;
2979
+ return;
2980
+ }
2981
+ if (isEventPrefix(e19, h2, _2)) {
2982
+ w = e19.slice(e19.charCodeAt(h2 + 6) === SPACE ? h2 + 7 : h2 + 6, g2) || void 0;
2983
+ return;
2984
+ }
2985
+ if (_2 === 105 && e19.charCodeAt(h2 + 1) === 100 && e19.charCodeAt(h2 + 2) === 58) {
2986
+ let _3 = e19.slice(e19.charCodeAt(h2 + 3) === SPACE ? h2 + 4 : h2 + 3, g2);
2987
+ x = _3.includes("\0") ? void 0 : _3;
2988
+ return;
2989
+ }
2990
+ if (_2 === 58) {
2991
+ v && v(e19.slice(h2, g2).slice(e19.charCodeAt(h2 + 1) === SPACE ? 2 : 1));
2992
+ return;
2993
+ }
2994
+ let y2 = e19.slice(h2, g2), b2 = y2.indexOf(":");
2995
+ if (b2 === -1) {
2996
+ O(y2, "", y2);
2997
+ return;
2998
+ }
2999
+ let T2 = y2.slice(0, b2), E2 = y2.charCodeAt(b2 + 1) === SPACE ? 2 : 1;
3000
+ O(T2, y2.slice(b2 + E2), y2);
2915
3001
  }
2916
- function E(e19, h2, v2) {
3002
+ function O(e19, h2, v2) {
2917
3003
  switch (e19) {
2918
3004
  case "event":
2919
- C = h2;
3005
+ w = h2 || void 0;
2920
3006
  break;
2921
3007
  case "data":
2922
- S = `${S}${h2}
2923
- `;
3008
+ S = C === 0 ? h2 : `${S}
3009
+ ${h2}`, C++;
2924
3010
  break;
2925
3011
  case "id":
2926
3012
  x = h2.includes("\0") ? void 0 : h2;
@@ -2942,34 +3028,30 @@ function createParser(e18) {
2942
3028
  break;
2943
3029
  }
2944
3030
  }
2945
- function D() {
2946
- S.length > 0 && h({
3031
+ function k() {
3032
+ C > 0 && h({
2947
3033
  id: x,
2948
- event: C || void 0,
2949
- data: S.endsWith("\n") ? S.slice(0, -1) : S
2950
- }), x = void 0, S = "", C = "";
2951
- }
2952
- function O(e19 = {}) {
2953
- y && e19.consume && T(y), b = true, x = void 0, S = "", C = "", y = "";
3034
+ event: w,
3035
+ data: S
3036
+ }), x = void 0, S = "", C = 0, w = void 0;
3037
+ }
3038
+ function A(e19 = {}) {
3039
+ if (e19.consume && y.length > 0) {
3040
+ let e20 = y.join("");
3041
+ D(e20, 0, e20.length);
3042
+ }
3043
+ b = true, x = void 0, S = "", C = 0, w = void 0, y.length = 0;
2954
3044
  }
2955
3045
  return {
2956
- feed: w,
2957
- reset: O
3046
+ feed: T,
3047
+ reset: A
2958
3048
  };
2959
3049
  }
2960
- function splitLines(e18) {
2961
- let h = [], g = "", _ = 0;
2962
- for (; _ < e18.length; ) {
2963
- let v = e18.indexOf("\r", _), y = e18.indexOf("\n", _), b = -1;
2964
- if (v !== -1 && y !== -1 ? b = Math.min(v, y) : v === -1 ? y !== -1 && (b = y) : b = v === e18.length - 1 ? -1 : v, b === -1) {
2965
- g = e18.slice(_);
2966
- break;
2967
- } else {
2968
- let g2 = e18.slice(_, b);
2969
- h.push(g2), _ = b + 1, e18[_ - 1] === "\r" && e18[_] === "\n" && _++;
2970
- }
2971
- }
2972
- return [h, g];
3050
+ function isDataPrefix(e18, h, g) {
3051
+ return g === 100 && e18.charCodeAt(h + 1) === 97 && e18.charCodeAt(h + 2) === 116 && e18.charCodeAt(h + 3) === 97 && e18.charCodeAt(h + 4) === 58;
3052
+ }
3053
+ function isEventPrefix(e18, h, g) {
3054
+ return g === 101 && e18.charCodeAt(h + 1) === 118 && e18.charCodeAt(h + 2) === 101 && e18.charCodeAt(h + 3) === 110 && e18.charCodeAt(h + 4) === 116 && e18.charCodeAt(h + 5) === 58;
2973
3055
  }
2974
3056
  var EventSourceParserStream = class extends TransformStream {
2975
3057
  constructor({ onError: e18, onRetry: h, onComment: g } = {}) {
@@ -4221,7 +4303,7 @@ function mergeObjects(e18, h) {
4221
4303
  if (e18 === void 0) return h;
4222
4304
  if (h === void 0) return e18;
4223
4305
  let g = { ...e18 };
4224
- for (let _ in h) if (Object.prototype.hasOwnProperty.call(h, _)) {
4306
+ for (let _ in h) if (!(_ === "__proto__" || _ === "constructor" || _ === "prototype") && Object.prototype.hasOwnProperty.call(h, _)) {
4225
4307
  let v = h[_];
4226
4308
  if (v === void 0) continue;
4227
4309
  let y = _ in e18 ? e18[_] : void 0, b = typeof v == "object" && !!v && !Array.isArray(v) && !(v instanceof Date) && !(v instanceof RegExp), x = typeof y == "object" && !!y && !Array.isArray(y) && !(y instanceof Date) && !(y instanceof RegExp);
@@ -6334,10 +6416,10 @@ async function convertToFileUIPart(e18) {
6334
6416
  url: await blobToString(e19, "dataUrl")
6335
6417
  })));
6336
6418
  }
6337
- var import_compiler_runtime$4 = require_compiler_runtime();
6419
+ var import_compiler_runtime$9 = require_compiler_runtime();
6338
6420
  const AttachmentRenderer = (e18) => {
6339
6421
  var _a;
6340
- let h = (0, import_compiler_runtime$4.c)(6), { attachment: g } = e18;
6422
+ let h = (0, import_compiler_runtime$9.c)(6), { attachment: g } = e18;
6341
6423
  if ((_a = g.mediaType) == null ? void 0 : _a.startsWith("image/")) {
6342
6424
  let e19 = g.filename || "Attachment", _2;
6343
6425
  return h[0] !== g.url || h[1] !== e19 ? (_2 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)("img", {
@@ -6353,28 +6435,66 @@ const AttachmentRenderer = (e18) => {
6353
6435
  className: "flex flex-row gap-1 items-center text-xs",
6354
6436
  children: [_, v]
6355
6437
  }), h[4] = v, h[5] = y), y;
6438
+ }, SourceChip = (e18) => {
6439
+ let h = (0, import_compiler_runtime$9.c)(15), { icon: g, title: _, subtitle: v, href: y } = e18, b;
6440
+ h[0] === _ ? b = h[1] : (b = /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
6441
+ className: "truncate font-medium",
6442
+ children: _
6443
+ }), h[0] = _, h[1] = b);
6444
+ let x;
6445
+ h[2] === v ? x = h[3] : (x = v && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", {
6446
+ className: "truncate opacity-70",
6447
+ children: [
6448
+ "(",
6449
+ v,
6450
+ ")"
6451
+ ]
6452
+ }), h[2] = v, h[3] = x);
6453
+ let S;
6454
+ h[4] !== g || h[5] !== b || h[6] !== x ? (S = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
6455
+ g,
6456
+ b,
6457
+ x
6458
+ ] }), h[4] = g, h[5] = b, h[6] = x, h[7] = S) : S = h[7];
6459
+ let C = S;
6460
+ if (y && isUrl(y)) {
6461
+ let e19 = v ?? _, g2;
6462
+ return h[8] !== C || h[9] !== y || h[10] !== e19 ? (g2 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)("a", {
6463
+ href: y,
6464
+ target: "_blank",
6465
+ rel: "noopener noreferrer",
6466
+ title: e19,
6467
+ className: "inline-flex max-w-full items-center gap-1.5 rounded-md border bg-muted/50 px-2 py-1 my-1 text-xs text-muted-foreground hover:bg-muted hover:text-foreground transition-colors",
6468
+ children: C
6469
+ }), h[8] = C, h[9] = y, h[10] = e19, h[11] = g2) : g2 = h[11], g2;
6470
+ }
6471
+ let w = v ?? _, T;
6472
+ return h[12] !== C || h[13] !== w ? (T = /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
6473
+ className: "inline-flex max-w-full items-center gap-1.5 rounded-md border bg-muted/50 px-2 py-1 my-1 text-xs text-muted-foreground",
6474
+ title: w,
6475
+ children: C
6476
+ }), h[12] = C, h[13] = w, h[14] = T) : T = h[14], T;
6356
6477
  };
6357
- var import_compiler_runtime$3 = require_compiler_runtime();
6478
+ var import_compiler_runtime$8 = require_compiler_runtime();
6358
6479
  const ReasoningAccordion = (e18) => {
6359
- let h = (0, import_compiler_runtime$3.c)(13), { reasoning: g, index: _, isStreaming: v } = e18, y = _ === void 0 ? 0 : _, b = v === void 0 ? false : v, x = b ? "reasoning" : void 0, S;
6360
- h[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (S = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(BotMessageSquare, { className: "h-3 w-3" }), h[0] = S) : S = h[0];
6361
- let C = b ? "Thinking" : "View reasoning", T;
6362
- h[1] !== g.length || h[2] !== C ? (T = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(AccordionTrigger, {
6480
+ let h = (0, import_compiler_runtime$8.c)(13), { reasoning: g, index: _, isStreaming: v } = e18, y = _ === void 0 ? 0 : _, b = v === void 0 ? false : v, [x, S] = import_react.useState("");
6481
+ if (!g && !b) return null;
6482
+ let C = b ? "reasoning" : x, T;
6483
+ h[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (T = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(BotMessageSquare, { className: "h-3 w-3" }), h[0] = T) : T = h[0];
6484
+ let E = b ? "Thinking" : "View reasoning", D = g.length > 0 && ` (${g.length} chars)`, O;
6485
+ h[1] !== E || h[2] !== D ? (O = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(AccordionTrigger, {
6363
6486
  className: "text-xs text-muted-foreground hover:bg-muted/50 px-2 py-1 h-auto rounded-sm [&[data-state=open]>svg]:rotate-180",
6364
6487
  children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", {
6365
6488
  className: "flex items-center gap-2",
6366
6489
  children: [
6367
- S,
6368
- C,
6369
- " (",
6370
- g.length,
6371
- " ",
6372
- "chars)"
6490
+ T,
6491
+ E,
6492
+ D
6373
6493
  ]
6374
6494
  })
6375
- }), h[1] = g.length, h[2] = C, h[3] = T) : T = h[3];
6376
- let E;
6377
- h[4] === g ? E = h[5] : (E = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(AccordionContent, {
6495
+ }), h[1] = E, h[2] = D, h[3] = O) : O = h[3];
6496
+ let k;
6497
+ h[4] === g ? k = h[5] : (k = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(AccordionContent, {
6378
6498
  className: "pb-2 px-2",
6379
6499
  children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
6380
6500
  className: "bg-muted/30 border border-muted/50 rounded-md p-3 italic text-muted-foreground/90 relative",
@@ -6383,31 +6503,194 @@ const ReasoningAccordion = (e18) => {
6383
6503
  children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(MarkdownRenderer, { content: g })
6384
6504
  })
6385
6505
  })
6386
- }), h[4] = g, h[5] = E);
6387
- let D;
6388
- h[6] !== T || h[7] !== E ? (D = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(AccordionItem, {
6506
+ }), h[4] = g, h[5] = k);
6507
+ let A;
6508
+ h[6] !== O || h[7] !== k ? (A = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(AccordionItem, {
6389
6509
  value: "reasoning",
6390
6510
  className: "border-0",
6391
- children: [T, E]
6392
- }), h[6] = T, h[7] = E, h[8] = D) : D = h[8];
6393
- let O;
6394
- return h[9] !== y || h[10] !== x || h[11] !== D ? (O = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Accordion, {
6511
+ children: [O, k]
6512
+ }), h[6] = O, h[7] = k, h[8] = A) : A = h[8];
6513
+ let j;
6514
+ return h[9] !== y || h[10] !== C || h[11] !== A ? (j = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Accordion, {
6395
6515
  type: "single",
6396
6516
  collapsible: true,
6397
6517
  className: "w-full mb-2",
6398
- value: x,
6399
- children: D
6400
- }, y), h[9] = y, h[10] = x, h[11] = D, h[12] = O) : O = h[12], O;
6518
+ value: C,
6519
+ onValueChange: S,
6520
+ children: A
6521
+ }, y), h[9] = y, h[10] = C, h[11] = A, h[12] = j) : j = h[12], j;
6522
+ };
6523
+ function formatToolName(e18) {
6524
+ return e18.replace("tool-", "");
6525
+ }
6526
+ var import_compiler_runtime$7 = require_compiler_runtime();
6527
+ const ToolArgsRenderer = (e18) => {
6528
+ let h = (0, import_compiler_runtime$7.c)(9), { input: g, label: _ } = e18, v = _ === void 0 ? "Tool Request" : _;
6529
+ if (g == null) return null;
6530
+ let y;
6531
+ h[0] === v ? y = h[1] : (y = /* @__PURE__ */ (0, import_jsx_runtime.jsx)("h3", {
6532
+ className: "text-xs font-semibold text-muted-foreground",
6533
+ children: v
6534
+ }), h[0] = v, h[1] = y);
6535
+ let b;
6536
+ h[2] === g ? b = h[3] : (b = JSON.stringify(g, null, 2), h[2] = g, h[3] = b);
6537
+ let x;
6538
+ h[4] === b ? x = h[5] : (x = /* @__PURE__ */ (0, import_jsx_runtime.jsx)("pre", {
6539
+ className: "bg-(--slate-2) p-2 text-muted-foreground border border-(--slate-4) rounded text-xs overflow-auto scrollbar-thin max-h-64",
6540
+ children: b
6541
+ }), h[4] = b, h[5] = x);
6542
+ let S;
6543
+ return h[6] !== y || h[7] !== x ? (S = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
6544
+ className: "space-y-2",
6545
+ children: [y, x]
6546
+ }), h[6] = y, h[7] = x, h[8] = S) : S = h[8], S;
6547
+ };
6548
+ var import_compiler_runtime$6 = require_compiler_runtime();
6549
+ const ToolApprovalCard = (e18) => {
6550
+ let h = (0, import_compiler_runtime$6.c)(25), { toolName: g, input: _, approval: y, onApprove: x, className: S } = e18, C;
6551
+ h[0] === S ? C = h[1] : (C = cn("rounded-md border border-(--amber-6) bg-(--amber-2) p-3 space-y-3", S), h[0] = S, h[1] = C);
6552
+ let w = `Approval required for ${formatToolName(g)}`, T;
6553
+ h[2] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (T = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ShieldQuestionMark, { className: "h-4 w-4 text-(--amber-11) mt-0.5 shrink-0" }), h[2] = T) : T = h[2];
6554
+ let E;
6555
+ h[3] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (E = /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
6556
+ className: "font-semibold",
6557
+ children: "Approval required:"
6558
+ }), h[3] = E) : E = h[3];
6559
+ let D;
6560
+ h[4] === g ? D = h[5] : (D = formatToolName(g), h[4] = g, h[5] = D);
6561
+ let O;
6562
+ h[6] === D ? O = h[7] : (O = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
6563
+ className: "flex items-start gap-2",
6564
+ children: [T, /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
6565
+ className: "text-xs text-(--amber-11) leading-relaxed",
6566
+ children: [
6567
+ E,
6568
+ " ",
6569
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("code", {
6570
+ className: "font-mono",
6571
+ children: D
6572
+ })
6573
+ ]
6574
+ })]
6575
+ }), h[6] = D, h[7] = O);
6576
+ let k;
6577
+ h[8] === _ ? k = h[9] : (k = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ToolArgsRenderer, { input: _ }), h[8] = _, h[9] = k);
6578
+ let A;
6579
+ h[10] !== y.id || h[11] !== x ? (A = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Button, {
6580
+ size: "xs",
6581
+ variant: "outline",
6582
+ onClick: () => x({
6583
+ id: y.id,
6584
+ approved: false
6585
+ }),
6586
+ children: "Deny"
6587
+ }), h[10] = y.id, h[11] = x, h[12] = A) : A = h[12];
6588
+ let j;
6589
+ h[13] !== y.id || h[14] !== x ? (j = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Button, {
6590
+ size: "xs",
6591
+ onClick: () => x({
6592
+ id: y.id,
6593
+ approved: true
6594
+ }),
6595
+ children: "Approve"
6596
+ }), h[13] = y.id, h[14] = x, h[15] = j) : j = h[15];
6597
+ let M;
6598
+ h[16] !== A || h[17] !== j ? (M = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
6599
+ className: "flex items-center justify-end gap-2",
6600
+ children: [A, j]
6601
+ }), h[16] = A, h[17] = j, h[18] = M) : M = h[18];
6602
+ let N;
6603
+ return h[19] !== C || h[20] !== M || h[21] !== w || h[22] !== O || h[23] !== k ? (N = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
6604
+ className: C,
6605
+ role: "alertdialog",
6606
+ "aria-label": w,
6607
+ children: [
6608
+ O,
6609
+ k,
6610
+ M
6611
+ ]
6612
+ }), h[19] = C, h[20] = M, h[21] = w, h[22] = O, h[23] = k, h[24] = N) : N = h[24], N;
6401
6613
  };
6402
- var import_compiler_runtime$2 = require_compiler_runtime(), SuccessResultSchema = object$1({
6614
+ var import_compiler_runtime$5 = require_compiler_runtime();
6615
+ const ToolErrorCard = (e18) => {
6616
+ let h = (0, import_compiler_runtime$5.c)(28), { toolName: g, input: _, errorText: y, isLive: b, className: x } = e18, [S, C] = import_react.useState(b), w = import_react.useRef(b), T, E;
6617
+ h[0] === b ? (T = h[1], E = h[2]) : (T = () => {
6618
+ w.current && !b && C(false), w.current = b;
6619
+ }, E = [b], h[0] = b, h[1] = T, h[2] = E), import_react.useEffect(T, E);
6620
+ let D;
6621
+ h[3] === x ? D = h[4] : (D = cn("rounded-md border border-(--red-6) bg-(--red-2)", x), h[3] = x, h[4] = D);
6622
+ let O;
6623
+ h[5] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (O = () => C(_temp$2), h[5] = O) : O = h[5];
6624
+ let k;
6625
+ h[6] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (k = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(CircleX, { className: "h-3.5 w-3.5 shrink-0" }), h[6] = k) : k = h[6];
6626
+ let A;
6627
+ h[7] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (A = /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
6628
+ className: "font-semibold",
6629
+ children: "Failed:"
6630
+ }), h[7] = A) : A = h[7];
6631
+ let j;
6632
+ h[8] === g ? j = h[9] : (j = formatToolName(g), h[8] = g, h[9] = j);
6633
+ let M;
6634
+ h[10] === j ? M = h[11] : (M = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", {
6635
+ className: "flex-1 text-left",
6636
+ children: [
6637
+ A,
6638
+ " ",
6639
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("code", {
6640
+ className: "font-mono",
6641
+ children: j
6642
+ })
6643
+ ]
6644
+ }), h[10] = j, h[11] = M);
6645
+ let N = S && "rotate-180", P;
6646
+ h[12] === N ? P = h[13] : (P = cn("h-3.5 w-3.5 shrink-0 transition-transform", N), h[12] = N, h[13] = P);
6647
+ let F;
6648
+ h[14] === P ? F = h[15] : (F = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ChevronDown, { className: P }), h[14] = P, h[15] = F);
6649
+ let I;
6650
+ h[16] !== S || h[17] !== F || h[18] !== M ? (I = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("button", {
6651
+ type: "button",
6652
+ onClick: O,
6653
+ className: "w-full flex items-center gap-2 px-3 py-2 text-xs text-(--red-11) hover:bg-(--red-3) rounded-md transition-colors",
6654
+ "aria-expanded": S,
6655
+ children: [
6656
+ k,
6657
+ M,
6658
+ F
6659
+ ]
6660
+ }), h[16] = S, h[17] = F, h[18] = M, h[19] = I) : I = h[19];
6661
+ let L;
6662
+ h[20] !== y || h[21] !== _ || h[22] !== S ? (L = S && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
6663
+ className: "px-3 pb-3 space-y-3 border-t border-(--red-6)/40 pt-3",
6664
+ children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(ToolArgsRenderer, { input: _ }), y && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("h3", {
6665
+ className: "text-xs font-semibold text-(--red-11) mb-1",
6666
+ children: "Error"
6667
+ }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("pre", {
6668
+ className: "bg-(--red-2) border border-(--red-6) rounded p-2 text-xs text-(--red-11) leading-relaxed overflow-auto scrollbar-thin max-h-64 whitespace-pre-wrap",
6669
+ children: y
6670
+ })] })]
6671
+ }), h[20] = y, h[21] = _, h[22] = S, h[23] = L) : L = h[23];
6672
+ let R;
6673
+ return h[24] !== I || h[25] !== L || h[26] !== D ? (R = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
6674
+ className: D,
6675
+ children: [I, L]
6676
+ }), h[24] = I, h[25] = L, h[26] = D, h[27] = R) : R = h[27], R;
6677
+ };
6678
+ function _temp$2(e18) {
6679
+ return !e18;
6680
+ }
6681
+ var import_compiler_runtime$4 = require_compiler_runtime();
6682
+ function isUninformative(e18) {
6683
+ return e18 == null ? true : typeof e18 == "object" ? isEmpty_default(e18) : false;
6684
+ }
6685
+ var SuccessResultSchema = looseObject({
6403
6686
  status: string().default("success"),
6404
6687
  auth_required: boolean().default(false),
6405
6688
  action_url: any(),
6406
6689
  next_steps: any(),
6407
6690
  meta: any(),
6408
6691
  message: string().nullish()
6409
- }).passthrough(), PrettySuccessResult = (e18) => {
6410
- let h = (0, import_compiler_runtime$2.c)(12), { data: g } = e18, _;
6692
+ }), PrettySuccessResult = (e18) => {
6693
+ let h = (0, import_compiler_runtime$4.c)(12), { data: g } = e18, _;
6411
6694
  if (h[0] !== g) {
6412
6695
  let { status: e19, auth_required: v, action_url: y, meta: b, next_steps: x, message: S, ...C } = g, w;
6413
6696
  h[2] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (w = /* @__PURE__ */ (0, import_jsx_runtime.jsx)("h3", {
@@ -6416,12 +6699,12 @@ var import_compiler_runtime$2 = require_compiler_runtime(), SuccessResultSchema
6416
6699
  }), h[2] = w) : w = h[2];
6417
6700
  let T;
6418
6701
  h[3] === e19 ? T = h[4] : (T = /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
6419
- className: "text-xs px-2 py-0.5 bg-[var(--grass-2)] text-[var(--grass-11)] rounded-full font-medium capitalize",
6702
+ className: "text-xs px-2 py-0.5 bg-(--grass-2) text-(--grass-11) rounded-full font-medium capitalize",
6420
6703
  children: e19
6421
6704
  }), h[3] = e19, h[4] = T);
6422
6705
  let E;
6423
6706
  h[5] === v ? E = h[6] : (E = v && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
6424
- className: "text-xs px-2 py-0.5 bg-[var(--amber-2)] text-[var(--amber-11)] rounded-full",
6707
+ className: "text-xs px-2 py-0.5 bg-(--amber-2) text-(--amber-11) rounded-full",
6425
6708
  children: "Auth Required"
6426
6709
  }), h[5] = v, h[6] = E);
6427
6710
  let D;
@@ -6435,7 +6718,7 @@ var import_compiler_runtime$2 = require_compiler_runtime(), SuccessResultSchema
6435
6718
  let O;
6436
6719
  h[10] === S ? O = h[11] : (O = S && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
6437
6720
  className: "flex items-start gap-2",
6438
- children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Info, { className: "h-3 w-3 text-[var(--blue-11)] mt-0.5 flex-shrink-0" }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
6721
+ children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Info, { className: "h-3 w-3 text-(--blue-11) mt-0.5 shrink-0" }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
6439
6722
  className: "text-xs text-foreground",
6440
6723
  children: S
6441
6724
  })]
@@ -6452,8 +6735,9 @@ var import_compiler_runtime$2 = require_compiler_runtime(), SuccessResultSchema
6452
6735
  }), h[0] = g, h[1] = _;
6453
6736
  } else _ = h[1];
6454
6737
  return _;
6455
- }, ResultRenderer = (e18) => {
6456
- let h = (0, import_compiler_runtime$2.c)(8), { result: g } = e18, _;
6738
+ };
6739
+ const ResultRenderer = (e18) => {
6740
+ let h = (0, import_compiler_runtime$4.c)(8), { result: g } = e18, _;
6457
6741
  h[0] === g ? _ = h[1] : (_ = SuccessResultSchema.safeParse(g), h[0] = g, h[1] = _);
6458
6742
  let v = _;
6459
6743
  if (v.success) {
@@ -6467,160 +6751,262 @@ var import_compiler_runtime$2 = require_compiler_runtime(), SuccessResultSchema
6467
6751
  className: "text-xs font-medium text-muted-foreground mb-1 max-h-64 overflow-y-auto scrollbar-thin",
6468
6752
  children: y
6469
6753
  }), h[6] = y, h[7] = b), b;
6470
- }, ToolArgsRenderer = (e18) => {
6471
- let h = (0, import_compiler_runtime$2.c)(9), { input: g } = e18;
6472
- if (!(g && g !== null)) return null;
6473
- let _;
6474
- h[0] === g ? _ = h[1] : (_ = isEmpty_default(g), h[0] = g, h[1] = _);
6475
- let v = _, y = typeof g == "object" && !Array.isArray(g) && Object.keys(g).length > 0, b;
6476
- h[2] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (b = /* @__PURE__ */ (0, import_jsx_runtime.jsx)("h3", {
6477
- className: "text-xs font-semibold text-muted-foreground",
6478
- children: "Tool Request"
6479
- }), h[2] = b) : b = h[2];
6480
- let x;
6481
- h[3] !== g || h[4] !== v || h[5] !== y ? (x = v ? "{}" : y ? JSON.stringify(g, null, 2) : String(g), h[3] = g, h[4] = v, h[5] = y, h[6] = x) : x = h[6];
6482
- let S;
6483
- return h[7] === x ? S = h[8] : (S = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
6484
- className: "space-y-2",
6485
- children: [b, /* @__PURE__ */ (0, import_jsx_runtime.jsx)("pre", {
6486
- className: "bg-[var(--slate-2)] p-2 text-muted-foreground border border-[var(--slate-4)] rounded text-xs overflow-auto scrollbar-thin max-h-64",
6487
- children: x
6488
- })]
6489
- }), h[7] = x, h[8] = S), S;
6490
6754
  };
6491
- const ToolCallAccordion = (e18) => {
6492
- let h = (0, import_compiler_runtime$2.c)(38), { toolName: g, result: _, error: y, index: b, state: x, className: S, input: C } = e18, T = b === void 0 ? 0 : b, E = x === "output-available" && (_ || y), D = y ? "error" : E ? "success" : "loading", O;
6493
- h[0] === D ? O = h[1] : (O = () => {
6494
- switch (D) {
6495
- case "loading":
6496
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(LoaderCircle, { className: "h-3 w-3 animate-spin" });
6497
- case "error":
6498
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(CircleX, { className: "h-3 w-3 text-[var(--red-11)]" });
6499
- case "success":
6500
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(CircleCheckBig, { className: "h-3 w-3 text-[var(--grass-11)]" });
6501
- default:
6502
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Wrench, { className: "h-3 w-3" });
6755
+ function _temp$1(e18) {
6756
+ let [h, g] = e18;
6757
+ return isUninformative(g) ? null : /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
6758
+ className: "space-y-1.5",
6759
+ children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
6760
+ className: "text-xs text-muted-foreground",
6761
+ children: h
6762
+ }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("pre", {
6763
+ className: "bg-(--slate-2) p-2 text-muted-foreground border border-(--slate-4) rounded text-xs overflow-auto scrollbar-thin max-h-64",
6764
+ children: JSON.stringify(g, null, 2)
6765
+ })]
6766
+ }, h);
6767
+ }
6768
+ var import_compiler_runtime$3 = require_compiler_runtime(), STATUS_LABEL = {
6769
+ "input-streaming": "Generating",
6770
+ "input-available": "Running",
6771
+ "approval-responded": "Awaiting result",
6772
+ "output-available": "Done",
6773
+ "output-denied": "Denied"
6774
+ }, StatusIcon = (e18) => {
6775
+ let h = (0, import_compiler_runtime$3.c)(4), { state: g } = e18;
6776
+ switch (g) {
6777
+ case "input-streaming":
6778
+ case "input-available":
6779
+ case "approval-responded": {
6780
+ let e19;
6781
+ return h[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (e19 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(LoaderCircle, { className: "h-3 w-3 animate-spin" }), h[0] = e19) : e19 = h[0], e19;
6503
6782
  }
6504
- }, h[0] = D, h[1] = O);
6505
- let k = O, A;
6506
- h[2] !== y || h[3] !== E || h[4] !== D ? (A = () => D === "loading" ? "Running" : y ? "Failed" : E ? "Done" : "Tool call", h[2] = y, h[3] = E, h[4] = D, h[5] = A) : A = h[5];
6507
- let j = A, M = `tool-${T}`, N;
6508
- h[6] === S ? N = h[7] : (N = cn("w-full", S), h[6] = S, h[7] = N);
6509
- let P = D === "error" && "text-[var(--red-11)]/80", F = D === "success" && "text-[var(--grass-11)]/80", B;
6510
- h[8] !== P || h[9] !== F ? (B = cn("h-6 text-xs border-border shadow-none! ring-0! bg-muted/60 hover:bg-muted py-0 px-2 gap-1 rounded-sm [&[data-state=open]>svg]:rotate-180 hover:no-underline", P, F), h[8] = P, h[9] = F, h[10] = B) : B = h[10];
6511
- let V;
6512
- h[11] === k ? V = h[12] : (V = k(), h[11] = k, h[12] = V);
6513
- let H = j(), U;
6514
- h[13] === g ? U = h[14] : (U = formatToolName(g), h[13] = g, h[14] = U);
6515
- let W;
6516
- h[15] === U ? W = h[16] : (W = /* @__PURE__ */ (0, import_jsx_runtime.jsx)("code", {
6783
+ case "output-available": {
6784
+ let e19;
6785
+ return h[1] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (e19 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(CircleCheckBig, { className: "h-3 w-3 text-(--grass-11)" }), h[1] = e19) : e19 = h[1], e19;
6786
+ }
6787
+ case "output-denied": {
6788
+ let e19;
6789
+ return h[2] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (e19 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Ban, { className: "h-3 w-3 text-muted-foreground" }), h[2] = e19) : e19 = h[2], e19;
6790
+ }
6791
+ default: {
6792
+ logNever(g);
6793
+ let e19;
6794
+ return h[3] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (e19 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Wrench, { className: "h-3 w-3" }), h[3] = e19) : e19 = h[3], e19;
6795
+ }
6796
+ }
6797
+ };
6798
+ function getTriggerToneClass(e18) {
6799
+ switch (e18) {
6800
+ case "output-available":
6801
+ return "text-(--grass-11)/80";
6802
+ case "output-denied":
6803
+ return "text-muted-foreground";
6804
+ case "input-streaming":
6805
+ case "input-available":
6806
+ case "approval-responded":
6807
+ return "";
6808
+ default:
6809
+ return logNever(e18), "";
6810
+ }
6811
+ }
6812
+ const ToolHistoryRow = (e18) => {
6813
+ let h = (0, import_compiler_runtime$3.c)(29), { toolName: g, state: _, input: y, result: b, approval: x, index: S, className: C } = e18, T = `tool-${S === void 0 ? 0 : S}`, E;
6814
+ h[0] === C ? E = h[1] : (E = cn("w-full", C), h[0] = C, h[1] = E);
6815
+ let D;
6816
+ h[2] === _ ? D = h[3] : (D = cn("h-6 text-xs border-border shadow-none! ring-0! bg-muted/60 hover:bg-muted py-0 px-2 gap-1 rounded-sm [&[data-state=open]>svg]:rotate-180 hover:no-underline", getTriggerToneClass(_)), h[2] = _, h[3] = D);
6817
+ let O;
6818
+ h[4] === _ ? O = h[5] : (O = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(StatusIcon, { state: _ }), h[4] = _, h[5] = O);
6819
+ let k = STATUS_LABEL[_], A;
6820
+ h[6] === g ? A = h[7] : (A = formatToolName(g), h[6] = g, h[7] = A);
6821
+ let j;
6822
+ h[8] === A ? j = h[9] : (j = /* @__PURE__ */ (0, import_jsx_runtime.jsx)("code", {
6517
6823
  className: "font-mono text-xs",
6518
- children: U
6519
- }), h[15] = U, h[16] = W);
6520
- let G;
6521
- h[17] !== H || h[18] !== W || h[19] !== V ? (G = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", {
6824
+ children: A
6825
+ }), h[8] = A, h[9] = j);
6826
+ let M;
6827
+ h[10] !== O || h[11] !== k || h[12] !== j ? (M = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", {
6522
6828
  className: "flex items-center gap-1",
6523
6829
  children: [
6524
- V,
6525
- H,
6830
+ O,
6831
+ k,
6526
6832
  ":",
6527
- W
6528
- ]
6529
- }), h[17] = H, h[18] = W, h[19] = V, h[20] = G) : G = h[20];
6530
- let K;
6531
- h[21] !== G || h[22] !== B ? (K = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(AccordionTrigger, {
6532
- className: B,
6533
- children: G
6534
- }), h[21] = G, h[22] = B, h[23] = K) : K = h[23];
6535
- let q;
6536
- h[24] !== y || h[25] !== E || h[26] !== C || h[27] !== _ ? (q = E && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
6537
- className: "space-y-3",
6538
- children: [
6539
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ToolArgsRenderer, { input: C }),
6540
- _ != null && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ResultRenderer, { result: _ }),
6541
- y && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
6542
- className: "bg-[var(--red-2)] border border-[var(--red-6)] rounded-lg p-3",
6543
- children: [/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
6544
- className: "text-xs font-semibold text-[var(--red-11)] mb-2 flex items-center gap-2",
6545
- children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "w-1.5 h-1.5 bg-[var(--red-9)] rounded-full" }), "Error"]
6546
- }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
6547
- className: "text-sm text-[var(--red-11)] leading-relaxed",
6548
- children: y
6549
- })]
6550
- })
6833
+ j
6551
6834
  ]
6552
- }), h[24] = y, h[25] = E, h[26] = C, h[27] = _, h[28] = q) : q = h[28];
6553
- let J;
6554
- h[29] === q ? J = h[30] : (J = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(AccordionContent, {
6835
+ }), h[10] = O, h[11] = k, h[12] = j, h[13] = M) : M = h[13];
6836
+ let N;
6837
+ h[14] !== D || h[15] !== M ? (N = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(AccordionTrigger, {
6838
+ className: D,
6839
+ children: M
6840
+ }), h[14] = D, h[15] = M, h[16] = N) : N = h[16];
6841
+ let P;
6842
+ h[17] !== x || h[18] !== y || h[19] !== b || h[20] !== _ ? (P = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(AccordionContent, {
6555
6843
  className: "py-2 px-2",
6556
- children: q
6557
- }), h[29] = q, h[30] = J);
6558
- let Y;
6559
- h[31] !== K || h[32] !== J ? (Y = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(AccordionItem, {
6844
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(HistoryContent, {
6845
+ state: _,
6846
+ input: y,
6847
+ result: b,
6848
+ approval: x
6849
+ })
6850
+ }), h[17] = x, h[18] = y, h[19] = b, h[20] = _, h[21] = P) : P = h[21];
6851
+ let F;
6852
+ h[22] !== N || h[23] !== P ? (F = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(AccordionItem, {
6560
6853
  value: "tool-call",
6561
6854
  className: "border-0",
6562
- children: [K, J]
6563
- }), h[31] = K, h[32] = J, h[33] = Y) : Y = h[33];
6564
- let Z;
6565
- return h[34] !== Y || h[35] !== M || h[36] !== N ? (Z = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Accordion, {
6855
+ children: [N, P]
6856
+ }), h[22] = N, h[23] = P, h[24] = F) : F = h[24];
6857
+ let I;
6858
+ return h[25] !== F || h[26] !== T || h[27] !== E ? (I = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Accordion, {
6566
6859
  type: "single",
6567
6860
  collapsible: true,
6568
- className: N,
6569
- children: Y
6570
- }, M), h[34] = Y, h[35] = M, h[36] = N, h[37] = Z) : Z = h[37], Z;
6861
+ className: E,
6862
+ children: F
6863
+ }, T), h[25] = F, h[26] = T, h[27] = E, h[28] = I) : I = h[28], I;
6571
6864
  };
6572
- function formatToolName(e18) {
6573
- return e18.replace("tool-", "");
6574
- }
6575
- function _temp$1(e18) {
6576
- let [h, g] = e18;
6577
- return isEmpty_default(g) ? null : /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
6578
- className: "space-y-1.5",
6579
- children: [/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
6580
- className: "text-xs font-medium text-muted-foreground capitalize flex items-center gap-2",
6581
- children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "w-1.5 h-1.5 bg-[var(--blue-9)] rounded-full" }), h]
6582
- }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("pre", {
6583
- className: "bg-[var(--slate-2)] p-2 text-muted-foreground border border-[var(--slate-4)] rounded text-xs overflow-auto scrollbar-thin max-h-64",
6584
- children: JSON.stringify(g, null, 2)
6585
- })]
6586
- }, h);
6587
- }
6588
- const renderUIMessage = ({ message: e18, isStreamingReasoning: h, isLast: _ }) => {
6589
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_jsx_runtime.Fragment, { children: e18.parts.map((e19, h2) => v(e19, h2)) });
6590
- function v(v2, y) {
6591
- if (isToolPart(v2)) return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ToolCallAccordion, {
6592
- index: y,
6593
- toolName: v2.type,
6594
- result: v2.output,
6865
+ var HistoryContent = (e18) => {
6866
+ let h = (0, import_compiler_runtime$3.c)(16), { state: g, input: _, result: v, approval: y } = e18;
6867
+ switch (g) {
6868
+ case "input-streaming":
6869
+ case "input-available":
6870
+ case "approval-responded": {
6871
+ let e19;
6872
+ return h[0] === _ ? e19 = h[1] : (e19 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ToolArgsRenderer, { input: _ }), h[0] = _, h[1] = e19), e19;
6873
+ }
6874
+ case "output-available": {
6875
+ let e19;
6876
+ h[2] === _ ? e19 = h[3] : (e19 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ToolArgsRenderer, { input: _ }), h[2] = _, h[3] = e19);
6877
+ let g2;
6878
+ h[4] === v ? g2 = h[5] : (g2 = v != null && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ResultRenderer, { result: v }), h[4] = v, h[5] = g2);
6879
+ let y2;
6880
+ return h[6] !== e19 || h[7] !== g2 ? (y2 = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
6881
+ className: "space-y-3",
6882
+ children: [e19, g2]
6883
+ }), h[6] = e19, h[7] = g2, h[8] = y2) : y2 = h[8], y2;
6884
+ }
6885
+ case "output-denied": {
6886
+ let e19;
6887
+ h[9] === _ ? e19 = h[10] : (e19 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ToolArgsRenderer, { input: _ }), h[9] = _, h[10] = e19);
6888
+ let g2 = (y == null ? void 0 : y.reason) ? `: ${y.reason}` : ".", v2;
6889
+ h[11] === g2 ? v2 = h[12] : (v2 = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
6890
+ className: "bg-muted/40 border border-border rounded-md p-3 text-xs text-muted-foreground leading-relaxed",
6891
+ children: ["Tool execution was denied", g2]
6892
+ }), h[11] = g2, h[12] = v2);
6893
+ let b;
6894
+ return h[13] !== e19 || h[14] !== v2 ? (b = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
6895
+ className: "space-y-3",
6896
+ children: [e19, v2]
6897
+ }), h[13] = e19, h[14] = v2, h[15] = b) : b = h[15], b;
6898
+ }
6899
+ default:
6900
+ return logNever(g), null;
6901
+ }
6902
+ }, import_compiler_runtime$2 = require_compiler_runtime();
6903
+ const ToolCallView = (e18) => {
6904
+ let h = (0, import_compiler_runtime$2.c)(25), { toolName: g, state: _, result: v, errorText: y, input: b, approval: x, onApprove: S, index: C, className: w, isLive: T } = e18, E = T === void 0 ? true : T;
6905
+ switch (_) {
6906
+ case "approval-requested": {
6907
+ if (x != null && S != null) {
6908
+ let e20;
6909
+ return h[0] !== x || h[1] !== w || h[2] !== b || h[3] !== S || h[4] !== g ? (e20 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ToolApprovalCard, {
6910
+ toolName: g,
6911
+ input: b,
6912
+ approval: x,
6913
+ onApprove: S,
6914
+ className: w
6915
+ }), h[0] = x, h[1] = w, h[2] = b, h[3] = S, h[4] = g, h[5] = e20) : e20 = h[5], e20;
6916
+ }
6917
+ let e19;
6918
+ return h[6] !== w || h[7] !== C || h[8] !== b || h[9] !== g ? (e19 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ToolHistoryRow, {
6919
+ toolName: g,
6920
+ state: "input-available",
6921
+ input: b,
6922
+ index: C,
6923
+ className: w
6924
+ }), h[6] = w, h[7] = C, h[8] = b, h[9] = g, h[10] = e19) : e19 = h[10], e19;
6925
+ }
6926
+ case "output-error": {
6927
+ let e19;
6928
+ return h[11] !== w || h[12] !== y || h[13] !== b || h[14] !== E || h[15] !== g ? (e19 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ToolErrorCard, {
6929
+ toolName: g,
6930
+ input: b,
6931
+ errorText: y,
6932
+ isLive: E,
6933
+ className: w
6934
+ }), h[11] = w, h[12] = y, h[13] = b, h[14] = E, h[15] = g, h[16] = e19) : e19 = h[16], e19;
6935
+ }
6936
+ case "input-streaming":
6937
+ case "input-available":
6938
+ case "approval-responded":
6939
+ case "output-available":
6940
+ case "output-denied": {
6941
+ let e19;
6942
+ return h[17] !== x || h[18] !== w || h[19] !== C || h[20] !== b || h[21] !== v || h[22] !== _ || h[23] !== g ? (e19 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ToolHistoryRow, {
6943
+ toolName: g,
6944
+ state: _,
6945
+ input: b,
6946
+ result: v,
6947
+ approval: x,
6948
+ index: C,
6949
+ className: w
6950
+ }), h[17] = x, h[18] = w, h[19] = C, h[20] = b, h[21] = v, h[22] = _, h[23] = g, h[24] = e19) : e19 = h[24], e19;
6951
+ }
6952
+ default:
6953
+ return logNever(_), null;
6954
+ }
6955
+ }, renderUIMessage = ({ message: e18, isStreamingReasoning: h, isLast: _, addToolApprovalResponse: v }) => {
6956
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_jsx_runtime.Fragment, { children: e18.parts.map((e19, h2) => y(e19, h2)) });
6957
+ function y(y2, b) {
6958
+ if (isToolPart(y2)) return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ToolCallView, {
6959
+ index: b,
6960
+ toolName: y2.type,
6961
+ result: y2.output,
6962
+ errorText: y2.state === "output-error" ? y2.errorText : void 0,
6595
6963
  className: "my-2",
6596
- state: v2.state,
6597
- input: v2.input
6598
- }, y);
6599
- if (isDataPart(v2)) return Logger.debug("Found data part", v2), null;
6600
- switch (v2.type) {
6964
+ state: y2.state,
6965
+ input: y2.input,
6966
+ approval: y2.approval,
6967
+ onApprove: v,
6968
+ isLive: _
6969
+ }, b);
6970
+ if (isDataPart(y2)) return Logger.debug("Found data part", y2), null;
6971
+ switch (y2.type) {
6601
6972
  case "text":
6602
- return v2.text.includes("<marimo-") ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react.Fragment, { children: renderHTML({ html: v2.text }) }, y) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(MarkdownRenderer, { content: v2.text }, y);
6973
+ return y2.text.includes("<marimo-") ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react.Fragment, { children: renderHTML({ html: y2.text }) }, b) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(MarkdownRenderer, { content: y2.text }, b);
6603
6974
  case "reasoning":
6604
6975
  return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ReasoningAccordion, {
6605
- reasoning: v2.text,
6606
- index: y,
6607
- isStreaming: h && _ && y === (e18.parts.length || 0) - 1
6608
- }, y);
6976
+ reasoning: y2.text,
6977
+ index: b,
6978
+ isStreaming: h && _ && b === (e18.parts.length || 0) - 1
6979
+ }, b);
6609
6980
  case "file":
6610
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(AttachmentRenderer, { attachment: v2 }, y);
6981
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(AttachmentRenderer, { attachment: y2 }, b);
6611
6982
  case "dynamic-tool":
6612
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ToolCallAccordion, {
6613
- toolName: v2.toolName,
6614
- result: v2.output,
6615
- state: v2.state,
6616
- input: v2.input
6617
- }, y);
6983
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ToolCallView, {
6984
+ toolName: y2.toolName,
6985
+ result: y2.output,
6986
+ errorText: y2.state === "output-error" ? y2.errorText : void 0,
6987
+ state: y2.state,
6988
+ input: y2.input,
6989
+ approval: y2.approval,
6990
+ onApprove: v,
6991
+ isLive: _
6992
+ }, b);
6618
6993
  case "source-document":
6994
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SourceChip, {
6995
+ icon: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(FileText, { className: "h-3 w-3 shrink-0" }),
6996
+ title: y2.title,
6997
+ subtitle: y2.filename
6998
+ }, b);
6619
6999
  case "source-url":
7000
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SourceChip, {
7001
+ icon: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ExternalLink, { className: "h-3 w-3 shrink-0" }),
7002
+ title: y2.title ?? y2.url,
7003
+ subtitle: y2.title ? y2.url : void 0,
7004
+ href: y2.url
7005
+ }, b);
6620
7006
  case "step-start":
6621
- return Logger.debug("Found non-renderable part", v2), null;
7007
+ return null;
6622
7008
  default:
6623
- return logNever(v2), null;
7009
+ return logNever(y2), null;
6624
7010
  }
6625
7011
  }
6626
7012
  };
@@ -7171,7 +7557,7 @@ const Chatbot = (e18) => {
7171
7557
  let N = (0, import_react.useRef)({
7172
7558
  backendMessageId: null,
7173
7559
  frontendMessageIndex: null
7174
- }), F = (0, import_react.useRef)(null), { data: I } = useAsyncData(async () => (await e18.get_chat_history({})).messages, []), L = e18.value.length > 0 ? e18.value : I, { messages: R, sendMessage: z, setMessages: B, status: V, stop: H, error: U, regenerate: W, clearError: G } = useChat({
7560
+ }), P = (0, import_react.useRef)(null), { data: I } = useAsyncData(async () => (await e18.get_chat_history({})).messages, []), L = e18.value.length > 0 ? e18.value : I, { messages: R, sendMessage: z, setMessages: B, status: V, stop: H, error: U, regenerate: W, clearError: G } = useChat({
7175
7561
  transport: new DefaultChatTransport({ fetch: async (h2, _2) => {
7176
7562
  var _a2;
7177
7563
  if (_2 === void 0) return fetch(h2);
@@ -7192,21 +7578,21 @@ const Chatbot = (e18) => {
7192
7578
  };
7193
7579
  }), _3 = new ReadableStream({
7194
7580
  start(e19) {
7195
- F.current = e19;
7581
+ P.current = e19;
7196
7582
  let h4 = () => {
7197
7583
  try {
7198
7584
  e19.close();
7199
7585
  } catch (e20) {
7200
7586
  Logger.debug("Controller may already be closed", { error: e20 });
7201
7587
  }
7202
- F.current = null;
7588
+ P.current = null;
7203
7589
  };
7204
7590
  return y == null ? void 0 : y.addEventListener("abort", h4), () => {
7205
7591
  y == null ? void 0 : y.removeEventListener("abort", h4);
7206
7592
  };
7207
7593
  },
7208
7594
  cancel() {
7209
- F.current = null;
7595
+ P.current = null;
7210
7596
  }
7211
7597
  });
7212
7598
  return e18.send_prompt({
@@ -7214,7 +7600,7 @@ const Chatbot = (e18) => {
7214
7600
  config: b
7215
7601
  }).catch((e19) => {
7216
7602
  var _a3;
7217
- (_a3 = F.current) == null ? void 0 : _a3.error(e19), F.current = null;
7603
+ (_a3 = P.current) == null ? void 0 : _a3.error(e19), P.current = null;
7218
7604
  }), createUIMessageStreamResponse({ stream: _3 });
7219
7605
  } catch (e19) {
7220
7606
  if (N.current = {
@@ -7242,8 +7628,8 @@ const Chatbot = (e18) => {
7242
7628
  useEventListener(e18.host, MarimoIncomingMessageEvent.TYPE, (e19) => {
7243
7629
  let h2 = ChatMessageIncomingSchema.safeParse(e19.detail.message);
7244
7630
  if (!h2.success) return;
7245
- let g = h2.data, _2 = F.current;
7246
- _2 && (g.content && _2.enqueue(g.content), g.is_final && (_2.close(), F.current = null));
7631
+ let g = h2.data, _2 = P.current;
7632
+ _2 && (g.content && _2.enqueue(g.content), g.is_final && (_2.close(), P.current = null));
7247
7633
  });
7248
7634
  let K = V === "submitted" || V === "streaming", q = (h2) => {
7249
7635
  let g = R.findIndex((e19) => e19.id === h2);