Spaces:
Running
Running
Update source
Browse files- src/lib/TraceViewer.svelte +54 -5
src/lib/TraceViewer.svelte
CHANGED
|
@@ -6,9 +6,35 @@
|
|
| 6 |
let spinnerFrame = $state(0);
|
| 7 |
let spinnerInterval;
|
| 8 |
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 12 |
let loading = $state(false);
|
| 13 |
let loadedCount = $state(0);
|
| 14 |
let error = $state('');
|
|
@@ -208,9 +234,15 @@
|
|
| 208 |
<span class="w-3 h-3 rounded-full bg-[#d7d7d3]"></span>
|
| 209 |
<span class="w-3 h-3 rounded-full bg-[#d7d7d3]"></span>
|
| 210 |
<span class="w-3 h-3 rounded-full bg-[#d7d7d3]"></span>
|
| 211 |
-
<
|
| 212 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 213 |
>
|
|
|
|
|
|
|
| 214 |
</div>
|
| 215 |
|
| 216 |
<!-- url prompt -->
|
|
@@ -237,6 +269,23 @@
|
|
| 237 |
</button>
|
| 238 |
</div>
|
| 239 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 240 |
<!-- messages / log -->
|
| 241 |
<div bind:this={listEl} class="flex-1 overflow-y-auto px-5 py-3">
|
| 242 |
{#if loading}
|
|
|
|
| 6 |
let spinnerFrame = $state(0);
|
| 7 |
let spinnerInterval;
|
| 8 |
|
| 9 |
+
const examples = [
|
| 10 |
+
{
|
| 11 |
+
label: '3D browser game',
|
| 12 |
+
url: 'https://huggingface.co/datasets/0xSero/pi-sessions/blob/main/2026-01-28T17-49-25-023Z_cc5bb68b-049d-49c7-84b1-004b47ae7cdc.jsonl',
|
| 13 |
+
},
|
| 14 |
+
{
|
| 15 |
+
label: 'Explain repo',
|
| 16 |
+
url: 'https://huggingface.co/datasets/0xSero/pi-sessions/blob/main/2026-01-13T13-24-19-611Z_6622d195-0787-41ac-b9d0-9ea1118a1c6c.jsonl',
|
| 17 |
+
},
|
| 18 |
+
{
|
| 19 |
+
label: 'Fix Swift errors',
|
| 20 |
+
url: 'https://huggingface.co/datasets/0xSero/pi-sessions/blob/main/2026-01-30T19-41-29-858Z_16007873-1d9f-4efd-b222-161a55e0183f.jsonl',
|
| 21 |
+
},
|
| 22 |
+
{
|
| 23 |
+
label: 'Triage issue',
|
| 24 |
+
url: 'https://huggingface.co/datasets/badlogicgames/pi-mono/blob/main/2026-01-16T02-37-34-075Z_4293a326-81ca-4327-b450-85275e1ca645.jsonl',
|
| 25 |
+
},
|
| 26 |
+
{
|
| 27 |
+
label: 'Release audit',
|
| 28 |
+
url: 'https://huggingface.co/datasets/badlogicgames/pi-mono/blob/main/2026-01-16T03-32-51-416Z_cf56c275-9716-42a7-b79e-c3225fe7f6d2.jsonl',
|
| 29 |
+
},
|
| 30 |
+
];
|
| 31 |
+
|
| 32 |
+
let url = $state(examples[0].url);
|
| 33 |
+
|
| 34 |
+
function pickExample(ex) {
|
| 35 |
+
url = ex.url;
|
| 36 |
+
load();
|
| 37 |
+
}
|
| 38 |
let loading = $state(false);
|
| 39 |
let loadedCount = $state(0);
|
| 40 |
let error = $state('');
|
|
|
|
| 234 |
<span class="w-3 h-3 rounded-full bg-[#d7d7d3]"></span>
|
| 235 |
<span class="w-3 h-3 rounded-full bg-[#d7d7d3]"></span>
|
| 236 |
<span class="w-3 h-3 rounded-full bg-[#d7d7d3]"></span>
|
| 237 |
+
<a
|
| 238 |
+
href="https://huggingface.co/datasets?format=format%3Aagent-traces"
|
| 239 |
+
target="_blank"
|
| 240 |
+
rel="noopener noreferrer"
|
| 241 |
+
class="ml-auto text-[12px] text-[#6a6a66] hover:text-[#222220] hover:underline select-none transition-colors"
|
| 242 |
+
title="Browse agent-trace datasets on Hugging Face"
|
| 243 |
>
|
| 244 |
+
🤗 traces
|
| 245 |
+
</a>
|
| 246 |
</div>
|
| 247 |
|
| 248 |
<!-- url prompt -->
|
|
|
|
| 269 |
</button>
|
| 270 |
</div>
|
| 271 |
|
| 272 |
+
<!-- examples -->
|
| 273 |
+
<div
|
| 274 |
+
class="flex flex-wrap items-center gap-2 px-5 py-2 border-b border-[#eeeae0] shrink-0"
|
| 275 |
+
>
|
| 276 |
+
<span class="text-[11px] text-[#888] select-none">examples:</span>
|
| 277 |
+
{#each examples as ex}
|
| 278 |
+
<button
|
| 279 |
+
type="button"
|
| 280 |
+
onclick={() => pickExample(ex)}
|
| 281 |
+
disabled={loading || playing}
|
| 282 |
+
class="text-[11px] px-2 py-1 bg-[#fffbe6] border border-[#ffedb0] rounded hover:bg-[#ffd21e] hover:border-[#ffbb1a] disabled:opacity-50 disabled:hover:bg-[#fffbe6] disabled:hover:border-[#ffedb0] transition-colors cursor-pointer"
|
| 283 |
+
>
|
| 284 |
+
{ex.label}
|
| 285 |
+
</button>
|
| 286 |
+
{/each}
|
| 287 |
+
</div>
|
| 288 |
+
|
| 289 |
<!-- messages / log -->
|
| 290 |
<div bind:this={listEl} class="flex-1 overflow-y-auto px-5 py-3">
|
| 291 |
{#if loading}
|