@tangle-network/sandbox-ui 2.0.19 → 2.0.21

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.js CHANGED
@@ -1,8 +1,9 @@
1
1
  import { $ as ContextMenuShortcut, $n as TabsContent, $t as Popover, A as Card, An as SheetHeader, Ar as seriesAreaPath, At as DropdownMenuSubTrigger, B as CollapsibleContent, Bn as StatCard, Br as TangleKnot, Bt as HoverCardHeader, C as BreadcrumbLink, Cn as SettingsRow, Cr as fieldMessageId, Ct as DropdownMenuPortal, D as Button, Dn as SheetContent, Dr as normalizeSeries, Dt as DropdownMenuShortcut, E as BreadcrumbSeparator, En as SheetClose, Er as localToday, Et as DropdownMenuSeparator, F as CardTitle, Fn as SidebarDropZone, Fr as toneFor, Ft as Heading, G as ContextMenuContent, Gn as TableBody, Gt as Input, H as ComplianceBadge, Hn as Switch, Ht as HoverCardTrigger, I as Checkbox, In as Skeleton, Ir as useTheme, It as HelpText, J as ContextMenuLabel, Jn as TableFooter, Jt as MetricChart, K as ContextMenuGroup, Kn as TableCaption, Kt as Label, L as Chip, Ln as SkeletonCard, Lr as useToast, Lt as HoverCard, M as CardDescription, Mn as SheetPortal, Mr as seriesLinePath, Mt as EmptyState, N as CardFooter, Nn as SheetTitle, Nr as seriesMean, Nt as Field, O as CATEGORY_TONES, On as SheetDescription, Or as parseCalendarDate, Ot as DropdownMenuSub, P as CardHeader, Pn as SheetTrigger, Pr as seriesScale, Pt as FilterField, Q as ContextMenuSeparator, Qn as Tabs, Qt as Pagination, R as CodeBlock, Rn as SkeletonTable, Rr as SectionTitle, Rt as HoverCardContent, S as BreadcrumbItem, Sn as SettingsNote, Sr as buttonVariants, St as DropdownMenuLabel, T as BreadcrumbPage, Tn as Sheet, Tr as initialsOf, Tt as DropdownMenuRadioItem, U as ContextMenu, Un as TONE_CLASSES, Ut as IconTile, V as CollapsibleTrigger, Vn as StatusPill, Vt as HoverCardTitle, W as ContextMenuCheckboxItem, Wn as Table, Wt as InlineCode, X as ContextMenuRadioGroup, Xn as TableHeader, Xt as PageHeader, Y as ContextMenuPortal, Yn as TableHead, Yt as MetricStrip, Z as ContextMenuRadioItem, Zn as TableRow, Zt as PageShell, _ as AvatarFallback, _n as SelectValue, _r as TooltipTrigger, _t as DropdownMenu, a as AlertDialogCancel, an as RadioGroup, ar as TerminalInput, at as DatePicker, b as Breadcrumb, bn as SettingsList, br as WizardStep, bt as DropdownMenuGroup, c as AlertDialogFooter, cn as Select, cr as Textarea, ct as DialogContent, d as AlertDialogPortal, dn as SelectItem, dr as ToastContainer, dt as DialogHeader, en as PopoverAnchor, er as TabsList, et as ContextMenuSub, f as AlertDialogTitle, fn as SelectLabel, fr as ToastProvider, ft as DialogOverlay, g as Avatar, gn as SelectTrigger, gr as TooltipProvider, gt as DropZone, h as ArtifactPane, hn as SelectSeparator, hr as TooltipContent, ht as DialogTrigger, i as AlertDialogAction, in as Progress, ir as TerminalDisplay, it as CopyButton, j as CardContent, jn as SheetOverlay, jr as seriesExtent, jt as DropdownMenuTrigger, k as Calendar, kn as SheetFooter, kr as periodDelta, kt as DropdownMenuSubContent, l as AlertDialogHeader, ln as SelectContent, lr as ThemeToggle, lt as DialogDescription, m as AlertTitle, mn as SelectScrollUpButton, mr as Tooltip, mt as DialogTitle, n as AlertDescription, nn as PopoverContent, nr as Tag, nt as ContextMenuSubTrigger, o as AlertDialogContent, on as RadioGroupItem, or as TerminalLine, ot as Dialog, p as AlertDialogTrigger, pn as SelectScrollDownButton, pr as Toolbar, pt as DialogPortal, q as ContextMenuItem, qn as TableCell, qt as Metric, r as AlertDialog, rn as PopoverTrigger, rr as TerminalCursor, rt as ContextMenuTrigger, s as AlertDialogDescription, sn as SegmentedControl, sr as TextShimmer, st as DialogClose, t as Alert, tn as PopoverClose, tr as TabsTrigger, tt as ContextMenuSubContent, u as AlertDialogOverlay, un as SelectGroup, ur as TimeSelect, ut as DialogFooter, v as AvatarImage, vn as Separator, vr as UploadProgress, vt as DropdownMenuCheckboxItem, w as BreadcrumbList, wn as SettingsSection, wr as formatCalendarDate, wt as DropdownMenuRadioGroup, x as BreadcrumbEllipsis, xn as SettingsListItem, xr as badgeVariants, xt as DropdownMenuItem, y as Badge, yn as SeriesSparkline, yr as Wizard, yt as DropdownMenuContent, z as Collapsible, zn as Slider, zr as Logo, zt as HoverCardDescription } from "./primitives-znfPK9NP.js";
2
2
  import { i as WorkspacePaneHeader, n as SHELL_INSET_GUTTER, r as ShellHeader, t as SHELL_HEADER_HEIGHT } from "./shell-header-CwqDzC4I.js";
