Skip to content

Commit 6fe8049

Browse files
authored
Fix lint
1 parent ebbcc6c commit 6fe8049

2 files changed

Lines changed: 8 additions & 8 deletions

File tree

go/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,8 @@ func main() {
8484
- `DeleteSession(sessionID string) error` - Delete a session permanently
8585
- `GetState() ConnectionState` - Get connection state
8686
- `Ping(message string) (*PingResponse, error)` - Ping the server
87-
- `GetForegroundSessionID() (*string, error)` - Get the session ID currently displayed in TUI (TUI+server mode only)
88-
- `SetForegroundSessionID(sessionID string) error` - Request TUI to display a specific session (TUI+server mode only)
87+
- `GetForegroundSessionID(ctx context.Context) (*string, error)` - Get the session ID currently displayed in TUI (TUI+server mode only)
88+
- `SetForegroundSessionID(ctx context.Context, sessionID string) error` - Request TUI to display a specific session (TUI+server mode only)
8989
- `On(handler SessionLifecycleHandler) func()` - Subscribe to all lifecycle events; returns unsubscribe function
9090
- `OnEventType(eventType SessionLifecycleEventType, handler SessionLifecycleHandler) func()` - Subscribe to specific lifecycle event type
9191

go/client.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ import (
6767
type 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

Comments
 (0)