This commit is contained in:
gregvanl 2023-06-07 22:09:23 -07:00
Родитель 8304b57030
Коммит 02d8de6376
3 изменённых файлов: 54 добавлений и 50 удалений

Просмотреть файл

@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:24d1b9c6522acf0c0a80990f006687277267a1314da8d3415a6eac9d861dec15
size 36611
oid sha256:7c7faca00b6ac0150241acf7bb59332994096c0bc549aa3fd749c0d32aebdff0
size 36615

Просмотреть файл

@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:c641d5e591a3cc5e3272afce2415868a8943e8f867694c8a959bad22a9febeb7
size 1025119
oid sha256:24211294234007a39bcfe5f2619f0fe4eef825aaf1c395c3aecf75526e84c2c1
size 1527972

Просмотреть файл

@ -16,10 +16,10 @@ Welcome to the May 2023 release of Visual Studio Code. There are many updates in
* **[Read-only mode](#readonly-mode)** - Mark specific files and folders in your workspace as read-only.
* **['Paste as' options](#paste-as)** - Choose how you'd like item links pasted into the editor.
* **[Automatic copy of external files](#copy-external-media-files-into-workspace-on-drop-or-paste-for-markdown)** - Drag or paste to Markdown adds new files to your workspace.
* **[Default GitHub branch name](#default-branch-name)** - Use "main" as the default or override via a user setting.
* **[Default Git repo branch name](#default-branch-name)** - Use "main" as the default or override via a user setting.
* **[Notebooks rich content search](#rich-content-search)** - Search based on Notebook output or filter on cell type.
* **[Linked editing for JSX tags](#linked-editing-for-jsx-tags)** - Simultaneously change opening and closing JSX tags.
* **[Preview: GitHub Copilot Chat improvements](#github-copilot)** - Easily manage your chat session history. Inline chat "live preview".
* **[Preview: GitHub Copilot Chat improvements](#github-copilot)** - Easily manage your chat session history. Inline chat "live preview."
* **[VS Code at Microsoft Build 2023](#vs-code-at-microsoft-build)** - Catch up on the sessions in the YouTube playlist.
>If you'd like to read these release notes online, go to [Updates](https://code.visualstudio.com/updates) on [code.visualstudio.com](https://code.visualstudio.com).
@ -68,7 +68,7 @@ According to the rules of the settings, if a path is considered to be read-only,
<video src="images/1_79/readonly-mode.mp4" autoplay loop controls muted title="Readonly mode set for a node_modules folder"></video>
For more ad-hoc toggling of the read-only mode, new commands have been added that allow to change the mode for the current session only, overruling what the settings configure:
For more ad-hoc toggling of the read-only mode, there are new commands to change the mode for the current session only, overruling your setting configurations:
* **Set Active Editor Readonly in Session** - Mark active editor read-only.
* **Set Active Editor Writeable in Session** - Mark active editor writeable.
@ -77,11 +77,11 @@ For more ad-hoc toggling of the read-only mode, new commands have been added tha
### Windows UNC host allowlist improvements
As part of an [important security fix](https://github.com/microsoft/vscode/security/advisories/GHSA-mmfh-4pv3-39hr), VS Code in the last milestone introduced an allowlist for UNC hosts. This milestone we addressed many of the usability problems that were reported by Windows users when they have UNC paths in their day to day work with VS Code.
As part of an [important security fix](https://github.com/microsoft/vscode/security/advisories/GHSA-mmfh-4pv3-39hr), VS Code introduced an allowlist for UNC hosts. This milestone we addressed many of the usability problems reported by Windows users when they have UNC paths in their day to day work with VS Code.
#### Dialog improvements
The dialog that asks for confirmation to allow a UNC host on startup now updates the `security.allowedUNCHosts` setting and adds the host when you select the checkbox.
The confirmation dialog to allow a UNC host on startup now updates the `security.allowedUNCHosts` setting and adds the host when you select the checkbox.
![Windows UNC allow dialog](images/1_79/unc-dialog.png)
@ -97,11 +97,11 @@ The `workbench.editor.tabSizing` setting has a new option `fixed` that makes eac
<video src="images/1_79/tab-size-fixed.mp4" autoplay loop controls muted title="Fixed tab size"></video>
In this mode, when you rapidly close tabs using the mouse, the widths of tabs remain stable to allow for closing each tab by clicking onto the same point. The width is then adjusted when you leave the mouse from the tab stripe area.
In this mode, when you rapidly close tabs using the mouse, the widths of tabs remain stable to allow for closing each tab by clicking onto the same point. The width is then adjusted when you leave the mouse from the editor tab area.
### Network quality indication
When you are connected to a remote, the best experience for VS Code remote editing capabilities requires a good network connection with low latency. In this milestone we updated the remote indicator in the Status bar to give you some feedback when either latency is very high or the network connection appears to be offline.
When you are connected to a remote machine, the best experience for VS Code remote editing capabilities requires a good network connection with low latency. In this milestone, we updated the remote indicator in the Status bar to give you some feedback when either latency is very high or the network connection appears to be offline.
#### High latency (web, desktop)
@ -119,19 +119,19 @@ If you are using a web browser to connect to a remote and you suddenly lose inte
The [Continue Working On](https://code.visualstudio.com/docs/sourcecontrol/github#_continue-working-on) feature allows you to store and retrieve working changes between VS Code development environments for the same repository, for example, when you upgrade from a local Git repository to a GitHub codespace, or when you switch between different machines for the same repository.
You can now transfer working changes between development environments for a GitHub repository even if it is configured with an HTTP remote in one environment and an SSH remote in another. Additionally, we have started to transfer additional workbench state, such as your source control view state preference, for a more seamless transition.
You can now transfer working changes between development environments for a GitHub repository even if it is configured with an HTTP remote in one environment and an SSH remote in another. Additionally, we have started to transfer additional workbench state, such as your Source Control view state preference, for a more seamless transition.
## Editor
### Paste as
When pasting a file into a text editor, there are multiple ways you might want to insert it. You may want an absolute path point to the file. You may want a path relative to the current workspace. Or you may even want something specific to the current editor's language, such as inserting a Markdown link to the file when pasting into Markdown. VS Code's new paste as functionality gives you control over how the pasted content is inserted.
When pasting a file into a text editor, there are multiple ways you might want to insert it. You may want an absolute path point to the file. You may want a path relative to the current workspace. Or you may even want something specific to the current editor's language, such as inserting a Markdown link to the file when pasting into Markdown. VS Code's new 'paste as' functionality gives you control over how the pasted content is inserted.
After pasting, VS Code now shows a small 'paste as' control if there are other ways the pasted content could have been inserted:
<video title="Using the paste as control to change how an image is inserted into a notebook Markdown cell" src="images/1_79/paste-as-widget.mp4" controls loop autoplay muted></video>
You can open the 'paste as' control by clicking on it or using the `kb(editor.changePasteType)` keyboard shortcut. The paste selector goes away as soon as you start typing or move the cursor outside of the inserted text. You can also fully disable the drop selector widget using `"editor.pasteAs.showPasteSelector": "never"`.
You can open the 'paste as' control by clicking on it or using the `kb(editor.changePasteType)` keyboard shortcut. The paste selector goes away as soon as you start typing or move the cursor outside of the inserted text. You can also fully disable the drop selector control using `"editor.pasteAs.showPasteSelector": "never"`.
When you paste content into a Markdown cell in a notebook, for example, the 'paste as' control lets you switch between:
@ -174,17 +174,19 @@ The overline escape sequences (`SGR 53`, `SGR 55`) specified in ECMA-48 are now
### Default branch name
Starting with this milestone, all new repositories created using VS Code use `main` as their default branch. If you prefer a different name for the default branch, you can change it with the `git.defaultBranchName` setting. When the setting is set to empty, VS Code defers to the default branch name configured in Git. Publishing a folder to GitHub also honors the default branch name configured on GitHub.
Starting with this milestone, all new Git repositories created using VS Code set `main` as their default branch. If you prefer a different name for the default branch, you can change it with the `git.defaultBranchName` setting. When the setting is set to empty, VS Code defers to the default branch name configured in Git. Publishing a folder to GitHub also honors the default branch name configured on GitHub.
### Branch picker integration with vscode.dev and GitHub
You can now checkout a branch in vscode.dev or open it on GitHub.com from the branch picker on VS Code desktop.
In the short video below, each branch listed in the branch picker dropdown has buttons on the right to either **Open on GitHub** or **Checkout on vscode.dev**.
<video src="images/1_79/git-branch-picker.mp4" autoplay loop controls muted title="Open a branch on GitHub.com from the branch picker"></video>
### Similarity threshold
[Git status](https://git-scm.com/docs/git-status#Documentation/git-status.txt---find-renamesltngt) uses a similarity index (amount of additions/deletions compared to the file's size) to determine whether an add/delete pair is considered a rename. You can now configure the similarity threshold with the `git.similarityThreshold` setting, which takes a value between `0` and `100`. The default value is `50`.
[Git status](https://git-scm.com/docs/git-status#Documentation/git-status.txt---find-renamesltngt) uses a similarity index (number of additions/deletions compared to the file's size) to determine whether an add/delete pair is considered a rename. You can now configure the similarity threshold with the `git.similarityThreshold` setting, which takes a value between `0` and `100`. The default value is `50`.
## Notebooks
@ -218,7 +220,7 @@ Notebooks now support Code Actions being run upon save. Code Actions can be spec
### TypeScript 5.1
VS Code now ships with TypeScript 5.1.3. This major update brings new TypeScript language features, improved performance, and many important improvements and bug fixes. You can read about TypeScript 5.1 on the [TypeScript blog](https://devblogs.microsoft.com/typescript/announcing-typescript-5-1).
VS Code now ships with TypeScript 5.1.3. This major update brings new TypeScript language features, better performance, and many important improvements and bug fixes. You can read about TypeScript 5.1 on the [TypeScript blog](https://devblogs.microsoft.com/typescript/announcing-typescript-5-1).
### Linked editing for JSX tags
@ -252,7 +254,7 @@ When writing JSDoc comments, VS Code now shows suggestions for all missing param
This can help you quickly fill in the documentation.
In JavaScript files, `@param` completions create placeholders for the parameter type its description:
In JavaScript files, `@param` completions create placeholders for the parameter type description:
<video title="@param completions in a JavaScript file" src="images/1_79/js-param-snippets.mp4" controls autoplay loop muted></video>
@ -288,7 +290,7 @@ You can even use simple regular expressions to transform variables in a [similar
}
```
When a new file is pasted into `/docs/api/readme.md`, the image will now be created under `/docs/api/images/r/image.png`.
When a new file is pasted into `/docs/api/readme.md`, the image is now created under `/docs/api/images/r/image.png`.
#### markdown.copyFiles.overwriteBehavior
@ -364,15 +366,15 @@ We have improved editor chat, most notably we have changed its default mode to b
#### Notebook improvements
We have improved the chat experience in notebook editors this month. When using Copilot in a notebook document, Copilot can use the notebook context to provide more relevant suggestions. For example, the code suggestions will use variables or modules defined in previous cells without recreating or re-importing them.
We have improved the chat experience in notebook editors this month. When using Copilot in a notebook document, Copilot can use the notebook context to provide more relevant suggestions. For example, the code suggestions use variables or modules defined in previous cells without recreating or re-importing them.
<video src="images/1_79/copilot-notebook-context.mp4" autoplay loop controls muted title="Copilot uses notebook as context"></video>
When running notebook cells, Copilot now also provides suggestions for cell execution failures. You can display these by clicking on the **Fix using Copilot** action on the cell status bar.
When running notebook cells, Copilot now also provides suggestions for cell execution failures. You can display these by selecting the **Fix using Copilot** action on the cell status bar.
<video src="images/1_79/copilot-notebook-fix.mp4" autoplay loop controls muted title="Copilot fix cell execution errors"></video>
The Copilot suggestion is also accepted automatically on cell execution, so you don't have to accept it manually.
The Copilot suggestions are also accepted automatically on cell execution, so you don't have to accept them manually.
#### GitHub Pull Request and Issues integration
@ -395,7 +397,7 @@ This iteration, we experimented with using chat to ask quick programming questio
Feature overview:
* Ask Copilot a quick question.
* Toggle the experience with `kb(chat.action.askQuickQuestion)` (state is remembered for 30s so you can easy show, hide, and show again).
* Toggle the experience with `kb(chat.action.askQuickQuestion)` (state is remembered for 30s so you can easily show, hide, and show again).
* An **Open in chat** button for continuing the conversation to a long form chat in the chat view.
#### Delete chat entry
@ -404,7 +406,7 @@ You can now delete a chat request/response pair by clicking the X icon in the ch
![A chat request with X icon](images/1_79/remove-chat.png)
Why would you want to do this? Sometimes, Copilot provides a response that is off track or just incorrect. You can ask your question again, but removing the bad response from your session's chat history may also help keep the conversation on track. There is also a limit to the amount of context that can be included with each chat request, so removing a long bad response might help save your context budget for more useful information.
Why would you want to do this? Sometimes, Copilot provides a response that is off topic or incorrect. You can ask your question again, but removing the bad response from your session's chat history may also help keep the conversation on track. There is also a limit to the amount of context that can be included with each chat request, so removing a long poor response might help save your context budget for more useful information.
#### Move chat session from sidebar to editor
@ -436,17 +438,17 @@ To learn more about GitHub Copilot as well as tips and tricks and best practices
#### Run Python file in dedicated terminal
The [Python](https://marketplace.visualstudio.com/items?itemName=ms-python.python) extension will now create a new terminal for each file you run using the run button on the top of the editor or the **Python: Run Python File in Terminal** command, and will keep using this file's "dedicated" terminal every time you re-run it.
The [Python](https://marketplace.visualstudio.com/items?itemName=ms-python.python) extension will now create a new terminal for each file you run using the **Run** button on the top of the editor or the **Python: Run Python File in Terminal** command, and will keep using this file's "dedicated" terminal every time you re-run it.
<video src="images/1_79/run-python-file-dedicated-terminal.mp4" autoplay loop controls muted title="Running a Python file creates a separate, dedicated terminal for that file."></video>
Any time you wish to run the same file in a separate terminal, you can run select **Python: Run Python File in Dedicated Terminal** under the run button menu.
Any time you wish to run the same file in a separate terminal, you can run select **Python: Run Python File in Dedicated Terminal** under the **Run** button menu.
![Options under the run button menu](images/1_79/run-python-file-dedicated-terminal-option.png)
#### Test discovery and run rewrite
This month, we are beginning the roll out of our testing rewrite as an experiment. This rewrite redesigns the architecture behind test discovery and execution for both unittest and pytest in the extension. While it does not provide any additional functionality exposed to the user, it reduces buggy behavior and opens up new functional opportunities moving forward. The rewrite will be rolled out behind the experiment `pythonTestAdapter`, which you can opt in and out of using `python.experiments.optInto` in your `settings.json`. Eventually, we plan to remove this setting and adopt this new architecture. If you have any comments or suggestions regarding this experiment or rewrite, you can share them in the [vscode-python](https://github.com/microsoft/vscode-python) repository.
This month, we are beginning the roll out of our testing rewrite as an experiment. This rewrite redesigns the architecture behind test discovery and execution for both unittest and pytest in the extension. While it does not provide any additional functionality exposed to the user, it reduces buggy behavior and opens up new functional opportunities moving forward. The rewrite is being rolled out behind the experiment `pythonTestAdapter`, which you can opt in and out of using `python.experiments.optInto` in your `settings.json`. Eventually, we plan to remove this setting and adopt this new architecture. If you have any comments or suggestions regarding this experiment or rewrite, you can share them in the [vscode-python](https://github.com/microsoft/vscode-python) repository.
#### Configurable indexing limits with Pylance
@ -458,9 +460,9 @@ There's a new [Pylance](https://marketplace.visualstudio.com/items?itemName=ms-p
The [Jupyter](https://marketplace.visualstudio.com/items?itemName=ms-toolsai.jupyter) extension now supports resuming execution of cells against [remote Jupyter kernels](https://code.visualstudio.com/docs/datascience/jupyter-kernel-management#_existing-jupyter-server), if the cell is still busy executing, even when reopening the Notebook after having shutdown VS Code.
For instance, assume you execute a long running section of code such as training of a model against a remote Jupyter kernel. This could take a few minutes or longer, so you might decide to shut down VS Code in the interim. A few minutes later VS Code is restarted and the same notebook opened, if the cell is still busy executing, this state is reflected in the Notebook cell and any new output would continue to get displayed in the cell output.
For instance, assume you execute a long running section of code such as training of a model against a remote Jupyter kernel. This could take a few minutes or longer, so you might decide to shut down VS Code in the interim. A few minutes later VS Code is restarted with the same notebook opened and if the cell is still busy executing, this state is reflected in the Notebook cell and any new output is displayed in the cell output.
If on the other hand, the cell completed execution while VS Code was shut down, the outputs generated in the interim would not be preserved in the notebook. Resuming executions in this manner and displaying of new outputs are limited to simple outputs such as plain text, HTML, images, images, and the like. Restoring the state of widgets and other such complex outputs is not supported.
If on the other hand, the cell completed execution while VS Code was shut down, the outputs generated in the interim would not be preserved in the notebook. Resuming executions in this manner and displaying new output is limited to simple output such as plain text, HTML, images, images, and the like. Restoring the state of widgets and other such complex outputs is not supported.
![Resuming notebook cell execution after closing and reopening VS Code](images/1_79/resumeNBCellExec.gif)
@ -479,6 +481,8 @@ Review the [changelog for the 0.66.0](https://github.com/microsoft/vscode-pull-r
[vscode.dev](https://insiders.vscode.dev) is a lightweight version of VS Code running fully in your browser. This iteration, we've significantly enriched vscode.dev's JavaScript and TypeScript support so that it can analyze all files in your workspace instead of being limited to currently opened files. This greatly improves navigation through code, letting you **Go to Definition** and **Find All References** to a symbol. It also improves IntelliSense by making sure settings from your `tsconfig.json` / `jsconfig.json` are respected. We even now support auto-imports while writing code.
In the image below, the **References** view is displaying all references to `ITextDocument` in the workspace.
![Find All References in a TypeScript project on vscode.dev](images/1_79/vscode-dev-project-wide.png)
These new IntelliSense features work for folders you open from your local machine and in GitHub repos you open using vscode.dev's built-in [GitHub Repositories](https://marketplace.visualstudio.com/items?itemName=GitHub.remotehub) extension.
@ -488,13 +492,13 @@ Keep in mind that there are still a few limitations with JS/TS IntelliSense on v
* There is not currently IntelliSense support for third party libraries.
* There is not currently support for [automatic type acquisition](https://code.visualstudio.com/docs/nodejs/working-with-javascript#_typings-and-automatic-type-acquisition) for JavaScript projects.
* Because of the above limitations, all typing errors are disabled on vscode.dev.
* Project wide IntelliSense is currently only enabled on the insiders version of vscode.dev: `insiders.vscode.dev`. This feature is currently disabled on `github.dev`.
* Project wide IntelliSense is currently only enabled on the Insiders version of vscode.dev: `insiders.vscode.dev`. This feature is currently disabled on `github.dev`.
We plan on addressing these limitations going forward, and are excited to continue enriching our JavaScript and TypeScript support on the web!
### Images in the terminal
Experimental support for images in the terminal has been added. Images in a terminal typically work by encoding the image pixel data as text, which is written to the terminal via a special escape sequence. The current protocols that are supported are [sixel](https://en.wikipedia.org/wiki/Sixel) and the [inline images protocol pioneered by iTerm](https://iterm2.com/documentation-images.html).
There is now experimental support for images in the terminal. Images in a terminal typically work by encoding the image pixel data as text, which is written to the terminal via a special escape sequence. The current protocols that are supported are [sixel](https://en.wikipedia.org/wiki/Sixel) and the [inline images protocol pioneered by iTerm](https://iterm2.com/documentation-images.html).
Enable this feature by setting:
@ -502,7 +506,7 @@ Enable this feature by setting:
"terminal.integrated.experimentalImageSupport": true
```
Once done, to test it you can download and `cat` a `.six` example file from [the libsixel repository](https://github.com/saitoha/libsixel/tree/master/images):
Once enabled, to test it, you can download and `cat` a `.six` example file from [the libsixel repository](https://github.com/saitoha/libsixel/tree/master/images):
![Running cat with a sixel file will print an image](images/1_79/terminal-image-six.png)
@ -512,9 +516,9 @@ Or use the [imgcat python package](https://pypi.org/project/imgcat/) or [imgcat
The current limitations of this feature are:
* Serialization does not work, so reloading a terminal will not retain any images (tracked in [jerch/xterm-addon-image#47](https://github.com/jerch/xterm-addon-image/issues/47))
* Copying the selection as HTML does not include the selected image (tracked in [jerch/xterm-addon-image#50](https://github.com/jerch/xterm-addon-image/issues/50))
* Animated gifs don't work (tracked in [jerch/xterm-addon-image#51](https://github.com/jerch/xterm-addon-image/issues/51))
* Serialization does not work, so reloading a terminal will not retain any images (tracked in [jerch/xterm-addon-image#47](https://github.com/jerch/xterm-addon-image/issues/47)).
* Copying the selection as HTML does not include the selected image (tracked in [jerch/xterm-addon-image#50](https://github.com/jerch/xterm-addon-image/issues/50)).
* Animated gifs don't work (tracked in [jerch/xterm-addon-image#51](https://github.com/jerch/xterm-addon-image/issues/51)).
* Images that are shorter than a cell will not work properly, this is a [design flaw with the sequences and also occurs in XTerm](https://github.com/microsoft/vscode/issues/183840#issuecomment-1569345048).
### TypeScript 5.2 support
@ -566,7 +570,7 @@ You cannot publish an extension that uses a proposed API. There may be breaking
### EnvironmentVariableCollection.description
This proposal allows specifying a description for `EnvironmentVariableCollection` that will surface to the user in the terminal tab hover, explaining what the change is doing exactly.
This proposal allows specifying a description for `EnvironmentVariableCollection`, displayed to the user in the terminal tab hover, explaining what exactly the change is doing.
```ts
// Example of what the Git extension could use
@ -577,7 +581,7 @@ context.environmentVariableCollection.description = 'Enables a Git authenticatio
### EnvironmentVariableMutator.options
This proposal adds options that can be provided to `EnvironmentVariableMutator`s, allowing to specify when exactly the environment variable change is applied, either on process creation or in the shell integration script (after shell init scripts have run).
This proposal adds options that can be provided to `EnvironmentVariableMutator`s, allowing you to specify exactly when the environment variable change is applied, either on process creation or in the shell integration script (after shell init scripts have run).
```ts
const collection = context.environmentVariableCollection;
@ -597,11 +601,11 @@ Share provider results are currently surfaced as a top-level **Share...** Comman
<video src="images/1_79/share-provider.mp4" autoplay loop controls muted title="Share... icon next to the Command Center"></video>
Please leave feedback on the [API proposal issue #176316](https://github.com/microsoft/vscode/issues/176316).
You can leave feedback in the [API proposal issue #176316](https://github.com/microsoft/vscode/issues/176316).
### Static Status bar items
Status bar items can now be contributed statically via `package.json#contributes/statusBarItems`. With this contribution point, an extension can delay their activation further and only activate when the Status bar item is interacted with, for example on the command. Once activated, extensions can pick up their static Status bar items via the `vscode.window.createStatusBarItem` API.
Status bar items can now be contributed statically via `package.json#contributes/statusBarItems`. With this contribution point, an extension can delay its activation and only activate when the Status bar item is interacted with, for example, on the command. Once activated, extensions can access their static Status bar items via the `vscode.window.createStatusBarItem` API.
### workspace.save and workspace.saveAs
@ -611,19 +615,19 @@ All the methods for saving will return the resulting `Uri` or `undefined` if the
### Authentication authGetSessions proposed API
As we move closer to having [Multiple GitHub account support](https://github.com/microsoft/vscode/issues/127967), we have a new proposed API for authentication that provides the ability to get all sessions that your extension has access to for a specific set of scopes. [The proposal for these API additions](https://github.com/microsoft/vscode/blob/main/src/vscode-dts/vscode.proposed.authGetSessions.d.ts) has several things to call out:
As we move closer to having [Multiple GitHub account support](https://github.com/microsoft/vscode/issues/127967), we have a new proposed authentication API that lets your extension get all accessible sessions for a specific set of scopes. [The proposal for these API additions](https://github.com/microsoft/vscode/blob/main/src/vscode-dts/vscode.proposed.authGetSessions.d.ts) has several things to call out:
* The introduction of `vscode.authentication.getSessions` that would allow to get sessions for each account that your extension has access to (if you want to request an additional account, use `{ createIfNone: true, clearSessionPreference: true }` to ask the user to choose an account).
* The `forceNewSession` property now can take in a `{ sessionToRecreate: session }` object that would allow consuming extensions to specify the exact session you want to be recreated
* The `createSession` function that an Auth Provider implements will now get passed in that session to recreate (using the extension's session preference if `true` is used for the value of `forceNewSession`)
* The introduction of `vscode.authentication.getSessions` to get sessions for each account that your extension has access to. If you want to request an additional account, use `{ createIfNone: true, clearSessionPreference: true }` to ask the user to choose an account.
* The `forceNewSession` property now can take in a `{ sessionToRecreate: session }` object so that consuming extensions can specify the exact session they want to be recreated.
* The `createSession` function that an Auth Provider implements will now get passed in the session to recreate (using the extension's session preference if `true` is used for the value of `forceNewSession`).
There is still more work involved to make this ready for adoption in the GitHub Authentication extension so if you're interested, please follow along and feel free to [provide feedback in the issue that tracks this proposal](https://github.com/microsoft/vscode/issues/152399).
There is still more work involved to make this ready for adoption in the GitHub Authentication extension so if you're interested, you can follow along and [provide feedback in the issue that tracks this proposal](https://github.com/microsoft/vscode/issues/152399).
### Window Activity API
A new API is available for extensions to be notified if the window becomes active or inactive. This may be used to dispose of or create persistent resources or processes that can be idled to save resources.
A new API is available to notify extensions if the window becomes active or inactive. This can be used to dispose of or create persistent resources or processes that can be idled to save resources.
This is implemented by the addition of a simple `active` boolean to the existing `WindowState` type.
This is implemented by the addition of a new `active` boolean to the existing `WindowState` type.
```js
vscode.window.onDidChangeWindowState(state => {
@ -640,17 +644,17 @@ vscode.window.onDidChangeWindowState(state => {
### Electron sandbox enabled for all users
We are happy to announce that the Electron sandbox is rolling out to all of our users. This was a journey that started in early 2020 and now finally comes to an end. Please refer to the [Migrating VS Code to Process Sandboxing](https://code.visualstudio.com/blogs/2022/11/28/vscode-sandbox) blog post for more details.
We are happy to announce that the Electron sandbox is rolling out to all of our users. This was a journey that started in early 2020 and now finally comes to an end. You can refer to the [Migrating VS Code to Process Sandboxing](https://code.visualstudio.com/blogs/2022/11/28/vscode-sandbox) blog post for more details.
### Extension host restart participation
Certain actions in the workbench can lead to the extension host restarting without reloading the window you are in. For example, when you switch profiles, we restart the extension host to account for running a different set of extensions for that profile.
Certain actions in the workbench can lead to the extension host restarting without reloading the current window. For example, when you switch profiles, VS Code restarts the extension host to handle running a different set of extensions for that profile.
Some custom and notebook editors however may not be functional anymore after having switched profiles because a required extension is not installed in that profile. If the editor has unsaved changes, it was hard to avoid data loss here. As a fix, components in VS Code can now participate in extension host restarts and make sure any unsaved changes are saved before the extension host restarts.
Some custom and notebook editors however may no longer be functional after having switched profiles because a required extension is not installed in that profile. If the editor has unsaved changes, this could cause data loss. As a fix, components in VS Code can now participate in extension host restarts and make sure any unsaved changes are saved before the extension host restarts.
<video src="images/1_79/profile-switch.mp4" autoplay loop controls muted title="Switch profile with hex editor dirty"></video>
We plan to further tweak this experience in the next milestone so stay tuned for more!
We plan to further develop this experience in the next milestone so stay tuned for more!
### Milestone automation