@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.cjs CHANGED
@@ -2616,13 +2616,24 @@ function inc(map, key) {
2616
2616
  map[key] = (map[key] ?? 0) + 1;
2617
2617
  }
2618
2618
  function computeRunStatus(events) {
2619
+ let runTerminal;
2620
+ let sawRunEvent = false;
2621
+ for (const e of events) {
2622
+ if (e.kind !== "RUN") continue;
2623
+ sawRunEvent = true;
2624
+ if (e.status === "ok" || e.status === "error") {
2625
+ runTerminal = e.status;
2626
+ }
2627
+ }
2628
+ if (sawRunEvent) {
2629
+ return runTerminal ?? "running";
2630
+ }
2619
2631
  let hasRunning = false;
2620
2632
  for (const e of events) {
2621
2633
  if (e.status === "error") return "error";
2622
2634
  if (e.status === "running") hasRunning = true;
2623
2635
  }
2624
- if (hasRunning) return "running";
2625
- return "ok";
2636
+ return hasRunning ? "running" : "ok";
2626
2637
  }
2627
2638
  var TreeBuilder = class {
2628
2639
  constructor(options) {
@@ -4780,6 +4791,10 @@ function manualTraceEventsToComparableRun(events) {
4780
4791
  meta = { ...meta ?? {}, agent_inspect_diff_parent_missing: true };
4781
4792
  }
4782
4793
  const outputPreview = extractOutputPreview(meta);
4794
+ if (meta !== void 0 && ("outputPreview" in meta || "resultPreview" in meta)) {
4795
+ delete meta.outputPreview;
4796
+ delete meta.resultPreview;
4797
+ }
4783
4798
  const sc = {
4784
4799
  id: acc.id,
4785
4800
  name: acc.name,