Skip to content

Commit c89912f

Browse files
Fix Go build
1 parent ba04345 commit c89912f

4 files changed

Lines changed: 9 additions & 14 deletions

File tree

go/process_other.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// go:build !windows
1+
//go:build !windows
22

33
package copilot
44

go/process_windows.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// go:build windows
1+
//go:build windows
22

33
package copilot
44

python/README.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,8 +98,6 @@ await client.stop()
9898
- `github_token` (str): GitHub token for authentication. When provided, takes priority over other auth methods.
9999
- `use_logged_in_user` (bool): Whether to use logged-in user for authentication (default: True, but False when `github_token` is provided). Cannot be used with `cli_url`.
100100

101-
> **Note:** On Windows, the SDK automatically hides the console window when spawning the CLI process to avoid distracting users in GUI applications.
102-
103101
**SessionConfig Options (for `create_session`):**
104102

105103
- `model` (str): Model to use ("gpt-5", "claude-sonnet-4.5", etc.). **Required when using custom provider.**

python/copilot/client.py

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1167,15 +1167,8 @@ async def _start_cli_server(self) -> None:
11671167
if self.options.get("github_token"):
11681168
env["COPILOT_SDK_AUTH_TOKEN"] = self.options["github_token"]
11691169

1170-
# Prepare subprocess kwargs
1171-
popen_kwargs = {
1172-
"cwd": self.options["cwd"],
1173-
"env": env,
1174-
}
1175-
11761170
# On Windows, hide the console window to avoid distracting users in GUI apps
1177-
if sys.platform == "win32":
1178-
popen_kwargs["creationflags"] = subprocess.CREATE_NO_WINDOW
1171+
creationflags = subprocess.CREATE_NO_WINDOW if sys.platform == "win32" else 0
11791172

11801173
# Choose transport mode
11811174
if self.options["use_stdio"]:
@@ -1187,7 +1180,9 @@ async def _start_cli_server(self) -> None:
11871180
stdout=subprocess.PIPE,
11881181
stderr=subprocess.PIPE,
11891182
bufsize=0,
1190-
**popen_kwargs,
1183+
cwd=self.options["cwd"],
1184+
env=env,
1185+
creationflags=creationflags,
11911186
)
11921187
else:
11931188
if self.options["port"] > 0:
@@ -1197,7 +1192,9 @@ async def _start_cli_server(self) -> None:
11971192
stdin=subprocess.DEVNULL,
11981193
stdout=subprocess.PIPE,
11991194
stderr=subprocess.PIPE,
1200-
**popen_kwargs,
1195+
cwd=self.options["cwd"],
1196+
env=env,
1197+
creationflags=creationflags,
12011198
)
12021199

12031200
# For stdio mode, we're ready immediately

0 commit comments

Comments
 (0)