@marimo-team/islands 0.25.3-dev20 → 0.25.3-dev201

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 (688) hide show
  1. package/dist/{ConnectedDataExplorerComponent-CNMliVzw.js → ConnectedDataExplorerComponent-BsWiIPFk.js} +22 -20
  2. package/dist/{ErrorBoundary-DAPIRYqd.js → ErrorBoundary-JYAf40sB.js} +19 -19
  3. package/dist/{abnfDiagram-VCTEODGH-D-Ez91gV.js → abnfDiagram-VCTEODGH-I2x4Yu25.js} +2 -2
  4. package/dist/any-language-editor-BVFHDDQ3.js +75 -0
  5. package/dist/{architectureDiagram-5GKGNRK7-CTpcNtO8.js → architectureDiagram-5GKGNRK7-1bSQMKzK.js} +1 -1
  6. package/dist/{arrays-CN1djC4k.js → arrays-DoQ-AILx.js} +15 -27
  7. package/dist/assets/__vite-browser-external-BCJsx8QS.js +1 -0
  8. package/dist/assets/worker-DodjWT_Z.js +113 -0
  9. package/dist/{button-CvjkwdSk.js → button-BQRdqQi1.js} +199 -192
  10. package/dist/{capabilities-CQ5IjhzL.js → capabilities-C2QUNRXi.js} +2 -2
  11. package/dist/{chat-ui-DaHynk8g.js → chat-ui-DXDoSuS4.js} +370 -369
  12. package/dist/{check-EDwSwP89.js → check-C9Mp9eCK.js} +1 -1
  13. package/dist/{chunk-IMKFNOWR-DGxi-zeo.js → chunk-IMKFNOWR-fsCGAJ9G.js} +1 -1
  14. package/dist/{chunk-SHT3W25Y-CV9J3rAB.js → chunk-SHT3W25Y-D2STW4hj.js} +1 -1
  15. package/dist/{chunk-SVP7TREG-BL-9Fqgg.js → chunk-SVP7TREG-CiY7cQG-.js} +1 -1
  16. package/dist/{chunk-TICWLB2K-Cu_XMjDM.js → chunk-TICWLB2K-C_t5RBp9.js} +1 -1
  17. package/dist/{chunk-YOKDWASO-DPZk8vhS.js → chunk-YOKDWASO-DKplTrBY.js} +20 -20
  18. package/dist/{classDiagram-ZZMXUADV-BXXV13Hq.js → classDiagram-ZZMXUADV-B2JvZAP4.js} +2 -2
  19. package/dist/{classDiagram-v2-VYDZK3BY-B7FXJ1Cp.js → classDiagram-v2-VYDZK3BY-L8VsZG5A.js} +2 -2
  20. package/dist/code-visibility-BKyYMfr_.js +134 -0
  21. package/dist/{common-DsUPhkD6.js → common-BCY25vum.js} +6040 -5865
  22. package/dist/{copy-icon-Ft7t9bqz.js → copy-icon-De584pZ4.js} +3 -3
  23. package/dist/{cynefinDiagram-5FMLGOSQ-CH96rwba.js → cynefinDiagram-5FMLGOSQ-DdllC264.js} +1 -1
  24. package/dist/{dagre-GXQ25YYZ-BD3PmpFY.js → dagre-GXQ25YYZ-BaWHw4_f.js} +1 -1
  25. package/dist/{data-grid-overlay-editor-D7UuVsgB.js → data-grid-overlay-editor-gQmJxgU-.js} +5 -5
  26. package/dist/{data-grid-types-BH_r7g7l.js → data-grid-types-0PJ-9N5n.js} +1 -1
  27. package/dist/{diagram-S7CK7UJ4-BsSJJldB.js → diagram-S7CK7UJ4-pFt-tUDe.js} +1 -1
  28. package/dist/{diagram-UQ7AKVKN-muQtNZc4.js → diagram-UQ7AKVKN-DqGJiBp4.js} +1 -1
  29. package/dist/{diagram-VX7I27RA-CdhuZAqR.js → diagram-VX7I27RA-Dr-yzMjf.js} +1 -1
  30. package/dist/{diagram-Z3DM3KII-BD8mXjOj.js → diagram-Z3DM3KII-8xzJzv-w.js} +1 -1
  31. package/dist/{dialog-CEBFZNyc.js → dialog-DVRfQuhD.js} +25 -25
  32. package/dist/{dist-F8Ep36rk.js → dist-B1M0bGO3.js} +1 -1
  33. package/dist/{dist-D6d86eNJ.js → dist-BA13RJj5.js} +1 -1
  34. package/dist/{dist-Bvs24R_E.js → dist-BJtmSgcE.js} +48 -48
  35. package/dist/{dist-CN_BeG2I.js → dist-Ba2VIn1K.js} +53 -53
  36. package/dist/{dist-PXYI_yuP.js → dist-Bj4bmwUm.js} +12 -12
  37. package/dist/{dist-DoE4XJBC.js → dist-BmS-ZGjl.js} +8626 -8626
  38. package/dist/{dist-BorMD-uX.js → dist-Bzogh7CW.js} +87 -87
  39. package/dist/{dist-CN8zI-XC.js → dist-CThPVKaP.js} +1385 -1382
  40. package/dist/{dist-DiDibOYr.js → dist-CTi5FTiV.js} +87 -87
  41. package/dist/{dist-diIx5qJW.js → dist-Ck_C32ye.js} +2 -2
  42. package/dist/{dist-BLfKmR-l.js → dist-D1fnFp1J.js} +1 -1
  43. package/dist/{dist-OR1OnN-y.js → dist-D3x9__Fu.js} +46 -46
  44. package/dist/{dist-BMQf5zIS.js → dist-D7mrh5sO.js} +36 -36
  45. package/dist/{dist-CSJ0MDRw.js → dist-D9Q3xjiP.js} +1 -1
  46. package/dist/{dist-BuaRHxOc.js → dist-DP60Ubh8.js} +2 -2
  47. package/dist/{dist-CSbh1PNP.js → dist-DTv9KkpW.js} +12 -12
  48. package/dist/{dist-D-wwqlzJ.js → dist-DVVwOfrD.js} +109 -109
  49. package/dist/{dist-C8fAKSH1.js → dist-DYXM73-k.js} +36 -36
  50. package/dist/{dist-DBtSl3sf.js → dist-DjeybPOb.js} +1 -1
  51. package/dist/{dist-CrSP_H1M.js → dist-DtGn9N4h.js} +197 -197
  52. package/dist/{dist-CLdpGQVr.js → dist-KN80qWCP.js} +2 -2
  53. package/dist/{dist-DpBpA_n1.js → dist-Lm-D-Vr6.js} +3 -3
  54. package/dist/{dist-Cg7gzw-a.js → dist-O0qFpEJh.js} +56 -56
  55. package/dist/{dist-CkTTIdBe.js → dist-OUle2RT7.js} +207 -207
  56. package/dist/{dist-BK4Oj99o.js → dist-T5rh6JvL.js} +1 -1
  57. package/dist/{dropdown-menu-CP_qCYHC.js → dropdown-menu-NlnsmNA6.js} +1481 -1433
  58. package/dist/{ebnfDiagram-PWID7BFC-BIN1sweE.js → ebnfDiagram-PWID7BFC-Br04Wy-E.js} +2 -2
  59. package/dist/{erDiagram-RLTQ6QDP-Ctp5cfoN.js → erDiagram-RLTQ6QDP-D5-XVgvv.js} +1 -1
  60. package/dist/{error-banner-D-WCIiMt.js → error-banner-DxJ3s8YO.js} +86 -86
  61. package/dist/{error-entries-Bv6bZPF3.js → error-entries-C2Ux0Fjt.js} +8404 -9095
  62. package/dist/{esm-D2gTsXEV.js → esm-Bbw_Njjx.js} +575 -575
  63. package/dist/{esm-AMFssoNp.js → esm-mDQNEFe_.js} +354 -354
  64. package/dist/feedback-button-BKgw9MHY.js +374 -0
  65. package/dist/{flowDiagram-HODETNUW-3EfLrlFb.js → flowDiagram-HODETNUW-CVl2kREF.js} +2 -2
  66. package/dist/{formats-27CW_UP4.js → formats-BCYthwyc.js} +3 -3
  67. package/dist/{ganttDiagram-EL5Y4UJY-BQT16JSc.js → ganttDiagram-EL5Y4UJY-Dh_4cBJZ.js} +2 -2
  68. package/dist/{glide-data-editor-KvS90MGh.js → glide-data-editor-CzS51bb2.js} +370 -368
  69. package/dist/{glide-utils-DJyqh0EM.js → glide-utils-D98laidb.js} +16 -16
  70. package/dist/{globals-yruoELTW.js → globals-DQ4tv_a-.js} +3 -3
  71. package/dist/{highlighted-body-KPVGNVTW-zwjq21tf.js → highlighted-body-KPVGNVTW-3Ziwfz-V.js} +2 -2
  72. package/dist/{html-to-image-Bf8QMGi4.js → html-to-image-CkH7vdBZ.js} +477 -380
  73. package/dist/{infoDiagram-27XIBGKW-DipQoHxl.js → infoDiagram-27XIBGKW-BJ4vNcZE.js} +1 -1
  74. package/dist/{ishikawaDiagram-5VMMS53U-DgFMjSGz.js → ishikawaDiagram-5VMMS53U-B_Jy1Dsm.js} +1 -1
  75. package/dist/{kanban-definition-UXKFOSKX-w1ACVjgl.js → kanban-definition-UXKFOSKX-C6MkS9vw.js} +1 -1
  76. package/dist/{label-BDKF3Afc.js → label-Qvw1E97W.js} +3 -3
  77. package/dist/{linear-Cnaq3Tfb.js → linear-DWERh7eI.js} +121 -73
  78. package/dist/{loader-BQOfjTIJ.js → loader-DOVB0Syl.js} +12 -12
  79. package/dist/main.js +9706 -7709
  80. package/dist/{mermaid-CHo49Yv-.js → mermaid-Bh918qrq.js} +52 -52
  81. package/dist/mermaid-HWGCJPDP-Du3-HPQA.js +2 -0
  82. package/dist/{mindmap-definition-YA3MSWOX-CrT0KSfX.js → mindmap-definition-YA3MSWOX-BP3ZTuir.js} +1 -1
  83. package/dist/{number-overlay-editor-R2i0FdxV.js → number-overlay-editor-B3ZE3-6d.js} +3 -3
  84. package/dist/{objects-CzUgoMIF.js → objects-DCmMvZtn.js} +1 -3
  85. package/dist/{once-BtE-wKRL.js → once-NnpX_HnX.js} +1 -1
  86. package/dist/{pegDiagram-XKGWAZYB-BqvywNJA.js → pegDiagram-XKGWAZYB-nNGOQtnt.js} +2 -2
  87. package/dist/{pieDiagram-E7YTZNPT-BfxJ_XCc.js → pieDiagram-E7YTZNPT-CpRz5BZz.js} +1 -1
  88. package/dist/precisionRound-DhAzeRcm.js +49 -0
  89. package/dist/{process-output-BZg56CCb.js → process-output-OujAtFW4.js} +5 -5
  90. package/dist/{quadrantDiagram-AXDQQJYC-Ccw0xMjN.js → quadrantDiagram-AXDQQJYC-Blrm7V7_.js} +1 -1
  91. package/dist/{railroadDiagram-O6MQD6OU-8vFLVTPu.js → railroadDiagram-O6MQD6OU-BqOEN4I0.js} +2 -2
  92. package/dist/{react-vega-BED0DjiB.js → react-vega-C4T9Rb_w.js} +12284 -12270
  93. package/dist/{requirementDiagram-BXWQKSXE-a_MxGvxe.js → requirementDiagram-BXWQKSXE-CEfg6vu9.js} +1 -1
  94. package/dist/{reveal-component-C42-YBfQ.js → reveal-component-DXa9FXf6.js} +733 -710
  95. package/dist/{select-BButFi-d.js → select-2KOiReNY.js} +536 -457
  96. package/dist/{sequenceDiagram-WJ2MYXX4-CXFMnxGh.js → sequenceDiagram-WJ2MYXX4-IOmpQcOi.js} +1 -1
  97. package/dist/{spec-BwarBpUJ.js → spec-Dkp64vVQ.js} +41 -11
  98. package/dist/{stateDiagram-D77RDMKH-DQeA_CwI.js → stateDiagram-D77RDMKH-tgU-EY9_.js} +2 -2
  99. package/dist/{stateDiagram-v2-MP3YSRHH-BxxQucm1.js → stateDiagram-v2-MP3YSRHH-BofhG6q1.js} +2 -2
  100. package/dist/style.css +1 -1
  101. package/dist/{swimlanes-42K2YHIH-Do6L-cYg.js → swimlanes-42K2YHIH-DW4vWDBd.js} +1 -1
  102. package/dist/{swimlanesDiagram-VR7AAH4N-DUzPvSVU.js → swimlanesDiagram-VR7AAH4N-BJcrqUJr.js} +2 -2
  103. package/dist/{swiper-component-DKntyn8p.js → swiper-component-BVfnhbnt.js} +2 -2
  104. package/dist/{time-BieKwdYS.js → time-BaMbJs4z.js} +18 -18
  105. package/dist/{timeline-definition-24CTP7MA-D3c46WM5.js → timeline-definition-24CTP7MA-D_QU3NGs.js} +1 -1
  106. package/dist/{toDate-UtiwmnH2.js → toDate-BNDEXbfV.js} +44 -43
  107. package/dist/{toast-B9UMEi8u.js → toast-B5t9o6s_.js} +219 -201
  108. package/dist/{tooltip-BO1REbqs.js → tooltip-s4zZxwKe.js} +325 -301
  109. package/dist/{use-restore-focus-BEM7sFWl.js → use-restore-focus-BgDTd2tc.js} +1482 -1433
  110. package/dist/{useAsyncData-Deh5kszT.js → useAsyncData-ASDni9vH.js} +15 -14
  111. package/dist/{useDateFormatter-D8XruNGG.js → useDateFormatter-D3Tkfzej.js} +2 -2
  112. package/dist/{useDeepCompareMemoize-DXwzRINI.js → useDeepCompareMemoize-B1Ogyf53.js} +1 -1
  113. package/dist/{useIframeCapabilities-DBETvvPl.js → useIframeCapabilities-6a_yDNXp.js} +1 -1
  114. package/dist/{useLifecycle-j7D9uD1o.js → useLifecycle-Bfpa2m7k.js} +28 -25
  115. package/dist/{useTheme-CRnjkku0.js → useTheme-5TwyOh3B.js} +522 -314
  116. package/dist/{vega-component-BeF9dfyO.js → vega-component-BHS9UOtC.js} +158 -158
  117. package/dist/{vega-embed-container-BNHE18G9.js → vega-embed-container--LYZqguO.js} +2 -2
  118. package/dist/{vega-loader.browser-DNST6uVf.js → vega-loader.browser-B9Pz0EGP.js} +298 -507
  119. package/dist/{vennDiagram-4TSXK5OY-BSZD8JcZ.js → vennDiagram-4TSXK5OY-YFYsNIAh.js} +1 -1
  120. package/dist/{wardleyDiagram-VM6X3IG4-48cUWkfA.js → wardleyDiagram-VM6X3IG4-i_n8mAWC.js} +1 -1
  121. package/dist/{xychartDiagram-S5SC5T6Z-CswYgYeu.js → xychartDiagram-S5SC5T6Z-BYGN95wW.js} +2 -2
  122. package/package.json +16 -16
  123. package/src/__mocks__/document.tsx +63 -0
  124. package/src/__mocks__/notebook.ts +3 -4
  125. package/src/__mocks__/partial.ts +26 -0
  126. package/src/__mocks__/requests.ts +0 -3
  127. package/src/__tests__/main.test.tsx +24 -1
  128. package/src/__tests__/module-entry.test.ts +44 -0
  129. package/src/__tests__/mount.test.ts +1 -21
  130. package/src/__tests__/{host-imports.test.ts → replica-imports.test.ts} +12 -11
  131. package/src/components/ai/__tests__/ai-model-dropdown.test.tsx +63 -0
  132. package/src/components/ai/ai-model-dropdown.tsx +11 -6
  133. package/src/components/app-config/ai-config.tsx +7 -2
  134. package/src/components/app-config/app-config-form.tsx +5 -9
  135. package/src/components/app-config/user-config-form.tsx +35 -0
  136. package/src/components/chat/__tests__/message-queue.test.tsx +17 -0
  137. package/src/components/chat/__tests__/notebook-access-selector.test.tsx +64 -0
  138. package/src/components/chat/acp/__tests__/session-tabs.test.tsx +43 -0
  139. package/src/components/chat/acp/__tests__/state.test.ts +2 -2
  140. package/src/components/chat/acp/blocks.tsx +3 -2
  141. package/src/components/chat/acp/session-tabs.tsx +8 -3
  142. package/src/components/chat/chat-components.tsx +2 -0
  143. package/src/components/chat/chat-panel.tsx +20 -101
  144. package/src/components/chat/chat-utils.ts +4 -8
  145. package/src/components/chat/notebook-access-selector.stories.tsx +22 -0
  146. package/src/components/chat/notebook-access-selector.tsx +100 -0
  147. package/src/components/data-table/TableBottomBar.tsx +4 -1
  148. package/src/components/data-table/TableTopBar.tsx +2 -0
  149. package/src/components/data-table/__tests__/chart-spec-model.test.ts +195 -195
  150. package/src/components/data-table/__tests__/column-explorer.test.tsx +27 -1
  151. package/src/components/data-table/__tests__/columns.test.tsx +105 -0
  152. package/src/components/data-table/__tests__/context-menu-interaction.test.tsx +130 -0
  153. package/src/components/data-table/__tests__/data-table.test.tsx +1 -0
  154. package/src/components/data-table/__tests__/date-popover.test.tsx +72 -0
  155. package/src/components/data-table/__tests__/export-actions.test.tsx +105 -0
  156. package/src/components/data-table/__tests__/keyboard-selection.test.tsx +188 -0
  157. package/src/components/data-table/__tests__/pagination.test.tsx +28 -1
  158. package/src/components/data-table/__tests__/search-highlight.test.tsx +109 -0
  159. package/src/components/data-table/__tests__/url-detector.test.tsx +74 -0
  160. package/src/components/data-table/cell-selection/feature.ts +2 -2
  161. package/src/components/data-table/cell-selection/types.ts +2 -2
  162. package/src/components/data-table/charts/__tests__/chart-panel.test.tsx +74 -1
  163. package/src/components/data-table/charts/__tests__/spec-snapshot.test.ts +20 -20
  164. package/src/components/data-table/charts/__tests__/spec.test.ts +78 -52
  165. package/src/components/data-table/charts/__tests__/storage.test.ts +4 -1
  166. package/src/components/data-table/charts/chart-spec/spec.ts +68 -43
  167. package/src/components/data-table/charts/charts.tsx +40 -30
  168. package/src/components/data-table/charts/storage.ts +16 -5
  169. package/src/components/data-table/column-explorer-panel/column-explorer.tsx +1 -1
  170. package/src/components/data-table/column-summary/chart-spec-model.tsx +23 -16
  171. package/src/components/data-table/column-summary/column-summary.tsx +2 -4
  172. package/src/components/data-table/column-visibility-dropdown.tsx +8 -13
  173. package/src/components/data-table/columns.tsx +45 -46
  174. package/src/components/data-table/context-menu.tsx +36 -20
  175. package/src/components/data-table/data-table.tsx +17 -1
  176. package/src/components/data-table/date-popover.tsx +6 -4
  177. package/src/components/data-table/export-actions.tsx +76 -48
  178. package/src/components/data-table/pagination.tsx +44 -33
  179. package/src/components/data-table/range-focus/atoms.ts +4 -6
  180. package/src/components/data-table/range-focus/use-cell-range-selection.ts +65 -38
  181. package/src/components/data-table/range-focus/use-scroll-into-view.ts +21 -2
  182. package/src/components/data-table/renderers.tsx +16 -7
  183. package/src/components/data-table/row-viewer-panel/__tests__/row-viewer.test.tsx +24 -1
  184. package/src/components/data-table/row-viewer-panel/row-viewer.tsx +4 -4
  185. package/src/components/data-table/search-highlight.tsx +79 -0
  186. package/src/components/data-table/types.ts +1 -0
  187. package/src/components/data-table/url-detector.tsx +49 -9
  188. package/src/components/datasources/__tests__/column-actions.test.tsx +97 -0
  189. package/src/components/datasources/__tests__/column-preview.test.tsx +96 -5
  190. package/src/components/datasources/__tests__/datasources-interactions.test.tsx +181 -0
  191. package/src/components/datasources/__tests__/table-list.test.tsx +118 -0
  192. package/src/components/datasources/__tests__/utils.test.ts +57 -6
  193. package/src/components/datasources/column-preview.tsx +17 -12
  194. package/src/components/datasources/datasources.tsx +56 -43
  195. package/src/components/datasources/utils.ts +32 -23
  196. package/src/components/debugger/debugger-code.tsx +5 -0
  197. package/src/components/dependency-graph/custom-node.tsx +1 -1
  198. package/src/components/dependency-graph/dependency-graph-tree.tsx +8 -8
  199. package/src/components/dependency-graph/elements.ts +24 -21
  200. package/src/components/dependency-graph/minimap-content.tsx +13 -19
  201. package/src/components/dependency-graph/panels.tsx +4 -2
  202. package/src/components/dependency-graph/utils/__tests__/layout.test.ts +18 -11
  203. package/src/components/editor/SortableCell.tsx +1 -3
  204. package/src/components/editor/__tests__/Output.test.tsx +50 -32
  205. package/src/{core/attachments/__tests__/toast.test.tsx → components/editor/__tests__/agent-toast.test.tsx} +1 -1
  206. package/src/components/editor/__tests__/data-attributes.test.tsx +28 -14
  207. package/src/components/editor/__tests__/dynamic-favicon.test.tsx +111 -18
  208. package/src/components/editor/__tests__/output-persistence.test.tsx +6 -2
  209. package/src/components/editor/__tests__/package-alert.test.tsx +22 -1
  210. package/src/components/editor/actions/__tests__/name-cell-input.test.tsx +69 -0
  211. package/src/components/editor/actions/__tests__/pair-with-agent-modal.test.tsx +34 -8
  212. package/src/components/editor/actions/__tests__/pair-with-agent.test.tsx +2 -6
  213. package/src/components/editor/actions/name-cell-input.tsx +4 -3
  214. package/src/components/editor/actions/pair-with-agent-commands.ts +2 -2
  215. package/src/components/editor/actions/pair-with-agent-modal.tsx +19 -16
  216. package/src/components/editor/actions/useCellActionButton.tsx +26 -31
  217. package/src/components/editor/actions/useConfigActions.tsx +3 -4
  218. package/src/components/editor/actions/useNotebookActions.tsx +19 -23
  219. package/src/components/editor/actions/useRestartKernel.tsx +1 -1
  220. package/src/components/editor/actions/useSetCodeVisibility.ts +11 -12
  221. package/src/components/editor/actions/useSetOutputsExpanded.ts +14 -19
  222. package/src/components/editor/ai/add-cell-with-ai.tsx +3 -3
  223. package/src/components/editor/ai/ai-completion-editor.tsx +1 -0
  224. package/src/components/editor/alerts/__tests__/connection-notice.test.tsx +1 -1
  225. package/src/components/editor/alerts/connection-notice.tsx +1 -1
  226. package/src/components/editor/alerts/startup-logs-alert.tsx +1 -0
  227. package/src/components/editor/alerts/stdin-blocking-alert.tsx +1 -1
  228. package/src/components/editor/app-container.tsx +1 -1
  229. package/src/components/editor/boundary/__tests__/ErrorBoundary.test.tsx +1 -1
  230. package/src/components/editor/cell/CreateCellButton.tsx +15 -21
  231. package/src/components/editor/cell/DeleteButton.tsx +3 -2
  232. package/src/components/editor/cell/RunButton.tsx +2 -2
  233. package/src/components/editor/cell/StagedAICell.tsx +10 -2
  234. package/src/components/editor/cell/StopButton.tsx +2 -2
  235. package/src/components/editor/cell/__tests__/StagedAICell.test.tsx +3 -1
  236. package/src/components/editor/cell/__tests__/useShouldShowInterrupt.test.ts +39 -0
  237. package/src/components/editor/cell/cell-actions.tsx +12 -1
  238. package/src/components/editor/cell/code/__tests__/language-toggle.test.tsx +54 -0
  239. package/src/components/editor/cell/code/cell-editor.tsx +36 -43
  240. package/src/components/editor/cell/code/language-toggle.tsx +8 -7
  241. package/src/components/editor/cell/collapse.tsx +11 -4
  242. package/src/components/editor/cell/useAddCell.ts +4 -8
  243. package/src/components/editor/cell/useDeleteCell.tsx +10 -36
  244. package/src/components/editor/cell/useRunCells.ts +2 -5
  245. package/src/components/editor/cell/useShouldShowInterrupt.ts +2 -12
  246. package/src/components/editor/cell/useSplitCell.tsx +10 -6
  247. package/src/components/editor/chrome/components/__tests__/feedback-button.test.tsx +1 -1
  248. package/src/components/editor/chrome/components/feedback-button.tsx +2 -8
  249. package/src/components/editor/chrome/panels/__tests__/packages-panel.test.tsx +31 -2
  250. package/src/components/editor/chrome/panels/__tests__/runtime-details.test.tsx +1 -1
  251. package/src/components/editor/chrome/panels/__tests__/sandbox-recovery.test.tsx +1 -1
  252. package/src/components/editor/chrome/panels/cache-panel.tsx +1 -0
  253. package/src/components/editor/chrome/panels/dependency-graph-panel.tsx +1 -1
  254. package/src/components/editor/chrome/panels/logs-panel.tsx +2 -1
  255. package/src/components/editor/chrome/panels/outline/__tests__/outline-keyboard.test.tsx +84 -0
  256. package/src/components/editor/chrome/panels/outline/floating-outline.tsx +39 -14
  257. package/src/components/editor/chrome/panels/outline/useActiveOutline.tsx +3 -2
  258. package/src/components/editor/chrome/panels/packages-panel.tsx +4 -7
  259. package/src/components/editor/chrome/panels/secrets-panel.tsx +1 -0
  260. package/src/components/editor/chrome/panels/session-panel.tsx +1 -1
  261. package/src/components/editor/chrome/panels/snippets-panel.tsx +10 -12
  262. package/src/components/editor/chrome/panels/variable-panel.tsx +1 -5
  263. package/src/components/editor/chrome/wrapper/__tests__/attachment-status.test.tsx +9 -18
  264. package/src/components/editor/chrome/wrapper/__tests__/document-sync-status.test.tsx +92 -0
  265. package/src/components/editor/chrome/wrapper/__tests__/pending-ai-cells.test.tsx +61 -2
  266. package/src/components/editor/chrome/wrapper/footer-items/attachment-status.tsx +4 -4
  267. package/src/components/editor/chrome/wrapper/footer-items/backend-status.tsx +1 -1
  268. package/src/components/editor/chrome/wrapper/footer-items/document-sync-status.tsx +54 -0
  269. package/src/components/editor/chrome/wrapper/footer-items/lsp-status.tsx +1 -1
  270. package/src/components/editor/chrome/wrapper/footer-items/machine-stats.tsx +1 -1
  271. package/src/components/editor/chrome/wrapper/footer-items/runtime-settings.tsx +1 -7
  272. package/src/components/editor/chrome/wrapper/footer.tsx +2 -0
  273. package/src/components/editor/chrome/wrapper/minimap-state.ts +1 -1
  274. package/src/components/editor/chrome/wrapper/pending-ai-cells.tsx +12 -2
  275. package/src/components/editor/chrome/wrapper/storage.ts +1 -1
  276. package/src/components/editor/columns/__tests__/cell-column.test.tsx +1 -1
  277. package/src/components/editor/columns/cell-column.tsx +1 -1
  278. package/src/components/editor/columns/sortable-column.tsx +2 -2
  279. package/src/components/editor/connections/components.tsx +5 -10
  280. package/src/components/editor/controls/Controls.tsx +4 -4
  281. package/src/components/editor/controls/__tests__/command-palette.test.tsx +53 -0
  282. package/src/components/editor/controls/__tests__/keyboard-shortcuts.test.tsx +61 -0
  283. package/src/components/editor/controls/__tests__/notebook-menu-dropdown.test.tsx +10 -4
  284. package/src/components/editor/controls/command-palette.tsx +22 -10
  285. package/src/components/editor/controls/keyboard-shortcuts.tsx +14 -5
  286. package/src/components/editor/documentation.css +34 -11
  287. package/src/components/editor/dynamic-favicon.tsx +21 -40
  288. package/src/components/editor/errors/__tests__/send-error-report-button.test.tsx +17 -29
  289. package/src/components/editor/errors/auto-fix.tsx +4 -8
  290. package/src/components/editor/errors/send-error-report-button.tsx +3 -6
  291. package/src/components/editor/file-tree/__tests__/file-explorer-interactions.test.tsx +6 -0
  292. package/src/components/editor/file-tree/__tests__/file-explorer-navigation.test.tsx +47 -0
  293. package/src/components/editor/file-tree/__tests__/use-file-search.test.tsx +91 -0
  294. package/src/components/editor/file-tree/file-explorer.tsx +48 -15
  295. package/src/components/editor/file-tree/file-name-input.tsx +1 -0
  296. package/src/components/editor/file-tree/file-viewer.tsx +4 -2
  297. package/src/components/editor/file-tree/use-file-search.ts +35 -21
  298. package/src/components/editor/header/__tests__/status.test.tsx +5 -3
  299. package/src/components/editor/header/app-header.tsx +1 -1
  300. package/src/components/editor/header/status.tsx +40 -20
  301. package/src/components/editor/links/__tests__/cell-link.test.tsx +148 -0
  302. package/src/components/editor/links/cell-link-list.tsx +1 -1
  303. package/src/components/editor/links/cell-link.tsx +17 -7
  304. package/src/components/editor/navigation/__tests__/clipboard.test.ts +60 -38
  305. package/src/components/editor/navigation/__tests__/navigation.test.ts +108 -85
  306. package/src/components/editor/navigation/__tests__/selection.test.ts +43 -21
  307. package/src/components/editor/navigation/clipboard.ts +17 -14
  308. package/src/components/editor/navigation/focus-utils.ts +23 -4
  309. package/src/components/editor/navigation/multi-cell-action-toolbar.tsx +17 -33
  310. package/src/components/editor/navigation/navigation.ts +71 -70
  311. package/src/components/editor/navigation/selection.ts +30 -29
  312. package/src/components/editor/notebook-banner.tsx +1 -0
  313. package/src/components/editor/notebook-cell.tsx +29 -31
  314. package/src/components/editor/output/MarimoErrorOutput.tsx +2 -1
  315. package/src/components/editor/output/MarimoTracebackOutput.tsx +19 -17
  316. package/src/components/editor/output/Outputs.css +8 -0
  317. package/src/components/editor/output/__tests__/traceback.test.tsx +27 -1
  318. package/src/components/editor/output/ansi-reduce.ts +33 -20
  319. package/src/components/editor/output/console/ConsoleOutput.tsx +19 -25
  320. package/src/components/editor/output/console/__tests__/ConsoleOutput.test.tsx +125 -69
  321. package/src/components/editor/package-alert.tsx +14 -7
  322. package/src/components/editor/renderers/cell-array.tsx +22 -33
  323. package/src/components/editor/renderers/grid-layout/grid-layout.tsx +12 -6
  324. package/src/components/editor/renderers/slides-layout/__tests__/plugin.test.ts +0 -1
  325. package/src/components/editor/renderers/slides-layout/slides-layout.tsx +1 -1
  326. package/src/components/editor/renderers/vertical-layout/__tests__/useFocusFirstEditor.test.ts +4 -4
  327. package/src/components/editor/renderers/vertical-layout/sidebar/toggle.tsx +7 -1
  328. package/src/components/editor/renderers/vertical-layout/useFocusFirstEditor.ts +1 -1
  329. package/src/components/editor/renderers/vertical-layout/vertical-layout.tsx +1 -1
  330. package/src/components/editor/stdin-blocking-alert.tsx +1 -1
  331. package/src/components/home/components.tsx +17 -31
  332. package/src/components/icons/__tests__/large-spinner.test.tsx +39 -0
  333. package/src/components/icons/large-spinner.tsx +3 -14
  334. package/src/components/icons/spinner.tsx +1 -1
  335. package/src/components/markdown/markdown-renderer.tsx +4 -8
  336. package/src/components/mcp/mcp-status-indicator.tsx +1 -1
  337. package/src/components/pages/__tests__/home-page.test.tsx +116 -0
  338. package/src/components/pages/edit-page.tsx +19 -17
  339. package/src/components/pages/home-page.tsx +164 -91
  340. package/src/components/scratchpad/scratchpad.test.tsx +97 -0
  341. package/src/components/scratchpad/scratchpad.tsx +20 -11
  342. package/src/components/slides/__tests__/minimap-actions.test.tsx +22 -29
  343. package/src/components/slides/__tests__/minimap.test.ts +38 -19
  344. package/src/components/slides/__tests__/slide-scroll-hint.test.tsx +37 -0
  345. package/src/components/slides/minimap.tsx +17 -12
  346. package/src/components/slides/reveal-component.tsx +58 -26
  347. package/src/components/slides/reveal-slides.css +5 -4
  348. package/src/components/slides/slide-cell-view.tsx +4 -5
  349. package/src/components/slides/slide-form.tsx +1 -0
  350. package/src/components/slides/slide-scroll-hint.tsx +3 -1
  351. package/src/components/sort/SortableCellsProvider.tsx +8 -25
  352. package/src/components/tracing/tracing-keyboard.test.tsx +85 -0
  353. package/src/components/tracing/tracing.tsx +46 -42
  354. package/src/components/ui/__tests__/draggable-popover.test.tsx +24 -0
  355. package/src/components/ui/__tests__/range-slider.test.tsx +165 -0
  356. package/src/components/ui/alert-dialog.tsx +1 -1
  357. package/src/components/ui/draggable-popover.tsx +24 -2
  358. package/src/components/ui/range-slider.tsx +22 -9
  359. package/src/core/MarimoApp.tsx +1 -1
  360. package/src/core/ai/__tests__/staged-cells.test.ts +27 -26
  361. package/src/core/ai/context/providers/__tests__/cell-output.test.ts +8 -12
  362. package/src/core/ai/context/providers/cell-output.ts +2 -2
  363. package/src/core/ai/context/providers/datasource.ts +6 -2
  364. package/src/core/ai/staged-cells.ts +15 -18
  365. package/src/core/ai/tools/__tests__/edit-notebook-tool.test.ts +40 -88
  366. package/src/core/ai/tools/__tests__/registry.test.ts +17 -0
  367. package/src/core/ai/tools/base.ts +18 -15
  368. package/src/core/ai/tools/edit-notebook-tool.ts +86 -80
  369. package/src/core/ai/tools/registry.ts +13 -10
  370. package/src/core/ai/tools/sample-tool.ts +6 -7
  371. package/src/core/cells/__tests__/__snapshots__/cells.test.ts.snap +4 -37
  372. package/src/core/cells/__tests__/actions.test.ts +624 -35
  373. package/src/core/cells/__tests__/add-missing-import.test.ts +7 -8
  374. package/src/core/cells/__tests__/arrange.test.ts +432 -0
  375. package/src/core/cells/__tests__/cell.test.ts +39 -0
  376. package/src/core/cells/__tests__/cells.test.ts +218 -2491
  377. package/src/core/cells/__tests__/collapseConsoleOutputs.test.ts +54 -0
  378. package/src/core/cells/__tests__/document.test.ts +341 -0
  379. package/src/core/cells/__tests__/editor.test.ts +57 -0
  380. package/src/core/cells/__tests__/flush-document.test.ts +40 -0
  381. package/src/core/cells/__tests__/harness.ts +106 -0
  382. package/src/core/cells/__tests__/layout.test.ts +177 -0
  383. package/src/core/cells/__tests__/notebook-outline.test.ts +120 -0
  384. package/src/core/cells/__tests__/outputs.test.tsx +71 -53
  385. package/src/core/cells/__tests__/session.test.ts +445 -211
  386. package/src/core/cells/__tests__/utils.test.ts +9 -108
  387. package/src/core/cells/__tests__/with-document-save.test.ts +67 -0
  388. package/src/core/cells/actions.ts +636 -6
  389. package/src/core/cells/add-missing-import.ts +47 -43
  390. package/src/core/cells/arrange.ts +529 -0
  391. package/src/core/cells/cell.ts +14 -3
  392. package/src/core/cells/cells.ts +120 -1337
  393. package/src/core/cells/columns.ts +38 -0
  394. package/src/core/cells/document.ts +289 -0
  395. package/src/core/cells/edit.ts +30 -0
  396. package/src/core/cells/editor.ts +82 -0
  397. package/src/core/cells/layout.ts +221 -0
  398. package/src/core/cells/outputs.ts +12 -28
  399. package/src/core/cells/pending-delete-service.ts +3 -7
  400. package/src/core/cells/session.ts +76 -53
  401. package/src/core/cells/types.ts +22 -6
  402. package/src/core/cells/utils.ts +10 -8
  403. package/src/core/codemirror/__tests__/setup.test.ts +29 -29
  404. package/src/core/codemirror/ai/__tests__/resources.test.ts +117 -0
  405. package/src/core/codemirror/ai/resources.ts +1 -1
  406. package/src/core/codemirror/cells/__tests__/extensions.test.ts +42 -1
  407. package/src/core/codemirror/cells/extensions.ts +27 -9
  408. package/src/core/codemirror/cells/state.ts +1 -1
  409. package/src/core/codemirror/copilot/__tests__/getCodes.test.ts +6 -7
  410. package/src/core/codemirror/copilot/getCodes.ts +2 -2
  411. package/src/core/codemirror/format.ts +6 -5
  412. package/src/core/codemirror/keymaps/vim.ts +4 -8
  413. package/src/core/codemirror/language/__tests__/sql.test.ts +22 -20
  414. package/src/core/codemirror/language/__tests__/utils.test.ts +187 -15
  415. package/src/core/codemirror/language/cell-code.ts +114 -0
  416. package/src/core/codemirror/language/extension.ts +52 -35
  417. package/src/core/codemirror/language/languages/markdown.ts +8 -6
  418. package/src/core/codemirror/language/languages/python.ts +16 -10
  419. package/src/core/codemirror/language/languages/sql/sql.ts +16 -24
  420. package/src/core/codemirror/language/panel/panel.tsx +1 -0
  421. package/src/core/codemirror/language/types.ts +7 -7
  422. package/src/core/codemirror/language/utils.ts +9 -39
  423. package/src/core/codemirror/lsp/__tests__/notebook-lsp.test.ts +1 -2
  424. package/src/core/codemirror/lsp/notebook-lsp.ts +6 -5
  425. package/src/core/codemirror/lsp/utils.ts +1 -1
  426. package/src/core/codemirror/readonly/__tests__/extension.test.ts +1 -1
  427. package/src/core/codemirror/readonly/extension.ts +2 -2
  428. package/src/core/codemirror/rtc/extension.ts +24 -13
  429. package/src/core/codemirror/rtc/loro/awareness.ts +34 -19
  430. package/src/core/codemirror/rtc/loro/sync.ts +1 -0
  431. package/src/core/codemirror/utils.ts +1 -0
  432. package/src/core/config/__tests__/app-config.test.ts +64 -0
  433. package/src/core/config/__tests__/config-schema.test.ts +13 -6
  434. package/src/core/config/config-schema.ts +13 -3
  435. package/src/core/config/config.ts +26 -12
  436. package/src/core/datasets/__tests__/data-source-discovery.test.ts +5 -5
  437. package/src/core/datasets/data-source-discovery.ts +4 -6
  438. package/src/core/documentation/doc-lookup.ts +1 -1
  439. package/src/core/edit-app.tsx +21 -28
  440. package/src/core/errors/error-entries.ts +4 -1
  441. package/src/core/export/hooks.ts +1 -1
  442. package/src/core/export/layout.ts +2 -2
  443. package/src/core/hotkeys/actions.ts +2 -4
  444. package/src/core/islands/__tests__/bootstrap.test.ts +69 -43
  445. package/src/core/islands/__tests__/bridge.test.ts +72 -25
  446. package/src/core/islands/bootstrap.ts +46 -54
  447. package/src/core/islands/bridge.ts +74 -23
  448. package/src/core/islands/components/__tests__/IslandControls.test.tsx +7 -5
  449. package/src/core/islands/components/web-components.tsx +1 -1
  450. package/src/core/islands/worker/__tests__/controller.test.ts +62 -4
  451. package/src/core/islands/worker/controller.ts +4 -10
  452. package/src/core/islands/worker/worker.tsx +33 -33
  453. package/src/core/kernel/__tests__/RuntimeState.test.ts +1 -1
  454. package/src/core/kernel/__tests__/handlers.test.ts +7 -153
  455. package/src/core/kernel/handlers.ts +19 -72
  456. package/src/core/meta/__tests__/code-visibility.test.tsx +78 -70
  457. package/src/core/meta/code-visibility.ts +18 -9
  458. package/src/core/network/__tests__/connection.test.ts +1 -1
  459. package/src/core/network/__tests__/requests-lazy.test.ts +1 -3
  460. package/src/core/network/connection-notice.ts +1 -1
  461. package/src/core/network/connection.ts +1 -1
  462. package/src/core/network/requests-lazy.ts +1 -4
  463. package/src/core/network/requests-network.ts +0 -25
  464. package/src/core/network/requests-static.ts +0 -3
  465. package/src/core/network/requests-toasting.tsx +0 -3
  466. package/src/core/network/types.ts +0 -12
  467. package/src/core/network/useConnectionNotice.ts +8 -2
  468. package/src/core/notebook/__tests__/operations.test.ts +51 -0
  469. package/src/core/notebook/attachments.ts +38 -0
  470. package/src/core/notebook/document/__tests__/codemirror.test.ts +586 -0
  471. package/src/core/notebook/document/__tests__/draft.test.ts +363 -0
  472. package/src/core/notebook/document/__tests__/fixtures.ts +92 -0
  473. package/src/core/notebook/document/__tests__/hold.test.ts +88 -0
  474. package/src/core/notebook/document/__tests__/hooks.test.tsx +391 -0
  475. package/src/core/notebook/document/__tests__/lifecycle-scenarios.test.ts +61 -0
  476. package/src/core/notebook/document/__tests__/model.test.ts +247 -0
  477. package/src/core/notebook/document/__tests__/protocol-fixtures.ts +38 -0
  478. package/src/core/notebook/document/__tests__/recovery-scenarios.test.ts +230 -0
  479. package/src/core/notebook/document/__tests__/scenario-fixture.ts +43 -0
  480. package/src/core/notebook/document/__tests__/scenarios.test.ts +205 -0
  481. package/src/core/notebook/document/__tests__/state.test.ts +459 -0
  482. package/src/core/notebook/document/__tests__/submission.test.ts +203 -0
  483. package/src/core/notebook/document/__tests__/test-host.test.ts +92 -0
  484. package/src/core/notebook/document/__tests__/test-host.ts +247 -0
  485. package/src/core/notebook/document/__tests__/test-notebook.ts +149 -0
  486. package/src/core/notebook/document/__tests__/user.ts +61 -0
  487. package/src/core/notebook/document/codemirror.ts +216 -0
  488. package/src/core/notebook/document/draft.ts +502 -0
  489. package/src/core/notebook/document/hooks.tsx +118 -0
  490. package/src/core/notebook/document/index.ts +24 -0
  491. package/src/core/notebook/document/model.ts +105 -0
  492. package/src/core/notebook/document/select.ts +41 -0
  493. package/src/core/notebook/document/state.ts +378 -0
  494. package/src/core/notebook/document/sync.ts +418 -0
  495. package/src/core/notebook/index.ts +19 -0
  496. package/src/core/notebook/operations.ts +30 -0
  497. package/src/core/notebook/replica/AGENTS.md +11 -0
  498. package/src/core/notebook/replica/__tests__/attachments.test.ts +56 -0
  499. package/src/core/{host → notebook/replica}/__tests__/document.test.ts +18 -16
  500. package/src/core/notebook/replica/__tests__/fixtures.ts +79 -0
  501. package/src/core/notebook/replica/__tests__/replica.test.ts +550 -0
  502. package/src/core/notebook/replica/backend.ts +19 -0
  503. package/src/core/notebook/replica/connection.ts +42 -0
  504. package/src/core/notebook/replica/index.ts +13 -0
  505. package/src/core/notebook/replica/replica.ts +286 -0
  506. package/src/core/notebook/replica/resources/attachments.ts +22 -0
  507. package/src/core/{host → notebook/replica}/resources/document.ts +4 -4
  508. package/src/core/packages/__tests__/useSandboxController.test.tsx +1 -1
  509. package/src/core/packages/useSandboxController.ts +1 -1
  510. package/src/core/run-app.tsx +48 -51
  511. package/src/core/runtime/__tests__/adapter.test.ts +1 -1
  512. package/src/core/runtime/__tests__/createWsUrl.test.ts +77 -7
  513. package/src/core/runtime/__tests__/runtime.test.ts +32 -58
  514. package/src/core/runtime/adapter.ts +1 -1
  515. package/src/core/runtime/config.ts +2 -2
  516. package/src/core/runtime/runtime.ts +38 -42
  517. package/src/core/runtime/types.ts +0 -2
  518. package/src/core/saving/__tests__/state.test.ts +111 -0
  519. package/src/core/saving/__tests__/useAutoSave.test.tsx +67 -0
  520. package/src/core/saving/filename.ts +1 -1
  521. package/src/core/saving/save-component.tsx +28 -36
  522. package/src/core/saving/state.ts +38 -39
  523. package/src/core/saving/useAutoSave.ts +17 -53
  524. package/src/core/session/__tests__/backend.test.ts +236 -0
  525. package/src/core/session/__tests__/useNotebookReplica.hook.test.tsx +184 -0
  526. package/src/core/session/__tests__/useNotebookSession.hook.test.tsx +663 -0
  527. package/src/core/session/active-notebook.ts +22 -0
  528. package/src/core/session/backend.ts +123 -0
  529. package/src/core/session/embedded.ts +7 -0
  530. package/src/core/{websocket → session}/types.ts +2 -2
  531. package/src/core/session/useNotebookReplica.ts +74 -0
  532. package/src/core/{websocket → session}/useNotebookSession.tsx +77 -72
  533. package/src/core/state/__tests__/jotai.test.tsx +108 -0
  534. package/src/core/state/jotai.ts +1 -1
  535. package/src/core/static/__tests__/files.test.ts +38 -10
  536. package/src/core/static/files.ts +2 -0
  537. package/src/core/{websocket → transports}/__tests__/connection-state.test.ts +1 -13
  538. package/src/core/transports/__tests__/server.test.ts +408 -0
  539. package/src/core/transports/__tests__/static.test.ts +306 -0
  540. package/src/core/transports/__tests__/wasm.test.ts +166 -0
  541. package/src/core/{websocket → transports}/connection-state.ts +9 -16
  542. package/src/core/transports/server.ts +152 -0
  543. package/src/core/transports/static.ts +166 -0
  544. package/src/core/transports/wasm.ts +97 -0
  545. package/src/core/wasm/__tests__/bridge.test.ts +214 -50
  546. package/src/core/wasm/__tests__/worker.test.ts +187 -0
  547. package/src/core/wasm/bridge.ts +75 -69
  548. package/src/core/wasm/rpc.ts +15 -3
  549. package/src/core/wasm/store.ts +3 -3
  550. package/src/core/wasm/worker/bootstrap.ts +55 -51
  551. package/src/core/wasm/worker/getMarimoWheel.ts +1 -1
  552. package/src/core/wasm/worker/save-worker.ts +9 -10
  553. package/src/core/wasm/worker/types.ts +29 -18
  554. package/src/core/wasm/worker/worker.ts +88 -44
  555. package/src/css/globals.css +66 -22
  556. package/src/hooks/__tests__/useAsyncData.test.tsx +148 -0
  557. package/src/hooks/__tests__/useDebounce.test.tsx +51 -0
  558. package/src/hooks/__tests__/useDeepCompareMemoize.test.tsx +39 -0
  559. package/src/hooks/__tests__/useDelayElapsed.test.tsx +28 -0
  560. package/src/hooks/__tests__/useInternalStateWithSync.test.tsx +20 -0
  561. package/src/hooks/__tests__/useScript.test.tsx +77 -0
  562. package/src/hooks/__tests__/useStateForKey.test.tsx +257 -0
  563. package/src/hooks/useAsyncData.ts +3 -3
  564. package/src/hooks/useDataSourceDiscovery.ts +6 -4
  565. package/src/hooks/useDebounce.ts +6 -10
  566. package/src/hooks/useDeepCompareMemoize.ts +1 -1
  567. package/src/hooks/useDelayElapsed.ts +14 -10
  568. package/src/hooks/useElapsedTime.ts +3 -3
  569. package/src/hooks/useEventListener.ts +1 -2
  570. package/src/hooks/useInputHistory.ts +4 -7
  571. package/src/hooks/useInternalStateWithSync.ts +6 -6
  572. package/src/hooks/useResizeObserver.ts +4 -7
  573. package/src/hooks/useScript.ts +67 -70
  574. package/src/hooks/useStateForKey.ts +93 -0
  575. package/src/mount.tsx +20 -15
  576. package/src/plugins/__tests__/plugin-object-schemas.test.ts +104 -0
  577. package/src/plugins/core/registerReactComponent.tsx +1 -1
  578. package/src/plugins/impl/CodeEditorPlugin.tsx +1 -1
  579. package/src/plugins/impl/DataEditorPlugin.tsx +1 -1
  580. package/src/plugins/impl/DataTablePlugin.tsx +69 -37
  581. package/src/plugins/impl/DropdownPlugin.tsx +2 -6
  582. package/src/plugins/impl/FileBrowserPlugin.tsx +4 -16
  583. package/src/plugins/impl/FormPlugin.tsx +1 -1
  584. package/src/plugins/impl/RangeSliderPlugin.tsx +16 -2
  585. package/src/plugins/impl/RefreshPlugin.tsx +1 -0
  586. package/src/plugins/impl/SliderPlugin.tsx +6 -8
  587. package/src/plugins/impl/__tests__/DataTablePlugin.test.tsx +387 -1
  588. package/src/plugins/impl/__tests__/FileBrowserPlugin.test.tsx +45 -0
  589. package/src/plugins/impl/__tests__/RangeSliderPlugin.test.tsx +109 -0
  590. package/src/plugins/impl/__tests__/SliderPlugin.test.tsx +24 -3
  591. package/src/plugins/impl/anywidget/__tests__/registry.test.ts +153 -0
  592. package/src/plugins/impl/anywidget/__tests__/widget-binding.test.ts +241 -2
  593. package/src/plugins/impl/anywidget/model.ts +3 -1
  594. package/src/plugins/impl/anywidget/registry.ts +18 -14
  595. package/src/plugins/impl/anywidget/runtime.ts +21 -9
  596. package/src/plugins/impl/anywidget/widget-binding.ts +160 -82
  597. package/src/plugins/impl/chat/__tests__/chat-prompts.test.tsx +93 -0
  598. package/src/plugins/impl/chat/chat-ui.tsx +14 -11
  599. package/src/plugins/impl/code/any-language-editor.tsx +2 -2
  600. package/src/plugins/impl/data-editor/glide-data-editor.tsx +8 -5
  601. package/src/plugins/impl/data-editor/glide-utils.ts +3 -1
  602. package/src/plugins/impl/data-explorer/ConnectedDataExplorerComponent.tsx +1 -1
  603. package/src/plugins/impl/data-explorer/components/column-summary.tsx +4 -2
  604. package/src/plugins/impl/data-explorer/state/reducer.ts +1 -1
  605. package/src/plugins/impl/data-frames/DataFramePlugin.tsx +1 -2
  606. package/src/plugins/impl/data-frames/__tests__/sidebar.test.tsx +160 -0
  607. package/src/plugins/impl/data-frames/forms/__tests__/__snapshots__/form.test.tsx.snap +66 -66
  608. package/src/plugins/impl/data-frames/panel.tsx +43 -16
  609. package/src/plugins/impl/mpl-interactive/MplInteractivePlugin.tsx +5 -3
  610. package/src/plugins/impl/panel/PanelPlugin.tsx +16 -17
  611. package/src/plugins/impl/panel/__tests__/utils.test.ts +39 -1
  612. package/src/plugins/impl/panel/utils.ts +17 -0
  613. package/src/plugins/impl/plotly/PlotlyPlugin.tsx +2 -5
  614. package/src/plugins/impl/plotly/selection.ts +25 -19
  615. package/src/plugins/impl/vega/VegaPlugin.tsx +2 -3
  616. package/src/plugins/impl/vega/make-selectable.ts +4 -7
  617. package/src/plugins/layout/RoutesPlugin.tsx +1 -1
  618. package/src/stories/__tests__/editor-story.test.tsx +33 -0
  619. package/src/stories/button.stories.tsx +1 -0
  620. package/src/stories/cell.stories.tsx +2 -5
  621. package/src/stories/data-table.stories.tsx +31 -0
  622. package/src/stories/editor.stories.tsx +24 -17
  623. package/src/stories/form-wrapper.stories.tsx +2 -2
  624. package/src/stories/layout/vertical/one-column.stories.tsx +2 -5
  625. package/src/stories/runtime-story.tsx +23 -17
  626. package/src/stories/select.stories.tsx +2 -2
  627. package/src/stories/switchable-multi-select.stories.tsx +1 -1
  628. package/src/utils/__tests__/arrays.test.ts +35 -0
  629. package/src/utils/__tests__/batch-requests.test.ts +3 -3
  630. package/src/utils/__tests__/{createReducer.test.ts → createReducer.test.tsx} +29 -0
  631. package/src/utils/__tests__/numbers.test.ts +105 -1
  632. package/src/utils/__tests__/objects.test.ts +21 -0
  633. package/src/utils/arrays.ts +11 -2
  634. package/src/utils/blob.ts +1 -1
  635. package/src/utils/createReducer.ts +53 -26
  636. package/src/utils/maps.ts +0 -3
  637. package/src/utils/numbers.ts +79 -18
  638. package/src/utils/objects.ts +4 -9
  639. package/src/utils/once.ts +19 -19
  640. package/src/utils/tracer.ts +9 -5
  641. package/src/utils/zod-utils.ts +1 -3
  642. package/dist/any-language-editor-DZ_YTVus.js +0 -76
  643. package/dist/assets/__vite-browser-external-BXYkiFsk.js +0 -1
  644. package/dist/assets/worker-HPY9fbhz.js +0 -114
  645. package/dist/code-visibility-DkCqn-PO.js +0 -138
  646. package/dist/feedback-button-wnAMXOGA.js +0 -379
  647. package/dist/mermaid-HWGCJPDP-ByCsZnYF.js +0 -2
  648. package/dist/precisionRound-DMIVQrt2.js +0 -97
  649. package/src/components/editor/navigation/__tests__/state.test.ts +0 -81
  650. package/src/components/editor/navigation/state.ts +0 -65
  651. package/src/core/ai/tools/__tests__/run-cells-tool.test.ts +0 -656
  652. package/src/core/ai/tools/run-cells-tool.ts +0 -303
  653. package/src/core/attachments/state.ts +0 -21
  654. package/src/core/cells/__tests__/apply-transaction.test.ts +0 -991
  655. package/src/core/cells/__tests__/document-changes.test.ts +0 -1140
  656. package/src/core/cells/__tests__/document-roundtrip.test.ts +0 -392
  657. package/src/core/cells/document-changes.ts +0 -944
  658. package/src/core/host/AGENTS.md +0 -11
  659. package/src/core/host/__tests__/events.test.ts +0 -46
  660. package/src/core/host/__tests__/fixtures.ts +0 -39
  661. package/src/core/host/__tests__/notebook-client.test.ts +0 -303
  662. package/src/core/host/__tests__/protocol.test.ts +0 -214
  663. package/src/core/host/__tests__/stream.test.ts +0 -211
  664. package/src/core/host/connection.ts +0 -81
  665. package/src/core/host/events.ts +0 -60
  666. package/src/core/host/notebook-client.ts +0 -272
  667. package/src/core/host/protocol.ts +0 -1943
  668. package/src/core/host/resources/resource.ts +0 -59
  669. package/src/core/host/stream.ts +0 -213
  670. package/src/core/state/__tests__/jotai.test.ts +0 -25
  671. package/src/core/wasm/worker/message-buffer.ts +0 -33
  672. package/src/core/websocket/__tests__/createConnectionTransport.test.ts +0 -49
  673. package/src/core/websocket/__tests__/useNotebookClient.hook.test.tsx +0 -140
  674. package/src/core/websocket/__tests__/useNotebookSession.hook.test.tsx +0 -883
  675. package/src/core/websocket/transports/__tests__/basic.test.ts +0 -275
  676. package/src/core/websocket/transports/__tests__/sse.test.ts +0 -335
  677. package/src/core/websocket/transports/__tests__/transport.test.ts +0 -308
  678. package/src/core/websocket/transports/__tests__/ws.test.ts +0 -125
  679. package/src/core/websocket/transports/basic.ts +0 -102
  680. package/src/core/websocket/transports/create.ts +0 -31
  681. package/src/core/websocket/transports/sse.ts +0 -308
  682. package/src/core/websocket/transports/transport.ts +0 -50
  683. package/src/core/websocket/transports/ws.ts +0 -98
  684. package/src/core/websocket/useNotebookClient.ts +0 -80
  685. package/src/utils/__tests__/id-tree.test.ts +0 -2145
  686. package/src/utils/id-tree.tsx +0 -1134
  687. /package/src/{core/attachments/toast.ts → components/editor/agent-toast.ts} +0 -0
  688. /package/src/core/{websocket → session}/connection-utils.ts +0 -0
