File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -51,6 +51,9 @@ protected CopilotClientOptions(CopilotClientOptions? other)
5151 if ( other is null ) return ;
5252
5353 AutoStart = other . AutoStart ;
54+ #pragma warning disable CS0618 // Obsolete member
55+ AutoRestart = other . AutoRestart ;
56+ #pragma warning restore CS0618
5457 CliArgs = ( string [ ] ? ) other . CliArgs ? . Clone ( ) ;
5558 CliPath = other . CliPath ;
5659 CliUrl = other . CliUrl ;
@@ -98,6 +101,11 @@ protected CopilotClientOptions(CopilotClientOptions? other)
98101 /// </summary>
99102 public bool AutoStart { get ; set ; } = true ;
100103 /// <summary>
104+ /// Obsolete. This option has no effect.
105+ /// </summary>
106+ [ Obsolete ( "AutoRestart has no effect and will be removed in a future release." ) ]
107+ public bool AutoRestart { get ; set ; }
108+ /// <summary>
101109 /// Environment variables to pass to the CLI process.
102110 /// </summary>
103111 public IReadOnlyDictionary < string , string > ? Environment { get ; set ; }
Original file line number Diff line number Diff line change @@ -38,6 +38,8 @@ type ClientOptions struct {
3838 // AutoStart automatically starts the CLI server on first use (default: true).
3939 // Use Bool(false) to disable.
4040 AutoStart * bool
41+ // Deprecated: AutoRestart has no effect and will be removed in a future release.
42+ AutoRestart * bool
4143 // Env is the environment variables for the CLI process (default: inherits from current process).
4244 // Each entry is of the form "key=value".
4345 // If Env is nil, the new process uses the current process's environment.
Original file line number Diff line number Diff line change @@ -243,6 +243,7 @@ export class CopilotClient {
243243 cliUrl : options . cliUrl ,
244244 logLevel : options . logLevel || "debug" ,
245245 autoStart : options . autoStart ?? true ,
246+ autoRestart : false ,
246247
247248 env : options . env ?? process . env ,
248249 githubToken : options . githubToken ,
@@ -1640,5 +1641,4 @@ export class CopilotClient {
16401641 "resultType" in value
16411642 ) ;
16421643 }
1643-
16441644}
Original file line number Diff line number Diff line change @@ -71,6 +71,11 @@ export interface CopilotClientOptions {
7171 */
7272 autoStart ?: boolean ;
7373
74+ /**
75+ * @deprecated This option has no effect and will be removed in a future release.
76+ */
77+ autoRestart ?: boolean ;
78+
7479 /**
7580 * Environment variables to pass to the CLI process. If not set, inherits process.env.
7681 */
Original file line number Diff line number Diff line change @@ -1405,7 +1405,7 @@ async def _connect_via_stdio(self) -> None:
14051405
14061406 # Create JSON-RPC client with the process
14071407 self ._client = JsonRpcClient (self ._process )
1408- self ._client .on_close = lambda : setattr (self , ' _state' , ' disconnected' )
1408+ self ._client .on_close = lambda : setattr (self , " _state" , " disconnected" )
14091409 self ._rpc = ServerRpc (self ._client )
14101410
14111411 # Set up notification handler for session events
@@ -1493,7 +1493,7 @@ def wait(self, timeout=None):
14931493
14941494 self ._process = SocketWrapper (sock_file , sock ) # type: ignore
14951495 self ._client = JsonRpcClient (self ._process )
1496- self ._client .on_close = lambda : setattr (self , ' _state' , ' disconnected' )
1496+ self ._client .on_close = lambda : setattr (self , " _state" , " disconnected" )
14971497 self ._rpc = ServerRpc (self ._client )
14981498
14991499 # Set up notification handler for session events
You can’t perform that action at this time.
0 commit comments