Skip to content

Commit 5fabead

Browse files
qmuntalCopilot
andauthored
Apply suggestions from code review
Co-authored-by: Copilot <[email protected]>
1 parent d86cc98 commit 5fabead

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

go/client.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ func NewClient(options *ClientOptions) *Client {
112112

113113
if options != nil {
114114
// Validate mutually exclusive options
115-
if options.CLIUrl != "" && ((options.UseStdio != nil && *options.UseStdio) || options.CLIPath != "") {
115+
if options.CLIUrl != "" && ((options.UseStdio != nil) || options.CLIPath != "") {
116116
panic("CLIUrl is mutually exclusive with UseStdio and CLIPath")
117117
}
118118

go/e2e/client_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ func TestClient(t *testing.T) {
5454
t.Run("should start and connect to server using tcp", func(t *testing.T) {
5555
client := copilot.NewClient(&copilot.ClientOptions{
5656
CLIPath: cliPath,
57-
UseStdio: copilot.Bool(true),
57+
UseStdio: copilot.Bool(false),
5858
})
5959
t.Cleanup(func() { client.ForceStop() })
6060

go/types.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@ type ClientOptions struct {
1818
Cwd string
1919
// Port for TCP transport (default: 0 = random port)
2020
Port int
21-
// UseStdio enables stdio transport instead of TCP (default: true)
21+
// UseStdio controls whether to use stdio transport instead of TCP.
22+
// Default: nil (use default = true, i.e. stdio). Use Bool(false) to explicitly select TCP.
2223
UseStdio *bool
2324
// CLIUrl is the URL of an existing Copilot CLI server to connect to over TCP
2425
// Format: "host:port", "http://host:port", or just "port" (defaults to localhost)

0 commit comments

Comments
 (0)