import json transcript_path = "/home/nabil/.gemini/antigravity/brain/13b11a65-32bc-4771-9531-ecadb88830c8/.system_generated/logs/transcript.jsonl" for line in open(transcript_path): try: step = json.loads(line) if "tool_calls" in step: for tc in step["tool_calls"]: if tc["name"] in ["multi_replace_file_content", "replace_file_content"]: args = tc["args"] target_file = args.get("TargetFile", "") if "index.html" in target_file: target_lines = 0 replacement_lines = 0 if tc["name"] == "multi_replace_file_content": chunks = json.loads(args.get("ReplacementChunks", "[]")) for chunk in chunks: target_lines += len(chunk.get("TargetContent", "").split("\n")) replacement_lines += len(chunk.get("ReplacementContent", "").split("\n")) else: target_lines = len(args.get("TargetContent", "").split("\n")) replacement_lines = len(args.get("ReplacementContent", "").split("\n")) print(f"Step {step['step_index']}: {tc['name']} -> Target: {target_lines}, Replacement: {replacement_lines}") print(f" Description: {args.get('Description', 'N/A')}") except Exception as e: pass