diff --git a/.eslintrc b/.eslintrc index 1f505abb..694ab704 100644 --- a/.eslintrc +++ b/.eslintrc @@ -22,6 +22,8 @@ "css": "always", "js": "always", "mp3": "always", + "svg": "always", + "png": "always", "json": "always", "contribution": "always", // Hack for vscode .contribution.js files "protocol": "always", // Hack for vscode .protocol.js files @@ -30,7 +32,8 @@ "worker": "always", "ts": "always", "services": "always", - "api": "always" + "api": "always", + "all": "always" } ], "@typescript-eslint/no-unused-vars": [ diff --git a/README.md b/README.md index d0442691..d5d0657e 100644 --- a/README.md +++ b/README.md @@ -32,13 +32,13 @@ To **tree-mend** (to **un**treeshake it) monaco-editor, this library provides a This library uses a lot the `new URL('asset.extension', import.meta.url)` syntax which [is supported by vite](https://vitejs.dev/guide/assets.html#new-url-url-import-meta-url) -While it works great in `build` mode (because rollup is used), there is some issues in `watch`` mode: +While it works great in `build` mode (because rollup is used), there is some issues in `watch` mode: - import.meta.url is not replaced while creating bundles, it is an issue when the syntax is used inside a dependency - vite is still trying to inject/transform javascript assets files, breaking the code by injecting ESM imports in commonjs files There are workarounds for both: -- We can help vite by replacing `import.meta.url` by the original module path (you need the --experimental-import-meta-resolve note option): +- We can help vite by replacing `import.meta.url` by the original module path (you need the `--experimental-import-meta-resolve` note option): ```typescript { ... @@ -111,13 +111,15 @@ await initialize({ }) ``` -Additionally, 25 packages that include the vscode version of some services (with some glue to make it work with monaco) are published: +Additionally, several packages that include the VSCode version of some services (with some glue to make it work with monaco) are published: - **Extensions** (included by default): `@codingame/monaco-vscode-extensions-service-override` - - Support for VSCode extensions. A worker configuration can be past to it: - - Then, everything runs in one worker, where extensions run in an iframe, with all the implications (can be created by the bundler directly). The worker script is expected to be hosted on a separate domain. + - Support for VSCode extensions. + - A worker configuration can be provided to it: + - Then, extensions run in a worker which runs in an iframe, with all the implications (can be created by the bundler directly). The worker script is expected to be hosted on a separate domain. - **Files** (included by default): `@codingame/monaco-vscode-files-service-override` - - It adds the memory filesystem for `file://` files, but also adds the support for lazy loaded extension files. It adds separate memory user files (e.g. config, keybindings), cache files and log files. + - It adds the overlay filesystem for `file://` files, but also adds the support for lazy loaded extension files. It adds separate memory user files (e.g. config, keybindings), cache files and log files. + - It supports adding overlay filesystems for `file://` files - **QuickAccess** (included by default): `@codingame/monaco-vscode-quickaccess-service-override` - Enables the quickaccess menu in the editor (press F1 or ctrl+shift+p) - **Notifications**: `@codingame/monaco-vscode-notifications-service-override` @@ -126,7 +128,7 @@ Additionally, 25 packages that include the vscode version of some services (with - Enable vscode modal dialogs. It allows users to select an action to do. Those actions are exposed to the vscode API. Additionally, this service can be used by the language client to delegate questions to the user. - **Model**: `@codingame/monaco-vscode-model-service-override` - This service creates and takes care of model references. For example: - - Create model if content is unknown + - Create model from filesystem if content is unknown - Count references - Destroy models when they are no longer used - **Editor**: `@codingame/monaco-vscode-editor-service-override` @@ -188,6 +190,13 @@ Additionally, 25 packages that include the vscode version of some services (with - Ask user it they trust the current workspace, disable some features if not - **Extension Gallery**: `@codingame/monaco-vscode-extension-gallery-service-override` - Support for the VSCode marketplace, it allows to install extensions from the marketplace. +- **Chat**: `@codingame/monaco-vscode-chat-service-override` + - Support for chat and inline chat features +- **Notebook** + - Support for Jupyter notebooks +- **Welcome** + - Support for welcome pages/components. *Hint*: It only makes sense to enable it when *Views* service is used. + Usage: ```typescript @@ -277,8 +286,6 @@ const range = new vscode.Range(...) vscode.languages.registerCompletionItemProvider(...) ``` -The api will use the manifest of a default vscode extension, which can be overriden by providing it to the `initialize` function. - You can also register a new extension from its manifest: ```typescript import { registerExtension, initialize, ExtensionHostKind } from 'vscode/extensions' @@ -318,7 +325,7 @@ import '@codingame/monaco-vscode-json-default-extension' ### Loading vsix file -VSCode extension are bundled as vsix files. +VSCode extensions are bundled as vsix files. This library publishes a rollup plugin (vite-compatible) that allows to load a vsix file. - rollup/vite config: @@ -371,6 +378,8 @@ It includes: - Configuration service, with user configuration editor - Keybinding service, with user keybindings editor - Debuggers +- Remote agent +- and much more From CLI run: diff --git a/demo/index.html b/demo/index.html index 951eb02d..c6506eb0 100644 --- a/demo/index.html +++ b/demo/index.html @@ -8,56 +8,63 @@
-
- -
-
-
- -
-
-

Editor

-
+
+
+ +
+
+
+ +
+
+
+

Editor

+
- - - - -
- - -
- - + + + + +
+ + +
+ + +
+
+ +
+
+
-
-
-
+
-
+
+
-

Settings

+

Settings

-

Keybindings

+

Keybindings

