@marimo-team/frontend 0.23.16-dev9 → 0.23.16
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-BwCqFeIT.js → CellStatus-BYH-DZdr.js} +1 -1
- package/dist/assets/{ConnectedDataExplorerComponent-CMaZapRd.js → ConnectedDataExplorerComponent-C4zEgCZh.js} +1 -1
- package/dist/assets/JsonOutput-D2UI9WX5.js +53 -0
- package/dist/assets/LazyAnyLanguageCodeMirror-A-Ant1Ad.js +2 -0
- package/dist/assets/{MarimoErrorOutput-2CXbNUBb.js → MarimoErrorOutput-Cu5WMawt.js} +4 -4
- package/dist/assets/RenderHTML-C1rWkDWe.js +1 -0
- package/dist/assets/{RunButton-DLoWn_Jd.js → RunButton-BO02PdVH.js} +1 -1
- package/dist/assets/__vite-browser-external-mTzvI0UM.js +1 -0
- package/dist/assets/{add-cell-with-ai-C1L7x0xr.js → add-cell-with-ai-PVABTCGt.js} +35 -35
- package/dist/assets/add-connection-dialog-GskQAyZw.js +178 -0
- package/dist/assets/{agent-panel-D3_CUvz_.js → agent-panel-BitNk-Gl.js} +5 -5
- package/dist/assets/ai-model-dropdown-DzobPTdx.js +5 -0
- package/dist/assets/{any-language-editor--tRHs8C_.js → any-language-editor-BIeaxtdD.js} +1 -1
- package/dist/assets/apl-BnIcQcjL.js +1 -0
- package/dist/assets/app-config-button-D_JaIWhO.js +1 -0
- package/dist/assets/{arc-CfUZAQDm.js → arc-DPwkj0YX.js} +1 -1
- package/dist/assets/{architecture-7HQA4BMR-Bvqj37EA.js → architecture-7HQA4BMR-CzgzqOCD.js} +1 -1
- package/dist/assets/{architectureDiagram-VXUJARFQ-sx_yisiZ.js → architectureDiagram-VXUJARFQ-BMZxefa_.js} +1 -1
- package/dist/assets/arrow-left-pVgT2h-8.js +1 -0
- package/dist/assets/asciiarmor-VNkYxCrW.js +1 -0
- package/dist/assets/asn1-DHaiamxN.js +1 -0
- package/dist/assets/blob-BNTWOaI9.js +1 -0
- package/dist/assets/{blockDiagram-VD42YOAC-KexI-fgH.js → blockDiagram-VD42YOAC-O9sd6I0b.js} +1 -1
- package/dist/assets/brainfuck-B7OQ4qXM.js +1 -0
- package/dist/assets/{c4Diagram-YG6GDRKO-d8NrlxRF.js → c4Diagram-YG6GDRKO-CJ4NJdbh.js} +1 -1
- package/dist/assets/{cache-panel-DcQUeUpg.js → cache-panel-B2B1ePao.js} +1 -1
- package/dist/assets/cell-editor-BuU4BDSk.js +27 -0
- package/dist/assets/cell-link-CWQ4BYr-.js +1 -0
- package/dist/assets/cells-CJLUCcQg.js +235 -0
- package/dist/assets/channel-DELDOomM.js +1 -0
- package/dist/assets/{chat-display-DomMe89U.js → chat-display-CfiA-GdA.js} +1 -1
- package/dist/assets/{chat-panel-DzLbxcWT.js → chat-panel-DghO5Y6C.js} +3 -3
- package/dist/assets/{chat-ui-BpWZ6JeY.js → chat-ui-CNXmMUI1.js} +1 -1
- package/dist/assets/{chunk-4BX2VUAB-fhh1HlXH.js → chunk-4BX2VUAB-BCgdxLTg.js} +1 -1
- package/dist/assets/chunk-55IACEB6-DnPXlz-P.js +1 -0
- package/dist/assets/{chunk-5FQGJX7Z-Cp0LZT-a.js → chunk-5FQGJX7Z-CYQpNADu.js} +2 -2
- package/dist/assets/{chunk-ABZYJK2D-BtK4zInQ.js → chunk-ABZYJK2D-M8yn2N69.js} +3 -3
- package/dist/assets/{chunk-ATLVNIR6-YZDenslF.js → chunk-ATLVNIR6-CY4Q_7DV.js} +1 -1
- package/dist/assets/{chunk-B4BG7PRW-DYIZwDbt.js → chunk-B4BG7PRW-0izjR6gH.js} +1 -1
- package/dist/assets/{chunk-CVBHYZKI-CIyHeK0Q.js → chunk-CVBHYZKI-Dtb0_R-R.js} +1 -1
- package/dist/assets/{chunk-DI55MBZ5-TodwBGEN.js → chunk-DI55MBZ5-CeYy94Hv.js} +1 -1
- package/dist/assets/{chunk-EXTU4WIE-C76bF1UD.js → chunk-EXTU4WIE-CZBftw0u.js} +1 -1
- package/dist/assets/{chunk-FMBD7UC4-Yq65IDPA.js → chunk-FMBD7UC4-BTonlpoo.js} +1 -1
- package/dist/assets/{chunk-HN2XXSSU-CcbN4n6W.js → chunk-HN2XXSSU-Bqib0VeJ.js} +1 -1
- package/dist/assets/{chunk-JA3XYJ7Z-CPXEu7AX.js → chunk-JA3XYJ7Z-CMnBpyzd.js} +1 -1
- package/dist/assets/{chunk-JZLCHNYA-D8q1z6Py.js → chunk-JZLCHNYA-BWjnV_v7.js} +1 -1
- package/dist/assets/{chunk-MI3HLSF2-bmomnexd.js → chunk-MI3HLSF2-CA3zpyGZ.js} +1 -1
- package/dist/assets/{chunk-N4CR4FBY-BhsjB2qn.js → chunk-N4CR4FBY-CZmndviH.js} +2 -2
- package/dist/assets/{chunk-QN33PNHL-ngvPqyQ0.js → chunk-QN33PNHL-B5rSVblq.js} +1 -1
- package/dist/assets/{chunk-QXUST7PY-C4c0Sjmn.js → chunk-QXUST7PY-Cz8b__fX.js} +1 -1
- package/dist/assets/{chunk-QZHKN3VN-CkbwBDOS.js → chunk-QZHKN3VN-B7nq9C0W.js} +1 -1
- package/dist/assets/{chunk-S3R3BYOJ-Bt2NnquF.js → chunk-S3R3BYOJ-CUGnLh1o.js} +1 -1
- package/dist/assets/{chunk-TZMSLE5B-Dysko1OC.js → chunk-TZMSLE5B-CXQovw1I.js} +1 -1
- package/dist/assets/classDiagram-2ON5EDUG-B3IKXY7k.js +1 -0
- package/dist/assets/classDiagram-v2-WZHVMYZB-C0Db1CRa.js +1 -0
- package/dist/assets/{clike-DKPr2D1_.js → clike-CcPLlJ3-.js} +1 -1
- package/dist/assets/clojure-DK3HqqeG.js +1 -0
- package/dist/assets/cmake-Bnhxe81D.js +1 -0
- package/dist/assets/cobol-ISPch7J4.js +1 -0
- package/dist/assets/{code-block-37QAKDTI-DlENujeV.js → code-block-37QAKDTI-21cPxSHu.js} +1 -1
- package/dist/assets/coffeescript-B3cS2ooz.js +1 -0
- package/dist/assets/{column-preview-D5Btj8aG.js → column-preview-DREOGG_c.js} +1 -1
- package/dist/assets/{command-palette-CNp7T2c5.js → command-palette-C95r8rOd.js} +1 -1
- package/dist/assets/{common-BrPgvCtD.js → common-DCWeeUhr.js} +1 -1
- package/dist/assets/commonlisp-DH0yllOU.js +1 -0
- package/dist/assets/components-BGqqoLEG.js +1 -0
- package/dist/assets/components-K_Mi0vdC.js +1 -0
- package/dist/assets/config-B-Q7J_6d.js +1 -0
- package/dist/assets/{cose-bilkent-S5V4N54A-BlMw4-M9.js → cose-bilkent-S5V4N54A-DK9gIUQX.js} +1 -1
- package/dist/assets/crystal-CfSxbewa.js +1 -0
- package/dist/assets/{css-DsUcFZz8.js → css-IVPzYP6l.js} +1 -1
- package/dist/assets/cypher-DqUctVOg.js +1 -0
- package/dist/assets/d-DYRkEHFy.js +1 -0
- package/dist/assets/{dagre-6UL2VRFP-kJ4x17JK.js → dagre-6UL2VRFP-DQFoIrK8.js} +1 -1
- package/dist/assets/{data-grid-overlay-editor-DbobQcVo.js → data-grid-overlay-editor-CVM5ufb4.js} +1 -1
- package/dist/assets/{datasource-wn1PTlXA.js → datasource-DbljozeY.js} +2 -2
- package/dist/assets/{dependency-graph-panel-B8Q8RQNh.js → dependency-graph-panel-Bg9bLMXq.js} +4 -4
- package/dist/assets/{diagram-PSM6KHXK-d-5aQNHk.js → diagram-PSM6KHXK-DIXxW5au.js} +1 -1
- package/dist/assets/{diagram-QEK2KX5R-CO-PXq75.js → diagram-QEK2KX5R-B8KoKZCY.js} +1 -1
- package/dist/assets/{diagram-S2PKOQOG-Dv7pcvYC.js → diagram-S2PKOQOG-D0bjlYXx.js} +1 -1
- package/dist/assets/diff-Cd5HBT58.js +1 -0
- package/dist/assets/dist-B99-E4qp.js +1 -0
- package/dist/assets/{dist-BsphJPAV.js → dist-BiwuSVkx.js} +1 -1
- package/dist/assets/{dist-CECF_J8y.js → dist-BrZjJXDA.js} +1 -1
- package/dist/assets/{dist-Du-wcJyR.js → dist-By4rFZwg.js} +1 -1
- package/dist/assets/dist-CaZf6AoY.js +1 -0
- package/dist/assets/{dist-BMOD2Pyh.js → dist-Cgoy5550.js} +1 -1
- package/dist/assets/{dist-6c4zOh78.js → dist-D6WgndTj.js} +1 -1
- package/dist/assets/dist-DcXy-1eJ.js +1 -0
- package/dist/assets/{dist-0QUuSoRx.js → dist-DtbtRAqz.js} +1 -1
- package/dist/assets/dist-I3qeQWuP.js +1 -0
- package/dist/assets/{dist-sPfKr-vH.js → dist-aeKlrIMv.js} +1 -1
- package/dist/assets/{dist-CDUl-YL4.js → dist-gDi2I7IJ.js} +1 -1
- package/dist/assets/{dist-CRrIf3gB.js → dist-miDa4-cz.js} +1 -1
- package/dist/assets/{dist-R1kU4nzJ.js → dist-nDEBxpL6.js} +1 -1
- package/dist/assets/{dist-DQNaXfK1.js → dist-oUL4XFdB.js} +1 -1
- package/dist/assets/{dockerfile-C2PznFWk.js → dockerfile-CLtE40Sb.js} +1 -1
- package/dist/assets/{documentation-panel-hFyikugH.js → documentation-panel-BhtY-lKF.js} +1 -1
- package/dist/assets/download-DwYUg-o4.js +9 -0
- package/dist/assets/dtd-C24SyIVW.js +1 -0
- package/dist/assets/dylan-CrkzDmc1.js +1 -0
- package/dist/assets/ecl-DSuYw2WY.js +1 -0
- package/dist/assets/{edit-page-jUsez4HZ.js → edit-page-D_hRRfNq.js} +6 -6
- package/dist/assets/eiffel-D60uMU52.js +1 -0
- package/dist/assets/elm-pYZdVh3P.js +1 -0
- package/dist/assets/{erDiagram-Q2GNP2WA-BQ8HfnRu.js → erDiagram-Q2GNP2WA-D7EuT99Y.js} +1 -1
- package/dist/assets/erlang-D9MlcoAb.js +1 -0
- package/dist/assets/error-entries-4LYRQSOP.js +8 -0
- package/dist/assets/{error-panel-DAseRhAS.js → error-panel-FG7tsVQ_.js} +1 -1
- package/dist/assets/{esm-Cmv0Nuxi.js → esm-BDGraAqp.js} +1 -1
- package/dist/assets/factor-gTHEdNEJ.js +1 -0
- package/dist/assets/{factor-DMrXrOH8.js → factor-xSp9WnN7.js} +1 -1
- package/dist/assets/file-explorer-panel-CpUlOt1N.js +26 -0
- package/dist/assets/{file-icons-Chripuk-.js → file-icons-CODNoWOy.js} +1 -1
- package/dist/assets/{file-name-input-B1NJd3KY.js → file-name-input-DyvZhLvk.js} +1 -1
- package/dist/assets/{fileToBase64-C2Yy-YXq.js → fileToBase64-hLJmVjNJ.js} +1 -1
- package/dist/assets/floating-outline-DBlzcHYf.js +1 -0
- package/dist/assets/{flowDiagram-NV44I4VS-xBOzhlfg.js → flowDiagram-NV44I4VS-Bz3PhSZq.js} +1 -1
- package/dist/assets/focus-B6HBbAwF.js +1 -0
- package/dist/assets/form-BYlqbYKI.js +2 -0
- package/dist/assets/form-W6ZZMHnc.js +1 -0
- package/dist/assets/forth-CWZXTLFs.js +1 -0
- package/dist/assets/fortran-B8kNpt8O.js +1 -0
- package/dist/assets/{gallery-page-CJ3ms1Hn.js → gallery-page-DbuxknAw.js} +1 -1
- package/dist/assets/{ganttDiagram-JELNMOA3-D2O_k-Zg.js → ganttDiagram-JELNMOA3-DaS60lKW.js} +1 -1
- package/dist/assets/gas-DxuMSeqj.js +1 -0
- package/dist/assets/gherkin-ZkKEDs6K.js +1 -0
- package/dist/assets/{gitGraph-G5XIXVHT-8HJwNcdU.js → gitGraph-G5XIXVHT-Cd5ecvAE.js} +1 -1
- package/dist/assets/{gitGraphDiagram-V2S2FVAM-Nk4Ll9GY.js → gitGraphDiagram-V2S2FVAM-D7jUmjBw.js} +1 -1
- package/dist/assets/{glide-data-editor-j2igs9Y_.js → glide-data-editor-CejKKgnN.js} +4 -4
- package/dist/assets/globe-Dwo3iXzC.js +1 -0
- package/dist/assets/groovy-CqQZm41C.js +1 -0
- package/dist/assets/haskell-DWF-arrK.js +1 -0
- package/dist/assets/haxe-LmdIWMMr.js +1 -0
- package/dist/assets/home-page-DYaHMq8Q.js +4 -0
- package/dist/assets/{html-to-image-B-nAUvDC.js → html-to-image-CN9yTa5s.js} +2 -2
- package/dist/assets/idl-DEd51qv-.js +1 -0
- package/dist/assets/index-8Nlyq3mV.css +2 -0
- package/dist/assets/index-Gv23EHlE.js +38 -0
- package/dist/assets/{info-VBDWY6EO-rfe3WPvd.js → info-VBDWY6EO-BTT52JaO.js} +1 -1
- package/dist/assets/infoDiagram-HS3SLOUP-GkG80Qxa.js +2 -0
- package/dist/assets/javascript-BFIOGZ-j.js +1 -0
- package/dist/assets/{journeyDiagram-XKPGCS4Q-D61FGivn.js → journeyDiagram-XKPGCS4Q-DwL-PxSb.js} +1 -1
- package/dist/assets/julia-Chs3F4Sv.js +1 -0
- package/dist/assets/{kanban-definition-3W4ZIXB7-Bnv0X0Tu.js → kanban-definition-3W4ZIXB7-DiBaV6eK.js} +1 -1
- package/dist/assets/katex-12J11HuB.js +1 -0
- package/dist/assets/kiosk-mode-Di-gTPu2.js +1 -0
- package/dist/assets/{layout-1Z2AhO6k.js → layout-B6D_84rz.js} +5 -5
- package/dist/assets/{line-DNm2phYo.js → line-BDmwHhfs.js} +1 -1
- package/dist/assets/{linear-CTQqNbVX.js → linear-BPv4krGt.js} +1 -1
- package/dist/assets/livescript-CZOCkk31.js +1 -0
- package/dist/assets/logs-panel-V4PsZD48.js +1 -0
- package/dist/assets/{loro_wasm_bg-Duqr-kJ2.js → loro_wasm_bg-CjrUicyy.js} +1 -1
- package/dist/assets/lua-DK4FKJLN.js +1 -0
- package/dist/assets/{markdown-renderer-Cs1sISb9.js → markdown-renderer-CzJx-MnJ.js} +3 -3
- package/dist/assets/mathematica-BoEJU8On.js +1 -0
- package/dist/assets/mbox-1WJcoGln.js +1 -0
- package/dist/assets/{mermaid-4DMBBIKO-CDGmT6YQ.js → mermaid-4DMBBIKO-3ntkrgCA.js} +1 -1
- package/dist/assets/{mermaid-CYN0wOyG.js → mermaid-B8gNHyGy.js} +3 -3
- package/dist/assets/{mermaid-parser.core-Dz2GMGqQ.js → mermaid-parser.core-Ddjs6Jmy.js} +2 -2
- package/dist/assets/{mhchem-CIWniJp4.js → mhchem-Cnt1CrAX.js} +1 -1
- package/dist/assets/{mindmap-definition-VGOIOE7T-C-YaKmEU.js → mindmap-definition-VGOIOE7T-DKJd1wuU.js} +1 -1
- package/dist/assets/mirc-OXxqihhx.js +1 -0
- package/dist/assets/mllike-fFPa49Ft.js +1 -0
- package/dist/assets/modelica-B2hOO40U.js +1 -0
- package/dist/assets/mscgen-BUm8DSPh.js +1 -0
- package/dist/assets/mumps-BUUE1QKi.js +1 -0
- package/dist/assets/{name-cell-input-2sM8a_OS.js → name-cell-input-Bq1sljc2.js} +1 -1
- package/dist/assets/node-sql-parser-CAudyJSw.js +68 -0
- package/dist/assets/nsis-CQPY661e.js +1 -0
- package/dist/assets/{nsis-Ccvd1gbp.js → nsis-SCfsPq8M.js} +1 -1
- package/dist/assets/ntriples-CtWbsB7O.js +1 -0
- package/dist/assets/{number-overlay-editor-BQ9P6yP7.js → number-overlay-editor-KHf1PkHr.js} +1 -1
- package/dist/assets/octave-D4HWE405.js +1 -0
- package/dist/assets/{ordinal-DyTNGK17.js → ordinal-BSXHDD5k.js} +1 -1
- package/dist/assets/{outline-panel-BXWCkGu_.js → outline-panel-Tn3DVuNl.js} +1 -1
- package/dist/assets/oz-Cp-6fXH5.js +1 -0
- package/dist/assets/{packages-panel-CJfHGfax.js → packages-panel-er2ghj4m.js} +1 -1
- package/dist/assets/{packet-DYOGHKS2-DTVloLa7.js → packet-DYOGHKS2-pYSTMj1G.js} +1 -1
- package/dist/assets/pair-with-agent-modal-CVYH-Guh.js +4 -0
- package/dist/assets/panel-accordion-state-DN1hLusu.js +1 -0
- package/dist/assets/panels-oc6cK0j0.js +4 -0
- package/dist/assets/pascal-B2F20-Dq.js +1 -0
- package/dist/assets/perl-C8I4my72.js +1 -0
- package/dist/assets/{pie-VRWISCQL-Bmght6JF.js → pie-VRWISCQL-BtGe15Zk.js} +1 -1
- package/dist/assets/{pieDiagram-ADFJNKIX-DlFYL0BN.js → pieDiagram-ADFJNKIX-BdWIv6Xr.js} +1 -1
- package/dist/assets/pig-Dg7z9udE.js +1 -0
- package/dist/assets/powershell-BjupwEXi.js +1 -0
- package/dist/assets/process-output-DXnqTuGm.js +1 -0
- package/dist/assets/properties-CWyPUxmr.js +1 -0
- package/dist/assets/protobuf-B2dHC-BL.js +1 -0
- package/dist/assets/pug-B-MnYZUt.js +1 -0
- package/dist/assets/{pug-BtXi5KiX.js → pug-D81S7inS.js} +1 -1
- package/dist/assets/puppet-CeBQQ4Li.js +1 -0
- package/dist/assets/python-DgHNYu_r.js +1 -0
- package/dist/assets/q-wSguJrTU.js +1 -0
- package/dist/assets/{quadrantDiagram-AYHSOK5B-BpJug2BH.js → quadrantDiagram-AYHSOK5B-DJuGB95-.js} +1 -1
- package/dist/assets/r-BoIJ2Zve.js +1 -0
- package/dist/assets/{radar-ZZBFDIW7-CYwWzRgW.js → radar-ZZBFDIW7-DyFu57RV.js} +1 -1
- package/dist/assets/{radio-group-PT0_zVHo.js → radio-group-CcU5wNVj.js} +1 -1
- package/dist/assets/{react-vega-TNCk_eWj.js → react-vega-BLc5RhC7.js} +1 -1
- package/dist/assets/{readonly-code-display-CFbCSGms.js → readonly-code-display-DoQFa0ET.js} +1 -1
- package/dist/assets/{readonly-python-code-DB23yd7T.js → readonly-python-code-CYfbPYQ0.js} +1 -1
- package/dist/assets/{requirementDiagram-UZGBJVZJ-Bd-1eny8.js → requirementDiagram-UZGBJVZJ-aWGJtWy2.js} +1 -1
- package/dist/assets/{reveal-component-fwTDxf5N.js → reveal-component-CZgRCMe1.js} +42 -42
- package/dist/assets/rpm-DmyUNIkv.js +1 -0
- package/dist/assets/{ecl-B6UC4tME.js → ruby-Djlw6kjU.js} +1 -1
- package/dist/assets/run-page-Dxm4ltqq.js +1 -0
- package/dist/assets/{sankeyDiagram-TZEHDZUN-CDWAE6GV.js → sankeyDiagram-TZEHDZUN-nJIZ3_NQ.js} +1 -1
- package/dist/assets/sas-B8AwxLVS.js +1 -0
- package/dist/assets/scheme-o4lPnt7c.js +1 -0
- package/dist/assets/{scratchpad-panel-BLC2oQ_3.js → scratchpad-panel-pQP0zGxD.js} +1 -1
- package/dist/assets/{secrets-panel-6J6wcuVR.js → secrets-panel-Cz17_MLf.js} +1 -1
- package/dist/assets/{sequenceDiagram-WL72ISMW-B6hjDGBF.js → sequenceDiagram-WL72ISMW-Bvkxl3m4.js} +1 -1
- package/dist/assets/session-panel-C-y42nqB.js +1 -0
- package/dist/assets/shell-DJuOhLmg.js +1 -0
- package/dist/assets/sieve-BBDbJOX3.js +1 -0
- package/dist/assets/{skeleton-xuR254Kw.js → skeleton-Bd78PcP9.js} +1 -1
- package/dist/assets/slides-DkEgzTJB.css +1 -0
- package/dist/assets/smalltalk-CmTnbqu4.js +1 -0
- package/dist/assets/{snippets-panel-DwAjNUqR.js → snippets-panel-BRtH_9R3.js} +1 -1
- package/dist/assets/sparql-BQuPdHqO.js +1 -0
- package/dist/assets/{src-CIOdyciO.js → src-xYaLe_3f.js} +1 -1
- package/dist/assets/state-C4kiwedg.js +1 -0
- package/dist/assets/state-CsGOoEZv.js +3 -0
- package/dist/assets/{state-Tc7pRohh.js → state-Rxc-B11B.js} +1 -1
- package/dist/assets/{stateDiagram-FKZM4ZOC-Bzv6j99z.js → stateDiagram-FKZM4ZOC-CVF8M4di.js} +1 -1
- package/dist/assets/stateDiagram-v2-4FDKWEC3-Dj-G9wuu.js +1 -0
- package/dist/assets/{step-CDlhJj9-.js → step-DkIPWA0m.js} +1 -1
- package/dist/assets/stylus-DrNz1BCZ.js +1 -0
- package/dist/assets/swift-UQ24LctC.js +1 -0
- package/dist/assets/switch-OVajJBPR.js +1 -0
- package/dist/assets/tcl-BBEwSttz.js +1 -0
- package/dist/assets/{terminal-DaLxAnKx.js → terminal-Cdd3rO1L.js} +1 -1
- package/dist/assets/textarea-DtCcemo9.js +1 -0
- package/dist/assets/textile-CYG_qV_5.js +1 -0
- package/dist/assets/{time-BuRlxEhE.js → time-p47i6wvp.js} +1 -1
- package/dist/assets/{timeline-definition-IT6M3QCI-DXwdU1og.js → timeline-definition-IT6M3QCI-D1XRbH5P.js} +1 -1
- package/dist/assets/toml-DB6lKkvi.js +1 -0
- package/dist/assets/{tracing-BmBBYynL.js → tracing-CdeezhIN.js} +1 -1
- package/dist/assets/{tracing-panel-AReiFUol.js → tracing-panel-Dl3MlGyG.js} +2 -2
- package/dist/assets/{tree-actions-Bz3fJ7p-.js → tree-actions-BiQ4VzX-.js} +1 -1
- package/dist/assets/{treemap-GDKQZRPO-4Cm6HMmj.js → treemap-GDKQZRPO-Z4m-KHQY.js} +1 -1
- package/dist/assets/troff-WrtaE-DW.js +1 -0
- package/dist/assets/ttcn-DNOLsGjD.js +1 -0
- package/dist/assets/ttcn-cfg-D2oRz-8W.js +1 -0
- package/dist/assets/turtle-hoYUNcbl.js +1 -0
- package/dist/assets/{useBoolean-CA7K8rap.js → useBoolean-CFj86iac.js} +1 -1
- package/dist/assets/useCellActionButton-B5wkKtv1.js +1 -0
- package/dist/assets/{useDeleteCell-DQP-NBq2.js → useDeleteCell-BfKWOHfk.js} +1 -1
- package/dist/assets/{useDependencyPanelTab-BrkWlCTP.js → useDependencyPanelTab-BTipqN67.js} +1 -1
- package/dist/assets/useNotebookActions-CCwjICU_.js +12 -0
- package/dist/assets/useRunCells-DZ4glj3f.js +1 -0
- package/dist/assets/{useSplitCell-jH70A2Sz.js → useSplitCell-DXzfZTCe.js} +1 -1
- package/dist/assets/vb-CSArj0Ox.js +1 -0
- package/dist/assets/vbscript-Cy_b6RxB.js +1 -0
- package/dist/assets/{vega-component-DSvWLXIy.js → vega-component-VDedA5Cd.js} +1 -1
- package/dist/assets/{vega-embed-container-hDAVOOba.js → vega-embed-container-DxSqUOCK.js} +1 -1
- package/dist/assets/velocity-8fvVYgdA.js +1 -0
- package/dist/assets/verilog-BPXnWs06.js +1 -0
- package/dist/assets/vhdl-C4JSE7Sd.js +1 -0
- package/dist/assets/webidl-uP8WR81M.js +1 -0
- package/dist/assets/{worker-BQo2bijx.js → worker-BM73L67p.js} +3 -6
- package/dist/assets/write-secret-modal-Dtm66yVf.js +2 -0
- package/dist/assets/xquery-C8ppAT5Z.js +1 -0
- package/dist/assets/{xychartDiagram-PRI3JC2R-Cb0exSKs.js → xychartDiagram-PRI3JC2R-B8A0hi-Q.js} +1 -1
- package/dist/assets/yacas-CnXhtfs7.js +1 -0
- package/dist/assets/z80-B0aL_Tnf.js +1 -0
- package/dist/index.html +36 -34
- package/package.json +3 -4
- package/src/__mocks__/requests.ts +56 -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/__tests__/columns.test.tsx +9 -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/columns.tsx +11 -1
- 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 +28 -19
- 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/__tests__/state.test.ts +7 -1
- package/src/components/editor/chrome/panels/__tests__/logs-panel.test.tsx +25 -0
- package/src/components/editor/chrome/panels/__tests__/panel-accordion-state.test.ts +42 -0
- package/src/components/editor/chrome/panels/file-explorer-panel.tsx +6 -17
- package/src/components/editor/chrome/panels/logs-panel.tsx +12 -2
- package/src/components/editor/chrome/panels/panel-accordion-state.ts +51 -0
- package/src/components/editor/chrome/panels/session-panel.tsx +5 -16
- package/src/components/editor/chrome/panels/write-secret-modal.tsx +40 -12
- package/src/components/editor/chrome/state.ts +10 -0
- 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/__tests__/quick-add-data-sources.test.tsx +113 -0
- package/src/components/editor/connections/add-connection-dialog.tsx +2 -0
- package/src/components/editor/connections/components.tsx +6 -2
- package/src/components/editor/connections/database/__tests__/__snapshots__/as-code.test.ts.snap +27 -5
- package/src/components/editor/connections/database/__tests__/as-code.test.ts +33 -0
- package/src/components/editor/connections/database/as-code.ts +37 -13
- 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/quick-add-data-sources.tsx +106 -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 +2 -2
- package/src/components/editor/viewer-banner.tsx +6 -1
- package/src/components/forms/form.tsx +59 -24
- 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/reveal-component.tsx +22 -17
- package/src/components/slides/slide-cell-view.tsx +1 -1
- package/src/components/slides/slides.css +4 -2
- package/src/components/static-html/share-modal.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/cm.ts +3 -0
- package/src/core/codemirror/code-lens/__tests__/actions.test.ts +68 -0
- package/src/core/codemirror/code-lens/__tests__/analyzer.test.ts +224 -0
- package/src/core/codemirror/code-lens/__tests__/entities.test.ts +175 -0
- package/src/core/codemirror/code-lens/__tests__/extension.test.ts +325 -0
- package/src/core/codemirror/code-lens/__tests__/perf.test.ts +121 -0
- package/src/core/codemirror/code-lens/__tests__/popover.test.ts +93 -0
- package/src/core/codemirror/code-lens/actions.ts +33 -0
- package/src/core/codemirror/code-lens/analyzer.ts +284 -0
- package/src/core/codemirror/code-lens/entities.ts +123 -0
- package/src/core/codemirror/code-lens/extension.ts +298 -0
- package/src/core/codemirror/code-lens/icons.ts +36 -0
- package/src/core/codemirror/code-lens/popover.tsx +240 -0
- 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 +93 -90
- package/src/core/codemirror/language/__tests__/sql.test.ts +627 -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/renderers.tsx +3 -3
- package/src/core/codemirror/language/languages/sql/sql.ts +251 -16
- 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/python-node-names.ts +90 -0
- package/src/core/codemirror/reactive-references/analyzer.ts +52 -57
- package/src/core/codemirror/utils.ts +28 -0
- package/src/core/config/feature-flag.tsx +3 -1
- package/src/core/datasets/data-source-discovery.ts +5 -0
- package/src/core/datasets/request-registry.ts +11 -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/islands/__tests__/bridge.test.ts +107 -0
- package/src/core/islands/bootstrap.ts +1 -0
- package/src/core/islands/bridge.ts +18 -0
- package/src/core/kernel/messages.ts +2 -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 +47 -1
- package/src/core/network/__tests__/requests-network.test.ts +48 -0
- package/src/core/network/api.ts +27 -0
- package/src/core/network/connection.ts +15 -0
- package/src/core/network/requests-lazy.ts +3 -0
- package/src/core/network/requests-network.ts +31 -8
- package/src/core/network/requests-static.ts +3 -0
- package/src/core/network/requests-toasting.tsx +3 -0
- package/src/core/network/types.ts +27 -6
- package/src/core/rtc/state.ts +9 -0
- package/src/core/static/download-html.ts +5 -14
- package/src/core/wasm/__tests__/bridge.test.ts +99 -5
- package/src/core/wasm/bridge.ts +42 -9
- package/src/core/wasm/worker/types.ts +10 -3
- package/src/core/wasm/worker/worker.ts +7 -8
- package/src/core/websocket/useMarimoKernelConnection.tsx +4 -0
- package/src/css/app/codemirror.css +16 -2
- package/src/hooks/__tests__/useDataSourceDiscovery.test.ts +80 -0
- package/src/hooks/useDataSourceDiscovery.ts +18 -0
- package/src/plugins/impl/DataTablePlugin.tsx +4 -1
- package/src/plugins/impl/__tests__/DataTablePlugin.test.tsx +158 -0
- package/src/plugins/impl/anywidget/__tests__/model.test.ts +55 -0
- package/src/plugins/impl/anywidget/model.ts +20 -5
- package/src/plugins/impl/data-frames/forms/__tests__/__snapshots__/form.test.tsx.snap +33 -21
- package/src/plugins/impl/data-frames/forms/renderers.tsx +11 -8
- 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-B0aYK7up.js +0 -53
- package/dist/assets/LazyAnyLanguageCodeMirror-B2JvSXP-.js +0 -2
- package/dist/assets/RenderHTML-uBc4LkCP.js +0 -1
- package/dist/assets/__vite-browser-external-BkrtI7wJ.js +0 -1
- package/dist/assets/add-connection-dialog-BgQ7HuWu.js +0 -170
- package/dist/assets/ai-model-dropdown-C7iiWBqP.js +0 -5
- package/dist/assets/apl-DTwRFDps.js +0 -1
- package/dist/assets/app-config-button-DhmeKMjL.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-editor-DD0zaU_N.js +0 -27
- package/dist/assets/cell-link-C0hhYyNu.js +0 -1
- package/dist/assets/cells-aqfX084m.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-1i9OlkxM.js +0 -1
- package/dist/assets/config-CR3KxW53.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-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-CkMUlfM3.js +0 -9
- package/dist/assets/dtd-D9h-tL8G.js +0 -1
- package/dist/assets/dylan-D3MC56xy.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-NXVkubuN.js +0 -8
- package/dist/assets/factor-CUQCrkTo.js +0 -1
- package/dist/assets/file-explorer-panel-D7VHUIPp.js +0 -26
- package/dist/assets/floating-outline-BOqWJRw_.js +0 -1
- package/dist/assets/focus-tOmGbv38.js +0 -1
- package/dist/assets/form-CIXAzTfC.js +0 -2
- 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-DO_MqQAB.js +0 -4
- package/dist/assets/idl-BM6265Xl.js +0 -1
- package/dist/assets/index-wLUfvfaV.js +0 -38
- package/dist/assets/index-xs-zSSrX.css +0 -2
- 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-QsYGYiC8.js +0 -1
- package/dist/assets/livescript-CNahkUp5.js +0 -1
- package/dist/assets/logs-panel-B6AfYQb6.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-C9nKHvCp.js +0 -4
- package/dist/assets/panels-Ch_sUzTx.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-BFSCpqNt.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/run-page-D9-9chbw.js +0 -1
- package/dist/assets/sas-D9KCtUmL.js +0 -1
- package/dist/assets/scheme-p8UJxmJw.js +0 -1
- package/dist/assets/session-panel-Dz-DQDeV.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-BpkJVsmT.js +0 -3
- package/dist/assets/state-DDag0B_B.js +0 -1
- 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-DLGijIXN.js +0 -1
- package/dist/assets/tcl-DR2p8cyi.js +0 -1
- package/dist/assets/textarea-aocYW9hl.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-BG7n5b0H.js +0 -1
- package/dist/assets/useNotebookActions-COdGI2fR.js +0 -12
- package/dist/assets/useRunCells-BtSwerrU.js +0 -1
- 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-3-v-dHVj.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-COvcNAUu.js} +0 -0
- /package/dist/assets/{Inputs-B8-VCb_j.js → Inputs-BmtHnGKp.js} +0 -0
- /package/dist/assets/{Plot-X2G47XHf.js → Plot-CB_5AR7d.js} +0 -0
- /package/dist/assets/{apl-DVqFAlEd.js → apl-Cp4QYSh2.js} +0 -0
- /package/dist/assets/{array-Ddg9CgJT.js → array-BuhHwWF4.js} +0 -0
- /package/dist/assets/{asciiarmor-B45BhOLj.js → asciiarmor-BUxo-e6o.js} +0 -0
- /package/dist/assets/{asn1-C4T2ctU6.js → asn1-Cp_b5sxr.js} +0 -0
- /package/dist/assets/{asterisk-9U_4Kgke.js → asterisk-BKEE609E.js} +0 -0
- /package/dist/assets/{azure-nN8APleF.js → azure-t5-hyIQ1.js} +0 -0
- /package/dist/assets/{brainfuck-kVh8Eud4.js → brainfuck-DmRCaE-Q.js} +0 -0
- /package/dist/assets/{card-VUBaYDpT.js → card-P_NJTnTd.js} +0 -0
- /package/dist/assets/{chunk-4F5CHEZ2-ClSh5rxG.js → chunk-4F5CHEZ2-D6n-cT3v.js} +0 -0
- /package/dist/assets/{chunk-B2363JML-cit0ouFv.js → chunk-B2363JML-kkXnm2Yp.js} +0 -0
- /package/dist/assets/{chunk-DR5Q36YT-Bsu9Glc0.js → chunk-DR5Q36YT-DZQANAzH.js} +0 -0
- /package/dist/assets/{chunk-FRFDVMJY--Re1QfFE.js → chunk-FRFDVMJY-MdHMrSks.js} +0 -0
- /package/dist/assets/{chunk-PL6DKKU2-CAwRAr-p.js → chunk-PL6DKKU2-BPi2wKR3.js} +0 -0
- /package/dist/assets/{chunk-SJTYNZTY-G1spWesO.js → chunk-SJTYNZTY-BcV9dsih.js} +0 -0
- /package/dist/assets/{chunk-TQ3KTPDO-DBwra5xv.js → chunk-TQ3KTPDO-XDjkQ8Xj.js} +0 -0
- /package/dist/assets/{chunk-UMXZTB3W-A5RvYDPE.js → chunk-UMXZTB3W-C-xu4f6g.js} +0 -0
- /package/dist/assets/{clear-button-DQtvx6eq.js → clear-button-clPKQb-5.js} +0 -0
- /package/dist/assets/{click-outside-container-CrWZsAF5.js → click-outside-container-BU5ChL3W.js} +0 -0
- /package/dist/assets/{clike-O0gwXilc.js → clike--wVFVJzz.js} +0 -0
- /package/dist/assets/{clojure-CsbMWxp9.js → clojure-xvpMtcD1.js} +0 -0
- /package/dist/assets/{cmake-FpJvOdyj.js → cmake-ChD_WVwL.js} +0 -0
- /package/dist/assets/{cobol-Duxbpsru.js → cobol-B5K8KXv5.js} +0 -0
- /package/dist/assets/{coffeescript-D-Unz9IP.js → coffeescript-EMaA6sFP.js} +0 -0
- /package/dist/assets/{colors-C_0lIznd.js → colors-CQfhPUa2.js} +0 -0
- /package/dist/assets/{common-keywords-PqH2GDfH.js → common-keywords-DdCmdKox.js} +0 -0
- /package/dist/assets/{commonlisp-_nR12oc7.js → commonlisp-BTUt7Wms.js} +0 -0
- /package/dist/assets/{crystal-dj3W4b1A.js → crystal-CaYGQjnj.js} +0 -0
- /package/dist/assets/{css-0BG6A_BC.js → css-Ci5CSFmt.js} +0 -0
- /package/dist/assets/{cypher-CKPokaoH.js → cypher-Bt0cHBYq.js} +0 -0
- /package/dist/assets/{cytoscape.esm-DzUNSF80.js → cytoscape.esm-CbUmcCyd.js} +0 -0
- /package/dist/assets/{d-BrbqzVa2.js → d-Y6y0yT7l.js} +0 -0
- /package/dist/assets/{diff-BmdR9FsO.js → diff-DWzGHZfz.js} +0 -0
- /package/dist/assets/{dist-CpbbK4-I.js → dist-8SH6SWEG.js} +0 -0
- /package/dist/assets/{dist-DzAAhYcW.js → dist-9o0Xjd5v.js} +0 -0
- /package/dist/assets/{dist-DNGKAtWk.js → dist-BKgHjzML.js} +0 -0
- /package/dist/assets/{dist-98K4fusX.js → dist-BP4hpPAE.js} +0 -0
- /package/dist/assets/{dist-D35OyUMQ.js → dist-C-3FVUQA.js} +0 -0
- /package/dist/assets/{dist-OgwOt8T2.js → dist-C6_DArtj.js} +0 -0
- /package/dist/assets/{dist-O5-NiN3f.js → dist-CLyRge8R.js} +0 -0
- /package/dist/assets/{dist-D5ToCtv8.js → dist-CZvbHnyT.js} +0 -0
- /package/dist/assets/{dist-DrtRBAn8.js → dist-CrKffqgx.js} +0 -0
- /package/dist/assets/{dist-B8g3pNYJ.js → dist-Cros4IAo.js} +0 -0
- /package/dist/assets/{dist-3N7-WLqi.js → dist-D47O3FBX.js} +0 -0
- /package/dist/assets/{dist-BaKJ0-Tb.js → dist-DJuRuTXr.js} +0 -0
- /package/dist/assets/{dist-CM-lWxt3.js → dist-DQl27SFq.js} +0 -0
- /package/dist/assets/{dist-DokId-qM.js → dist-DeJBvhAc.js} +0 -0
- /package/dist/assets/{dist-C5kf6g-d.js → dist-fLBYOt9R.js} +0 -0
- /package/dist/assets/{dist-56ul6-mm.js → dist-kLs0VbW_.js} +0 -0
- /package/dist/assets/{dist-ByK00N0T.js → dist-l4RTzHX-.js} +0 -0
- /package/dist/assets/{dist-D9sE1udr.js → dist-ut5UbaRH.js} +0 -0
- /package/dist/assets/{dtd-DbCXDVgi.js → dtd-CkphQXbR.js} +0 -0
- /package/dist/assets/{duckdb-keywords-mPlR0SxW.js → duckdb-keywords-D9ZiGTTc.js} +0 -0
- /package/dist/assets/{dylan-CLLzL2Js.js → dylan-CPyS5Usd.js} +0 -0
- /package/dist/assets/{ebnf-Cnws41cu.js → ebnf-C4SDYpAu.js} +0 -0
- /package/dist/assets/{ecl-BC7x2nzk.js → ecl-Dy8k_w5N.js} +0 -0
- /package/dist/assets/{eiffel-CDU836rz.js → eiffel-DZMtnEo6.js} +0 -0
- /package/dist/assets/{elm-D-_bXARs.js → elm-CkuOc7z-.js} +0 -0
- /package/dist/assets/{empty-state-CqJvEFRk.js → empty-state-JOk_hLQe.js} +0 -0
- /package/dist/assets/{erlang-CwDZk2zM.js → erlang-CSyJ5dU6.js} +0 -0
- /package/dist/assets/{esm-D6WfbcL3.js → esm-7r3G8FZG.js} +0 -0
- /package/dist/assets/{fcl-CwkPc-_9.js → fcl-Px-Zskiw.js} +0 -0
- /package/dist/assets/{formatting-CDf6w1Kt.js → formatting-COz4XEaB.js} +0 -0
- /package/dist/assets/{forth-D6FsO_8x.js → forth-HHM4VU-4.js} +0 -0
- /package/dist/assets/{fortran-D4BMbIkG.js → fortran-D_hdoGUs.js} +0 -0
- /package/dist/assets/{gas-JFjzcgdY.js → gas-DwXUGevO.js} +0 -0
- /package/dist/assets/{gherkin-Cyu-qGaF.js → gherkin-6UjduaeQ.js} +0 -0
- /package/dist/assets/{github-_JH-0hIO.js → github-A_zUd4Uj.js} +0 -0
- /package/dist/assets/{groovy-CZaE9eN-.js → groovy-BMSTiLIi.js} +0 -0
- /package/dist/assets/{haskell-Dc6o0IGr.js → haskell-CwQPWeas.js} +0 -0
- /package/dist/assets/{haxe-Bsf0tzqs.js → haxe-BwgB7edi.js} +0 -0
- /package/dist/assets/{http-BQNSD-HR.js → http-CqevOCDe.js} +0 -0
- /package/dist/assets/{idl-1W91kQ8_.js → idl-DaVQAS85.js} +0 -0
- /package/dist/assets/{init-nx27Zb9l.js → init-D5qG588s.js} +0 -0
- /package/dist/assets/{javascript-BZ81-2rO.js → javascript-DgYFgf02.js} +0 -0
- /package/dist/assets/{julia-BZOsq0r_.js → julia-ZzackTsi.js} +0 -0
- /package/dist/assets/{katex-CvZ3kCGk.js → katex-Di-siZEY.js} +0 -0
- /package/dist/assets/{links-CZr5bjvo.js → links-ClNQSIal.js} +0 -0
- /package/dist/assets/{livescript-CNZfmikk.js → livescript-fyjJd0Zu.js} +0 -0
- /package/dist/assets/{loro_wasm_bg-RNUly1SE.js → loro_wasm_bg-BPjF1TWb.js} +0 -0
- /package/dist/assets/{lua-DXGRliwd.js → lua-Cx9isc8d.js} +0 -0
- /package/dist/assets/{marimo-icons-C_nFooxr.js → marimo-icons-yD_pAOm9.js} +0 -0
- /package/dist/assets/{math-CLO4uoaP.js → math-7EMdGNhR.js} +0 -0
- /package/dist/assets/{mathematica-BoUj8M7D.js → mathematica-BJvaPi1-.js} +0 -0
- /package/dist/assets/{mbox-DLVP8LAe.js → mbox-43z3jriT.js} +0 -0
- /package/dist/assets/{mirc-kI4d5fMu.js → mirc-B1ZSd8Bn.js} +0 -0
- /package/dist/assets/{mllike-CD9vBc_2.js → mllike-DZwCuWJi.js} +0 -0
- /package/dist/assets/{modelica-DgfsLJuF.js → modelica-DJJ2ie2z.js} +0 -0
- /package/dist/assets/{mscgen-B1HDwshJ.js → mscgen-CKYpxNp_.js} +0 -0
- /package/dist/assets/{multi-icon-nrKPWjDU.js → multi-icon-DVD1luis.js} +0 -0
- /package/dist/assets/{mumps-D_-b9TZD.js → mumps-DYGlTYd1.js} +0 -0
- /package/dist/assets/{nginx-Cm282mo8.js → nginx-D6Zlgok6.js} +0 -0
- /package/dist/assets/{ntriples-COX9JFZ8.js → ntriples-DizNPLuO.js} +0 -0
- /package/dist/assets/{octave-BejycR79.js → octave-DdwI7gwd.js} +0 -0
- /package/dist/assets/{oz-CFFivrGn.js → oz-DMPAJRti.js} +0 -0
- /package/dist/assets/{panel-context-CH75ubGG.js → panel-context-CckkyW-1.js} +0 -0
- /package/dist/assets/{pascal-B_p9jkCs.js → pascal-Do0zihr_.js} +0 -0
- /package/dist/assets/{path-Bz_hIzg5.js → path-WJo29M9I.js} +0 -0
- /package/dist/assets/{pathUtils-Bfcp5m-a.js → pathUtils-icFgkNy9.js} +0 -0
- /package/dist/assets/{perl-C-SFBTly.js → perl-t4XY-5wj.js} +0 -0
- /package/dist/assets/{pig-BhxDMp2k.js → pig-CgweiC6M.js} +0 -0
- /package/dist/assets/{powershell-c59M-9N2.js → powershell-OQGwpWeH.js} +0 -0
- /package/dist/assets/{properties-D1JNwCKy.js → properties-BU4KenKz.js} +0 -0
- /package/dist/assets/{protobuf-DQS7ex8R.js → protobuf--IbBPde2.js} +0 -0
- /package/dist/assets/{puppet-DaQvhvew.js → puppet-DkR_zpq4.js} +0 -0
- /package/dist/assets/{python-XHl3eRTS.js → python-PdpM9cxt.js} +0 -0
- /package/dist/assets/{q-DppnoRE3.js → q-BmGsZsKc.js} +0 -0
- /package/dist/assets/{r-D8-F_FWj.js → r-D1cPebaP.js} +0 -0
- /package/dist/assets/{request-registry-DHocQ_4I.js → request-registry-Dpk9hQrX.js} +0 -0
- /package/dist/assets/{requests-DYeT4CEe.js → requests-BMphPdzB.js} +0 -0
- /package/dist/assets/{rpm-CegJhNNO.js → rpm-CG3vlu2-.js} +0 -0
- /package/dist/assets/{ruby-YMIxufV1.js → ruby-BU2XuRQM.js} +0 -0
- /package/dist/assets/{runs-DBTXqJHS.js → runs-s9t2f_Tg.js} +0 -0
- /package/dist/assets/{sas-wTtX9UIQ.js → sas-ig9j_2iC.js} +0 -0
- /package/dist/assets/{scheme-BGenom3k.js → scheme-9DZXzBKN.js} +0 -0
- /package/dist/assets/{semaphore-DtBYRzWS.js → semaphore-C-Nli4KG.js} +0 -0
- /package/dist/assets/{shell-Bu1sLaiP.js → shell-BtigxJqY.js} +0 -0
- /package/dist/assets/{sieve-ffe6rUQh.js → sieve-DJ-mn8HY.js} +0 -0
- /package/dist/assets/{simple-mode-DBSzUJLA.js → simple-mode-lTjyt9i9.js} +0 -0
- /package/dist/assets/{smalltalk-NU5EGjHp.js → smalltalk-Bn53uNk6.js} +0 -0
- /package/dist/assets/{solr-ptw1yIqO.js → solr-BenHzQuB.js} +0 -0
- /package/dist/assets/{sparql-uqVktnwO.js → sparql-mdFRPSSw.js} +0 -0
- /package/dist/assets/{spreadsheet-VEzeu_mb.js → spreadsheet-CIIID0RN.js} +0 -0
- /package/dist/assets/{sql-tYjnWETe.js → sql-BJS8pfHr.js} +0 -0
- /package/dist/assets/{src-BshXgZd4.js → src-C042FyXq.js} +0 -0
- /package/dist/assets/{state-D10U2MwA.js → state-DCtLlFJq.js} +0 -0
- /package/dist/assets/{stylus-B2E6Ulaz.js → stylus-CUXYXPeL.js} +0 -0
- /package/dist/assets/{swift-Rmnn7ATv.js → swift-BgwlI0GN.js} +0 -0
- /package/dist/assets/{swiper-component-Che9MNs4.js → swiper-component-DXW8snlt.js} +0 -0
- /package/dist/assets/{tcl-ZPWCn2nn.js → tcl-B8Khjzwl.js} +0 -0
- /package/dist/assets/{textile-uhA33kFk.js → textile-DmfgOrXO.js} +0 -0
- /package/dist/assets/{tiddlywiki-CPkGLyXH.js → tiddlywiki-mgaN9k7_.js} +0 -0
- /package/dist/assets/{tiki-BtjLo8OF.js → tiki-B8Sxh4ZA.js} +0 -0
- /package/dist/assets/{timer-VYMLXPue.js → timer-Bt8Z3SQI.js} +0 -0
- /package/dist/assets/{toml-BFZv2Mv7.js → toml-CPrwnn25.js} +0 -0
- /package/dist/assets/{treemap-Bca0xNNq.js → treemap-CshYMgJw.js} +0 -0
- /package/dist/assets/{troff-B5eayHop.js → troff-Cb-2hp0t.js} +0 -0
- /package/dist/assets/{ttcn-cfg-CfbkL3Q_.js → ttcn-cfg-O0cle81j.js} +0 -0
- /package/dist/assets/{ttcn-BM0Yp8NY.js → ttcn-mp3DV9SP.js} +0 -0
- /package/dist/assets/{turtle-DvetLxrv.js → turtle-Bo_IjRT-.js} +0 -0
- /package/dist/assets/{types-Da7lA5YC.js → types-Bn-E0Dh-.js} +0 -0
- /package/dist/assets/{use-vega-container-remeasure-CbKTb_jy.js → use-vega-container-remeasure-C52OJt1l.js} +0 -0
- /package/dist/assets/{useInterval-CWBTUy5W.js → useInterval-CnQfyMa9.js} +0 -0
- /package/dist/assets/{vb-i5Z8scch.js → vb-B84py4l9.js} +0 -0
- /package/dist/assets/{vbscript-BiPYgIyi.js → vbscript-DCWGTF8B.js} +0 -0
- /package/dist/assets/{velocity-Dw3R3YoX.js → velocity-COls9qbE.js} +0 -0
- /package/dist/assets/{verilog-B8FhJcX6.js → verilog-Dn4JRpb3.js} +0 -0
- /package/dist/assets/{vhdl-BqPEoXdJ.js → vhdl-DxQ-aNCu.js} +0 -0
- /package/dist/assets/{web-vitals-CwE0GGzl.js → web-vitals-DBq6CjRf.js} +0 -0
- /package/dist/assets/{webidl-mMO-qW5Q.js → webidl-IlD_Nbdp.js} +0 -0
- /package/dist/assets/{ws-BmTnbVEi.js → ws-Dj1iZVFK.js} +0 -0
- /package/dist/assets/{xquery-DvqNwq7L.js → xquery-DwkwsYYE.js} +0 -0
- /package/dist/assets/{yacas-Dku9Z6Kf.js → yacas-CR27GINL.js} +0 -0
- /package/dist/assets/{z80-DvazU5Tr.js → z80-DDujbhXi.js} +0 -0
|
@@ -38,7 +38,11 @@ import { createLspMarkdownRenderer } from "../../lsp/markdown-renderer";
|
|
|
38
38
|
import { NotebookLanguageServerClient } from "../../lsp/notebook-lsp";
|
|
39
39
|
import { createTransport } from "../../lsp/transports";
|
|
40
40
|
import { CellDocumentUri, type ILanguageServerClient } from "../../lsp/types";
|
|
41
|
-
import {
|
|
41
|
+
import {
|
|
42
|
+
getLspRootUri,
|
|
43
|
+
getLspWorkspaceFolders,
|
|
44
|
+
isKnownCellDocumentUri,
|
|
45
|
+
} from "../../lsp/utils";
|
|
42
46
|
import {
|
|
43
47
|
clickablePlaceholderExtension,
|
|
44
48
|
smartPlaceholderExtension,
|
|
@@ -338,6 +342,21 @@ export class PythonLanguageAdapter implements LanguageAdapter<{}> {
|
|
|
338
342
|
clients.length === 1
|
|
339
343
|
? (clients[0] as NotebookLanguageServerClient)
|
|
340
344
|
: new FederatedLanguageServerClient(clients);
|
|
345
|
+
const openExternalLocation = (result: { uri: string }) => {
|
|
346
|
+
Logger.debug("openExternalLocation", result);
|
|
347
|
+
// Neither the merged document nor a cell is a file on disk. The
|
|
348
|
+
// plugin handles same-cell locations itself; revealing a location in
|
|
349
|
+
// another cell isn't supported yet.
|
|
350
|
+
if (
|
|
351
|
+
client.documentUri === result.uri ||
|
|
352
|
+
isKnownCellDocumentUri(result.uri)
|
|
353
|
+
) {
|
|
354
|
+
return;
|
|
355
|
+
}
|
|
356
|
+
getRequestClient().openFile({
|
|
357
|
+
path: result.uri.replace("file://", ""),
|
|
358
|
+
});
|
|
359
|
+
};
|
|
341
360
|
|
|
342
361
|
return [
|
|
343
362
|
languageServerWithClient({
|
|
@@ -346,6 +365,7 @@ export class PythonLanguageAdapter implements LanguageAdapter<{}> {
|
|
|
346
365
|
allowHTMLContent: true,
|
|
347
366
|
markdownRenderer: createLspMarkdownRenderer(),
|
|
348
367
|
useSnippetOnCompletion: true,
|
|
368
|
+
clientSideFiltering: true,
|
|
349
369
|
hoverConfig: hoverOptions,
|
|
350
370
|
completionConfig: autocompleteOptions,
|
|
351
371
|
// Default to false
|
|
@@ -362,16 +382,8 @@ export class PythonLanguageAdapter implements LanguageAdapter<{}> {
|
|
|
362
382
|
rename: hotkeys.getHotkey("cell.renameSymbol").key,
|
|
363
383
|
},
|
|
364
384
|
completionMatchBefore,
|
|
365
|
-
onGoToDefinition:
|
|
366
|
-
|
|
367
|
-
if (client.documentUri === result.uri) {
|
|
368
|
-
// Local definition
|
|
369
|
-
return;
|
|
370
|
-
}
|
|
371
|
-
getRequestClient().openFile({
|
|
372
|
-
path: result.uri.replace("file://", ""),
|
|
373
|
-
});
|
|
374
|
-
},
|
|
385
|
+
onGoToDefinition: openExternalLocation,
|
|
386
|
+
onShowLocation: openExternalLocation,
|
|
375
387
|
}),
|
|
376
388
|
documentUri.of(CellDocumentUri.of(cellId)),
|
|
377
389
|
];
|
|
@@ -109,7 +109,11 @@ class SQLCompletionStore {
|
|
|
109
109
|
return {
|
|
110
110
|
shouldAddLocalTables: true,
|
|
111
111
|
schema: builder.build(),
|
|
112
|
-
defaultSchema:
|
|
112
|
+
defaultSchema:
|
|
113
|
+
default_schema ??
|
|
114
|
+
(defaultDb?.schemas.length === 1
|
|
115
|
+
? defaultDb.schemas[0]?.name
|
|
116
|
+
: undefined),
|
|
113
117
|
};
|
|
114
118
|
}
|
|
115
119
|
|
|
@@ -52,7 +52,7 @@ const SOURCE_TYPE_COLORS = {
|
|
|
52
52
|
catalog: "bg-(--purple-4) text-(--purple-11)",
|
|
53
53
|
} as const;
|
|
54
54
|
|
|
55
|
-
const CONTAINER_STYLES = "p-3 min-w-[250px] flex flex-col divide-y";
|
|
55
|
+
export const CONTAINER_STYLES = "p-3 min-w-[250px] flex flex-col divide-y";
|
|
56
56
|
|
|
57
57
|
const columnsText = new PluralWord("column", "columns");
|
|
58
58
|
const rowsText = new PluralWord("row", "rows");
|
|
@@ -61,7 +61,7 @@ const tablesText = new PluralWord("table", "tables");
|
|
|
61
61
|
const databasesText = new PluralWord("database", "databases");
|
|
62
62
|
|
|
63
63
|
// Helper components and functions
|
|
64
|
-
const SectionHeader: React.FC<{
|
|
64
|
+
export const SectionHeader: React.FC<{
|
|
65
65
|
icon: React.ReactNode;
|
|
66
66
|
title: string;
|
|
67
67
|
badge?: React.ReactNode;
|
|
@@ -73,7 +73,7 @@ const SectionHeader: React.FC<{
|
|
|
73
73
|
</div>
|
|
74
74
|
);
|
|
75
75
|
|
|
76
|
-
const MetadataRow: React.FC<{
|
|
76
|
+
export const MetadataRow: React.FC<{
|
|
77
77
|
label: string;
|
|
78
78
|
value: React.ReactNode;
|
|
79
79
|
}> = ({ label, value }) => (
|
|
@@ -12,12 +12,17 @@ import {
|
|
|
12
12
|
type ViewUpdate,
|
|
13
13
|
} from "@codemirror/view";
|
|
14
14
|
import {
|
|
15
|
+
aliasColumnCompletionSource,
|
|
16
|
+
createCteCompletionSource,
|
|
15
17
|
defaultSqlHoverTheme,
|
|
16
18
|
NodeSqlParser,
|
|
17
19
|
type NodeSqlParserResult,
|
|
20
|
+
QueryContextAnalyzer,
|
|
18
21
|
type SupportedDialects as ParserDialects,
|
|
19
22
|
type SqlParseError,
|
|
20
23
|
sqlExtension,
|
|
24
|
+
SqlStructureAnalyzer,
|
|
25
|
+
unqualifiedColumnCompletionSource,
|
|
21
26
|
} from "@marimo-team/codemirror-sql";
|
|
22
27
|
import { DuckDBDialect } from "@marimo-team/codemirror-sql/dialects";
|
|
23
28
|
import { type SQLMetadata, SQLParser } from "@marimo-team/smart-cells";
|
|
@@ -61,7 +66,7 @@ import { getSQLMode, type SQLMode } from "./sql-mode";
|
|
|
61
66
|
import { isKnownDialect } from "./utils";
|
|
62
67
|
|
|
63
68
|
const DEFAULT_DIALECT = DuckDBDialect;
|
|
64
|
-
const DEFAULT_PARSER_DIALECT = "DuckDB";
|
|
69
|
+
const DEFAULT_PARSER_DIALECT: ParserDialects = "DuckDB";
|
|
65
70
|
|
|
66
71
|
// A compartment for the SQL config, so we can update the config of codemirror
|
|
67
72
|
const sqlConfigCompartment = new Compartment();
|
|
@@ -142,6 +147,7 @@ export class SQLLanguageAdapter implements LanguageAdapter<SQLLanguageAdapterMet
|
|
|
142
147
|
_placeholderType: PlaceholderType,
|
|
143
148
|
lspConfig: LSPConfig & { diagnostics: DiagnosticsConfig },
|
|
144
149
|
): Extension[] {
|
|
150
|
+
const analysis = createSQLAnalysis();
|
|
145
151
|
const extensions = [
|
|
146
152
|
// This can be updated with a dispatch effect
|
|
147
153
|
sqlConfigCompartment.of(sql({ dialect: DEFAULT_DIALECT })),
|
|
@@ -167,6 +173,10 @@ export class SQLLanguageAdapter implements LanguageAdapter<SQLLanguageAdapterMet
|
|
|
167
173
|
variableCompletionSource,
|
|
168
174
|
// Completions for dialect keywords
|
|
169
175
|
customKeywordCompletionSource(),
|
|
176
|
+
// Completions based on the current query
|
|
177
|
+
analysis.cteCompletionSource,
|
|
178
|
+
analysis.aliasCompletionSource,
|
|
179
|
+
analysis.columnCompletionSource,
|
|
170
180
|
],
|
|
171
181
|
}),
|
|
172
182
|
];
|
|
@@ -185,10 +195,23 @@ export class SQLLanguageAdapter implements LanguageAdapter<SQLLanguageAdapterMet
|
|
|
185
195
|
|
|
186
196
|
extensions.push(
|
|
187
197
|
sqlExtension({
|
|
198
|
+
schema: getSchema,
|
|
188
199
|
enableLinting: true,
|
|
189
200
|
linterConfig: {
|
|
190
201
|
delay: 250, // Delay before running validation
|
|
191
202
|
parser: parser,
|
|
203
|
+
// CustomSqlParser performs backend DuckDB validation in validateSql.
|
|
204
|
+
perStatement: false,
|
|
205
|
+
},
|
|
206
|
+
enableSemanticLinting: true,
|
|
207
|
+
semanticLinterConfig: {
|
|
208
|
+
parser: analysis.parser,
|
|
209
|
+
structureAnalyzer: analysis.structureAnalyzer,
|
|
210
|
+
severity: {
|
|
211
|
+
unknownTable: "off",
|
|
212
|
+
unknownColumn: "warning",
|
|
213
|
+
ambiguousColumn: "warning",
|
|
214
|
+
},
|
|
192
215
|
},
|
|
193
216
|
enableGutterMarkers: true,
|
|
194
217
|
gutterConfig: {
|
|
@@ -198,14 +221,21 @@ export class SQLLanguageAdapter implements LanguageAdapter<SQLLanguageAdapterMet
|
|
|
198
221
|
parser: parser,
|
|
199
222
|
},
|
|
200
223
|
hoverConfig: {
|
|
201
|
-
schema: getSchema, // Use the same schema as autocomplete
|
|
202
224
|
hoverTime: 300, // 300ms hover delay
|
|
203
225
|
enableKeywords: true, // Show keyword information
|
|
204
226
|
enableTables: true, // Show table information
|
|
205
227
|
enableColumns: true, // Show column information
|
|
206
|
-
parser: parser,
|
|
228
|
+
parser: analysis.parser,
|
|
229
|
+
contextAnalyzer: analysis.contextAnalyzer,
|
|
207
230
|
theme: defaultSqlHoverTheme(theme),
|
|
208
231
|
},
|
|
232
|
+
enableNavigation: true,
|
|
233
|
+
navigationConfig: {
|
|
234
|
+
contextAnalyzer: analysis.contextAnalyzer,
|
|
235
|
+
keymap: false,
|
|
236
|
+
parser: analysis.parser,
|
|
237
|
+
structureAnalyzer: analysis.structureAnalyzer,
|
|
238
|
+
},
|
|
209
239
|
}),
|
|
210
240
|
EditorView.updateListener.of((update) => {
|
|
211
241
|
if (update.focusChanged) {
|
|
@@ -223,8 +253,127 @@ export class SQLLanguageAdapter implements LanguageAdapter<SQLLanguageAdapterMet
|
|
|
223
253
|
}
|
|
224
254
|
}
|
|
225
255
|
|
|
256
|
+
function createSQLAnalysis() {
|
|
257
|
+
const parser = new NodeSqlParser({
|
|
258
|
+
getParserOptions: (state: EditorState) => {
|
|
259
|
+
return {
|
|
260
|
+
database: getAnalysisDialect(state),
|
|
261
|
+
};
|
|
262
|
+
},
|
|
263
|
+
});
|
|
264
|
+
const contextAnalyzer = new DialectAwareQueryContextAnalyzer(parser);
|
|
265
|
+
const structureAnalyzer = new DialectAwareSqlStructureAnalyzer(parser);
|
|
266
|
+
|
|
267
|
+
return {
|
|
268
|
+
parser,
|
|
269
|
+
contextAnalyzer,
|
|
270
|
+
structureAnalyzer,
|
|
271
|
+
cteCompletionSource: createCteCompletionSource({
|
|
272
|
+
parser,
|
|
273
|
+
contextAnalyzer,
|
|
274
|
+
structureAnalyzer,
|
|
275
|
+
}),
|
|
276
|
+
aliasCompletionSource: aliasColumnCompletionSource({
|
|
277
|
+
schema: getSchema,
|
|
278
|
+
parser,
|
|
279
|
+
contextAnalyzer,
|
|
280
|
+
}),
|
|
281
|
+
columnCompletionSource: unqualifiedColumnCompletionSource({
|
|
282
|
+
schema: getSchema,
|
|
283
|
+
parser,
|
|
284
|
+
contextAnalyzer,
|
|
285
|
+
}),
|
|
286
|
+
};
|
|
287
|
+
}
|
|
288
|
+
|
|
289
|
+
function getAnalysisDialect(state: EditorState): ParserDialects {
|
|
290
|
+
return guessParserDialect(state) ?? DEFAULT_PARSER_DIALECT;
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
class DialectAwareQueryContextAnalyzer extends QueryContextAnalyzer {
|
|
294
|
+
private readonly analyzers = new Map<ParserDialects, QueryContextAnalyzer>();
|
|
295
|
+
private readonly analysisParser: NodeSqlParser;
|
|
296
|
+
|
|
297
|
+
constructor(analysisParser: NodeSqlParser) {
|
|
298
|
+
super(analysisParser);
|
|
299
|
+
this.analysisParser = analysisParser;
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
override getContext(
|
|
303
|
+
sql: string,
|
|
304
|
+
opts: { state: EditorState },
|
|
305
|
+
): ReturnType<QueryContextAnalyzer["getContext"]> {
|
|
306
|
+
return this.getAnalyzer(opts.state).getContext(sql, opts);
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
override clearCache(): void {
|
|
310
|
+
for (const analyzer of this.analyzers.values()) {
|
|
311
|
+
analyzer.clearCache();
|
|
312
|
+
}
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
private getAnalyzer(state: EditorState): QueryContextAnalyzer {
|
|
316
|
+
const dialect = getAnalysisDialect(state);
|
|
317
|
+
let analyzer = this.analyzers.get(dialect);
|
|
318
|
+
if (!analyzer) {
|
|
319
|
+
analyzer = new QueryContextAnalyzer(this.analysisParser);
|
|
320
|
+
this.analyzers.set(dialect, analyzer);
|
|
321
|
+
}
|
|
322
|
+
return analyzer;
|
|
323
|
+
}
|
|
324
|
+
}
|
|
325
|
+
|
|
326
|
+
class DialectAwareSqlStructureAnalyzer extends SqlStructureAnalyzer {
|
|
327
|
+
private readonly analyzers = new Map<ParserDialects, SqlStructureAnalyzer>();
|
|
328
|
+
private readonly analysisParser: NodeSqlParser;
|
|
329
|
+
|
|
330
|
+
constructor(analysisParser: NodeSqlParser) {
|
|
331
|
+
super(analysisParser);
|
|
332
|
+
this.analysisParser = analysisParser;
|
|
333
|
+
}
|
|
334
|
+
|
|
335
|
+
override analyzeDocument(
|
|
336
|
+
state: EditorState,
|
|
337
|
+
): ReturnType<SqlStructureAnalyzer["analyzeDocument"]> {
|
|
338
|
+
return this.getAnalyzer(state).analyzeDocument(state);
|
|
339
|
+
}
|
|
340
|
+
|
|
341
|
+
override getStatementAtPosition(
|
|
342
|
+
state: EditorState,
|
|
343
|
+
position: number,
|
|
344
|
+
): ReturnType<SqlStructureAnalyzer["getStatementAtPosition"]> {
|
|
345
|
+
return this.getAnalyzer(state).getStatementAtPosition(state, position);
|
|
346
|
+
}
|
|
347
|
+
|
|
348
|
+
override getStatementsInRange(
|
|
349
|
+
state: EditorState,
|
|
350
|
+
from: number,
|
|
351
|
+
to: number,
|
|
352
|
+
): ReturnType<SqlStructureAnalyzer["getStatementsInRange"]> {
|
|
353
|
+
return this.getAnalyzer(state).getStatementsInRange(state, from, to);
|
|
354
|
+
}
|
|
355
|
+
|
|
356
|
+
override clearCache(): void {
|
|
357
|
+
for (const analyzer of this.analyzers.values()) {
|
|
358
|
+
analyzer.clearCache();
|
|
359
|
+
}
|
|
360
|
+
}
|
|
361
|
+
|
|
362
|
+
private getAnalyzer(state: EditorState): SqlStructureAnalyzer {
|
|
363
|
+
const dialect = getAnalysisDialect(state);
|
|
364
|
+
let analyzer = this.analyzers.get(dialect);
|
|
365
|
+
if (!analyzer) {
|
|
366
|
+
analyzer = new SqlStructureAnalyzer(this.analysisParser);
|
|
367
|
+
this.analyzers.set(dialect, analyzer);
|
|
368
|
+
}
|
|
369
|
+
return analyzer;
|
|
370
|
+
}
|
|
371
|
+
}
|
|
372
|
+
|
|
226
373
|
class CustomSqlParser extends NodeSqlParser {
|
|
227
374
|
private validationTimeout: number | null = null;
|
|
375
|
+
private pendingValidationResolve: ((errors: SqlParseError[]) => void) | null =
|
|
376
|
+
null;
|
|
228
377
|
private readonly VALIDATION_DELAY_MS = 300; // Wait 300ms after user stops typing
|
|
229
378
|
private isFocused = false; // Only validate if the editor is focused
|
|
230
379
|
|
|
@@ -232,37 +381,51 @@ class CustomSqlParser extends NodeSqlParser {
|
|
|
232
381
|
this.isFocused = focused;
|
|
233
382
|
}
|
|
234
383
|
|
|
384
|
+
private resolvePendingValidation(errors: SqlParseError[]): void {
|
|
385
|
+
this.pendingValidationResolve?.(errors);
|
|
386
|
+
this.pendingValidationResolve = null;
|
|
387
|
+
}
|
|
388
|
+
|
|
235
389
|
private async validateWithDelay(
|
|
236
390
|
sql: string,
|
|
237
|
-
engine:
|
|
391
|
+
engine: ConnectionName,
|
|
238
392
|
dialect: ParserDialects | null,
|
|
239
393
|
): Promise<SqlParseError[]> {
|
|
240
|
-
// Clear any existing delay call
|
|
394
|
+
// Clear any existing delay call, resolving its promise so a superseded
|
|
395
|
+
// request doesn't hang forever.
|
|
241
396
|
if (this.validationTimeout) {
|
|
242
397
|
window.clearTimeout(this.validationTimeout);
|
|
398
|
+
this.resolvePendingValidation([]);
|
|
243
399
|
}
|
|
244
400
|
|
|
245
401
|
// Set up a new request to be called after the delay
|
|
246
402
|
return new Promise((resolve) => {
|
|
403
|
+
this.pendingValidationResolve = resolve;
|
|
247
404
|
this.validationTimeout = window.setTimeout(async () => {
|
|
405
|
+
this.validationTimeout = null;
|
|
406
|
+
|
|
248
407
|
// Only validate if the editor is still focused
|
|
249
408
|
if (!this.isFocused) {
|
|
250
|
-
|
|
409
|
+
this.resolvePendingValidation([]);
|
|
251
410
|
return;
|
|
252
411
|
}
|
|
253
412
|
|
|
254
413
|
try {
|
|
255
|
-
|
|
414
|
+
// For validate mode, we run EXPLAIN queries on the engine, which can be
|
|
415
|
+
// expensive for remote databases. So, we only run for internal engines.
|
|
416
|
+
const sqlMode = INTERNAL_SQL_ENGINES.has(engine)
|
|
417
|
+
? getSQLMode()
|
|
418
|
+
: "default";
|
|
256
419
|
const result = await validateSQL(sql, engine, dialect, sqlMode);
|
|
257
420
|
if (result.error) {
|
|
258
421
|
Logger.error("Failed to validate SQL", { error: result.error });
|
|
259
|
-
|
|
422
|
+
this.resolvePendingValidation([]);
|
|
260
423
|
return;
|
|
261
424
|
}
|
|
262
|
-
|
|
425
|
+
this.resolvePendingValidation(result.parse_result?.errors ?? []);
|
|
263
426
|
} catch (error) {
|
|
264
427
|
Logger.error("Failed to validate SQL", { error });
|
|
265
|
-
|
|
428
|
+
this.resolvePendingValidation([]);
|
|
266
429
|
}
|
|
267
430
|
}, this.VALIDATION_DELAY_MS);
|
|
268
431
|
});
|
|
@@ -273,19 +436,23 @@ class CustomSqlParser extends NodeSqlParser {
|
|
|
273
436
|
opts: { state: EditorState },
|
|
274
437
|
): Promise<SqlParseError[]> {
|
|
275
438
|
const metadata = getSQLMetadata(opts.state);
|
|
439
|
+
const dialect = connectionNameToParserDialect(metadata.engine);
|
|
276
440
|
|
|
277
441
|
// Only validate if the editor is focused
|
|
278
442
|
if (!this.isFocused) {
|
|
279
443
|
return [];
|
|
280
444
|
}
|
|
281
445
|
|
|
282
|
-
// Only perform custom validation for DuckDB
|
|
283
|
-
if (!
|
|
446
|
+
// Only perform custom validation for DuckDB as we have a custom validation endpoint for it.
|
|
447
|
+
if (!isDuckDBConnection(metadata.engine, dialect)) {
|
|
284
448
|
return super.validateSql(sql, opts);
|
|
285
449
|
}
|
|
286
450
|
|
|
287
|
-
|
|
288
|
-
|
|
451
|
+
return this.validateWithDelay(
|
|
452
|
+
sql,
|
|
453
|
+
metadata.engine,
|
|
454
|
+
dialect ?? DEFAULT_PARSER_DIALECT,
|
|
455
|
+
);
|
|
289
456
|
}
|
|
290
457
|
|
|
291
458
|
override async parse(
|
|
@@ -294,9 +461,10 @@ class CustomSqlParser extends NodeSqlParser {
|
|
|
294
461
|
): Promise<NodeSqlParserResult> {
|
|
295
462
|
const metadata = getSQLMetadata(opts.state);
|
|
296
463
|
const engine = metadata.engine;
|
|
464
|
+
const dialect = connectionNameToParserDialect(engine);
|
|
297
465
|
|
|
298
466
|
// For now, always return success for DuckDB
|
|
299
|
-
if (engine
|
|
467
|
+
if (isDuckDBConnection(engine, dialect)) {
|
|
300
468
|
return { success: true, errors: [] };
|
|
301
469
|
}
|
|
302
470
|
|
|
@@ -304,6 +472,13 @@ class CustomSqlParser extends NodeSqlParser {
|
|
|
304
472
|
}
|
|
305
473
|
}
|
|
306
474
|
|
|
475
|
+
function isDuckDBConnection(
|
|
476
|
+
engine: ConnectionName,
|
|
477
|
+
dialect: ParserDialects | null,
|
|
478
|
+
): boolean {
|
|
479
|
+
return engine === DUCKDB_ENGINE || dialect === "DuckDB";
|
|
480
|
+
}
|
|
481
|
+
|
|
307
482
|
/**
|
|
308
483
|
* Update the SQL dialect in the editor view.
|
|
309
484
|
*/
|
|
@@ -344,7 +519,61 @@ function getSchema(view: EditorView): SQLNamespace {
|
|
|
344
519
|
return {};
|
|
345
520
|
}
|
|
346
521
|
|
|
347
|
-
|
|
522
|
+
const schema = config.schema;
|
|
523
|
+
if (!isNamespaceMap(schema)) {
|
|
524
|
+
return schema;
|
|
525
|
+
}
|
|
526
|
+
|
|
527
|
+
const defaultSchema = config.defaultSchema;
|
|
528
|
+
const defaultSchemaNamespace = defaultSchema
|
|
529
|
+
? schema[defaultSchema]
|
|
530
|
+
: undefined;
|
|
531
|
+
|
|
532
|
+
// The completion schema contains both default-schema and fully qualified
|
|
533
|
+
// paths. Promote default-schema tables so unqualified references resolve to
|
|
534
|
+
// one exact match instead of appearing ambiguous.
|
|
535
|
+
if (
|
|
536
|
+
defaultSchemaNamespace &&
|
|
537
|
+
!Array.isArray(defaultSchemaNamespace) &&
|
|
538
|
+
typeof defaultSchemaNamespace === "object" &&
|
|
539
|
+
"children" in defaultSchemaNamespace &&
|
|
540
|
+
isNamespaceMap(defaultSchemaNamespace.children)
|
|
541
|
+
) {
|
|
542
|
+
return {
|
|
543
|
+
...schema,
|
|
544
|
+
...Object.fromEntries(
|
|
545
|
+
Object.entries(defaultSchemaNamespace.children).filter(
|
|
546
|
+
([name]) => !Object.hasOwn(schema, name),
|
|
547
|
+
),
|
|
548
|
+
),
|
|
549
|
+
};
|
|
550
|
+
}
|
|
551
|
+
|
|
552
|
+
return schema;
|
|
553
|
+
}
|
|
554
|
+
|
|
555
|
+
function isNamespaceMap(
|
|
556
|
+
namespace: SQLNamespace,
|
|
557
|
+
): namespace is Record<string, SQLNamespace> {
|
|
558
|
+
if (Array.isArray(namespace)) {
|
|
559
|
+
return false;
|
|
560
|
+
}
|
|
561
|
+
|
|
562
|
+
if (!("self" in namespace) || !("children" in namespace)) {
|
|
563
|
+
return true;
|
|
564
|
+
}
|
|
565
|
+
|
|
566
|
+
// A self/children wrapper stores a Completion in `self`. A table or schema
|
|
567
|
+
// literally named "self" stores another namespace there.
|
|
568
|
+
const self = namespace.self;
|
|
569
|
+
const isSelfChildrenWrapper =
|
|
570
|
+
typeof self === "object" &&
|
|
571
|
+
self !== null &&
|
|
572
|
+
!Array.isArray(self) &&
|
|
573
|
+
"label" in self &&
|
|
574
|
+
typeof self.label === "string";
|
|
575
|
+
|
|
576
|
+
return !isSelfChildrenWrapper;
|
|
348
577
|
}
|
|
349
578
|
|
|
350
579
|
function guessParserDialect(state: EditorState): ParserDialects | null {
|
|
@@ -529,3 +758,9 @@ async function validateSQL(
|
|
|
529
758
|
}
|
|
530
759
|
return result;
|
|
531
760
|
}
|
|
761
|
+
|
|
762
|
+
export const exportedForTesting = {
|
|
763
|
+
createSQLAnalysis,
|
|
764
|
+
CustomSqlParser,
|
|
765
|
+
getSchema,
|
|
766
|
+
};
|
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
/* Copyright 2026 Marimo. All rights reserved. */
|
|
2
|
+
|
|
3
|
+
import { describe, expect, it, type Mocked, vi } from "vitest";
|
|
4
|
+
import type * as LSP from "vscode-languageserver-protocol";
|
|
5
|
+
import { FederatedLanguageServerClient } from "../federated-lsp";
|
|
6
|
+
import type { ILanguageServerClient } from "../types";
|
|
7
|
+
|
|
8
|
+
function createClient(
|
|
9
|
+
supportedMethods: string[] = [],
|
|
10
|
+
): Mocked<ILanguageServerClient> {
|
|
11
|
+
const client: Mocked<ILanguageServerClient> = {
|
|
12
|
+
ready: true,
|
|
13
|
+
capabilities: {},
|
|
14
|
+
initializePromise: Promise.resolve(),
|
|
15
|
+
clientCapabilities: {},
|
|
16
|
+
initialize: vi.fn(),
|
|
17
|
+
close: vi.fn(),
|
|
18
|
+
hasCapability: vi.fn((method) => supportedMethods.includes(method)),
|
|
19
|
+
textDocumentDidOpen: vi.fn().mockResolvedValue(false),
|
|
20
|
+
textDocumentDidChange: vi.fn(),
|
|
21
|
+
textDocumentDidClose: vi.fn(),
|
|
22
|
+
textDocumentWillSave: vi.fn(),
|
|
23
|
+
textDocumentWillSaveWaitUntil: vi.fn().mockResolvedValue(null),
|
|
24
|
+
textDocumentDidSave: vi.fn(),
|
|
25
|
+
textDocumentHover: vi.fn().mockResolvedValue({ contents: [] }),
|
|
26
|
+
textDocumentCompletion: vi.fn().mockResolvedValue(null),
|
|
27
|
+
completionItemResolve: vi.fn(),
|
|
28
|
+
textDocumentDefinition: vi.fn().mockResolvedValue(null),
|
|
29
|
+
textDocumentCodeAction: vi.fn().mockResolvedValue(null),
|
|
30
|
+
codeActionResolve: vi.fn(),
|
|
31
|
+
textDocumentRename: vi.fn().mockResolvedValue(null),
|
|
32
|
+
textDocumentPrepareRename: vi.fn().mockResolvedValue(null),
|
|
33
|
+
textDocumentSignatureHelp: vi.fn().mockResolvedValue(null),
|
|
34
|
+
onNotification: vi.fn().mockReturnValue(() => true),
|
|
35
|
+
};
|
|
36
|
+
return client;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
describe("FederatedLanguageServerClient", () => {
|
|
40
|
+
it("routes requests using dynamic method capabilities", async () => {
|
|
41
|
+
const staticOnlyClient = createClient();
|
|
42
|
+
const dynamicClient = createClient(["textDocument/definition"]);
|
|
43
|
+
const definition: LSP.Location = {
|
|
44
|
+
uri: "file:///definition.py",
|
|
45
|
+
range: {
|
|
46
|
+
start: { line: 1, character: 2 },
|
|
47
|
+
end: { line: 1, character: 5 },
|
|
48
|
+
},
|
|
49
|
+
};
|
|
50
|
+
dynamicClient.textDocumentDefinition.mockResolvedValue(definition);
|
|
51
|
+
const client = new FederatedLanguageServerClient([
|
|
52
|
+
staticOnlyClient,
|
|
53
|
+
dynamicClient,
|
|
54
|
+
]);
|
|
55
|
+
const params: LSP.DefinitionParams = {
|
|
56
|
+
textDocument: { uri: "file:///notebook.py" },
|
|
57
|
+
position: { line: 0, character: 0 },
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
await expect(client.textDocumentDefinition(params)).resolves.toEqual(
|
|
61
|
+
definition,
|
|
62
|
+
);
|
|
63
|
+
expect(client.hasCapability("textDocument/definition")).toBe(true);
|
|
64
|
+
expect(staticOnlyClient.textDocumentDefinition).not.toHaveBeenCalled();
|
|
65
|
+
expect(dynamicClient.textDocumentDefinition).toHaveBeenCalledWith(params);
|
|
66
|
+
});
|
|
67
|
+
|
|
68
|
+
it("prefers the first client's willSaveWaitUntil edits regardless of latency", async () => {
|
|
69
|
+
const slowEdits: LSP.TextEdit[] = [
|
|
70
|
+
{
|
|
71
|
+
range: {
|
|
72
|
+
start: { line: 0, character: 0 },
|
|
73
|
+
end: { line: 0, character: 1 },
|
|
74
|
+
},
|
|
75
|
+
newText: "first",
|
|
76
|
+
},
|
|
77
|
+
];
|
|
78
|
+
const first = createClient();
|
|
79
|
+
const second = createClient();
|
|
80
|
+
// Answers last, but still wins
|
|
81
|
+
first.textDocumentWillSaveWaitUntil.mockImplementation(
|
|
82
|
+
() => new Promise((resolve) => setTimeout(() => resolve(slowEdits), 5)),
|
|
83
|
+
);
|
|
84
|
+
second.textDocumentWillSaveWaitUntil.mockResolvedValue([
|
|
85
|
+
{
|
|
86
|
+
range: {
|
|
87
|
+
start: { line: 1, character: 0 },
|
|
88
|
+
end: { line: 1, character: 1 },
|
|
89
|
+
},
|
|
90
|
+
newText: "second",
|
|
91
|
+
},
|
|
92
|
+
]);
|
|
93
|
+
const client = new FederatedLanguageServerClient([first, second]);
|
|
94
|
+
|
|
95
|
+
await expect(
|
|
96
|
+
client.textDocumentWillSaveWaitUntil({
|
|
97
|
+
textDocument: { uri: "file:///notebook.py" },
|
|
98
|
+
reason: 1,
|
|
99
|
+
}),
|
|
100
|
+
).resolves.toEqual(slowEdits);
|
|
101
|
+
expect(second.textDocumentWillSaveWaitUntil).toHaveBeenCalled();
|
|
102
|
+
});
|
|
103
|
+
|
|
104
|
+
it("skips clients that reject willSaveWaitUntil", async () => {
|
|
105
|
+
const failing = createClient();
|
|
106
|
+
const working = createClient();
|
|
107
|
+
const edits: LSP.TextEdit[] = [
|
|
108
|
+
{
|
|
109
|
+
range: {
|
|
110
|
+
start: { line: 0, character: 0 },
|
|
111
|
+
end: { line: 0, character: 1 },
|
|
112
|
+
},
|
|
113
|
+
newText: "ok",
|
|
114
|
+
},
|
|
115
|
+
];
|
|
116
|
+
failing.textDocumentWillSaveWaitUntil.mockRejectedValue(
|
|
117
|
+
new Error("server exploded"),
|
|
118
|
+
);
|
|
119
|
+
working.textDocumentWillSaveWaitUntil.mockResolvedValue(edits);
|
|
120
|
+
const client = new FederatedLanguageServerClient([failing, working]);
|
|
121
|
+
|
|
122
|
+
await expect(
|
|
123
|
+
client.textDocumentWillSaveWaitUntil({
|
|
124
|
+
textDocument: { uri: "file:///notebook.py" },
|
|
125
|
+
reason: 1,
|
|
126
|
+
}),
|
|
127
|
+
).resolves.toEqual(edits);
|
|
128
|
+
});
|
|
129
|
+
|
|
130
|
+
it("fans out document lifecycle and save notifications", async () => {
|
|
131
|
+
const first = createClient();
|
|
132
|
+
const second = createClient();
|
|
133
|
+
second.textDocumentDidOpen.mockResolvedValue(true);
|
|
134
|
+
const client = new FederatedLanguageServerClient([first, second]);
|
|
135
|
+
const openParams: LSP.DidOpenTextDocumentParams = {
|
|
136
|
+
textDocument: {
|
|
137
|
+
uri: "file:///notebook.py",
|
|
138
|
+
languageId: "python",
|
|
139
|
+
version: 1,
|
|
140
|
+
text: "value = 1",
|
|
141
|
+
},
|
|
142
|
+
};
|
|
143
|
+
const closeParams: LSP.DidCloseTextDocumentParams = {
|
|
144
|
+
textDocument: { uri: "file:///notebook.py" },
|
|
145
|
+
};
|
|
146
|
+
const saveParams: LSP.DidSaveTextDocumentParams = {
|
|
147
|
+
textDocument: { uri: "file:///notebook.py" },
|
|
148
|
+
text: "value = 1",
|
|
149
|
+
};
|
|
150
|
+
|
|
151
|
+
await expect(client.textDocumentDidOpen(openParams)).resolves.toBe(true);
|
|
152
|
+
await client.textDocumentDidClose(closeParams);
|
|
153
|
+
await client.textDocumentDidSave(saveParams);
|
|
154
|
+
|
|
155
|
+
for (const child of [first, second]) {
|
|
156
|
+
expect(child.textDocumentDidOpen).toHaveBeenCalledWith(openParams);
|
|
157
|
+
expect(child.textDocumentDidClose).toHaveBeenCalledWith(closeParams);
|
|
158
|
+
expect(child.textDocumentDidSave).toHaveBeenCalledWith(saveParams);
|
|
159
|
+
}
|
|
160
|
+
});
|
|
161
|
+
});
|