@@ -67,7 +67,7 @@ import (
6767type Client struct {
6868 options ClientOptions
6969 process * exec.Cmd
70- client * JSONRPCClient
70+ client * jsonrpc2. Client
7171 actualPort int
7272 actualHost string
7373 state ConnectionState
@@ -914,10 +914,10 @@ func (c *Client) DeleteSession(ctx context.Context, sessionID string) error {
914914// if sessionID != nil {
915915// fmt.Printf("TUI is displaying session: %s\n", *sessionID)
916916// }
917- func (c * Client ) GetForegroundSessionID () (* string , error ) {
917+ func (c * Client ) GetForegroundSessionID (ctx context. Context ) (* string , error ) {
918918 if c .client == nil {
919919 if c .autoStart {
920- if err := c .Start (); err != nil {
920+ if err := c .Start (ctx ); err != nil {
921921 return nil , err
922922 }
923923 } else {
@@ -953,10 +953,10 @@ func (c *Client) GetForegroundSessionID() (*string, error) {
953953// if err := client.SetForegroundSessionID("session-123"); err != nil {
954954// log.Fatal(err)
955955// }
956- func (c * Client ) SetForegroundSessionID (sessionID string ) error {
956+ func (c * Client ) SetForegroundSessionID (ctx context. Context , sessionID string ) error {
957957 if c .client == nil {
958958 if c .autoStart {
959- if err := c .Start (); err != nil {
959+ if err := c .Start (ctx ); err != nil {
960960 return err
961961 }
962962 } else {
@@ -1264,7 +1264,7 @@ func (c *Client) verifyProtocolVersion(ctx context.Context) error {
12641264//
12651265// This spawns the CLI server as a subprocess using the configured transport
12661266// mode (stdio or TCP).
1267- func (c * Client ) startCLIServer () error {
1267+ func (c * Client ) startCLIServer (ctx context. Context ) error {
12681268 args := []string {"--headless" , "--log-level" , c .options .LogLevel }
12691269
12701270 // Choose transport mode
0 commit comments