From b1ac63c8057c7516ae8585a4fdd77f6c7ab3460b Mon Sep 17 00:00:00 2001 From: Andy Jordan Date: Wed, 17 Aug 2022 17:43:36 -0700 Subject: [PATCH] Improve language client library close action message The updated language client library now displays an error when the connection to the server terminates. Thing is, we already have our own restart experience where we inform the user that the terminal should be restarted, and give them a Yes/No option to do so. Unfortunately, we can't suppress this error message, and I don't think that we want to auto-restart the terminal, so I've at least made the message a little more clear. --- src/session.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/session.ts b/src/session.ts index 1976887082..a5a6a98164 100644 --- a/src/session.ts +++ b/src/session.ts @@ -621,7 +621,10 @@ Type 'help' to get help. }, closed: (): CloseHandlerResult => { // We have our own restart experience - return { action: CloseAction.DoNotRestart }; + return { + action: CloseAction.DoNotRestart, + message: "Connection to PowerShell Editor Services (the Extension Terminal) was closed. See below prompt to restart!" + }; }, }, revealOutputChannelOn: RevealOutputChannelOn.Never,