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 TerminalExitReason #12293

Merged
merged 1 commit into from
Mar 16, 2023

Conversation

rschnekenbu
Copy link
Contributor

What it does

Adds support for terminal exit status reason and TerminalExitReason enum

Fixes #12023

Contributed on behalf of STMicroelectronics

How to test

This PR adds a reason why the terminal view was closed. This may come from a user action (close buttton), from the process itself that was exited, from an extension or from tool shutdown.
Here is an extension based on vscode example with additional information on terminal window close event

vscode-terminal-api-example-0.0.1.zip

  1. Testing close on user action
  • open Command Palette...
  • select Terminal API: Create Terminal
  • select Terminal API: Show Terminal and select one terminal
  • simply close terminal with 'X' button
  • notification shall indicate 3 as exit reason (User value)
  1. Testing close on process exit
  • open Command Palette...
  • select Terminal API: Create Terminal
  • select Terminal API: Show Terminal and select one terminal
  • type 'exit' in the terminal window
  • notification shall indicate 2 as exit reason (Process value)
  1. Testing close by extension
  • open Command Palette...
  • select Terminal API: Create Terminal
  • select Terminal API: Show Terminal and select one terminal
  • select Terminal API: Dispose and select one terminal
  • notification shall indicate 4 as exit reason (Extension value)

I could not find a way to reproduce and to check shutdown reason.

Review checklist

Reminder for reviewers

add TerminalExitStatus reason optional property
add TerminalExitReason

Contributed on behalf of STMicroelectronics
@vince-fugnitto vince-fugnitto added terminal issues related to the terminal vscode issues related to VSCode compatibility labels Mar 14, 2023
Copy link
Contributor

@tsmaeder tsmaeder left a comment

Choose a reason for hiding this comment

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

Looks good to me.

@tsmaeder tsmaeder merged commit 4694363 into eclipse-theia:master Mar 16, 2023
@vince-fugnitto vince-fugnitto added this to the 1.43.0 milestone Oct 26, 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 TerminalExitStatus reason property
3 participants