diff --git a/demo/package-lock.json b/demo/package-lock.json index 2d786243..44eeac60 100644 --- a/demo/package-lock.json +++ b/demo/package-lock.json @@ -14,6 +14,7 @@ "@codingame/monaco-vscode-authentication-service-override": "file:../dist/service-override-authentication", "@codingame/monaco-vscode-bat-default-extension": "file:../dist/default-extension-bat", "@codingame/monaco-vscode-bulk-edit-service-override": "file:../dist/service-override-bulk-edit", + "@codingame/monaco-vscode-chat-service-override": "file:../dist/service-override-chat", "@codingame/monaco-vscode-clojure-default-extension": "file:../dist/default-extension-clojure", "@codingame/monaco-vscode-coffeescript-default-extension": "file:../dist/default-extension-coffeescript", "@codingame/monaco-vscode-configuration-editing-default-extension": "file:../dist/default-extension-configuration-editing", @@ -91,6 +92,7 @@ "@codingame/monaco-vscode-microsoft-authentication-default-extension": "file:../dist/default-extension-microsoft-authentication", "@codingame/monaco-vscode-model-service-override": "file:../dist/service-override-model", "@codingame/monaco-vscode-notebook-renderers-default-extension": "file:../dist/default-extension-notebook-renderers", + "@codingame/monaco-vscode-notebook-service-override": "file:../dist/service-override-notebook", "@codingame/monaco-vscode-notifications-service-override": "file:../dist/service-override-notifications", "@codingame/monaco-vscode-npm-default-extension": "file:../dist/default-extension-npm", "@codingame/monaco-vscode-objective-c-default-extension": "file:../dist/default-extension-objective-c", @@ -147,6 +149,7 @@ "@codingame/monaco-vscode-vscode-api-tests-default-extension": "file:../dist/default-extension-vscode-api-tests", "@codingame/monaco-vscode-vscode-colorize-tests-default-extension": "file:../dist/default-extension-vscode-colorize-tests", "@codingame/monaco-vscode-vscode-test-resolver-default-extension": "file:../dist/default-extension-vscode-test-resolver", + "@codingame/monaco-vscode-welcome-service-override": "file:../dist/service-override-welcome", "@codingame/monaco-vscode-working-copy-service-override": "file:../dist/service-override-working-copy", "@codingame/monaco-vscode-workspace-trust-service-override": "file:../dist/service-override-workspace-trust", "@codingame/monaco-vscode-xml-default-extension": "file:../dist/default-extension-xml", @@ -171,6 +174,7 @@ } }, "../dist/default-extension-bat": { + "name": "@codingame/monaco-vscode-bat-default-extension", "version": "0.0.0-semantic-release", "license": "MIT", "dependencies": { @@ -178,6 +182,7 @@ } }, "../dist/default-extension-clojure": { + "name": "@codingame/monaco-vscode-clojure-default-extension", "version": "0.0.0-semantic-release", "license": "MIT", "dependencies": { @@ -185,6 +190,7 @@ } }, "../dist/default-extension-coffeescript": { + "name": "@codingame/monaco-vscode-coffeescript-default-extension", "version": "0.0.0-semantic-release", "license": "MIT", "dependencies": { @@ -192,6 +198,7 @@ } }, "../dist/default-extension-configuration-editing": { + "name": "@codingame/monaco-vscode-configuration-editing-default-extension", "version": "0.0.0-semantic-release", "license": "MIT", "dependencies": { @@ -199,6 +206,7 @@ } }, "../dist/default-extension-cpp": { + "name": "@codingame/monaco-vscode-cpp-default-extension", "version": "0.0.0-semantic-release", "license": "MIT", "dependencies": { @@ -206,6 +214,7 @@ } }, "../dist/default-extension-csharp": { + "name": "@codingame/monaco-vscode-csharp-default-extension", "version": "0.0.0-semantic-release", "license": "MIT", "dependencies": { @@ -213,6 +222,7 @@ } }, "../dist/default-extension-css": { + "name": "@codingame/monaco-vscode-css-default-extension", "version": "0.0.0-semantic-release", "license": "MIT", "dependencies": { @@ -220,6 +230,7 @@ } }, "../dist/default-extension-css-language-features": { + "name": "@codingame/monaco-vscode-css-language-features-default-extension", "version": "0.0.0-semantic-release", "license": "MIT", "dependencies": { @@ -227,6 +238,7 @@ } }, "../dist/default-extension-dart": { + "name": "@codingame/monaco-vscode-dart-default-extension", "version": "0.0.0-semantic-release", "license": "MIT", "dependencies": { @@ -234,6 +246,7 @@ } }, "../dist/default-extension-debug-auto-launch": { + "name": "@codingame/monaco-vscode-debug-auto-launch-default-extension", "version": "0.0.0-semantic-release", "license": "MIT", "dependencies": { @@ -241,6 +254,7 @@ } }, "../dist/default-extension-debug-server-ready": { + "name": "@codingame/monaco-vscode-debug-server-ready-default-extension", "version": "0.0.0-semantic-release", "license": "MIT", "dependencies": { @@ -248,6 +262,7 @@ } }, "../dist/default-extension-diff": { + "name": "@codingame/monaco-vscode-diff-default-extension", "version": "0.0.0-semantic-release", "license": "MIT", "dependencies": { @@ -255,6 +270,7 @@ } }, "../dist/default-extension-docker": { + "name": "@codingame/monaco-vscode-docker-default-extension", "version": "0.0.0-semantic-release", "license": "MIT", "dependencies": { @@ -262,6 +278,7 @@ } }, "../dist/default-extension-emmet": { + "name": "@codingame/monaco-vscode-emmet-default-extension", "version": "0.0.0-semantic-release", "license": "MIT", "dependencies": { @@ -269,6 +286,7 @@ } }, "../dist/default-extension-extension-editing": { + "name": "@codingame/monaco-vscode-extension-editing-default-extension", "version": "0.0.0-semantic-release", "license": "MIT", "dependencies": { @@ -276,6 +294,7 @@ } }, "../dist/default-extension-fsharp": { + "name": "@codingame/monaco-vscode-fsharp-default-extension", "version": "0.0.0-semantic-release", "license": "MIT", "dependencies": { @@ -283,6 +302,7 @@ } }, "../dist/default-extension-git": { + "name": "@codingame/monaco-vscode-git-default-extension", "version": "0.0.0-semantic-release", "license": "MIT", "dependencies": { @@ -290,6 +310,7 @@ } }, "../dist/default-extension-git-base": { + "name": "@codingame/monaco-vscode-git-base-default-extension", "version": "0.0.0-semantic-release", "license": "MIT", "dependencies": { @@ -297,6 +318,7 @@ } }, "../dist/default-extension-github": { + "name": "@codingame/monaco-vscode-github-default-extension", "version": "0.0.0-semantic-release", "license": "MIT", "dependencies": { @@ -304,6 +326,7 @@ } }, "../dist/default-extension-github-authentication": { + "name": "@codingame/monaco-vscode-github-authentication-default-extension", "version": "0.0.0-semantic-release", "license": "MIT", "dependencies": { @@ -311,6 +334,7 @@ } }, "../dist/default-extension-go": { + "name": "@codingame/monaco-vscode-go-default-extension", "version": "0.0.0-semantic-release", "license": "MIT", "dependencies": { @@ -318,6 +342,7 @@ } }, "../dist/default-extension-groovy": { + "name": "@codingame/monaco-vscode-groovy-default-extension", "version": "0.0.0-semantic-release", "license": "MIT", "dependencies": { @@ -325,6 +350,7 @@ } }, "../dist/default-extension-grunt": { + "name": "@codingame/monaco-vscode-grunt-default-extension", "version": "0.0.0-semantic-release", "license": "MIT", "dependencies": { @@ -332,6 +358,7 @@ } }, "../dist/default-extension-gulp": { + "name": "@codingame/monaco-vscode-gulp-default-extension", "version": "0.0.0-semantic-release", "license": "MIT", "dependencies": { @@ -339,6 +366,7 @@ } }, "../dist/default-extension-handlebars": { + "name": "@codingame/monaco-vscode-handlebars-default-extension", "version": "0.0.0-semantic-release", "license": "MIT", "dependencies": { @@ -346,6 +374,7 @@ } }, "../dist/default-extension-hlsl": { + "name": "@codingame/monaco-vscode-hlsl-default-extension", "version": "0.0.0-semantic-release", "license": "MIT", "dependencies": { @@ -353,6 +382,7 @@ } }, "../dist/default-extension-html": { + "name": "@codingame/monaco-vscode-html-default-extension", "version": "0.0.0-semantic-release", "license": "MIT", "dependencies": { @@ -360,6 +390,7 @@ } }, "../dist/default-extension-html-language-features": { + "name": "@codingame/monaco-vscode-html-language-features-default-extension", "version": "0.0.0-semantic-release", "license": "MIT", "dependencies": { @@ -367,6 +398,7 @@ } }, "../dist/default-extension-ini": { + "name": "@codingame/monaco-vscode-ini-default-extension", "version": "0.0.0-semantic-release", "license": "MIT", "dependencies": { @@ -374,6 +406,7 @@ } }, "../dist/default-extension-ipynb": { + "name": "@codingame/monaco-vscode-ipynb-default-extension", "version": "0.0.0-semantic-release", "license": "MIT", "dependencies": { @@ -381,6 +414,7 @@ } }, "../dist/default-extension-jake": { + "name": "@codingame/monaco-vscode-jake-default-extension", "version": "0.0.0-semantic-release", "license": "MIT", "dependencies": { @@ -388,6 +422,7 @@ } }, "../dist/default-extension-java": { + "name": "@codingame/monaco-vscode-java-default-extension", "version": "0.0.0-semantic-release", "license": "MIT", "dependencies": { @@ -395,6 +430,7 @@ } }, "../dist/default-extension-javascript": { + "name": "@codingame/monaco-vscode-javascript-default-extension", "version": "0.0.0-semantic-release", "license": "MIT", "dependencies": { @@ -402,6 +438,7 @@ } }, "../dist/default-extension-json": { + "name": "@codingame/monaco-vscode-json-default-extension", "version": "0.0.0-semantic-release", "license": "MIT", "dependencies": { @@ -409,6 +446,7 @@ } }, "../dist/default-extension-json-language-features": { + "name": "@codingame/monaco-vscode-json-language-features-default-extension", "version": "0.0.0-semantic-release", "license": "MIT", "dependencies": { @@ -416,6 +454,7 @@ } }, "../dist/default-extension-julia": { + "name": "@codingame/monaco-vscode-julia-default-extension", "version": "0.0.0-semantic-release", "license": "MIT", "dependencies": { @@ -423,6 +462,7 @@ } }, "../dist/default-extension-latex": { + "name": "@codingame/monaco-vscode-latex-default-extension", "version": "0.0.0-semantic-release", "license": "MIT", "dependencies": { @@ -430,6 +470,7 @@ } }, "../dist/default-extension-less": { + "name": "@codingame/monaco-vscode-less-default-extension", "version": "0.0.0-semantic-release", "license": "MIT", "dependencies": { @@ -437,6 +478,7 @@ } }, "../dist/default-extension-log": { + "name": "@codingame/monaco-vscode-log-default-extension", "version": "0.0.0-semantic-release", "license": "MIT", "dependencies": { @@ -444,6 +486,7 @@ } }, "../dist/default-extension-lua": { + "name": "@codingame/monaco-vscode-lua-default-extension", "version": "0.0.0-semantic-release", "license": "MIT", "dependencies": { @@ -451,6 +494,7 @@ } }, "../dist/default-extension-make": { + "name": "@codingame/monaco-vscode-make-default-extension", "version": "0.0.0-semantic-release", "license": "MIT", "dependencies": { @@ -458,6 +502,7 @@ } }, "../dist/default-extension-markdown-basics": { + "name": "@codingame/monaco-vscode-markdown-basics-default-extension", "version": "0.0.0-semantic-release", "license": "MIT", "dependencies": { @@ -465,6 +510,7 @@ } }, "../dist/default-extension-markdown-language-features": { + "name": "@codingame/monaco-vscode-markdown-language-features-default-extension", "version": "0.0.0-semantic-release", "license": "MIT", "dependencies": { @@ -472,6 +518,7 @@ } }, "../dist/default-extension-markdown-math": { + "name": "@codingame/monaco-vscode-markdown-math-default-extension", "version": "0.0.0-semantic-release", "license": "MIT", "dependencies": { @@ -479,6 +526,7 @@ } }, "../dist/default-extension-media-preview": { + "name": "@codingame/monaco-vscode-media-preview-default-extension", "version": "0.0.0-semantic-release", "license": "MIT", "dependencies": { @@ -486,6 +534,7 @@ } }, "../dist/default-extension-merge-conflict": { + "name": "@codingame/monaco-vscode-merge-conflict-default-extension", "version": "0.0.0-semantic-release", "license": "MIT", "dependencies": { @@ -493,6 +542,7 @@ } }, "../dist/default-extension-microsoft-authentication": { + "name": "@codingame/monaco-vscode-microsoft-authentication-default-extension", "version": "0.0.0-semantic-release", "license": "MIT", "dependencies": { @@ -500,6 +550,7 @@ } }, "../dist/default-extension-notebook-renderers": { + "name": "@codingame/monaco-vscode-notebook-renderers-default-extension", "version": "0.0.0-semantic-release", "license": "MIT", "dependencies": { @@ -507,6 +558,7 @@ } }, "../dist/default-extension-npm": { + "name": "@codingame/monaco-vscode-npm-default-extension", "version": "0.0.0-semantic-release", "license": "MIT", "dependencies": { @@ -514,6 +566,7 @@ } }, "../dist/default-extension-objective-c": { + "name": "@codingame/monaco-vscode-objective-c-default-extension", "version": "0.0.0-semantic-release", "license": "MIT", "dependencies": { @@ -521,6 +574,7 @@ } }, "../dist/default-extension-perl": { + "name": "@codingame/monaco-vscode-perl-default-extension", "version": "0.0.0-semantic-release", "license": "MIT", "dependencies": { @@ -528,6 +582,7 @@ } }, "../dist/default-extension-php": { + "name": "@codingame/monaco-vscode-php-default-extension", "version": "0.0.0-semantic-release", "license": "MIT", "dependencies": { @@ -535,6 +590,7 @@ } }, "../dist/default-extension-php-language-features": { + "name": "@codingame/monaco-vscode-php-language-features-default-extension", "version": "0.0.0-semantic-release", "license": "MIT", "dependencies": { @@ -542,6 +598,7 @@ } }, "../dist/default-extension-powershell": { + "name": "@codingame/monaco-vscode-powershell-default-extension", "version": "0.0.0-semantic-release", "license": "MIT", "dependencies": { @@ -549,6 +606,7 @@ } }, "../dist/default-extension-pug": { + "name": "@codingame/monaco-vscode-pug-default-extension", "version": "0.0.0-semantic-release", "license": "MIT", "dependencies": { @@ -556,6 +614,7 @@ } }, "../dist/default-extension-python": { + "name": "@codingame/monaco-vscode-python-default-extension", "version": "0.0.0-semantic-release", "license": "MIT", "dependencies": { @@ -563,6 +622,7 @@ } }, "../dist/default-extension-r": { + "name": "@codingame/monaco-vscode-r-default-extension", "version": "0.0.0-semantic-release", "license": "MIT", "dependencies": { @@ -570,6 +630,7 @@ } }, "../dist/default-extension-razor": { + "name": "@codingame/monaco-vscode-razor-default-extension", "version": "0.0.0-semantic-release", "license": "MIT", "dependencies": { @@ -577,6 +638,7 @@ } }, "../dist/default-extension-references-view": { + "name": "@codingame/monaco-vscode-references-view-default-extension", "version": "0.0.0-semantic-release", "license": "MIT", "dependencies": { @@ -584,6 +646,7 @@ } }, "../dist/default-extension-restructuredtext": { + "name": "@codingame/monaco-vscode-restructuredtext-default-extension", "version": "0.0.0-semantic-release", "license": "MIT", "dependencies": { @@ -591,6 +654,7 @@ } }, "../dist/default-extension-ruby": { + "name": "@codingame/monaco-vscode-ruby-default-extension", "version": "0.0.0-semantic-release", "license": "MIT", "dependencies": { @@ -598,6 +662,7 @@ } }, "../dist/default-extension-rust": { + "name": "@codingame/monaco-vscode-rust-default-extension", "version": "0.0.0-semantic-release", "license": "MIT", "dependencies": { @@ -605,6 +670,7 @@ } }, "../dist/default-extension-scss": { + "name": "@codingame/monaco-vscode-scss-default-extension", "version": "0.0.0-semantic-release", "license": "MIT", "dependencies": { @@ -612,6 +678,7 @@ } }, "../dist/default-extension-search-result": { + "name": "@codingame/monaco-vscode-search-result-default-extension", "version": "0.0.0-semantic-release", "license": "MIT", "dependencies": { @@ -619,6 +686,7 @@ } }, "../dist/default-extension-shaderlab": { + "name": "@codingame/monaco-vscode-shaderlab-default-extension", "version": "0.0.0-semantic-release", "license": "MIT", "dependencies": { @@ -626,6 +694,7 @@ } }, "../dist/default-extension-shellscript": { + "name": "@codingame/monaco-vscode-shellscript-default-extension", "version": "0.0.0-semantic-release", "license": "MIT", "dependencies": { @@ -633,6 +702,7 @@ } }, "../dist/default-extension-simple-browser": { + "name": "@codingame/monaco-vscode-simple-browser-default-extension", "version": "0.0.0-semantic-release", "license": "MIT", "dependencies": { @@ -640,6 +710,7 @@ } }, "../dist/default-extension-sql": { + "name": "@codingame/monaco-vscode-sql-default-extension", "version": "0.0.0-semantic-release", "license": "MIT", "dependencies": { @@ -647,6 +718,7 @@ } }, "../dist/default-extension-swift": { + "name": "@codingame/monaco-vscode-swift-default-extension", "version": "0.0.0-semantic-release", "license": "MIT", "dependencies": { @@ -654,6 +726,7 @@ } }, "../dist/default-extension-theme-abyss": { + "name": "@codingame/monaco-vscode-theme-abyss-default-extension", "version": "0.0.0-semantic-release", "license": "MIT", "dependencies": { @@ -661,6 +734,7 @@ } }, "../dist/default-extension-theme-defaults": { + "name": "@codingame/monaco-vscode-theme-defaults-default-extension", "version": "0.0.0-semantic-release", "license": "MIT", "dependencies": { @@ -668,6 +742,7 @@ } }, "../dist/default-extension-theme-kimbie-dark": { + "name": "@codingame/monaco-vscode-theme-kimbie-dark-default-extension", "version": "0.0.0-semantic-release", "license": "MIT", "dependencies": { @@ -675,6 +750,7 @@ } }, "../dist/default-extension-theme-monokai": { + "name": "@codingame/monaco-vscode-theme-monokai-default-extension", "version": "0.0.0-semantic-release", "license": "MIT", "dependencies": { @@ -682,6 +758,7 @@ } }, "../dist/default-extension-theme-monokai-dimmed": { + "name": "@codingame/monaco-vscode-theme-monokai-dimmed-default-extension", "version": "0.0.0-semantic-release", "license": "MIT", "dependencies": { @@ -689,6 +766,7 @@ } }, "../dist/default-extension-theme-quietlight": { + "name": "@codingame/monaco-vscode-theme-quietlight-default-extension", "version": "0.0.0-semantic-release", "license": "MIT", "dependencies": { @@ -696,6 +774,7 @@ } }, "../dist/default-extension-theme-red": { + "name": "@codingame/monaco-vscode-theme-red-default-extension", "version": "0.0.0-semantic-release", "license": "MIT", "dependencies": { @@ -703,6 +782,7 @@ } }, "../dist/default-extension-theme-seti": { + "name": "@codingame/monaco-vscode-theme-seti-default-extension", "version": "0.0.0-semantic-release", "license": "MIT", "dependencies": { @@ -710,6 +790,7 @@ } }, "../dist/default-extension-theme-solarized-dark": { + "name": "@codingame/monaco-vscode-theme-solarized-dark-default-extension", "version": "0.0.0-semantic-release", "license": "MIT", "dependencies": { @@ -717,6 +798,7 @@ } }, "../dist/default-extension-theme-solarized-light": { + "name": "@codingame/monaco-vscode-theme-solarized-light-default-extension", "version": "0.0.0-semantic-release", "license": "MIT", "dependencies": { @@ -724,6 +806,7 @@ } }, "../dist/default-extension-theme-tomorrow-night-blue": { + "name": "@codingame/monaco-vscode-theme-tomorrow-night-blue-default-extension", "version": "0.0.0-semantic-release", "license": "MIT", "dependencies": { @@ -731,6 +814,7 @@ } }, "../dist/default-extension-typescript-basics": { + "name": "@codingame/monaco-vscode-typescript-basics-default-extension", "version": "0.0.0-semantic-release", "license": "MIT", "dependencies": { @@ -738,6 +822,7 @@ } }, "../dist/default-extension-typescript-language-features": { + "name": "@codingame/monaco-vscode-typescript-language-features-default-extension", "version": "0.0.0-semantic-release", "license": "MIT", "dependencies": { @@ -745,6 +830,7 @@ } }, "../dist/default-extension-vb": { + "name": "@codingame/monaco-vscode-vb-default-extension", "version": "0.0.0-semantic-release", "license": "MIT", "dependencies": { @@ -752,6 +838,7 @@ } }, "../dist/default-extension-vscode-api-tests": { + "name": "@codingame/monaco-vscode-vscode-api-tests-default-extension", "version": "0.0.0-semantic-release", "license": "MIT", "dependencies": { @@ -759,6 +846,7 @@ } }, "../dist/default-extension-vscode-colorize-tests": { + "name": "@codingame/monaco-vscode-vscode-colorize-tests-default-extension", "version": "0.0.0-semantic-release", "license": "MIT", "dependencies": { @@ -766,6 +854,7 @@ } }, "../dist/default-extension-vscode-test-resolver": { + "name": "@codingame/monaco-vscode-vscode-test-resolver-default-extension", "version": "0.0.0-semantic-release", "license": "MIT", "dependencies": { @@ -773,6 +862,7 @@ } }, "../dist/default-extension-xml": { + "name": "@codingame/monaco-vscode-xml-default-extension", "version": "0.0.0-semantic-release", "license": "MIT", "dependencies": { @@ -780,6 +870,7 @@ } }, "../dist/default-extension-yaml": { + "name": "@codingame/monaco-vscode-yaml-default-extension", "version": "0.0.0-semantic-release", "license": "MIT", "dependencies": { @@ -804,6 +895,7 @@ } }, "../dist/rollup-vsix-plugin": { + "name": "@codingame/monaco-vscode-rollup-vsix-plugin", "version": "0.0.0-semantic-release", "dev": true, "license": "MIT", @@ -811,29 +903,31 @@ "memfs": "^4.6.0", "mime-types": "^2.1.35", "vscode": "npm:@codingame/monaco-vscode-api@^0.0.0-semantic-release", - "yauzl": "^2.10.0" + "yauzl": "^2.9.2" } }, "../dist/server": { + "name": "@codingame/monaco-vscode-server", "version": "0.0.0-semantic-release", "license": "MIT", "dependencies": { "@microsoft/1ds-core-js": "^3.2.13", "@microsoft/1ds-post-js": "^3.2.13", "@parcel/watcher": "2.1.0", - "@vscode/proxy-agent": "^0.17.4", - "@vscode/ripgrep": "^1.15.5", - "@vscode/spdlog": "^0.13.11", + "@vscode/proxy-agent": "^0.18.2", + "@vscode/ripgrep": "^1.15.9", + "@vscode/spdlog": "^0.13.12", "@vscode/windows-process-tree": "^0.5.0", - "@xterm/addon-serialize": "0.12.0-beta.9", - "@xterm/addon-unicode11": "0.7.0-beta.9", - "@xterm/headless": "5.4.0-beta.9", + "@vscode/windows-registry": "^1.1.0", + "@xterm/addon-serialize": "0.12.0-beta.14", + "@xterm/addon-unicode11": "0.7.0-beta.14", + "@xterm/headless": "5.4.0-beta.14", "cookie": "^0.5.0", "kerberos": "^2.0.1", - "node-pty": "1.1.0-beta1", + "node-pty": "1.1.0-beta5", "vscode": "npm:@codingame/monaco-vscode-api@^0.0.0-semantic-release", "vscode-regexpp": "^3.1.0", - "yauzl": "^2.10.0", + "yauzl": "^2.9.2", "yazl": "^2.4.3" }, "bin": { @@ -841,6 +935,7 @@ } }, "../dist/service-override-accessibility": { + "name": "@codingame/monaco-vscode-accessibility-service-override", "version": "0.0.0-semantic-release", "license": "MIT", "dependencies": { @@ -849,6 +944,7 @@ } }, "../dist/service-override-audio-cue": { + "name": "@codingame/monaco-vscode-audio-cue-service-override", "version": "0.0.0-semantic-release", "license": "MIT", "dependencies": { @@ -857,6 +953,7 @@ } }, "../dist/service-override-authentication": { + "name": "@codingame/monaco-vscode-authentication-service-override", "version": "0.0.0-semantic-release", "license": "MIT", "dependencies": { @@ -865,6 +962,16 @@ } }, "../dist/service-override-bulk-edit": { + "name": "@codingame/monaco-vscode-bulk-edit-service-override", + "version": "0.0.0-semantic-release", + "license": "MIT", + "dependencies": { + "monaco-editor": "0.45.0", + "vscode": "npm:@codingame/monaco-vscode-api@^0.0.0-semantic-release" + } + }, + "../dist/service-override-chat": { + "name": "@codingame/monaco-vscode-chat-service-override", "version": "0.0.0-semantic-release", "license": "MIT", "dependencies": { @@ -873,6 +980,7 @@ } }, "../dist/service-override-configuration": { + "name": "@codingame/monaco-vscode-configuration-service-override", "version": "0.0.0-semantic-release", "license": "MIT", "dependencies": { @@ -886,6 +994,7 @@ } }, "../dist/service-override-debug": { + "name": "@codingame/monaco-vscode-debug-service-override", "version": "0.0.0-semantic-release", "license": "MIT", "dependencies": { @@ -895,6 +1004,7 @@ } }, "../dist/service-override-dialogs": { + "name": "@codingame/monaco-vscode-dialogs-service-override", "version": "0.0.0-semantic-release", "license": "MIT", "dependencies": { @@ -904,6 +1014,7 @@ } }, "../dist/service-override-editor": { + "name": "@codingame/monaco-vscode-editor-service-override", "version": "0.0.0-semantic-release", "license": "MIT", "dependencies": { @@ -912,6 +1023,7 @@ } }, "../dist/service-override-environment": { + "name": "@codingame/monaco-vscode-environment-service-override", "version": "0.0.0-semantic-release", "license": "MIT", "dependencies": { @@ -920,6 +1032,7 @@ } }, "../dist/service-override-extension-gallery": { + "name": "@codingame/monaco-vscode-extension-gallery-service-override", "version": "0.0.0-semantic-release", "license": "MIT", "dependencies": { @@ -929,6 +1042,7 @@ } }, "../dist/service-override-extensions": { + "name": "@codingame/monaco-vscode-extensions-service-override", "version": "0.0.0-semantic-release", "license": "MIT", "dependencies": { @@ -939,6 +1053,7 @@ } }, "../dist/service-override-files": { + "name": "@codingame/monaco-vscode-files-service-override", "version": "0.0.0-semantic-release", "license": "MIT", "dependencies": { @@ -947,6 +1062,7 @@ } }, "../dist/service-override-keybindings": { + "name": "@codingame/monaco-vscode-keybindings-service-override", "version": "0.0.0-semantic-release", "license": "MIT", "dependencies": { @@ -956,6 +1072,7 @@ } }, "../dist/service-override-language-detection-worker": { + "name": "@codingame/monaco-vscode-language-detection-worker-service-override", "version": "0.0.0-semantic-release", "license": "MIT", "dependencies": { @@ -965,6 +1082,7 @@ } }, "../dist/service-override-languages": { + "name": "@codingame/monaco-vscode-languages-service-override", "version": "0.0.0-semantic-release", "license": "MIT", "dependencies": { @@ -974,6 +1092,7 @@ } }, "../dist/service-override-layout": { + "name": "@codingame/monaco-vscode-layout-service-override", "version": "0.0.0-semantic-release", "license": "MIT", "dependencies": { @@ -982,6 +1101,7 @@ } }, "../dist/service-override-lifecycle": { + "name": "@codingame/monaco-vscode-lifecycle-service-override", "version": "0.0.0-semantic-release", "license": "MIT", "dependencies": { @@ -990,6 +1110,7 @@ } }, "../dist/service-override-log": { + "name": "@codingame/monaco-vscode-log-service-override", "version": "0.0.0-semantic-release", "license": "MIT", "dependencies": { @@ -999,6 +1120,7 @@ } }, "../dist/service-override-markers": { + "name": "@codingame/monaco-vscode-markers-service-override", "version": "0.0.0-semantic-release", "license": "MIT", "dependencies": { @@ -1007,6 +1129,16 @@ } }, "../dist/service-override-model": { + "name": "@codingame/monaco-vscode-model-service-override", + "version": "0.0.0-semantic-release", + "license": "MIT", + "dependencies": { + "monaco-editor": "0.45.0", + "vscode": "npm:@codingame/monaco-vscode-api@^0.0.0-semantic-release" + } + }, + "../dist/service-override-notebook": { + "name": "@codingame/monaco-vscode-notebook-service-override", "version": "0.0.0-semantic-release", "license": "MIT", "dependencies": { @@ -1015,6 +1147,7 @@ } }, "../dist/service-override-notifications": { + "name": "@codingame/monaco-vscode-notifications-service-override", "version": "0.0.0-semantic-release", "license": "MIT", "dependencies": { @@ -1024,6 +1157,7 @@ } }, "../dist/service-override-output": { + "name": "@codingame/monaco-vscode-output-service-override", "version": "0.0.0-semantic-release", "license": "MIT", "dependencies": { @@ -1033,6 +1167,7 @@ } }, "../dist/service-override-preferences": { + "name": "@codingame/monaco-vscode-preferences-service-override", "version": "0.0.0-semantic-release", "license": "MIT", "dependencies": { @@ -1041,6 +1176,7 @@ } }, "../dist/service-override-quickaccess": { + "name": "@codingame/monaco-vscode-quickaccess-service-override", "version": "0.0.0-semantic-release", "license": "MIT", "dependencies": { @@ -1049,6 +1185,7 @@ } }, "../dist/service-override-remote-agent": { + "name": "@codingame/monaco-vscode-remote-agent-service-override", "version": "0.0.0-semantic-release", "license": "MIT", "dependencies": { @@ -1058,6 +1195,7 @@ } }, "../dist/service-override-scm": { + "name": "@codingame/monaco-vscode-scm-service-override", "version": "0.0.0-semantic-release", "license": "MIT", "dependencies": { @@ -1066,6 +1204,7 @@ } }, "../dist/service-override-search": { + "name": "@codingame/monaco-vscode-search-service-override", "version": "0.0.0-semantic-release", "license": "MIT", "dependencies": { @@ -1074,6 +1213,7 @@ } }, "../dist/service-override-snippets": { + "name": "@codingame/monaco-vscode-snippets-service-override", "version": "0.0.0-semantic-release", "license": "MIT", "dependencies": { @@ -1083,6 +1223,7 @@ } }, "../dist/service-override-storage": { + "name": "@codingame/monaco-vscode-storage-service-override", "version": "0.0.0-semantic-release", "license": "MIT", "dependencies": { @@ -1091,35 +1232,38 @@ } }, "../dist/service-override-terminal": { + "name": "@codingame/monaco-vscode-terminal-service-override", "version": "0.0.0-semantic-release", "license": "MIT", "dependencies": { - "@xterm/addon-canvas": "0.6.0-beta.9", - "@xterm/addon-image": "0.7.0-beta.7", - "@xterm/addon-search": "0.14.0-beta.9", - "@xterm/addon-serialize": "0.12.0-beta.9", - "@xterm/addon-unicode11": "0.7.0-beta.9", - "@xterm/addon-webgl": "0.17.0-beta.9", - "@xterm/xterm": "5.4.0-beta.9", + "@xterm/addon-canvas": "0.6.0-beta.14", + "@xterm/addon-image": "0.7.0-beta.12", + "@xterm/addon-search": "0.14.0-beta.14", + "@xterm/addon-serialize": "0.12.0-beta.14", + "@xterm/addon-unicode11": "0.7.0-beta.14", + "@xterm/addon-webgl": "0.17.0-beta.14", + "@xterm/xterm": "5.4.0-beta.14", "monaco-editor": "0.45.0", "vscode": "npm:@codingame/monaco-vscode-api@^0.0.0-semantic-release" } }, "../dist/service-override-testing": { + "name": "@codingame/monaco-vscode-testing-service-override", "version": "0.0.0-semantic-release", "license": "MIT", "dependencies": { - "@xterm/addon-canvas": "0.6.0-beta.9", - "@xterm/addon-image": "0.7.0-beta.7", - "@xterm/addon-search": "0.14.0-beta.9", - "@xterm/addon-serialize": "0.12.0-beta.9", - "@xterm/addon-unicode11": "0.7.0-beta.9", - "@xterm/addon-webgl": "0.17.0-beta.9", + "@xterm/addon-canvas": "0.6.0-beta.14", + "@xterm/addon-image": "0.7.0-beta.12", + "@xterm/addon-search": "0.14.0-beta.14", + "@xterm/addon-serialize": "0.12.0-beta.14", + "@xterm/addon-unicode11": "0.7.0-beta.14", + "@xterm/addon-webgl": "0.17.0-beta.14", "monaco-editor": "0.45.0", "vscode": "npm:@codingame/monaco-vscode-api@^0.0.0-semantic-release" } }, "../dist/service-override-textmate": { + "name": "@codingame/monaco-vscode-textmate-service-override", "version": "0.0.0-semantic-release", "license": "MIT", "dependencies": { @@ -1131,6 +1275,7 @@ } }, "../dist/service-override-theme": { + "name": "@codingame/monaco-vscode-theme-service-override", "version": "0.0.0-semantic-release", "license": "MIT", "dependencies": { @@ -1140,6 +1285,7 @@ } }, "../dist/service-override-view-banner": { + "name": "@codingame/monaco-vscode-view-banner-service-override", "version": "0.0.0-semantic-release", "license": "MIT", "dependencies": { @@ -1148,6 +1294,7 @@ } }, "../dist/service-override-view-status-bar": { + "name": "@codingame/monaco-vscode-view-status-bar-service-override", "version": "0.0.0-semantic-release", "license": "MIT", "dependencies": { @@ -1156,6 +1303,7 @@ } }, "../dist/service-override-view-title-bar": { + "name": "@codingame/monaco-vscode-view-title-bar-service-override", "version": "0.0.0-semantic-release", "license": "MIT", "dependencies": { @@ -1164,6 +1312,7 @@ } }, "../dist/service-override-views": { + "name": "@codingame/monaco-vscode-views-service-override", "version": "0.0.0-semantic-release", "license": "MIT", "dependencies": { @@ -1178,7 +1327,17 @@ "vscode": "npm:@codingame/monaco-vscode-api@^0.0.0-semantic-release" } }, + "../dist/service-override-welcome": { + "name": "@codingame/monaco-vscode-welcome-service-override", + "version": "0.0.0-semantic-release", + "license": "MIT", + "dependencies": { + "monaco-editor": "0.45.0", + "vscode": "npm:@codingame/monaco-vscode-api@^0.0.0-semantic-release" + } + }, "../dist/service-override-working-copy": { + "name": "@codingame/monaco-vscode-working-copy-service-override", "version": "0.0.0-semantic-release", "license": "MIT", "dependencies": { @@ -1188,6 +1347,7 @@ } }, "../dist/service-override-workspace-trust": { + "name": "@codingame/monaco-vscode-workspace-trust-service-override", "version": "0.0.0-semantic-release", "license": "MIT", "dependencies": { @@ -1196,6 +1356,7 @@ } }, "../dist/vscode-language-pack-cs": { + "name": "@codingame/monaco-vscode-language-pack-cs", "version": "0.0.0-semantic-release", "license": "MIT", "dependencies": { @@ -1203,6 +1364,7 @@ } }, "../dist/vscode-language-pack-de": { + "name": "@codingame/monaco-vscode-language-pack-de", "version": "0.0.0-semantic-release", "license": "MIT", "dependencies": { @@ -1210,6 +1372,7 @@ } }, "../dist/vscode-language-pack-es": { + "name": "@codingame/monaco-vscode-language-pack-es", "version": "0.0.0-semantic-release", "license": "MIT", "dependencies": { @@ -1217,6 +1380,7 @@ } }, "../dist/vscode-language-pack-fr": { + "name": "@codingame/monaco-vscode-language-pack-fr", "version": "0.0.0-semantic-release", "license": "MIT", "dependencies": { @@ -1224,6 +1388,7 @@ } }, "../dist/vscode-language-pack-it": { + "name": "@codingame/monaco-vscode-language-pack-it", "version": "0.0.0-semantic-release", "license": "MIT", "dependencies": { @@ -1231,6 +1396,7 @@ } }, "../dist/vscode-language-pack-ja": { + "name": "@codingame/monaco-vscode-language-pack-ja", "version": "0.0.0-semantic-release", "license": "MIT", "dependencies": { @@ -1238,6 +1404,7 @@ } }, "../dist/vscode-language-pack-ko": { + "name": "@codingame/monaco-vscode-language-pack-ko", "version": "0.0.0-semantic-release", "license": "MIT", "dependencies": { @@ -1245,6 +1412,7 @@ } }, "../dist/vscode-language-pack-pl": { + "name": "@codingame/monaco-vscode-language-pack-pl", "version": "0.0.0-semantic-release", "license": "MIT", "dependencies": { @@ -1252,6 +1420,7 @@ } }, "../dist/vscode-language-pack-pt-BR": { + "name": "@codingame/monaco-vscode-language-pack-pt-br", "version": "0.0.0-semantic-release", "license": "MIT", "dependencies": { @@ -1259,6 +1428,7 @@ } }, "../dist/vscode-language-pack-qps-ploc": { + "name": "@codingame/monaco-vscode-language-pack-qps-ploc", "version": "0.0.0-semantic-release", "license": "MIT", "dependencies": { @@ -1266,6 +1436,7 @@ } }, "../dist/vscode-language-pack-ru": { + "name": "@codingame/monaco-vscode-language-pack-ru", "version": "0.0.0-semantic-release", "license": "MIT", "dependencies": { @@ -1273,6 +1444,7 @@ } }, "../dist/vscode-language-pack-tr": { + "name": "@codingame/monaco-vscode-language-pack-tr", "version": "0.0.0-semantic-release", "license": "MIT", "dependencies": { @@ -1280,6 +1452,7 @@ } }, "../dist/vscode-language-pack-zh-hans": { + "name": "@codingame/monaco-vscode-language-pack-zh-hans", "version": "0.0.0-semantic-release", "license": "MIT", "dependencies": { @@ -1287,6 +1460,7 @@ } }, "../dist/vscode-language-pack-zh-hant": { + "name": "@codingame/monaco-vscode-language-pack-zh-hant", "version": "0.0.0-semantic-release", "license": "MIT", "dependencies": { @@ -1318,6 +1492,10 @@ "resolved": "../dist/service-override-bulk-edit", "link": true }, + "node_modules/@codingame/monaco-vscode-chat-service-override": { + "resolved": "../dist/service-override-chat", + "link": true + }, "node_modules/@codingame/monaco-vscode-clojure-default-extension": { "resolved": "../dist/default-extension-clojure", "link": true @@ -1626,6 +1804,10 @@ "resolved": "../dist/default-extension-notebook-renderers", "link": true }, + "node_modules/@codingame/monaco-vscode-notebook-service-override": { + "resolved": "../dist/service-override-notebook", + "link": true + }, "node_modules/@codingame/monaco-vscode-notifications-service-override": { "resolved": "../dist/service-override-notifications", "link": true @@ -1854,6 +2036,10 @@ "resolved": "../dist/default-extension-vscode-test-resolver", "link": true }, + "node_modules/@codingame/monaco-vscode-welcome-service-override": { + "resolved": "../dist/service-override-welcome", + "link": true + }, "node_modules/@codingame/monaco-vscode-working-copy-service-override": { "resolved": "../dist/service-override-working-copy", "link": true diff --git a/demo/package.json b/demo/package.json index 7708e582..a6329985 100644 --- a/demo/package.json +++ b/demo/package.json @@ -79,6 +79,8 @@ "@codingame/monaco-vscode-language-detection-worker-service-override": "file:../dist/service-override-language-detection-worker", "@codingame/monaco-vscode-working-copy-service-override": "file:../dist/service-override-working-copy", "@codingame/monaco-vscode-testing-service-override": "file:../dist/service-override-testing", + "@codingame/monaco-vscode-chat-service-override": "file:../dist/service-override-chat", + "@codingame/monaco-vscode-notebook-service-override": "file:../dist/service-override-notebook", "@codingame/monaco-vscode-language-pack-cs": "file:../dist/vscode-language-pack-cs", "@codingame/monaco-vscode-language-pack-de": "file:../dist/vscode-language-pack-de", "@codingame/monaco-vscode-language-pack-es": "file:../dist/vscode-language-pack-es", @@ -168,6 +170,7 @@ "@codingame/monaco-vscode-workspace-trust-service-override": "file:../dist/service-override-workspace-trust", "@codingame/monaco-vscode-xml-default-extension": "file:../dist/default-extension-xml", "@codingame/monaco-vscode-yaml-default-extension": "file:../dist/default-extension-yaml", + "@codingame/monaco-vscode-welcome-service-override": "file:../dist/service-override-welcome", "ansi-colors": "^4.1.3", "dockerode": "^4.0.0", "express": "^4.18.2", diff --git a/demo/src/main.ts b/demo/src/main.ts index 0621e7e6..454f907e 100644 --- a/demo/src/main.ts +++ b/demo/src/main.ts @@ -61,6 +61,7 @@ import '@codingame/monaco-vscode-configuration-editing-default-extension' import '@codingame/monaco-vscode-markdown-math-default-extension' import '@codingame/monaco-vscode-npm-default-extension' import '@codingame/monaco-vscode-media-preview-default-extension' +import '@codingame/monaco-vscode-ipynb-default-extension' if (remoteAuthority != null) { import('./features/remoteExtension') @@ -89,6 +90,11 @@ diagnostics.set(modelRef.object.textEditorModel!.uri, [{ code: 42 }]) const settingsModelReference = await createModelReference(defaultUserConfigurationFile) +function updateSettingsDirty () { + document.getElementById('settings-dirty')!.style.display = settingsModelReference.object.isDirty() ? 'inline' : 'none' +} +updateSettingsDirty() +settingsModelReference.object.onDidChangeDirty(updateSettingsDirty) const settingEditor = createConfiguredEditor(document.getElementById('settings-editor')!, { model: settingsModelReference.object.textEditorModel, automaticLayout: true @@ -107,6 +113,12 @@ settingEditor.addAction({ }) const keybindingsModelReference = await createModelReference(defaultUserKeybindindsFile) +function updateKeydinbingsDirty () { + document.getElementById('keybindings-dirty')!.style.display = keybindingsModelReference.object.isDirty() ? 'inline' : 'none' +} +updateKeydinbingsDirty() +keybindingsModelReference.object.onDidChangeDirty(updateKeydinbingsDirty) + createConfiguredEditor(document.getElementById('keybindings-editor')!, { model: keybindingsModelReference.object.textEditorModel, automaticLayout: true diff --git a/demo/src/setup.ts b/demo/src/setup.ts index bb365688..62060dfb 100644 --- a/demo/src/setup.ts +++ b/demo/src/setup.ts @@ -16,7 +16,10 @@ import getViewsServiceOverride, { Parts, onPartVisibilityChange, isPartVisibile, - attachPart + attachPart, + getSideBarPosition, + onDidChangeSideBarPosition, + Position } from '@codingame/monaco-vscode-views-service-override' import getBannerServiceOverride from '@codingame/monaco-vscode-view-banner-service-override' import getStatusBarServiceOverride from '@codingame/monaco-vscode-view-status-bar-service-override' @@ -41,6 +44,9 @@ import getLogServiceOverride from '@codingame/monaco-vscode-log-service-override import { createIndexedDBProviders, initFile } from '@codingame/monaco-vscode-files-service-override' import getWorkingCopyServiceOverride from '@codingame/monaco-vscode-working-copy-service-override' import getTestingServiceOverride from '@codingame/monaco-vscode-testing-service-override' +import getChatServiceOverride from '@codingame/monaco-vscode-chat-service-override' +import getNotebookServiceOverride from '@codingame/monaco-vscode-notebook-service-override' +import getWelcomeServiceOverride from '@codingame/monaco-vscode-welcome-service-override' import * as monaco from 'monaco-editor' import { registerExtension } from 'vscode/extensions' import { TerminalBackend } from './features/terminal' @@ -59,7 +65,9 @@ const workerLoaders: Partial> = { editorWorkerService: () => new Worker(new URL('monaco-editor/esm/vs/editor/editor.worker.js', import.meta.url), { type: 'module' }), textMateWorker: () => new Worker(new URL('@codingame/monaco-vscode-textmate-service-override/worker', import.meta.url), { type: 'module' }), outputLinkComputer: () => new Worker(new URL('@codingame/monaco-vscode-output-service-override/worker', import.meta.url), { type: 'module' }), - languageDetectionWorkerService: () => new Worker(new URL('@codingame/monaco-vscode-language-detection-worker-service-override/worker', import.meta.url), { type: 'module' }) + languageDetectionWorkerService: () => new Worker(new URL('@codingame/monaco-vscode-language-detection-worker-service-override/worker', import.meta.url), { type: 'module' }), + notebookEditorWorkerService: () => new Worker(new URL('@codingame/monaco-vscode-notebook-service-override/worker', import.meta.url), { type: 'module' }) + } window.MonacoEnvironment = { getWorker: function (moduleId, label) { @@ -139,7 +147,10 @@ await initializeMonacoService({ ...getWorkspaceTrustOverride(), ...getWorkingCopyServiceOverride(), ...getScmServiceOverride(), - ...getTestingServiceOverride() + ...getTestingServiceOverride(), + ...getChatServiceOverride(), + ...getNotebookServiceOverride(), + ...getWelcomeServiceOverride() }, document.body, { remoteAuthority, enableWorkspaceTrust: true, @@ -191,25 +202,28 @@ export async function clearStorage (): Promise { await (await getService(IStorageService) as BrowserStorageService).clear() } -for (const { part, element } of [ +for (const config of [ { part: Parts.TITLEBAR_PART, element: '#titleBar' }, { part: Parts.BANNER_PART, element: '#banner' }, - { part: Parts.SIDEBAR_PART, element: '#sidebar' }, - { part: Parts.ACTIVITYBAR_PART, element: '#activityBar' }, + { part: Parts.SIDEBAR_PART, get element () { return getSideBarPosition() === Position.LEFT ? '#sidebar' : '#sidebar-right' }, onDidElementChange: onDidChangeSideBarPosition }, + { part: Parts.ACTIVITYBAR_PART, get element () { return getSideBarPosition() === Position.LEFT ? '#activityBar' : '#activityBar-right' }, onDidElementChange: onDidChangeSideBarPosition }, { part: Parts.PANEL_PART, element: '#panel' }, { part: Parts.EDITOR_PART, element: '#editors' }, { part: Parts.STATUSBAR_PART, element: '#statusBar' }, - { part: Parts.AUXILIARYBAR_PART, element: '#auxiliaryBar' } + { part: Parts.AUXILIARYBAR_PART, get element () { return getSideBarPosition() === Position.LEFT ? '#auxiliaryBar' : '#auxiliaryBar-left' }, onDidElementChange: onDidChangeSideBarPosition } ]) { - const el = document.querySelector(element)! - attachPart(part, el) + attachPart(config.part, document.querySelector(config.element)!) + + config.onDidElementChange?.(() => { + attachPart(config.part, document.querySelector(config.element)!) + }) - if (!isPartVisibile(part)) { - el.style.display = 'none' + if (!isPartVisibile(config.part)) { + document.querySelector(config.element)!.style.display = 'none' } - onPartVisibilityChange(part, visible => { - el.style.display = visible ? 'block' : 'none' + onPartVisibilityChange(config.part, visible => { + document.querySelector(config.element)!.style.display = visible ? 'block' : 'none' }) } diff --git a/demo/src/style.css b/demo/src/style.css index 0e5f9f8d..39100d32 100644 --- a/demo/src/style.css +++ b/demo/src/style.css @@ -26,9 +26,9 @@ body { #panel { display: flex; - flex: none; + flex: 1; border: 1px solid var(--vscode-editorWidget-border); - height: 30vh; + min-height: 0; } .standalone-editor { @@ -38,4 +38,22 @@ body { #titleBar { position: relative; -} \ No newline at end of file + flex: none; +} + +#banner { + flex: none; +} + +#workbench-container { + height: 100vh; + display: flex; + flex-direction: column +} + +#workbench-top { + display: flex; + gap: 20px; + flex: 2; + min-height: 0 +} diff --git a/demo/src/user/configuration.json b/demo/src/user/configuration.json index 1aa59cfc..129be39c 100644 --- a/demo/src/user/configuration.json +++ b/demo/src/user/configuration.json @@ -5,7 +5,7 @@ "editor.autoClosingQuotes": "languageDefined", "editor.scrollBeyondLastLine": true, "editor.mouseWheelZoom": true, - "editor.wordBasedSuggestions": false, + "editor.wordBasedSuggestions": "off", "editor.acceptSuggestionOnEnter": "on", "editor.foldingHighlight": false, "editor.semanticHighlighting.enabled": true, @@ -17,5 +17,6 @@ "debug.toolBarLocation": "docked", "editor.experimental.asyncTokenization": true, "terminal.integrated.tabs.title": "${sequence}", - "typescript.tsserver.log": "normal" + "typescript.tsserver.log": "normal", + "workbench.sideBar.location": "left" } \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index 822f2fbc..d8a5f1b6 100644 --- a/package-lock.json +++ b/package-lock.json @@ -17,6 +17,7 @@ "@vscode/spdlog": "^0.13.12", "@vscode/vscode-languagedetection": "1.0.21", "@vscode/windows-process-tree": "^0.5.0", + "@vscode/windows-registry": "^1.1.0", "@xterm/addon-canvas": "0.6.0-beta.14", "@xterm/addon-image": "0.7.0-beta.12", "@xterm/addon-search": "0.14.0-beta.14", @@ -93,7 +94,6 @@ "ts-node": "^10.9.1", "type-fest": "^4.8.3", "typescript": "5.3.3", - "xterm-headless": "^5.3.0", "zx": "^7.2.3" } }, @@ -3316,6 +3316,12 @@ "nan": "^2.17.0" } }, + "node_modules/@vscode/windows-registry": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@vscode/windows-registry/-/windows-registry-1.1.0.tgz", + "integrity": "sha512-5AZzuWJpGscyiMOed0IuyEwt6iKmV5Us7zuwCDCFYMIq7tsvooO9BUiciywsvuthGz6UG4LSpeDeCxvgMVhnIw==", + "hasInstallScript": true + }, "node_modules/@web/rollup-plugin-import-meta-assets": { "version": "2.2.1", "resolved": "https://registry.npmjs.org/@web/rollup-plugin-import-meta-assets/-/rollup-plugin-import-meta-assets-2.2.1.tgz", @@ -9664,12 +9670,6 @@ "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==" }, - "node_modules/xterm-headless": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/xterm-headless/-/xterm-headless-5.3.0.tgz", - "integrity": "sha512-HjKkEgvjlyXfZvI0LdQChOqGL5nDiXge6X2IvoQbOn+oavAKUCX9hKHtDxmWVwxgNCCvXDnfQCYL+3wyHQ9PXA==", - "dev": true - }, "node_modules/yallist": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", diff --git a/package.json b/package.json index de67e0a0..0528dc2e 100644 --- a/package.json +++ b/package.json @@ -20,7 +20,7 @@ "compile-default-extensions": "NODE_OPTIONS=--max_old_space_size=8192 rollup --config rollup/rollup.default-extensions.ts --configPlugin 'typescript={tsconfig: `tsconfig.rollup-config-default-extensions.json`}'", "compile-language-packs": "NODE_OPTIONS=--max_old_space_size=8192 rollup --config rollup/rollup.language-packs.ts --configPlugin 'typescript={tsconfig: `tsconfig.rollup-config-language-packs.json`}'", "clean": "rm -rf dist/", - "compile-server": "rollup --config rollup/rollup.server.config.ts --configPlugin 'typescript={tsconfig: `tsconfig.rollup-config-server.json`, include: [`./rollup/rollup.server.config.ts`, `./rollup/rollup-metadata-plugin.ts`]}' --vscode-version ${npm_package_config_vscode_version} --vscode-ref ${npm_package_config_vscode_ref}", + "compile-server": "rollup --config rollup/rollup.server.config.ts --configPlugin 'typescript={tsconfig: `tsconfig.rollup-config-server.json`, include: [`./rollup/rollup.server.config.ts`, `./rollup/rollup-metadata-plugin.ts`, `./rollup/rollup-asset-glob-meta-url-plugin.ts`]}' --vscode-version ${npm_package_config_vscode_version} --vscode-ref ${npm_package_config_vscode_ref}", "compile-treemending-script": "rollup --config rollup/rollup.treemending-script.config.ts --configPlugin 'typescript={tsconfig: `tsconfig.rollup-config-treemending-script.json`, include: [`./rollup/rollup.treemending-script.config.ts`, `./rollup/rollup-metadata-plugin.ts`]}'", "compile-rollup-plugins": "rollup --config rollup/rollup.rollup-plugins.config.ts --configPlugin 'typescript={tsconfig: `tsconfig.rollup-config-plugins.json`, include: [`./rollup/rollup.rollup-plugins.config.ts`, `./rollup/rollup-metadata-plugin.ts`]}'", "copy-monaco-editor": "cp -R node_modules/monaco-editor dist/ && (cd dist/monaco-editor; change-package-name \"@codingame/monaco-editor-treemended\")", @@ -92,7 +92,6 @@ "ts-node": "^10.9.1", "type-fest": "^4.8.3", "typescript": "5.3.3", - "xterm-headless": "^5.3.0", "zx": "^7.2.3" }, "dependencies": { @@ -104,6 +103,7 @@ "@vscode/spdlog": "^0.13.12", "@vscode/vscode-languagedetection": "1.0.21", "@vscode/windows-process-tree": "^0.5.0", + "@vscode/windows-registry": "^1.1.0", "@xterm/addon-canvas": "0.6.0-beta.14", "@xterm/addon-image": "0.7.0-beta.12", "@xterm/addon-search": "0.14.0-beta.14", diff --git a/rollup/rollup.config.ts b/rollup/rollup.config.ts index 2cb1c2ef..7e0a9fec 100644 --- a/rollup/rollup.config.ts +++ b/rollup/rollup.config.ts @@ -195,11 +195,6 @@ function isCallPure (file: string, functionName: string, node: recast.types.name } } - if (functionName === 'MenuRegistry.appendMenuItems') { - if (file.includes('layoutActions')) { - return true - } - } if (functionName === 'MenuRegistry.appendMenuItem') { const firstParamCode = recast.print(args[0]!).code if ( @@ -470,7 +465,8 @@ const input = { const workerGroups: Record = { languageDetection: 'service-override:language-detection-worker', outputLinkComputer: 'service-override:output', - textmate: 'service-override:textmate' + textmate: 'service-override:textmate', + notebook: 'service-override:notebook' } const externals = Object.keys({ ...pkg.dependencies }) @@ -506,6 +502,7 @@ export default (args: Record): rollup.RollupOptions[] => { path.endsWith('.css') || path.startsWith(KEYBOARD_LAYOUT_DIR) || path.endsWith('.contribution.js') || + path.endsWith('.all.js') || path.endsWith('xtensionPoint.js') || path.includes('vs/workbench/api/browser/') || path.endsWith('/fileCommands.js') || @@ -520,7 +517,10 @@ export default (args: Record): rollup.RollupOptions[] => { path.includes('extHost.common.services') || path.includes('extHost.worker.services') || path.includes('inlayHintsAccessibilty') || - path.includes('vs/workbench/contrib/format/browser/') + path.includes('vs/workbench/contrib/format/browser/') || + path.includes('vs/workbench/contrib/chat/browser/contrib/') || + path.includes('vs/workbench/contrib/notebook/browser/') || + path.includes('vs/workbench/contrib/welcomeGettingStarted/browser/gettingStartedColors') } }, external, @@ -1066,7 +1066,7 @@ export default (args: Record): rollup.RollupOptions[] => { } }] }) - await groupBundle.write({ + const output = await groupBundle.write({ preserveModules: true, preserveModulesRoot: path.resolve(DIST_DIR, 'main/service-override'), minifyInternalExports: false, @@ -1083,6 +1083,13 @@ export default (args: Record): rollup.RollupOptions[] => { for (const exclusiveModule of exclusiveModules) { delete bundle[path.relative(DIST_DIR_MAIN, exclusiveModule)] } + + const assets = output.output + .filter((file): file is rollup.OutputAsset => file.type === 'asset') + .filter(file => file.fileName !== 'package.json') + for (const asset of assets) { + delete bundle[asset.fileName] + } } } }), { diff --git a/rollup/rollup.server.config.ts b/rollup/rollup.server.config.ts index 772e023c..bbc9ec70 100644 --- a/rollup/rollup.server.config.ts +++ b/rollup/rollup.server.config.ts @@ -5,6 +5,7 @@ import commonjs from '@rollup/plugin-commonjs' import json from '@rollup/plugin-json' import { PackageJson } from 'type-fest' import replace from '@rollup/plugin-replace' +import copy from 'rollup-plugin-copy' import * as path from 'path' import { fileURLToPath } from 'url' import metadataPlugin from './rollup-metadata-plugin.js' @@ -27,7 +28,7 @@ export default (args: Record): rollup.RollupOptions => { return rollup.defineConfig({ cache: false, external: (source) => { - if (source === 'graceful-fs' || source === 'xterm-headless') { + if (source === 'graceful-fs') { // commonjs module return false } @@ -45,6 +46,15 @@ export default (args: Record): rollup.RollupOptions => { 'bootstrap-fork': 'src/server/bootstrap-fork.ts' }, plugins: [ + copy({ + targets: [{ + src: 'vscode/src/vs/workbench/contrib/terminal/browser/media/*.(sh|zsh|ps1)', + dest: 'dist/server/out/vs/workbench/contrib/terminal/browser/media/' + }, { + src: 'vs/base/node/*.sh', + dest: 'dist/server/out/vs/base/node/' + }] + }), replace({ VSCODE_VERSION: JSON.stringify(vscodeVersion), VSCODE_REF: JSON.stringify(vscodeRef), diff --git a/scripts/install-vscode b/scripts/install-vscode index e5229ba2..de36977e 100755 --- a/scripts/install-vscode +++ b/scripts/install-vscode @@ -98,7 +98,7 @@ echo $vscodeRef > $version_info echo "Building vscode..." NODE_OPTIONS=--max-old-space-size=8192 npx tsc --declaration --importHelpers --module es2020 --preserveConstEnums --outDir "$output_directory" # Copy files that are already built and assets -find ./ \( -name '*.js' -o -name '*.d.ts' -o -name '*.css' -o -name '*.mp3' -o -name '*.svg' -o -name '*.png' -o -name '*.html' \) -exec rsync -R \{\} "$output_directory/src" \; +find ./ \( -name '*.js' -o -name '*.d.ts' -o -name '*.css' -o -name '*.mp3' -o -name '*.svg' -o -name '*.png' -o -name '*.html' -o -name '*.sh' -o -name '*.zsh' -o -name '*.ps1' \) -exec rsync -R \{\} "$output_directory/src" \; echo "Downloading vscode-loc" rm -rf $loc_output_directory diff --git a/scripts/vscode.patch b/scripts/vscode.patch index a280c17f..a5bee389 100644 --- a/scripts/vscode.patch +++ b/scripts/vscode.patch @@ -240,7 +240,7 @@ index 4f42810f0bd..58b0747c812 100644 const ttPolicy = createTrustedTypesPolicy('defaultWorkerFactory', { createScriptURL: value => value }); diff --git a/src/vs/base/common/network.ts b/src/vs/base/common/network.ts -index 00ad27c3d55..5811b217ced 100644 +index 00ad27c3d55..9e5e31ad723 100644 --- a/src/vs/base/common/network.ts +++ b/src/vs/base/common/network.ts @@ -4,6 +4,8 @@ @@ -252,13 +252,23 @@ index 00ad27c3d55..5811b217ced 100644 import * as platform from 'vs/base/common/platform'; import { equalsIgnoreCase, startsWithIgnoreCase } from 'vs/base/common/strings'; import { URI } from 'vs/base/common/uri'; -@@ -210,6 +212,20 @@ export const VSCODE_AUTHORITY = 'vscode-app'; +@@ -210,6 +212,30 @@ export const VSCODE_AUTHORITY = 'vscode-app'; class FileAccessImpl { private static readonly FALLBACK_AUTHORITY = VSCODE_AUTHORITY; + private staticBrowserUris = new ResourceMap(); + private appResourcePathUrls = new Map string)>(); + ++ private moduleContentProvider = new Map Promise>(); ++ ++ public registerModuleContentProvider(moduleId: string, contentLoader: () => Promise) { ++ this.moduleContentProvider.set(moduleId, contentLoader); ++ } ++ ++ public toModuleContent(moduleId: string): Promise { ++ return this.moduleContentProvider.get(moduleId)!(); ++ } ++ + public registerAppResourcePathUrl(moduleId: string, url: string | (() => string)): void { + this.appResourcePathUrls.set(moduleId, url); + } @@ -268,12 +278,12 @@ index 00ad27c3d55..5811b217ced 100644 + if (typeof url === 'function') { + url = url(); + } -+ return new URL(url ?? '', globalThis.location?.href ?? import.meta.url).toString(); ++ return new URL(url ?? moduleId, globalThis.location?.href ?? import.meta.url).toString(); + } /** * Returns a URI to use in contexts where the browser is responsible -@@ -218,7 +234,7 @@ class FileAccessImpl { +@@ -218,7 +244,7 @@ class FileAccessImpl { * **Note:** use `dom.ts#asCSSUrl` whenever the URL is to be used in CSS context. */ asBrowserUri(resourcePath: AppResourcePath | ''): URI { @@ -282,7 +292,7 @@ index 00ad27c3d55..5811b217ced 100644 return this.uriToBrowserUri(uri); } -@@ -257,7 +273,7 @@ class FileAccessImpl { +@@ -257,7 +283,7 @@ class FileAccessImpl { }); } @@ -291,7 +301,7 @@ index 00ad27c3d55..5811b217ced 100644 } /** -@@ -265,7 +281,7 @@ class FileAccessImpl { +@@ -265,7 +291,7 @@ class FileAccessImpl { * is responsible for loading. */ asFileUri(resourcePath: AppResourcePath | ''): URI { @@ -300,7 +310,7 @@ index 00ad27c3d55..5811b217ced 100644 return this.uriToFileUri(uri); } -@@ -297,6 +313,19 @@ class FileAccessImpl { +@@ -297,6 +323,19 @@ class FileAccessImpl { return URI.parse(moduleIdToUrl.toUrl(uriOrModule)); } @@ -2117,6 +2127,34 @@ index 767dd15ab7d..aff608f0a42 100644 } return SerializeAddon; } +diff --git a/src/vs/workbench/contrib/terminalContrib/stickyScroll/browser/terminalStickyScrollOverlay.ts b/src/vs/workbench/contrib/terminalContrib/stickyScroll/browser/terminalStickyScrollOverlay.ts +index b60f155a14a..09ce9a928fe 100644 +--- a/src/vs/workbench/contrib/terminalContrib/stickyScroll/browser/terminalStickyScrollOverlay.ts ++++ b/src/vs/workbench/contrib/terminalContrib/stickyScroll/browser/terminalStickyScrollOverlay.ts +@@ -5,7 +5,6 @@ + import type { CanvasAddon as CanvasAddonType } from '@xterm/addon-canvas'; + import type { SerializeAddon as SerializeAddonType } from '@xterm/addon-serialize'; + import type { IBufferLine, IMarker, ITerminalOptions, ITheme, Terminal as RawXtermTerminal, Terminal as XTermTerminal } from '@xterm/xterm'; +-import { importAMDNodeModule } from 'vs/amdX'; + import { $, addDisposableListener, addStandardDisposableListener, getWindow } from 'vs/base/browser/dom'; + import { CancelablePromise, createCancelablePromise } from 'vs/base/common/async'; + import { debounce, memoize, throttle } from 'vs/base/common/decorators'; +@@ -457,13 +456,13 @@ export class TerminalStickyScrollOverlay extends Disposable { + + @memoize + private async _getCanvasAddonConstructor(): Promise { +- const m = await importAMDNodeModule('@xterm/addon-canvas', 'lib/xterm-addon-canvas.js'); ++ const m = await import('@xterm/addon-canvas'); + return m.CanvasAddon; + } + + @memoize + private async _getSerializeAddonConstructor(): Promise { +- const m = await importAMDNodeModule('@xterm/addon-serialize', 'lib/addon-serialize.js'); ++ const m = await import('@xterm/addon-serialize'); + return m.SerializeAddon; + } + } diff --git a/src/vs/workbench/contrib/webview/browser/pre/service-worker.js b/src/vs/workbench/contrib/webview/browser/pre/service-worker.js index a6e9943b866..c470a1c9ed5 100644 --- a/src/vs/workbench/contrib/webview/browser/pre/service-worker.js @@ -2187,6 +2225,43 @@ index b442277e920..481ab494561 100644 private doPostMessage(channel: string, data?: any, transferable: Transferable[] = []): boolean { if (this.element && this._messagePort) { this._messagePort.postMessage({ channel, args: data }, transferable); +diff --git a/src/vs/workbench/contrib/welcomeGettingStarted/browser/gettingStartedDetailsRenderer.ts b/src/vs/workbench/contrib/welcomeGettingStarted/browser/gettingStartedDetailsRenderer.ts +index 869f44526b4..296ac140860 100644 +--- a/src/vs/workbench/contrib/welcomeGettingStarted/browser/gettingStartedDetailsRenderer.ts ++++ b/src/vs/workbench/contrib/welcomeGettingStarted/browser/gettingStartedDetailsRenderer.ts +@@ -17,6 +17,7 @@ import { IFileService } from 'vs/platform/files/common/files'; + import { INotificationService } from 'vs/platform/notification/common/notification'; + import { ILanguageService } from 'vs/editor/common/languages/language'; + import { IExtensionService } from 'vs/workbench/services/extensions/common/extensions'; ++import { AppResourcePath, FileAccess } from 'vs/base/common/network'; + + + export class GettingStartedDetailsRenderer { +@@ -221,12 +222,9 @@ export class GettingStartedDetailsRenderer { + try { + const moduleId = JSON.parse(path.query).moduleId; + if (useModuleId && moduleId) { +- const contents = await new Promise(c => { +- require([moduleId], content => { +- c(content.default()); +- }); +- }); +- return contents; ++ const content = await FileAccess.toModuleContent<() => Promise>(moduleId); ++ ++ return content(); + } + } catch { } + +@@ -262,7 +260,7 @@ export class GettingStartedDetailsRenderer { + } + + const transformUri = (src: string, base: URI) => { +- const path = joinPath(base, src); ++ const path = FileAccess.asBrowserUri(joinPath(base, src).fsPath.slice(1) as AppResourcePath); + return asWebviewUri(path).toString(true); + }; + diff --git a/src/vs/workbench/contrib/welcomeGettingStarted/browser/gettingStartedService.ts b/src/vs/workbench/contrib/welcomeGettingStarted/browser/gettingStartedService.ts index f0c08e1b826..e63f4724028 100644 --- a/src/vs/workbench/contrib/welcomeGettingStarted/browser/gettingStartedService.ts @@ -2209,6 +2284,47 @@ index f0c08e1b826..e63f4724028 100644 }, when: ContextKeyExpr.deserialize(override ?? walkthrough.when) ?? ContextKeyExpr.true(), } as const; +diff --git a/src/vs/workbench/contrib/welcomeWalkthrough/common/walkThroughContentProvider.ts b/src/vs/workbench/contrib/welcomeWalkthrough/common/walkThroughContentProvider.ts +index 94a4879c2f9..b58e3ffb222 100644 +--- a/src/vs/workbench/contrib/welcomeWalkthrough/common/walkThroughContentProvider.ts ++++ b/src/vs/workbench/contrib/welcomeWalkthrough/common/walkThroughContentProvider.ts +@@ -10,13 +10,13 @@ import { ITextModel, DefaultEndOfLine, EndOfLinePreference, ITextBufferFactory } + import { ILanguageService } from 'vs/editor/common/languages/language'; + import { IWorkbenchContribution } from 'vs/workbench/common/contributions'; + import { marked } from 'vs/base/common/marked/marked'; +-import { Schemas } from 'vs/base/common/network'; ++import { FileAccess, Schemas } from 'vs/base/common/network'; + import { Range } from 'vs/editor/common/core/range'; + import { createTextBufferFactory } from 'vs/editor/common/model/textModel'; + import { assertIsDefined } from 'vs/base/common/types'; +-import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation'; ++import { IInstantiationService, ServicesAccessor } from 'vs/platform/instantiation/common/instantiation'; + +-export function requireToContent(instantiationService: IInstantiationService, resource: URI): Promise { ++export async function requireToContent(instantiationService: IInstantiationService, resource: URI): Promise { + if (!resource.query) { + throw new Error('Welcome: invalid resource'); + } +@@ -26,17 +26,9 @@ export function requireToContent(instantiationService: IInstantiationService, re + throw new Error('Welcome: invalid resource'); + } + +- const content: Promise = new Promise((resolve, reject) => { +- require([query.moduleId], content => { +- try { +- resolve(instantiationService.invokeFunction(content.default)); +- } catch (err) { +- reject(err); +- } +- }); +- }); ++ const content = await FileAccess.toModuleContent<(accessor: ServicesAccessor) => Promise>(query.moduleId); + +- return content; ++ return instantiationService.invokeFunction(content); + } + + export class WalkThroughSnippetContentProvider implements ITextModelContentProvider, IWorkbenchContribution { diff --git a/src/vs/workbench/services/extensionManagement/common/extensionManagement.ts b/src/vs/workbench/services/extensionManagement/common/extensionManagement.ts index 362e485948a..50f5a5f175d 100644 --- a/src/vs/workbench/services/extensionManagement/common/extensionManagement.ts @@ -2586,6 +2702,19 @@ index f4707432371..7c5cdde39cc 100644 declare _serviceBrand: undefined; +diff --git a/src/vs/workbench/services/remote/common/remoteExplorerService.ts b/src/vs/workbench/services/remote/common/remoteExplorerService.ts +index 51edd57eddd..e51481b69b3 100644 +--- a/src/vs/workbench/services/remote/common/remoteExplorerService.ts ++++ b/src/vs/workbench/services/remote/common/remoteExplorerService.ts +@@ -138,7 +138,7 @@ export interface IRemoteExplorerService { + readonly namedProcesses: Map; + } + +-class RemoteExplorerService implements IRemoteExplorerService { ++export class RemoteExplorerService implements IRemoteExplorerService { + public _serviceBrand: undefined; + private _targetType: string[] = []; + private readonly _onDidChangeTargetType: Emitter = new Emitter(); diff --git a/src/vs/workbench/services/remote/common/remoteExtensionsScanner.ts b/src/vs/workbench/services/remote/common/remoteExtensionsScanner.ts index a466cc1f3a1..09f6a40eb26 100644 --- a/src/vs/workbench/services/remote/common/remoteExtensionsScanner.ts diff --git a/src/assets/webview/index-no-csp.html b/src/assets/webview/index-no-csp.html index ada46624..e2738298 100644 --- a/src/assets/webview/index-no-csp.html +++ b/src/assets/webview/index-no-csp.html @@ -123,7 +123,11 @@ } code { + font-family: var(--monaco-monospace-font); color: var(--vscode-textPreformat-foreground); + background-color: var(--vscode-textPreformat-background); + padding: 1px 3px; + border-radius: 4px; } blockquote { diff --git a/src/assets/webview/index.html b/src/assets/webview/index.html index 95167353..a04de172 100644 --- a/src/assets/webview/index.html +++ b/src/assets/webview/index.html @@ -5,7 +5,7 @@ + content="default-src 'none'; script-src 'sha256-Mwwy+ji/EFfa/LgTjpVzHimU6p9WqsPQ+HDXefe3/wQ=' 'self'; frame-src 'self'; style-src 'unsafe-inline';"> [] + getNotebookComments = async () => [] updateCommentingRanges = unsupported hasReactionHandler = unsupported toggleReaction = unsupported @@ -2623,3 +2631,83 @@ registerSingleton(ITestCoverageService, class TestCoverageService implements ITe openCoverage = unsupported closeCoverage = unsupported }, InstantiationType.Delayed) + +registerSingleton(IChatAccessibilityService, class ChatAccessibilityService implements IChatAccessibilityService { + _serviceBrand: undefined + acceptRequest = unsupported + acceptResponse = unsupported +}, InstantiationType.Delayed) + +registerSingleton(IChatWidgetHistoryService, class ChatWidgetHistoryService implements IChatWidgetHistoryService { + _serviceBrand: undefined + onDidClearHistory = Event.None + clearHistory = unsupported + getHistory = () => [] + saveHistory = unsupported +}, InstantiationType.Delayed) + +registerSingleton(IInlineChatSessionService, class InlineChatSessionService implements IInlineChatSessionService { + _serviceBrand: undefined + onWillStartSession = Event.None + onDidEndSession = Event.None + createSession = unsupported + getSession = unsupported + releaseSession = unsupported + registerSessionKeyComputer = unsupported + recordings = unsupported + dispose = unsupported +}, InstantiationType.Delayed) + +registerSingleton(INotebookEditorWorkerService, class NotebookEditorWorkerService implements INotebookEditorWorkerService { + _serviceBrand: undefined + canComputeDiff = () => false + computeDiff = unsupported + canPromptRecommendation = async () => false +}, InstantiationType.Delayed) + +registerSingleton(INotebookKernelHistoryService, class NotebookKernelHistoryService implements INotebookKernelHistoryService { + _serviceBrand: undefined + getKernels = unsupported + addMostRecentKernel = unsupported +}, InstantiationType.Delayed) + +registerSingleton(INotebookExecutionService, class NotebookExecutionService implements INotebookExecutionService { + _serviceBrand: undefined + executeNotebookCells = unsupported + cancelNotebookCells = unsupported + cancelNotebookCellHandles = unsupported + registerExecutionParticipant = unsupported +}, InstantiationType.Delayed) + +registerSingleton(INotebookKeymapService, class NotebookKeymapService implements INotebookKeymapService { + _serviceBrand: undefined +}, InstantiationType.Delayed) + +registerSingleton(INotebookLoggingService, class NotebookLoggingService implements INotebookLoggingService { + _serviceBrand: undefined + info = unsupported + debug = unsupported +}, InstantiationType.Delayed) + +registerSingleton(IWalkthroughsService, class WalkthroughsService implements IWalkthroughsService { + _serviceBrand: undefined + onDidAddWalkthrough = Event.None + onDidRemoveWalkthrough = Event.None + onDidChangeWalkthrough = Event.None + onDidProgressStep = Event.None + getWalkthroughs = unsupported + getWalkthrough = unsupported + registerWalkthrough = unsupported + progressByEvent = unsupported + progressStep = unsupported + deprogressStep = unsupported + markWalkthroughOpened = unsupported +}, InstantiationType.Delayed) + +registerSingleton(IFeaturedExtensionsService, class FeaturedExtensionsService implements IFeaturedExtensionsService { + _serviceBrand: undefined + getExtensions = unsupported + get title () { + return unsupported() + } +}, InstantiationType.Delayed) diff --git a/src/override/vs/workbench/contrib/notebook/browser/contrib/find/findMatchDecorationModel.js b/src/override/vs/workbench/contrib/notebook/browser/contrib/find/findMatchDecorationModel.js deleted file mode 100644 index 8c82cf86..00000000 --- a/src/override/vs/workbench/contrib/notebook/browser/contrib/find/findMatchDecorationModel.js +++ /dev/null @@ -1 +0,0 @@ -export class FindMatchDecorationModel {} diff --git a/src/override/vs/workbench/contrib/notebook/browser/contrib/find/notebookFindWidget.js b/src/override/vs/workbench/contrib/notebook/browser/contrib/find/notebookFindWidget.js deleted file mode 100644 index 70e99df8..00000000 --- a/src/override/vs/workbench/contrib/notebook/browser/contrib/find/notebookFindWidget.js +++ /dev/null @@ -1 +0,0 @@ -export class NotebookFindContrib {} \ No newline at end of file diff --git a/src/override/vs/workbench/contrib/notebook/browser/notebookEditor.js b/src/override/vs/workbench/contrib/notebook/browser/notebookEditor.js deleted file mode 100644 index 916cb3e6..00000000 --- a/src/override/vs/workbench/contrib/notebook/browser/notebookEditor.js +++ /dev/null @@ -1 +0,0 @@ -export class NotebookEditor {} diff --git a/src/override/vs/workbench/contrib/notebook/browser/notebookEditorWidget.js b/src/override/vs/workbench/contrib/notebook/browser/notebookEditorWidget.js deleted file mode 100644 index 9c4e4424..00000000 --- a/src/override/vs/workbench/contrib/notebook/browser/notebookEditorWidget.js +++ /dev/null @@ -1 +0,0 @@ -export class NotebookEditorWidget {} diff --git a/src/override/vs/workbench/contrib/notebook/common/notebookEditorInput.js b/src/override/vs/workbench/contrib/notebook/common/notebookEditorInput.js deleted file mode 100644 index 2e28894a..00000000 --- a/src/override/vs/workbench/contrib/notebook/common/notebookEditorInput.js +++ /dev/null @@ -1,5 +0,0 @@ -export class NotebookEditorInput {} - -export function isCompositeNotebookEditorInput () { - return false -} diff --git a/src/service-override/bulkEdit.ts b/src/service-override/bulkEdit.ts index 39b14e1e..cd703d14 100644 --- a/src/service-override/bulkEdit.ts +++ b/src/service-override/bulkEdit.ts @@ -2,6 +2,7 @@ import { IEditorOverrideServices } from 'vs/editor/standalone/browser/standalone import { SyncDescriptor } from 'vs/platform/instantiation/common/descriptors' import { IBulkEditService } from 'vs/editor/browser/services/bulkEditService' import { BulkEditService } from 'vs/workbench/contrib/bulkEdit/browser/bulkEditService' +import 'vs/workbench/contrib/bulkEdit/browser/preview/bulkEdit.contribution' export default function getServiceOverride (): IEditorOverrideServices { return { diff --git a/src/service-override/chat.ts b/src/service-override/chat.ts new file mode 100644 index 00000000..198e8745 --- /dev/null +++ b/src/service-override/chat.ts @@ -0,0 +1,38 @@ +import { IEditorOverrideServices } from 'vs/editor/standalone/browser/standaloneServices' +import { SyncDescriptor } from 'vs/platform/instantiation/common/descriptors' +import { IChatService } from 'vs/workbench/contrib/chat/common/chatService' +import { IChatContributionService } from 'vs/workbench/contrib/chat/common/chatContributionService' +import { IChatWidgetService, IChatAccessibilityService, IQuickChatService } from 'vs/workbench/contrib/chat/browser/chat' +import { ChatContributionService } from 'vs/workbench/contrib/chat/browser/chatContributionServiceImpl' +import { ChatWidgetService } from 'vs/workbench/contrib/chat/browser/chatWidget' +import { ChatService } from 'vs/workbench/contrib/chat/common/chatServiceImpl' +import { ChatWidgetHistoryService, IChatWidgetHistoryService } from 'vs/workbench/contrib/chat/common/chatWidgetHistoryService' +import { ChatAccessibilityService } from 'vs/workbench/contrib/chat/browser/chatAccessibilityService' +import { ChatProviderService, IChatProviderService } from 'vs/workbench/contrib/chat/common/chatProvider' +import { ChatSlashCommandService, IChatSlashCommandService } from 'vs/workbench/contrib/chat/common/chatSlashCommands' +import { IChatVariablesService } from 'vs/workbench/contrib/chat/common/chatVariables' +import { ChatVariablesService } from 'vs/workbench/contrib/chat/browser/chatVariables' +import { QuickChatService } from 'vs/workbench/contrib/chat/browser/chatQuick' +import { ChatAgentService, IChatAgentService } from 'vs/workbench/contrib/chat/common/chatAgents' +import { InlineChatServiceImpl } from 'vs/workbench/contrib/inlineChat/common/inlineChatServiceImpl' +import { IInlineChatSessionService, InlineChatSessionService } from 'vs/workbench/contrib/inlineChat/browser/inlineChatSession' +import { IInlineChatService } from 'vs/workbench/contrib/inlineChat/common/inlineChat' +import 'vs/workbench/contrib/chat/browser/chat.contribution' +import 'vs/workbench/contrib/inlineChat/browser/inlineChat.contribution' + +export default function getServiceOverride (): IEditorOverrideServices { + return { + [IChatService.toString()]: new SyncDescriptor(ChatService, [], true), + [IChatContributionService.toString()]: new SyncDescriptor(ChatContributionService, [], true), + [IChatWidgetService.toString()]: new SyncDescriptor(ChatWidgetService, [], true), + [IQuickChatService.toString()]: new SyncDescriptor(QuickChatService, [], true), + [IChatAccessibilityService.toString()]: new SyncDescriptor(ChatAccessibilityService, [], true), + [IChatWidgetHistoryService.toString()]: new SyncDescriptor(ChatWidgetHistoryService, [], true), + [IChatProviderService.toString()]: new SyncDescriptor(ChatProviderService, [], true), + [IChatSlashCommandService.toString()]: new SyncDescriptor(ChatSlashCommandService, [], true), + [IChatAgentService.toString()]: new SyncDescriptor(ChatAgentService, [], true), + [IChatVariablesService.toString()]: new SyncDescriptor(ChatVariablesService, [], true), + [IInlineChatService.toString()]: new SyncDescriptor(InlineChatServiceImpl, [], true), + [IInlineChatSessionService.toString()]: new SyncDescriptor(InlineChatSessionService, [], true) + } +} diff --git a/src/service-override/keybindings.ts b/src/service-override/keybindings.ts index bb309b2d..4d0463a5 100644 --- a/src/service-override/keybindings.ts +++ b/src/service-override/keybindings.ts @@ -28,6 +28,8 @@ import type { DynamicKeybindingService, KeybindingProvider } from '../monaco' import { onRenderWorkbench } from '../lifecycle' import 'vs/workbench/browser/workbench.contribution' import 'vs/workbench/contrib/keybindings/browser/keybindings.contribution' +import 'vs/workbench/contrib/preferences/browser/keybindingsEditorContribution' +import 'vs/workbench/contrib/commands/common/commands.contribution' // This is the default value, but can be overriden by overriding the Environment or UserDataProfileService service const defaultUserKeybindindsFile = URI.from({ scheme: Schemas.vscodeUserData, path: '/User/keybindings.json' }) diff --git a/src/service-override/languageDetectionWorker.ts b/src/service-override/languageDetectionWorker.ts index 3d26c240..6cbeaf6a 100644 --- a/src/service-override/languageDetectionWorker.ts +++ b/src/service-override/languageDetectionWorker.ts @@ -3,6 +3,7 @@ import { SyncDescriptor } from 'vs/platform/instantiation/common/descriptors' import { LanguageDetectionService } from 'vs/workbench/services/languageDetection/browser/languageDetectionWorkerServiceImpl' import { ILanguageDetectionService } from 'vs/workbench/services/languageDetection/common/languageDetectionWorkerService' import { registerAssets } from '../assets' +import 'vs/workbench/contrib/languageDetection/browser/languageDetection.contribution' registerAssets({ 'vs/../../node_modules/@vscode/vscode-languagedetection/model/model.json': new URL('@vscode/vscode-languagedetection/model/model.json', import.meta.url).href, diff --git a/src/service-override/layout.ts b/src/service-override/layout.ts index 14cba3ad..f32c3dcc 100644 --- a/src/service-override/layout.ts +++ b/src/service-override/layout.ts @@ -1,5 +1,5 @@ import { IEditorOverrideServices, StandaloneServices } from 'vs/editor/standalone/browser/standaloneServices' -import { ActivityBarPosition, IWorkbenchLayoutService, LayoutSettings, PanelAlignment, Parts, Position } from 'vs/workbench/services/layout/browser/layoutService' +import { ActivityBarPosition, IWorkbenchLayoutService, LayoutSettings, PanelAlignment, Parts, Position, positionFromString, positionToString } from 'vs/workbench/services/layout/browser/layoutService' import { ILayoutOffsetInfo, ILayoutService } from 'vs/platform/layout/browser/layoutService' import { Emitter, Event } from 'vs/base/common/event' import * as dom from 'vs/base/browser/dom' @@ -20,6 +20,7 @@ import { IAuxiliaryWindowService } from 'vs/workbench/services/auxiliaryWindow/b import { StandaloneCodeEditor } from 'vs/editor/standalone/browser/standaloneCodeEditor' import { IHostService } from 'vs/workbench/services/host/browser/host' import { ICodeEditorService } from 'vs/editor/browser/services/codeEditorService' +import { getMenuBarVisibility, getTitleBarStyle } from 'vs/platform/window/common/window' import { onRenderWorkbench } from '../lifecycle' import { getWorkbenchContainer } from '../workbench' @@ -35,6 +36,8 @@ export class LayoutService extends Disposable implements ILayoutService, IWorkbe private hostService!: IHostService private activeContainerId: number | undefined + private sideBarPosition!: Position + private panelPosition!: Position constructor ( public mainContainer: HTMLElement = getWorkbenchContainer() @@ -103,7 +106,10 @@ export class LayoutService extends Disposable implements ILayoutService, IWorkbe onDidChangeZenMode = Event.None onDidChangeWindowMaximized = Event.None onDidChangeCenteredLayout = Event.None - onDidChangePanelPosition = Event.None + private readonly _onDidChangePanelPosition = this._register(new Emitter()) + readonly onDidChangePanelPosition = this._onDidChangePanelPosition.event + private readonly _onDidChangeSideBarPosition = this._register(new Emitter()) + readonly onDidChangeSideBarPosition = this._onDidChangeSideBarPosition.event onDidChangePanelAlignment = Event.None onDidChangeNotificationsVisibility = Event.None openedDefaultEditors = false @@ -124,11 +130,21 @@ export class LayoutService extends Disposable implements ILayoutService, IWorkbe } if (e.affectsConfiguration('workbench.statusBar.visible')) { - this.setPartHidden(this.configurationService.getValue('workbench.statusBar.visible'), Parts.STATUSBAR_PART) + this.setPartHidden(!this.configurationService.getValue('workbench.statusBar.visible'), Parts.STATUSBAR_PART) + } + + if (e.affectsConfiguration('workbench.sideBar.location')) { + this.setSideBarPosition(positionFromString(this.configurationService.getValue('workbench.sideBar.location') ?? 'left')) + } + + if (e.affectsConfiguration('workbench.panel.defaultLocation')) { + this.setPanelPosition(positionFromString(this.configurationService.getValue('workbench.panel.defaultLocation') ?? 'bottom')) } })) this.setPartHidden(this.isActivityBarHidden(), Parts.ACTIVITYBAR_PART) this.setPartHidden(!this.configurationService.getValue('workbench.statusBar.visible'), Parts.STATUSBAR_PART) + this.sideBarPosition = positionFromString(this.configurationService.getValue('workbench.sideBar.location') ?? 'left') + this.panelPosition = positionFromString(this.configurationService.getValue('workbench.panel.defaultLocation') ?? 'bottom') // Window active / focus changes this._register(this.hostService.onDidChangeActiveWindow(() => this.onActiveWindowChanged())) @@ -210,23 +226,30 @@ export class LayoutService extends Disposable implements ILayoutService, IWorkbe toggleMaximizedPanel (): void { } - hasWindowBorder (): boolean { - return false - } + toggleMenuBar (): void { + let currentVisibilityValue = getMenuBarVisibility(this.configurationService) + if (typeof currentVisibilityValue !== 'string') { + currentVisibilityValue = 'classic' + } - getWindowBorderWidth (): number { - return 0 - } + let newVisibilityValue: string + if (currentVisibilityValue === 'visible' || currentVisibilityValue === 'classic') { + newVisibilityValue = getTitleBarStyle(this.configurationService) === 'native' ? 'toggle' : 'compact' + } else { + newVisibilityValue = 'classic' + } - getWindowBorderRadius (): string | undefined { - return undefined + void this.configurationService.updateValue('window.menuBarVisibility', newVisibilityValue) } - toggleMenuBar (): void { - } + setPanelPosition (position: Position): void { + this.panelPosition = position + + const panelPart = this.getPart(Parts.PANEL_PART) + + panelPart?.updateStyles() - setPanelPosition (): void { - // not supported + this._onDidChangePanelPosition.fire(positionToString(position)) } getPanelAlignment (): PanelAlignment { @@ -269,7 +292,7 @@ export class LayoutService extends Disposable implements ILayoutService, IWorkbe } getPanelPosition (): Position { - return Position.BOTTOM + return this.panelPosition } private readonly parts = new Map() @@ -362,7 +385,22 @@ export class LayoutService extends Disposable implements ILayoutService, IWorkbe } getSideBarPosition (): Position { - return Position.LEFT + return this.sideBarPosition + } + + setSideBarPosition (position: Position): void { + this.sideBarPosition = position + + const activityBar = this.getPart(Parts.ACTIVITYBAR_PART) + const sideBar = this.getPart(Parts.SIDEBAR_PART) + const auxiliaryBar = this.getPart(Parts.AUXILIARYBAR_PART) + + // Update Styles + activityBar?.updateStyles() + sideBar?.updateStyles() + auxiliaryBar?.updateStyles() + + this._onDidChangeSideBarPosition.fire(positionToString(position)) } registerPart (part: Part): void { @@ -418,7 +456,7 @@ export class LayoutService extends Disposable implements ILayoutService, IWorkbe } } else { // auxiliary window - this.editorGroupService.getPart(activeContainer)?.activeGroup.focus() + this.editorGroupService.getPart(activeContainer).activeGroup.focus() } } } diff --git a/src/service-override/notebook.ts b/src/service-override/notebook.ts new file mode 100644 index 00000000..3a5ac41c --- /dev/null +++ b/src/service-override/notebook.ts @@ -0,0 +1,43 @@ +import { IEditorOverrideServices } from 'vs/editor/standalone/browser/standaloneServices' +import { SyncDescriptor } from 'vs/platform/instantiation/common/descriptors' +import { INotebookService } from 'vs/workbench/contrib/notebook/common/notebookService' +import { NotebookService } from 'vs/workbench/contrib/notebook/browser/services/notebookServiceImpl' +import { INotebookEditorModelResolverService } from 'vs/workbench/contrib/notebook/common/notebookEditorModelResolverService' +import { INotebookEditorWorkerService } from 'vs/workbench/contrib/notebook/common/services/notebookWorkerService' +import { NotebookEditorWorkerServiceImpl } from 'vs/workbench/contrib/notebook/browser/services/notebookWorkerServiceImpl' +import { INotebookCellStatusBarService } from 'vs/workbench/contrib/notebook/common/notebookCellStatusBarService' +import { NotebookCellStatusBarService } from 'vs/workbench/contrib/notebook/browser/services/notebookCellStatusBarServiceImpl' +import { INotebookEditorService } from 'vs/workbench/contrib/notebook/browser/services/notebookEditorService' +import { NotebookEditorWidgetService } from 'vs/workbench/contrib/notebook/browser/services/notebookEditorServiceImpl' +import { NotebookModelResolverServiceImpl } from 'vs/workbench/contrib/notebook/common/notebookEditorModelResolverServiceImpl' +import { INotebookKernelHistoryService, INotebookKernelService } from 'vs/workbench/contrib/notebook/common/notebookKernelService' +import { NotebookKernelService } from 'vs/workbench/contrib/notebook/browser/services/notebookKernelServiceImpl' +import { NotebookRendererMessagingService } from 'vs/workbench/contrib/notebook/browser/services/notebookRendererMessagingServiceImpl' +import { INotebookRendererMessagingService } from 'vs/workbench/contrib/notebook/common/notebookRendererMessagingService' +import { NotebookExecutionStateService } from 'vs/workbench/contrib/notebook/browser/services/notebookExecutionStateServiceImpl' +import { NotebookExecutionService } from 'vs/workbench/contrib/notebook/browser/services/notebookExecutionServiceImpl' +import { INotebookExecutionService } from 'vs/workbench/contrib/notebook/common/notebookExecutionService' +import { INotebookKeymapService } from 'vs/workbench/contrib/notebook/common/notebookKeymapService' +import { NotebookKeymapService } from 'vs/workbench/contrib/notebook/browser/services/notebookKeymapServiceImpl' +import { INotebookExecutionStateService } from 'vs/workbench/contrib/notebook/common/notebookExecutionStateService' +import { NotebookKernelHistoryService } from 'vs/workbench/contrib/notebook/browser/services/notebookKernelHistoryServiceImpl' +import { INotebookLoggingService } from 'vs/workbench/contrib/notebook/common/notebookLoggingService' +import { NotebookLoggingService } from 'vs/workbench/contrib/notebook/browser/services/notebookLoggingServiceImpl' +import 'vs/workbench/contrib/notebook/browser/notebook.contribution' + +export default function getServiceOverride (): IEditorOverrideServices { + return { + [INotebookService.toString()]: new SyncDescriptor(NotebookService, [], true), + [INotebookEditorWorkerService.toString()]: new SyncDescriptor(NotebookEditorWorkerServiceImpl, [], true), + [INotebookEditorModelResolverService.toString()]: new SyncDescriptor(NotebookModelResolverServiceImpl, [], true), + [INotebookCellStatusBarService.toString()]: new SyncDescriptor(NotebookCellStatusBarService, [], true), + [INotebookEditorService.toString()]: new SyncDescriptor(NotebookEditorWidgetService, [], true), + [INotebookKernelService.toString()]: new SyncDescriptor(NotebookKernelService, [], true), + [INotebookKernelHistoryService.toString()]: new SyncDescriptor(NotebookKernelHistoryService, [], true), + [INotebookExecutionService.toString()]: new SyncDescriptor(NotebookExecutionService, [], true), + [INotebookExecutionStateService.toString()]: new SyncDescriptor(NotebookExecutionStateService, [], true), + [INotebookRendererMessagingService.toString()]: new SyncDescriptor(NotebookRendererMessagingService, [], true), + [INotebookKeymapService.toString()]: new SyncDescriptor(NotebookKeymapService, [], true), + [INotebookLoggingService.toString()]: new SyncDescriptor(NotebookLoggingService, [], true) + } +} diff --git a/src/service-override/quickaccess.ts b/src/service-override/quickaccess.ts index b73121de..5f00054a 100644 --- a/src/service-override/quickaccess.ts +++ b/src/service-override/quickaccess.ts @@ -14,6 +14,7 @@ import 'vs/workbench/contrib/codeEditor/browser/quickaccess/gotoLineQuickAccess' import 'vs/workbench/contrib/codeEditor/browser/quickaccess/gotoSymbolQuickAccess' import 'vs/workbench/browser/actions/quickAccessActions' import 'vs/workbench/contrib/quickaccess/browser/quickAccess.contribution' +import 'vs/workbench/contrib/url/browser/url.contribution' // required for the workbench.commandPalette.preserveInput config key import 'vs/workbench/browser/workbench.contribution' import { ICodeEditor } from 'vs/editor/browser/editorBrowser' diff --git a/src/service-override/remoteAgent.ts b/src/service-override/remoteAgent.ts index a6e3455e..9296911f 100644 --- a/src/service-override/remoteAgent.ts +++ b/src/service-override/remoteAgent.ts @@ -11,9 +11,11 @@ import { IBrowserWorkbenchEnvironmentService } from 'vs/workbench/services/envir import { URI } from 'vs/base/common/uri' import { IFileService } from 'vs/platform/files/common/files' import { ILogService } from 'vs/platform/log/common/log' +import { IRemoteExplorerService, RemoteExplorerService } from 'vs/workbench/services/remote/common/remoteExplorerService' import getEnvironmentServiceOverride from './environment' import { registerServiceInitializePreParticipant } from '../lifecycle' import 'vs/workbench/contrib/remote/common/remote.contribution' +import 'vs/workbench/contrib/remote/browser/remote.contribution' class CustomRemoteSocketFactoryService extends RemoteSocketFactoryService { constructor (@IBrowserWorkbenchEnvironmentService browserWorkbenchEnvironmentService: IBrowserWorkbenchEnvironmentService) { @@ -29,8 +31,9 @@ registerServiceInitializePreParticipant(async (serviceAccessor) => { export default function getServiceOverride (connectionToken?: Promise | string, resourceUriProvider?: ((uri: URI) => URI)): IEditorOverrideServices { return { ...getEnvironmentServiceOverride(), - [IRemoteAgentService.toString()]: new SyncDescriptor(RemoteAgentService), - [IRemoteSocketFactoryService.toString()]: new SyncDescriptor(CustomRemoteSocketFactoryService), - [IRemoteAuthorityResolverService.toString()]: new SyncDescriptor(RemoteAuthorityResolverService, [true, connectionToken, resourceUriProvider]) + [IRemoteAgentService.toString()]: new SyncDescriptor(RemoteAgentService, [], true), + [IRemoteSocketFactoryService.toString()]: new SyncDescriptor(CustomRemoteSocketFactoryService, [], true), + [IRemoteAuthorityResolverService.toString()]: new SyncDescriptor(RemoteAuthorityResolverService, [true, connectionToken, resourceUriProvider]), + [IRemoteExplorerService.toString()]: new SyncDescriptor(RemoteExplorerService, [], true) } } diff --git a/src/service-override/terminal.ts b/src/service-override/terminal.ts index 5bbf13b1..6cc31df0 100644 --- a/src/service-override/terminal.ts +++ b/src/service-override/terminal.ts @@ -24,7 +24,8 @@ import { PerformanceMark } from 'vs/base/common/performance' import { DeferredPromise } from 'vs/base/common/async' import { unsupported } from '../tools' import 'vs/workbench/contrib/terminal/browser/terminal.contribution' -import 'vs/workbench/contrib/terminalContrib/accessibility/browser/terminal.accessibility.contribution' +import 'vs/workbench/contrib/terminal/terminal.all' +import 'vs/workbench/contrib/externalTerminal/browser/externalTerminal.contribution' abstract class SimpleTerminalBackend implements ITerminalBackend { getLatency = async (): Promise => [] diff --git a/src/service-override/theme.ts b/src/service-override/theme.ts index 113524b9..3af5a1f9 100644 --- a/src/service-override/theme.ts +++ b/src/service-override/theme.ts @@ -7,6 +7,7 @@ import type { StandaloneThemeService } from 'vs/editor/standalone/browser/standa import { ConfigurationTarget } from 'vs/platform/configuration/common/configuration' import { IDisposable } from 'vs/base/common/lifecycle' import getFileServiceOverride from './files' +import 'vs/workbench/contrib/themes/browser/themes.contribution' class StandaloneWorkbenchThemeService extends WorkbenchThemeService implements Pick { registerEditorContainer (): IDisposable { diff --git a/src/service-override/views.ts b/src/service-override/views.ts index ef03ef3a..42c6d4a2 100644 --- a/src/service-override/views.ts +++ b/src/service-override/views.ts @@ -37,7 +37,8 @@ import 'vs/workbench/contrib/customEditor/browser/customEditor.contribution' import 'vs/workbench/contrib/webviewPanel/browser/webviewPanel.contribution' import 'vs/workbench/contrib/externalUriOpener/common/externalUriOpener.contribution' import 'vs/workbench/contrib/languageStatus/browser/languageStatus.contribution' -import 'vs/workbench/contrib/languageDetection/browser/languageDetection.contribution' +import 'vs/workbench/contrib/mergeEditor/browser/mergeEditor.contribution' +import 'vs/workbench/contrib/webview/browser/webview.contribution' // import to 2 times with filter to not duplicate the import from files.ts import 'vs/workbench/contrib/files/browser/files.contribution.js?include=registerConfiguration' import 'vs/workbench/contrib/files/browser/files.contribution.js?exclude=registerConfiguration' @@ -107,6 +108,7 @@ import { IWorkingCopyBackupService } from 'vs/workbench/services/workingCopy/com import { PaneCompositePartService } from 'vs/workbench/browser/parts/paneCompositePartService' import { EditorParts } from 'vs/workbench/browser/parts/editor/editorParts' import { BrowserAuxiliaryWindowService, IAuxiliaryWindowService } from 'vs/workbench/services/auxiliaryWindow/browser/auxiliaryWindowService' +import { Event } from 'vs/base/common/event' import { MonacoDelegateEditorGroupsService, MonacoEditorService, OpenEditor } from './tools/editor' import getBulkEditServiceOverride from './bulkEdit' import getLayoutServiceOverride, { LayoutService } from './layout' @@ -130,14 +132,14 @@ function createPart (id: string, role: string, classes: string[]): HTMLElement { } function layoutPart (part: Part) { - const parent = part.getContainer()?.parentNode + const parent = part.getContainer()?.parentNode as HTMLElement | undefined if (parent == null) { return } part.layout( - Math.max(part.minimumWidth, Math.min(part.maximumWidth, (parent as HTMLElement).offsetWidth)), - Math.max(part.minimumHeight, Math.min(part.maximumHeight, (parent as HTMLElement).offsetHeight)), - 0, 0 + Math.max(part.minimumWidth, Math.min(part.maximumWidth, parent.offsetWidth)), + Math.max(part.minimumHeight, Math.min(part.maximumHeight, parent.offsetHeight)), + parent.offsetTop, parent.offsetLeft ) } @@ -194,6 +196,22 @@ function setPartVisibility (part: Exclude = (listener) => { + return StandaloneServices.get(IWorkbenchLayoutService).onDidChangePanelPosition(listener) +} + +function getPanelPosition (): Position { + return StandaloneServices.get(IWorkbenchLayoutService).getPanelPosition() +} + +const onDidChangeSideBarPosition: Event = (listener) => { + return (StandaloneServices.get(IWorkbenchLayoutService) as LayoutService).onDidChangeSideBarPosition(listener) +} + +function getSideBarPosition (): Position { + return StandaloneServices.get(IWorkbenchLayoutService).getSideBarPosition() +} + function renderActivitybarPar (container: HTMLElement): IDisposable { return attachPart(Parts.ACTIVITYBAR_PART, container) } @@ -770,14 +788,14 @@ onRenderWorkbench(async (accessor) => { document.body.append(invisibleContainer) // Create Parts - for (const { id, role, classes, options } of [ + for (const { id, role, classes, options, getPosition, onDidChangePosition } of [ { id: Parts.TITLEBAR_PART, role: 'none', classes: ['titlebar'] }, { id: Parts.BANNER_PART, role: 'banner', classes: ['banner'] }, - { id: Parts.ACTIVITYBAR_PART, role: 'none', classes: ['activitybar', 'left'] }, - { id: Parts.SIDEBAR_PART, role: 'none', classes: ['sidebar', 'left'] }, + { id: Parts.ACTIVITYBAR_PART, role: 'none', classes: ['activitybar'], getPosition: () => layoutService.getSideBarPosition(), onDidChangePosition: layoutService.onDidChangeSideBarPosition }, + { id: Parts.SIDEBAR_PART, role: 'none', classes: ['sidebar'], getPosition: () => layoutService.getSideBarPosition(), onDidChangePosition: layoutService.onDidChangeSideBarPosition }, { id: Parts.EDITOR_PART, role: 'main', classes: ['editor'], options: { restorePreviousState: initialLayoutState.editor.restoreEditors } }, - { id: Parts.PANEL_PART, role: 'none', classes: ['panel', 'basepanel', positionToString(Position.BOTTOM)] }, - { id: Parts.AUXILIARYBAR_PART, role: 'none', classes: ['auxiliarybar', 'basepanel', 'right'] }, + { id: Parts.PANEL_PART, role: 'none', classes: ['panel', 'basepanel'], getPosition: () => layoutService.getPanelPosition(), onDidChangePosition: layoutService.onDidChangePanelPosition }, + { id: Parts.AUXILIARYBAR_PART, role: 'none', classes: ['auxiliarybar', 'basepanel'], getPosition: () => layoutService.getSideBarPosition() === Position.LEFT ? Position.RIGHT : Position.LEFT, onDidChangePosition: layoutService.onDidChangeSideBarPosition }, { id: Parts.STATUSBAR_PART, role: 'status', classes: ['statusbar'] } ]) { const part = layoutService.getPart(id) @@ -791,6 +809,16 @@ onRenderWorkbench(async (accessor) => { // We need the container to be attached for some views to work (like xterm) invisibleContainer.append(partContainer) + + if (getPosition != null) { + let position = getPosition() + part.element.classList.add(positionToString(position)) + onDidChangePosition?.(() => { + part.element.classList.remove(positionToString(position)) + position = getPosition() + part.element.classList.add(positionToString(position)) + }) + } } } @@ -1081,6 +1109,11 @@ export { onPartVisibilityChange, isPartVisibile, setPartVisibility, + onDidChangePanelPosition, + getPanelPosition, + onDidChangeSideBarPosition, + getSideBarPosition, + Position, OpenEditor, IEditorOptions, diff --git a/src/service-override/welcome.ts b/src/service-override/welcome.ts new file mode 100644 index 00000000..5a7674c7 --- /dev/null +++ b/src/service-override/welcome.ts @@ -0,0 +1,28 @@ +import { IEditorOverrideServices } from 'vs/editor/standalone/browser/standaloneServices' +import { SyncDescriptor } from 'vs/platform/instantiation/common/descriptors' +import { IWalkthroughsService, WalkthroughsService } from 'vs/workbench/contrib/welcomeGettingStarted/browser/gettingStartedService' +import { FeaturedExtensionsService, IFeaturedExtensionsService } from 'vs/workbench/contrib/welcomeGettingStarted/browser/featuredExtensionService' +import 'vs/workbench/contrib/welcomeGettingStarted/browser/gettingStarted.contribution' +import 'vs/workbench/contrib/welcomeWalkthrough/browser/walkThrough.contribution' +import 'vs/workbench/contrib/welcomeViews/common/viewsWelcome.contribution' +import 'vs/workbench/contrib/welcomeViews/common/newFile.contribution' +// @ts-ignore +import svgAssets from 'vs/workbench/contrib/welcomeGettingStarted/common/media/*.svg' +// @ts-ignore +import pngAssets from 'vs/workbench/contrib/welcomeGettingStarted/common/media/*.png' +import { FileAccess } from 'vs/base/common/network' +import { registerAssets } from '../assets' + +registerAssets(svgAssets) +registerAssets(pngAssets) + +FileAccess.registerModuleContentProvider('vs/workbench/contrib/welcomeWalkthrough/browser/editor/vs_code_editor_walkthrough', () => import('vs/workbench/contrib/welcomeWalkthrough/browser/editor/vs_code_editor_walkthrough')) +FileAccess.registerModuleContentProvider('vs/workbench/contrib/welcomeGettingStarted/common/media/theme_picker', () => import('vs/workbench/contrib/welcomeGettingStarted/common/media/theme_picker')) +FileAccess.registerModuleContentProvider('vs/workbench/contrib/welcomeGettingStarted/common/media/notebookProfile', () => import('vs/workbench/contrib/welcomeGettingStarted/common/media/notebookProfile')) + +export default function getServiceOverride (): IEditorOverrideServices { + return { + [IWalkthroughsService.toString()]: new SyncDescriptor(WalkthroughsService, [], true), + [IFeaturedExtensionsService.toString()]: new SyncDescriptor(FeaturedExtensionsService, [], true) + } +} diff --git a/src/workers/notebook.worker.ts b/src/workers/notebook.worker.ts new file mode 100644 index 00000000..116ba141 --- /dev/null +++ b/src/workers/notebook.worker.ts @@ -0,0 +1,10 @@ +import { create } from 'vs/workbench/contrib/notebook/common/services/notebookSimpleWorker' +import { SimpleWorkerServer } from 'vs/base/common/worker/simpleWorker' + +const simpleWorker = new SimpleWorkerServer((msg) => { + globalThis.postMessage(msg) +}, create) + +globalThis.onmessage = (e: MessageEvent) => { + simpleWorker.onmessage(e.data) +}