revert: remove stty resize workaround that caused 1006 loops
This commit is contained in:
@@ -146,17 +146,6 @@ class TerminalSession:
|
||||
self._rows = rows
|
||||
logger.info(f"resize() called for session {self.session_id}: {cols}x{rows}")
|
||||
self._set_terminal_size(cols, rows)
|
||||
|
||||
# Docker exec doesn't forward PTY resize to the container process,
|
||||
# so we need to explicitly set the size inside the container shell.
|
||||
# Only do this on the first resize to avoid interfering with user input.
|
||||
if not getattr(self, '_stty_sent', False):
|
||||
self._stty_sent = True
|
||||
# Clear any partial input and send stty command
|
||||
# \x15 = Ctrl+U (clear line), \x0d = Enter
|
||||
stty_cmd = f"\x15stty cols {cols} rows {rows}\x0d".encode()
|
||||
await self.write_input(stty_cmd)
|
||||
logger.info(f"Sent stty command to container for session {self.session_id}")
|
||||
|
||||
async def reset(self) -> None:
|
||||
"""Reset the session by killing the process and clearing state."""
|
||||
|
||||
Reference in New Issue
Block a user