Skip to content

Commit 62502ff

Browse files
committed
Rename "Integrated Console" to "Extension Terminal"
Except the startup banner as its the default, and may not be for the VS Code extension but for any client that connects to PSES and supports a terminal. And bump problematic test timeouts up.
1 parent c047479 commit 62502ff

File tree

11 files changed

+28
-28
lines changed

11 files changed

+28
-28
lines changed

README.md

+9-9
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ The functionality in PowerShell Editor Services is already available in the foll
2525
- Real-time semantic analysis of scripts using PowerShell Script Analyzer
2626
- The Debugging Service simplifies interaction with the PowerShell debugger (breakpoints, variables, call stack, etc.)
2727
- The [$psEditor API](http://powershell.github.io/PowerShellEditorServices/guide/extensions.html) enables scripting of the host editor
28-
- A full, terminal-based Integrated Console experience for interactive development and debugging
28+
- A full, Extension Terminal experience for interactive development and debugging
2929

3030
## Usage
3131

@@ -37,7 +37,7 @@ If you're looking for a more feature-rich experience,
3737
Named Pipes are the way to go.
3838
They give you all the benefits of the Language Server Protocol with extra capabilities that you can take advantage of:
3939

40-
- The PowerShell Integrated Console
40+
- The PowerShell Extension Terminal
4141
- Debugging using the [Debug Adapter Protocol](https://microsoft.github.io/debug-adapter-protocol/)
4242

4343
The typical command to start PowerShell Editor Services using named pipes is as follows:
@@ -59,20 +59,20 @@ and once you connect to when you launch the debugger for Debug Adapter Protocol
5959

6060
The Visual Studio Code, Vim, and IntelliJ extensions currently use Named Pipes.
6161

62-
#### PowerShell Integrated Console
62+
#### PowerShell Extension Terminal
6363

6464
![image](https://user-images.githubusercontent.com/2644648/66245084-6985da80-e6c0-11e9-9c7b-4c8476190df5.png)
6565

66-
The PowerShell Integrated Console uses the host process' Stdio streams for console input and output. Please note that this is mutually exclusive from using Stdio for the language server protocol messages.
66+
The PowerShell Extension Terminal uses the host process' Stdio streams for console input and output. Please note that this is mutually exclusive from using Stdio for the language server protocol messages.
6767

68-
If you want to take advantage of the PowerShell Integrated Console which automatically shares state with the editor-side,
68+
If you want to take advantage of the PowerShell Extension Terminal which automatically shares state with the editor-side,
6969
you must include the `-EnableConsoleRepl` switch when called `Start-EditorServices.ps1`.
7070

7171
This is typically used if your client can create arbitrary terminals in the editor like below:
7272

73-
![integrated console in vscode](https://user-images.githubusercontent.com/2644648/66245018-04ca8000-e6c0-11e9-808c-b86144149444.png)
73+
![Extension Terminal in vscode](https://user-images.githubusercontent.com/2644648/66245018-04ca8000-e6c0-11e9-808c-b86144149444.png)
7474

75-
The Visual Studio Code, Vim, and IntelliJ extensions currently use the PowerShell Integrated Console.
75+
The Visual Studio Code, Vim, and IntelliJ extensions currently use the PowerShell Extension Terminal.
7676

7777
#### Debugging
7878

@@ -87,9 +87,9 @@ Currently, only the Visual Studio Code extension supports debugging.
8787

8888
### Stdio
8989

90-
Stdio is a simpler and more universal mechanism for the Language Server Protocol. We recommend using it if your editor/client doesn't need to support the PowerShell Integrated Console or debugging.
90+
Stdio is a simpler and more universal mechanism for the Language Server Protocol. We recommend using it if your editor/client doesn't need to support the PowerShell Extension Terminal or debugging.
9191

92-
> NOTE: Debugging and the Integrated Console are not features of the Stdio channel because each feature requires its own IO streams and since the Stdio model only provides a single set of streams (Stdio),
92+
> NOTE: Debugging and the Extension Terminal are not features of the Stdio channel because each feature requires its own IO streams and since the Stdio model only provides a single set of streams (Stdio),
9393
> these features cannot be leveraged.
9494
9595
The typical command to start PowerShell Editor Services using stdio is as follows:

src/PowerShellEditorServices.Hosting/Commands/StartEditorServicesCommand.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ public StartEditorServicesCommand()
149149
public string[] FeatureFlags { get; set; }
150150

151151
/// <summary>
152-
/// When set, enables the integrated console.
152+
/// When set, enables the Extension Terminal.
153153
/// </summary>
154154
[Parameter]
155155
public SwitchParameter EnableConsoleRepl { get; set; }
@@ -186,7 +186,7 @@ public StartEditorServicesCommand()
186186
public SwitchParameter SplitInOutPipes { get; set; }
187187

188188
/// <summary>
189-
/// The banner/logo to display when the Integrated Console is first started.
189+
/// The banner/logo to display when the extension terminal is first started.
190190
/// </summary>
191191
[Parameter]
192192
public string StartupBanner { get; set; }

src/PowerShellEditorServices.Hosting/Configuration/EditorServicesConfig.cs

+4-4
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
namespace Microsoft.PowerShell.EditorServices.Hosting
99
{
1010
/// <summary>
11-
/// Describes the desired console REPL for the integrated console.
11+
/// Describes the desired console REPL for the Extension Terminal.
1212
/// </summary>
1313
public enum ConsoleReplKind
1414
{
@@ -84,8 +84,8 @@ public EditorServicesConfig(
8484
public IReadOnlyList<string> FeatureFlags { get; set; }
8585

8686
/// <summary>
87-
/// The console REPL experience to use in the integrated console
88-
/// (including none to disable the integrated console).
87+
/// The console REPL experience to use in the Extension Terminal
88+
/// (including none to disable the Extension Terminal).
8989
/// </summary>
9090
public ConsoleReplKind ConsoleRepl { get; set; } = ConsoleReplKind.None;
9191

@@ -117,7 +117,7 @@ public EditorServicesConfig(
117117

118118
public string StartupBanner { get; set; } = @"
119119
120-
=====> PowerShell Integrated Console <=====
120+
=====> PowerShell Editor Services <=====
121121
122122
";
123123
}

src/PowerShellEditorServices.Hosting/Internal/EditorServicesRunner.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ private async Task CreateEditorServicesAndRunUntilShutdown()
148148
// - Possibly start the debug server
149149
// - Wait for the LSP server to finish
150150

151-
// Unsubscribe the host logger here so that the integrated console is not polluted with input after the first prompt
151+
// Unsubscribe the host logger here so that the Extension Terminal is not polluted with input after the first prompt
152152
_logger.Log(PsesLogLevel.Verbose, "Starting server, deregistering host logger and registering shutdown listener");
153153
if (_loggersToUnsubscribe != null)
154154
{

src/PowerShellEditorServices/Hosting/EditorServicesServerFactory.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ public PsesDebugServer CreateDebugServerForTempSession(
163163
// This gets the ExtensionService which triggers the creation of the `$psEditor` variable.
164164
// (because services are created only when they are first retrieved)
165165
// Keep in mind, for Temp sessions, the `$psEditor` API is a no-op and the user is warned
166-
// to run the command in the main PS Integrated Console.
166+
// to run the command in the main extension terminal.
167167
serviceProvider.GetService<ExtensionService>();
168168

169169
return new PsesDebugServer(

src/PowerShellEditorServices/Hosting/HostStartupInfo.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ public sealed class HostStartupInfo
7171
public IReadOnlyList<string> AdditionalModules { get; }
7272

7373
/// <summary>
74-
/// True if the integrated console is to be enabled.
74+
/// True if the Extension Terminal is to be enabled.
7575
/// </summary>
7676
public bool ConsoleReplEnabled { get; }
7777

src/PowerShellEditorServices/Services/DebugAdapter/Handlers/LaunchAndAttachHandler.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ internal record PsesLaunchRequestArguments : LaunchRequestArguments
5050

5151
/// <summary>
5252
/// Gets or sets a boolean value that determines whether to create a temporary
53-
/// integrated console for the debug session. Default is false.
53+
/// Extension Terminal for the debug session. Default is false.
5454
/// </summary>
5555
public bool CreateTemporaryIntegratedConsole { get; set; }
5656

@@ -190,7 +190,7 @@ public async Task<LaunchResponse> Handle(PsesLaunchRequestArguments request, Can
190190
&& !string.IsNullOrEmpty(request.Script)
191191
&& ScriptFile.IsUntitledPath(request.Script))
192192
{
193-
throw new RpcErrorException(0, "Running an Untitled file in a temporary integrated console is currently not supported.");
193+
throw new RpcErrorException(0, "Running an Untitled file in a temporary Extension Terminal is currently not supported.");
194194
}
195195

196196
// If the current session is remote, map the script path to the remote

src/PowerShellEditorServices/Services/PowerShell/Host/PsesInternalHost.cs

+4-4
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,14 @@ namespace Microsoft.PowerShell.EditorServices.Services.PowerShell.Host
2424
{
2525
using System.Management.Automation;
2626
using System.Management.Automation.Runspaces;
27-
// NOTE: These last three are for a workaround for temporary integrated consoles.
27+
// NOTE: These last three are for a workaround for temporary Extension Terminals.
2828
using Microsoft.PowerShell.EditorServices.Handlers;
2929
using Microsoft.PowerShell.EditorServices.Server;
3030
using OmniSharp.Extensions.DebugAdapter.Protocol.Server;
3131

3232
internal class PsesInternalHost : PSHost, IHostSupportsInteractiveSession, IRunspaceContext, IInternalPowerShellExecutionService
3333
{
34-
private const string DefaultPrompt = "PSIC> ";
34+
private const string DefaultPrompt = "> ";
3535
// This is a default that can be overriden at runtime by the user or tests.
3636
private static string s_bundledModulePath = Path.GetFullPath(Path.Combine(
3737
Path.GetDirectoryName(typeof(PsesInternalHost).Assembly.Location), "..", "..", ".."));
@@ -1119,12 +1119,12 @@ private ConsoleKeyInfo ReadKey(bool intercept)
11191119
using CancellationTokenRegistration registration = _readKeyCancellationToken.Register(
11201120
() =>
11211121
{
1122-
// For the regular integrated console, we have an associated language server on
1122+
// For the regular Extension Terminal, we have an associated language server on
11231123
// which we can send a notification, and have the client subscribe an action to
11241124
// send a key press.
11251125
_languageServer?.SendNotification("powerShell/sendKeyPress");
11261126

1127-
// When temporary integrated consoles are spawned, there will be no associated
1127+
// When temporary Extension Terminals are spawned, there will be no associated
11281128
// language server, but instead a debug adaptor server. In this case, the
11291129
// notification sent here will come across as a DebugSessionCustomEvent to which
11301130
// we can subscribe in the same way.

test/PowerShellEditorServices.Test.E2E/DebugAdapterProtocolMessageTests.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ private string GenerateScriptFromLoggingStatements(params string[] logStatements
162162

163163
private static async Task<string[]> GetLog()
164164
{
165-
for (int i = 0; !File.Exists(s_testOutputPath) && i < 10; i++)
165+
for (int i = 0; !File.Exists(s_testOutputPath) && i < 60; i++)
166166
{
167167
await Task.Delay(1000).ConfigureAwait(true);
168168
}

test/PowerShellEditorServices.Test/Debugging/DebugServiceTests.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ private Task ExecutePowerShellCommand(string command, params string[] args)
103103

104104
private void AssertDebuggerPaused()
105105
{
106-
using CancellationTokenSource cts = new(10000);
106+
using CancellationTokenSource cts = new(60000);
107107
DebuggerStoppedEventArgs eventArgs = debuggerStoppedQueue.Take(cts.Token);
108108
Assert.Empty(eventArgs.OriginalEvent.Breakpoints);
109109
}
@@ -113,7 +113,7 @@ private void AssertDebuggerStopped(
113113
int lineNumber = -1,
114114
CommandBreakpointDetails commandBreakpointDetails = default)
115115
{
116-
using CancellationTokenSource cts = new(10000);
116+
using CancellationTokenSource cts = new(60000);
117117
DebuggerStoppedEventArgs eventArgs = debuggerStoppedQueue.Take(cts.Token);
118118

119119
Assert.True(psesHost.DebugContext.IsStopped);

test/emacs-test.el

+1-1
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@
6060
(should (string= (oref lsp project-nickname) "PowerShellEditorServices"))
6161
(should (eq (oref lsp major-mode) 'powershell-mode))
6262
(should (string= (oref lsp language-id) "powershell")))
63-
(sleep-for 3) ; TODO: Wait for "textDocument/publishDiagnostics" instead
63+
(sleep-for 5) ; TODO: Wait for "textDocument/publishDiagnostics" instead
6464
(flymake-start)
6565
(goto-char (point-min))
6666
(flymake-goto-next-error)

0 commit comments

Comments
 (0)