@@ -1,28 +1,28 @@
1
1
  import { a as e, t } from "./rolldown-runtime-Cb76FRpK.js";
2
- import { c as n, g as r, h as i, t as a } from "./button-CvjkwdSk.js";
2
+ import { c as n, g as r, h as i, t as a } from "./button-BQRdqQi1.js";
3
3
  import { t as o } from "./react-sHtZdjeP.js";
4
4
  import { t as s } from "./compiler-runtime-CldRdSsv.js";
5
- import { i as c, t as l } from "./copy-icon-Ft7t9bqz.js";
6
- import { F as u, H as d, U as f, V as p, X as m, Y as h, Z as g, _, a as v, c as y, d as b, f as x, g as S, h as C, l as w, m as T, n as E, p as D, r as O, t as k, v as A, x as ee, y as j, z as te } from "./html-to-image-Bf8QMGi4.js";
7
- import { h as M, t as ne } from "./tooltip-BO1REbqs.js";
8
- import { Ct as re, Dt as ie, L as ae, Pt as oe, Rt as se, St as ce, Ut as le, Z as ue, ct as de, fn as fe, h as pe, hn as me, ht as he, i as ge, it as _e, ln as ve, lt as ye, r as be, t as xe, tn as Se, tt as Ce, un as we, w as Te, wt as Ee } from "./error-entries-Bv6bZPF3.js";
9
- import { A as De, C as Oe, M as ke, b as Ae } from "./select-BButFi-d.js";
10
- import { _ as je, f as Me, h as Ne, i as Pe, n as Fe, t as Ie } from "./dropdown-menu-CP_qCYHC.js";
11
- import { C as Le, d as Re } from "./toDate-UtiwmnH2.js";
12
- import { d as ze, f as Be, i as Ve, n as He, t as Ue, u as We } from "./process-output-BZg56CCb.js";
5
+ import { i as c, t as l } from "./copy-icon-De584pZ4.js";
6
+ import { B as u, H as d, I as f, Q as p, S as m, U as h, W as g, X as _, Z as v, _ as y, a as b, b as x, f as S, g as C, h as w, l as T, m as E, n as D, p as O, r as k, t as ee, u as te, v as A, y as ne } from "./html-to-image-CkH7vdBZ.js";
7
+ import { m as j, t as re } from "./tooltip-s4zZxwKe.js";
8
+ import { It as ie, J as ae, Jt as oe, Lt as se, P as ce, Q as le, Rt as ue, Vt as de, b as fe, fn as pe, gt as me, ht as he, i as ge, kt as _e, ln as ve, m as ye, on as be, ot as xe, r as Se, sn as Ce, t as we, tt as Te, yt as Ee } from "./error-entries-C2Ux0Fjt.js";
9
+ import { A as De, C as Oe, M as ke, b as Ae } from "./select-2KOiReNY.js";
10
+ import { _ as je, f as Me, h as Ne, i as Pe, n as Fe, t as Ie } from "./dropdown-menu-NlnsmNA6.js";
11
+ import { C as Le, d as Re } from "./toDate-BNDEXbfV.js";
12
+ import { d as ze, f as Be, i as Ve, n as He, t as Ue, u as We } from "./process-output-OujAtFW4.js";
13
13
  import { t as Ge } from "./jsx-runtime-3BD1kT0s.js";