3
- import { S as WorkspaceSurfaceTitle, _ as StatusBanner, a as SandboxWorkbench, b as WorkspaceSurface, c as shellShouldRevalidate, d as dispatchSessionCreated, f as useOptimisticSessionItems, g as StatusBar, h as TerminalPanel, i as TaskBoard, l as SessionSidebar, m as RuntimePane, n as ApprovalQueue, o as WorkspaceArtifactView, p as formatRelativeAge, r as CalendarView, s as createShellShouldRevalidate, u as SESSION_CREATED_EVENT, v as DirectoryPane, x as WorkspaceSurfaceFrame, y as WorkspaceLayout } from "./workspace-CzikYt_y.js";
4
- import { i as VaultTree, n as filterFileNodes, r as VAULT_TREE_CHILD_PAGE, t as fileTreeFromPaths } from "./tree-data-C8CNt4WE.js";
5
- import { t as WorkspaceFilesPane } from "./workspace-files-pane-DB9Nvwh4.js";
3
+ import { S as WorkspaceSurfaceTitle, _ as StatusBanner, a as SandboxWorkbench, b as WorkspaceSurface, c as shellShouldRevalidate, d as dispatchSessionCreated, f as useOptimisticSessionItems, g as StatusBar, h as TerminalPanel, i as TaskBoard, l as SessionSidebar, m as RuntimePane, n as ApprovalQueue, o as WorkspaceArtifactView, p as formatRelativeAge, r as CalendarView, s as createShellShouldRevalidate, u as SESSION_CREATED_EVENT, v as DirectoryPane, x as WorkspaceSurfaceFrame, y as WorkspaceLayout } from "./workspace--GvnZNpH.js";
4
+ import { t as VirtualList } from "./VirtualList-DLh2JE0F.js";
5
+ import { i as VaultTree, n as filterFileNodes, r as VAULT_TREE_CHILD_PAGE, t as fileTreeFromPaths } from "./tree-data-B_IXAIgg.js";
6
+ import { t as WorkspaceFilesPane } from "./workspace-files-pane-C0PeY6rY.js";
6
7
  import { $ as useSidebar, A as parseInsufficientBalance, B as SidebarPanel, C as SandboxStatusPill, D as ResourceMeter, E as ResourceSnapshot, F as RailHeader, G as SidebarRailNav, H as SidebarPanelHeader, I as RailModeButton, J as SIDEBAR_PANEL_WIDTH, K as RailTooltip, L as RailSeparator, M as RailButton, N as RailExpandable, O as INSUFFICIENT_BALANCE_CODE, P as RailFlyout, Q as SidebarProvider, R as Sidebar, S as SANDBOX_STATUS, T as ActivityFeed, U as SidebarRail, V as SidebarPanelContent, W as SidebarRailFooter, X as SIDEBAR_RAIL_WIDTH, Y as SIDEBAR_RAIL_LABELED_WIDTH, Z as SIDEBAR_TOTAL_WIDTH, _ as BackendSelector, a as PortsList, b as SandboxCard, c as SystemLogsViewer, d as DashboardLayout, f as HARNESS_OPTIONS, g as HarnessLogo, h as HARNESS_BRAND, i as TemplateCard, j as ProfileAvatar, k as OutOfCreditsModal, l as MetricAreaChart, m as chatCapableHarnesses, n as SnapshotList, o as GitPanel, p as HarnessPicker, q as SIDEBAR_MOBILE_WIDTH, r as ProcessList, s as UsageSummary, t as PromoBanner, u as SidebarLayout, v as SandboxTable, w as sandboxStatus, x as canAdminSandbox, y as NewSandboxCard, z as SidebarContent } from "./dashboard-exTS8tta.js";
7
8
  import { i as modelBrandFor, n as ProviderMark, r as canonicalModelId, t as ModelBrandStack } from "./model-brand-BQlarCIo.js";
8
9
  import { a as formatPrice, i as PricingPage, n as SandboxPageShell, o as BillingDashboard, r as UsageChart, t as DashboardPageHeader } from "./page-layout-CuOpvZys.js";
@@ -14,8 +15,8 @@ import { n as FileBreadcrumb, t as CodeView } from "./code-view-BlhCS1SD.js";
14
15
  import { n as PreviewView, t as EmbeddedAppView } from "./embedded-app-view-DXsoPale.js";
15
16
  import { OPENUI_NODE_JSON_SCHEMA, OPENUI_NODE_TYPES, OpenUIArtifactRenderer, findUnsupportedOpenUINode, validateOpenUIJsonArtifact, validateOpenUIJsonNode } from "./openui.js";
16
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-BU39pb2j.js";
17
- import { a as TraceWaterfall, i as useAgentStream, n as LatestEvents, o as traceSpanMark, r as foldAgentRows, t as TraceWorkspace } from "./trace-workspace-C8dHRBDV.js";
18
- import { a as VirtualList, i as model_exports, n as Conversation, r as indexRecord, t as withPrompts } from "./record-Bqt1kE_Q.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-DkakKRLV.js";
19
+ import { a as model_exports, i as indexRecord, n as withPrompts, r as Conversation, t as AgentTree } from "./record-CnxPRyxC.js";
19
20
  import { ApprovalCard, ApprovalDiffSummary, ExpandedToolDetail, InlineThinkingItem, InlineToolItem, LiveDuration, RunGroup, RunPhaseList, RunRowShell, RunRowStatusDot, RunStatusIcon, TaskList, ToolCallFeed, parseToolEvent, runStatus, showsTaskPriority, statusMeta, taskProgress, taskStatus } from "./run.js";
20
21
  import "./vault-tree.js";
21
22
  import { a as TangleLoginButton, i as UserMenu, n as GitHubLoginButton, r as LoginLayout, t as AuthHeader } from "./auth-BDpoZ_2f.js";
