Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions openhands-tools/openhands/tools/terminal/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,9 @@

TMUX_SOCKET_NAME: Final[str] = "openhands"

# Tmux session dimensions (columns x rows).
# Large values ensure output is not wrapped or truncated by the virtual terminal.
TMUX_SESSION_WIDTH: Final[int] = 1000
TMUX_SESSION_HEIGHT: Final[int] = 1000
# Tmux session dimensions (columns x rows). Keep the viewport wide enough for
Comment thread
VascoSch92 marked this conversation as resolved.
# common command output while leaving scrollback retention to HISTORY_LIMIT.
# Output wider than TMUX_SESSION_WIDTH columns will wrap; this is an accepted
# tradeoff to avoid the oversized 1000x1000 virtual terminal grid.
TMUX_SESSION_WIDTH: Final[int] = 256
TMUX_SESSION_HEIGHT: Final[int] = 200
9 changes: 9 additions & 0 deletions tests/tools/terminal/test_tmux_pane_pool.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,18 @@

import pytest

from openhands.tools.terminal.constants import (
TMUX_SESSION_HEIGHT,
TMUX_SESSION_WIDTH,
)
from openhands.tools.terminal.terminal.tmux_pane_pool import TmuxPanePool


def test_tmux_session_viewport_is_bounded():
assert TMUX_SESSION_WIDTH <= 256
assert TMUX_SESSION_HEIGHT <= 200


@pytest.fixture
def pool():
"""Create and initialize a pool, close it after the test."""
Expand Down