14
- import { A as Ke, C as qe, D as Je, E as Ye, F as Xe, L as Ze, M as Qe, O as $e, P as et, R as tt, S as nt, T as rt, V as it, b as at, j as ot, v as st, w as ct, x as lt, y as ut, z as dt } from "./use-restore-focus-BEM7sFWl.js";
15
- import { n as ft } from "./error-banner-D-WCIiMt.js";
16
- import { t as pt } from "./label-BDKF3Afc.js";
14
+ import { A as Ke, B as qe, C as Je, E as Ye, I as Xe, L as Ze, M as Qe, N as $e, O as et, P as tt, S as nt, T as rt, U as it, V as at, b as ot, k as st, w as ct, x as lt, y as ut, z as dt } from "./use-restore-focus-BgDTd2tc.js";
15
+ import { n as ft } from "./error-banner-DxJ3s8YO.js";
16
+ import { t as pt } from "./label-Qvw1E97W.js";
17
17
  import { t as mt } from "./isEmpty-BSZ1LaUo.js";
18
- import { A as ht, T as gt, n as _t } from "./useTheme-CRnjkku0.js";
19
- import { $ as vt, Mt as yt, Pt as bt, Rt as xt, Vt as St, Z as Ct, ht as wt, jt as Tt, mt as Et, nt as Dt, tt as Ot, zt as kt } from "./dist-DoE4XJBC.js";
20
- import { t as At } from "./objects-CzUgoMIF.js";
21
- import { n as jt, o as Mt, r as Nt } from "./dist-CkTTIdBe.js";
22
- import { n as Pt } from "./dist-CrSP_H1M.js";
23
- import { n as Ft, t as It } from "./esm-AMFssoNp.js";
24
- import { t as Lt } from "./useAsyncData-Deh5kszT.js";
25
- var Rt = M("ban", [["circle", {
18
+ import { E as ht, P as gt, R as _t, n as vt } from "./useTheme-5TwyOh3B.js";
19
+ import { t as yt } from "./objects-DCmMvZtn.js";
20
+ import { At as bt, Ct as xt, Et as St, G as Ct, J as wt, Nt as Tt, U as Et, jt as Dt, ot as Ot, q as kt, st as At, wt as jt } from "./dist-BmS-ZGjl.js";
21
+ import { n as Mt, o as Nt, r as Pt } from "./dist-OUle2RT7.js";
22
+ import { n as Ft } from "./dist-DtGn9N4h.js";
23
+ import { n as It, t as Lt } from "./esm-mDQNEFe_.js";
24
+ import { t as Rt } from "./useAsyncData-ASDni9vH.js";
25
+ var zt = j("ban", [["circle", {
26
26
  cx: "12",
27
27
  cy: "12",
28
28
  r: "10",
@@ -30,7 +30,7 @@ var Rt = M("ban", [["circle", {
30
30
  }], ["path", {
31
31
  d: "M4.929 4.929 19.07 19.071",
32
32
  key: "196cmz"
33
- }]]), zt = M("bot-message-square", [
33
+ }]]), Bt = j("bot-message-square", [
34
34
  ["path", {
35
35
  d: "M12 6V2H8",
36
36
  key: "1155em"
@@ -55,13 +55,13 @@ var Rt = M("ban", [["circle", {
55
55
  d: "M9 11v2",
56
56
  key: "1ueba0"
57
57
  }]
58
- ]), Bt = M("circle-check-big", [["path", {
58
+ ]), Vt = j("circle-check-big", [["path", {
59
59
  d: "M21.801 10A10 10 0 1 1 17 3.335",
60
60
  key: "yps3ct"
61
61
  }], ["path", {
62
62
  d: "m9 11 3 3L22 4",
63
63
  key: "1pflzl"
64
- }]]), Vt = M("circle-slash", [["circle", {
64
+ }]]), Ht = j("circle-slash", [["circle", {
65
65
  cx: "12",
66
66
  cy: "12",
67
67
  r: "10",
@@ -72,22 +72,22 @@ var Rt = M("ban", [["circle", {
72
72
  y1: "15",
73
73
  y2: "9",
74
74
  key: "1dfufj"
75
- }]]), Ht = M("paperclip", [["path", {
75
+ }]]), Ut = j("paperclip", [["path", {
76
76
  d: "m16 6-8.414 8.586a2 2 0 0 0 2.829 2.829l8.414-8.586a4 4 0 1 0-5.657-5.657l-8.379 8.551a6 6 0 1 0 8.485 8.485l8.379-8.551",
77
77
  key: "1miecu"
78
- }]]), Ut = M("rotate-cw", [["path", {
78
+ }]]), Wt = j("rotate-cw", [["path", {
79
79
  d: "M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8",
80
80
  key: "1p45f6"
81
81
  }], ["path", {
82
82
  d: "M21 3v5h-5",
83
83
  key: "1q7to0"
84
- }]]), Wt = M("send-horizontal", [["path", {
84
+ }]]), Gt = j("send-horizontal", [["path", {
85
85
  d: "M3.714 3.048a.498.498 0 0 0-.683.627l2.843 7.627a2 2 0 0 1 0 1.396l-2.842 7.627a.498.498 0 0 0 .682.627l18-8.5a.5.5 0 0 0 0-.904z",
86
86
  key: "117uat"
87
87
  }], ["path", {
88
88
  d: "M6 12h16",
89
89
  key: "s4cdu5"
90
- }]]), Gt = M("settings", [["path", {
90
+ }]]), Kt = j("settings", [["path", {
91
91
  d: "M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",
92
92
  key: "1i5ecw"
93
93
  }], ["circle", {
@@ -95,7 +95,7 @@ var Rt = M("ban", [["circle", {
95
95
  cy: "12",
96
96
  r: "3",
97
97
  key: "1v7zrd"
98
- }]]), Kt = M("shield-question-mark", [
98
+ }]]), qt = j("shield-question-mark", [
99
99
  ["path", {
100
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
101
  key: "oel41y"
@@ -108,66 +108,66 @@ var Rt = M("ban", [["circle", {
108
108
  d: "M12 17h.01",
109
109
  key: "p32p05"
110
110
  }]
111
- ]), N = s(), qt = "vercel.ai.error", Jt = Symbol.for(qt), Yt, Xt, P = class e extends (Xt = Error, Yt = Jt, Xt) {
111
+ ]), M = s(), Jt = "vercel.ai.error", Yt = Symbol.for(Jt), Xt, Zt, N = class e extends (Zt = Error, Xt = Yt, Zt) {
112
112
  constructor({ name: e, message: t, cause: n }) {
113
- super(t), this[Yt] = !0, this.name = e, this.cause = n;
113
+ super(t), this[Xt] = !0, this.name = e, this.cause = n;
114
114
  }
115
115
  static isInstance(t) {
116
- return e.hasMarker(t, qt);
116
+ return e.hasMarker(t, Jt);
117
117
  }
118
118
  static hasMarker(e, t) {
119
119
  let n = Symbol.for(t);
120
120
  return typeof e == "object" && !!e && n in e && typeof e[n] == "boolean" && e[n] === !0;
121
121
  }
122
- }, Zt = "AI_APICallError", Qt = `vercel.ai.error.${Zt}`, $t = Symbol.for(Qt), en, tn, nn = class extends (tn = P, en = $t, tn) {
122
+ }, Qt = "AI_APICallError", $t = `vercel.ai.error.${Qt}`, en = Symbol.for($t), tn, nn, rn = class extends (nn = N, tn = en, nn) {
123
123
  constructor({ message: e, url: t, requestBodyValues: n, statusCode: r, responseHeaders: i, responseBody: a, cause: o, isRetryable: s = r != null && (r === 408 || r === 409 || r === 429 || r >= 500), data: c }) {
124
124
  super({
125
- name: Zt,
125
+ name: Qt,
126
126
  message: e,
127
127
  cause: o
128
- }), this[en] = !0, this.url = t, this.requestBodyValues = n, this.statusCode = r, this.responseHeaders = i, this.responseBody = a, this.isRetryable = s, this.data = c;
128
+ }), this[tn] = !0, this.url = t, this.requestBodyValues = n, this.statusCode = r, this.responseHeaders = i, this.responseBody = a, this.isRetryable = s, this.data = c;
129
129
  }
130
130
  static isInstance(e) {
131
- return P.hasMarker(e, Qt);
131
+ return N.hasMarker(e, $t);
132
132
  }
133
- }, rn = "AI_EmptyResponseBodyError", an = `vercel.ai.error.${rn}`, on = Symbol.for(an), sn, cn, ln = class extends (cn = P, sn = on, cn) {
133
+ }, an = "AI_EmptyResponseBodyError", on = `vercel.ai.error.${an}`, sn = Symbol.for(on), cn, ln, un = class extends (ln = N, cn = sn, ln) {
134
134
  constructor({ message: e = "Empty response body" } = {}) {
135
135
  super({
136
- name: rn,
136
+ name: an,
137
137
  message: e
138
- }), this[sn] = !0;
138
+ }), this[cn] = !0;
139
139
  }
140
140
  static isInstance(e) {
141
- return P.hasMarker(e, an);
141
+ return N.hasMarker(e, on);
142
142
  }
143
143
  };
144
- function un(e) {
144
+ function dn(e) {
145
145
  return e == null ? "unknown error" : typeof e == "string" ? e : e instanceof Error ? e.toString() : JSON.stringify(e);
146
146
  }
147
- var dn = "AI_InvalidArgumentError", fn = `vercel.ai.error.${dn}`, pn = Symbol.for(fn), mn, hn, gn = class extends (hn = P, mn = pn, hn) {
147
+ var fn = "AI_InvalidArgumentError", pn = `vercel.ai.error.${fn}`, mn = Symbol.for(pn), hn, gn, _n = class extends (gn = N, hn = mn, gn) {
148
148
  constructor({ message: e, cause: t, argument: n }) {
149
149
  super({
150
- name: dn,
150
+ name: fn,
151
151
  message: e,
152
152
  cause: t
153
- }), this[mn] = !0, this.argument = n;
153
+ }), this[hn] = !0, this.argument = n;
154
154
  }
155
155
  static isInstance(e) {
156
- return P.hasMarker(e, fn);
156
+ return N.hasMarker(e, pn);
157
157
  }
158
- }, _n = "AI_JSONParseError", vn = `vercel.ai.error.${_n}`, yn = Symbol.for(vn), bn, xn, Sn = class extends (xn = P, bn = yn, xn) {
158
+ }, vn = "AI_JSONParseError", yn = `vercel.ai.error.${vn}`, bn = Symbol.for(yn), xn, Sn, Cn = class extends (Sn = N, xn = bn, Sn) {
159
159
  constructor({ text: e, cause: t }) {
160
160
  super({
161
- name: _n,
161
+ name: vn,
162
162
  message: `JSON parsing failed: Text: ${e}.
163
- Error message: ${un(t)}`,
163
+ Error message: ${dn(t)}`,
164
164
  cause: t
165
- }), this[bn] = !0, this.text = e;
165
+ }), this[xn] = !0, this.text = e;
166
166
  }
167
167
  static isInstance(e) {
168
- return P.hasMarker(e, vn);
168
+ return N.hasMarker(e, yn);
169
169
  }
170
- }, Cn = "AI_TypeValidationError", wn = `vercel.ai.error.${Cn}`, Tn = Symbol.for(wn), En, Dn, On = class e extends (Dn = P, En = Tn, Dn) {
170
+ }, wn = "AI_TypeValidationError", Tn = `vercel.ai.error.${wn}`, En = Symbol.for(Tn), Dn, On, P = class e extends (On = N, Dn = En, On) {
171
171
  constructor({ value: e, cause: t, context: n }) {
172
172
  let r = "Type validation failed";
173
173
  if (n?.field && (r += ` for ${n.field}`), n?.entityName || n?.entityId) {
@@ -176,14 +176,14 @@ Error message: ${un(t)}`,
176
176
  n.entityName && e.push(n.entityName), n.entityId && e.push(`id: "${n.entityId}"`), r += e.join(", "), r += ")";
177
177
  }
178
178
  super({
179
- name: Cn,
179
+ name: wn,
180
180
  message: `${r}: Value: ${JSON.stringify(e)}.
181
- Error message: ${un(t)}`,
181
+ Error message: ${dn(t)}`,
182
182
  cause: t
183
- }), this[En] = !0, this.value = e, this.context = n;
183
+ }), this[Dn] = !0, this.value = e, this.context = n;
184
184
  }
185
185
  static isInstance(e) {
186
- return P.hasMarker(e, wn);
186
+ return N.hasMarker(e, Tn);
187
187
  }
188
188
  static wrap({ value: t, cause: n, context: r }) {
189
189
  return e.isInstance(n) && n.value === t && n.context?.field === r?.field && n.context?.entityName === r?.entityName && n.context?.entityId === r?.entityId ? n : new e({
@@ -192,7 +192,7 @@ Error message: ${un(t)}`,
192
192
  context: r
193
193
  });
194
194
  }
195
- }, kn = "AI_UnsupportedFunctionalityError", An = `vercel.ai.error.${kn}`, jn = Symbol.for(An), Mn, Nn, Pn = class extends (Nn = P, Mn = jn, Nn) {
195
+ }, kn = "AI_UnsupportedFunctionalityError", An = `vercel.ai.error.${kn}`, jn = Symbol.for(An), Mn, Nn, Pn = class extends (Nn = N, Mn = jn, Nn) {
196
196
  constructor({ functionality: e, message: t = `'${e}' functionality not supported.` }) {
197
197
  super({
198
198
  name: kn,
@@ -200,7 +200,7 @@ Error message: ${un(t)}`,
200
200
  }), this[Mn] = !0, this.functionality = e;
201
201
  }
202
202
  static isInstance(e) {
203
- return P.hasMarker(e, An);
203
+ return N.hasMarker(e, An);
204
204
  }
205
205
  }, Fn = class extends Error {
206
206
  constructor(e, t) {
@@ -403,7 +403,7 @@ var F = ({ prefix: e, size: t = 16, alphabet: n = "0123456789ABCDEFGHIJKLMNOPQRS
403
403
  return r.join("");
404
404
  };
405
405
  if (e == null) return i;
406
- if (n.includes(r)) throw new gn({
406
+ if (n.includes(r)) throw new _n({
407
407
  argument: "separator",
408
408
  message: `The separator "${r}" must not be part of the alphabet "${n}".`
409
409
  });
@@ -1226,7 +1226,7 @@ function ti(e) {
1226
1226
  value: n.value
1227
1227
  } : {
1228
1228
  success: !1,
1229
- error: new On({
1229
+ error: new P({
1230
1230
  value: t,
1231
1231
  cause: n.issues
1232
1232
  })
@@ -1256,7 +1256,7 @@ function ii(e, t) {
1256
1256
  io: "input",
1257
1257
  reused: n ? "ref" : "inline"
1258
1258
  })), { validate: async (t) => {
1259
- let n = await dt(e, t);
1259
+ let n = await at(e, t);
1260
1260
  return n.success ? {
1261
1261
  success: !0,
1262
1262
  value: n.data
@@ -1278,7 +1278,7 @@ async function si({ value: e, schema: t, context: n }) {
1278
1278
  schema: t,
1279
1279
  context: n
1280
1280
  });
1281
- if (!r.success) throw On.wrap({
1281
+ if (!r.success) throw P.wrap({
1282
1282
  value: e,
1283
1283
  cause: r.error,
1284
1284
  context: n
@@ -1300,7 +1300,7 @@ async function ci({ value: e, schema: t, context: n }) {
1300
1300
  rawValue: e
1301
1301
  } : {
1302
1302
  success: !1,
1303
- error: On.wrap({
1303
+ error: P.wrap({
1304
1304
  value: e,
1305
1305
  cause: t.error,
1306
1306
  context: n
@@ -1310,7 +1310,7 @@ async function ci({ value: e, schema: t, context: n }) {
1310
1310
  } catch (t) {
1311
1311
  return {
1312
1312
  success: !1,
1313
- error: On.wrap({
1313
+ error: P.wrap({
1314
1314
  value: e,
1315
1315
  cause: t,
1316
1316
  context: n
@@ -1333,7 +1333,7 @@ async function li({ text: e, schema: t }) {
1333
1333
  } catch (t) {
1334
1334
  return {
1335
1335
  success: !1,
1336
- error: Sn.isInstance(t) ? t : new Sn({
1336
+ error: Cn.isInstance(t) ? t : new Cn({
1337
1337
  text: e,
1338
1338
  cause: t
1339
1339
  }),
@@ -1358,7 +1358,7 @@ var di = Object.defineProperty, fi = (e, t) => {
1358
1358
  get: t[n],
1359
1359
  enumerable: !0
1360
1360
  });
1361
- }, pi = "AI_InvalidArgumentError", mi = `vercel.ai.error.${pi}`, hi = Symbol.for(mi), gi, _i, vi = class extends (_i = P, gi = hi, _i) {
1361
+ }, pi = "AI_InvalidArgumentError", mi = `vercel.ai.error.${pi}`, hi = Symbol.for(mi), gi, _i, vi = class extends (_i = N, gi = hi, _i) {
1362
1362
  constructor({ parameter: e, value: t, message: n }) {
1363
1363
  super({
1364
1364
  name: pi,
@@ -1366,9 +1366,9 @@ var di = Object.defineProperty, fi = (e, t) => {
1366
1366
  }), this[gi] = !0, this.parameter = e, this.value = t;
1367
1367
  }
1368
1368
  static isInstance(e) {
1369
- return P.hasMarker(e, mi);
1369
+ return N.hasMarker(e, mi);
1370
1370
  }
1371
- }, yi = "AI_NoObjectGeneratedError", bi = `vercel.ai.error.${yi}`, xi = Symbol.for(bi), Si, Ci, U = class extends (Ci = P, Si = xi, Ci) {
1371
+ }, yi = "AI_NoObjectGeneratedError", bi = `vercel.ai.error.${yi}`, xi = Symbol.for(bi), Si, Ci, U = class extends (Ci = N, Si = xi, Ci) {
1372
1372
  constructor({ message: e = "No object generated.", cause: t, text: n, response: r, usage: i, finishReason: a }) {
1373
1373
  super({
1374
1374
  name: yi,
@@ -1377,9 +1377,9 @@ var di = Object.defineProperty, fi = (e, t) => {
1377
1377
  }), this[Si] = !0, this.text = n, this.response = r, this.usage = i, this.finishReason = a;
1378
1378
  }
1379
1379
  static isInstance(e) {
1380
- return P.hasMarker(e, bi);
1380
+ return N.hasMarker(e, bi);
1381
1381
  }
1382
- }, wi = "AI_UIMessageStreamError", Ti = `vercel.ai.error.${wi}`, Ei = Symbol.for(Ti), Di, Oi, ki = class extends (Oi = P, Di = Ei, Oi) {
1382
+ }, wi = "AI_UIMessageStreamError", Ti = `vercel.ai.error.${wi}`, Ei = Symbol.for(Ti), Di, Oi, ki = class extends (Oi = N, Di = Ei, Oi) {
1383
1383
  constructor({ chunkType: e, chunkId: t, message: n }) {
1384
1384
  super({
1385
1385
  name: wi,
@@ -1387,7 +1387,7 @@ var di = Object.defineProperty, fi = (e, t) => {
1387
1387
  }), this[Di] = !0, this.chunkType = e, this.chunkId = t;
1388
1388
  }
1389
1389
  static isInstance(e) {
1390
- return P.hasMarker(e, Ti);
1390
+ return N.hasMarker(e, Ti);
1391
1391
  }
1392
1392
  };
1393
1393
  function Ai({ warning: e, provider: t, model: n }) {
@@ -1446,23 +1446,23 @@ function Fi(e, t) {
1446
1446
  return n;
1447
1447
  }
1448
1448
  var W = {
1449
- array: nt,
1450
- boolean: qe,
1451
- custom: ct,
1452
- discriminatedUnion: rt,
1453
- enum: st,
1454
- instanceof: ut,
1455
- lazy: Ye,
1456
- literal: Je,
1457
- looseObject: $e,
1458
- never: Ke,
1459
- null: at,
1460
- number: ot,
1461
- object: Qe,
1462
- record: et,
1463
- string: Xe,
1464
- union: Ze,
1465
- unknown: tt
1449
+ array: Je,
1450
+ boolean: ct,
1451
+ custom: rt,
1452
+ discriminatedUnion: Ye,
1453
+ enum: ut,
1454
+ instanceof: ot,
1455
+ lazy: et,
1456
+ literal: st,
1457
+ looseObject: Ke,
1458
+ never: Qe,
1459
+ null: lt,
1460
+ number: $e,
1461
+ object: tt,
1462
+ record: Xe,
1463
+ string: Ze,
1464
+ union: dt,
1465
+ unknown: qe
1466
1466
  }, Ii = W.lazy(() => W.union([
1467
1467
  W.null(),
1468
1468
  W.string(),
@@ -1999,7 +1999,7 @@ var ia = () => ({
1999
1999
  let o = i.value;
2000
2000
  if (typeof o != "object" || !o || !("elements" in o) || !Array.isArray(o.elements)) throw new U({
2001
2001
  message: "No object generated: response did not match schema.",
2002
- cause: new On({
2002
+ cause: new P({
2003
2003
  value: o,
2004
2004
  cause: "response must be an object with an elements array"
2005
2005
  }),
@@ -2092,11 +2092,11 @@ function sa({ name: e, value: t }) {
2092
2092
  }
2093
2093
  }
2094
2094
  function ca({ value: e, minItems: t, maxItems: n }) {
2095
- if (t != null && e.length < t) return new On({
2095
+ if (t != null && e.length < t) return new P({
2096
2096
  value: e,
2097
2097
  cause: `elements array must contain at least ${t} items`
2098
2098
  });
2099
- if (n != null && e.length > n) return new On({
2099
+ if (n != null && e.length > n) return new P({
2100
2100
  value: e,
2101
2101
  cause: `elements array must contain at most ${n} items`
2102
2102
  });
@@ -2131,7 +2131,7 @@ var la = ({ options: e, name: t, description: n }) => ({
2131
2131
  let i = r.value;
2132
2132
  if (typeof i != "object" || !i || !("result" in i) || typeof i.result != "string" || !e.includes(i.result)) throw new U({
2133
2133
  message: "No object generated: response did not match schema.",
2134
- cause: new On({
2134
+ cause: new P({
2135
2135
  value: i,
2136
2136
  cause: "response must be an object that contains a choice value."
2137
2137
  }),
@@ -2970,7 +2970,7 @@ F({
2970
2970
  });
2971
2971
  async function ka({ response: e, url: t, fallbackMessage: n }) {
2972
2972
  let r = await e.text();
2973
- return new nn({
2973
+ return new rn({
2974
2974
  message: r || n,
2975
2975
  url: t,
2976
2976
  requestBodyValues: void 0,
@@ -3046,7 +3046,7 @@ var Ma = class {
3046
3046
  url: s,
3047
3047
  fallbackMessage: "Failed to fetch the chat response."
3048
3048
  });
3049
- if (!d.body) throw new ln({ message: "The response body is empty." });
3049
+ if (!d.body) throw new un({ message: "The response body is empty." });
3050
3050
  return this.processResponseStream(d.body);
3051
3051
  }
3052
3052
  async reconnectToStream(e) {
@@ -3075,7 +3075,7 @@ var Ma = class {
3075
3075
  url: o,
3076
3076
  fallbackMessage: "Failed to fetch the chat response."
3077
3077
  });
3078
- if (!l.body) throw new ln({ message: "The response body is empty." });
3078
+ if (!l.body) throw new un({ message: "The response body is empty." });
3079
3079
  return this.processResponseStream(l.body);
3080
3080
  }
3081
3081
  }, Na = class extends Ma {
@@ -3566,7 +3566,7 @@ function ao(e, t) {
3566
3566
  "<marimo-ui-element"
3567
3567
  ].some((e) => t.includes(e))) : !1;
3568
3568
  }
3569
- var oo = class extends T {
3569
+ var oo = class extends w {
3570
3570
  title = "Cell Outputs";
3571
3571
  mentionPrefix = "@";
3572
3572
  contextType = "cell-output";
@@ -3575,8 +3575,8 @@ var oo = class extends T {
3575
3575
  super(), this.store = e;
3576
3576
  }
3577
3577
  getItems() {
3578
- let e = this.store.get(pe), t = [];
3579
- for (let n of e.cellIds.inOrderIds) {
3578
+ let e = this.store.get(ye), t = [];
3579
+ for (let n of e.cellIds) {
3580
3580
  let r = lo(n, e), i = r.cellOutput;
3581
3581
  if (!i) continue;
3582
3582
  let a = i.output.mimetype || "unknown";
@@ -3599,9 +3599,9 @@ var oo = class extends T {
3599
3599
  label: `@${n}`,
3600
3600
  displayLabel: n,
3601
3601
  detail: `${t.outputType} output`,
3602
- boost: t.outputType === "media" ? b.HIGH : b.MEDIUM,
3602
+ boost: t.outputType === "media" ? S.HIGH : S.MEDIUM,
3603
3603
  type: this.contextType,
3604
- section: x.CELL_OUTPUT,
3604
+ section: O.CELL_OUTPUT,
3605
3605
  apply: `@${n}`,
3606
3606
  info: () => {
3607
3607
  let e = document.createElement("div");
@@ -3638,7 +3638,7 @@ var oo = class extends T {
3638
3638
  outputType: t.outputType,
3639
3639
  mimetype: t.output.mimetype
3640
3640
  }, o = `Cell Code:\n${i}\n\n`;
3641
- return t.outputType === "text" && t.processedContent ? o += `Output:\n${t.processedContent}` : t.outputType === "media" && (o += `Media Output: Contains ${t.output.mimetype} content`, t.imageUrl && (o += `\nImage URL: ${t.imageUrl}`)), D({
3641
+ return t.outputType === "text" && t.processedContent ? o += `Output:\n${t.processedContent}` : t.outputType === "media" && (o += `Media Output: Contains ${t.output.mimetype} content`, t.imageUrl && (o += `\nImage URL: ${t.imageUrl}`)), E({
3642
3642
  type: this.contextType,
3643
3643
  data: a,
3644
3644
  details: o
@@ -3653,7 +3653,7 @@ async function so(e, t, n) {
3653
3653
  let i = e.filter((e) => e.shouldDownloadImage && e.outputType === "media");
3654
3654
  if (i.length === 0) return [];
3655
3655
  let a = i.flatMap((e) => {
3656
- let i = document.getElementById(le.create(t));
3656
+ let i = document.getElementById(Ee.create(t));
3657
3657
  return i ? {
3658
3658
  cellId: t,
3659
3659
  cellName: n,
@@ -3666,14 +3666,14 @@ async function so(e, t, n) {
3666
3666
  type: "file",
3667
3667
  filename: `${n}-output-screenshot`,
3668
3668
  mediaType: "image/png",
3669
- url: await k(e.element)
3669
+ url: await ee(e.element)
3670
3670
  })));
3671
3671
  } catch (e) {
3672
3672
  return r.error("Error downloading cell output images:", e), [];
3673
3673
  }
3674
3674
  }
3675
3675
  function co(e) {
3676
- if (v(e)) return null;
3676
+ if (b(e)) return null;
3677
3677
  let t = e.mimetype, n = ao(t, String(e.data)) ? "media" : "text", r = Ue(e), i, a = !1;
3678
3678
  return n === "media" && (typeof e.data == "string" && e.data.startsWith("data:") || typeof e.data == "string" && e.data.startsWith("http") ? i = e.data : a = !0), {
3679
3679
  processedContent: r,
@@ -3684,10 +3684,10 @@ function co(e) {
3684
3684
  };
3685
3685
  }
3686
3686
  function lo(e, t, n) {
3687
- let { includeConsoleOutput: r = !1 } = n || {}, i = t.cellRuntime[e], a = t.cellData[e], o = t.cellIds.inOrderIds.indexOf(e), s = ae(a.name, o), c;
3687
+ let { includeConsoleOutput: r = !1 } = n || {}, i = t.cellRuntime[e], a = t.cellData[e], o = t.cellIds.indexOf(e), s = ce(a.name, o), c;
3688
3688
  r && (c = i.consoleOutputs.map((e) => co(e)).filter((e) => e !== null));
3689
3689
  let l, u = i.output;
3690
- return u && !v(u) && (l = co(u) ?? void 0), {
3690
+ return u && !b(u) && (l = co(u) ?? void 0), {
3691
3691
  cellId: e,
3692
3692
  cellName: s,
3693
3693
  cellCode: a.code,
@@ -3699,14 +3699,14 @@ function lo(e, t, n) {
3699
3699
  //#region src/core/ai/context/providers/error.ts
3700
3700
  function uo(e, t) {
3701
3701
  let n = [`Code:\n${e.cellCode}`];
3702
- if (e.tracebackHtml && n.push(`Traceback:\n${Te(e.tracebackHtml)}`), e.errorData.length > 0 && n.push(e.errorData.map((e) => be(e)).join("\n\n")), e.errorData.some((e) => e.type === "sql-error")) {
3703
- let r = w(e.cellId, t);
3702
+ if (e.tracebackHtml && n.push(`Traceback:\n${fe(e.tracebackHtml)}`), e.errorData.length > 0 && n.push(e.errorData.map((e) => Se(e)).join("\n\n")), e.errorData.some((e) => e.type === "sql-error")) {
3703
+ let r = te(e.cellId, t);
3704
3704
  r && n.push(`Database schema:\n${r}`);
3705
3705
  }
3706
3706
  return n.join("\n\n");
3707
3707
  }
3708
3708
  function fo(e, t) {
3709
- return D({
3709
+ return E({
3710
3710
  type: "error",
3711
3711
  data: {
3712
3712
  name: e.cellName || `Cell ${e.cellId}`,
@@ -3716,12 +3716,12 @@ function fo(e, t) {
3716
3716
  });
3717
3717
  }
3718
3718
  function po(e) {
3719
- return e.errorData.length === 1 ? xe(e.errorData[0]) : e.errorData.length > 1 ? `${e.errorData.length} errors` : e.tracebackHtml ? Te(e.tracebackHtml).trim().split("\n").find((e) => e.trim())?.trim() || "traceback" : "error";
3719
+ return e.errorData.length === 1 ? we(e.errorData[0]) : e.errorData.length > 1 ? `${e.errorData.length} errors` : e.tracebackHtml ? fe(e.tracebackHtml).trim().split("\n").find((e) => e.trim())?.trim() || "traceback" : "error";
3720
3720
  }
3721
3721
  function mo(e) {
3722
3722
  return `Error: ${e.cellName || `Cell ${e.cellId}`}`;
3723
3723
  }
3724
- var ho = new he("error", "errors"), go = class extends T {
3724
+ var ho = new _e("error", "errors"), go = class extends w {
3725
3725
  title = "Errors";
3726
3726
  mentionPrefix = "@";
3727
3727
  contextType = "error";
@@ -3763,7 +3763,7 @@ var ho = new he("error", "errors"), go = class extends T {
3763
3763
  detail: `${t} ${ho.pluralize(t)}`,
3764
3764
  type: "error",
3765
3765
  apply: "@error://all",
3766
- section: x.ERROR,
3766
+ section: O.ERROR,
3767
3767
  info: () => {
3768
3768
  let e = document.createElement("div");
3769
3769
  e.classList.add("mo-cm-tooltip", "docs-documentation", "min-w-[200px]", "flex", "flex-col", "gap-1", "p-2");
@@ -3783,13 +3783,13 @@ var ho = new he("error", "errors"), go = class extends T {
3783
3783
  detail: po(t),
3784
3784
  type: "error"
3785
3785
  }),
3786
- section: x.ERROR
3786
+ section: O.ERROR
3787
3787
  };
3788
3788
  }
3789
3789
  return {
3790
3790
  label: "Error",
3791
3791
  displayLabel: "Error",
3792
- section: x.ERROR
3792
+ section: O.ERROR
3793
3793
  };
3794
3794
  }
3795
3795
  formatContext(e) {
@@ -3800,7 +3800,7 @@ var ho = new he("error", "errors"), go = class extends T {
3800
3800
  maxResults: 20,
3801
3801
  defaultResultsLimit: 5,
3802
3802
  includeDirectories: !1
3803
- }, yo = class extends T {
3803
+ }, yo = class extends w {
3804
3804
  title = "Files";
3805
3805
  mentionPrefix = "#";
3806
3806
  contextType = "file";
@@ -3902,8 +3902,8 @@ var ho = new he("error", "errors"), go = class extends T {
3902
3902
  return {
3903
3903
  ...this.createBasicCompletion(e),
3904
3904
  type: "file",
3905
- section: x.FILE,
3906
- boost: t.isDirectory ? b.MEDIUM : b.LOW,
3905
+ section: O.FILE,
3906
+ boost: t.isDirectory ? S.MEDIUM : S.LOW,
3907
3907
  detail: t.path,
3908
3908
  displayLabel: `${i} ${n}`,
3909
3909
  apply: async (e, i, a, o) => {
@@ -3926,7 +3926,7 @@ var ho = new he("error", "errors"), go = class extends T {
3926
3926
  from: a,
3927
3927
  to: o,
3928
3928
  insert: ""
3929
- } }), Mt(e);
3929
+ } }), Nt(e);
3930
3930
  },
3931
3931
  info: () => {
3932
3932
  let e = document.createElement("div");
@@ -3940,7 +3940,7 @@ var ho = new he("error", "errors"), go = class extends T {
3940
3940
  }
3941
3941
  formatContext(e) {
3942
3942
  let { data: t, name: n } = e;
3943
- return D({
3943
+ return E({
3944
3944
  type: this.contextType,
3945
3945
  data: {
3946
3946
  name: n,
@@ -3950,7 +3950,7 @@ var ho = new he("error", "errors"), go = class extends T {
3950
3950
  details: t.isDirectory ? "Directory containing files and subdirectories" : "File"
3951
3951
  });
3952
3952
  }
3953
- }, bo = class extends T {
3953
+ }, bo = class extends w {
3954
3954
  title = "Tables";
3955
3955
  mentionPrefix = "@";
3956
3956
  contextType = "data";
@@ -3980,7 +3980,7 @@ var ho = new he("error", "errors"), go = class extends T {
3980
3980
  l += `${t}\n`;
3981
3981
  }
3982
3982
  }
3983
- return D({
3983
+ return E({
3984
3984
  type: this.contextType,
3985
3985
  data: {
3986
3986
  name: o,
@@ -3995,12 +3995,12 @@ var ho = new he("error", "errors"), go = class extends T {
3995
3995
  label: `@${t}`,
3996
3996
  displayLabel: t,
3997
3997
  detail: n.source === "memory" ? "in-memory" : n.source,
3998
- boost: n.source_type === "local" ? b.LOCAL_TABLE : b.REMOTE_TABLE,
3999
- type: Ee(n),
3998
+ boost: n.source_type === "local" ? S.LOCAL_TABLE : S.REMOTE_TABLE,
3999
+ type: ue(n),
4000
4000
  apply: `@${t}`,
4001
4001
  section: {
4002
- name: Ee(n) === "dataframe" ? "Dataframe" : "Table",
4003
- rank: x.TABLE.rank
4002
+ name: ue(n) === "dataframe" ? "Dataframe" : "Table",
4003
+ rank: O.TABLE.rank
4004
4004
  },
4005
4005
  info: () => this.createTableInfoElement(t, n)
4006
4006
  };
@@ -4058,7 +4058,7 @@ var ho = new he("error", "errors"), go = class extends T {
4058
4058
  return e.classList.add("text-xs", "px-1.5", "py-0.5", "rounded-full", "font-medium", ...t.split(" ")), e;
4059
4059
  }
4060
4060
  }
4061
- }, xo = class extends T {
4061
+ }, xo = class extends w {
4062
4062
  title = "Variables";
4063
4063
  mentionPrefix = "@";
4064
4064
  contextType = "variable";
@@ -4085,13 +4085,13 @@ var ho = new he("error", "errors"), go = class extends T {
4085
4085
  displayLabel: n.name,
4086
4086
  detail: n.dataType ?? "",
4087
4087
  type: this.contextType,
4088
- section: x.VARIABLE,
4089
- info: () => ue(n)
4088
+ section: O.VARIABLE,
4089
+ info: () => ae(n)
4090
4090
  };
4091
4091
  }
4092
4092
  formatContext(e) {
4093
4093
  let { data: t } = e, { variable: n } = t;
4094
- return D({
4094
+ return E({
4095
4095
  type: this.contextType,
4096
4096
  data: {
4097
4097
  name: n.name,
@@ -4104,11 +4104,11 @@ var ho = new he("error", "errors"), go = class extends T {
4104
4104
  //#endregion
4105
4105
  //#region src/core/ai/context/context.ts
4106
4106
  function So(e) {
4107
- let t = e.get(re), n = e.get(ce), r = e.get(ye);
4108
- return new C().register(new bo(n)).register(new xo(r, n)).register(new go(e)).register(new oo(e)).register(new y(t.connectionsMap, n));
4107
+ let t = e.get(se), n = e.get(ie), r = e.get(me);
4108
+ return new C().register(new bo(n)).register(new xo(r, n)).register(new go(e)).register(new oo(e)).register(new T(t.connectionsMap, n));
4109
4109
  }
4110
4110
  function Co() {
4111
- return new yo(ie());
4111
+ return new yo(de());
4112
4112
  }
4113
4113
  //#endregion
4114
4114
  //#region src/components/editor/ai/completion-utils.ts
@@ -4140,7 +4140,7 @@ function Eo(e) {
4140
4140
  //#endregion
4141
4141
  //#region src/components/chat/chat-components.tsx
4142
4142
  var Do = (e) => {
4143
- let t = (0, N.c)(6), { attachment: n } = e;
4143
+ let t = (0, M.c)(6), { attachment: n } = e;
4144
4144
  if (n.mediaType?.startsWith("image/")) {
4145
4145
  let e = n.filename || "Attachment", r;
4146
4146
  return t[0] !== n.url || t[1] !== e ? (r = /* @__PURE__ */ (0, J.jsx)("img", {
@@ -4157,7 +4157,7 @@ var Do = (e) => {
4157
4157
  children: [r, i]
4158
4158
  }), t[4] = i, t[5] = a), a;
4159
4159
  }, Oo = (e) => {
4160
- let t = (0, N.c)(15), { icon: n, title: r, subtitle: i, href: a } = e, o;
4160
+ let t = (0, M.c)(15), { icon: n, title: r, subtitle: i, href: a } = e, o;
4161
4161
  t[0] === r ? o = t[1] : (o = /* @__PURE__ */ (0, J.jsx)("span", {
4162
4162
  className: "truncate font-medium",
4163
4163
  children: r
@@ -4196,12 +4196,12 @@ var Do = (e) => {
4196
4196
  children: l
4197
4197
  }), t[12] = l, t[13] = u, t[14] = d) : d = t[14], d;
4198
4198
  }, ko = (e) => {
4199
- let t = (0, N.c)(13), { reasoning: n, index: r, isStreaming: i } = e, a = r === void 0 ? 0 : r, o = i !== void 0 && i, [s, c] = q.useState("");
4199
+ let t = (0, M.c)(13), { reasoning: n, index: r, isStreaming: i } = e, a = r === void 0 ? 0 : r, o = i !== void 0 && i, [s, c] = q.useState("");
4200
4200
  if (!n && !o) return null;
4201
4201
  let l = o ? "reasoning" : s, u;
4202
- t[0] === Symbol.for("react.memo_cache_sentinel") ? (u = /* @__PURE__ */ (0, J.jsx)(zt, { className: "h-3 w-3" }), t[0] = u) : u = t[0];
4202
+ t[0] === Symbol.for("react.memo_cache_sentinel") ? (u = /* @__PURE__ */ (0, J.jsx)(Bt, { className: "h-3 w-3" }), t[0] = u) : u = t[0];
4203
4203
  let d = o ? "Thinking" : "View reasoning", f = n.length > 0 && ` (${n.length} chars)`, p;
4204
- t[1] !== d || t[2] !== f ? (p = /* @__PURE__ */ (0, J.jsx)(j, {
4204
+ t[1] !== d || t[2] !== f ? (p = /* @__PURE__ */ (0, J.jsx)(x, {
4205
4205
  className: "text-xs text-muted-foreground hover:bg-muted/50 px-2 py-1 h-auto rounded-sm [&[data-state=open]>svg]:rotate-180",
4206
4206
  children: /* @__PURE__ */ (0, J.jsxs)("span", {
4207
4207
  className: "flex items-center gap-2",
@@ -4213,24 +4213,24 @@ var Do = (e) => {
4213
4213
  })
4214
4214
  }), t[1] = d, t[2] = f, t[3] = p) : p = t[3];
4215
4215
  let m;
4216
- t[4] === n ? m = t[5] : (m = /* @__PURE__ */ (0, J.jsx)(_, {
4216
+ t[4] === n ? m = t[5] : (m = /* @__PURE__ */ (0, J.jsx)(A, {
4217
4217
  className: "pb-2 px-2",
4218
4218
  children: /* @__PURE__ */ (0, J.jsx)("div", {
4219
4219
  className: "bg-muted/30 border border-muted/50 rounded-md p-3 italic text-muted-foreground/90 relative",
4220
4220
  children: /* @__PURE__ */ (0, J.jsx)("div", {
4221
4221
  className: "pr-6",
4222
- children: /* @__PURE__ */ (0, J.jsx)(O, { content: n })
4222
+ children: /* @__PURE__ */ (0, J.jsx)(k, { content: n })
4223
4223
  })
4224
4224
  })
4225
4225
  }), t[4] = n, t[5] = m);
4226
4226
  let h;
4227
- t[6] !== p || t[7] !== m ? (h = /* @__PURE__ */ (0, J.jsxs)(A, {
4227
+ t[6] !== p || t[7] !== m ? (h = /* @__PURE__ */ (0, J.jsxs)(ne, {
4228
4228
  value: "reasoning",
4229
4229
  className: "border-0",
4230
4230
  children: [p, m]
4231
4231
  }), t[6] = p, t[7] = m, t[8] = h) : h = t[8];
4232
4232
  let g;
4233
- return t[9] !== a || t[10] !== l || t[11] !== h ? (g = /* @__PURE__ */ (0, J.jsx)(S, {
4233
+ return t[9] !== a || t[10] !== l || t[11] !== h ? (g = /* @__PURE__ */ (0, J.jsx)(y, {
4234
4234
  type: "single",
4235
4235
  collapsible: !0,
4236
4236
  className: "w-full mb-2",
@@ -4247,7 +4247,7 @@ function Ao(e) {
4247
4247
  //#endregion
4248
4248
  //#region src/components/chat/tool-call/tool-args.tsx
4249
4249
  var jo = (e) => {
4250
- let t = (0, N.c)(9), { input: n, label: r } = e, i = r === void 0 ? "Tool Request" : r;
4250
+ let t = (0, M.c)(9), { input: n, label: r } = e, i = r === void 0 ? "Tool Request" : r;
4251
4251
  if (n == null) return null;
4252
4252
  let a;
4253
4253
  t[0] === i ? a = t[1] : (a = /* @__PURE__ */ (0, J.jsx)("h3", {
@@ -4267,12 +4267,12 @@ var jo = (e) => {
4267
4267
  children: [a, s]
4268
4268
  }), t[6] = a, t[7] = s, t[8] = c) : c = t[8], c;
4269
4269
  }, Mo = (e) => {
4270
- let t = (0, N.c)(27), { toolName: n, input: r, approval: o, onApprove: s, className: c } = e, l;
4270
+ let t = (0, M.c)(27), { toolName: n, input: r, approval: o, onApprove: s, className: c } = e, l;
4271
4271
  t[0] === c ? l = t[1] : (l = i("rounded-md border border-(--amber-6) bg-(--amber-2) p-3 space-y-3", c), t[0] = c, t[1] = l);
4272
4272
  let u;
4273
4273
  t[2] === n ? u = t[3] : (u = Ao(n), t[2] = n, t[3] = u);
4274
4274
  let d = `Approval required for ${u}`, f;
4275
- t[4] === Symbol.for("react.memo_cache_sentinel") ? (f = /* @__PURE__ */ (0, J.jsx)(Kt, { className: "h-4 w-4 text-(--amber-11) mt-0.5 shrink-0" }), t[4] = f) : f = t[4];
4275
+ t[4] === Symbol.for("react.memo_cache_sentinel") ? (f = /* @__PURE__ */ (0, J.jsx)(qt, { className: "h-4 w-4 text-(--amber-11) mt-0.5 shrink-0" }), t[4] = f) : f = t[4];
4276
4276
  let p;
4277
4277
  t[5] === Symbol.for("react.memo_cache_sentinel") ? (p = /* @__PURE__ */ (0, J.jsx)("span", {
4278
4278
  className: "font-semibold",
@@ -4333,7 +4333,7 @@ var jo = (e) => {
4333
4333
  ]
4334
4334
  }), t[21] = l, t[22] = y, t[23] = d, t[24] = h, t[25] = g, t[26] = b) : b = t[26], b;
4335
4335
  }, No = (e) => {
4336
- let t = (0, N.c)(28), { toolName: n, input: r, errorText: a, isLive: o, className: s } = e, [c, l] = q.useState(o), u = q.useRef(o), d, f;
4336
+ let t = (0, M.c)(28), { toolName: n, input: r, errorText: a, isLive: o, className: s } = e, [c, l] = q.useState(o), u = q.useRef(o), d, f;
4337
4337
  t[0] === o ? (d = t[1], f = t[2]) : (d = () => {
4338
4338
  u.current && !o && l(!1), u.current = o;
4339
4339
  }, f = [o], t[0] = o, t[1] = d, t[2] = f), q.useEffect(d, f);
@@ -4342,7 +4342,7 @@ var jo = (e) => {
4342
4342
  let m;
4343
4343
  t[5] === Symbol.for("react.memo_cache_sentinel") ? (m = () => l(Po), t[5] = m) : m = t[5];
4344
4344
  let h;
4345
- t[6] === Symbol.for("react.memo_cache_sentinel") ? (h = /* @__PURE__ */ (0, J.jsx)(me, { className: "h-3.5 w-3.5 shrink-0" }), t[6] = h) : h = t[6];
4345
+ t[6] === Symbol.for("react.memo_cache_sentinel") ? (h = /* @__PURE__ */ (0, J.jsx)(pe, { className: "h-3.5 w-3.5 shrink-0" }), t[6] = h) : h = t[6];
4346
4346
  let g;
4347
4347
  t[7] === Symbol.for("react.memo_cache_sentinel") ? (g = /* @__PURE__ */ (0, J.jsx)("span", {
4348
4348
  className: "font-semibold",
@@ -4403,15 +4403,15 @@ function Po(e) {
4403
4403
  function Fo(e) {
4404
4404
  return e == null || typeof e == "object" && mt(e);
4405
4405
  }
4406
- var Io = $e({
4407
- status: Xe().default("success"),
4408
- auth_required: qe().default(!1),
4409
- action_url: lt().optional(),
4410
- next_steps: lt().optional(),
4411
- meta: lt().optional(),
4412
- message: Xe().nullish()
4406
+ var Io = Ke({
4407
+ status: Ze().default("success"),
4408
+ auth_required: ct().default(!1),
4409
+ action_url: nt().optional(),
4410
+ next_steps: nt().optional(),
4411
+ meta: nt().optional(),
4412
+ message: Ze().nullish()
4413
4413
  }), Lo = (e) => {
4414
- let t = (0, N.c)(12), { data: n } = e, r;
4414
+ let t = (0, M.c)(12), { data: n } = e, r;
4415
4415
  if (t[0] !== n) {
4416
4416
  let { status: e, auth_required: i, action_url: a, meta: o, next_steps: s, message: c, ...l } = n, u;
4417
4417
  t[2] === Symbol.for("react.memo_cache_sentinel") ? (u = /* @__PURE__ */ (0, J.jsx)("h3", {
@@ -4439,7 +4439,7 @@ var Io = $e({
4439
4439
  let m;
4440
4440
  t[10] === c ? m = t[11] : (m = c && /* @__PURE__ */ (0, J.jsxs)("div", {
4441
4441
  className: "flex items-start gap-2",
4442
- children: [/* @__PURE__ */ (0, J.jsx)(ve, { className: "h-3 w-3 text-(--blue-11) mt-0.5 shrink-0" }), /* @__PURE__ */ (0, J.jsx)("div", {
4442
+ children: [/* @__PURE__ */ (0, J.jsx)(be, { className: "h-3 w-3 text-(--blue-11) mt-0.5 shrink-0" }), /* @__PURE__ */ (0, J.jsx)("div", {
4443
4443
  className: "text-xs text-foreground",
4444
4444
  children: c
4445
4445
  })]
@@ -4457,7 +4457,7 @@ var Io = $e({
4457
4457
  } else r = t[1];
4458
4458
  return r;
4459
4459
  }, Ro = (e) => {
4460
- let t = (0, N.c)(8), { result: n } = e, r;
4460
+ let t = (0, M.c)(8), { result: n } = e, r;
4461
4461
  t[0] === n ? r = t[1] : (r = Io.safeParse(n), t[0] = n, t[1] = r);
4462
4462
  let i = r;
4463
4463
  if (i.success) {
@@ -4498,30 +4498,30 @@ var Bo = {
4498
4498
  "input-available",
4499
4499
  "approval-responded"
4500
4500
  ]), Ho = (e) => {
4501
- let t = (0, N.c)(5), { state: n, interrupted: r } = e;
4501
+ let t = (0, M.c)(5), { state: n, interrupted: r } = e;
4502
4502
  if (r) {
4503
4503
  let e;
4504
- return t[0] === Symbol.for("react.memo_cache_sentinel") ? (e = /* @__PURE__ */ (0, J.jsx)(Vt, { className: "h-3 w-3 text-muted-foreground" }), t[0] = e) : e = t[0], e;
4504
+ return t[0] === Symbol.for("react.memo_cache_sentinel") ? (e = /* @__PURE__ */ (0, J.jsx)(Ht, { className: "h-3 w-3 text-muted-foreground" }), t[0] = e) : e = t[0], e;
4505
4505
  }
4506
4506
  switch (n) {
4507
4507
  case "input-streaming":
4508
4508
  case "input-available":
4509
4509
  case "approval-responded": {
4510
4510
  let e;
4511
- return t[1] === Symbol.for("react.memo_cache_sentinel") ? (e = /* @__PURE__ */ (0, J.jsx)(g, { className: "h-3 w-3 animate-spin" }), t[1] = e) : e = t[1], e;
4511
+ return t[1] === Symbol.for("react.memo_cache_sentinel") ? (e = /* @__PURE__ */ (0, J.jsx)(p, { className: "h-3 w-3 animate-spin" }), t[1] = e) : e = t[1], e;
4512
4512
  }
4513
4513
  case "output-available": {
4514
4514
  let e;
4515
- return t[2] === Symbol.for("react.memo_cache_sentinel") ? (e = /* @__PURE__ */ (0, J.jsx)(Bt, { className: "h-3 w-3 text-(--grass-11)" }), t[2] = e) : e = t[2], e;
4515
+ return t[2] === Symbol.for("react.memo_cache_sentinel") ? (e = /* @__PURE__ */ (0, J.jsx)(Vt, { className: "h-3 w-3 text-(--grass-11)" }), t[2] = e) : e = t[2], e;
4516
4516
  }
4517
4517
  case "output-denied": {
4518
4518
  let e;
4519
- return t[3] === Symbol.for("react.memo_cache_sentinel") ? (e = /* @__PURE__ */ (0, J.jsx)(Rt, { className: "h-3 w-3 text-muted-foreground" }), t[3] = e) : e = t[3], e;
4519
+ return t[3] === Symbol.for("react.memo_cache_sentinel") ? (e = /* @__PURE__ */ (0, J.jsx)(zt, { className: "h-3 w-3 text-muted-foreground" }), t[3] = e) : e = t[3], e;
4520
4520
  }
4521
4521
  default: {
4522
4522
  Oe(n);
4523
4523
  let e;
4524
- return t[4] === Symbol.for("react.memo_cache_sentinel") ? (e = /* @__PURE__ */ (0, J.jsx)(h, { className: "h-3 w-3" }), t[4] = e) : e = t[4], e;
4524
+ return t[4] === Symbol.for("react.memo_cache_sentinel") ? (e = /* @__PURE__ */ (0, J.jsx)(_, { className: "h-3 w-3" }), t[4] = e) : e = t[4], e;
4525
4525
  }
4526
4526
  }
4527
4527
  };
@@ -4536,41 +4536,41 @@ function Uo(e) {
4536
4536
  }
4537
4537
  }
4538
4538
  var Wo = (e) => {
4539
- let t = (0, N.c)(34), { toolName: n, state: r, input: a, result: o, approval: s, index: c, className: l, isActive: u } = e, d = c === void 0 ? 0 : c, f = u === void 0 || u, p;
4539
+ let t = (0, M.c)(34), { toolName: n, state: r, input: a, result: o, approval: s, index: c, className: l, isActive: u } = e, d = c === void 0 ? 0 : c, f = u === void 0 || u, p;
4540
4540
  t[0] !== f || t[1] !== r ? (p = !f && Vo.has(r), t[0] = f, t[1] = r, t[2] = p) : p = t[2];
4541
4541
  let m = p, h = `tool-${d}`, g;
4542
4542
  t[3] === l ? g = t[4] : (g = i("w-full", l), t[3] = l, t[4] = g);
4543
+ let _;
4544
+ t[5] !== m || t[6] !== r ? (_ = i("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", m ? "text-muted-foreground" : Uo(r)), t[5] = m, t[6] = r, t[7] = _) : _ = t[7];
4543
4545
  let v;
4544
- t[5] !== m || t[6] !== r ? (v = i("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", m ? "text-muted-foreground" : Uo(r)), t[5] = m, t[6] = r, t[7] = v) : v = t[7];
4545
- let y;
4546
- t[8] !== m || t[9] !== r ? (y = /* @__PURE__ */ (0, J.jsx)(Ho, {
4546
+ t[8] !== m || t[9] !== r ? (v = /* @__PURE__ */ (0, J.jsx)(Ho, {
4547
4547
  state: r,
4548
4548
  interrupted: m
4549
- }), t[8] = m, t[9] = r, t[10] = y) : y = t[10];
4550
- let b = m ? "Interrupted" : Bo[r], x;
4551
- t[11] === n ? x = t[12] : (x = Ao(n), t[11] = n, t[12] = x);
4549
+ }), t[8] = m, t[9] = r, t[10] = v) : v = t[10];
4550
+ let b = m ? "Interrupted" : Bo[r], S;
4551
+ t[11] === n ? S = t[12] : (S = Ao(n), t[11] = n, t[12] = S);
4552
4552
  let C;
4553
- t[13] === x ? C = t[14] : (C = /* @__PURE__ */ (0, J.jsx)("code", {
4553
+ t[13] === S ? C = t[14] : (C = /* @__PURE__ */ (0, J.jsx)("code", {
4554
4554
  className: "font-mono text-xs",
4555
- children: x
4556
- }), t[13] = x, t[14] = C);
4555
+ children: S
4556
+ }), t[13] = S, t[14] = C);
4557
4557
  let w;
4558
- t[15] !== C || t[16] !== y || t[17] !== b ? (w = /* @__PURE__ */ (0, J.jsxs)("span", {
4558
+ t[15] !== C || t[16] !== v || t[17] !== b ? (w = /* @__PURE__ */ (0, J.jsxs)("span", {
4559
4559
  className: "flex items-center gap-1",
4560
4560
  children: [
4561
- y,
4561
+ v,
4562
4562
  b,
4563
4563
  ":",
4564
4564
  C
4565
4565
  ]
4566
- }), t[15] = C, t[16] = y, t[17] = b, t[18] = w) : w = t[18];
4566
+ }), t[15] = C, t[16] = v, t[17] = b, t[18] = w) : w = t[18];
4567
4567
  let T;
4568
- t[19] !== w || t[20] !== v ? (T = /* @__PURE__ */ (0, J.jsx)(j, {
4569
- className: v,
4568
+ t[19] !== w || t[20] !== _ ? (T = /* @__PURE__ */ (0, J.jsx)(x, {
4569
+ className: _,
4570
4570
  children: w
4571
- }), t[19] = w, t[20] = v, t[21] = T) : T = t[21];
4571
+ }), t[19] = w, t[20] = _, t[21] = T) : T = t[21];
4572
4572
  let E;
4573
- t[22] !== s || t[23] !== a || t[24] !== o || t[25] !== r ? (E = /* @__PURE__ */ (0, J.jsx)(_, {
4573
+ t[22] !== s || t[23] !== a || t[24] !== o || t[25] !== r ? (E = /* @__PURE__ */ (0, J.jsx)(A, {
4574
4574
  className: "py-2 px-2",
4575
4575
  children: /* @__PURE__ */ (0, J.jsx)(Go, {
4576
4576
  state: r,
@@ -4580,20 +4580,20 @@ var Wo = (e) => {
4580
4580
  })
4581
4581
  }), t[22] = s, t[23] = a, t[24] = o, t[25] = r, t[26] = E) : E = t[26];
4582
4582
  let D;
4583
- t[27] !== T || t[28] !== E ? (D = /* @__PURE__ */ (0, J.jsxs)(A, {
4583
+ t[27] !== T || t[28] !== E ? (D = /* @__PURE__ */ (0, J.jsxs)(ne, {
4584
4584
  value: "tool-call",
4585
4585
  className: "border-0",
4586
4586
  children: [T, E]
4587
4587
  }), t[27] = T, t[28] = E, t[29] = D) : D = t[29];
4588
4588
  let O;
4589
- return t[30] !== D || t[31] !== h || t[32] !== g ? (O = /* @__PURE__ */ (0, J.jsx)(S, {
4589
+ return t[30] !== D || t[31] !== h || t[32] !== g ? (O = /* @__PURE__ */ (0, J.jsx)(y, {
4590
4590
  type: "single",
4591
4591
  collapsible: !0,
4592
4592
  className: g,
4593
4593
  children: D
4594
4594
  }, h), t[30] = D, t[31] = h, t[32] = g, t[33] = O) : O = t[33], O;
4595
4595
  }, Go = (e) => {
4596
- let t = (0, N.c)(16), { state: n, input: r, result: i, approval: a } = e;
4596
+ let t = (0, M.c)(16), { state: n, input: r, result: i, approval: a } = e;
4597
4597
  switch (n) {
4598
4598
  case "input-streaming":
4599
4599
  case "input-available":
@@ -4629,7 +4629,7 @@ var Wo = (e) => {
4629
4629
  default: return Oe(n), null;
4630
4630
  }
4631
4631
  }, Ko = (e) => {
4632
- let t = (0, N.c)(27), { toolName: n, state: r, result: i, errorText: a, input: o, approval: s, onApprove: c, index: l, className: u, isLive: d, isActive: f } = e, p = d === void 0 || d, m = f === void 0 || f;
4632
+ let t = (0, M.c)(27), { toolName: n, state: r, result: i, errorText: a, input: o, approval: s, onApprove: c, index: l, className: u, isLive: d, isActive: f } = e, p = d === void 0 || d, m = f === void 0 || f;
4633
4633
  switch (r) {
4634
4634
  case "approval-requested": {
4635
4635
  if (s != null && c != null) {
@@ -4699,7 +4699,7 @@ var Wo = (e) => {
4699
4699
  }, s);
4700
4700
  if (Yo(o)) return r.debug("Found data part", o), null;
4701
4701
  switch (o.type) {
4702
- case "text": return o.text.includes("<marimo-") ? /* @__PURE__ */ (0, J.jsx)(q.Fragment, { children: u({ html: o.text }) }, s) : /* @__PURE__ */ (0, J.jsx)(O, { content: o.text }, s);
4702
+ case "text": return o.text.includes("<marimo-") ? /* @__PURE__ */ (0, J.jsx)(q.Fragment, { children: f({ html: o.text }) }, s) : /* @__PURE__ */ (0, J.jsx)(k, { content: o.text }, s);
4703
4703
  case "reasoning": return /* @__PURE__ */ (0, J.jsx)(ko, {
4704
4704
  reasoning: o.text,
4705
4705
  index: s,
@@ -4723,12 +4723,12 @@ var Wo = (e) => {
4723
4723
  isActive: i
4724
4724
  }, s);
4725
4725
  case "source-document": return /* @__PURE__ */ (0, J.jsx)(Oo, {
4726
- icon: /* @__PURE__ */ (0, J.jsx)(we, { className: "h-3 w-3 shrink-0" }),
4726
+ icon: /* @__PURE__ */ (0, J.jsx)(Ce, { className: "h-3 w-3 shrink-0" }),
4727
4727
  title: o.title,
4728
4728
  subtitle: o.filename
4729
4729
  }, s);
4730
4730
  case "source-url": return /* @__PURE__ */ (0, J.jsx)(Oo, {
4731
- icon: /* @__PURE__ */ (0, J.jsx)(fe, { className: "h-3 w-3 shrink-0" }),
4731
+ icon: /* @__PURE__ */ (0, J.jsx)(ve, { className: "h-3 w-3 shrink-0" }),
4732
4732
  title: o.title ?? o.url,
4733
4733
  subtitle: o.title ? o.url : void 0,
4734
4734
  href: o.url
@@ -4751,11 +4751,11 @@ function Yo(e) {
4751
4751
  //#endregion
4752
4752
  //#region ../node_modules/.pnpm/@marimo-team+codemirror-ai@0.3.10_@codemirror+state@6.7.6_@codemirror+view@6.43.13/node_modules/@marimo-team/codemirror-ai/dist/utils/facet.js
4753
4753
  function Xo(e) {
4754
- return yt.define({ combine: (t) => t[0] ?? e });
4754
+ return jt.define({ combine: (t) => t[0] ?? e });
4755
4755
  }
4756
4756
  //#endregion
4757
4757
  //#region ../node_modules/.pnpm/@marimo-team+codemirror-ai@0.3.10_@codemirror+state@6.7.6_@codemirror+view@6.43.13/node_modules/@marimo-team/codemirror-ai/dist/prompt-history/extension.js
4758
- var Zo = Xo({}), Qo = xt.define(), $o = xt.define(), es = 50, ts = kt.define({
4758
+ var Zo = Xo({}), Qo = bt.define(), $o = bt.define(), es = 50, ts = Dt.define({
4759
4759
  create() {
4760
4760
  return {
4761
4761
  prompts: [],
@@ -4814,7 +4814,7 @@ function is(e = {}) {
4814
4814
  navigationIndex: -1,
4815
4815
  originalText: ""
4816
4816
  })), Zo.of(t ?? {})];
4817
- return n && r.push(wt.of([{
4817
+ return n && r.push(At.of([{
4818
4818
  key: "ArrowUp",
4819
4819
  run: ns
4820
4820
  }, {
@@ -4823,8 +4823,8 @@ function is(e = {}) {
4823
4823
  }])), r;
4824
4824
  }
4825
4825
  //#endregion
4826
- //#region ../node_modules/.pnpm/@marimo-team+codemirror-mcp@0.1.7_@codemirror+autocomplete@6.20.3_@codemirror+state@6.7_153f5a1a0b175f1cd794f4fb73845d3a/node_modules/@marimo-team/codemirror-mcp/dist/state.js
4827
- var as = xt.define(), Q = kt.define({
4826
+ //#region ../node_modules/.pnpm/@marimo-team+codemirror-mcp@0.1.7_@codemirror+autocomplete@6.20.3_@codemirror+state@6.7_6b342e94e942eed410acc909cdad6bca/node_modules/@marimo-team/codemirror-mcp/dist/state.js
4827
+ var as = bt.define(), Q = Dt.define({
4828
4828
  create() {
4829
4829
  return /* @__PURE__ */ new Map();
4830
4830
  },
@@ -4836,7 +4836,7 @@ var as = xt.define(), Q = kt.define({
4836
4836
  }
4837
4837
  return r;
4838
4838
  }
4839
- }), os = kt.define({
4839
+ }), os = Dt.define({
4840
4840
  create() {
4841
4841
  return {
4842
4842
  onResourceClick: void 0,
@@ -4848,8 +4848,8 @@ var as = xt.define(), Q = kt.define({
4848
4848
  update(e) {
4849
4849
  return e;
4850
4850
  }
4851
- }), ss = xt.define();
4852
- kt.define({
4851
+ }), ss = bt.define();
4852
+ Dt.define({
4853
4853
  create() {
4854
4854
  return /* @__PURE__ */ new Map();
4855
4855
  },
@@ -4863,7 +4863,7 @@ kt.define({
4863
4863
  }
4864
4864
  });
4865
4865
  //#endregion
4866
- //#region ../node_modules/.pnpm/@marimo-team+codemirror-mcp@0.1.7_@codemirror+autocomplete@6.20.3_@codemirror+state@6.7_153f5a1a0b175f1cd794f4fb73845d3a/node_modules/@marimo-team/codemirror-mcp/dist/resources/completion.js
4866
+ //#region ../node_modules/.pnpm/@marimo-team+codemirror-mcp@0.1.7_@codemirror+autocomplete@6.20.3_@codemirror+state@6.7_6b342e94e942eed410acc909cdad6bca/node_modules/@marimo-team/codemirror-mcp/dist/resources/completion.js
4867
4867
  var cs = (e, t) => async (n) => {
4868
4868
  let r = n.matchBefore(/@(\w+)?/);
4869
4869
  if (!r || r.from === r.to && !n.explicit) return null;
@@ -4896,8 +4896,8 @@ function $(e) {
4896
4896
  return e.matchAll(new RegExp(ls.source, "g"));
4897
4897
  }
4898
4898
  //#endregion
4899
- //#region ../node_modules/.pnpm/@marimo-team+codemirror-mcp@0.1.7_@codemirror+autocomplete@6.20.3_@codemirror+state@6.7_153f5a1a0b175f1cd794f4fb73845d3a/node_modules/@marimo-team/codemirror-mcp/dist/resources/decoration.js
4900
- var us = class extends Dt {
4899
+ //#region ../node_modules/.pnpm/@marimo-team+codemirror-mcp@0.1.7_@codemirror+autocomplete@6.20.3_@codemirror+state@6.7_6b342e94e942eed410acc909cdad6bca/node_modules/@marimo-team/codemirror-mcp/dist/resources/decoration.js
4900
+ var us = class extends wt {
4901
4901
  resource;
4902
4902
  view;
4903
4903
  constructor(e, t) {
@@ -4918,7 +4918,7 @@ var us = class extends Dt {
4918
4918
  e.preventDefault(), e.stopPropagation(), i(this.resource);
4919
4919
  }), e;
4920
4920
  }
4921
- }, ds = class extends Dt {
4921
+ }, ds = class extends wt {
4922
4922
  uri;
4923
4923
  view;
4924
4924
  constructor(e, t) {
@@ -4938,12 +4938,12 @@ function fs(e) {
4938
4938
  let a = e.state.doc.sliceString(r, i);
4939
4939
  for (let i of $(a)) {
4940
4940
  let a = r + i.index, o = i[0].slice(1), s = t.get(o);
4941
- s ? n.push(Ct.replace({ widget: new us(s, e) }).range(a, a + i[0].length)) : n.push(Ct.replace({ widget: new ds(o, e) }).range(a, a + i[0].length));
4941
+ s ? n.push(Et.replace({ widget: new us(s, e) }).range(a, a + i[0].length)) : n.push(Et.replace({ widget: new ds(o, e) }).range(a, a + i[0].length));
4942
4942
  }
4943
4943
  }
4944
- return Ct.set(n);
4944
+ return Et.set(n);
4945
4945
  }
4946
- var ps = Ot.fromClass(class {
4946
+ var ps = kt.fromClass(class {
4947
4947
  decorations;
4948
4948
  constructor(e) {
4949
4949
  this.decorations = fs(e);
@@ -4953,7 +4953,7 @@ var ps = Ot.fromClass(class {
4953
4953
  }
4954
4954
  }, { decorations: (e) => e.decorations });
4955
4955
  //#endregion
4956
- //#region ../node_modules/.pnpm/@marimo-team+codemirror-mcp@0.1.7_@codemirror+autocomplete@6.20.3_@codemirror+state@6.7_153f5a1a0b175f1cd794f4fb73845d3a/node_modules/@marimo-team/codemirror-mcp/dist/resources/hover.js
4956
+ //#region ../node_modules/.pnpm/@marimo-team+codemirror-mcp@0.1.7_@codemirror+autocomplete@6.20.3_@codemirror+state@6.7_6b342e94e942eed410acc909cdad6bca/node_modules/@marimo-team/codemirror-mcp/dist/resources/hover.js
4957
4957
  function ms(e) {
4958
4958
  let t = document.createElement("div");
4959
4959
  t.className = "cm-tooltip-cursor";
@@ -4983,7 +4983,7 @@ function hs(e, t, n, r = 0) {
4983
4983
  return null;
4984
4984
  }
4985
4985
  function gs(e) {
4986
- return Et((t, n) => {
4986
+ return Ot((t, n) => {
4987
4987
  let { from: r, text: i } = t.state.doc.lineAt(n), a = hs(i, n, t.state.field(Q), r);
4988
4988
  return a ? {
4989
4989
  pos: a.start,
@@ -4996,7 +4996,7 @@ function gs(e) {
4996
4996
  });
4997
4997
  }
4998
4998
  //#endregion
4999
- //#region ../node_modules/.pnpm/@marimo-team+codemirror-mcp@0.1.7_@codemirror+autocomplete@6.20.3_@codemirror+state@6.7_153f5a1a0b175f1cd794f4fb73845d3a/node_modules/@marimo-team/codemirror-mcp/dist/resources/input-filter.js
4999
+ //#region ../node_modules/.pnpm/@marimo-team+codemirror-mcp@0.1.7_@codemirror+autocomplete@6.20.3_@codemirror+state@6.7_6b342e94e942eed410acc909cdad6bca/node_modules/@marimo-team/codemirror-mcp/dist/resources/input-filter.js
5000
5000
  function _s(e, t) {
5001
5001
  let n = e.field(Q), r = e.doc, i = r.lineAt(t), a = r.sliceString(i.from, i.to), o = Array.from($(a));
5002
5002
  if (o.length === 0) return null;
@@ -5053,8 +5053,8 @@ function xs(e, t) {
5053
5053
  }
5054
5054
  return null;
5055
5055
  }
5056
- var Ss = Tt.transactionFilter.of((e) => {
5057
- let t = e.annotation(St.userEvent);
5056
+ var Ss = xt.transactionFilter.of((e) => {
5057
+ let t = e.annotation(Tt.userEvent);
5058
5058
  if (!t) return e;
5059
5059
  let n = e.startState.selection.main;
5060
5060
  if (!n.empty) return e;
@@ -5236,11 +5236,11 @@ function Os(e, t) {
5236
5236
  };
5237
5237
  }
5238
5238
  function ks(e, t = {}) {
5239
- return Ot.fromClass(Os(e, t));
5239
+ return kt.fromClass(Os(e, t));
5240
5240
  }
5241
5241
  //#endregion
5242
- //#region ../node_modules/.pnpm/@marimo-team+codemirror-mcp@0.1.7_@codemirror+autocomplete@6.20.3_@codemirror+state@6.7_153f5a1a0b175f1cd794f4fb73845d3a/node_modules/@marimo-team/codemirror-mcp/dist/theme.js
5243
- var As = vt.baseTheme({
5242
+ //#region ../node_modules/.pnpm/@marimo-team+codemirror-mcp@0.1.7_@codemirror+autocomplete@6.20.3_@codemirror+state@6.7_6b342e94e942eed410acc909cdad6bca/node_modules/@marimo-team/codemirror-mcp/dist/theme.js
5243
+ var As = Ct.baseTheme({
5244
5244
  ".cm-resource-widget": {
5245
5245
  background: "light-dark(rgba(86,156,214,0.08),rgba(86,156,214,0.18))",
5246
5246
  borderRadius: "4px",
@@ -5273,10 +5273,10 @@ function Fs(e) {
5273
5273
  let { language: t, store: n, onAddFiles: i } = e, a = () => Ps(n);
5274
5274
  return [
5275
5275
  t.data.of({ autocomplete: cs(async () => a(), (e) => e.type === js ? Ns : So(n).getProvider(e.type)?.formatCompletion(e) || {}) }),
5276
- bt.high(wt.of([{
5276
+ St.high(At.of([{
5277
5277
  key: "Tab",
5278
5278
  preventDefault: !0,
5279
- run: (e) => jt(e)
5279
+ run: (e) => Mt(e)
5280
5280
  }])),
5281
5281
  _o.of({ addAttachment: (e) => i?.([e]) }),
5282
5282
  ...i ? [t.data.of({ autocomplete: Co().createCompletionSource() })] : [],
@@ -5301,16 +5301,16 @@ function Fs(e) {
5301
5301
  }
5302
5302
  function Is(e) {
5303
5303
  let t = document.createElement("div");
5304
- return t.innerHTML = e, { dom: t };
5304
+ return t.textContent = e, { dom: t };
5305
5305
  }
5306
- Se("marimo:ai-language", "python", de);
5307
- var Ls = "marimo:ai-prompt-history", Rs = new se(nt(Xe()), () => []), zs = (e) => {
5308
- let t = (0, N.c)(35), { value: n, placeholder: r, inputRef: a, className: o, onChange: s, onSubmit: c, onKeyDown: l, onClose: u, onAddFiles: d, additionalCompletions: f, maxHeight: p } = e, m = c, h = u, g = gt(), { theme: _ } = _t(), v;
5306
+ ht("marimo:ai-language", "python", he);
5307
+ var Ls = "marimo:ai-prompt-history", Rs = new xe(Je(Ze()), () => []), zs = (e) => {
5308
+ let t = (0, M.c)(35), { value: n, placeholder: r, inputRef: a, className: o, onChange: s, onSubmit: c, onKeyDown: l, onClose: u, onAddFiles: d, additionalCompletions: f, maxHeight: p } = e, m = c, h = u, g = gt(), { theme: _ } = vt(), v;
5309
5309
  t[0] === f ? v = t[1] : (v = (e) => f ? wo([f.triggerCompletionRegex], f.completions)(e) : null, t[0] = f, t[1] = v);
5310
- let y = ht(v), b, x, S, C;
5310
+ let y = _t(v), b, x, S, C;
5311
5311
  if (t[2] !== y || t[3] !== d || t[4] !== g) {
5312
- let e = Pt();
5313
- t[9] === Symbol.for("react.memo_cache_sentinel") ? (b = Nt({}), t[9] = b) : b = t[9], x = e, S = Fs({
5312
+ let e = Ft();
5313
+ t[9] === Symbol.for("react.memo_cache_sentinel") ? (b = Pt({}), t[9] = b) : b = t[9], x = e, S = Fs({
5314
5314
  language: e.language,
5315
5315
  store: g,
5316
5316
  onAddFiles: d
@@ -5322,9 +5322,9 @@ var Ls = "marimo:ai-prompt-history", Rs = new se(nt(Xe()), () => []), zs = (e) =
5322
5322
  save: Vs
5323
5323
  } }), t[10] = w) : w = t[10];
5324
5324
  let T;
5325
- t[11] === Symbol.for("react.memo_cache_sentinel") ? (T = Ft(), t[11] = T) : T = t[11];
5325
+ t[11] === Symbol.for("react.memo_cache_sentinel") ? (T = It(), t[11] = T) : T = t[11];
5326
5326
  let E;
5327
- t[12] === m ? E = t[13] : (E = bt.highest(wt.of([{
5327
+ t[12] === m ? E = t[13] : (E = St.highest(At.of([{
5328
5328
  preventDefault: !0,
5329
5329
  stopPropagation: !0,
5330
5330
  any: (e, t) => {
@@ -5348,7 +5348,7 @@ var Ls = "marimo:ai-prompt-history", Rs = new se(nt(Xe()), () => []), zs = (e) =
5348
5348
  }
5349
5349
  }])), t[12] = m, t[13] = E);
5350
5350
  let D;
5351
- t[14] === h ? D = t[15] : (D = wt.of([{
5351
+ t[14] === h ? D = t[15] : (D = At.of([{
5352
5352
  key: "Escape",
5353
5353
  preventDefault: !0,
5354
5354
  stopPropagation: !0,
@@ -5361,17 +5361,17 @@ var Ls = "marimo:ai-prompt-history", Rs = new se(nt(Xe()), () => []), zs = (e) =
5361
5361
  S,
5362
5362
  C,
5363
5363
  w,
5364
- vt.lineWrapping,
5364
+ Ct.lineWrapping,
5365
5365
  T,
5366
5366
  E,
5367
5367
  D
5368
5368
  ], t[16] = b, t[17] = x, t[18] = S, t[19] = C, t[20] = E, t[21] = D, t[22] = O) : O = t[22];
5369
- let k = O, A;
5370
- t[23] === o ? A = t[24] : (A = i("flex-1 font-sans overflow-auto my-1", o), t[23] = o, t[24] = A);
5371
- let ee = _ === "dark" ? "dark" : "light", j = r || "Generate with AI, @ to include context", te;
5372
- return t[25] !== k || t[26] !== a || t[27] !== p || t[28] !== s || t[29] !== l || t[30] !== A || t[31] !== ee || t[32] !== j || t[33] !== n ? (te = /* @__PURE__ */ (0, J.jsx)(It, {
5369
+ let k = O, ee;
5370
+ t[23] === o ? ee = t[24] : (ee = i("flex-1 font-sans overflow-auto my-1", o), t[23] = o, t[24] = ee);
5371
+ let te = _ === "dark" ? "dark" : "light", A = r || "Generate with AI, @ to include context", ne;
5372
+ return t[25] !== k || t[26] !== a || t[27] !== p || t[28] !== s || t[29] !== l || t[30] !== ee || t[31] !== te || t[32] !== A || t[33] !== n ? (ne = /* @__PURE__ */ (0, J.jsx)(Lt, {
5373
5373
  ref: a,
5374
- className: A,
5374
+ className: ee,
5375
5375
  width: "100%",
5376
5376
  maxHeight: p,
5377
5377
  value: n,
@@ -5379,9 +5379,9 @@ var Ls = "marimo:ai-prompt-history", Rs = new se(nt(Xe()), () => []), zs = (e) =
5379
5379
  extensions: k,
5380
5380
  onChange: s,
5381
5381
  onKeyDown: l,
5382
- theme: ee,
5383
- placeholder: j
5384
- }), t[25] = k, t[26] = a, t[27] = p, t[28] = s, t[29] = l, t[30] = A, t[31] = ee, t[32] = j, t[33] = n, t[34] = te) : te = t[34], te;
5382
+ theme: te,
5383
+ placeholder: A
5384
+ }), t[25] = k, t[26] = a, t[27] = p, t[28] = s, t[29] = l, t[30] = ee, t[31] = te, t[32] = A, t[33] = n, t[34] = ne) : ne = t[34], ne;
5385
5385
  };
5386
5386
  function Bs() {
5387
5387
  return Rs.get(Ls);
@@ -5391,11 +5391,11 @@ function Vs(e) {
5391
5391
  }
5392
5392
  //#endregion
5393
5393
  //#region src/plugins/impl/chat/chat-ui.tsx
5394
- var Hs = f, Us = Qe({
5395
- type: Je("stream_chunk"),
5396
- message_id: Xe(),
5397
- content: lt().nullable().transform((e) => e),
5398
- is_final: qe().optional()
5394
+ var Hs = g, Us = tt({
5395
+ type: st("stream_chunk"),
5396
+ message_id: Ze(),
5397
+ content: nt().nullable().transform((e) => e),
5398
+ is_final: ct().optional()
5399
5399
  });
5400
5400
  function Ws(e, t) {
5401
5401
  let { controllerRef: n, activeRequestIdRef: i } = t, a = n.current;
@@ -5407,13 +5407,15 @@ function Ws(e, t) {
5407
5407
  }), "dropped-stale") : (e.content && a.enqueue(e.content), e.is_final ? (a.close(), n.current = null, i.current = null, "closed") : "enqueued");
5408
5408
  }
5409
5409
  var Gs = (e) => {
5410
- let [t, o] = (0, q.useState)(""), [s, c] = (0, q.useState)(e.config), [u, d] = (0, q.useState)(e.config), [f, p] = (0, q.useState)(void 0), h = (0, q.useRef)(null), g = (0, q.useRef)(null), _ = (0, q.useRef)(null), v = (0, q.useRef)(null);
5410
+ let [t, o] = (0, q.useState)(""), [s, c] = (0, q.useState)(e.config), [u, d] = (0, q.useState)(e.config), [f, p] = (0, q.useState)(void 0), m = (0, q.useRef)(null), h = (0, q.useRef)(null), g = (0, q.useRef)(null), _ = (0, q.useRef)(null);
5411
5411
  Object.keys(e.config).some((t) => e.config[t] !== u[t]) && (c(e.config), d(e.config));
5412
5412
  let y = (0, q.useRef)(s);
5413
- y.current = s;
5413
+ (0, q.useLayoutEffect)(() => {
5414
+ y.current = s;
5415
+ }, [s]);
5414
5416
  let b = (0, q.useRef)(null), x = (0, q.useRef)(null), S = (0, q.useRef)(null), [C, w] = (0, q.useState)(null), T = () => {
5415
5417
  S.current = null, w(null);
5416
- }, { data: D } = Lt(async () => (await e.get_chat_history({})).messages, []), O = e.value.length > 0 ? e.value : D, { messages: k, sendMessage: A, setMessages: ee, status: j, stop: te, error: M, regenerate: re, clearError: ie, addToolApprovalResponse: ae } = eo({
5418
+ }, { data: E } = Rt(async () => (await e.get_chat_history({})).messages, []), O = e.value.length > 0 ? e.value : E, { messages: k, sendMessage: ee, setMessages: te, status: A, stop: ne, error: j, regenerate: ie, clearError: ae, addToolApprovalResponse: oe } = eo({
5417
5419
  sendAutomaticallyWhen: ({ messages: e }) => Eo(e),
5418
5420
  transport: new Na({ fetch: async (t, n) => {
5419
5421
  if (n === void 0) return fetch(t);
@@ -5429,7 +5431,7 @@ var Gs = (e) => {
5429
5431
  let t = i.messages.map((e) => ({
5430
5432
  ...e,
5431
5433
  content: e.parts?.map((e) => "text" in e ? e.text : "").join("\n")
5432
- })), n = _e();
5434
+ })), n = Te();
5433
5435
  T();
5434
5436
  let s = new ReadableStream({
5435
5437
  start(t) {
@@ -5467,7 +5469,7 @@ var Gs = (e) => {
5467
5469
  } }),
5468
5470
  messages: O,
5469
5471
  onFinish: ({ messages: t, isAbort: n, finishReason: i }) => {
5470
- if (p(void 0), h.current && (h.current.value = ""), r.debug("Finished streaming message:", {
5472
+ if (p(void 0), m.current && (m.current.value = ""), r.debug("Finished streaming message:", {
5471
5473
  finishReason: i,
5472
5474
  isAbort: n
5473
5475
  }), n) {
@@ -5502,32 +5504,33 @@ var Gs = (e) => {
5502
5504
  });
5503
5505
  }
5504
5506
  });
5505
- let oe = j === "submitted" || j === "streaming", se = (t) => {
5507
+ let se = A === "submitted" || A === "streaming", ce = (t) => {
5506
5508
  let n = k.findIndex((e) => e.id === t);
5507
5509
  if (n !== -1) {
5508
5510
  let r = k.filter((e) => e.id !== t);
5509
- e.delete_chat_message({ index: n }), ee(r), e.setValue(r), r.length === 0 && T();
5511
+ e.delete_chat_message({ index: n }), te(r), e.setValue(r), r.length === 0 && T();
5510
5512
  }
5511
- }, ce = Array.isArray(e.allowAttachments) && e.allowAttachments.length > 0 || e.allowAttachments === !0, le = {
5513
+ }, ue = Array.isArray(e.allowAttachments) && e.allowAttachments.length > 0 || e.allowAttachments === !0, de = {
5512
5514
  triggerCompletionRegex: /^\/(\w+)?/,
5513
5515
  completions: e.prompts.map((e) => ({
5514
5516
  label: `/${e}`,
5515
5517
  displayLabel: e,
5516
5518
  apply: e
5517
5519
  }))
5518
- }, ue = e.prompts.length > 0 ? "Type your message here, / for prompts" : "Type your message here...";
5520
+ }, fe = e.prompts.length > 0 ? "Type your message here, / for prompts" : "Type your message here...";
5519
5521
  (0, q.useEffect)(() => {
5520
- v.current?.scrollTo({
5521
- top: v.current.scrollHeight,
5522
+ _.current?.scrollTo({
5523
+ top: _.current.scrollHeight,
5522
5524
  behavior: "smooth"
5523
5525
  });
5524
- }, [k.length, v]);
5525
- let de = _.current?.view, fe = () => {
5526
- if (de) {
5527
- let e = de.state.doc.length;
5528
- de.dispatch({ changes: {
5526
+ }, [k.length, _]);
5527
+ let pe = () => {
5528
+ let e = g.current?.view;
5529
+ if (e) {
5530
+ let t = e.state.doc.length;
5531
+ e.dispatch({ changes: {
5529
5532
  from: 0,
5530
- to: e,
5533
+ to: t,
5531
5534
  insert: ""
5532
5535
  } });
5533
5536
  }
@@ -5540,23 +5543,24 @@ var Gs = (e) => {
5540
5543
  /* @__PURE__ */ (0, J.jsx)("div", {
5541
5544
  className: "absolute top-0 right-0 flex justify-end z-10 border border-(--slate-6) bg-inherit rounded-bl-lg",
5542
5545
  children: /* @__PURE__ */ (0, J.jsx)(a, {
5546
+ "aria-label": "Reset chat",
5543
5547
  variant: "text",
5544
5548
  size: "icon",
5545
5549
  disabled: k.length === 0,
5546
5550
  onClick: () => {
5547
- ee([]), e.setValue([]), e.delete_chat_history({}), ie(), T();
5551
+ te([]), e.setValue([]), e.delete_chat_history({}), ae(), T();
5548
5552
  },
5549
- children: /* @__PURE__ */ (0, J.jsx)(Ut, { className: "h-3 w-3" })
5553
+ children: /* @__PURE__ */ (0, J.jsx)(Wt, { className: "h-3 w-3" })
5550
5554
  })
5551
5555
  }),
5552
5556
  /* @__PURE__ */ (0, J.jsxs)("div", {
5553
5557
  className: "grow overflow-y-auto gap-4 pt-8 pb-4 px-2 flex flex-col",
5554
- ref: v,
5558
+ ref: _,
5555
5559
  children: [
5556
5560
  k.length === 0 && /* @__PURE__ */ (0, J.jsxs)("div", {
5557
5561
  className: "flex flex-col items-center justify-center h-full text-muted-foreground text-center p-4",
5558
5562
  children: [
5559
- /* @__PURE__ */ (0, J.jsx)(zt, { className: "h-12 w-12 mb-4" }),
5563
+ /* @__PURE__ */ (0, J.jsx)(Bt, { className: "h-12 w-12 mb-4" }),
5560
5564
  /* @__PURE__ */ (0, J.jsx)("h3", {
5561
5565
  className: "text-lg font-semibold mb-2",
5562
5566
  children: "No messages yet"
@@ -5575,40 +5579,41 @@ var Gs = (e) => {
5575
5579
  className: `max-w-[80%] p-3 rounded-lg ${e.role === "user" ? "bg-(--sky-11) text-(--slate-1) whitespace-pre-wrap" : "bg-(--slate-4) text-(--slate-12)"}`,
5576
5580
  children: qo({
5577
5581
  message: e,
5578
- isStreamingReasoning: j === "streaming",
5582
+ isStreamingReasoning: A === "streaming",
5579
5583
  isLast: r,
5580
- isActive: oe,
5581
- addToolApprovalResponse: r ? ae : void 0
5584
+ isActive: se,
5585
+ addToolApprovalResponse: r ? oe : void 0
5582
5586
  })
5583
5587
  }), /* @__PURE__ */ (0, J.jsxs)("div", {
5584
- className: "flex justify-end text-xs gap-2 invisible group-hover:visible",
5588
+ className: "flex justify-end text-xs gap-2 opacity-0 group-hover:opacity-100 focus-within:opacity-100",
5585
5589
  children: [/* @__PURE__ */ (0, J.jsx)(l, {
5586
5590
  value: n,
5587
5591
  className: "h-3 w-3",
5588
5592
  buttonClassName: "text-xs text-(--slate-9) hover:text-(--slate-11)"
5589
5593
  }), /* @__PURE__ */ (0, J.jsx)("button", {
5590
5594
  type: "button",
5591
- onClick: () => se(e.id),
5595
+ "aria-label": "Delete message",
5596
+ onClick: () => ce(e.id),
5592
5597
  className: "text-xs text-(--slate-9) hover:text-(--slate-11)",
5593
- children: /* @__PURE__ */ (0, J.jsx)(m, { className: "h-3 w-3 text-(--red-9)" })
5598
+ children: /* @__PURE__ */ (0, J.jsx)(v, { className: "h-3 w-3 text-(--red-9)" })
5594
5599
  })]
5595
5600
  })]
5596
- }, `${e.id}-${t}`);
5601
+ }, e.id);
5597
5602
  }),
5598
- oe && /* @__PURE__ */ (0, J.jsx)("div", {
5603
+ se && /* @__PURE__ */ (0, J.jsx)("div", {
5599
5604
  className: "flex items-center justify-center mb-4",
5600
- children: /* @__PURE__ */ (0, J.jsx)(E, { size: "small" })
5605
+ children: /* @__PURE__ */ (0, J.jsx)(D, { size: "small" })
5601
5606
  }),
5602
- M && /* @__PURE__ */ (0, J.jsxs)("div", {
5607
+ j && /* @__PURE__ */ (0, J.jsxs)("div", {
5603
5608
  className: "flex items-center justify-center space-x-2 mb-4",
5604
- children: [/* @__PURE__ */ (0, J.jsx)(ft, { error: M }), /* @__PURE__ */ (0, J.jsx)(a, {
5609
+ children: [/* @__PURE__ */ (0, J.jsx)(ft, { error: j }), /* @__PURE__ */ (0, J.jsx)(a, {
5605
5610
  variant: "outline",
5606
5611
  size: "sm",
5607
- onClick: () => re(),
5612
+ onClick: () => ie(),
5608
5613
  children: "Retry"
5609
5614
  })]
5610
5615
  }),
5611
- C && !oe && !M && /* @__PURE__ */ (0, J.jsx)("div", {
5616
+ C && !se && !j && /* @__PURE__ */ (0, J.jsx)("div", {
5612
5617
  className: "flex justify-center py-2",
5613
5618
  children: /* @__PURE__ */ (0, J.jsx)("span", {
5614
5619
  className: "text-xs text-muted-foreground",
@@ -5621,15 +5626,15 @@ var Gs = (e) => {
5621
5626
  onSubmit: async (n) => {
5622
5627
  if (n.preventDefault(), e.disabled) return;
5623
5628
  let r = f ? await To(f) : void 0;
5624
- A({
5629
+ ee({
5625
5630
  role: "user",
5626
5631
  parts: [{
5627
5632
  type: "text",
5628
5633
  text: t
5629
5634
  }, ...r ?? []]
5630
- }), fe();
5635
+ }), pe();
5631
5636
  },
5632
- ref: g,
5637
+ ref: h,
5633
5638
  inert: e.disabled || void 0,
5634
5639
  className: i("flex w-full border-t border-(--slate-6) px-2 py-1 items-center", e.disabled && "opacity-50 cursor-not-allowed"),
5635
5640
  children: [
@@ -5641,22 +5646,23 @@ var Gs = (e) => {
5641
5646
  prompts: e.prompts,
5642
5647
  onSelect: (e) => {
5643
5648
  o(e), requestAnimationFrame(() => {
5644
- de?.focus(), Ce(de);
5649
+ let e = g.current?.view;
5650
+ e?.focus(), le(e);
5645
5651
  });
5646
5652
  }
5647
5653
  }),
5648
5654
  /* @__PURE__ */ (0, J.jsx)(zs, {
5649
5655
  className: "rounded-sm mr-2",
5650
- placeholder: ue,
5656
+ placeholder: fe,
5651
5657
  value: t,
5652
- inputRef: _,
5658
+ inputRef: g,
5653
5659
  maxHeight: e.maxHeight ? `${e.maxHeight / 2}px` : void 0,
5654
5660
  onChange: o,
5655
5661
  onSubmit: (e, t) => {
5656
- t.trim() && g.current?.requestSubmit();
5662
+ t.trim() && h.current?.requestSubmit();
5657
5663
  },
5658
5664
  onClose: () => {},
5659
- additionalCompletions: le
5665
+ additionalCompletions: de
5660
5666
  }),
5661
5667
  f && f.length === 1 && /* @__PURE__ */ (0, J.jsx)("span", {
5662
5668
  title: f[0].name,
@@ -5673,19 +5679,19 @@ var Gs = (e) => {
5673
5679
  variant: "text",
5674
5680
  size: "sm",
5675
5681
  onClick: () => {
5676
- p(void 0), h.current && (h.current.value = "");
5682
+ p(void 0), m.current && (m.current.value = "");
5677
5683
  },
5678
5684
  children: /* @__PURE__ */ (0, J.jsx)(De, { className: "size-3" })
5679
5685
  }),
5680
- ce && /* @__PURE__ */ (0, J.jsxs)(J.Fragment, { children: [/* @__PURE__ */ (0, J.jsx)(a, {
5686
+ ue && /* @__PURE__ */ (0, J.jsxs)(J.Fragment, { children: [/* @__PURE__ */ (0, J.jsx)(a, {
5681
5687
  type: "button",
5682
5688
  variant: "text",
5683
5689
  size: "sm",
5684
- onClick: () => h.current?.click(),
5685
- children: /* @__PURE__ */ (0, J.jsx)(Ht, { className: "h-4" })
5690
+ onClick: () => m.current?.click(),
5691
+ children: /* @__PURE__ */ (0, J.jsx)(Ut, { className: "h-4" })
5686
5692
  }), /* @__PURE__ */ (0, J.jsx)("input", {
5687
5693
  type: "file",
5688
- ref: h,
5694
+ ref: m,
5689
5695
  className: "hidden",
5690
5696
  multiple: !0,
5691
5697
  accept: Array.isArray(e.allowAttachments) ? e.allowAttachments.join(",") : void 0,
@@ -5693,13 +5699,13 @@ var Gs = (e) => {
5693
5699
  e.target.files && p([...e.target.files]);
5694
5700
  }
5695
5701
  })] }),
5696
- oe ? /* @__PURE__ */ (0, J.jsx)(ne, {
5702
+ se ? /* @__PURE__ */ (0, J.jsx)(re, {
5697
5703
  content: "Stop generating",
5698
5704
  children: /* @__PURE__ */ (0, J.jsx)(a, {
5699
5705
  type: "button",
5700
5706
  variant: "link",
5701
5707
  size: "xs",
5702
- onClick: () => te(),
5708
+ onClick: () => ne(),
5703
5709
  className: "text-(--red-9) hover:text-(--red-11)",
5704
5710
  children: /* @__PURE__ */ (0, J.jsx)(ze, { className: "h-4 w-4 fill-current" })
5705
5711
  })
@@ -5710,7 +5716,7 @@ var Gs = (e) => {
5710
5716
  size: "xs",
5711
5717
  className: "text-(--slate-11)",
5712
5718
  "aria-label": "Send message",
5713
- children: /* @__PURE__ */ (0, J.jsx)(Wt, { className: "h-4 w-4" })
5719
+ children: /* @__PURE__ */ (0, J.jsx)(Gt, { className: "h-4 w-4" })
5714
5720
  })
5715
5721
  ]
5716
5722
  })
@@ -5750,7 +5756,7 @@ var Gs = (e) => {
5750
5756
  description: "Penalizes new tokens (-2: favor, 2: avoid)"
5751
5757
  }
5752
5758
  }, qs = (e) => {
5753
- let t = (0, N.c)(16), { config: n, onChange: r } = e, [i, o] = (0, q.useState)(!1), s;
5759
+ let t = (0, M.c)(16), { config: n, onChange: r } = e, [i, o] = (0, q.useState)(!1), s;
5754
5760
  t[0] !== n || t[1] !== r ? (s = (e, t) => {
5755
5761
  let i = t === null || Number.isNaN(t) ? null : t;
5756
5762
  if (i !== null) {
@@ -5767,25 +5773,25 @@ var Gs = (e) => {
5767
5773
  t[3] === Symbol.for("react.memo_cache_sentinel") ? (l = (e) => {
5768
5774
  e.key === "Enter" && (e.preventDefault(), o(!1));
5769
5775
  }, t[3] = l) : l = t[3];
5770
- let u = l, f;
5771
- t[4] === Symbol.for("react.memo_cache_sentinel") ? (f = /* @__PURE__ */ (0, J.jsx)(ne, {
5776
+ let f = l, p;
5777
+ t[4] === Symbol.for("react.memo_cache_sentinel") ? (p = /* @__PURE__ */ (0, J.jsx)(re, {
5772
5778
  content: "Configuration",
5773
- children: /* @__PURE__ */ (0, J.jsx)(d, {
5779
+ children: /* @__PURE__ */ (0, J.jsx)(h, {
5774
5780
  asChild: !0,
5775
5781
  children: /* @__PURE__ */ (0, J.jsx)(a, {
5776
5782
  variant: "outline",
5777
5783
  size: "sm",
5778
5784
  className: "border-none shadow-none hover:bg-transparent",
5779
- children: /* @__PURE__ */ (0, J.jsx)(Gt, { className: "h-3 w-3" })
5785
+ children: /* @__PURE__ */ (0, J.jsx)(Kt, { className: "h-3 w-3" })
5780
5786
  })
5781
5787
  })
5782
- }), t[4] = f) : f = t[4];
5788
+ }), t[4] = p) : p = t[4];
5783
5789
  let m;
5784
5790
  t[5] === Symbol.for("react.memo_cache_sentinel") ? (m = /* @__PURE__ */ (0, J.jsx)("h4", {
5785
5791
  className: "font-bold leading-none",
5786
5792
  children: "Configuration"
5787
5793
  }), t[5] = m) : m = t[5];
5788
- let h;
5794
+ let g;
5789
5795
  if (t[6] !== n || t[7] !== c) {
5790
5796
  let e;
5791
5797
  t[9] === c ? e = t[10] : (e = (e) => {
@@ -5795,7 +5801,7 @@ var Gs = (e) => {
5795
5801
  children: [/* @__PURE__ */ (0, J.jsxs)(pt, {
5796
5802
  htmlFor: t,
5797
5803
  className: "flex w-full justify-between col-span-3 align-end",
5798
- children: [Ae.startCase(t), /* @__PURE__ */ (0, J.jsx)(ne, {
5804
+ children: [Ae.startCase(t), /* @__PURE__ */ (0, J.jsx)(re, {
5799
5805
  delayDuration: 200,
5800
5806
  side: "top",
5801
5807
  content: /* @__PURE__ */ (0, J.jsx)("div", {
@@ -5813,33 +5819,33 @@ var Gs = (e) => {
5813
5819
  maxValue: Ks[t].max,
5814
5820
  step: Ks[t].step ?? 1,
5815
5821
  onChange: (e) => c(t, e),
5816
- onKeyDown: u,
5822
+ onKeyDown: f,
5817
5823
  className: "col-span-3"
5818
5824
  })]
5819
5825
  }, t);
5820
- }, t[9] = c, t[10] = e), h = At.entries(n).map(e), t[6] = n, t[7] = c, t[8] = h;
5821
- } else h = t[8];
5822
- let g;
5823
- t[11] === h ? g = t[12] : (g = /* @__PURE__ */ (0, J.jsx)(p, {
5826
+ }, t[9] = c, t[10] = e), g = yt.entries(n).map(e), t[6] = n, t[7] = c, t[8] = g;
5827
+ } else g = t[8];
5828
+ let _;
5829
+ t[11] === g ? _ = t[12] : (_ = /* @__PURE__ */ (0, J.jsx)(d, {
5824
5830
  className: "w-70 border",
5825
5831
  children: /* @__PURE__ */ (0, J.jsxs)("div", {
5826
5832
  className: "grid gap-3",
5827
- children: [m, h]
5833
+ children: [m, g]
5828
5834
  })
5829
- }), t[11] = h, t[12] = g);
5830
- let _;
5831
- return t[13] !== i || t[14] !== g ? (_ = /* @__PURE__ */ (0, J.jsxs)(te, {
5835
+ }), t[11] = g, t[12] = _);
5836
+ let v;
5837
+ return t[13] !== i || t[14] !== _ ? (v = /* @__PURE__ */ (0, J.jsxs)(u, {
5832
5838
  open: i,
5833
5839
  onOpenChange: o,
5834
- children: [f, g]
5835
- }), t[13] = i, t[14] = g, t[15] = _) : _ = t[15], _;
5840
+ children: [p, _]
5841
+ }), t[13] = i, t[14] = _, t[15] = v) : v = t[15], v;
5836
5842
  }, Js = (e) => {
5837
- let t = (0, N.c)(18), { prompts: n, onSelect: r } = e, [i, o] = (0, q.useState)(!1), [s, c] = (0, q.useState)(""), l;
5843
+ let t = (0, M.c)(18), { prompts: n, onSelect: r } = e, [i, o] = (0, q.useState)(!1), [s, c] = (0, q.useState)(""), l;
5838
5844
  t[0] === r ? l = t[1] : (l = (e) => {
5839
5845
  [...e.matchAll(/{{(\w+)}}/g)].length > 0 ? (c(e), o(!0)) : r(e);
5840
5846
  }, t[0] = r, t[1] = l);
5841
- let u = l, d;
5842
- t[2] === Symbol.for("react.memo_cache_sentinel") ? (d = /* @__PURE__ */ (0, J.jsx)(ne, {
5847
+ let f = l, p;
5848
+ t[2] === Symbol.for("react.memo_cache_sentinel") ? (p = /* @__PURE__ */ (0, J.jsx)(re, {
5843
5849
  content: "Select a prompt",
5844
5850
  children: /* @__PURE__ */ (0, J.jsx)(Me, {
5845
5851
  asChild: !0,
@@ -5847,78 +5853,73 @@ var Gs = (e) => {
5847
5853
  variant: "outline",
5848
5854
  size: "sm",
5849
5855
  className: "border-none shadow-none hover:bg-transparent",
5850
- children: /* @__PURE__ */ (0, J.jsx)(ee, { className: "h-3 w-3" })
5856
+ children: /* @__PURE__ */ (0, J.jsx)(m, { className: "h-3 w-3" })
5851
5857
  })
5852
5858
  })
5853
- }), t[2] = d) : d = t[2];
5854
- let f;
5855
- if (t[3] !== u || t[4] !== n) {
5859
+ }), t[2] = p) : p = t[2];
5860
+ let h;
5861
+ if (t[3] !== f || t[4] !== n) {
5856
5862
  let e;
5857
- t[6] === u ? e = t[7] : (e = (e, t) => /* @__PURE__ */ (0, J.jsx)(Pe, {
5858
- onSelect: () => u(e),
5863
+ t[6] === f ? e = t[7] : (e = (e, t) => /* @__PURE__ */ (0, J.jsx)(Pe, {
5864
+ onSelect: () => f(e),
5859
5865
  className: "whitespace-normal text-left",
5860
5866
  children: e
5861
- }, t), t[6] = u, t[7] = e), f = n.map(e), t[3] = u, t[4] = n, t[5] = f;
5862
- } else f = t[5];
5863
- let m;
5864
- t[8] === f ? m = t[9] : (m = /* @__PURE__ */ (0, J.jsx)(Hs, { children: /* @__PURE__ */ (0, J.jsxs)(Ie, { children: [d, /* @__PURE__ */ (0, J.jsx)(Fe, {
5867
+ }, t), t[6] = f, t[7] = e), h = n.map(e), t[3] = f, t[4] = n, t[5] = h;
5868
+ } else h = t[5];
5869
+ let g;
5870
+ t[8] === h ? g = t[9] : (g = /* @__PURE__ */ (0, J.jsx)(Hs, { children: /* @__PURE__ */ (0, J.jsxs)(Ie, { children: [p, /* @__PURE__ */ (0, J.jsx)(Fe, {
5865
5871
  side: "right",
5866
5872
  align: "end",
5867
5873
  onCloseAutoFocus: Xs,
5868
5874
  className: "w-64 max-h-96 overflow-y-auto",
5869
- children: f
5870
- })] }) }), t[8] = f, t[9] = m);
5871
- let h;
5872
- t[10] === Symbol.for("react.memo_cache_sentinel") ? (h = () => o(!1), t[10] = h) : h = t[10];
5873
- let g;
5874
- t[11] !== r || t[12] !== s ? (g = /* @__PURE__ */ (0, J.jsx)(p, {
5875
+ children: h
5876
+ })] }) }), t[8] = h, t[9] = g);
5877
+ let _;
5878
+ t[10] === Symbol.for("react.memo_cache_sentinel") ? (_ = () => o(!1), t[10] = _) : _ = t[10];
5879
+ let v;
5880
+ t[11] !== r || t[12] !== s ? (v = /* @__PURE__ */ (0, J.jsx)(d, {
5875
5881
  side: "right",
5876
5882
  align: "end",
5877
5883
  className: "min-w-80 px-2",
5878
5884
  children: /* @__PURE__ */ (0, J.jsx)(Ys, {
5879
5885
  prompt: s,
5880
- onClose: h,
5886
+ onClose: _,
5881
5887
  onSelect: r
5882
- })
5883
- }), t[11] = r, t[12] = s, t[13] = g) : g = t[13];
5884
- let _;
5885
- return t[14] !== i || t[15] !== m || t[16] !== g ? (_ = /* @__PURE__ */ (0, J.jsxs)(te, {
5888
+ }, s)
5889
+ }), t[11] = r, t[12] = s, t[13] = v) : v = t[13];
5890
+ let y;
5891
+ return t[14] !== i || t[15] !== g || t[16] !== v ? (y = /* @__PURE__ */ (0, J.jsxs)(u, {
5886
5892
  open: i,
5887
5893
  onOpenChange: o,
5888
- children: [m, g]
5889
- }), t[14] = i, t[15] = m, t[16] = g, t[17] = _) : _ = t[17], _;
5894
+ children: [g, v]
5895
+ }), t[14] = i, t[15] = g, t[16] = v, t[17] = y) : y = t[17], y;
5890
5896
  }, Ys = (e) => {
5891
- let t = (0, N.c)(32), { prompt: n, onClose: r, onSelect: i } = e, o;
5892
- t[0] === Symbol.for("react.memo_cache_sentinel") ? (o = {}, t[0] = o) : o = t[0];
5893
- let [s, c] = (0, q.useState)(o), l, u;
5894
- t[1] === n ? (l = t[2], u = t[3]) : (l = () => {
5895
- let e = [...n.matchAll(/{{(\w+)}}/g)].reduce(Zs, {});
5896
- c(e);
5897
- }, u = [n], t[1] = n, t[2] = l, t[3] = u), (0, q.useEffect)(l, u);
5898
- let d;
5899
- t[4] === Symbol.for("react.memo_cache_sentinel") ? (d = (e, t) => {
5897
+ let t = (0, M.c)(30), { prompt: n, onClose: r, onSelect: i } = e, o;
5898
+ t[0] === n ? o = t[1] : (o = () => [...n.matchAll(/{{(\w+)}}/g)].reduce(Zs, {}), t[0] = n, t[1] = o);
5899
+ let [s, c] = (0, q.useState)(o), l;
5900
+ t[2] === Symbol.for("react.memo_cache_sentinel") ? (l = (e, t) => {
5900
5901
  c((n) => ({
5901
5902
  ...n,
5902
5903
  [e]: t
5903
5904
  }));
5904
- }, t[4] = d) : d = t[4];
5905
- let f = d, p;
5906
- if (t[5] !== n || t[6] !== s) {
5905
+ }, t[2] = l) : l = t[2];
5906
+ let u = l, d;
5907
+ if (t[3] !== n || t[4] !== s) {
5907
5908
  let e;
5908
- t[8] === Symbol.for("react.memo_cache_sentinel") ? (e = /{{(\w+)}}/g, t[8] = e) : e = t[8];
5909
+ t[6] === Symbol.for("react.memo_cache_sentinel") ? (e = /{{(\w+)}}/g, t[6] = e) : e = t[6];
5909
5910
  let r;
5910
- t[9] === s ? r = t[10] : (r = (e, t) => s[t] || `{{${t}}}`, t[9] = s, t[10] = r), p = n.replaceAll(e, r), t[5] = n, t[6] = s, t[7] = p;
5911
- } else p = t[7];
5911
+ t[7] === s ? r = t[8] : (r = (e, t) => s[t] || `{{${t}}}`, t[7] = s, t[8] = r), d = n.replaceAll(e, r), t[3] = n, t[4] = s, t[5] = d;
5912
+ } else d = t[5];
5913
+ let f = d, p;
5914
+ t[9] === s ? p = t[10] : (p = Object.values(s).some(Qs), t[9] = s, t[10] = p);
5912
5915
  let m = p, h;
5913
- t[11] === s ? h = t[12] : (h = Object.values(s).some(Qs), t[11] = s, t[12] = h);
5916
+ t[11] !== r || t[12] !== i || t[13] !== f ? (h = () => {
5917
+ i(f), r();
5918
+ }, t[11] = r, t[12] = i, t[13] = f, t[14] = h) : h = t[14];
5914
5919
  let g = h, _;
5915
- t[13] !== r || t[14] !== i || t[15] !== m ? (_ = () => {
5916
- i(m), r();
5917
- }, t[13] = r, t[14] = i, t[15] = m, t[16] = _) : _ = t[16];
5918
- let v = _, y;
5919
- t[17] === s ? y = t[18] : (y = Object.entries(s), t[17] = s, t[18] = y);
5920
- let b;
5921
- t[19] !== v || t[20] !== g || t[21] !== y ? (b = y.map((e, t) => {
5920
+ t[15] === s ? _ = t[16] : (_ = Object.entries(s), t[15] = s, t[16] = _);
5921
+ let v;
5922
+ t[17] !== g || t[18] !== m || t[19] !== _ ? (v = _.map((e, t) => {
5922
5923
  let [n, r] = e;
5923
5924
  return /* @__PURE__ */ (0, J.jsxs)("div", {
5924
5925
  className: "grid grid-cols-4 items-center gap-2",
@@ -5929,41 +5930,41 @@ var Gs = (e) => {
5929
5930
  }), /* @__PURE__ */ (0, J.jsx)(Ne, {
5930
5931
  id: n,
5931
5932
  value: r,
5932
- onChange: (e) => f(n, e.target.value),
5933
+ onChange: (e) => u(n, e.target.value),
5933
5934
  rootClassName: "col-span-3 w-full",
5934
5935
  className: "m-0",
5935
5936
  placeholder: `Enter value for ${n}`,
5936
5937
  autoFocus: t === 0,
5937
5938
  onKeyDown: (e) => {
5938
- e.key === "Enter" && !g && v();
5939
+ e.key === "Enter" && !m && g();
5939
5940
  }
5940
5941
  })]
5941
5942
  }, n);
5942
- }), t[19] = v, t[20] = g, t[21] = y, t[22] = b) : b = t[22];
5943
- let x;
5944
- t[23] === m ? x = t[24] : (x = /* @__PURE__ */ (0, J.jsx)("div", {
5943
+ }), t[17] = g, t[18] = m, t[19] = _, t[20] = v) : v = t[20];
5944
+ let y;
5945
+ t[21] === f ? y = t[22] : (y = /* @__PURE__ */ (0, J.jsx)("div", {
5945
5946
  className: "grid gap-2 prose dark:prose-invert",
5946
5947
  children: /* @__PURE__ */ (0, J.jsx)("blockquote", {
5947
5948
  className: "text-sm",
5948
- children: m
5949
+ children: f
5949
5950
  })
5950
- }), t[23] = m, t[24] = x);
5951
- let S;
5952
- t[25] !== v || t[26] !== g ? (S = /* @__PURE__ */ (0, J.jsx)(a, {
5953
- onClick: v,
5951
+ }), t[21] = f, t[22] = y);
5952
+ let b;
5953
+ t[23] !== g || t[24] !== m ? (b = /* @__PURE__ */ (0, J.jsx)(a, {
5954
+ onClick: g,
5954
5955
  size: "xs",
5955
- disabled: g,
5956
+ disabled: m,
5956
5957
  children: "Submit"
5957
- }), t[25] = v, t[26] = g, t[27] = S) : S = t[27];
5958
- let C;
5959
- return t[28] !== x || t[29] !== S || t[30] !== b ? (C = /* @__PURE__ */ (0, J.jsxs)("div", {
5958
+ }), t[23] = g, t[24] = m, t[25] = b) : b = t[25];
5959
+ let x;
5960
+ return t[26] !== v || t[27] !== y || t[28] !== b ? (x = /* @__PURE__ */ (0, J.jsxs)("div", {
5960
5961
  className: "grid gap-4",
5961
5962
  children: [
5962
- b,
5963
- x,
5964
- S
5963
+ v,
5964
+ y,
5965
+ b
5965
5966
  ]
5966
- }), t[28] = x, t[29] = S, t[30] = b, t[31] = C) : C = t[31], C;
5967
+ }), t[26] = v, t[27] = y, t[28] = b, t[29] = x) : x = t[29], x;
5967
5968
  };
5968
5969
  function Xs(e) {
5969
5970
  return e.preventDefault();