Skip to content

Commit ed12088

Browse files
authored
Merge pull request #28 from copilot-community-sdk/copilot/port-upstream-pr-329
Port upstream PR #329: Hide CLI console window on Windows
2 parents 0b532c6 + 181b092 commit ed12088

2 files changed

Lines changed: 11 additions & 1 deletion

File tree

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@ All notable changes to this project will be documented in this file. This change
33

44
## [Unreleased]
55

6+
### Added (upstream PR #329 sync)
7+
- Windows console window hiding: CLI process is spawned with explicit PIPE redirects ensuring the JVM sets `CREATE_NO_WINDOW` on Windows — no console window appears in GUI applications. Equivalent to upstream `windowsHide: true` (upstream PR #329).
8+
69
### Changed
710
- Recommended default model for non-streaming examples is `claude-haiku-4.5` instead of `gpt-5.2` for faster response times
811

src/github/copilot_sdk/process.clj

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,14 @@
6868
(when github-token
6969
(.put env-map "COPILOT_SDK_AUTH_TOKEN" github-token)))
7070

71-
;; Configure stdio
71+
;; Configure stdio — use explicit PIPE redirects for all three streams.
72+
;; On Windows, the JVM's ProcessImpl sets CREATE_NO_WINDOW when none of the
73+
;; child's stdio handles are inherited from the parent console. By ensuring
74+
;; PIPE (not INHERIT) for stdin, stdout, and stderr, we guarantee no
75+
;; console window appears — equivalent to upstream windowsHide: true (PR #329).
76+
(.redirectInput builder ProcessBuilder$Redirect/PIPE)
77+
(.redirectOutput builder ProcessBuilder$Redirect/PIPE)
78+
(.redirectError builder ProcessBuilder$Redirect/PIPE)
7279
(.redirectErrorStream builder false)
7380

7481
(let [process (.start builder)

0 commit comments

Comments
 (0)