From e3d0de332f3b706e75d24392bd653a793a2d8ca2 Mon Sep 17 00:00:00 2001 From: AI Christianson Date: Wed, 12 Feb 2025 18:07:38 -0500 Subject: [PATCH] use parent tty width --- ra_aid/proc/interactive.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ra_aid/proc/interactive.py b/ra_aid/proc/interactive.py index 4d9f8b2..8213057 100644 --- a/ra_aid/proc/interactive.py +++ b/ra_aid/proc/interactive.py @@ -69,7 +69,7 @@ def run_interactive_command(cmd: List[str]) -> Tuple[bytes, int]: except (AttributeError, io.UnsupportedOperation): stdin_fd = None - # Set up environment variables for the subprocess + # Set up environment variables for the subprocess using detected terminal size env = os.environ.copy() env.update({ 'DEBIAN_FRONTEND': 'noninteractive', @@ -78,7 +78,8 @@ def run_interactive_command(cmd: List[str]) -> Tuple[bytes, int]: 'CI': 'true', 'LANG': 'C.UTF-8', 'LC_ALL': 'C.UTF-8', - 'COLUMNS': '120', + 'COLUMNS': str(cols), + 'LINES': str(rows), 'FORCE_COLOR': '1', 'GIT_TERMINAL_PROMPT': '0', 'PYTHONDONTWRITEBYTECODE': '1',