agentscope-ai / agentscope-ai/QwenPaw

[Bug]: CoPaw Desktop UI

Aperta
#3,281 2 commenti 0 reazioni 1 assegnatario Rivendicata da @jinglinpeng Vedi su GitHub
bug
Lingua principale
TypeScript
Stelle
35k
Fork
3.1k
Merge medio
1g 13h
PR unite (30g)
228

Descrizione

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

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.