@agent-inspect/viewer 6.7.2 → 6.7.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -2609,13 +2609,24 @@ function inc(map, key) {
2609
2609
  map[key] = (map[key] ?? 0) + 1;
2610
2610
  }
2611
2611
  function computeRunStatus(events) {
2612
+ let runTerminal;
2613
+ let sawRunEvent = false;
2614
+ for (const e of events) {
2615
+ if (e.kind !== "RUN") continue;
2616
+ sawRunEvent = true;
2617
+ if (e.status === "ok" || e.status === "error") {
2618
+ runTerminal = e.status;
2619
+ }
2620
+ }
2621
+ if (sawRunEvent) {
2622
+ return runTerminal ?? "running";
2623
+ }
2612
2624
  let hasRunning = false;
2613
2625
  for (const e of events) {
2614
2626
  if (e.status === "error") return "error";
2615
2627
  if (e.status === "running") hasRunning = true;
2616
2628
  }
2617
- if (hasRunning) return "running";
2618
- return "ok";
2629
+ return hasRunning ? "running" : "ok";
2619
2630
  }
2620
2631
  var TreeBuilder = class {
2621
2632
  constructor(options) {
@@ -4773,6 +4784,10 @@ function manualTraceEventsToComparableRun(events) {
4773
4784
  meta = { ...meta ?? {}, agent_inspect_diff_parent_missing: true };
4774
4785
  }
4775
4786
  const outputPreview = extractOutputPreview(meta);
4787
+ if (meta !== void 0 && ("outputPreview" in meta || "resultPreview" in meta)) {
4788
+ delete meta.outputPreview;
4789
+ delete meta.resultPreview;
4790
+ }
4776
4791
  const sc = {
4777
4792
  id: acc.id,
4778
4793
  name: acc.name,