agentscope-ai / agentscope-ai/QwenPaw

[Bug]: CoPaw Desktop UI

Đang mở
#3,281 2 bình luận 0 reaction 1 người được giao Được @jinglinpeng nhận Xem trên GitHub
bug
Ngôn ngữ chính
Python
Star
34.9k
Fork
3.1k
Merge trung bình
1 ngày 15 giờ
Pull request đã merge (30 ngày)
225

Mô tả

Title:
[Bug] CoPaw Desktop UI: Agent response disappears after brief display (console channel print failure on Windows)
Body:
markdown


## Bug Description

When using CoPaw Desktop UI (Windows), agent responses appear briefly then disappear, leaving a blank interface. The response content is lost.

## Steps to Reproduce

1. Start CoPaw Desktop on Windows (`copaw desktop`
)
2. Select any agent (e.g., `quant_team_coordinator`
)
3.
Send a message to the agent
4.
Observe: response flashes briefly, then disappears

## Expected Behavior

Agent responses should remain visible in the chat interface.

## Actual Behavior

Response appears briefly (~1 second) then disappears. The interface becomes blank.

## Environment

-
OS: Windows 10
-
CoPaw Version: 1.0.2
-
Channel: console
-
Model: MiniMax-M2.7-highspeed

## Root Cause Analysis

From `copaw.log`:
Print failed with OSError [Errno 22], attempting fallback encoding Failed to print even with fallback: [Errno 22] Invalid argument console stream done: event_count=419 has_response=True
The issue is in `copaw/app/channels/console/channel.py`:
- The `_safe_print` method fails to print Chinese/UTF-8 content on Windows
- Even the fallback encoding fails with OSError [Errno 22]
- When printing fails, the response content is lost from the frontend

## Relevant Code

File: `copaw/app/channels/console/channel.py`

```python
def _safe_print(self, text: str) -> None:
try:
print(text)
except OSError as e:
if e.errno == 22:
try:
sys.stdout.buffer.write(
text.encode("utf-8", errors="replace"),
)
except Exception as fallback_err:
logger.error("Failed to print even with fallback: %s", fallback_err)
# BUG: Response content is lost here, not recovered
Additional Notes
• CLI command works fine: copaw agents chat --from-agent default --to-agent quant_team_coordinator --text "hello"
• The issue affects ALL agents when using CoPaw Desktop UI on Windows
• This is a regression or design flaw in the console channel implementation

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

Mở hướng dẫn đóng góp

Đá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.