@marimo-team/frontend 0.25.2-dev99 → 0.25.3-dev10
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.
- package/dist/assets/{CellStatus-Bj7PvY_u.js → CellStatus-nZpuDkm7.js} +1 -1
- package/dist/assets/{ConnectedDataExplorerComponent-C5UW0p9I.js → ConnectedDataExplorerComponent-t8fH_TNc.js} +1 -1
- package/dist/assets/{ErrorBoundary-CG6gtgym.js → ErrorBoundary-B4n9EnHB.js} +2 -2
- package/dist/assets/{I18nProvider-BFOBKCJB.js → I18nProvider-Cg2I_s1_.js} +1 -1
- package/dist/assets/{ImageComparisonComponent-pCLPT6RA.js → ImageComparisonComponent-Bq-l26rq.js} +1 -1
- package/dist/assets/{Inputs-BlygJyl1.js → Inputs-BsQm29hD.js} +1 -1
- package/dist/assets/JsonOutput-BxB0NL8w.js +11 -0
- package/dist/assets/{LazyAnyLanguageCodeMirror-CeTd_wFt.js → LazyAnyLanguageCodeMirror-CKcCbG2G.js} +2 -2
- package/dist/assets/MarimoErrorOutput-BTy4MOzX.js +10 -0
- package/dist/assets/{Plot-CNtRAZBG.js → Plot-B8w5_jU-.js} +1 -1
- package/dist/assets/{RenderHTML-C7QcdAgB.js → RenderHTML-9bMgbYmo.js} +1 -1
- package/dist/assets/{RunButton-A__3wcpF.js → RunButton-CFQUNN5c.js} +1 -1
- package/dist/assets/__vite-browser-external-CYO_P3S8.js +1 -0
- package/dist/assets/__vite-browser-external-FeDVGZU8.js +1 -0
- package/dist/assets/{abnfDiagram-VCTEODGH-BuHNQB7l.js → abnfDiagram-VCTEODGH-3eD1PSvc.js} +1 -1
- package/dist/assets/add-cell-with-ai-f_MnLCwI.js +76 -0
- package/dist/assets/{add-connection-dialog-bl8dqCVs.js → add-connection-dialog-CoE_PhuD.js} +1 -1
- package/dist/assets/{agent-panel-BPLrf7mA.js → agent-panel-BWZz24jK.js} +5 -5
- package/dist/assets/ai-model-dropdown-zm-2fXzf.js +13 -0
- package/dist/assets/{alert-MrQXRIin.js → alert-DTaqCu_d.js} +1 -1
- package/dist/assets/{alert-dialog-DlL1c-bx.js → alert-dialog-BaPGzeOK.js} +1 -1
- package/dist/assets/{any-language-editor-DtOWujZJ.js → any-language-editor-BLCAD3yx.js} +1 -1
- package/dist/assets/app-config-button-BhU0ulYs.js +1 -0
- package/dist/assets/{architectureDiagram-5GKGNRK7-DvIXijdN.js → architectureDiagram-5GKGNRK7-Bx_zXJUH.js} +1 -1
- package/dist/assets/arrow-down-C9Bslqr3.js +1 -0
- package/dist/assets/arrow-left-BaPN-xbg.js +1 -0
- package/dist/assets/arrow-right-Cgit4Nk2.js +1 -0
- package/dist/assets/{badge-DFf033uX.js → badge-crT3E0Rm.js} +1 -1
- package/dist/assets/ban-YzvUro5I.js +1 -0
- package/dist/assets/{blob-Bx8A10xl.js → blob-iOBwGaP9.js} +1 -1
- package/dist/assets/{blockDiagram-I7D4REHJ-DGAMO17L.js → blockDiagram-I7D4REHJ-CuwUGEGQ.js} +1 -1
- package/dist/assets/{bot-message-square-BfGaNy9r.js → bot-message-square-8xmbrehG.js} +1 -1
- package/dist/assets/{bundle.esm-CklCb9AD.js → bundle.esm-D3tw5rqW.js} +1 -1
- package/dist/assets/{button-M49xxKoi.js → button-COI-NGrx.js} +1 -1
- package/dist/assets/{c4Diagram-7LVT6UL2-qqO5IOnV.js → c4Diagram-7LVT6UL2-nj0NbEUh.js} +1 -1
- package/dist/assets/{cache-panel-BNPF4X5e.js → cache-panel-DTY1dqvi.js} +1 -1
- package/dist/assets/{capabilities-BScjbYOK.js → capabilities-BJvf-MD4.js} +1 -1
- package/dist/assets/{card-BYZGhhhx.js → card-DOABds5l.js} +1 -1
- package/dist/assets/{cell-editor-C3818WlB.js → cell-editor-CAj1UKxx.js} +12 -12
- package/dist/assets/{cell-link-DC1UZQr_.js → cell-link-1CynTVGQ.js} +1 -1
- package/dist/assets/cells-rA_jsZCj.js +220 -0
- package/dist/assets/channel-DtckUh1_.js +1 -0
- package/dist/assets/{chart-no-axes-column-B6FT5Xvu.js → chart-no-axes-column-C4_v6fQW.js} +1 -1
- package/dist/assets/{chat-display-YETh6yXV.js → chat-display-BmEPmhDP.js} +1 -1
- package/dist/assets/chat-panel-Ce2Xh7dM.js +4 -0
- package/dist/assets/{chat-ui-D_QL46qM.js → chat-ui-DTy98rP3.js} +1 -1
- package/dist/assets/check-BQNapYaf.js +1 -0
- package/dist/assets/chevron-right-eAtVhbNZ.js +1 -0
- package/dist/assets/{chunk-2E4U76K2-DqA2CBL0.js → chunk-2E4U76K2-dDf4JvCq.js} +1 -1
- package/dist/assets/{chunk-4HAMMTFA-DaFOJTOO.js → chunk-4HAMMTFA-Bhjs7H7G.js} +1 -1
- package/dist/assets/{chunk-75Z2AOVW-DEp7Wbaj.js → chunk-75Z2AOVW-DlSlUzCU.js} +1 -1
- package/dist/assets/{chunk-CLGD4ZFX-BxW11Imt.js → chunk-CLGD4ZFX-CvGMvSe-.js} +1 -1
- package/dist/assets/{chunk-DU6HZSFF-CDmPCRkr.js → chunk-DU6HZSFF-BxQd02hX.js} +2 -2
- package/dist/assets/{chunk-F27PBJKO-455JWNM3.js → chunk-F27PBJKO-DL9FG-iN.js} +1 -1
- package/dist/assets/{chunk-GMAD6QVW-ahdTJvh0.js → chunk-GMAD6QVW-B1Ai6qbk.js} +1 -1
- package/dist/assets/{chunk-GVQU2GXP-CPkYne1h.js → chunk-GVQU2GXP-a_N0QLD4.js} +1 -1
- package/dist/assets/{chunk-IMKFNOWR-fARccL86.js → chunk-IMKFNOWR-7KbFyW3C.js} +1 -1
- package/dist/assets/{chunk-L3NEJ4N5-BOK6HmaY.js → chunk-L3NEJ4N5-BcHj9aiN.js} +1 -1
- package/dist/assets/{chunk-OSK3NFVY-CEcyPnHo.js → chunk-OSK3NFVY-Dc7tMbN9.js} +1 -1
- package/dist/assets/{chunk-P2QGCYS3-Bw5LRT6S.js → chunk-P2QGCYS3-G6pmnA0z.js} +1 -1
- package/dist/assets/{chunk-POPQ4Y6H-C--NLIXc.js → chunk-POPQ4Y6H-C3iw1mOR.js} +1 -1
- package/dist/assets/{chunk-PWAF6VOD-B1mxlptQ.js → chunk-PWAF6VOD-Dy1Fp4eJ.js} +1 -1
- package/dist/assets/{chunk-SHT3W25Y-Diet96b1.js → chunk-SHT3W25Y-B3kFJuvo.js} +1 -1
- package/dist/assets/{chunk-SVP7TREG-BbcEGfNl.js → chunk-SVP7TREG-BNmfcKnL.js} +1 -1
- package/dist/assets/{chunk-TICWLB2K-BypOyFjf.js → chunk-TICWLB2K-CI3x9ENh.js} +1 -1
- package/dist/assets/{chunk-TLUHSLCS-DvvqZUl_.js → chunk-TLUHSLCS-Q72uYeUY.js} +2 -2
- package/dist/assets/{chunk-YOKDWASO-84E-_nIR.js → chunk-YOKDWASO-BIpRENEC.js} +4 -4
- package/dist/assets/{circle-Bb1IbBVn.js → circle-DXf-VWZG.js} +1 -1
- package/dist/assets/circle-check-BCurAHEb.js +1 -0
- package/dist/assets/{circle-play-X3K8DkEc.js → circle-play-CYIb0qT6.js} +1 -1
- package/dist/assets/classDiagram-ZZMXUADV-vm4wDTPy.js +1 -0
- package/dist/assets/classDiagram-v2-VYDZK3BY-vm4wDTPy.js +1 -0
- package/dist/assets/{clear-button-BGfeXcJ3.js → clear-button-p6YcvzLy.js} +1 -1
- package/dist/assets/{click-outside-container-CHoodRk9.js → click-outside-container-D_Dy5sZY.js} +1 -1
- package/dist/assets/{clipboard-paste-D0gau9Xw.js → clipboard-paste-HVpozQmt.js} +1 -1
- package/dist/assets/code-BEiQP4pS.js +1 -0
- package/dist/assets/{code-visibility-DNzJgrTz.js → code-visibility-B-_GvwR5.js} +1 -1
- package/dist/assets/{code-xml-CW65k2pN.js → code-xml-SQaZqvcO.js} +1 -1
- package/dist/assets/coerce-CpE6kUdX.js +1 -0
- package/dist/assets/{column-preview-fD3qW2B5.js → column-preview-DU6dT80y.js} +1 -1
- package/dist/assets/command-palette-BMqFKXVr.js +1 -0
- package/dist/assets/{common-Cy3lJDvJ.js → common-lisZ0l6a.js} +1 -1
- package/dist/assets/{compiler-runtime-BQ9S8nyo.js → compiler-runtime-BrajqUja.js} +1 -1
- package/dist/assets/{components-M5WFQ0gs.js → components-CP_UoFtT.js} +1 -1
- package/dist/assets/{components-ufN33X-R.js → components-CXfO-F47.js} +1 -1
- package/dist/assets/{components-D9ZIJGG8.js → components-Dvd1GnD6.js} +1 -1
- package/dist/assets/config-DJLAC21v.js +1 -0
- package/dist/assets/{config-D_c_6ce1.js → config-DX8Y2WbJ.js} +1 -1
- package/dist/assets/{config-Cyum2gRs.js → config-VPSq73n8.js} +1 -1
- package/dist/assets/{copy-D03Y7IMR.js → copy-D8O_CYCG.js} +1 -1
- package/dist/assets/{copy-RyCOE8jo.js → copy-Djr5m5ac.js} +1 -1
- package/dist/assets/{copy-icon-wfSGfX8v.js → copy-icon-BIiRXh_3.js} +1 -1
- package/dist/assets/{createLucideIcon-rHn2EdoM.js → createLucideIcon-DfJ2oMlA.js} +1 -1
- package/dist/assets/{createReducer-W5dowuCe.js → createReducer-DgRODTW6.js} +1 -1
- package/dist/assets/{cynefinDiagram-5FMLGOSQ-BW3uXbHa.js → cynefinDiagram-5FMLGOSQ-Cy86eSwK.js} +1 -1
- package/dist/assets/{dagre-GXQ25YYZ-DIV0whJf.js → dagre-GXQ25YYZ-CcWiU9Wf.js} +1 -1
- package/dist/assets/{data-grid-overlay-editor-DuYKABwo.js → data-grid-overlay-editor-CMnBpfPb.js} +1 -1
- package/dist/assets/{database-zap-CrkOvbyN.js → database-zap-B_PMVg8T.js} +1 -1
- package/dist/assets/{datasource-Tst92Pzi.js → datasource-Dr1xNKUn.js} +1 -1
- package/dist/assets/dates-CfmdTL6B.js +1 -0
- package/dist/assets/{dependency-graph-panel-CLrAZrHA.js → dependency-graph-panel-B0uP-_id.js} +1 -1
- package/dist/assets/{diagram-S7CK7UJ4-BzoPaaoH.js → diagram-S7CK7UJ4-hmuvh6TI.js} +1 -1
- package/dist/assets/{diagram-UQ7AKVKN-BnOSn29R.js → diagram-UQ7AKVKN-CM3XDKRP.js} +1 -1
- package/dist/assets/{diagram-VSXAHHWV-DAz8vger.js → diagram-VSXAHHWV-B8HedxR3.js} +1 -1
- package/dist/assets/{diagram-VX7I27RA-BQOZxgYE.js → diagram-VX7I27RA-D_5dmdWD.js} +1 -1
- package/dist/assets/{diagram-Z3DM3KII-B_OF69Ac.js → diagram-Z3DM3KII-DWHvDoOc.js} +1 -1
- package/dist/assets/{dist-DoyTOIOd.js → dist-D6KQW558.js} +1 -1
- package/dist/assets/{dist-Cm7MoInu.js → dist-DR-Kwzb9.js} +1 -1
- package/dist/assets/{dist-Bqtq4wYM.js → dist-iaThVDkA.js} +1 -1
- package/dist/assets/{documentation-panel-OMUbXgKW.js → documentation-panel-DVl_ebWy.js} +1 -1
- package/dist/assets/{download-CPMAf7re.js → download-Bx55LMki.js} +1 -1
- package/dist/assets/{dropdown-menu-B2JUUcK7.js → dropdown-menu-C1rnl-0o.js} +1 -1
- package/dist/assets/{ebnfDiagram-PWID7BFC-BbkBTazy.js → ebnfDiagram-PWID7BFC-2XbadxRe.js} +1 -1
- package/dist/assets/edit-page-DlfCLUaq.js +9 -0
- package/dist/assets/{ellipsis-CLMWXUqY.js → ellipsis-63DyBLHQ.js} +1 -1
- package/dist/assets/{empty-state-CzxjZqGW.js → empty-state-BaCKb7o3.js} +1 -1
- package/dist/assets/{en-US-B4U3zuiu.js → en-US-Buu61juQ.js} +1 -1
- package/dist/assets/{erDiagram-RLTQ6QDP-DxDHwsU0.js → erDiagram-RLTQ6QDP-DbTcKdOV.js} +1 -1
- package/dist/assets/{error-banner-D1_bPN9u.js → error-banner-Cd69vvyX.js} +1 -1
- package/dist/assets/{error-entries-DBpwg0GC.js → error-entries-DOWpdGvI.js} +1 -1
- package/dist/assets/{error-panel-BgYJTJpA.js → error-panel-DpbNKSLs.js} +1 -1
- package/dist/assets/{errors-D9vyuMar.js → errors-DCrsa1nH.js} +1 -1
- package/dist/assets/{es-KNLgCZL4.js → es-Cqst59WX.js} +1 -1
- package/dist/assets/{esm-3WkPrffD.js → esm-CI_o7NhW.js} +1 -1
- package/dist/assets/{external-link-D2lKwXyB.js → external-link-UrX9KO36.js} +1 -1
- package/dist/assets/{eye-off-CfkK-QS3.js → eye-off-CxVozGAC.js} +1 -1
- package/dist/assets/{feedback-button-7KY7nL-j.js → feedback-button-B99ThNJW.js} +1 -1
- package/dist/assets/feedback-button-DlqZkJwz.js +1 -0
- package/dist/assets/{file-mCR_SMtq.js → file-BPBVl9pl.js} +1 -1
- package/dist/assets/{file-explorer-panel-HvVNt0Qs.js → file-explorer-panel-Bo9eN3rW.js} +1 -1
- package/dist/assets/{file-headphone-DKocX1z0.js → file-headphone-Dl35U6h3.js} +1 -1
- package/dist/assets/{file-icons-e7tmeyP-.js → file-icons-CdJgUy-I.js} +1 -1
- package/dist/assets/{file-name-input-DZehOHLA.js → file-name-input-ChnBsDE_.js} +1 -1
- package/dist/assets/{fileToBase64-aqhlf6Jj.js → fileToBase64-BgBraYAr.js} +1 -1
- package/dist/assets/{floating-outline-K7cVdOlC.js → floating-outline-MYqQW4Vp.js} +1 -1
- package/dist/assets/flowDiagram-HODETNUW-DR34jHUd.js +1 -0
- package/dist/assets/{formats-DkOlpVdf.js → formats-yZ06h1Pl.js} +1 -1
- package/dist/assets/{formatting-Civx9FAg.js → formatting-BqrP-n49.js} +1 -1
- package/dist/assets/{fullscreen-DEBblJKh.js → fullscreen-B9tHcfpV.js} +1 -1
- package/dist/assets/{gallery-page-DoriMrLH.js → gallery-page-DSL0J4md.js} +1 -1
- package/dist/assets/{ganttDiagram-EL5Y4UJY-BzkL5tY7.js → ganttDiagram-EL5Y4UJY-2n7Ig5Jm.js} +1 -1
- package/dist/assets/{gitGraphDiagram-WWUBYQGX-DqtmYSBS.js → gitGraphDiagram-WWUBYQGX-DxR7RNkL.js} +1 -1
- package/dist/assets/{github-khsXwCtv.js → github-DQZhN3La.js} +1 -1
- package/dist/assets/{glide-data-editor-DWyeHe3u.js → glide-data-editor-B1MWlKeM.js} +4 -4
- package/dist/assets/{glide-utils-BzwA3q-e.js → glide-utils-CIrAxdjv.js} +1 -1
- package/dist/assets/{globe-CmFhHoL1.js → globe-UdPdIbF7.js} +1 -1
- package/dist/assets/{hat-glasses-DVgK5i5l.js → hat-glasses-C8RhSVii.js} +1 -1
- package/dist/assets/{highlighted-body-KPVGNVTW-DxcqwMAu.js → highlighted-body-KPVGNVTW-BBA_Oaqj.js} +1 -1
- package/dist/assets/{home-page-BcJJsD_Q.js → home-page-KrhQ55Vg.js} +1 -1
- package/dist/assets/{hooks-Qxjt0Ypd.js → hooks-BIogTGCr.js} +1 -1
- package/dist/assets/{house-CbkYoQ5W.js → house-CpsMWsLL.js} +1 -1
- package/dist/assets/{html-to-image-CFVIG1VZ.js → html-to-image-DK9Zl1lU.js} +1 -1
- package/dist/assets/{icons-CVdkfEA3.js → icons-CiZ_8zS-.js} +1 -1
- package/dist/assets/{image-CTch9x2I.js → image-wZvTj8WY.js} +1 -1
- package/dist/assets/index-6b4mf8Ai.css +2 -0
- package/dist/assets/index-B3fcrmuf.js +30 -0
- package/dist/assets/{infoDiagram-27XIBGKW-7rLCp1UQ.js → infoDiagram-27XIBGKW-U5Oqw16-.js} +1 -1
- package/dist/assets/{input-DPd57MDP.js → input-BoBxR50a.js} +1 -1
- package/dist/assets/{isValid-BEbe1fFs.js → isValid-q_Ad80ug.js} +1 -1
- package/dist/assets/{ishikawaDiagram-5VMMS53U-BH7XUtkN.js → ishikawaDiagram-5VMMS53U-Bob74yfq.js} +1 -1
- package/dist/assets/{journeyDiagram-3NMN7TZE-BOj0kV6v.js → journeyDiagram-3NMN7TZE-CO3wos0F.js} +1 -1
- package/dist/assets/{kanban-definition-UXKFOSKX-CPrudFOv.js → kanban-definition-UXKFOSKX-HnyRfUfJ.js} +1 -1
- package/dist/assets/katex-C9vVdkK0.js +1 -0
- package/dist/assets/{katex-DUp2KybH.js → katex-CF1UBJcr.js} +5 -5
- package/dist/assets/{kbd-BnUiViRu.js → kbd-pdKBv96t.js} +1 -1
- package/dist/assets/kiosk-mode-BZECfg9k.js +1 -0
- package/dist/assets/{layout-CSLw6wGo.js → layout-DOpdUwym.js} +4 -4
- package/dist/assets/{link-BF4dGmOQ.js → link-NuFVR7G9.js} +1 -1
- package/dist/assets/links-DkkL9DVa.js +1 -0
- package/dist/assets/{logs-panel-OkoO5mbN.js → logs-panel-y0XnfulJ.js} +1 -1
- package/dist/assets/loro_wasm_bg-C2Fqi8D-.js +1 -0
- package/dist/assets/loro_wasm_bg-CSolyDSZ.wasm +0 -0
- package/dist/assets/loro_wasm_bg-Ctp2cNI9.js +1 -0
- package/dist/assets/{marimo-icons-B_1oPpIE.js → marimo-icons-CqliHyTr.js} +1 -1
- package/dist/assets/{markdown-renderer-mDlWBE1M.js → markdown-renderer-Q5AhbRU3.js} +2 -2
- package/dist/assets/{menu-items-DAaNKHJF.js → menu-items-BrwnTgyK.js} +1 -1
- package/dist/assets/mermaid-HWGCJPDP-B7ByBG-a.js +1 -0
- package/dist/assets/{mermaid-CX6aTquk.js → mermaid-a3xYymTy.js} +3 -3
- package/dist/assets/{message-circle-OTHnVlxO.js → message-circle-C3rKm8_a.js} +1 -1
- package/dist/assets/{mhchem-hMh9XtQZ.js → mhchem-B6WrVrmp.js} +1 -1
- package/dist/assets/{mindmap-definition-YA3MSWOX-kWyI8sXl.js → mindmap-definition-YA3MSWOX-Tl5cqnHr.js} +1 -1
- package/dist/assets/{multi-icon-DWzZu-9u.js → multi-icon-DL465pPF.js} +1 -1
- package/dist/assets/{name-cell-input-D_Q2IhP9.js → name-cell-input-BNOnF6-0.js} +1 -1
- package/dist/assets/{number-overlay-editor-myrryj7o.js → number-overlay-editor-DS8xi0jE.js} +1 -1
- package/dist/assets/{numbers-BEfBaQtu.js → numbers-Mk3-CcoU.js} +1 -1
- package/dist/assets/{outline-panel-Dy2cmYDF.js → outline-panel-Be7stWwv.js} +1 -1
- package/dist/assets/{package-BeYhVWvM.js → package-GSoSTiIK.js} +1 -1
- package/dist/assets/{package-data-BwaspaKJ.js → package-data-dv4FBHxR.js} +1 -1
- package/dist/assets/{packages-panel-CIvhx0hb.js → packages-panel-ClxOAEGy.js} +1 -1
- package/dist/assets/{panel-accordion-state-BI4SU22L.js → panel-accordion-state-GeMEdCPw.js} +1 -1
- package/dist/assets/{panel-context-BPaQeOuV.js → panel-context-C2QXpKfx.js} +1 -1
- package/dist/assets/panels-DfCmzLtT.js +4 -0
- package/dist/assets/{pathUtils-BKesuhdv.js → pathUtils-DPmlLd-r.js} +1 -1
- package/dist/assets/{paths-CzfpItSz.js → paths-bkIFVj8h.js} +1 -1
- package/dist/assets/{pegDiagram-XKGWAZYB-CiBJGPte.js → pegDiagram-XKGWAZYB-a0itOiYa.js} +1 -1
- package/dist/assets/{pieDiagram-E7YTZNPT-RpjpKhU6.js → pieDiagram-E7YTZNPT-DFve8H9P.js} +1 -1
- package/dist/assets/plus-C5silF6g.js +1 -0
- package/dist/assets/process-output-DNFKMODr.js +1 -0
- package/dist/assets/{quadrantDiagram-AXDQQJYC-Ci_qzCqs.js → quadrantDiagram-AXDQQJYC-yBhCDI7E.js} +1 -1
- package/dist/assets/{railroadDiagram-O6MQD6OU-B2IWK3fJ.js → railroadDiagram-O6MQD6OU-CgwdYhrd.js} +1 -1
- package/dist/assets/react-DVplv7_D.js +1 -0
- package/dist/assets/react-dom-_LrxgvjW.js +1 -0
- package/dist/assets/{react-icons.esm-C6SMwKZH.js → react-icons.esm-D6tfmvq8.js} +1 -1
- package/dist/assets/{react-resizable-panels.browser.esm-BL2E7f5c.js → react-resizable-panels.browser.esm-Dbe0MrFr.js} +1 -1
- package/dist/assets/{react-vega-Jq3Jd7eX.js → react-vega-C3rYGtP6.js} +1 -1
- package/dist/assets/{readonly-code-display-CNbw6v1-.js → readonly-code-display-YULOXf4h.js} +1 -1
- package/dist/assets/{readonly-python-code-DcYhdd1B.js → readonly-python-code-CadgXgRu.js} +1 -1
- package/dist/assets/{refresh-cw-CEGpOrzd.js → refresh-cw-Qw1f8Jhy.js} +1 -1
- package/dist/assets/{renderShortcut-BnRfkbwf.js → renderShortcut-BkVJQ_Zh.js} +1 -1
- package/dist/assets/requests-CgSY1X4a.js +1 -0
- package/dist/assets/{requests-yTHMxhVa.js → requests-lt0JK8Jt.js} +1 -1
- package/dist/assets/{requirementDiagram-BXWQKSXE-B0_CyV0T.js → requirementDiagram-BXWQKSXE-BCDzS-aV.js} +1 -1
- package/dist/assets/reveal-component-BVAR7ayZ.js +1069 -0
- package/dist/assets/{reveal-component-wEV_sB3u.css → reveal-component-DMRR6gKy.css} +1 -1
- package/dist/assets/{rotate-ccw-se3Oa1US.js → rotate-ccw-D8WCVWNE.js} +1 -1
- package/dist/assets/{rotate-cw-BcRERxHa.js → rotate-cw-CZ2syZTu.js} +1 -1
- package/dist/assets/{run-page-CVWospEP.js → run-page-Cxu1yV8Q.js} +1 -1
- package/dist/assets/{runs-DyluVj69.js → runs-BLp5jezv.js} +1 -1
- package/dist/assets/{runtime-details-state-lxXYwJcI.js → runtime-details-state-DuChzsA6.js} +1 -1
- package/dist/assets/{sankeyDiagram-P5KCCOFB-BekzhMvv.js → sankeyDiagram-P5KCCOFB-byYeKbB2.js} +1 -1
- package/dist/assets/{save-D4cG4pP2.js → save-Dgoim6QF.js} +1 -1
- package/dist/assets/save-worker-BbUSwZRG.js +118 -0
- package/dist/assets/schemas-Dv42wLFq.js +56 -0
- package/dist/assets/{scratchpad-panel-B4qlmwP-.js → scratchpad-panel-By-ybhjg.js} +1 -1
- package/dist/assets/{scroll-to-bottom-button-Dmrd5bjQ.js → scroll-to-bottom-button-1FyowpWV.js} +1 -1
- package/dist/assets/{secrets-panel-DT1Nansx.js → secrets-panel-Bctbtkrp.js} +1 -1
- package/dist/assets/{select-BwRFbZty.js → select-DTBn5eTb.js} +1 -1
- package/dist/assets/{sequenceDiagram-WJ2MYXX4-DELi1Kz5.js → sequenceDiagram-WJ2MYXX4-CLLPBM4B.js} +1 -1
- package/dist/assets/{session-BykGt6S3.js → session-DqoWmb7X.js} +1 -1
- package/dist/assets/session-panel-BmW6PH4z.js +1 -0
- package/dist/assets/{settings-DlKTeV_0.js → settings-BpdQZRgT.js} +1 -1
- package/dist/assets/{shell-BSnvn9t7.js → shell-Fj8a65ii.js} +1 -1
- package/dist/assets/{shim-5li_pJY_.js → shim-CjjJUhDo.js} +1 -1
- package/dist/assets/{skeleton-CKpBjoLm.js → skeleton-Cqh4O9g1.js} +1 -1
- package/dist/assets/{snippets-panel-YttkYAW9.js → snippets-panel-CQ1dn3lA.js} +1 -1
- package/dist/assets/{spec-D9d9nT0z.js → spec-BfSBcO5B.js} +1 -1
- package/dist/assets/{spinner-CGdRKCnw.js → spinner-DyNE-o8o.js} +1 -1
- package/dist/assets/square-BPmgQFnh.js +1 -0
- package/dist/assets/{square-function-DyFIOFp5.js → square-function-_W_Lo0P4.js} +1 -1
- package/dist/assets/state-BAJYRhmO.js +1 -0
- package/dist/assets/{state-BI0fn_YF.js → state-Bfh_2SLl.js} +1 -1
- package/dist/assets/{state-ja7GWeCS.js → state-C3oDoyFe.js} +1 -1
- package/dist/assets/{state-B2ZbImvm.js → state-DxQnC_1I.js} +1 -1
- package/dist/assets/{state-BxLm8vme.js → state-uwRvJLb8.js} +1 -1
- package/dist/assets/state-z3dlofZB.js +3 -0
- package/dist/assets/{stateDiagram-D77RDMKH-udui7EYS.js → stateDiagram-D77RDMKH-BeIsqkgQ.js} +1 -1
- package/dist/assets/stateDiagram-v2-MP3YSRHH-YdOj4q4D.js +1 -0
- package/dist/assets/{strings-hlCLC-K1.js → strings-B2vv-ENv.js} +1 -1
- package/dist/assets/{swimlanes-42K2YHIH-C-iTrYJs.js → swimlanes-42K2YHIH-CIhaeNCx.js} +1 -1
- package/dist/assets/swimlanesDiagram-VR7AAH4N-BLZbCKkx.js +8 -0
- package/dist/assets/{swiper-component-eXUBvFuA.js → swiper-component-a07domrZ.js} +1 -1
- package/dist/assets/{switch-C-83e2fG.js → switch-CTaiAjrz.js} +1 -1
- package/dist/assets/{table-B7KYyTxw.js → table-DG7Ap4H4.js} +1 -1
- package/dist/assets/{table-Dg1KxH-q.js → table-vrvqpuKJ.js} +1 -1
- package/dist/assets/{tabs-QRT1DYjj.js → tabs-BuQlZFbt.js} +1 -1
- package/dist/assets/{terminal-3hxM6K9q.js → terminal-Ck_vK-34.js} +1 -1
- package/dist/assets/{timeline-definition-24CTP7MA-D2u0nOZp.js → timeline-definition-24CTP7MA-BSH7-Tss.js} +1 -1
- package/dist/assets/toDate-DOj9Q6uC.js +1 -0
- package/dist/assets/{toast-BRwEbWb6.js → toast-BGzLGnvw.js} +1 -1
- package/dist/assets/{tooltip-B5pI8o2n.js → tooltip-C9TuY18o.js} +1 -1
- package/dist/assets/{tooltip-BeP4eX87.js → tooltip-mT3CGest.js} +1 -1
- package/dist/assets/{tracing-DZYfCw6p.js → tracing-BARlJ_Dk.js} +1 -1
- package/dist/assets/tracing-panel-dgnr2fIN.js +2 -0
- package/dist/assets/{trash-2-BJG-7Qob.js → trash-2-DcgaW8fn.js} +1 -1
- package/dist/assets/{trash-BKbZYRHl.js → trash-ChRHEGfM.js} +1 -1
- package/dist/assets/{tree-actions-D5clvgKl.js → tree-actions-DAd80MbP.js} +1 -1
- package/dist/assets/{triangle-alert-BeRqoThc.js → triangle-alert-DmIqR8sY.js} +1 -1
- package/dist/assets/{use-restore-focus-GUh2Nd8Z.js → use-restore-focus-BxEGwIbk.js} +1 -1
- package/dist/assets/{use-toast-CC89xOwH.js → use-toast-Wu434mLr.js} +1 -1
- package/dist/assets/{use-vega-container-remeasure-CS3c8wGN.js → use-vega-container-remeasure-BpmHehNK.js} +1 -1
- package/dist/assets/{useAddCell-Bhv6GT3m.js → useAddCell-DGstJK0S.js} +1 -1
- package/dist/assets/{useAsyncData-DucTwMkf.js → useAsyncData-C7aJJz0Y.js} +1 -1
- package/dist/assets/{useBoolean-Co-_MyFz.js → useBoolean-BDD6_xQQ.js} +1 -1
- package/dist/assets/{useCellActionButton-BTsPn8Dv.js → useCellActionButton-DY9RlJTb.js} +1 -1
- package/dist/assets/{useDateFormatter-CTYCgKB-.js → useDateFormatter-DA-62E-Y.js} +1 -1
- package/dist/assets/{useDebounce-DMbg9X18.js → useDebounce-B_ccBZTp.js} +1 -1
- package/dist/assets/useDeepCompareMemoize-DFIVN9dn.js +1 -0
- package/dist/assets/{useDeleteCell-BKN7t4DH.js → useDeleteCell-DFBGlSQk.js} +1 -1
- package/dist/assets/{useDependencyPanelTab-BTsnw2rN.js → useDependencyPanelTab-DydxsE5d.js} +1 -1
- package/dist/assets/{useEvent-Dc9HkKI2.js → useEvent-Dfcbgjhg.js} +1 -1
- package/dist/assets/{useEventListener-IRzG-0mH.js → useEventListener-D9cftcHj.js} +1 -1
- package/dist/assets/useIframeCapabilities-CwTkczVN.js +1 -0
- package/dist/assets/{useInstallPackage-HTUlGg0U.js → useInstallPackage-iX1eufdl.js} +1 -1
- package/dist/assets/{useInterval-D1QGqQ_I.js → useInterval--x3s1VpI.js} +1 -1
- package/dist/assets/{useLifecycle-DKSBdWUf.js → useLifecycle-Mq4gc5kS.js} +1 -1
- package/dist/assets/useNotebookActions-DfvB7RD_.js +1 -0
- package/dist/assets/{useNumberFormatter-BP99Zbyy.js → useNumberFormatter-D7O_26UI.js} +1 -1
- package/dist/assets/{useRunCells-zMO43eNR.js → useRunCells-BFjFX3hz.js} +1 -1
- package/dist/assets/useSplitCell-Tqv5pPtL.js +1 -0
- package/dist/assets/{useTheme-BkPLyRl9.js → useTheme-COhSHkCj.js} +1 -1
- package/dist/assets/{vega-component-Chbfi__Q.js → vega-component-CnadTgoE.js} +1 -1
- package/dist/assets/vega-embed-container-DJPNkHPb.js +1 -0
- package/dist/assets/{vennDiagram-4TSXK5OY-BKSHsv-w.js → vennDiagram-4TSXK5OY-DsmfChmC.js} +1 -1
- package/dist/assets/{wardleyDiagram-VM6X3IG4-CUDQDDoy.js → wardleyDiagram-VM6X3IG4-BDZlVpJI.js} +1 -1
- package/dist/assets/worker-DTQ7oH2A.js +158 -0
- package/dist/assets/{workflow-nBi9HGeO.js → workflow-cw-0b9g5.js} +1 -1
- package/dist/assets/{write-secret-modal-BcosCmZy.js → write-secret-modal-DzKAInL2.js} +1 -1
- package/dist/assets/{xychartDiagram-S5SC5T6Z-BXDsTxGu.js → xychartDiagram-S5SC5T6Z-KbGzG6-u.js} +1 -1
- package/dist/assets/{youtube-2MBs34oQ.js → youtube-CbJhsgLy.js} +1 -1
- package/dist/index.html +122 -123
- package/package.json +25 -22
- package/src/__tests__/fixtures/{pair-preview.ts → pair-config.ts} +3 -2
- package/src/__tests__/host-imports.test.ts +100 -0
- package/src/__tests__/mount.test.ts +8 -8
- package/src/components/data-table/__tests__/column_formatting.test.ts +30 -0
- package/src/components/data-table/__tests__/columns.test.tsx +70 -0
- package/src/components/data-table/__tests__/context-menu.test.ts +176 -0
- package/src/components/data-table/__tests__/date-filter-inputs.test.tsx +24 -1
- package/src/components/data-table/__tests__/export-actions.test.tsx +329 -6
- package/src/components/data-table/column-formatting/feature.ts +20 -1
- package/src/components/data-table/columns.tsx +25 -18
- package/src/components/data-table/context-menu.tsx +125 -26
- package/src/components/data-table/date-filter-inputs.tsx +15 -42
- package/src/components/data-table/export-actions.tsx +192 -116
- package/src/components/data-table/schemas.ts +14 -36
- package/src/components/data-table/utils.ts +18 -0
- package/src/components/editor/Output.tsx +9 -2
- package/src/components/editor/actions/__tests__/pair-with-agent-commands.test.ts +80 -252
- package/src/components/editor/actions/__tests__/pair-with-agent-modal.test.tsx +186 -34
- package/src/components/editor/actions/pair-with-agent-commands.ts +42 -51
- package/src/components/editor/actions/pair-with-agent-modal.tsx +96 -36
- package/src/components/editor/chrome/panels/error-panel.tsx +1 -0
- package/src/components/editor/chrome/wrapper/__tests__/attachment-status.test.tsx +372 -0
- package/src/components/editor/chrome/wrapper/footer-item.tsx +32 -24
- package/src/components/editor/chrome/wrapper/footer-items/attachment-status.tsx +237 -0
- package/src/components/editor/chrome/wrapper/footer.tsx +2 -0
- package/src/components/editor/controls/__tests__/notebook-menu-dropdown.test.tsx +4 -3
- package/src/components/editor/errors/__tests__/send-error-report-button.test.tsx +548 -0
- package/src/components/editor/errors/send-error-report-button.tsx +69 -0
- package/src/components/editor/output/MarimoErrorOutput.tsx +21 -5
- package/src/components/editor/output/MarimoTracebackOutput.tsx +35 -20
- package/src/components/editor/output/__tests__/ansi-reduce.test.ts +18 -0
- package/src/components/editor/output/ansi-reduce.ts +6 -0
- package/src/components/editor/output/console/ConsoleOutput.tsx +5 -3
- package/src/components/editor/output/console/__tests__/ConsoleOutput.test.tsx +18 -0
- package/src/components/storage/__tests__/storage-file-viewer.test.tsx +2 -1
- package/src/core/attachments/__tests__/toast.test.tsx +58 -0
- package/src/core/attachments/state.ts +21 -0
- package/src/core/attachments/toast.ts +15 -0
- package/src/core/cells/__tests__/cells.test.ts +52 -0
- package/src/core/cells/__tests__/document-roundtrip.test.ts +16 -0
- package/src/core/cells/__tests__/error-report.test.ts +139 -0
- package/src/core/cells/__tests__/session.test.ts +50 -1
- package/src/core/cells/error-report.ts +63 -0
- package/src/core/cells/session.ts +28 -1
- package/src/core/codemirror/copilot/__tests__/completion-integration.test.ts +447 -0
- package/src/core/codemirror/copilot/__tests__/inline-completion.test.ts +395 -0
- package/src/core/codemirror/copilot/__tests__/language-server.test.ts +511 -2
- package/src/core/codemirror/copilot/__tests__/rpc-cancellation.test.ts +201 -0
- package/src/core/codemirror/copilot/extension.ts +22 -11
- package/src/core/codemirror/copilot/language-server.ts +109 -60
- package/src/core/codemirror/language/__tests__/sql.test.ts +4 -3
- package/src/core/codemirror/language/embedded/__tests__/embedded-python.test.ts +138 -26
- package/src/core/codemirror/language/embedded/embedded-python.ts +47 -13
- package/src/core/codemirror/language/embedded/latex.ts +20 -13
- package/src/core/config/pair.ts +5 -3
- package/src/core/datasets/__tests__/data-source-discovery.test.ts +18 -11
- package/src/core/host/AGENTS.md +6 -0
- package/src/core/host/__tests__/protocol.test.ts +214 -0
- package/src/core/host/protocol.ts +1943 -0
- package/src/core/islands/__tests__/bootstrap.test.ts +26 -0
- package/src/core/islands/bootstrap.ts +1 -0
- package/src/core/islands/bridge.ts +2 -2
- package/src/core/kernel/messages.ts +4 -7
- package/src/core/network/__tests__/api.test.ts +114 -1
- package/src/core/network/api.ts +3 -2
- package/src/core/wasm/bridge.ts +2 -2
- package/src/core/wasm/worker/types.ts +2 -2
- package/src/core/websocket/__tests__/useMarimoKernelConnection.hook.test.tsx +193 -0
- package/src/core/websocket/useMarimoKernelConnection.tsx +9 -0
- package/src/css/katex-css.test.ts +1 -1
- package/src/css/katex.min.css +6 -1
- package/src/hooks/__tests__/useEventListener.test.tsx +45 -1
- package/src/hooks/useEventListener.ts +6 -1
- package/src/mount.tsx +3 -3
- package/src/plugins/impl/NumberPlugin.tsx +20 -3
- package/src/plugins/impl/__tests__/DataTablePlugin.test.tsx +84 -0
- package/src/plugins/impl/__tests__/NumberPlugin.test.tsx +159 -1
- package/src/utils/__tests__/dates.test.ts +116 -0
- package/src/utils/dates.ts +94 -0
- package/dist/assets/JsonOutput-DCGUcLVV.js +0 -11
- package/dist/assets/MarimoErrorOutput-BEsxXqp6.js +0 -6
- package/dist/assets/__vite-browser-external-BgsHWynV.js +0 -1
- package/dist/assets/__vite-browser-external-DMJaCYJh.js +0 -1
- package/dist/assets/add-cell-with-ai-Wyt6GBhk.js +0 -76
- package/dist/assets/ai-model-dropdown-CvJsRj9y.js +0 -5
- package/dist/assets/api-DVLtXyp7.js +0 -1
- package/dist/assets/app-config-button-C7QrZbqr.js +0 -1
- package/dist/assets/arrow-down-BFFrjzad.js +0 -1
- package/dist/assets/arrow-left-DzPJ79ZB.js +0 -1
- package/dist/assets/arrow-right-xoNT7eIQ.js +0 -1
- package/dist/assets/ban-3HAzm9Fj.js +0 -1
- package/dist/assets/cells-CxY8RSp7.js +0 -220
- package/dist/assets/channel-DXBvxHxq.js +0 -1
- package/dist/assets/chat-panel-BZipGUZV.js +0 -4
- package/dist/assets/check-Wea4hZ6R.js +0 -1
- package/dist/assets/chevron-right-DOPs2jx8.js +0 -1
- package/dist/assets/circle-check-BF80fXZd.js +0 -1
- package/dist/assets/classDiagram-ZZMXUADV--9ShP1h2.js +0 -1
- package/dist/assets/classDiagram-v2-VYDZK3BY--9ShP1h2.js +0 -1
- package/dist/assets/code-DW4kNwKG.js +0 -1
- package/dist/assets/coerce-CZiN7rQ_.js +0 -1
- package/dist/assets/command-palette-BM9fUfEe.js +0 -1
- package/dist/assets/config-CR2d-XsP.js +0 -1
- package/dist/assets/dates-BgcKUsHb.js +0 -1
- package/dist/assets/edit-page-Ctwp3mZE.js +0 -9
- package/dist/assets/feedback-button-DxjoRfo3.js +0 -1
- package/dist/assets/flowDiagram-HODETNUW-BGVnBaF-.js +0 -1
- package/dist/assets/index-B3pNgH5o.js +0 -29
- package/dist/assets/index-CXX6l_22.css +0 -2
- package/dist/assets/katex-CQIbPNPT.js +0 -1
- package/dist/assets/kiosk-mode-DCHo0R3W.js +0 -1
- package/dist/assets/links-BJx6KCyC.js +0 -1
- package/dist/assets/loro_wasm_bg-PyJsS6iH.wasm +0 -0
- package/dist/assets/loro_wasm_bg-Vo2IoHaL.js +0 -1
- package/dist/assets/loro_wasm_bg-oTW3uoGB.js +0 -1
- package/dist/assets/mermaid-HWGCJPDP-Bk1fR60Q.js +0 -1
- package/dist/assets/pair-_FSgYVX4.js +0 -1
- package/dist/assets/panels-BdsXFz1w.js +0 -4
- package/dist/assets/plus-gbN72xHe.js +0 -1
- package/dist/assets/process-output-Crm0vqbi.js +0 -1
- package/dist/assets/react-CUdNIagt.js +0 -1
- package/dist/assets/react-dom-CKsE8sC1.js +0 -1
- package/dist/assets/requests-DFPPfagc.js +0 -1
- package/dist/assets/reveal-component-B5GUiD5Q.js +0 -1069
- package/dist/assets/save-worker-C880NC3o.js +0 -113
- package/dist/assets/schemas-BL-NsLlF.js +0 -51
- package/dist/assets/session-panel-Ch5jQNj0.js +0 -1
- package/dist/assets/square-DvOKKLHZ.js +0 -1
- package/dist/assets/state-YaAkDV8S.js +0 -1
- package/dist/assets/state-sbCCk7ZP.js +0 -3
- package/dist/assets/stateDiagram-v2-MP3YSRHH-BhduIvF1.js +0 -1
- package/dist/assets/swimlanesDiagram-VR7AAH4N-WC2Zewqb.js +0 -8
- package/dist/assets/toDate-BbJ1_N2T.js +0 -1
- package/dist/assets/tracing-panel-BUPJ77jB.js +0 -2
- package/dist/assets/useDeepCompareMemoize-DSlTt6u_.js +0 -1
- package/dist/assets/useIframeCapabilities-yd8sMuIo.js +0 -1
- package/dist/assets/useNotebookActions-BzJtySGp.js +0 -1
- package/dist/assets/useSplitCell-xEtFLByO.js +0 -1
- package/dist/assets/vega-embed-container-CRZZ4FTx.js +0 -1
- package/dist/assets/worker-B5tVfGoh.js +0 -153
|
@@ -17,18 +17,16 @@ import { Events } from "@/utils/events";
|
|
|
17
17
|
import { Tooltip } from "@/components/ui/tooltip";
|
|
18
18
|
import { asRemoteURL, useRuntimeManager } from "@/core/runtime/config";
|
|
19
19
|
import { API } from "@/core/network/api";
|
|
20
|
-
import {
|
|
20
|
+
import { pairConfigAtom } from "@/core/config/pair";
|
|
21
21
|
import { stableSessionIdAtom } from "@/core/kernel/session";
|
|
22
22
|
import {
|
|
23
23
|
AGENT_LABELS,
|
|
24
24
|
AGENT_TABS,
|
|
25
25
|
type AgentTab,
|
|
26
26
|
type ConnectionInfo,
|
|
27
|
-
getFileFromURL,
|
|
28
27
|
getRawPrompt,
|
|
29
28
|
getTerminalCommand,
|
|
30
29
|
maskToken,
|
|
31
|
-
SKILL_INSTALL,
|
|
32
30
|
TERMINAL_TABS,
|
|
33
31
|
} from "./pair-with-agent-commands";
|
|
34
32
|
|
|
@@ -52,15 +50,64 @@ export const PairWithAgentModal: React.FC<{
|
|
|
52
50
|
}> = ({ onClose }) => {
|
|
53
51
|
const [activeTab, setActiveTab] = useState<AgentTab>("claude");
|
|
54
52
|
const runtimeManager = useRuntimeManager();
|
|
55
|
-
const
|
|
53
|
+
const config = useAtomValue(pairConfigAtom);
|
|
54
|
+
const hostEnabled = config?.hostEnabled ?? false;
|
|
56
55
|
const stableSessionId = useAtomValue(stableSessionIdAtom);
|
|
57
|
-
const
|
|
56
|
+
const [lookup, setLookup] = useState<
|
|
57
|
+
{
|
|
58
|
+
sessionId: string;
|
|
59
|
+
} & (
|
|
60
|
+
| { status: "ready"; notebookId: string | null }
|
|
61
|
+
| { status: "loading" | "error" }
|
|
62
|
+
)
|
|
63
|
+
>();
|
|
64
|
+
useEffect(() => {
|
|
65
|
+
if (!hostEnabled || !stableSessionId) {
|
|
66
|
+
setLookup(undefined);
|
|
67
|
+
return;
|
|
68
|
+
}
|
|
69
|
+
const sessionId = stableSessionId;
|
|
70
|
+
setLookup({ sessionId, status: "loading" });
|
|
71
|
+
let cancelled = false;
|
|
72
|
+
API.get<Record<string, { session_id: string; notebook_id: string | null }>>(
|
|
73
|
+
"/sessions",
|
|
74
|
+
)
|
|
75
|
+
.then((sessions) => {
|
|
76
|
+
if (!cancelled) {
|
|
77
|
+
const session = Object.values(sessions).find(
|
|
78
|
+
(session) => session.session_id === sessionId,
|
|
79
|
+
);
|
|
80
|
+
setLookup(
|
|
81
|
+
session
|
|
82
|
+
? { sessionId, status: "ready", notebookId: session.notebook_id }
|
|
83
|
+
: { sessionId, status: "error" },
|
|
84
|
+
);
|
|
85
|
+
}
|
|
86
|
+
})
|
|
87
|
+
.catch(() => {
|
|
88
|
+
if (!cancelled) {
|
|
89
|
+
setLookup({ sessionId, status: "error" });
|
|
90
|
+
}
|
|
91
|
+
});
|
|
92
|
+
return () => {
|
|
93
|
+
cancelled = true;
|
|
94
|
+
};
|
|
95
|
+
}, [hostEnabled, stableSessionId]);
|
|
96
|
+
const currentLookup =
|
|
97
|
+
lookup?.sessionId === stableSessionId ? lookup : undefined;
|
|
98
|
+
const verified = !hostEnabled || currentLookup?.status === "ready";
|
|
99
|
+
const notebookId =
|
|
100
|
+
hostEnabled && currentLookup?.status === "ready"
|
|
101
|
+
? currentLookup.notebookId
|
|
102
|
+
: undefined;
|
|
103
|
+
const targetReady = Boolean(stableSessionId) && verified;
|
|
58
104
|
const authToken = useAuthToken();
|
|
59
105
|
const hasToken = Boolean(authToken);
|
|
60
106
|
const connection: ConnectionInfo = {
|
|
61
107
|
url: runtimeManager.httpURL.toString(),
|
|
62
|
-
|
|
63
|
-
session:
|
|
108
|
+
notebook: notebookId ?? undefined,
|
|
109
|
+
session:
|
|
110
|
+
targetReady && !notebookId ? (stableSessionId ?? undefined) : undefined,
|
|
64
111
|
};
|
|
65
112
|
|
|
66
113
|
return (
|
|
@@ -83,6 +130,13 @@ export const PairWithAgentModal: React.FC<{
|
|
|
83
130
|
</DialogHeader>
|
|
84
131
|
|
|
85
132
|
<div className="flex flex-col gap-4 py-2">
|
|
133
|
+
{!targetReady && (
|
|
134
|
+
<output className="text-sm text-muted-foreground">
|
|
135
|
+
{currentLookup?.status === "error"
|
|
136
|
+
? "Could not verify this notebook. Close this dialog and try again."
|
|
137
|
+
: "Waiting for the notebook connection…"}
|
|
138
|
+
</output>
|
|
139
|
+
)}
|
|
86
140
|
<Tabs
|
|
87
141
|
value={activeTab}
|
|
88
142
|
onValueChange={(v) => setActiveTab(v as AgentTab)}
|
|
@@ -101,30 +155,27 @@ export const PairWithAgentModal: React.FC<{
|
|
|
101
155
|
value={tab}
|
|
102
156
|
className="mt-4 flex flex-col gap-4"
|
|
103
157
|
>
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
<Step index={commandStep} title="Run in your terminal">
|
|
158
|
+
<Step
|
|
159
|
+
index={1}
|
|
160
|
+
title="Run in your terminal"
|
|
161
|
+
hint={
|
|
162
|
+
hostEnabled && tab === "opencode"
|
|
163
|
+
? "Agent connections require OpenCode 2.x."
|
|
164
|
+
: undefined
|
|
165
|
+
}
|
|
166
|
+
>
|
|
114
167
|
<CommandBlock
|
|
115
168
|
command={getTerminalCommand(
|
|
116
169
|
tab,
|
|
117
170
|
connection,
|
|
118
171
|
hasToken,
|
|
119
|
-
|
|
172
|
+
config,
|
|
120
173
|
)}
|
|
174
|
+
disabled={!targetReady}
|
|
121
175
|
/>
|
|
122
176
|
</Step>
|
|
123
177
|
{hasToken && authToken && (
|
|
124
|
-
<Step
|
|
125
|
-
index={commandStep + 1}
|
|
126
|
-
title="Paste when prompted for a token"
|
|
127
|
-
>
|
|
178
|
+
<Step index={2} title="Paste when prompted for a token">
|
|
128
179
|
<CommandBlock
|
|
129
180
|
command={authToken}
|
|
130
181
|
display={maskToken(authToken)}
|
|
@@ -136,17 +187,8 @@ export const PairWithAgentModal: React.FC<{
|
|
|
136
187
|
))}
|
|
137
188
|
|
|
138
189
|
<TabsContent value="prompt" className="mt-4 flex flex-col gap-4">
|
|
139
|
-
{!preview && (
|
|
140
|
-
<Step
|
|
141
|
-
index={1}
|
|
142
|
-
title="Make sure the marimo-pair skill is available to your agent"
|
|
143
|
-
hint="Skip if your agent already has it."
|
|
144
|
-
>
|
|
145
|
-
<CommandBlock command={SKILL_INSTALL} />
|
|
146
|
-
</Step>
|
|
147
|
-
)}
|
|
148
190
|
<Step
|
|
149
|
-
index={
|
|
191
|
+
index={1}
|
|
150
192
|
title="Copy this prompt into your agent"
|
|
151
193
|
hint={
|
|
152
194
|
hasToken
|
|
@@ -155,13 +197,14 @@ export const PairWithAgentModal: React.FC<{
|
|
|
155
197
|
}
|
|
156
198
|
>
|
|
157
199
|
<CommandBlock
|
|
158
|
-
command={getRawPrompt(connection, authToken,
|
|
200
|
+
command={getRawPrompt(connection, authToken, config)}
|
|
159
201
|
display={getRawPrompt(
|
|
160
202
|
connection,
|
|
161
203
|
authToken ? maskToken(authToken) : null,
|
|
162
|
-
|
|
204
|
+
config,
|
|
163
205
|
)}
|
|
164
206
|
multiline={true}
|
|
207
|
+
disabled={!targetReady}
|
|
165
208
|
/>
|
|
166
209
|
</Step>
|
|
167
210
|
</TabsContent>
|
|
@@ -199,11 +242,21 @@ const CommandBlock: React.FC<{
|
|
|
199
242
|
display?: string;
|
|
200
243
|
multiline?: boolean;
|
|
201
244
|
copyLabel?: string;
|
|
202
|
-
|
|
245
|
+
disabled?: boolean;
|
|
246
|
+
}> = ({
|
|
247
|
+
command,
|
|
248
|
+
display,
|
|
249
|
+
multiline = false,
|
|
250
|
+
copyLabel = "Copy command",
|
|
251
|
+
disabled = false,
|
|
252
|
+
}) => {
|
|
203
253
|
const [copied, setCopied] = useState(false);
|
|
204
254
|
|
|
205
255
|
const copy = Events.stopPropagation(async (e) => {
|
|
206
256
|
e.preventDefault();
|
|
257
|
+
if (disabled) {
|
|
258
|
+
return;
|
|
259
|
+
}
|
|
207
260
|
await copyToClipboard(command);
|
|
208
261
|
setCopied(true);
|
|
209
262
|
setTimeout(() => setCopied(false), 2000);
|
|
@@ -218,6 +271,7 @@ const CommandBlock: React.FC<{
|
|
|
218
271
|
<Tooltip content="Copied!" open={copied}>
|
|
219
272
|
<Button
|
|
220
273
|
aria-label="Copy prompt"
|
|
274
|
+
disabled={disabled}
|
|
221
275
|
onClick={copy}
|
|
222
276
|
size="xs"
|
|
223
277
|
variant="ghost"
|
|
@@ -240,7 +294,13 @@ const CommandBlock: React.FC<{
|
|
|
240
294
|
{display ?? command}
|
|
241
295
|
</code>
|
|
242
296
|
<Tooltip content="Copied!" open={copied}>
|
|
243
|
-
<Button
|
|
297
|
+
<Button
|
|
298
|
+
aria-label={copyLabel}
|
|
299
|
+
onClick={copy}
|
|
300
|
+
size="xs"
|
|
301
|
+
variant="ghost"
|
|
302
|
+
disabled={disabled}
|
|
303
|
+
>
|
|
244
304
|
{copied ? (
|
|
245
305
|
<CheckIcon size={14} strokeWidth={1.5} />
|
|
246
306
|
) : (
|
|
@@ -0,0 +1,372 @@
|
|
|
1
|
+
/* Copyright 2026 Marimo. All rights reserved. */
|
|
2
|
+
// @vitest-environment jsdom
|
|
3
|
+
|
|
4
|
+
import {
|
|
5
|
+
act,
|
|
6
|
+
fireEvent,
|
|
7
|
+
render,
|
|
8
|
+
screen,
|
|
9
|
+
waitFor,
|
|
10
|
+
} from "@testing-library/react";
|
|
11
|
+
import { createStore, Provider } from "jotai";
|
|
12
|
+
import { userEvent } from "storybook/test";
|
|
13
|
+
import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";
|
|
14
|
+
import { PAIR_CONFIG } from "@/__tests__/fixtures/pair-config";
|
|
15
|
+
import { TooltipProvider } from "@/components/ui/tooltip";
|
|
16
|
+
import { toast } from "@/components/ui/use-toast";
|
|
17
|
+
import { type Attachment, attachmentsAtom } from "@/core/attachments/state";
|
|
18
|
+
import { pairConfigAtom } from "@/core/config/pair";
|
|
19
|
+
import {
|
|
20
|
+
type StableSessionId,
|
|
21
|
+
stableSessionIdAtom,
|
|
22
|
+
} from "@/core/kernel/session";
|
|
23
|
+
import { API } from "@/core/network/api";
|
|
24
|
+
import { connectionAtom } from "@/core/network/connection";
|
|
25
|
+
import { WebSocketClosedReason, ConnectionState } from "@/core/websocket/types";
|
|
26
|
+
import { Deferred } from "@/utils/Deferred";
|
|
27
|
+
import { AttachmentStatus } from "../footer-items/attachment-status";
|
|
28
|
+
|
|
29
|
+
vi.mock("@/components/ui/use-toast", () => ({ toast: vi.fn() }));
|
|
30
|
+
vi.mock("@/core/network/api", () => ({ API: { post: vi.fn() } }));
|
|
31
|
+
|
|
32
|
+
const AGENT: Attachment = {
|
|
33
|
+
id: "a1",
|
|
34
|
+
kind: "agent",
|
|
35
|
+
name: "Pi",
|
|
36
|
+
since: new Date().toISOString(),
|
|
37
|
+
notebook_id: "nb-one",
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
function renderStatus(attachments: Attachment[] = [AGENT], preview = true) {
|
|
41
|
+
const store = createStore();
|
|
42
|
+
store.set(connectionAtom, { state: ConnectionState.OPEN });
|
|
43
|
+
store.set(pairConfigAtom, { ...PAIR_CONFIG, hostEnabled: preview });
|
|
44
|
+
store.set(attachmentsAtom, attachments);
|
|
45
|
+
store.set(stableSessionIdAtom, "stable/test" as StableSessionId);
|
|
46
|
+
return {
|
|
47
|
+
store,
|
|
48
|
+
...render(
|
|
49
|
+
<Provider store={store}>
|
|
50
|
+
<TooltipProvider>
|
|
51
|
+
<AttachmentStatus />
|
|
52
|
+
</TooltipProvider>
|
|
53
|
+
</Provider>,
|
|
54
|
+
),
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
describe("AttachmentStatus", () => {
|
|
59
|
+
beforeEach(() => {
|
|
60
|
+
vi.clearAllMocks();
|
|
61
|
+
vi.mocked(API.post).mockResolvedValue("");
|
|
62
|
+
vi.mocked(toast).mockReturnValue({
|
|
63
|
+
id: "notice",
|
|
64
|
+
dismiss: vi.fn(),
|
|
65
|
+
update: vi.fn(),
|
|
66
|
+
upsert: vi.fn(),
|
|
67
|
+
});
|
|
68
|
+
});
|
|
69
|
+
|
|
70
|
+
afterEach(() => {
|
|
71
|
+
vi.useRealTimers();
|
|
72
|
+
});
|
|
73
|
+
|
|
74
|
+
it("renders nothing when host is disabled", () => {
|
|
75
|
+
expect(renderStatus([AGENT], false).container).toBeEmptyDOMElement();
|
|
76
|
+
});
|
|
77
|
+
|
|
78
|
+
it("renders nothing without agents", () => {
|
|
79
|
+
expect(
|
|
80
|
+
renderStatus([{ ...AGENT, kind: "client" }]).container,
|
|
81
|
+
).toBeEmptyDOMElement();
|
|
82
|
+
});
|
|
83
|
+
|
|
84
|
+
it("lists each agent by its self-described name", () => {
|
|
85
|
+
renderStatus([
|
|
86
|
+
AGENT,
|
|
87
|
+
{ ...AGENT, id: "a2", name: "Claude Code" },
|
|
88
|
+
{ ...AGENT, id: "c1", kind: "client", name: "Browser" },
|
|
89
|
+
]);
|
|
90
|
+
expect(screen.getAllByTestId("footer-attachment-status")).toHaveLength(1);
|
|
91
|
+
expect(screen.getByLabelText("2 agents connected")).toBeInTheDocument();
|
|
92
|
+
expect(screen.getByRole("heading", { name: "Pi" })).toBeInTheDocument();
|
|
93
|
+
expect(
|
|
94
|
+
screen.getByRole("heading", { name: "Claude Code" }),
|
|
95
|
+
).toBeInTheDocument();
|
|
96
|
+
expect(screen.getByText("a1")).toBeInTheDocument();
|
|
97
|
+
expect(screen.getByText("a2")).toBeInTheDocument();
|
|
98
|
+
expect(screen.queryByText("Browser")).not.toBeInTheDocument();
|
|
99
|
+
expect(screen.getAllByText(/^Connected /)).toHaveLength(2);
|
|
100
|
+
});
|
|
101
|
+
|
|
102
|
+
it("uses Agent when no name was supplied", () => {
|
|
103
|
+
renderStatus([{ ...AGENT, name: null }]);
|
|
104
|
+
expect(screen.getByLabelText("Agent connected")).toBeInTheDocument();
|
|
105
|
+
});
|
|
106
|
+
|
|
107
|
+
it.each(["{Enter}", " "])("opens from the keyboard with %j", async (key) => {
|
|
108
|
+
vi.useFakeTimers();
|
|
109
|
+
renderStatus();
|
|
110
|
+
act(() => vi.advanceTimersByTime(3000));
|
|
111
|
+
vi.useRealTimers();
|
|
112
|
+
const user = userEvent.setup();
|
|
113
|
+
const button = screen.getByRole("button", { name: "Pi connected" });
|
|
114
|
+
expect(button.tagName).toBe("BUTTON");
|
|
115
|
+
expect(button).toHaveAttribute("type", "button");
|
|
116
|
+
await user.tab();
|
|
117
|
+
expect(button).toHaveFocus();
|
|
118
|
+
await user.keyboard(key);
|
|
119
|
+
expect(button).toHaveAttribute("aria-expanded", "true");
|
|
120
|
+
expect(screen.getByText(/^Connected /)).toBeInTheDocument();
|
|
121
|
+
await user.keyboard("{Escape}");
|
|
122
|
+
expect(button).toHaveAttribute("aria-expanded", "false");
|
|
123
|
+
expect(button).toHaveFocus();
|
|
124
|
+
});
|
|
125
|
+
|
|
126
|
+
it("opens for three seconds on connection without moving editor focus", () => {
|
|
127
|
+
vi.useFakeTimers();
|
|
128
|
+
const { store } = renderStatus([]);
|
|
129
|
+
const editor = document.createElement("textarea");
|
|
130
|
+
document.body.append(editor);
|
|
131
|
+
editor.focus();
|
|
132
|
+
act(() => store.set(attachmentsAtom, [AGENT]));
|
|
133
|
+
const trigger = screen.getByRole("button", { name: "Pi connected" });
|
|
134
|
+
expect(trigger).toHaveAttribute("aria-expanded", "true");
|
|
135
|
+
expect(editor).toHaveFocus();
|
|
136
|
+
act(() => vi.advanceTimersByTime(3000));
|
|
137
|
+
expect(trigger).toHaveAttribute("aria-expanded", "false");
|
|
138
|
+
expect(editor).toHaveFocus();
|
|
139
|
+
editor.remove();
|
|
140
|
+
});
|
|
141
|
+
|
|
142
|
+
it("reopens on a new agent but not a metadata update or disconnection", () => {
|
|
143
|
+
vi.useFakeTimers();
|
|
144
|
+
const { store } = renderStatus();
|
|
145
|
+
act(() => vi.advanceTimersByTime(3000));
|
|
146
|
+
act(() => store.set(attachmentsAtom, [{ ...AGENT, name: "New name" }]));
|
|
147
|
+
expect(screen.getByLabelText("New name connected")).toHaveAttribute(
|
|
148
|
+
"aria-expanded",
|
|
149
|
+
"false",
|
|
150
|
+
);
|
|
151
|
+
act(() => store.set(attachmentsAtom, [AGENT, { ...AGENT, id: "a2" }]));
|
|
152
|
+
expect(screen.getByLabelText("2 agents connected")).toHaveAttribute(
|
|
153
|
+
"aria-expanded",
|
|
154
|
+
"true",
|
|
155
|
+
);
|
|
156
|
+
act(() => vi.advanceTimersByTime(3000));
|
|
157
|
+
act(() => store.set(attachmentsAtom, [AGENT]));
|
|
158
|
+
expect(screen.getByLabelText("Pi connected")).toHaveAttribute(
|
|
159
|
+
"aria-expanded",
|
|
160
|
+
"false",
|
|
161
|
+
);
|
|
162
|
+
});
|
|
163
|
+
|
|
164
|
+
it("keeps manually opened details open past the automatic timeout", () => {
|
|
165
|
+
vi.useFakeTimers();
|
|
166
|
+
renderStatus();
|
|
167
|
+
const trigger = screen.getByLabelText("Pi connected");
|
|
168
|
+
fireEvent.click(trigger);
|
|
169
|
+
fireEvent.click(trigger);
|
|
170
|
+
act(() => vi.advanceTimersByTime(5000));
|
|
171
|
+
expect(trigger).toHaveAttribute("aria-expanded", "true");
|
|
172
|
+
});
|
|
173
|
+
|
|
174
|
+
it("keeps manual confirmation open when another agent connects", () => {
|
|
175
|
+
vi.useFakeTimers();
|
|
176
|
+
const { store } = renderStatus();
|
|
177
|
+
const trigger = screen.getByLabelText("Pi connected");
|
|
178
|
+
fireEvent.click(trigger);
|
|
179
|
+
fireEvent.click(trigger);
|
|
180
|
+
fireEvent.click(screen.getByRole("button", { name: "Disconnect Pi" }));
|
|
181
|
+
act(() =>
|
|
182
|
+
store.set(attachmentsAtom, [
|
|
183
|
+
AGENT,
|
|
184
|
+
{ ...AGENT, id: "a2", name: "Claude" },
|
|
185
|
+
]),
|
|
186
|
+
);
|
|
187
|
+
act(() => vi.advanceTimersByTime(5000));
|
|
188
|
+
expect(
|
|
189
|
+
screen.getByRole("button", { name: "Confirm disconnect Pi" }),
|
|
190
|
+
).toBeInTheDocument();
|
|
191
|
+
expect(API.post).not.toHaveBeenCalled();
|
|
192
|
+
});
|
|
193
|
+
|
|
194
|
+
it("keeps focused details open when another agent connects", () => {
|
|
195
|
+
vi.useFakeTimers();
|
|
196
|
+
const { store } = renderStatus();
|
|
197
|
+
act(() => screen.getByRole("button", { name: "Disconnect Pi" }).focus());
|
|
198
|
+
act(() => store.set(attachmentsAtom, [AGENT, { ...AGENT, id: "a2" }]));
|
|
199
|
+
act(() => vi.advanceTimersByTime(5000));
|
|
200
|
+
expect(screen.getByRole("dialog")).toBeInTheDocument();
|
|
201
|
+
});
|
|
202
|
+
|
|
203
|
+
it("keeps hovered details open when another agent connects", () => {
|
|
204
|
+
vi.useFakeTimers();
|
|
205
|
+
const { store } = renderStatus();
|
|
206
|
+
fireEvent.pointerEnter(screen.getByRole("dialog"));
|
|
207
|
+
act(() => store.set(attachmentsAtom, [AGENT, { ...AGENT, id: "a2" }]));
|
|
208
|
+
act(() => vi.advanceTimersByTime(5000));
|
|
209
|
+
expect(screen.getByRole("dialog")).toBeInTheDocument();
|
|
210
|
+
});
|
|
211
|
+
|
|
212
|
+
it("pauses the automatic close while the pointer is over the details", () => {
|
|
213
|
+
vi.useFakeTimers();
|
|
214
|
+
renderStatus();
|
|
215
|
+
const details = screen.getByRole("dialog");
|
|
216
|
+
fireEvent.pointerEnter(details);
|
|
217
|
+
act(() => vi.advanceTimersByTime(5000));
|
|
218
|
+
expect(screen.getByLabelText("Pi connected")).toHaveAttribute(
|
|
219
|
+
"aria-expanded",
|
|
220
|
+
"true",
|
|
221
|
+
);
|
|
222
|
+
fireEvent.pointerLeave(details);
|
|
223
|
+
act(() => vi.advanceTimersByTime(3000));
|
|
224
|
+
expect(screen.getByLabelText("Pi connected")).toHaveAttribute(
|
|
225
|
+
"aria-expanded",
|
|
226
|
+
"false",
|
|
227
|
+
);
|
|
228
|
+
});
|
|
229
|
+
|
|
230
|
+
it("groups identities while keeping separate attachment rows", () => {
|
|
231
|
+
renderStatus([
|
|
232
|
+
{ ...AGENT, identity: "same" },
|
|
233
|
+
{ ...AGENT, id: "a2", identity: "same" },
|
|
234
|
+
]);
|
|
235
|
+
expect(screen.getByLabelText("Pi connected")).toBeInTheDocument();
|
|
236
|
+
expect(
|
|
237
|
+
screen.getAllByRole("button", { name: "Disconnect Pi" }),
|
|
238
|
+
).toHaveLength(2);
|
|
239
|
+
for (const text of screen.getAllByText(/^Connected /)) {
|
|
240
|
+
expect(text).not.toHaveTextContent("Invalid Date");
|
|
241
|
+
}
|
|
242
|
+
});
|
|
243
|
+
|
|
244
|
+
it("keeps the popover closed across a same-identity reconnect gap", () => {
|
|
245
|
+
vi.useFakeTimers();
|
|
246
|
+
const { store } = renderStatus([{ ...AGENT, identity: "same" }]);
|
|
247
|
+
act(() => vi.advanceTimersByTime(3000));
|
|
248
|
+
act(() => store.set(attachmentsAtom, []));
|
|
249
|
+
act(() =>
|
|
250
|
+
store.set(attachmentsAtom, [{ ...AGENT, id: "a2", identity: "same" }]),
|
|
251
|
+
);
|
|
252
|
+
expect(screen.getByLabelText("Pi connected")).toHaveAttribute(
|
|
253
|
+
"aria-expanded",
|
|
254
|
+
"false",
|
|
255
|
+
);
|
|
256
|
+
});
|
|
257
|
+
|
|
258
|
+
it("disconnects only the selected attachment and waits for the server update", async () => {
|
|
259
|
+
const { store } = renderStatus([
|
|
260
|
+
AGENT,
|
|
261
|
+
{ ...AGENT, id: "a2", name: "Codex" },
|
|
262
|
+
]);
|
|
263
|
+
fireEvent.click(screen.getByRole("button", { name: "Disconnect Pi" }));
|
|
264
|
+
expect(API.post).not.toHaveBeenCalled();
|
|
265
|
+
fireEvent.click(
|
|
266
|
+
screen.getByRole("button", { name: "Confirm disconnect Pi" }),
|
|
267
|
+
);
|
|
268
|
+
await waitFor(() =>
|
|
269
|
+
expect(API.post).toHaveBeenCalledWith(
|
|
270
|
+
"/pair/notebooks/stable%2Ftest/attachments/detach",
|
|
271
|
+
{ attachment_id: "a1" },
|
|
272
|
+
),
|
|
273
|
+
);
|
|
274
|
+
expect(screen.getByLabelText("2 agents connected")).toBeInTheDocument();
|
|
275
|
+
act(() =>
|
|
276
|
+
store.set(attachmentsAtom, [{ ...AGENT, id: "a2", name: "Codex" }]),
|
|
277
|
+
);
|
|
278
|
+
expect(screen.getByLabelText("Codex connected")).toBeInTheDocument();
|
|
279
|
+
expect(
|
|
280
|
+
screen.queryByRole("button", { name: "Disconnect Pi" }),
|
|
281
|
+
).not.toBeInTheDocument();
|
|
282
|
+
});
|
|
283
|
+
|
|
284
|
+
it("disables duplicate disconnects while pending", async () => {
|
|
285
|
+
const deferred = new Deferred<string>();
|
|
286
|
+
vi.mocked(API.post).mockReturnValue(deferred.promise);
|
|
287
|
+
renderStatus();
|
|
288
|
+
const button = screen.getByRole("button", { name: "Disconnect Pi" });
|
|
289
|
+
fireEvent.click(button);
|
|
290
|
+
fireEvent.click(
|
|
291
|
+
screen.getByRole("button", { name: "Confirm disconnect Pi" }),
|
|
292
|
+
);
|
|
293
|
+
expect(button).toBeDisabled();
|
|
294
|
+
expect(
|
|
295
|
+
screen.getByRole("button", { name: "Cancel disconnect Pi" }),
|
|
296
|
+
).toBeDisabled();
|
|
297
|
+
fireEvent.click(button);
|
|
298
|
+
expect(API.post).toHaveBeenCalledOnce();
|
|
299
|
+
await act(async () => deferred.resolve(""));
|
|
300
|
+
});
|
|
301
|
+
|
|
302
|
+
it("shows disconnect failures and retains the attachment", async () => {
|
|
303
|
+
vi.mocked(API.post).mockRejectedValue(new Error("offline"));
|
|
304
|
+
renderStatus();
|
|
305
|
+
fireEvent.click(screen.getByRole("button", { name: "Disconnect Pi" }));
|
|
306
|
+
fireEvent.click(
|
|
307
|
+
screen.getByRole("button", { name: "Confirm disconnect Pi" }),
|
|
308
|
+
);
|
|
309
|
+
await waitFor(() =>
|
|
310
|
+
expect(toast).toHaveBeenCalledWith({
|
|
311
|
+
variant: "danger",
|
|
312
|
+
title: "Could not disconnect Pi",
|
|
313
|
+
duration: 5000,
|
|
314
|
+
}),
|
|
315
|
+
);
|
|
316
|
+
expect(screen.getByLabelText("Pi connected")).toBeInTheDocument();
|
|
317
|
+
expect(screen.getByRole("button", { name: "Disconnect Pi" })).toBeEnabled();
|
|
318
|
+
});
|
|
319
|
+
|
|
320
|
+
it("cancels confirmation without disconnecting and restores focus", () => {
|
|
321
|
+
renderStatus();
|
|
322
|
+
fireEvent.click(screen.getByRole("button", { name: "Disconnect Pi" }));
|
|
323
|
+
expect(screen.getByText("Disconnect?")).toBeVisible();
|
|
324
|
+
expect(
|
|
325
|
+
screen.getByRole("button", { name: "Confirm disconnect Pi" }),
|
|
326
|
+
).toBeEnabled();
|
|
327
|
+
fireEvent.click(
|
|
328
|
+
screen.getByRole("button", { name: "Cancel disconnect Pi" }),
|
|
329
|
+
);
|
|
330
|
+
expect(API.post).not.toHaveBeenCalled();
|
|
331
|
+
expect(screen.getByRole("button", { name: "Disconnect Pi" })).toHaveFocus();
|
|
332
|
+
expect(
|
|
333
|
+
screen.queryByRole("button", { name: "Confirm disconnect Pi" }),
|
|
334
|
+
).not.toBeInTheDocument();
|
|
335
|
+
});
|
|
336
|
+
|
|
337
|
+
it("disables disconnect without a stable session ID", () => {
|
|
338
|
+
const { store } = renderStatus();
|
|
339
|
+
act(() => store.set(stableSessionIdAtom, null));
|
|
340
|
+
expect(
|
|
341
|
+
screen.getByRole("button", { name: "Disconnect Pi" }),
|
|
342
|
+
).toBeDisabled();
|
|
343
|
+
});
|
|
344
|
+
|
|
345
|
+
it.each([
|
|
346
|
+
{ state: ConnectionState.CONNECTING },
|
|
347
|
+
{ state: ConnectionState.CLOSING },
|
|
348
|
+
{ state: ConnectionState.NOT_STARTED },
|
|
349
|
+
{
|
|
350
|
+
state: ConnectionState.CLOSED,
|
|
351
|
+
code: WebSocketClosedReason.KERNEL_DISCONNECTED,
|
|
352
|
+
reason: "offline",
|
|
353
|
+
},
|
|
354
|
+
])("hides connected claims while the browser is %j", (connection) => {
|
|
355
|
+
const { store, container } = renderStatus();
|
|
356
|
+
act(() => store.set(connectionAtom, connection));
|
|
357
|
+
expect(container).toBeEmptyDOMElement();
|
|
358
|
+
});
|
|
359
|
+
|
|
360
|
+
it("removes detached agents when the list is replaced", () => {
|
|
361
|
+
const { store, container } = renderStatus([
|
|
362
|
+
AGENT,
|
|
363
|
+
{ ...AGENT, id: "a2", name: "Claude Code" },
|
|
364
|
+
]);
|
|
365
|
+
act(() => store.set(attachmentsAtom, [AGENT]));
|
|
366
|
+
expect(
|
|
367
|
+
screen.queryByRole("heading", { name: "Claude Code" }),
|
|
368
|
+
).not.toBeInTheDocument();
|
|
369
|
+
act(() => store.set(attachmentsAtom, []));
|
|
370
|
+
expect(container).toBeEmptyDOMElement();
|
|
371
|
+
});
|
|
372
|
+
});
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/* Copyright 2026 Marimo. All rights reserved. */
|
|
2
2
|
|
|
3
3
|
import type React from "react";
|
|
4
|
+
import { Slot as SlotPrimitive } from "radix-ui";
|
|
4
5
|
import { forwardRef } from "react";
|
|
5
6
|
import { Tooltip } from "@/components/ui/tooltip";
|
|
6
7
|
import { cn } from "@/utils/cn";
|
|
@@ -8,36 +9,43 @@ import { cn } from "@/utils/cn";
|
|
|
8
9
|
type FooterItemProps = {
|
|
9
10
|
selected: boolean;
|
|
10
11
|
tooltip: React.ReactNode;
|
|
12
|
+
asChild?: boolean;
|
|
11
13
|
} & React.HTMLAttributes<HTMLDivElement>;
|
|
12
14
|
|
|
13
15
|
export const FooterItem: React.FC<FooterItemProps> = forwardRef<
|
|
14
16
|
HTMLDivElement,
|
|
15
17
|
FooterItemProps
|
|
16
|
-
>(
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
{content}
|
|
36
|
-
</Tooltip>
|
|
18
|
+
>(
|
|
19
|
+
(
|
|
20
|
+
{ children, tooltip, selected, className, asChild = false, ...rest },
|
|
21
|
+
ref,
|
|
22
|
+
) => {
|
|
23
|
+
const Component = asChild ? SlotPrimitive.Slot : "div";
|
|
24
|
+
const content = (
|
|
25
|
+
<Component
|
|
26
|
+
ref={ref}
|
|
27
|
+
className={cn(
|
|
28
|
+
"h-full flex items-center p-2 text-sm shadow-inset font-mono cursor-pointer rounded",
|
|
29
|
+
!selected && "hover:bg-(--sage-3)",
|
|
30
|
+
selected && "bg-(--sage-4)",
|
|
31
|
+
className,
|
|
32
|
+
)}
|
|
33
|
+
{...rest}
|
|
34
|
+
>
|
|
35
|
+
{children}
|
|
36
|
+
</Component>
|
|
37
37
|
);
|
|
38
|
-
}
|
|
39
38
|
|
|
40
|
-
|
|
41
|
-
|
|
39
|
+
if (tooltip) {
|
|
40
|
+
return (
|
|
41
|
+
<Tooltip content={tooltip} side="top" delayDuration={200}>
|
|
42
|
+
{content}
|
|
43
|
+
</Tooltip>
|
|
44
|
+
);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
return content;
|
|
48
|
+
},
|
|
49
|
+
);
|
|
42
50
|
|
|
43
51
|
FooterItem.displayName = "FooterItem";
|