<?php
$logPath = 'C:/Users/HP/.gemini/antigravity-ide/brain/d31b1fe2-ad06-4c7a-9ab1-c82bd4c8dd20/.system_generated/logs/transcript.jsonl';
if (!file_exists($logPath)) {
    die("Log not found\n");
}
$handle = fopen($logPath, "r");
$idx = 0;
while (($line = fgets($handle)) !== false) {
    $idx++;
    if (strpos($line, 'VIEW_FILE') !== false && strpos($line, 'index.php') !== false) {
        $data = json_decode($line, true);
        if (!$data) continue;
        
        $content = $data['content'] ?? '';
        if (strpos($content, 'futureLocationTS') !== false || strpos($content, 'futureVariableTS') !== false) {
            echo "=== Step $idx: VIEW_FILE ===\n";
            echo "  Content length: " . strlen($content) . "\n";
            // Check what lines it contains
            if (preg_match('/Showing lines (\d+) to (\d+)/', $content, $m)) {
                echo "  Lines: $m[1] to $m[2]\n";
                // If it contains select tag, print it
                if (strpos($content, '<select') !== false) {
                    echo "  Contains '<select' tag!\n";
                    echo substr($content, 0, 2000) . "\n";
                }
            }
        }
    }
}
fclose($handle);