@@ -28,4 +29,4 @@ import { TOOL_CATEGORY_ICONS, cn, copyText, focusField, focusFieldInvalid, focus
28
29
  import { TerminalCursor as TerminalDisplayCursor, TerminalInput as TerminalDisplayInput, TerminalLine as TerminalDisplayLine } from "@tangle-network/ui/primitives";
29
30
  import { ApiSchema, CodeBlock as CodeBlockDisplay, Markdown, codeBlockGrammar, fenceInfo, getSanitizedMarkdownHeadingIdFromRawFragment, numericColumns, tableCsv } from "@tangle-network/ui/markdown";
30
31
  import { CommandPreview, DiffPreview, GlobResultsPreview, GrepResultsPreview, QuestionPreview, WebSearchPreview, WriteFilePreview } from "@tangle-network/ui/tool-previews";
31
- export { ActivityFeed, AgentMessagingConnection, AgentProfilePicker, AgentTimeline, AgentTimelineColumn, AgentTimelineStep, Alert, AlertDescription, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, AlertTitle, ApiSchema, ApprovalCard, ApprovalDiffSummary, ApprovalQueue, ArtifactAgentDock, ArtifactPane, AuthHeader, Avatar, AvatarFallback, AvatarImage, BackendSelector, Badge, BillingDashboard, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Button, CATEGORY_TONES, CODE_THEME, CSV_PREVIEW_ROW_LIMIT, Calendar, CalendarView, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, ChangesPane, ChatContainer, ChatMessage, Checkbox, Chip, CodeBlock, CodeBlockDisplay, CodeSurface, CodeView, Collapsible, CollapsibleContent, CollapsibleTrigger, CommandPreview, ComplianceBadge, ContextMenu, ContextMenuCheckboxItem, ContextMenuContent, ContextMenuGroup, ContextMenuItem, ContextMenuLabel, ContextMenuPortal, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuShortcut, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuTrigger, Conversation, CopyButton, DEFAULT_REASONING_LEVEL_OPTIONS, DashboardLayout, DashboardPageHeader, DatePicker, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DiffPreview, DiffStatsBadge, DiffView, DirectoryPane, DropZone, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, EmbeddedAppView, EmptyState, ExpandedToolDetail, Field, FileArtifactPane, FileBreadcrumb, FileCard, FileList, FilePreview, FileTabs, FileTree, FilterField, GitHubLoginButton, GitPanel, GitStatusBadge, GlobResultsPreview, GrepResultsPreview, HARNESS_BRAND, HARNESS_OPTIONS, HARNESS_REASONING_OPTIONS, HarnessLogo, HarnessPicker, Heading, HelpText, HoverCard, HoverCardContent, HoverCardDescription, HoverCardHeader, HoverCardTitle, HoverCardTrigger, INSUFFICIENT_BALANCE_CODE, IconTile, InlineCode, InlineThinkingItem, InlineToolItem, Input, Label, LatestEvents, LiveDuration, LoginLayout, Logo, Markdown, MessageAuthor, MessageList, Metric, MetricAreaChart, MetricChart, MetricStrip, ModelBrandStack, NewSandboxCard, OPENUI_NODE_JSON_SCHEMA, OPENUI_NODE_TYPES, OpenUIArtifactRenderer, OutOfCreditsModal, PageHeader, PageShell, Pagination, PanelHeader, PdfViewer, PillTabs, Popover, PopoverAnchor, PopoverClose, PopoverContent, PopoverTrigger, PortsList, PreviewView, PricingPage, ProcessList, ProfileAvatar, Progress, PromoBanner, ProviderMark, QuestionPreview, RadioGroup, RadioGroupItem, RailButton, RailExpandable, RailFlyout, RailHeader, RailModeButton, RailSeparator, RailTooltip, RealtimeSessionRegistry, ReasoningLevelPicker, ResourceMeter, ResourceSnapshot, RichFileTree, RunGroup, RunPhaseList, RunRowShell, RunRowStatusDot, RunStatusIcon, RuntimePane, SANDBOX_STATUS, SESSION_CREATED_EVENT, SHELL_HEADER_HEIGHT, SHELL_INSET_GUTTER, SIDEBAR_MOBILE_WIDTH, SIDEBAR_PANEL_WIDTH, SIDEBAR_RAIL_LABELED_WIDTH, SIDEBAR_RAIL_WIDTH, SIDEBAR_TOTAL_WIDTH, SandboxArtifactPane, SandboxCard, SandboxPageShell, SandboxStatusPill, SandboxTable, SandboxWorkbench, SectionTitle, SegmentedControl, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, SeriesSparkline, SessionSidebar, SettingsList, SettingsListItem, SettingsNote, SettingsRow, SettingsSection, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger, ShellHeader, Sidebar, SidebarContent, SidebarDropZone, SidebarLayout, SidebarPanel, SidebarPanelContent, SidebarPanelHeader, SidebarProvider, SidebarRail, SidebarRailFooter, SidebarRailNav, Skeleton, SkeletonCard, SkeletonTable, Slider, SnapshotList, SpeakerHeader, StatCard, StatusBanner, StatusBar, StatusPill, Switch, SystemLogsViewer, TONE_CLASSES, TOOL_CATEGORY_ICONS, TRANSCRIPT_TEXT, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Tag, TangleKnot, TangleLoginButton, TaskBoard, TaskList, TemplateCard, TerminalCursor, TerminalDisplay, TerminalDisplayCursor, TerminalDisplayInput, TerminalDisplayLine, TerminalInput, TerminalLine, TerminalPanel, TextShimmer, Textarea, ThemeToggle, ThinkingIndicator, TimeSelect, ToastContainer, ToastProvider, ToolCallFeed, Toolbar, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, TraceWaterfall, TraceWorkspace, UploadProgress, UsageChart, UsageSummary, UserMenu, UserMessage, VAULT_TREE_CHILD_PAGE, VaultTree, VirtualList, WebSearchPreview, Wizard, WizardStep, WorkspaceArtifactView, WorkspaceFilesPane, WorkspaceLayout, WorkspacePaneHeader, WorkspaceSurface, WorkspaceSurfaceFrame, WorkspaceSurfaceTitle, WriteFilePreview, activeSessionsAtom, addMessage, addParts, agentTimelineStepKind, badgeVariants, buildUnifiedPatch, bumpActiveSessionActivity, buttonVariants, canAdminSandbox, canonicalModelId, chatCapableHarnesses, clearChat, cn, codeBlockGrammar, computeDiffStats, configurePdfViewer, connectSession, copyText, createAuthFetcher, createShellShouldRevalidate, detectFileFormat, disconnectSession, dispatchSessionCreated, fenceInfo, fieldMessageId, fileExtension, fileTreeFromPaths, filterFileNodes, filterFileTree, findUnsupportedOpenUINode, focusField, focusFieldInvalid, focusFieldWithin, focusRing, focusRingInset, foldAgentRows, foldSummary, formatBytes, formatCalendarDate, formatDuration, formatPrice, formatRelativeAge, formatUptime, getActiveSession, getAllActiveSessions, getAllProjectActivity, getCodeLanguage, getFormatLabel, getSanitizedMarkdownHeadingIdFromRawFragment, getSessionsByActivity, getSessionsForNavbar, getSessionsForProject, getSyntaxLanguage, getToolCategory, getToolDisplayMetadata, getToolErrorText, getTotalRunningSessionCount, hasBackgroundRunningSessions, indexRecord, initialsOf, isStreamingAtom, isViewerMessage, ixControl, ixControlAfter, ixControlSoft, ixField, ixRow, ixSelected, ixTabUnderline, localToday, messagesAtom, modelBrandFor, modelProvider, normalizeSeries, numericColumns, parseCalendarDate, parseCsv, parseInsufficientBalance, parseToolEvent, partMapAtom, partitionBySpeaker, periodDelta, plainTextFromMarkdown, model_exports as recordModel, registerActiveSession, resetActiveSessions, resolveFilePreviewKind, runStatus, sandboxStatus, seriesAreaPath, seriesExtent, seriesLinePath, seriesMean, seriesScale, sessionAtom, setActiveSessionAttention, setActiveSessionConnection, setActiveSessionError, setActiveSessionRunning, setForegroundActiveSession, shellShouldRevalidate, showsTaskPriority, snapHarnessToModel, statusMeta, tableCsv, taskProgress, taskStatus, timeAgo, toneFor, traceSpanMark, truncateText, unregisterActiveSession, updateActiveSessionMeta, updatePart, useActiveSession, useActiveSessions, useActiveSessionsState, useAgentStream, useApiKey, useAuth, useAutoScroll, useCreateSession, useDeleteSession, useDropdownMenu, useHasBackgroundRunningSessions, useLiveTime, useNavbarSessions, useOptimisticSessionItems, useProjectActivity, useProjectSessions, usePtySession, useRealtimeSession, useRenameSession, useRunCollapseState, useRunGroups, useSSEStream, useSandboxMetrics, useSdkSession, useSessionStream, useSessions, useSessionsByActivity, useSidebar, useSidecarAuth, useTheme, useToast, useToolCallStream, useTotalRunningSessions, validateOpenUIJsonArtifact, validateOpenUIJsonNode, withPrompts };
32
+ export { ActivityFeed, AgentMessagingConnection, AgentProfilePicker, AgentTimeline, AgentTimelineColumn, AgentTimelineStep, AgentTree, Alert, AlertDescription, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, AlertTitle, ApiSchema, ApprovalCard, ApprovalDiffSummary, ApprovalQueue, ArtifactAgentDock, ArtifactPane, AuthHeader, Avatar, AvatarFallback, AvatarImage, BackendSelector, Badge, BillingDashboard, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Button, CATEGORY_TONES, CODE_THEME, CSV_PREVIEW_ROW_LIMIT, Calendar, CalendarView, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, ChangesPane, ChatContainer, ChatMessage, Checkbox, Chip, CodeBlock, CodeBlockDisplay, CodeSurface, CodeView, Collapsible, CollapsibleContent, CollapsibleTrigger, CommandPreview, ComplianceBadge, ContextMenu, ContextMenuCheckboxItem, ContextMenuContent, ContextMenuGroup, ContextMenuItem, ContextMenuLabel, ContextMenuPortal, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuShortcut, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuTrigger, Conversation, CopyButton, DEFAULT_REASONING_LEVEL_OPTIONS, DashboardLayout, DashboardPageHeader, DatePicker, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DiffPreview, DiffStatsBadge, DiffView, DirectoryPane, DropZone, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, EmbeddedAppView, EmptyState, ExpandedToolDetail, Field, FileArtifactPane, FileBreadcrumb, FileCard, FileList, FilePreview, FileTabs, FileTree, FilterField, GitHubLoginButton, GitPanel, GitStatusBadge, GlobResultsPreview, GrepResultsPreview, HARNESS_BRAND, HARNESS_OPTIONS, HARNESS_REASONING_OPTIONS, HarnessLogo, HarnessPicker, Heading, HelpText, HoverCard, HoverCardContent, HoverCardDescription, HoverCardHeader, HoverCardTitle, HoverCardTrigger, INSUFFICIENT_BALANCE_CODE, IconTile, InlineCode, InlineThinkingItem, InlineToolItem, Input, Label, LatestEvents, LiveDuration, LoginLayout, Logo, Markdown, MessageAuthor, MessageList, Metric, MetricAreaChart, MetricChart, MetricStrip, ModelBrandStack, NewSandboxCard, OPENUI_NODE_JSON_SCHEMA, OPENUI_NODE_TYPES, OpenUIArtifactRenderer, OutOfCreditsModal, PageHeader, PageShell, Pagination, PanelHeader, PdfViewer, PillTabs, Popover, PopoverAnchor, PopoverClose, PopoverContent, PopoverTrigger, PortsList, PreviewView, PricingPage, ProcessList, ProfileAvatar, Progress, PromoBanner, ProviderMark, QuestionPreview, RadioGroup, RadioGroupItem, RailButton, RailExpandable, RailFlyout, RailHeader, RailModeButton, RailSeparator, RailTooltip, RealtimeSessionRegistry, ReasoningLevelPicker, ResourceMeter, ResourceSnapshot, RichFileTree, RunGroup, RunPhaseList, RunRowShell, RunRowStatusDot, RunStatusIcon, RuntimePane, SANDBOX_STATUS, SESSION_CREATED_EVENT, SHELL_HEADER_HEIGHT, SHELL_INSET_GUTTER, SIDEBAR_MOBILE_WIDTH, SIDEBAR_PANEL_WIDTH, SIDEBAR_RAIL_LABELED_WIDTH, SIDEBAR_RAIL_WIDTH, SIDEBAR_TOTAL_WIDTH, SandboxArtifactPane, SandboxCard, SandboxPageShell, SandboxStatusPill, SandboxTable, SandboxWorkbench, SectionTitle, SegmentedControl, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, SeriesSparkline, SessionSidebar, SettingsList, SettingsListItem, SettingsNote, SettingsRow, SettingsSection, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger, ShellHeader, Sidebar, SidebarContent, SidebarDropZone, SidebarLayout, SidebarPanel, SidebarPanelContent, SidebarPanelHeader, SidebarProvider, SidebarRail, SidebarRailFooter, SidebarRailNav, Skeleton, SkeletonCard, SkeletonTable, Slider, SnapshotList, SpeakerHeader, StatCard, StatusBanner, StatusBar, StatusPill, Switch, SystemLogsViewer, TONE_CLASSES, TOOL_CATEGORY_ICONS, TRANSCRIPT_TEXT, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Tag, TangleKnot, TangleLoginButton, TaskBoard, TaskList, TemplateCard, TerminalCursor, TerminalDisplay, TerminalDisplayCursor, TerminalDisplayInput, TerminalDisplayLine, TerminalInput, TerminalLine, TerminalPanel, TextShimmer, Textarea, ThemeToggle, ThinkingIndicator, TimeSelect, ToastContainer, ToastProvider, ToolCallFeed, Toolbar, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, TraceWaterfall, TraceWorkspace, UploadProgress, UsageChart, UsageSummary, UserMenu, UserMessage, VAULT_TREE_CHILD_PAGE, VaultTree, VirtualList, WebSearchPreview, Wizard, WizardStep, WorkspaceArtifactView, WorkspaceFilesPane, WorkspaceLayout, WorkspacePaneHeader, WorkspaceSurface, WorkspaceSurfaceFrame, WorkspaceSurfaceTitle, WriteFilePreview, activeSessionsAtom, addMessage, addParts, agentTimelineStepKind, badgeVariants, buildUnifiedPatch, bumpActiveSessionActivity, buttonVariants, canAdminSandbox, canonicalModelId, chatCapableHarnesses, clearChat, cn, codeBlockGrammar, computeDiffStats, configurePdfViewer, connectSession, copyText, createAuthFetcher, createShellShouldRevalidate, detectFileFormat, disconnectSession, dispatchSessionCreated, fenceInfo, fieldMessageId, fileExtension, fileTreeFromPaths, filterFileNodes, filterFileTree, findUnsupportedOpenUINode, focusField, focusFieldInvalid, focusFieldWithin, focusRing, focusRingInset, foldAgentRows, foldSummary, formatBytes, formatCalendarDate, formatDuration, formatPrice, formatRelativeAge, formatUptime, getActiveSession, getAllActiveSessions, getAllProjectActivity, getCodeLanguage, getFormatLabel, getSanitizedMarkdownHeadingIdFromRawFragment, getSessionsByActivity, getSessionsForNavbar, getSessionsForProject, getSyntaxLanguage, getToolCategory, getToolDisplayMetadata, getToolErrorText, getTotalRunningSessionCount, hasBackgroundRunningSessions, indexRecord, initialsOf, isStreamingAtom, isViewerMessage, ixControl, ixControlAfter, ixControlSoft, ixField, ixRow, ixSelected, ixTabUnderline, localToday, messagesAtom, modelBrandFor, modelProvider, normalizeSeries, numericColumns, parseCalendarDate, parseCsv, parseInsufficientBalance, parseToolEvent, partMapAtom, partitionBySpeaker, periodDelta, plainTextFromMarkdown, model_exports as recordModel, registerActiveSession, resetActiveSessions, resolveFilePreviewKind, runStatus, sandboxStatus, seriesAreaPath, seriesExtent, seriesLinePath, seriesMean, seriesScale, sessionAtom, setActiveSessionAttention, setActiveSessionConnection, setActiveSessionError, setActiveSessionRunning, setForegroundActiveSession, shellShouldRevalidate, showsTaskPriority, snapHarnessToModel, statusMeta, tableCsv, taskProgress, taskStatus, timeAgo, toneFor, traceSpanMark, truncateText, unregisterActiveSession, updateActiveSessionMeta, updatePart, useActiveSession, useActiveSessions, useActiveSessionsState, useAgentStream, useApiKey, useAuth, useAutoScroll, useCreateSession, useDeleteSession, useDropdownMenu, useEventStream, useHasBackgroundRunningSessions, useLiveTime, useNavbarSessions, useOptimisticSessionItems, useProjectActivity, useProjectSessions, usePtySession, useRealtimeSession, useRenameSession, useRunCollapseState, useRunGroups, useSSEStream, useSandboxMetrics, useSdkSession, useSessionStream, useSessions, useSessionsByActivity, useSidebar, useSidecarAuth, useTheme, useToast, useToolCallStream, useTotalRunningSessions, validateOpenUIJsonArtifact, validateOpenUIJsonNode, withPrompts };
@@ -1,217 +1,13 @@
1
1
  import { t as __exportAll } from "./rolldown-runtime-D8jQpDG7.js";
2
+ import { t as VirtualList } from "./VirtualList-DLh2JE0F.js";
3
+ import { t as useFollowTail } from "./use-follow-tail-Ckx5ZSV2.js";
2
4
  import { HoverCard, HoverCardContent, HoverCardTrigger } from "@tangle-network/ui/primitives";
3
5
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
4
6
  import { useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState } from "react";
5
7
  import { Brain, Settings, Timer } from "lucide-react";
6
8
  import { formatDuration, getToolCategory, getToolDisplayMetadata } from "@tangle-network/ui/utils";
7
9
  import { AgentTimelineColumn, AgentTimelineStep, SpeakerHeader, agentTimelineStepKind } from "@tangle-network/ui/chat";
8
- import { ExpandedToolDetail, InlineThinkingItem, RunRowShell } from "@tangle-network/ui/run";
9
- // src/run/record/VirtualList.tsx
10
- /**
11
- * Renders only the rows near the viewport of `scroller`. Row heights are measured as they render; unmeasured
12
- * rows use `estimate`. Spacers keep the scroll height, so the browser's scroll anchoring holds the reading place.
13
- */
14
- function VirtualList({ items, keyOf, render, scroller, estimate = 96, overscan = 900, target }) {
15
- const heights = useRef(/* @__PURE__ */ new Map());
16
- const [version, setVersion] = useState(0);
17
- const [viewport, setViewport] = useState({
18
- top: 0,
19
- height: 900
20
- });
21
- const observer = useRef(null);
22
- const nodes = useRef(/* @__PURE__ */ new Map());
23
- const frame = useRef(0);
24
- const observe = (element) => {
25
- if (!observer.current && typeof ResizeObserver !== "undefined") observer.current = new ResizeObserver((entries) => {
26
- let changed = false;
27
- for (const entry of entries) {
28
- const key = nodes.current.get(entry.target);
29
- if (!key) continue;
30
- const height = Math.ceil(entry.borderBoxSize?.[0]?.blockSize ?? entry.target.offsetHeight);
31
- if (height > 0 && heights.current.get(key) !== height) {
32
- heights.current.set(key, height);
33
- changed = true;
34
- }
35
- }
36
- if (changed && !frame.current) frame.current = requestAnimationFrame(() => {
37
- frame.current = 0;
38
- setVersion((value) => value + 1);
39
- });
40
- });
41
- observer.current?.observe(element);
42
- };
43
- useEffect(() => () => {
44
- cancelAnimationFrame(frame.current);
45
- observer.current?.disconnect();
46
- observer.current = null;
47
- nodes.current.clear();
48
- }, []);
49
- useEffect(() => {
50
- const element = scroller.current;
51
- if (!element) return;
52
- let frame = 0;
53
- const update = () => {
54
- frame = 0;
55
- setViewport((current) => current.top === element.scrollTop && current.height === element.clientHeight ? current : {
56
- top: element.scrollTop,
57
- height: element.clientHeight
58
- });
59
- };
60
- const schedule = () => {
61
- if (!frame) frame = requestAnimationFrame(update);
62
- };
63
- update();
64
- element.addEventListener("scroll", schedule, { passive: true });
65
- const resize = new ResizeObserver(schedule);
66
- resize.observe(element);
67
- return () => {
68
- cancelAnimationFrame(frame);
69
- element.removeEventListener("scroll", schedule);
70
- resize.disconnect();
71
- };
72
- }, [scroller]);
73
- const offsets = useMemo(() => {
74
- const result = new Float64Array(items.length + 1);
75
- const guess = typeof estimate === "function" ? estimate : () => estimate;
76
- for (let i = 0; i < items.length; i++) result[i + 1] = result[i] + (heights.current.get(keyOf(items[i])) ?? guess(items[i]));
77
- return result;
78
- }, [
79
- items,
80
- keyOf,
81
- estimate,
82
- version
83
- ]);
84
- const find = (y) => {
85
- let low = 0;
86
- let high = items.length;
87
- while (low < high) {
88
- const mid = low + high >> 1;
89
- if (offsets[mid + 1] <= y) low = mid + 1;
90
- else high = mid;
91
- }
92
- return low;
93
- };
94
- const start = Math.max(0, find(viewport.top - overscan));
95
- const end = Math.min(items.length, find(viewport.top + viewport.height + overscan) + 1);
96
- const scrollTo = useCallback((key, align) => {
97
- const element = scroller.current;
98
- const index = items.findIndex((item) => keyOf(item) === key);
99
- if (!element || index < 0) return false;
100
- const top = offsets[index];
101
- const bottom = offsets[index + 1];
102
- if (align || top < element.scrollTop || bottom > element.scrollTop + element.clientHeight) element.scrollTop = Math.max(0, top - 8);
103
- return true;
104
- }, [
105
- items,
106
- keyOf,
107
- offsets,
108
- scroller
109
- ]);
110
- const pending = useRef(null);
111
- const rows = useRef(/* @__PURE__ */ new Map());
112
- const settle = () => {
113
- const goal = pending.current;
114
- if (!goal) return;
115
- if (performance.now() > goal.until) {
116
- pending.current = null;
117
- return;
118
- }
119
- if (!scrollTo(goal.key, true)) return;
120
- const row = rows.current.get(goal.key);
121
- if (row?.isConnected) {
122
- const box = row.getBoundingClientRect();
123
- if (box.top < 72 || box.top > window.innerHeight - 96) window.scrollBy({ top: box.top - 120 });
124
- }
125
- };
126
- useLayoutEffect(() => {
127
- pending.current = target ? {
128
- key: target,
129
- until: performance.now() + 2e3
130
- } : null;
131
- settle();
132
- }, [target]);
133
- useLayoutEffect(settle, [
134
- version,
135
- viewport,
136
- items
137
- ]);
138
- useEffect(() => {
139
- const element = scroller.current;
140
- if (!element) return;
141
- const release = (event) => {
142
- const key = event instanceof KeyboardEvent && event.target === element && !event.defaultPrevented ? event.key : "";
143
- pending.current = items.length && (key === "Home" || key === "End") ? {
144
- key: keyOf(items[key === "Home" ? 0 : items.length - 1]),
145
- until: performance.now() + 2e3
146
- } : null;
147
- if (pending.current) {
148
- event.preventDefault();
149
- settle();
150
- }
151
- };
152
- element.addEventListener("wheel", release, { passive: true });
153
- element.addEventListener("touchstart", release, { passive: true });
154
- element.addEventListener("pointerdown", release);
155
- element.addEventListener("keydown", release);
156
- return () => {
157
- element.removeEventListener("wheel", release);
158
- element.removeEventListener("touchstart", release);
159
- element.removeEventListener("pointerdown", release);
160
- element.removeEventListener("keydown", release);
161
- };
162
- }, [
163
- scroller,
164
- items,
165
- keyOf,
166
- offsets
167
- ]);
168
- const bind = (key) => (element) => {
169
- if (!element) {
170
- rows.current.delete(key);
171
- return;
172
- }
173
- rows.current.set(key, element);
174
- for (const [node, value] of nodes.current) if (value === key && node !== element) {
175
- observer.current?.unobserve(node);
176
- nodes.current.delete(node);
177
- }
178
- if (!nodes.current.has(element)) {
179
- nodes.current.set(element, key);
180
- observe(element);
181
- }
182
- };
183
- useEffect(() => {
184
- for (const node of [...nodes.current.keys()]) if (!node.isConnected) {
185
- observer.current?.unobserve(node);
186
- nodes.current.delete(node);
187
- }
188
- });
189
- return /* @__PURE__ */ jsxs(Fragment, { children: [
190
- /* @__PURE__ */ jsx("div", {
191
- style: {
192
- height: offsets[start],
193
- transitionProperty: "none"
194
- },
195
- "aria-hidden": "true"
196
- }),
197
- items.slice(start, end).map((item, i) => {
198
- const key = keyOf(item);
199
- return /* @__PURE__ */ jsx("div", {
200
- ref: bind(key),
201
- className: "virtual-row",
202
- style: { display: "flow-root" },
203
- children: render(item, start + i)
204
- }, key);
205
- }),
206
- /* @__PURE__ */ jsx("div", {
207
- style: {
208
- height: offsets[items.length] - offsets[end],
209
- transitionProperty: "none"
210
- },
211
- "aria-hidden": "true"
212
- })
213
- ] });
214
- }
10
+ import { ExpandedToolDetail, InlineThinkingItem, RunRowShell, RunStatusIcon, runStatus } from "@tangle-network/ui/run";
215
11
  // src/run/record/model.ts
216
12
  var model_exports = /* @__PURE__ */ __exportAll({
217
13
  agentState: () => agentState,
@@ -1330,27 +1126,12 @@ function Conversation({ index, actor, cutoff, query, category, selected, openSou
1330
1126
  return map;
1331
1127
  }, [rows]);
1332
1128
  const retained = (index.byActor.get(actor) ?? []).some((item) => !isLifecycle(item) && (item.detail.role || textOf(item) || callsOf(item).length));
1333
- const targetRef = useRef(target);
1334
- targetRef.current = target;
1335
- const following = useRef(false);
1336
- const followRef = useRef(follow);
1337
- followRef.current = follow;
1338
- useLayoutEffect(() => {
1339
- following.current = follow && !targetRef.current;
1340
- if (scroll.current && !targetRef.current) scroll.current.scrollTop = follow ? scroll.current.scrollHeight : 0;
1341
- }, [actor]);
1342
- useLayoutEffect(() => {
1343
- if (!follow) following.current = false;
1344
- }, [follow]);
1345
- useEffect(() => {
1346
- const element = scroll.current;
1347
- if (!element) return;
1348
- const track = () => {
1349
- following.current = followRef.current && element.scrollHeight - element.scrollTop - element.clientHeight < 24;
1350
- };
1351
- element.addEventListener("scroll", track, { passive: true });
1352
- return () => element.removeEventListener("scroll", track);
1353
- }, []);
1129
+ const { following } = useFollowTail(scroll, {
1130
+ identity: actor,
1131
+ content: rows,
1132
+ follow,
1133
+ target
1134
+ });
1354
1135
  const arrival = useRef({ actor });
1355
1136
  useLayoutEffect(() => {
1356
1137
  const tail = rows.at(-1), event = tail?.kind === "event" ? tail.event : tail?.events.at(-1), entry = tail?.kind === "event" ? tail.event.id : tail?.events[0]?.id;
@@ -1361,11 +1142,8 @@ function Conversation({ index, actor, cutoff, query, category, selected, openSou
1361
1142
  };
1362
1143
  const element = scroll.current;
1363
1144
  if (!element || !following.current) return;
1364
- element.scrollTop = element.scrollHeight;
1365
- let frames = 0;
1366
- let frame = requestAnimationFrame(function pin() {
1145
+ const frame = requestAnimationFrame(() => {
1367
1146
  if (!following.current) return;
1368
- element.scrollTop = element.scrollHeight;
1369
1147
  const row = entry && element.querySelector(`[data-entry="${CSS.escape(entry)}"]`);
1370
1148
  if (animate && row) {
1371
1149
  animate = false;
@@ -1375,7 +1153,6 @@ function Conversation({ index, actor, cutoff, query, category, selected, openSou
1375
1153
  easing: style.getPropertyValue("--ease-expo").trim() || "linear"
1376
1154
  });
1377
1155
  }
1378
- if (++frames < 20) frame = requestAnimationFrame(pin);
1379
1156
  });
1380
1157
  return () => cancelAnimationFrame(frame);
1381
1158
  }, [rows]);
@@ -1516,4 +1293,82 @@ function withPrompts(record) {
1516
1293
  events
1517
1294
  };
1518
1295
  }
1519
- export { VirtualList as a, model_exports as i, Conversation as n, indexRecord as r, withPrompts as t };
1296
+ // src/run/record/AgentTree.tsx
1297
+ /** Retained identity and recorded time define the hierarchy; labels never join sessions or invent parents. */
1298
+ function AgentTree({ index, actor, cutoff, select }) {
1299
+ const roots = useMemo(() => {
1300
+ const nodes = index.actors.filter((node) => node.kind !== "finding");
1301
+ const byId = new Map(nodes.map((node) => [node.id, node]));
1302
+ const children = /* @__PURE__ */ new Map();
1303
+ for (const node of nodes) {
1304
+ if (!node.parent) continue;
1305
+ const parent = index.canonical(node.parent), siblings = children.get(parent) ?? [];
1306
+ siblings.push(node);
1307
+ children.set(parent, siblings);
1308
+ }
1309
+ const visited = /* @__PURE__ */ new Set();
1310
+ const visit = (node) => {
1311
+ if (visited.has(node.id)) return [];
1312
+ visited.add(node.id);
1313
+ return [{
1314
+ node,
1315
+ children: (children.get(node.id) ?? []).flatMap(visit)
1316
+ }];
1317
+ };
1318
+ const roots = nodes.filter((node) => !node.parent || !byId.has(index.canonical(node.parent))).flatMap(visit);
1319
+ for (const node of nodes) roots.push(...visit(node));
1320
+ return roots;
1321
+ }, [index]);
1322
+ const renderNodes = (entries, nested = false) => /* @__PURE__ */ jsx("ul", {
1323
+ className: nested ? "m-0 ml-3 list-none border-l border-border pl-2" : "m-0 grid list-none gap-1 p-0",
1324
+ children: entries.map(({ node, children }) => {
1325
+ const firstEvent = index.byActor.get(node.id)?.[0];
1326
+ const begin = node.start ? ms(node.start) : firstEvent ? ms(firstEvent.at) : void 0;
1327
+ const end = typeof node.end === "string" ? node.end : void 0;
1328
+ const future = begin !== void 0 && begin > cutoff, ended = end !== void 0 && ms(end) <= cutoff;
1329
+ const state = future ? "Not yet started" : ended ? node.status === "done" ? "Finished" : node.status === "down" ? "Stopped" : node.status ?? "Ended" : end ? "Not yet settled" : "No terminal record";
1330
+ return /* @__PURE__ */ jsxs("li", {
1331
+ className: "min-w-0",
1332
+ children: [/* @__PURE__ */ jsxs("button", {
1333
+ type: "button",
1334
+ className: "flex w-full min-w-0 items-start gap-2 rounded border border-transparent px-2 py-1.5 text-left text-sm text-foreground hover:border-border focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring aria-pressed:border-border aria-pressed:bg-muted data-[future]:opacity-55",
1335
+ "aria-label": "Read " + roleOf(node) + " " + node.label + " conversation. " + state + ".",
1336
+ "aria-pressed": actor === node.id,
1337
+ "data-node": node.id,
1338
+ "data-future": future ? "" : void 0,
1339
+ title: node.label + (node.assignment ? " · " + node.assignment : "") + " · " + state,
1340
+ onClick: () => select(node.id),
1341
+ children: [/* @__PURE__ */ jsx(RunStatusIcon, {
1342
+ status: runStatus(future ? "unknown" : node.status === "down" || node.status === "no-winner" ? "stopped" : node.status ?? "unknown"),
1343
+ className: "mt-0.5 size-3.5 shrink-0",
1344
+ "aria-hidden": true
1345
+ }), /* @__PURE__ */ jsxs("span", {
1346
+ className: "grid min-w-0 gap-0.5 break-words",
1347
+ children: [/* @__PURE__ */ jsx("span", {
1348
+ className: "font-semibold",
1349
+ children: node.label
1350
+ }), /* @__PURE__ */ jsxs("span", {
1351
+ className: "text-muted-foreground",
1352
+ children: [
1353
+ roleOf(node),
1354
+ " · ",
1355
+ state
1356
+ ]
1357
+ })]
1358
+ })]
1359
+ }), children.length > 0 && renderNodes(children, true)]
1360
+ }, node.id);
1361
+ })
1362
+ });
1363
+ return /* @__PURE__ */ jsx("div", {
1364
+ className: "record-agent-tree max-h-80 overflow-auto px-2 py-2",
1365
+ "data-graph": true,
1366
+ role: "group",
1367
+ "aria-label": "Recorded agent hierarchy. Select an agent to read its conversation.",
1368
+ children: roots.length ? renderNodes(roots) : /* @__PURE__ */ jsx("p", {
1369
+ className: "text-sm text-muted-foreground",
1370
+ children: "No agent topology was retained."
1371
+ })
1372
+ });
1373
+ }
1374
+ export { model_exports as a, indexRecord as i, withPrompts as n, Conversation as r, AgentTree as t };
@@ -1,4 +1,4 @@
1
- import { t as AgentStreamOpener } from "../agent-stream-CBZ2fXJ2.js";
1
+ import { t as AgentStreamOpener } from "../event-stream-DNEbvx4s.js";
2
2
  /** Keep one transport identity per authenticated account; changing it discards the previous view. */
3
3
  export interface LiveRunTransport {
4
4
  fetch?: typeof globalThis.fetch;
package/dist/run/live.js CHANGED
@@ -1,7 +1,7 @@
1
- import { t as WorkspaceFilesPane } from "../workspace-files-pane-DB9Nvwh4.js";
1
+ import { t as WorkspaceFilesPane } from "../workspace-files-pane-C0PeY6rY.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 { t as TraceWorkspace } from "../trace-workspace-C8dHRBDV.js";
4
+ import { a as useEventStream, t as TraceWorkspace } from "../trace-workspace-DkakKRLV.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";
@@ -180,32 +180,30 @@ function LiveRunView({ api, transport }) {
180
180
  const [rendered, setRendered] = useState(0);
181
181
  const [agent, setAgent] = useState();
182
182
  const [conversationOpen, setConversationOpen] = useState(true);
183
- useEffect(() => {
184
- const source = transport?.openEventSource ? transport.openEventSource(`${api}/events`, setConnected) : new EventSource(`${api}/events`);
185
- source.addEventListener("snapshot", (message) => {
186
- try {
187
- const frame = JSON.parse(message.data);
188
- if (!Array.isArray(frame.snapshots)) throw new Error("Invalid snapshot stream");
189
- setSnapshots((prior) => {
190
- const byRoot = new Map((frame.reset ? [] : prior).map((snapshot) => [snapshot.root, snapshot]));
191
- for (const snapshot of frame.snapshots) byRoot.set(snapshot.root, snapshot);
192
- return [...byRoot.values()];
193
- });
194
- setRendered(frame.sequence);
195
- setError(null);
196
- setConnected(true);
197
- } catch (cause) {
198
- setError(String(cause));
199
- }
200
- });
201
- source.addEventListener("unavailable", () => setError("The run snapshot is unavailable"));
202
- source.addEventListener("end", () => {
203
- source.close();
204
- setEnded(true);
205
- });
206
- if (!transport?.openEventSource) source.onerror = () => setConnected(false);
207
- return () => source.close();
208
- }, [api, transport?.openEventSource]);
183
+ useEventStream(`${api}/events`, {
184
+ opener: transport?.openEventSource,
185
+ onLiveChange: setConnected,
186
+ events: {
187
+ snapshot: (message) => {
188
+ try {
189
+ const frame = JSON.parse(message.data);
190
+ if (!Array.isArray(frame.snapshots)) throw new Error("Invalid snapshot stream");
191
+ setSnapshots((prior) => {
192
+ const byRoot = new Map((frame.reset ? [] : prior).map((snapshot) => [snapshot.root, snapshot]));
193
+ for (const snapshot of frame.snapshots) byRoot.set(snapshot.root, snapshot);
194
+ return [...byRoot.values()];
195
+ });
196
+ setRendered(frame.sequence);
197
+ setError(null);
198
+ setConnected(true);
199
+ } catch (cause) {
200
+ setError(String(cause));
201
+ }
202
+ },
203
+ unavailable: () => setError("The run snapshot is unavailable"),
204
+ end: () => setEnded(true)
205
+ }
206
+ });
209
207
  const runs = snapshots.flatMap((snapshot, root) => snapshot.supervisors.map((run) => ({
210
208
  snapshot,
211
209
  root,
@@ -1,2 +1,2 @@
1
- import { a as EventFlag, c as indexRecord, d as ConversationNode, f as ConversationRecord, i as ConversationProps, l as model_d_exports, n as withPrompts, o as RecordIndex, r as Conversation, s as ToolCall, t as VirtualList, u as ConversationEvent } from "../index-DRLVHl-o.js";
2
- export { Conversation, type ConversationEvent, type ConversationNode, type ConversationProps, type ConversationRecord, type EventFlag, type RecordIndex, type ToolCall, VirtualList, indexRecord, model_d_exports as recordModel, withPrompts };
1
+ import { a as ConversationProps, c as ToolCall, d as ConversationEvent, f as ConversationNode, i as Conversation, l as indexRecord, n as VirtualList, o as EventFlag, p as ConversationRecord, r as withPrompts, s as RecordIndex, t as AgentTree, u as model_d_exports } from "../index-1qlc9-S2.js";
2
+ export { AgentTree, Conversation, type ConversationEvent, type ConversationNode, type ConversationProps, type ConversationRecord, type EventFlag, type RecordIndex, type ToolCall, VirtualList, indexRecord, model_d_exports as recordModel, withPrompts };
@@ -1 +1,3 @@
1
- export { n as Conversation, a as VirtualList, r as indexRecord, i as recordModel, t as withPrompts } from "../record-Bqt1kE_Q.js";
1
+ import { t as VirtualList } from "../VirtualList-DLh2JE0F.js";
2
+ import { a as model_exports, i as indexRecord, n as withPrompts, r as Conversation, t as AgentTree } from "../record-CnxPRyxC.js";
3
+ export { AgentTree, Conversation, VirtualList, indexRecord, model_exports as recordModel, withPrompts };
package/dist/run.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { A as ToolCallData, B as taskStatus, C as RunStatusIcon, D as TaskListItem, E as TaskList, F as parseToolEvent, G as TraceWorkspaceProps, H as LatestEventsProps, I as runStatus, J as traceSpanMark, K as TraceWaterfall, L as showsTaskPriority, M as ToolCallFeedProps, N as ToolCallStatus, O as TaskListProps, P as ToolCallType, R as statusMeta, S as RunStatus, T as StatusMeta, U as TraceEvent, V as LatestEvents, W as TraceWorkspace, _ 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 TraceWaterfallProps, 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 taskProgress } from "./index-BnaVprN6.js";
2
- import { a as AgentTranscriptEntry, i as AgentStreamState, n as AgentStreamRow, o as foldAgentRows, r as AgentStreamSource, s as useAgentStream, t as AgentStreamOpener } from "./agent-stream-CBZ2fXJ2.js";
3
- import { a as EventFlag, c as indexRecord, d as ConversationNode, f as ConversationRecord, i as ConversationProps, l as model_d_exports, n as withPrompts, o as RecordIndex, r as Conversation, s as ToolCall, t as VirtualList, u as ConversationEvent } from "./index-DRLVHl-o.js";
4
- export { type AgentStreamOpener, type AgentStreamRow, type AgentStreamSource, type AgentStreamState, type AgentTranscriptEntry, ApprovalCard, type ApprovalCardProps, type ApprovalDiffFile, ApprovalDiffSummary, type ApprovalPlanStep, Conversation, type ConversationEvent, type ConversationNode, type ConversationProps, type ConversationRecord, type EventFlag, 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, parseToolEvent, model_d_exports as recordModel, runStatus, showsTaskPriority, statusMeta, taskProgress, taskStatus, traceSpanMark, useAgentStream, withPrompts };
1
+ import { $ as traceSpanMark, A as ToolCallData, B as taskStatus, C as RunStatusIcon, D as TaskListItem, E as TaskList, F as parseToolEvent, G as TraceWorkspaceProps, H as LatestEventsProps, I as runStatus, J as AgentTranscriptEntry, K as AgentStreamRow, L as showsTaskPriority, M as ToolCallFeedProps, N as ToolCallStatus, O as TaskListProps, P as ToolCallType, Q as TraceWaterfallProps, R as statusMeta, S as RunStatus, T as StatusMeta, U as TraceEvent, V as LatestEvents, W as TraceWorkspace, X as useAgentStream, Y as foldAgentRows, Z as TraceWaterfall, _ 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 AgentStreamState, 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 taskProgress } from "./index-DxMX-DlX.js";
2
+ import { i as useEventStream, n as AgentStreamSource, r as EventStreamHandlers, t as AgentStreamOpener } from "./event-stream-DNEbvx4s.js";
3
+ import { a as ConversationProps, c as ToolCall, d as ConversationEvent, f as ConversationNode, i as Conversation, l as indexRecord, n as VirtualList, o as EventFlag, p as ConversationRecord, r as withPrompts, s as RecordIndex, t as AgentTree, u as model_d_exports } from "./index-1qlc9-S2.js";
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, parseToolEvent, model_d_exports as recordModel, runStatus, showsTaskPriority, statusMeta, taskProgress, taskStatus, traceSpanMark, useAgentStream, useEventStream, withPrompts };
package/dist/run.js CHANGED
@@ -1,4 +1,5 @@
1
- import { a as TraceWaterfall, i as useAgentStream, n as LatestEvents, o as traceSpanMark, r as foldAgentRows, t as TraceWorkspace } from "./trace-workspace-C8dHRBDV.js";
2
- import { a as VirtualList, i as model_exports, n as Conversation, r as indexRecord, t as withPrompts } from "./record-Bqt1kE_Q.js";
1
+ import { t as VirtualList } from "./VirtualList-DLh2JE0F.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-DkakKRLV.js";
3
+ import { a as model_exports, i as indexRecord, n as withPrompts, r as Conversation, t as AgentTree } from "./record-CnxPRyxC.js";
3
4
  import { ApprovalCard, ApprovalDiffSummary, ExpandedToolDetail, InlineThinkingItem, InlineToolItem, LiveDuration, RunGroup, RunPhaseList, RunRowShell, RunRowStatusDot, RunStatusIcon, TaskList, ToolCallFeed, parseToolEvent, runStatus, showsTaskPriority, statusMeta, taskProgress, taskStatus } from "@tangle-network/ui/run";
4
- export { ApprovalCard, ApprovalDiffSummary, Conversation, ExpandedToolDetail, InlineThinkingItem, InlineToolItem, LatestEvents, LiveDuration, RunGroup, RunPhaseList, RunRowShell, RunRowStatusDot, RunStatusIcon, TaskList, ToolCallFeed, TraceWaterfall, TraceWorkspace, VirtualList, foldAgentRows, indexRecord, parseToolEvent, model_exports as recordModel, runStatus, showsTaskPriority, statusMeta, taskProgress, taskStatus, traceSpanMark, useAgentStream, withPrompts };
5
+ export { AgentTree, ApprovalCard, ApprovalDiffSummary, Conversation, ExpandedToolDetail, InlineThinkingItem, InlineToolItem, LatestEvents, LiveDuration, RunGroup, RunPhaseList, RunRowShell, RunRowStatusDot, RunStatusIcon, TaskList, ToolCallFeed, TraceWaterfall, TraceWorkspace, VirtualList, foldAgentRows, indexRecord, parseToolEvent, model_exports as recordModel, runStatus, showsTaskPriority, statusMeta, taskProgress, taskStatus, traceSpanMark, useAgentStream, useEventStream, withPrompts };
package/dist/styles.css CHANGED
@@ -1991,6 +1991,9 @@
1991
1991
  .\[scrollbar-gutter\:stable\] {
1992
1992
  scrollbar-gutter: stable;
1993
1993
  }
1994
+ .list-none {
1995
+ list-style-type: none;
1996
+ }
1994
1997
  .appearance-none {
1995
1998
  appearance: none;
1996
1999
  }
@@ -5617,15 +5620,25 @@
5617
5620
  outline-style: var(--tw-outline-style);
5618
5621
  outline-width: 1px;
5619
5622
  }
5623
+ .focus-visible\:outline-2:focus-visible {
5624
+ outline-style: var(--tw-outline-style);
5625
+ outline-width: 2px;
5626
+ }
5620
5627
  .focus-visible\:-outline-offset-1:focus-visible {
5621
5628
  outline-offset: calc(1px * -1);
5622
5629
  }
5623
5630
  .focus-visible\:outline-offset-0:focus-visible {
5624
5631
  outline-offset: 0px;
5625
5632
  }
5633
+ .focus-visible\:outline-offset-2:focus-visible {
5634
+ outline-offset: 2px;
5635
+ }
5626
5636
  .focus-visible\:outline-\[var\(--focus-border\)\]:focus-visible {
5627
5637
  outline-color: var(--focus-border);
5628
5638
  }
5639
+ .focus-visible\:outline-ring:focus-visible {
5640
+ outline-color: hsl(var(--ring));
5641
+ }
5629
5642
  .focus-visible\:outline-none:focus-visible {
5630
5643
  --tw-outline-style: none;
5631
5644
  outline-style: none;
@@ -5746,6 +5759,9 @@
5746
5759
  .aria-invalid\:focus\:ring-\[var\(--focus-halo-danger\)\][aria-invalid="true"]:focus {
5747
5760
  --tw-ring-color: var(--focus-halo-danger);
5748
5761
  }
5762
+ .aria-pressed\:border-border[aria-pressed="true"] {
5763
+ border-color: hsl(var(--border));
5764
+ }
5749
5765
  .aria-pressed\:bg-\[var\(--ix-sel-bg\)\][aria-pressed="true"] {
5750
5766
  background-color: var(--ix-sel-bg);
5751
5767
  }
@@ -5799,6 +5815,9 @@
5799
5815
  .data-\[disabled\]\:opacity-50[data-disabled] {
5800
5816
  opacity: 50%;
5801
5817
  }
5818
+ .data-\[future\]\:opacity-55[data-future] {
5819
+ opacity: 55%;
5820
+ }
5802
5821
  .data-\[highlighted\]\:bg-\[var\(--ix-sel-bg\)\][data-highlighted] {
5803
5822
  background-color: var(--ix-sel-bg);
5804
5823
  }