def check_screen_resolution_in_recommended_range()

in src/nova_act/impl/inputs.py [0:0]


def check_screen_resolution_in_recommended_range(screen_width: int, screen_height: int) -> None:
    # These numbers are +/- 20% of 1920x1080
    in_range = screen_width >= 1536 and screen_width <= 2304 and screen_height >= 864 and screen_height <= 1296
    if not in_range:
        raise InvalidScreenResolution(
            "Screen resolution is not in the recommended range "
            "of +-20% of 1920x1080 ([1536, 2304]x[864, 1296]). Agent performance might be degraded."
        )