feat: add Windows terminal support#15
Open
ping1979ping wants to merge 1 commit intoConstantineB6:mainfrom
Open
feat: add Windows terminal support#15ping1979ping wants to merge 1 commit intoConstantineB6:mainfrom
ping1979ping wants to merge 1 commit intoConstantineB6:mainfrom
Conversation
Previously the embedded xterm.js terminal was completely disabled on Windows due to missing Unix PTY modules (pty, fcntl, termios). This adds a WindowsTerminal class that uses subprocess.Popen with pipes to provide terminal functionality on Windows. Changes: - Add WindowsTerminal class using subprocess.Popen with stdin/stdout/stderr pipes - Update websocket_handler to use WindowsTerminal on Windows instead of rejecting - Enable MCP auto-config (setup_mcp_config) on Windows - Update platform/status endpoints to report terminal_supported=True No new dependencies required. Unix implementation remains unchanged. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Windows Terminal: → (ConPTY)
The class in this PR uses with pipes, which does not create a real TTY. Claude Code detects it is not in an interactive terminal and falls back to mode:
➡️ A working implementation has been submitted as PR #18: #18 |
5 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
WindowsTerminalclass usingsubprocess.Popenwith pipes (stdin/stdout/stderr) as a Windows alternative to the Unix PTY-basedWebSocketTerminalwebsocket_handlerto useWindowsTerminalon Windows instead of rejecting the connectionsetup_mcp_config) on Windows — previously skipped entirelyDetails
The embedded xterm.js terminal was completely disabled on Windows because it relied on Unix-only modules (
pty,fcntl,termios,select). Windows users saw "Terminal disconnected" immediately.This PR adds a
WindowsTerminalclass that:subprocess.Popenwith piped I/O.CMDfiles (likeclaude.CMD) correctly viacmd /cCREATE_NEW_PROCESS_GROUPfor clean process terminationNo new dependencies. No changes to the Unix code path. The existing
WebSocketTerminalclass remains untouched.Test plan
Windows terminal support enabled (subprocess mode)🤖 Generated with Claude Code