e85213315e
The screenshot was creating a new pyte screen with arbitrary dimensions from query params, but the replay buffer contains ANSI sequences meant for the session's actual terminal size. This mismatch caused wrapping. Now we use get_screen_state() which returns the actual screen buffer from the terminal session's pyte screen, with the correct dimensions. This ensures the screenshot matches exactly what the terminal rendered.