fix: terminal clear on reset and data loss for text starting with {
Frontend:
- Clear xterm.js screen when receiving 'connected' status after reset
- Send resize message after clearing to ensure proper dimensions
- Fixes terminal artifacts after reset
Backend:
- Fix data loss bug: text starting with '{' but not valid JSON was silently dropped
- Now writes such text to session as regular input
- Fixes missing characters when user types '{'
This commit is contained in:
@@ -192,7 +192,8 @@ async def _write_loop(session_ref: SessionRef, websocket, instance_id: str) -> N
|
||||
continue
|
||||
|
||||
except json.JSONDecodeError:
|
||||
pass
|
||||
# Not a valid JSON control message, treat as regular input
|
||||
await session.write_input(text.encode("utf-8"))
|
||||
else:
|
||||
await session.write_input(text.encode("utf-8"))
|
||||
elif message["type"] == "websocket.disconnect":
|
||||
|
||||
Reference in New Issue
Block a user