@marimo-team/frontend 0.23.16-dev4 → 0.23.16-dev41
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-C6Cj3oJc.js} +1 -1
- package/dist/assets/{ConnectedDataExplorerComponent-DI7mV-Gw.js → ConnectedDataExplorerComponent-CMaZapRd.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-CkCD-FgM.js → JsonOutput-CyzvjIjx.js} +12 -12
- package/dist/assets/{LazyAnyLanguageCodeMirror-sVm_hz8A.js → LazyAnyLanguageCodeMirror-B2JvSXP-.js} +2 -2
- package/dist/assets/{MarimoErrorOutput-DO2k2fA5.js → MarimoErrorOutput-CIuzXFFo.js} +4 -4
- package/dist/assets/{RSPContexts-CgC81f0I.js → RSPContexts-WiCgGm__.js} +1 -1
- package/dist/assets/RenderHTML-Cd-PP5ZR.js +1 -0
- package/dist/assets/{RunButton-BKRupqr7.js → RunButton-CnYWedW4.js} +1 -1
- package/dist/assets/{add-cell-with-ai-CEZtaZCK.js → add-cell-with-ai-ByOBQT99.js} +8 -8
- package/dist/assets/add-connection-dialog-C97ylgk0.js +170 -0
- package/dist/assets/{agent-panel-CHB6t7Zy.js → agent-panel-Dxo9WUKV.js} +5 -5
- package/dist/assets/ai-model-dropdown-Bvqy98cI.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--tRHs8C_.js} +1 -1
- package/dist/assets/{app-config-button-NrM9ywXA.js → app-config-button-v1lG63C2.js} +1 -1
- package/dist/assets/{button-eIihcbUw.js → button-DDGiD1NW.js} +1 -1
- package/dist/assets/{cache-panel-wllSTlbM.js → cache-panel-DcQUeUpg.js} +1 -1
- package/dist/assets/{capabilities-B09j1Eor.js → capabilities-DoEg0XwL.js} +1 -1
- package/dist/assets/{cell-editor-B5JVq7_q.js → cell-editor-BKrHbyX_.js} +16 -16
- package/dist/assets/cell-link-w5IbCQV4.js +1 -0
- package/dist/assets/cells-DzyDERZy.js +235 -0
- package/dist/assets/{chat-display-BG08ltQ3.js → chat-display-Ccgk4vbE.js} +1 -1
- package/dist/assets/{chat-panel-P2CzCtXJ.js → chat-panel--53TIc3t.js} +4 -4
- package/dist/assets/{chat-ui-fAJZAoTD.js → chat-ui-B5rBxgsw.js} +4 -4
- package/dist/assets/{column-preview-Dne1dIt0.js → column-preview-Cb8R9kfl.js} +1 -1
- package/dist/assets/{command-CAJLPEBq.js → command-Dqxie4gq.js} +1 -1
- package/dist/assets/{command-palette-iOCqUIs1.js → command-palette-B1S9PjZi.js} +1 -1
- package/dist/assets/{common-CD6Mj8n6.js → common-CJ3baa6D.js} +1 -1
- package/dist/assets/components-DpUIWGaj.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/{createReducer-C7kZ8zEe.js → createReducer-DGx5Af-C.js} +1 -1
- package/dist/assets/{datasource-ySAiC9gr.js → datasource-D_VcQMEn.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-DY5lvPDx.js} +3 -3
- package/dist/assets/{dialog-D1DEsRZ2.js → dialog-BCVepWLJ.js} +1 -1
- package/dist/assets/{dist-ByVeMWkr.js → dist-BLN8PNJV.js} +1 -1
- package/dist/assets/dist-CiVShZKM.js +2 -0
- package/dist/assets/{documentation-panel-e9Fi9R7e.js → documentation-panel-CGhwxsXK.js} +1 -1
- package/dist/assets/download-DpS57jyt.js +9 -0
- package/dist/assets/{dropdown-menu-BFZLnWeO.js → dropdown-menu-dHmZR8bI.js} +1 -1
- package/dist/assets/{edit-page-7X3HYey7.js → edit-page-DA765yQV.js} +6 -6
- package/dist/assets/{error-banner-B6eIlxzg.js → error-banner-BSxEOIn2.js} +1 -1
- package/dist/assets/error-entries-CTYMwfsh.js +8 -0
- package/dist/assets/{error-panel-DdsUL6b7.js → error-panel-DGAkG5kW.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/{field-BeZbVzXA.js → field-BsxD35VE.js} +1 -1
- package/dist/assets/{file-explorer-panel-Ntq1-VbF.js → file-explorer-panel-BKUo-MDh.js} +3 -3
- package/dist/assets/{file-icons-Cb54mIL8.js → file-icons-DfWENcb8.js} +1 -1
- package/dist/assets/{file-name-input-BWFcK1ey.js → file-name-input-CNVZtm5K.js} +1 -1
- package/dist/assets/floating-outline-LitP0wCD.js +1 -0
- package/dist/assets/focus-CNKbm-Xz.js +1 -0
- package/dist/assets/{form-B6BkSCJb.js → form-nHzLTU1m.js} +2 -2
- package/dist/assets/{formats-ClEFGPy-.js → formats-DzmLpc9A.js} +1 -1
- package/dist/assets/{formatting-B_41gSF5.js → formatting-CDf6w1Kt.js} +1 -1
- package/dist/assets/{fullscreen-dUjPYOmm.js → fullscreen-CTDqNQr6.js} +1 -1
- package/dist/assets/{gallery-page-CWQQAYpa.js → gallery-page-CJ3ms1Hn.js} +1 -1
- package/dist/assets/{glide-data-editor-lMARFWHS.js → glide-data-editor-j2igs9Y_.js} +1 -1
- package/dist/assets/home-page-DM9Z_IJ7.js +4 -0
- package/dist/assets/{html-to-image-CwmX28T9.js → html-to-image-JaxFFZcr.js} +2 -2
- package/dist/assets/index-C7_REKh1.js +38 -0
- package/dist/assets/index-D6Dp_PFj.css +2 -0
- package/dist/assets/{input-CqrUjynb.js → input-JxFwu-3G.js} +1 -1
- package/dist/assets/kiosk-mode-BumOFEtY.js +1 -0
- package/dist/assets/{label-BElwWzf0.js → label-CqjrpwRC.js} +1 -1
- package/dist/assets/{layout-CUlZijwG.js → layout-B29hqiiK.js} +5 -5
- package/dist/assets/{links-CToBjIIj.js → links-CZr5bjvo.js} +1 -1
- package/dist/assets/logs-panel-CQRPYS8j.js +1 -0
- package/dist/assets/{markdown-renderer-QvXG0CRk.js → markdown-renderer-sEayY9-m.js} +2 -2
- package/dist/assets/{menu-items-DbSLBfXR.js → menu-items-CCi6aOPm.js} +1 -1
- package/dist/assets/{mermaid-Bh0flEIb.js → mermaid-CYN0wOyG.js} +1 -1
- package/dist/assets/{name-cell-input-C6cukQ9k.js → name-cell-input-B-aj1KH3.js} +1 -1
- package/dist/assets/node-sql-parser-Si4oZ2P-.js +68 -0
- package/dist/assets/{numbers-CeeaFKqu.js → numbers-rmawRqQP.js} +1 -1
- package/dist/assets/{outline-panel-BPlg9_CE.js → outline-panel-BOryk60D.js} +1 -1
- package/dist/assets/{packages-panel-BzQF60rG.js → packages-panel-DoYDLty3.js} +1 -1
- package/dist/assets/pair-with-agent-modal-BCRSACei.js +4 -0
- package/dist/assets/panels-Bb4fIHgH.js +4 -0
- package/dist/assets/{popover-DrHQ3KEt.js → popover-Bcz1Zikb.js} +1 -1
- package/dist/assets/process-output-d-LEMtGI.js +1 -0
- package/dist/assets/{radio-group-CLBjGkt5.js → radio-group-DfioQthW.js} +1 -1
- package/dist/assets/{readonly-code-display-D63oRtBP.js → readonly-code-display-C9fu8tvK.js} +1 -1
- package/dist/assets/{readonly-python-code-CW_G5e4E.js → readonly-python-code-DHxOnQGj.js} +1 -1
- package/dist/assets/{renderShortcut-BZLr8D7H.js → renderShortcut-Bl8_FVn8.js} +1 -1
- package/dist/assets/{reveal-component-BLMTmd8T.js → reveal-component-5jf0W625.js} +60 -60
- package/dist/assets/{run-page-B6pgDYEJ.js → run-page-BMKx9ld_.js} +1 -1
- package/dist/assets/{runs-D51Xwrsk.js → runs-DBTXqJHS.js} +1 -1
- package/dist/assets/scratchpad-panel-C8z8vzBX.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-6J6wcuVR.js} +1 -1
- package/dist/assets/{select-B5TFNjmU.js → select-BP75_5jJ.js} +1 -1
- package/dist/assets/{session-CEFnN9Cq.js → session-BmukRjSi.js} +1 -1
- package/dist/assets/{session-panel-Y0Oon0sD.js → session-panel-BVVk-02h.js} +1 -1
- package/dist/assets/{share-CYpcX4N4.js → share-852X_cqy.js} +1 -1
- package/dist/assets/{skeleton-D3QPxqWC.js → skeleton-Bubr9pIj.js} +1 -1
- package/dist/assets/slides-DkEgzTJB.css +1 -0
- package/dist/assets/{snippets-panel-CXpGflMO.js → snippets-panel-U2-iok-c.js} +1 -1
- package/dist/assets/{spec-CzqcmYQk.js → spec-C7opZZRp.js} +1 -1
- package/dist/assets/{state-BvdK8eiw.js → state-D10U2MwA.js} +1 -1
- package/dist/assets/{state-WBgc7MiA.js → state-DDag0B_B.js} +1 -1
- package/dist/assets/state-DtziTd1T.js +3 -0
- package/dist/assets/{state-DBzEQtWz.js → state-DxQhUsG9.js} +1 -1
- package/dist/assets/{strings-Djnbwmfl.js → strings--BknHX9C.js} +1 -1
- package/dist/assets/{swiper-component-DInvCxhI.js → swiper-component-g8EXE911.js} +1 -1
- package/dist/assets/switch-OVajJBPR.js +1 -0
- package/dist/assets/{terminal-D3IQBBYo.js → terminal-217O8hlZ.js} +1 -1
- package/dist/assets/{textarea-CpFfEUet.js → textarea-Bmzmbbpo.js} +1 -1
- 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-B5XFvMmV.js} +1 -1
- package/dist/assets/{tracing-panel-BU-o_LCd.js → tracing-panel-DnR2bYDe.js} +2 -2
- package/dist/assets/{tree-actions-CsC2XmGo.js → tree-actions-Dx9CDaxV.js} +1 -1
- package/dist/assets/{useBoolean-D89u30n-.js → useBoolean-CFj86iac.js} +1 -1
- package/dist/assets/useCellActionButton-DypR3yDt.js +1 -0
- package/dist/assets/{useDeleteCell-EPH4kcG7.js → useDeleteCell-vMXAr3rY.js} +1 -1
- package/dist/assets/{useDependencyPanelTab-CZnK7N2L.js → useDependencyPanelTab-CwdwKf7A.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-CWBTUy5W.js} +1 -1
- package/dist/assets/useNotebookActions-jWIcmpv0.js +12 -0
- package/dist/assets/{useRunCells-CSSF_mJ0.js → useRunCells-C2dvU2jA.js} +1 -1
- package/dist/assets/{useSplitCell-9Qz93yPZ.js → useSplitCell-C1tubdNi.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/{vega-component-Cie3ag_T.js → vega-component-Db8KjZJG.js} +1 -1
- package/dist/assets/{write-secret-modal-DEEn7sZV.js → write-secret-modal-3-v-dHVj.js} +1 -1
- package/dist/index.html +68 -68
- 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/actions/__tests__/pair-with-agent-commands.test.ts +99 -18
- package/src/components/editor/actions/__tests__/pdf-export.test.ts +0 -4
- 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 +1 -4
- package/src/components/editor/actions/useNotebookActions.tsx +7 -13
- 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/connections/storage/__tests__/__snapshots__/as-code.test.ts.snap +50 -0
- package/src/components/editor/connections/storage/__tests__/as-code.test.ts +87 -8
- package/src/components/editor/connections/storage/as-code.ts +40 -21
- package/src/components/editor/connections/storage/schemas.ts +83 -42
- package/src/components/editor/renderers/vertical-layout/vertical-layout.tsx +1 -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/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/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__/download.test.tsx +24 -1
- package/src/utils/download.ts +11 -6
- 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/cell-link-DqBkyAFe.js +0 -1
- package/dist/assets/cells-Cf7bHHq3.js +0 -229
- package/dist/assets/components-BH6gDVv6.js +0 -1
- package/dist/assets/config-BbOTTCYY.js +0 -1
- package/dist/assets/dist-BCMBu0rO.js +0 -2
- package/dist/assets/download-BomYt3nl.js +0 -9
- package/dist/assets/error-entries-Birw-8VX.js +0 -8
- package/dist/assets/floating-outline-wz-WSRgP.js +0 -1
- package/dist/assets/focus-DiEyfiAG.js +0 -1
- package/dist/assets/home-page-DJ4jJsZj.js +0 -4
- package/dist/assets/index-A71LAt6h.css +0 -2
- package/dist/assets/index-CMZzy-dF.js +0 -38
- package/dist/assets/kiosk-mode-ABm3oYgq.js +0 -1
- package/dist/assets/logs-panel-iFV4ZJ9b.js +0 -1
- package/dist/assets/node-sql-parser-BWgUjcfV.js +0 -68
- package/dist/assets/pair-with-agent-modal-CKOYwOYw.js +0 -4
- package/dist/assets/panels-Dj45fW-v.js +0 -4
- package/dist/assets/process-output-BEhIGfkO.js +0 -1
- package/dist/assets/scratchpad-panel-B0mEqBNk.js +0 -1
- package/dist/assets/slides-MCbMDtlY.css +0 -1
- package/dist/assets/state-BZQc7xxL.js +0 -3
- package/dist/assets/switch-CvweaCXq.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
|
@@ -1,28 +1,81 @@
|
|
|
1
1
|
/* Copyright 2026 Marimo. All rights reserved. */
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
import type {
|
|
3
|
+
JSONRPCMessage,
|
|
4
|
+
JSONRPCNotification,
|
|
5
|
+
JSONRPCRequest,
|
|
6
|
+
Transport,
|
|
7
|
+
} from "@marimo-team/codemirror-languageserver";
|
|
5
8
|
import { beforeEach, describe, expect, it, vi } from "vitest";
|
|
9
|
+
import { store } from "@/core/state/jotai";
|
|
6
10
|
import { CopilotLanguageServerClient } from "../language-server";
|
|
11
|
+
import { copilotStatusState } from "../state";
|
|
12
|
+
|
|
13
|
+
const copilotState = vi.hoisted(() => ({ isEnabled: true }));
|
|
14
|
+
|
|
15
|
+
vi.mock("../state", async (importOriginal) => {
|
|
16
|
+
const actual = await importOriginal<typeof import("../state")>();
|
|
17
|
+
return {
|
|
18
|
+
...actual,
|
|
19
|
+
isCopilotEnabled: () => copilotState.isEnabled,
|
|
20
|
+
};
|
|
21
|
+
});
|
|
22
|
+
|
|
23
|
+
class MockTransport implements Transport {
|
|
24
|
+
private readonly handlers = new Set<(message: JSONRPCMessage) => void>();
|
|
25
|
+
readonly sent: JSONRPCMessage[] = [];
|
|
26
|
+
|
|
27
|
+
connect = vi.fn().mockResolvedValue(undefined);
|
|
28
|
+
close = vi.fn();
|
|
29
|
+
send = vi.fn((message: JSONRPCMessage) => {
|
|
30
|
+
this.sent.push(message);
|
|
31
|
+
if (isRequest(message) && message.method === "initialize") {
|
|
32
|
+
queueMicrotask(() => {
|
|
33
|
+
this.emit({
|
|
34
|
+
jsonrpc: "2.0",
|
|
35
|
+
id: message.id,
|
|
36
|
+
result: { capabilities: {} },
|
|
37
|
+
});
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
});
|
|
41
|
+
|
|
42
|
+
onMessage(handler: (message: JSONRPCMessage) => void): () => void {
|
|
43
|
+
this.handlers.add(handler);
|
|
44
|
+
return () => {
|
|
45
|
+
this.handlers.delete(handler);
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
emit(message: JSONRPCMessage) {
|
|
50
|
+
for (const handler of this.handlers) {
|
|
51
|
+
handler(message);
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
}
|
|
7
55
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
56
|
+
function isRequest(message: JSONRPCMessage): message is JSONRPCRequest {
|
|
57
|
+
return "method" in message && "id" in message;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
function notifications(
|
|
61
|
+
transport: MockTransport,
|
|
62
|
+
method: string,
|
|
63
|
+
): JSONRPCNotification[] {
|
|
64
|
+
return transport.sent.filter(
|
|
65
|
+
(message): message is JSONRPCNotification =>
|
|
66
|
+
"method" in message && !("id" in message) && message.method === method,
|
|
67
|
+
);
|
|
16
68
|
}
|
|
17
69
|
|
|
18
70
|
describe("CopilotLanguageServerClient", () => {
|
|
19
71
|
let mockTransport: MockTransport;
|
|
20
72
|
|
|
21
73
|
beforeEach(() => {
|
|
74
|
+
copilotState.isEnabled = true;
|
|
22
75
|
mockTransport = new MockTransport();
|
|
23
76
|
});
|
|
24
77
|
|
|
25
|
-
it("
|
|
78
|
+
it("initializes without copilot settings", () => {
|
|
26
79
|
const client = new CopilotLanguageServerClient({
|
|
27
80
|
rootUri: "file:///test",
|
|
28
81
|
workspaceFolders: null,
|
|
@@ -32,178 +85,421 @@ describe("CopilotLanguageServerClient", () => {
|
|
|
32
85
|
expect(client).toBeDefined();
|
|
33
86
|
});
|
|
34
87
|
|
|
35
|
-
it("
|
|
88
|
+
it("initializes with copilot settings", () => {
|
|
36
89
|
const client = new CopilotLanguageServerClient({
|
|
37
90
|
rootUri: "file:///test",
|
|
38
91
|
workspaceFolders: null,
|
|
39
92
|
transport: mockTransport,
|
|
40
|
-
copilotSettings: {
|
|
93
|
+
copilotSettings: {
|
|
94
|
+
http: {
|
|
95
|
+
proxy: "http://proxy.example.com:8888",
|
|
96
|
+
proxyStrictSSL: true,
|
|
97
|
+
},
|
|
98
|
+
telemetry: {
|
|
99
|
+
telemetryLevel: "off",
|
|
100
|
+
},
|
|
101
|
+
},
|
|
41
102
|
});
|
|
42
103
|
|
|
43
104
|
expect(client).toBeDefined();
|
|
44
105
|
});
|
|
45
106
|
|
|
46
|
-
it("
|
|
107
|
+
it("sends configuration after initialization", async () => {
|
|
47
108
|
const copilotSettings = {
|
|
48
109
|
http: {
|
|
49
110
|
proxy: "http://proxy.example.com:8888",
|
|
50
111
|
proxyStrictSSL: true,
|
|
51
112
|
},
|
|
52
|
-
telemetry: {
|
|
53
|
-
telemetryLevel: "off",
|
|
54
|
-
},
|
|
55
113
|
};
|
|
56
|
-
|
|
57
114
|
const client = new CopilotLanguageServerClient({
|
|
58
115
|
rootUri: "file:///test",
|
|
59
116
|
workspaceFolders: null,
|
|
60
117
|
transport: mockTransport,
|
|
61
118
|
copilotSettings,
|
|
62
119
|
});
|
|
63
|
-
|
|
64
|
-
|
|
120
|
+
await client.initializePromise;
|
|
121
|
+
await vi.waitFor(() => {
|
|
122
|
+
expect(
|
|
123
|
+
notifications(mockTransport, "workspace/didChangeConfiguration"),
|
|
124
|
+
).toEqual([
|
|
125
|
+
{
|
|
126
|
+
jsonrpc: "2.0",
|
|
127
|
+
method: "workspace/didChangeConfiguration",
|
|
128
|
+
params: { settings: copilotSettings },
|
|
129
|
+
},
|
|
130
|
+
]);
|
|
131
|
+
});
|
|
65
132
|
});
|
|
66
133
|
|
|
67
|
-
it(
|
|
134
|
+
it.each([
|
|
135
|
+
["empty", {}],
|
|
136
|
+
["omitted", undefined],
|
|
137
|
+
])(
|
|
138
|
+
"does not send configuration when settings are %s",
|
|
139
|
+
async (_, copilotSettings) => {
|
|
140
|
+
const client = new CopilotLanguageServerClient({
|
|
141
|
+
rootUri: "file:///test",
|
|
142
|
+
workspaceFolders: null,
|
|
143
|
+
transport: mockTransport,
|
|
144
|
+
copilotSettings,
|
|
145
|
+
});
|
|
146
|
+
await client.initializePromise;
|
|
147
|
+
await new Promise((resolve) => setTimeout(resolve, 0));
|
|
148
|
+
|
|
149
|
+
expect(
|
|
150
|
+
notifications(mockTransport, "workspace/didChangeConfiguration"),
|
|
151
|
+
).toEqual([]);
|
|
152
|
+
},
|
|
153
|
+
);
|
|
154
|
+
|
|
155
|
+
it("accepts enterprise, proxy, and telemetry settings together", async () => {
|
|
68
156
|
const copilotSettings = {
|
|
69
157
|
http: {
|
|
70
158
|
proxy: "http://proxy.example.com:8888",
|
|
71
159
|
proxyStrictSSL: true,
|
|
160
|
+
proxyKerberosServicePrincipal: "HTTP/proxy.example.com",
|
|
161
|
+
},
|
|
162
|
+
telemetry: {
|
|
163
|
+
telemetryLevel: "all",
|
|
164
|
+
},
|
|
165
|
+
"github-enterprise": {
|
|
166
|
+
uri: "https://github.enterprise.com",
|
|
72
167
|
},
|
|
73
168
|
};
|
|
74
|
-
|
|
75
169
|
const client = new CopilotLanguageServerClient({
|
|
76
170
|
rootUri: "file:///test",
|
|
77
171
|
workspaceFolders: null,
|
|
78
172
|
transport: mockTransport,
|
|
79
173
|
copilotSettings,
|
|
80
174
|
});
|
|
81
|
-
|
|
82
|
-
// Spy on the notify method
|
|
83
|
-
const notifySpy = vi.spyOn(client as any, "notify");
|
|
84
|
-
|
|
85
|
-
// Wait for initialization
|
|
86
175
|
await client.initializePromise;
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
176
|
+
await vi.waitFor(() => {
|
|
177
|
+
expect(
|
|
178
|
+
notifications(mockTransport, "workspace/didChangeConfiguration"),
|
|
179
|
+
).toEqual([
|
|
180
|
+
{
|
|
181
|
+
jsonrpc: "2.0",
|
|
182
|
+
method: "workspace/didChangeConfiguration",
|
|
183
|
+
params: { settings: copilotSettings },
|
|
184
|
+
},
|
|
185
|
+
]);
|
|
94
186
|
});
|
|
95
187
|
});
|
|
96
188
|
|
|
97
|
-
it("
|
|
189
|
+
it("reopens the latest Copilot document after re-initialization", async () => {
|
|
98
190
|
const client = new CopilotLanguageServerClient({
|
|
99
191
|
rootUri: "file:///test",
|
|
100
192
|
workspaceFolders: null,
|
|
101
193
|
transport: mockTransport,
|
|
102
|
-
copilotSettings: {},
|
|
103
194
|
});
|
|
195
|
+
await client.initializePromise;
|
|
196
|
+
await client.textDocumentDidOpen({
|
|
197
|
+
textDocument: {
|
|
198
|
+
uri: "file:///test.py",
|
|
199
|
+
languageId: "python",
|
|
200
|
+
version: 0,
|
|
201
|
+
text: "initial",
|
|
202
|
+
},
|
|
203
|
+
});
|
|
204
|
+
await client.textDocumentDidChange({
|
|
205
|
+
textDocument: { uri: "file:///test.py", version: 1 },
|
|
206
|
+
contentChanges: [{ text: "updated" }],
|
|
207
|
+
});
|
|
208
|
+
mockTransport.sent.length = 0;
|
|
209
|
+
|
|
210
|
+
await client.reInitialize();
|
|
211
|
+
|
|
212
|
+
expect(notifications(mockTransport, "textDocument/didOpen")).toEqual([
|
|
213
|
+
{
|
|
214
|
+
jsonrpc: "2.0",
|
|
215
|
+
method: "textDocument/didOpen",
|
|
216
|
+
params: {
|
|
217
|
+
textDocument: {
|
|
218
|
+
uri: "file:///test.py",
|
|
219
|
+
languageId: "python",
|
|
220
|
+
version: 1,
|
|
221
|
+
text: "updated",
|
|
222
|
+
},
|
|
223
|
+
},
|
|
224
|
+
},
|
|
225
|
+
]);
|
|
226
|
+
});
|
|
104
227
|
|
|
105
|
-
|
|
106
|
-
const
|
|
228
|
+
it("reopens the document with the languageId it was opened with", async () => {
|
|
229
|
+
const client = new CopilotLanguageServerClient({
|
|
230
|
+
rootUri: "file:///test",
|
|
231
|
+
workspaceFolders: null,
|
|
232
|
+
transport: mockTransport,
|
|
233
|
+
});
|
|
234
|
+
await client.initializePromise;
|
|
235
|
+
// The Copilot plugin opens as "copilot", not "python"
|
|
236
|
+
await client.textDocumentDidOpen({
|
|
237
|
+
textDocument: {
|
|
238
|
+
uri: "file:///test.py",
|
|
239
|
+
languageId: "copilot",
|
|
240
|
+
version: 0,
|
|
241
|
+
text: "initial",
|
|
242
|
+
},
|
|
243
|
+
});
|
|
244
|
+
await client.textDocumentDidChange({
|
|
245
|
+
textDocument: { uri: "file:///test.py", version: 1 },
|
|
246
|
+
contentChanges: [{ text: "updated" }],
|
|
247
|
+
});
|
|
248
|
+
mockTransport.sent.length = 0;
|
|
249
|
+
|
|
250
|
+
await client.reInitialize();
|
|
251
|
+
|
|
252
|
+
expect(notifications(mockTransport, "textDocument/didOpen")).toEqual([
|
|
253
|
+
{
|
|
254
|
+
jsonrpc: "2.0",
|
|
255
|
+
method: "textDocument/didOpen",
|
|
256
|
+
params: {
|
|
257
|
+
textDocument: {
|
|
258
|
+
uri: "file:///test.py",
|
|
259
|
+
languageId: "copilot",
|
|
260
|
+
version: 1,
|
|
261
|
+
text: "updated",
|
|
262
|
+
},
|
|
263
|
+
},
|
|
264
|
+
},
|
|
265
|
+
]);
|
|
266
|
+
});
|
|
107
267
|
|
|
108
|
-
|
|
268
|
+
it("ignores an empty didChange without corrupting document state", async () => {
|
|
269
|
+
const client = new CopilotLanguageServerClient({
|
|
270
|
+
rootUri: "file:///test",
|
|
271
|
+
workspaceFolders: null,
|
|
272
|
+
transport: mockTransport,
|
|
273
|
+
});
|
|
109
274
|
await client.initializePromise;
|
|
275
|
+
mockTransport.sent.length = 0;
|
|
110
276
|
|
|
111
|
-
|
|
112
|
-
|
|
277
|
+
await expect(
|
|
278
|
+
client.textDocumentDidChange({
|
|
279
|
+
textDocument: { uri: "file:///test.py", version: 1 },
|
|
280
|
+
contentChanges: [],
|
|
281
|
+
}),
|
|
282
|
+
).resolves.toBeUndefined();
|
|
113
283
|
|
|
114
|
-
|
|
115
|
-
expect(
|
|
116
|
-
"workspace/didChangeConfiguration",
|
|
117
|
-
expect.anything(),
|
|
118
|
-
);
|
|
284
|
+
expect(notifications(mockTransport, "textDocument/didOpen")).toEqual([]);
|
|
285
|
+
expect(notifications(mockTransport, "textDocument/didChange")).toEqual([]);
|
|
119
286
|
});
|
|
120
287
|
|
|
121
|
-
it("
|
|
288
|
+
it("balances document references when Copilot is disabled before close", async () => {
|
|
122
289
|
const client = new CopilotLanguageServerClient({
|
|
123
290
|
rootUri: "file:///test",
|
|
124
291
|
workspaceFolders: null,
|
|
125
292
|
transport: mockTransport,
|
|
126
293
|
});
|
|
127
|
-
|
|
128
|
-
// Spy on the notify method
|
|
129
|
-
const notifySpy = vi.spyOn(client as any, "notify");
|
|
130
|
-
|
|
131
|
-
// Wait for initialization
|
|
132
294
|
await client.initializePromise;
|
|
295
|
+
await client.textDocumentDidOpen({
|
|
296
|
+
textDocument: {
|
|
297
|
+
uri: "file:///test.py",
|
|
298
|
+
languageId: "python",
|
|
299
|
+
version: 7,
|
|
300
|
+
text: "value = 1",
|
|
301
|
+
},
|
|
302
|
+
});
|
|
133
303
|
|
|
134
|
-
|
|
135
|
-
await
|
|
304
|
+
copilotState.isEnabled = false;
|
|
305
|
+
await client.textDocumentDidClose({
|
|
306
|
+
textDocument: { uri: "file:///test.py" },
|
|
307
|
+
});
|
|
308
|
+
copilotState.isEnabled = true;
|
|
309
|
+
mockTransport.sent.length = 0;
|
|
310
|
+
await client.reInitialize();
|
|
136
311
|
|
|
137
|
-
|
|
138
|
-
expect(notifySpy).not.toHaveBeenCalledWith(
|
|
139
|
-
"workspace/didChangeConfiguration",
|
|
140
|
-
expect.anything(),
|
|
141
|
-
);
|
|
312
|
+
expect(notifications(mockTransport, "textDocument/didOpen")).toEqual([]);
|
|
142
313
|
});
|
|
143
314
|
|
|
144
|
-
it("
|
|
145
|
-
const copilotSettings = {
|
|
146
|
-
"github-enterprise": {
|
|
147
|
-
uri: "https://github.enterprise.com",
|
|
148
|
-
},
|
|
149
|
-
};
|
|
150
|
-
|
|
315
|
+
it("does not close the shared document until the last mounted editor closes it (relies on base client's own refcounting)", async () => {
|
|
151
316
|
const client = new CopilotLanguageServerClient({
|
|
152
317
|
rootUri: "file:///test",
|
|
153
318
|
workspaceFolders: null,
|
|
154
319
|
transport: mockTransport,
|
|
155
|
-
copilotSettings,
|
|
156
320
|
});
|
|
157
|
-
|
|
158
|
-
// Spy on the notify method
|
|
159
|
-
const notifySpy = vi.spyOn(client as any, "notify");
|
|
160
|
-
|
|
161
|
-
// Wait for initialization
|
|
162
321
|
await client.initializePromise;
|
|
163
322
|
|
|
164
|
-
//
|
|
165
|
-
|
|
323
|
+
// Two editors (e.g. two visible cells) share this client and both open
|
|
324
|
+
// the same document.
|
|
325
|
+
await client.textDocumentDidOpen({
|
|
326
|
+
textDocument: {
|
|
327
|
+
uri: "file:///test.py",
|
|
328
|
+
languageId: "python",
|
|
329
|
+
version: 1,
|
|
330
|
+
text: "value = 1",
|
|
331
|
+
},
|
|
332
|
+
});
|
|
333
|
+
await client.textDocumentDidOpen({
|
|
334
|
+
textDocument: {
|
|
335
|
+
uri: "file:///test.py",
|
|
336
|
+
languageId: "python",
|
|
337
|
+
version: 1,
|
|
338
|
+
text: "value = 1",
|
|
339
|
+
},
|
|
340
|
+
});
|
|
341
|
+
mockTransport.sent.length = 0;
|
|
166
342
|
|
|
167
|
-
//
|
|
168
|
-
|
|
169
|
-
|
|
343
|
+
// Closing the first editor must not close the shared document while the
|
|
344
|
+
// second editor is still mounted.
|
|
345
|
+
await client.textDocumentDidClose({
|
|
346
|
+
textDocument: { uri: "file:///test.py" },
|
|
170
347
|
});
|
|
171
|
-
|
|
348
|
+
expect(notifications(mockTransport, "textDocument/didClose")).toEqual([]);
|
|
172
349
|
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
350
|
+
// Closing the last editor closes the document for real.
|
|
351
|
+
await client.textDocumentDidClose({
|
|
352
|
+
textDocument: { uri: "file:///test.py" },
|
|
353
|
+
});
|
|
354
|
+
expect(notifications(mockTransport, "textDocument/didClose")).toEqual([
|
|
355
|
+
{
|
|
356
|
+
jsonrpc: "2.0",
|
|
357
|
+
method: "textDocument/didClose",
|
|
358
|
+
params: { textDocument: { uri: "file:///test.py" } },
|
|
179
359
|
},
|
|
180
|
-
|
|
181
|
-
|
|
360
|
+
]);
|
|
361
|
+
});
|
|
362
|
+
|
|
363
|
+
it("keeps document versions monotonic after opening a versioned document", async () => {
|
|
364
|
+
const client = new CopilotLanguageServerClient({
|
|
365
|
+
rootUri: "file:///test",
|
|
366
|
+
workspaceFolders: null,
|
|
367
|
+
transport: mockTransport,
|
|
368
|
+
});
|
|
369
|
+
await client.initializePromise;
|
|
370
|
+
await client.textDocumentDidOpen({
|
|
371
|
+
textDocument: {
|
|
372
|
+
uri: "file:///test.py",
|
|
373
|
+
languageId: "python",
|
|
374
|
+
version: 7,
|
|
375
|
+
text: "value = 1",
|
|
182
376
|
},
|
|
183
|
-
|
|
184
|
-
|
|
377
|
+
});
|
|
378
|
+
mockTransport.sent.length = 0;
|
|
379
|
+
|
|
380
|
+
await client.textDocumentDidChange({
|
|
381
|
+
textDocument: { uri: "file:///test.py", version: 8 },
|
|
382
|
+
contentChanges: [{ text: "value = 2" }],
|
|
383
|
+
});
|
|
384
|
+
|
|
385
|
+
expect(notifications(mockTransport, "textDocument/didChange")).toEqual([
|
|
386
|
+
{
|
|
387
|
+
jsonrpc: "2.0",
|
|
388
|
+
method: "textDocument/didChange",
|
|
389
|
+
params: {
|
|
390
|
+
textDocument: { uri: "file:///test.py", version: 8 },
|
|
391
|
+
contentChanges: [{ text: "value = 2" }],
|
|
392
|
+
},
|
|
185
393
|
},
|
|
186
|
-
|
|
394
|
+
]);
|
|
395
|
+
});
|
|
187
396
|
|
|
397
|
+
it("ignores malformed custom notifications", async () => {
|
|
188
398
|
const client = new CopilotLanguageServerClient({
|
|
189
399
|
rootUri: "file:///test",
|
|
190
400
|
workspaceFolders: null,
|
|
191
401
|
transport: mockTransport,
|
|
192
|
-
copilotSettings,
|
|
193
402
|
});
|
|
403
|
+
await client.initializePromise;
|
|
194
404
|
|
|
195
|
-
|
|
196
|
-
|
|
405
|
+
expect(() => {
|
|
406
|
+
mockTransport.emit({
|
|
407
|
+
jsonrpc: "2.0",
|
|
408
|
+
method: "statusNotification",
|
|
409
|
+
params: { busy: "not-a-boolean" },
|
|
410
|
+
});
|
|
411
|
+
mockTransport.emit({
|
|
412
|
+
jsonrpc: "2.0",
|
|
413
|
+
method: "window/logMessage",
|
|
414
|
+
params: null,
|
|
415
|
+
});
|
|
416
|
+
}).not.toThrow();
|
|
417
|
+
});
|
|
197
418
|
|
|
198
|
-
|
|
199
|
-
|
|
419
|
+
describe("status notifications", () => {
|
|
420
|
+
beforeEach(() => {
|
|
421
|
+
store.set(copilotStatusState, {
|
|
422
|
+
busy: false,
|
|
423
|
+
kind: null,
|
|
424
|
+
message: null,
|
|
425
|
+
});
|
|
426
|
+
});
|
|
200
427
|
|
|
201
|
-
|
|
202
|
-
|
|
428
|
+
it.each([
|
|
429
|
+
[
|
|
430
|
+
"omitted message and unknown kind",
|
|
431
|
+
{ kind: "Inactive", busy: false },
|
|
432
|
+
{ busy: false, kind: "Inactive", message: null, status: undefined },
|
|
433
|
+
],
|
|
434
|
+
[
|
|
435
|
+
"omitted busy",
|
|
436
|
+
{ kind: "Error", message: "Not signed in" },
|
|
437
|
+
{
|
|
438
|
+
busy: false,
|
|
439
|
+
kind: "Error",
|
|
440
|
+
message: "Not signed in",
|
|
441
|
+
status: undefined,
|
|
442
|
+
},
|
|
443
|
+
],
|
|
444
|
+
[
|
|
445
|
+
"a fully populated payload",
|
|
446
|
+
{
|
|
447
|
+
busy: true,
|
|
448
|
+
kind: "Normal",
|
|
449
|
+
message: "Working",
|
|
450
|
+
status: "InProgress",
|
|
451
|
+
},
|
|
452
|
+
{
|
|
453
|
+
busy: true,
|
|
454
|
+
kind: "Normal",
|
|
455
|
+
message: "Working",
|
|
456
|
+
status: "InProgress",
|
|
457
|
+
},
|
|
458
|
+
],
|
|
459
|
+
[
|
|
460
|
+
"unusable field types",
|
|
461
|
+
{ busy: 1, kind: 2, message: 3, status: 4 },
|
|
462
|
+
{ busy: false, kind: null, message: null, status: undefined },
|
|
463
|
+
],
|
|
464
|
+
])(
|
|
465
|
+
"normalizes rather than discards a status update with %s",
|
|
466
|
+
async (_label, params, expected) => {
|
|
467
|
+
const client = new CopilotLanguageServerClient({
|
|
468
|
+
rootUri: "file:///test",
|
|
469
|
+
workspaceFolders: null,
|
|
470
|
+
transport: mockTransport,
|
|
471
|
+
});
|
|
472
|
+
await client.initializePromise;
|
|
473
|
+
|
|
474
|
+
mockTransport.emit({
|
|
475
|
+
jsonrpc: "2.0",
|
|
476
|
+
method: "didChangeStatus",
|
|
477
|
+
params,
|
|
478
|
+
});
|
|
479
|
+
|
|
480
|
+
expect(store.get(copilotStatusState)).toEqual(expected);
|
|
481
|
+
},
|
|
482
|
+
);
|
|
203
483
|
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
484
|
+
it("ignores a status update with non-object params", async () => {
|
|
485
|
+
const client = new CopilotLanguageServerClient({
|
|
486
|
+
rootUri: "file:///test",
|
|
487
|
+
workspaceFolders: null,
|
|
488
|
+
transport: mockTransport,
|
|
489
|
+
});
|
|
490
|
+
await client.initializePromise;
|
|
491
|
+
|
|
492
|
+
mockTransport.emit({
|
|
493
|
+
jsonrpc: "2.0",
|
|
494
|
+
method: "statusNotification",
|
|
495
|
+
params: "not-an-object",
|
|
496
|
+
});
|
|
497
|
+
|
|
498
|
+
expect(store.get(copilotStatusState)).toEqual({
|
|
499
|
+
busy: false,
|
|
500
|
+
kind: null,
|
|
501
|
+
message: null,
|
|
502
|
+
});
|
|
207
503
|
});
|
|
208
504
|
});
|
|
209
505
|
});
|