@tangle-network/sandbox-ui 3.0.2 → 3.0.3
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/AgentTree-D4d06rfH.js +293 -0
- package/dist/{ResearchReport-vqefUbVp.js → ResearchReport-D1TFmldm.js} +2 -1
- package/dist/{VirtualList-CMynqkkh.js → VirtualList-DcSGbEtA.js} +28 -1
- package/dist/{index-gXcuwPOX.d.ts → index-Bv2iiZaN.d.ts} +135 -2
- package/dist/{index-YU_b9xCK.d.ts → index-CHA38az4.d.ts} +3 -61
- package/dist/index.d.ts +3 -3
- package/dist/index.js +9 -8
- package/dist/record/ResearchReport.js +1 -1
- package/dist/{record-B_4XWfUz.js → record-C-EUpK-n.js} +3 -2
- package/dist/record.js +1 -1
- package/dist/report-viewer.js +80 -80
- package/dist/run/live.js +2 -2
- package/dist/run/record.d.ts +2 -2
- package/dist/run/record.js +5 -4
- package/dist/run.d.ts +3 -3
- package/dist/run.js +6 -5
- package/dist/runtime-viewer/{AgentGraphCanvas-DGq7_u8--WPFPgd72.js → AgentGraphCanvas-DGq7_u8--C6yDfIUT.js} +67 -67
- package/dist/runtime-viewer/{latest-events-CRq9sGkK-YFXUh9qO.js → latest-events-CRq9sGkK-CfoBl1dP.js} +215 -209
- package/dist/{trace-workspace-BiJbv9WQ.js → trace-workspace-B634-EcA.js} +287 -201
- package/dist/{tree-data-9D309DqD.js → tree-data-rg5voiY8.js} +1 -1
- package/dist/{AgentTree-Cju8jn51.js → use-follow-tail-DZFn7QDO.js} +144 -385
- package/dist/vault-tree.js +1 -1
- package/dist/{workspace-BrS_rHWN.js → workspace-CJD7oOEa.js} +1 -1
- package/dist/{workspace-files-pane-Di_rn4FL.js → workspace-files-pane-D24G7H_Z.js} +1 -1
- package/dist/workspace-viewer.js +9970 -9624
- package/dist/workspace.js +2 -2
- package/package.json +5 -4
- package/dist/use-follow-tail-Ht7fZGQQ.js +0 -1
package/dist/run/live.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { t as WorkspaceFilesPane } from "../workspace-files-pane-
|
|
1
|
+
import { t as WorkspaceFilesPane } from "../workspace-files-pane-D24G7H_Z.js";
|
|
2
2
|
import { t as DiffView } from "../diff-view-B9mNeTLF.js";
|
|
3
3
|
import { t as CodeView } from "../code-view-BlhCS1SD.js";
|
|
4
|
-
import { a as useEventStream, t as TraceWorkspace } from "../trace-workspace-
|
|
4
|
+
import { a as useEventStream, t as TraceWorkspace } from "../trace-workspace-B634-EcA.js";
|
|
5
5
|
import { useDocument } from "../hooks/use-document.js";
|
|
6
6
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
7
7
|
import { useEffect, useMemo, useRef, useState } from "react";
|
package/dist/run/record.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as
|
|
2
|
-
export { AgentTree, Conversation, type ConversationEvent, type ConversationNode, type ConversationProps, type ConversationRecord, type EventFlag, type RecordIndex, type ToolCall, VirtualList, indexRecord, recordFlowTrace, model_d_exports as recordModel, withPrompts };
|
|
1
|
+
import { _ as ConversationRecord, a as VirtualList, c as ConversationProps, d as ToolCall, f as indexRecord, g as ConversationNode, h as ConversationEvent, i as AgentTree, l as EventFlag, m as recordFlowTrace, n as ToolStep, o as withPrompts, p as model_d_exports, r as timelineItems, s as Conversation, t as PromptMore, u as RecordIndex } from "../index-Bv2iiZaN.js";
|
|
2
|
+
export { AgentTree, Conversation, type ConversationEvent, type ConversationNode, type ConversationProps, type ConversationRecord, type EventFlag, PromptMore, type RecordIndex, type ToolCall, ToolStep, VirtualList, indexRecord, recordFlowTrace, model_d_exports as recordModel, timelineItems, withPrompts };
|
package/dist/run/record.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { t as VirtualList } from "../VirtualList-
|
|
2
|
-
import {
|
|
3
|
-
import { t as
|
|
4
|
-
|
|
1
|
+
import { t as VirtualList } from "../VirtualList-DcSGbEtA.js";
|
|
2
|
+
import { S as model_exports, i as ToolStep, r as PromptMore, s as timelineItems, w as recordFlowTrace, y as indexRecord } from "../use-follow-tail-DZFn7QDO.js";
|
|
3
|
+
import { n as Conversation, t as AgentTree } from "../AgentTree-D4d06rfH.js";
|
|
4
|
+
import { t as withPrompts } from "../record-C-EUpK-n.js";
|
|
5
|
+
export { AgentTree, Conversation, PromptMore, ToolStep, VirtualList, indexRecord, recordFlowTrace, model_exports as recordModel, timelineItems, withPrompts };
|
package/dist/run.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { A as ToolCallData, B as taskProgress, C as RunStatusIcon, D as TaskListItem, E as TaskList, F as isOpen, G as TraceWorkspace, H as LatestEvents, I as parseToolEvent, J as TraceWaterfallProps, K as TraceWorkspaceProps, L as runStatus, M as ToolCallFeedProps, N as ToolCallStatus, O as TaskListProps, P as ToolCallType, R as showsTaskPriority, S as RunStatus, T as StatusMeta, U as LatestEventsProps, V as taskStatus, W as TraceEvent, Y as traceSpanMark, _ as RunPhaseList, a as ApprovalPlanStep, b as RunRowStatus, c as FeedSegment, d as InlineToolItem, f as InlineToolItemProps, g as RunPhase, h as RunGroupProps, i as ApprovalDiffSummary, j as ToolCallFeed, k as TaskStatus, l as InlineThinkingItem, m as RunGroup, n as ApprovalCardProps, o as ExpandedToolDetail, p as LiveDuration, q as TraceWaterfall, r as ApprovalDiffFile, s as ExpandedToolDetailProps, t as ApprovalCard, u as InlineThinkingItemProps, v as RunRowShell, w as RunStatusIconProps, x as RunRowStatusDot, y as RunRowShellProps, z as statusMeta } from "./index-CHA38az4.js";
|
|
2
2
|
import { i as useEventStream, n as AgentStreamSource, r as EventStreamHandlers, t as AgentStreamOpener } from "./event-stream-DNEbvx4s.js";
|
|
3
|
-
import { a as
|
|
4
|
-
export { type AgentStreamOpener, type AgentStreamRow, type AgentStreamSource, type AgentStreamState, type AgentTranscriptEntry, AgentTree, ApprovalCard, type ApprovalCardProps, type ApprovalDiffFile, ApprovalDiffSummary, type ApprovalPlanStep, Conversation, type ConversationEvent, type ConversationNode, type ConversationProps, type ConversationRecord, type EventFlag, type EventStreamHandlers, ExpandedToolDetail, type ExpandedToolDetailProps, type FeedSegment, InlineThinkingItem, type InlineThinkingItemProps, InlineToolItem, type InlineToolItemProps, LatestEvents, type LatestEventsProps, LiveDuration, type RecordIndex, RunGroup, type RunGroupProps, type RunPhase, RunPhaseList, RunRowShell, type RunRowShellProps, type RunRowStatus, RunRowStatusDot, type RunStatus, RunStatusIcon, type RunStatusIconProps, type StatusMeta, TaskList, type TaskListItem, type TaskListProps, type TaskStatus, type ToolCall, type ToolCallData, ToolCallFeed, type ToolCallFeedProps, type ToolCallStatus, type ToolCallType, type TraceEvent, TraceWaterfall, type TraceWaterfallProps, TraceWorkspace, type TraceWorkspaceProps, VirtualList, foldAgentRows, indexRecord, isOpen, parseToolEvent, recordFlowTrace, model_d_exports as recordModel, runStatus, showsTaskPriority, statusMeta, taskProgress, taskStatus, traceSpanMark, useAgentStream, useEventStream, withPrompts };
|
|
3
|
+
import { C as foldAgentRows, S as AgentTranscriptEntry, _ as ConversationRecord, a as VirtualList, b as AgentStreamRow, c as ConversationProps, d as ToolCall, f as indexRecord, g as ConversationNode, h as ConversationEvent, i as AgentTree, l as EventFlag, m as recordFlowTrace, n as ToolStep, o as withPrompts, p as model_d_exports, r as timelineItems, s as Conversation, t as PromptMore, u as RecordIndex, v as AgentStreamHistory, w as useAgentStream, x as AgentStreamState, y as AgentStreamPage } from "./index-Bv2iiZaN.js";
|
|
4
|
+
export { type AgentStreamHistory, type AgentStreamOpener, type AgentStreamPage, type AgentStreamRow, type AgentStreamSource, type AgentStreamState, type AgentTranscriptEntry, AgentTree, ApprovalCard, type ApprovalCardProps, type ApprovalDiffFile, ApprovalDiffSummary, type ApprovalPlanStep, Conversation, type ConversationEvent, type ConversationNode, type ConversationProps, type ConversationRecord, type EventFlag, type EventStreamHandlers, ExpandedToolDetail, type ExpandedToolDetailProps, type FeedSegment, InlineThinkingItem, type InlineThinkingItemProps, InlineToolItem, type InlineToolItemProps, LatestEvents, type LatestEventsProps, LiveDuration, PromptMore, type RecordIndex, RunGroup, type RunGroupProps, type RunPhase, RunPhaseList, RunRowShell, type RunRowShellProps, type RunRowStatus, RunRowStatusDot, type RunStatus, RunStatusIcon, type RunStatusIconProps, type StatusMeta, TaskList, type TaskListItem, type TaskListProps, type TaskStatus, type ToolCall, type ToolCallData, ToolCallFeed, type ToolCallFeedProps, type ToolCallStatus, type ToolCallType, ToolStep, type TraceEvent, TraceWaterfall, type TraceWaterfallProps, TraceWorkspace, type TraceWorkspaceProps, VirtualList, foldAgentRows, indexRecord, isOpen, parseToolEvent, recordFlowTrace, model_d_exports as recordModel, runStatus, showsTaskPriority, statusMeta, taskProgress, taskStatus, timelineItems, traceSpanMark, useAgentStream, useEventStream, withPrompts };
|
package/dist/run.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { t as VirtualList } from "./VirtualList-
|
|
2
|
-
import { a as useEventStream, i as useAgentStream, n as LatestEvents, o as TraceWaterfall, r as foldAgentRows, s as traceSpanMark, t as TraceWorkspace } from "./trace-workspace-
|
|
3
|
-
import {
|
|
4
|
-
import { t as
|
|
1
|
+
import { t as VirtualList } from "./VirtualList-DcSGbEtA.js";
|
|
2
|
+
import { a as useEventStream, i as useAgentStream, n as LatestEvents, o as TraceWaterfall, r as foldAgentRows, s as traceSpanMark, t as TraceWorkspace } from "./trace-workspace-B634-EcA.js";
|
|
3
|
+
import { S as model_exports, i as ToolStep, r as PromptMore, s as timelineItems, w as recordFlowTrace, y as indexRecord } from "./use-follow-tail-DZFn7QDO.js";
|
|
4
|
+
import { n as Conversation, t as AgentTree } from "./AgentTree-D4d06rfH.js";
|
|
5
|
+
import { t as withPrompts } from "./record-C-EUpK-n.js";
|
|
5
6
|
import { ApprovalCard, ApprovalDiffSummary, ExpandedToolDetail, InlineThinkingItem, InlineToolItem, LiveDuration, RunGroup, RunPhaseList, RunRowShell, RunRowStatusDot, RunStatusIcon, TaskList, ToolCallFeed, isOpen, parseToolEvent, runStatus, showsTaskPriority, statusMeta, taskProgress, taskStatus } from "@tangle-network/ui/run";
|
|
6
|
-
export { AgentTree, ApprovalCard, ApprovalDiffSummary, Conversation, ExpandedToolDetail, InlineThinkingItem, InlineToolItem, LatestEvents, LiveDuration, RunGroup, RunPhaseList, RunRowShell, RunRowStatusDot, RunStatusIcon, TaskList, ToolCallFeed, TraceWaterfall, TraceWorkspace, VirtualList, foldAgentRows, indexRecord, isOpen, parseToolEvent, recordFlowTrace, model_exports as recordModel, runStatus, showsTaskPriority, statusMeta, taskProgress, taskStatus, traceSpanMark, useAgentStream, useEventStream, withPrompts };
|
|
7
|
+
export { AgentTree, ApprovalCard, ApprovalDiffSummary, Conversation, ExpandedToolDetail, InlineThinkingItem, InlineToolItem, LatestEvents, LiveDuration, PromptMore, RunGroup, RunPhaseList, RunRowShell, RunRowStatusDot, RunStatusIcon, TaskList, ToolCallFeed, ToolStep, TraceWaterfall, TraceWorkspace, VirtualList, foldAgentRows, indexRecord, isOpen, parseToolEvent, recordFlowTrace, model_exports as recordModel, runStatus, showsTaskPriority, statusMeta, taskProgress, taskStatus, timelineItems, traceSpanMark, useAgentStream, useEventStream, withPrompts };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { i as e, t } from "./rolldown-runtime-CwxnZyOB.js";
|
|
2
|
-
import {
|
|
3
|
-
// node_modules/.pnpm/@tangle-network+charts@4.0.2_@tangle-network+brand@1.31.3_react@19.3.1__@tangle-
|
|
4
|
-
var N = "[transition:color_var(--motion-control),background-color_var(--motion-control),border-color_var(--motion-control),box-shadow_var(--motion-control),transform_var(--motion-control),scale_var(--motion-control),opacity_var(--motion-control)] motion-reduce:transition-none", P = /* @__PURE__ */ e(n(), 1), F =
|
|
2
|
+
import { Dt as n, Et as r, H as i, K as a, O as o, S as s, St as c, T as l, U as u, X as d, Z as f, _ as p, a as m, c as h, et as g, f as _, g as v, h as y, i as b, l as x, lt as S, m as C, n as w, p as T, q as E, s as D, t as O, u as k, ut as A, v as j, x as M } from "./latest-events-CRq9sGkK-CfoBl1dP.js";
|
|
3
|
+
// node_modules/.pnpm/@tangle-network+charts@4.0.2_@tangle-network+brand@1.31.3_react@19.3.1__@tangle-network_8fd2b0d675b84eae5d8adcca22ee1cb3/node_modules/@tangle-network/charts/dist/motion-DILryczn.js
|
|
4
|
+
var N = "[transition:color_var(--motion-control),background-color_var(--motion-control),border-color_var(--motion-control),box-shadow_var(--motion-control),transform_var(--motion-control),scale_var(--motion-control),opacity_var(--motion-control)] motion-reduce:transition-none", P = /* @__PURE__ */ e(n(), 1), F = c();
|
|
5
5
|
function I(e) {
|
|
6
6
|
if (typeof e == "string" || typeof e == "number") return "" + e;
|
|
7
7
|
let t = "";
|
|
@@ -4225,7 +4225,7 @@ function Z(e, t) {
|
|
|
4225
4225
|
return !0;
|
|
4226
4226
|
}
|
|
4227
4227
|
// node_modules/.pnpm/@xyflow+react@12.12.0_@types+react-dom@19.3.0_@types+react@19.3.0__@types+react@19.3.0__a2dc164871d419910c9e7025366b0809/node_modules/@xyflow/react/dist/esm/index.js
|
|
4228
|
-
var Cc = /* @__PURE__ */ e(
|
|
4228
|
+
var Cc = /* @__PURE__ */ e(r()), wc = (0, P.createContext)(null), Tc = wc.Provider, Ec = wa.error001("react");
|
|
4229
4229
|
function Q(e, t) {
|
|
4230
4230
|
let n = (0, P.useContext)(wc);
|
|
4231
4231
|
if (n === null) throw Error(Ec);
|
|
@@ -7582,7 +7582,7 @@ function gf({ nodeId: e, position: t, variant: n = $s.Handle, className: r, styl
|
|
|
7582
7582
|
});
|
|
7583
7583
|
}
|
|
7584
7584
|
(0, P.memo)(gf);
|
|
7585
|
-
// node_modules/.pnpm/@tangle-network+charts@4.0.2_@tangle-network+brand@1.31.3_react@19.3.1__@tangle-
|
|
7585
|
+
// node_modules/.pnpm/@tangle-network+charts@4.0.2_@tangle-network+brand@1.31.3_react@19.3.1__@tangle-network_8fd2b0d675b84eae5d8adcca22ee1cb3/node_modules/@tangle-network/charts/dist/AgentGraphCanvas-DGq7_u8-.js
|
|
7586
7586
|
var _f = {
|
|
7587
7587
|
name: "chevron-down",
|
|
7588
7588
|
size: 24,
|
|
@@ -7606,9 +7606,9 @@ function bf({ status: e, size: t }) {
|
|
|
7606
7606
|
"aria-hidden": !0,
|
|
7607
7607
|
"data-motion": "essential",
|
|
7608
7608
|
className: "ag-running-dot",
|
|
7609
|
-
style:
|
|
7610
|
-
onAnimationStart:
|
|
7611
|
-
}) : /* @__PURE__ */ (0, F.jsx)(
|
|
7609
|
+
style: o,
|
|
7610
|
+
onAnimationStart: i
|
|
7611
|
+
}) : /* @__PURE__ */ (0, F.jsx)(f, {
|
|
7612
7612
|
status: e,
|
|
7613
7613
|
size: t,
|
|
7614
7614
|
"aria-hidden": !0
|
|
@@ -7621,7 +7621,7 @@ function xf(e) {
|
|
|
7621
7621
|
} : { borderColor: _ };
|
|
7622
7622
|
}
|
|
7623
7623
|
function Sf(e) {
|
|
7624
|
-
let t = v(e.costUsd ?? void 0), n =
|
|
7624
|
+
let t = v(e.costUsd ?? void 0), n = j(e.tokens);
|
|
7625
7625
|
return [
|
|
7626
7626
|
e.label,
|
|
7627
7627
|
e.role,
|
|
@@ -7649,10 +7649,10 @@ function Tf({ direction: e, source: t = !0 }) {
|
|
|
7649
7649
|
})] });
|
|
7650
7650
|
}
|
|
7651
7651
|
function Ef({ agent: e, selected: t, direction: n, now: r, onOpen: i, parentLabel: a, handles: o = !1 }) {
|
|
7652
|
-
let
|
|
7652
|
+
let s = d(r), c = l(e, s), u = yf(e.status);
|
|
7653
7653
|
return /* @__PURE__ */ (0, F.jsxs)("div", {
|
|
7654
7654
|
"data-status": e.status,
|
|
7655
|
-
"data-activity":
|
|
7655
|
+
"data-activity": c ? "quiet" : void 0,
|
|
7656
7656
|
"data-selected": t || void 0,
|
|
7657
7657
|
title: Sf(e),
|
|
7658
7658
|
className: `ag-agent-card relative flex h-full w-full flex-col gap-0.5 rounded-[var(--radius-card)] border bg-card px-3 py-2 text-left ${N}`,
|
|
@@ -7689,7 +7689,7 @@ function Ef({ agent: e, selected: t, direction: n, now: r, onOpen: i, parentLabe
|
|
|
7689
7689
|
"data-agent-identity": "",
|
|
7690
7690
|
className: "m-0 truncate text-[13px] leading-[18px] text-muted-foreground",
|
|
7691
7691
|
title: [e.harness, e.model].filter(Boolean).join(" · "),
|
|
7692
|
-
children: [e.harness, e.model ?
|
|
7692
|
+
children: [e.harness, e.model ? M(e.model) : null].filter(Boolean).join(" · ") || "Identity not recorded"
|
|
7693
7693
|
}),
|
|
7694
7694
|
(e.status === "failed" || (e.status === "done" || e.status === "stopped") && (e.result ?? e.turn)) && /* @__PURE__ */ (0, F.jsx)("p", {
|
|
7695
7695
|
className: "m-0 line-clamp-2 text-[13px] leading-4",
|
|
@@ -7697,20 +7697,20 @@ function Ef({ agent: e, selected: t, direction: n, now: r, onOpen: i, parentLabe
|
|
|
7697
7697
|
}),
|
|
7698
7698
|
/* @__PURE__ */ (0, F.jsxs)("div", {
|
|
7699
7699
|
className: "mt-auto flex items-center justify-between gap-1 text-[13px]",
|
|
7700
|
-
style: { color:
|
|
7700
|
+
style: { color: c ? "var(--surface-warning-text)" : u.color },
|
|
7701
7701
|
children: [
|
|
7702
7702
|
/* @__PURE__ */ (0, F.jsxs)("span", {
|
|
7703
7703
|
className: "flex items-center gap-1",
|
|
7704
7704
|
children: [/* @__PURE__ */ (0, F.jsx)(bf, {
|
|
7705
7705
|
status: e.status,
|
|
7706
7706
|
size: 16
|
|
7707
|
-
}),
|
|
7707
|
+
}), c?.label ?? u.label]
|
|
7708
7708
|
}),
|
|
7709
7709
|
/* @__PURE__ */ (0, F.jsx)("span", {
|
|
7710
7710
|
"data-agent-tokens": "",
|
|
7711
7711
|
title: e.tokens == null ? "Tokens not recorded" : "Tokens",
|
|
7712
7712
|
className: "text-muted-foreground tabular-nums whitespace-nowrap",
|
|
7713
|
-
children:
|
|
7713
|
+
children: j(e.tokens) ?? "—"
|
|
7714
7714
|
}),
|
|
7715
7715
|
e.status === "needs-you" && /* @__PURE__ */ (0, F.jsx)("button", {
|
|
7716
7716
|
type: "button",
|
|
@@ -7830,18 +7830,18 @@ function Nf({ id: e, source: t, target: n, data: r, markerEnd: i }) {
|
|
|
7830
7830
|
function Pf(e) {
|
|
7831
7831
|
return e.length <= 52 ? e : `${e.slice(0, 32)} … ${e.slice(-17)}`;
|
|
7832
7832
|
}
|
|
7833
|
-
function Ff({ agent: e, selected: t, direction: n = "TB", now: r, handles:
|
|
7834
|
-
let
|
|
7835
|
-
|
|
7836
|
-
let m = e.status === "done" || e.status === "stopped", h = e.status === "failed", g =
|
|
7833
|
+
function Ff({ agent: e, selected: t, direction: n = "TB", now: r, handles: i = !1, onOpen: o, parentLabel: s, renderEventIcon: c }) {
|
|
7834
|
+
let u = d(r), f = (0, P.useRef)(null);
|
|
7835
|
+
a(f, e.status);
|
|
7836
|
+
let m = e.status === "done" || e.status === "stopped", h = e.status === "failed", g = l(e, u), _ = yf(e.status), y = [e.model ? M(e.model) : void 0, e.effort].filter(Boolean).join(" · "), b = (e.events ?? []).slice(-3), x = Number.isFinite(e.costUsd) ? v(e.costUsd) : void 0, S = [
|
|
7837
7837
|
x,
|
|
7838
|
-
!h && e.startedAt != null ? `${
|
|
7838
|
+
!h && e.startedAt != null ? `${p(e.startedAt, u, !1)} elapsed` : void 0,
|
|
7839
7839
|
Number.isFinite(e.commits) ? `${e.commits} ${e.commits === 1 ? "commit" : "commits"}` : void 0
|
|
7840
7840
|
].filter(Boolean).join(" · ") || "—";
|
|
7841
7841
|
return /* @__PURE__ */ (0, F.jsxs)("div", {
|
|
7842
7842
|
className: "ag-live-slot",
|
|
7843
|
-
children: [
|
|
7844
|
-
ref:
|
|
7843
|
+
children: [i && /* @__PURE__ */ (0, F.jsx)(Tf, { direction: n }), /* @__PURE__ */ (0, F.jsxs)("div", {
|
|
7844
|
+
ref: f,
|
|
7845
7845
|
className: `ag-live-card${m ? " ag-live-chip" : ""}`,
|
|
7846
7846
|
"data-status": e.status,
|
|
7847
7847
|
"data-sparse": b.length === 0 || void 0,
|
|
@@ -7877,9 +7877,9 @@ function Ff({ agent: e, selected: t, direction: n = "TB", now: r, handles: a = !
|
|
|
7877
7877
|
className: "ag-live-names",
|
|
7878
7878
|
children: [/* @__PURE__ */ (0, F.jsxs)("span", {
|
|
7879
7879
|
className: "ag-live-name",
|
|
7880
|
-
children: [
|
|
7880
|
+
children: [s && /* @__PURE__ */ (0, F.jsxs)("span", {
|
|
7881
7881
|
className: "ag-parent-label",
|
|
7882
|
-
children: [
|
|
7882
|
+
children: [s, " / "]
|
|
7883
7883
|
}), e.label]
|
|
7884
7884
|
}), !m && y && /* @__PURE__ */ (0, F.jsx)("span", {
|
|
7885
7885
|
className: "ag-live-meta",
|
|
@@ -7946,7 +7946,7 @@ function Ff({ agent: e, selected: t, direction: n = "TB", now: r, handles: a = !
|
|
|
7946
7946
|
children: b.map((e) => /* @__PURE__ */ (0, F.jsxs)("li", {
|
|
7947
7947
|
title: e.label,
|
|
7948
7948
|
children: [
|
|
7949
|
-
|
|
7949
|
+
c?.(e) ?? /* @__PURE__ */ (0, F.jsx)(D, {
|
|
7950
7950
|
size: 12,
|
|
7951
7951
|
strokeWidth: 1.75,
|
|
7952
7952
|
"aria-hidden": !0
|
|
@@ -7958,7 +7958,7 @@ function Ff({ agent: e, selected: t, direction: n = "TB", now: r, handles: a = !
|
|
|
7958
7958
|
/* @__PURE__ */ (0, F.jsxs)("time", {
|
|
7959
7959
|
className: "ag-live-event-at",
|
|
7960
7960
|
dateTime: Number.isFinite(e.at) ? new Date(e.at).toISOString() : void 0,
|
|
7961
|
-
children: [h && e.at != null ? "at " : "",
|
|
7961
|
+
children: [h && e.at != null ? "at " : "", p(e.at, u, h)]
|
|
7962
7962
|
})
|
|
7963
7963
|
]
|
|
7964
7964
|
}, e.id))
|
|
@@ -8003,17 +8003,17 @@ function Hf(e, t, n) {
|
|
|
8003
8003
|
zoom: l
|
|
8004
8004
|
});
|
|
8005
8005
|
}
|
|
8006
|
-
function Uf({ nodes: e, edges: t, selectedId: n, onSelect: r, direction: i = "TB", className: a, emptyState:
|
|
8007
|
-
let
|
|
8006
|
+
function Uf({ nodes: e, edges: t, selectedId: n, onSelect: r, direction: i = "TB", className: a, emptyState: o, live: c = !1, renderEventIcon: f, showLatestEvents: p = !0, now: g }) {
|
|
8007
|
+
let _ = c ? b : O, v = d(g), x = E(), C = (0, P.useId)(), w = (0, P.useRef)(null), T = (0, P.useRef)(!1), [D, A] = (0, P.useState)(null), j = () => A(null), [M, N] = (0, P.useState)(/* @__PURE__ */ new Set()), [I, L] = (0, P.useState)(0), R = (0, P.useRef)(null), [z, B] = Vf(), V = s(R, e.length > 0), H = z !== null && z.width < 600, U = h(e, t), W = (0, P.useRef)(U);
|
|
8008
8008
|
W.current.key !== U.key && (W.current = U);
|
|
8009
|
-
let G = W.current, ee = `${i}:${
|
|
8009
|
+
let G = W.current, ee = `${i}:${c}:${G.key}`, te = (0, P.useRef)(null);
|
|
8010
8010
|
z && !H && te.current?.key !== ee && (te.current = {
|
|
8011
8011
|
key: ee,
|
|
8012
|
-
columns: Math.max(1, Math.min(6, Math.floor((z.width - 32 - (!
|
|
8012
|
+
columns: Math.max(1, Math.min(6, Math.floor((z.width - 32 - (!c && i === "LR" ? _.width + 70 : 0)) / (_.width + 10))))
|
|
8013
8013
|
});
|
|
8014
8014
|
let ne = te.current?.columns ?? 1, re = JSON.stringify([
|
|
8015
8015
|
i,
|
|
8016
|
-
|
|
8016
|
+
c,
|
|
8017
8017
|
G.key,
|
|
8018
8018
|
ne,
|
|
8019
8019
|
[...M]
|
|
@@ -8021,7 +8021,7 @@ function Uf({ nodes: e, edges: t, selectedId: n, onSelect: r, direction: i = "TB
|
|
|
8021
8021
|
(0, P.useEffect)(() => {
|
|
8022
8022
|
if (H) return;
|
|
8023
8023
|
let e = !0;
|
|
8024
|
-
return k(G, i, ne,
|
|
8024
|
+
return k(G, i, ne, _, M, c).then((t) => {
|
|
8025
8025
|
e && ae({
|
|
8026
8026
|
key: re,
|
|
8027
8027
|
layout: t
|
|
@@ -8058,7 +8058,7 @@ function Uf({ nodes: e, edges: t, selectedId: n, onSelect: r, direction: i = "TB
|
|
|
8058
8058
|
data: {
|
|
8059
8059
|
frame: e,
|
|
8060
8060
|
direction: i,
|
|
8061
|
-
groupParents:
|
|
8061
|
+
groupParents: c,
|
|
8062
8062
|
label: q.get(e.group.parentId)?.label ?? "Agent",
|
|
8063
8063
|
onToggle: () => {
|
|
8064
8064
|
!e.collapsed && n && e.group.memberIds.includes(n) && r?.(e.group.parentId), N((t) => {
|
|
@@ -8071,15 +8071,15 @@ function Uf({ nodes: e, edges: t, selectedId: n, onSelect: r, direction: i = "TB
|
|
|
8071
8071
|
for (let e of G.agentIds) {
|
|
8072
8072
|
let a = q.get(e), o = K.positions.get(e);
|
|
8073
8073
|
if (!a || !o) continue;
|
|
8074
|
-
let s = n === e,
|
|
8074
|
+
let s = n === e, l = c && K.frames.find((t) => t.group.parentId === e), u = l ? l.width - 64 : _.width, d = l ? 64 : _.height, p = oe.current?.getInternalNode(e)?.measured;
|
|
8075
8075
|
t.push({
|
|
8076
8076
|
id: e,
|
|
8077
|
-
type:
|
|
8077
|
+
type: c ? "liveAgent" : "agent",
|
|
8078
8078
|
position: o,
|
|
8079
|
-
width:
|
|
8080
|
-
height:
|
|
8081
|
-
measured: p?.width ===
|
|
8082
|
-
className: `${Cf}${
|
|
8079
|
+
width: u,
|
|
8080
|
+
height: d,
|
|
8081
|
+
measured: p?.width === u && p.height === d ? p : void 0,
|
|
8082
|
+
className: `${Cf}${l ? " ag-frame-owner" : ""}`,
|
|
8083
8083
|
draggable: !1,
|
|
8084
8084
|
ariaRole: "button",
|
|
8085
8085
|
ariaLabel: Sf(a),
|
|
@@ -8091,7 +8091,7 @@ function Uf({ nodes: e, edges: t, selectedId: n, onSelect: r, direction: i = "TB
|
|
|
8091
8091
|
agent: a,
|
|
8092
8092
|
selected: s,
|
|
8093
8093
|
direction: i,
|
|
8094
|
-
now:
|
|
8094
|
+
now: v,
|
|
8095
8095
|
onOpen: r ? () => r(a.id) : void 0,
|
|
8096
8096
|
renderEventIcon: f
|
|
8097
8097
|
}
|
|
@@ -8104,9 +8104,9 @@ function Uf({ nodes: e, edges: t, selectedId: n, onSelect: r, direction: i = "TB
|
|
|
8104
8104
|
q,
|
|
8105
8105
|
n,
|
|
8106
8106
|
i,
|
|
8107
|
-
|
|
8107
|
+
c,
|
|
8108
|
+
_,
|
|
8108
8109
|
v,
|
|
8109
|
-
x,
|
|
8110
8110
|
r,
|
|
8111
8111
|
f,
|
|
8112
8112
|
D
|
|
@@ -8114,7 +8114,7 @@ function Uf({ nodes: e, edges: t, selectedId: n, onSelect: r, direction: i = "TB
|
|
|
8114
8114
|
if (!K) return [];
|
|
8115
8115
|
let e = [], r = /* @__PURE__ */ new Set();
|
|
8116
8116
|
for (let t of G.spawns) {
|
|
8117
|
-
let n =
|
|
8117
|
+
let n = c && G.groups.find((e) => e.parentId === t.from)?.id || t.from, i = G.groupOf.get(t.to) ?? t.to;
|
|
8118
8118
|
if (n === i) continue;
|
|
8119
8119
|
let a = `spawn:${n}:${i}`;
|
|
8120
8120
|
r.has(a) || (r.add(a), e.push({
|
|
@@ -8171,23 +8171,23 @@ function Uf({ nodes: e, edges: t, selectedId: n, onSelect: r, direction: i = "TB
|
|
|
8171
8171
|
(0, P.useEffect)(() => {
|
|
8172
8172
|
H && (oe.current = null, ue(!1), fe(!1), me.current = null);
|
|
8173
8173
|
}, [H]);
|
|
8174
|
-
let he = K ? `${re}:${K.columns}` : null, ge = `${i}:${G.key}`, _e =
|
|
8174
|
+
let he = K ? `${re}:${K.columns}` : null, ge = `${i}:${G.key}`, _e = c ? K && z ? Math.max(.02, Math.min(.2, (z.width - 32) / K.width, (z.height - 32) / K.height)) : .2 : 1;
|
|
8175
8175
|
(0, P.useEffect)(() => {
|
|
8176
8176
|
let e = oe.current;
|
|
8177
8177
|
if (!le || !e || !he || !z) return;
|
|
8178
8178
|
let t = me.current !== ge, n = !t;
|
|
8179
8179
|
if (n && !pe.current) return;
|
|
8180
|
-
let r = me.current !== null && t &&
|
|
8180
|
+
let r = me.current !== null && t && x;
|
|
8181
8181
|
me.current = ge;
|
|
8182
8182
|
let i = requestAnimationFrame(() => {
|
|
8183
8183
|
if (n) Hf(e, R.current, pe.current);
|
|
8184
8184
|
else {
|
|
8185
|
-
let t = pe.current ?? G.agentIds[0], n = K?.positions.get(t), i = e.getInternalNode(t)?.width ??
|
|
8185
|
+
let t = pe.current ?? G.agentIds[0], n = K?.positions.get(t), i = e.getInternalNode(t)?.width ?? _.width, a = K.width + 32 <= z.width ? (z.width - K.width) / 2 : n ? Math.max(zf - n.x, z.width / 2 - n.x - i / 2) : zf, o = K.height + 32 <= z.height ? zf : zf - (n?.y ?? 0);
|
|
8186
8186
|
e.setViewport({
|
|
8187
8187
|
x: a,
|
|
8188
8188
|
y: o,
|
|
8189
8189
|
zoom: 1
|
|
8190
|
-
}, { duration: r ?
|
|
8190
|
+
}, { duration: r ? u("--duration-base", R.current) : 0 });
|
|
8191
8191
|
}
|
|
8192
8192
|
fe(!0);
|
|
8193
8193
|
});
|
|
@@ -8198,7 +8198,7 @@ function Uf({ nodes: e, edges: t, selectedId: n, onSelect: r, direction: i = "TB
|
|
|
8198
8198
|
ge,
|
|
8199
8199
|
z,
|
|
8200
8200
|
_e,
|
|
8201
|
-
|
|
8201
|
+
x,
|
|
8202
8202
|
n
|
|
8203
8203
|
]);
|
|
8204
8204
|
let J = (0, P.useCallback)((e) => {
|
|
@@ -8225,7 +8225,7 @@ function Uf({ nodes: e, edges: t, selectedId: n, onSelect: r, direction: i = "TB
|
|
|
8225
8225
|
if (!i) return;
|
|
8226
8226
|
e.preventDefault(), e.stopPropagation();
|
|
8227
8227
|
let a = K?.positions.get(i), o = oe.current?.getInternalNode(i)?.measured;
|
|
8228
|
-
a && oe.current?.setCenter(a.x + (o?.width ??
|
|
8228
|
+
a && oe.current?.setCenter(a.x + (o?.width ?? _.width) / 2, a.y + (o?.height ?? _.height) / 2, { zoom: 1 });
|
|
8229
8229
|
let s = () => R.current?.querySelector(`.react-flow__node[data-id="${CSS.escape(i)}"]`), c = s();
|
|
8230
8230
|
c ? c.focus() : requestAnimationFrame(() => requestAnimationFrame(() => s()?.focus()));
|
|
8231
8231
|
}, [
|
|
@@ -8233,9 +8233,9 @@ function Uf({ nodes: e, edges: t, selectedId: n, onSelect: r, direction: i = "TB
|
|
|
8233
8233
|
J,
|
|
8234
8234
|
K,
|
|
8235
8235
|
G,
|
|
8236
|
-
|
|
8237
|
-
|
|
8238
|
-
]), be = (e) => e.status === "needs-you" ? 0 : e.status === "failed" ? 1 :
|
|
8236
|
+
_,
|
|
8237
|
+
x
|
|
8238
|
+
]), be = (e) => e.status === "needs-you" ? 0 : e.status === "failed" ? 1 : l(e, v) ? 2 : e.status === "waiting" ? 3 : e.status === "running" ? 4 : 5, xe = new Map(t.filter((e) => e.kind === "spawn").map((e) => [e.to, e.from])), Se = (e) => {
|
|
8239
8239
|
let t = /* @__PURE__ */ new Set([e]), n = 0;
|
|
8240
8240
|
for (; xe.has(e) && !t.has(xe.get(e));) e = xe.get(e), t.add(e), n++;
|
|
8241
8241
|
return n;
|
|
@@ -8259,7 +8259,7 @@ function Uf({ nodes: e, edges: t, selectedId: n, onSelect: r, direction: i = "TB
|
|
|
8259
8259
|
"failed",
|
|
8260
8260
|
"quiet"
|
|
8261
8261
|
].map((t) => {
|
|
8262
|
-
let r = e.filter((e) => t === "quiet" ?
|
|
8262
|
+
let r = e.filter((e) => t === "quiet" ? l(e, v) : e.status === t);
|
|
8263
8263
|
return {
|
|
8264
8264
|
status: t,
|
|
8265
8265
|
matches: r,
|
|
@@ -8279,9 +8279,9 @@ function Uf({ nodes: e, edges: t, selectedId: n, onSelect: r, direction: i = "TB
|
|
|
8279
8279
|
let t = e.matches.findIndex((e) => e.id === n), r = e.matches[(t + 1) % e.matches.length];
|
|
8280
8280
|
J(r.id);
|
|
8281
8281
|
let i = K?.positions.get(r.id), a = oe.current?.getInternalNode(r.id)?.measured;
|
|
8282
|
-
i && oe.current?.setCenter(i.x + (a?.width ??
|
|
8282
|
+
i && oe.current?.setCenter(i.x + (a?.width ?? _.width) / 2, i.y + (a?.height ?? _.height) / 2, {
|
|
8283
8283
|
zoom: 1,
|
|
8284
|
-
duration:
|
|
8284
|
+
duration: x ? u("--duration-base", R.current) : 0
|
|
8285
8285
|
});
|
|
8286
8286
|
},
|
|
8287
8287
|
children: [/* @__PURE__ */ (0, F.jsxs)("span", {
|
|
@@ -8302,8 +8302,8 @@ function Uf({ nodes: e, edges: t, selectedId: n, onSelect: r, direction: i = "TB
|
|
|
8302
8302
|
});
|
|
8303
8303
|
return e.length === 0 ? /* @__PURE__ */ (0, F.jsx)("div", {
|
|
8304
8304
|
className: `agent-graph flex items-center justify-center rounded-lg border border-border border-dashed p-4 text-center text-muted-foreground text-xs ${a ?? ""}`,
|
|
8305
|
-
children:
|
|
8306
|
-
}) : /* @__PURE__ */ (0, F.jsx)(
|
|
8305
|
+
children: o ?? "No agents yet"
|
|
8306
|
+
}) : /* @__PURE__ */ (0, F.jsx)(S, {
|
|
8307
8307
|
anchor: D?.anchor,
|
|
8308
8308
|
open: !!D,
|
|
8309
8309
|
onOpenChange: (e) => {
|
|
@@ -8313,7 +8313,7 @@ function Uf({ nodes: e, edges: t, selectedId: n, onSelect: r, direction: i = "TB
|
|
|
8313
8313
|
ref: (e) => {
|
|
8314
8314
|
R.current = e, B(e);
|
|
8315
8315
|
},
|
|
8316
|
-
className: `agent-graph ag-live${
|
|
8316
|
+
className: `agent-graph ag-live${c ? "" : " ag-topology"} relative flex flex-col ${a ?? ""}`,
|
|
8317
8317
|
tabIndex: -1,
|
|
8318
8318
|
onKeyDownCapture: (e) => {
|
|
8319
8319
|
e.target instanceof HTMLElement && e.target.closest("[data-agent-metrics]") || (e.key === "Tab" && !e.shiftKey && D ? (e.preventDefault(), document.getElementById(C)?.focus()) : (e.key === "Escape" && j(), ye(e)));
|
|
@@ -8337,10 +8337,10 @@ function Uf({ nodes: e, edges: t, selectedId: n, onSelect: r, direction: i = "TB
|
|
|
8337
8337
|
"data-columns": K?.columns,
|
|
8338
8338
|
children: [
|
|
8339
8339
|
Oe,
|
|
8340
|
-
|
|
8340
|
+
p && c && /* @__PURE__ */ (0, F.jsx)(m, {
|
|
8341
8341
|
agents: e,
|
|
8342
|
-
now:
|
|
8343
|
-
live:
|
|
8342
|
+
now: g,
|
|
8343
|
+
live: c,
|
|
8344
8344
|
selectedId: n,
|
|
8345
8345
|
onSelect: r ? J : void 0
|
|
8346
8346
|
}),
|
|
@@ -8360,18 +8360,18 @@ function Uf({ nodes: e, edges: t, selectedId: n, onSelect: r, direction: i = "TB
|
|
|
8360
8360
|
onKeyDown: (t) => {
|
|
8361
8361
|
(t.key === "Enter" || t.key === " ") && t.target === t.currentTarget && (t.preventDefault(), J(e.id));
|
|
8362
8362
|
},
|
|
8363
|
-
children:
|
|
8363
|
+
children: c ? /* @__PURE__ */ (0, F.jsx)(Ff, {
|
|
8364
8364
|
agent: e,
|
|
8365
8365
|
parentLabel: q.get(xe.get(e.id) ?? "")?.label,
|
|
8366
8366
|
selected: n === e.id,
|
|
8367
|
-
now:
|
|
8367
|
+
now: v,
|
|
8368
8368
|
renderEventIcon: f,
|
|
8369
8369
|
onOpen: r ? () => J(e.id) : void 0
|
|
8370
8370
|
}) : /* @__PURE__ */ (0, F.jsx)(Ef, {
|
|
8371
8371
|
agent: e,
|
|
8372
8372
|
parentLabel: q.get(xe.get(e.id) ?? "")?.label,
|
|
8373
8373
|
selected: n === e.id,
|
|
8374
|
-
now:
|
|
8374
|
+
now: v,
|
|
8375
8375
|
direction: i,
|
|
8376
8376
|
onOpen: r ? () => J(e.id) : void 0
|
|
8377
8377
|
})
|
|
@@ -8467,7 +8467,7 @@ function Uf({ nodes: e, edges: t, selectedId: n, onSelect: r, direction: i = "TB
|
|
|
8467
8467
|
padding: `${zf}px`,
|
|
8468
8468
|
minZoom: _e,
|
|
8469
8469
|
maxZoom: 1,
|
|
8470
|
-
nodes:
|
|
8470
|
+
nodes: c ? void 0 : G.agentIds.slice(0, 2).map((e) => ({ id: e }))
|
|
8471
8471
|
}
|
|
8472
8472
|
})
|
|
8473
8473
|
]
|
|
@@ -8491,7 +8491,7 @@ function Wf({ anchor: e, side: t, mode: n, id: r, agent: i, onClose: a }) {
|
|
|
8491
8491
|
let o = new Map([
|
|
8492
8492
|
{
|
|
8493
8493
|
label: "Tokens",
|
|
8494
|
-
value:
|
|
8494
|
+
value: j(i.tokens) ?? "Not recorded"
|
|
8495
8495
|
},
|
|
8496
8496
|
{
|
|
8497
8497
|
label: "Cost",
|
|
@@ -8499,7 +8499,7 @@ function Wf({ anchor: e, side: t, mode: n, id: r, agent: i, onClose: a }) {
|
|
|
8499
8499
|
},
|
|
8500
8500
|
...i.facts ?? []
|
|
8501
8501
|
].map((e) => [e.label.toLowerCase(), e]));
|
|
8502
|
-
return /* @__PURE__ */ (0, F.jsxs)(
|
|
8502
|
+
return /* @__PURE__ */ (0, F.jsxs)(A, {
|
|
8503
8503
|
container: e,
|
|
8504
8504
|
side: t,
|
|
8505
8505
|
align: "start",
|