@tangle-network/ui 11.51.7 → 11.51.9
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/CHANGELOG.md +10 -0
- package/README.md +6 -0
- package/dist/chat/chat-message.js +2 -7
- package/dist/chat/user-message.js +3 -5
- package/dist/files/file-card.js +1 -1
- package/dist/files/file-tree.d.ts +0 -6
- package/dist/files/file-tree.js +2 -6
- package/dist/index.d.ts +2 -2
- package/dist/index.js +2 -2
- package/dist/primitives/hover-card.d.ts +22 -13
- package/dist/primitives/hover-card.js +149 -40
- package/dist/primitives/popover.d.ts +3 -1
- package/dist/primitives/popover.js +15 -12
- package/dist/primitives/upload-progress.d.ts +0 -6
- package/dist/primitives/upload-progress.js +2 -6
- package/dist/run/run-group.js +2 -2
- package/dist/run/run-item-primitives.js +2 -2
- package/dist/run/run-row-shell.js +2 -2
- package/dist/utils/format.d.ts +14 -12
- package/dist/utils/format.js +50 -30
- package/dist/utils.d.ts +2 -2
- package/dist/utils.js +2 -2
- package/package.json +11 -2
- package/src/chat/chat-message.tsx +2 -7
- package/src/chat/user-message.tsx +3 -5
- package/src/editor/source-markdown-editor.test.tsx +7 -7
- package/src/files/file-tree.tsx +2 -7
- package/src/primitives/hover-card.tsx +64 -74
- package/src/primitives/popover.tsx +3 -3
- package/src/primitives/upload-progress.tsx +2 -7
- package/src/utils/format.ts +50 -33
- package/src/utils/index.ts +1 -1
- package/src/editor/document-editor-pane.test.tsx +0 -60
- package/src/editor/editor-lazy.test.tsx +0 -102
- package/src/editor/editor-peers.test.ts +0 -250
- package/src/editor/editor-provider.test.tsx +0 -226
- package/src/editor/markdown-document-editor.test.tsx +0 -126
- package/src/editor/tiptap-editor.test.tsx +0 -228
- package/src/files/file-artifact-pane.test.tsx +0 -301
- package/src/files/file-card.test.tsx +0 -62
- package/src/files/file-list.test.tsx +0 -81
- package/src/files/pdf-loader.test.ts +0 -130
- package/src/files/pdf-viewer.test.tsx +0 -245
- package/src/files/rich-file-tree.test.tsx +0 -90
- package/src/markdown/api-presentation.test.tsx +0 -63
- package/src/markdown/code-block.test.tsx +0 -201
- package/src/markdown/markdown-table.test.tsx +0 -76
- package/src/markdown/markdown.test.tsx +0 -166
- package/src/openui/schema.test.tsx +0 -158
- package/src/primitives/button.test.tsx +0 -230
- package/src/primitives/card.test.tsx +0 -71
- package/src/primitives/chip.test.tsx +0 -200
- package/src/primitives/date-picker.test.tsx +0 -146
- package/src/primitives/dialog.test.tsx +0 -75
- package/src/primitives/input.test.tsx +0 -161
- package/src/primitives/interaction-states.test.tsx +0 -287
- package/src/primitives/pagination-alert.test.tsx +0 -180
- package/src/primitives/popover-collapsible-alert-dialog-context-menu-slider.test.tsx +0 -165
- package/src/primitives/radio-group.test.tsx +0 -26
- package/src/primitives/segmented-control.test.tsx +0 -451
- package/src/primitives/table.test.tsx +0 -72
- package/src/primitives/theme-toggle.test.tsx +0 -168
- package/src/primitives/toast.test.tsx +0 -130
- package/src/primitives/wizard.test.tsx +0 -106
- package/src/run/expandable-content.test.tsx +0 -52
- package/src/utils/format.test.ts +0 -58
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
1
|
+
## 11.51.9
|
|
2
|
+
|
|
3
|
+
- Share HoverCard intent and Popover positioning/focus, with existing DOM anchors and local theme containers for virtualized canvases.
|
|
4
|
+
|
|
5
|
+
- Share duration, clock, compact count, cost and UTC formatting through the pure `utils/format` export; remove private file/upload/chat formatters.
|
|
6
|
+
|
|
1
7
|
# @tangle-network/ui
|
|
2
8
|
|
|
9
|
+
## 11.51.8
|
|
10
|
+
|
|
11
|
+
- Retire mock-dependent component tests while preserving the real editor source-saving integration without callback spies. Component implementations and built exports are unchanged; packed-consumer and browser checks remain.
|
|
12
|
+
|
|
3
13
|
## 11.51.7
|
|
4
14
|
|
|
5
15
|
- Expose the existing retained report component and follow-tail modules without optional chat stores. Derive all build entries from the package export map.
|
package/README.md
CHANGED
|
@@ -165,3 +165,9 @@ The package root also re-exports `./stores`, so a root import requires both nano
|
|
|
165
165
|
Consumers that use only other subpath entries do not need these three peers.
|
|
166
166
|
|
|
167
167
|
Retained report readers can import existing `chat/agent-timeline`, `chat/speaker`, `run/expanded-tool-detail`, `run/inline-thinking-item`, `run/run-row-shell` and `hooks/use-follow-tail` modules directly. These entries preserve their broad-entry bindings without importing chat session stores.
|
|
168
|
+
|
|
169
|
+
### Shared formatters
|
|
170
|
+
|
|
171
|
+
`@tangle-network/ui/utils/format` is a pure module for duration, clock, compact counts, USD, bytes and UTC labels. It loads without React. Charts re-exports these helpers for static figures and record views. `formatDuration` and `formatUptime` remain aliases of `formatSpanDuration`; chat timestamps use explicit UTC, and file/upload sizes share `formatBytes`.
|
|
172
|
+
|
|
173
|
+
`HoverCard` shares Popover positioning, portal and keyboard behavior. Its optional `anchor` accepts an existing DOM element for virtualized rows or canvas nodes. Hover delays default to the trigger's `--duration-fast` token. `HoverCardContent` and `PopoverContent` accept the local theme container, so previews preserve inherited tokens without copying computed styles.
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { cn } from "../lib/utils.js";
|
|
2
|
+
import { formatUtcTime } from "../utils/format.js";
|
|
2
3
|
import { Markdown } from "../markdown/markdown.js";
|
|
3
4
|
import { TRANSCRIPT_TEXT } from "./transcript-text.js";
|
|
4
5
|
import { MessageAuthor, isViewerMessage } from "./message-author.js";
|
|
@@ -28,7 +29,7 @@ function ChatMessage({ role, content, toolCalls, isStreaming, timestamp, classNa
|
|
|
28
29
|
children: isUser ? userLabel : assistantLabel
|
|
29
30
|
}), timestamp && /* @__PURE__ */ jsx("span", {
|
|
30
31
|
className: "text-muted-foreground text-xs",
|
|
31
|
-
children:
|
|
32
|
+
children: formatUtcTime(timestamp)
|
|
32
33
|
})]
|
|
33
34
|
}), /* @__PURE__ */ jsxs("div", {
|
|
34
35
|
className: cn("min-w-0 max-w-[85%] space-y-1", fromViewer ? "rounded-[var(--radius-lg)] bg-foreground px-[var(--chat-message-px)] py-[var(--chat-message-py)] text-background" : fromOtherPerson ? "rounded-[var(--radius-lg)] border border-border bg-card px-[var(--chat-message-px)] py-[var(--chat-message-py)] text-foreground" : isAssistant ? "text-foreground" : "rounded-[var(--radius-lg)] border border-border bg-card px-[var(--chat-message-px)] py-[var(--chat-message-py)]"),
|
|
@@ -42,10 +43,4 @@ function ChatMessage({ role, content, toolCalls, isStreaming, timestamp, classNa
|
|
|
42
43
|
})]
|
|
43
44
|
});
|
|
44
45
|
}
|
|
45
|
-
function formatTime(date) {
|
|
46
|
-
return date.toLocaleTimeString(void 0, {
|
|
47
|
-
hour: "numeric",
|
|
48
|
-
minute: "2-digit"
|
|
49
|
-
});
|
|
50
|
-
}
|
|
51
46
|
export { ChatMessage };
|
|
@@ -1,12 +1,10 @@
|
|
|
1
|
+
import { formatUtcTime } from "../utils/format.js";
|
|
1
2
|
import { SyntheticText, userTextSegments } from "./synthetic-text.js";
|
|
2
3
|
import { TRANSCRIPT_TEXT } from "./transcript-text.js";
|
|
3
4
|
import { MessageAuthor, isViewerMessage } from "./message-author.js";
|
|
4
5
|
import { memo, useLayoutEffect, useRef, useState } from "react";
|
|
5
6
|
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
6
7
|
// src/chat/user-message.tsx
|
|
7
|
-
function formatTime(date) {
|
|
8
|
-
return Number.isFinite(date.valueOf()) ? date.toISOString().slice(11, 16) + " UTC" : "Invalid Date";
|
|
9
|
-
}
|
|
10
8
|
function MessageActions({ children, align = "end" }) {
|
|
11
9
|
return /* @__PURE__ */ jsx("div", {
|
|
12
10
|
className: `flex flex-wrap items-center ${align === "end" ? "justify-end" : "justify-start"} gap-1.5 text-sm text-muted-foreground`,
|
|
@@ -67,7 +65,7 @@ function UserBubble({ text, timestamp, actions, lines }) {
|
|
|
67
65
|
children: [timestamp ? /* @__PURE__ */ jsx("span", {
|
|
68
66
|
"data-user-message-time": "",
|
|
69
67
|
className: "pointer-events-none absolute right-full top-1/2 mr-3 -translate-y-1/2 whitespace-nowrap text-sm text-muted-foreground opacity-0 transition-opacity group-hover:opacity-100",
|
|
70
|
-
children:
|
|
68
|
+
children: formatUtcTime(timestamp)
|
|
71
69
|
}) : null, /* @__PURE__ */ jsx(BubbleText, {
|
|
72
70
|
text,
|
|
73
71
|
lines
|
|
@@ -93,7 +91,7 @@ function OtherPersonBubble({ text, timestamp, actions, author, lines }) {
|
|
|
93
91
|
children: [timestamp ? /* @__PURE__ */ jsx("span", {
|
|
94
92
|
"data-user-message-time": "",
|
|
95
93
|
className: "pointer-events-none absolute left-full top-1/2 ml-3 -translate-y-1/2 whitespace-nowrap text-sm text-muted-foreground opacity-0 transition-opacity group-hover:opacity-100",
|
|
96
|
-
children:
|
|
94
|
+
children: formatUtcTime(timestamp)
|
|
97
95
|
}) : null, /* @__PURE__ */ jsx(BubbleText, {
|
|
98
96
|
text,
|
|
99
97
|
lines
|
package/dist/files/file-card.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { cn } from "../lib/utils.js";
|
|
2
2
|
import { Button } from "../primitives/button.js";
|
|
3
|
-
import { IconTile } from "../primitives/icon-tile.js";
|
|
4
3
|
import { formatBytes } from "../utils/format.js";
|
|
4
|
+
import { IconTile } from "../primitives/icon-tile.js";
|
|
5
5
|
import { getFormatLabel, resolveFilePreviewKind } from "./file-format.js";
|
|
6
6
|
import * as React from "react";
|
|
7
7
|
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
package/dist/files/file-tree.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { cn } from "../lib/utils.js";
|
|
2
|
+
import { formatBytes } from "../utils/format.js";
|
|
2
3
|
import { useState } from "react";
|
|
3
4
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
5
|
import { ChevronRight, File, FileCode, FileImage, FileJson, FileSpreadsheet, FileText, Folder, FolderOpen } from "lucide-react";
|
|
@@ -89,7 +90,7 @@ function TreeNode({ node, depth, selectedPath, onSelect, defaultExpanded }) {
|
|
|
89
90
|
}),
|
|
90
91
|
node.size !== void 0 && !isDir && /* @__PURE__ */ jsx("span", {
|
|
91
92
|
className: "text-muted-foreground text-xs ml-auto tabular-nums",
|
|
92
|
-
children:
|
|
93
|
+
children: formatBytes(node.size)
|
|
93
94
|
})
|
|
94
95
|
]
|
|
95
96
|
}), isDir && expanded && node.children && /* @__PURE__ */ jsx("div", { children: node.children.sort((a, b) => {
|
|
@@ -103,11 +104,6 @@ function TreeNode({ node, depth, selectedPath, onSelect, defaultExpanded }) {
|
|
|
103
104
|
defaultExpanded
|
|
104
105
|
}, child.path)) })] });
|
|
105
106
|
}
|
|
106
|
-
function formatSize(bytes) {
|
|
107
|
-
if (bytes < 1024) return `${bytes}B`;
|
|
108
|
-
if (bytes < 1048576) return `${(bytes / 1024).toFixed(0)}K`;
|
|
109
|
-
return `${(bytes / 1048576).toFixed(1)}M`;
|
|
110
|
-
}
|
|
111
107
|
function FileTree({ root, selectedPath, onSelect, className, defaultExpanded = true, visibility }) {
|
|
112
108
|
const visibleRoot = filterFileTree(root, visibility);
|
|
113
109
|
if (!visibleRoot) return null;
|
package/dist/index.d.ts
CHANGED
|
@@ -132,7 +132,7 @@ import "./markdown.js";
|
|
|
132
132
|
import { addMessage, addParts, clearChat, isStreamingAtom, messagesAtom, partMapAtom, updatePart } from "./stores/chat-store.js";
|
|
133
133
|
import "./types.js";
|
|
134
134
|
import { copyText } from "./utils/copy-text.js";
|
|
135
|
-
import { formatBytes, formatDuration,
|
|
135
|
+
import { formatAxisDuration, formatBytes, formatClock, formatCompact, formatCost, formatCount, formatDuration as formatSpanDuration, formatUtcTime, plainTextFromMarkdown, truncateText } from "./utils/format.js";
|
|
136
136
|
import { timeAgo } from "./utils/time-ago.js";
|
|
137
137
|
import { TOOL_CATEGORY_ICONS, getToolCategory, getToolDisplayMetadata, getToolErrorText } from "./utils/tool-display.js";
|
|
138
138
|
import { cn } from "./lib/utils.js";
|
|
@@ -147,4 +147,4 @@ import { QuestionPreview, QuestionPreviewProps } from "./tool-previews/question-
|
|
|
147
147
|
import { DiffPreview, DiffPreviewProps } from "./tool-previews/diff-preview.js";
|
|
148
148
|
import { RedactedDocSegment, RedactedDocument, RedactedDocumentData, RedactedDocumentProps, RevealResult } from "./redaction/redacted-document.js";
|
|
149
149
|
import "./redaction.js";
|
|
150
|
-
export { ActiveProjectActivity, ActiveSessionActivityOptions, ActiveSessionConnectionOptions, ActiveSessionConnectionState, ActiveSessionReconnectState, ActiveSessionRecord, ActiveSessionStatus, ActiveSessionTransportMode, ActiveSessionsState, AgentBranding, AgentStreamEvent, AgentTimeline, type AgentTimelineArtifactItem, AgentTimelineColumn, type AgentTimelineCustomItem, type AgentTimelineFoldItem, type AgentTimelineItem, type AgentTimelineMessageItem, type AgentTimelineProps, type AgentTimelineStatusItem, AgentTimelineStep, type AgentTimelineStepKind, type AgentTimelineStepProps, type AgentTimelineTone, type AgentTimelineToolGroupItem, type AgentTimelineToolItem, Alert, AlertDescription, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, type AlertProps, AlertTitle, type AlertTone, ApiSchema, type ApiSchemaProps, AppendUserMessageOptions, ApplySdkEventOptions, ApprovalCard, type ApprovalCardProps, type ApprovalDiffFile, ApprovalDiffSummary, type ApprovalPlanStep, ArtifactPane, type ArtifactPaneProps, AuthHeader, type AuthHeaderProps, AuthUser, AutomationStreamEvent, Avatar, AvatarFallback, AvatarImage, type AvatarProps, Badge, type BadgeProps, BeginAssistantMessageOptions, BotStreamEvent, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Button, type ButtonProps, CATEGORY_TONES, CSV_PREVIEW_ROW_LIMIT, Calendar, type CalendarDate, type CalendarProps, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, type CardTitleProps, type CategoryTone, type ChartReferenceLine, ChatAuthor, ChatContainer, type ChatContainerProps, ChatMessage, type ChatMessageProps, Checkbox, Chip, type ChipProps, CodeBlock, type CodeBlockProps, Collapsible, CollapsibleContent, CollapsibleTrigger, CommandPreview, type CommandPreviewProps, CompleteAssistantMessageOptions, ComplianceBadge, type ComplianceBadgeProps, type ComplianceProduct, type ComplianceStatus, ConnectionState, ContextMenu, ContextMenuCheckboxItem, ContextMenuContent, ContextMenuGroup, ContextMenuItem, ContextMenuLabel, ContextMenuPortal, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuShortcut, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuTrigger, CopyButton, type CopyButtonProps, CustomToolRenderer, DatePicker, type DatePickerProps, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DiffPreview, type DiffPreviewProps, DisplayVariant, DropZone, type DropZoneProps, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, EmptyState, type EmptyStateProps, type EventStreamHandlers, type EventStreamOpener, type EventStreamSource, ExpandedToolDetail, type ExpandedToolDetailProps, type FeedSegment, Field, type FieldProps, FileArtifactPane, type FileArtifactPaneProps, FileCard, type FileCardProps, type FileDetails, type FileFormat, FileList, type FileListItem, type FileListProps, type FileNode, FilePreview, type FilePreviewKind, type FilePreviewProps, type FileTabData, FileTabs, type FileTabsProps, FileTree, type FileTreeProps, type FileTreeVisibilityOptions, type FileUploader, FilterField, type FilterFieldProps, FinalTextPart, GitHubLoginButton, type GitHubLoginButtonProps, GlobResultsPreview, type GlobResultsPreviewProps, GrepResultsPreview, type GrepResultsPreviewProps, GroupedMessage, Heading, type HeadingProps, type HeadingVariant, HelpText, type HelpTextProps, HoverCard, HoverCardContent, HoverCardDescription, HoverCardHeader, HoverCardTitle, HoverCardTrigger, IconTile, type IconTileProps, InlineCode, type InlineCodeProps, InlineThinkingItem, type InlineThinkingItemProps, InlineToolItem, type InlineToolItemProps, Input, type InputProps, Label, LiveDuration, LoginLayout, type LoginLayoutProps, Logo, type LogoProps, Markdown, type MarkdownLinkChip, type MarkdownLinkChipResolver, type MarkdownProps, MessageAuthor, type MessageAuthorProps, MessageList, type MessageListProps, type MessageRole, MessageRun, MessageUser, Metric, MetricChart, type MetricChartProps, type MetricProps, MetricStrip, type MetricStripProps, OPENUI_NODE_JSON_SCHEMA, OPENUI_NODE_TYPES, type OpenUIAction, type OpenUIActionsNode, OpenUIArtifactRenderer, type OpenUIArtifactRendererProps, type OpenUIBadgeNode, type OpenUICardNode, type OpenUICodeNode, type OpenUIComponentNode, type OpenUIGridNode, type OpenUIHeadingNode, type OpenUIKeyValueNode, type OpenUIMarkdownNode, type OpenUIPrimitive, type OpenUISchemaIssue, type OpenUISchemaValidation, type OpenUISeparatorNode, type OpenUIStackNode, type OpenUIStatNode, type OpenUITableNode, type OpenUITextNode, PageHeader, type PageHeaderProps, PageShell, type PageShellProps, Pagination, type PaginationProps, PdfViewer, type PdfViewerConfig, type PdfViewerProps, type PeriodDelta, Popover, PopoverAnchor, PopoverClose, PopoverContent, PopoverTrigger, Progress, QuestionPreview, type QuestionPreviewProps, RadioGroup, RadioGroupItem, RealtimeSessionOptions, RealtimeSessionRegistry, RealtimeSessionRegistryProps, RealtimeSessionState, RealtimeSessionTarget, ReasoningPart, type RedactedDocSegment, RedactedDocument, type RedactedDocumentData, type RedactedDocumentProps, RegisterActiveSessionOptions, type RevealResult, RichFileTree, type RichFileTreeGitEntry, type RichFileTreeGitStatus, type RichFileTreeProps, type RichFileTreeThemeVars, Run, RunGroup, type RunGroupProps, type RunPhase, RunPhaseList, RunRowShell, type RunRowShellProps, type RunRowStatus, RunRowStatusDot, RunStats, type RunStatus, RunStatusIcon, type RunStatusIconProps, SSEEvent, SdkSessionAttachment, SdkSessionEvent, SdkSessionSeed, SegmentedControl, type SegmentedControlOption, type SegmentedControlProps, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, type SeriesExtent, type SeriesPoint, type SeriesPointInput, type SeriesScale, SeriesSparkline, type SeriesSparklineProps, SessionMessage, SessionPart, SessionProjectKey, type SessionUser, SettingsList, type SettingsListAction, type SettingsListColumns, SettingsListItem, type SettingsListItemProps, type SettingsListMenuItem, type SettingsListProps, SettingsNote, type SettingsNoteProps, SettingsRow, type SettingsRowLayout, type SettingsRowProps, SettingsSection, type SettingsSectionProps, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger, SidebarDropZone, type SidebarDropZoneProps, Skeleton, SkeletonCard, SkeletonTable, Slider, type Speaker, SpeakerHeader, type SpeakerHeaderProps, type SpeakerPart, type SpeakerSection, type SpeakerState, StatCard, type StatCardProps, type StatusMeta, StatusPill, type StatusPillProps, type StatusTone, Switch, TONE_CLASSES, TOOL_CATEGORY_ICONS, TRANSCRIPT_TEXT, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, type TableProps, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Tag, type TagProps, TangleKnot, TaskList, type TaskListItem, type TaskListProps, type TaskStatus, TaskStreamEvent, TerminalCursor, TerminalDisplay, TerminalInput, TerminalLine, TerminalStreamEvent, TextPart, TextShimmer, type TextShimmerProps, Textarea, type TextareaProps, ThemeToggle, ThinkingIndicator, type ThinkingIndicatorProps, TimeSelect, type TimeSelectProps, type Toast, ToastContainer, ToastProvider, type Tone, type ToneClasses, type ToolCallData, ToolCallFeed, type ToolCallFeedProps, type ToolCallStatus, type ToolCallType, ToolCategory, ToolDisplayMetadata, ToolPart, ToolState, ToolStatus, ToolTime, Toolbar, type ToolbarProps, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, type UploadFile, UploadProgress, type UploadProgressProps, UseAuthOptions, UseAuthResult, UseRunGroupsOptions, UseSSEStreamOptions, UseSSEStreamResult, UseSdkSessionOptions, UseSdkSessionReturn, UseToolCallStreamReturn, UserMenu, type UserMenuProps, UserMessage, type UserMessageProps, WebSearchPreview, type WebSearchPreviewProps, Wizard, type WizardProps, WizardStep, type WizardStepProps, WriteFilePreview, type WriteFilePreviewProps, activeSessionsAtom, addMessage, addParts, agentTimelineStepKind, badgeVariants, bumpActiveSessionActivity, buttonVariants, clearChat, cn, codeBlockGrammar, configurePdfViewer, copyText, createAuthFetcher, detectFileFormat, fenceInfo, fieldMessageId, fileExtension, filterFileTree, findUnsupportedOpenUINode, focusField, focusFieldInvalid, focusFieldWithin, focusRing, focusRingInset, foldSummary, formatBytes, formatCalendarDate, formatDuration, formatUptime, getActiveSession, getAllActiveSessions, getAllProjectActivity, getCodeLanguage, getFormatLabel, getSanitizedMarkdownHeadingIdFromRawFragment, getSessionsByActivity, getSessionsForNavbar, getSessionsForProject, getSyntaxLanguage, getToolCategory, getToolDisplayMetadata, getToolErrorText, getTotalRunningSessionCount, hasBackgroundRunningSessions, initialsOf, isOpen, isStreamingAtom, isViewerMessage, ixControl, ixControlAfter, ixControlSoft, ixField, ixRow, ixSelected, ixTabUnderline, localToday, messagesAtom, normalizeSeries, numericColumns, parseCalendarDate, parseCsv, parseToolEvent, partMapAtom, partitionBySpeaker, periodDelta, plainTextFromMarkdown, registerActiveSession, resetActiveSessions, resolveFilePreviewKind, runStatus, seriesAreaPath, seriesExtent, seriesLinePath, seriesMean, seriesScale, setActiveSessionAttention, setActiveSessionConnection, setActiveSessionError, setActiveSessionRunning, setForegroundActiveSession, showsTaskPriority, statusMeta, tableCsv, taskProgress, taskStatus, timeAgo, toneFor, truncateText, unregisterActiveSession, updateActiveSessionMeta, updatePart, useActiveSession, useActiveSessions, useActiveSessionsState, useApiKey, useAuth, useAutoScroll, useDropdownMenu, useEventStream, useFollowTail, useHasBackgroundRunningSessions, useLiveTime, useNavbarSessions, useProjectActivity, useProjectSessions, useRealtimeSession, useRunCollapseState, useRunGroups, useRunNow, useSSEStream, useSdkSession, useSessionsByActivity, useTheme, useToast, useToolCallStream, useTotalRunningSessions, validateOpenUIJsonArtifact, validateOpenUIJsonNode };
|
|
150
|
+
export { ActiveProjectActivity, ActiveSessionActivityOptions, ActiveSessionConnectionOptions, ActiveSessionConnectionState, ActiveSessionReconnectState, ActiveSessionRecord, ActiveSessionStatus, ActiveSessionTransportMode, ActiveSessionsState, AgentBranding, AgentStreamEvent, AgentTimeline, type AgentTimelineArtifactItem, AgentTimelineColumn, type AgentTimelineCustomItem, type AgentTimelineFoldItem, type AgentTimelineItem, type AgentTimelineMessageItem, type AgentTimelineProps, type AgentTimelineStatusItem, AgentTimelineStep, type AgentTimelineStepKind, type AgentTimelineStepProps, type AgentTimelineTone, type AgentTimelineToolGroupItem, type AgentTimelineToolItem, Alert, AlertDescription, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, type AlertProps, AlertTitle, type AlertTone, ApiSchema, type ApiSchemaProps, AppendUserMessageOptions, ApplySdkEventOptions, ApprovalCard, type ApprovalCardProps, type ApprovalDiffFile, ApprovalDiffSummary, type ApprovalPlanStep, ArtifactPane, type ArtifactPaneProps, AuthHeader, type AuthHeaderProps, AuthUser, AutomationStreamEvent, Avatar, AvatarFallback, AvatarImage, type AvatarProps, Badge, type BadgeProps, BeginAssistantMessageOptions, BotStreamEvent, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Button, type ButtonProps, CATEGORY_TONES, CSV_PREVIEW_ROW_LIMIT, Calendar, type CalendarDate, type CalendarProps, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, type CardTitleProps, type CategoryTone, type ChartReferenceLine, ChatAuthor, ChatContainer, type ChatContainerProps, ChatMessage, type ChatMessageProps, Checkbox, Chip, type ChipProps, CodeBlock, type CodeBlockProps, Collapsible, CollapsibleContent, CollapsibleTrigger, CommandPreview, type CommandPreviewProps, CompleteAssistantMessageOptions, ComplianceBadge, type ComplianceBadgeProps, type ComplianceProduct, type ComplianceStatus, ConnectionState, ContextMenu, ContextMenuCheckboxItem, ContextMenuContent, ContextMenuGroup, ContextMenuItem, ContextMenuLabel, ContextMenuPortal, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuShortcut, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuTrigger, CopyButton, type CopyButtonProps, CustomToolRenderer, DatePicker, type DatePickerProps, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DiffPreview, type DiffPreviewProps, DisplayVariant, DropZone, type DropZoneProps, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, EmptyState, type EmptyStateProps, type EventStreamHandlers, type EventStreamOpener, type EventStreamSource, ExpandedToolDetail, type ExpandedToolDetailProps, type FeedSegment, Field, type FieldProps, FileArtifactPane, type FileArtifactPaneProps, FileCard, type FileCardProps, type FileDetails, type FileFormat, FileList, type FileListItem, type FileListProps, type FileNode, FilePreview, type FilePreviewKind, type FilePreviewProps, type FileTabData, FileTabs, type FileTabsProps, FileTree, type FileTreeProps, type FileTreeVisibilityOptions, type FileUploader, FilterField, type FilterFieldProps, FinalTextPart, GitHubLoginButton, type GitHubLoginButtonProps, GlobResultsPreview, type GlobResultsPreviewProps, GrepResultsPreview, type GrepResultsPreviewProps, GroupedMessage, Heading, type HeadingProps, type HeadingVariant, HelpText, type HelpTextProps, HoverCard, HoverCardContent, HoverCardDescription, HoverCardHeader, HoverCardTitle, HoverCardTrigger, IconTile, type IconTileProps, InlineCode, type InlineCodeProps, InlineThinkingItem, type InlineThinkingItemProps, InlineToolItem, type InlineToolItemProps, Input, type InputProps, Label, LiveDuration, LoginLayout, type LoginLayoutProps, Logo, type LogoProps, Markdown, type MarkdownLinkChip, type MarkdownLinkChipResolver, type MarkdownProps, MessageAuthor, type MessageAuthorProps, MessageList, type MessageListProps, type MessageRole, MessageRun, MessageUser, Metric, MetricChart, type MetricChartProps, type MetricProps, MetricStrip, type MetricStripProps, OPENUI_NODE_JSON_SCHEMA, OPENUI_NODE_TYPES, type OpenUIAction, type OpenUIActionsNode, OpenUIArtifactRenderer, type OpenUIArtifactRendererProps, type OpenUIBadgeNode, type OpenUICardNode, type OpenUICodeNode, type OpenUIComponentNode, type OpenUIGridNode, type OpenUIHeadingNode, type OpenUIKeyValueNode, type OpenUIMarkdownNode, type OpenUIPrimitive, type OpenUISchemaIssue, type OpenUISchemaValidation, type OpenUISeparatorNode, type OpenUIStackNode, type OpenUIStatNode, type OpenUITableNode, type OpenUITextNode, PageHeader, type PageHeaderProps, PageShell, type PageShellProps, Pagination, type PaginationProps, PdfViewer, type PdfViewerConfig, type PdfViewerProps, type PeriodDelta, Popover, PopoverAnchor, PopoverClose, PopoverContent, PopoverTrigger, Progress, QuestionPreview, type QuestionPreviewProps, RadioGroup, RadioGroupItem, RealtimeSessionOptions, RealtimeSessionRegistry, RealtimeSessionRegistryProps, RealtimeSessionState, RealtimeSessionTarget, ReasoningPart, type RedactedDocSegment, RedactedDocument, type RedactedDocumentData, type RedactedDocumentProps, RegisterActiveSessionOptions, type RevealResult, RichFileTree, type RichFileTreeGitEntry, type RichFileTreeGitStatus, type RichFileTreeProps, type RichFileTreeThemeVars, Run, RunGroup, type RunGroupProps, type RunPhase, RunPhaseList, RunRowShell, type RunRowShellProps, type RunRowStatus, RunRowStatusDot, RunStats, type RunStatus, RunStatusIcon, type RunStatusIconProps, SSEEvent, SdkSessionAttachment, SdkSessionEvent, SdkSessionSeed, SegmentedControl, type SegmentedControlOption, type SegmentedControlProps, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, type SeriesExtent, type SeriesPoint, type SeriesPointInput, type SeriesScale, SeriesSparkline, type SeriesSparklineProps, SessionMessage, SessionPart, SessionProjectKey, type SessionUser, SettingsList, type SettingsListAction, type SettingsListColumns, SettingsListItem, type SettingsListItemProps, type SettingsListMenuItem, type SettingsListProps, SettingsNote, type SettingsNoteProps, SettingsRow, type SettingsRowLayout, type SettingsRowProps, SettingsSection, type SettingsSectionProps, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger, SidebarDropZone, type SidebarDropZoneProps, Skeleton, SkeletonCard, SkeletonTable, Slider, type Speaker, SpeakerHeader, type SpeakerHeaderProps, type SpeakerPart, type SpeakerSection, type SpeakerState, StatCard, type StatCardProps, type StatusMeta, StatusPill, type StatusPillProps, type StatusTone, Switch, TONE_CLASSES, TOOL_CATEGORY_ICONS, TRANSCRIPT_TEXT, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, type TableProps, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Tag, type TagProps, TangleKnot, TaskList, type TaskListItem, type TaskListProps, type TaskStatus, TaskStreamEvent, TerminalCursor, TerminalDisplay, TerminalInput, TerminalLine, TerminalStreamEvent, TextPart, TextShimmer, type TextShimmerProps, Textarea, type TextareaProps, ThemeToggle, ThinkingIndicator, type ThinkingIndicatorProps, TimeSelect, type TimeSelectProps, type Toast, ToastContainer, ToastProvider, type Tone, type ToneClasses, type ToolCallData, ToolCallFeed, type ToolCallFeedProps, type ToolCallStatus, type ToolCallType, ToolCategory, ToolDisplayMetadata, ToolPart, ToolState, ToolStatus, ToolTime, Toolbar, type ToolbarProps, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, type UploadFile, UploadProgress, type UploadProgressProps, UseAuthOptions, UseAuthResult, UseRunGroupsOptions, UseSSEStreamOptions, UseSSEStreamResult, UseSdkSessionOptions, UseSdkSessionReturn, UseToolCallStreamReturn, UserMenu, type UserMenuProps, UserMessage, type UserMessageProps, WebSearchPreview, type WebSearchPreviewProps, Wizard, type WizardProps, WizardStep, type WizardStepProps, WriteFilePreview, type WriteFilePreviewProps, activeSessionsAtom, addMessage, addParts, agentTimelineStepKind, badgeVariants, bumpActiveSessionActivity, buttonVariants, clearChat, cn, codeBlockGrammar, configurePdfViewer, copyText, createAuthFetcher, detectFileFormat, fenceInfo, fieldMessageId, fileExtension, filterFileTree, findUnsupportedOpenUINode, focusField, focusFieldInvalid, focusFieldWithin, focusRing, focusRingInset, foldSummary, formatAxisDuration, formatBytes, formatCalendarDate, formatClock, formatCompact, formatCost, formatCount, formatSpanDuration as formatDuration, formatSpanDuration, formatSpanDuration as formatUptime, formatUtcTime, getActiveSession, getAllActiveSessions, getAllProjectActivity, getCodeLanguage, getFormatLabel, getSanitizedMarkdownHeadingIdFromRawFragment, getSessionsByActivity, getSessionsForNavbar, getSessionsForProject, getSyntaxLanguage, getToolCategory, getToolDisplayMetadata, getToolErrorText, getTotalRunningSessionCount, hasBackgroundRunningSessions, initialsOf, isOpen, isStreamingAtom, isViewerMessage, ixControl, ixControlAfter, ixControlSoft, ixField, ixRow, ixSelected, ixTabUnderline, localToday, messagesAtom, normalizeSeries, numericColumns, parseCalendarDate, parseCsv, parseToolEvent, partMapAtom, partitionBySpeaker, periodDelta, plainTextFromMarkdown, registerActiveSession, resetActiveSessions, resolveFilePreviewKind, runStatus, seriesAreaPath, seriesExtent, seriesLinePath, seriesMean, seriesScale, setActiveSessionAttention, setActiveSessionConnection, setActiveSessionError, setActiveSessionRunning, setForegroundActiveSession, showsTaskPriority, statusMeta, tableCsv, taskProgress, taskStatus, timeAgo, toneFor, truncateText, unregisterActiveSession, updateActiveSessionMeta, updatePart, useActiveSession, useActiveSessions, useActiveSessionsState, useApiKey, useAuth, useAutoScroll, useDropdownMenu, useEventStream, useFollowTail, useHasBackgroundRunningSessions, useLiveTime, useNavbarSessions, useProjectActivity, useProjectSessions, useRealtimeSession, useRunCollapseState, useRunGroups, useRunNow, useSSEStream, useSdkSession, useSessionsByActivity, useTheme, useToast, useToolCallStream, useTotalRunningSessions, validateOpenUIJsonArtifact, validateOpenUIJsonNode };
|
package/dist/index.js
CHANGED
|
@@ -38,6 +38,7 @@ import { EmptyState } from "./primitives/empty-state.js";
|
|
|
38
38
|
import { StatCard } from "./primitives/stat-card.js";
|
|
39
39
|
import { TerminalCursor, TerminalDisplay, TerminalInput, TerminalLine } from "./primitives/terminal-display.js";
|
|
40
40
|
import { DropZone } from "./primitives/drop-zone.js";
|
|
41
|
+
import { formatAxisDuration, formatBytes, formatClock, formatCompact, formatCost, formatCount, formatDuration as formatSpanDuration, formatUtcTime, plainTextFromMarkdown, truncateText } from "./utils/format.js";
|
|
41
42
|
import { UploadProgress } from "./primitives/upload-progress.js";
|
|
42
43
|
import { SidebarDropZone } from "./primitives/sidebar-drop-zone.js";
|
|
43
44
|
import { ArtifactPane } from "./primitives/artifact-pane.js";
|
|
@@ -71,7 +72,6 @@ import { useRunGroups } from "./hooks/use-run-groups.js";
|
|
|
71
72
|
import { useRunCollapseState } from "./hooks/use-run-collapse-state.js";
|
|
72
73
|
import { useFollowTail } from "./hooks/use-follow-tail.js";
|
|
73
74
|
import { useAutoScroll } from "./hooks/use-auto-scroll.js";
|
|
74
|
-
import { formatBytes, formatDuration, formatUptime, plainTextFromMarkdown, truncateText } from "./utils/format.js";
|
|
75
75
|
import { CommandPreview } from "./tool-previews/command-preview.js";
|
|
76
76
|
import { detectFileFormat, fileExtension, getCodeLanguage, getFormatLabel, getSyntaxLanguage, resolveFilePreviewKind } from "./files/file-format.js";
|
|
77
77
|
import { WriteFilePreview } from "./tool-previews/write-file-preview.js";
|
|
@@ -131,4 +131,4 @@ import { addMessage, addParts, clearChat, isStreamingAtom, messagesAtom, partMap
|
|
|
131
131
|
import { copyText } from "./utils/copy-text.js";
|
|
132
132
|
import { timeAgo } from "./utils/time-ago.js";
|
|
133
133
|
import { RedactedDocument } from "./redaction/redacted-document.js";
|
|
134
|
-
export { AgentTimeline, AgentTimelineColumn, AgentTimelineStep, Alert, AlertDescription, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, AlertTitle, ApiSchema, ApprovalCard, ApprovalDiffSummary, ArtifactPane, AuthHeader, Avatar, AvatarFallback, AvatarImage, Badge, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Button, CATEGORY_TONES, CSV_PREVIEW_ROW_LIMIT, Calendar, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, ChatContainer, ChatMessage, Checkbox, Chip, CodeBlock, Collapsible, CollapsibleContent, CollapsibleTrigger, CommandPreview, ComplianceBadge, ContextMenu, ContextMenuCheckboxItem, ContextMenuContent, ContextMenuGroup, ContextMenuItem, ContextMenuLabel, ContextMenuPortal, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuShortcut, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuTrigger, CopyButton, DatePicker, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DiffPreview, DropZone, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, EmptyState, ExpandedToolDetail, Field, FileArtifactPane, FileCard, FileList, FilePreview, FileTabs, FileTree, FilterField, GitHubLoginButton, GlobResultsPreview, GrepResultsPreview, Heading, HelpText, HoverCard, HoverCardContent, HoverCardDescription, HoverCardHeader, HoverCardTitle, HoverCardTrigger, IconTile, InlineCode, InlineThinkingItem, InlineToolItem, Input, Label, LiveDuration, LoginLayout, Logo, Markdown, MessageAuthor, MessageList, Metric, MetricChart, MetricStrip, OPENUI_NODE_JSON_SCHEMA, OPENUI_NODE_TYPES, OpenUIArtifactRenderer, PageHeader, PageShell, Pagination, PdfViewer, Popover, PopoverAnchor, PopoverClose, PopoverContent, PopoverTrigger, Progress, QuestionPreview, RadioGroup, RadioGroupItem, RealtimeSessionRegistry, RedactedDocument, RichFileTree, RunGroup, RunPhaseList, RunRowShell, RunRowStatusDot, RunStatusIcon, SegmentedControl, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, SeriesSparkline, SettingsList, SettingsListItem, SettingsNote, SettingsRow, SettingsSection, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger, SidebarDropZone, Skeleton, SkeletonCard, SkeletonTable, Slider, SpeakerHeader, StatCard, StatusPill, Switch, TONE_CLASSES, TOOL_CATEGORY_ICONS, TRANSCRIPT_TEXT, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Tag, TangleKnot, TaskList, TerminalCursor, TerminalDisplay, TerminalInput, TerminalLine, TextShimmer, Textarea, ThemeToggle, ThinkingIndicator, TimeSelect, ToastContainer, ToastProvider, ToolCallFeed, Toolbar, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, UploadProgress, UserMenu, UserMessage, WebSearchPreview, Wizard, WizardStep, WriteFilePreview, activeSessionsAtom, addMessage, addParts, agentTimelineStepKind, badgeVariants, bumpActiveSessionActivity, buttonVariants, clearChat, cn, codeBlockGrammar, configurePdfViewer, copyText, createAuthFetcher, detectFileFormat, fenceInfo, fieldMessageId, fileExtension, filterFileTree, findUnsupportedOpenUINode, focusField, focusFieldInvalid, focusFieldWithin, focusRing, focusRingInset, foldSummary, formatBytes, formatCalendarDate, formatDuration, formatUptime, getActiveSession, getAllActiveSessions, getAllProjectActivity, getCodeLanguage, getFormatLabel, getSanitizedMarkdownHeadingIdFromRawFragment, getSessionsByActivity, getSessionsForNavbar, getSessionsForProject, getSyntaxLanguage, getToolCategory, getToolDisplayMetadata, getToolErrorText, getTotalRunningSessionCount, hasBackgroundRunningSessions, initialsOf, isOpen, isStreamingAtom, isViewerMessage, ixControl, ixControlAfter, ixControlSoft, ixField, ixRow, ixSelected, ixTabUnderline, localToday, messagesAtom, normalizeSeries, numericColumns, parseCalendarDate, parseCsv, parseToolEvent, partMapAtom, partitionBySpeaker, periodDelta, plainTextFromMarkdown, registerActiveSession, resetActiveSessions, resolveFilePreviewKind, runStatus, seriesAreaPath, seriesExtent, seriesLinePath, seriesMean, seriesScale, setActiveSessionAttention, setActiveSessionConnection, setActiveSessionError, setActiveSessionRunning, setForegroundActiveSession, showsTaskPriority, statusMeta, tableCsv, taskProgress, taskStatus, timeAgo, toneFor, truncateText, unregisterActiveSession, updateActiveSessionMeta, updatePart, useActiveSession, useActiveSessions, useActiveSessionsState, useApiKey, useAuth, useAutoScroll, useDropdownMenu, useEventStream, useFollowTail, useHasBackgroundRunningSessions, useLiveTime, useNavbarSessions, useProjectActivity, useProjectSessions, useRealtimeSession, useRunCollapseState, useRunGroups, useRunNow, useSSEStream, useSdkSession, useSessionsByActivity, useTheme, useToast, useToolCallStream, useTotalRunningSessions, validateOpenUIJsonArtifact, validateOpenUIJsonNode };
|
|
134
|
+
export { AgentTimeline, AgentTimelineColumn, AgentTimelineStep, Alert, AlertDescription, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, AlertTitle, ApiSchema, ApprovalCard, ApprovalDiffSummary, ArtifactPane, AuthHeader, Avatar, AvatarFallback, AvatarImage, Badge, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Button, CATEGORY_TONES, CSV_PREVIEW_ROW_LIMIT, Calendar, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, ChatContainer, ChatMessage, Checkbox, Chip, CodeBlock, Collapsible, CollapsibleContent, CollapsibleTrigger, CommandPreview, ComplianceBadge, ContextMenu, ContextMenuCheckboxItem, ContextMenuContent, ContextMenuGroup, ContextMenuItem, ContextMenuLabel, ContextMenuPortal, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuShortcut, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuTrigger, CopyButton, DatePicker, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DiffPreview, DropZone, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, EmptyState, ExpandedToolDetail, Field, FileArtifactPane, FileCard, FileList, FilePreview, FileTabs, FileTree, FilterField, GitHubLoginButton, GlobResultsPreview, GrepResultsPreview, Heading, HelpText, HoverCard, HoverCardContent, HoverCardDescription, HoverCardHeader, HoverCardTitle, HoverCardTrigger, IconTile, InlineCode, InlineThinkingItem, InlineToolItem, Input, Label, LiveDuration, LoginLayout, Logo, Markdown, MessageAuthor, MessageList, Metric, MetricChart, MetricStrip, OPENUI_NODE_JSON_SCHEMA, OPENUI_NODE_TYPES, OpenUIArtifactRenderer, PageHeader, PageShell, Pagination, PdfViewer, Popover, PopoverAnchor, PopoverClose, PopoverContent, PopoverTrigger, Progress, QuestionPreview, RadioGroup, RadioGroupItem, RealtimeSessionRegistry, RedactedDocument, RichFileTree, RunGroup, RunPhaseList, RunRowShell, RunRowStatusDot, RunStatusIcon, SegmentedControl, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, SeriesSparkline, SettingsList, SettingsListItem, SettingsNote, SettingsRow, SettingsSection, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger, SidebarDropZone, Skeleton, SkeletonCard, SkeletonTable, Slider, SpeakerHeader, StatCard, StatusPill, Switch, TONE_CLASSES, TOOL_CATEGORY_ICONS, TRANSCRIPT_TEXT, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Tag, TangleKnot, TaskList, TerminalCursor, TerminalDisplay, TerminalInput, TerminalLine, TextShimmer, Textarea, ThemeToggle, ThinkingIndicator, TimeSelect, ToastContainer, ToastProvider, ToolCallFeed, Toolbar, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, UploadProgress, UserMenu, UserMessage, WebSearchPreview, Wizard, WizardStep, WriteFilePreview, activeSessionsAtom, addMessage, addParts, agentTimelineStepKind, badgeVariants, bumpActiveSessionActivity, buttonVariants, clearChat, cn, codeBlockGrammar, configurePdfViewer, copyText, createAuthFetcher, detectFileFormat, fenceInfo, fieldMessageId, fileExtension, filterFileTree, findUnsupportedOpenUINode, focusField, focusFieldInvalid, focusFieldWithin, focusRing, focusRingInset, foldSummary, formatAxisDuration, formatBytes, formatCalendarDate, formatClock, formatCompact, formatCost, formatCount, formatSpanDuration as formatDuration, formatSpanDuration, formatSpanDuration as formatUptime, formatUtcTime, getActiveSession, getAllActiveSessions, getAllProjectActivity, getCodeLanguage, getFormatLabel, getSanitizedMarkdownHeadingIdFromRawFragment, getSessionsByActivity, getSessionsForNavbar, getSessionsForProject, getSyntaxLanguage, getToolCategory, getToolDisplayMetadata, getToolErrorText, getTotalRunningSessionCount, hasBackgroundRunningSessions, initialsOf, isOpen, isStreamingAtom, isViewerMessage, ixControl, ixControlAfter, ixControlSoft, ixField, ixRow, ixSelected, ixTabUnderline, localToday, messagesAtom, normalizeSeries, numericColumns, parseCalendarDate, parseCsv, parseToolEvent, partMapAtom, partitionBySpeaker, periodDelta, plainTextFromMarkdown, registerActiveSession, resetActiveSessions, resolveFilePreviewKind, runStatus, seriesAreaPath, seriesExtent, seriesLinePath, seriesMean, seriesScale, setActiveSessionAttention, setActiveSessionConnection, setActiveSessionError, setActiveSessionRunning, setForegroundActiveSession, showsTaskPriority, statusMeta, tableCsv, taskProgress, taskStatus, timeAgo, toneFor, truncateText, unregisterActiveSession, updateActiveSessionMeta, updatePart, useActiveSession, useActiveSessions, useActiveSessionsState, useApiKey, useAuth, useAutoScroll, useDropdownMenu, useEventStream, useFollowTail, useHasBackgroundRunningSessions, useLiveTime, useNavbarSessions, useProjectActivity, useProjectSessions, useRealtimeSession, useRunCollapseState, useRunGroups, useRunNow, useSSEStream, useSdkSession, useSessionsByActivity, useTheme, useToast, useToolCallStream, useTotalRunningSessions, validateOpenUIJsonArtifact, validateOpenUIJsonNode };
|
|
@@ -1,14 +1,23 @@
|
|
|
1
|
+
import { Popover } from "./popover.js";
|
|
1
2
|
import * as React from "react";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
declare function
|
|
13
|
-
declare
|
|
14
|
-
|
|
3
|
+
type HoverCardProps = React.ComponentProps<typeof Popover> & {
|
|
4
|
+
/** Existing DOM trigger for delegated canvas or virtual-list previews. */
|
|
5
|
+
anchor?: HTMLElement | {
|
|
6
|
+
getBoundingClientRect: () => DOMRect;
|
|
7
|
+
contextElement: HTMLElement;
|
|
8
|
+
} | null;
|
|
9
|
+
openDelay?: number;
|
|
10
|
+
closeDelay?: number;
|
|
11
|
+
};
|
|
12
|
+
/** One hover policy and Popover's keyboard/focus behavior; delays follow the trigger's fast token. */
|
|
13
|
+
export declare function HoverCard({ anchor, open: controlled, defaultOpen, onOpenChange, openDelay, closeDelay, children, ...props }: HoverCardProps): React.JSX.Element;
|
|
14
|
+
export declare const HoverCardTrigger: React.ForwardRefExoticComponent<React.AnchorHTMLAttributes<HTMLAnchorElement> & {
|
|
15
|
+
asChild?: boolean;
|
|
16
|
+
} & React.RefAttributes<HTMLAnchorElement>>;
|
|
17
|
+
export declare const HoverCardContent: React.ForwardRefExoticComponent<Omit<Omit<import("@radix-ui/react-popover").PopoverContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
|
|
18
|
+
container?: HTMLElement | null;
|
|
19
|
+
} & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
20
|
+
export declare function HoverCardHeader({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): React.JSX.Element;
|
|
21
|
+
export declare function HoverCardTitle({ className, ...props }: React.HTMLAttributes<HTMLHeadingElement>): React.JSX.Element;
|
|
22
|
+
export declare function HoverCardDescription({ className, ...props }: React.HTMLAttributes<HTMLParagraphElement>): React.JSX.Element;
|
|
23
|
+
export {};
|
|
@@ -1,46 +1,155 @@
|
|
|
1
1
|
import { cn } from "../lib/utils.js";
|
|
2
|
+
import { Popover, PopoverAnchor, PopoverContent, PopoverTrigger } from "./popover.js";
|
|
3
|
+
import { Slot } from "@radix-ui/react-slot";
|
|
2
4
|
import * as React from "react";
|
|
3
|
-
import { jsx } from "react/jsx-runtime";
|
|
4
|
-
import * as HoverCardPrimitive from "@radix-ui/react-hover-card";
|
|
5
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
6
|
// src/primitives/hover-card.tsx
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
}
|
|
43
|
-
|
|
7
|
+
const HoverIntent = React.createContext({
|
|
8
|
+
enter: (_target) => {},
|
|
9
|
+
leave: () => {},
|
|
10
|
+
restore: () => {}
|
|
11
|
+
});
|
|
12
|
+
/** One hover policy and Popover's keyboard/focus behavior; delays follow the trigger's fast token. */
|
|
13
|
+
function HoverCard({ anchor, open: controlled, defaultOpen = false, onOpenChange, openDelay, closeDelay, children, ...props }) {
|
|
14
|
+
const element = anchor && ("contextElement" in anchor ? anchor.contextElement : anchor);
|
|
15
|
+
const [own, setOwn] = React.useState({
|
|
16
|
+
anchor: element,
|
|
17
|
+
open: defaultOpen
|
|
18
|
+
});
|
|
19
|
+
const intent = React.useRef({});
|
|
20
|
+
if (element) intent.current.target = element;
|
|
21
|
+
const change = React.useCallback((next) => {
|
|
22
|
+
clearTimeout(intent.current.timer);
|
|
23
|
+
if (controlled === void 0) setOwn({
|
|
24
|
+
anchor: element,
|
|
25
|
+
open: next
|
|
26
|
+
});
|
|
27
|
+
onOpenChange?.(next);
|
|
28
|
+
}, [
|
|
29
|
+
controlled,
|
|
30
|
+
onOpenChange,
|
|
31
|
+
element
|
|
32
|
+
]);
|
|
33
|
+
const delay = (target) => {
|
|
34
|
+
if (typeof document === "undefined") return 0;
|
|
35
|
+
const value = getComputedStyle(target ?? document.documentElement).getPropertyValue("--duration-fast").trim();
|
|
36
|
+
return (parseFloat(value) || 0) * (value.endsWith("ms") ? 1 : 1e3);
|
|
37
|
+
};
|
|
38
|
+
const enter = React.useCallback((target) => {
|
|
39
|
+
if (intent.current.restoring) return;
|
|
40
|
+
if (!target.closest("[data-hover-card]")) intent.current.target = target;
|
|
41
|
+
clearTimeout(intent.current.timer);
|
|
42
|
+
intent.current.timer = setTimeout(() => change(true), openDelay ?? delay(target));
|
|
43
|
+
}, [change, openDelay]);
|
|
44
|
+
const leave = React.useCallback(() => {
|
|
45
|
+
clearTimeout(intent.current.timer);
|
|
46
|
+
intent.current.timer = setTimeout(() => change(false), closeDelay ?? delay(element ?? intent.current.target));
|
|
47
|
+
}, [
|
|
48
|
+
change,
|
|
49
|
+
closeDelay,
|
|
50
|
+
element
|
|
51
|
+
]);
|
|
52
|
+
React.useEffect(() => {
|
|
53
|
+
if (!element) return () => clearTimeout(intent.current.timer);
|
|
54
|
+
const show = () => enter(element), blur = (event) => {
|
|
55
|
+
if (!(event.relatedTarget instanceof Element && event.relatedTarget.closest("[data-hover-card]"))) leave();
|
|
56
|
+
};
|
|
57
|
+
element.addEventListener("pointerenter", show);
|
|
58
|
+
element.addEventListener("pointerleave", leave);
|
|
59
|
+
element.addEventListener("focusin", show);
|
|
60
|
+
element.addEventListener("focusout", blur);
|
|
61
|
+
return () => {
|
|
62
|
+
clearTimeout(intent.current.timer);
|
|
63
|
+
element.removeEventListener("pointerenter", show);
|
|
64
|
+
element.removeEventListener("pointerleave", leave);
|
|
65
|
+
element.removeEventListener("focusin", show);
|
|
66
|
+
element.removeEventListener("focusout", blur);
|
|
67
|
+
};
|
|
68
|
+
}, [
|
|
69
|
+
anchor,
|
|
70
|
+
element,
|
|
71
|
+
enter,
|
|
72
|
+
leave
|
|
73
|
+
]);
|
|
74
|
+
const restore = () => {
|
|
75
|
+
intent.current.restoring = true;
|
|
76
|
+
if (document.activeElement === document.body && intent.current.target instanceof HTMLElement) intent.current.target.focus({ preventScroll: true });
|
|
77
|
+
queueMicrotask(() => {
|
|
78
|
+
intent.current.restoring = false;
|
|
79
|
+
});
|
|
80
|
+
};
|
|
81
|
+
return /* @__PURE__ */ jsx(HoverIntent.Provider, {
|
|
82
|
+
value: {
|
|
83
|
+
enter,
|
|
84
|
+
leave,
|
|
85
|
+
restore
|
|
86
|
+
},
|
|
87
|
+
children: /* @__PURE__ */ jsxs(Popover, {
|
|
88
|
+
...props,
|
|
89
|
+
open: anchor === null ? false : controlled ?? (own.anchor === element && own.open),
|
|
90
|
+
onOpenChange: change,
|
|
91
|
+
children: [anchor && /* @__PURE__ */ jsx(PopoverAnchor, { virtualRef: { current: anchor } }), children]
|
|
92
|
+
})
|
|
93
|
+
});
|
|
94
|
+
}
|
|
95
|
+
const HoverCardTrigger = React.forwardRef(({ className, onPointerEnter, onPointerLeave, onFocus, onBlur, asChild, ...props }, ref) => {
|
|
96
|
+
const intent = React.useContext(HoverIntent);
|
|
97
|
+
return /* @__PURE__ */ jsx(PopoverTrigger, {
|
|
98
|
+
asChild: true,
|
|
99
|
+
children: /* @__PURE__ */ jsx(asChild ? Slot : "a", {
|
|
100
|
+
ref,
|
|
101
|
+
tabIndex: 0,
|
|
102
|
+
className: cn("cursor-pointer underline-offset-4 hover:underline", className),
|
|
103
|
+
onPointerEnter: (event) => {
|
|
104
|
+
onPointerEnter?.(event);
|
|
105
|
+
if (!event.defaultPrevented) intent.enter(event.currentTarget);
|
|
106
|
+
},
|
|
107
|
+
onPointerLeave: (event) => {
|
|
108
|
+
onPointerLeave?.(event);
|
|
109
|
+
if (!event.defaultPrevented) intent.leave();
|
|
110
|
+
},
|
|
111
|
+
onFocus: (event) => {
|
|
112
|
+
onFocus?.(event);
|
|
113
|
+
if (!event.defaultPrevented) intent.enter(event.currentTarget);
|
|
114
|
+
},
|
|
115
|
+
onBlur: (event) => {
|
|
116
|
+
onBlur?.(event);
|
|
117
|
+
if (!event.defaultPrevented && !(event.relatedTarget instanceof Element && event.relatedTarget.closest("[data-hover-card]"))) intent.leave();
|
|
118
|
+
},
|
|
119
|
+
...props
|
|
120
|
+
})
|
|
121
|
+
});
|
|
122
|
+
});
|
|
123
|
+
HoverCardTrigger.displayName = "HoverCardTrigger";
|
|
124
|
+
const HoverCardContent = React.forwardRef(({ className, onPointerEnter, onPointerLeave, onOpenAutoFocus, onCloseAutoFocus, ...props }, ref) => {
|
|
125
|
+
const intent = React.useContext(HoverIntent);
|
|
126
|
+
return /* @__PURE__ */ jsx(PopoverContent, {
|
|
127
|
+
ref,
|
|
128
|
+
"data-hover-card": true,
|
|
129
|
+
className: cn("w-64", className),
|
|
130
|
+
onOpenAutoFocus: (event) => {
|
|
131
|
+
onOpenAutoFocus?.(event);
|
|
132
|
+
event.preventDefault();
|
|
133
|
+
},
|
|
134
|
+
onCloseAutoFocus: (event) => {
|
|
135
|
+
onCloseAutoFocus?.(event);
|
|
136
|
+
if (!event.defaultPrevented) {
|
|
137
|
+
event.preventDefault();
|
|
138
|
+
intent.restore();
|
|
139
|
+
}
|
|
140
|
+
},
|
|
141
|
+
onPointerEnter: (event) => {
|
|
142
|
+
onPointerEnter?.(event);
|
|
143
|
+
if (!event.defaultPrevented) intent.enter(event.currentTarget);
|
|
144
|
+
},
|
|
145
|
+
onPointerLeave: (event) => {
|
|
146
|
+
onPointerLeave?.(event);
|
|
147
|
+
if (!event.defaultPrevented) intent.leave();
|
|
148
|
+
},
|
|
149
|
+
...props
|
|
150
|
+
});
|
|
151
|
+
});
|
|
152
|
+
HoverCardContent.displayName = "HoverCardContent";
|
|
44
153
|
function HoverCardHeader({ className, ...props }) {
|
|
45
154
|
return /* @__PURE__ */ jsx("div", {
|
|
46
155
|
className: cn("flex flex-col gap-1 pb-2", className),
|
|
@@ -9,5 +9,7 @@ declare const PopoverClose: React.ForwardRefExoticComponent<PopoverPrimitive.Pop
|
|
|
9
9
|
* shadow as `DropdownMenuContent`. Width defaults to 18rem; pass a width class
|
|
10
10
|
* for wider content and keep long text wrapping inside it.
|
|
11
11
|
*/
|
|
12
|
-
declare const PopoverContent: React.ForwardRefExoticComponent<Omit<PopoverPrimitive.PopoverContentProps & React.RefAttributes<HTMLDivElement>, "ref"> &
|
|
12
|
+
declare const PopoverContent: React.ForwardRefExoticComponent<Omit<PopoverPrimitive.PopoverContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
|
|
13
|
+
container?: HTMLElement | null;
|
|
14
|
+
} & React.RefAttributes<HTMLDivElement>>;
|
|
13
15
|
export { Popover, PopoverAnchor, PopoverClose, PopoverContent, PopoverTrigger };
|
|
@@ -15,18 +15,21 @@ const PopoverClose = PopoverPrimitive.Close;
|
|
|
15
15
|
* shadow as `DropdownMenuContent`. Width defaults to 18rem; pass a width class
|
|
16
16
|
* for wider content and keep long text wrapping inside it.
|
|
17
17
|
*/
|
|
18
|
-
const PopoverContent = React.forwardRef(({ className, align = "center", sideOffset = 4, asChild, children, ...props }, ref) => /* @__PURE__ */ jsx(PopoverPrimitive.Portal, {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
18
|
+
const PopoverContent = React.forwardRef(({ className, align = "center", sideOffset = 4, asChild, children, container, ...props }, ref) => /* @__PURE__ */ jsx(PopoverPrimitive.Portal, {
|
|
19
|
+
container,
|
|
20
|
+
children: /* @__PURE__ */ jsx(PopoverPrimitive.Content, {
|
|
21
|
+
ref,
|
|
22
|
+
align,
|
|
23
|
+
sideOffset,
|
|
24
|
+
className: cn("z-50 w-72 max-w-[calc(100vw-2rem)] origin-(--radix-popover-content-transform-origin) rounded-xl border border-border bg-card p-4 text-foreground shadow-[var(--shadow-card)] outline-hidden", surfaceMotion, className),
|
|
25
|
+
...props,
|
|
26
|
+
asChild: true,
|
|
27
|
+
children: /* @__PURE__ */ jsx(SurfaceMotion, {
|
|
28
|
+
kind: "popover",
|
|
29
|
+
asChild,
|
|
30
|
+
children
|
|
31
|
+
})
|
|
29
32
|
})
|
|
30
|
-
})
|
|
33
|
+
}));
|
|
31
34
|
PopoverContent.displayName = PopoverPrimitive.Content.displayName;
|
|
32
35
|
export { Popover, PopoverAnchor, PopoverClose, PopoverContent, PopoverTrigger };
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { cn } from "../lib/utils.js";
|
|
2
2
|
import { Button } from "./button.js";
|
|
3
|
+
import { formatBytes } from "../utils/format.js";
|
|
3
4
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
5
|
import { AlertCircle, CheckCircle2, FileText, Loader2, RefreshCw, X } from "lucide-react";
|
|
5
6
|
// src/primitives/upload-progress.tsx
|
|
@@ -9,11 +10,6 @@ import { AlertCircle, CheckCircle2, FileText, Loader2, RefreshCw, X } from "luci
|
|
|
9
10
|
* Shows a list of files being uploaded with progress bars,
|
|
10
11
|
* completion checkmarks, and error states.
|
|
11
12
|
*/
|
|
12
|
-
function formatSize(bytes) {
|
|
13
|
-
if (bytes < 1024) return `${bytes}B`;
|
|
14
|
-
if (bytes < 1048576) return `${(bytes / 1024).toFixed(0)}KB`;
|
|
15
|
-
return `${(bytes / 1048576).toFixed(1)}MB`;
|
|
16
|
-
}
|
|
17
13
|
function UploadProgress({ files, onRemove, onRetry, className }) {
|
|
18
14
|
if (files.length === 0) return null;
|
|
19
15
|
return /* @__PURE__ */ jsx("div", {
|
|
@@ -35,7 +31,7 @@ function UploadProgress({ files, onRemove, onRetry, className }) {
|
|
|
35
31
|
children: file.name
|
|
36
32
|
}), /* @__PURE__ */ jsx("span", {
|
|
37
33
|
className: "shrink-0 text-[length:var(--font-size-help,0.75rem)] text-muted-foreground",
|
|
38
|
-
children:
|
|
34
|
+
children: formatBytes(file.size)
|
|
39
35
|
})]
|
|
40
36
|
}),
|
|
41
37
|
file.status === "uploading" && file.progress !== void 0 && /* @__PURE__ */ jsx("div", {
|
package/dist/run/run-group.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { cn } from "../lib/utils.js";
|
|
2
|
-
import { formatDuration } from "../utils/format.js";
|
|
2
|
+
import { formatDuration as formatSpanDuration } from "../utils/format.js";
|
|
3
3
|
import { RunStatusIcon, statusMeta } from "./status-meta.js";
|
|
4
4
|
import { InlineToolItem } from "./inline-tool-item.js";
|
|
5
5
|
import { Markdown } from "../markdown/markdown.js";
|
|
@@ -155,7 +155,7 @@ function renderSummary(run) {
|
|
|
155
155
|
const parts = [];
|
|
156
156
|
if (run.stats.toolCount > 0) parts.push(`${run.stats.toolCount} tool${run.stats.toolCount === 1 ? "" : "s"}`);
|
|
157
157
|
if (run.stats.textPartCount > 0) parts.push(`${run.stats.textPartCount} response${run.stats.textPartCount === 1 ? "" : "s"}`);
|
|
158
|
-
if (run.stats.thinkingDurationMs > 0) parts.push(`${
|
|
158
|
+
if (run.stats.thinkingDurationMs > 0) parts.push(`${formatSpanDuration(run.stats.thinkingDurationMs)} thinking`);
|
|
159
159
|
return parts.join(", ");
|
|
160
160
|
}
|
|
161
161
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { formatDuration } from "../utils/format.js";
|
|
1
|
+
import { formatDuration as formatSpanDuration } from "../utils/format.js";
|
|
2
2
|
import { useLiveTime } from "../hooks/use-live-time.js";
|
|
3
3
|
import { jsx } from "react/jsx-runtime";
|
|
4
4
|
// src/run/run-item-primitives.tsx
|
|
@@ -6,7 +6,7 @@ function LiveDuration({ startTime }) {
|
|
|
6
6
|
const elapsed = useLiveTime(100) - startTime;
|
|
7
7
|
return /* @__PURE__ */ jsx("span", {
|
|
8
8
|
className: "text-xs font-mono text-neutral-400 dark:text-neutral-500 tabular-nums",
|
|
9
|
-
children:
|
|
9
|
+
children: formatSpanDuration(elapsed)
|
|
10
10
|
});
|
|
11
11
|
}
|
|
12
12
|
export { LiveDuration };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { cn } from "../lib/utils.js";
|
|
2
|
-
import { formatDuration } from "../utils/format.js";
|
|
2
|
+
import { formatDuration as formatSpanDuration } from "../utils/format.js";
|
|
3
3
|
import { useState } from "react";
|
|
4
4
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
5
|
import { ChevronRight } from "lucide-react";
|
|
@@ -84,7 +84,7 @@ function RunRowShell({ icon, title, description, descriptionMono = false, status
|
|
|
84
84
|
!isRunning && durationMs != null ? /* @__PURE__ */ jsx("span", {
|
|
85
85
|
"data-run-row-duration": "",
|
|
86
86
|
className: "ml-auto shrink-0 font-mono text-sm tabular-nums text-muted-foreground opacity-0 transition-opacity group-hover:opacity-100",
|
|
87
|
-
children:
|
|
87
|
+
children: formatSpanDuration(durationMs)
|
|
88
88
|
}) : null
|
|
89
89
|
]
|
|
90
90
|
})
|