File tree 1 file changed +5
-0
lines changed
1 file changed +5
-0
lines changed Original file line number Diff line number Diff line change @@ -43,6 +43,8 @@ public partial class PSConsoleReadLine : IPSConsoleReadLineMockableMethods
43
43
#pragma warning restore CS0649
44
44
45
45
private bool _delayedOneTimeInitCompleted ;
46
+ // This is used by AIShell to check if PSReadLine is initialized and ready to render.
47
+ private bool _readLineReady ;
46
48
47
49
private IPSConsoleReadLineMockableMethods _mockableMethods ;
48
50
private IConsole _console ;
@@ -400,6 +402,7 @@ public static string ReadLine(
400
402
_singleton . Initialize ( runspace , engineIntrinsics ) ;
401
403
}
402
404
405
+ _singleton . _readLineReady = true ;
403
406
_singleton . _cancelReadCancellationToken = cancellationToken ;
404
407
return _singleton . InputLoop ( ) ;
405
408
}
@@ -472,6 +475,8 @@ public static string ReadLine(
472
475
}
473
476
finally
474
477
{
478
+ _singleton . _readLineReady = false ;
479
+
475
480
try
476
481
{
477
482
// If we are closing, restoring the old console settings isn't needed,
You can’t perform that action at this time.
0 commit comments