Rishi-Jain-27 commited on
Commit
901c1fc
Β·
1 Parent(s): 1433b16

Added an ability to download the trace so I can create agent traces

Browse files
Files changed (1) hide show
  1. frontend.html +18 -0
frontend.html CHANGED
@@ -635,6 +635,24 @@
635
  <path d="M12 2v2M12 20v2M4.9 4.9l1.4 1.4M17.7 17.7l1.4 1.4M2 12h2M20 12h2M4.9 19.1l1.4-1.4M17.7 6.3l1.4-1.4"/>
636
  </svg>
637
  </button>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
638
  </header>
639
 
640
  <div class="container">
 
635
  <path d="M12 2v2M12 20v2M4.9 4.9l1.4 1.4M17.7 17.7l1.4 1.4M2 12h2M20 12h2M4.9 19.1l1.4-1.4M17.7 6.3l1.4-1.4"/>
636
  </svg>
637
  </button>
638
+
639
+ <!-- β–‘β–‘β–‘ TEMP: download agent traces β€” remove this whole block when asked β–‘β–‘β–‘ -->
640
+ <a id="dl-traces" href="/traces" download="agent_traces.jsonl"
641
+ title="Download agent traces (temporary)"
642
+ style="margin-left:10px; display:inline-flex; align-items:center; gap:6px; height:38px; padding:0 14px;
643
+ font-family:var(--sans); font-size:12.5px; font-weight:600; color:var(--text-dim);
644
+ background:var(--bg-panel); border:1px solid var(--border); border-radius:10px;
645
+ text-decoration:none; cursor:pointer; white-space:nowrap;">
646
+ <svg viewBox="0 0 24 24" width="15" height="15" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M12 3v12m0 0l-4-4m4 4l4-4M5 21h14"/></svg>
647
+ Traces
648
+ </a>
649
+ <script>
650
+ // The served app exposes /traces; the file:// preview has no server, so
651
+ // point at the on-disk trace file instead (only exists once app.py has run).
652
+ if (location.protocol === 'file:')
653
+ document.getElementById('dl-traces').setAttribute('href', 'agent_traces.jsonl');
654
+ </script>
655
+ <!-- β–‘β–‘β–‘ /TEMP β–‘β–‘β–‘ -->
656
  </header>
657
 
658
  <div class="container">