anthropics / anthropics/claude-agent-sdk-python

Hide subprocess terminal for Windows system

Đang mở
#480 0 bình luận 1 reaction 1 người được giao Được @dicksontsai nhận Xem trên GitHub
Ngôn ngữ chính
Python
Star
8.1k
Fork
1.3k
Merge trung bình
2 ngày 31 phút
Pull request đã merge (30 ngày)
1

Mô tả

### Issue

When spawn Claude subprocess via SDK on Windows, a terminal window remains visible. **Need to hide the terminal for a cleaner UX.**

### Workaround

**before**

https://github.com/anthropics/claude-agent-sdk-python/blob/7866e5f6d281ccd2958af52ae4416dfd580e7a20/src/claude_agent_sdk/_internal/transport/subprocess_cli.py#L403-L411

**after**

```python
if sys.platform == "win32":
import subprocess
creationflags = subprocess.CREATE_NO_WINDOW

self._process = await anyio.open_process(
cmd,
stdin=PIPE,
stdout=PIPE,
stderr=stderr_dest,
cwd=self._cwd,
env=process_env,
user=self._options.user,
creationflags=creationflags if creationflags else 0
)
```

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.