Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

vscode: Support isTransient in TerminalOptions and ExtensionTerminalOptions #12055

Conversation

lucas-koehler
Copy link
Contributor

What it does

  • Extend TerminalOptions and ExtensionTerminalOptions with isTransient property according to the VSCode API
  • Add terminal preference enablePersistentSessions with default value true
  • Adhere to pref. enablePersistentSessions and option isTransient in the terminal widget

Fix #11777

Contributed on behalf of STMicroelectronics.

Signed-off-by: Lucas Koehler [email protected]

How to test

  1. Get example extension from here or package it from source
  2. Open command palette and execute Terminal API: Create Transient Terminal
  3. Open a second regular terminal
  4. Reload the page. After the reload, the transient terminal should be gone while the regular one is reloaded
  5. Open settings and search for Enable Persistent Sessions. Disable the setting
  6. Repeat steps 2 and 3
  7. Reload the page. After this reload, both terminals should be gone
  8. Reset the setting.

Review checklist

Reminder for reviewers

…ptions

* Extend `TerminalOptions` and `ExtensionTerminalOptions` with `isTransient` property
  according to the VSCode API
* Add terminal preference `enablePersistentSessions` with default value `true`
* Adhere to pref. `enablePersistentSessions` and option `isTransient` in the terminal widget

Fix eclipse-theia#11777

Contributed on behalf of STMicroelectronics.

Signed-off-by: Lucas Koehler <[email protected]>
Copy link
Member

@vince-fugnitto vince-fugnitto left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍 I confirmed that:

  • the example plugin works well when the preference is on/off
  • terminals are not persisted when created outside the VS Code API

@vince-fugnitto vince-fugnitto added terminal issues related to the terminal vscode issues related to VSCode compatibility labels Jan 10, 2023
@vince-fugnitto vince-fugnitto merged commit 73f32f7 into eclipse-theia:master Jan 11, 2023
@paul-marechal paul-marechal added this to the 1.34.0 milestone Jan 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
terminal issues related to the terminal vscode issues related to VSCode compatibility
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[vscode] Support optional property isTransient in TerminalOptions and ExtensionTerminalOptions
3 participants