@marimo-team/frontend 0.23.16-dev5 → 0.23.16-dev51
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-BalYv0pK.js → CellStatus-DciB5rbr.js} +1 -1
- package/dist/assets/{ConnectedDataExplorerComponent-DI7mV-Gw.js → ConnectedDataExplorerComponent-CXp99aFw.js} +1 -1
- package/dist/assets/{ErrorBoundary-C7_5jjWi.js → ErrorBoundary-DzTD8LVq.js} +1 -1
- package/dist/assets/{ImperativeModal-BIavOiUv.js → ImperativeModal-fY-ZfT0b.js} +1 -1
- package/dist/assets/JsonOutput-BM3vve9F.js +53 -0
- package/dist/assets/LazyAnyLanguageCodeMirror-DPOEues4.js +2 -0
- package/dist/assets/{MarimoErrorOutput-DO2k2fA5.js → MarimoErrorOutput-Bh0y53Du.js} +4 -4
- package/dist/assets/{RSPContexts-CgC81f0I.js → RSPContexts-WiCgGm__.js} +1 -1
- package/dist/assets/RenderHTML-B9jx7Dsm.js +1 -0
- package/dist/assets/{RunButton-BKRupqr7.js → RunButton-DMtHbFuA.js} +1 -1
- package/dist/assets/{add-cell-with-ai-CEZtaZCK.js → add-cell-with-ai-BcRYriMM.js} +35 -35
- package/dist/assets/add-connection-dialog-syjRSNPT.js +178 -0
- package/dist/assets/{agent-panel-CHB6t7Zy.js → agent-panel-B31W_VwU.js} +5 -5
- package/dist/assets/ai-model-dropdown-B3D05oQh.js +5 -0
- package/dist/assets/{alert-dialog-BXegNC0I.js → alert-dialog-Bb8Lz8ko.js} +1 -1
- package/dist/assets/{any-language-editor-DCpZRrpx.js → any-language-editor-BDvoKhJM.js} +1 -1
- package/dist/assets/apl-B-7blH-b.js +1 -0
- package/dist/assets/app-config-button-D_mjovwU.js +1 -0
- package/dist/assets/{arc-CfUZAQDm.js → arc-CezuXhk_.js} +1 -1
- package/dist/assets/{architecture-7HQA4BMR-Bvqj37EA.js → architecture-7HQA4BMR-Dy7zkjw8.js} +1 -1
- package/dist/assets/{architectureDiagram-VXUJARFQ-sx_yisiZ.js → architectureDiagram-VXUJARFQ-BmOSh2SW.js} +1 -1
- package/dist/assets/asciiarmor-D3K8amZ9.js +1 -0
- package/dist/assets/asn1-UGGn98tp.js +1 -0
- package/dist/assets/blob-BJREJiQp.js +1 -0
- package/dist/assets/{blockDiagram-VD42YOAC-KexI-fgH.js → blockDiagram-VD42YOAC-DHO0ifdn.js} +1 -1
- package/dist/assets/brainfuck-B4y4U3tg.js +1 -0
- package/dist/assets/{button-eIihcbUw.js → button-DDGiD1NW.js} +1 -1
- package/dist/assets/{c4Diagram-YG6GDRKO-d8NrlxRF.js → c4Diagram-YG6GDRKO-ByToYMes.js} +1 -1
- package/dist/assets/{cache-panel-wllSTlbM.js → cache-panel-Bvnkzrzd.js} +1 -1
- package/dist/assets/{capabilities-B09j1Eor.js → capabilities-DoEg0XwL.js} +1 -1
- package/dist/assets/{cell-editor-B5JVq7_q.js → cell-editor-BOhZHoLm.js} +17 -17
- package/dist/assets/cell-link-DqNEv3f9.js +1 -0
- package/dist/assets/cells-Jr-5Pc9f.js +235 -0
- package/dist/assets/channel-hYe4T32r.js +1 -0
- package/dist/assets/{chat-display-BG08ltQ3.js → chat-display-Djy1Jt6b.js} +1 -1
- package/dist/assets/{chat-panel-P2CzCtXJ.js → chat-panel-B2nYSE_l.js} +4 -4
- package/dist/assets/{chat-ui-fAJZAoTD.js → chat-ui-DlG0En7w.js} +4 -4
- package/dist/assets/{chunk-4BX2VUAB-fhh1HlXH.js → chunk-4BX2VUAB-BsEakQWN.js} +1 -1
- package/dist/assets/chunk-55IACEB6-DkGbQmsa.js +1 -0
- package/dist/assets/{chunk-5FQGJX7Z-Cp0LZT-a.js → chunk-5FQGJX7Z-BEbM01OT.js} +2 -2
- package/dist/assets/{chunk-ABZYJK2D-BtK4zInQ.js → chunk-ABZYJK2D-CCNXe-E2.js} +3 -3
- package/dist/assets/{chunk-ATLVNIR6-YZDenslF.js → chunk-ATLVNIR6-yY0weiRB.js} +1 -1
- package/dist/assets/{chunk-B4BG7PRW-DYIZwDbt.js → chunk-B4BG7PRW-DtjHcIBO.js} +1 -1
- package/dist/assets/{chunk-CVBHYZKI-CIyHeK0Q.js → chunk-CVBHYZKI-D1ar3Zzb.js} +1 -1
- package/dist/assets/{chunk-DI55MBZ5-TodwBGEN.js → chunk-DI55MBZ5-BxB9Lmc6.js} +1 -1
- package/dist/assets/{chunk-EXTU4WIE-C76bF1UD.js → chunk-EXTU4WIE-Do43HMrz.js} +1 -1
- package/dist/assets/{chunk-FMBD7UC4-Yq65IDPA.js → chunk-FMBD7UC4-FWkYBdS7.js} +1 -1
- package/dist/assets/{chunk-HN2XXSSU-CcbN4n6W.js → chunk-HN2XXSSU-nVY6M8Me.js} +1 -1
- package/dist/assets/{chunk-JA3XYJ7Z-CPXEu7AX.js → chunk-JA3XYJ7Z-52dYwyoT.js} +1 -1
- package/dist/assets/{chunk-JZLCHNYA-D8q1z6Py.js → chunk-JZLCHNYA-BHSouLxk.js} +1 -1
- package/dist/assets/{chunk-MI3HLSF2-bmomnexd.js → chunk-MI3HLSF2-BwgHEi3_.js} +1 -1
- package/dist/assets/{chunk-N4CR4FBY-BhsjB2qn.js → chunk-N4CR4FBY-BkAnRh0J.js} +2 -2
- package/dist/assets/{chunk-QN33PNHL-ngvPqyQ0.js → chunk-QN33PNHL-DWzHlkYI.js} +1 -1
- package/dist/assets/{chunk-QXUST7PY-C4c0Sjmn.js → chunk-QXUST7PY-CjtWgrZg.js} +1 -1
- package/dist/assets/{chunk-QZHKN3VN-CkbwBDOS.js → chunk-QZHKN3VN-CmAwpNoC.js} +1 -1
- package/dist/assets/{chunk-S3R3BYOJ-Bt2NnquF.js → chunk-S3R3BYOJ-DcZAYEft.js} +1 -1
- package/dist/assets/{chunk-TZMSLE5B-Dysko1OC.js → chunk-TZMSLE5B-D2-o8-XQ.js} +1 -1
- package/dist/assets/classDiagram-2ON5EDUG-DapsPtpH.js +1 -0
- package/dist/assets/classDiagram-v2-WZHVMYZB-Oa2f7U6n.js +1 -0
- package/dist/assets/{clike-DKPr2D1_.js → clike-BAN6KopO.js} +1 -1
- package/dist/assets/clojure-BAZ-ejkG.js +1 -0
- package/dist/assets/cmake-jWn0xN9y.js +1 -0
- package/dist/assets/cobol-XqY9jaWP.js +1 -0
- package/dist/assets/{code-block-37QAKDTI-DlENujeV.js → code-block-37QAKDTI-DdMTHZGu.js} +1 -1
- package/dist/assets/coffeescript-DI1jfZHX.js +1 -0
- package/dist/assets/{column-preview-Dne1dIt0.js → column-preview-BUHlI5va.js} +1 -1
- package/dist/assets/{command-CAJLPEBq.js → command-Dqxie4gq.js} +1 -1
- package/dist/assets/{command-palette-iOCqUIs1.js → command-palette-rEJmXCZM.js} +1 -1
- package/dist/assets/{common-CD6Mj8n6.js → common-CZc3fQI4.js} +1 -1
- package/dist/assets/commonlisp-UKb01OlU.js +1 -0
- package/dist/assets/components-GAYCj6Mx.js +1 -0
- package/dist/assets/config-B-Q7J_6d.js +1 -0
- package/dist/assets/{config-COUOIPEq.js → config-BJVx3eBW.js} +1 -1
- package/dist/assets/{copy-BtTOqPTS.js → copy-Bxb1_Gtw.js} +1 -1
- package/dist/assets/{copy-icon-C2pG0ZNK.js → copy-icon-neDQUo4Q.js} +1 -1
- package/dist/assets/{cose-bilkent-S5V4N54A-BlMw4-M9.js → cose-bilkent-S5V4N54A-B4-5phSs.js} +1 -1
- package/dist/assets/{createReducer-C7kZ8zEe.js → createReducer-DGx5Af-C.js} +1 -1
- package/dist/assets/crystal-DOvjTBWA.js +1 -0
- package/dist/assets/{css-DsUcFZz8.js → css-DWLxGm3Z.js} +1 -1
- package/dist/assets/cypher-CLDhu2ae.js +1 -0
- package/dist/assets/d-C0ecUZk9.js +1 -0
- package/dist/assets/{dagre-6UL2VRFP-kJ4x17JK.js → dagre-6UL2VRFP-2XhH1Ri-.js} +1 -1
- package/dist/assets/{data-grid-overlay-editor-DbobQcVo.js → data-grid-overlay-editor-B4LrPNw9.js} +1 -1
- package/dist/assets/{datasource-ySAiC9gr.js → datasource-AWkkAeiS.js} +2 -2
- package/dist/assets/{dates-D-kIKDYA.js → dates-C2LWzsCZ.js} +1 -1
- package/dist/assets/{dependency-graph-panel-BF23EwcD.js → dependency-graph-panel-wcqTPq6b.js} +3 -3
- package/dist/assets/{diagram-PSM6KHXK-d-5aQNHk.js → diagram-PSM6KHXK-CAqt0euW.js} +1 -1
- package/dist/assets/{diagram-QEK2KX5R-CO-PXq75.js → diagram-QEK2KX5R-D5cgX3Vp.js} +1 -1
- package/dist/assets/{diagram-S2PKOQOG-Dv7pcvYC.js → diagram-S2PKOQOG-ibWavdR5.js} +1 -1
- package/dist/assets/{dialog-D1DEsRZ2.js → dialog-BCVepWLJ.js} +1 -1
- package/dist/assets/diff-657cCCVc.js +1 -0
- package/dist/assets/{dist-CRrIf3gB.js → dist-7L5iW3e_.js} +1 -1
- package/dist/assets/{dist-ByVeMWkr.js → dist-BLN8PNJV.js} +1 -1
- package/dist/assets/{dist-R1kU4nzJ.js → dist-Bcpo9599.js} +1 -1
- package/dist/assets/{dist-DQNaXfK1.js → dist-BrZHhdmA.js} +1 -1
- package/dist/assets/dist-C00gHjPp.js +1 -0
- package/dist/assets/{dist-0QUuSoRx.js → dist-C4El4p_-.js} +1 -1
- package/dist/assets/{dist-BsphJPAV.js → dist-CIYjZ11d.js} +1 -1
- package/dist/assets/{dist-Du-wcJyR.js → dist-COTjOJlM.js} +1 -1
- package/dist/assets/dist-CWNfBqYo.js +1 -0
- package/dist/assets/dist-Cck3fpDq.js +1 -0
- package/dist/assets/dist-CiVShZKM.js +2 -0
- package/dist/assets/{dist-CECF_J8y.js → dist-DIQO2yAn.js} +1 -1
- package/dist/assets/{dist-BMOD2Pyh.js → dist-DabFEfar.js} +1 -1
- package/dist/assets/dist-f5euh_Pv.js +1 -0
- package/dist/assets/{dist-CDUl-YL4.js → dist-ryTWanRP.js} +1 -1
- package/dist/assets/{dist-6c4zOh78.js → dist-sg9T7Ulw.js} +1 -1
- package/dist/assets/{dist-sPfKr-vH.js → dist-wSuqFvon.js} +1 -1
- package/dist/assets/{dockerfile-C2PznFWk.js → dockerfile-kqVBOcIP.js} +1 -1
- package/dist/assets/{documentation-panel-e9Fi9R7e.js → documentation-panel-Eu8MIkoU.js} +1 -1
- package/dist/assets/download-CQ7iZFJL.js +9 -0
- package/dist/assets/{dropdown-menu-BFZLnWeO.js → dropdown-menu-dHmZR8bI.js} +1 -1
- package/dist/assets/dtd-DSiK7Qgi.js +1 -0
- package/dist/assets/dylan-07d5-7Q9.js +1 -0
- package/dist/assets/ecl-CSTUHiwq.js +1 -0
- package/dist/assets/{edit-page-7X3HYey7.js → edit-page-Cw7nN6HC.js} +6 -6
- package/dist/assets/eiffel-DR99GcsM.js +1 -0
- package/dist/assets/elm-Cmh0iW6J.js +1 -0
- package/dist/assets/{erDiagram-Q2GNP2WA-BQ8HfnRu.js → erDiagram-Q2GNP2WA-BaY7iomT.js} +1 -1
- package/dist/assets/erlang-CS9Yc6UC.js +1 -0
- package/dist/assets/{error-banner-B6eIlxzg.js → error-banner-BSxEOIn2.js} +1 -1
- package/dist/assets/error-entries-Cr8uVukN.js +8 -0
- package/dist/assets/{error-panel-DdsUL6b7.js → error-panel-BZzr0PA1.js} +1 -1
- package/dist/assets/{es-1D83cgiu.js → es-gYgfF8y5.js} +1 -1
- package/dist/assets/{esm-BL7jQmzn.js → esm-B30N1GS0.js} +1 -1
- package/dist/assets/{esm-Cmv0Nuxi.js → esm-DqItXpGT.js} +1 -1
- package/dist/assets/{factor-DMrXrOH8.js → factor-D96xahcJ.js} +1 -1
- package/dist/assets/factor-DjB27Lcf.js +1 -0
- package/dist/assets/{field-BeZbVzXA.js → field-BsxD35VE.js} +1 -1
- package/dist/assets/file-explorer-panel-C1W7g_Wp.js +26 -0
- package/dist/assets/{file-icons-Cb54mIL8.js → file-icons-BAqZR08W.js} +1 -1
- package/dist/assets/{file-name-input-BWFcK1ey.js → file-name-input-0MiZVw5r.js} +1 -1
- package/dist/assets/{fileToBase64-C2Yy-YXq.js → fileToBase64-Dgfa7TRQ.js} +1 -1
- package/dist/assets/floating-outline-C6g75zrP.js +1 -0
- package/dist/assets/{flowDiagram-NV44I4VS-xBOzhlfg.js → flowDiagram-NV44I4VS-C_6PGGE6.js} +1 -1
- package/dist/assets/focus-C0HXXg3V.js +1 -0
- package/dist/assets/form-C051zAev.js +1 -0
- package/dist/assets/{form-B6BkSCJb.js → form-DT44Rmhp.js} +2 -2
- package/dist/assets/{formats-ClEFGPy-.js → formats-DzmLpc9A.js} +1 -1
- package/dist/assets/{formatting-B_41gSF5.js → formatting-DQX9QUSf.js} +1 -1
- package/dist/assets/forth-UwTUu7NY.js +1 -0
- package/dist/assets/fortran-cptiB4gJ.js +1 -0
- package/dist/assets/{fullscreen-dUjPYOmm.js → fullscreen-CTDqNQr6.js} +1 -1
- package/dist/assets/{gallery-page-CWQQAYpa.js → gallery-page-CL1y8LXc.js} +1 -1
- package/dist/assets/{ganttDiagram-JELNMOA3-D2O_k-Zg.js → ganttDiagram-JELNMOA3-CJFyE5hs.js} +1 -1
- package/dist/assets/gas-ajMbd9Us.js +1 -0
- package/dist/assets/gherkin-ClYkalzE.js +1 -0
- package/dist/assets/{gitGraph-G5XIXVHT-8HJwNcdU.js → gitGraph-G5XIXVHT-BP96QVP9.js} +1 -1
- package/dist/assets/{gitGraphDiagram-V2S2FVAM-Nk4Ll9GY.js → gitGraphDiagram-V2S2FVAM-CGQPWKR8.js} +1 -1
- package/dist/assets/{glide-data-editor-lMARFWHS.js → glide-data-editor-Badziq3Y.js} +4 -4
- package/dist/assets/groovy-BY-gt7AW.js +1 -0
- package/dist/assets/haskell-D1BeJ7SR.js +1 -0
- package/dist/assets/haxe-QOq5WFXx.js +1 -0
- package/dist/assets/home-page-CJz9IHZ2.js +4 -0
- package/dist/assets/{html-to-image-CwmX28T9.js → html-to-image-CfjhKLA4.js} +2 -2
- package/dist/assets/idl-3-UcEGx7.js +1 -0
- package/dist/assets/index-CrEgp1mR.js +38 -0
- package/dist/assets/index-D6Dp_PFj.css +2 -0
- package/dist/assets/{info-VBDWY6EO-rfe3WPvd.js → info-VBDWY6EO-B7aeNYNu.js} +1 -1
- package/dist/assets/infoDiagram-HS3SLOUP-BT7ISZ3J.js +2 -0
- package/dist/assets/{input-CqrUjynb.js → input-JxFwu-3G.js} +1 -1
- package/dist/assets/javascript-CorD44JN.js +1 -0
- package/dist/assets/{journeyDiagram-XKPGCS4Q-D61FGivn.js → journeyDiagram-XKPGCS4Q-DhyWkFu7.js} +1 -1
- package/dist/assets/julia-BYqTtTAl.js +1 -0
- package/dist/assets/{kanban-definition-3W4ZIXB7-Bnv0X0Tu.js → kanban-definition-3W4ZIXB7-B2A0FPA_.js} +1 -1
- package/dist/assets/katex-BnxSCReZ.js +1 -0
- package/dist/assets/kiosk-mode-CWGEgpon.js +1 -0
- package/dist/assets/{label-BElwWzf0.js → label-CqjrpwRC.js} +1 -1
- package/dist/assets/{layout-CUlZijwG.js → layout-D4bpsgVD.js} +5 -5
- package/dist/assets/{line-DNm2phYo.js → line-1dURhxkp.js} +1 -1
- package/dist/assets/{linear-CTQqNbVX.js → linear-gmSPLe7o.js} +1 -1
- package/dist/assets/{links-CToBjIIj.js → links-CiT7FeSM.js} +1 -1
- package/dist/assets/livescript-qYgfNnNE.js +1 -0
- package/dist/assets/logs-panel-CsaY3O1m.js +1 -0
- package/dist/assets/{loro_wasm_bg-Duqr-kJ2.js → loro_wasm_bg-DWuCVDfB.js} +1 -1
- package/dist/assets/lua-BCqCjdfz.js +1 -0
- package/dist/assets/{markdown-renderer-QvXG0CRk.js → markdown-renderer-BgqeO4JR.js} +3 -3
- package/dist/assets/mathematica-XKwMfn0d.js +1 -0
- package/dist/assets/mbox-BnkeOnif.js +1 -0
- package/dist/assets/{menu-items-DbSLBfXR.js → menu-items-CCi6aOPm.js} +1 -1
- package/dist/assets/{mermaid-4DMBBIKO-CDGmT6YQ.js → mermaid-4DMBBIKO-DxfSuOnE.js} +1 -1
- package/dist/assets/{mermaid-Bh0flEIb.js → mermaid-Dfx05w1B.js} +3 -3
- package/dist/assets/{mermaid-parser.core-Dz2GMGqQ.js → mermaid-parser.core-OagDSIIt.js} +2 -2
- package/dist/assets/{mhchem-CIWniJp4.js → mhchem-Dka9kRKN.js} +1 -1
- package/dist/assets/{mindmap-definition-VGOIOE7T-C-YaKmEU.js → mindmap-definition-VGOIOE7T-torqqISZ.js} +1 -1
- package/dist/assets/mirc-ipoElhai.js +1 -0
- package/dist/assets/mllike-DmouQ5Dp.js +1 -0
- package/dist/assets/modelica-BtmmVsUf.js +1 -0
- package/dist/assets/mscgen-BHZmHZgz.js +1 -0
- package/dist/assets/mumps-oKfoFTl_.js +1 -0
- package/dist/assets/{name-cell-input-C6cukQ9k.js → name-cell-input-DcU8Rfrz.js} +1 -1
- package/dist/assets/node-sql-parser-Dpr10aqR.js +68 -0
- package/dist/assets/nsis-DDOPnuAW.js +1 -0
- package/dist/assets/{nsis-Ccvd1gbp.js → nsis-gzbsJ5t0.js} +1 -1
- package/dist/assets/ntriples-Dsyl_sOF.js +1 -0
- package/dist/assets/{number-overlay-editor-BQ9P6yP7.js → number-overlay-editor-DlQjqV32.js} +1 -1
- package/dist/assets/{numbers-CeeaFKqu.js → numbers-rmawRqQP.js} +1 -1
- package/dist/assets/octave-CI5RGMPa.js +1 -0
- package/dist/assets/{ordinal-DyTNGK17.js → ordinal-W4TcDjiJ.js} +1 -1
- package/dist/assets/{outline-panel-BPlg9_CE.js → outline-panel-D-CHPZQM.js} +1 -1
- package/dist/assets/oz-D01pKAWx.js +1 -0
- package/dist/assets/{packages-panel-BzQF60rG.js → packages-panel-dq7QVZl1.js} +1 -1
- package/dist/assets/{packet-DYOGHKS2-DTVloLa7.js → packet-DYOGHKS2-B2FlK_cc.js} +1 -1
- package/dist/assets/pair-with-agent-modal-D2vO1D8g.js +4 -0
- package/dist/assets/panels-DWoniKhE.js +4 -0
- package/dist/assets/pascal-DGXfnIFD.js +1 -0
- package/dist/assets/perl-gZ7qIkF-.js +1 -0
- package/dist/assets/{pie-VRWISCQL-Bmght6JF.js → pie-VRWISCQL-rtCNhZhm.js} +1 -1
- package/dist/assets/{pieDiagram-ADFJNKIX-DlFYL0BN.js → pieDiagram-ADFJNKIX-vSo1I9sb.js} +1 -1
- package/dist/assets/pig-Cb90ayl-.js +1 -0
- package/dist/assets/{popover-DrHQ3KEt.js → popover-Bcz1Zikb.js} +1 -1
- package/dist/assets/powershell-_YxddSL3.js +1 -0
- package/dist/assets/process-output-NbwnUu05.js +1 -0
- package/dist/assets/properties-sU50dmvt.js +1 -0
- package/dist/assets/protobuf-DFdF-yfo.js +1 -0
- package/dist/assets/{pug-BtXi5KiX.js → pug-CfBtO6QD.js} +1 -1
- package/dist/assets/pug-DwUB-C24.js +1 -0
- package/dist/assets/puppet-DtKzwiZ6.js +1 -0
- package/dist/assets/python-BMLOKYmk.js +1 -0
- package/dist/assets/q-BF1zXMdP.js +1 -0
- package/dist/assets/{quadrantDiagram-AYHSOK5B-BpJug2BH.js → quadrantDiagram-AYHSOK5B-DonUSsuk.js} +1 -1
- package/dist/assets/r-BQiKhVSI.js +1 -0
- package/dist/assets/{radar-ZZBFDIW7-CYwWzRgW.js → radar-ZZBFDIW7-CRVupj1O.js} +1 -1
- package/dist/assets/{radio-group-CLBjGkt5.js → radio-group-rhQpGwU-.js} +1 -1
- package/dist/assets/{react-vega-TNCk_eWj.js → react-vega-Bd66vLSZ.js} +1 -1
- package/dist/assets/{readonly-code-display-D63oRtBP.js → readonly-code-display-CVY2f7EZ.js} +1 -1
- package/dist/assets/{readonly-python-code-CW_G5e4E.js → readonly-python-code-Q_1Y3VyZ.js} +1 -1
- package/dist/assets/{renderShortcut-BZLr8D7H.js → renderShortcut-Bl8_FVn8.js} +1 -1
- package/dist/assets/{requirementDiagram-UZGBJVZJ-Bd-1eny8.js → requirementDiagram-UZGBJVZJ-D8rJ1Dg-.js} +1 -1
- package/dist/assets/{reveal-component-BLMTmd8T.js → reveal-component-CedpDwM8.js} +60 -60
- package/dist/assets/rpm-v7UTuaHo.js +1 -0
- package/dist/assets/ruby-Cw43FpG3.js +1 -0
- package/dist/assets/{run-page-B6pgDYEJ.js → run-page-CGoux5cj.js} +1 -1
- package/dist/assets/{runs-D51Xwrsk.js → runs-CZN8py6x.js} +1 -1
- package/dist/assets/{sankeyDiagram-TZEHDZUN-CDWAE6GV.js → sankeyDiagram-TZEHDZUN-Bufh177s.js} +1 -1
- package/dist/assets/sas-BIKscqlp.js +1 -0
- package/dist/assets/scheme-CGic3hSV.js +1 -0
- package/dist/assets/scratchpad-panel-BLuF25yR.js +1 -0
- package/dist/assets/{scroll-to-bottom-button-Cgr10kaJ.js → scroll-to-bottom-button-C8yfT4wq.js} +1 -1
- package/dist/assets/{secrets-panel-Cc5KDBk6.js → secrets-panel-4Qy7R-wy.js} +1 -1
- package/dist/assets/{select-B5TFNjmU.js → select-BP75_5jJ.js} +1 -1
- package/dist/assets/{sequenceDiagram-WL72ISMW-B6hjDGBF.js → sequenceDiagram-WL72ISMW-DOsQdDD2.js} +1 -1
- package/dist/assets/{session-CEFnN9Cq.js → session-BmukRjSi.js} +1 -1
- package/dist/assets/session-panel-OIot3eyB.js +1 -0
- package/dist/assets/{share-CYpcX4N4.js → share-852X_cqy.js} +1 -1
- package/dist/assets/shell-DAh545tm.js +1 -0
- package/dist/assets/sieve-bGkng63-.js +1 -0
- package/dist/assets/{skeleton-D3QPxqWC.js → skeleton-BRvjFlRu.js} +1 -1
- package/dist/assets/slides-DkEgzTJB.css +1 -0
- package/dist/assets/smalltalk-fIw53lm8.js +1 -0
- package/dist/assets/{snippets-panel-CXpGflMO.js → snippets-panel-YFyH2hUM.js} +1 -1
- package/dist/assets/sparql-CHbJrAY_.js +1 -0
- package/dist/assets/{spec-CzqcmYQk.js → spec-C7opZZRp.js} +1 -1
- package/dist/assets/{src-CIOdyciO.js → src-BSYB0gI9.js} +1 -1
- package/dist/assets/state-DB_fxbhn.js +3 -0
- package/dist/assets/{state-WBgc7MiA.js → state-DDag0B_B.js} +1 -1
- package/dist/assets/{state-BvdK8eiw.js → state-DFeun9PF.js} +1 -1
- package/dist/assets/{state-DBzEQtWz.js → state-bHyw5u3R.js} +1 -1
- package/dist/assets/{stateDiagram-FKZM4ZOC-Bzv6j99z.js → stateDiagram-FKZM4ZOC-z2ks4r_9.js} +1 -1
- package/dist/assets/stateDiagram-v2-4FDKWEC3-BApjXiT0.js +1 -0
- package/dist/assets/{step-CDlhJj9-.js → step-DIOVHicC.js} +1 -1
- package/dist/assets/{strings-Djnbwmfl.js → strings--BknHX9C.js} +1 -1
- package/dist/assets/stylus-3Q5WfXqT.js +1 -0
- package/dist/assets/swift-MKxc2knl.js +1 -0
- package/dist/assets/{swiper-component-DInvCxhI.js → swiper-component-C0ieyDzn.js} +1 -1
- package/dist/assets/switch-OVajJBPR.js +1 -0
- package/dist/assets/tcl-D3fKhQc_.js +1 -0
- package/dist/assets/{terminal-D3IQBBYo.js → terminal-D4sGJYRn.js} +1 -1
- package/dist/assets/textarea-DZB2bzVL.js +1 -0
- package/dist/assets/textile-Bi_LEJQ3.js +1 -0
- package/dist/assets/{time-BuRlxEhE.js → time-NXrJfoDM.js} +1 -1
- package/dist/assets/{timeline-definition-IT6M3QCI-DXwdU1og.js → timeline-definition-IT6M3QCI-BRuA290T.js} +1 -1
- package/dist/assets/toml-Dt-PBqwt.js +1 -0
- package/dist/assets/{tooltip-CFX4fYHU.js → tooltip-4bZlU7jl.js} +1 -1
- package/dist/assets/{tooltip-HLb6RxVp.js → tooltip-B7U4xkIN.js} +1 -1
- package/dist/assets/{tracing-CKn3gWHw.js → tracing-CDMM1BB2.js} +1 -1
- package/dist/assets/{tracing-panel-BU-o_LCd.js → tracing-panel-BH5Zbvl9.js} +2 -2
- package/dist/assets/{tree-actions-CsC2XmGo.js → tree-actions-DDveUIHK.js} +1 -1
- package/dist/assets/{treemap-GDKQZRPO-4Cm6HMmj.js → treemap-GDKQZRPO-DIzBBPQD.js} +1 -1
- package/dist/assets/troff-BSU-rxoD.js +1 -0
- package/dist/assets/ttcn-BmLjonVM.js +1 -0
- package/dist/assets/ttcn-cfg-TPTcP0Eh.js +1 -0
- package/dist/assets/turtle-HafmShQq.js +1 -0
- package/dist/assets/{useBoolean-D89u30n-.js → useBoolean-CFj86iac.js} +1 -1
- package/dist/assets/useCellActionButton-D5ix_g2a.js +1 -0
- package/dist/assets/{useDeleteCell-EPH4kcG7.js → useDeleteCell-BIopCngo.js} +1 -1
- package/dist/assets/{useDependencyPanelTab-CZnK7N2L.js → useDependencyPanelTab-snM337f9.js} +1 -1
- package/dist/assets/useEventListener-C0195JsF.js +1 -0
- package/dist/assets/{useHotkey-DIuRH8Wu.js → useHotkey-DLZvrRZT.js} +1 -1
- package/dist/assets/{useIframeCapabilities-Ccb4fvKc.js → useIframeCapabilities-j6fR_dBA.js} +1 -1
- package/dist/assets/{useInstallPackage-BRbUAUFn.js → useInstallPackage-WiYBwhUO.js} +1 -1
- package/dist/assets/{useInterval-CC0vKpWm.js → useInterval-Be6s6idX.js} +1 -1
- package/dist/assets/useNotebookActions-CsZfWFKy.js +12 -0
- package/dist/assets/{useRunCells-CSSF_mJ0.js → useRunCells-CF_V8X2K.js} +1 -1
- package/dist/assets/{useSplitCell-9Qz93yPZ.js → useSplitCell-BTmKY1CU.js} +1 -1
- package/dist/assets/{useTheme-KXqAyDPC.js → useTheme-Bxv9B31g.js} +1 -1
- package/dist/assets/{utils-Z80SV4_d.js → utils-BWBBpCkT.js} +1 -1
- package/dist/assets/vb-CUif5uGR.js +1 -0
- package/dist/assets/vbscript-DWVPFl59.js +1 -0
- package/dist/assets/{vega-component-Cie3ag_T.js → vega-component-BYd6AACD.js} +1 -1
- package/dist/assets/{vega-embed-container-hDAVOOba.js → vega-embed-container-CRADa99b.js} +1 -1
- package/dist/assets/velocity-BJl8UzB4.js +1 -0
- package/dist/assets/verilog-B4LUPYXy.js +1 -0
- package/dist/assets/vhdl-C91h3ipk.js +1 -0
- package/dist/assets/webidl-DOay1zbU.js +1 -0
- package/dist/assets/write-secret-modal-D-p66LIx.js +2 -0
- package/dist/assets/xquery-Cez7jD_4.js +1 -0
- package/dist/assets/{xychartDiagram-PRI3JC2R-Cb0exSKs.js → xychartDiagram-PRI3JC2R-BX6ICxcN.js} +1 -1
- package/dist/assets/yacas-CSQEXB_S.js +1 -0
- package/dist/assets/z80-CJbYj7Wr.js +1 -0
- package/dist/index.html +74 -73
- package/package.json +3 -4
- package/src/__mocks__/requests.ts +45 -4
- package/src/components/data-table/__tests__/__snapshots__/chart-spec-model.test.ts.snap +174 -21
- package/src/components/data-table/__tests__/chart-spec-model.test.ts +102 -1
- package/src/components/data-table/column-summary/chart-spec-model.tsx +163 -103
- package/src/components/data-table/column-summary/legacy-chart-spec.ts +15 -7
- package/src/components/data-table/column-summary/utils.ts +26 -7
- package/src/components/data-table/types.ts +1 -1
- package/src/components/editor/__tests__/viewer-banner.test.tsx +14 -0
- package/src/components/editor/actions/__tests__/pair-with-agent-commands.test.ts +99 -18
- package/src/components/editor/actions/__tests__/pdf-export.test.ts +32 -13
- package/src/components/editor/actions/pair-with-agent-commands.ts +21 -10
- package/src/components/editor/actions/pair-with-agent-modal.tsx +2 -2
- package/src/components/editor/actions/pdf-export.ts +11 -14
- package/src/components/editor/actions/useNotebookActions.tsx +18 -18
- package/src/components/editor/cell/code/__tests__/cell-editor-activity-lifecycle.test.ts +250 -0
- package/src/components/editor/cell/code/cell-editor.tsx +13 -7
- package/src/components/editor/chrome/panels/__tests__/logs-panel.test.tsx +25 -0
- package/src/components/editor/chrome/panels/logs-panel.tsx +12 -2
- package/src/components/editor/chrome/panels/write-secret-modal.tsx +40 -12
- package/src/components/editor/connections/__tests__/json-credentials.test.ts +114 -0
- package/src/components/editor/connections/__tests__/paths.test.ts +39 -0
- package/src/components/editor/connections/components.tsx +6 -2
- package/src/components/editor/connections/database/__tests__/__snapshots__/as-code.test.ts.snap +21 -5
- package/src/components/editor/connections/database/__tests__/as-code.test.ts +17 -0
- package/src/components/editor/connections/database/as-code.ts +16 -2
- package/src/components/editor/connections/database/schemas.ts +6 -5
- package/src/components/editor/connections/form-renderers.tsx +99 -1
- package/src/components/editor/connections/json-credentials.ts +57 -0
- package/src/components/editor/connections/paths.ts +21 -0
- package/src/components/editor/connections/secret-combobox.tsx +41 -20
- package/src/components/editor/connections/storage/__tests__/__snapshots__/as-code.test.ts.snap +88 -2
- package/src/components/editor/connections/storage/__tests__/as-code.test.ts +128 -8
- package/src/components/editor/connections/storage/as-code.ts +79 -36
- package/src/components/editor/connections/storage/schemas.ts +85 -44
- package/src/components/editor/file-tree/__tests__/renderers.test.ts +31 -0
- package/src/components/editor/file-tree/file-viewer.tsx +11 -7
- package/src/components/editor/file-tree/renderers.tsx +21 -0
- package/src/components/editor/renderers/vertical-layout/vertical-layout.tsx +1 -1
- package/src/components/editor/viewer-banner.tsx +6 -1
- package/src/components/forms/options.ts +2 -1
- package/src/components/slides/__tests__/cell-output-block.test.tsx +40 -0
- package/src/components/slides/__tests__/slide-cell-view.test.tsx +33 -0
- package/src/components/slides/__tests__/slide-scroll-hint.test.tsx +198 -0
- package/src/components/slides/reveal-component.tsx +25 -19
- package/src/components/slides/slide-cell-view.tsx +1 -1
- package/src/components/slides/slide-scroll-hint.tsx +161 -0
- package/src/components/slides/slides.css +4 -2
- package/src/components/static-html/share-modal.tsx +1 -1
- package/src/components/ui/input.tsx +1 -1
- package/src/core/ai/context/providers/file.ts +8 -29
- package/src/core/cells/__tests__/cells.test.ts +12 -2
- package/src/core/cells/__tests__/logs.test.ts +5 -5
- package/src/core/cells/cells.ts +17 -4
- package/src/core/cells/document-changes.ts +1 -0
- package/src/core/cells/logs.ts +14 -4
- package/src/core/codemirror/copilot/__tests__/language-server.test.ts +396 -100
- package/src/core/codemirror/copilot/__tests__/transport.test.ts +128 -540
- package/src/core/codemirror/copilot/language-server.ts +182 -70
- package/src/core/codemirror/copilot/transport.ts +15 -207
- package/src/core/codemirror/copilot/types.ts +9 -2
- package/src/core/codemirror/find-replace/__tests__/navigate.test.ts +42 -30
- package/src/core/codemirror/find-replace/navigate.ts +2 -0
- package/src/core/codemirror/go-to-definition/__tests__/commands.test.ts +24 -3
- package/src/core/codemirror/go-to-definition/commands.ts +3 -0
- package/src/core/codemirror/keymaps/__tests__/keymaps.test.ts +31 -2
- package/src/core/codemirror/keymaps/keymaps.ts +12 -0
- package/src/core/codemirror/language/__tests__/sql.test.ts +443 -61
- package/src/core/codemirror/language/languages/python.ts +23 -11
- package/src/core/codemirror/language/languages/sql/completion-store.ts +5 -1
- package/src/core/codemirror/language/languages/sql/sql.ts +210 -3
- package/src/core/codemirror/lsp/__tests__/federated-lsp.test.ts +161 -0
- package/src/core/codemirror/lsp/__tests__/log-messages.test.ts +53 -0
- package/src/core/codemirror/lsp/__tests__/normalize-markdown-math.test.ts +25 -0
- package/src/core/codemirror/lsp/__tests__/notebook-lsp.test.ts +598 -156
- package/src/core/codemirror/lsp/__tests__/transports.test.ts +112 -0
- package/src/core/codemirror/lsp/federated-lsp.ts +76 -23
- package/src/core/codemirror/lsp/log-messages.ts +37 -0
- package/src/core/codemirror/lsp/normalize-markdown-math.ts +8 -4
- package/src/core/codemirror/lsp/notebook-lsp.ts +220 -56
- package/src/core/codemirror/lsp/transports.ts +8 -1
- package/src/core/codemirror/lsp/types.ts +68 -8
- package/src/core/codemirror/lsp/utils.ts +14 -0
- package/src/core/codemirror/utils.ts +28 -0
- package/src/core/edit-app.tsx +1 -2
- package/src/core/export/__tests__/hooks.test.ts +2 -4
- package/src/core/export/hooks.ts +4 -3
- package/src/core/hotkeys/hotkeys.ts +0 -2
- package/src/core/islands/__tests__/bridge.test.ts +107 -0
- package/src/core/islands/bridge.ts +16 -0
- package/src/core/lsp/__tests__/transport.test.ts +509 -337
- package/src/core/lsp/transport.ts +304 -132
- package/src/core/mode.ts +10 -0
- package/src/core/network/__tests__/api.test.ts +42 -0
- package/src/core/network/__tests__/connection.test.ts +45 -0
- package/src/core/network/__tests__/requests-lazy.test.ts +32 -1
- package/src/core/network/__tests__/requests-network.test.ts +21 -0
- package/src/core/network/api.ts +27 -0
- package/src/core/network/connection.ts +15 -0
- package/src/core/network/requests-lazy.ts +1 -0
- package/src/core/network/requests-network.ts +14 -8
- package/src/core/network/requests-static.ts +1 -0
- package/src/core/network/requests-toasting.tsx +1 -0
- package/src/core/network/types.ts +22 -6
- package/src/core/rtc/state.ts +9 -0
- package/src/core/static/download-html.ts +5 -14
- package/src/core/wasm/bridge.ts +4 -2
- package/src/core/wasm/worker/types.ts +5 -2
- package/src/css/app/codemirror.css +16 -2
- package/src/plugins/impl/FormPlugin.tsx +1 -1
- package/src/plugins/impl/__tests__/FormPlugin.test.tsx +162 -0
- package/src/stories/log-viewer.stories.tsx +12 -6
- package/src/utils/__tests__/blob.test.ts +27 -1
- package/src/utils/__tests__/download.test.tsx +44 -4
- package/src/utils/blob.ts +24 -1
- package/src/utils/download.ts +14 -15
- package/dist/assets/JsonOutput-CkCD-FgM.js +0 -53
- package/dist/assets/LazyAnyLanguageCodeMirror-sVm_hz8A.js +0 -2
- package/dist/assets/RenderHTML-BCvU9dYz.js +0 -1
- package/dist/assets/add-connection-dialog-B-jCRNTN.js +0 -170
- package/dist/assets/ai-model-dropdown-DXgLphFa.js +0 -5
- package/dist/assets/apl-DTwRFDps.js +0 -1
- package/dist/assets/app-config-button-NrM9ywXA.js +0 -1
- package/dist/assets/asciiarmor-CiqkDK0s.js +0 -1
- package/dist/assets/asn1-RTvH5MEs.js +0 -1
- package/dist/assets/blob-C3EfaMOb.js +0 -1
- package/dist/assets/brainfuck-szH_VGzd.js +0 -1
- package/dist/assets/cell-link-DqBkyAFe.js +0 -1
- package/dist/assets/cells-Cf7bHHq3.js +0 -229
- package/dist/assets/channel-D-k8o3T1.js +0 -1
- package/dist/assets/chunk-55IACEB6-xhaY4LU6.js +0 -1
- package/dist/assets/classDiagram-2ON5EDUG-C-rIg7EQ.js +0 -1
- package/dist/assets/classDiagram-v2-WZHVMYZB-MBAsRLae.js +0 -1
- package/dist/assets/clojure-CyEbLmch.js +0 -1
- package/dist/assets/cmake-Dk8f7QuI.js +0 -1
- package/dist/assets/cobol-BJJRqW1D.js +0 -1
- package/dist/assets/coffeescript-BDuWJ9WO.js +0 -1
- package/dist/assets/commonlisp-CVHm2VSp.js +0 -1
- package/dist/assets/components-BH6gDVv6.js +0 -1
- package/dist/assets/config-BbOTTCYY.js +0 -1
- package/dist/assets/crystal-C2Fgr79A.js +0 -1
- package/dist/assets/cypher-CUlCm6vR.js +0 -1
- package/dist/assets/d-4ANEHA6q.js +0 -1
- package/dist/assets/diff-C-W-5V8L.js +0 -1
- package/dist/assets/dist-BCMBu0rO.js +0 -2
- package/dist/assets/dist-CCAhuqF-.js +0 -1
- package/dist/assets/dist-DGhK0kPE.js +0 -1
- package/dist/assets/dist-SVDIDTM2.js +0 -1
- package/dist/assets/dist-xSLg7wNV.js +0 -1
- package/dist/assets/download-BomYt3nl.js +0 -9
- package/dist/assets/dtd-D9h-tL8G.js +0 -1
- package/dist/assets/dylan-D3MC56xy.js +0 -1
- package/dist/assets/ecl-B6UC4tME.js +0 -1
- package/dist/assets/eiffel-CjvEov4k.js +0 -1
- package/dist/assets/elm-DvSbvRWe.js +0 -1
- package/dist/assets/erlang-DJYaGXyq.js +0 -1
- package/dist/assets/error-entries-Birw-8VX.js +0 -8
- package/dist/assets/factor-CUQCrkTo.js +0 -1
- package/dist/assets/file-explorer-panel-Ntq1-VbF.js +0 -26
- package/dist/assets/floating-outline-wz-WSRgP.js +0 -1
- package/dist/assets/focus-DiEyfiAG.js +0 -1
- package/dist/assets/forth-D9xegiCO.js +0 -1
- package/dist/assets/fortran-B0Oe0U8s.js +0 -1
- package/dist/assets/gas-jLjj-PIq.js +0 -1
- package/dist/assets/gherkin-3Ig8Crit.js +0 -1
- package/dist/assets/groovy-NKpNVJ-n.js +0 -1
- package/dist/assets/haskell-OPE4bAjk.js +0 -1
- package/dist/assets/haxe-DEAZF8L3.js +0 -1
- package/dist/assets/home-page-DJ4jJsZj.js +0 -4
- package/dist/assets/idl-BM6265Xl.js +0 -1
- package/dist/assets/index-A71LAt6h.css +0 -2
- package/dist/assets/index-CMZzy-dF.js +0 -38
- package/dist/assets/infoDiagram-HS3SLOUP-DQnMjKYJ.js +0 -2
- package/dist/assets/javascript-CZ9vDpAy.js +0 -1
- package/dist/assets/julia-BrY9TQnt.js +0 -1
- package/dist/assets/katex-C-lfa1AM.js +0 -1
- package/dist/assets/kiosk-mode-ABm3oYgq.js +0 -1
- package/dist/assets/livescript-CNahkUp5.js +0 -1
- package/dist/assets/logs-panel-iFV4ZJ9b.js +0 -1
- package/dist/assets/lua-Skr4TVu_.js +0 -1
- package/dist/assets/mathematica-BXxhrpeY.js +0 -1
- package/dist/assets/mbox-BRrQCVe9.js +0 -1
- package/dist/assets/mirc-CffYPE4R.js +0 -1
- package/dist/assets/mllike-C1DLZhEI.js +0 -1
- package/dist/assets/modelica-CvAyRRNV.js +0 -1
- package/dist/assets/mscgen-uMZWtMZv.js +0 -1
- package/dist/assets/mumps-DFJehEx7.js +0 -1
- package/dist/assets/node-sql-parser-BWgUjcfV.js +0 -68
- package/dist/assets/nsis-BVI9YULz.js +0 -1
- package/dist/assets/ntriples-Bcdh7b2H.js +0 -1
- package/dist/assets/octave-CdAKz6YS.js +0 -1
- package/dist/assets/oz-DSySeR-W.js +0 -1
- package/dist/assets/pair-with-agent-modal-CKOYwOYw.js +0 -4
- package/dist/assets/panels-Dj45fW-v.js +0 -4
- package/dist/assets/pascal-DefziIUN.js +0 -1
- package/dist/assets/perl-BOOloBPk.js +0 -1
- package/dist/assets/pig-f0nBb-5x.js +0 -1
- package/dist/assets/powershell-DToQjbK9.js +0 -1
- package/dist/assets/process-output-BEhIGfkO.js +0 -1
- package/dist/assets/properties-BRob-nyj.js +0 -1
- package/dist/assets/protobuf-DZyC6051.js +0 -1
- package/dist/assets/pug-pVoM8FRt.js +0 -1
- package/dist/assets/puppet-9fuYG07F.js +0 -1
- package/dist/assets/python-_Mr8fyXP.js +0 -1
- package/dist/assets/q-D73s4Y77.js +0 -1
- package/dist/assets/r-BOEjz92e.js +0 -1
- package/dist/assets/rpm-LpXWTM5t.js +0 -1
- package/dist/assets/ruby-DodgSDfF.js +0 -1
- package/dist/assets/sas-D9KCtUmL.js +0 -1
- package/dist/assets/scheme-p8UJxmJw.js +0 -1
- package/dist/assets/scratchpad-panel-B0mEqBNk.js +0 -1
- package/dist/assets/session-panel-Y0Oon0sD.js +0 -1
- package/dist/assets/shell-BWdqyqwL.js +0 -1
- package/dist/assets/sieve-CLwJmtiQ.js +0 -1
- package/dist/assets/slides-MCbMDtlY.css +0 -1
- package/dist/assets/smalltalk-D3KV-Qah.js +0 -1
- package/dist/assets/sparql-D9Jz2mBw.js +0 -1
- package/dist/assets/state-BZQc7xxL.js +0 -3
- package/dist/assets/stateDiagram-v2-4FDKWEC3-CA1l0rNa.js +0 -1
- package/dist/assets/stylus-ClN4l_XO.js +0 -1
- package/dist/assets/swift-Dvd_9xBv.js +0 -1
- package/dist/assets/switch-CvweaCXq.js +0 -1
- package/dist/assets/tcl-DR2p8cyi.js +0 -1
- package/dist/assets/textarea-CpFfEUet.js +0 -1
- package/dist/assets/textile-D6S27_J2.js +0 -1
- package/dist/assets/toml-B-YuQ2Id.js +0 -1
- package/dist/assets/troff-HSk8AoRF.js +0 -1
- package/dist/assets/ttcn-CehzlVdx.js +0 -1
- package/dist/assets/ttcn-cfg-CLEPwk1s.js +0 -1
- package/dist/assets/turtle-DQLHkbOu.js +0 -1
- package/dist/assets/useCellActionButton-CRfIEVB5.js +0 -1
- package/dist/assets/useEventListener-B_w3A283.js +0 -1
- package/dist/assets/useNotebookActions-DTXAoukG.js +0 -12
- package/dist/assets/vb-o1EHrS4z.js +0 -1
- package/dist/assets/vbscript-BS8yUFpf.js +0 -1
- package/dist/assets/velocity-u_oGPFaA.js +0 -1
- package/dist/assets/verilog-CSmDH7su.js +0 -1
- package/dist/assets/vhdl-BCaWLcjw.js +0 -1
- package/dist/assets/webidl-Bf6dokXM.js +0 -1
- package/dist/assets/write-secret-modal-DEEn7sZV.js +0 -1
- package/dist/assets/xquery-Di0kkiXg.js +0 -1
- package/dist/assets/yacas-DB8tPtyp.js +0 -1
- package/dist/assets/z80-DFUvlWxk.js +0 -1
- /package/dist/assets/{ImageComparisonComponent-Cz3xVDLH.js → ImageComparisonComponent-HnxpPJnM.js} +0 -0
- /package/dist/assets/{Inputs-B8-VCb_j.js → Inputs-BhvqLBkk.js} +0 -0
- /package/dist/assets/{Plot-X2G47XHf.js → Plot-Df7XX6zz.js} +0 -0
- /package/dist/assets/{apl-DVqFAlEd.js → apl-CPlG1HX3.js} +0 -0
- /package/dist/assets/{array-Ddg9CgJT.js → array-DkMvCrqF.js} +0 -0
- /package/dist/assets/{asciiarmor-B45BhOLj.js → asciiarmor-DV_pcocJ.js} +0 -0
- /package/dist/assets/{asn1-C4T2ctU6.js → asn1-DPxWcGvG.js} +0 -0
- /package/dist/assets/{asterisk-9U_4Kgke.js → asterisk-Di-nanOd.js} +0 -0
- /package/dist/assets/{azure-nN8APleF.js → azure-BjL5s4-w.js} +0 -0
- /package/dist/assets/{brainfuck-kVh8Eud4.js → brainfuck-CGDdBVNO.js} +0 -0
- /package/dist/assets/{card-VUBaYDpT.js → card-DIbLM4TA.js} +0 -0
- /package/dist/assets/{chunk-4F5CHEZ2-ClSh5rxG.js → chunk-4F5CHEZ2-yOSqdjGN.js} +0 -0
- /package/dist/assets/{chunk-B2363JML-cit0ouFv.js → chunk-B2363JML-BqlxcdFI.js} +0 -0
- /package/dist/assets/{chunk-DR5Q36YT-Bsu9Glc0.js → chunk-DR5Q36YT-9bsCT1tL.js} +0 -0
- /package/dist/assets/{chunk-FRFDVMJY--Re1QfFE.js → chunk-FRFDVMJY-DW58IWII.js} +0 -0
- /package/dist/assets/{chunk-PL6DKKU2-CAwRAr-p.js → chunk-PL6DKKU2-CiPkyomE.js} +0 -0
- /package/dist/assets/{chunk-SJTYNZTY-G1spWesO.js → chunk-SJTYNZTY-UJLIXgY2.js} +0 -0
- /package/dist/assets/{chunk-TQ3KTPDO-DBwra5xv.js → chunk-TQ3KTPDO-DQFcRP5c.js} +0 -0
- /package/dist/assets/{chunk-UMXZTB3W-A5RvYDPE.js → chunk-UMXZTB3W-cibob28z.js} +0 -0
- /package/dist/assets/{clear-button-DQtvx6eq.js → clear-button-Bsxh4lx1.js} +0 -0
- /package/dist/assets/{click-outside-container-CrWZsAF5.js → click-outside-container-LfSB2_ne.js} +0 -0
- /package/dist/assets/{clike-O0gwXilc.js → clike-D91DrsBh.js} +0 -0
- /package/dist/assets/{clojure-CsbMWxp9.js → clojure-B0eb_-2q.js} +0 -0
- /package/dist/assets/{cmake-FpJvOdyj.js → cmake-COzUvjiS.js} +0 -0
- /package/dist/assets/{cobol-Duxbpsru.js → cobol-DW4FSnmb.js} +0 -0
- /package/dist/assets/{coffeescript-D-Unz9IP.js → coffeescript-CommR2mv.js} +0 -0
- /package/dist/assets/{colors-C_0lIznd.js → colors-CyQT5OPu.js} +0 -0
- /package/dist/assets/{common-keywords-PqH2GDfH.js → common-keywords-Bk-0jOKl.js} +0 -0
- /package/dist/assets/{commonlisp-_nR12oc7.js → commonlisp-FR_N9RJL.js} +0 -0
- /package/dist/assets/{crystal-dj3W4b1A.js → crystal-CAN7bz25.js} +0 -0
- /package/dist/assets/{css-0BG6A_BC.js → css-DmLg8a0m.js} +0 -0
- /package/dist/assets/{cypher-CKPokaoH.js → cypher-BzSJn05x.js} +0 -0
- /package/dist/assets/{cytoscape.esm-DzUNSF80.js → cytoscape.esm-CVhOSlMZ.js} +0 -0
- /package/dist/assets/{d-BrbqzVa2.js → d-UpmnByGo.js} +0 -0
- /package/dist/assets/{diff-BmdR9FsO.js → diff-DRpitNo9.js} +0 -0
- /package/dist/assets/{dist-CM-lWxt3.js → dist-1DJkf78n.js} +0 -0
- /package/dist/assets/{dist-ByK00N0T.js → dist-6KRysbQA.js} +0 -0
- /package/dist/assets/{dist-98K4fusX.js → dist-8H9kNP92.js} +0 -0
- /package/dist/assets/{dist-OgwOt8T2.js → dist-8lZYHUSx.js} +0 -0
- /package/dist/assets/{dist-DNGKAtWk.js → dist-B4sFEC9P.js} +0 -0
- /package/dist/assets/{dist-BaKJ0-Tb.js → dist-B5BlmbY-.js} +0 -0
- /package/dist/assets/{dist-CpbbK4-I.js → dist-BDUj3vkc.js} +0 -0
- /package/dist/assets/{dist-3N7-WLqi.js → dist-C13NfWpP.js} +0 -0
- /package/dist/assets/{dist-DokId-qM.js → dist-C3XTRycV.js} +0 -0
- /package/dist/assets/{dist-56ul6-mm.js → dist-C6uSSUmH.js} +0 -0
- /package/dist/assets/{dist-D5ToCtv8.js → dist-CDFlR-dv.js} +0 -0
- /package/dist/assets/{dist-DzAAhYcW.js → dist-CaADT3TK.js} +0 -0
- /package/dist/assets/{dist-B8g3pNYJ.js → dist-CbTMGxEf.js} +0 -0
- /package/dist/assets/{dist-O5-NiN3f.js → dist-CjpCHqUI.js} +0 -0
- /package/dist/assets/{dist-D9sE1udr.js → dist-D0BTeZL0.js} +0 -0
- /package/dist/assets/{dist-DrtRBAn8.js → dist-DE4Vb9tO.js} +0 -0
- /package/dist/assets/{dist-D35OyUMQ.js → dist-DYsXEge_.js} +0 -0
- /package/dist/assets/{dist-C5kf6g-d.js → dist-lCLEUACp.js} +0 -0
- /package/dist/assets/{dtd-DbCXDVgi.js → dtd-CQV9N2ok.js} +0 -0
- /package/dist/assets/{duckdb-keywords-mPlR0SxW.js → duckdb-keywords-CqO5LWsh.js} +0 -0
- /package/dist/assets/{dylan-CLLzL2Js.js → dylan-Bp98yT5y.js} +0 -0
- /package/dist/assets/{ebnf-Cnws41cu.js → ebnf-DoGvzVmX.js} +0 -0
- /package/dist/assets/{ecl-BC7x2nzk.js → ecl-BgtQ3zu5.js} +0 -0
- /package/dist/assets/{eiffel-CDU836rz.js → eiffel-Cu14O7Gi.js} +0 -0
- /package/dist/assets/{elm-D-_bXARs.js → elm-Dp1dn40k.js} +0 -0
- /package/dist/assets/{empty-state-CqJvEFRk.js → empty-state-yX2_pzkH.js} +0 -0
- /package/dist/assets/{erlang-CwDZk2zM.js → erlang-DdogJjdp.js} +0 -0
- /package/dist/assets/{esm-D6WfbcL3.js → esm-DZILy413.js} +0 -0
- /package/dist/assets/{fcl-CwkPc-_9.js → fcl-CTs4ROWI.js} +0 -0
- /package/dist/assets/{forth-D6FsO_8x.js → forth-Dd0r86IP.js} +0 -0
- /package/dist/assets/{fortran-D4BMbIkG.js → fortran-4qvtlW4z.js} +0 -0
- /package/dist/assets/{gas-JFjzcgdY.js → gas-DqwqZHXy.js} +0 -0
- /package/dist/assets/{gherkin-Cyu-qGaF.js → gherkin-DMxJEDh5.js} +0 -0
- /package/dist/assets/{github-_JH-0hIO.js → github-kTVN-x1m.js} +0 -0
- /package/dist/assets/{groovy-CZaE9eN-.js → groovy-DA_MxBua.js} +0 -0
- /package/dist/assets/{haskell-Dc6o0IGr.js → haskell-B_hi8VEK.js} +0 -0
- /package/dist/assets/{haxe-Bsf0tzqs.js → haxe-D-I6YeRN.js} +0 -0
- /package/dist/assets/{http-BQNSD-HR.js → http-Ci3E2pzn.js} +0 -0
- /package/dist/assets/{idl-1W91kQ8_.js → idl-CteRrHSs.js} +0 -0
- /package/dist/assets/{init-nx27Zb9l.js → init-CYoUL2Ak.js} +0 -0
- /package/dist/assets/{javascript-BZ81-2rO.js → javascript-Cq9DsvSW.js} +0 -0
- /package/dist/assets/{julia-BZOsq0r_.js → julia-bHGj6eLp.js} +0 -0
- /package/dist/assets/{katex-CvZ3kCGk.js → katex-BKFLE8En.js} +0 -0
- /package/dist/assets/{livescript-CNZfmikk.js → livescript-C72YlTeO.js} +0 -0
- /package/dist/assets/{loro_wasm_bg-RNUly1SE.js → loro_wasm_bg-aCH66ryB.js} +0 -0
- /package/dist/assets/{lua-DXGRliwd.js → lua-DAtJrHXr.js} +0 -0
- /package/dist/assets/{marimo-icons-C_nFooxr.js → marimo-icons-Bq_N9GGs.js} +0 -0
- /package/dist/assets/{math-CLO4uoaP.js → math-D6WZfqI3.js} +0 -0
- /package/dist/assets/{mathematica-BoUj8M7D.js → mathematica-DGp7b8Lx.js} +0 -0
- /package/dist/assets/{mbox-DLVP8LAe.js → mbox-C35KjfEV.js} +0 -0
- /package/dist/assets/{mirc-kI4d5fMu.js → mirc-BRCHEPv1.js} +0 -0
- /package/dist/assets/{mllike-CD9vBc_2.js → mllike-D7ajla-U.js} +0 -0
- /package/dist/assets/{modelica-DgfsLJuF.js → modelica-0RGVL4ie.js} +0 -0
- /package/dist/assets/{mscgen-B1HDwshJ.js → mscgen-C7Ohs4Tl.js} +0 -0
- /package/dist/assets/{multi-icon-nrKPWjDU.js → multi-icon-C2ijLyOs.js} +0 -0
- /package/dist/assets/{mumps-D_-b9TZD.js → mumps-Cgag5Xef.js} +0 -0
- /package/dist/assets/{nginx-Cm282mo8.js → nginx-k5GTB7o1.js} +0 -0
- /package/dist/assets/{ntriples-COX9JFZ8.js → ntriples-oQv5c69K.js} +0 -0
- /package/dist/assets/{octave-BejycR79.js → octave-BMTXs4lo.js} +0 -0
- /package/dist/assets/{oz-CFFivrGn.js → oz-CuHYwo8r.js} +0 -0
- /package/dist/assets/{panel-context-CH75ubGG.js → panel-context-CmeYEpWr.js} +0 -0
- /package/dist/assets/{pascal-B_p9jkCs.js → pascal-eFKoVV2p.js} +0 -0
- /package/dist/assets/{path-Bz_hIzg5.js → path-BcLO3NWe.js} +0 -0
- /package/dist/assets/{pathUtils-Bfcp5m-a.js → pathUtils-BbJtW9Mp.js} +0 -0
- /package/dist/assets/{perl-C-SFBTly.js → perl-B1OqOW8w.js} +0 -0
- /package/dist/assets/{pig-BhxDMp2k.js → pig-gIrBDx27.js} +0 -0
- /package/dist/assets/{powershell-c59M-9N2.js → powershell-3fQF2XND.js} +0 -0
- /package/dist/assets/{properties-D1JNwCKy.js → properties-D4HHpZmU.js} +0 -0
- /package/dist/assets/{protobuf-DQS7ex8R.js → protobuf-DFSTKR0L.js} +0 -0
- /package/dist/assets/{puppet-DaQvhvew.js → puppet-BAISgXk9.js} +0 -0
- /package/dist/assets/{python-XHl3eRTS.js → python-mPctBCbA.js} +0 -0
- /package/dist/assets/{q-DppnoRE3.js → q-CYeV5Dbb.js} +0 -0
- /package/dist/assets/{r-D8-F_FWj.js → r-Ds4UrjIV.js} +0 -0
- /package/dist/assets/{request-registry-DHocQ_4I.js → request-registry-CEkYnwgr.js} +0 -0
- /package/dist/assets/{requests-DYeT4CEe.js → requests-CIR84T8A.js} +0 -0
- /package/dist/assets/{rpm-CegJhNNO.js → rpm-DV5-r6dM.js} +0 -0
- /package/dist/assets/{ruby-YMIxufV1.js → ruby-B9qrycrI.js} +0 -0
- /package/dist/assets/{sas-wTtX9UIQ.js → sas-Cd7L1ZOe.js} +0 -0
- /package/dist/assets/{scheme-BGenom3k.js → scheme-L6Kva-Kc.js} +0 -0
- /package/dist/assets/{semaphore-DtBYRzWS.js → semaphore-YOr3WMiw.js} +0 -0
- /package/dist/assets/{shell-Bu1sLaiP.js → shell-Ck42V1Kn.js} +0 -0
- /package/dist/assets/{sieve-ffe6rUQh.js → sieve-DfSJcUfS.js} +0 -0
- /package/dist/assets/{simple-mode-DBSzUJLA.js → simple-mode-CfoR0Lvg.js} +0 -0
- /package/dist/assets/{smalltalk-NU5EGjHp.js → smalltalk-CT418Iph.js} +0 -0
- /package/dist/assets/{solr-ptw1yIqO.js → solr-DfAVBX8L.js} +0 -0
- /package/dist/assets/{sparql-uqVktnwO.js → sparql-BlJ_cLEt.js} +0 -0
- /package/dist/assets/{spreadsheet-VEzeu_mb.js → spreadsheet-Qy1VjLDU.js} +0 -0
- /package/dist/assets/{sql-tYjnWETe.js → sql-BAkD7JGK.js} +0 -0
- /package/dist/assets/{src-BshXgZd4.js → src-Dlf0iGaF.js} +0 -0
- /package/dist/assets/{stylus-B2E6Ulaz.js → stylus-92qIiGm1.js} +0 -0
- /package/dist/assets/{swift-Rmnn7ATv.js → swift-gZzicbJu.js} +0 -0
- /package/dist/assets/{tcl-ZPWCn2nn.js → tcl-CtgoBYkk.js} +0 -0
- /package/dist/assets/{textile-uhA33kFk.js → textile-Du3RzJ2D.js} +0 -0
- /package/dist/assets/{tiddlywiki-CPkGLyXH.js → tiddlywiki-CL3W3RpP.js} +0 -0
- /package/dist/assets/{tiki-BtjLo8OF.js → tiki-2L3jCwab.js} +0 -0
- /package/dist/assets/{timer-VYMLXPue.js → timer-DLLzXmjF.js} +0 -0
- /package/dist/assets/{toml-BFZv2Mv7.js → toml-HcF44TVB.js} +0 -0
- /package/dist/assets/{treemap-Bca0xNNq.js → treemap-BdaAyoGw.js} +0 -0
- /package/dist/assets/{troff-B5eayHop.js → troff-xbwT4huN.js} +0 -0
- /package/dist/assets/{ttcn-cfg-CfbkL3Q_.js → ttcn-cfg-jWDg1i50.js} +0 -0
- /package/dist/assets/{ttcn-BM0Yp8NY.js → ttcn-phKysj_0.js} +0 -0
- /package/dist/assets/{turtle-DvetLxrv.js → turtle-CPC48wcy.js} +0 -0
- /package/dist/assets/{types-Da7lA5YC.js → types-C7hjolXC.js} +0 -0
- /package/dist/assets/{use-vega-container-remeasure-CbKTb_jy.js → use-vega-container-remeasure-0GBen_rR.js} +0 -0
- /package/dist/assets/{vb-i5Z8scch.js → vb-BTubZ2rB.js} +0 -0
- /package/dist/assets/{vbscript-BiPYgIyi.js → vbscript-B52mDFWM.js} +0 -0
- /package/dist/assets/{velocity-Dw3R3YoX.js → velocity-BO3M1iFD.js} +0 -0
- /package/dist/assets/{verilog-B8FhJcX6.js → verilog-CBz90JJu.js} +0 -0
- /package/dist/assets/{vhdl-BqPEoXdJ.js → vhdl-CeQ1lGlV.js} +0 -0
- /package/dist/assets/{web-vitals-CwE0GGzl.js → web-vitals-Q0-_CtWm.js} +0 -0
- /package/dist/assets/{webidl-mMO-qW5Q.js → webidl-CRtF5pmu.js} +0 -0
- /package/dist/assets/{ws-BmTnbVEi.js → ws-CNqquaud.js} +0 -0
- /package/dist/assets/{xquery-DvqNwq7L.js → xquery-CFnbrHav.js} +0 -0
- /package/dist/assets/{yacas-Dku9Z6Kf.js → yacas-KIC_JO6M.js} +0 -0
- /package/dist/assets/{z80-DvazU5Tr.js → z80-kGpw5_me.js} +0 -0
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
/* Copyright 2026 Marimo. All rights reserved. */
|
|
2
|
-
/* oxlint-disable typescript/no-explicit-any */
|
|
3
|
-
|
|
4
2
|
import { EditorView } from "@codemirror/view";
|
|
5
3
|
import {
|
|
6
4
|
type LanguageServerClient,
|
|
@@ -18,7 +16,11 @@ import { PythonLanguageAdapter } from "../../language/languages/python";
|
|
|
18
16
|
import { languageMetadataField } from "../../language/metadata";
|
|
19
17
|
import { createNotebookLens } from "../lens";
|
|
20
18
|
import { NotebookLanguageServerClient } from "../notebook-lsp";
|
|
21
|
-
import {
|
|
19
|
+
import {
|
|
20
|
+
CellDocumentUri,
|
|
21
|
+
type ClientNotification,
|
|
22
|
+
type ILanguageServerClient,
|
|
23
|
+
} from "../types";
|
|
22
24
|
|
|
23
25
|
const Cells = {
|
|
24
26
|
cell1: cellId("cell1"),
|
|
@@ -26,6 +28,40 @@ const Cells = {
|
|
|
26
28
|
cell3: cellId("cell3"),
|
|
27
29
|
};
|
|
28
30
|
|
|
31
|
+
type TestLanguageServerClient = ILanguageServerClient & {
|
|
32
|
+
notify: (method: string, params: unknown) => Promise<void>;
|
|
33
|
+
processNotification: (notification: ClientNotification) => void;
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
type GetNotebookEditors = () => Record<CellId, EditorView | null | undefined>;
|
|
37
|
+
|
|
38
|
+
function replaceNotebookEditors(
|
|
39
|
+
client: NotebookLanguageServerClient,
|
|
40
|
+
getNotebookEditors: GetNotebookEditors,
|
|
41
|
+
): void {
|
|
42
|
+
const mutableClient = client as unknown as {
|
|
43
|
+
getNotebookEditors: GetNotebookEditors;
|
|
44
|
+
};
|
|
45
|
+
mutableClient.getNotebookEditors = getNotebookEditors;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
function isPublishDiagnosticsNotification(
|
|
49
|
+
notification: ClientNotification,
|
|
50
|
+
): notification is {
|
|
51
|
+
method: "textDocument/publishDiagnostics";
|
|
52
|
+
params: LSP.PublishDiagnosticsParams;
|
|
53
|
+
} {
|
|
54
|
+
return (
|
|
55
|
+
notification.method === "textDocument/publishDiagnostics" &&
|
|
56
|
+
typeof notification.params === "object" &&
|
|
57
|
+
notification.params !== null &&
|
|
58
|
+
"uri" in notification.params &&
|
|
59
|
+
typeof notification.params.uri === "string" &&
|
|
60
|
+
"diagnostics" in notification.params &&
|
|
61
|
+
Array.isArray(notification.params.diagnostics)
|
|
62
|
+
);
|
|
63
|
+
}
|
|
64
|
+
|
|
29
65
|
describe("createNotebookLens", () => {
|
|
30
66
|
it("should produce correct lens for same inputs", () => {
|
|
31
67
|
// Use unique content for this test
|
|
@@ -243,8 +279,9 @@ describe("createNotebookLens", () => {
|
|
|
243
279
|
});
|
|
244
280
|
|
|
245
281
|
describe("NotebookLanguageServerClient", () => {
|
|
246
|
-
let mockClient: Mocked<
|
|
282
|
+
let mockClient: Mocked<TestLanguageServerClient>;
|
|
247
283
|
let notebookClient: NotebookLanguageServerClient;
|
|
284
|
+
let notifyMock: Mocked<TestLanguageServerClient>["notify"];
|
|
248
285
|
|
|
249
286
|
beforeEach(() => {
|
|
250
287
|
mockClient = {
|
|
@@ -252,12 +289,18 @@ describe("NotebookLanguageServerClient", () => {
|
|
|
252
289
|
capabilities: {},
|
|
253
290
|
initializePromise: Promise.resolve(),
|
|
254
291
|
clientCapabilities: {},
|
|
292
|
+
hasCapability: vi.fn().mockReturnValue(false),
|
|
255
293
|
completionItemResolve: vi.fn(),
|
|
294
|
+
codeActionResolve: vi.fn(),
|
|
256
295
|
initialize: vi.fn(),
|
|
257
296
|
close: vi.fn(),
|
|
258
297
|
onNotification: vi.fn(),
|
|
259
298
|
textDocumentDidOpen: vi.fn(),
|
|
260
299
|
textDocumentDidChange: vi.fn(),
|
|
300
|
+
textDocumentDidClose: vi.fn(),
|
|
301
|
+
textDocumentWillSave: vi.fn(),
|
|
302
|
+
textDocumentWillSaveWaitUntil: vi.fn(),
|
|
303
|
+
textDocumentDidSave: vi.fn(),
|
|
261
304
|
textDocumentHover: vi.fn(),
|
|
262
305
|
textDocumentCompletion: vi.fn(),
|
|
263
306
|
textDocumentDefinition: vi.fn(),
|
|
@@ -265,14 +308,10 @@ describe("NotebookLanguageServerClient", () => {
|
|
|
265
308
|
textDocumentCodeAction: vi.fn(),
|
|
266
309
|
textDocumentSignatureHelp: vi.fn(),
|
|
267
310
|
textDocumentRename: vi.fn(),
|
|
311
|
+
processNotification: vi.fn(),
|
|
312
|
+
notify: vi.fn(),
|
|
268
313
|
};
|
|
269
|
-
|
|
270
|
-
(mockClient as any).notify = vi.fn();
|
|
271
|
-
notebookClient = new NotebookLanguageServerClient(mockClient, {}, () => ({
|
|
272
|
-
[Cells.cell1]: new EditorView({ doc: "# this is a comment" }),
|
|
273
|
-
[Cells.cell2]: new EditorView({ doc: "import math\nimport numpy" }),
|
|
274
|
-
[Cells.cell3]: new EditorView({ doc: "print(math.sqrt(4))" }),
|
|
275
|
-
}));
|
|
314
|
+
notifyMock = mockClient.notify;
|
|
276
315
|
|
|
277
316
|
// Mock the atom instead of the instance method
|
|
278
317
|
vi.spyOn(store, "get").mockImplementation((atom) => {
|
|
@@ -295,7 +334,331 @@ describe("NotebookLanguageServerClient", () => {
|
|
|
295
334
|
return undefined;
|
|
296
335
|
});
|
|
297
336
|
|
|
298
|
-
(
|
|
337
|
+
notebookClient = new NotebookLanguageServerClient(mockClient, {}, () => ({
|
|
338
|
+
[Cells.cell1]: new EditorView({ doc: "# this is a comment" }),
|
|
339
|
+
[Cells.cell2]: new EditorView({ doc: "import math\nimport numpy" }),
|
|
340
|
+
[Cells.cell3]: new EditorView({ doc: "print(math.sqrt(4))" }),
|
|
341
|
+
}));
|
|
342
|
+
});
|
|
343
|
+
|
|
344
|
+
describe("document lifecycle", () => {
|
|
345
|
+
it("maps cell opens and closes to the merged notebook document", async () => {
|
|
346
|
+
mockClient.textDocumentDidOpen.mockResolvedValue(true);
|
|
347
|
+
const cellUri = CellDocumentUri.of(Cells.cell1);
|
|
348
|
+
|
|
349
|
+
await expect(
|
|
350
|
+
notebookClient.textDocumentDidOpen({
|
|
351
|
+
textDocument: {
|
|
352
|
+
uri: cellUri,
|
|
353
|
+
languageId: "python",
|
|
354
|
+
version: 1,
|
|
355
|
+
text: "print('cell')",
|
|
356
|
+
},
|
|
357
|
+
}),
|
|
358
|
+
).resolves.toBe(true);
|
|
359
|
+
await notebookClient.textDocumentDidClose({
|
|
360
|
+
textDocument: { uri: cellUri },
|
|
361
|
+
});
|
|
362
|
+
|
|
363
|
+
expect(mockClient.textDocumentDidOpen).toHaveBeenCalledWith({
|
|
364
|
+
textDocument: {
|
|
365
|
+
uri: "file:///project/__marimo_notebook__.py",
|
|
366
|
+
languageId: "python",
|
|
367
|
+
version: 1,
|
|
368
|
+
text: [
|
|
369
|
+
"# this is a comment",
|
|
370
|
+
"import math",
|
|
371
|
+
"import numpy",
|
|
372
|
+
"print(math.sqrt(4))",
|
|
373
|
+
].join("\n"),
|
|
374
|
+
},
|
|
375
|
+
});
|
|
376
|
+
expect(mockClient.textDocumentDidClose).toHaveBeenCalledWith({
|
|
377
|
+
textDocument: {
|
|
378
|
+
uri: "file:///project/__marimo_notebook__.py",
|
|
379
|
+
},
|
|
380
|
+
});
|
|
381
|
+
});
|
|
382
|
+
|
|
383
|
+
it("reopens the merged document directly after reconnection", async () => {
|
|
384
|
+
const cellUri = CellDocumentUri.of(Cells.cell1);
|
|
385
|
+
await notebookClient.textDocumentDidOpen({
|
|
386
|
+
textDocument: {
|
|
387
|
+
uri: cellUri,
|
|
388
|
+
languageId: "python",
|
|
389
|
+
version: 1,
|
|
390
|
+
text: "print('cell')",
|
|
391
|
+
},
|
|
392
|
+
});
|
|
393
|
+
notifyMock.mockClear();
|
|
394
|
+
|
|
395
|
+
await notebookClient.resyncAllDocuments();
|
|
396
|
+
|
|
397
|
+
expect(mockClient.initialize).toHaveBeenCalledTimes(1);
|
|
398
|
+
expect(notifyMock).toHaveBeenNthCalledWith(
|
|
399
|
+
1,
|
|
400
|
+
"workspace/didChangeConfiguration",
|
|
401
|
+
{ settings: {} },
|
|
402
|
+
);
|
|
403
|
+
expect(notifyMock).toHaveBeenNthCalledWith(2, "textDocument/didOpen", {
|
|
404
|
+
textDocument: {
|
|
405
|
+
uri: "file:///project/__marimo_notebook__.py",
|
|
406
|
+
languageId: "python",
|
|
407
|
+
version: 1,
|
|
408
|
+
text: [
|
|
409
|
+
"# this is a comment",
|
|
410
|
+
"import math",
|
|
411
|
+
"import numpy",
|
|
412
|
+
"print(math.sqrt(4))",
|
|
413
|
+
].join("\n"),
|
|
414
|
+
},
|
|
415
|
+
});
|
|
416
|
+
expect(mockClient.textDocumentDidOpen).toHaveBeenCalledTimes(1);
|
|
417
|
+
});
|
|
418
|
+
|
|
419
|
+
it("does not reopen a notebook with no active editor documents", async () => {
|
|
420
|
+
notifyMock.mockClear();
|
|
421
|
+
|
|
422
|
+
await notebookClient.resyncAllDocuments();
|
|
423
|
+
|
|
424
|
+
expect(notifyMock).toHaveBeenCalledTimes(1);
|
|
425
|
+
expect(notifyMock).not.toHaveBeenCalledWith(
|
|
426
|
+
"textDocument/didOpen",
|
|
427
|
+
expect.anything(),
|
|
428
|
+
);
|
|
429
|
+
});
|
|
430
|
+
|
|
431
|
+
it("keeps the merged document open until its last cell view closes", async () => {
|
|
432
|
+
const cellUri = CellDocumentUri.of(Cells.cell1);
|
|
433
|
+
const openParams: LSP.DidOpenTextDocumentParams = {
|
|
434
|
+
textDocument: {
|
|
435
|
+
uri: cellUri,
|
|
436
|
+
languageId: "python",
|
|
437
|
+
version: 1,
|
|
438
|
+
text: "value = 1",
|
|
439
|
+
},
|
|
440
|
+
};
|
|
441
|
+
await notebookClient.textDocumentDidOpen(openParams);
|
|
442
|
+
await notebookClient.textDocumentDidOpen(openParams);
|
|
443
|
+
await notebookClient.textDocumentDidClose({
|
|
444
|
+
textDocument: { uri: cellUri },
|
|
445
|
+
});
|
|
446
|
+
notifyMock.mockClear();
|
|
447
|
+
|
|
448
|
+
await notebookClient.resyncAllDocuments();
|
|
449
|
+
expect(notifyMock).toHaveBeenCalledWith(
|
|
450
|
+
"textDocument/didOpen",
|
|
451
|
+
expect.anything(),
|
|
452
|
+
);
|
|
453
|
+
|
|
454
|
+
await notebookClient.textDocumentDidClose({
|
|
455
|
+
textDocument: { uri: cellUri },
|
|
456
|
+
});
|
|
457
|
+
notifyMock.mockClear();
|
|
458
|
+
await notebookClient.resyncAllDocuments();
|
|
459
|
+
expect(notifyMock).not.toHaveBeenCalledWith(
|
|
460
|
+
"textDocument/didOpen",
|
|
461
|
+
expect.anything(),
|
|
462
|
+
);
|
|
463
|
+
});
|
|
464
|
+
|
|
465
|
+
it("ignores an unmatched close instead of forwarding it to the underlying client", async () => {
|
|
466
|
+
const cellUri = CellDocumentUri.of(Cells.cell1);
|
|
467
|
+
|
|
468
|
+
// No matching textDocumentDidOpen was ever recorded for this cell.
|
|
469
|
+
await notebookClient.textDocumentDidClose({
|
|
470
|
+
textDocument: { uri: cellUri },
|
|
471
|
+
});
|
|
472
|
+
|
|
473
|
+
expect(mockClient.textDocumentDidClose).not.toHaveBeenCalled();
|
|
474
|
+
});
|
|
475
|
+
|
|
476
|
+
it("does not let an unmatched close of one cell close the document for others", async () => {
|
|
477
|
+
const cellUri1 = CellDocumentUri.of(Cells.cell1);
|
|
478
|
+
const cellUri2 = CellDocumentUri.of(Cells.cell2);
|
|
479
|
+
await notebookClient.textDocumentDidOpen({
|
|
480
|
+
textDocument: {
|
|
481
|
+
uri: cellUri2,
|
|
482
|
+
languageId: "python",
|
|
483
|
+
version: 1,
|
|
484
|
+
text: "import math",
|
|
485
|
+
},
|
|
486
|
+
});
|
|
487
|
+
|
|
488
|
+
// A spurious close for a cell that was never opened must not forward a
|
|
489
|
+
// close for the merged document while cell2's view is still open.
|
|
490
|
+
await notebookClient.textDocumentDidClose({
|
|
491
|
+
textDocument: { uri: cellUri1 },
|
|
492
|
+
});
|
|
493
|
+
|
|
494
|
+
expect(mockClient.textDocumentDidClose).not.toHaveBeenCalled();
|
|
495
|
+
});
|
|
496
|
+
|
|
497
|
+
it("rolls back the open count when the underlying client rejects textDocumentDidOpen", async () => {
|
|
498
|
+
const cellUri = CellDocumentUri.of(Cells.cell1);
|
|
499
|
+
mockClient.textDocumentDidOpen.mockRejectedValueOnce(
|
|
500
|
+
new Error("transport failure"),
|
|
501
|
+
);
|
|
502
|
+
|
|
503
|
+
await expect(
|
|
504
|
+
notebookClient.textDocumentDidOpen({
|
|
505
|
+
textDocument: {
|
|
506
|
+
uri: cellUri,
|
|
507
|
+
languageId: "python",
|
|
508
|
+
version: 1,
|
|
509
|
+
text: "value = 1",
|
|
510
|
+
},
|
|
511
|
+
}),
|
|
512
|
+
).rejects.toThrow("transport failure");
|
|
513
|
+
|
|
514
|
+
// The failed open must not leave a phantom reference behind: a
|
|
515
|
+
// subsequent resync should not believe this cell is open.
|
|
516
|
+
notifyMock.mockClear();
|
|
517
|
+
await notebookClient.resyncAllDocuments();
|
|
518
|
+
expect(notifyMock).not.toHaveBeenCalledWith(
|
|
519
|
+
"textDocument/didOpen",
|
|
520
|
+
expect.anything(),
|
|
521
|
+
);
|
|
522
|
+
});
|
|
523
|
+
|
|
524
|
+
it("keeps the reference and marks the cell seen when the underlying client reports no fresh open (result === false)", async () => {
|
|
525
|
+
// The vendor client resolves `false` when another view already has the
|
|
526
|
+
// shared merged document open: it did not need to send its own
|
|
527
|
+
// `didOpen`, but the document is genuinely open. This is the common
|
|
528
|
+
// case for every cell after the first one in a notebook, since all
|
|
529
|
+
// cells share the same underlying merged-document URI. It must not be
|
|
530
|
+
// treated like a rejection.
|
|
531
|
+
const cellUri = CellDocumentUri.of(Cells.cell1);
|
|
532
|
+
mockClient.textDocumentDidOpen.mockResolvedValueOnce(false);
|
|
533
|
+
|
|
534
|
+
await expect(
|
|
535
|
+
notebookClient.textDocumentDidOpen({
|
|
536
|
+
textDocument: {
|
|
537
|
+
uri: cellUri,
|
|
538
|
+
languageId: "python",
|
|
539
|
+
version: 1,
|
|
540
|
+
text: "value = 1",
|
|
541
|
+
},
|
|
542
|
+
}),
|
|
543
|
+
).resolves.toBe(false);
|
|
544
|
+
|
|
545
|
+
const seenCellDocumentUris = (
|
|
546
|
+
notebookClient as unknown as { seenCellDocumentUris: Set<string> }
|
|
547
|
+
).seenCellDocumentUris;
|
|
548
|
+
expect(seenCellDocumentUris.has(cellUri)).toBe(true);
|
|
549
|
+
|
|
550
|
+
// The reference must still be tracked: closing it forwards a real
|
|
551
|
+
// close instead of being treated as unmatched.
|
|
552
|
+
await notebookClient.textDocumentDidClose({
|
|
553
|
+
textDocument: { uri: cellUri },
|
|
554
|
+
});
|
|
555
|
+
expect(mockClient.textDocumentDidClose).toHaveBeenCalledTimes(1);
|
|
556
|
+
});
|
|
557
|
+
|
|
558
|
+
it("does not mark a cell as seen when the underlying client rejects textDocumentDidOpen", async () => {
|
|
559
|
+
const cellUri = CellDocumentUri.of(Cells.cell1);
|
|
560
|
+
mockClient.textDocumentDidOpen.mockRejectedValueOnce(
|
|
561
|
+
new Error("transport failure"),
|
|
562
|
+
);
|
|
563
|
+
|
|
564
|
+
await expect(
|
|
565
|
+
notebookClient.textDocumentDidOpen({
|
|
566
|
+
textDocument: {
|
|
567
|
+
uri: cellUri,
|
|
568
|
+
languageId: "python",
|
|
569
|
+
version: 1,
|
|
570
|
+
text: "value = 1",
|
|
571
|
+
},
|
|
572
|
+
}),
|
|
573
|
+
).rejects.toThrow("transport failure");
|
|
574
|
+
|
|
575
|
+
// `seenCellDocumentUris` drives diagnostic clearing; a cell that never
|
|
576
|
+
// successfully opened has no diagnostics to clear and must not be
|
|
577
|
+
// tracked as seen.
|
|
578
|
+
const seenCellDocumentUris = (
|
|
579
|
+
notebookClient as unknown as { seenCellDocumentUris: Set<string> }
|
|
580
|
+
).seenCellDocumentUris;
|
|
581
|
+
expect(seenCellDocumentUris.has(cellUri)).toBe(false);
|
|
582
|
+
});
|
|
583
|
+
|
|
584
|
+
it("does not drop a concurrent open's reference when an earlier open for the same cell rejects", async () => {
|
|
585
|
+
const cellUri = CellDocumentUri.of(Cells.cell1);
|
|
586
|
+
const openParams: LSP.DidOpenTextDocumentParams = {
|
|
587
|
+
textDocument: {
|
|
588
|
+
uri: cellUri,
|
|
589
|
+
languageId: "python",
|
|
590
|
+
version: 1,
|
|
591
|
+
text: "value = 1",
|
|
592
|
+
},
|
|
593
|
+
};
|
|
594
|
+
|
|
595
|
+
let rejectFirst!: (error: Error) => void;
|
|
596
|
+
const firstUnderlyingOpen = new Promise<boolean>((_, reject) => {
|
|
597
|
+
rejectFirst = reject;
|
|
598
|
+
});
|
|
599
|
+
let resolveSecond!: (value: boolean) => void;
|
|
600
|
+
const secondUnderlyingOpen = new Promise<boolean>((resolve) => {
|
|
601
|
+
resolveSecond = resolve;
|
|
602
|
+
});
|
|
603
|
+
mockClient.textDocumentDidOpen
|
|
604
|
+
.mockReturnValueOnce(firstUnderlyingOpen)
|
|
605
|
+
.mockReturnValueOnce(secondUnderlyingOpen);
|
|
606
|
+
|
|
607
|
+
// Two concurrent opens for the same cell (e.g. a fast remount) both
|
|
608
|
+
// increment the shared count before either underlying call settles.
|
|
609
|
+
const firstCall = notebookClient.textDocumentDidOpen(openParams);
|
|
610
|
+
const secondCall = notebookClient.textDocumentDidOpen(openParams);
|
|
611
|
+
const firstCallOutcome = firstCall.catch((error: Error) => error);
|
|
612
|
+
|
|
613
|
+
// The first (stale) open fails; its rollback must not erase the
|
|
614
|
+
// second, still-live open's reference.
|
|
615
|
+
rejectFirst(new Error("transport failure"));
|
|
616
|
+
await firstCallOutcome;
|
|
617
|
+
|
|
618
|
+
resolveSecond(true);
|
|
619
|
+
await secondCall;
|
|
620
|
+
|
|
621
|
+
await notebookClient.textDocumentDidClose({
|
|
622
|
+
textDocument: { uri: cellUri },
|
|
623
|
+
});
|
|
624
|
+
expect(mockClient.textDocumentDidClose).toHaveBeenCalledTimes(1);
|
|
625
|
+
});
|
|
626
|
+
|
|
627
|
+
it("maps safe save notifications and rejects merged save edits", async () => {
|
|
628
|
+
const cellUri = CellDocumentUri.of(Cells.cell1);
|
|
629
|
+
const willSaveParams: LSP.WillSaveTextDocumentParams = {
|
|
630
|
+
textDocument: { uri: cellUri },
|
|
631
|
+
reason: LSP.TextDocumentSaveReason.Manual,
|
|
632
|
+
};
|
|
633
|
+
|
|
634
|
+
await notebookClient.textDocumentWillSave(willSaveParams);
|
|
635
|
+
await expect(
|
|
636
|
+
notebookClient.textDocumentWillSaveWaitUntil(willSaveParams),
|
|
637
|
+
).resolves.toBeNull();
|
|
638
|
+
await notebookClient.textDocumentDidSave({
|
|
639
|
+
textDocument: { uri: cellUri },
|
|
640
|
+
text: "cell text",
|
|
641
|
+
});
|
|
642
|
+
|
|
643
|
+
expect(mockClient.textDocumentWillSave).toHaveBeenCalledWith({
|
|
644
|
+
textDocument: {
|
|
645
|
+
uri: "file:///project/__marimo_notebook__.py",
|
|
646
|
+
},
|
|
647
|
+
reason: LSP.TextDocumentSaveReason.Manual,
|
|
648
|
+
});
|
|
649
|
+
expect(mockClient.textDocumentWillSaveWaitUntil).not.toHaveBeenCalled();
|
|
650
|
+
expect(mockClient.textDocumentDidSave).toHaveBeenCalledWith({
|
|
651
|
+
textDocument: {
|
|
652
|
+
uri: "file:///project/__marimo_notebook__.py",
|
|
653
|
+
},
|
|
654
|
+
text: [
|
|
655
|
+
"# this is a comment",
|
|
656
|
+
"import math",
|
|
657
|
+
"import numpy",
|
|
658
|
+
"print(math.sqrt(4))",
|
|
659
|
+
].join("\n"),
|
|
660
|
+
});
|
|
661
|
+
});
|
|
299
662
|
});
|
|
300
663
|
|
|
301
664
|
describe("textDocumentHover", () => {
|
|
@@ -598,26 +961,6 @@ describe("NotebookLanguageServerClient", () => {
|
|
|
598
961
|
|
|
599
962
|
describe("textDocumentRename", () => {
|
|
600
963
|
it("should transform rename position and apply edits to editor views", async () => {
|
|
601
|
-
const props = {
|
|
602
|
-
workspaceFolders: null,
|
|
603
|
-
capabilities: {
|
|
604
|
-
textDocument: {
|
|
605
|
-
rename: {
|
|
606
|
-
prepareSupport: true,
|
|
607
|
-
},
|
|
608
|
-
},
|
|
609
|
-
},
|
|
610
|
-
languageId: "python",
|
|
611
|
-
transport: {
|
|
612
|
-
sendData: vi.fn(),
|
|
613
|
-
subscribe: vi.fn(),
|
|
614
|
-
connect: vi.fn(),
|
|
615
|
-
transportRequestManager: {
|
|
616
|
-
send: vi.fn(),
|
|
617
|
-
},
|
|
618
|
-
} as any,
|
|
619
|
-
};
|
|
620
|
-
|
|
621
964
|
// Setup mock plugins with editor views
|
|
622
965
|
const mockView1 = new EditorView({
|
|
623
966
|
doc: "# this is a comment",
|
|
@@ -627,7 +970,6 @@ describe("NotebookLanguageServerClient", () => {
|
|
|
627
970
|
languageServerWithClient({
|
|
628
971
|
client: mockClient as unknown as LanguageServerClient,
|
|
629
972
|
documentUri: CellDocumentUri.of(Cells.cell1),
|
|
630
|
-
...props,
|
|
631
973
|
}),
|
|
632
974
|
],
|
|
633
975
|
});
|
|
@@ -641,7 +983,6 @@ describe("NotebookLanguageServerClient", () => {
|
|
|
641
983
|
languageServerWithClient({
|
|
642
984
|
client: mockClient as unknown as LanguageServerClient,
|
|
643
985
|
documentUri: CellDocumentUri.of(Cells.cell2),
|
|
644
|
-
...props,
|
|
645
986
|
}),
|
|
646
987
|
],
|
|
647
988
|
});
|
|
@@ -655,17 +996,16 @@ describe("NotebookLanguageServerClient", () => {
|
|
|
655
996
|
languageServerWithClient({
|
|
656
997
|
client: mockClient as unknown as LanguageServerClient,
|
|
657
998
|
documentUri: CellDocumentUri.of(Cells.cell3),
|
|
658
|
-
...props,
|
|
659
999
|
}),
|
|
660
1000
|
],
|
|
661
1001
|
});
|
|
662
1002
|
expect(mockView3.state.doc.toString()).toBe("print(math.sqrt(4))");
|
|
663
1003
|
|
|
664
|
-
(notebookClient
|
|
1004
|
+
replaceNotebookEditors(notebookClient, () => ({
|
|
665
1005
|
[Cells.cell1]: mockView1,
|
|
666
1006
|
[Cells.cell2]: mockView2,
|
|
667
1007
|
[Cells.cell3]: mockView3,
|
|
668
|
-
});
|
|
1008
|
+
}));
|
|
669
1009
|
|
|
670
1010
|
// Setup rename params
|
|
671
1011
|
const renameParams: LSP.RenameParams = {
|
|
@@ -825,7 +1165,7 @@ describe("NotebookLanguageServerClient", () => {
|
|
|
825
1165
|
end: { line: 0, character: 5 },
|
|
826
1166
|
},
|
|
827
1167
|
// Missing newText property
|
|
828
|
-
} as
|
|
1168
|
+
} as unknown as LSP.TextEdit,
|
|
829
1169
|
],
|
|
830
1170
|
},
|
|
831
1171
|
],
|
|
@@ -858,26 +1198,6 @@ describe("NotebookLanguageServerClient", () => {
|
|
|
858
1198
|
});
|
|
859
1199
|
|
|
860
1200
|
it("should handle raw strings with markdown content during rename (issue #7377)", async () => {
|
|
861
|
-
const props = {
|
|
862
|
-
workspaceFolders: null,
|
|
863
|
-
capabilities: {
|
|
864
|
-
textDocument: {
|
|
865
|
-
rename: {
|
|
866
|
-
prepareSupport: true,
|
|
867
|
-
},
|
|
868
|
-
},
|
|
869
|
-
},
|
|
870
|
-
languageId: "python",
|
|
871
|
-
transport: {
|
|
872
|
-
sendData: vi.fn(),
|
|
873
|
-
subscribe: vi.fn(),
|
|
874
|
-
connect: vi.fn(),
|
|
875
|
-
transportRequestManager: {
|
|
876
|
-
send: vi.fn(),
|
|
877
|
-
},
|
|
878
|
-
} as any,
|
|
879
|
-
};
|
|
880
|
-
|
|
881
1201
|
// Setup mock plugins with editor views
|
|
882
1202
|
const markdownCell = 'mo.md(r"""\n# Header\n""")';
|
|
883
1203
|
const variableCell = "a = 'Test'";
|
|
@@ -890,7 +1210,6 @@ describe("NotebookLanguageServerClient", () => {
|
|
|
890
1210
|
languageServerWithClient({
|
|
891
1211
|
client: mockClient as unknown as LanguageServerClient,
|
|
892
1212
|
documentUri: CellDocumentUri.of(Cells.cell1),
|
|
893
|
-
...props,
|
|
894
1213
|
}),
|
|
895
1214
|
],
|
|
896
1215
|
});
|
|
@@ -903,7 +1222,6 @@ describe("NotebookLanguageServerClient", () => {
|
|
|
903
1222
|
languageServerWithClient({
|
|
904
1223
|
client: mockClient as unknown as LanguageServerClient,
|
|
905
1224
|
documentUri: CellDocumentUri.of(Cells.cell2),
|
|
906
|
-
...props,
|
|
907
1225
|
}),
|
|
908
1226
|
],
|
|
909
1227
|
});
|
|
@@ -916,16 +1234,15 @@ describe("NotebookLanguageServerClient", () => {
|
|
|
916
1234
|
languageServerWithClient({
|
|
917
1235
|
client: mockClient as unknown as LanguageServerClient,
|
|
918
1236
|
documentUri: CellDocumentUri.of(Cells.cell3),
|
|
919
|
-
...props,
|
|
920
1237
|
}),
|
|
921
1238
|
],
|
|
922
1239
|
});
|
|
923
1240
|
|
|
924
|
-
(notebookClient
|
|
1241
|
+
replaceNotebookEditors(notebookClient, () => ({
|
|
925
1242
|
[Cells.cell1]: mockView1,
|
|
926
1243
|
[Cells.cell2]: mockView2,
|
|
927
1244
|
[Cells.cell3]: mockView3,
|
|
928
|
-
});
|
|
1245
|
+
}));
|
|
929
1246
|
|
|
930
1247
|
// Update the mock to return the correct codes
|
|
931
1248
|
vi.spyOn(store, "get").mockImplementation((atom) => {
|
|
@@ -1005,26 +1322,6 @@ describe("NotebookLanguageServerClient", () => {
|
|
|
1005
1322
|
});
|
|
1006
1323
|
|
|
1007
1324
|
it("should only rename private variables in the current cell (issue #7810)", async () => {
|
|
1008
|
-
const props = {
|
|
1009
|
-
workspaceFolders: null,
|
|
1010
|
-
capabilities: {
|
|
1011
|
-
textDocument: {
|
|
1012
|
-
rename: {
|
|
1013
|
-
prepareSupport: true,
|
|
1014
|
-
},
|
|
1015
|
-
},
|
|
1016
|
-
},
|
|
1017
|
-
languageId: "python",
|
|
1018
|
-
transport: {
|
|
1019
|
-
sendData: vi.fn(),
|
|
1020
|
-
subscribe: vi.fn(),
|
|
1021
|
-
connect: vi.fn(),
|
|
1022
|
-
transportRequestManager: {
|
|
1023
|
-
send: vi.fn(),
|
|
1024
|
-
},
|
|
1025
|
-
} as any,
|
|
1026
|
-
};
|
|
1027
|
-
|
|
1028
1325
|
// Setup editor views - both cells have a private variable _x
|
|
1029
1326
|
const cell1Code = "_x = 1\nprint(_x)";
|
|
1030
1327
|
const cell2Code = "_x = 2\nprint(_x)";
|
|
@@ -1037,7 +1334,6 @@ describe("NotebookLanguageServerClient", () => {
|
|
|
1037
1334
|
languageServerWithClient({
|
|
1038
1335
|
client: mockClient as unknown as LanguageServerClient,
|
|
1039
1336
|
documentUri: CellDocumentUri.of(Cells.cell1),
|
|
1040
|
-
...props,
|
|
1041
1337
|
}),
|
|
1042
1338
|
],
|
|
1043
1339
|
});
|
|
@@ -1050,15 +1346,14 @@ describe("NotebookLanguageServerClient", () => {
|
|
|
1050
1346
|
languageServerWithClient({
|
|
1051
1347
|
client: mockClient as unknown as LanguageServerClient,
|
|
1052
1348
|
documentUri: CellDocumentUri.of(Cells.cell2),
|
|
1053
|
-
...props,
|
|
1054
1349
|
}),
|
|
1055
1350
|
],
|
|
1056
1351
|
});
|
|
1057
1352
|
|
|
1058
|
-
(notebookClient
|
|
1353
|
+
replaceNotebookEditors(notebookClient, () => ({
|
|
1059
1354
|
[Cells.cell1]: mockView1,
|
|
1060
1355
|
[Cells.cell2]: mockView2,
|
|
1061
|
-
});
|
|
1356
|
+
}));
|
|
1062
1357
|
|
|
1063
1358
|
// Update the mock to return the correct codes
|
|
1064
1359
|
vi.spyOn(store, "get").mockImplementation((atom) => {
|
|
@@ -1129,22 +1424,38 @@ describe("NotebookLanguageServerClient", () => {
|
|
|
1129
1424
|
});
|
|
1130
1425
|
|
|
1131
1426
|
describe("diagnostics handling", () => {
|
|
1427
|
+
it("forwards malformed diagnostic notifications without throwing", () => {
|
|
1428
|
+
const forwardedNotification = vi.fn();
|
|
1429
|
+
mockClient.processNotification = forwardedNotification;
|
|
1430
|
+
notebookClient.patchProcessNotification();
|
|
1431
|
+
|
|
1432
|
+
const malformedNotification: ClientNotification = {
|
|
1433
|
+
method: "textDocument/publishDiagnostics",
|
|
1434
|
+
params: {
|
|
1435
|
+
uri: "file:///__marimo__.py",
|
|
1436
|
+
diagnostics: [{ message: "Missing a range" }],
|
|
1437
|
+
},
|
|
1438
|
+
};
|
|
1439
|
+
|
|
1440
|
+
expect(() => {
|
|
1441
|
+
mockClient.processNotification(malformedNotification);
|
|
1442
|
+
}).not.toThrow();
|
|
1443
|
+
expect(forwardedNotification).toHaveBeenCalledWith(malformedNotification);
|
|
1444
|
+
});
|
|
1445
|
+
|
|
1132
1446
|
it("should transform diagnostic ranges and filter out-of-bounds diagnostics", async () => {
|
|
1133
1447
|
// Mock processNotification to capture the transformed diagnostics
|
|
1134
1448
|
const capturedDiagnostics: LSP.PublishDiagnosticsParams[] = [];
|
|
1135
|
-
// @ts-expect-error: processNotification is private
|
|
1136
1449
|
mockClient.processNotification = vi
|
|
1137
1450
|
.fn()
|
|
1138
|
-
.mockImplementation((notification:
|
|
1139
|
-
if (notification
|
|
1451
|
+
.mockImplementation((notification: ClientNotification) => {
|
|
1452
|
+
if (isPublishDiagnosticsNotification(notification)) {
|
|
1140
1453
|
capturedDiagnostics.push(notification.params);
|
|
1141
1454
|
}
|
|
1142
1455
|
});
|
|
1143
1456
|
|
|
1144
1457
|
// Call patch since we changed processNotification
|
|
1145
1458
|
notebookClient.patchProcessNotification();
|
|
1146
|
-
// Start the document version at 1
|
|
1147
|
-
(notebookClient as any).documentVersion = 1;
|
|
1148
1459
|
|
|
1149
1460
|
// Open documents for multiple cells so they get tracked
|
|
1150
1461
|
await notebookClient.textDocumentDidOpen({
|
|
@@ -1193,8 +1504,7 @@ describe("NotebookLanguageServerClient", () => {
|
|
|
1193
1504
|
},
|
|
1194
1505
|
};
|
|
1195
1506
|
|
|
1196
|
-
|
|
1197
|
-
notebookClient.client.processNotification(diagnosticsNotification);
|
|
1507
|
+
mockClient.processNotification(diagnosticsNotification);
|
|
1198
1508
|
|
|
1199
1509
|
expect(capturedDiagnostics).toHaveLength(2);
|
|
1200
1510
|
expect(capturedDiagnostics[0].diagnostics).toHaveLength(1);
|
|
@@ -1207,21 +1517,160 @@ describe("NotebookLanguageServerClient", () => {
|
|
|
1207
1517
|
expect(capturedDiagnostics[1].diagnostics).toHaveLength(0);
|
|
1208
1518
|
});
|
|
1209
1519
|
|
|
1520
|
+
it("should map relatedInformation out of merged-document coordinates", async () => {
|
|
1521
|
+
const capturedDiagnostics: LSP.PublishDiagnosticsParams[] = [];
|
|
1522
|
+
mockClient.processNotification = vi
|
|
1523
|
+
.fn()
|
|
1524
|
+
.mockImplementation((notification: ClientNotification) => {
|
|
1525
|
+
if (isPublishDiagnosticsNotification(notification)) {
|
|
1526
|
+
capturedDiagnostics.push(notification.params);
|
|
1527
|
+
}
|
|
1528
|
+
});
|
|
1529
|
+
notebookClient.patchProcessNotification();
|
|
1530
|
+
|
|
1531
|
+
await notebookClient.textDocumentDidOpen({
|
|
1532
|
+
textDocument: {
|
|
1533
|
+
uri: CellDocumentUri.of(Cells.cell3),
|
|
1534
|
+
languageId: "python",
|
|
1535
|
+
version: 1,
|
|
1536
|
+
text: "print(math.sqrt(4))",
|
|
1537
|
+
},
|
|
1538
|
+
});
|
|
1539
|
+
|
|
1540
|
+
// Merged doc: line 0 -> cell1, lines 1-2 -> cell2, line 3 -> cell3
|
|
1541
|
+
mockClient.processNotification({
|
|
1542
|
+
method: "textDocument/publishDiagnostics",
|
|
1543
|
+
params: {
|
|
1544
|
+
uri: notebookClient.documentUri,
|
|
1545
|
+
version: 1,
|
|
1546
|
+
diagnostics: [
|
|
1547
|
+
{
|
|
1548
|
+
range: {
|
|
1549
|
+
start: { line: 3, character: 0 },
|
|
1550
|
+
end: { line: 3, character: 5 },
|
|
1551
|
+
},
|
|
1552
|
+
message: "Shadowed import",
|
|
1553
|
+
severity: LSP.DiagnosticSeverity.Warning,
|
|
1554
|
+
relatedInformation: [
|
|
1555
|
+
{
|
|
1556
|
+
location: {
|
|
1557
|
+
uri: notebookClient.documentUri,
|
|
1558
|
+
range: {
|
|
1559
|
+
start: { line: 1, character: 7 },
|
|
1560
|
+
end: { line: 1, character: 11 },
|
|
1561
|
+
},
|
|
1562
|
+
},
|
|
1563
|
+
message: "declared here",
|
|
1564
|
+
},
|
|
1565
|
+
{
|
|
1566
|
+
location: {
|
|
1567
|
+
uri: "file:///site-packages/math.pyi",
|
|
1568
|
+
range: {
|
|
1569
|
+
start: { line: 9, character: 0 },
|
|
1570
|
+
end: { line: 9, character: 4 },
|
|
1571
|
+
},
|
|
1572
|
+
},
|
|
1573
|
+
message: "stub definition",
|
|
1574
|
+
},
|
|
1575
|
+
],
|
|
1576
|
+
},
|
|
1577
|
+
],
|
|
1578
|
+
},
|
|
1579
|
+
});
|
|
1580
|
+
|
|
1581
|
+
const forwarded = capturedDiagnostics.find(
|
|
1582
|
+
(params) => params.diagnostics.length > 0,
|
|
1583
|
+
);
|
|
1584
|
+
expect(forwarded?.uri).toBe(CellDocumentUri.of(Cells.cell3));
|
|
1585
|
+
expect(forwarded?.diagnostics[0].relatedInformation).toEqual([
|
|
1586
|
+
{
|
|
1587
|
+
location: {
|
|
1588
|
+
uri: CellDocumentUri.of(Cells.cell2),
|
|
1589
|
+
range: {
|
|
1590
|
+
start: { line: 0, character: 7 },
|
|
1591
|
+
end: { line: 0, character: 11 },
|
|
1592
|
+
},
|
|
1593
|
+
},
|
|
1594
|
+
message: "declared here",
|
|
1595
|
+
},
|
|
1596
|
+
{
|
|
1597
|
+
location: {
|
|
1598
|
+
uri: "file:///site-packages/math.pyi",
|
|
1599
|
+
range: {
|
|
1600
|
+
start: { line: 9, character: 0 },
|
|
1601
|
+
end: { line: 9, character: 4 },
|
|
1602
|
+
},
|
|
1603
|
+
},
|
|
1604
|
+
message: "stub definition",
|
|
1605
|
+
},
|
|
1606
|
+
]);
|
|
1607
|
+
});
|
|
1608
|
+
|
|
1609
|
+
it("should keep diagnostics with unusable relatedInformation entries", async () => {
|
|
1610
|
+
const capturedDiagnostics: LSP.PublishDiagnosticsParams[] = [];
|
|
1611
|
+
mockClient.processNotification = vi
|
|
1612
|
+
.fn()
|
|
1613
|
+
.mockImplementation((notification: ClientNotification) => {
|
|
1614
|
+
if (isPublishDiagnosticsNotification(notification)) {
|
|
1615
|
+
capturedDiagnostics.push(notification.params);
|
|
1616
|
+
}
|
|
1617
|
+
});
|
|
1618
|
+
notebookClient.patchProcessNotification();
|
|
1619
|
+
|
|
1620
|
+
await notebookClient.textDocumentDidOpen({
|
|
1621
|
+
textDocument: {
|
|
1622
|
+
uri: CellDocumentUri.of(Cells.cell3),
|
|
1623
|
+
languageId: "python",
|
|
1624
|
+
version: 1,
|
|
1625
|
+
text: "print(math.sqrt(4))",
|
|
1626
|
+
},
|
|
1627
|
+
});
|
|
1628
|
+
|
|
1629
|
+
expect(() => {
|
|
1630
|
+
mockClient.processNotification({
|
|
1631
|
+
method: "textDocument/publishDiagnostics",
|
|
1632
|
+
params: {
|
|
1633
|
+
uri: notebookClient.documentUri,
|
|
1634
|
+
version: 1,
|
|
1635
|
+
diagnostics: [
|
|
1636
|
+
{
|
|
1637
|
+
range: {
|
|
1638
|
+
start: { line: 3, character: 0 },
|
|
1639
|
+
end: { line: 3, character: 5 },
|
|
1640
|
+
},
|
|
1641
|
+
message: "Shadowed import",
|
|
1642
|
+
// `isDiagnostic` doesn't reach these, so a server can hand us
|
|
1643
|
+
// entries that aren't objects at all.
|
|
1644
|
+
relatedInformation: [
|
|
1645
|
+
null,
|
|
1646
|
+
{ message: "no location" },
|
|
1647
|
+
] as unknown as LSP.DiagnosticRelatedInformation[],
|
|
1648
|
+
},
|
|
1649
|
+
],
|
|
1650
|
+
},
|
|
1651
|
+
});
|
|
1652
|
+
}).not.toThrow();
|
|
1653
|
+
|
|
1654
|
+
const forwarded = capturedDiagnostics.find(
|
|
1655
|
+
(params) => params.diagnostics.length > 0,
|
|
1656
|
+
);
|
|
1657
|
+
expect(forwarded?.uri).toBe(CellDocumentUri.of(Cells.cell3));
|
|
1658
|
+
expect(forwarded?.diagnostics[0].message).toBe("Shadowed import");
|
|
1659
|
+
});
|
|
1660
|
+
|
|
1210
1661
|
it("should clear diagnostics for all cells when receiving empty diagnostics", async () => {
|
|
1211
1662
|
await notebookClient.sync();
|
|
1212
1663
|
|
|
1213
1664
|
const seenNotifications: LSP.PublishDiagnosticsParams[] = [];
|
|
1214
|
-
|
|
1665
|
+
mockClient.processNotification = vi
|
|
1215
1666
|
.fn()
|
|
1216
|
-
.mockImplementation((notification:
|
|
1217
|
-
if (notification
|
|
1667
|
+
.mockImplementation((notification: ClientNotification) => {
|
|
1668
|
+
if (isPublishDiagnosticsNotification(notification)) {
|
|
1218
1669
|
seenNotifications.push(notification.params);
|
|
1219
1670
|
}
|
|
1220
1671
|
});
|
|
1221
1672
|
|
|
1222
1673
|
notebookClient.patchProcessNotification();
|
|
1223
|
-
// Start the document version at 1
|
|
1224
|
-
(notebookClient as any).documentVersion = 1;
|
|
1225
1674
|
|
|
1226
1675
|
// Open documents so they get tracked
|
|
1227
1676
|
await notebookClient.textDocumentDidOpen({
|
|
@@ -1252,8 +1701,7 @@ describe("NotebookLanguageServerClient", () => {
|
|
|
1252
1701
|
},
|
|
1253
1702
|
};
|
|
1254
1703
|
|
|
1255
|
-
|
|
1256
|
-
notebookClient.client.processNotification(emptyDiagnosticsNotification);
|
|
1704
|
+
mockClient.processNotification(emptyDiagnosticsNotification);
|
|
1257
1705
|
|
|
1258
1706
|
expect(seenNotifications.length).toBeGreaterThan(0);
|
|
1259
1707
|
seenNotifications.forEach((notification) => {
|
|
@@ -1263,17 +1711,15 @@ describe("NotebookLanguageServerClient", () => {
|
|
|
1263
1711
|
|
|
1264
1712
|
it("should handle diagnostics across multiple cells", async () => {
|
|
1265
1713
|
const seenNotifications = new Map<string, LSP.PublishDiagnosticsParams>();
|
|
1266
|
-
|
|
1714
|
+
mockClient.processNotification = vi
|
|
1267
1715
|
.fn()
|
|
1268
|
-
.mockImplementation((notification:
|
|
1269
|
-
if (notification
|
|
1716
|
+
.mockImplementation((notification: ClientNotification) => {
|
|
1717
|
+
if (isPublishDiagnosticsNotification(notification)) {
|
|
1270
1718
|
seenNotifications.set(notification.params.uri, notification.params);
|
|
1271
1719
|
}
|
|
1272
1720
|
});
|
|
1273
1721
|
|
|
1274
1722
|
notebookClient.patchProcessNotification();
|
|
1275
|
-
// Start the document version at 1
|
|
1276
|
-
(notebookClient as any).documentVersion = 1;
|
|
1277
1723
|
|
|
1278
1724
|
// Open documents for multiple cells so they get tracked
|
|
1279
1725
|
await notebookClient.textDocumentDidOpen({
|
|
@@ -1321,10 +1767,7 @@ describe("NotebookLanguageServerClient", () => {
|
|
|
1321
1767
|
},
|
|
1322
1768
|
};
|
|
1323
1769
|
|
|
1324
|
-
|
|
1325
|
-
notebookClient.client.processNotification(
|
|
1326
|
-
multiCellDiagnosticsNotification,
|
|
1327
|
-
);
|
|
1770
|
+
mockClient.processNotification(multiCellDiagnosticsNotification);
|
|
1328
1771
|
|
|
1329
1772
|
expect(seenNotifications.size).toBe(2);
|
|
1330
1773
|
const cell1Uri = CellDocumentUri.of(Cells.cell1);
|
|
@@ -1341,13 +1784,7 @@ describe("NotebookLanguageServerClient", () => {
|
|
|
1341
1784
|
});
|
|
1342
1785
|
|
|
1343
1786
|
it("should handle version updates in textDocumentDidChange", async () => {
|
|
1344
|
-
|
|
1345
|
-
.fn()
|
|
1346
|
-
.mockImplementation((params) => {
|
|
1347
|
-
return params;
|
|
1348
|
-
});
|
|
1349
|
-
|
|
1350
|
-
const result = await notebookClient.textDocumentDidChange({
|
|
1787
|
+
await notebookClient.textDocumentDidChange({
|
|
1351
1788
|
textDocument: {
|
|
1352
1789
|
uri: CellDocumentUri.of(Cells.cell1),
|
|
1353
1790
|
version: 5,
|
|
@@ -1355,15 +1792,22 @@ describe("NotebookLanguageServerClient", () => {
|
|
|
1355
1792
|
contentChanges: [{ text: "new code" }],
|
|
1356
1793
|
});
|
|
1357
1794
|
|
|
1358
|
-
expect(
|
|
1359
|
-
|
|
1360
|
-
|
|
1361
|
-
|
|
1362
|
-
|
|
1363
|
-
|
|
1364
|
-
|
|
1365
|
-
|
|
1366
|
-
|
|
1795
|
+
expect(mockClient.textDocumentDidChange).toHaveBeenCalledWith({
|
|
1796
|
+
textDocument: {
|
|
1797
|
+
uri: "file:///project/__marimo_notebook__.py",
|
|
1798
|
+
version: expect.any(Number),
|
|
1799
|
+
},
|
|
1800
|
+
contentChanges: [
|
|
1801
|
+
{
|
|
1802
|
+
text: [
|
|
1803
|
+
"# this is a comment",
|
|
1804
|
+
"import math",
|
|
1805
|
+
"import numpy",
|
|
1806
|
+
"print(math.sqrt(4))",
|
|
1807
|
+
].join("\n"),
|
|
1808
|
+
},
|
|
1809
|
+
],
|
|
1810
|
+
});
|
|
1367
1811
|
});
|
|
1368
1812
|
});
|
|
1369
1813
|
|
|
@@ -1404,14 +1848,8 @@ describe("NotebookLanguageServerClient", () => {
|
|
|
1404
1848
|
});
|
|
1405
1849
|
});
|
|
1406
1850
|
|
|
1407
|
-
describe("
|
|
1408
|
-
it("
|
|
1409
|
-
// Clear any existing state
|
|
1410
|
-
const seenUris = (NotebookLanguageServerClient as any)
|
|
1411
|
-
.SEEN_CELL_DOCUMENT_URIS;
|
|
1412
|
-
seenUris.clear();
|
|
1413
|
-
|
|
1414
|
-
// Open some cells to add them to SEEN_CELL_DOCUMENT_URIS
|
|
1851
|
+
describe("diagnostic tracking isolation", () => {
|
|
1852
|
+
it("does not leak opened cell state between notebook clients", async () => {
|
|
1415
1853
|
await notebookClient.textDocumentDidOpen({
|
|
1416
1854
|
textDocument: {
|
|
1417
1855
|
uri: CellDocumentUri.of(Cells.cell1),
|
|
@@ -1421,37 +1859,41 @@ describe("NotebookLanguageServerClient", () => {
|
|
|
1421
1859
|
},
|
|
1422
1860
|
});
|
|
1423
1861
|
|
|
1424
|
-
|
|
1425
|
-
|
|
1426
|
-
|
|
1427
|
-
|
|
1862
|
+
const forwardedNotification = vi.fn();
|
|
1863
|
+
const isolatedClient: Mocked<TestLanguageServerClient> = {
|
|
1864
|
+
...mockClient,
|
|
1865
|
+
processNotification: forwardedNotification,
|
|
1866
|
+
notify: vi.fn(),
|
|
1867
|
+
};
|
|
1868
|
+
const isolatedNotebookClient = new NotebookLanguageServerClient(
|
|
1869
|
+
isolatedClient,
|
|
1870
|
+
{},
|
|
1871
|
+
);
|
|
1872
|
+
await isolatedNotebookClient.sync();
|
|
1873
|
+
isolatedNotebookClient.patchProcessNotification();
|
|
1874
|
+
|
|
1875
|
+
isolatedClient.processNotification({
|
|
1876
|
+
method: "textDocument/publishDiagnostics",
|
|
1877
|
+
params: {
|
|
1878
|
+
uri: "file:///project/__marimo_notebook__.py",
|
|
1428
1879
|
version: 1,
|
|
1429
|
-
|
|
1880
|
+
diagnostics: [],
|
|
1430
1881
|
},
|
|
1431
1882
|
});
|
|
1432
1883
|
|
|
1433
|
-
|
|
1434
|
-
expect(seenUris.has(CellDocumentUri.of(Cells.cell1))).toBe(true);
|
|
1435
|
-
expect(seenUris.has(CellDocumentUri.of(Cells.cell2))).toBe(true);
|
|
1436
|
-
expect(seenUris.size).toBe(2);
|
|
1437
|
-
});
|
|
1438
|
-
|
|
1439
|
-
it("should have pruneSeenCellUris static method", () => {
|
|
1440
|
-
// Verify the method exists and is callable
|
|
1441
|
-
expect(
|
|
1442
|
-
typeof (NotebookLanguageServerClient as any).pruneSeenCellUris,
|
|
1443
|
-
).toBe("function");
|
|
1884
|
+
expect(forwardedNotification).not.toHaveBeenCalled();
|
|
1444
1885
|
});
|
|
1445
1886
|
});
|
|
1446
1887
|
|
|
1447
1888
|
describe("initialization and configuration", () => {
|
|
1448
1889
|
it("should send configuration after initialization", async () => {
|
|
1449
|
-
const configNotifications:
|
|
1450
|
-
|
|
1451
|
-
|
|
1452
|
-
|
|
1453
|
-
|
|
1454
|
-
});
|
|
1890
|
+
const configNotifications: Array<{
|
|
1891
|
+
method: string;
|
|
1892
|
+
params: unknown;
|
|
1893
|
+
}> = [];
|
|
1894
|
+
mockClient.notify = vi.fn().mockImplementation(async (method, params) => {
|
|
1895
|
+
configNotifications.push({ method, params });
|
|
1896
|
+
});
|
|
1455
1897
|
|
|
1456
1898
|
// Create a new client to trigger initialization
|
|
1457
1899
|
const client = new NotebookLanguageServerClient(mockClient, {});
|