From 40a2ccb178f02fa36cc783730cff58b9caf408e4 Mon Sep 17 00:00:00 2001 From: Diego Colombo Date: Wed, 8 Feb 2023 00:19:56 +0000 Subject: [PATCH 1/3] rename folder workspace rename build build wip remove symlink contract generator rebase fix imports missing file build update --- .devcontainer/workspace.code-workspace | 16 +- DEVELOPER-GUIDE.md | 2 +- eng/build.ps1 | 20 +- eng/build.sh | 8 +- eng/package/PackNpmPackage.ps1 | 2 +- eng/package/PackVSCodeExtension.ps1 | 6 +- ...icrosoft.DotNet.Interactive.Browser.csproj | 2 +- .../src/dotnet-interactive | 1 - .../src/vscode-common | 1 - .../tests/vscode-common-tests | 1 - .../src/vscode-common | 1 - .../tests/vscode-common-tests | 1 - .../TypeScriptInterfacesContractTests.cs | 2 +- .../dotnet-interactive.csproj | 2 +- src/ensure-symlinks.ps1 | 16 +- .../src/dotnet-interactive | 1 - src/microsoft-dotnet-interactive/.gitignore | 3 - .../.gitignore | 2 +- .../.npmrc | 0 .../.vscode/extensions.json | 0 .../.vscode/settings.json | 0 .../package-lock.json | 0 .../package.json | 0 .../rollup.config.js | 0 .../src/clientFetch.ts | 0 .../src/index.ts | 4 +- .../src/kernel-client-impl.ts | 10 +- .../src/kernel-factory.ts | 4 +- .../src/library-init.ts | 2 +- .../src/polyglot-notebooks | 1 + .../src/polyglot-notebooks-interfaces.ts} | 6 +- .../src/signalr-client.ts | 4 +- .../testConfig.json | 0 .../tests/Responses/kernels-get-response.json | 0 .../Responses/variable-post-response.json | 0 .../tests/client.test.ts | 0 .../tests/kernel-client.test.ts | 8 +- .../tests/kernel-discovery-contract.test.ts | 0 .../tests/library-initialisation.test.ts | 0 .../tests/testSupport.ts | 8 +- .../tests/variable-api-contract.test.ts | 2 +- .../tsconfig.json | 0 .../wallaby.js | 0 .../src/DotnetInteractiveChannel.ts | 4 +- .../src/OutputChannelAdapter.ts | 0 .../src/acquisition.ts | 0 .../src/activeNotebookTracker.ts | 0 .../src/childProcessLineAdapter.ts | 0 .../src/clientMapper.ts | 4 +- .../src/commands.ts | 2 +- .../src/commonInterfaces.ts | 0 .../src/constants.ts | 44 +- .../src/diagnostics.ts | 0 .../src/documentSemanticTokenProvider.ts | 262 +-- .../dynamicGrammarSemanticTokenProvider.ts | 4 +- .../src/extension.ts | 6 +- .../src/helpService.ts | 56 +- .../src/interactiveClient.ts | 12 +- .../src/interactiveNotebook.ts | 2 +- .../src/interfaces.ts | 0 .../src/interfaces/utilities.ts | 2 +- .../src/interfaces/vscode-like.ts | 0 .../src/kernelInfoUpdaterService.ts | 4 +- .../src/kernelSelectorUtilities.ts | 4 +- .../src/languageConfigurationManager.ts | 0 .../src/languageProvider.ts | 0 .../src/languageServices/completion.ts | 2 +- .../src/languageServices/hover.ts | 0 .../src/languageServices/interfaces.ts | 2 +- .../src/languageServices/signatureHelp.ts | 2 +- .../src/lineReader.ts | 0 .../src/messageClient.ts | 0 .../src/metadataUtilities.ts | 6 +- .../src/notebookCellStatusBarItemProvider.ts | 216 +-- .../src/notebookParserServer.ts | 2 +- .../src/notebookWatcherService.ts | 2 +- .../src/polyglot-notebooks | 1 + .../src/serviceCollection.ts | 0 .../src/stdioDotnetInteractiveChannel.ts | 8 +- .../src/utilities.ts | 4 +- .../src/variableExplorer.ts | 412 ++--- .../src/vscodeUtilities.ts | 2 +- .../tests/RecordingOutputChannel.ts | 0 .../tests/acquisition.test.ts | 0 ...allbackTestTestDotnetInteractiveChannel.ts | 4 +- .../tests/client.test.ts | 2 +- ...ynamicGrammarSemanticTokenProvider.test.ts | 4 +- .../tests/kernelSelectorUtilities.test.ts | 4 +- .../tests/languageProvider.test.ts | 2 +- .../tests/lineReader.test.ts | 0 .../tests/messageClient.test.ts | 0 .../tests/metadataUtilities.test.ts | 6 +- .../tests/misc.test.ts | 2 +- .../tests/notebook.test.ts | 2 +- .../tests/testDotnetInteractiveChannel.ts | 4 +- .../tests/utilities.ts | 2 +- .../.eslintignore | 0 .../.eslintrc.json | 0 .../.gitignore | 0 .../.npmrc | 0 .../.vscode/extensions.json | 0 .../.vscode/launch.json | 0 .../.vscode/settings.json | 0 .../.vscode/tasks.json | 0 .../.vscodeignore | 0 .../License.txt | 0 .../README.md | 0 .../grammars/http.language-configuration.json | 0 .../grammars/http.tmGrammar.json | 0 .../grammars/kql.language-configuration.json | 0 .../grammars/kql.tmGrammar.json | 0 .../help/DotNetVersion.md | 12 +- .../images/icon.png | Bin .../package-lock.json | 0 .../package.json | 1554 ++++++++--------- .../resources/dark/restart-kernel.svg | 0 .../resources/icons/notebook.svg | 4 +- .../resources/light/restart-kernel.svg | 0 .../src/notebookControllers.ts | 8 +- .../src/notebookSerializers.ts | 2 +- .../src/ui | 0 .../src/versionSpecificFunctions.ts | 8 +- .../src/vscode-common | 1 + .../src/vscode.d.ts | 0 .../vscode.proposed.notebookMessaging.d.ts | 0 .../testConfig.json | 2 +- .../tests/vscode-common-tests | 1 + .../tools/buildSemanticTokenScopes.js | 0 .../tsconfig.json | 0 .../wallaby.js | 0 .../.eslintignore | 0 .../.eslintrc.json | 0 .../.gitignore | 0 .../.npmrc | 0 .../.vscode/extensions.json | 0 .../.vscode/launch.json | 0 .../.vscode/settings.json | 0 .../.vscode/tasks.json | 0 .../.vscodeignore | 0 .../DEVGUIDE.md | 4 +- .../License.txt | 0 .../README.md | 0 .../UPDATING-TO-NEW-VERSION-OF-STABLE.md | 4 +- .../do-version-upgrade.ps1 | 0 .../grammars/http.language-configuration.json | 0 .../grammars/http.tmGrammar.json | 0 .../grammars/kql.language-configuration.json | 0 .../grammars/kql.tmGrammar.json | 0 .../help/DotNetVersion.md | 12 +- .../images/icon.png | Bin .../package-lock.json | 2 +- .../package.json | 1550 ++++++++-------- .../resources/dark/restart-kernel.svg | 0 .../resources/icons/notebook.svg | 4 +- .../resources/light/restart-kernel.svg | 0 .../src/notebookControllers.ts | 18 +- .../src/notebookSerializers.ts | 2 +- .../src/ui | 0 .../src/versionSpecificFunctions.ts | 8 +- .../src/vscode-common | 1 + .../src/vscode.d.ts | 0 .../vscode.proposed.notebookMessaging.d.ts | 0 .../testConfig.json | 0 .../tests/vscode-common-tests | 1 + .../tsconfig.json | 0 .../update-api.ps1 | 2 +- .../update-versions.ps1 | 2 +- .../vscodeStableVersion.txt | 0 .../wallaby.js | 0 .../.eslintignore | 0 .../.eslintrc.json | 0 src/polyglot-notebooks/.gitignore | 4 + .../.npmignore | 0 .../.npmrc | 0 .../.vscode/extensions.json | 0 .../.vscode/settings.json | 0 .../package-lock.json | 0 .../package.json | 8 +- .../rollup.config.js | 0 .../rollup.es.config.js | 0 .../rollup.library.config.js | 2 +- .../src/compositeKernel.ts | 0 .../src/connection.ts | 0 .../src/consoleCapture.ts | 0 .../src/contracts.ts | 1132 ++++++------ .../src/disposables.ts | 0 .../src/htmlKernel.ts | 0 .../src/index.ts | 0 .../src/javascriptKernel.ts | 0 .../src/kernel.ts | 0 .../src/kernelHost.ts | 0 .../src/kernelInvocationContext.ts | 0 .../src/kernelScheduler.ts | 0 .../src/logger.ts | 0 .../src/promiseCompletionSource.ts | 0 .../src/proxyKernel.ts | 0 .../src/routingslip.ts | 0 .../src/setup.ts | 0 .../src/tokenGenerator.ts | 0 .../src/webview/activation.ts | 0 .../src/webview/frontEndHost.ts | 0 .../testConfig.json | 0 .../tests/compositeKernel.test.ts | 0 .../tests/connector.test.ts | 0 .../tests/frontEndHost.test.ts | 448 ++--- .../tests/htmlKernel.test.ts | 0 .../tests/javascriptKernel.test.ts | 0 .../tests/kernel.test.ts | 0 .../tests/kernelHost.test.ts | 0 .../tests/kernelInfo.test.ts | 0 .../tests/kernelInvocationContext.test.ts | 0 .../tests/kernelRouting.test.ts | 0 .../tests/kernelScheduler.test.ts | 0 .../tests/proxykernel.test.ts | 0 .../tests/routingslip.test.ts | 0 .../tests/testSupport.ts | 0 .../tsconfig.json | 0 .../wallaby.js | 0 218 files changed, 3016 insertions(+), 3013 deletions(-) delete mode 120000 src/dotnet-interactive-vscode-common/src/dotnet-interactive delete mode 120000 src/dotnet-interactive-vscode-insiders/src/vscode-common delete mode 120000 src/dotnet-interactive-vscode-insiders/tests/vscode-common-tests delete mode 120000 src/dotnet-interactive-vscode/src/vscode-common delete mode 120000 src/dotnet-interactive-vscode/tests/vscode-common-tests delete mode 120000 src/microsoft-dotnet-interactive-browser/src/dotnet-interactive delete mode 100644 src/microsoft-dotnet-interactive/.gitignore rename src/{microsoft-dotnet-interactive-browser => polyglot-notebooks-browser}/.gitignore (85%) rename src/{dotnet-interactive-vscode-insiders => polyglot-notebooks-browser}/.npmrc (100%) rename src/{dotnet-interactive-vscode-insiders => polyglot-notebooks-browser}/.vscode/extensions.json (100%) rename src/{microsoft-dotnet-interactive-browser => polyglot-notebooks-browser}/.vscode/settings.json (100%) rename src/{microsoft-dotnet-interactive-browser => polyglot-notebooks-browser}/package-lock.json (100%) rename src/{microsoft-dotnet-interactive-browser => polyglot-notebooks-browser}/package.json (100%) rename src/{microsoft-dotnet-interactive-browser => polyglot-notebooks-browser}/rollup.config.js (100%) rename src/{microsoft-dotnet-interactive-browser => polyglot-notebooks-browser}/src/clientFetch.ts (100%) rename src/{microsoft-dotnet-interactive-browser => polyglot-notebooks-browser}/src/index.ts (51%) rename src/{microsoft-dotnet-interactive-browser => polyglot-notebooks-browser}/src/kernel-client-impl.ts (97%) rename src/{microsoft-dotnet-interactive-browser => polyglot-notebooks-browser}/src/kernel-factory.ts (92%) rename src/{microsoft-dotnet-interactive-browser => polyglot-notebooks-browser}/src/library-init.ts (95%) create mode 120000 src/polyglot-notebooks-browser/src/polyglot-notebooks rename src/{microsoft-dotnet-interactive-browser/src/dotnet-interactive-interfaces.ts => polyglot-notebooks-browser/src/polyglot-notebooks-interfaces.ts} (91%) rename src/{microsoft-dotnet-interactive-browser => polyglot-notebooks-browser}/src/signalr-client.ts (94%) rename src/{microsoft-dotnet-interactive-browser => polyglot-notebooks-browser}/testConfig.json (100%) rename src/{microsoft-dotnet-interactive-browser => polyglot-notebooks-browser}/tests/Responses/kernels-get-response.json (100%) rename src/{microsoft-dotnet-interactive-browser => polyglot-notebooks-browser}/tests/Responses/variable-post-response.json (100%) rename src/{microsoft-dotnet-interactive-browser => polyglot-notebooks-browser}/tests/client.test.ts (100%) rename src/{microsoft-dotnet-interactive-browser => polyglot-notebooks-browser}/tests/kernel-client.test.ts (97%) rename src/{microsoft-dotnet-interactive-browser => polyglot-notebooks-browser}/tests/kernel-discovery-contract.test.ts (100%) rename src/{microsoft-dotnet-interactive-browser => polyglot-notebooks-browser}/tests/library-initialisation.test.ts (100%) rename src/{microsoft-dotnet-interactive-browser => polyglot-notebooks-browser}/tests/testSupport.ts (95%) rename src/{microsoft-dotnet-interactive-browser => polyglot-notebooks-browser}/tests/variable-api-contract.test.ts (96%) rename src/{microsoft-dotnet-interactive-browser => polyglot-notebooks-browser}/tsconfig.json (100%) rename src/{microsoft-dotnet-interactive-browser => polyglot-notebooks-browser}/wallaby.js (100%) rename src/{dotnet-interactive-vscode-common => polyglot-notebooks-vscode-common}/src/DotnetInteractiveChannel.ts (82%) rename src/{dotnet-interactive-vscode-common => polyglot-notebooks-vscode-common}/src/OutputChannelAdapter.ts (100%) rename src/{dotnet-interactive-vscode-common => polyglot-notebooks-vscode-common}/src/acquisition.ts (100%) rename src/{dotnet-interactive-vscode-common => polyglot-notebooks-vscode-common}/src/activeNotebookTracker.ts (100%) rename src/{dotnet-interactive-vscode-common => polyglot-notebooks-vscode-common}/src/childProcessLineAdapter.ts (100%) rename src/{dotnet-interactive-vscode-common => polyglot-notebooks-vscode-common}/src/clientMapper.ts (97%) rename src/{dotnet-interactive-vscode-common => polyglot-notebooks-vscode-common}/src/commands.ts (99%) rename src/{dotnet-interactive-vscode-common => polyglot-notebooks-vscode-common}/src/commonInterfaces.ts (100%) rename src/{dotnet-interactive-vscode-common => polyglot-notebooks-vscode-common}/src/constants.ts (97%) rename src/{dotnet-interactive-vscode-common => polyglot-notebooks-vscode-common}/src/diagnostics.ts (100%) rename src/{dotnet-interactive-vscode-common => polyglot-notebooks-vscode-common}/src/documentSemanticTokenProvider.ts (98%) rename src/{dotnet-interactive-vscode-common => polyglot-notebooks-vscode-common}/src/dynamicGrammarSemanticTokenProvider.ts (99%) rename src/{dotnet-interactive-vscode-common => polyglot-notebooks-vscode-common}/src/extension.ts (99%) rename src/{dotnet-interactive-vscode-common => polyglot-notebooks-vscode-common}/src/helpService.ts (97%) rename src/{dotnet-interactive-vscode-common => polyglot-notebooks-vscode-common}/src/interactiveClient.ts (98%) rename src/{dotnet-interactive-vscode-common => polyglot-notebooks-vscode-common}/src/interactiveNotebook.ts (97%) rename src/{dotnet-interactive-vscode-common => polyglot-notebooks-vscode-common}/src/interfaces.ts (100%) rename src/{dotnet-interactive-vscode-common => polyglot-notebooks-vscode-common}/src/interfaces/utilities.ts (97%) rename src/{dotnet-interactive-vscode-common => polyglot-notebooks-vscode-common}/src/interfaces/vscode-like.ts (100%) rename src/{dotnet-interactive-vscode-common => polyglot-notebooks-vscode-common}/src/kernelInfoUpdaterService.ts (94%) rename src/{dotnet-interactive-vscode-common => polyglot-notebooks-vscode-common}/src/kernelSelectorUtilities.ts (96%) rename src/{dotnet-interactive-vscode-common => polyglot-notebooks-vscode-common}/src/languageConfigurationManager.ts (100%) rename src/{dotnet-interactive-vscode-common => polyglot-notebooks-vscode-common}/src/languageProvider.ts (100%) rename src/{dotnet-interactive-vscode-common => polyglot-notebooks-vscode-common}/src/languageServices/completion.ts (93%) rename src/{dotnet-interactive-vscode-common => polyglot-notebooks-vscode-common}/src/languageServices/hover.ts (100%) rename src/{dotnet-interactive-vscode-common => polyglot-notebooks-vscode-common}/src/languageServices/interfaces.ts (86%) rename src/{dotnet-interactive-vscode-common => polyglot-notebooks-vscode-common}/src/languageServices/signatureHelp.ts (93%) rename src/{dotnet-interactive-vscode-common => polyglot-notebooks-vscode-common}/src/lineReader.ts (100%) rename src/{dotnet-interactive-vscode-common => polyglot-notebooks-vscode-common}/src/messageClient.ts (100%) rename src/{dotnet-interactive-vscode-common => polyglot-notebooks-vscode-common}/src/metadataUtilities.ts (99%) rename src/{dotnet-interactive-vscode-common => polyglot-notebooks-vscode-common}/src/notebookCellStatusBarItemProvider.ts (96%) rename src/{dotnet-interactive-vscode-common => polyglot-notebooks-vscode-common}/src/notebookParserServer.ts (98%) rename src/{dotnet-interactive-vscode-common => polyglot-notebooks-vscode-common}/src/notebookWatcherService.ts (97%) create mode 120000 src/polyglot-notebooks-vscode-common/src/polyglot-notebooks rename src/{dotnet-interactive-vscode-common => polyglot-notebooks-vscode-common}/src/serviceCollection.ts (100%) rename src/{dotnet-interactive-vscode-common => polyglot-notebooks-vscode-common}/src/stdioDotnetInteractiveChannel.ts (97%) rename src/{dotnet-interactive-vscode-common => polyglot-notebooks-vscode-common}/src/utilities.ts (98%) rename src/{dotnet-interactive-vscode-common => polyglot-notebooks-vscode-common}/src/variableExplorer.ts (96%) rename src/{dotnet-interactive-vscode-common => polyglot-notebooks-vscode-common}/src/vscodeUtilities.ts (99%) rename src/{dotnet-interactive-vscode-common => polyglot-notebooks-vscode-common}/tests/RecordingOutputChannel.ts (100%) rename src/{dotnet-interactive-vscode-common => polyglot-notebooks-vscode-common}/tests/acquisition.test.ts (100%) rename src/{dotnet-interactive-vscode-common => polyglot-notebooks-vscode-common}/tests/callbackTestTestDotnetInteractiveChannel.ts (95%) rename src/{dotnet-interactive-vscode-common => polyglot-notebooks-vscode-common}/tests/client.test.ts (99%) rename src/{dotnet-interactive-vscode-common => polyglot-notebooks-vscode-common}/tests/dynamicGrammarSemanticTokenProvider.test.ts (99%) rename src/{dotnet-interactive-vscode-common => polyglot-notebooks-vscode-common}/tests/kernelSelectorUtilities.test.ts (95%) rename src/{dotnet-interactive-vscode-common => polyglot-notebooks-vscode-common}/tests/languageProvider.test.ts (99%) rename src/{dotnet-interactive-vscode-common => polyglot-notebooks-vscode-common}/tests/lineReader.test.ts (100%) rename src/{dotnet-interactive-vscode-common => polyglot-notebooks-vscode-common}/tests/messageClient.test.ts (100%) rename src/{dotnet-interactive-vscode-common => polyglot-notebooks-vscode-common}/tests/metadataUtilities.test.ts (99%) rename src/{dotnet-interactive-vscode-common => polyglot-notebooks-vscode-common}/tests/misc.test.ts (99%) rename src/{dotnet-interactive-vscode-common => polyglot-notebooks-vscode-common}/tests/notebook.test.ts (99%) rename src/{dotnet-interactive-vscode-common => polyglot-notebooks-vscode-common}/tests/testDotnetInteractiveChannel.ts (95%) rename src/{dotnet-interactive-vscode-common => polyglot-notebooks-vscode-common}/tests/utilities.ts (97%) rename src/{dotnet-interactive-vscode-insiders => polyglot-notebooks-vscode-insiders}/.eslintignore (100%) rename src/{dotnet-interactive-vscode-insiders => polyglot-notebooks-vscode-insiders}/.eslintrc.json (100%) rename src/{dotnet-interactive-vscode-insiders => polyglot-notebooks-vscode-insiders}/.gitignore (100%) rename src/{dotnet-interactive-vscode => polyglot-notebooks-vscode-insiders}/.npmrc (100%) rename src/{dotnet-interactive-vscode => polyglot-notebooks-vscode-insiders}/.vscode/extensions.json (100%) rename src/{dotnet-interactive-vscode-insiders => polyglot-notebooks-vscode-insiders}/.vscode/launch.json (100%) rename src/{dotnet-interactive-vscode-insiders => polyglot-notebooks-vscode-insiders}/.vscode/settings.json (100%) rename src/{dotnet-interactive-vscode-insiders => polyglot-notebooks-vscode-insiders}/.vscode/tasks.json (100%) rename src/{dotnet-interactive-vscode-insiders => polyglot-notebooks-vscode-insiders}/.vscodeignore (100%) rename src/{dotnet-interactive-vscode-insiders => polyglot-notebooks-vscode-insiders}/License.txt (100%) rename src/{dotnet-interactive-vscode-insiders => polyglot-notebooks-vscode-insiders}/README.md (100%) rename src/{dotnet-interactive-vscode-insiders => polyglot-notebooks-vscode-insiders}/grammars/http.language-configuration.json (100%) rename src/{dotnet-interactive-vscode-insiders => polyglot-notebooks-vscode-insiders}/grammars/http.tmGrammar.json (100%) rename src/{dotnet-interactive-vscode-insiders => polyglot-notebooks-vscode-insiders}/grammars/kql.language-configuration.json (100%) rename src/{dotnet-interactive-vscode-insiders => polyglot-notebooks-vscode-insiders}/grammars/kql.tmGrammar.json (100%) rename src/{dotnet-interactive-vscode-insiders => polyglot-notebooks-vscode-insiders}/help/DotNetVersion.md (97%) rename src/{dotnet-interactive-vscode-insiders => polyglot-notebooks-vscode-insiders}/images/icon.png (100%) rename src/{dotnet-interactive-vscode-insiders => polyglot-notebooks-vscode-insiders}/package-lock.json (100%) rename src/{dotnet-interactive-vscode-insiders => polyglot-notebooks-vscode-insiders}/package.json (96%) rename src/{dotnet-interactive-vscode-insiders => polyglot-notebooks-vscode-insiders}/resources/dark/restart-kernel.svg (100%) rename src/{dotnet-interactive-vscode-insiders => polyglot-notebooks-vscode-insiders}/resources/icons/notebook.svg (99%) rename src/{dotnet-interactive-vscode-insiders => polyglot-notebooks-vscode-insiders}/resources/light/restart-kernel.svg (100%) rename src/{dotnet-interactive-vscode-insiders => polyglot-notebooks-vscode-insiders}/src/notebookControllers.ts (99%) rename src/{dotnet-interactive-vscode-insiders => polyglot-notebooks-vscode-insiders}/src/notebookSerializers.ts (99%) rename src/{dotnet-interactive-vscode-insiders => polyglot-notebooks-vscode-insiders}/src/ui (100%) rename src/{dotnet-interactive-vscode-insiders => polyglot-notebooks-vscode-insiders}/src/versionSpecificFunctions.ts (97%) create mode 120000 src/polyglot-notebooks-vscode-insiders/src/vscode-common rename src/{dotnet-interactive-vscode-insiders => polyglot-notebooks-vscode-insiders}/src/vscode.d.ts (100%) rename src/{dotnet-interactive-vscode-insiders => polyglot-notebooks-vscode-insiders}/src/vscode.proposed.notebookMessaging.d.ts (100%) rename src/{dotnet-interactive-vscode-insiders => polyglot-notebooks-vscode-insiders}/testConfig.json (51%) create mode 120000 src/polyglot-notebooks-vscode-insiders/tests/vscode-common-tests rename src/{dotnet-interactive-vscode-insiders => polyglot-notebooks-vscode-insiders}/tools/buildSemanticTokenScopes.js (100%) rename src/{dotnet-interactive-vscode-insiders => polyglot-notebooks-vscode-insiders}/tsconfig.json (100%) rename src/{dotnet-interactive-vscode-insiders => polyglot-notebooks-vscode-insiders}/wallaby.js (100%) rename src/{dotnet-interactive-vscode => polyglot-notebooks-vscode}/.eslintignore (100%) rename src/{dotnet-interactive-vscode => polyglot-notebooks-vscode}/.eslintrc.json (100%) rename src/{dotnet-interactive-vscode => polyglot-notebooks-vscode}/.gitignore (100%) rename src/{microsoft-dotnet-interactive-browser => polyglot-notebooks-vscode}/.npmrc (100%) rename src/{microsoft-dotnet-interactive-browser => polyglot-notebooks-vscode}/.vscode/extensions.json (100%) rename src/{dotnet-interactive-vscode => polyglot-notebooks-vscode}/.vscode/launch.json (100%) rename src/{dotnet-interactive-vscode => polyglot-notebooks-vscode}/.vscode/settings.json (100%) rename src/{dotnet-interactive-vscode => polyglot-notebooks-vscode}/.vscode/tasks.json (100%) rename src/{dotnet-interactive-vscode => polyglot-notebooks-vscode}/.vscodeignore (100%) rename src/{dotnet-interactive-vscode => polyglot-notebooks-vscode}/DEVGUIDE.md (80%) rename src/{dotnet-interactive-vscode => polyglot-notebooks-vscode}/License.txt (100%) rename src/{dotnet-interactive-vscode => polyglot-notebooks-vscode}/README.md (100%) rename src/{dotnet-interactive-vscode => polyglot-notebooks-vscode}/UPDATING-TO-NEW-VERSION-OF-STABLE.md (90%) rename src/{dotnet-interactive-vscode => polyglot-notebooks-vscode}/do-version-upgrade.ps1 (100%) rename src/{dotnet-interactive-vscode => polyglot-notebooks-vscode}/grammars/http.language-configuration.json (100%) rename src/{dotnet-interactive-vscode => polyglot-notebooks-vscode}/grammars/http.tmGrammar.json (100%) rename src/{dotnet-interactive-vscode => polyglot-notebooks-vscode}/grammars/kql.language-configuration.json (100%) rename src/{dotnet-interactive-vscode => polyglot-notebooks-vscode}/grammars/kql.tmGrammar.json (100%) rename src/{dotnet-interactive-vscode => polyglot-notebooks-vscode}/help/DotNetVersion.md (97%) rename src/{dotnet-interactive-vscode => polyglot-notebooks-vscode}/images/icon.png (100%) rename src/{dotnet-interactive-vscode => polyglot-notebooks-vscode}/package-lock.json (99%) rename src/{dotnet-interactive-vscode => polyglot-notebooks-vscode}/package.json (96%) rename src/{dotnet-interactive-vscode => polyglot-notebooks-vscode}/resources/dark/restart-kernel.svg (100%) rename src/{dotnet-interactive-vscode => polyglot-notebooks-vscode}/resources/icons/notebook.svg (99%) rename src/{dotnet-interactive-vscode => polyglot-notebooks-vscode}/resources/light/restart-kernel.svg (100%) rename src/{dotnet-interactive-vscode => polyglot-notebooks-vscode}/src/notebookControllers.ts (96%) rename src/{dotnet-interactive-vscode => polyglot-notebooks-vscode}/src/notebookSerializers.ts (99%) rename src/{dotnet-interactive-vscode => polyglot-notebooks-vscode}/src/ui (100%) rename src/{dotnet-interactive-vscode => polyglot-notebooks-vscode}/src/versionSpecificFunctions.ts (97%) create mode 120000 src/polyglot-notebooks-vscode/src/vscode-common rename src/{dotnet-interactive-vscode => polyglot-notebooks-vscode}/src/vscode.d.ts (100%) rename src/{dotnet-interactive-vscode => polyglot-notebooks-vscode}/src/vscode.proposed.notebookMessaging.d.ts (100%) rename src/{dotnet-interactive-vscode => polyglot-notebooks-vscode}/testConfig.json (100%) create mode 120000 src/polyglot-notebooks-vscode/tests/vscode-common-tests rename src/{dotnet-interactive-vscode => polyglot-notebooks-vscode}/tsconfig.json (100%) rename src/{dotnet-interactive-vscode => polyglot-notebooks-vscode}/update-api.ps1 (94%) rename src/{dotnet-interactive-vscode => polyglot-notebooks-vscode}/update-versions.ps1 (95%) rename src/{dotnet-interactive-vscode => polyglot-notebooks-vscode}/vscodeStableVersion.txt (100%) rename src/{dotnet-interactive-vscode => polyglot-notebooks-vscode}/wallaby.js (100%) rename src/{microsoft-dotnet-interactive => polyglot-notebooks}/.eslintignore (100%) rename src/{microsoft-dotnet-interactive => polyglot-notebooks}/.eslintrc.json (100%) create mode 100644 src/polyglot-notebooks/.gitignore rename src/{microsoft-dotnet-interactive => polyglot-notebooks}/.npmignore (100%) rename src/{microsoft-dotnet-interactive => polyglot-notebooks}/.npmrc (100%) rename src/{microsoft-dotnet-interactive => polyglot-notebooks}/.vscode/extensions.json (100%) rename src/{microsoft-dotnet-interactive => polyglot-notebooks}/.vscode/settings.json (100%) rename src/{microsoft-dotnet-interactive => polyglot-notebooks}/package-lock.json (100%) rename src/{microsoft-dotnet-interactive => polyglot-notebooks}/package.json (91%) rename src/{microsoft-dotnet-interactive => polyglot-notebooks}/rollup.config.js (100%) rename src/{microsoft-dotnet-interactive => polyglot-notebooks}/rollup.es.config.js (100%) rename src/{microsoft-dotnet-interactive => polyglot-notebooks}/rollup.library.config.js (97%) rename src/{microsoft-dotnet-interactive => polyglot-notebooks}/src/compositeKernel.ts (100%) rename src/{microsoft-dotnet-interactive => polyglot-notebooks}/src/connection.ts (100%) rename src/{microsoft-dotnet-interactive => polyglot-notebooks}/src/consoleCapture.ts (100%) rename src/{microsoft-dotnet-interactive => polyglot-notebooks}/src/contracts.ts (96%) rename src/{microsoft-dotnet-interactive => polyglot-notebooks}/src/disposables.ts (100%) rename src/{microsoft-dotnet-interactive => polyglot-notebooks}/src/htmlKernel.ts (100%) rename src/{microsoft-dotnet-interactive => polyglot-notebooks}/src/index.ts (100%) rename src/{microsoft-dotnet-interactive => polyglot-notebooks}/src/javascriptKernel.ts (100%) rename src/{microsoft-dotnet-interactive => polyglot-notebooks}/src/kernel.ts (100%) rename src/{microsoft-dotnet-interactive => polyglot-notebooks}/src/kernelHost.ts (100%) rename src/{microsoft-dotnet-interactive => polyglot-notebooks}/src/kernelInvocationContext.ts (100%) rename src/{microsoft-dotnet-interactive => polyglot-notebooks}/src/kernelScheduler.ts (100%) rename src/{microsoft-dotnet-interactive => polyglot-notebooks}/src/logger.ts (100%) rename src/{microsoft-dotnet-interactive => polyglot-notebooks}/src/promiseCompletionSource.ts (100%) rename src/{microsoft-dotnet-interactive => polyglot-notebooks}/src/proxyKernel.ts (100%) rename src/{microsoft-dotnet-interactive => polyglot-notebooks}/src/routingslip.ts (100%) rename src/{microsoft-dotnet-interactive => polyglot-notebooks}/src/setup.ts (100%) rename src/{microsoft-dotnet-interactive => polyglot-notebooks}/src/tokenGenerator.ts (100%) rename src/{microsoft-dotnet-interactive => polyglot-notebooks}/src/webview/activation.ts (100%) rename src/{microsoft-dotnet-interactive => polyglot-notebooks}/src/webview/frontEndHost.ts (100%) rename src/{microsoft-dotnet-interactive => polyglot-notebooks}/testConfig.json (100%) rename src/{microsoft-dotnet-interactive => polyglot-notebooks}/tests/compositeKernel.test.ts (100%) rename src/{microsoft-dotnet-interactive => polyglot-notebooks}/tests/connector.test.ts (100%) rename src/{microsoft-dotnet-interactive => polyglot-notebooks}/tests/frontEndHost.test.ts (97%) rename src/{microsoft-dotnet-interactive => polyglot-notebooks}/tests/htmlKernel.test.ts (100%) rename src/{microsoft-dotnet-interactive => polyglot-notebooks}/tests/javascriptKernel.test.ts (100%) rename src/{microsoft-dotnet-interactive => polyglot-notebooks}/tests/kernel.test.ts (100%) rename src/{microsoft-dotnet-interactive => polyglot-notebooks}/tests/kernelHost.test.ts (100%) rename src/{microsoft-dotnet-interactive => polyglot-notebooks}/tests/kernelInfo.test.ts (100%) rename src/{microsoft-dotnet-interactive => polyglot-notebooks}/tests/kernelInvocationContext.test.ts (100%) rename src/{microsoft-dotnet-interactive => polyglot-notebooks}/tests/kernelRouting.test.ts (100%) rename src/{microsoft-dotnet-interactive => polyglot-notebooks}/tests/kernelScheduler.test.ts (100%) rename src/{microsoft-dotnet-interactive => polyglot-notebooks}/tests/proxykernel.test.ts (100%) rename src/{microsoft-dotnet-interactive => polyglot-notebooks}/tests/routingslip.test.ts (100%) rename src/{microsoft-dotnet-interactive => polyglot-notebooks}/tests/testSupport.ts (100%) rename src/{microsoft-dotnet-interactive => polyglot-notebooks}/tsconfig.json (100%) rename src/{microsoft-dotnet-interactive => polyglot-notebooks}/wallaby.js (100%) diff --git a/.devcontainer/workspace.code-workspace b/.devcontainer/workspace.code-workspace index 06fdc1f69e..0434efd2e0 100644 --- a/.devcontainer/workspace.code-workspace +++ b/.devcontainer/workspace.code-workspace @@ -4,19 +4,23 @@ "path": ".." }, { - "path": "../src/dotnet-interactive-npm" + "path": "../src/polyglot-notebooks-browser" }, { - "name": "VS Code - Stable", - "path": "../src/dotnet-interactive-vscode/stable" + "path": "../src/polyglot-notebooks-ui-components" }, { - "name": "VS Code - Insiders", - "path": "../src/dotnet-interactive-vscode/insiders" + "path": "../src/polyglot-notebooks" + }, + { + "name": "VS Code - Stable", + "path": "../src/polyglot-notebooks-vscode" }, { - "path": "../src/Microsoft.DotNet.Interactive.Js" + "name": "VS Code - Insiders", + "path": "../src/polyglot-notebooks-vscode-insiders" } + ], "settings": {} } \ No newline at end of file diff --git a/DEVELOPER-GUIDE.md b/DEVELOPER-GUIDE.md index 46e498fc28..7776e69c72 100644 --- a/DEVELOPER-GUIDE.md +++ b/DEVELOPER-GUIDE.md @@ -108,7 +108,7 @@ To get started, you'll need: 2. Follow the regular build instructions as given above. -3. Open the `/src/dotnet-interactive-vscode-insiders` directory in Visual Studio Code Insiders. (From your terminal, you can run `code-insiders /src/dotnet-interactive-vscode-insiders`.) +3. Open the `/src/polyglot-notebooks-vscode-insiders` directory in Visual Studio Code Insiders. (From your terminal, you can run `code-insiders /src/polyglot-notebooks-vscode-insiders`.) 4. Make the desired source code changes. diff --git a/eng/build.ps1 b/eng/build.ps1 index 753430849d..70e7bf8de6 100644 --- a/eng/build.ps1 +++ b/eng/build.ps1 @@ -12,12 +12,12 @@ $ErrorActionPreference = "Stop" try { $repoRoot = Resolve-Path "$PSScriptRoot\.." $symlinkDirectories = @( - "$repoRoot\src\microsoft-dotnet-interactive-browser\src\dotnet-interactive", - "$repoRoot\src\dotnet-interactive-vscode-common\src\dotnet-interactive", - "$repoRoot\src\dotnet-interactive-vscode\src\vscode-common", - "$repoRoot\src\dotnet-interactive-vscode\tests\vscode-common-tests", - "$repoRoot\src\dotnet-interactive-vscode-insiders\src\vscode-common", - "$repoRoot\src\dotnet-interactive-vscode-insiders\tests\vscode-common-tests" + "$repoRoot\src\polyglot-notebooks-browser\src\polyglot-notebooks", + "$repoRoot\src\polyglot-notebooks-vscode-common\src\polyglot-notebooks", + "$repoRoot\src\polyglot-notebooks-vscode\src\vscode-common", + "$repoRoot\src\polyglot-notebooks-vscode\tests\vscode-common-tests", + "$repoRoot\src\polyglot-notebooks-vscode-insiders\src\vscode-common", + "$repoRoot\src\polyglot-notebooks-vscode-insiders\tests\vscode-common-tests" ) foreach ($symlinkDir in $symlinkDirectories) { @@ -29,11 +29,11 @@ try { # build and test NPM $npmDirs = @( - "src\microsoft-dotnet-interactive", - "src\microsoft-dotnet-interactive-browser", + "src\polyglot-notebooks", + "src\polyglot-notebooks-browser", "src\polyglot-notebooks-ui-components", - "src\dotnet-interactive-vscode", - "src\dotnet-interactive-vscode-insiders" + "src\polyglot-notebooks-vscode", + "src\polyglot-notebooks-vscode-insiders" ) foreach ($npmDir in $npmDirs) { diff --git a/eng/build.sh b/eng/build.sh index b2d0213463..02557d3857 100755 --- a/eng/build.sh +++ b/eng/build.sh @@ -42,11 +42,11 @@ while [[ $# > 0 ]]; do done # build and test NPM -npmDirs='src/microsoft-dotnet-interactive - src/microsoft-dotnet-interactive-browser +npmDirs='src/polyglot-notebooks + src/polyglot-notebooks-browser src/polyglot-notebooks-ui-components - src/dotnet-interactive-vscode - src/dotnet-interactive-vscode-insiders' + src/polyglot-notebooks-vscode + src/polyglot-notebooks-vscode-insiders' for npmDir in $npmDirs; do echo "Building NPM in directory $npmDir" diff --git a/eng/package/PackNpmPackage.ps1 b/eng/package/PackNpmPackage.ps1 index f581a7a0c6..5a2b4cabc3 100755 --- a/eng/package/PackNpmPackage.ps1 +++ b/eng/package/PackNpmPackage.ps1 @@ -16,7 +16,7 @@ function Build-NpmPackage() { # pack Write-Host "Packing package" npm pack - Copy-Item -Path (Join-Path (Get-Location) "microsoft-dotnet-interactive-$packageVersionNumber.tgz") -Destination $outDir + Copy-Item -Path (Join-Path (Get-Location) "microsoft-polyglot-notebooks-$packageVersionNumber.tgz") -Destination $outDir } try { diff --git a/eng/package/PackVSCodeExtension.ps1 b/eng/package/PackVSCodeExtension.ps1 index 1c4f55e5f9..67592ba8d9 100755 --- a/eng/package/PackVSCodeExtension.ps1 +++ b/eng/package/PackVSCodeExtension.ps1 @@ -44,9 +44,9 @@ try { $stablePackageVersion = "${stableToolVersionNumber}0" $insidersPackageVersion = "${stableToolVersionNumber}1" - Build-VsCodeExtension -packageDirectory "dotnet-interactive-vscode" -outputSubDirectory "stable-locked" -packageVersionNumber $stablePackageVersion - Build-VsCodeExtension -packageDirectory "dotnet-interactive-vscode" -outputSubDirectory "stable" -packageVersionNumber $stablePackageVersion -kernelVersionNumber $stableToolVersionNumber - Build-VsCodeExtension -packageDirectory "dotnet-interactive-vscode-insiders" -outputSubDirectory "insiders" -packageVersionNumber $insidersPackageVersion -kernelVersionNumber $stableToolVersionNumber + Build-VsCodeExtension -packageDirectory "polyglot-notebooks-vscode" -outputSubDirectory "stable-locked" -packageVersionNumber $stablePackageVersion + Build-VsCodeExtension -packageDirectory "polyglot-notebooks-vscode" -outputSubDirectory "stable" -packageVersionNumber $stablePackageVersion -kernelVersionNumber $stableToolVersionNumber + Build-VsCodeExtension -packageDirectory "polyglot-notebooks-vscode-insiders" -outputSubDirectory "insiders" -packageVersionNumber $insidersPackageVersion -kernelVersionNumber $stableToolVersionNumber } catch { Write-Host $_ diff --git a/src/Microsoft.DotNet.Interactive.Browser/Microsoft.DotNet.Interactive.Browser.csproj b/src/Microsoft.DotNet.Interactive.Browser/Microsoft.DotNet.Interactive.Browser.csproj index a3c8b12657..d817375563 100644 --- a/src/Microsoft.DotNet.Interactive.Browser/Microsoft.DotNet.Interactive.Browser.csproj +++ b/src/Microsoft.DotNet.Interactive.Browser/Microsoft.DotNet.Interactive.Browser.csproj @@ -37,7 +37,7 @@ - + diff --git a/src/dotnet-interactive-vscode-common/src/dotnet-interactive b/src/dotnet-interactive-vscode-common/src/dotnet-interactive deleted file mode 120000 index f829e6fe67..0000000000 --- a/src/dotnet-interactive-vscode-common/src/dotnet-interactive +++ /dev/null @@ -1 +0,0 @@ -../../microsoft-dotnet-interactive/src \ No newline at end of file diff --git a/src/dotnet-interactive-vscode-insiders/src/vscode-common b/src/dotnet-interactive-vscode-insiders/src/vscode-common deleted file mode 120000 index 6eaac03147..0000000000 --- a/src/dotnet-interactive-vscode-insiders/src/vscode-common +++ /dev/null @@ -1 +0,0 @@ -../../dotnet-interactive-vscode-common/src \ No newline at end of file diff --git a/src/dotnet-interactive-vscode-insiders/tests/vscode-common-tests b/src/dotnet-interactive-vscode-insiders/tests/vscode-common-tests deleted file mode 120000 index e3a3cccec4..0000000000 --- a/src/dotnet-interactive-vscode-insiders/tests/vscode-common-tests +++ /dev/null @@ -1 +0,0 @@ -../../dotnet-interactive-vscode-common/tests \ No newline at end of file diff --git a/src/dotnet-interactive-vscode/src/vscode-common b/src/dotnet-interactive-vscode/src/vscode-common deleted file mode 120000 index 6eaac03147..0000000000 --- a/src/dotnet-interactive-vscode/src/vscode-common +++ /dev/null @@ -1 +0,0 @@ -../../dotnet-interactive-vscode-common/src \ No newline at end of file diff --git a/src/dotnet-interactive-vscode/tests/vscode-common-tests b/src/dotnet-interactive-vscode/tests/vscode-common-tests deleted file mode 120000 index e3a3cccec4..0000000000 --- a/src/dotnet-interactive-vscode/tests/vscode-common-tests +++ /dev/null @@ -1 +0,0 @@ -../../dotnet-interactive-vscode-common/tests \ No newline at end of file diff --git a/src/dotnet-interactive.Tests/TypeScriptInterfacesContractTests.cs b/src/dotnet-interactive.Tests/TypeScriptInterfacesContractTests.cs index 72499d1c83..31e5eaa95a 100644 --- a/src/dotnet-interactive.Tests/TypeScriptInterfacesContractTests.cs +++ b/src/dotnet-interactive.Tests/TypeScriptInterfacesContractTests.cs @@ -49,6 +49,6 @@ dotnet run --project src/interface-generator -- --out-file {contractFile.FullNam [Fact] public void vscode_generated_TypeScript_interfaces_file_has_known_shape() { - CheckTypeScriptInterfaceFile("src/microsoft-dotnet-interactive/src/contracts.ts"); + CheckTypeScriptInterfaceFile("src/polyglot-notebooks/src/contracts.ts"); } } \ No newline at end of file diff --git a/src/dotnet-interactive/dotnet-interactive.csproj b/src/dotnet-interactive/dotnet-interactive.csproj index 219241b452..316d34174a 100644 --- a/src/dotnet-interactive/dotnet-interactive.csproj +++ b/src/dotnet-interactive/dotnet-interactive.csproj @@ -118,7 +118,7 @@ - $(MSBuildThisFileDirectory)/../microsoft-dotnet-interactive-browser/ + $(MSBuildThisFileDirectory)/../polyglot-notebooks-browser/ diff --git a/src/ensure-symlinks.ps1 b/src/ensure-symlinks.ps1 index 1c48ba463a..82da853bd3 100755 --- a/src/ensure-symlinks.ps1 +++ b/src/ensure-symlinks.ps1 @@ -16,14 +16,14 @@ function EnsureSymlink([string]$sourceDirectory, [string] $linkName, [string] $d } } -EnsureSymlink -sourceDirectory "$PSScriptRoot\microsoft-dotnet-interactive-browser\src" -linkName "dotnet-interactive" -destinationLocation "..\..\microsoft-dotnet-interactive\src" +EnsureSymlink -sourceDirectory "$PSScriptRoot\polyglot-notebooks-browser\src" -linkName "polyglot-notebooks" -destinationLocation "..\..\polyglot-notebooks\src" -EnsureSymlink -sourceDirectory "$PSScriptRoot\dotnet-interactive-vscode-common\src" -linkName "dotnet-interactive" -destinationLocation "..\..\microsoft-dotnet-interactive\src" +EnsureSymlink -sourceDirectory "$PSScriptRoot\polyglot-notebooks-vscode-common\src" -linkName "polyglot-notebooks" -destinationLocation "..\..\polyglot-notebooks\src" -EnsureSymlink -sourceDirectory "$PSScriptRoot\dotnet-interactive-vscode\src" -linkName "ui" -destinationLocation "..\..\polyglot-notebooks-ui-components\src\contracts" -EnsureSymlink -sourceDirectory "$PSScriptRoot\dotnet-interactive-vscode\src" -linkName "vscode-common" -destinationLocation "..\..\dotnet-interactive-vscode-common\src" -EnsureSymlink -sourceDirectory "$PSScriptRoot\dotnet-interactive-vscode\tests" -linkName "vscode-common-tests" -destinationLocation "..\..\dotnet-interactive-vscode-common\tests" +EnsureSymlink -sourceDirectory "$PSScriptRoot\polyglot-notebooks-vscode\src" -linkName "ui" -destinationLocation "..\..\polyglot-notebooks-ui-components\src\contracts" +EnsureSymlink -sourceDirectory "$PSScriptRoot\polyglot-notebooks-vscode\src" -linkName "vscode-common" -destinationLocation "..\..\polyglot-notebooks-vscode-common\src" +EnsureSymlink -sourceDirectory "$PSScriptRoot\polyglot-notebooks-vscode\tests" -linkName "vscode-common-tests" -destinationLocation "..\..\polyglot-notebooks-vscode-common\tests" -EnsureSymlink -sourceDirectory "$PSScriptRoot\dotnet-interactive-vscode-insiders\src" -linkName "ui" -destinationLocation "..\..\polyglot-notebooks-ui-components\src\contracts" -EnsureSymlink -sourceDirectory "$PSScriptRoot\dotnet-interactive-vscode-insiders\src" -linkName "vscode-common" -destinationLocation "..\..\dotnet-interactive-vscode-common\src" -EnsureSymlink -sourceDirectory "$PSScriptRoot\dotnet-interactive-vscode-insiders\tests" -linkName "vscode-common-tests" -destinationLocation "..\..\dotnet-interactive-vscode-common\tests" +EnsureSymlink -sourceDirectory "$PSScriptRoot\polyglot-notebooks-vscode-insiders\src" -linkName "ui" -destinationLocation "..\..\polyglot-notebooks-ui-components\src\contracts" +EnsureSymlink -sourceDirectory "$PSScriptRoot\polyglot-notebooks-vscode-insiders\src" -linkName "vscode-common" -destinationLocation "..\..\polyglot-notebooks-vscode-common\src" +EnsureSymlink -sourceDirectory "$PSScriptRoot\polyglot-notebooks-vscode-insiders\tests" -linkName "vscode-common-tests" -destinationLocation "..\..\polyglot-notebooks-vscode-common\tests" diff --git a/src/microsoft-dotnet-interactive-browser/src/dotnet-interactive b/src/microsoft-dotnet-interactive-browser/src/dotnet-interactive deleted file mode 120000 index f829e6fe67..0000000000 --- a/src/microsoft-dotnet-interactive-browser/src/dotnet-interactive +++ /dev/null @@ -1 +0,0 @@ -../../microsoft-dotnet-interactive/src \ No newline at end of file diff --git a/src/microsoft-dotnet-interactive/.gitignore b/src/microsoft-dotnet-interactive/.gitignore deleted file mode 100644 index 6de9a76115..0000000000 --- a/src/microsoft-dotnet-interactive/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -dist/ -lib/ -node_modules/ diff --git a/src/microsoft-dotnet-interactive-browser/.gitignore b/src/polyglot-notebooks-browser/.gitignore similarity index 85% rename from src/microsoft-dotnet-interactive-browser/.gitignore rename to src/polyglot-notebooks-browser/.gitignore index 0c8e6d6e57..849ddff3b7 100644 --- a/src/microsoft-dotnet-interactive-browser/.gitignore +++ b/src/polyglot-notebooks-browser/.gitignore @@ -1 +1 @@ -dist/ +dist/ diff --git a/src/dotnet-interactive-vscode-insiders/.npmrc b/src/polyglot-notebooks-browser/.npmrc similarity index 100% rename from src/dotnet-interactive-vscode-insiders/.npmrc rename to src/polyglot-notebooks-browser/.npmrc diff --git a/src/dotnet-interactive-vscode-insiders/.vscode/extensions.json b/src/polyglot-notebooks-browser/.vscode/extensions.json similarity index 100% rename from src/dotnet-interactive-vscode-insiders/.vscode/extensions.json rename to src/polyglot-notebooks-browser/.vscode/extensions.json diff --git a/src/microsoft-dotnet-interactive-browser/.vscode/settings.json b/src/polyglot-notebooks-browser/.vscode/settings.json similarity index 100% rename from src/microsoft-dotnet-interactive-browser/.vscode/settings.json rename to src/polyglot-notebooks-browser/.vscode/settings.json diff --git a/src/microsoft-dotnet-interactive-browser/package-lock.json b/src/polyglot-notebooks-browser/package-lock.json similarity index 100% rename from src/microsoft-dotnet-interactive-browser/package-lock.json rename to src/polyglot-notebooks-browser/package-lock.json diff --git a/src/microsoft-dotnet-interactive-browser/package.json b/src/polyglot-notebooks-browser/package.json similarity index 100% rename from src/microsoft-dotnet-interactive-browser/package.json rename to src/polyglot-notebooks-browser/package.json diff --git a/src/microsoft-dotnet-interactive-browser/rollup.config.js b/src/polyglot-notebooks-browser/rollup.config.js similarity index 100% rename from src/microsoft-dotnet-interactive-browser/rollup.config.js rename to src/polyglot-notebooks-browser/rollup.config.js diff --git a/src/microsoft-dotnet-interactive-browser/src/clientFetch.ts b/src/polyglot-notebooks-browser/src/clientFetch.ts similarity index 100% rename from src/microsoft-dotnet-interactive-browser/src/clientFetch.ts rename to src/polyglot-notebooks-browser/src/clientFetch.ts diff --git a/src/microsoft-dotnet-interactive-browser/src/index.ts b/src/polyglot-notebooks-browser/src/index.ts similarity index 51% rename from src/microsoft-dotnet-interactive-browser/src/index.ts rename to src/polyglot-notebooks-browser/src/index.ts index 1eebb728b7..a1ebe5fb4f 100644 --- a/src/microsoft-dotnet-interactive-browser/src/index.ts +++ b/src/polyglot-notebooks-browser/src/index.ts @@ -1,4 +1,4 @@ export * from "./library-init"; -export * from "./dotnet-interactive-interfaces"; -export * from "./dotnet-interactive/contracts"; +export * from "./polyglot-notebooks-interfaces"; +export * from "./polyglot-notebooks/contracts"; export { createDotnetInteractiveClient } from "./kernel-client-impl"; \ No newline at end of file diff --git a/src/microsoft-dotnet-interactive-browser/src/kernel-client-impl.ts b/src/polyglot-notebooks-browser/src/kernel-client-impl.ts similarity index 97% rename from src/microsoft-dotnet-interactive-browser/src/kernel-client-impl.ts rename to src/polyglot-notebooks-browser/src/kernel-client-impl.ts index 838e3a7e0f..61ecf9eeb6 100644 --- a/src/microsoft-dotnet-interactive-browser/src/kernel-client-impl.ts +++ b/src/polyglot-notebooks-browser/src/kernel-client-impl.ts @@ -1,14 +1,14 @@ // Copyright (c) .NET Foundation and contributors. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. -import * as dotnetInteractiveInterfaces from "./dotnet-interactive-interfaces"; -import { Kernel, IKernelCommandHandler } from "./dotnet-interactive/kernel"; -import { TokenGenerator } from "./dotnet-interactive/tokenGenerator"; +import * as dotnetInteractiveInterfaces from "./polyglot-notebooks-interfaces"; +import { Kernel, IKernelCommandHandler } from "./polyglot-notebooks/kernel"; +import { TokenGenerator } from "./polyglot-notebooks/tokenGenerator"; import { signalTransportFactory } from "./signalr-client"; -import * as contracts from "./dotnet-interactive/contracts"; +import * as contracts from "./polyglot-notebooks/contracts"; import { createDefaultClientFetch } from "./clientFetch"; import { clientSideKernelFactory } from "./kernel-factory"; -import { DisposableSubscription, IKernelCommandAndEventReceiver, IKernelCommandAndEventSender, isKernelEventEnvelope } from "./dotnet-interactive"; +import { DisposableSubscription, IKernelCommandAndEventReceiver, IKernelCommandAndEventSender, isKernelEventEnvelope } from "./polyglot-notebooks"; export interface KernelClientImplParameteres { clientFetch: (input: RequestInfo, init?: RequestInit) => Promise; diff --git a/src/microsoft-dotnet-interactive-browser/src/kernel-factory.ts b/src/polyglot-notebooks-browser/src/kernel-factory.ts similarity index 92% rename from src/microsoft-dotnet-interactive-browser/src/kernel-factory.ts rename to src/polyglot-notebooks-browser/src/kernel-factory.ts index 517fbad9a7..61c8f14eb9 100644 --- a/src/microsoft-dotnet-interactive-browser/src/kernel-factory.ts +++ b/src/polyglot-notebooks-browser/src/kernel-factory.ts @@ -1,8 +1,8 @@ // Copyright (c) .NET Foundation and contributors. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. -import { IKernelCommandAndEventReceiver, IKernelCommandAndEventSender, isKernelCommandEnvelope } from "./dotnet-interactive/connection"; -import { Kernel } from "./dotnet-interactive/kernel"; +import { IKernelCommandAndEventReceiver, IKernelCommandAndEventSender, isKernelCommandEnvelope } from "./polyglot-notebooks/connection"; +import { Kernel } from "./polyglot-notebooks/kernel"; export function attachKernelToChannel(kernel: Kernel, channel: { sender: IKernelCommandAndEventSender, diff --git a/src/microsoft-dotnet-interactive-browser/src/library-init.ts b/src/polyglot-notebooks-browser/src/library-init.ts similarity index 95% rename from src/microsoft-dotnet-interactive-browser/src/library-init.ts rename to src/polyglot-notebooks-browser/src/library-init.ts index 58f3c3bb11..bd9ca472cd 100644 --- a/src/microsoft-dotnet-interactive-browser/src/library-init.ts +++ b/src/polyglot-notebooks-browser/src/library-init.ts @@ -1,7 +1,7 @@ // Copyright (c) .NET Foundation and contributors. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. -import { DotnetInteractiveScopeContainer, DotnetInteractiveScope } from "./dotnet-interactive-interfaces"; +import { DotnetInteractiveScopeContainer, DotnetInteractiveScope } from "./polyglot-notebooks-interfaces"; import { createDotnetInteractiveClient } from "./kernel-client-impl"; export function init(global: any) { diff --git a/src/polyglot-notebooks-browser/src/polyglot-notebooks b/src/polyglot-notebooks-browser/src/polyglot-notebooks new file mode 120000 index 0000000000..8000f23e27 --- /dev/null +++ b/src/polyglot-notebooks-browser/src/polyglot-notebooks @@ -0,0 +1 @@ +../../polyglot-notebooks/src \ No newline at end of file diff --git a/src/microsoft-dotnet-interactive-browser/src/dotnet-interactive-interfaces.ts b/src/polyglot-notebooks-browser/src/polyglot-notebooks-interfaces.ts similarity index 91% rename from src/microsoft-dotnet-interactive-browser/src/dotnet-interactive-interfaces.ts rename to src/polyglot-notebooks-browser/src/polyglot-notebooks-interfaces.ts index 7177853149..9d4bcb160f 100644 --- a/src/microsoft-dotnet-interactive-browser/src/dotnet-interactive-interfaces.ts +++ b/src/polyglot-notebooks-browser/src/polyglot-notebooks-interfaces.ts @@ -1,9 +1,9 @@ // Copyright (c) .NET Foundation and contributors. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. -import * as contracts from "./dotnet-interactive/contracts"; -import { DisposableSubscription } from "./dotnet-interactive/disposables"; -import { IKernelCommandHandler } from "./dotnet-interactive/kernel"; +import * as contracts from "./polyglot-notebooks/contracts"; +import { DisposableSubscription } from "./polyglot-notebooks/disposables"; +import { IKernelCommandHandler } from "./polyglot-notebooks/kernel"; export interface VariableRequest { [kernelName: string]: Array; diff --git a/src/microsoft-dotnet-interactive-browser/src/signalr-client.ts b/src/polyglot-notebooks-browser/src/signalr-client.ts similarity index 94% rename from src/microsoft-dotnet-interactive-browser/src/signalr-client.ts rename to src/polyglot-notebooks-browser/src/signalr-client.ts index 1c678798d2..0b8b3c77f0 100644 --- a/src/microsoft-dotnet-interactive-browser/src/signalr-client.ts +++ b/src/polyglot-notebooks-browser/src/signalr-client.ts @@ -3,8 +3,8 @@ import * as signalR from "@microsoft/signalr"; import { Subject } from "rxjs"; -import { IKernelCommandAndEventReceiver, IKernelCommandAndEventSender, isKernelCommandEnvelope, isKernelEventEnvelope, KernelCommandAndEventReceiver, KernelCommandAndEventSender, KernelCommandOrEventEnvelope } from "./dotnet-interactive"; -import { KernelEventEnvelope, KernelCommandEnvelope } from "./dotnet-interactive/contracts"; +import { IKernelCommandAndEventReceiver, IKernelCommandAndEventSender, isKernelCommandEnvelope, isKernelEventEnvelope, KernelCommandAndEventReceiver, KernelCommandAndEventSender, KernelCommandOrEventEnvelope } from "./polyglot-notebooks"; +import { KernelEventEnvelope, KernelCommandEnvelope } from "./polyglot-notebooks/contracts"; diff --git a/src/microsoft-dotnet-interactive-browser/testConfig.json b/src/polyglot-notebooks-browser/testConfig.json similarity index 100% rename from src/microsoft-dotnet-interactive-browser/testConfig.json rename to src/polyglot-notebooks-browser/testConfig.json diff --git a/src/microsoft-dotnet-interactive-browser/tests/Responses/kernels-get-response.json b/src/polyglot-notebooks-browser/tests/Responses/kernels-get-response.json similarity index 100% rename from src/microsoft-dotnet-interactive-browser/tests/Responses/kernels-get-response.json rename to src/polyglot-notebooks-browser/tests/Responses/kernels-get-response.json diff --git a/src/microsoft-dotnet-interactive-browser/tests/Responses/variable-post-response.json b/src/polyglot-notebooks-browser/tests/Responses/variable-post-response.json similarity index 100% rename from src/microsoft-dotnet-interactive-browser/tests/Responses/variable-post-response.json rename to src/polyglot-notebooks-browser/tests/Responses/variable-post-response.json diff --git a/src/microsoft-dotnet-interactive-browser/tests/client.test.ts b/src/polyglot-notebooks-browser/tests/client.test.ts similarity index 100% rename from src/microsoft-dotnet-interactive-browser/tests/client.test.ts rename to src/polyglot-notebooks-browser/tests/client.test.ts diff --git a/src/microsoft-dotnet-interactive-browser/tests/kernel-client.test.ts b/src/polyglot-notebooks-browser/tests/kernel-client.test.ts similarity index 97% rename from src/microsoft-dotnet-interactive-browser/tests/kernel-client.test.ts rename to src/polyglot-notebooks-browser/tests/kernel-client.test.ts index 04c4fd5ed4..775ee0ade3 100644 --- a/src/microsoft-dotnet-interactive-browser/tests/kernel-client.test.ts +++ b/src/polyglot-notebooks-browser/tests/kernel-client.test.ts @@ -5,10 +5,10 @@ import { expect } from "chai"; import { createDotnetInteractiveClient } from "../src/kernel-client-impl"; import * as fetchMock from "fetch-mock"; import { configureFetchForKernelDiscovery, createMockChannel, MockKernelCommandAndEventChannel, asKernelClientContainer } from "./testSupport"; -import * as contracts from "../src/dotnet-interactive/contracts"; -import { IKernelCommandInvocation, Kernel } from "../src/dotnet-interactive/kernel"; +import * as contracts from "../src/polyglot-notebooks/contracts"; +import { IKernelCommandInvocation, Kernel } from "../src/polyglot-notebooks/kernel"; import { attachKernelToChannel } from "../src/kernel-factory"; -import { KernelInvocationContext } from "../src/dotnet-interactive/kernelInvocationContext"; +import { KernelInvocationContext } from "../src/polyglot-notebooks/kernelInvocationContext"; interface CustomCommand extends contracts.KernelCommand { @@ -19,7 +19,7 @@ interface CustomCommand2 extends contracts.KernelCommand { moreData: string } -describe("dotnet-interactive", () => { +describe("polyglot-notebooks", () => { describe("langauge kernel", () => { diff --git a/src/microsoft-dotnet-interactive-browser/tests/kernel-discovery-contract.test.ts b/src/polyglot-notebooks-browser/tests/kernel-discovery-contract.test.ts similarity index 100% rename from src/microsoft-dotnet-interactive-browser/tests/kernel-discovery-contract.test.ts rename to src/polyglot-notebooks-browser/tests/kernel-discovery-contract.test.ts diff --git a/src/microsoft-dotnet-interactive-browser/tests/library-initialisation.test.ts b/src/polyglot-notebooks-browser/tests/library-initialisation.test.ts similarity index 100% rename from src/microsoft-dotnet-interactive-browser/tests/library-initialisation.test.ts rename to src/polyglot-notebooks-browser/tests/library-initialisation.test.ts diff --git a/src/microsoft-dotnet-interactive-browser/tests/testSupport.ts b/src/polyglot-notebooks-browser/tests/testSupport.ts similarity index 95% rename from src/microsoft-dotnet-interactive-browser/tests/testSupport.ts rename to src/polyglot-notebooks-browser/tests/testSupport.ts index 258a3e84c8..541bba37e7 100644 --- a/src/microsoft-dotnet-interactive-browser/tests/testSupport.ts +++ b/src/polyglot-notebooks-browser/tests/testSupport.ts @@ -3,10 +3,10 @@ import * as fetchMock from "fetch-mock"; import * as rxjs from "rxjs"; -import { DotnetInteractiveClient, KernelClientContainer } from "../src/dotnet-interactive-interfaces"; -import * as connection from "../src/dotnet-interactive/connection"; -import * as contracts from "../src/dotnet-interactive/contracts"; -import { TokenGenerator } from "../src/dotnet-interactive/tokenGenerator"; +import { DotnetInteractiveClient, KernelClientContainer } from "../src/polyglot-notebooks-interfaces"; +import * as connection from "../src/polyglot-notebooks/connection"; +import * as contracts from "../src/polyglot-notebooks/contracts"; +import { TokenGenerator } from "../src/polyglot-notebooks/tokenGenerator"; export function asKernelClientContainer(client: DotnetInteractiveClient): KernelClientContainer { diff --git a/src/microsoft-dotnet-interactive-browser/tests/variable-api-contract.test.ts b/src/polyglot-notebooks-browser/tests/variable-api-contract.test.ts similarity index 96% rename from src/microsoft-dotnet-interactive-browser/tests/variable-api-contract.test.ts rename to src/polyglot-notebooks-browser/tests/variable-api-contract.test.ts index fd26d2b8f3..0f547a3886 100644 --- a/src/microsoft-dotnet-interactive-browser/tests/variable-api-contract.test.ts +++ b/src/polyglot-notebooks-browser/tests/variable-api-contract.test.ts @@ -4,7 +4,7 @@ import { expect } from "chai"; import { createDotnetInteractiveClient } from "../src/kernel-client-impl"; import * as fetchMock from "fetch-mock"; -import { VariableResponse, VariableRequest } from "../src/dotnet-interactive-interfaces"; +import { VariableResponse, VariableRequest } from "../src/polyglot-notebooks-interfaces"; import { asKernelClientContainer, configureFetchForKernelDiscovery, createMockChannel } from "./testSupport"; describe("dotnet-interactive", () => { diff --git a/src/microsoft-dotnet-interactive-browser/tsconfig.json b/src/polyglot-notebooks-browser/tsconfig.json similarity index 100% rename from src/microsoft-dotnet-interactive-browser/tsconfig.json rename to src/polyglot-notebooks-browser/tsconfig.json diff --git a/src/microsoft-dotnet-interactive-browser/wallaby.js b/src/polyglot-notebooks-browser/wallaby.js similarity index 100% rename from src/microsoft-dotnet-interactive-browser/wallaby.js rename to src/polyglot-notebooks-browser/wallaby.js diff --git a/src/dotnet-interactive-vscode-common/src/DotnetInteractiveChannel.ts b/src/polyglot-notebooks-vscode-common/src/DotnetInteractiveChannel.ts similarity index 82% rename from src/dotnet-interactive-vscode-common/src/DotnetInteractiveChannel.ts rename to src/polyglot-notebooks-vscode-common/src/DotnetInteractiveChannel.ts index 1c7675aad1..152f0c4c66 100644 --- a/src/dotnet-interactive-vscode-common/src/DotnetInteractiveChannel.ts +++ b/src/polyglot-notebooks-vscode-common/src/DotnetInteractiveChannel.ts @@ -1,8 +1,8 @@ // Copyright (c) .NET Foundation and contributors. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. -import { IKernelCommandAndEventReceiver, IKernelCommandAndEventSender } from "./dotnet-interactive/connection"; -import { Disposable } from "./dotnet-interactive/disposables"; +import { IKernelCommandAndEventReceiver, IKernelCommandAndEventSender } from "./polyglot-notebooks/connection"; +import { Disposable } from "./polyglot-notebooks/disposables"; export interface KernelCommandAndEventChannel extends Disposable { sender: IKernelCommandAndEventSender, diff --git a/src/dotnet-interactive-vscode-common/src/OutputChannelAdapter.ts b/src/polyglot-notebooks-vscode-common/src/OutputChannelAdapter.ts similarity index 100% rename from src/dotnet-interactive-vscode-common/src/OutputChannelAdapter.ts rename to src/polyglot-notebooks-vscode-common/src/OutputChannelAdapter.ts diff --git a/src/dotnet-interactive-vscode-common/src/acquisition.ts b/src/polyglot-notebooks-vscode-common/src/acquisition.ts similarity index 100% rename from src/dotnet-interactive-vscode-common/src/acquisition.ts rename to src/polyglot-notebooks-vscode-common/src/acquisition.ts diff --git a/src/dotnet-interactive-vscode-common/src/activeNotebookTracker.ts b/src/polyglot-notebooks-vscode-common/src/activeNotebookTracker.ts similarity index 100% rename from src/dotnet-interactive-vscode-common/src/activeNotebookTracker.ts rename to src/polyglot-notebooks-vscode-common/src/activeNotebookTracker.ts diff --git a/src/dotnet-interactive-vscode-common/src/childProcessLineAdapter.ts b/src/polyglot-notebooks-vscode-common/src/childProcessLineAdapter.ts similarity index 100% rename from src/dotnet-interactive-vscode-common/src/childProcessLineAdapter.ts rename to src/polyglot-notebooks-vscode-common/src/childProcessLineAdapter.ts diff --git a/src/dotnet-interactive-vscode-common/src/clientMapper.ts b/src/polyglot-notebooks-vscode-common/src/clientMapper.ts similarity index 97% rename from src/dotnet-interactive-vscode-common/src/clientMapper.ts rename to src/polyglot-notebooks-vscode-common/src/clientMapper.ts index 9f969e9b43..638cfcb7d7 100644 --- a/src/dotnet-interactive-vscode-common/src/clientMapper.ts +++ b/src/polyglot-notebooks-vscode-common/src/clientMapper.ts @@ -3,9 +3,9 @@ import { ErrorOutputCreator, InteractiveClient } from "./interactiveClient"; import { ReportChannel, Uri } from "./interfaces/vscode-like"; -import { CompositeKernel } from './dotnet-interactive/compositeKernel'; +import { CompositeKernel } from './polyglot-notebooks/compositeKernel'; import { KernelCommandAndEventChannel } from "./DotnetInteractiveChannel"; -import { Logger } from "./dotnet-interactive"; +import { Logger } from "./polyglot-notebooks"; export interface ClientMapperConfiguration { channelCreator: (notebookUri: Uri) => Promise, diff --git a/src/dotnet-interactive-vscode-common/src/commands.ts b/src/polyglot-notebooks-vscode-common/src/commands.ts similarity index 99% rename from src/dotnet-interactive-vscode-common/src/commands.ts rename to src/polyglot-notebooks-vscode-common/src/commands.ts index 537d9d8b42..8f85be3c08 100644 --- a/src/dotnet-interactive-vscode-common/src/commands.ts +++ b/src/polyglot-notebooks-vscode-common/src/commands.ts @@ -15,7 +15,7 @@ import * as metadataUtilities from './metadataUtilities'; import { ReportChannel } from './interfaces/vscode-like'; import { NotebookParserServer } from './notebookParserServer'; import * as versionSpecificFunctions from '../versionSpecificFunctions'; -import { PromiseCompletionSource } from './dotnet-interactive/promiseCompletionSource'; +import { PromiseCompletionSource } from './polyglot-notebooks/promiseCompletionSource'; import * as constants from './constants'; diff --git a/src/dotnet-interactive-vscode-common/src/commonInterfaces.ts b/src/polyglot-notebooks-vscode-common/src/commonInterfaces.ts similarity index 100% rename from src/dotnet-interactive-vscode-common/src/commonInterfaces.ts rename to src/polyglot-notebooks-vscode-common/src/commonInterfaces.ts diff --git a/src/dotnet-interactive-vscode-common/src/constants.ts b/src/polyglot-notebooks-vscode-common/src/constants.ts similarity index 97% rename from src/dotnet-interactive-vscode-common/src/constants.ts rename to src/polyglot-notebooks-vscode-common/src/constants.ts index cac4163d7f..00c8821f94 100644 --- a/src/dotnet-interactive-vscode-common/src/constants.ts +++ b/src/polyglot-notebooks-vscode-common/src/constants.ts @@ -1,22 +1,22 @@ -// Copyright (c) .NET Foundation and contributors. All rights reserved. -// Licensed under the MIT license. See LICENSE file in the project root for full license information. - -// languages -export const CellLanguageIdentifier = 'polyglot-notebook'; - -// notebook controllers -export const NotebookControllerId = 'polyglot-notebook'; -export const JupyterNotebookControllerId = 'polyglot-notebook-for-jupyter'; - -// notebook kernel -export const JupyterKernelId = 'polyglot-notebook-for-jupyter'; - -// view types -export const NotebookViewType = 'polyglot-notebook'; -export const JupyterNotebookViewType = 'polyglot-notebook-jupyter'; -export const JupyterViewType = 'jupyter-notebook'; - -// other -export const DotnetConfigurationSectionName = 'dotnet-interactive'; -export const PolyglotConfigurationSectionName = 'polyglot-notebook'; -export const InteractiveWindowControllerId = 'polyglot-notebook-window'; +// Copyright (c) .NET Foundation and contributors. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. + +// languages +export const CellLanguageIdentifier = 'polyglot-notebook'; + +// notebook controllers +export const NotebookControllerId = 'polyglot-notebook'; +export const JupyterNotebookControllerId = 'polyglot-notebook-for-jupyter'; + +// notebook kernel +export const JupyterKernelId = 'polyglot-notebook-for-jupyter'; + +// view types +export const NotebookViewType = 'polyglot-notebook'; +export const JupyterNotebookViewType = 'polyglot-notebook-jupyter'; +export const JupyterViewType = 'jupyter-notebook'; + +// other +export const DotnetConfigurationSectionName = 'dotnet-interactive'; +export const PolyglotConfigurationSectionName = 'polyglot-notebook'; +export const InteractiveWindowControllerId = 'polyglot-notebook-window'; diff --git a/src/dotnet-interactive-vscode-common/src/diagnostics.ts b/src/polyglot-notebooks-vscode-common/src/diagnostics.ts similarity index 100% rename from src/dotnet-interactive-vscode-common/src/diagnostics.ts rename to src/polyglot-notebooks-vscode-common/src/diagnostics.ts diff --git a/src/dotnet-interactive-vscode-common/src/documentSemanticTokenProvider.ts b/src/polyglot-notebooks-vscode-common/src/documentSemanticTokenProvider.ts similarity index 98% rename from src/dotnet-interactive-vscode-common/src/documentSemanticTokenProvider.ts rename to src/polyglot-notebooks-vscode-common/src/documentSemanticTokenProvider.ts index 4827cc1390..dc3d479783 100644 --- a/src/dotnet-interactive-vscode-common/src/documentSemanticTokenProvider.ts +++ b/src/polyglot-notebooks-vscode-common/src/documentSemanticTokenProvider.ts @@ -1,131 +1,131 @@ -// Copyright (c) .NET Foundation and contributors. All rights reserved. -// Licensed under the MIT license. See LICENSE file in the project root for full license information. - -import * as fs from 'fs'; -import * as vscode from 'vscode'; -import * as metadataUtilities from './metadataUtilities'; -import { DynamicGrammarSemanticTokenProvider, VSCodeExtensionLike } from './dynamicGrammarSemanticTokenProvider'; -import * as constants from './constants'; -import * as versionSpecificFunctions from '../versionSpecificFunctions'; - -// https://code.visualstudio.com/api/language-extensions/semantic-highlight-guide#standard-token-types-and-modifiers -const defaultTokenTypes = [ - 'namespace', // For identifiers that declare or reference a namespace, module, or package. - 'class', // For identifiers that declare or reference a class type. - 'enum', // For identifiers that declare or reference an enumeration type. - 'interface', // For identifiers that declare or reference an interface type. - 'struct', // For identifiers that declare or reference a struct type. - 'typeParameter', // For identifiers that declare or reference a type parameter. - 'type', // For identifiers that declare or reference a type that is not covered above. - 'parameter', // For identifiers that declare or reference a function or method parameters. - 'variable', // For identifiers that declare or reference a local or global variable. - 'property', // For identifiers that declare or reference a member property, member field, or member variable. - 'enumMember', // For identifiers that declare an enumeration property, constant, or member. - 'event', // For identifiers that declare an event property. - 'function', // For identifiers that declare a function. - 'method', // For identifiers that declare a member function or method. - 'macro', // For identifiers that declare a macro. - 'label', // For identifiers that declare a label. - 'comment', // For tokens that represent a comment. - 'string', // For tokens that represent a string literal. - 'keyword', // For tokens that represent a language keyword. - 'number', // For tokens that represent a number literal. - 'regexp', // For tokens that represent a regular expression literal. - 'operator', // For tokens that represent an operator. -]; - -// default semantic token modifiers -const defaultTokenModifiers = [ - 'declaration', // For declarations of symbols. - 'definition', // For definitions of symbols, for example, in header files. - 'readonly', // For readonly variables and member fields (constants). - 'static', // For class members (static members). - 'deprecated', // For symbols that should no longer be used. - 'abstract', // For types and member functions that are abstract. - 'async', // For functions that are marked async. - 'modification', // For variable references where the variable is assigned to. - 'documentation', // For occurrences of symbols in documentation. - 'defaultLibrary', // For symbols that are part of the standard library. -]; - -export const selector: vscode.DocumentSelector = [ - { language: constants.CellLanguageIdentifier }, -]; - -export class DocumentSemanticTokensProvider implements vscode.DocumentSemanticTokensProvider { - private _dynamicTokenProvider: DynamicGrammarSemanticTokenProvider; - private _onDidChangeSemanticTokensEmitter: vscode.EventEmitter = new vscode.EventEmitter(); - private _semanticTokensLegend: vscode.SemanticTokensLegend; - - constructor(packageJSON: any) { - const extensionData = vscode.extensions.all.map(extension => extension); - this._dynamicTokenProvider = new DynamicGrammarSemanticTokenProvider(packageJSON, extensionData, path => fs.existsSync(path), path => fs.readFileSync(path, 'utf8')); - const tokenTypes = [...defaultTokenTypes, ...this._dynamicTokenProvider.semanticTokenTypes]; - this._semanticTokensLegend = new vscode.SemanticTokensLegend(tokenTypes, defaultTokenModifiers); - } - - get semanticTokensLegend(): vscode.SemanticTokensLegend { - return this._semanticTokensLegend; - } - - get dynamicTokenProvider(): DynamicGrammarSemanticTokenProvider { - return this._dynamicTokenProvider; - } - - async init(context: vscode.ExtensionContext): Promise { - await this._dynamicTokenProvider.init(); - - context.subscriptions.push(vscode.commands.registerCommand('polyglot-notebook.refreshSemanticTokens', () => { - this.refresh(); - })); - - context.subscriptions.push(vscode.commands.registerCommand('polyglot-notebook.resetNotebookKernelCollection', async (notebook?: vscode.NotebookDocument | undefined) => { - if (notebook) { - const isIpynb = metadataUtilities.isIpynbNotebook(notebook); - const bareMetadata = metadataUtilities.createDefaultNotebookDocumentMetadata(); - const rawBareMetadata = metadataUtilities.getRawNotebookDocumentMetadataFromNotebookDocumentMetadata(bareMetadata, isIpynb); - const _succeeded = await versionSpecificFunctions.replaceNotebookMetadata(notebook.uri, rawBareMetadata); - const kernelInfos = metadataUtilities.getKernelInfosFromNotebookDocument(notebook); - this.dynamicTokenProvider.rebuildNotebookGrammar(notebook.uri, kernelInfos, true); - } - })); - } - - onDidChangeSemanticTokens: vscode.Event = this._onDidChangeSemanticTokensEmitter.event; - - refresh() { - this._onDidChangeSemanticTokensEmitter.fire(); - } - - async provideDocumentSemanticTokens(document: vscode.TextDocument, _cancellationToken: vscode.CancellationToken): Promise { - const tokensBuilder = new vscode.SemanticTokensBuilder(this.semanticTokensLegend); - const notebookDocument = vscode.workspace.notebookDocuments.find(notebook => notebook.getCells().some(cell => cell.document === document)); - if (notebookDocument) { - const notebookMetadata = metadataUtilities.getNotebookDocumentMetadataFromNotebookDocument(notebookDocument); - const text = document.getText(); - const cell = notebookDocument.getCells().find(cell => cell.document === document); - if (cell) { - const cellMetadata = metadataUtilities.getNotebookCellMetadataFromNotebookCellElement(cell); - const cellKernelName = cellMetadata.kernelName ?? notebookMetadata.kernelInfo.defaultKernelName; - const tokens = await this._dynamicTokenProvider.getTokens(notebookDocument.uri, cellKernelName, text); - for (const token of tokens) { - try { - tokensBuilder.push( - new vscode.Range( - new vscode.Position(token.line, token.startColumn), - new vscode.Position(token.line, token.endColumn) - ), - token.tokenType, - token.tokenModifiers); - } catch (e) { - const x = e; - } - } - } - } - - // TODO: agument with real semantic tokens? - - return tokensBuilder.build(); - } -} +// Copyright (c) .NET Foundation and contributors. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. + +import * as fs from 'fs'; +import * as vscode from 'vscode'; +import * as metadataUtilities from './metadataUtilities'; +import { DynamicGrammarSemanticTokenProvider, VSCodeExtensionLike } from './dynamicGrammarSemanticTokenProvider'; +import * as constants from './constants'; +import * as versionSpecificFunctions from '../versionSpecificFunctions'; + +// https://code.visualstudio.com/api/language-extensions/semantic-highlight-guide#standard-token-types-and-modifiers +const defaultTokenTypes = [ + 'namespace', // For identifiers that declare or reference a namespace, module, or package. + 'class', // For identifiers that declare or reference a class type. + 'enum', // For identifiers that declare or reference an enumeration type. + 'interface', // For identifiers that declare or reference an interface type. + 'struct', // For identifiers that declare or reference a struct type. + 'typeParameter', // For identifiers that declare or reference a type parameter. + 'type', // For identifiers that declare or reference a type that is not covered above. + 'parameter', // For identifiers that declare or reference a function or method parameters. + 'variable', // For identifiers that declare or reference a local or global variable. + 'property', // For identifiers that declare or reference a member property, member field, or member variable. + 'enumMember', // For identifiers that declare an enumeration property, constant, or member. + 'event', // For identifiers that declare an event property. + 'function', // For identifiers that declare a function. + 'method', // For identifiers that declare a member function or method. + 'macro', // For identifiers that declare a macro. + 'label', // For identifiers that declare a label. + 'comment', // For tokens that represent a comment. + 'string', // For tokens that represent a string literal. + 'keyword', // For tokens that represent a language keyword. + 'number', // For tokens that represent a number literal. + 'regexp', // For tokens that represent a regular expression literal. + 'operator', // For tokens that represent an operator. +]; + +// default semantic token modifiers +const defaultTokenModifiers = [ + 'declaration', // For declarations of symbols. + 'definition', // For definitions of symbols, for example, in header files. + 'readonly', // For readonly variables and member fields (constants). + 'static', // For class members (static members). + 'deprecated', // For symbols that should no longer be used. + 'abstract', // For types and member functions that are abstract. + 'async', // For functions that are marked async. + 'modification', // For variable references where the variable is assigned to. + 'documentation', // For occurrences of symbols in documentation. + 'defaultLibrary', // For symbols that are part of the standard library. +]; + +export const selector: vscode.DocumentSelector = [ + { language: constants.CellLanguageIdentifier }, +]; + +export class DocumentSemanticTokensProvider implements vscode.DocumentSemanticTokensProvider { + private _dynamicTokenProvider: DynamicGrammarSemanticTokenProvider; + private _onDidChangeSemanticTokensEmitter: vscode.EventEmitter = new vscode.EventEmitter(); + private _semanticTokensLegend: vscode.SemanticTokensLegend; + + constructor(packageJSON: any) { + const extensionData = vscode.extensions.all.map(extension => extension); + this._dynamicTokenProvider = new DynamicGrammarSemanticTokenProvider(packageJSON, extensionData, path => fs.existsSync(path), path => fs.readFileSync(path, 'utf8')); + const tokenTypes = [...defaultTokenTypes, ...this._dynamicTokenProvider.semanticTokenTypes]; + this._semanticTokensLegend = new vscode.SemanticTokensLegend(tokenTypes, defaultTokenModifiers); + } + + get semanticTokensLegend(): vscode.SemanticTokensLegend { + return this._semanticTokensLegend; + } + + get dynamicTokenProvider(): DynamicGrammarSemanticTokenProvider { + return this._dynamicTokenProvider; + } + + async init(context: vscode.ExtensionContext): Promise { + await this._dynamicTokenProvider.init(); + + context.subscriptions.push(vscode.commands.registerCommand('polyglot-notebook.refreshSemanticTokens', () => { + this.refresh(); + })); + + context.subscriptions.push(vscode.commands.registerCommand('polyglot-notebook.resetNotebookKernelCollection', async (notebook?: vscode.NotebookDocument | undefined) => { + if (notebook) { + const isIpynb = metadataUtilities.isIpynbNotebook(notebook); + const bareMetadata = metadataUtilities.createDefaultNotebookDocumentMetadata(); + const rawBareMetadata = metadataUtilities.getRawNotebookDocumentMetadataFromNotebookDocumentMetadata(bareMetadata, isIpynb); + const _succeeded = await versionSpecificFunctions.replaceNotebookMetadata(notebook.uri, rawBareMetadata); + const kernelInfos = metadataUtilities.getKernelInfosFromNotebookDocument(notebook); + this.dynamicTokenProvider.rebuildNotebookGrammar(notebook.uri, kernelInfos, true); + } + })); + } + + onDidChangeSemanticTokens: vscode.Event = this._onDidChangeSemanticTokensEmitter.event; + + refresh() { + this._onDidChangeSemanticTokensEmitter.fire(); + } + + async provideDocumentSemanticTokens(document: vscode.TextDocument, _cancellationToken: vscode.CancellationToken): Promise { + const tokensBuilder = new vscode.SemanticTokensBuilder(this.semanticTokensLegend); + const notebookDocument = vscode.workspace.notebookDocuments.find(notebook => notebook.getCells().some(cell => cell.document === document)); + if (notebookDocument) { + const notebookMetadata = metadataUtilities.getNotebookDocumentMetadataFromNotebookDocument(notebookDocument); + const text = document.getText(); + const cell = notebookDocument.getCells().find(cell => cell.document === document); + if (cell) { + const cellMetadata = metadataUtilities.getNotebookCellMetadataFromNotebookCellElement(cell); + const cellKernelName = cellMetadata.kernelName ?? notebookMetadata.kernelInfo.defaultKernelName; + const tokens = await this._dynamicTokenProvider.getTokens(notebookDocument.uri, cellKernelName, text); + for (const token of tokens) { + try { + tokensBuilder.push( + new vscode.Range( + new vscode.Position(token.line, token.startColumn), + new vscode.Position(token.line, token.endColumn) + ), + token.tokenType, + token.tokenModifiers); + } catch (e) { + const x = e; + } + } + } + } + + // TODO: agument with real semantic tokens? + + return tokensBuilder.build(); + } +} diff --git a/src/dotnet-interactive-vscode-common/src/dynamicGrammarSemanticTokenProvider.ts b/src/polyglot-notebooks-vscode-common/src/dynamicGrammarSemanticTokenProvider.ts similarity index 99% rename from src/dotnet-interactive-vscode-common/src/dynamicGrammarSemanticTokenProvider.ts rename to src/polyglot-notebooks-vscode-common/src/dynamicGrammarSemanticTokenProvider.ts index 166b74c633..0caf417e62 100644 --- a/src/dotnet-interactive-vscode-common/src/dynamicGrammarSemanticTokenProvider.ts +++ b/src/polyglot-notebooks-vscode-common/src/dynamicGrammarSemanticTokenProvider.ts @@ -1,14 +1,14 @@ // Copyright (c) .NET Foundation and contributors. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. -import * as contracts from './dotnet-interactive/contracts'; +import * as contracts from './polyglot-notebooks/contracts'; import * as fs from 'fs'; import * as path from 'path'; import * as oniguruma from 'vscode-oniguruma'; import * as vscodeLike from './interfaces/vscode-like'; import * as vsctm from 'vscode-textmate'; -import { Logger } from './dotnet-interactive/logger'; +import { Logger } from './polyglot-notebooks/logger'; const customScopePrefix = 'polyglot-notebook'; diff --git a/src/dotnet-interactive-vscode-common/src/extension.ts b/src/polyglot-notebooks-vscode-common/src/extension.ts similarity index 99% rename from src/dotnet-interactive-vscode-common/src/extension.ts rename to src/polyglot-notebooks-vscode-common/src/extension.ts index c2eb411306..8b0e1a7662 100644 --- a/src/dotnet-interactive-vscode-common/src/extension.ts +++ b/src/polyglot-notebooks-vscode-common/src/extension.ts @@ -1,7 +1,7 @@ // Copyright (c) .NET Foundation and contributors. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. -import * as contracts from './dotnet-interactive/contracts'; +import * as contracts from './polyglot-notebooks/contracts'; import * as helpService from './helpService'; import * as fs from 'fs'; import * as os from 'os'; @@ -30,8 +30,8 @@ import { ErrorOutputCreator, InteractiveClient } from './interactiveClient'; import * as vscodeUtilities from './vscodeUtilities'; import fetch from 'node-fetch'; -import { CompositeKernel } from './dotnet-interactive/compositeKernel'; -import { Logger, LogLevel } from './dotnet-interactive/logger'; +import { CompositeKernel } from './polyglot-notebooks/compositeKernel'; +import { Logger, LogLevel } from './polyglot-notebooks/logger'; import { ChildProcessLineAdapter } from './childProcessLineAdapter'; import { NotebookParserServer } from './notebookParserServer'; import { registerVariableExplorer } from './variableExplorer'; diff --git a/src/dotnet-interactive-vscode-common/src/helpService.ts b/src/polyglot-notebooks-vscode-common/src/helpService.ts similarity index 97% rename from src/dotnet-interactive-vscode-common/src/helpService.ts rename to src/polyglot-notebooks-vscode-common/src/helpService.ts index 375661f027..5d1add4b95 100644 --- a/src/dotnet-interactive-vscode-common/src/helpService.ts +++ b/src/polyglot-notebooks-vscode-common/src/helpService.ts @@ -1,28 +1,28 @@ -// Copyright (c) .NET Foundation and contributors. All rights reserved. -// Licensed under the MIT license. See LICENSE file in the project root for full license information. - -import * as path from 'path'; -import * as vscode from 'vscode'; - -export const DotNetVersion = 'DotNetVersion'; - -export type HelpPage = - typeof DotNetVersion; - -export class HelpService { - constructor(private readonly context: vscode.ExtensionContext) { - } - - async showHelpPageAndThrow(page: HelpPage): Promise { - const helpPagePath = getHelpPagePath(this.context, page); - const helpPageUri = vscode.Uri.file(helpPagePath); - await vscode.commands.executeCommand('markdown.showPreview', helpPageUri); - throw new Error('Error activating extension, see the displayed help page for more details.'); - } -} - -function getHelpPagePath(context: vscode.ExtensionContext, page: HelpPage) { - const basePath = path.join(context.extensionPath, 'help'); - const helpPagePath = path.join(basePath, `${page}.md`); - return helpPagePath; -} +// Copyright (c) .NET Foundation and contributors. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. + +import * as path from 'path'; +import * as vscode from 'vscode'; + +export const DotNetVersion = 'DotNetVersion'; + +export type HelpPage = + typeof DotNetVersion; + +export class HelpService { + constructor(private readonly context: vscode.ExtensionContext) { + } + + async showHelpPageAndThrow(page: HelpPage): Promise { + const helpPagePath = getHelpPagePath(this.context, page); + const helpPageUri = vscode.Uri.file(helpPagePath); + await vscode.commands.executeCommand('markdown.showPreview', helpPageUri); + throw new Error('Error activating extension, see the displayed help page for more details.'); + } +} + +function getHelpPagePath(context: vscode.ExtensionContext, page: HelpPage) { + const basePath = path.join(context.extensionPath, 'help'); + const helpPagePath = path.join(basePath, `${page}.md`); + return helpPagePath; +} diff --git a/src/dotnet-interactive-vscode-common/src/interactiveClient.ts b/src/polyglot-notebooks-vscode-common/src/interactiveClient.ts similarity index 98% rename from src/dotnet-interactive-vscode-common/src/interactiveClient.ts rename to src/polyglot-notebooks-vscode-common/src/interactiveClient.ts index b4cc62d250..1ac9dee036 100644 --- a/src/dotnet-interactive-vscode-common/src/interactiveClient.ts +++ b/src/polyglot-notebooks-vscode-common/src/interactiveClient.ts @@ -53,16 +53,16 @@ import { Cancel, ErrorProducedType, ErrorProduced -} from './dotnet-interactive/contracts'; +} from './polyglot-notebooks/contracts'; import { clearDebounce, createOutput } from './utilities'; import * as vscodeLike from './interfaces/vscode-like'; -import { CompositeKernel } from './dotnet-interactive/compositeKernel'; -import { Guid } from './dotnet-interactive/tokenGenerator'; -import { KernelHost } from './dotnet-interactive/kernelHost'; +import { CompositeKernel } from './polyglot-notebooks/compositeKernel'; +import { Guid } from './polyglot-notebooks/tokenGenerator'; +import { KernelHost } from './polyglot-notebooks/kernelHost'; import { KernelCommandAndEventChannel } from './DotnetInteractiveChannel'; -import * as connection from './dotnet-interactive/connection'; -import { DisposableSubscription } from './dotnet-interactive/disposables'; +import * as connection from './polyglot-notebooks/connection'; +import { DisposableSubscription } from './polyglot-notebooks/disposables'; export interface ErrorOutputCreator { (message: string, outputId?: string): vscodeLike.NotebookCellOutput; diff --git a/src/dotnet-interactive-vscode-common/src/interactiveNotebook.ts b/src/polyglot-notebooks-vscode-common/src/interactiveNotebook.ts similarity index 97% rename from src/dotnet-interactive-vscode-common/src/interactiveNotebook.ts rename to src/polyglot-notebooks-vscode-common/src/interactiveNotebook.ts index ca28753fc5..94e9420b7a 100644 --- a/src/dotnet-interactive-vscode-common/src/interactiveNotebook.ts +++ b/src/polyglot-notebooks-vscode-common/src/interactiveNotebook.ts @@ -6,7 +6,7 @@ import * as path from 'path'; import { debounce } from './utilities'; import { NotebookCellKind, NotebookDocumentBackup } from './interfaces/vscode-like'; import { ClientMapper } from './clientMapper'; -import { Diagnostic } from './dotnet-interactive/contracts'; +import { Diagnostic } from './polyglot-notebooks/contracts'; import { Uri } from 'vscode'; import * as constants from './constants'; diff --git a/src/dotnet-interactive-vscode-common/src/interfaces.ts b/src/polyglot-notebooks-vscode-common/src/interfaces.ts similarity index 100% rename from src/dotnet-interactive-vscode-common/src/interfaces.ts rename to src/polyglot-notebooks-vscode-common/src/interfaces.ts diff --git a/src/dotnet-interactive-vscode-common/src/interfaces/utilities.ts b/src/polyglot-notebooks-vscode-common/src/interfaces/utilities.ts similarity index 97% rename from src/dotnet-interactive-vscode-common/src/interfaces/utilities.ts rename to src/polyglot-notebooks-vscode-common/src/interfaces/utilities.ts index 533acae6c5..776b2f22d3 100644 --- a/src/dotnet-interactive-vscode-common/src/interfaces/utilities.ts +++ b/src/polyglot-notebooks-vscode-common/src/interfaces/utilities.ts @@ -1,7 +1,7 @@ // Copyright (c) .NET Foundation and contributors. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. -import * as contracts from '../dotnet-interactive/contracts'; +import * as contracts from '../polyglot-notebooks/contracts'; import * as vscodeLike from './vscode-like'; export function isErrorOutput(arg: any): arg is contracts.ErrorElement { diff --git a/src/dotnet-interactive-vscode-common/src/interfaces/vscode-like.ts b/src/polyglot-notebooks-vscode-common/src/interfaces/vscode-like.ts similarity index 100% rename from src/dotnet-interactive-vscode-common/src/interfaces/vscode-like.ts rename to src/polyglot-notebooks-vscode-common/src/interfaces/vscode-like.ts diff --git a/src/dotnet-interactive-vscode-common/src/kernelInfoUpdaterService.ts b/src/polyglot-notebooks-vscode-common/src/kernelInfoUpdaterService.ts similarity index 94% rename from src/dotnet-interactive-vscode-common/src/kernelInfoUpdaterService.ts rename to src/polyglot-notebooks-vscode-common/src/kernelInfoUpdaterService.ts index a1cb088bc0..e74b9dcd6d 100644 --- a/src/dotnet-interactive-vscode-common/src/kernelInfoUpdaterService.ts +++ b/src/polyglot-notebooks-vscode-common/src/kernelInfoUpdaterService.ts @@ -3,9 +3,9 @@ import * as vscode from 'vscode'; import * as vscodeLike from './interfaces/vscode-like'; -import * as connection from './dotnet-interactive/connection'; +import * as connection from './polyglot-notebooks/connection'; import { InteractiveClient } from './interactiveClient'; -import { CompositeKernel } from './dotnet-interactive/compositeKernel'; +import { CompositeKernel } from './polyglot-notebooks/compositeKernel'; import { ClientMapper } from './clientMapper'; export type KernelInfoUpdatedDelegate = { (notebook: vscode.NotebookDocument, client: InteractiveClient): void }; diff --git a/src/dotnet-interactive-vscode-common/src/kernelSelectorUtilities.ts b/src/polyglot-notebooks-vscode-common/src/kernelSelectorUtilities.ts similarity index 96% rename from src/dotnet-interactive-vscode-common/src/kernelSelectorUtilities.ts rename to src/polyglot-notebooks-vscode-common/src/kernelSelectorUtilities.ts index 5aa6d571ab..8dda65f017 100644 --- a/src/dotnet-interactive-vscode-common/src/kernelSelectorUtilities.ts +++ b/src/polyglot-notebooks-vscode-common/src/kernelSelectorUtilities.ts @@ -1,8 +1,8 @@ // Copyright (c) .NET Foundation and contributors. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. -import { CompositeKernel } from './dotnet-interactive'; -import * as contracts from './dotnet-interactive/contracts'; +import { CompositeKernel } from './polyglot-notebooks'; +import * as contracts from './polyglot-notebooks/contracts'; import * as metadataUtilities from './metadataUtilities'; import * as vscodeLike from './interfaces/vscode-like'; diff --git a/src/dotnet-interactive-vscode-common/src/languageConfigurationManager.ts b/src/polyglot-notebooks-vscode-common/src/languageConfigurationManager.ts similarity index 100% rename from src/dotnet-interactive-vscode-common/src/languageConfigurationManager.ts rename to src/polyglot-notebooks-vscode-common/src/languageConfigurationManager.ts diff --git a/src/dotnet-interactive-vscode-common/src/languageProvider.ts b/src/polyglot-notebooks-vscode-common/src/languageProvider.ts similarity index 100% rename from src/dotnet-interactive-vscode-common/src/languageProvider.ts rename to src/polyglot-notebooks-vscode-common/src/languageProvider.ts diff --git a/src/dotnet-interactive-vscode-common/src/languageServices/completion.ts b/src/polyglot-notebooks-vscode-common/src/languageServices/completion.ts similarity index 93% rename from src/dotnet-interactive-vscode-common/src/languageServices/completion.ts rename to src/polyglot-notebooks-vscode-common/src/languageServices/completion.ts index 3c06a08426..95e93498e8 100644 --- a/src/dotnet-interactive-vscode-common/src/languageServices/completion.ts +++ b/src/polyglot-notebooks-vscode-common/src/languageServices/completion.ts @@ -5,7 +5,7 @@ import { ClientMapper } from './../clientMapper'; import { PositionLike } from './interfaces'; import { Uri } from '../interfaces/vscode-like'; -import * as contracts from '../dotnet-interactive/contracts'; +import * as contracts from '../polyglot-notebooks/contracts'; import { debounceAndReject } from '../utilities'; export function provideCompletion(clientMapper: ClientMapper, kernelName: string, documentUri: Uri, documentText: string, position: PositionLike, languageServiceDelay: number, token?: string | undefined): Promise { diff --git a/src/dotnet-interactive-vscode-common/src/languageServices/hover.ts b/src/polyglot-notebooks-vscode-common/src/languageServices/hover.ts similarity index 100% rename from src/dotnet-interactive-vscode-common/src/languageServices/hover.ts rename to src/polyglot-notebooks-vscode-common/src/languageServices/hover.ts diff --git a/src/dotnet-interactive-vscode-common/src/languageServices/interfaces.ts b/src/polyglot-notebooks-vscode-common/src/languageServices/interfaces.ts similarity index 86% rename from src/dotnet-interactive-vscode-common/src/languageServices/interfaces.ts rename to src/polyglot-notebooks-vscode-common/src/languageServices/interfaces.ts index e00220cc5b..8276841fdf 100644 --- a/src/dotnet-interactive-vscode-common/src/languageServices/interfaces.ts +++ b/src/polyglot-notebooks-vscode-common/src/languageServices/interfaces.ts @@ -1,7 +1,7 @@ // Copyright (c) .NET Foundation and contributors. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. -import * as contracts from '../dotnet-interactive/contracts'; +import * as contracts from '../polyglot-notebooks/contracts'; export interface HoverResult { contents: string, diff --git a/src/dotnet-interactive-vscode-common/src/languageServices/signatureHelp.ts b/src/polyglot-notebooks-vscode-common/src/languageServices/signatureHelp.ts similarity index 93% rename from src/dotnet-interactive-vscode-common/src/languageServices/signatureHelp.ts rename to src/polyglot-notebooks-vscode-common/src/languageServices/signatureHelp.ts index 7f69c0f788..b2c29fd859 100644 --- a/src/dotnet-interactive-vscode-common/src/languageServices/signatureHelp.ts +++ b/src/polyglot-notebooks-vscode-common/src/languageServices/signatureHelp.ts @@ -4,7 +4,7 @@ import { ClientMapper } from './../clientMapper'; import { PositionLike } from './interfaces'; -import * as contracts from '../dotnet-interactive/contracts'; +import * as contracts from '../polyglot-notebooks/contracts'; import { debounceAndReject } from '../utilities'; import { Uri } from '../interfaces/vscode-like'; diff --git a/src/dotnet-interactive-vscode-common/src/lineReader.ts b/src/polyglot-notebooks-vscode-common/src/lineReader.ts similarity index 100% rename from src/dotnet-interactive-vscode-common/src/lineReader.ts rename to src/polyglot-notebooks-vscode-common/src/lineReader.ts diff --git a/src/dotnet-interactive-vscode-common/src/messageClient.ts b/src/polyglot-notebooks-vscode-common/src/messageClient.ts similarity index 100% rename from src/dotnet-interactive-vscode-common/src/messageClient.ts rename to src/polyglot-notebooks-vscode-common/src/messageClient.ts diff --git a/src/dotnet-interactive-vscode-common/src/metadataUtilities.ts b/src/polyglot-notebooks-vscode-common/src/metadataUtilities.ts similarity index 99% rename from src/dotnet-interactive-vscode-common/src/metadataUtilities.ts rename to src/polyglot-notebooks-vscode-common/src/metadataUtilities.ts index c3781be41d..3f2e8603b4 100644 --- a/src/dotnet-interactive-vscode-common/src/metadataUtilities.ts +++ b/src/polyglot-notebooks-vscode-common/src/metadataUtilities.ts @@ -1,8 +1,8 @@ // Copyright (c) .NET Foundation and contributors. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. -import { CompositeKernel } from './dotnet-interactive'; -import * as contracts from './dotnet-interactive/contracts'; +import { CompositeKernel } from './polyglot-notebooks'; +import * as contracts from './polyglot-notebooks/contracts'; import * as vscodeLike from './interfaces/vscode-like'; export interface NotebookDocumentMetadata { @@ -350,4 +350,4 @@ export function createDefaultNotebookDocumentMetadata(): NotebookDocumentMetadat function createDefaultNotebookCellMetadata(): NotebookCellMetadata { return {}; -} +} \ No newline at end of file diff --git a/src/dotnet-interactive-vscode-common/src/notebookCellStatusBarItemProvider.ts b/src/polyglot-notebooks-vscode-common/src/notebookCellStatusBarItemProvider.ts similarity index 96% rename from src/dotnet-interactive-vscode-common/src/notebookCellStatusBarItemProvider.ts rename to src/polyglot-notebooks-vscode-common/src/notebookCellStatusBarItemProvider.ts index ffebba9f7e..54d6911dfa 100644 --- a/src/dotnet-interactive-vscode-common/src/notebookCellStatusBarItemProvider.ts +++ b/src/polyglot-notebooks-vscode-common/src/notebookCellStatusBarItemProvider.ts @@ -1,108 +1,108 @@ -// Copyright (c) .NET Foundation and contributors. All rights reserved. -// Licensed under the MIT license. See LICENSE file in the project root for full license information. - -import * as vscode from 'vscode'; -import * as contracts from './dotnet-interactive/contracts'; -import * as metadataUtilities from './metadataUtilities'; -import * as versionSpecificFunctions from '../versionSpecificFunctions'; -import { ClientMapper } from './clientMapper'; -import { isKernelEventEnvelope } from './dotnet-interactive'; -import * as kernelSelectorUtilities from './kernelSelectorUtilities'; -import * as constants from './constants'; -import * as vscodeUtilities from './vscodeUtilities'; -import { ServiceCollection } from './serviceCollection'; - -const selectKernelCommandName = 'polyglot-notebook.selectCellKernel'; - -export function registerNotbookCellStatusBarItemProvider(context: vscode.ExtensionContext, clientMapper: ClientMapper) { - const cellItemProvider = new DotNetNotebookCellStatusBarItemProvider(clientMapper); - clientMapper.onClientCreate((_uri, client) => { - client.channel.receiver.subscribe({ - next: envelope => { - if (isKernelEventEnvelope(envelope) && envelope.eventType === contracts.KernelInfoProducedType) { - cellItemProvider.updateKernelDisplayNames(); - } - } - }); - }); - context.subscriptions.push(vscode.notebooks.registerNotebookCellStatusBarItemProvider(constants.NotebookViewType, cellItemProvider)); - context.subscriptions.push(vscode.notebooks.registerNotebookCellStatusBarItemProvider(constants.JupyterViewType, cellItemProvider)); // TODO: fix this - context.subscriptions.push(vscode.commands.registerCommand(selectKernelCommandName, async (cell?: vscode.NotebookCell) => { - if (cell) { - const client = await clientMapper.tryGetClient(cell.notebook.uri); - if (client) { - const availableOptions = kernelSelectorUtilities.getKernelSelectorOptions(client.kernel, cell.notebook, contracts.SubmitCodeType); - const availableDisplayOptions = availableOptions.map(o => o.displayValue); - const selectedDisplayOption = await vscode.window.showQuickPick(availableDisplayOptions, { title: 'Select kernel' }); - if (selectedDisplayOption) { - const selectedValueIndex = availableDisplayOptions.indexOf(selectedDisplayOption); - if (selectedValueIndex >= 0) { - const selectedKernelData = availableOptions[selectedValueIndex]; - const codeCell = await vscodeUtilities.ensureCellKernelKind(cell, vscode.NotebookCellKind.Code); - const notebookCellMetadata = metadataUtilities.getNotebookCellMetadataFromNotebookCellElement(cell); - if (notebookCellMetadata.kernelName !== selectedKernelData.kernelName) { - // update metadata - notebookCellMetadata.kernelName = selectedKernelData.kernelName; - const newRawMetadata = metadataUtilities.getRawNotebookCellMetadataFromNotebookCellMetadata(notebookCellMetadata); - const mergedMetadata = metadataUtilities.mergeRawMetadata(cell.metadata, newRawMetadata); - const _succeeded = await versionSpecificFunctions.replaceNotebookCellMetadata(codeCell.notebook.uri, codeCell.index, mergedMetadata); - - // update language configuration - ServiceCollection.Instance.LanguageConfigurationManager.ensureLanguageConfigurationForDocument(cell.document); - - // update tokens - await vscode.commands.executeCommand('polyglot-notebook.refreshSemanticTokens'); - } - } - } - } - } - })); -} - -function getNotebookDcoumentFromCellDocument(cellDocument: vscode.TextDocument): vscode.NotebookDocument | undefined { - const notebookDocument = vscode.workspace.notebookDocuments.find(notebook => notebook.getCells().some(cell => cell.document === cellDocument)); - return notebookDocument; -} - -class DotNetNotebookCellStatusBarItemProvider { - private _onDidChangeCellStatusBarItemsEmitter: vscode.EventEmitter = new vscode.EventEmitter(); - - onDidChangeCellStatusBarItems: vscode.Event = this._onDidChangeCellStatusBarItemsEmitter.event; - - constructor(private readonly clientMapper: ClientMapper) { - } - - async provideCellStatusBarItems(cell: vscode.NotebookCell, token: vscode.CancellationToken): Promise { - if (!metadataUtilities.isDotNetNotebook(cell.notebook) || cell.document.languageId === 'markdown') { - return []; - } - - const notebookMetadata = metadataUtilities.getNotebookDocumentMetadataFromNotebookDocument(cell.notebook); - const cellMetadata = metadataUtilities.getNotebookCellMetadataFromNotebookCellElement(cell); - const cellKernelName = cellMetadata.kernelName ?? notebookMetadata.kernelInfo.defaultKernelName; - const notebookDocument = getNotebookDcoumentFromCellDocument(cell.document); - const client = await this.clientMapper.tryGetClient(notebookDocument!.uri); // don't force client creation - let displayText: string; - if (client) { - const matchingKernel = client.kernel.childKernels.find(k => k.kernelInfo.localName === cellKernelName); - displayText = matchingKernel ? kernelSelectorUtilities.getKernelInfoDisplayValue(matchingKernel.kernelInfo) : cellKernelName; - } - else { - displayText = cellKernelName; - } - - const item = new vscode.NotebookCellStatusBarItem(displayText, vscode.NotebookCellStatusBarAlignment.Right); - const command: vscode.Command = { - title: '', - command: selectKernelCommandName, - arguments: [], - }; - item.command = command; - return [item]; - } - - updateKernelDisplayNames() { - this._onDidChangeCellStatusBarItemsEmitter.fire(); - } -} +// Copyright (c) .NET Foundation and contributors. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. + +import * as vscode from 'vscode'; +import * as contracts from './polyglot-notebooks/contracts'; +import * as metadataUtilities from './metadataUtilities'; +import * as versionSpecificFunctions from '../versionSpecificFunctions'; +import { ClientMapper } from './clientMapper'; +import { isKernelEventEnvelope } from './polyglot-notebooks'; +import * as kernelSelectorUtilities from './kernelSelectorUtilities'; +import * as constants from './constants'; +import * as vscodeUtilities from './vscodeUtilities'; +import { ServiceCollection } from './serviceCollection'; + +const selectKernelCommandName = 'polyglot-notebook.selectCellKernel'; + +export function registerNotbookCellStatusBarItemProvider(context: vscode.ExtensionContext, clientMapper: ClientMapper) { + const cellItemProvider = new DotNetNotebookCellStatusBarItemProvider(clientMapper); + clientMapper.onClientCreate((_uri, client) => { + client.channel.receiver.subscribe({ + next: envelope => { + if (isKernelEventEnvelope(envelope) && envelope.eventType === contracts.KernelInfoProducedType) { + cellItemProvider.updateKernelDisplayNames(); + } + } + }); + }); + context.subscriptions.push(vscode.notebooks.registerNotebookCellStatusBarItemProvider(constants.NotebookViewType, cellItemProvider)); + context.subscriptions.push(vscode.notebooks.registerNotebookCellStatusBarItemProvider(constants.JupyterViewType, cellItemProvider)); // TODO: fix this + context.subscriptions.push(vscode.commands.registerCommand(selectKernelCommandName, async (cell?: vscode.NotebookCell) => { + if (cell) { + const client = await clientMapper.tryGetClient(cell.notebook.uri); + if (client) { + const availableOptions = kernelSelectorUtilities.getKernelSelectorOptions(client.kernel, cell.notebook, contracts.SubmitCodeType); + const availableDisplayOptions = availableOptions.map(o => o.displayValue); + const selectedDisplayOption = await vscode.window.showQuickPick(availableDisplayOptions, { title: 'Select kernel' }); + if (selectedDisplayOption) { + const selectedValueIndex = availableDisplayOptions.indexOf(selectedDisplayOption); + if (selectedValueIndex >= 0) { + const selectedKernelData = availableOptions[selectedValueIndex]; + const codeCell = await vscodeUtilities.ensureCellKernelKind(cell, vscode.NotebookCellKind.Code); + const notebookCellMetadata = metadataUtilities.getNotebookCellMetadataFromNotebookCellElement(cell); + if (notebookCellMetadata.kernelName !== selectedKernelData.kernelName) { + // update metadata + notebookCellMetadata.kernelName = selectedKernelData.kernelName; + const newRawMetadata = metadataUtilities.getRawNotebookCellMetadataFromNotebookCellMetadata(notebookCellMetadata); + const mergedMetadata = metadataUtilities.mergeRawMetadata(cell.metadata, newRawMetadata); + const _succeeded = await versionSpecificFunctions.replaceNotebookCellMetadata(codeCell.notebook.uri, codeCell.index, mergedMetadata); + + // update language configuration + ServiceCollection.Instance.LanguageConfigurationManager.ensureLanguageConfigurationForDocument(cell.document); + + // update tokens + await vscode.commands.executeCommand('polyglot-notebook.refreshSemanticTokens'); + } + } + } + } + } + })); +} + +function getNotebookDcoumentFromCellDocument(cellDocument: vscode.TextDocument): vscode.NotebookDocument | undefined { + const notebookDocument = vscode.workspace.notebookDocuments.find(notebook => notebook.getCells().some(cell => cell.document === cellDocument)); + return notebookDocument; +} + +class DotNetNotebookCellStatusBarItemProvider { + private _onDidChangeCellStatusBarItemsEmitter: vscode.EventEmitter = new vscode.EventEmitter(); + + onDidChangeCellStatusBarItems: vscode.Event = this._onDidChangeCellStatusBarItemsEmitter.event; + + constructor(private readonly clientMapper: ClientMapper) { + } + + async provideCellStatusBarItems(cell: vscode.NotebookCell, token: vscode.CancellationToken): Promise { + if (!metadataUtilities.isDotNetNotebook(cell.notebook) || cell.document.languageId === 'markdown') { + return []; + } + + const notebookMetadata = metadataUtilities.getNotebookDocumentMetadataFromNotebookDocument(cell.notebook); + const cellMetadata = metadataUtilities.getNotebookCellMetadataFromNotebookCellElement(cell); + const cellKernelName = cellMetadata.kernelName ?? notebookMetadata.kernelInfo.defaultKernelName; + const notebookDocument = getNotebookDcoumentFromCellDocument(cell.document); + const client = await this.clientMapper.tryGetClient(notebookDocument!.uri); // don't force client creation + let displayText: string; + if (client) { + const matchingKernel = client.kernel.childKernels.find(k => k.kernelInfo.localName === cellKernelName); + displayText = matchingKernel ? kernelSelectorUtilities.getKernelInfoDisplayValue(matchingKernel.kernelInfo) : cellKernelName; + } + else { + displayText = cellKernelName; + } + + const item = new vscode.NotebookCellStatusBarItem(displayText, vscode.NotebookCellStatusBarAlignment.Right); + const command: vscode.Command = { + title: '', + command: selectKernelCommandName, + arguments: [], + }; + item.command = command; + return [item]; + } + + updateKernelDisplayNames() { + this._onDidChangeCellStatusBarItemsEmitter.fire(); + } +} diff --git a/src/dotnet-interactive-vscode-common/src/notebookParserServer.ts b/src/polyglot-notebooks-vscode-common/src/notebookParserServer.ts similarity index 98% rename from src/dotnet-interactive-vscode-common/src/notebookParserServer.ts rename to src/polyglot-notebooks-vscode-common/src/notebookParserServer.ts index 0ccb17781f..b2af02d165 100644 --- a/src/dotnet-interactive-vscode-common/src/notebookParserServer.ts +++ b/src/polyglot-notebooks-vscode-common/src/notebookParserServer.ts @@ -1,7 +1,7 @@ // Copyright (c) .NET Foundation and contributors. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. -import * as contracts from './dotnet-interactive/contracts'; +import * as contracts from './polyglot-notebooks/contracts'; import { MessageClient } from './messageClient'; import { isNotebookParserServerResponse, isNotebookParserServerError, isNotebookParseResponse, isNotebookSerializeResponse } from './interfaces/utilities'; import { Eol } from './interfaces'; diff --git a/src/dotnet-interactive-vscode-common/src/notebookWatcherService.ts b/src/polyglot-notebooks-vscode-common/src/notebookWatcherService.ts similarity index 97% rename from src/dotnet-interactive-vscode-common/src/notebookWatcherService.ts rename to src/polyglot-notebooks-vscode-common/src/notebookWatcherService.ts index a4f5e4d5de..2a4419a4c4 100644 --- a/src/dotnet-interactive-vscode-common/src/notebookWatcherService.ts +++ b/src/polyglot-notebooks-vscode-common/src/notebookWatcherService.ts @@ -4,7 +4,7 @@ import * as vscode from 'vscode'; import { ClientMapper } from './clientMapper'; import { InteractiveClient } from './interactiveClient'; -import { Disposable, Logger } from './dotnet-interactive'; +import { Disposable, Logger } from './polyglot-notebooks'; export type NotebookDelegate = { (notebook: vscode.NotebookDocument, client: InteractiveClient): void }; diff --git a/src/polyglot-notebooks-vscode-common/src/polyglot-notebooks b/src/polyglot-notebooks-vscode-common/src/polyglot-notebooks new file mode 120000 index 0000000000..8000f23e27 --- /dev/null +++ b/src/polyglot-notebooks-vscode-common/src/polyglot-notebooks @@ -0,0 +1 @@ +../../polyglot-notebooks/src \ No newline at end of file diff --git a/src/dotnet-interactive-vscode-common/src/serviceCollection.ts b/src/polyglot-notebooks-vscode-common/src/serviceCollection.ts similarity index 100% rename from src/dotnet-interactive-vscode-common/src/serviceCollection.ts rename to src/polyglot-notebooks-vscode-common/src/serviceCollection.ts diff --git a/src/dotnet-interactive-vscode-common/src/stdioDotnetInteractiveChannel.ts b/src/polyglot-notebooks-vscode-common/src/stdioDotnetInteractiveChannel.ts similarity index 97% rename from src/dotnet-interactive-vscode-common/src/stdioDotnetInteractiveChannel.ts rename to src/polyglot-notebooks-vscode-common/src/stdioDotnetInteractiveChannel.ts index 5a81c9494b..5f4724bff6 100644 --- a/src/dotnet-interactive-vscode-common/src/stdioDotnetInteractiveChannel.ts +++ b/src/polyglot-notebooks-vscode-common/src/stdioDotnetInteractiveChannel.ts @@ -10,7 +10,7 @@ import { KernelEventEnvelopeObserver, KernelReadyType, SubmitCodeType -} from './dotnet-interactive/contracts'; +} from './polyglot-notebooks/contracts'; import { ProcessStart } from './interfaces'; import { ReportChannel } from './interfaces/vscode-like'; import { LineReader } from './lineReader'; @@ -24,10 +24,10 @@ import { KernelCommandAndEventReceiver, KernelCommandAndEventSender, KernelCommandOrEventEnvelope -} from './dotnet-interactive/connection'; -import { DisposableSubscription } from './dotnet-interactive/disposables'; +} from './polyglot-notebooks/connection'; +import { DisposableSubscription } from './polyglot-notebooks/disposables'; import { Subject } from 'rxjs'; -import { Logger } from './dotnet-interactive/logger'; +import { Logger } from './polyglot-notebooks/logger'; export class StdioDotnetInteractiveChannel implements DotnetInteractiveChannel { private childProcess: cp.ChildProcessWithoutNullStreams | null; diff --git a/src/dotnet-interactive-vscode-common/src/utilities.ts b/src/polyglot-notebooks-vscode-common/src/utilities.ts similarity index 98% rename from src/dotnet-interactive-vscode-common/src/utilities.ts rename to src/polyglot-notebooks-vscode-common/src/utilities.ts index 8ef9480063..e59d77d50e 100644 --- a/src/dotnet-interactive-vscode-common/src/utilities.ts +++ b/src/polyglot-notebooks-vscode-common/src/utilities.ts @@ -7,9 +7,9 @@ import * as path from 'path'; import { v4 as uuid } from 'uuid'; import { InstallInteractiveArgs, ProcessStart } from "./interfaces"; import { NotebookCellOutput, NotebookCellOutputItem, ReportChannel, Uri } from './interfaces/vscode-like'; -import * as contracts from './dotnet-interactive/contracts'; +import * as contracts from './polyglot-notebooks/contracts'; import { OutputChannelAdapter } from './OutputChannelAdapter'; -import { Logger } from './dotnet-interactive'; +import { Logger } from './polyglot-notebooks'; export function executeSafe(command: string, args: Array, workingDirectory?: string | undefined): Promise<{ code: number, output: string, error: string }> { return new Promise<{ code: number, output: string, error: string }>(resolve => { diff --git a/src/dotnet-interactive-vscode-common/src/variableExplorer.ts b/src/polyglot-notebooks-vscode-common/src/variableExplorer.ts similarity index 96% rename from src/dotnet-interactive-vscode-common/src/variableExplorer.ts rename to src/polyglot-notebooks-vscode-common/src/variableExplorer.ts index 4f3d723cf7..bd50fd3e24 100644 --- a/src/dotnet-interactive-vscode-common/src/variableExplorer.ts +++ b/src/polyglot-notebooks-vscode-common/src/variableExplorer.ts @@ -1,206 +1,206 @@ -// Copyright (c) .NET Foundation and contributors. All rights reserved. -// Licensed under the MIT license. See LICENSE file in the project root for full license information. - -import * as path from 'path'; -import * as vscode from 'vscode'; -import { ClientMapper } from './clientMapper'; -import * as contracts from './dotnet-interactive/contracts'; -import * as utilities from './utilities'; -import * as versionSpecificFunctions from '../versionSpecificFunctions'; -import { Disposable } from './dotnet-interactive/disposables'; -import { isKernelEventEnvelope } from './dotnet-interactive'; -import * as kernelSelectorUtilities from './kernelSelectorUtilities'; -import * as vscodeLike from './interfaces/vscode-like'; -import { VariableGridRow, VariableInfo } from '../ui/types'; - -function debounce(callback: () => void) { - utilities.debounce('variable-explorer', 500, callback); -} - -export function registerVariableExplorer(context: vscode.ExtensionContext, clientMapper: ClientMapper) { - context.subscriptions.push(vscode.commands.registerCommand('polyglot-notebook.shareValueWith', async (variableInfo: VariableInfo | undefined) => { - const activeNotebookEditor = vscode.window.activeNotebookEditor; - if (variableInfo && activeNotebookEditor) { - const notebookDocument = versionSpecificFunctions.getNotebookDocumentFromEditor(activeNotebookEditor); - const client = await clientMapper.tryGetClient(notebookDocument.uri); - if (client) { - const kernelSelectorOptions = kernelSelectorUtilities.getKernelSelectorOptions(client.kernel, notebookDocument, contracts.SendValueType); - const kernelDisplayValues = kernelSelectorOptions.map(k => k.displayValue); - const selectedKernelDisplayName = await vscode.window.showQuickPick(kernelDisplayValues, { title: `Share value [${variableInfo.valueName}] from [${variableInfo.sourceKernelName}] to ...` }); - if (selectedKernelDisplayName) { - const targetKernelIndex = kernelDisplayValues.indexOf(selectedKernelDisplayName); - if (targetKernelIndex >= 0) { - const targetKernelSelectorOption = kernelSelectorOptions[targetKernelIndex]; - // ends with newline to make adding code easier - const code = `#!share --from ${variableInfo.sourceKernelName} ${variableInfo.valueName}\n`; - const command: contracts.SendEditableCode = { - kernelName: targetKernelSelectorOption.kernelName, - code, - }; - const commandEnvelope: contracts.KernelCommandEnvelope = { - commandType: contracts.SendEditableCodeType, - command, - }; - - await client.kernel.rootKernel.send(commandEnvelope); - } - } - } - } - })); - - const webViewProvider = new WatchWindowTableViewProvider(clientMapper, context.extensionPath); - context.subscriptions.push(vscode.window.registerWebviewViewProvider('polyglot-notebook-panel-values', webViewProvider, { webviewOptions: { retainContextWhenHidden: true } })); - - vscode.window.onDidChangeActiveNotebookEditor(async editor => { - const notebookUri = editor?.notebook.uri; - debounce(() => webViewProvider.showNotebookVariables(notebookUri)); - }); -} - -class WatchWindowTableViewProvider implements vscode.WebviewViewProvider { - private webview: vscode.Webview | undefined = undefined; - private clientMessageSubscriptions: Map = new Map(); - private notebookVariables: Map = new Map(); - private completedNotebookKernels: Map> = new Map(); - - constructor(private readonly clientMapper: ClientMapper, private readonly extensionPath: string) { - // on every new notebook, track it's completion events - clientMapper.onClientCreate((uri, client) => { - const subscription = client.channel.receiver.subscribe({ - next: (envelope) => { - if (isKernelEventEnvelope(envelope)) { - switch (envelope.eventType) { - case contracts.CommandSucceededType: - case contracts.CommandFailedType: - case contracts.CommandCancelledType: - if (envelope.command?.commandType === contracts.SubmitCodeType - || envelope.command?.commandType === contracts.SendValueType) { - - const completedKernels = this.completedNotebookKernels.get(uri) ?? new Set(); - const kernelName = envelope.command?.command?.targetKernelName; - if (kernelName) { - completedKernels.add(kernelName); - } - if ((envelope.routingSlip?.length ?? 0) > 0) { - const kernelUri = envelope.routingSlip![0]; - let kernel = client.kernel.findKernelByUri(kernelUri); - if (kernel) { - completedKernels.add(kernel.name); - } - } - - this.completedNotebookKernels.set(uri, completedKernels); - debounce(() => { - this.refreshVariables(uri).then(() => { - this.showNotebookVariables(vscode.window.activeNotebookEditor?.notebook.uri); - }); - }); - } - break; - } - } - } - }); - - this.clientMessageSubscriptions.set(uri, { - dispose: () => { - subscription.unsubscribe(); - this.completedNotebookKernels.delete(uri); - this.notebookVariables.delete(uri); - } - }); - }); - - // when the notebook is closed, stop tracking it's completion events - clientMapper.onClientDispose((uri, _client) => { - const disposable = this.clientMessageSubscriptions.get(uri); - if (disposable) { - disposable.dispose(); - } - }); - } - - async resolveWebviewView(webviewView: vscode.WebviewView, context: vscode.WebviewViewResolveContext, token: vscode.CancellationToken): Promise { - this.webview = webviewView.webview; - webviewView.webview.options = { - enableScripts: true, - enableCommandUris: true, - }; - this.webview.onDidReceiveMessage(message => { - const x = message; - if (message.command === 'shareValueWith') { - vscode.commands.executeCommand('polyglot-notebook.shareValueWith', message.variableInfo); - } - }); - - const jsFileUri = this.webview.asWebviewUri(vscode.Uri.file(path.join(this.extensionPath, 'resources', 'variable-grid.bundle.js'))); - const htmlFileUri = vscode.Uri.file(path.join(this.extensionPath, 'resources', 'index.variable-grid.html')); - - const decoder = new TextDecoder(); - let rawhtmlContent = await vscode.workspace.fs.readFile(htmlFileUri); - let htmlContent = decoder.decode(rawhtmlContent); - htmlContent = htmlContent.replace("variable-grid.bundle.js", jsFileUri.toString()); - - this.webview.html = htmlContent; - - const currentNotebookUri = vscode.window.activeNotebookEditor?.notebook.uri; - this.showNotebookVariables(currentNotebookUri); - } - - private setRows(rows: VariableGridRow[]) { - if (this.webview) { - this.webview.postMessage({ command: 'set-rows', rows }); - } - } - - showNotebookVariables(notebookUri: vscodeLike.Uri | undefined) { - let rows: VariableGridRow[] = []; - if (notebookUri) { - const cachedRows = this.notebookVariables.get(notebookUri); - rows = cachedRows ?? []; - } - - this.setRows(rows); - } - - async refreshVariables(uri: vscodeLike.Uri): Promise { - const rows: VariableGridRow[] = []; - const client = await this.clientMapper.tryGetClient(uri); - if (client) { - const allKernels = Array.from(client.kernel.childKernels.filter(k => k.kernelInfo.supportedKernelCommands.find(ci => ci.name === contracts.RequestValueInfosType))); - const kernels = allKernels.filter(kernel => { - return this.completedNotebookKernels.get(uri)?.has(kernel.name) ?? false; - }); - for (const kernel of kernels) { - try { - const valueInfos = await client.requestValueInfos(kernel.name); - for (const valueInfo of valueInfos.valueInfos) { - try { - const valueName = valueInfo.name; - const valueValue = valueInfo.formattedValue.value; - const typeName = valueInfo.typeName; - const displayName = kernelSelectorUtilities.getKernelInfoDisplayValue(kernel.kernelInfo); - - rows.push({ - name: valueName, - value: valueValue, - typeName: typeName, - kernelDisplayName: displayName, - kernelName: kernel.name - }); - } catch (e) { - // likely didn't support `RequestValue` - const x = e; - } - } - } catch (e) { - // likely didn't support `RequestValueInfos` - const x = e; - } - } - } - - this.notebookVariables.set(uri, rows); - } -} +// Copyright (c) .NET Foundation and contributors. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. + +import * as path from 'path'; +import * as vscode from 'vscode'; +import { ClientMapper } from './clientMapper'; +import * as contracts from './polyglot-notebooks/contracts'; +import * as utilities from './utilities'; +import * as versionSpecificFunctions from '../versionSpecificFunctions'; +import { Disposable } from './polyglot-notebooks/disposables'; +import { isKernelEventEnvelope } from './polyglot-notebooks'; +import * as kernelSelectorUtilities from './kernelSelectorUtilities'; +import * as vscodeLike from './interfaces/vscode-like'; +import { VariableGridRow, VariableInfo } from '../ui/types'; + +function debounce(callback: () => void) { + utilities.debounce('variable-explorer', 500, callback); +} + +export function registerVariableExplorer(context: vscode.ExtensionContext, clientMapper: ClientMapper) { + context.subscriptions.push(vscode.commands.registerCommand('polyglot-notebook.shareValueWith', async (variableInfo: VariableInfo | undefined) => { + const activeNotebookEditor = vscode.window.activeNotebookEditor; + if (variableInfo && activeNotebookEditor) { + const notebookDocument = versionSpecificFunctions.getNotebookDocumentFromEditor(activeNotebookEditor); + const client = await clientMapper.tryGetClient(notebookDocument.uri); + if (client) { + const kernelSelectorOptions = kernelSelectorUtilities.getKernelSelectorOptions(client.kernel, notebookDocument, contracts.SendValueType); + const kernelDisplayValues = kernelSelectorOptions.map(k => k.displayValue); + const selectedKernelDisplayName = await vscode.window.showQuickPick(kernelDisplayValues, { title: `Share value [${variableInfo.valueName}] from [${variableInfo.sourceKernelName}] to ...` }); + if (selectedKernelDisplayName) { + const targetKernelIndex = kernelDisplayValues.indexOf(selectedKernelDisplayName); + if (targetKernelIndex >= 0) { + const targetKernelSelectorOption = kernelSelectorOptions[targetKernelIndex]; + // ends with newline to make adding code easier + const code = `#!share --from ${variableInfo.sourceKernelName} ${variableInfo.valueName}\n`; + const command: contracts.SendEditableCode = { + kernelName: targetKernelSelectorOption.kernelName, + code, + }; + const commandEnvelope: contracts.KernelCommandEnvelope = { + commandType: contracts.SendEditableCodeType, + command, + }; + + await client.kernel.rootKernel.send(commandEnvelope); + } + } + } + } + })); + + const webViewProvider = new WatchWindowTableViewProvider(clientMapper, context.extensionPath); + context.subscriptions.push(vscode.window.registerWebviewViewProvider('polyglot-notebook-panel-values', webViewProvider, { webviewOptions: { retainContextWhenHidden: true } })); + + vscode.window.onDidChangeActiveNotebookEditor(async editor => { + const notebookUri = editor?.notebook.uri; + debounce(() => webViewProvider.showNotebookVariables(notebookUri)); + }); +} + +class WatchWindowTableViewProvider implements vscode.WebviewViewProvider { + private webview: vscode.Webview | undefined = undefined; + private clientMessageSubscriptions: Map = new Map(); + private notebookVariables: Map = new Map(); + private completedNotebookKernels: Map> = new Map(); + + constructor(private readonly clientMapper: ClientMapper, private readonly extensionPath: string) { + // on every new notebook, track it's completion events + clientMapper.onClientCreate((uri, client) => { + const subscription = client.channel.receiver.subscribe({ + next: (envelope) => { + if (isKernelEventEnvelope(envelope)) { + switch (envelope.eventType) { + case contracts.CommandSucceededType: + case contracts.CommandFailedType: + case contracts.CommandCancelledType: + if (envelope.command?.commandType === contracts.SubmitCodeType + || envelope.command?.commandType === contracts.SendValueType) { + + const completedKernels = this.completedNotebookKernels.get(uri) ?? new Set(); + const kernelName = envelope.command?.command?.targetKernelName; + if (kernelName) { + completedKernels.add(kernelName); + } + if ((envelope.routingSlip?.length ?? 0) > 0) { + const kernelUri = envelope.routingSlip![0]; + let kernel = client.kernel.findKernelByUri(kernelUri); + if (kernel) { + completedKernels.add(kernel.name); + } + } + + this.completedNotebookKernels.set(uri, completedKernels); + debounce(() => { + this.refreshVariables(uri).then(() => { + this.showNotebookVariables(vscode.window.activeNotebookEditor?.notebook.uri); + }); + }); + } + break; + } + } + } + }); + + this.clientMessageSubscriptions.set(uri, { + dispose: () => { + subscription.unsubscribe(); + this.completedNotebookKernels.delete(uri); + this.notebookVariables.delete(uri); + } + }); + }); + + // when the notebook is closed, stop tracking it's completion events + clientMapper.onClientDispose((uri, _client) => { + const disposable = this.clientMessageSubscriptions.get(uri); + if (disposable) { + disposable.dispose(); + } + }); + } + + async resolveWebviewView(webviewView: vscode.WebviewView, context: vscode.WebviewViewResolveContext, token: vscode.CancellationToken): Promise { + this.webview = webviewView.webview; + webviewView.webview.options = { + enableScripts: true, + enableCommandUris: true, + }; + this.webview.onDidReceiveMessage(message => { + const x = message; + if (message.command === 'shareValueWith') { + vscode.commands.executeCommand('polyglot-notebook.shareValueWith', message.variableInfo); + } + }); + + const jsFileUri = this.webview.asWebviewUri(vscode.Uri.file(path.join(this.extensionPath, 'resources', 'variable-grid.bundle.js'))); + const htmlFileUri = vscode.Uri.file(path.join(this.extensionPath, 'resources', 'index.variable-grid.html')); + + const decoder = new TextDecoder(); + let rawhtmlContent = await vscode.workspace.fs.readFile(htmlFileUri); + let htmlContent = decoder.decode(rawhtmlContent); + htmlContent = htmlContent.replace("variable-grid.bundle.js", jsFileUri.toString()); + + this.webview.html = htmlContent; + + const currentNotebookUri = vscode.window.activeNotebookEditor?.notebook.uri; + this.showNotebookVariables(currentNotebookUri); + } + + private setRows(rows: VariableGridRow[]) { + if (this.webview) { + this.webview.postMessage({ command: 'set-rows', rows }); + } + } + + showNotebookVariables(notebookUri: vscodeLike.Uri | undefined) { + let rows: VariableGridRow[] = []; + if (notebookUri) { + const cachedRows = this.notebookVariables.get(notebookUri); + rows = cachedRows ?? []; + } + + this.setRows(rows); + } + + async refreshVariables(uri: vscodeLike.Uri): Promise { + const rows: VariableGridRow[] = []; + const client = await this.clientMapper.tryGetClient(uri); + if (client) { + const allKernels = Array.from(client.kernel.childKernels.filter(k => k.kernelInfo.supportedKernelCommands.find(ci => ci.name === contracts.RequestValueInfosType))); + const kernels = allKernels.filter(kernel => { + return this.completedNotebookKernels.get(uri)?.has(kernel.name) ?? false; + }); + for (const kernel of kernels) { + try { + const valueInfos = await client.requestValueInfos(kernel.name); + for (const valueInfo of valueInfos.valueInfos) { + try { + const valueName = valueInfo.name; + const valueValue = valueInfo.formattedValue.value; + const typeName = valueInfo.typeName; + const displayName = kernelSelectorUtilities.getKernelInfoDisplayValue(kernel.kernelInfo); + + rows.push({ + name: valueName, + value: valueValue, + typeName: typeName, + kernelDisplayName: displayName, + kernelName: kernel.name + }); + } catch (e) { + // likely didn't support `RequestValue` + const x = e; + } + } + } catch (e) { + // likely didn't support `RequestValueInfos` + const x = e; + } + } + } + + this.notebookVariables.set(uri, rows); + } +} diff --git a/src/dotnet-interactive-vscode-common/src/vscodeUtilities.ts b/src/polyglot-notebooks-vscode-common/src/vscodeUtilities.ts similarity index 99% rename from src/dotnet-interactive-vscode-common/src/vscodeUtilities.ts rename to src/polyglot-notebooks-vscode-common/src/vscodeUtilities.ts index c29333228f..5828998477 100644 --- a/src/dotnet-interactive-vscode-common/src/vscodeUtilities.ts +++ b/src/polyglot-notebooks-vscode-common/src/vscodeUtilities.ts @@ -4,7 +4,7 @@ import * as os from 'os'; import * as vscode from 'vscode'; import { Eol, WindowsEol, NonWindowsEol } from "./interfaces"; -import { Diagnostic, DiagnosticSeverity, LinePosition, LinePositionSpan, DisplayElement, ErrorElement, InteractiveDocumentOutputElement, InteractiveDocument, InteractiveDocumentElement } from './dotnet-interactive/contracts'; +import { Diagnostic, DiagnosticSeverity, LinePosition, LinePositionSpan, DisplayElement, ErrorElement, InteractiveDocumentOutputElement, InteractiveDocument, InteractiveDocumentElement } from './polyglot-notebooks/contracts'; import * as metadataUtilities from './metadataUtilities'; import * as vscodeLike from './interfaces/vscode-like'; diff --git a/src/dotnet-interactive-vscode-common/tests/RecordingOutputChannel.ts b/src/polyglot-notebooks-vscode-common/tests/RecordingOutputChannel.ts similarity index 100% rename from src/dotnet-interactive-vscode-common/tests/RecordingOutputChannel.ts rename to src/polyglot-notebooks-vscode-common/tests/RecordingOutputChannel.ts diff --git a/src/dotnet-interactive-vscode-common/tests/acquisition.test.ts b/src/polyglot-notebooks-vscode-common/tests/acquisition.test.ts similarity index 100% rename from src/dotnet-interactive-vscode-common/tests/acquisition.test.ts rename to src/polyglot-notebooks-vscode-common/tests/acquisition.test.ts diff --git a/src/dotnet-interactive-vscode-common/tests/callbackTestTestDotnetInteractiveChannel.ts b/src/polyglot-notebooks-vscode-common/tests/callbackTestTestDotnetInteractiveChannel.ts similarity index 95% rename from src/dotnet-interactive-vscode-common/tests/callbackTestTestDotnetInteractiveChannel.ts rename to src/polyglot-notebooks-vscode-common/tests/callbackTestTestDotnetInteractiveChannel.ts index 211f32c3f7..141af7e50b 100644 --- a/src/dotnet-interactive-vscode-common/tests/callbackTestTestDotnetInteractiveChannel.ts +++ b/src/polyglot-notebooks-vscode-common/tests/callbackTestTestDotnetInteractiveChannel.ts @@ -2,8 +2,8 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. import * as rxjs from 'rxjs'; -import { IKernelCommandAndEventSender, IKernelCommandAndEventReceiver, KernelCommandAndEventSender, KernelCommandOrEventEnvelope, KernelCommandAndEventReceiver, isKernelCommandEnvelope } from '../../src/vscode-common/dotnet-interactive'; -import { CommandFailed, CommandFailedType, KernelEventEnvelope } from '../../src/vscode-common/dotnet-interactive/contracts'; +import { IKernelCommandAndEventSender, IKernelCommandAndEventReceiver, KernelCommandAndEventSender, KernelCommandOrEventEnvelope, KernelCommandAndEventReceiver, isKernelCommandEnvelope } from '../../src/vscode-common/polyglot-notebooks'; +import { CommandFailed, CommandFailedType, KernelEventEnvelope } from '../../src/vscode-common/polyglot-notebooks/contracts'; import { DotnetInteractiveChannel } from '../../src/vscode-common/DotnetInteractiveChannel'; // executes the given callback for the specified commands export class CallbackTestTestDotnetInteractiveChannel implements DotnetInteractiveChannel { diff --git a/src/dotnet-interactive-vscode-common/tests/client.test.ts b/src/polyglot-notebooks-vscode-common/tests/client.test.ts similarity index 99% rename from src/dotnet-interactive-vscode-common/tests/client.test.ts rename to src/polyglot-notebooks-vscode-common/tests/client.test.ts index 40f15ab443..18f63c3d1c 100644 --- a/src/dotnet-interactive-vscode-common/tests/client.test.ts +++ b/src/polyglot-notebooks-vscode-common/tests/client.test.ts @@ -9,7 +9,7 @@ const expect = chai.expect; import { ClientMapper } from '../../src/vscode-common/clientMapper'; import { TestDotnetInteractiveChannel } from './testDotnetInteractiveChannel'; import { CallbackTestTestDotnetInteractiveChannel } from './callbackTestTestDotnetInteractiveChannel'; -import { CodeSubmissionReceivedType, CompleteCodeSubmissionReceivedType, CommandSucceededType, DisplayedValueProducedType, ReturnValueProducedType, DisplayedValueUpdatedType, CommandFailedType, ErrorProducedType } from '../../src/vscode-common/dotnet-interactive/contracts'; +import { CodeSubmissionReceivedType, CompleteCodeSubmissionReceivedType, CommandSucceededType, DisplayedValueProducedType, ReturnValueProducedType, DisplayedValueUpdatedType, CommandFailedType, ErrorProducedType } from '../../src/vscode-common/polyglot-notebooks/contracts'; import { createUri, debounce, wait } from '../../src/vscode-common/utilities'; import * as vscodeLike from '../../src/vscode-common/interfaces/vscode-like'; import { createChannelConfig, decodeNotebookCellOutputs } from './utilities'; diff --git a/src/dotnet-interactive-vscode-common/tests/dynamicGrammarSemanticTokenProvider.test.ts b/src/polyglot-notebooks-vscode-common/tests/dynamicGrammarSemanticTokenProvider.test.ts similarity index 99% rename from src/dotnet-interactive-vscode-common/tests/dynamicGrammarSemanticTokenProvider.test.ts rename to src/polyglot-notebooks-vscode-common/tests/dynamicGrammarSemanticTokenProvider.test.ts index 9786c5e23f..7b8e9f5189 100644 --- a/src/dotnet-interactive-vscode-common/tests/dynamicGrammarSemanticTokenProvider.test.ts +++ b/src/polyglot-notebooks-vscode-common/tests/dynamicGrammarSemanticTokenProvider.test.ts @@ -1,13 +1,13 @@ // Copyright (c) .NET Foundation and contributors. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. -import * as contracts from '../../src/vscode-common/dotnet-interactive/contracts'; +import * as contracts from '../../src/vscode-common/polyglot-notebooks/contracts'; import * as fs from 'fs'; import * as path from 'path'; import * as vscodeLike from '../../src/vscode-common/interfaces/vscode-like'; import { expect } from 'chai'; import { DynamicGrammarSemanticTokenProvider, VSCodeExtensionLike, parseLanguageConfiguration } from '../../src/vscode-common/dynamicGrammarSemanticTokenProvider'; -import { Logger } from '../../src/vscode-common/dotnet-interactive'; +import { Logger } from '../../src/vscode-common/polyglot-notebooks'; describe('dynamic grammar tests', async () => { let logMessages: string[] = []; diff --git a/src/dotnet-interactive-vscode-common/tests/kernelSelectorUtilities.test.ts b/src/polyglot-notebooks-vscode-common/tests/kernelSelectorUtilities.test.ts similarity index 95% rename from src/dotnet-interactive-vscode-common/tests/kernelSelectorUtilities.test.ts rename to src/polyglot-notebooks-vscode-common/tests/kernelSelectorUtilities.test.ts index 5fdcc60b44..18e5654460 100644 --- a/src/dotnet-interactive-vscode-common/tests/kernelSelectorUtilities.test.ts +++ b/src/polyglot-notebooks-vscode-common/tests/kernelSelectorUtilities.test.ts @@ -1,11 +1,11 @@ // Copyright (c) .NET Foundation and contributors. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. -import * as contracts from '../../src/vscode-common/dotnet-interactive/contracts'; +import * as contracts from '../../src/vscode-common/polyglot-notebooks/contracts'; import * as kernelSelectorUtilities from '../../src/vscode-common/kernelSelectorUtilities'; import * as vscodeLike from '../../src/vscode-common/interfaces/vscode-like'; import { expect } from 'chai'; -import { CompositeKernel, Kernel } from '../../src/vscode-common/dotnet-interactive'; +import { CompositeKernel, Kernel } from '../../src/vscode-common/polyglot-notebooks'; describe('kernel selector utility tests', async () => { diff --git a/src/dotnet-interactive-vscode-common/tests/languageProvider.test.ts b/src/polyglot-notebooks-vscode-common/tests/languageProvider.test.ts similarity index 99% rename from src/dotnet-interactive-vscode-common/tests/languageProvider.test.ts rename to src/polyglot-notebooks-vscode-common/tests/languageProvider.test.ts index 538c1ff220..6758f8e862 100644 --- a/src/dotnet-interactive-vscode-common/tests/languageProvider.test.ts +++ b/src/polyglot-notebooks-vscode-common/tests/languageProvider.test.ts @@ -8,7 +8,7 @@ import { TestDotnetInteractiveChannel } from './testDotnetInteractiveChannel'; import { provideCompletion } from './../../src/vscode-common/languageServices/completion'; import { provideHover } from './../../src/vscode-common/languageServices/hover'; import { provideSignatureHelp } from '../../src/vscode-common/languageServices/signatureHelp'; -import { CommandSucceededType, CompletionsProducedType, HoverTextProducedType, SignatureHelpProducedType } from '../../src/vscode-common/dotnet-interactive/contracts'; +import { CommandSucceededType, CompletionsProducedType, HoverTextProducedType, SignatureHelpProducedType } from '../../src/vscode-common/polyglot-notebooks/contracts'; import { createUri } from '../../src/vscode-common/utilities'; import { createChannelConfig } from './utilities'; diff --git a/src/dotnet-interactive-vscode-common/tests/lineReader.test.ts b/src/polyglot-notebooks-vscode-common/tests/lineReader.test.ts similarity index 100% rename from src/dotnet-interactive-vscode-common/tests/lineReader.test.ts rename to src/polyglot-notebooks-vscode-common/tests/lineReader.test.ts diff --git a/src/dotnet-interactive-vscode-common/tests/messageClient.test.ts b/src/polyglot-notebooks-vscode-common/tests/messageClient.test.ts similarity index 100% rename from src/dotnet-interactive-vscode-common/tests/messageClient.test.ts rename to src/polyglot-notebooks-vscode-common/tests/messageClient.test.ts diff --git a/src/dotnet-interactive-vscode-common/tests/metadataUtilities.test.ts b/src/polyglot-notebooks-vscode-common/tests/metadataUtilities.test.ts similarity index 99% rename from src/dotnet-interactive-vscode-common/tests/metadataUtilities.test.ts rename to src/polyglot-notebooks-vscode-common/tests/metadataUtilities.test.ts index ba2bd07133..9cb7951dab 100644 --- a/src/dotnet-interactive-vscode-common/tests/metadataUtilities.test.ts +++ b/src/polyglot-notebooks-vscode-common/tests/metadataUtilities.test.ts @@ -1,11 +1,11 @@ // Copyright (c) .NET Foundation and contributors. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. -import * as contracts from '../../src/vscode-common/dotnet-interactive/contracts'; +import * as contracts from '../../src/vscode-common/polyglot-notebooks/contracts'; import * as metadataUtilities from '../../src/vscode-common/metadataUtilities'; import * as vscodeLike from '../../src/vscode-common/interfaces/vscode-like'; import { expect } from 'chai'; -import { CompositeKernel, Kernel } from '../../src/vscode-common/dotnet-interactive'; +import { CompositeKernel, Kernel } from '../../src/vscode-common/polyglot-notebooks'; describe('metadata utility tests', async () => { @@ -742,4 +742,4 @@ describe('metadata utility tests', async () => { }); }); -}); +}); \ No newline at end of file diff --git a/src/dotnet-interactive-vscode-common/tests/misc.test.ts b/src/polyglot-notebooks-vscode-common/tests/misc.test.ts similarity index 99% rename from src/dotnet-interactive-vscode-common/tests/misc.test.ts rename to src/polyglot-notebooks-vscode-common/tests/misc.test.ts index b9b7bf8069..eab01843a8 100644 --- a/src/dotnet-interactive-vscode-common/tests/misc.test.ts +++ b/src/polyglot-notebooks-vscode-common/tests/misc.test.ts @@ -2,7 +2,7 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. import { expect } from 'chai'; -import { DisplayElement, ErrorElement, TextElement } from '../../src/vscode-common/dotnet-interactive/contracts'; +import { DisplayElement, ErrorElement, TextElement } from '../../src/vscode-common/polyglot-notebooks/contracts'; import { isDisplayOutput, isErrorOutput, isTextOutput, reshapeOutputValueForVsCode } from '../../src/vscode-common/interfaces/utilities'; import { createUri, debounce, executeSafe, getVersionNumber, getWorkingDirectoryForNotebook, parse, processArguments, stringify } from '../../src/vscode-common/utilities'; import { decodeToString } from './utilities'; diff --git a/src/dotnet-interactive-vscode-common/tests/notebook.test.ts b/src/polyglot-notebooks-vscode-common/tests/notebook.test.ts similarity index 99% rename from src/dotnet-interactive-vscode-common/tests/notebook.test.ts rename to src/polyglot-notebooks-vscode-common/tests/notebook.test.ts index 194a571b3a..db9017d613 100644 --- a/src/dotnet-interactive-vscode-common/tests/notebook.test.ts +++ b/src/polyglot-notebooks-vscode-common/tests/notebook.test.ts @@ -21,7 +21,7 @@ import { DisplayedValueUpdatedType, ReturnValueProducedType, StandardOutputValueProducedType, -} from '../../src/vscode-common/dotnet-interactive/contracts'; +} from '../../src/vscode-common/polyglot-notebooks/contracts'; import { createChannelConfig, decodeNotebookCellOutputs, withFakeGlobalStorageLocation } from './utilities'; import { createUri } from '../../src/vscode-common/utilities'; import { backupNotebook, languageToCellKind } from '../../src/vscode-common/interactiveNotebook'; diff --git a/src/dotnet-interactive-vscode-common/tests/testDotnetInteractiveChannel.ts b/src/polyglot-notebooks-vscode-common/tests/testDotnetInteractiveChannel.ts similarity index 95% rename from src/dotnet-interactive-vscode-common/tests/testDotnetInteractiveChannel.ts rename to src/polyglot-notebooks-vscode-common/tests/testDotnetInteractiveChannel.ts index a4601674d0..cd63ecfe3e 100644 --- a/src/dotnet-interactive-vscode-common/tests/testDotnetInteractiveChannel.ts +++ b/src/polyglot-notebooks-vscode-common/tests/testDotnetInteractiveChannel.ts @@ -1,8 +1,8 @@ // Copyright (c) .NET Foundation and contributors. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. -import { IKernelCommandAndEventSender, IKernelCommandAndEventReceiver, KernelCommandOrEventEnvelope, isKernelCommandEnvelope, KernelCommandAndEventReceiver, KernelCommandAndEventSender } from '../../src/vscode-common/dotnet-interactive'; -import * as contracts from '../../src/vscode-common/dotnet-interactive/contracts'; +import { IKernelCommandAndEventSender, IKernelCommandAndEventReceiver, KernelCommandOrEventEnvelope, isKernelCommandEnvelope, KernelCommandAndEventReceiver, KernelCommandAndEventSender } from '../../src/vscode-common/polyglot-notebooks'; +import * as contracts from '../../src/vscode-common/polyglot-notebooks/contracts'; import { DotnetInteractiveChannel } from '../../src/vscode-common/DotnetInteractiveChannel'; import * as rxjs from 'rxjs'; diff --git a/src/dotnet-interactive-vscode-common/tests/utilities.ts b/src/polyglot-notebooks-vscode-common/tests/utilities.ts similarity index 97% rename from src/dotnet-interactive-vscode-common/tests/utilities.ts rename to src/polyglot-notebooks-vscode-common/tests/utilities.ts index 0276b7ad5b..52fbedda53 100644 --- a/src/dotnet-interactive-vscode-common/tests/utilities.ts +++ b/src/polyglot-notebooks-vscode-common/tests/utilities.ts @@ -1,7 +1,7 @@ // Copyright (c) .NET Foundation and contributors. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. -import * as contracts from '../../src/vscode-common/dotnet-interactive/contracts'; +import * as contracts from '../../src/vscode-common/polyglot-notebooks/contracts'; import * as fs from 'fs'; import * as path from 'path'; import * as tmp from 'tmp'; diff --git a/src/dotnet-interactive-vscode-insiders/.eslintignore b/src/polyglot-notebooks-vscode-insiders/.eslintignore similarity index 100% rename from src/dotnet-interactive-vscode-insiders/.eslintignore rename to src/polyglot-notebooks-vscode-insiders/.eslintignore diff --git a/src/dotnet-interactive-vscode-insiders/.eslintrc.json b/src/polyglot-notebooks-vscode-insiders/.eslintrc.json similarity index 100% rename from src/dotnet-interactive-vscode-insiders/.eslintrc.json rename to src/polyglot-notebooks-vscode-insiders/.eslintrc.json diff --git a/src/dotnet-interactive-vscode-insiders/.gitignore b/src/polyglot-notebooks-vscode-insiders/.gitignore similarity index 100% rename from src/dotnet-interactive-vscode-insiders/.gitignore rename to src/polyglot-notebooks-vscode-insiders/.gitignore diff --git a/src/dotnet-interactive-vscode/.npmrc b/src/polyglot-notebooks-vscode-insiders/.npmrc similarity index 100% rename from src/dotnet-interactive-vscode/.npmrc rename to src/polyglot-notebooks-vscode-insiders/.npmrc diff --git a/src/dotnet-interactive-vscode/.vscode/extensions.json b/src/polyglot-notebooks-vscode-insiders/.vscode/extensions.json similarity index 100% rename from src/dotnet-interactive-vscode/.vscode/extensions.json rename to src/polyglot-notebooks-vscode-insiders/.vscode/extensions.json diff --git a/src/dotnet-interactive-vscode-insiders/.vscode/launch.json b/src/polyglot-notebooks-vscode-insiders/.vscode/launch.json similarity index 100% rename from src/dotnet-interactive-vscode-insiders/.vscode/launch.json rename to src/polyglot-notebooks-vscode-insiders/.vscode/launch.json diff --git a/src/dotnet-interactive-vscode-insiders/.vscode/settings.json b/src/polyglot-notebooks-vscode-insiders/.vscode/settings.json similarity index 100% rename from src/dotnet-interactive-vscode-insiders/.vscode/settings.json rename to src/polyglot-notebooks-vscode-insiders/.vscode/settings.json diff --git a/src/dotnet-interactive-vscode-insiders/.vscode/tasks.json b/src/polyglot-notebooks-vscode-insiders/.vscode/tasks.json similarity index 100% rename from src/dotnet-interactive-vscode-insiders/.vscode/tasks.json rename to src/polyglot-notebooks-vscode-insiders/.vscode/tasks.json diff --git a/src/dotnet-interactive-vscode-insiders/.vscodeignore b/src/polyglot-notebooks-vscode-insiders/.vscodeignore similarity index 100% rename from src/dotnet-interactive-vscode-insiders/.vscodeignore rename to src/polyglot-notebooks-vscode-insiders/.vscodeignore diff --git a/src/dotnet-interactive-vscode-insiders/License.txt b/src/polyglot-notebooks-vscode-insiders/License.txt similarity index 100% rename from src/dotnet-interactive-vscode-insiders/License.txt rename to src/polyglot-notebooks-vscode-insiders/License.txt diff --git a/src/dotnet-interactive-vscode-insiders/README.md b/src/polyglot-notebooks-vscode-insiders/README.md similarity index 100% rename from src/dotnet-interactive-vscode-insiders/README.md rename to src/polyglot-notebooks-vscode-insiders/README.md diff --git a/src/dotnet-interactive-vscode-insiders/grammars/http.language-configuration.json b/src/polyglot-notebooks-vscode-insiders/grammars/http.language-configuration.json similarity index 100% rename from src/dotnet-interactive-vscode-insiders/grammars/http.language-configuration.json rename to src/polyglot-notebooks-vscode-insiders/grammars/http.language-configuration.json diff --git a/src/dotnet-interactive-vscode-insiders/grammars/http.tmGrammar.json b/src/polyglot-notebooks-vscode-insiders/grammars/http.tmGrammar.json similarity index 100% rename from src/dotnet-interactive-vscode-insiders/grammars/http.tmGrammar.json rename to src/polyglot-notebooks-vscode-insiders/grammars/http.tmGrammar.json diff --git a/src/dotnet-interactive-vscode-insiders/grammars/kql.language-configuration.json b/src/polyglot-notebooks-vscode-insiders/grammars/kql.language-configuration.json similarity index 100% rename from src/dotnet-interactive-vscode-insiders/grammars/kql.language-configuration.json rename to src/polyglot-notebooks-vscode-insiders/grammars/kql.language-configuration.json diff --git a/src/dotnet-interactive-vscode-insiders/grammars/kql.tmGrammar.json b/src/polyglot-notebooks-vscode-insiders/grammars/kql.tmGrammar.json similarity index 100% rename from src/dotnet-interactive-vscode-insiders/grammars/kql.tmGrammar.json rename to src/polyglot-notebooks-vscode-insiders/grammars/kql.tmGrammar.json diff --git a/src/dotnet-interactive-vscode-insiders/help/DotNetVersion.md b/src/polyglot-notebooks-vscode-insiders/help/DotNetVersion.md similarity index 97% rename from src/dotnet-interactive-vscode-insiders/help/DotNetVersion.md rename to src/polyglot-notebooks-vscode-insiders/help/DotNetVersion.md index 1575ba9000..f32e7e0d0d 100644 --- a/src/dotnet-interactive-vscode-insiders/help/DotNetVersion.md +++ b/src/polyglot-notebooks-vscode-insiders/help/DotNetVersion.md @@ -1,6 +1,6 @@ -# .NET 7 SDK **REQUIRED** - -## The Polyglot Notebooks extension now requires .NET SDK Version 7.0 or higher. - -## 1. Install [here](https://dotnet.microsoft.com/en-us/download) -## 2. Restart VS Code +# .NET 7 SDK **REQUIRED** + +## The Polyglot Notebooks extension now requires .NET SDK Version 7.0 or higher. + +## 1. Install [here](https://dotnet.microsoft.com/en-us/download) +## 2. Restart VS Code diff --git a/src/dotnet-interactive-vscode-insiders/images/icon.png b/src/polyglot-notebooks-vscode-insiders/images/icon.png similarity index 100% rename from src/dotnet-interactive-vscode-insiders/images/icon.png rename to src/polyglot-notebooks-vscode-insiders/images/icon.png diff --git a/src/dotnet-interactive-vscode-insiders/package-lock.json b/src/polyglot-notebooks-vscode-insiders/package-lock.json similarity index 100% rename from src/dotnet-interactive-vscode-insiders/package-lock.json rename to src/polyglot-notebooks-vscode-insiders/package-lock.json diff --git a/src/dotnet-interactive-vscode-insiders/package.json b/src/polyglot-notebooks-vscode-insiders/package.json similarity index 96% rename from src/dotnet-interactive-vscode-insiders/package.json rename to src/polyglot-notebooks-vscode-insiders/package.json index 7e569d2355..46fa2b78ee 100644 --- a/src/dotnet-interactive-vscode-insiders/package.json +++ b/src/polyglot-notebooks-vscode-insiders/package.json @@ -1,778 +1,778 @@ -{ - "name": "dotnet-interactive-vscode", - "displayName": "Polyglot Notebooks", - "description": "Polyglot Notebooks for VS Code. Use multiple languages in one notebook with full language server support for each language and share variables between them.", - "icon": "images/icon.png", - "publisher": "ms-dotnettools", - "author": "Microsoft Corporation", - "license": "MIT", - "enabledApiProposals": [ - "notebookMessaging" - ], - "preview": true, - "//version": "The version '42.42.42' is auto-set during CI package creation.", - "version": "42.42.42", - "engines": { - "vscode": "1.76.0-insider" - }, - "bugs": { - "url": "https://github.com/dotnet/interactive/issues" - }, - "repository": { - "url": "https://github.com/dotnet/interactive" - }, - "categories": [ - "Data Science", - "Machine Learning", - "Notebooks", - "Visualization" - ], - "keywords": [ - ".NET", - "interactive", - "C#", - "data science", - "dotnet", - "F#", - "ipynb", - "Jupyter", - "notebooks", - "PowerShell" - ], - "activationEvents": [ - "onUri", - "onNotebook:dotnet-interactive", - "onNotebook:dotnet-interactive-window", - "onNotebook:jupyter-notebook", - "onNotebook:polyglot-notebook", - "onNotebook:polyglot-notebook-window", - "onNotebook:jupyter-notebook", - "onCommand:dotnet-interactive.acquire", - "onCommand:polyglot-notebook.newNotebook", - "onCommand:polyglot-notebook.openNotebook", - "onCommand:polyglot-notebook.saveAsNotebook", - "onView:polyglot-notebook-panel-values" - ], - "main": "./out/src/vscode-common/extension.js", - "extensionDependencies": [ - "ms-toolsai.jupyter" - ], - "capabilities": { - "untrustedWorkspaces": { - "supported": "limited", - "description": "Execution of cells in Interactive Window and Notebooks is not supported in untrusted workspaces." - }, - "virtualWorkspaces": true - }, - "contributes": { - "notebooks": [ - { - "type": "polyglot-notebook", - "displayName": "Polyglot Notebook", - "selector": [ - { - "filenamePattern": "*.dib" - } - ] - }, - { - "type": "polyglot-nortebook-window", - "displayName": "Polyglot Notebook", - "selector": [] - } - ], - "jupyter.kernels": [ - { - "title": ".NET Interactive (C#)", - "defaultlanguage": "polyglot-notebook" - }, - { - "title": ".NET Interactive (F#)", - "defaultlanguage": "polyglot-notebook" - }, - { - "title": ".NET Interactive (PowerShell)", - "defaultlanguage": "polyglot-notebook" - } - ], - "configuration": { - "title": "Polyglot Notebook", - "properties": { - "polyglot-notebook.kernelEnvironmentVariables": { - "type": "object", - "default": {}, - "description": "Environment variables to set when starting a notebook session." - }, - "polyglot-notebook.languageServiceDelay": { - "type": "number", - "default": 500, - "description": "The delay in ms before language services are invoked." - }, - "polyglot-notebook.logLevel": { - "type": "string", - "default": "Error", - "enum": [ - "Info", - "Warn", - "Error", - "None" - ], - "enumDescriptions": [ - "Logs informational messages", - "Logs warning messages", - "Logs error messages", - "Disables logging" - ] - }, - "dotnet-interactive.kernelTransportArgs": { - "type": "array", - "default": [ - "{dotnet_path}", - "tool", - "run", - "dotnet-interactive", - "--", - "[vscode]", - "stdio", - "--working-dir", - "{working_dir}" - ], - "description": "Command and arguments used to start a notebook session." - }, - "dotnet-interactive.notebookParserArgs": { - "type": "array", - "default": [ - "{dotnet_path}", - "tool", - "run", - "dotnet-interactive", - "--", - "notebook-parser" - ] - }, - "dotnet-interactive.kernelTransportWorkingDirectory": { - "type": "string", - "default": "{global_storage_path}", - "description": "The working directory in which the kernel transport process is started." - }, - "dotnet-interactive.interactiveToolSource": { - "type": "string", - "default": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools/nuget/v3/index.json", - "description": "The NuGet source to use when acquiring the .NET Interactive tool." - }, - "dotnet-interactive.minimumDotNetSdkVersion": { - "type": "string", - "default": "7.0", - "description": "The minimum required version of the .NET SDK." - }, - "dotnet-interactive.requiredInteractiveToolVersion": { - "type": "string", - "default": "1.0.408001", - "description": "The required version of the .NET Interactive tool." - } - } - }, - "viewsContainers": { - "panel": [ - { - "id": "polyglot-notebook-panel", - "title": "Polyglot Notebook", - "icon": "resources/icons/notebook.svg" - } - ] - }, - "views": { - "polyglot-notebook-panel": [ - { - "type": "webview", - "id": "polyglot-notebook-panel-values", - "name": "Variables", - "icon": "resources/icons/notebook.svg" - } - ] - }, - "commands": [ - { - "command": "dotnet-interactive.acquire", - "title": "Install .NET Interactive" - }, - { - "command": "polyglot-notebook.openNotebook", - "title": "Polyglot Notebook: Open notebook" - }, - { - "command": "polyglot-notebook.saveAsNotebook", - "title": "Polyglot Notebook: Save notebook as..." - }, - { - "command": "polyglot-notebook.newNotebook", - "title": "Polyglot Notebook: Create new blank notebook" - }, - { - "command": "polyglot-notebook.restartCurrentNotebookKernel", - "title": "Polyglot Notebook: Restart the current notebook's kernel" - }, - { - "command": "polyglot-notebook.stopCurrentNotebookKernel", - "title": "Polyglot Notebook: Stop the current notebook's kernel" - }, - { - "command": "polyglot-notebook.stopAllNotebookKernels", - "title": "Polyglot Notebook: Stop all notebook kernels" - }, - { - "command": "polyglot-notebook.shareValueWith", - "title": "Share value with..." - }, - { - "command": "polyglot-notebook.selectCellKernel", - "title": "Polyglot Notebook: Select cell kernel" - }, - { - "command": "polyglot-notebook.notebookEditor.restartKernel", - "title": "Restart", - "icon": { - "light": "resources/light/restart-kernel.svg", - "dark": "resources/dark/restart-kernel.svg" - } - }, - { - "command": "polyglot-notebook.notebookEditor.openValueViewer", - "title": "Variables", - "icon": "$(variable-group)" - } - ], - "keybindings": [ - { - "command": "polyglot-notebook.newNotebook", - "key": "ctrl+alt+shift+n", - "mac": "cmd+alt+shift+n" - } - ], - "languages": [ - { - "id": "polyglot-notebook", - "aliases": [ - "Code" - ] - } - ], - "menus": { - "notebook/toolbar": [ - { - "command": "polyglot-notebook.notebookEditor.restartKernel", - "group": "navigation/execute@1", - "when": "notebookKernel =~ /polyglot-notebook/ && isWorkspaceTrusted" - }, - { - "command": "polyglot-notebook.notebookEditor.openValueViewer", - "group": "navigation@1", - "when": "notebookKernel =~ /polyglot-notebook/ && isWorkspaceTrusted" - } - ] - }, - "semanticTokenScopes": [ - { - "comment": "the `scopes` object is generated by a script", - "scopes": { - "polyglot-notebook-entity-name-function": [ - "entity.name.function" - ], - "polyglot-notebook-entity-name-variable-local": [ - "entity.name.variable.local" - ], - "polyglot-notebook-entity-name-type": [ - "entity.name.type" - ], - "polyglot-notebook-entity-name-type-namespace": [ - "entity.name.type.namespace" - ], - "polyglot-notebook-punctuation-accessor": [ - "punctuation.accessor" - ], - "polyglot-notebook-punctuation-definition-variable": [ - "punctuation.definition.variable" - ], - "polyglot-notebook-punctuation-parenthesis": [ - "punctuation.parenthesis" - ], - "polyglot-notebook-punctuation-terminator-statement": [ - "punctuation.terminator.statement" - ], - "polyglot-notebook-variable-other-object": [ - "variable.other.object" - ], - "polyglot-notebook-variable-other-readwrite": [ - "variable.other.readwrite" - ], - "polyglot-notebook-variable-other-readwrite-global": [ - "variable.other.readwrite.global" - ], - "polyglot-notebook-meta-bracket": [ - "meta.bracket" - ], - "polyglot-notebook-meta-attribute": [ - "meta.attribute" - ], - "polyglot-notebook-meta-function": [ - "meta.function" - ], - "polyglot-notebook-meta-function-call-arguments": [ - "meta.function-call.arguments" - ], - "polyglot-notebook-meta-function-call-generic": [ - "meta.function-call.generic" - ], - "polyglot-notebook-meta-indexed-name": [ - "meta.indexed-name" - ], - "polyglot-notebook-meta-item-access-arguments": [ - "meta.item-access.arguments" - ], - "polyglot-notebook-punctuation-definition-arguments-begin": [ - "punctuation.definition.arguments.begin" - ], - "polyglot-notebook-punctuation-definition-arguments-end": [ - "punctuation.definition.arguments.end" - ], - "polyglot-notebook-punctuation-definition-list-begin": [ - "punctuation.definition.list.begin" - ], - "polyglot-notebook-punctuation-definition-list-end": [ - "punctuation.definition.list.end" - ], - "polyglot-notebook-punctuation-definition-parameters-begin": [ - "punctuation.definition.parameters.begin" - ], - "polyglot-notebook-punctuation-definition-parameters-end": [ - "punctuation.definition.parameters.end" - ], - "polyglot-notebook-punctuation-section-function-begin": [ - "punctuation.section.function.begin" - ], - "polyglot-notebook-punctuation-section-function-end": [ - "punctuation.section.function.end" - ], - "polyglot-notebook-punctuation-separator-element": [ - "punctuation.separator.element" - ], - "polyglot-notebook-punctuation-separator-colon": [ - "punctuation.separator.colon" - ], - "polyglot-notebook-punctuation-separator-period": [ - "punctuation.separator.period" - ], - "polyglot-notebook-punctuation-separator-slice": [ - "punctuation.separator.slice" - ], - "polyglot-notebook-variable-parameter-function-call": [ - "variable.parameter.function-call" - ], - "polyglot-notebook-punctuation-section-brackets-single-begin": [ - "punctuation.section.brackets.single.begin" - ], - "polyglot-notebook-punctuation-section-brackets-single-end": [ - "punctuation.section.brackets.single.end" - ], - "polyglot-notebook-punctuation-section-parens-begin": [ - "punctuation.section.parens.begin" - ], - "polyglot-notebook-punctuation-section-parens-end": [ - "punctuation.section.parens.end" - ], - "polyglot-notebook-punctuation-separator-parameters": [ - "punctuation.separator.parameters" - ], - "polyglot-notebook-support-function": [ - "support.function" - ], - "polyglot-notebook-variable-other": [ - "variable.other" - ], - "polyglot-notebook-variable-function": [ - "variable.function" - ], - "polyglot-notebook-variable-parameter": [ - "variable.parameter" - ], - "polyglot-notebook-meta-group-simple-subexpression": [ - "meta.group.simple.subexpression" - ], - "polyglot-notebook-punctuation-section-group-begin": [ - "punctuation.section.group.begin" - ], - "polyglot-notebook-punctuation-section-group-end": [ - "punctuation.section.group.end" - ], - "polyglot-notebook-meta-embedded": [ - "meta.embedded" - ], - "polyglot-notebook-source-groovy-embedded": [ - "source.groovy.embedded" - ], - "polyglot-notebook-emphasis": [ - "emphasis" - ], - "polyglot-notebook-strong": [ - "strong" - ], - "polyglot-notebook-meta-diff-header": [ - "meta.diff.header" - ], - "polyglot-notebook-comment": [ - "comment" - ], - "polyglot-notebook-constant-language": [ - "constant.language" - ], - "polyglot-notebook-constant-numeric": [ - "constant.numeric" - ], - "polyglot-notebook-variable-other-enummember": [ - "variable.other.enummember" - ], - "polyglot-notebook-keyword-operator-plus-exponent": [ - "keyword.operator.plus.exponent" - ], - "polyglot-notebook-keyword-operator-minus-exponent": [ - "keyword.operator.minus.exponent" - ], - "polyglot-notebook-constant-regexp": [ - "constant.regexp" - ], - "polyglot-notebook-entity-name-tag": [ - "entity.name.tag" - ], - "polyglot-notebook-entity-name-selector": [ - "entity.name.selector" - ], - "polyglot-notebook-entity-other-attribute-name": [ - "entity.other.attribute-name" - ], - "polyglot-notebook-entity-other-attribute-name-class-css": [ - "entity.other.attribute-name.class.css" - ], - "polyglot-notebook-entity-other-attribute-name-class-mixin-css": [ - "entity.other.attribute-name.class.mixin.css" - ], - "polyglot-notebook-entity-other-attribute-name-id-css": [ - "entity.other.attribute-name.id.css" - ], - "polyglot-notebook-entity-other-attribute-name-parent-selector-css": [ - "entity.other.attribute-name.parent-selector.css" - ], - "polyglot-notebook-entity-other-attribute-name-pseudo-class-css": [ - "entity.other.attribute-name.pseudo-class.css" - ], - "polyglot-notebook-entity-other-attribute-name-pseudo-element-css": [ - "entity.other.attribute-name.pseudo-element.css" - ], - "polyglot-notebook-entity-other-attribute-name-scss": [ - "entity.other.attribute-name.scss" - ], - "polyglot-notebook-invalid": [ - "invalid" - ], - "polyglot-notebook-markup-underline": [ - "markup.underline" - ], - "polyglot-notebook-markup-bold": [ - "markup.bold" - ], - "polyglot-notebook-markup-heading": [ - "markup.heading" - ], - "polyglot-notebook-markup-italic": [ - "markup.italic" - ], - "polyglot-notebook-markup-strikethrough": [ - "markup.strikethrough" - ], - "polyglot-notebook-markup-inserted": [ - "markup.inserted" - ], - "polyglot-notebook-markup-deleted": [ - "markup.deleted" - ], - "polyglot-notebook-markup-changed": [ - "markup.changed" - ], - "polyglot-notebook-punctuation-definition-quote-begin-markdown": [ - "punctuation.definition.quote.begin.markdown" - ], - "polyglot-notebook-punctuation-definition-list-begin-markdown": [ - "punctuation.definition.list.begin.markdown" - ], - "polyglot-notebook-markup-inline-raw": [ - "markup.inline.raw" - ], - "polyglot-notebook-punctuation-definition-tag": [ - "punctuation.definition.tag" - ], - "polyglot-notebook-meta-preprocessor": [ - "meta.preprocessor" - ], - "polyglot-notebook-entity-name-function-preprocessor": [ - "entity.name.function.preprocessor" - ], - "polyglot-notebook-meta-preprocessor-string": [ - "meta.preprocessor.string" - ], - "polyglot-notebook-meta-preprocessor-numeric": [ - "meta.preprocessor.numeric" - ], - "polyglot-notebook-meta-structure-dictionary-key-python": [ - "meta.structure.dictionary.key.python" - ], - "polyglot-notebook-storage": [ - "storage" - ], - "polyglot-notebook-storage-type": [ - "storage.type" - ], - "polyglot-notebook-storage-modifier": [ - "storage.modifier" - ], - "polyglot-notebook-keyword-operator-noexcept": [ - "keyword.operator.noexcept" - ], - "polyglot-notebook-string": [ - "string" - ], - "polyglot-notebook-meta-embedded-assembly": [ - "meta.embedded.assembly" - ], - "polyglot-notebook-string-comment-buffered-block-pug": [ - "string.comment.buffered.block.pug" - ], - "polyglot-notebook-string-quoted-pug": [ - "string.quoted.pug" - ], - "polyglot-notebook-string-interpolated-pug": [ - "string.interpolated.pug" - ], - "polyglot-notebook-string-unquoted-plain-in-yaml": [ - "string.unquoted.plain.in.yaml" - ], - "polyglot-notebook-string-unquoted-plain-out-yaml": [ - "string.unquoted.plain.out.yaml" - ], - "polyglot-notebook-string-unquoted-block-yaml": [ - "string.unquoted.block.yaml" - ], - "polyglot-notebook-string-quoted-single-yaml": [ - "string.quoted.single.yaml" - ], - "polyglot-notebook-string-quoted-double-xml": [ - "string.quoted.double.xml" - ], - "polyglot-notebook-string-quoted-single-xml": [ - "string.quoted.single.xml" - ], - "polyglot-notebook-string-unquoted-cdata-xml": [ - "string.unquoted.cdata.xml" - ], - "polyglot-notebook-string-quoted-double-html": [ - "string.quoted.double.html" - ], - "polyglot-notebook-string-quoted-single-html": [ - "string.quoted.single.html" - ], - "polyglot-notebook-string-unquoted-html": [ - "string.unquoted.html" - ], - "polyglot-notebook-string-quoted-single-handlebars": [ - "string.quoted.single.handlebars" - ], - "polyglot-notebook-string-quoted-double-handlebars": [ - "string.quoted.double.handlebars" - ], - "polyglot-notebook-string-regexp": [ - "string.regexp" - ], - "polyglot-notebook-punctuation-definition-template-expression-begin": [ - "punctuation.definition.template-expression.begin" - ], - "polyglot-notebook-punctuation-definition-template-expression-end": [ - "punctuation.definition.template-expression.end" - ], - "polyglot-notebook-punctuation-section-embedded": [ - "punctuation.section.embedded" - ], - "polyglot-notebook-meta-template-expression": [ - "meta.template.expression" - ], - "polyglot-notebook-support-constant-property-value": [ - "support.constant.property-value" - ], - "polyglot-notebook-support-constant-font-name": [ - "support.constant.font-name" - ], - "polyglot-notebook-support-constant-media-type": [ - "support.constant.media-type" - ], - "polyglot-notebook-support-constant-media": [ - "support.constant.media" - ], - "polyglot-notebook-constant-other-color-rgb-value": [ - "constant.other.color.rgb-value" - ], - "polyglot-notebook-constant-other-rgb-value": [ - "constant.other.rgb-value" - ], - "polyglot-notebook-support-constant-color": [ - "support.constant.color" - ], - "polyglot-notebook-support-type-vendored-property-name": [ - "support.type.vendored.property-name" - ], - "polyglot-notebook-support-type-property-name": [ - "support.type.property-name" - ], - "polyglot-notebook-variable-css": [ - "variable.css" - ], - "polyglot-notebook-variable-scss": [ - "variable.scss" - ], - "polyglot-notebook-variable-other-less": [ - "variable.other.less" - ], - "polyglot-notebook-source-coffee-embedded": [ - "source.coffee.embedded" - ], - "polyglot-notebook-support-type-property-name-json": [ - "support.type.property-name.json" - ], - "polyglot-notebook-keyword": [ - "keyword" - ], - "polyglot-notebook-keyword-control": [ - "keyword.control" - ], - "polyglot-notebook-keyword-operator": [ - "keyword.operator" - ], - "polyglot-notebook-keyword-operator-new": [ - "keyword.operator.new" - ], - "polyglot-notebook-keyword-operator-expression": [ - "keyword.operator.expression" - ], - "polyglot-notebook-keyword-operator-cast": [ - "keyword.operator.cast" - ], - "polyglot-notebook-keyword-operator-sizeof": [ - "keyword.operator.sizeof" - ], - "polyglot-notebook-keyword-operator-alignof": [ - "keyword.operator.alignof" - ], - "polyglot-notebook-keyword-operator-typeid": [ - "keyword.operator.typeid" - ], - "polyglot-notebook-keyword-operator-alignas": [ - "keyword.operator.alignas" - ], - "polyglot-notebook-keyword-operator-instanceof": [ - "keyword.operator.instanceof" - ], - "polyglot-notebook-keyword-operator-logical-python": [ - "keyword.operator.logical.python" - ], - "polyglot-notebook-keyword-operator-wordlike": [ - "keyword.operator.wordlike" - ], - "polyglot-notebook-keyword-other-unit": [ - "keyword.other.unit" - ], - "polyglot-notebook-punctuation-section-embedded-begin-php": [ - "punctuation.section.embedded.begin.php" - ], - "polyglot-notebook-punctuation-section-embedded-end-php": [ - "punctuation.section.embedded.end.php" - ], - "polyglot-notebook-support-function-git-rebase": [ - "support.function.git-rebase" - ], - "polyglot-notebook-constant-sha-git-rebase": [ - "constant.sha.git-rebase" - ], - "polyglot-notebook-storage-modifier-import-java": [ - "storage.modifier.import.java" - ], - "polyglot-notebook-variable-language-wildcard-java": [ - "variable.language.wildcard.java" - ], - "polyglot-notebook-storage-modifier-package-java": [ - "storage.modifier.package.java" - ], - "polyglot-notebook-variable-language": [ - "variable.language" - ] - } - } - ] - }, - "scripts": { - "compile-preloads": "cd ../microsoft-dotnet-interactive && npm run compile", - "copy-preloads": "npx copyfiles --error --verbose --up 3 ../microsoft-dotnet-interactive/dist/activation.js ./resources", - "compile-variable-grid": "cd ../polyglot-notebooks-ui-components && npm run buildDev", - "copy-variable-grid": "npx copyfiles --error --verbose --up 3 ../polyglot-notebooks-ui-components/dist/*.* ./resources", - "vscode:prepublish": "npm run compile", - "compile-and-copy-preloads": "npm run compile-preloads && npm run copy-preloads", - "compile-and-copy-variable-grid": "npm run compile-variable-grid && npm run copy-variable-grid", - "compile": "npm run lint && tsc -p ./ && npm run compile-and-copy-preloads && npm run compile-and-copy-variable-grid", - "lint": "eslint src --ext ts", - "watch": "tsc -watch -p ./", - "pretest": "npm run compile", - "test": "mocha out/tests/**/*.test.js", - "ciTest": "npm test -- --reporter mocha-multi-reporters --reporter-options configFile=testConfig.json", - "tdd": "npm test -- --watch", - "package": "npx @vscode/vsce package", - "clearUserData": "del-cli \"./userData/**/*\" \"!.gitignore\"" - }, - "mocha": {}, - "devDependencies": { - "@rollup/plugin-commonjs": "21.0.1", - "@rollup/plugin-node-resolve": "13.0.5", - "@types/chai": "4.2.11", - "@types/chai-as-promised": "7.1.3", - "@types/chai-fs": "2.0.2", - "@types/glob": "7.1.1", - "@types/mocha": "9.1.0", - "@types/node": "16.11.6", - "@types/node-fetch": "2.5.12", - "@types/tmp": "0.2.0", - "@types/uuid": "8.3.0", - "@typescript-eslint/eslint-plugin": "5.3.0", - "@typescript-eslint/parser": "5.3.0", - "@vscode/vsce": "2.16.0", - "chai": "4.2.0", - "chai-as-promised": "7.1.1", - "chai-fs": "2.0.0", - "copyfiles": "2.4.1", - "del-cli": "4.0.1", - "eslint": "7.32.0", - "eslint-plugin-deprecation": "1.2.1", - "glob": "7.2.0", - "mocha": "9.2.2", - "mocha-multi-reporters": "1.5.1", - "mocha-trx-reporter": "3.3.1", - "rollup": "2.60.1", - "rollup-plugin-typescript2": "0.31.1", - "source-map-support": "0.5.21", - "tmp": "0.2.1", - "typescript": "4.4.4", - "vscode-test": "1.6.1" - }, - "dependencies": { - "compare-versions": "3.6.0", - "node-fetch": "2.6.7", - "rxjs": "7.5.6", - "uuid": "8.3.2", - "vscode-oniguruma": "1.6.1", - "vscode-textmate": "6.0.0", - "vscode-uri": "3.0.6" - } +{ + "name": "dotnet-interactive-vscode", + "displayName": "Polyglot Notebooks", + "description": "Polyglot Notebooks for VS Code. Use multiple languages in one notebook with full language server support for each language and share variables between them.", + "icon": "images/icon.png", + "publisher": "ms-dotnettools", + "author": "Microsoft Corporation", + "license": "MIT", + "enabledApiProposals": [ + "notebookMessaging" + ], + "preview": true, + "//version": "The version '42.42.42' is auto-set during CI package creation.", + "version": "42.42.42", + "engines": { + "vscode": "1.76.0-insider" + }, + "bugs": { + "url": "https://github.com/dotnet/interactive/issues" + }, + "repository": { + "url": "https://github.com/dotnet/interactive" + }, + "categories": [ + "Data Science", + "Machine Learning", + "Notebooks", + "Visualization" + ], + "keywords": [ + ".NET", + "interactive", + "C#", + "data science", + "dotnet", + "F#", + "ipynb", + "Jupyter", + "notebooks", + "PowerShell" + ], + "activationEvents": [ + "onUri", + "onNotebook:dotnet-interactive", + "onNotebook:dotnet-interactive-window", + "onNotebook:jupyter-notebook", + "onNotebook:polyglot-notebook", + "onNotebook:polyglot-notebook-window", + "onNotebook:jupyter-notebook", + "onCommand:dotnet-interactive.acquire", + "onCommand:polyglot-notebook.newNotebook", + "onCommand:polyglot-notebook.openNotebook", + "onCommand:polyglot-notebook.saveAsNotebook", + "onView:polyglot-notebook-panel-values" + ], + "main": "./out/src/vscode-common/extension.js", + "extensionDependencies": [ + "ms-toolsai.jupyter" + ], + "capabilities": { + "untrustedWorkspaces": { + "supported": "limited", + "description": "Execution of cells in Interactive Window and Notebooks is not supported in untrusted workspaces." + }, + "virtualWorkspaces": true + }, + "contributes": { + "notebooks": [ + { + "type": "polyglot-notebook", + "displayName": "Polyglot Notebook", + "selector": [ + { + "filenamePattern": "*.dib" + } + ] + }, + { + "type": "polyglot-nortebook-window", + "displayName": "Polyglot Notebook", + "selector": [] + } + ], + "jupyter.kernels": [ + { + "title": ".NET Interactive (C#)", + "defaultlanguage": "polyglot-notebook" + }, + { + "title": ".NET Interactive (F#)", + "defaultlanguage": "polyglot-notebook" + }, + { + "title": ".NET Interactive (PowerShell)", + "defaultlanguage": "polyglot-notebook" + } + ], + "configuration": { + "title": "Polyglot Notebook", + "properties": { + "polyglot-notebook.kernelEnvironmentVariables": { + "type": "object", + "default": {}, + "description": "Environment variables to set when starting a notebook session." + }, + "polyglot-notebook.languageServiceDelay": { + "type": "number", + "default": 500, + "description": "The delay in ms before language services are invoked." + }, + "polyglot-notebook.logLevel": { + "type": "string", + "default": "Error", + "enum": [ + "Info", + "Warn", + "Error", + "None" + ], + "enumDescriptions": [ + "Logs informational messages", + "Logs warning messages", + "Logs error messages", + "Disables logging" + ] + }, + "dotnet-interactive.kernelTransportArgs": { + "type": "array", + "default": [ + "{dotnet_path}", + "tool", + "run", + "dotnet-interactive", + "--", + "[vscode]", + "stdio", + "--working-dir", + "{working_dir}" + ], + "description": "Command and arguments used to start a notebook session." + }, + "dotnet-interactive.notebookParserArgs": { + "type": "array", + "default": [ + "{dotnet_path}", + "tool", + "run", + "dotnet-interactive", + "--", + "notebook-parser" + ] + }, + "dotnet-interactive.kernelTransportWorkingDirectory": { + "type": "string", + "default": "{global_storage_path}", + "description": "The working directory in which the kernel transport process is started." + }, + "dotnet-interactive.interactiveToolSource": { + "type": "string", + "default": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools/nuget/v3/index.json", + "description": "The NuGet source to use when acquiring the .NET Interactive tool." + }, + "dotnet-interactive.minimumDotNetSdkVersion": { + "type": "string", + "default": "7.0", + "description": "The minimum required version of the .NET SDK." + }, + "dotnet-interactive.requiredInteractiveToolVersion": { + "type": "string", + "default": "1.0.408001", + "description": "The required version of the .NET Interactive tool." + } + } + }, + "viewsContainers": { + "panel": [ + { + "id": "polyglot-notebook-panel", + "title": "Polyglot Notebook", + "icon": "resources/icons/notebook.svg" + } + ] + }, + "views": { + "polyglot-notebook-panel": [ + { + "type": "webview", + "id": "polyglot-notebook-panel-values", + "name": "Variables", + "icon": "resources/icons/notebook.svg" + } + ] + }, + "commands": [ + { + "command": "dotnet-interactive.acquire", + "title": "Install .NET Interactive" + }, + { + "command": "polyglot-notebook.openNotebook", + "title": "Polyglot Notebook: Open notebook" + }, + { + "command": "polyglot-notebook.saveAsNotebook", + "title": "Polyglot Notebook: Save notebook as..." + }, + { + "command": "polyglot-notebook.newNotebook", + "title": "Polyglot Notebook: Create new blank notebook" + }, + { + "command": "polyglot-notebook.restartCurrentNotebookKernel", + "title": "Polyglot Notebook: Restart the current notebook's kernel" + }, + { + "command": "polyglot-notebook.stopCurrentNotebookKernel", + "title": "Polyglot Notebook: Stop the current notebook's kernel" + }, + { + "command": "polyglot-notebook.stopAllNotebookKernels", + "title": "Polyglot Notebook: Stop all notebook kernels" + }, + { + "command": "polyglot-notebook.shareValueWith", + "title": "Share value with..." + }, + { + "command": "polyglot-notebook.selectCellKernel", + "title": "Polyglot Notebook: Select cell kernel" + }, + { + "command": "polyglot-notebook.notebookEditor.restartKernel", + "title": "Restart", + "icon": { + "light": "resources/light/restart-kernel.svg", + "dark": "resources/dark/restart-kernel.svg" + } + }, + { + "command": "polyglot-notebook.notebookEditor.openValueViewer", + "title": "Variables", + "icon": "$(variable-group)" + } + ], + "keybindings": [ + { + "command": "polyglot-notebook.newNotebook", + "key": "ctrl+alt+shift+n", + "mac": "cmd+alt+shift+n" + } + ], + "languages": [ + { + "id": "polyglot-notebook", + "aliases": [ + "Code" + ] + } + ], + "menus": { + "notebook/toolbar": [ + { + "command": "polyglot-notebook.notebookEditor.restartKernel", + "group": "navigation/execute@1", + "when": "notebookKernel =~ /polyglot-notebook/ && isWorkspaceTrusted" + }, + { + "command": "polyglot-notebook.notebookEditor.openValueViewer", + "group": "navigation@1", + "when": "notebookKernel =~ /polyglot-notebook/ && isWorkspaceTrusted" + } + ] + }, + "semanticTokenScopes": [ + { + "comment": "the `scopes` object is generated by a script", + "scopes": { + "polyglot-notebook-entity-name-function": [ + "entity.name.function" + ], + "polyglot-notebook-entity-name-variable-local": [ + "entity.name.variable.local" + ], + "polyglot-notebook-entity-name-type": [ + "entity.name.type" + ], + "polyglot-notebook-entity-name-type-namespace": [ + "entity.name.type.namespace" + ], + "polyglot-notebook-punctuation-accessor": [ + "punctuation.accessor" + ], + "polyglot-notebook-punctuation-definition-variable": [ + "punctuation.definition.variable" + ], + "polyglot-notebook-punctuation-parenthesis": [ + "punctuation.parenthesis" + ], + "polyglot-notebook-punctuation-terminator-statement": [ + "punctuation.terminator.statement" + ], + "polyglot-notebook-variable-other-object": [ + "variable.other.object" + ], + "polyglot-notebook-variable-other-readwrite": [ + "variable.other.readwrite" + ], + "polyglot-notebook-variable-other-readwrite-global": [ + "variable.other.readwrite.global" + ], + "polyglot-notebook-meta-bracket": [ + "meta.bracket" + ], + "polyglot-notebook-meta-attribute": [ + "meta.attribute" + ], + "polyglot-notebook-meta-function": [ + "meta.function" + ], + "polyglot-notebook-meta-function-call-arguments": [ + "meta.function-call.arguments" + ], + "polyglot-notebook-meta-function-call-generic": [ + "meta.function-call.generic" + ], + "polyglot-notebook-meta-indexed-name": [ + "meta.indexed-name" + ], + "polyglot-notebook-meta-item-access-arguments": [ + "meta.item-access.arguments" + ], + "polyglot-notebook-punctuation-definition-arguments-begin": [ + "punctuation.definition.arguments.begin" + ], + "polyglot-notebook-punctuation-definition-arguments-end": [ + "punctuation.definition.arguments.end" + ], + "polyglot-notebook-punctuation-definition-list-begin": [ + "punctuation.definition.list.begin" + ], + "polyglot-notebook-punctuation-definition-list-end": [ + "punctuation.definition.list.end" + ], + "polyglot-notebook-punctuation-definition-parameters-begin": [ + "punctuation.definition.parameters.begin" + ], + "polyglot-notebook-punctuation-definition-parameters-end": [ + "punctuation.definition.parameters.end" + ], + "polyglot-notebook-punctuation-section-function-begin": [ + "punctuation.section.function.begin" + ], + "polyglot-notebook-punctuation-section-function-end": [ + "punctuation.section.function.end" + ], + "polyglot-notebook-punctuation-separator-element": [ + "punctuation.separator.element" + ], + "polyglot-notebook-punctuation-separator-colon": [ + "punctuation.separator.colon" + ], + "polyglot-notebook-punctuation-separator-period": [ + "punctuation.separator.period" + ], + "polyglot-notebook-punctuation-separator-slice": [ + "punctuation.separator.slice" + ], + "polyglot-notebook-variable-parameter-function-call": [ + "variable.parameter.function-call" + ], + "polyglot-notebook-punctuation-section-brackets-single-begin": [ + "punctuation.section.brackets.single.begin" + ], + "polyglot-notebook-punctuation-section-brackets-single-end": [ + "punctuation.section.brackets.single.end" + ], + "polyglot-notebook-punctuation-section-parens-begin": [ + "punctuation.section.parens.begin" + ], + "polyglot-notebook-punctuation-section-parens-end": [ + "punctuation.section.parens.end" + ], + "polyglot-notebook-punctuation-separator-parameters": [ + "punctuation.separator.parameters" + ], + "polyglot-notebook-support-function": [ + "support.function" + ], + "polyglot-notebook-variable-other": [ + "variable.other" + ], + "polyglot-notebook-variable-function": [ + "variable.function" + ], + "polyglot-notebook-variable-parameter": [ + "variable.parameter" + ], + "polyglot-notebook-meta-group-simple-subexpression": [ + "meta.group.simple.subexpression" + ], + "polyglot-notebook-punctuation-section-group-begin": [ + "punctuation.section.group.begin" + ], + "polyglot-notebook-punctuation-section-group-end": [ + "punctuation.section.group.end" + ], + "polyglot-notebook-meta-embedded": [ + "meta.embedded" + ], + "polyglot-notebook-source-groovy-embedded": [ + "source.groovy.embedded" + ], + "polyglot-notebook-emphasis": [ + "emphasis" + ], + "polyglot-notebook-strong": [ + "strong" + ], + "polyglot-notebook-meta-diff-header": [ + "meta.diff.header" + ], + "polyglot-notebook-comment": [ + "comment" + ], + "polyglot-notebook-constant-language": [ + "constant.language" + ], + "polyglot-notebook-constant-numeric": [ + "constant.numeric" + ], + "polyglot-notebook-variable-other-enummember": [ + "variable.other.enummember" + ], + "polyglot-notebook-keyword-operator-plus-exponent": [ + "keyword.operator.plus.exponent" + ], + "polyglot-notebook-keyword-operator-minus-exponent": [ + "keyword.operator.minus.exponent" + ], + "polyglot-notebook-constant-regexp": [ + "constant.regexp" + ], + "polyglot-notebook-entity-name-tag": [ + "entity.name.tag" + ], + "polyglot-notebook-entity-name-selector": [ + "entity.name.selector" + ], + "polyglot-notebook-entity-other-attribute-name": [ + "entity.other.attribute-name" + ], + "polyglot-notebook-entity-other-attribute-name-class-css": [ + "entity.other.attribute-name.class.css" + ], + "polyglot-notebook-entity-other-attribute-name-class-mixin-css": [ + "entity.other.attribute-name.class.mixin.css" + ], + "polyglot-notebook-entity-other-attribute-name-id-css": [ + "entity.other.attribute-name.id.css" + ], + "polyglot-notebook-entity-other-attribute-name-parent-selector-css": [ + "entity.other.attribute-name.parent-selector.css" + ], + "polyglot-notebook-entity-other-attribute-name-pseudo-class-css": [ + "entity.other.attribute-name.pseudo-class.css" + ], + "polyglot-notebook-entity-other-attribute-name-pseudo-element-css": [ + "entity.other.attribute-name.pseudo-element.css" + ], + "polyglot-notebook-entity-other-attribute-name-scss": [ + "entity.other.attribute-name.scss" + ], + "polyglot-notebook-invalid": [ + "invalid" + ], + "polyglot-notebook-markup-underline": [ + "markup.underline" + ], + "polyglot-notebook-markup-bold": [ + "markup.bold" + ], + "polyglot-notebook-markup-heading": [ + "markup.heading" + ], + "polyglot-notebook-markup-italic": [ + "markup.italic" + ], + "polyglot-notebook-markup-strikethrough": [ + "markup.strikethrough" + ], + "polyglot-notebook-markup-inserted": [ + "markup.inserted" + ], + "polyglot-notebook-markup-deleted": [ + "markup.deleted" + ], + "polyglot-notebook-markup-changed": [ + "markup.changed" + ], + "polyglot-notebook-punctuation-definition-quote-begin-markdown": [ + "punctuation.definition.quote.begin.markdown" + ], + "polyglot-notebook-punctuation-definition-list-begin-markdown": [ + "punctuation.definition.list.begin.markdown" + ], + "polyglot-notebook-markup-inline-raw": [ + "markup.inline.raw" + ], + "polyglot-notebook-punctuation-definition-tag": [ + "punctuation.definition.tag" + ], + "polyglot-notebook-meta-preprocessor": [ + "meta.preprocessor" + ], + "polyglot-notebook-entity-name-function-preprocessor": [ + "entity.name.function.preprocessor" + ], + "polyglot-notebook-meta-preprocessor-string": [ + "meta.preprocessor.string" + ], + "polyglot-notebook-meta-preprocessor-numeric": [ + "meta.preprocessor.numeric" + ], + "polyglot-notebook-meta-structure-dictionary-key-python": [ + "meta.structure.dictionary.key.python" + ], + "polyglot-notebook-storage": [ + "storage" + ], + "polyglot-notebook-storage-type": [ + "storage.type" + ], + "polyglot-notebook-storage-modifier": [ + "storage.modifier" + ], + "polyglot-notebook-keyword-operator-noexcept": [ + "keyword.operator.noexcept" + ], + "polyglot-notebook-string": [ + "string" + ], + "polyglot-notebook-meta-embedded-assembly": [ + "meta.embedded.assembly" + ], + "polyglot-notebook-string-comment-buffered-block-pug": [ + "string.comment.buffered.block.pug" + ], + "polyglot-notebook-string-quoted-pug": [ + "string.quoted.pug" + ], + "polyglot-notebook-string-interpolated-pug": [ + "string.interpolated.pug" + ], + "polyglot-notebook-string-unquoted-plain-in-yaml": [ + "string.unquoted.plain.in.yaml" + ], + "polyglot-notebook-string-unquoted-plain-out-yaml": [ + "string.unquoted.plain.out.yaml" + ], + "polyglot-notebook-string-unquoted-block-yaml": [ + "string.unquoted.block.yaml" + ], + "polyglot-notebook-string-quoted-single-yaml": [ + "string.quoted.single.yaml" + ], + "polyglot-notebook-string-quoted-double-xml": [ + "string.quoted.double.xml" + ], + "polyglot-notebook-string-quoted-single-xml": [ + "string.quoted.single.xml" + ], + "polyglot-notebook-string-unquoted-cdata-xml": [ + "string.unquoted.cdata.xml" + ], + "polyglot-notebook-string-quoted-double-html": [ + "string.quoted.double.html" + ], + "polyglot-notebook-string-quoted-single-html": [ + "string.quoted.single.html" + ], + "polyglot-notebook-string-unquoted-html": [ + "string.unquoted.html" + ], + "polyglot-notebook-string-quoted-single-handlebars": [ + "string.quoted.single.handlebars" + ], + "polyglot-notebook-string-quoted-double-handlebars": [ + "string.quoted.double.handlebars" + ], + "polyglot-notebook-string-regexp": [ + "string.regexp" + ], + "polyglot-notebook-punctuation-definition-template-expression-begin": [ + "punctuation.definition.template-expression.begin" + ], + "polyglot-notebook-punctuation-definition-template-expression-end": [ + "punctuation.definition.template-expression.end" + ], + "polyglot-notebook-punctuation-section-embedded": [ + "punctuation.section.embedded" + ], + "polyglot-notebook-meta-template-expression": [ + "meta.template.expression" + ], + "polyglot-notebook-support-constant-property-value": [ + "support.constant.property-value" + ], + "polyglot-notebook-support-constant-font-name": [ + "support.constant.font-name" + ], + "polyglot-notebook-support-constant-media-type": [ + "support.constant.media-type" + ], + "polyglot-notebook-support-constant-media": [ + "support.constant.media" + ], + "polyglot-notebook-constant-other-color-rgb-value": [ + "constant.other.color.rgb-value" + ], + "polyglot-notebook-constant-other-rgb-value": [ + "constant.other.rgb-value" + ], + "polyglot-notebook-support-constant-color": [ + "support.constant.color" + ], + "polyglot-notebook-support-type-vendored-property-name": [ + "support.type.vendored.property-name" + ], + "polyglot-notebook-support-type-property-name": [ + "support.type.property-name" + ], + "polyglot-notebook-variable-css": [ + "variable.css" + ], + "polyglot-notebook-variable-scss": [ + "variable.scss" + ], + "polyglot-notebook-variable-other-less": [ + "variable.other.less" + ], + "polyglot-notebook-source-coffee-embedded": [ + "source.coffee.embedded" + ], + "polyglot-notebook-support-type-property-name-json": [ + "support.type.property-name.json" + ], + "polyglot-notebook-keyword": [ + "keyword" + ], + "polyglot-notebook-keyword-control": [ + "keyword.control" + ], + "polyglot-notebook-keyword-operator": [ + "keyword.operator" + ], + "polyglot-notebook-keyword-operator-new": [ + "keyword.operator.new" + ], + "polyglot-notebook-keyword-operator-expression": [ + "keyword.operator.expression" + ], + "polyglot-notebook-keyword-operator-cast": [ + "keyword.operator.cast" + ], + "polyglot-notebook-keyword-operator-sizeof": [ + "keyword.operator.sizeof" + ], + "polyglot-notebook-keyword-operator-alignof": [ + "keyword.operator.alignof" + ], + "polyglot-notebook-keyword-operator-typeid": [ + "keyword.operator.typeid" + ], + "polyglot-notebook-keyword-operator-alignas": [ + "keyword.operator.alignas" + ], + "polyglot-notebook-keyword-operator-instanceof": [ + "keyword.operator.instanceof" + ], + "polyglot-notebook-keyword-operator-logical-python": [ + "keyword.operator.logical.python" + ], + "polyglot-notebook-keyword-operator-wordlike": [ + "keyword.operator.wordlike" + ], + "polyglot-notebook-keyword-other-unit": [ + "keyword.other.unit" + ], + "polyglot-notebook-punctuation-section-embedded-begin-php": [ + "punctuation.section.embedded.begin.php" + ], + "polyglot-notebook-punctuation-section-embedded-end-php": [ + "punctuation.section.embedded.end.php" + ], + "polyglot-notebook-support-function-git-rebase": [ + "support.function.git-rebase" + ], + "polyglot-notebook-constant-sha-git-rebase": [ + "constant.sha.git-rebase" + ], + "polyglot-notebook-storage-modifier-import-java": [ + "storage.modifier.import.java" + ], + "polyglot-notebook-variable-language-wildcard-java": [ + "variable.language.wildcard.java" + ], + "polyglot-notebook-storage-modifier-package-java": [ + "storage.modifier.package.java" + ], + "polyglot-notebook-variable-language": [ + "variable.language" + ] + } + } + ] + }, + "scripts": { + "compile-preloads": "cd ../polyglot-notebooks && npm run compile", + "copy-preloads": "npx copyfiles --error --verbose --up 3 ../polyglot-notebooks/dist/activation.js ./resources", + "compile-variable-grid": "cd ../polyglot-notebooks-ui-components && npm run buildDev", + "copy-variable-grid": "npx copyfiles --error --verbose --up 3 ../polyglot-notebooks-ui-components/dist/*.* ./resources", + "vscode:prepublish": "npm run compile", + "compile-and-copy-preloads": "npm run compile-preloads && npm run copy-preloads", + "compile-and-copy-variable-grid": "npm run compile-variable-grid && npm run copy-variable-grid", + "compile": "npm run lint && tsc -p ./ && npm run compile-and-copy-preloads && npm run compile-and-copy-variable-grid", + "lint": "eslint src --ext ts", + "watch": "tsc -watch -p ./", + "pretest": "npm run compile", + "test": "mocha out/tests/**/*.test.js", + "ciTest": "npm test -- --reporter mocha-multi-reporters --reporter-options configFile=testConfig.json", + "tdd": "npm test -- --watch", + "package": "npx @vscode/vsce package", + "clearUserData": "del-cli \"./userData/**/*\" \"!.gitignore\"" + }, + "mocha": {}, + "devDependencies": { + "@rollup/plugin-commonjs": "21.0.1", + "@rollup/plugin-node-resolve": "13.0.5", + "@types/chai": "4.2.11", + "@types/chai-as-promised": "7.1.3", + "@types/chai-fs": "2.0.2", + "@types/glob": "7.1.1", + "@types/mocha": "9.1.0", + "@types/node": "16.11.6", + "@types/node-fetch": "2.5.12", + "@types/tmp": "0.2.0", + "@types/uuid": "8.3.0", + "@typescript-eslint/eslint-plugin": "5.3.0", + "@typescript-eslint/parser": "5.3.0", + "@vscode/vsce": "2.16.0", + "chai": "4.2.0", + "chai-as-promised": "7.1.1", + "chai-fs": "2.0.0", + "copyfiles": "2.4.1", + "del-cli": "4.0.1", + "eslint": "7.32.0", + "eslint-plugin-deprecation": "1.2.1", + "glob": "7.2.0", + "mocha": "9.2.2", + "mocha-multi-reporters": "1.5.1", + "mocha-trx-reporter": "3.3.1", + "rollup": "2.60.1", + "rollup-plugin-typescript2": "0.31.1", + "source-map-support": "0.5.21", + "tmp": "0.2.1", + "typescript": "4.4.4", + "vscode-test": "1.6.1" + }, + "dependencies": { + "compare-versions": "3.6.0", + "node-fetch": "2.6.7", + "rxjs": "7.5.6", + "uuid": "8.3.2", + "vscode-oniguruma": "1.6.1", + "vscode-textmate": "6.0.0", + "vscode-uri": "3.0.6" + } } \ No newline at end of file diff --git a/src/dotnet-interactive-vscode-insiders/resources/dark/restart-kernel.svg b/src/polyglot-notebooks-vscode-insiders/resources/dark/restart-kernel.svg similarity index 100% rename from src/dotnet-interactive-vscode-insiders/resources/dark/restart-kernel.svg rename to src/polyglot-notebooks-vscode-insiders/resources/dark/restart-kernel.svg diff --git a/src/dotnet-interactive-vscode-insiders/resources/icons/notebook.svg b/src/polyglot-notebooks-vscode-insiders/resources/icons/notebook.svg similarity index 99% rename from src/dotnet-interactive-vscode-insiders/resources/icons/notebook.svg rename to src/polyglot-notebooks-vscode-insiders/resources/icons/notebook.svg index b9a1f55820..e33668cc60 100644 --- a/src/dotnet-interactive-vscode-insiders/resources/icons/notebook.svg +++ b/src/polyglot-notebooks-vscode-insiders/resources/icons/notebook.svg @@ -1,3 +1,3 @@ - - + + \ No newline at end of file diff --git a/src/dotnet-interactive-vscode-insiders/resources/light/restart-kernel.svg b/src/polyglot-notebooks-vscode-insiders/resources/light/restart-kernel.svg similarity index 100% rename from src/dotnet-interactive-vscode-insiders/resources/light/restart-kernel.svg rename to src/polyglot-notebooks-vscode-insiders/resources/light/restart-kernel.svg diff --git a/src/dotnet-interactive-vscode-insiders/src/notebookControllers.ts b/src/polyglot-notebooks-vscode-insiders/src/notebookControllers.ts similarity index 99% rename from src/dotnet-interactive-vscode-insiders/src/notebookControllers.ts rename to src/polyglot-notebooks-vscode-insiders/src/notebookControllers.ts index 8d76cb4f24..55fd66bafa 100644 --- a/src/dotnet-interactive-vscode-insiders/src/notebookControllers.ts +++ b/src/polyglot-notebooks-vscode-insiders/src/notebookControllers.ts @@ -3,15 +3,15 @@ import * as vscode from 'vscode'; import { ClientMapper } from './vscode-common/clientMapper'; -import * as contracts from './vscode-common/dotnet-interactive/contracts'; +import * as contracts from './vscode-common/polyglot-notebooks/contracts'; import * as vscodeLike from './vscode-common/interfaces/vscode-like'; import * as diagnostics from './vscode-common/diagnostics'; import * as vscodeUtilities from './vscode-common/vscodeUtilities'; import { reshapeOutputValueForVsCode } from './vscode-common/interfaces/utilities'; import { selectDotNetInteractiveKernelForJupyter } from './vscode-common/commands'; import { ErrorOutputCreator, InteractiveClient } from './vscode-common/interactiveClient'; -import { LogEntry, Logger } from './vscode-common/dotnet-interactive/logger'; -import { isKernelEventEnvelope, KernelCommandOrEventEnvelope } from './vscode-common/dotnet-interactive/connection'; +import { LogEntry, Logger } from './vscode-common/polyglot-notebooks/logger'; +import { isKernelEventEnvelope, KernelCommandOrEventEnvelope } from './vscode-common/polyglot-notebooks/connection'; import * as rxjs from 'rxjs'; import * as metadataUtilities from './vscode-common/metadataUtilities'; import * as constants from './vscode-common/constants'; @@ -373,4 +373,4 @@ async function updateDocumentKernelspecMetadata(document: vscode.NotebookDocumen const documentMetadata = metadataUtilities.getNotebookDocumentMetadataFromNotebookDocument(document); const newMetadata = metadataUtilities.createNewIpynbMetadataWithNotebookDocumentMetadata(document.metadata, documentMetadata); await versionSpecificFunctions.replaceNotebookMetadata(document.uri, newMetadata); -} +} \ No newline at end of file diff --git a/src/dotnet-interactive-vscode-insiders/src/notebookSerializers.ts b/src/polyglot-notebooks-vscode-insiders/src/notebookSerializers.ts similarity index 99% rename from src/dotnet-interactive-vscode-insiders/src/notebookSerializers.ts rename to src/polyglot-notebooks-vscode-insiders/src/notebookSerializers.ts index cf9beebe75..3fc5920b38 100644 --- a/src/dotnet-interactive-vscode-insiders/src/notebookSerializers.ts +++ b/src/polyglot-notebooks-vscode-insiders/src/notebookSerializers.ts @@ -2,7 +2,7 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. import * as vscode from 'vscode'; -import * as contracts from './vscode-common/dotnet-interactive/contracts'; +import * as contracts from './vscode-common/polyglot-notebooks/contracts'; import * as utilities from './vscode-common/interfaces/utilities'; import * as vscodeLike from './vscode-common/interfaces/vscode-like'; import { languageToCellKind } from './vscode-common/interactiveNotebook'; diff --git a/src/dotnet-interactive-vscode-insiders/src/ui b/src/polyglot-notebooks-vscode-insiders/src/ui similarity index 100% rename from src/dotnet-interactive-vscode-insiders/src/ui rename to src/polyglot-notebooks-vscode-insiders/src/ui diff --git a/src/dotnet-interactive-vscode-insiders/src/versionSpecificFunctions.ts b/src/polyglot-notebooks-vscode-insiders/src/versionSpecificFunctions.ts similarity index 97% rename from src/dotnet-interactive-vscode-insiders/src/versionSpecificFunctions.ts rename to src/polyglot-notebooks-vscode-insiders/src/versionSpecificFunctions.ts index b00993ae75..f48249ef04 100644 --- a/src/dotnet-interactive-vscode-insiders/src/versionSpecificFunctions.ts +++ b/src/polyglot-notebooks-vscode-insiders/src/versionSpecificFunctions.ts @@ -4,11 +4,11 @@ import * as vscode from 'vscode'; import * as vscodeLike from './vscode-common/interfaces/vscode-like'; import { ClientMapper } from './vscode-common/clientMapper'; -import { Logger } from './vscode-common/dotnet-interactive/logger'; -import { extractHostAndNomalize, isKernelCommandEnvelope, isKernelEventEnvelope, KernelCommandAndEventReceiver, KernelCommandAndEventSender, KernelCommandOrEventEnvelope } from './vscode-common/dotnet-interactive'; +import { Logger } from './vscode-common/polyglot-notebooks/logger'; +import { extractHostAndNomalize, isKernelCommandEnvelope, isKernelEventEnvelope, KernelCommandAndEventReceiver, KernelCommandAndEventSender, KernelCommandOrEventEnvelope } from './vscode-common/polyglot-notebooks'; import * as rxjs from 'rxjs'; -import * as connection from './vscode-common/dotnet-interactive/connection'; -import * as contracts from './vscode-common/dotnet-interactive/contracts'; +import * as connection from './vscode-common/polyglot-notebooks/connection'; +import * as contracts from './vscode-common/polyglot-notebooks/contracts'; export function getNotebookDocumentFromEditor(notebookEditor: vscode.NotebookEditor): vscode.NotebookDocument { return notebookEditor.notebook; diff --git a/src/polyglot-notebooks-vscode-insiders/src/vscode-common b/src/polyglot-notebooks-vscode-insiders/src/vscode-common new file mode 120000 index 0000000000..f9dd81722b --- /dev/null +++ b/src/polyglot-notebooks-vscode-insiders/src/vscode-common @@ -0,0 +1 @@ +../../polyglot-notebooks-vscode-common/src \ No newline at end of file diff --git a/src/dotnet-interactive-vscode-insiders/src/vscode.d.ts b/src/polyglot-notebooks-vscode-insiders/src/vscode.d.ts similarity index 100% rename from src/dotnet-interactive-vscode-insiders/src/vscode.d.ts rename to src/polyglot-notebooks-vscode-insiders/src/vscode.d.ts diff --git a/src/dotnet-interactive-vscode-insiders/src/vscode.proposed.notebookMessaging.d.ts b/src/polyglot-notebooks-vscode-insiders/src/vscode.proposed.notebookMessaging.d.ts similarity index 100% rename from src/dotnet-interactive-vscode-insiders/src/vscode.proposed.notebookMessaging.d.ts rename to src/polyglot-notebooks-vscode-insiders/src/vscode.proposed.notebookMessaging.d.ts diff --git a/src/dotnet-interactive-vscode-insiders/testConfig.json b/src/polyglot-notebooks-vscode-insiders/testConfig.json similarity index 51% rename from src/dotnet-interactive-vscode-insiders/testConfig.json rename to src/polyglot-notebooks-vscode-insiders/testConfig.json index 62f7f44e5a..9b2eadb0af 100644 --- a/src/dotnet-interactive-vscode-insiders/testConfig.json +++ b/src/polyglot-notebooks-vscode-insiders/testConfig.json @@ -1,6 +1,6 @@ { "reporterEnabled": "spec,mocha-trx-reporter", "mochaTrxReporterReporterOptions": { - "output": "../../artifacts/TestResults/Release/dotnet-interactive-vscode-insiders.trx" + "output": "../../artifacts/TestResults/Release/polyglot-notebooks-vscode-insiders.trx" } } \ No newline at end of file diff --git a/src/polyglot-notebooks-vscode-insiders/tests/vscode-common-tests b/src/polyglot-notebooks-vscode-insiders/tests/vscode-common-tests new file mode 120000 index 0000000000..6861587083 --- /dev/null +++ b/src/polyglot-notebooks-vscode-insiders/tests/vscode-common-tests @@ -0,0 +1 @@ +../../polyglot-notebooks-vscode-common/tests \ No newline at end of file diff --git a/src/dotnet-interactive-vscode-insiders/tools/buildSemanticTokenScopes.js b/src/polyglot-notebooks-vscode-insiders/tools/buildSemanticTokenScopes.js similarity index 100% rename from src/dotnet-interactive-vscode-insiders/tools/buildSemanticTokenScopes.js rename to src/polyglot-notebooks-vscode-insiders/tools/buildSemanticTokenScopes.js diff --git a/src/dotnet-interactive-vscode-insiders/tsconfig.json b/src/polyglot-notebooks-vscode-insiders/tsconfig.json similarity index 100% rename from src/dotnet-interactive-vscode-insiders/tsconfig.json rename to src/polyglot-notebooks-vscode-insiders/tsconfig.json diff --git a/src/dotnet-interactive-vscode-insiders/wallaby.js b/src/polyglot-notebooks-vscode-insiders/wallaby.js similarity index 100% rename from src/dotnet-interactive-vscode-insiders/wallaby.js rename to src/polyglot-notebooks-vscode-insiders/wallaby.js diff --git a/src/dotnet-interactive-vscode/.eslintignore b/src/polyglot-notebooks-vscode/.eslintignore similarity index 100% rename from src/dotnet-interactive-vscode/.eslintignore rename to src/polyglot-notebooks-vscode/.eslintignore diff --git a/src/dotnet-interactive-vscode/.eslintrc.json b/src/polyglot-notebooks-vscode/.eslintrc.json similarity index 100% rename from src/dotnet-interactive-vscode/.eslintrc.json rename to src/polyglot-notebooks-vscode/.eslintrc.json diff --git a/src/dotnet-interactive-vscode/.gitignore b/src/polyglot-notebooks-vscode/.gitignore similarity index 100% rename from src/dotnet-interactive-vscode/.gitignore rename to src/polyglot-notebooks-vscode/.gitignore diff --git a/src/microsoft-dotnet-interactive-browser/.npmrc b/src/polyglot-notebooks-vscode/.npmrc similarity index 100% rename from src/microsoft-dotnet-interactive-browser/.npmrc rename to src/polyglot-notebooks-vscode/.npmrc diff --git a/src/microsoft-dotnet-interactive-browser/.vscode/extensions.json b/src/polyglot-notebooks-vscode/.vscode/extensions.json similarity index 100% rename from src/microsoft-dotnet-interactive-browser/.vscode/extensions.json rename to src/polyglot-notebooks-vscode/.vscode/extensions.json diff --git a/src/dotnet-interactive-vscode/.vscode/launch.json b/src/polyglot-notebooks-vscode/.vscode/launch.json similarity index 100% rename from src/dotnet-interactive-vscode/.vscode/launch.json rename to src/polyglot-notebooks-vscode/.vscode/launch.json diff --git a/src/dotnet-interactive-vscode/.vscode/settings.json b/src/polyglot-notebooks-vscode/.vscode/settings.json similarity index 100% rename from src/dotnet-interactive-vscode/.vscode/settings.json rename to src/polyglot-notebooks-vscode/.vscode/settings.json diff --git a/src/dotnet-interactive-vscode/.vscode/tasks.json b/src/polyglot-notebooks-vscode/.vscode/tasks.json similarity index 100% rename from src/dotnet-interactive-vscode/.vscode/tasks.json rename to src/polyglot-notebooks-vscode/.vscode/tasks.json diff --git a/src/dotnet-interactive-vscode/.vscodeignore b/src/polyglot-notebooks-vscode/.vscodeignore similarity index 100% rename from src/dotnet-interactive-vscode/.vscodeignore rename to src/polyglot-notebooks-vscode/.vscodeignore diff --git a/src/dotnet-interactive-vscode/DEVGUIDE.md b/src/polyglot-notebooks-vscode/DEVGUIDE.md similarity index 80% rename from src/dotnet-interactive-vscode/DEVGUIDE.md rename to src/polyglot-notebooks-vscode/DEVGUIDE.md index b6e0b67dbc..ccb19c58f6 100644 --- a/src/dotnet-interactive-vscode/DEVGUIDE.md +++ b/src/polyglot-notebooks-vscode/DEVGUIDE.md @@ -15,7 +15,7 @@ This repo depends on symbolic links between directories. By default Windows doe - Latest stable [PowerShell 7](https://github.com/PowerShell/PowerShell/releases/) on the path _and_ [Developer Mode](https://docs.microsoft.com/en-us/windows/apps/get-started/enable-your-device-for-development) enabled for Windows. -1. Open a terminal in either the `src/dotnet-interactive-vscode/` or `src/dotnet-interactive-vscode-insiders/` directory. +1. Open a terminal in either the `src/polyglot-notebooks-vscode/` or `src/polyglot-notebooks-insiders/` directory. 2. `npm install` 3. Open the appropriate VS Code, e.g., for stable: `code .`, for insiders: `code-insiders .` 4. F5. @@ -23,7 +23,7 @@ This repo depends on symbolic links between directories. By default Windows doe ## The complicated bits The vast majority of the code is shared between the regular and insiders versions of the extension and it lives in the -`src/dotnet-interactive-vscode-common/` directory. To enable the `src/dotnet-interactive-vscode/` and `src/dotnet-interactive-vscode-insiders/` directories to build, however, symlinks were added to +`src/polyglot-notebooks-common/` directory. To enable the `src/polyglot-notebooks-vscode/` and `src/polyglot-notebooks-vscode-insiders/` directories to build, however, symlinks were added to properly pull the common files into the source tree under `/src/vscode-common`. If you have git configured to handel symlinks then you're good to go. If not, you'll need to run the script diff --git a/src/dotnet-interactive-vscode/License.txt b/src/polyglot-notebooks-vscode/License.txt similarity index 100% rename from src/dotnet-interactive-vscode/License.txt rename to src/polyglot-notebooks-vscode/License.txt diff --git a/src/dotnet-interactive-vscode/README.md b/src/polyglot-notebooks-vscode/README.md similarity index 100% rename from src/dotnet-interactive-vscode/README.md rename to src/polyglot-notebooks-vscode/README.md diff --git a/src/dotnet-interactive-vscode/UPDATING-TO-NEW-VERSION-OF-STABLE.md b/src/polyglot-notebooks-vscode/UPDATING-TO-NEW-VERSION-OF-STABLE.md similarity index 90% rename from src/dotnet-interactive-vscode/UPDATING-TO-NEW-VERSION-OF-STABLE.md rename to src/polyglot-notebooks-vscode/UPDATING-TO-NEW-VERSION-OF-STABLE.md index b64ec7efe6..cd1f907c83 100644 --- a/src/dotnet-interactive-vscode/UPDATING-TO-NEW-VERSION-OF-STABLE.md +++ b/src/polyglot-notebooks-vscode/UPDATING-TO-NEW-VERSION-OF-STABLE.md @@ -7,8 +7,8 @@ ``` 2. For each directory: - - `/src/dotnet-interactive-vscode` - - `/src/dotnet-interactive-vscode-insiders` + - `/src/polyglot-notebooks-vscode` + - `/src/polyglot-notebooks-vscode-insiders` - `npm i` - `npm run compile` - `npm run test` diff --git a/src/dotnet-interactive-vscode/do-version-upgrade.ps1 b/src/polyglot-notebooks-vscode/do-version-upgrade.ps1 similarity index 100% rename from src/dotnet-interactive-vscode/do-version-upgrade.ps1 rename to src/polyglot-notebooks-vscode/do-version-upgrade.ps1 diff --git a/src/dotnet-interactive-vscode/grammars/http.language-configuration.json b/src/polyglot-notebooks-vscode/grammars/http.language-configuration.json similarity index 100% rename from src/dotnet-interactive-vscode/grammars/http.language-configuration.json rename to src/polyglot-notebooks-vscode/grammars/http.language-configuration.json diff --git a/src/dotnet-interactive-vscode/grammars/http.tmGrammar.json b/src/polyglot-notebooks-vscode/grammars/http.tmGrammar.json similarity index 100% rename from src/dotnet-interactive-vscode/grammars/http.tmGrammar.json rename to src/polyglot-notebooks-vscode/grammars/http.tmGrammar.json diff --git a/src/dotnet-interactive-vscode/grammars/kql.language-configuration.json b/src/polyglot-notebooks-vscode/grammars/kql.language-configuration.json similarity index 100% rename from src/dotnet-interactive-vscode/grammars/kql.language-configuration.json rename to src/polyglot-notebooks-vscode/grammars/kql.language-configuration.json diff --git a/src/dotnet-interactive-vscode/grammars/kql.tmGrammar.json b/src/polyglot-notebooks-vscode/grammars/kql.tmGrammar.json similarity index 100% rename from src/dotnet-interactive-vscode/grammars/kql.tmGrammar.json rename to src/polyglot-notebooks-vscode/grammars/kql.tmGrammar.json diff --git a/src/dotnet-interactive-vscode/help/DotNetVersion.md b/src/polyglot-notebooks-vscode/help/DotNetVersion.md similarity index 97% rename from src/dotnet-interactive-vscode/help/DotNetVersion.md rename to src/polyglot-notebooks-vscode/help/DotNetVersion.md index 1575ba9000..f32e7e0d0d 100644 --- a/src/dotnet-interactive-vscode/help/DotNetVersion.md +++ b/src/polyglot-notebooks-vscode/help/DotNetVersion.md @@ -1,6 +1,6 @@ -# .NET 7 SDK **REQUIRED** - -## The Polyglot Notebooks extension now requires .NET SDK Version 7.0 or higher. - -## 1. Install [here](https://dotnet.microsoft.com/en-us/download) -## 2. Restart VS Code +# .NET 7 SDK **REQUIRED** + +## The Polyglot Notebooks extension now requires .NET SDK Version 7.0 or higher. + +## 1. Install [here](https://dotnet.microsoft.com/en-us/download) +## 2. Restart VS Code diff --git a/src/dotnet-interactive-vscode/images/icon.png b/src/polyglot-notebooks-vscode/images/icon.png similarity index 100% rename from src/dotnet-interactive-vscode/images/icon.png rename to src/polyglot-notebooks-vscode/images/icon.png diff --git a/src/dotnet-interactive-vscode/package-lock.json b/src/polyglot-notebooks-vscode/package-lock.json similarity index 99% rename from src/dotnet-interactive-vscode/package-lock.json rename to src/polyglot-notebooks-vscode/package-lock.json index 44850b228d..80acd0c88e 100644 --- a/src/dotnet-interactive-vscode/package-lock.json +++ b/src/polyglot-notebooks-vscode/package-lock.json @@ -9395,4 +9395,4 @@ "dev": true } } -} \ No newline at end of file +} diff --git a/src/dotnet-interactive-vscode/package.json b/src/polyglot-notebooks-vscode/package.json similarity index 96% rename from src/dotnet-interactive-vscode/package.json rename to src/polyglot-notebooks-vscode/package.json index 58bf0efc2c..3218434b48 100644 --- a/src/dotnet-interactive-vscode/package.json +++ b/src/polyglot-notebooks-vscode/package.json @@ -1,776 +1,776 @@ -{ - "name": "dotnet-interactive-vscode", - "displayName": "Polyglot Notebooks", - "description": "Polyglot Notebooks for VS Code. Use multiple languages in one notebook with full language server support for each language and share variables between them.", - "icon": "images/icon.png", - "publisher": "ms-dotnettools", - "author": "Microsoft Corporation", - "license": "MIT", - "enabledApiProposals": [ - "notebookMessaging" - ], - "preview": true, - "//version": "The version '42.42.42' is auto-set during CI package creation.", - "version": "42.42.42", - "engines": { - "vscode": "^1.75.0" - }, - "bugs": { - "url": "https://github.com/dotnet/interactive/issues" - }, - "repository": { - "url": "https://github.com/dotnet/interactive" - }, - "categories": [ - "Data Science", - "Machine Learning", - "Notebooks", - "Visualization" - ], - "keywords": [ - ".NET", - "interactive", - "C#", - "data science", - "dotnet", - "F#", - "ipynb", - "Jupyter", - "notebooks", - "PowerShell" - ], - "activationEvents": [ - "onUri", - "onNotebook:dotnet-interactive", - "onNotebook:dotnet-interactive-window", - "onNotebook:jupyter-notebook", - "onNotebook:polyglot-notebook", - "onNotebook:polyglot-notebook-window", - "onNotebook:jupyter-notebook", - "onCommand:dotnet-interactive.acquire", - "onCommand:polyglot-notebook.newNotebook", - "onCommand:polyglot-notebook.openNotebook", - "onCommand:polyglot-notebook.saveAsNotebook", - "onView:polyglot-notebook-panel-values" - ], - "main": "./out/src/vscode-common/extension.js", - "extensionDependencies": [ - "ms-toolsai.jupyter" - ], - "capabilities": { - "untrustedWorkspaces": { - "supported": "limited", - "description": "Execution of cells in Interactive Window and Notebooks is not supported in untrusted workspaces." - }, - "virtualWorkspaces": true - }, - "contributes": { - "notebooks": [ - { - "type": "polyglot-notebook", - "displayName": "Polyglot Notebook", - "selector": [ - { - "filenamePattern": "*.dib" - } - ] - }, - { - "type": "polyglot-nortebook-window", - "displayName": "Polyglot Notebook", - "selector": [] - } - ], - "jupyter.kernels": [ - { - "title": ".NET Interactive (C#)", - "defaultlanguage": "polyglot-notebook" - }, - { - "title": ".NET Interactive (F#)", - "defaultlanguage": "polyglot-notebook" - }, - { - "title": ".NET Interactive (PowerShell)", - "defaultlanguage": "polyglot-notebook" - } - ], - "configuration": { - "title": "Polyglot Notebook", - "properties": { - "polyglot-notebook.kernelEnvironmentVariables": { - "type": "object", - "default": {}, - "description": "Environment variables to set when starting a notebook session." - }, - "polyglot-notebook.languageServiceDelay": { - "type": "number", - "default": 500, - "description": "The delay in ms before language services are invoked." - }, - "polyglot-notebook.logLevel": { - "type": "string", - "default": "Error", - "enum": [ - "Info", - "Warn", - "Error", - "None" - ], - "enumDescriptions": [ - "Logs informational messages", - "Logs warning messages", - "Logs error messages", - "Disables logging" - ] - }, - "dotnet-interactive.kernelTransportArgs": { - "type": "array", - "default": [ - "{dotnet_path}", - "tool", - "run", - "dotnet-interactive", - "--", - "[vscode]", - "stdio", - "--working-dir", - "{working_dir}" - ], - "description": "Command and arguments used to start a notebook session." - }, - "dotnet-interactive.notebookParserArgs": { - "type": "array", - "default": [ - "{dotnet_path}", - "tool", - "run", - "dotnet-interactive", - "--", - "notebook-parser" - ] - }, - "dotnet-interactive.kernelTransportWorkingDirectory": { - "type": "string", - "default": "{global_storage_path}", - "description": "The working directory in which the kernel transport process is started." - }, - "dotnet-interactive.interactiveToolSource": { - "type": "string", - "default": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools/nuget/v3/index.json", - "description": "The NuGet source to use when acquiring the .NET Interactive tool." - }, - "dotnet-interactive.minimumDotNetSdkVersion": { - "type": "string", - "default": "7.0", - "description": "The minimum required version of the .NET SDK." - }, - "dotnet-interactive.requiredInteractiveToolVersion": { - "type": "string", - "default": "1.0.408001", - "description": "The required version of the .NET Interactive tool." - } - } - }, - "viewsContainers": { - "panel": [ - { - "id": "polyglot-notebook-panel", - "title": "Polyglot Notebook", - "icon": "resources/icons/notebook.svg" - } - ] - }, - "views": { - "polyglot-notebook-panel": [ - { - "type": "webview", - "id": "polyglot-notebook-panel-values", - "name": "Variables", - "icon": "resources/icons/notebook.svg" - } - ] - }, - "commands": [ - { - "command": "dotnet-interactive.acquire", - "title": "Install .NET Interactive" - }, - { - "command": "polyglot-notebook.openNotebook", - "title": "Polyglot Notebook: Open notebook" - }, - { - "command": "polyglot-notebook.saveAsNotebook", - "title": "Polyglot Notebook: Save notebook as..." - }, - { - "command": "polyglot-notebook.newNotebook", - "title": "Polyglot Notebook: Create new blank notebook" - }, - { - "command": "polyglot-notebook.restartCurrentNotebookKernel", - "title": "Polyglot Notebook: Restart the current notebook's kernel" - }, - { - "command": "polyglot-notebook.stopCurrentNotebookKernel", - "title": "Polyglot Notebook: Stop the current notebook's kernel" - }, - { - "command": "polyglot-notebook.stopAllNotebookKernels", - "title": "Polyglot Notebook: Stop all notebook kernels" - }, - { - "command": "polyglot-notebook.shareValueWith", - "title": "Share value with..." - }, - { - "command": "polyglot-notebook.selectCellKernel", - "title": "Polyglot Notebook: Select cell kernel" - }, - { - "command": "polyglot-notebook.notebookEditor.restartKernel", - "title": "Restart", - "icon": { - "light": "resources/light/restart-kernel.svg", - "dark": "resources/dark/restart-kernel.svg" - } - }, - { - "command": "polyglot-notebook.notebookEditor.openValueViewer", - "title": "Variables", - "icon": "$(variable-group)" - } - ], - "keybindings": [ - { - "command": "polyglot-notebook.newNotebook", - "key": "ctrl+alt+shift+n", - "mac": "cmd+alt+shift+n" - } - ], - "languages": [ - { - "id": "polyglot-notebook", - "aliases": [ - "Code" - ] - } - ], - "menus": { - "notebook/toolbar": [ - { - "command": "polyglot-notebook.notebookEditor.restartKernel", - "group": "navigation/execute@1", - "when": "notebookKernel =~ /polyglot-notebook/ && isWorkspaceTrusted" - }, - { - "command": "polyglot-notebook.notebookEditor.openValueViewer", - "group": "navigation@1", - "when": "notebookKernel =~ /polyglot-notebook/ && isWorkspaceTrusted" - } - ] - }, - "semanticTokenScopes": [ - { - "comment": "the `scopes` object is generated by a script", - "scopes": { - "polyglot-notebook-entity-name-function": [ - "entity.name.function" - ], - "polyglot-notebook-entity-name-variable-local": [ - "entity.name.variable.local" - ], - "polyglot-notebook-entity-name-type": [ - "entity.name.type" - ], - "polyglot-notebook-entity-name-type-namespace": [ - "entity.name.type.namespace" - ], - "polyglot-notebook-punctuation-accessor": [ - "punctuation.accessor" - ], - "polyglot-notebook-punctuation-definition-variable": [ - "punctuation.definition.variable" - ], - "polyglot-notebook-punctuation-parenthesis": [ - "punctuation.parenthesis" - ], - "polyglot-notebook-punctuation-terminator-statement": [ - "punctuation.terminator.statement" - ], - "polyglot-notebook-variable-other-object": [ - "variable.other.object" - ], - "polyglot-notebook-variable-other-readwrite": [ - "variable.other.readwrite" - ], - "polyglot-notebook-variable-other-readwrite-global": [ - "variable.other.readwrite.global" - ], - "polyglot-notebook-meta-bracket": [ - "meta.bracket" - ], - "polyglot-notebook-meta-attribute": [ - "meta.attribute" - ], - "polyglot-notebook-meta-function": [ - "meta.function" - ], - "polyglot-notebook-meta-function-call-arguments": [ - "meta.function-call.arguments" - ], - "polyglot-notebook-meta-function-call-generic": [ - "meta.function-call.generic" - ], - "polyglot-notebook-meta-indexed-name": [ - "meta.indexed-name" - ], - "polyglot-notebook-meta-item-access-arguments": [ - "meta.item-access.arguments" - ], - "polyglot-notebook-punctuation-definition-arguments-begin": [ - "punctuation.definition.arguments.begin" - ], - "polyglot-notebook-punctuation-definition-arguments-end": [ - "punctuation.definition.arguments.end" - ], - "polyglot-notebook-punctuation-definition-list-begin": [ - "punctuation.definition.list.begin" - ], - "polyglot-notebook-punctuation-definition-list-end": [ - "punctuation.definition.list.end" - ], - "polyglot-notebook-punctuation-definition-parameters-begin": [ - "punctuation.definition.parameters.begin" - ], - "polyglot-notebook-punctuation-definition-parameters-end": [ - "punctuation.definition.parameters.end" - ], - "polyglot-notebook-punctuation-section-function-begin": [ - "punctuation.section.function.begin" - ], - "polyglot-notebook-punctuation-section-function-end": [ - "punctuation.section.function.end" - ], - "polyglot-notebook-punctuation-separator-element": [ - "punctuation.separator.element" - ], - "polyglot-notebook-punctuation-separator-colon": [ - "punctuation.separator.colon" - ], - "polyglot-notebook-punctuation-separator-period": [ - "punctuation.separator.period" - ], - "polyglot-notebook-punctuation-separator-slice": [ - "punctuation.separator.slice" - ], - "polyglot-notebook-variable-parameter-function-call": [ - "variable.parameter.function-call" - ], - "polyglot-notebook-punctuation-section-brackets-single-begin": [ - "punctuation.section.brackets.single.begin" - ], - "polyglot-notebook-punctuation-section-brackets-single-end": [ - "punctuation.section.brackets.single.end" - ], - "polyglot-notebook-punctuation-section-parens-begin": [ - "punctuation.section.parens.begin" - ], - "polyglot-notebook-punctuation-section-parens-end": [ - "punctuation.section.parens.end" - ], - "polyglot-notebook-punctuation-separator-parameters": [ - "punctuation.separator.parameters" - ], - "polyglot-notebook-support-function": [ - "support.function" - ], - "polyglot-notebook-variable-other": [ - "variable.other" - ], - "polyglot-notebook-variable-function": [ - "variable.function" - ], - "polyglot-notebook-variable-parameter": [ - "variable.parameter" - ], - "polyglot-notebook-meta-group-simple-subexpression": [ - "meta.group.simple.subexpression" - ], - "polyglot-notebook-punctuation-section-group-begin": [ - "punctuation.section.group.begin" - ], - "polyglot-notebook-punctuation-section-group-end": [ - "punctuation.section.group.end" - ], - "polyglot-notebook-meta-embedded": [ - "meta.embedded" - ], - "polyglot-notebook-source-groovy-embedded": [ - "source.groovy.embedded" - ], - "polyglot-notebook-emphasis": [ - "emphasis" - ], - "polyglot-notebook-strong": [ - "strong" - ], - "polyglot-notebook-meta-diff-header": [ - "meta.diff.header" - ], - "polyglot-notebook-comment": [ - "comment" - ], - "polyglot-notebook-constant-language": [ - "constant.language" - ], - "polyglot-notebook-constant-numeric": [ - "constant.numeric" - ], - "polyglot-notebook-variable-other-enummember": [ - "variable.other.enummember" - ], - "polyglot-notebook-keyword-operator-plus-exponent": [ - "keyword.operator.plus.exponent" - ], - "polyglot-notebook-keyword-operator-minus-exponent": [ - "keyword.operator.minus.exponent" - ], - "polyglot-notebook-constant-regexp": [ - "constant.regexp" - ], - "polyglot-notebook-entity-name-tag": [ - "entity.name.tag" - ], - "polyglot-notebook-entity-name-selector": [ - "entity.name.selector" - ], - "polyglot-notebook-entity-other-attribute-name": [ - "entity.other.attribute-name" - ], - "polyglot-notebook-entity-other-attribute-name-class-css": [ - "entity.other.attribute-name.class.css" - ], - "polyglot-notebook-entity-other-attribute-name-class-mixin-css": [ - "entity.other.attribute-name.class.mixin.css" - ], - "polyglot-notebook-entity-other-attribute-name-id-css": [ - "entity.other.attribute-name.id.css" - ], - "polyglot-notebook-entity-other-attribute-name-parent-selector-css": [ - "entity.other.attribute-name.parent-selector.css" - ], - "polyglot-notebook-entity-other-attribute-name-pseudo-class-css": [ - "entity.other.attribute-name.pseudo-class.css" - ], - "polyglot-notebook-entity-other-attribute-name-pseudo-element-css": [ - "entity.other.attribute-name.pseudo-element.css" - ], - "polyglot-notebook-entity-other-attribute-name-scss": [ - "entity.other.attribute-name.scss" - ], - "polyglot-notebook-invalid": [ - "invalid" - ], - "polyglot-notebook-markup-underline": [ - "markup.underline" - ], - "polyglot-notebook-markup-bold": [ - "markup.bold" - ], - "polyglot-notebook-markup-heading": [ - "markup.heading" - ], - "polyglot-notebook-markup-italic": [ - "markup.italic" - ], - "polyglot-notebook-markup-strikethrough": [ - "markup.strikethrough" - ], - "polyglot-notebook-markup-inserted": [ - "markup.inserted" - ], - "polyglot-notebook-markup-deleted": [ - "markup.deleted" - ], - "polyglot-notebook-markup-changed": [ - "markup.changed" - ], - "polyglot-notebook-punctuation-definition-quote-begin-markdown": [ - "punctuation.definition.quote.begin.markdown" - ], - "polyglot-notebook-punctuation-definition-list-begin-markdown": [ - "punctuation.definition.list.begin.markdown" - ], - "polyglot-notebook-markup-inline-raw": [ - "markup.inline.raw" - ], - "polyglot-notebook-punctuation-definition-tag": [ - "punctuation.definition.tag" - ], - "polyglot-notebook-meta-preprocessor": [ - "meta.preprocessor" - ], - "polyglot-notebook-entity-name-function-preprocessor": [ - "entity.name.function.preprocessor" - ], - "polyglot-notebook-meta-preprocessor-string": [ - "meta.preprocessor.string" - ], - "polyglot-notebook-meta-preprocessor-numeric": [ - "meta.preprocessor.numeric" - ], - "polyglot-notebook-meta-structure-dictionary-key-python": [ - "meta.structure.dictionary.key.python" - ], - "polyglot-notebook-storage": [ - "storage" - ], - "polyglot-notebook-storage-type": [ - "storage.type" - ], - "polyglot-notebook-storage-modifier": [ - "storage.modifier" - ], - "polyglot-notebook-keyword-operator-noexcept": [ - "keyword.operator.noexcept" - ], - "polyglot-notebook-string": [ - "string" - ], - "polyglot-notebook-meta-embedded-assembly": [ - "meta.embedded.assembly" - ], - "polyglot-notebook-string-comment-buffered-block-pug": [ - "string.comment.buffered.block.pug" - ], - "polyglot-notebook-string-quoted-pug": [ - "string.quoted.pug" - ], - "polyglot-notebook-string-interpolated-pug": [ - "string.interpolated.pug" - ], - "polyglot-notebook-string-unquoted-plain-in-yaml": [ - "string.unquoted.plain.in.yaml" - ], - "polyglot-notebook-string-unquoted-plain-out-yaml": [ - "string.unquoted.plain.out.yaml" - ], - "polyglot-notebook-string-unquoted-block-yaml": [ - "string.unquoted.block.yaml" - ], - "polyglot-notebook-string-quoted-single-yaml": [ - "string.quoted.single.yaml" - ], - "polyglot-notebook-string-quoted-double-xml": [ - "string.quoted.double.xml" - ], - "polyglot-notebook-string-quoted-single-xml": [ - "string.quoted.single.xml" - ], - "polyglot-notebook-string-unquoted-cdata-xml": [ - "string.unquoted.cdata.xml" - ], - "polyglot-notebook-string-quoted-double-html": [ - "string.quoted.double.html" - ], - "polyglot-notebook-string-quoted-single-html": [ - "string.quoted.single.html" - ], - "polyglot-notebook-string-unquoted-html": [ - "string.unquoted.html" - ], - "polyglot-notebook-string-quoted-single-handlebars": [ - "string.quoted.single.handlebars" - ], - "polyglot-notebook-string-quoted-double-handlebars": [ - "string.quoted.double.handlebars" - ], - "polyglot-notebook-string-regexp": [ - "string.regexp" - ], - "polyglot-notebook-punctuation-definition-template-expression-begin": [ - "punctuation.definition.template-expression.begin" - ], - "polyglot-notebook-punctuation-definition-template-expression-end": [ - "punctuation.definition.template-expression.end" - ], - "polyglot-notebook-punctuation-section-embedded": [ - "punctuation.section.embedded" - ], - "polyglot-notebook-meta-template-expression": [ - "meta.template.expression" - ], - "polyglot-notebook-support-constant-property-value": [ - "support.constant.property-value" - ], - "polyglot-notebook-support-constant-font-name": [ - "support.constant.font-name" - ], - "polyglot-notebook-support-constant-media-type": [ - "support.constant.media-type" - ], - "polyglot-notebook-support-constant-media": [ - "support.constant.media" - ], - "polyglot-notebook-constant-other-color-rgb-value": [ - "constant.other.color.rgb-value" - ], - "polyglot-notebook-constant-other-rgb-value": [ - "constant.other.rgb-value" - ], - "polyglot-notebook-support-constant-color": [ - "support.constant.color" - ], - "polyglot-notebook-support-type-vendored-property-name": [ - "support.type.vendored.property-name" - ], - "polyglot-notebook-support-type-property-name": [ - "support.type.property-name" - ], - "polyglot-notebook-variable-css": [ - "variable.css" - ], - "polyglot-notebook-variable-scss": [ - "variable.scss" - ], - "polyglot-notebook-variable-other-less": [ - "variable.other.less" - ], - "polyglot-notebook-source-coffee-embedded": [ - "source.coffee.embedded" - ], - "polyglot-notebook-support-type-property-name-json": [ - "support.type.property-name.json" - ], - "polyglot-notebook-keyword": [ - "keyword" - ], - "polyglot-notebook-keyword-control": [ - "keyword.control" - ], - "polyglot-notebook-keyword-operator": [ - "keyword.operator" - ], - "polyglot-notebook-keyword-operator-new": [ - "keyword.operator.new" - ], - "polyglot-notebook-keyword-operator-expression": [ - "keyword.operator.expression" - ], - "polyglot-notebook-keyword-operator-cast": [ - "keyword.operator.cast" - ], - "polyglot-notebook-keyword-operator-sizeof": [ - "keyword.operator.sizeof" - ], - "polyglot-notebook-keyword-operator-alignof": [ - "keyword.operator.alignof" - ], - "polyglot-notebook-keyword-operator-typeid": [ - "keyword.operator.typeid" - ], - "polyglot-notebook-keyword-operator-alignas": [ - "keyword.operator.alignas" - ], - "polyglot-notebook-keyword-operator-instanceof": [ - "keyword.operator.instanceof" - ], - "polyglot-notebook-keyword-operator-logical-python": [ - "keyword.operator.logical.python" - ], - "polyglot-notebook-keyword-operator-wordlike": [ - "keyword.operator.wordlike" - ], - "polyglot-notebook-keyword-other-unit": [ - "keyword.other.unit" - ], - "polyglot-notebook-punctuation-section-embedded-begin-php": [ - "punctuation.section.embedded.begin.php" - ], - "polyglot-notebook-punctuation-section-embedded-end-php": [ - "punctuation.section.embedded.end.php" - ], - "polyglot-notebook-support-function-git-rebase": [ - "support.function.git-rebase" - ], - "polyglot-notebook-constant-sha-git-rebase": [ - "constant.sha.git-rebase" - ], - "polyglot-notebook-storage-modifier-import-java": [ - "storage.modifier.import.java" - ], - "polyglot-notebook-variable-language-wildcard-java": [ - "variable.language.wildcard.java" - ], - "polyglot-notebook-storage-modifier-package-java": [ - "storage.modifier.package.java" - ], - "polyglot-notebook-variable-language": [ - "variable.language" - ] - } - } - ] - }, - "scripts": { - "compile-preloads": "cd ../microsoft-dotnet-interactive && npm run compile", - "copy-preloads": "npx copyfiles --error --verbose --up 3 ../microsoft-dotnet-interactive/dist/activation.js ./resources", - "compile-variable-grid": "cd ../polyglot-notebooks-ui-components && npm run buildDev", - "copy-variable-grid": "npx copyfiles --error --verbose --up 3 ../polyglot-notebooks-ui-components/dist/*.* ./resources", - "vscode:prepublish": "npm run compile", - "compile": "npm run lint && tsc -p ./ && npm run compile-preloads && npm run compile-variable-grid && npm run copy-preloads && npm run copy-variable-grid", - "lint": "eslint src --ext ts", - "watch": "tsc -watch -p ./", - "pretest": "npm run compile", - "test": "mocha out/tests/**/*.test.js", - "ciTest": "npm test -- --reporter mocha-multi-reporters --reporter-options configFile=testConfig.json", - "tdd": "npm test -- --watch", - "package": "npx @vscode/vsce package", - "clearUserData": "del-cli \"./userData/**/*\" \"!.gitignore\"" - }, - "mocha": {}, - "devDependencies": { - "@rollup/plugin-commonjs": "21.0.1", - "@rollup/plugin-node-resolve": "13.0.5", - "@types/chai": "4.2.11", - "@types/chai-as-promised": "7.1.3", - "@types/chai-fs": "2.0.2", - "@types/glob": "7.1.1", - "@types/mocha": "9.1.0", - "@types/node": "16.11.6", - "@types/node-fetch": "2.5.12", - "@types/tmp": "0.2.0", - "@types/uuid": "8.3.0", - "@typescript-eslint/eslint-plugin": "5.3.0", - "@typescript-eslint/parser": "5.3.0", - "@vscode/vsce": "2.16.0", - "chai": "4.2.0", - "chai-as-promised": "7.1.1", - "chai-fs": "2.0.0", - "copyfiles": "2.4.1", - "del-cli": "4.0.1", - "eslint": "7.32.0", - "eslint-plugin-deprecation": "1.2.1", - "glob": "7.2.0", - "mocha": "9.2.2", - "mocha-multi-reporters": "1.5.1", - "mocha-trx-reporter": "3.3.1", - "rollup": "2.60.1", - "rollup-plugin-typescript2": "0.31.1", - "source-map-support": "0.5.21", - "tmp": "0.2.1", - "typescript": "4.4.4", - "vscode-test": "1.6.1" - }, - "dependencies": { - "compare-versions": "3.6.0", - "node-fetch": "2.6.7", - "rxjs": "7.5.6", - "uuid": "8.3.2", - "vscode-oniguruma": "1.6.1", - "vscode-textmate": "6.0.0", - "vscode-uri": "3.0.6" - } +{ + "name": "dotnet-interactive-vscode", + "displayName": "Polyglot Notebooks", + "description": "Polyglot Notebooks for VS Code. Use multiple languages in one notebook with full language server support for each language and share variables between them.", + "icon": "images/icon.png", + "publisher": "ms-dotnettools", + "author": "Microsoft Corporation", + "license": "MIT", + "enabledApiProposals": [ + "notebookMessaging" + ], + "preview": true, + "//version": "The version '42.42.42' is auto-set during CI package creation.", + "version": "42.42.42", + "engines": { + "vscode": "^1.75.0" + }, + "bugs": { + "url": "https://github.com/dotnet/interactive/issues" + }, + "repository": { + "url": "https://github.com/dotnet/interactive" + }, + "categories": [ + "Data Science", + "Machine Learning", + "Notebooks", + "Visualization" + ], + "keywords": [ + ".NET", + "interactive", + "C#", + "data science", + "dotnet", + "F#", + "ipynb", + "Jupyter", + "notebooks", + "PowerShell" + ], + "activationEvents": [ + "onUri", + "onNotebook:dotnet-interactive", + "onNotebook:dotnet-interactive-window", + "onNotebook:jupyter-notebook", + "onNotebook:polyglot-notebook", + "onNotebook:polyglot-notebook-window", + "onNotebook:jupyter-notebook", + "onCommand:dotnet-interactive.acquire", + "onCommand:polyglot-notebook.newNotebook", + "onCommand:polyglot-notebook.openNotebook", + "onCommand:polyglot-notebook.saveAsNotebook", + "onView:polyglot-notebook-panel-values" + ], + "main": "./out/src/vscode-common/extension.js", + "extensionDependencies": [ + "ms-toolsai.jupyter" + ], + "capabilities": { + "untrustedWorkspaces": { + "supported": "limited", + "description": "Execution of cells in Interactive Window and Notebooks is not supported in untrusted workspaces." + }, + "virtualWorkspaces": true + }, + "contributes": { + "notebooks": [ + { + "type": "polyglot-notebook", + "displayName": "Polyglot Notebook", + "selector": [ + { + "filenamePattern": "*.dib" + } + ] + }, + { + "type": "polyglot-nortebook-window", + "displayName": "Polyglot Notebook", + "selector": [] + } + ], + "jupyter.kernels": [ + { + "title": ".NET Interactive (C#)", + "defaultlanguage": "polyglot-notebook" + }, + { + "title": ".NET Interactive (F#)", + "defaultlanguage": "polyglot-notebook" + }, + { + "title": ".NET Interactive (PowerShell)", + "defaultlanguage": "polyglot-notebook" + } + ], + "configuration": { + "title": "Polyglot Notebook", + "properties": { + "polyglot-notebook.kernelEnvironmentVariables": { + "type": "object", + "default": {}, + "description": "Environment variables to set when starting a notebook session." + }, + "polyglot-notebook.languageServiceDelay": { + "type": "number", + "default": 500, + "description": "The delay in ms before language services are invoked." + }, + "polyglot-notebook.logLevel": { + "type": "string", + "default": "Error", + "enum": [ + "Info", + "Warn", + "Error", + "None" + ], + "enumDescriptions": [ + "Logs informational messages", + "Logs warning messages", + "Logs error messages", + "Disables logging" + ] + }, + "dotnet-interactive.kernelTransportArgs": { + "type": "array", + "default": [ + "{dotnet_path}", + "tool", + "run", + "dotnet-interactive", + "--", + "[vscode]", + "stdio", + "--working-dir", + "{working_dir}" + ], + "description": "Command and arguments used to start a notebook session." + }, + "dotnet-interactive.notebookParserArgs": { + "type": "array", + "default": [ + "{dotnet_path}", + "tool", + "run", + "dotnet-interactive", + "--", + "notebook-parser" + ] + }, + "dotnet-interactive.kernelTransportWorkingDirectory": { + "type": "string", + "default": "{global_storage_path}", + "description": "The working directory in which the kernel transport process is started." + }, + "dotnet-interactive.interactiveToolSource": { + "type": "string", + "default": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools/nuget/v3/index.json", + "description": "The NuGet source to use when acquiring the .NET Interactive tool." + }, + "dotnet-interactive.minimumDotNetSdkVersion": { + "type": "string", + "default": "7.0", + "description": "The minimum required version of the .NET SDK." + }, + "dotnet-interactive.requiredInteractiveToolVersion": { + "type": "string", + "default": "1.0.408001", + "description": "The required version of the .NET Interactive tool." + } + } + }, + "viewsContainers": { + "panel": [ + { + "id": "polyglot-notebook-panel", + "title": "Polyglot Notebook", + "icon": "resources/icons/notebook.svg" + } + ] + }, + "views": { + "polyglot-notebook-panel": [ + { + "type": "webview", + "id": "polyglot-notebook-panel-values", + "name": "Variables", + "icon": "resources/icons/notebook.svg" + } + ] + }, + "commands": [ + { + "command": "dotnet-interactive.acquire", + "title": "Install .NET Interactive" + }, + { + "command": "polyglot-notebook.openNotebook", + "title": "Polyglot Notebook: Open notebook" + }, + { + "command": "polyglot-notebook.saveAsNotebook", + "title": "Polyglot Notebook: Save notebook as..." + }, + { + "command": "polyglot-notebook.newNotebook", + "title": "Polyglot Notebook: Create new blank notebook" + }, + { + "command": "polyglot-notebook.restartCurrentNotebookKernel", + "title": "Polyglot Notebook: Restart the current notebook's kernel" + }, + { + "command": "polyglot-notebook.stopCurrentNotebookKernel", + "title": "Polyglot Notebook: Stop the current notebook's kernel" + }, + { + "command": "polyglot-notebook.stopAllNotebookKernels", + "title": "Polyglot Notebook: Stop all notebook kernels" + }, + { + "command": "polyglot-notebook.shareValueWith", + "title": "Share value with..." + }, + { + "command": "polyglot-notebook.selectCellKernel", + "title": "Polyglot Notebook: Select cell kernel" + }, + { + "command": "polyglot-notebook.notebookEditor.restartKernel", + "title": "Restart", + "icon": { + "light": "resources/light/restart-kernel.svg", + "dark": "resources/dark/restart-kernel.svg" + } + }, + { + "command": "polyglot-notebook.notebookEditor.openValueViewer", + "title": "Variables", + "icon": "$(variable-group)" + } + ], + "keybindings": [ + { + "command": "polyglot-notebook.newNotebook", + "key": "ctrl+alt+shift+n", + "mac": "cmd+alt+shift+n" + } + ], + "languages": [ + { + "id": "polyglot-notebook", + "aliases": [ + "Code" + ] + } + ], + "menus": { + "notebook/toolbar": [ + { + "command": "polyglot-notebook.notebookEditor.restartKernel", + "group": "navigation/execute@1", + "when": "notebookKernel =~ /polyglot-notebook/ && isWorkspaceTrusted" + }, + { + "command": "polyglot-notebook.notebookEditor.openValueViewer", + "group": "navigation@1", + "when": "notebookKernel =~ /polyglot-notebook/ && isWorkspaceTrusted" + } + ] + }, + "semanticTokenScopes": [ + { + "comment": "the `scopes` object is generated by a script", + "scopes": { + "polyglot-notebook-entity-name-function": [ + "entity.name.function" + ], + "polyglot-notebook-entity-name-variable-local": [ + "entity.name.variable.local" + ], + "polyglot-notebook-entity-name-type": [ + "entity.name.type" + ], + "polyglot-notebook-entity-name-type-namespace": [ + "entity.name.type.namespace" + ], + "polyglot-notebook-punctuation-accessor": [ + "punctuation.accessor" + ], + "polyglot-notebook-punctuation-definition-variable": [ + "punctuation.definition.variable" + ], + "polyglot-notebook-punctuation-parenthesis": [ + "punctuation.parenthesis" + ], + "polyglot-notebook-punctuation-terminator-statement": [ + "punctuation.terminator.statement" + ], + "polyglot-notebook-variable-other-object": [ + "variable.other.object" + ], + "polyglot-notebook-variable-other-readwrite": [ + "variable.other.readwrite" + ], + "polyglot-notebook-variable-other-readwrite-global": [ + "variable.other.readwrite.global" + ], + "polyglot-notebook-meta-bracket": [ + "meta.bracket" + ], + "polyglot-notebook-meta-attribute": [ + "meta.attribute" + ], + "polyglot-notebook-meta-function": [ + "meta.function" + ], + "polyglot-notebook-meta-function-call-arguments": [ + "meta.function-call.arguments" + ], + "polyglot-notebook-meta-function-call-generic": [ + "meta.function-call.generic" + ], + "polyglot-notebook-meta-indexed-name": [ + "meta.indexed-name" + ], + "polyglot-notebook-meta-item-access-arguments": [ + "meta.item-access.arguments" + ], + "polyglot-notebook-punctuation-definition-arguments-begin": [ + "punctuation.definition.arguments.begin" + ], + "polyglot-notebook-punctuation-definition-arguments-end": [ + "punctuation.definition.arguments.end" + ], + "polyglot-notebook-punctuation-definition-list-begin": [ + "punctuation.definition.list.begin" + ], + "polyglot-notebook-punctuation-definition-list-end": [ + "punctuation.definition.list.end" + ], + "polyglot-notebook-punctuation-definition-parameters-begin": [ + "punctuation.definition.parameters.begin" + ], + "polyglot-notebook-punctuation-definition-parameters-end": [ + "punctuation.definition.parameters.end" + ], + "polyglot-notebook-punctuation-section-function-begin": [ + "punctuation.section.function.begin" + ], + "polyglot-notebook-punctuation-section-function-end": [ + "punctuation.section.function.end" + ], + "polyglot-notebook-punctuation-separator-element": [ + "punctuation.separator.element" + ], + "polyglot-notebook-punctuation-separator-colon": [ + "punctuation.separator.colon" + ], + "polyglot-notebook-punctuation-separator-period": [ + "punctuation.separator.period" + ], + "polyglot-notebook-punctuation-separator-slice": [ + "punctuation.separator.slice" + ], + "polyglot-notebook-variable-parameter-function-call": [ + "variable.parameter.function-call" + ], + "polyglot-notebook-punctuation-section-brackets-single-begin": [ + "punctuation.section.brackets.single.begin" + ], + "polyglot-notebook-punctuation-section-brackets-single-end": [ + "punctuation.section.brackets.single.end" + ], + "polyglot-notebook-punctuation-section-parens-begin": [ + "punctuation.section.parens.begin" + ], + "polyglot-notebook-punctuation-section-parens-end": [ + "punctuation.section.parens.end" + ], + "polyglot-notebook-punctuation-separator-parameters": [ + "punctuation.separator.parameters" + ], + "polyglot-notebook-support-function": [ + "support.function" + ], + "polyglot-notebook-variable-other": [ + "variable.other" + ], + "polyglot-notebook-variable-function": [ + "variable.function" + ], + "polyglot-notebook-variable-parameter": [ + "variable.parameter" + ], + "polyglot-notebook-meta-group-simple-subexpression": [ + "meta.group.simple.subexpression" + ], + "polyglot-notebook-punctuation-section-group-begin": [ + "punctuation.section.group.begin" + ], + "polyglot-notebook-punctuation-section-group-end": [ + "punctuation.section.group.end" + ], + "polyglot-notebook-meta-embedded": [ + "meta.embedded" + ], + "polyglot-notebook-source-groovy-embedded": [ + "source.groovy.embedded" + ], + "polyglot-notebook-emphasis": [ + "emphasis" + ], + "polyglot-notebook-strong": [ + "strong" + ], + "polyglot-notebook-meta-diff-header": [ + "meta.diff.header" + ], + "polyglot-notebook-comment": [ + "comment" + ], + "polyglot-notebook-constant-language": [ + "constant.language" + ], + "polyglot-notebook-constant-numeric": [ + "constant.numeric" + ], + "polyglot-notebook-variable-other-enummember": [ + "variable.other.enummember" + ], + "polyglot-notebook-keyword-operator-plus-exponent": [ + "keyword.operator.plus.exponent" + ], + "polyglot-notebook-keyword-operator-minus-exponent": [ + "keyword.operator.minus.exponent" + ], + "polyglot-notebook-constant-regexp": [ + "constant.regexp" + ], + "polyglot-notebook-entity-name-tag": [ + "entity.name.tag" + ], + "polyglot-notebook-entity-name-selector": [ + "entity.name.selector" + ], + "polyglot-notebook-entity-other-attribute-name": [ + "entity.other.attribute-name" + ], + "polyglot-notebook-entity-other-attribute-name-class-css": [ + "entity.other.attribute-name.class.css" + ], + "polyglot-notebook-entity-other-attribute-name-class-mixin-css": [ + "entity.other.attribute-name.class.mixin.css" + ], + "polyglot-notebook-entity-other-attribute-name-id-css": [ + "entity.other.attribute-name.id.css" + ], + "polyglot-notebook-entity-other-attribute-name-parent-selector-css": [ + "entity.other.attribute-name.parent-selector.css" + ], + "polyglot-notebook-entity-other-attribute-name-pseudo-class-css": [ + "entity.other.attribute-name.pseudo-class.css" + ], + "polyglot-notebook-entity-other-attribute-name-pseudo-element-css": [ + "entity.other.attribute-name.pseudo-element.css" + ], + "polyglot-notebook-entity-other-attribute-name-scss": [ + "entity.other.attribute-name.scss" + ], + "polyglot-notebook-invalid": [ + "invalid" + ], + "polyglot-notebook-markup-underline": [ + "markup.underline" + ], + "polyglot-notebook-markup-bold": [ + "markup.bold" + ], + "polyglot-notebook-markup-heading": [ + "markup.heading" + ], + "polyglot-notebook-markup-italic": [ + "markup.italic" + ], + "polyglot-notebook-markup-strikethrough": [ + "markup.strikethrough" + ], + "polyglot-notebook-markup-inserted": [ + "markup.inserted" + ], + "polyglot-notebook-markup-deleted": [ + "markup.deleted" + ], + "polyglot-notebook-markup-changed": [ + "markup.changed" + ], + "polyglot-notebook-punctuation-definition-quote-begin-markdown": [ + "punctuation.definition.quote.begin.markdown" + ], + "polyglot-notebook-punctuation-definition-list-begin-markdown": [ + "punctuation.definition.list.begin.markdown" + ], + "polyglot-notebook-markup-inline-raw": [ + "markup.inline.raw" + ], + "polyglot-notebook-punctuation-definition-tag": [ + "punctuation.definition.tag" + ], + "polyglot-notebook-meta-preprocessor": [ + "meta.preprocessor" + ], + "polyglot-notebook-entity-name-function-preprocessor": [ + "entity.name.function.preprocessor" + ], + "polyglot-notebook-meta-preprocessor-string": [ + "meta.preprocessor.string" + ], + "polyglot-notebook-meta-preprocessor-numeric": [ + "meta.preprocessor.numeric" + ], + "polyglot-notebook-meta-structure-dictionary-key-python": [ + "meta.structure.dictionary.key.python" + ], + "polyglot-notebook-storage": [ + "storage" + ], + "polyglot-notebook-storage-type": [ + "storage.type" + ], + "polyglot-notebook-storage-modifier": [ + "storage.modifier" + ], + "polyglot-notebook-keyword-operator-noexcept": [ + "keyword.operator.noexcept" + ], + "polyglot-notebook-string": [ + "string" + ], + "polyglot-notebook-meta-embedded-assembly": [ + "meta.embedded.assembly" + ], + "polyglot-notebook-string-comment-buffered-block-pug": [ + "string.comment.buffered.block.pug" + ], + "polyglot-notebook-string-quoted-pug": [ + "string.quoted.pug" + ], + "polyglot-notebook-string-interpolated-pug": [ + "string.interpolated.pug" + ], + "polyglot-notebook-string-unquoted-plain-in-yaml": [ + "string.unquoted.plain.in.yaml" + ], + "polyglot-notebook-string-unquoted-plain-out-yaml": [ + "string.unquoted.plain.out.yaml" + ], + "polyglot-notebook-string-unquoted-block-yaml": [ + "string.unquoted.block.yaml" + ], + "polyglot-notebook-string-quoted-single-yaml": [ + "string.quoted.single.yaml" + ], + "polyglot-notebook-string-quoted-double-xml": [ + "string.quoted.double.xml" + ], + "polyglot-notebook-string-quoted-single-xml": [ + "string.quoted.single.xml" + ], + "polyglot-notebook-string-unquoted-cdata-xml": [ + "string.unquoted.cdata.xml" + ], + "polyglot-notebook-string-quoted-double-html": [ + "string.quoted.double.html" + ], + "polyglot-notebook-string-quoted-single-html": [ + "string.quoted.single.html" + ], + "polyglot-notebook-string-unquoted-html": [ + "string.unquoted.html" + ], + "polyglot-notebook-string-quoted-single-handlebars": [ + "string.quoted.single.handlebars" + ], + "polyglot-notebook-string-quoted-double-handlebars": [ + "string.quoted.double.handlebars" + ], + "polyglot-notebook-string-regexp": [ + "string.regexp" + ], + "polyglot-notebook-punctuation-definition-template-expression-begin": [ + "punctuation.definition.template-expression.begin" + ], + "polyglot-notebook-punctuation-definition-template-expression-end": [ + "punctuation.definition.template-expression.end" + ], + "polyglot-notebook-punctuation-section-embedded": [ + "punctuation.section.embedded" + ], + "polyglot-notebook-meta-template-expression": [ + "meta.template.expression" + ], + "polyglot-notebook-support-constant-property-value": [ + "support.constant.property-value" + ], + "polyglot-notebook-support-constant-font-name": [ + "support.constant.font-name" + ], + "polyglot-notebook-support-constant-media-type": [ + "support.constant.media-type" + ], + "polyglot-notebook-support-constant-media": [ + "support.constant.media" + ], + "polyglot-notebook-constant-other-color-rgb-value": [ + "constant.other.color.rgb-value" + ], + "polyglot-notebook-constant-other-rgb-value": [ + "constant.other.rgb-value" + ], + "polyglot-notebook-support-constant-color": [ + "support.constant.color" + ], + "polyglot-notebook-support-type-vendored-property-name": [ + "support.type.vendored.property-name" + ], + "polyglot-notebook-support-type-property-name": [ + "support.type.property-name" + ], + "polyglot-notebook-variable-css": [ + "variable.css" + ], + "polyglot-notebook-variable-scss": [ + "variable.scss" + ], + "polyglot-notebook-variable-other-less": [ + "variable.other.less" + ], + "polyglot-notebook-source-coffee-embedded": [ + "source.coffee.embedded" + ], + "polyglot-notebook-support-type-property-name-json": [ + "support.type.property-name.json" + ], + "polyglot-notebook-keyword": [ + "keyword" + ], + "polyglot-notebook-keyword-control": [ + "keyword.control" + ], + "polyglot-notebook-keyword-operator": [ + "keyword.operator" + ], + "polyglot-notebook-keyword-operator-new": [ + "keyword.operator.new" + ], + "polyglot-notebook-keyword-operator-expression": [ + "keyword.operator.expression" + ], + "polyglot-notebook-keyword-operator-cast": [ + "keyword.operator.cast" + ], + "polyglot-notebook-keyword-operator-sizeof": [ + "keyword.operator.sizeof" + ], + "polyglot-notebook-keyword-operator-alignof": [ + "keyword.operator.alignof" + ], + "polyglot-notebook-keyword-operator-typeid": [ + "keyword.operator.typeid" + ], + "polyglot-notebook-keyword-operator-alignas": [ + "keyword.operator.alignas" + ], + "polyglot-notebook-keyword-operator-instanceof": [ + "keyword.operator.instanceof" + ], + "polyglot-notebook-keyword-operator-logical-python": [ + "keyword.operator.logical.python" + ], + "polyglot-notebook-keyword-operator-wordlike": [ + "keyword.operator.wordlike" + ], + "polyglot-notebook-keyword-other-unit": [ + "keyword.other.unit" + ], + "polyglot-notebook-punctuation-section-embedded-begin-php": [ + "punctuation.section.embedded.begin.php" + ], + "polyglot-notebook-punctuation-section-embedded-end-php": [ + "punctuation.section.embedded.end.php" + ], + "polyglot-notebook-support-function-git-rebase": [ + "support.function.git-rebase" + ], + "polyglot-notebook-constant-sha-git-rebase": [ + "constant.sha.git-rebase" + ], + "polyglot-notebook-storage-modifier-import-java": [ + "storage.modifier.import.java" + ], + "polyglot-notebook-variable-language-wildcard-java": [ + "variable.language.wildcard.java" + ], + "polyglot-notebook-storage-modifier-package-java": [ + "storage.modifier.package.java" + ], + "polyglot-notebook-variable-language": [ + "variable.language" + ] + } + } + ] + }, + "scripts": { + "compile-preloads": "cd ../polyglot-notebooks && npm run compile", + "copy-preloads": "npx copyfiles --error --verbose --up 3 ../polyglot-notebooks/dist/activation.js ./resources", + "compile-variable-grid": "cd ../polyglot-notebooks-ui-components && npm run buildDev", + "copy-variable-grid": "npx copyfiles --error --verbose --up 3 ../polyglot-notebooks-ui-components/dist/*.* ./resources", + "vscode:prepublish": "npm run compile", + "compile": "npm run lint && tsc -p ./ && npm run compile-preloads && npm run compile-variable-grid && npm run copy-preloads && npm run copy-variable-grid", + "lint": "eslint src --ext ts", + "watch": "tsc -watch -p ./", + "pretest": "npm run compile", + "test": "mocha out/tests/**/*.test.js", + "ciTest": "npm test -- --reporter mocha-multi-reporters --reporter-options configFile=testConfig.json", + "tdd": "npm test -- --watch", + "package": "npx @vscode/vsce package", + "clearUserData": "del-cli \"./userData/**/*\" \"!.gitignore\"" + }, + "mocha": {}, + "devDependencies": { + "@rollup/plugin-commonjs": "21.0.1", + "@rollup/plugin-node-resolve": "13.0.5", + "@types/chai": "4.2.11", + "@types/chai-as-promised": "7.1.3", + "@types/chai-fs": "2.0.2", + "@types/glob": "7.1.1", + "@types/mocha": "9.1.0", + "@types/node": "16.11.6", + "@types/node-fetch": "2.5.12", + "@types/tmp": "0.2.0", + "@types/uuid": "8.3.0", + "@typescript-eslint/eslint-plugin": "5.3.0", + "@typescript-eslint/parser": "5.3.0", + "@vscode/vsce": "2.16.0", + "chai": "4.2.0", + "chai-as-promised": "7.1.1", + "chai-fs": "2.0.0", + "copyfiles": "2.4.1", + "del-cli": "4.0.1", + "eslint": "7.32.0", + "eslint-plugin-deprecation": "1.2.1", + "glob": "7.2.0", + "mocha": "9.2.2", + "mocha-multi-reporters": "1.5.1", + "mocha-trx-reporter": "3.3.1", + "rollup": "2.60.1", + "rollup-plugin-typescript2": "0.31.1", + "source-map-support": "0.5.21", + "tmp": "0.2.1", + "typescript": "4.4.4", + "vscode-test": "1.6.1" + }, + "dependencies": { + "compare-versions": "3.6.0", + "node-fetch": "2.6.7", + "rxjs": "7.5.6", + "uuid": "8.3.2", + "vscode-oniguruma": "1.6.1", + "vscode-textmate": "6.0.0", + "vscode-uri": "3.0.6" + } } \ No newline at end of file diff --git a/src/dotnet-interactive-vscode/resources/dark/restart-kernel.svg b/src/polyglot-notebooks-vscode/resources/dark/restart-kernel.svg similarity index 100% rename from src/dotnet-interactive-vscode/resources/dark/restart-kernel.svg rename to src/polyglot-notebooks-vscode/resources/dark/restart-kernel.svg diff --git a/src/dotnet-interactive-vscode/resources/icons/notebook.svg b/src/polyglot-notebooks-vscode/resources/icons/notebook.svg similarity index 99% rename from src/dotnet-interactive-vscode/resources/icons/notebook.svg rename to src/polyglot-notebooks-vscode/resources/icons/notebook.svg index b9a1f55820..e33668cc60 100644 --- a/src/dotnet-interactive-vscode/resources/icons/notebook.svg +++ b/src/polyglot-notebooks-vscode/resources/icons/notebook.svg @@ -1,3 +1,3 @@ - - + + \ No newline at end of file diff --git a/src/dotnet-interactive-vscode/resources/light/restart-kernel.svg b/src/polyglot-notebooks-vscode/resources/light/restart-kernel.svg similarity index 100% rename from src/dotnet-interactive-vscode/resources/light/restart-kernel.svg rename to src/polyglot-notebooks-vscode/resources/light/restart-kernel.svg diff --git a/src/dotnet-interactive-vscode/src/notebookControllers.ts b/src/polyglot-notebooks-vscode/src/notebookControllers.ts similarity index 96% rename from src/dotnet-interactive-vscode/src/notebookControllers.ts rename to src/polyglot-notebooks-vscode/src/notebookControllers.ts index be07b506c0..55fd66bafa 100644 --- a/src/dotnet-interactive-vscode/src/notebookControllers.ts +++ b/src/polyglot-notebooks-vscode/src/notebookControllers.ts @@ -3,15 +3,15 @@ import * as vscode from 'vscode'; import { ClientMapper } from './vscode-common/clientMapper'; -import * as contracts from './vscode-common/dotnet-interactive/contracts'; +import * as contracts from './vscode-common/polyglot-notebooks/contracts'; import * as vscodeLike from './vscode-common/interfaces/vscode-like'; import * as diagnostics from './vscode-common/diagnostics'; import * as vscodeUtilities from './vscode-common/vscodeUtilities'; import { reshapeOutputValueForVsCode } from './vscode-common/interfaces/utilities'; import { selectDotNetInteractiveKernelForJupyter } from './vscode-common/commands'; import { ErrorOutputCreator, InteractiveClient } from './vscode-common/interactiveClient'; -import { LogEntry, Logger } from './vscode-common/dotnet-interactive/logger'; -import { isKernelEventEnvelope, KernelCommandOrEventEnvelope } from './vscode-common/dotnet-interactive/connection'; +import { LogEntry, Logger } from './vscode-common/polyglot-notebooks/logger'; +import { isKernelEventEnvelope, KernelCommandOrEventEnvelope } from './vscode-common/polyglot-notebooks/connection'; import * as rxjs from 'rxjs'; import * as metadataUtilities from './vscode-common/metadataUtilities'; import * as constants from './vscode-common/constants'; @@ -83,14 +83,12 @@ export class DotNetNotebookKernel { const notebookMetadata = metadataUtilities.getNotebookDocumentMetadataFromNotebookDocument(notebook); const cells = notebook.getCells(); const foundCell = cells.find(cell => cell.document === textDocument); - if (foundCell && foundCell.index > 0) { - // if we found the cell and it's not the first, ensure it has kernel metadata + if (foundCell) { + // if we found the cell ensure it has kernel metadata const cellMetadata = metadataUtilities.getNotebookCellMetadataFromNotebookCellElement(foundCell); if (!cellMetadata.kernelName) { - // no kernel metadata; copy from previous cell - const previousCell = cells[foundCell.index - 1]; - const previousCellMetadata = metadataUtilities.getNotebookCellMetadataFromNotebookCellElement(previousCell); - await vscodeUtilities.setCellKernelName(foundCell, previousCellMetadata.kernelName ?? notebookMetadata.kernelInfo.defaultKernelName); + // no kernel name; set it from the notebook metadata + await vscodeUtilities.setCellKernelName(foundCell, notebookMetadata.kernelInfo.defaultKernelName); } } } @@ -375,4 +373,4 @@ async function updateDocumentKernelspecMetadata(document: vscode.NotebookDocumen const documentMetadata = metadataUtilities.getNotebookDocumentMetadataFromNotebookDocument(document); const newMetadata = metadataUtilities.createNewIpynbMetadataWithNotebookDocumentMetadata(document.metadata, documentMetadata); await versionSpecificFunctions.replaceNotebookMetadata(document.uri, newMetadata); -} +} \ No newline at end of file diff --git a/src/dotnet-interactive-vscode/src/notebookSerializers.ts b/src/polyglot-notebooks-vscode/src/notebookSerializers.ts similarity index 99% rename from src/dotnet-interactive-vscode/src/notebookSerializers.ts rename to src/polyglot-notebooks-vscode/src/notebookSerializers.ts index cf9beebe75..3fc5920b38 100644 --- a/src/dotnet-interactive-vscode/src/notebookSerializers.ts +++ b/src/polyglot-notebooks-vscode/src/notebookSerializers.ts @@ -2,7 +2,7 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. import * as vscode from 'vscode'; -import * as contracts from './vscode-common/dotnet-interactive/contracts'; +import * as contracts from './vscode-common/polyglot-notebooks/contracts'; import * as utilities from './vscode-common/interfaces/utilities'; import * as vscodeLike from './vscode-common/interfaces/vscode-like'; import { languageToCellKind } from './vscode-common/interactiveNotebook'; diff --git a/src/dotnet-interactive-vscode/src/ui b/src/polyglot-notebooks-vscode/src/ui similarity index 100% rename from src/dotnet-interactive-vscode/src/ui rename to src/polyglot-notebooks-vscode/src/ui diff --git a/src/dotnet-interactive-vscode/src/versionSpecificFunctions.ts b/src/polyglot-notebooks-vscode/src/versionSpecificFunctions.ts similarity index 97% rename from src/dotnet-interactive-vscode/src/versionSpecificFunctions.ts rename to src/polyglot-notebooks-vscode/src/versionSpecificFunctions.ts index b00993ae75..f48249ef04 100644 --- a/src/dotnet-interactive-vscode/src/versionSpecificFunctions.ts +++ b/src/polyglot-notebooks-vscode/src/versionSpecificFunctions.ts @@ -4,11 +4,11 @@ import * as vscode from 'vscode'; import * as vscodeLike from './vscode-common/interfaces/vscode-like'; import { ClientMapper } from './vscode-common/clientMapper'; -import { Logger } from './vscode-common/dotnet-interactive/logger'; -import { extractHostAndNomalize, isKernelCommandEnvelope, isKernelEventEnvelope, KernelCommandAndEventReceiver, KernelCommandAndEventSender, KernelCommandOrEventEnvelope } from './vscode-common/dotnet-interactive'; +import { Logger } from './vscode-common/polyglot-notebooks/logger'; +import { extractHostAndNomalize, isKernelCommandEnvelope, isKernelEventEnvelope, KernelCommandAndEventReceiver, KernelCommandAndEventSender, KernelCommandOrEventEnvelope } from './vscode-common/polyglot-notebooks'; import * as rxjs from 'rxjs'; -import * as connection from './vscode-common/dotnet-interactive/connection'; -import * as contracts from './vscode-common/dotnet-interactive/contracts'; +import * as connection from './vscode-common/polyglot-notebooks/connection'; +import * as contracts from './vscode-common/polyglot-notebooks/contracts'; export function getNotebookDocumentFromEditor(notebookEditor: vscode.NotebookEditor): vscode.NotebookDocument { return notebookEditor.notebook; diff --git a/src/polyglot-notebooks-vscode/src/vscode-common b/src/polyglot-notebooks-vscode/src/vscode-common new file mode 120000 index 0000000000..f9dd81722b --- /dev/null +++ b/src/polyglot-notebooks-vscode/src/vscode-common @@ -0,0 +1 @@ +../../polyglot-notebooks-vscode-common/src \ No newline at end of file diff --git a/src/dotnet-interactive-vscode/src/vscode.d.ts b/src/polyglot-notebooks-vscode/src/vscode.d.ts similarity index 100% rename from src/dotnet-interactive-vscode/src/vscode.d.ts rename to src/polyglot-notebooks-vscode/src/vscode.d.ts diff --git a/src/dotnet-interactive-vscode/src/vscode.proposed.notebookMessaging.d.ts b/src/polyglot-notebooks-vscode/src/vscode.proposed.notebookMessaging.d.ts similarity index 100% rename from src/dotnet-interactive-vscode/src/vscode.proposed.notebookMessaging.d.ts rename to src/polyglot-notebooks-vscode/src/vscode.proposed.notebookMessaging.d.ts diff --git a/src/dotnet-interactive-vscode/testConfig.json b/src/polyglot-notebooks-vscode/testConfig.json similarity index 100% rename from src/dotnet-interactive-vscode/testConfig.json rename to src/polyglot-notebooks-vscode/testConfig.json diff --git a/src/polyglot-notebooks-vscode/tests/vscode-common-tests b/src/polyglot-notebooks-vscode/tests/vscode-common-tests new file mode 120000 index 0000000000..6861587083 --- /dev/null +++ b/src/polyglot-notebooks-vscode/tests/vscode-common-tests @@ -0,0 +1 @@ +../../polyglot-notebooks-vscode-common/tests \ No newline at end of file diff --git a/src/dotnet-interactive-vscode/tsconfig.json b/src/polyglot-notebooks-vscode/tsconfig.json similarity index 100% rename from src/dotnet-interactive-vscode/tsconfig.json rename to src/polyglot-notebooks-vscode/tsconfig.json diff --git a/src/dotnet-interactive-vscode/update-api.ps1 b/src/polyglot-notebooks-vscode/update-api.ps1 similarity index 94% rename from src/dotnet-interactive-vscode/update-api.ps1 rename to src/polyglot-notebooks-vscode/update-api.ps1 index 79bc8179f2..84a51bc94d 100644 --- a/src/dotnet-interactive-vscode/update-api.ps1 +++ b/src/polyglot-notebooks-vscode/update-api.ps1 @@ -16,7 +16,7 @@ try { DownloadVsCodeApi -branchName "release/$version" -destinationDirectory "src" # insiders - DownloadVsCodeApi -branchName "main" -destinationDirectory "..\dotnet-interactive-vscode-insiders\src" -isInsiders $true + DownloadVsCodeApi -branchName "main" -destinationDirectory "..\polyglot-notebooks-insiders\src" -isInsiders $true } catch { Write-Host $_ diff --git a/src/dotnet-interactive-vscode/update-versions.ps1 b/src/polyglot-notebooks-vscode/update-versions.ps1 similarity index 95% rename from src/dotnet-interactive-vscode/update-versions.ps1 rename to src/polyglot-notebooks-vscode/update-versions.ps1 index 6a183c2655..1f188d2115 100644 --- a/src/dotnet-interactive-vscode/update-versions.ps1 +++ b/src/polyglot-notebooks-vscode/update-versions.ps1 @@ -51,7 +51,7 @@ try { $vsCodeInsidersVersion = $vsCodeVersionParts[0] + "." + ([int]$vsCodeVersionParts[1] + 1) Update-VersionNumbers -packageJsonPath "$PSScriptRoot\package.json" -vscodeEngine "^$vsCodeStableVersion.0" -updateToolVersion $updateAll - Update-VersionNumbers -packageJsonPath "$PSScriptRoot\..\dotnet-interactive-vscode-insiders\package.json" -vscodeEngine "$vsCodeInsidersVersion.0-insider" -updateToolVersion $true + Update-VersionNumbers -packageJsonPath "$PSScriptRoot\..\polyglot-notebooks-vscode-insiders\package.json" -vscodeEngine "$vsCodeInsidersVersion.0-insider" -updateToolVersion $true } catch { Write-Host $_ diff --git a/src/dotnet-interactive-vscode/vscodeStableVersion.txt b/src/polyglot-notebooks-vscode/vscodeStableVersion.txt similarity index 100% rename from src/dotnet-interactive-vscode/vscodeStableVersion.txt rename to src/polyglot-notebooks-vscode/vscodeStableVersion.txt diff --git a/src/dotnet-interactive-vscode/wallaby.js b/src/polyglot-notebooks-vscode/wallaby.js similarity index 100% rename from src/dotnet-interactive-vscode/wallaby.js rename to src/polyglot-notebooks-vscode/wallaby.js diff --git a/src/microsoft-dotnet-interactive/.eslintignore b/src/polyglot-notebooks/.eslintignore similarity index 100% rename from src/microsoft-dotnet-interactive/.eslintignore rename to src/polyglot-notebooks/.eslintignore diff --git a/src/microsoft-dotnet-interactive/.eslintrc.json b/src/polyglot-notebooks/.eslintrc.json similarity index 100% rename from src/microsoft-dotnet-interactive/.eslintrc.json rename to src/polyglot-notebooks/.eslintrc.json diff --git a/src/polyglot-notebooks/.gitignore b/src/polyglot-notebooks/.gitignore new file mode 100644 index 0000000000..c02d0b68d1 --- /dev/null +++ b/src/polyglot-notebooks/.gitignore @@ -0,0 +1,4 @@ +dist/ +lib/ +node_modules/ +microsoft-polyglot-notebooks-*.tgz \ No newline at end of file diff --git a/src/microsoft-dotnet-interactive/.npmignore b/src/polyglot-notebooks/.npmignore similarity index 100% rename from src/microsoft-dotnet-interactive/.npmignore rename to src/polyglot-notebooks/.npmignore diff --git a/src/microsoft-dotnet-interactive/.npmrc b/src/polyglot-notebooks/.npmrc similarity index 100% rename from src/microsoft-dotnet-interactive/.npmrc rename to src/polyglot-notebooks/.npmrc diff --git a/src/microsoft-dotnet-interactive/.vscode/extensions.json b/src/polyglot-notebooks/.vscode/extensions.json similarity index 100% rename from src/microsoft-dotnet-interactive/.vscode/extensions.json rename to src/polyglot-notebooks/.vscode/extensions.json diff --git a/src/microsoft-dotnet-interactive/.vscode/settings.json b/src/polyglot-notebooks/.vscode/settings.json similarity index 100% rename from src/microsoft-dotnet-interactive/.vscode/settings.json rename to src/polyglot-notebooks/.vscode/settings.json diff --git a/src/microsoft-dotnet-interactive/package-lock.json b/src/polyglot-notebooks/package-lock.json similarity index 100% rename from src/microsoft-dotnet-interactive/package-lock.json rename to src/polyglot-notebooks/package-lock.json diff --git a/src/microsoft-dotnet-interactive/package.json b/src/polyglot-notebooks/package.json similarity index 91% rename from src/microsoft-dotnet-interactive/package.json rename to src/polyglot-notebooks/package.json index 90bfa572ae..2b8e386efe 100644 --- a/src/microsoft-dotnet-interactive/package.json +++ b/src/polyglot-notebooks/package.json @@ -1,7 +1,7 @@ { - "name": "@microsoft/dotnet-interactive", - "displayName": ".NET Interactive Notebooks", - "description": ".NET Interactive Notebook APIs for NodeJS.", + "name": "@microsoft/polyglot-notebooks", + "displayName": "Polyglot Notebooks", + "description": "Polyglot Notebook APIs for NodeJS.", "license": "MIT", "//version": "The version '42.42.42' is auto-set during CI package creation.", "version": "42.42.42", @@ -12,7 +12,7 @@ }, "scripts": { "compile-es-module": "rollup -c rollup.es.config.js -i ./src/webview/activation.ts -o ./dist/activation.js", - "compile-library": "rollup -c rollup.library.config.js -i src/index.ts -o lib/dotnet-interactive.js", + "compile-library": "rollup -c rollup.library.config.js -i src/index.ts -o lib/polyglot-notebooks.js", "compile": "npm run lint && tsc -p ./ && npm run compile-library && npm run compile-es-module", "lint": "eslint src --ext ts", "watch": "tsc -watch -p ./", diff --git a/src/microsoft-dotnet-interactive/rollup.config.js b/src/polyglot-notebooks/rollup.config.js similarity index 100% rename from src/microsoft-dotnet-interactive/rollup.config.js rename to src/polyglot-notebooks/rollup.config.js diff --git a/src/microsoft-dotnet-interactive/rollup.es.config.js b/src/polyglot-notebooks/rollup.es.config.js similarity index 100% rename from src/microsoft-dotnet-interactive/rollup.es.config.js rename to src/polyglot-notebooks/rollup.es.config.js diff --git a/src/microsoft-dotnet-interactive/rollup.library.config.js b/src/polyglot-notebooks/rollup.library.config.js similarity index 97% rename from src/microsoft-dotnet-interactive/rollup.library.config.js rename to src/polyglot-notebooks/rollup.library.config.js index 94f583f11a..f4ae1cf8d0 100644 --- a/src/microsoft-dotnet-interactive/rollup.library.config.js +++ b/src/polyglot-notebooks/rollup.library.config.js @@ -12,7 +12,7 @@ export default { { sourcemap: 'inline', format: 'umd', - name: 'dotnetInteractive' + name: 'polyglotNotebooks' } ], external: [ diff --git a/src/microsoft-dotnet-interactive/src/compositeKernel.ts b/src/polyglot-notebooks/src/compositeKernel.ts similarity index 100% rename from src/microsoft-dotnet-interactive/src/compositeKernel.ts rename to src/polyglot-notebooks/src/compositeKernel.ts diff --git a/src/microsoft-dotnet-interactive/src/connection.ts b/src/polyglot-notebooks/src/connection.ts similarity index 100% rename from src/microsoft-dotnet-interactive/src/connection.ts rename to src/polyglot-notebooks/src/connection.ts diff --git a/src/microsoft-dotnet-interactive/src/consoleCapture.ts b/src/polyglot-notebooks/src/consoleCapture.ts similarity index 100% rename from src/microsoft-dotnet-interactive/src/consoleCapture.ts rename to src/polyglot-notebooks/src/consoleCapture.ts diff --git a/src/microsoft-dotnet-interactive/src/contracts.ts b/src/polyglot-notebooks/src/contracts.ts similarity index 96% rename from src/microsoft-dotnet-interactive/src/contracts.ts rename to src/polyglot-notebooks/src/contracts.ts index f00ac9c5e6..643a67a19b 100644 --- a/src/microsoft-dotnet-interactive/src/contracts.ts +++ b/src/polyglot-notebooks/src/contracts.ts @@ -1,566 +1,566 @@ -// Copyright (c) .NET Foundation and contributors. All rights reserved. -// Licensed under the MIT license. See LICENSE file in the project root for full license information. - -// Generated TypeScript interfaces and types. - -// --------------------------------------------- Kernel Commands - -export const CancelType = "Cancel"; -export const ChangeWorkingDirectoryType = "ChangeWorkingDirectory"; -export const CompileProjectType = "CompileProject"; -export const DisplayErrorType = "DisplayError"; -export const DisplayValueType = "DisplayValue"; -export const OpenDocumentType = "OpenDocument"; -export const OpenProjectType = "OpenProject"; -export const QuitType = "Quit"; -export const RequestCompletionsType = "RequestCompletions"; -export const RequestDiagnosticsType = "RequestDiagnostics"; -export const RequestHoverTextType = "RequestHoverText"; -export const RequestInputType = "RequestInput"; -export const RequestKernelInfoType = "RequestKernelInfo"; -export const RequestSignatureHelpType = "RequestSignatureHelp"; -export const RequestValueType = "RequestValue"; -export const RequestValueInfosType = "RequestValueInfos"; -export const SendEditableCodeType = "SendEditableCode"; -export const SendValueType = "SendValue"; -export const SubmitCodeType = "SubmitCode"; -export const UpdateDisplayedValueType = "UpdateDisplayedValue"; - -export type KernelCommandType = - typeof CancelType - | typeof ChangeWorkingDirectoryType - | typeof CompileProjectType - | typeof DisplayErrorType - | typeof DisplayValueType - | typeof OpenDocumentType - | typeof OpenProjectType - | typeof QuitType - | typeof RequestCompletionsType - | typeof RequestDiagnosticsType - | typeof RequestHoverTextType - | typeof RequestInputType - | typeof RequestKernelInfoType - | typeof RequestSignatureHelpType - | typeof RequestValueType - | typeof RequestValueInfosType - | typeof SendEditableCodeType - | typeof SendValueType - | typeof SubmitCodeType - | typeof UpdateDisplayedValueType; - -export interface Cancel extends KernelCommand { -} - -export interface KernelCommand { - targetKernelName?: string; - originUri?: string; - destinationUri?: string; -} - -export interface ChangeWorkingDirectory extends KernelCommand { - workingDirectory: string; -} - -export interface CompileProject extends KernelCommand { -} - -export interface DisplayError extends KernelCommand { - message: string; -} - -export interface DisplayValue extends KernelCommand { - formattedValue: FormattedValue; - valueId: string; -} - -export interface OpenDocument extends KernelCommand { - relativeFilePath: string; - regionName?: string; -} - -export interface OpenProject extends KernelCommand { - project: Project; -} - -export interface Quit extends KernelCommand { -} - -export interface RequestCompletions extends LanguageServiceCommand { -} - -export interface LanguageServiceCommand extends KernelCommand { - code: string; - linePosition: LinePosition; -} - -export interface RequestDiagnostics extends KernelCommand { - code: string; -} - -export interface RequestHoverText extends LanguageServiceCommand { -} - -export interface RequestInput extends KernelCommand { - prompt: string; - isPassword: boolean; - inputTypeHint: string; - valueName: string; -} - -export interface RequestKernelInfo extends KernelCommand { -} - -export interface RequestSignatureHelp extends LanguageServiceCommand { -} - -export interface RequestValue extends KernelCommand { - name: string; - mimeType: string; -} - -export interface RequestValueInfos extends KernelCommand { - mimeType: string; -} - -export interface SendEditableCode extends KernelCommand { - kernelName: string; - code: string; -} - -export interface SendValue extends KernelCommand { - formattedValue: FormattedValue; - name: string; -} - -export interface SubmitCode extends KernelCommand { - code: string; - submissionType?: SubmissionType; -} - -export interface UpdateDisplayedValue extends KernelCommand { - formattedValue: FormattedValue; - valueId: string; -} - -export interface KernelEvent { -} - -export interface DisplayElement extends InteractiveDocumentOutputElement { - data: { [key: string]: any; }; - metadata: { [key: string]: any; }; -} - -export interface InteractiveDocumentOutputElement { -} - -export interface ReturnValueElement extends InteractiveDocumentOutputElement { - data: { [key: string]: any; }; - executionOrder: number; - metadata: { [key: string]: any; }; -} - -export interface TextElement extends InteractiveDocumentOutputElement { - name: string; - text: string; -} - -export interface ErrorElement extends InteractiveDocumentOutputElement { - errorName: string; - errorValue: string; - stackTrace: Array; -} - -export interface DocumentKernelInfo { - name: string; - languageName?: string; - aliases: Array; -} - -export interface NotebookParseRequest extends NotebookParseOrSerializeRequest { - type: RequestType; - rawData: Uint8Array; -} - -export interface NotebookParseOrSerializeRequest { - type: RequestType; - id: string; - serializationType: DocumentSerializationType; - defaultLanguage: string; -} - -export interface NotebookSerializeRequest extends NotebookParseOrSerializeRequest { - type: RequestType; - newLine: string; - document: InteractiveDocument; -} - -export interface NotebookParseResponse extends NotebookParserServerResponse { - document: InteractiveDocument; -} - -export interface NotebookParserServerResponse { - id: string; -} - -export interface NotebookSerializeResponse extends NotebookParserServerResponse { - rawData: Uint8Array; -} - -export interface NotebookErrorResponse extends NotebookParserServerResponse { - errorMessage: string; -} - -// --------------------------------------------- Kernel events - -export const AssemblyProducedType = "AssemblyProduced"; -export const CodeSubmissionReceivedType = "CodeSubmissionReceived"; -export const CommandCancelledType = "CommandCancelled"; -export const CommandFailedType = "CommandFailed"; -export const CommandSucceededType = "CommandSucceeded"; -export const CompleteCodeSubmissionReceivedType = "CompleteCodeSubmissionReceived"; -export const CompletionsProducedType = "CompletionsProduced"; -export const DiagnosticLogEntryProducedType = "DiagnosticLogEntryProduced"; -export const DiagnosticsProducedType = "DiagnosticsProduced"; -export const DisplayedValueProducedType = "DisplayedValueProduced"; -export const DisplayedValueUpdatedType = "DisplayedValueUpdated"; -export const DocumentOpenedType = "DocumentOpened"; -export const ErrorProducedType = "ErrorProduced"; -export const HoverTextProducedType = "HoverTextProduced"; -export const IncompleteCodeSubmissionReceivedType = "IncompleteCodeSubmissionReceived"; -export const InputProducedType = "InputProduced"; -export const KernelExtensionLoadedType = "KernelExtensionLoaded"; -export const KernelInfoProducedType = "KernelInfoProduced"; -export const KernelReadyType = "KernelReady"; -export const PackageAddedType = "PackageAdded"; -export const ProjectOpenedType = "ProjectOpened"; -export const ReturnValueProducedType = "ReturnValueProduced"; -export const SignatureHelpProducedType = "SignatureHelpProduced"; -export const StandardErrorValueProducedType = "StandardErrorValueProduced"; -export const StandardOutputValueProducedType = "StandardOutputValueProduced"; -export const ValueInfosProducedType = "ValueInfosProduced"; -export const ValueProducedType = "ValueProduced"; -export const WorkingDirectoryChangedType = "WorkingDirectoryChanged"; - -export type KernelEventType = - typeof AssemblyProducedType - | typeof CodeSubmissionReceivedType - | typeof CommandCancelledType - | typeof CommandFailedType - | typeof CommandSucceededType - | typeof CompleteCodeSubmissionReceivedType - | typeof CompletionsProducedType - | typeof DiagnosticLogEntryProducedType - | typeof DiagnosticsProducedType - | typeof DisplayedValueProducedType - | typeof DisplayedValueUpdatedType - | typeof DocumentOpenedType - | typeof ErrorProducedType - | typeof HoverTextProducedType - | typeof IncompleteCodeSubmissionReceivedType - | typeof InputProducedType - | typeof KernelExtensionLoadedType - | typeof KernelInfoProducedType - | typeof KernelReadyType - | typeof PackageAddedType - | typeof ProjectOpenedType - | typeof ReturnValueProducedType - | typeof SignatureHelpProducedType - | typeof StandardErrorValueProducedType - | typeof StandardOutputValueProducedType - | typeof ValueInfosProducedType - | typeof ValueProducedType - | typeof WorkingDirectoryChangedType; - -export interface AssemblyProduced extends KernelEvent { - assembly: Base64EncodedAssembly; -} - -export interface CodeSubmissionReceived extends KernelEvent { - code: string; -} - -export interface CommandCancelled extends KernelEvent { -} - -export interface CommandFailed extends KernelCommandCompletionEvent { - message: string; -} - -export interface KernelCommandCompletionEvent extends KernelEvent { - executionOrder?: number; -} - -export interface CommandSucceeded extends KernelCommandCompletionEvent { -} - -export interface CompleteCodeSubmissionReceived extends KernelEvent { - code: string; -} - -export interface CompletionsProduced extends KernelEvent { - linePositionSpan?: LinePositionSpan; - completions: Array; -} - -export interface DiagnosticLogEntryProduced extends DiagnosticEvent { - message: string; -} - -export interface DiagnosticEvent extends KernelEvent { -} - -export interface DiagnosticsProduced extends KernelEvent { - diagnostics: Array; - formattedDiagnostics: Array; -} - -export interface DisplayedValueProduced extends DisplayEvent { -} - -export interface DisplayEvent extends KernelEvent { - formattedValues: Array; - valueId?: string; -} - -export interface DisplayedValueUpdated extends DisplayEvent { -} - -export interface DocumentOpened extends KernelEvent { - relativeFilePath: string; - regionName?: string; - content: string; -} - -export interface ErrorProduced extends DisplayEvent { - message: string; -} - -export interface HoverTextProduced extends KernelEvent { - content: Array; - linePositionSpan?: LinePositionSpan; -} - -export interface IncompleteCodeSubmissionReceived extends KernelEvent { -} - -export interface InputProduced extends KernelEvent { - value: string; -} - -export interface KernelExtensionLoaded extends KernelEvent { -} - -export interface KernelInfoProduced extends KernelEvent { - kernelInfo: KernelInfo; -} - -export interface KernelReady extends KernelEvent { -} - -export interface PackageAdded extends KernelEvent { - packageReference: ResolvedPackageReference; -} - -export interface ProjectOpened extends KernelEvent { - projectItems: Array; -} - -export interface ReturnValueProduced extends DisplayEvent { -} - -export interface SignatureHelpProduced extends KernelEvent { - signatures: Array; - activeSignatureIndex: number; - activeParameterIndex: number; -} - -export interface StandardErrorValueProduced extends DisplayEvent { -} - -export interface StandardOutputValueProduced extends DisplayEvent { -} - -export interface ValueInfosProduced extends KernelEvent { - valueInfos: Array; -} - -export interface ValueProduced extends KernelEvent { - name: string; - formattedValue: FormattedValue; -} - -export interface WorkingDirectoryChanged extends KernelEvent { - workingDirectory: string; -} - -// --------------------------------------------- Required Types - -export interface Base64EncodedAssembly { - value: string; -} - -export interface CompletionItem { - displayText: string; - kind: string; - filterText: string; - sortText: string; - insertText: string; - insertTextFormat?: InsertTextFormat; - documentation: string; -} - -export enum InsertTextFormat { - PlainText = "plaintext", - Snippet = "snippet", -} - -export interface Diagnostic { - linePositionSpan: LinePositionSpan; - severity: DiagnosticSeverity; - code: string; - message: string; -} - -export enum DiagnosticSeverity { - Hidden = "hidden", - Info = "info", - Warning = "warning", - Error = "error", -} - -export interface LinePositionSpan { - start: LinePosition; - end: LinePosition; -} - -export interface LinePosition { - line: number; - character: number; -} - -export enum DocumentSerializationType { - Dib = "dib", - Ipynb = "ipynb", -} - -export interface FormattedValue { - mimeType: string; - value: string; -} - -export interface InteractiveDocument { - elements: Array; - metadata: { [key: string]: any; }; -} - -export interface InteractiveDocumentElement { - id?: string; - kernelName?: string; - contents: string; - outputs: Array; - executionOrder: number; - metadata?: { [key: string]: any; }; -} - -export interface KernelInfo { - aliases: Array; - languageName?: string; - languageVersion?: string; - displayName: string; - localName: string; - uri: string; - remoteUri?: string; - supportedKernelCommands: Array; - supportedDirectives: Array; -} - -export interface KernelCommandInfo { - name: string; -} - -export interface KernelDirectiveInfo { - name: string; -} - -export interface KernelValueInfo { - typeName: string; - name: string; - formattedValue: FormattedValue; - preferredMimeTypes: Array; -} - -export interface Project { - files: Array; -} - -export interface ProjectFile { - relativeFilePath: string; - content: string; -} - -export interface ProjectItem { - relativeFilePath: string; - regionNames: Array; - regionsContent: { [key: string]: string; }; -} - -export enum RequestType { - Parse = "parse", - Serialize = "serialize", -} - -export interface ResolvedPackageReference extends PackageReference { - assemblyPaths: Array; - probingPaths: Array; - packageRoot: string; -} - -export interface PackageReference { - packageName: string; - packageVersion: string; - isPackageVersionSpecified: boolean; -} - -export interface SignatureInformation { - label: string; - documentation: FormattedValue; - parameters: Array; -} - -export interface ParameterInformation { - label: string; - documentation: FormattedValue; -} - -export enum SubmissionType { - Run = "run", - Diagnose = "diagnose", -} - -export interface DocumentKernelInfoCollection { - defaultKernelName: string; - items: DocumentKernelInfo[]; -} - -export interface KernelEventEnvelope { - eventType: KernelEventType; - event: KernelEvent; - command?: KernelCommandEnvelope; - routingSlip?: string[]; -} - -export interface KernelCommandEnvelope { - token?: string; - id?: string; - commandType: KernelCommandType; - command: KernelCommand; - routingSlip?: string[]; -} - -export interface KernelEventEnvelopeObserver { - (eventEnvelope: KernelEventEnvelope): void; -} - -export interface KernelCommandEnvelopeHandler { - (eventEnvelope: KernelCommandEnvelope): Promise; -} +// Copyright (c) .NET Foundation and contributors. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. + +// Generated TypeScript interfaces and types. + +// --------------------------------------------- Kernel Commands + +export const CancelType = "Cancel"; +export const ChangeWorkingDirectoryType = "ChangeWorkingDirectory"; +export const CompileProjectType = "CompileProject"; +export const DisplayErrorType = "DisplayError"; +export const DisplayValueType = "DisplayValue"; +export const OpenDocumentType = "OpenDocument"; +export const OpenProjectType = "OpenProject"; +export const QuitType = "Quit"; +export const RequestCompletionsType = "RequestCompletions"; +export const RequestDiagnosticsType = "RequestDiagnostics"; +export const RequestHoverTextType = "RequestHoverText"; +export const RequestInputType = "RequestInput"; +export const RequestKernelInfoType = "RequestKernelInfo"; +export const RequestSignatureHelpType = "RequestSignatureHelp"; +export const RequestValueType = "RequestValue"; +export const RequestValueInfosType = "RequestValueInfos"; +export const SendEditableCodeType = "SendEditableCode"; +export const SendValueType = "SendValue"; +export const SubmitCodeType = "SubmitCode"; +export const UpdateDisplayedValueType = "UpdateDisplayedValue"; + +export type KernelCommandType = + typeof CancelType + | typeof ChangeWorkingDirectoryType + | typeof CompileProjectType + | typeof DisplayErrorType + | typeof DisplayValueType + | typeof OpenDocumentType + | typeof OpenProjectType + | typeof QuitType + | typeof RequestCompletionsType + | typeof RequestDiagnosticsType + | typeof RequestHoverTextType + | typeof RequestInputType + | typeof RequestKernelInfoType + | typeof RequestSignatureHelpType + | typeof RequestValueType + | typeof RequestValueInfosType + | typeof SendEditableCodeType + | typeof SendValueType + | typeof SubmitCodeType + | typeof UpdateDisplayedValueType; + +export interface Cancel extends KernelCommand { +} + +export interface KernelCommand { + targetKernelName?: string; + originUri?: string; + destinationUri?: string; +} + +export interface ChangeWorkingDirectory extends KernelCommand { + workingDirectory: string; +} + +export interface CompileProject extends KernelCommand { +} + +export interface DisplayError extends KernelCommand { + message: string; +} + +export interface DisplayValue extends KernelCommand { + formattedValue: FormattedValue; + valueId: string; +} + +export interface OpenDocument extends KernelCommand { + relativeFilePath: string; + regionName?: string; +} + +export interface OpenProject extends KernelCommand { + project: Project; +} + +export interface Quit extends KernelCommand { +} + +export interface RequestCompletions extends LanguageServiceCommand { +} + +export interface LanguageServiceCommand extends KernelCommand { + code: string; + linePosition: LinePosition; +} + +export interface RequestDiagnostics extends KernelCommand { + code: string; +} + +export interface RequestHoverText extends LanguageServiceCommand { +} + +export interface RequestInput extends KernelCommand { + prompt: string; + isPassword: boolean; + inputTypeHint: string; + valueName: string; +} + +export interface RequestKernelInfo extends KernelCommand { +} + +export interface RequestSignatureHelp extends LanguageServiceCommand { +} + +export interface RequestValue extends KernelCommand { + name: string; + mimeType: string; +} + +export interface RequestValueInfos extends KernelCommand { + mimeType: string; +} + +export interface SendEditableCode extends KernelCommand { + kernelName: string; + code: string; +} + +export interface SendValue extends KernelCommand { + formattedValue: FormattedValue; + name: string; +} + +export interface SubmitCode extends KernelCommand { + code: string; + submissionType?: SubmissionType; +} + +export interface UpdateDisplayedValue extends KernelCommand { + formattedValue: FormattedValue; + valueId: string; +} + +export interface KernelEvent { +} + +export interface DisplayElement extends InteractiveDocumentOutputElement { + data: { [key: string]: any; }; + metadata: { [key: string]: any; }; +} + +export interface InteractiveDocumentOutputElement { +} + +export interface ReturnValueElement extends InteractiveDocumentOutputElement { + data: { [key: string]: any; }; + executionOrder: number; + metadata: { [key: string]: any; }; +} + +export interface TextElement extends InteractiveDocumentOutputElement { + name: string; + text: string; +} + +export interface ErrorElement extends InteractiveDocumentOutputElement { + errorName: string; + errorValue: string; + stackTrace: Array; +} + +export interface DocumentKernelInfo { + name: string; + languageName?: string; + aliases: Array; +} + +export interface NotebookParseRequest extends NotebookParseOrSerializeRequest { + type: RequestType; + rawData: Uint8Array; +} + +export interface NotebookParseOrSerializeRequest { + type: RequestType; + id: string; + serializationType: DocumentSerializationType; + defaultLanguage: string; +} + +export interface NotebookSerializeRequest extends NotebookParseOrSerializeRequest { + type: RequestType; + newLine: string; + document: InteractiveDocument; +} + +export interface NotebookParseResponse extends NotebookParserServerResponse { + document: InteractiveDocument; +} + +export interface NotebookParserServerResponse { + id: string; +} + +export interface NotebookSerializeResponse extends NotebookParserServerResponse { + rawData: Uint8Array; +} + +export interface NotebookErrorResponse extends NotebookParserServerResponse { + errorMessage: string; +} + +// --------------------------------------------- Kernel events + +export const AssemblyProducedType = "AssemblyProduced"; +export const CodeSubmissionReceivedType = "CodeSubmissionReceived"; +export const CommandCancelledType = "CommandCancelled"; +export const CommandFailedType = "CommandFailed"; +export const CommandSucceededType = "CommandSucceeded"; +export const CompleteCodeSubmissionReceivedType = "CompleteCodeSubmissionReceived"; +export const CompletionsProducedType = "CompletionsProduced"; +export const DiagnosticLogEntryProducedType = "DiagnosticLogEntryProduced"; +export const DiagnosticsProducedType = "DiagnosticsProduced"; +export const DisplayedValueProducedType = "DisplayedValueProduced"; +export const DisplayedValueUpdatedType = "DisplayedValueUpdated"; +export const DocumentOpenedType = "DocumentOpened"; +export const ErrorProducedType = "ErrorProduced"; +export const HoverTextProducedType = "HoverTextProduced"; +export const IncompleteCodeSubmissionReceivedType = "IncompleteCodeSubmissionReceived"; +export const InputProducedType = "InputProduced"; +export const KernelExtensionLoadedType = "KernelExtensionLoaded"; +export const KernelInfoProducedType = "KernelInfoProduced"; +export const KernelReadyType = "KernelReady"; +export const PackageAddedType = "PackageAdded"; +export const ProjectOpenedType = "ProjectOpened"; +export const ReturnValueProducedType = "ReturnValueProduced"; +export const SignatureHelpProducedType = "SignatureHelpProduced"; +export const StandardErrorValueProducedType = "StandardErrorValueProduced"; +export const StandardOutputValueProducedType = "StandardOutputValueProduced"; +export const ValueInfosProducedType = "ValueInfosProduced"; +export const ValueProducedType = "ValueProduced"; +export const WorkingDirectoryChangedType = "WorkingDirectoryChanged"; + +export type KernelEventType = + typeof AssemblyProducedType + | typeof CodeSubmissionReceivedType + | typeof CommandCancelledType + | typeof CommandFailedType + | typeof CommandSucceededType + | typeof CompleteCodeSubmissionReceivedType + | typeof CompletionsProducedType + | typeof DiagnosticLogEntryProducedType + | typeof DiagnosticsProducedType + | typeof DisplayedValueProducedType + | typeof DisplayedValueUpdatedType + | typeof DocumentOpenedType + | typeof ErrorProducedType + | typeof HoverTextProducedType + | typeof IncompleteCodeSubmissionReceivedType + | typeof InputProducedType + | typeof KernelExtensionLoadedType + | typeof KernelInfoProducedType + | typeof KernelReadyType + | typeof PackageAddedType + | typeof ProjectOpenedType + | typeof ReturnValueProducedType + | typeof SignatureHelpProducedType + | typeof StandardErrorValueProducedType + | typeof StandardOutputValueProducedType + | typeof ValueInfosProducedType + | typeof ValueProducedType + | typeof WorkingDirectoryChangedType; + +export interface AssemblyProduced extends KernelEvent { + assembly: Base64EncodedAssembly; +} + +export interface CodeSubmissionReceived extends KernelEvent { + code: string; +} + +export interface CommandCancelled extends KernelEvent { +} + +export interface CommandFailed extends KernelCommandCompletionEvent { + message: string; +} + +export interface KernelCommandCompletionEvent extends KernelEvent { + executionOrder?: number; +} + +export interface CommandSucceeded extends KernelCommandCompletionEvent { +} + +export interface CompleteCodeSubmissionReceived extends KernelEvent { + code: string; +} + +export interface CompletionsProduced extends KernelEvent { + linePositionSpan?: LinePositionSpan; + completions: Array; +} + +export interface DiagnosticLogEntryProduced extends DiagnosticEvent { + message: string; +} + +export interface DiagnosticEvent extends KernelEvent { +} + +export interface DiagnosticsProduced extends KernelEvent { + diagnostics: Array; + formattedDiagnostics: Array; +} + +export interface DisplayedValueProduced extends DisplayEvent { +} + +export interface DisplayEvent extends KernelEvent { + formattedValues: Array; + valueId?: string; +} + +export interface DisplayedValueUpdated extends DisplayEvent { +} + +export interface DocumentOpened extends KernelEvent { + relativeFilePath: string; + regionName?: string; + content: string; +} + +export interface ErrorProduced extends DisplayEvent { + message: string; +} + +export interface HoverTextProduced extends KernelEvent { + content: Array; + linePositionSpan?: LinePositionSpan; +} + +export interface IncompleteCodeSubmissionReceived extends KernelEvent { +} + +export interface InputProduced extends KernelEvent { + value: string; +} + +export interface KernelExtensionLoaded extends KernelEvent { +} + +export interface KernelInfoProduced extends KernelEvent { + kernelInfo: KernelInfo; +} + +export interface KernelReady extends KernelEvent { +} + +export interface PackageAdded extends KernelEvent { + packageReference: ResolvedPackageReference; +} + +export interface ProjectOpened extends KernelEvent { + projectItems: Array; +} + +export interface ReturnValueProduced extends DisplayEvent { +} + +export interface SignatureHelpProduced extends KernelEvent { + signatures: Array; + activeSignatureIndex: number; + activeParameterIndex: number; +} + +export interface StandardErrorValueProduced extends DisplayEvent { +} + +export interface StandardOutputValueProduced extends DisplayEvent { +} + +export interface ValueInfosProduced extends KernelEvent { + valueInfos: Array; +} + +export interface ValueProduced extends KernelEvent { + name: string; + formattedValue: FormattedValue; +} + +export interface WorkingDirectoryChanged extends KernelEvent { + workingDirectory: string; +} + +// --------------------------------------------- Required Types + +export interface Base64EncodedAssembly { + value: string; +} + +export interface CompletionItem { + displayText: string; + kind: string; + filterText: string; + sortText: string; + insertText: string; + insertTextFormat?: InsertTextFormat; + documentation: string; +} + +export enum InsertTextFormat { + PlainText = "plaintext", + Snippet = "snippet", +} + +export interface Diagnostic { + linePositionSpan: LinePositionSpan; + severity: DiagnosticSeverity; + code: string; + message: string; +} + +export enum DiagnosticSeverity { + Hidden = "hidden", + Info = "info", + Warning = "warning", + Error = "error", +} + +export interface LinePositionSpan { + start: LinePosition; + end: LinePosition; +} + +export interface LinePosition { + line: number; + character: number; +} + +export enum DocumentSerializationType { + Dib = "dib", + Ipynb = "ipynb", +} + +export interface FormattedValue { + mimeType: string; + value: string; +} + +export interface InteractiveDocument { + elements: Array; + metadata: { [key: string]: any; }; +} + +export interface InteractiveDocumentElement { + id?: string; + kernelName?: string; + contents: string; + outputs: Array; + executionOrder: number; + metadata?: { [key: string]: any; }; +} + +export interface KernelInfo { + aliases: Array; + languageName?: string; + languageVersion?: string; + displayName: string; + localName: string; + uri: string; + remoteUri?: string; + supportedKernelCommands: Array; + supportedDirectives: Array; +} + +export interface KernelCommandInfo { + name: string; +} + +export interface KernelDirectiveInfo { + name: string; +} + +export interface KernelValueInfo { + typeName: string; + name: string; + formattedValue: FormattedValue; + preferredMimeTypes: Array; +} + +export interface Project { + files: Array; +} + +export interface ProjectFile { + relativeFilePath: string; + content: string; +} + +export interface ProjectItem { + relativeFilePath: string; + regionNames: Array; + regionsContent: { [key: string]: string; }; +} + +export enum RequestType { + Parse = "parse", + Serialize = "serialize", +} + +export interface ResolvedPackageReference extends PackageReference { + assemblyPaths: Array; + probingPaths: Array; + packageRoot: string; +} + +export interface PackageReference { + packageName: string; + packageVersion: string; + isPackageVersionSpecified: boolean; +} + +export interface SignatureInformation { + label: string; + documentation: FormattedValue; + parameters: Array; +} + +export interface ParameterInformation { + label: string; + documentation: FormattedValue; +} + +export enum SubmissionType { + Run = "run", + Diagnose = "diagnose", +} + +export interface DocumentKernelInfoCollection { + defaultKernelName: string; + items: DocumentKernelInfo[]; +} + +export interface KernelEventEnvelope { + eventType: KernelEventType; + event: KernelEvent; + command?: KernelCommandEnvelope; + routingSlip?: string[]; +} + +export interface KernelCommandEnvelope { + token?: string; + id?: string; + commandType: KernelCommandType; + command: KernelCommand; + routingSlip?: string[]; +} + +export interface KernelEventEnvelopeObserver { + (eventEnvelope: KernelEventEnvelope): void; +} + +export interface KernelCommandEnvelopeHandler { + (eventEnvelope: KernelCommandEnvelope): Promise; +} diff --git a/src/microsoft-dotnet-interactive/src/disposables.ts b/src/polyglot-notebooks/src/disposables.ts similarity index 100% rename from src/microsoft-dotnet-interactive/src/disposables.ts rename to src/polyglot-notebooks/src/disposables.ts diff --git a/src/microsoft-dotnet-interactive/src/htmlKernel.ts b/src/polyglot-notebooks/src/htmlKernel.ts similarity index 100% rename from src/microsoft-dotnet-interactive/src/htmlKernel.ts rename to src/polyglot-notebooks/src/htmlKernel.ts diff --git a/src/microsoft-dotnet-interactive/src/index.ts b/src/polyglot-notebooks/src/index.ts similarity index 100% rename from src/microsoft-dotnet-interactive/src/index.ts rename to src/polyglot-notebooks/src/index.ts diff --git a/src/microsoft-dotnet-interactive/src/javascriptKernel.ts b/src/polyglot-notebooks/src/javascriptKernel.ts similarity index 100% rename from src/microsoft-dotnet-interactive/src/javascriptKernel.ts rename to src/polyglot-notebooks/src/javascriptKernel.ts diff --git a/src/microsoft-dotnet-interactive/src/kernel.ts b/src/polyglot-notebooks/src/kernel.ts similarity index 100% rename from src/microsoft-dotnet-interactive/src/kernel.ts rename to src/polyglot-notebooks/src/kernel.ts diff --git a/src/microsoft-dotnet-interactive/src/kernelHost.ts b/src/polyglot-notebooks/src/kernelHost.ts similarity index 100% rename from src/microsoft-dotnet-interactive/src/kernelHost.ts rename to src/polyglot-notebooks/src/kernelHost.ts diff --git a/src/microsoft-dotnet-interactive/src/kernelInvocationContext.ts b/src/polyglot-notebooks/src/kernelInvocationContext.ts similarity index 100% rename from src/microsoft-dotnet-interactive/src/kernelInvocationContext.ts rename to src/polyglot-notebooks/src/kernelInvocationContext.ts diff --git a/src/microsoft-dotnet-interactive/src/kernelScheduler.ts b/src/polyglot-notebooks/src/kernelScheduler.ts similarity index 100% rename from src/microsoft-dotnet-interactive/src/kernelScheduler.ts rename to src/polyglot-notebooks/src/kernelScheduler.ts diff --git a/src/microsoft-dotnet-interactive/src/logger.ts b/src/polyglot-notebooks/src/logger.ts similarity index 100% rename from src/microsoft-dotnet-interactive/src/logger.ts rename to src/polyglot-notebooks/src/logger.ts diff --git a/src/microsoft-dotnet-interactive/src/promiseCompletionSource.ts b/src/polyglot-notebooks/src/promiseCompletionSource.ts similarity index 100% rename from src/microsoft-dotnet-interactive/src/promiseCompletionSource.ts rename to src/polyglot-notebooks/src/promiseCompletionSource.ts diff --git a/src/microsoft-dotnet-interactive/src/proxyKernel.ts b/src/polyglot-notebooks/src/proxyKernel.ts similarity index 100% rename from src/microsoft-dotnet-interactive/src/proxyKernel.ts rename to src/polyglot-notebooks/src/proxyKernel.ts diff --git a/src/microsoft-dotnet-interactive/src/routingslip.ts b/src/polyglot-notebooks/src/routingslip.ts similarity index 100% rename from src/microsoft-dotnet-interactive/src/routingslip.ts rename to src/polyglot-notebooks/src/routingslip.ts diff --git a/src/microsoft-dotnet-interactive/src/setup.ts b/src/polyglot-notebooks/src/setup.ts similarity index 100% rename from src/microsoft-dotnet-interactive/src/setup.ts rename to src/polyglot-notebooks/src/setup.ts diff --git a/src/microsoft-dotnet-interactive/src/tokenGenerator.ts b/src/polyglot-notebooks/src/tokenGenerator.ts similarity index 100% rename from src/microsoft-dotnet-interactive/src/tokenGenerator.ts rename to src/polyglot-notebooks/src/tokenGenerator.ts diff --git a/src/microsoft-dotnet-interactive/src/webview/activation.ts b/src/polyglot-notebooks/src/webview/activation.ts similarity index 100% rename from src/microsoft-dotnet-interactive/src/webview/activation.ts rename to src/polyglot-notebooks/src/webview/activation.ts diff --git a/src/microsoft-dotnet-interactive/src/webview/frontEndHost.ts b/src/polyglot-notebooks/src/webview/frontEndHost.ts similarity index 100% rename from src/microsoft-dotnet-interactive/src/webview/frontEndHost.ts rename to src/polyglot-notebooks/src/webview/frontEndHost.ts diff --git a/src/microsoft-dotnet-interactive/testConfig.json b/src/polyglot-notebooks/testConfig.json similarity index 100% rename from src/microsoft-dotnet-interactive/testConfig.json rename to src/polyglot-notebooks/testConfig.json diff --git a/src/microsoft-dotnet-interactive/tests/compositeKernel.test.ts b/src/polyglot-notebooks/tests/compositeKernel.test.ts similarity index 100% rename from src/microsoft-dotnet-interactive/tests/compositeKernel.test.ts rename to src/polyglot-notebooks/tests/compositeKernel.test.ts diff --git a/src/microsoft-dotnet-interactive/tests/connector.test.ts b/src/polyglot-notebooks/tests/connector.test.ts similarity index 100% rename from src/microsoft-dotnet-interactive/tests/connector.test.ts rename to src/polyglot-notebooks/tests/connector.test.ts diff --git a/src/microsoft-dotnet-interactive/tests/frontEndHost.test.ts b/src/polyglot-notebooks/tests/frontEndHost.test.ts similarity index 97% rename from src/microsoft-dotnet-interactive/tests/frontEndHost.test.ts rename to src/polyglot-notebooks/tests/frontEndHost.test.ts index 8b8d97ca42..9ab18bd4b9 100644 --- a/src/microsoft-dotnet-interactive/tests/frontEndHost.test.ts +++ b/src/polyglot-notebooks/tests/frontEndHost.test.ts @@ -1,224 +1,224 @@ -// Copyright (c) .NET Foundation and contributors. All rights reserved. -// Licensed under the MIT license. See LICENSE file in the project root for full license information. - -import { expect } from "chai"; -import { CompositeKernel } from '../src/compositeKernel'; -import * as connection from "../src/connection"; -import * as contracts from "../src/contracts"; -import { clearTokenAndId } from "./testSupport"; -import * as frontEndHost from "../src/webview/frontEndHost"; -import * as rxjs from "rxjs"; - -describe("frontEndHost", () => { - - function noop() { - }; - - it("createHost adds interactive object to global and configures require", () => { - const testGlobal: any = {}; - const remoteToLocal = new rxjs.Subject(); - const localToRemote = new rxjs.Subject(); - frontEndHost.createHost(testGlobal, 'testKernel', interactive => { - interactive.require = "noop"; - }, noop, localToRemote, remoteToLocal, noop); - expect(testGlobal.interactive.require).to.equal("noop"); - expect(testGlobal.kernel).to.not.be.undefined; - }); - - it("createHost adds composite kernel and kernel host to global object", () => { - const testGlobal: any = {}; - const remoteToLocal = new rxjs.Subject(); - const localToRemote = new rxjs.Subject(); - frontEndHost.createHost(testGlobal, 'testKernel', noop, noop, localToRemote, remoteToLocal, noop); - expect(testGlobal['testKernel'].compositeKernel).to.not.be.undefined; - expect(testGlobal['testKernel'].kernelHost).to.not.be.undefined; - }); - - it("createHost notifies when ready", (done) => { - const remoteToLocal = new rxjs.Subject(); - const localToRemote = new rxjs.Subject(); - frontEndHost.createHost({}, 'testKernel', noop, noop, localToRemote, remoteToLocal, () => { - done(); - }); - }); - - it("createHost sends initialization events", () => { - const remoteToLocal = new rxjs.Subject(); - const localToRemote = new rxjs.Subject(); - const testGlobal: any = {}; - const seenMessages: connection.KernelCommandOrEventEnvelope[] = []; - localToRemote.subscribe({ - next: message => { - seenMessages.push(clearTokenAndId(message)); - } - }); - frontEndHost.createHost(testGlobal, 'testKernel', noop, noop, localToRemote, remoteToLocal, noop); - expect(seenMessages).to.deep.equal([{ - event: {}, - eventType: 'KernelReady', - routingSlip: ['kernel://testKernel/'] - }, - { - event: - { - kernelInfo: - { - aliases: [], - displayName: 'testKernel', - localName: 'testKernel', - supportedDirectives: [], - supportedKernelCommands: [{ name: 'RequestKernelInfo' }], - uri: 'kernel://testKernel/' - } - }, - eventType: 'KernelInfoProduced', - routingSlip: ['kernel://testKernel/'] - }, - { - event: - { - kernelInfo: - { - aliases: ['js'], - languageName: 'JavaScript', - displayName: 'JavaScript', - localName: 'javascript', - supportedDirectives: [], - supportedKernelCommands: - [{ name: 'RequestKernelInfo' }, - { name: 'SubmitCode' }, - { name: 'RequestValueInfos' }, - { name: 'RequestValue' }, - { name: 'SendValue' }], - uri: 'kernel://testKernel/javascript' - } - }, - eventType: 'KernelInfoProduced', - routingSlip: ['kernel://testKernel/javascript'] - }]); - }); - - it("front end kernel adds proxy when new kernel info is seen", () => { - const remoteToLocal = new rxjs.Subject(); - const localToRemote = new rxjs.Subject(); - const testGlobal: any = {}; - frontEndHost.createHost(testGlobal, 'testKernel', noop, noop, localToRemote, remoteToLocal, noop); - const compositeKernel = testGlobal['testKernel'].compositeKernel; - remoteToLocal.next({ - eventType: contracts.KernelInfoProducedType, - event: { - kernelInfo: { - localName: 'sql', - uri: 'kernel://remote/sql', - aliases: [], - languageName: 'SQL', - languageVersion: '10', - displayName: 'SQL', - supportedDirectives: [], - supportedKernelCommands: [ - { - name: contracts.RequestKernelInfoType - }, - { - name: contracts.SubmitCodeType - }, - { - name: contracts.RequestValueInfosType - }, - { - name: contracts.RequestValueType - } - ] - } - } - }); - const kernel = compositeKernel.findKernelByName('sql'); - expect(kernel).to.not.be.undefined; - expect(kernel!.kernelInfo).to.deep.equal({ - aliases: [], - languageName: 'SQL', - languageVersion: '10', - localName: 'sql', - remoteUri: 'kernel://remote/sql', - displayName: 'SQL', - supportedDirectives: [], - supportedKernelCommands: - [{ name: 'RequestKernelInfo' }, - { name: 'SubmitCode' }, - { name: 'RequestValueInfos' }, - { name: 'RequestValue' }], - uri: 'kernel://testKernel/sql' - }); - }); - - it("front end kernel updates proxy when new kernel info is seen", () => { - const remoteToLocal = new rxjs.Subject(); - const localToRemote = new rxjs.Subject(); - const testGlobal: any = {}; - frontEndHost.createHost(testGlobal, 'testKernel', noop, noop, localToRemote, remoteToLocal, noop); - const compositeKernel = testGlobal['testKernel'].compositeKernel; - remoteToLocal.next({ - eventType: contracts.KernelInfoProducedType, - event: { - kernelInfo: { - localName: 'sql', - uri: 'kernel://remote/sql', - aliases: [], - displayName: 'SQL', - supportedDirectives: [], - supportedKernelCommands: [ - { - name: contracts.RequestKernelInfoType - } - ] - } - } - }); - remoteToLocal.next({ - eventType: contracts.KernelInfoProducedType, - event: { - kernelInfo: { - localName: 'sql', - uri: 'kernel://remote/sql', - aliases: [], - languageName: 'SQL', - languageVersion: '10', - displayName: 'SQL', - supportedDirectives: [], - supportedKernelCommands: [ - { - name: contracts.RequestKernelInfoType - }, - { - name: contracts.SubmitCodeType - }, - { - name: contracts.RequestValueInfosType - }, - { - name: contracts.RequestValueType - } - ] - } - } - }); - const kernel = compositeKernel.findKernelByName('sql'); - expect(kernel).to.not.be.undefined; - expect(kernel!.kernelInfo).to.deep.equal({ - aliases: [], - languageName: 'SQL', - languageVersion: '10', - localName: 'sql', - remoteUri: 'kernel://remote/sql', - displayName: 'SQL', - supportedDirectives: [], - supportedKernelCommands: - [{ name: 'RequestKernelInfo' }, - { name: 'SubmitCode' }, - { name: 'RequestValueInfos' }, - { name: 'RequestValue' }], - uri: 'kernel://testKernel/sql' - }); - }); - -}); +// Copyright (c) .NET Foundation and contributors. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. + +import { expect } from "chai"; +import { CompositeKernel } from '../src/compositeKernel'; +import * as connection from "../src/connection"; +import * as contracts from "../src/contracts"; +import { clearTokenAndId } from "./testSupport"; +import * as frontEndHost from "../src/webview/frontEndHost"; +import * as rxjs from "rxjs"; + +describe("frontEndHost", () => { + + function noop() { + }; + + it("createHost adds interactive object to global and configures require", () => { + const testGlobal: any = {}; + const remoteToLocal = new rxjs.Subject(); + const localToRemote = new rxjs.Subject(); + frontEndHost.createHost(testGlobal, 'testKernel', interactive => { + interactive.require = "noop"; + }, noop, localToRemote, remoteToLocal, noop); + expect(testGlobal.interactive.require).to.equal("noop"); + expect(testGlobal.kernel).to.not.be.undefined; + }); + + it("createHost adds composite kernel and kernel host to global object", () => { + const testGlobal: any = {}; + const remoteToLocal = new rxjs.Subject(); + const localToRemote = new rxjs.Subject(); + frontEndHost.createHost(testGlobal, 'testKernel', noop, noop, localToRemote, remoteToLocal, noop); + expect(testGlobal['testKernel'].compositeKernel).to.not.be.undefined; + expect(testGlobal['testKernel'].kernelHost).to.not.be.undefined; + }); + + it("createHost notifies when ready", (done) => { + const remoteToLocal = new rxjs.Subject(); + const localToRemote = new rxjs.Subject(); + frontEndHost.createHost({}, 'testKernel', noop, noop, localToRemote, remoteToLocal, () => { + done(); + }); + }); + + it("createHost sends initialization events", () => { + const remoteToLocal = new rxjs.Subject(); + const localToRemote = new rxjs.Subject(); + const testGlobal: any = {}; + const seenMessages: connection.KernelCommandOrEventEnvelope[] = []; + localToRemote.subscribe({ + next: message => { + seenMessages.push(clearTokenAndId(message)); + } + }); + frontEndHost.createHost(testGlobal, 'testKernel', noop, noop, localToRemote, remoteToLocal, noop); + expect(seenMessages).to.deep.equal([{ + event: {}, + eventType: 'KernelReady', + routingSlip: ['kernel://testKernel/'] + }, + { + event: + { + kernelInfo: + { + aliases: [], + displayName: 'testKernel', + localName: 'testKernel', + supportedDirectives: [], + supportedKernelCommands: [{ name: 'RequestKernelInfo' }], + uri: 'kernel://testKernel/' + } + }, + eventType: 'KernelInfoProduced', + routingSlip: ['kernel://testKernel/'] + }, + { + event: + { + kernelInfo: + { + aliases: ['js'], + languageName: 'JavaScript', + displayName: 'JavaScript', + localName: 'javascript', + supportedDirectives: [], + supportedKernelCommands: + [{ name: 'RequestKernelInfo' }, + { name: 'SubmitCode' }, + { name: 'RequestValueInfos' }, + { name: 'RequestValue' }, + { name: 'SendValue' }], + uri: 'kernel://testKernel/javascript' + } + }, + eventType: 'KernelInfoProduced', + routingSlip: ['kernel://testKernel/javascript'] + }]); + }); + + it("front end kernel adds proxy when new kernel info is seen", () => { + const remoteToLocal = new rxjs.Subject(); + const localToRemote = new rxjs.Subject(); + const testGlobal: any = {}; + frontEndHost.createHost(testGlobal, 'testKernel', noop, noop, localToRemote, remoteToLocal, noop); + const compositeKernel = testGlobal['testKernel'].compositeKernel; + remoteToLocal.next({ + eventType: contracts.KernelInfoProducedType, + event: { + kernelInfo: { + localName: 'sql', + uri: 'kernel://remote/sql', + aliases: [], + languageName: 'SQL', + languageVersion: '10', + displayName: 'SQL', + supportedDirectives: [], + supportedKernelCommands: [ + { + name: contracts.RequestKernelInfoType + }, + { + name: contracts.SubmitCodeType + }, + { + name: contracts.RequestValueInfosType + }, + { + name: contracts.RequestValueType + } + ] + } + } + }); + const kernel = compositeKernel.findKernelByName('sql'); + expect(kernel).to.not.be.undefined; + expect(kernel!.kernelInfo).to.deep.equal({ + aliases: [], + languageName: 'SQL', + languageVersion: '10', + localName: 'sql', + remoteUri: 'kernel://remote/sql', + displayName: 'SQL', + supportedDirectives: [], + supportedKernelCommands: + [{ name: 'RequestKernelInfo' }, + { name: 'SubmitCode' }, + { name: 'RequestValueInfos' }, + { name: 'RequestValue' }], + uri: 'kernel://testKernel/sql' + }); + }); + + it("front end kernel updates proxy when new kernel info is seen", () => { + const remoteToLocal = new rxjs.Subject(); + const localToRemote = new rxjs.Subject(); + const testGlobal: any = {}; + frontEndHost.createHost(testGlobal, 'testKernel', noop, noop, localToRemote, remoteToLocal, noop); + const compositeKernel = testGlobal['testKernel'].compositeKernel; + remoteToLocal.next({ + eventType: contracts.KernelInfoProducedType, + event: { + kernelInfo: { + localName: 'sql', + uri: 'kernel://remote/sql', + aliases: [], + displayName: 'SQL', + supportedDirectives: [], + supportedKernelCommands: [ + { + name: contracts.RequestKernelInfoType + } + ] + } + } + }); + remoteToLocal.next({ + eventType: contracts.KernelInfoProducedType, + event: { + kernelInfo: { + localName: 'sql', + uri: 'kernel://remote/sql', + aliases: [], + languageName: 'SQL', + languageVersion: '10', + displayName: 'SQL', + supportedDirectives: [], + supportedKernelCommands: [ + { + name: contracts.RequestKernelInfoType + }, + { + name: contracts.SubmitCodeType + }, + { + name: contracts.RequestValueInfosType + }, + { + name: contracts.RequestValueType + } + ] + } + } + }); + const kernel = compositeKernel.findKernelByName('sql'); + expect(kernel).to.not.be.undefined; + expect(kernel!.kernelInfo).to.deep.equal({ + aliases: [], + languageName: 'SQL', + languageVersion: '10', + localName: 'sql', + remoteUri: 'kernel://remote/sql', + displayName: 'SQL', + supportedDirectives: [], + supportedKernelCommands: + [{ name: 'RequestKernelInfo' }, + { name: 'SubmitCode' }, + { name: 'RequestValueInfos' }, + { name: 'RequestValue' }], + uri: 'kernel://testKernel/sql' + }); + }); + +}); diff --git a/src/microsoft-dotnet-interactive/tests/htmlKernel.test.ts b/src/polyglot-notebooks/tests/htmlKernel.test.ts similarity index 100% rename from src/microsoft-dotnet-interactive/tests/htmlKernel.test.ts rename to src/polyglot-notebooks/tests/htmlKernel.test.ts diff --git a/src/microsoft-dotnet-interactive/tests/javascriptKernel.test.ts b/src/polyglot-notebooks/tests/javascriptKernel.test.ts similarity index 100% rename from src/microsoft-dotnet-interactive/tests/javascriptKernel.test.ts rename to src/polyglot-notebooks/tests/javascriptKernel.test.ts diff --git a/src/microsoft-dotnet-interactive/tests/kernel.test.ts b/src/polyglot-notebooks/tests/kernel.test.ts similarity index 100% rename from src/microsoft-dotnet-interactive/tests/kernel.test.ts rename to src/polyglot-notebooks/tests/kernel.test.ts diff --git a/src/microsoft-dotnet-interactive/tests/kernelHost.test.ts b/src/polyglot-notebooks/tests/kernelHost.test.ts similarity index 100% rename from src/microsoft-dotnet-interactive/tests/kernelHost.test.ts rename to src/polyglot-notebooks/tests/kernelHost.test.ts diff --git a/src/microsoft-dotnet-interactive/tests/kernelInfo.test.ts b/src/polyglot-notebooks/tests/kernelInfo.test.ts similarity index 100% rename from src/microsoft-dotnet-interactive/tests/kernelInfo.test.ts rename to src/polyglot-notebooks/tests/kernelInfo.test.ts diff --git a/src/microsoft-dotnet-interactive/tests/kernelInvocationContext.test.ts b/src/polyglot-notebooks/tests/kernelInvocationContext.test.ts similarity index 100% rename from src/microsoft-dotnet-interactive/tests/kernelInvocationContext.test.ts rename to src/polyglot-notebooks/tests/kernelInvocationContext.test.ts diff --git a/src/microsoft-dotnet-interactive/tests/kernelRouting.test.ts b/src/polyglot-notebooks/tests/kernelRouting.test.ts similarity index 100% rename from src/microsoft-dotnet-interactive/tests/kernelRouting.test.ts rename to src/polyglot-notebooks/tests/kernelRouting.test.ts diff --git a/src/microsoft-dotnet-interactive/tests/kernelScheduler.test.ts b/src/polyglot-notebooks/tests/kernelScheduler.test.ts similarity index 100% rename from src/microsoft-dotnet-interactive/tests/kernelScheduler.test.ts rename to src/polyglot-notebooks/tests/kernelScheduler.test.ts diff --git a/src/microsoft-dotnet-interactive/tests/proxykernel.test.ts b/src/polyglot-notebooks/tests/proxykernel.test.ts similarity index 100% rename from src/microsoft-dotnet-interactive/tests/proxykernel.test.ts rename to src/polyglot-notebooks/tests/proxykernel.test.ts diff --git a/src/microsoft-dotnet-interactive/tests/routingslip.test.ts b/src/polyglot-notebooks/tests/routingslip.test.ts similarity index 100% rename from src/microsoft-dotnet-interactive/tests/routingslip.test.ts rename to src/polyglot-notebooks/tests/routingslip.test.ts diff --git a/src/microsoft-dotnet-interactive/tests/testSupport.ts b/src/polyglot-notebooks/tests/testSupport.ts similarity index 100% rename from src/microsoft-dotnet-interactive/tests/testSupport.ts rename to src/polyglot-notebooks/tests/testSupport.ts diff --git a/src/microsoft-dotnet-interactive/tsconfig.json b/src/polyglot-notebooks/tsconfig.json similarity index 100% rename from src/microsoft-dotnet-interactive/tsconfig.json rename to src/polyglot-notebooks/tsconfig.json diff --git a/src/microsoft-dotnet-interactive/wallaby.js b/src/polyglot-notebooks/wallaby.js similarity index 100% rename from src/microsoft-dotnet-interactive/wallaby.js rename to src/polyglot-notebooks/wallaby.js From 944d302cb634f48499d098b15b61676773ffc993 Mon Sep 17 00:00:00 2001 From: Diego Colombo Date: Wed, 8 Feb 2023 01:08:07 +0000 Subject: [PATCH 2/3] fix browser kernel package --- .../Microsoft.DotNet.Interactive.Browser.csproj | 2 +- .../PlaywrightKernelConnector.cs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Microsoft.DotNet.Interactive.Browser/Microsoft.DotNet.Interactive.Browser.csproj b/src/Microsoft.DotNet.Interactive.Browser/Microsoft.DotNet.Interactive.Browser.csproj index d817375563..1a502fc712 100644 --- a/src/Microsoft.DotNet.Interactive.Browser/Microsoft.DotNet.Interactive.Browser.csproj +++ b/src/Microsoft.DotNet.Interactive.Browser/Microsoft.DotNet.Interactive.Browser.csproj @@ -37,7 +37,7 @@ - + diff --git a/src/Microsoft.DotNet.Interactive.Browser/PlaywrightKernelConnector.cs b/src/Microsoft.DotNet.Interactive.Browser/PlaywrightKernelConnector.cs index 2ecf3cc4a3..9bf33b6e5a 100644 --- a/src/Microsoft.DotNet.Interactive.Browser/PlaywrightKernelConnector.cs +++ b/src/Microsoft.DotNet.Interactive.Browser/PlaywrightKernelConnector.cs @@ -45,7 +45,7 @@ public PlaywrightKernelConnector(bool launchBrowserHeadless = false, bool enable string jsSource; - var resourceName = "dotnet-interactive.js"; + var resourceName = "polyglot-notebooks.js"; var type = typeof(PlaywrightKernelConnector); using (var stream = type.Assembly.GetManifestResourceStream($"{type.Namespace}.{resourceName}")) using (var reader = new StreamReader(stream ?? throw new InvalidOperationException($"Resource \"{resourceName}\" not found"), Encoding.UTF8)) @@ -62,7 +62,7 @@ await page.ExposeFunctionAsync("publishCommandOrEvent", (JsonElement json) => await page.EvaluateAsync(jsSource); - await page.EvaluateAsync($@"dotnetInteractive.setup({{hostName : ""browser"", enableLogger: {enableLog.ToString().ToLowerInvariant()}}});"); + await page.EvaluateAsync($@"polyglotNotebooks.setup({{hostName : ""browser"", enableLogger: {enableLog.ToString().ToLowerInvariant()}}});"); playwrightDisposable.Disposable = Disposable.Create(() => { playwright.Dispose(); }); From ee21b80f9e3572096dd7bfa59e075be4af62c196 Mon Sep 17 00:00:00 2001 From: Diego Colombo Date: Wed, 8 Feb 2023 03:32:27 +0000 Subject: [PATCH 3/3] fix pipeline --- azure-pipelines.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 28649e8e54..25b89b5f8a 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -219,7 +219,7 @@ stages: inputs: filePath: $(Build.SourcesDirectory)/eng/package/PackNpmPackage.ps1 arguments: -packageVersionNumber $(StableToolVersionNumber) -outDir "$(Build.ArtifactStagingDirectory)\npm" - workingDirectory: "$(Build.SourcesDirectory)/src/microsoft-dotnet-interactive" + workingDirectory: "$(Build.SourcesDirectory)/src/polyglot-notebooks" pwsh: true - task: PublishBuildArtifacts@1