p-doom/crowd-code-dataset-0.2 huggingface dataset:
[content] crowd_code_player/replay_file.py (python)
        if active_file == "TERMINAL":
            # For terminal, always scroll to bottom to show latest content
            lines = content.split('
')
            total_lines = len(lines)
            if total_lines > visible_height:
                scroll_y = max(0, total_lines - visible_height)
        else:
            # For regular files, keep cursor in view
            if cursor_y < scroll_y:
                scroll_y = cursor_y
            elif cursor_y >= scroll_y + visible_height:
                scroll_y = cursor_y - visible_height + 1