<?php
$logPath = 'C:/Users/HP/.gemini/antigravity-ide/brain/dabec389-a1dd-4fd5-add9-97761faf96ae/.system_generated/logs/transcript.jsonl';
if (!file_exists($logPath)) {
    die("Log 1 not found\n");
}
$handle = fopen($logPath, "r");
$idx = 0;
while (($line = fgets($handle)) !== false) {
    $idx++;
    if (strpos($line, 'applyFutureTSFilter') !== false) {
        $data = json_decode($line, true);
        if (!$data) continue;
        
        $content = $data['content'] ?? '';
        if (strpos($content, 'applyFutureTSFilter') !== false) {
            echo "=== Step $idx (length: " . strlen($content) . ") ===\n";
            $lines = explode("\n", $content);
            $found = false;
            $count = 0;
            foreach ($lines as $i => $l) {
                if (strpos($l, 'applyFutureTSFilter') !== false) {
                    $found = true;
                }
                if ($found) {
                    echo ($i+1) . ": " . $l . "\n";
                    $count++;
                    if ($count > 120) break; // print up to 120 lines
                }
            }
            echo "=================================\n\n";
        }
    }
}
fclose($handle);
