<?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 (isset($data['tool_calls'])) {
            foreach ($data['tool_calls'] as $tc) {
                $argsStr = json_encode($tc['args'], JSON_PRETTY_PRINT);
                if (strpos($argsStr, 'applyFutureTSFilter') !== false) {
                    $content .= "\n" . $argsStr;
                }
            }
        }
        
        $pos = strpos($content, 'applyFutureTSFilter');
        if ($pos !== false) {
            echo "=== Found in Step $idx ===\n";
            echo substr($content, $pos, 3000) . "\n";
            echo "==========================\n\n";
        }
    }
}
fclose($handle);
