@tangle-network/sandbox-ui 4.0.0 → 5.0.0
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-CHA38az4.d.ts → index-CeZgMx53.d.ts} +5 -6
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/run/live.js +1 -1
- package/dist/run.d.ts +1 -1
- package/dist/run.js +1 -1
- package/dist/{trace-workspace-B634-EcA.js → trace-workspace-DtoQ3tio.js} +7 -6
- package/dist/workspace-viewer.js +69 -69
- package/package.json +2 -2
|
@@ -26,11 +26,8 @@ interface TraceWorkspaceProps extends Omit<TraceWaterfallProps, "trace" | "marke
|
|
|
26
26
|
events?: TraceEvent[];
|
|
27
27
|
/** The time the reader moved to, in trace ms; null while following live or showing the whole run. */
|
|
28
28
|
onTimeChange?: (t: number | null) => void;
|
|
29
|
-
/**
|
|
30
|
-
*
|
|
31
|
-
* the as-of query. It spans the full width; this workspace supplies the bounded height virtual panes need. Keep its key on the commit so a scrub
|
|
32
|
-
* keeps its state.
|
|
33
|
-
*/
|
|
29
|
+
/** The code workspace as of the cursor and scoped to the selected agent, usually a WorkspaceFilesPane; it spans the full width
|
|
30
|
+
* at the bounded height virtual panes need. Keep its key on the commit so a scrub keeps its state. */
|
|
34
31
|
files?: ReactNode;
|
|
35
32
|
/** The scoreboard as of the cursor, under the code workspace; omitted when not given. */
|
|
36
33
|
scoreboard?: ReactNode;
|
|
@@ -39,6 +36,8 @@ interface TraceWorkspaceProps extends Omit<TraceWaterfallProps, "trace" | "marke
|
|
|
39
36
|
conversationOpen?: boolean;
|
|
40
37
|
/** Called with the agent the reader selected, or undefined when they close its drawer or press Escape. */
|
|
41
38
|
onSelectAgent?: (agentId: string | undefined) => void;
|
|
39
|
+
/** The host's own account of the selected agent beyond its trace facts, such as its profile: its drawer shows it under them. */
|
|
40
|
+
renderAgentDrawer?: (agentId: string) => ReactNode;
|
|
42
41
|
/**
|
|
43
42
|
* What the trace cannot say about a live agent, by agent id: its activity, thinking line, latest events, commits or
|
|
44
43
|
* result. Timed agents follow the trace cursor. Workers without recorded timing retain their live identity and metadata.
|
|
@@ -55,5 +54,5 @@ interface TraceWorkspaceProps extends Omit<TraceWaterfallProps, "trace" | "marke
|
|
|
55
54
|
* streaming in a right-hand drawer, and the page's code workspace and scoreboard following the time cursor. Scrubbing is time travel:
|
|
56
55
|
* every panel shows what was true at the cursor, and the conversation shows what had been said by then.
|
|
57
56
|
*/
|
|
58
|
-
declare function TraceWorkspace({ trace, streamUrl, openEventSource, events, onTimeChange, files, scoreboard, selectedAgentId, conversationOpen, onSelectAgent, agentCards, agentGraph, className, ...waterfall }: TraceWorkspaceProps): import("react").JSX.Element;
|
|
57
|
+
declare function TraceWorkspace({ trace, streamUrl, openEventSource, events, onTimeChange, files, scoreboard, selectedAgentId, conversationOpen, onSelectAgent, renderAgentDrawer, agentCards, agentGraph, className, ...waterfall }: TraceWorkspaceProps): import("react").JSX.Element;
|
|
59
58
|
export { ToolCallData$1 as A, taskProgress as B, RunStatusIcon$1 as C, TaskListItem as D, TaskList as E, isOpen as F, TraceWorkspace as G, LatestEvents as H, parseToolEvent as I, TraceWaterfallProps as J, TraceWorkspaceProps as K, runStatus$1 as L, ToolCallFeedProps as M, ToolCallStatus as N, TaskListProps as O, ToolCallType as P, showsTaskPriority as R, RunStatus as S, StatusMeta as T, LatestEventsProps as U, taskStatus as V, TraceEvent as W, traceSpanMark as Y, RunPhaseList as _, ApprovalPlanStep as a, RunRowStatus as b, FeedSegment as c, InlineToolItem as d, InlineToolItemProps as f, RunPhase as g, RunGroupProps as h, ApprovalDiffSummary as i, ToolCallFeed as j, TaskStatus as k, InlineThinkingItem as l, RunGroup as m, ApprovalCardProps as n, ExpandedToolDetail as o, LiveDuration as p, TraceWaterfall as q, ApprovalDiffFile as r, ExpandedToolDetailProps as s, ApprovalCard as t, InlineThinkingItemProps as u, RunRowShell as v, RunStatusIconProps as w, RunRowStatusDot as x, RunRowShellProps as y, statusMeta$1 as z };
|
package/dist/index.d.ts
CHANGED
|
@@ -15,7 +15,7 @@ import { C as SandboxArtifactPane, D as SandboxArtifact, E as ChangesPaneProps,
|
|
|
15
15
|
import { n as DiffViewProps, t as DiffView } from "./diff-view-DDHWtR6X.js";
|
|
16
16
|
import { a as PreviewReadiness, i as PreviewAccess, n as EmbeddedAppView, r as EmbeddedAppViewProps, t as EmbeddedApp } from "./embedded-app-view-Ta5GI4hx.js";
|
|
17
17
|
import { OPENUI_NODE_JSON_SCHEMA, OPENUI_NODE_TYPES, OpenUIAction, OpenUIActionsNode, OpenUIArtifactRenderer, OpenUIArtifactRendererProps, OpenUIBadgeNode, OpenUICardNode, OpenUICodeNode, OpenUIComponentNode, OpenUIGridNode, OpenUIHeadingNode, OpenUIKeyValueNode, OpenUIMarkdownNode, OpenUIPrimitive, OpenUISchemaIssue, OpenUISchemaValidation, OpenUISeparatorNode, OpenUIStackNode, OpenUIStatNode, OpenUITableNode, OpenUITextNode, findUnsupportedOpenUINode, validateOpenUIJsonArtifact, validateOpenUIJsonNode } from "./openui.js";
|
|
18
|
-
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-
|
|
18
|
+
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-CeZgMx53.js";
|
|
19
19
|
import { i as useEventStream, n as AgentStreamSource, r as EventStreamHandlers, t as AgentStreamOpener } from "./event-stream-DNEbvx4s.js";
|
|
20
20
|
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";
|
|
21
21
|
import { n as filterFileNodes, t as fileTreeFromPaths } from "./index-CrN4d8gd.js";
|
package/dist/index.js
CHANGED
|
@@ -15,7 +15,7 @@ import { n as FileBreadcrumb, t as CodeView } from "./code-view-BlhCS1SD.js";
|
|
|
15
15
|
import { n as PreviewView, t as EmbeddedAppView } from "./embedded-app-view-DXsoPale.js";
|
|
16
16
|
import { OPENUI_NODE_JSON_SCHEMA, OPENUI_NODE_TYPES, OpenUIArtifactRenderer, findUnsupportedOpenUINode, validateOpenUIJsonArtifact, validateOpenUIJsonNode } from "./openui.js";
|
|
17
17
|
import { S as ReasoningLevelPicker, _ as modelProvider, a as ChatMessage, b as DEFAULT_REASONING_LEVEL_OPTIONS, c as SpeakerHeader, d as UserMessage, f as agentTimelineStepKind, g as ArtifactAgentDock, h as partitionBySpeaker, i as ChatContainer, l as TRANSCRIPT_TEXT, m as isViewerMessage, n as AgentTimelineColumn, o as MessageAuthor, p as foldSummary, r as AgentTimelineStep, s as MessageList, t as AgentTimeline, u as ThinkingIndicator, v as snapHarnessToModel, x as HARNESS_REASONING_OPTIONS, y as AgentProfilePicker } from "./chat-BrlLa4rg.js";
|
|
18
|
-
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-
|
|
18
|
+
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-DtoQ3tio.js";
|
|
19
19
|
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";
|
|
20
20
|
import { n as Conversation, t as AgentTree } from "./AgentTree-D4d06rfH.js";
|
|
21
21
|
import { t as withPrompts } from "./record-C-EUpK-n.js";
|
package/dist/run/live.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
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-DtoQ3tio.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.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
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-
|
|
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-CeZgMx53.js";
|
|
2
2
|
import { i as useEventStream, n as AgentStreamSource, r as EventStreamHandlers, t as AgentStreamOpener } from "./event-stream-DNEbvx4s.js";
|
|
3
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
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,5 +1,5 @@
|
|
|
1
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-
|
|
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-DtoQ3tio.js";
|
|
3
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
4
|
import { n as Conversation, t as AgentTree } from "./AgentTree-D4d06rfH.js";
|
|
5
5
|
import { t as withPrompts } from "./record-C-EUpK-n.js";
|
|
@@ -305,9 +305,9 @@ function useAgentStream(url, openEventSource, history) {
|
|
|
305
305
|
const { state, current, update, beginning, begin, reload, pageReader } = useAgentWindow(url, history);
|
|
306
306
|
const streamUrl = useCallback(() => {
|
|
307
307
|
const target = new URL(url, location.href);
|
|
308
|
-
if (
|
|
308
|
+
if (current.current.generation !== void 0) target.searchParams.set("generation", String(current.current.generation));
|
|
309
309
|
return target.toString();
|
|
310
|
-
}, [url
|
|
310
|
+
}, [url]);
|
|
311
311
|
useEventStream(!url || history && (!state.ready || state.ended || state.reading || beginning || !history.alive) ? void 0 : streamUrl, {
|
|
312
312
|
opener: openEventSource,
|
|
313
313
|
after: () => current.current.lastSeq,
|
|
@@ -482,7 +482,7 @@ function agentGraphAt(spans, byId, at, epoch, cards, extraEdges = []) {
|
|
|
482
482
|
* streaming in a right-hand drawer, and the page's code workspace and scoreboard following the time cursor. Scrubbing is time travel:
|
|
483
483
|
* every panel shows what was true at the cursor, and the conversation shows what had been said by then.
|
|
484
484
|
*/
|
|
485
|
-
function TraceWorkspace({ trace, streamUrl, openEventSource, events, onTimeChange, files, scoreboard, selectedAgentId, conversationOpen, onSelectAgent, agentCards, agentGraph, className, ...waterfall }) {
|
|
485
|
+
function TraceWorkspace({ trace, streamUrl, openEventSource, events, onTimeChange, files, scoreboard, selectedAgentId, conversationOpen, onSelectAgent, renderAgentDrawer, agentCards, agentGraph, className, ...waterfall }) {
|
|
486
486
|
const byId = useMemo(() => new Map(trace.spans.flatMap((span) => span.id ? [[span.id, span]] : [])), [trace]);
|
|
487
487
|
const [ownSelection, setOwnSelection] = useState();
|
|
488
488
|
const selected = selectedAgentId ?? ownSelection;
|
|
@@ -493,6 +493,7 @@ function TraceWorkspace({ trace, streamUrl, openEventSource, events, onTimeChang
|
|
|
493
493
|
const agent = selected ? byId.get(selected) : void 0, card = selected ? agentCards?.[selected] : void 0;
|
|
494
494
|
const agentId = agent?.id ?? (card ? selected : void 0), agentName = agent?.name ?? card?.label ?? agentId, agentModel = agent?.detail ?? card?.model;
|
|
495
495
|
const showConversation = !!agentId && conversationOpen !== false;
|
|
496
|
+
const detail = showConversation && agentId ? renderAgentDrawer?.(agentId) : void 0;
|
|
496
497
|
const { defaultLayout = "tree", ...graphOptions } = agentGraph ?? {};
|
|
497
498
|
const [graphLayout, setGraphLayout] = useState(defaultLayout);
|
|
498
499
|
const [cursor, setCursor] = useState(null);
|
|
@@ -642,11 +643,11 @@ function TraceWorkspace({ trace, streamUrl, openEventSource, events, onTimeChang
|
|
|
642
643
|
})
|
|
643
644
|
]
|
|
644
645
|
}),
|
|
645
|
-
facts.length > 0 && /* @__PURE__ */
|
|
646
|
+
(facts.length > 0 || detail) && /* @__PURE__ */ jsxs("section", {
|
|
646
647
|
"aria-label": "Recorded agent details",
|
|
647
648
|
tabIndex: 0,
|
|
648
649
|
className: "max-h-[35vh] shrink-0 overflow-y-auto border-b border-border px-3 py-2 text-sm",
|
|
649
|
-
children: /* @__PURE__ */ jsx("dl", {
|
|
650
|
+
children: [facts.length > 0 && /* @__PURE__ */ jsx("dl", {
|
|
650
651
|
className: "space-y-2",
|
|
651
652
|
children: facts.map((fact, index) => /* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsx("dt", {
|
|
652
653
|
className: "text-xs text-muted-foreground",
|
|
@@ -655,7 +656,7 @@ function TraceWorkspace({ trace, streamUrl, openEventSource, events, onTimeChang
|
|
|
655
656
|
className: "m-0 whitespace-pre-wrap break-words",
|
|
656
657
|
children: fact.value
|
|
657
658
|
})] }, index))
|
|
658
|
-
})
|
|
659
|
+
}), detail]
|
|
659
660
|
}),
|
|
660
661
|
/* @__PURE__ */ jsx("div", {
|
|
661
662
|
ref: scroller,
|
package/dist/workspace-viewer.js
CHANGED
|
@@ -41358,7 +41358,7 @@ function SB(e, t) {
|
|
|
41358
41358
|
r
|
|
41359
41359
|
]);
|
|
41360
41360
|
}
|
|
41361
|
-
// dist/trace-workspace-
|
|
41361
|
+
// dist/trace-workspace-DtoQ3tio.js
|
|
41362
41362
|
function CB(e) {
|
|
41363
41363
|
if (e.kind === "pipeline" || e.kind === "model") {
|
|
41364
41364
|
let t = e.detail ? SP(e.detail) : null;
|
|
@@ -41602,8 +41602,8 @@ function NB(e, t) {
|
|
|
41602
41602
|
function PB(e, t, n) {
|
|
41603
41603
|
let { state: r, current: i, update: a, beginning: o, begin: s, reload: c, pageReader: l } = NB(e, n), u = (0, V.useCallback)(() => {
|
|
41604
41604
|
let t = new URL(e, location.href);
|
|
41605
|
-
return
|
|
41606
|
-
}, [e
|
|
41605
|
+
return i.current.generation !== void 0 && t.searchParams.set("generation", String(i.current.generation)), t.toString();
|
|
41606
|
+
}, [e]);
|
|
41607
41607
|
SB(!e || n && (!r.ready || r.ended || r.reading || o || !n.alive) ? void 0 : u, {
|
|
41608
41608
|
opener: t,
|
|
41609
41609
|
after: () => i.current.lastSeq,
|
|
@@ -41761,57 +41761,57 @@ function IB(e, t, n, i, a, s = []) {
|
|
|
41761
41761
|
edges: l
|
|
41762
41762
|
};
|
|
41763
41763
|
}
|
|
41764
|
-
function LB({ trace: e, streamUrl: t, openEventSource: n, events: r, onTimeChange: i, files: a, scoreboard: o, selectedAgentId: c, conversationOpen: l, onSelectAgent: u,
|
|
41765
|
-
let
|
|
41766
|
-
|
|
41767
|
-
},
|
|
41768
|
-
if (
|
|
41769
|
-
let e =
|
|
41770
|
-
return
|
|
41764
|
+
function LB({ trace: e, streamUrl: t, openEventSource: n, events: r, onTimeChange: i, files: a, scoreboard: o, selectedAgentId: c, conversationOpen: l, onSelectAgent: u, renderAgentDrawer: d, agentCards: f, agentGraph: p, className: h, ...g }) {
|
|
41765
|
+
let _ = (0, V.useMemo)(() => new Map(e.spans.flatMap((e) => e.id ? [[e.id, e]] : [])), [e]), [v, y] = (0, V.useState)(), b = c ?? v, S = (e) => {
|
|
41766
|
+
y(e), u?.(e);
|
|
41767
|
+
}, C = b ? _.get(b) : void 0, w = b ? f?.[b] : void 0, T = C?.id ?? (w ? b : void 0), E = C?.name ?? w?.label ?? T, D = C?.detail ?? w?.model, O = !!T && l !== !1, k = O && T ? d?.(T) : void 0, { defaultLayout: A = "tree", ...ee } = p ?? {}, [j, te] = (0, V.useState)(A), [M, P] = (0, V.useState)(null), F = PB(b && t ? t(b) : void 0, n), ne = (0, V.useMemo)(() => {
|
|
41768
|
+
if (g.startedAt !== void 0) return g.startedAt;
|
|
41769
|
+
let e = F.entries[0]?.at;
|
|
41770
|
+
return C && e !== void 0 ? e - C.startMs : void 0;
|
|
41771
41771
|
}, [
|
|
41772
|
-
|
|
41773
|
-
|
|
41774
|
-
|
|
41775
|
-
]),
|
|
41772
|
+
g.startedAt,
|
|
41773
|
+
C,
|
|
41774
|
+
F.entries
|
|
41775
|
+
]), re = (0, V.useMemo)(() => IB(e.spans, _, M, g.startedAt, f, p?.edges), [
|
|
41776
41776
|
e,
|
|
41777
|
-
|
|
41778
|
-
|
|
41779
|
-
|
|
41780
|
-
|
|
41781
|
-
|
|
41782
|
-
]),
|
|
41783
|
-
for (let [e, t] of [["Recorded result",
|
|
41777
|
+
_,
|
|
41778
|
+
M,
|
|
41779
|
+
g.startedAt,
|
|
41780
|
+
f,
|
|
41781
|
+
p?.edges
|
|
41782
|
+
]), ie = re.nodes.find((e) => e.id === T), ae = M === null || C && C.endMs <= M ? [...C?.facts ?? []] : [];
|
|
41783
|
+
for (let [e, t] of [["Recorded result", ie?.result], ["Activity", ie?.turn]]) t && !ae.some((e) => e.value === t) && ae.push({
|
|
41784
41784
|
label: e,
|
|
41785
41785
|
value: t
|
|
41786
41786
|
});
|
|
41787
|
-
let
|
|
41788
|
-
identity:
|
|
41789
|
-
content:
|
|
41787
|
+
let oe = M !== null && g.startedAt !== void 0 ? g.startedAt + M : void 0, se = M === null || ne === void 0 ? F.entries : F.entries.filter((e) => e.at - ne <= M), ce = F.alive && !F.error && M === null, I = (0, V.useMemo)(() => sz(se, ce), [se, ce]), le = (0, V.useRef)(null), { unseen: ue, jump: de } = GR(le, {
|
|
41788
|
+
identity: O ? b : void 0,
|
|
41789
|
+
content: I
|
|
41790
41790
|
});
|
|
41791
41791
|
return /* @__PURE__ */ (0, U.jsxs)("div", {
|
|
41792
|
-
className: s("sandbox-trace-workspace flex min-h-0 flex-col gap-3",
|
|
41792
|
+
className: s("sandbox-trace-workspace flex min-h-0 flex-col gap-3", h),
|
|
41793
41793
|
children: [
|
|
41794
41794
|
/* @__PURE__ */ (0, U.jsx)("div", {
|
|
41795
|
-
className:
|
|
41795
|
+
className: O ? "min-w-0 lg:mr-[420px]" : "min-w-0",
|
|
41796
41796
|
children: /* @__PURE__ */ (0, U.jsx)(wB, {
|
|
41797
|
-
...
|
|
41797
|
+
...g,
|
|
41798
41798
|
trace: e,
|
|
41799
41799
|
markers: r,
|
|
41800
|
-
selectedId:
|
|
41801
|
-
onDeselect: () =>
|
|
41800
|
+
selectedId: T,
|
|
41801
|
+
onDeselect: () => S(void 0),
|
|
41802
41802
|
onSelect: (e) => {
|
|
41803
|
-
let t = FB(e,
|
|
41804
|
-
t?.id &&
|
|
41803
|
+
let t = FB(e, _);
|
|
41804
|
+
t?.id && S(t.id);
|
|
41805
41805
|
},
|
|
41806
41806
|
onTimeChange: (e) => {
|
|
41807
|
-
|
|
41807
|
+
P(e), i?.(e);
|
|
41808
41808
|
},
|
|
41809
41809
|
latestEvents: /* @__PURE__ */ (0, U.jsx)(N, {
|
|
41810
|
-
agents:
|
|
41811
|
-
now:
|
|
41812
|
-
live:
|
|
41813
|
-
selectedId:
|
|
41814
|
-
onSelect:
|
|
41810
|
+
agents: re.nodes,
|
|
41811
|
+
now: oe,
|
|
41812
|
+
live: M === null,
|
|
41813
|
+
selectedId: T,
|
|
41814
|
+
onSelect: S
|
|
41815
41815
|
}),
|
|
41816
41816
|
graph: /* @__PURE__ */ (0, U.jsxs)("section", {
|
|
41817
41817
|
className: "flex h-[60vh] min-h-[480px] flex-col",
|
|
@@ -41820,8 +41820,8 @@ function LB({ trace: e, streamUrl: t, openEventSource: n, events: r, onTimeChang
|
|
|
41820
41820
|
className: "flex h-8 shrink-0 items-center justify-end gap-2 px-3 text-xs text-muted-foreground",
|
|
41821
41821
|
children: ["Layout", /* @__PURE__ */ (0, U.jsxs)("select", {
|
|
41822
41822
|
"aria-label": "Graph layout",
|
|
41823
|
-
value:
|
|
41824
|
-
onChange: (e) =>
|
|
41823
|
+
value: j,
|
|
41824
|
+
onChange: (e) => te(e.currentTarget.value),
|
|
41825
41825
|
className: "rounded-[var(--radius-control)] border border-border bg-card px-2 py-1 text-foreground",
|
|
41826
41826
|
children: [/* @__PURE__ */ (0, U.jsx)("option", {
|
|
41827
41827
|
value: "tree",
|
|
@@ -41832,22 +41832,22 @@ function LB({ trace: e, streamUrl: t, openEventSource: n, events: r, onTimeChang
|
|
|
41832
41832
|
})]
|
|
41833
41833
|
})]
|
|
41834
41834
|
}), /* @__PURE__ */ (0, U.jsx)(bR, {
|
|
41835
|
-
...
|
|
41836
|
-
layout:
|
|
41835
|
+
...ee,
|
|
41836
|
+
layout: j,
|
|
41837
41837
|
renderEventIcon: (e) => uz(e.label),
|
|
41838
|
-
nodes:
|
|
41839
|
-
edges:
|
|
41840
|
-
selectedId:
|
|
41841
|
-
onSelect:
|
|
41838
|
+
nodes: re.nodes,
|
|
41839
|
+
edges: re.edges,
|
|
41840
|
+
selectedId: T ?? null,
|
|
41841
|
+
onSelect: S,
|
|
41842
41842
|
showLatestEvents: !1,
|
|
41843
|
-
now:
|
|
41844
|
-
live:
|
|
41843
|
+
now: oe,
|
|
41844
|
+
live: M === null && re.nodes.some((e) => [
|
|
41845
41845
|
"running",
|
|
41846
41846
|
"waiting",
|
|
41847
41847
|
"needs-you",
|
|
41848
41848
|
"failed"
|
|
41849
41849
|
].includes(e.status)),
|
|
41850
|
-
className: s("min-h-0 flex-1",
|
|
41850
|
+
className: s("min-h-0 flex-1", ee.className)
|
|
41851
41851
|
})]
|
|
41852
41852
|
})
|
|
41853
41853
|
})
|
|
@@ -41862,10 +41862,10 @@ function LB({ trace: e, streamUrl: t, openEventSource: n, events: r, onTimeChang
|
|
|
41862
41862
|
className: "overflow-hidden rounded-xl border border-border bg-card",
|
|
41863
41863
|
children: o
|
|
41864
41864
|
}),
|
|
41865
|
-
|
|
41866
|
-
"aria-label": `${
|
|
41865
|
+
O && /* @__PURE__ */ (0, U.jsxs)("aside", {
|
|
41866
|
+
"aria-label": `${E} conversation`,
|
|
41867
41867
|
onKeyDown: (e) => {
|
|
41868
|
-
e.key === "Escape" &&
|
|
41868
|
+
e.key === "Escape" && S(void 0);
|
|
41869
41869
|
},
|
|
41870
41870
|
className: "fixed inset-y-0 right-0 z-40 flex w-full max-w-[420px] flex-col border-l border-border bg-card shadow-2xl",
|
|
41871
41871
|
children: [
|
|
@@ -41873,25 +41873,25 @@ function LB({ trace: e, streamUrl: t, openEventSource: n, events: r, onTimeChang
|
|
|
41873
41873
|
className: "flex shrink-0 items-center gap-2 border-b border-border px-3 py-2",
|
|
41874
41874
|
children: [
|
|
41875
41875
|
/* @__PURE__ */ (0, U.jsx)("span", {
|
|
41876
|
-
className: s("h-1.5 w-1.5 shrink-0 rounded-full",
|
|
41876
|
+
className: s("h-1.5 w-1.5 shrink-0 rounded-full", ce ? "bg-[var(--surface-info-text)]" : "bg-muted-foreground"),
|
|
41877
41877
|
"aria-hidden": !0,
|
|
41878
|
-
"data-motion":
|
|
41879
|
-
style:
|
|
41878
|
+
"data-motion": ce ? "essential" : void 0,
|
|
41879
|
+
style: ce ? x : void 0,
|
|
41880
41880
|
onAnimationStart: m
|
|
41881
41881
|
}),
|
|
41882
41882
|
/* @__PURE__ */ (0, U.jsx)("h3", {
|
|
41883
41883
|
className: "min-w-0 flex-1 truncate text-sm font-semibold",
|
|
41884
|
-
children:
|
|
41884
|
+
children: E
|
|
41885
41885
|
}),
|
|
41886
|
-
|
|
41886
|
+
D && /* @__PURE__ */ (0, U.jsx)("span", {
|
|
41887
41887
|
className: "truncate text-xs text-muted-foreground",
|
|
41888
|
-
children:
|
|
41888
|
+
children: D
|
|
41889
41889
|
}),
|
|
41890
41890
|
/* @__PURE__ */ (0, U.jsx)("button", {
|
|
41891
41891
|
type: "button",
|
|
41892
41892
|
"aria-label": "Close conversation",
|
|
41893
41893
|
title: "Close (Esc)",
|
|
41894
|
-
onClick: () =>
|
|
41894
|
+
onClick: () => S(void 0),
|
|
41895
41895
|
className: "shrink-0 rounded-md p-1 text-muted-foreground hover:bg-muted hover:text-foreground",
|
|
41896
41896
|
children: /* @__PURE__ */ (0, U.jsx)(Wr, {
|
|
41897
41897
|
"aria-hidden": !0,
|
|
@@ -41900,40 +41900,40 @@ function LB({ trace: e, streamUrl: t, openEventSource: n, events: r, onTimeChang
|
|
|
41900
41900
|
})
|
|
41901
41901
|
]
|
|
41902
41902
|
}),
|
|
41903
|
-
|
|
41903
|
+
(ae.length > 0 || k) && /* @__PURE__ */ (0, U.jsxs)("section", {
|
|
41904
41904
|
"aria-label": "Recorded agent details",
|
|
41905
41905
|
tabIndex: 0,
|
|
41906
41906
|
className: "max-h-[35vh] shrink-0 overflow-y-auto border-b border-border px-3 py-2 text-sm",
|
|
41907
|
-
children: /* @__PURE__ */ (0, U.jsx)("dl", {
|
|
41907
|
+
children: [ae.length > 0 && /* @__PURE__ */ (0, U.jsx)("dl", {
|
|
41908
41908
|
className: "space-y-2",
|
|
41909
|
-
children:
|
|
41909
|
+
children: ae.map((e, t) => /* @__PURE__ */ (0, U.jsxs)("div", { children: [/* @__PURE__ */ (0, U.jsx)("dt", {
|
|
41910
41910
|
className: "text-xs text-muted-foreground",
|
|
41911
41911
|
children: e.label
|
|
41912
41912
|
}), /* @__PURE__ */ (0, U.jsx)("dd", {
|
|
41913
41913
|
className: "m-0 whitespace-pre-wrap break-words",
|
|
41914
41914
|
children: e.value
|
|
41915
41915
|
})] }, t))
|
|
41916
|
-
})
|
|
41916
|
+
}), k]
|
|
41917
41917
|
}),
|
|
41918
41918
|
/* @__PURE__ */ (0, U.jsx)("div", {
|
|
41919
|
-
ref:
|
|
41919
|
+
ref: le,
|
|
41920
41920
|
"data-primary-content": "",
|
|
41921
41921
|
className: "min-h-0 flex-1 overflow-y-auto px-3 py-2",
|
|
41922
|
-
children: t && (
|
|
41923
|
-
items:
|
|
41924
|
-
isThinking:
|
|
41922
|
+
children: t && (M === null || ne !== void 0) ? /* @__PURE__ */ (0, U.jsx)(WR, {
|
|
41923
|
+
items: I,
|
|
41924
|
+
isThinking: ce && I.length === 0,
|
|
41925
41925
|
emptyState: /* @__PURE__ */ (0, U.jsx)("p", {
|
|
41926
41926
|
className: "p-4 text-sm text-muted-foreground",
|
|
41927
|
-
children:
|
|
41927
|
+
children: F.error ?? "No messages yet."
|
|
41928
41928
|
})
|
|
41929
41929
|
}) : /* @__PURE__ */ (0, U.jsx)("p", {
|
|
41930
41930
|
className: "p-4 text-sm text-muted-foreground",
|
|
41931
41931
|
children: "Conversation: not time-indexed"
|
|
41932
41932
|
})
|
|
41933
41933
|
}),
|
|
41934
|
-
|
|
41934
|
+
ue && /* @__PURE__ */ (0, U.jsx)("button", {
|
|
41935
41935
|
type: "button",
|
|
41936
|
-
onClick: () =>
|
|
41936
|
+
onClick: () => de(),
|
|
41937
41937
|
className: "absolute bottom-3 left-1/2 -translate-x-1/2 rounded-full border border-border bg-background px-3 py-1 text-xs shadow-sm",
|
|
41938
41938
|
children: "New output"
|
|
41939
41939
|
})
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tangle-network/sandbox-ui",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "5.0.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "Unified UI component library for Tangle Sandbox — primitives, chat, dashboard, terminal, editor, and workspace components",
|
|
6
6
|
"repository": {
|
|
@@ -234,7 +234,7 @@
|
|
|
234
234
|
},
|
|
235
235
|
"dependencies": {
|
|
236
236
|
"@lobehub/icons-static-svg": "^1.98.0",
|
|
237
|
-
"@pierre/diffs": "
|
|
237
|
+
"@pierre/diffs": ">=1.6.1 <1.6.3",
|
|
238
238
|
"@radix-ui/react-dialog": "^1.3.1",
|
|
239
239
|
"@radix-ui/react-dropdown-menu": "^2.2.1",
|
|
240
240
|
"@radix-ui/react-select": "^2.4.1",
|