You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Fix stderr capture race condition by using synchronized list
- Remove unused StderrCapture class
- Improve ConnectionLostException error message with troubleshooting link
- Make process exit detection more reliable (50ms instead of 100ms)
- Fix platform-specific test to work on both Windows and Unix
- Remove placeholder version numbers from documentation
- Simplify connection error test assertions
Co-authored-by: patniko <26906478+patniko@users.noreply.github.com>
thrownewIOException($"Communication error with Copilot CLI: The JSON-RPC connection with the remote party was lost before the request could complete. {ex.Message}",ex);
601
+
thrownewIOException(
602
+
$"Communication error with Copilot CLI: The connection was lost. "+
603
+
$"This usually means the CLI process crashed or exited unexpectedly. "+
604
+
$"See the troubleshooting guide at https://github.com/github/copilot-sdk/blob/main/docs/troubleshooting-connection-errors.md for help. "+
[UnconditionalSuppressMessage("Trimming","IL2026",Justification="Using happy path from https://microsoft.github.io/vs-streamjsonrpc/docs/nativeAOT.html")]
@@ -1056,54 +1065,12 @@ private class Connection(
1056
1065
JsonRpcrpc,
1057
1066
Process?cliProcess,// Set if we created the child process
1058
1067
TcpClient?tcpClient,// Set if using TCP
1059
-
NetworkStream?networkStream,// Set if using TCP
1060
-
StderrCapture?stderrCapture=null)// Set if we capture stderr
1068
+
NetworkStream?networkStream)// Set if using TCP
1061
1069
{
1062
1070
publicProcess?CliProcess=>cliProcess;
1063
1071
publicTcpClient?TcpClient=>tcpClient;
1064
1072
publicJsonRpcRpc=>rpc;
1065
1073
publicNetworkStream?NetworkStream=>networkStream;
1066
-
publicStderrCapture?StderrCapture=>stderrCapture;
1067
-
}
1068
-
1069
-
/// <summary>
1070
-
/// Helper class to capture stderr output from the CLI process for better error diagnostics.
1071
-
/// </summary>
1072
-
privateclassStderrCapture
1073
-
{
1074
-
privatereadonlyList<string>_lines=new();
1075
-
privatereadonlyobject_lock=new();
1076
-
privateconstintMaxLines=100;// Keep last 100 lines
0 commit comments