agentscope-ai / agentscope-ai/QwenPaw

[Bug]: CoPaw Desktop UI

Abierto
#3,281 2 comentarios 0 reacciones 1 asignado Reclamado por @jinglinpeng Ver en GitHub
bug
Lenguaje dominante
TypeScript
Estrellas
35k
Forks
3.1k
Merge medio
1 d 13 h
PR fusionados (30 d)
228

Descripción

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

Guía de contribución

Abrir la guía de contribución

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.