@mastra/playground-ui 20.0.1-alpha.2 → 20.0.2-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +48 -0
- package/dist/index.cjs.js +1915 -104
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.css +174 -5
- package/dist/index.es.js +1900 -100
- package/dist/index.es.js.map +1 -1
- package/dist/src/domains/logs/components/log-details.d.ts +12 -0
- package/dist/src/domains/logs/components/logs-date-range-selector.d.ts +12 -0
- package/dist/src/domains/logs/components/logs-list.d.ts +20 -0
- package/dist/src/domains/logs/components/logs-toolbar.d.ts +17 -0
- package/dist/src/domains/logs/components/no-logs-info.d.ts +1 -0
- package/dist/src/domains/logs/components/span-details.d.ts +6 -0
- package/dist/src/domains/logs/components/trace/format-hierarchical-spans.d.ts +3 -0
- package/dist/src/domains/logs/components/trace/format-logs-as-spans.d.ts +10 -0
- package/dist/src/domains/logs/components/trace/get-descendant-ids.d.ts +3 -0
- package/dist/src/domains/logs/components/trace/shared.d.ts +3 -0
- package/dist/src/domains/logs/components/trace/span-type-icon.d.ts +6 -0
- package/dist/src/domains/logs/components/trace/timeline-expand-col.d.ts +13 -0
- package/dist/src/domains/logs/components/trace/timeline-name-col.d.ts +15 -0
- package/dist/src/domains/logs/components/trace/timeline-structure-sign.d.ts +5 -0
- package/dist/src/domains/logs/components/trace/timeline-timing-col.d.ts +11 -0
- package/dist/src/domains/logs/components/trace/trace-timeline-span.d.ts +17 -0
- package/dist/src/domains/logs/components/trace/trace-timeline.d.ts +13 -0
- package/dist/src/domains/logs/components/trace/types.d.ts +17 -0
- package/dist/src/domains/logs/components/trace-details.d.ts +8 -0
- package/dist/src/domains/logs/hooks/use-logs-filters.d.ts +25 -0
- package/dist/src/domains/logs/hooks/use-trace-spans.d.ts +44 -0
- package/dist/src/domains/logs/index.d.ts +7 -0
- package/dist/src/domains/logs/types.d.ts +32 -0
- package/dist/src/ds/components/DataDetailsPanel/data-details-panel-close-button.d.ts +6 -0
- package/dist/src/ds/components/DataDetailsPanel/data-details-panel-code-section.d.ts +8 -0
- package/dist/src/ds/components/DataDetailsPanel/data-details-panel-content.d.ts +5 -0
- package/dist/src/ds/components/DataDetailsPanel/data-details-panel-header.d.ts +5 -0
- package/dist/src/ds/components/DataDetailsPanel/data-details-panel-heading.d.ts +5 -0
- package/dist/src/ds/components/DataDetailsPanel/data-details-panel-key-value-list.d.ts +26 -0
- package/dist/src/ds/components/DataDetailsPanel/data-details-panel-loading-data.d.ts +5 -0
- package/dist/src/ds/components/DataDetailsPanel/data-details-panel-no-data.d.ts +4 -0
- package/dist/src/ds/components/DataDetailsPanel/data-details-panel.d.ts +5 -0
- package/dist/src/ds/components/DataDetailsPanel/index.d.ts +32 -0
- package/dist/src/ds/components/DataFilter/index.d.ts +2 -0
- package/dist/src/ds/components/DataFilter/select-data-filter.d.ts +40 -0
- package/dist/src/ds/components/DataList/data-list-cells.d.ts +10 -0
- package/dist/src/ds/components/DataList/data-list-next-page-loading.d.ts +8 -0
- package/dist/src/ds/components/DataList/data-list-no-match.d.ts +5 -0
- package/dist/src/ds/components/DataList/data-list-root.d.ts +7 -0
- package/dist/src/ds/components/DataList/data-list-row-button.d.ts +7 -0
- package/dist/src/ds/components/DataList/data-list-row-link.d.ts +7 -0
- package/dist/src/ds/components/DataList/data-list-row.d.ts +6 -0
- package/dist/src/ds/components/DataList/data-list-skeleton.d.ts +5 -0
- package/dist/src/ds/components/DataList/data-list-top-cell.d.ts +20 -0
- package/dist/src/ds/components/DataList/data-list-top.d.ts +6 -0
- package/dist/src/ds/components/DataList/data-list.d.ts +24 -0
- package/dist/src/ds/components/DataList/index.d.ts +2 -0
- package/dist/src/ds/components/DataList/shared.d.ts +1 -0
- package/dist/src/ds/components/FormFieldBlocks/fields/search-field-block.d.ts +3 -1
- package/dist/src/ds/components/ListSearch/list-search.d.ts +3 -1
- package/dist/src/ds/components/LogsDataList/index.d.ts +2 -0
- package/dist/src/ds/components/LogsDataList/logs-data-list-cells.d.ts +26 -0
- package/dist/src/ds/components/LogsDataList/logs-data-list.d.ts +26 -0
- package/dist/src/index.d.ts +4 -0
- package/package.json +8 -8
package/dist/index.es.js
CHANGED
|
@@ -8,7 +8,7 @@ import { useMastraClient, resolveToChildMessages, useCreateWorkflowRun, useStrea
|
|
|
8
8
|
import { useQuery, useQueryClient, useMutation, useInfiniteQuery, useQueries, QueryClient, QueryClientProvider } from '@tanstack/react-query';
|
|
9
9
|
import './index.css';export * from '@tanstack/react-query';
|
|
10
10
|
import { useComposer, useComposerRuntime, useAttachment, ComposerPrimitive, AttachmentPrimitive, useAuiState, useAssistantState, useMessage, MessagePrimitive, ActionBarPrimitive, ThreadPrimitive, CompositeAttachmentAdapter, SimpleImageAttachmentAdapter, SimpleTextAttachmentAdapter, WebSpeechSynthesisAdapter, useExternalStoreRuntime, AssistantRuntimeProvider } from '@assistant-ui/react';
|
|
11
|
-
import { X, Wand2, Link, CloudUpload, FileText, CircleXIcon, ChevronUpIcon, CircleCheck, CircleX, CircleAlert, Info, CheckIcon as CheckIcon$1, CopyIcon, Share2, Check, FolderTree, HardDrive, Loader2, Brain, ChevronDown, ChevronRight, Unplug, XCircle, CloudCog, TerminalSquare, Clock as Clock$1, PlayCircle, Workflow, Layers, List, CalendarClock, Timer, CornerDownRight, GitBranch, RefreshCw, Repeat, Repeat1, Network, Footprints, Circle, TrashIcon, Brackets, PlusIcon, TriangleAlertIcon, CalendarIcon, CircleAlertIcon, InfoIcon as InfoIcon$1, AlertCircle, TriangleAlert, Braces, ChevronDownIcon, Plus, EyeOffIcon, EyeIcon, ShieldAlert, PauseIcon, HourglassIcon, CircleDashed, Minus, Maximize, AlertCircleIcon, StopCircle, CirclePause, Tag, ShieldX, SearchIcon, ExternalLinkIcon, CircleSlashIcon, Cpu, ChevronsUpDown, Search, ArrowRight, ArrowLeft, CheckCircleIcon, BrainIcon, AudioLinesIcon, StopCircleIcon, DatabaseIcon, Save, Mic, ArrowUp, SaveIcon, BookOpen, ExternalLink, RotateCcw, GripVertical, ArrowLeftIcon, ArrowRightIcon, AlignLeftIcon, AlignJustifyIcon, ArrowUpIcon, ArrowDownIcon, ChevronsRightIcon, CalculatorIcon, ChevronRightIcon, GaugeIcon, ChevronsLeftRightEllipsisIcon, HashIcon, FileInputIcon, FileOutputIcon, ReceiptText, XIcon, Type, ToggleLeft, Hash, Ban, ListX, ChevronsLeft, ChevronsRight, ChevronLeft, Text, TextSearch, EqualNot, Equal, Component, Trash2, Ruler, Trash, MoveRight, Copy, Folder, Pencil, Link2, RefreshCcwIcon, AlignLeft, Trash2Icon, FileTextIcon, BookmarkPlus, PenLine, LaptopMinimal, Plug, File as File$1, FolderOpen, Image, FileJson, FileCode, FolderPlus, Drill, Eye, Wrench, MessageSquare, AlertTriangleIcon, BracesIcon, ArrowRightToLineIcon, CoinsIcon, CircleGaugeIcon, PanelTopIcon, ChevronsUpIcon, ChevronsDownIcon, CircleChevronUpIcon, CircleChevronDownIcon, FileIcon, TimerIcon, ChevronsLeftRightIcon, ChevronFirstIcon, ChevronLastIcon, CircleDashedIcon, ListTreeIcon, PanelLeftIcon, Award, ClipboardCheck, CheckCircle, FormInput, Sparkles, Play, CheckCircle2, FlaskConical, Database, ThumbsUp, ThumbsDown, FileInput, FileOutput, NetworkIcon, WorkflowIcon as WorkflowIcon$1, PackageIcon, GitBranchIcon, PackageOpenIcon, OctagonXIcon, FrownIcon, TrendingUpIcon, TrendingDownIcon, FilterIcon, Upload, ClockIcon, BanIcon, MoveRightIcon, GitCompare, ChevronLeftIcon, TagIcon, FileCodeIcon, Calendar1Icon, HistoryIcon, History, EllipsisVerticalIcon, AmpersandIcon, GitCompareIcon, Download, FolderOutput, AlertTriangle, MoreVertical, PanelRightIcon, PlayIcon, OctagonAlertIcon, CrosshairIcon, TargetIcon, LayersIcon, EqualIcon, PenIcon, KeyboardIcon, CircleSlash, Cloud, Zap, FileCode2, Code, Server, Home, Package, Github } from 'lucide-react';
|
|
11
|
+
import { X, Wand2, Link, CloudUpload, FileText, CircleXIcon, ChevronUpIcon, CircleCheck, CircleX, CircleAlert, Info, CheckIcon as CheckIcon$1, CopyIcon, Share2, Check, FolderTree, HardDrive, Loader2, Brain, ChevronDown, ChevronRight, Unplug, XCircle, CloudCog, TerminalSquare, Clock as Clock$1, PlayCircle, Workflow, Layers, List, CalendarClock, Timer, CornerDownRight, GitBranch, RefreshCw, Repeat, Repeat1, Network, Footprints, Circle, TrashIcon, Brackets, PlusIcon, TriangleAlertIcon, CalendarIcon, CircleAlertIcon, InfoIcon as InfoIcon$1, AlertCircle, TriangleAlert, Braces, ChevronDownIcon, Plus, EyeOffIcon, EyeIcon, ShieldAlert, PauseIcon, HourglassIcon, CircleDashed, Minus, Maximize, AlertCircleIcon, StopCircle, CirclePause, Tag, ShieldX, SearchIcon, ExternalLinkIcon, CircleSlashIcon, Cpu, ChevronsUpDown, Search, ArrowRight, ArrowLeft, CheckCircleIcon, BrainIcon, AudioLinesIcon, StopCircleIcon, DatabaseIcon, Save, Mic, ArrowUp, SaveIcon, BookOpen, ExternalLink, RotateCcw, GripVertical, ArrowLeftIcon, ArrowRightIcon, AlignLeftIcon, AlignJustifyIcon, ArrowUpIcon, ArrowDownIcon, ChevronsRightIcon, CalculatorIcon, ChevronRightIcon, GaugeIcon, ChevronsLeftRightEllipsisIcon, HashIcon, FileInputIcon, FileOutputIcon, ReceiptText, XIcon, Type, ToggleLeft, Hash, Ban, ListX, ChevronsLeft, ChevronsRight, ChevronLeft, Text, TextSearch, EqualNot, Equal, Component, Trash2, Ruler, Trash, MoveRight, Copy, Folder, Pencil, Link2, RefreshCcwIcon, AlignLeft, Trash2Icon, FileTextIcon, BookmarkPlus, PenLine, LaptopMinimal, Plug, File as File$1, FolderOpen, Image, FileJson, FileCode, FolderPlus, Drill, Eye, Wrench, MessageSquare, AlertTriangleIcon, BracesIcon, ArrowRightToLineIcon, CoinsIcon, CircleGaugeIcon, PanelTopIcon, ChevronsUpIcon, ChevronsDownIcon, CircleChevronUpIcon, CircleChevronDownIcon, FileIcon, TimerIcon, ChevronsLeftRightIcon, ChevronFirstIcon, ChevronLastIcon, CircleDashedIcon, ListTreeIcon, PanelLeftIcon, Award, ClipboardCheck, CheckCircle, FormInput, Sparkles, Play, CheckCircle2, FlaskConical, Database, ThumbsUp, ThumbsDown, FileInput, FileOutput, NetworkIcon, WorkflowIcon as WorkflowIcon$1, PackageIcon, GitBranchIcon, PackageOpenIcon, OctagonXIcon, FrownIcon, TrendingUpIcon, TrendingDownIcon, FilterIcon, Upload, ClockIcon, BanIcon, MoveRightIcon, GitCompare, ChevronLeftIcon, TagIcon, FileCodeIcon, Calendar1Icon, HistoryIcon, History, EllipsisVerticalIcon, AmpersandIcon, GitCompareIcon, Download, FolderOutput, AlertTriangle, MoreVertical, PanelRightIcon, PlayIcon, OctagonAlertIcon, CrosshairIcon, TargetIcon, LayersIcon, EqualIcon, PenIcon, ChevronsUpDownIcon, ChevronsDownUpIcon, KeyboardIcon, CircleSlash, Cloud, Zap, FileCode2, Code, Server, Home, Package, Github } from 'lucide-react';
|
|
12
12
|
import { S as Shadows, G as Glows, B as BorderColors, C as Colors, b as Sizes, F as FontSizes, L as LineHeights, a as BorderRadius, c as Spacings } from './spacings-CKfS0_hW.js';
|
|
13
13
|
import * as TooltipPrimitive from '@radix-ui/react-tooltip';
|
|
14
14
|
import { TooltipProvider as TooltipProvider$1 } from '@radix-ui/react-tooltip';
|
|
@@ -5725,7 +5725,7 @@ function buildLightTheme() {
|
|
|
5725
5725
|
]);
|
|
5726
5726
|
return [editorTheme, syntaxHighlighting(highlightStyle)];
|
|
5727
5727
|
}
|
|
5728
|
-
const useCodemirrorTheme$
|
|
5728
|
+
const useCodemirrorTheme$2 = () => {
|
|
5729
5729
|
const isDark = useIsDarkMode();
|
|
5730
5730
|
return useMemo(() => isDark ? buildDarkTheme() : buildLightTheme(), [isDark]);
|
|
5731
5731
|
};
|
|
@@ -5744,7 +5744,7 @@ const CodeEditor = forwardRef(
|
|
|
5744
5744
|
lineNumbers = true,
|
|
5745
5745
|
...props
|
|
5746
5746
|
}, ref) => {
|
|
5747
|
-
const theme = useCodemirrorTheme$
|
|
5747
|
+
const theme = useCodemirrorTheme$2();
|
|
5748
5748
|
const formattedCode = data ? JSON.stringify(data, null, 2) : value ?? "";
|
|
5749
5749
|
const extensions = useMemo(() => {
|
|
5750
5750
|
const exts = [];
|
|
@@ -8357,7 +8357,7 @@ const CodeDialogContent = ({
|
|
|
8357
8357
|
data,
|
|
8358
8358
|
language = "auto"
|
|
8359
8359
|
}) => {
|
|
8360
|
-
const theme = useCodemirrorTheme$
|
|
8360
|
+
const theme = useCodemirrorTheme$2();
|
|
8361
8361
|
const getExtensions = (content) => {
|
|
8362
8362
|
if (language === "javascript") {
|
|
8363
8363
|
return [javascript(), EditorView.lineWrapping];
|
|
@@ -10352,7 +10352,7 @@ const JsonField = ({
|
|
|
10352
10352
|
helperText,
|
|
10353
10353
|
exampleCode
|
|
10354
10354
|
}) => {
|
|
10355
|
-
const theme = useCodemirrorTheme$
|
|
10355
|
+
const theme = useCodemirrorTheme$2();
|
|
10356
10356
|
const { handleCopy } = useCopyToClipboard$1({ text: value });
|
|
10357
10357
|
const { handleCopy: handleCopyExample } = useCopyToClipboard$1({ text: exampleCode ?? "{}" });
|
|
10358
10358
|
const [fieldError, setFieldError] = useState(null);
|
|
@@ -12834,7 +12834,7 @@ function EntityListTopCellWithTooltip({ children, tooltip, className }) {
|
|
|
12834
12834
|
/* @__PURE__ */ jsx(TooltipContent, { children: tooltip })
|
|
12835
12835
|
] });
|
|
12836
12836
|
}
|
|
12837
|
-
const breakpointClasses = {
|
|
12837
|
+
const breakpointClasses$1 = {
|
|
12838
12838
|
sm: { show: "hidden sm:inline-flex", hide: "inline-flex sm:hidden" },
|
|
12839
12839
|
md: { show: "hidden md:inline-flex", hide: "inline-flex md:hidden" },
|
|
12840
12840
|
lg: { show: "hidden lg:inline-flex", hide: "inline-flex lg:hidden" },
|
|
@@ -12849,7 +12849,7 @@ function EntityListTopCellSmart({
|
|
|
12849
12849
|
className
|
|
12850
12850
|
}) {
|
|
12851
12851
|
const tooltipText = tooltip ?? (typeof long === "string" ? long : void 0);
|
|
12852
|
-
const bp = breakpointClasses[breakpoint];
|
|
12852
|
+
const bp = breakpointClasses$1[breakpoint];
|
|
12853
12853
|
const content = /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
12854
12854
|
/* @__PURE__ */ jsx("span", { className: cn("items-center gap-1", bp.show), children: long }),
|
|
12855
12855
|
/* @__PURE__ */ jsx("span", { className: cn("items-center gap-1", bp.hide), children: short })
|
|
@@ -12882,14 +12882,14 @@ const EntityList = Object.assign(EntityListRoot, {
|
|
|
12882
12882
|
NoMatch: EntityListNoMatch
|
|
12883
12883
|
});
|
|
12884
12884
|
|
|
12885
|
-
const widths$
|
|
12885
|
+
const widths$3 = ["75%", "50%", "65%", "90%", "60%", "80%"];
|
|
12886
12886
|
function EntityListSkeleton({ columns, numberOfRows = 3 }) {
|
|
12887
12887
|
const columnParts = columns.trim().split(/\s+/);
|
|
12888
12888
|
const columnCount = columnParts.length;
|
|
12889
12889
|
const skeletonColumns = columnParts.map((col) => col === "auto" ? "minmax(6rem, auto)" : col).join(" ");
|
|
12890
12890
|
const getPseudoRandomWidth = (rowIdx, colIdx) => {
|
|
12891
|
-
const index = (rowIdx + colIdx + columnCount + numberOfRows) % widths$
|
|
12892
|
-
return widths$
|
|
12891
|
+
const index = (rowIdx + colIdx + columnCount + numberOfRows) % widths$3.length;
|
|
12892
|
+
return widths$3[index];
|
|
12893
12893
|
};
|
|
12894
12894
|
return /* @__PURE__ */ jsx(EntityListRoot, { columns: skeletonColumns, children: Array.from({ length: numberOfRows }).map((_, rowIdx) => /* @__PURE__ */ jsx(
|
|
12895
12895
|
"div",
|
|
@@ -13080,7 +13080,7 @@ const WorkflowRunOptions = () => {
|
|
|
13080
13080
|
};
|
|
13081
13081
|
|
|
13082
13082
|
const TracingRunOptions = () => {
|
|
13083
|
-
const theme = useCodemirrorTheme$
|
|
13083
|
+
const theme = useCodemirrorTheme$2();
|
|
13084
13084
|
const { settings, setSettings, entityType } = useTracingSettings();
|
|
13085
13085
|
const handleChange = (value) => {
|
|
13086
13086
|
if (!value) {
|
|
@@ -17846,7 +17846,7 @@ const AgentAdvancedSettings = () => {
|
|
|
17846
17846
|
const [providerOptionsValue, setProviderOptionsValue] = useState("");
|
|
17847
17847
|
const [saved, setSaved] = useState(false);
|
|
17848
17848
|
const [error, setError] = useState(null);
|
|
17849
|
-
const theme = useCodemirrorTheme$
|
|
17849
|
+
const theme = useCodemirrorTheme$2();
|
|
17850
17850
|
const { handleCopy } = useCopyToClipboard$1({ text: providerOptionsValue });
|
|
17851
17851
|
const providerOptionsStr = JSON.stringify(settings?.modelSettings?.providerOptions ?? {});
|
|
17852
17852
|
useEffect(() => {
|
|
@@ -18466,7 +18466,7 @@ const EmptyAgentsTable = () => {
|
|
|
18466
18466
|
const RequestContext = () => {
|
|
18467
18467
|
const { requestContext, setRequestContext } = usePlaygroundStore();
|
|
18468
18468
|
const [requestContextValue, setRequestContextValue] = useState("");
|
|
18469
|
-
const theme = useCodemirrorTheme$
|
|
18469
|
+
const theme = useCodemirrorTheme$2();
|
|
18470
18470
|
const presets = useRequestContextPresets();
|
|
18471
18471
|
const [selectedPreset, setSelectedPreset] = useState(() => {
|
|
18472
18472
|
if (!presets || !requestContext) return "__custom__";
|
|
@@ -19049,11 +19049,11 @@ const EntryList = Object.assign(EntryListRoot, {
|
|
|
19049
19049
|
EntryStatus: EntryListEntryStatusCol
|
|
19050
19050
|
});
|
|
19051
19051
|
|
|
19052
|
-
const widths$
|
|
19052
|
+
const widths$2 = ["75%", "50%", "65%", "90%", "60%", "80%"];
|
|
19053
19053
|
function EntryListEntriesSkeleton({ columns, numberOfRows = 3 }) {
|
|
19054
19054
|
const getPseudoRandomWidth = (rowIdx, colIdx) => {
|
|
19055
|
-
const index = (rowIdx + colIdx + (columns?.length || 0) + (numberOfRows || 0)) % widths$
|
|
19056
|
-
return widths$
|
|
19055
|
+
const index = (rowIdx + colIdx + (columns?.length || 0) + (numberOfRows || 0)) % widths$2.length;
|
|
19056
|
+
return widths$2[index];
|
|
19057
19057
|
};
|
|
19058
19058
|
return /* @__PURE__ */ jsx(EntryListEntries, { children: Array.from({ length: numberOfRows }).map((_, rowIdx) => /* @__PURE__ */ jsx(EntryListEntry, { columns, children: (columns || []).map((col, colIdx) => {
|
|
19059
19059
|
const key = `${col.name}-${colIdx}`;
|
|
@@ -19273,17 +19273,17 @@ function buildSideDialogLightTheme() {
|
|
|
19273
19273
|
]);
|
|
19274
19274
|
return [editorTheme, syntaxHighlighting(highlightStyle)];
|
|
19275
19275
|
}
|
|
19276
|
-
const useCodemirrorTheme = () => {
|
|
19276
|
+
const useCodemirrorTheme$1 = () => {
|
|
19277
19277
|
const isDark = useIsDarkMode();
|
|
19278
19278
|
return useMemo(() => isDark ? buildSideDialogDarkTheme() : buildSideDialogLightTheme(), [isDark]);
|
|
19279
19279
|
};
|
|
19280
19280
|
function SideDialogCodeSection({ codeStr = "", title, icon, simplified = false }) {
|
|
19281
|
-
const theme = useCodemirrorTheme();
|
|
19281
|
+
const theme = useCodemirrorTheme$1();
|
|
19282
19282
|
const [showAsMultilineText, setShowAsMultilineText] = useState(false);
|
|
19283
19283
|
const hasMultilineText = useMemo(() => {
|
|
19284
19284
|
try {
|
|
19285
19285
|
const parsed = JSON.parse(codeStr);
|
|
19286
|
-
return containsInnerNewline(parsed || "");
|
|
19286
|
+
return containsInnerNewline$1(parsed || "");
|
|
19287
19287
|
} catch {
|
|
19288
19288
|
return false;
|
|
19289
19289
|
}
|
|
@@ -19303,14 +19303,14 @@ function SideDialogCodeSection({ codeStr = "", title, icon, simplified = false }
|
|
|
19303
19303
|
codeStr && /* @__PURE__ */ jsx("div", { className: "dark:bg-black/20 bg-surface3 p-4 overflow-hidden rounded-xl border dark:border-white/10 border-border1 text-neutral4 text-ui-md break-all max-h-[30vh] overflow-y-auto", children: simplified ? /* @__PURE__ */ jsx("div", { className: "text-neutral4 font-mono break-all px-2", children: /* @__PURE__ */ jsx("pre", { className: "text-wrap", children: codeStr }) }) : /* @__PURE__ */ jsx(CodeMirror, { extensions: [json(), EditorView.lineWrapping], theme, value: finalCodeStr }) })
|
|
19304
19304
|
] });
|
|
19305
19305
|
}
|
|
19306
|
-
function containsInnerNewline(obj) {
|
|
19306
|
+
function containsInnerNewline$1(obj) {
|
|
19307
19307
|
if (typeof obj === "string") {
|
|
19308
19308
|
const idx = obj.indexOf("\n");
|
|
19309
19309
|
return idx !== -1 && idx !== obj.length - 1;
|
|
19310
19310
|
} else if (Array.isArray(obj)) {
|
|
19311
|
-
return obj.some((item) => containsInnerNewline(item));
|
|
19311
|
+
return obj.some((item) => containsInnerNewline$1(item));
|
|
19312
19312
|
} else if (obj && typeof obj === "object") {
|
|
19313
|
-
return Object.values(obj).some((value) => containsInnerNewline(value));
|
|
19313
|
+
return Object.values(obj).some((value) => containsInnerNewline$1(value));
|
|
19314
19314
|
}
|
|
19315
19315
|
return false;
|
|
19316
19316
|
}
|
|
@@ -22062,7 +22062,7 @@ const AgentMetadata = ({ agentId }) => {
|
|
|
22062
22062
|
const { data: memory, isLoading: isMemoryLoading } = useMemory(agentId);
|
|
22063
22063
|
const { mutate: reorderModelList } = useReorderModelList(agentId);
|
|
22064
22064
|
const { mutateAsync: updateModelInModelList } = useUpdateModelInModelList(agentId);
|
|
22065
|
-
const codemirrorTheme = useCodemirrorTheme$
|
|
22065
|
+
const codemirrorTheme = useCodemirrorTheme$2();
|
|
22066
22066
|
const hasMemoryEnabled = Boolean(memory?.result);
|
|
22067
22067
|
if (isLoading || isMemoryLoading) {
|
|
22068
22068
|
return /* @__PURE__ */ jsx(Skeleton, { className: "h-full" });
|
|
@@ -22781,7 +22781,7 @@ const ToolExecutorContent = ({
|
|
|
22781
22781
|
toolType,
|
|
22782
22782
|
requestContextSchema
|
|
22783
22783
|
}) => {
|
|
22784
|
-
const theme = useCodemirrorTheme$
|
|
22784
|
+
const theme = useCodemirrorTheme$2();
|
|
22785
22785
|
const code = JSON.stringify(result ?? {}, null, 2);
|
|
22786
22786
|
const [selectedTab, setSelectedTab] = useState("input-data");
|
|
22787
22787
|
const { schemaValues } = useSchemaRequestContext();
|
|
@@ -24562,7 +24562,7 @@ function removeFieldAtPath(fields, path, fieldId) {
|
|
|
24562
24562
|
});
|
|
24563
24563
|
}
|
|
24564
24564
|
|
|
24565
|
-
function Root({
|
|
24565
|
+
function Root$1({
|
|
24566
24566
|
onChange,
|
|
24567
24567
|
onFieldsChange,
|
|
24568
24568
|
defaultValue,
|
|
@@ -24843,7 +24843,7 @@ function AddField({ children, ...props }) {
|
|
|
24843
24843
|
}
|
|
24844
24844
|
|
|
24845
24845
|
const JSONSchemaForm = {
|
|
24846
|
-
Root: Root,
|
|
24846
|
+
Root: Root$1,
|
|
24847
24847
|
Field: Field,
|
|
24848
24848
|
FieldList: FieldList,
|
|
24849
24849
|
FieldName: FieldName,
|
|
@@ -33107,7 +33107,7 @@ const useScoresByExperimentId = (experimentId, experimentStatus) => {
|
|
|
33107
33107
|
});
|
|
33108
33108
|
};
|
|
33109
33109
|
|
|
33110
|
-
const formatHierarchicalSpans = (spans) => {
|
|
33110
|
+
const formatHierarchicalSpans$1 = (spans) => {
|
|
33111
33111
|
if (!spans || spans.length === 0) {
|
|
33112
33112
|
return [];
|
|
33113
33113
|
}
|
|
@@ -33307,7 +33307,7 @@ Token usage: ${inputTokens} input + ${outputTokens} output = ${totalTokens} tota
|
|
|
33307
33307
|
return `The model stopped generating because it reached the maximum token limit (${totalTokens} tokens). The response was truncated and may be incomplete.`;
|
|
33308
33308
|
}
|
|
33309
33309
|
|
|
33310
|
-
function SpanDetails({ span }) {
|
|
33310
|
+
function SpanDetails$1({ span }) {
|
|
33311
33311
|
if (!span) {
|
|
33312
33312
|
return null;
|
|
33313
33313
|
}
|
|
@@ -33599,7 +33599,7 @@ function SpanTabs({
|
|
|
33599
33599
|
/* @__PURE__ */ jsx(TabContent, { value: "details", children: /* @__PURE__ */ jsxs(Sections, { children: [
|
|
33600
33600
|
span?.attributes?.usage ? /* @__PURE__ */ jsx(TraceSpanUsage, { spanUsage: span.attributes.usage }) : null,
|
|
33601
33601
|
/* @__PURE__ */ jsx(KeyValueList, { data: spanInfo }),
|
|
33602
|
-
/* @__PURE__ */ jsx(SpanDetails, { span })
|
|
33602
|
+
/* @__PURE__ */ jsx(SpanDetails$1, { span })
|
|
33603
33603
|
] }) }),
|
|
33604
33604
|
/* @__PURE__ */ jsx(TabContent, { value: "scores", children: /* @__PURE__ */ jsxs(Sections, { children: [
|
|
33605
33605
|
/* @__PURE__ */ jsxs(Section, { children: [
|
|
@@ -33747,20 +33747,20 @@ function TraceAsItemDialog({ traceDetails, traceId, isOpen, onClose, level = 2 }
|
|
|
33747
33747
|
);
|
|
33748
33748
|
}
|
|
33749
33749
|
|
|
33750
|
-
function getSpanDescendantIds$
|
|
33750
|
+
function getSpanDescendantIds$2(span) {
|
|
33751
33751
|
if (!span.spans || span.spans.length === 0) {
|
|
33752
33752
|
return [];
|
|
33753
33753
|
}
|
|
33754
33754
|
const descendantIds = [];
|
|
33755
33755
|
span.spans.forEach((childSpan) => {
|
|
33756
33756
|
descendantIds.push(childSpan.id);
|
|
33757
|
-
descendantIds.push(...getSpanDescendantIds$
|
|
33757
|
+
descendantIds.push(...getSpanDescendantIds$2(childSpan));
|
|
33758
33758
|
});
|
|
33759
33759
|
return descendantIds;
|
|
33760
33760
|
}
|
|
33761
33761
|
|
|
33762
33762
|
const spanTypePrefixes$1 = ["agent", "workflow", "model", "mcp", "tool", "other"];
|
|
33763
|
-
function getSpanTypeUi(type) {
|
|
33763
|
+
function getSpanTypeUi$1(type) {
|
|
33764
33764
|
const typePrefix = type?.toLowerCase().split("_")[0];
|
|
33765
33765
|
const spanTypeToUiElements = {
|
|
33766
33766
|
agent: {
|
|
@@ -33807,7 +33807,7 @@ function getSpanTypeUi(type) {
|
|
|
33807
33807
|
};
|
|
33808
33808
|
}
|
|
33809
33809
|
|
|
33810
|
-
function TimelineExpandCol({
|
|
33810
|
+
function TimelineExpandCol$1({
|
|
33811
33811
|
isSelected,
|
|
33812
33812
|
isFaded,
|
|
33813
33813
|
isExpanded,
|
|
@@ -33825,12 +33825,12 @@ function TimelineExpandCol({
|
|
|
33825
33825
|
"bg-surface4": isSelected
|
|
33826
33826
|
}),
|
|
33827
33827
|
children: numOfChildren && numOfChildren > 0 ? /* @__PURE__ */ jsxs("div", { className: "flex gap-1", children: [
|
|
33828
|
-
/* @__PURE__ */ jsxs(ExpandButton$
|
|
33828
|
+
/* @__PURE__ */ jsxs(ExpandButton$2, { onClick: () => toggleChildren?.(), children: [
|
|
33829
33829
|
allDescendantsExpanded ? totalDescendants : numOfChildren,
|
|
33830
33830
|
" ",
|
|
33831
33831
|
isExpanded ? allDescendantsExpanded ? /* @__PURE__ */ jsx(ChevronsUpIcon, {}) : /* @__PURE__ */ jsx(ChevronUpIcon, {}) : /* @__PURE__ */ jsx(ChevronDownIcon, {})
|
|
33832
33832
|
] }),
|
|
33833
|
-
totalDescendants > numOfChildren && !allDescendantsExpanded && /* @__PURE__ */ jsxs(ExpandButton$
|
|
33833
|
+
totalDescendants > numOfChildren && !allDescendantsExpanded && /* @__PURE__ */ jsxs(ExpandButton$2, { onClick: () => expandAllDescendants?.(), children: [
|
|
33834
33834
|
totalDescendants,
|
|
33835
33835
|
" ",
|
|
33836
33836
|
/* @__PURE__ */ jsx(ChevronsDownIcon, {})
|
|
@@ -33839,7 +33839,7 @@ function TimelineExpandCol({
|
|
|
33839
33839
|
}
|
|
33840
33840
|
);
|
|
33841
33841
|
}
|
|
33842
|
-
function ExpandButton$
|
|
33842
|
+
function ExpandButton$2({ onClick, children, className }) {
|
|
33843
33843
|
return /* @__PURE__ */ jsx("button", { onClick, className: cn("h-full", className), children: /* @__PURE__ */ jsx(
|
|
33844
33844
|
"div",
|
|
33845
33845
|
{
|
|
@@ -33867,7 +33867,7 @@ function SpanTypeIcon({ icon, color }) {
|
|
|
33867
33867
|
);
|
|
33868
33868
|
}
|
|
33869
33869
|
|
|
33870
|
-
function TimelineStructureSign({
|
|
33870
|
+
function TimelineStructureSign$1({
|
|
33871
33871
|
isLastChild,
|
|
33872
33872
|
hasChildren = false,
|
|
33873
33873
|
expanded = false
|
|
@@ -33899,7 +33899,7 @@ function TimelineStructureSign({
|
|
|
33899
33899
|
);
|
|
33900
33900
|
}
|
|
33901
33901
|
|
|
33902
|
-
function TimelineNameCol({
|
|
33902
|
+
function TimelineNameCol$1({
|
|
33903
33903
|
span,
|
|
33904
33904
|
spanUI,
|
|
33905
33905
|
isFaded,
|
|
@@ -33931,7 +33931,7 @@ function TimelineNameCol({
|
|
|
33931
33931
|
"cursor-default": !hasChildren,
|
|
33932
33932
|
"cursor-pointer": hasChildren
|
|
33933
33933
|
}),
|
|
33934
|
-
children: /* @__PURE__ */ jsx(TimelineStructureSign, { isLastChild, hasChildren: Boolean(hasChildren), expanded: isExpanded })
|
|
33934
|
+
children: /* @__PURE__ */ jsx(TimelineStructureSign$1, { isLastChild, hasChildren: Boolean(hasChildren), expanded: isExpanded })
|
|
33935
33935
|
}
|
|
33936
33936
|
),
|
|
33937
33937
|
/* @__PURE__ */ jsxs(
|
|
@@ -33955,7 +33955,7 @@ function TimelineNameCol({
|
|
|
33955
33955
|
);
|
|
33956
33956
|
}
|
|
33957
33957
|
|
|
33958
|
-
function TimelineTimingCol({
|
|
33958
|
+
function TimelineTimingCol$1({
|
|
33959
33959
|
span,
|
|
33960
33960
|
selectedSpanId,
|
|
33961
33961
|
isFaded,
|
|
@@ -34058,7 +34058,7 @@ function TimelineTimingCol({
|
|
|
34058
34058
|
] });
|
|
34059
34059
|
}
|
|
34060
34060
|
|
|
34061
|
-
function TraceTimelineSpan({
|
|
34061
|
+
function TraceTimelineSpan$1({
|
|
34062
34062
|
span,
|
|
34063
34063
|
depth = 0,
|
|
34064
34064
|
onSpanClick,
|
|
@@ -34075,10 +34075,10 @@ function TraceTimelineSpan({
|
|
|
34075
34075
|
}) {
|
|
34076
34076
|
const hasChildren = span.spans && span.spans.length > 0;
|
|
34077
34077
|
const numOfChildren = span.spans ? span.spans.length : 0;
|
|
34078
|
-
const allDescendantIds = getSpanDescendantIds$
|
|
34078
|
+
const allDescendantIds = getSpanDescendantIds$2(span);
|
|
34079
34079
|
const totalDescendants = allDescendantIds.length;
|
|
34080
34080
|
const isRootSpan = depth === 0;
|
|
34081
|
-
const spanUI = getSpanTypeUi(span?.type);
|
|
34081
|
+
const spanUI = getSpanTypeUi$1(span?.type);
|
|
34082
34082
|
const isExpanded = expandedSpanIds ? expandedSpanIds.includes(span.id) : false;
|
|
34083
34083
|
const isFadedBySearch = featuredSpanIds && featuredSpanIds.length > 0 ? !featuredSpanIds.includes(span.id) : false;
|
|
34084
34084
|
const isFadedByType = fadedTypes && fadedTypes.length > 0 ? fadedTypes.includes(spanUI?.typePrefix || "") : false;
|
|
@@ -34109,7 +34109,7 @@ function TraceTimelineSpan({
|
|
|
34109
34109
|
const allDescendantsExpanded = allDescendantIds.every((id) => expandedSpanIds?.includes(id));
|
|
34110
34110
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
34111
34111
|
/* @__PURE__ */ jsx(
|
|
34112
|
-
TimelineNameCol,
|
|
34112
|
+
TimelineNameCol$1,
|
|
34113
34113
|
{
|
|
34114
34114
|
span,
|
|
34115
34115
|
spanUI,
|
|
@@ -34125,7 +34125,7 @@ function TraceTimelineSpan({
|
|
|
34125
34125
|
}
|
|
34126
34126
|
),
|
|
34127
34127
|
/* @__PURE__ */ jsx(
|
|
34128
|
-
TimelineExpandCol,
|
|
34128
|
+
TimelineExpandCol$1,
|
|
34129
34129
|
{
|
|
34130
34130
|
isSelected: selectedSpanId === span.id,
|
|
34131
34131
|
isFaded,
|
|
@@ -34139,7 +34139,7 @@ function TraceTimelineSpan({
|
|
|
34139
34139
|
}
|
|
34140
34140
|
),
|
|
34141
34141
|
/* @__PURE__ */ jsx(
|
|
34142
|
-
TimelineTimingCol,
|
|
34142
|
+
TimelineTimingCol$1,
|
|
34143
34143
|
{
|
|
34144
34144
|
span,
|
|
34145
34145
|
selectedSpanId,
|
|
@@ -34153,7 +34153,7 @@ function TraceTimelineSpan({
|
|
|
34153
34153
|
hasChildren && isExpanded && span.spans?.map((childSpan, idx, array) => {
|
|
34154
34154
|
const isLastChild2 = idx === array.length - 1;
|
|
34155
34155
|
return /* @__PURE__ */ jsx(
|
|
34156
|
-
TraceTimelineSpan,
|
|
34156
|
+
TraceTimelineSpan$1,
|
|
34157
34157
|
{
|
|
34158
34158
|
span: childSpan,
|
|
34159
34159
|
depth: depth + 1,
|
|
@@ -34174,7 +34174,7 @@ function TraceTimelineSpan({
|
|
|
34174
34174
|
] });
|
|
34175
34175
|
}
|
|
34176
34176
|
|
|
34177
|
-
function TraceTimeline({
|
|
34177
|
+
function TraceTimeline$1({
|
|
34178
34178
|
hierarchicalSpans = [],
|
|
34179
34179
|
onSpanClick,
|
|
34180
34180
|
selectedSpanId,
|
|
@@ -34207,7 +34207,7 @@ function TraceTimeline({
|
|
|
34207
34207
|
"xl:grid-cols-[2fr_auto_1fr]": overallEndTime
|
|
34208
34208
|
}),
|
|
34209
34209
|
children: hierarchicalSpans?.map((span) => /* @__PURE__ */ jsx(
|
|
34210
|
-
TraceTimelineSpan,
|
|
34210
|
+
TraceTimelineSpan$1,
|
|
34211
34211
|
{
|
|
34212
34212
|
span,
|
|
34213
34213
|
onSpanClick,
|
|
@@ -34254,7 +34254,8 @@ function SearchFieldBlock({
|
|
|
34254
34254
|
placeholder = "Search...",
|
|
34255
34255
|
onChange,
|
|
34256
34256
|
onReset,
|
|
34257
|
-
className
|
|
34257
|
+
className,
|
|
34258
|
+
size
|
|
34258
34259
|
}) {
|
|
34259
34260
|
return /* @__PURE__ */ jsxs(FieldBlock.Layout, { layout, className, children: [
|
|
34260
34261
|
layout === "horizontal" ? /* @__PURE__ */ jsx(FieldBlock.Column, { children: /* @__PURE__ */ jsx(FieldBlock.Label, { name, required, children: labelIsHidden ? /* @__PURE__ */ jsx(VisuallyHidden$1, { children: label }) : label }) }) : null,
|
|
@@ -34269,6 +34270,7 @@ function SearchFieldBlock({
|
|
|
34269
34270
|
value,
|
|
34270
34271
|
placeholder,
|
|
34271
34272
|
onChange,
|
|
34273
|
+
size,
|
|
34272
34274
|
className: "pl-10"
|
|
34273
34275
|
}
|
|
34274
34276
|
),
|
|
@@ -34344,7 +34346,7 @@ function TraceTimelineTools({
|
|
|
34344
34346
|
) }),
|
|
34345
34347
|
/* @__PURE__ */ jsxs(CombinedButtons, { children: [
|
|
34346
34348
|
usedSpanTypes.map((item) => {
|
|
34347
|
-
const spanUI = getSpanTypeUi(item);
|
|
34349
|
+
const spanUI = getSpanTypeUi$1(item);
|
|
34348
34350
|
const isFaded = fadedTypes?.includes(item);
|
|
34349
34351
|
return /* @__PURE__ */ jsx(Fragment$1, { children: /* @__PURE__ */ jsxs(
|
|
34350
34352
|
Button,
|
|
@@ -34430,7 +34432,7 @@ function TraceDialog({
|
|
|
34430
34432
|
}
|
|
34431
34433
|
}, [selectedSpanId]);
|
|
34432
34434
|
const hierarchicalSpans = useMemo(() => {
|
|
34433
|
-
return formatHierarchicalSpans(traceSpans);
|
|
34435
|
+
return formatHierarchicalSpans$1(traceSpans);
|
|
34434
34436
|
}, [traceSpans]);
|
|
34435
34437
|
const flatSpans = useMemo(() => {
|
|
34436
34438
|
const flattenSpans = (spans) => {
|
|
@@ -34607,7 +34609,7 @@ function TraceDialog({
|
|
|
34607
34609
|
}
|
|
34608
34610
|
),
|
|
34609
34611
|
/* @__PURE__ */ jsx(
|
|
34610
|
-
TraceTimeline,
|
|
34612
|
+
TraceTimeline$1,
|
|
34611
34613
|
{
|
|
34612
34614
|
hierarchicalSpans,
|
|
34613
34615
|
onSpanClick: handleSpanClick,
|
|
@@ -39420,7 +39422,7 @@ const EntityListPageLayout = Object.assign(EntityListPageLayoutRoot, {
|
|
|
39420
39422
|
Top: EntityListPageLayoutTop
|
|
39421
39423
|
});
|
|
39422
39424
|
|
|
39423
|
-
const ListSearch = ({ onSearch, label, placeholder, debounceMs = 300 }) => {
|
|
39425
|
+
const ListSearch = ({ onSearch, label, placeholder, debounceMs = 300, size }) => {
|
|
39424
39426
|
const id = useId();
|
|
39425
39427
|
const [value, setValue] = useState("");
|
|
39426
39428
|
const debouncedSearch = useDebouncedCallback((val) => {
|
|
@@ -39449,6 +39451,7 @@ const ListSearch = ({ onSearch, label, placeholder, debounceMs = 300 }) => {
|
|
|
39449
39451
|
value,
|
|
39450
39452
|
onChange: handleChange,
|
|
39451
39453
|
onReset: handleReset,
|
|
39454
|
+
size,
|
|
39452
39455
|
className: "w-full max-w-[30rem]"
|
|
39453
39456
|
}
|
|
39454
39457
|
);
|
|
@@ -40420,7 +40423,7 @@ function ProcessorPanel({ processorId }) {
|
|
|
40420
40423
|
return /* @__PURE__ */ jsx(ProcessorDetailPanel, { processor });
|
|
40421
40424
|
}
|
|
40422
40425
|
function ProcessorDetailPanel({ processor }) {
|
|
40423
|
-
const theme = useCodemirrorTheme$
|
|
40426
|
+
const theme = useCodemirrorTheme$2();
|
|
40424
40427
|
const formId = useId();
|
|
40425
40428
|
const [selectedPhase, setSelectedPhase] = useState(processor.phases[0] || "input");
|
|
40426
40429
|
const [selectedAgentId, setSelectedAgentId] = useState(processor.configurations[0]?.agentId || "");
|
|
@@ -41617,14 +41620,14 @@ function TemplateFailure({ errorMsg, validationErrors }) {
|
|
|
41617
41620
|
] });
|
|
41618
41621
|
}
|
|
41619
41622
|
|
|
41620
|
-
const DATE_PRESETS$
|
|
41623
|
+
const DATE_PRESETS$3 = [
|
|
41621
41624
|
{ label: "Last 24 hours", value: "24h" },
|
|
41622
41625
|
{ label: "Last 3 days", value: "3d" },
|
|
41623
41626
|
{ label: "Last 7 days", value: "7d" },
|
|
41624
41627
|
{ label: "Last 14 days", value: "14d" },
|
|
41625
41628
|
{ label: "Last 30 days", value: "30d" }
|
|
41626
41629
|
];
|
|
41627
|
-
const VALID_PRESETS = new Set(DATE_PRESETS$
|
|
41630
|
+
const VALID_PRESETS = new Set(DATE_PRESETS$3.map((p) => p.value));
|
|
41628
41631
|
function isValidPreset(value) {
|
|
41629
41632
|
return typeof value === "string" && (VALID_PRESETS.has(value) || value === "custom");
|
|
41630
41633
|
}
|
|
@@ -41671,7 +41674,7 @@ function useMetrics() {
|
|
|
41671
41674
|
}
|
|
41672
41675
|
function getDateRangeLabel(preset, customRange) {
|
|
41673
41676
|
if (preset !== "custom") {
|
|
41674
|
-
return DATE_PRESETS$
|
|
41677
|
+
return DATE_PRESETS$3.find((p) => p.value === preset).label;
|
|
41675
41678
|
}
|
|
41676
41679
|
if (customRange?.from) {
|
|
41677
41680
|
if (customRange.to) {
|
|
@@ -42897,7 +42900,7 @@ function MetricsDashboard() {
|
|
|
42897
42900
|
] });
|
|
42898
42901
|
}
|
|
42899
42902
|
|
|
42900
|
-
const DATE_PRESETS$
|
|
42903
|
+
const DATE_PRESETS$2 = [
|
|
42901
42904
|
{ label: "Last 24 hours", value: "24h" },
|
|
42902
42905
|
{ label: "Last 3 days", value: "3d" },
|
|
42903
42906
|
{ label: "Last 7 days", value: "7d" },
|
|
@@ -42912,7 +42915,7 @@ function DateRangeSelector() {
|
|
|
42912
42915
|
name: "date-range",
|
|
42913
42916
|
labelIsHidden: true,
|
|
42914
42917
|
value: datePreset,
|
|
42915
|
-
options: DATE_PRESETS$
|
|
42918
|
+
options: DATE_PRESETS$2,
|
|
42916
42919
|
onValueChange: (value) => setDatePreset(value)
|
|
42917
42920
|
}
|
|
42918
42921
|
);
|
|
@@ -42993,7 +42996,7 @@ const CONTEXT_FILTER_CATEGORIES = CONTEXT_FIELD_IDS.map((id) => ({
|
|
|
42993
42996
|
id,
|
|
42994
42997
|
...CONTEXT_FIELD_META[id]
|
|
42995
42998
|
}));
|
|
42996
|
-
const DATE_PRESETS = [
|
|
42999
|
+
const DATE_PRESETS$1 = [
|
|
42997
43000
|
{ value: "all", label: "All" },
|
|
42998
43001
|
{ value: "last-24h", label: "Last 24 hours", ms: 24 * 60 * 60 * 1e3 },
|
|
42999
43002
|
{ value: "last-3d", label: "Last 3 days", ms: 3 * 24 * 60 * 60 * 1e3 },
|
|
@@ -43007,17 +43010,17 @@ function buildDateWithTime(date, timeStr) {
|
|
|
43007
43010
|
const combined = parse$1(timeStr, "h:mm a", dateOnly);
|
|
43008
43011
|
return isValid(combined) ? combined : null;
|
|
43009
43012
|
}
|
|
43010
|
-
const subContentClass = cn(
|
|
43013
|
+
const subContentClass$1 = cn(
|
|
43011
43014
|
"bg-surface5 backdrop-blur-xl z-50 min-w-32 overflow-auto rounded-lg p-2 shadow-md",
|
|
43012
43015
|
"data-[state=open]:animate-in data-[state=closed]:animate-out",
|
|
43013
43016
|
"data-[state=open]:fade-in-0 data-[state=closed]:fade-out-0",
|
|
43014
43017
|
"data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95"
|
|
43015
43018
|
);
|
|
43016
|
-
function PortalSubContent({ className, children, ...props }) {
|
|
43017
|
-
return /* @__PURE__ */ jsx(Portal, { children: /* @__PURE__ */ jsx(SubContent, { className: cn(subContentClass, className), ...props, children }) });
|
|
43019
|
+
function PortalSubContent$1({ className, children, ...props }) {
|
|
43020
|
+
return /* @__PURE__ */ jsx(Portal, { children: /* @__PURE__ */ jsx(SubContent, { className: cn(subContentClass$1, className), ...props, children }) });
|
|
43018
43021
|
}
|
|
43019
|
-
const SUBMENU_SEARCH_THRESHOLD = 6;
|
|
43020
|
-
function SubMenuSearch({
|
|
43022
|
+
const SUBMENU_SEARCH_THRESHOLD$1 = 6;
|
|
43023
|
+
function SubMenuSearch$1({
|
|
43021
43024
|
value,
|
|
43022
43025
|
onChange,
|
|
43023
43026
|
label = "Search"
|
|
@@ -43092,7 +43095,7 @@ function TracesTools({
|
|
|
43092
43095
|
},
|
|
43093
43096
|
[]
|
|
43094
43097
|
);
|
|
43095
|
-
const datePresetLabel = DATE_PRESETS.find((p) => p.value === datePreset)?.label ?? "All";
|
|
43098
|
+
const datePresetLabel = DATE_PRESETS$1.find((p) => p.value === datePreset)?.label ?? "All";
|
|
43096
43099
|
const handleDatePresetSelect = (preset) => {
|
|
43097
43100
|
onDatePresetChange?.(preset);
|
|
43098
43101
|
if (preset === "custom") {
|
|
@@ -43103,7 +43106,7 @@ function TracesTools({
|
|
|
43103
43106
|
setCustomRangeOpen(true);
|
|
43104
43107
|
return;
|
|
43105
43108
|
}
|
|
43106
|
-
const entry = DATE_PRESETS.find((p) => p.value === preset);
|
|
43109
|
+
const entry = DATE_PRESETS$1.find((p) => p.value === preset);
|
|
43107
43110
|
if (entry?.ms) {
|
|
43108
43111
|
onDateChange?.(new Date(Date.now() - entry.ms), "from");
|
|
43109
43112
|
onDateChange?.(void 0, "to");
|
|
@@ -43247,7 +43250,7 @@ function TracesTools({
|
|
|
43247
43250
|
/* @__PURE__ */ jsx(CalendarIcon, {}),
|
|
43248
43251
|
datePresetLabel
|
|
43249
43252
|
] }) }),
|
|
43250
|
-
/* @__PURE__ */ jsx(DropdownMenu.Content, { align: "start", children: DATE_PRESETS.map((preset) => /* @__PURE__ */ jsx(DropdownMenu.Item, { onSelect: () => handleDatePresetSelect(preset.value), children: preset.label }, preset.value)) })
|
|
43253
|
+
/* @__PURE__ */ jsx(DropdownMenu.Content, { align: "start", children: DATE_PRESETS$1.map((preset) => /* @__PURE__ */ jsx(DropdownMenu.Item, { onSelect: () => handleDatePresetSelect(preset.value), children: preset.label }, preset.value)) })
|
|
43251
43254
|
] }),
|
|
43252
43255
|
/* @__PURE__ */ jsxs(DropdownMenu, { modal: false, children: [
|
|
43253
43256
|
/* @__PURE__ */ jsx(DropdownMenu.Trigger, { asChild: true, children: /* @__PURE__ */ jsxs(Button, { variant: "outline", size: "md", disabled: isLoading, children: [
|
|
@@ -43296,7 +43299,7 @@ function TracesTools({
|
|
|
43296
43299
|
"Status",
|
|
43297
43300
|
errorOnly && /* @__PURE__ */ jsx("span", { className: cn("ml-auto text-ui-sm text-accent1"), children: "1" })
|
|
43298
43301
|
] }),
|
|
43299
|
-
/* @__PURE__ */ jsxs(PortalSubContent, { children: [
|
|
43302
|
+
/* @__PURE__ */ jsxs(PortalSubContent$1, { children: [
|
|
43300
43303
|
/* @__PURE__ */ jsx(
|
|
43301
43304
|
DropdownMenu.CheckboxItem,
|
|
43302
43305
|
{
|
|
@@ -43322,8 +43325,8 @@ function TracesTools({
|
|
|
43322
43325
|
"Entity Type",
|
|
43323
43326
|
selectedEntity && selectedEntity.value !== "all" && /* @__PURE__ */ jsx("span", { className: cn("ml-auto text-ui-sm text-accent1"), children: "1" })
|
|
43324
43327
|
] }),
|
|
43325
|
-
/* @__PURE__ */ jsxs(PortalSubContent, { children: [
|
|
43326
|
-
entityOptions.length >= SUBMENU_SEARCH_THRESHOLD && /* @__PURE__ */ jsx(SubMenuSearch, { value: entitySearch, onChange: setEntitySearch, label: "Search entity types" }),
|
|
43328
|
+
/* @__PURE__ */ jsxs(PortalSubContent$1, { children: [
|
|
43329
|
+
entityOptions.length >= SUBMENU_SEARCH_THRESHOLD$1 && /* @__PURE__ */ jsx(SubMenuSearch$1, { value: entitySearch, onChange: setEntitySearch, label: "Search entity types" }),
|
|
43327
43330
|
/* @__PURE__ */ jsx(
|
|
43328
43331
|
DropdownMenu.RadioGroup,
|
|
43329
43332
|
{
|
|
@@ -43344,8 +43347,8 @@ function TracesTools({
|
|
|
43344
43347
|
"Tags",
|
|
43345
43348
|
(selectedTags ?? []).length > 0 && /* @__PURE__ */ jsx("span", { className: cn("ml-auto text-ui-sm text-accent1"), children: selectedTags?.length })
|
|
43346
43349
|
] }),
|
|
43347
|
-
/* @__PURE__ */ jsxs(PortalSubContent, { children: [
|
|
43348
|
-
(availableTags ?? []).length >= SUBMENU_SEARCH_THRESHOLD && /* @__PURE__ */ jsx(SubMenuSearch, { value: tagSearch, onChange: setTagSearch, label: "Search tags" }),
|
|
43350
|
+
/* @__PURE__ */ jsxs(PortalSubContent$1, { children: [
|
|
43351
|
+
(availableTags ?? []).length >= SUBMENU_SEARCH_THRESHOLD$1 && /* @__PURE__ */ jsx(SubMenuSearch$1, { value: tagSearch, onChange: setTagSearch, label: "Search tags" }),
|
|
43349
43352
|
(availableTags ?? []).filter((tag) => !tagSearch || tag.toLowerCase().includes(tagSearch.toLowerCase())).map((tag) => /* @__PURE__ */ jsx(
|
|
43350
43353
|
DropdownMenu.CheckboxItem,
|
|
43351
43354
|
{
|
|
@@ -43369,9 +43372,9 @@ function TracesTools({
|
|
|
43369
43372
|
"Metadata",
|
|
43370
43373
|
metadataCount > 0 && /* @__PURE__ */ jsx("span", { className: cn("ml-auto text-ui-sm text-accent1"), children: metadataCount })
|
|
43371
43374
|
] }),
|
|
43372
|
-
/* @__PURE__ */ jsxs(PortalSubContent, { className: cn("max-h-80"), children: [
|
|
43373
|
-
metadataKeys.length >= SUBMENU_SEARCH_THRESHOLD && /* @__PURE__ */ jsx(
|
|
43374
|
-
SubMenuSearch,
|
|
43375
|
+
/* @__PURE__ */ jsxs(PortalSubContent$1, { className: cn("max-h-80"), children: [
|
|
43376
|
+
metadataKeys.length >= SUBMENU_SEARCH_THRESHOLD$1 && /* @__PURE__ */ jsx(
|
|
43377
|
+
SubMenuSearch$1,
|
|
43375
43378
|
{
|
|
43376
43379
|
value: metadataKeySearch,
|
|
43377
43380
|
onChange: setMetadataKeySearch,
|
|
@@ -43386,9 +43389,9 @@ function TracesTools({
|
|
|
43386
43389
|
/* @__PURE__ */ jsx("span", { className: cn("truncate"), children: key }),
|
|
43387
43390
|
selectedValue && /* @__PURE__ */ jsx("span", { className: cn("ml-auto text-ui-sm text-accent1"), children: "1" })
|
|
43388
43391
|
] }),
|
|
43389
|
-
/* @__PURE__ */ jsxs(PortalSubContent, { className: cn("max-h-80"), children: [
|
|
43390
|
-
values.length >= SUBMENU_SEARCH_THRESHOLD && /* @__PURE__ */ jsx(
|
|
43391
|
-
SubMenuSearch,
|
|
43392
|
+
/* @__PURE__ */ jsxs(PortalSubContent$1, { className: cn("max-h-80"), children: [
|
|
43393
|
+
values.length >= SUBMENU_SEARCH_THRESHOLD$1 && /* @__PURE__ */ jsx(
|
|
43394
|
+
SubMenuSearch$1,
|
|
43392
43395
|
{
|
|
43393
43396
|
value: subValueSearch,
|
|
43394
43397
|
onChange: setSubValueSearch,
|
|
@@ -43446,9 +43449,9 @@ function TracesTools({
|
|
|
43446
43449
|
group,
|
|
43447
43450
|
activeInGroup > 0 && /* @__PURE__ */ jsx("span", { className: cn("ml-auto text-ui-sm text-accent1"), children: activeInGroup })
|
|
43448
43451
|
] }),
|
|
43449
|
-
/* @__PURE__ */ jsxs(PortalSubContent, { className: cn("max-h-80"), children: [
|
|
43450
|
-
fieldsWithValues.length >= SUBMENU_SEARCH_THRESHOLD && /* @__PURE__ */ jsx(
|
|
43451
|
-
SubMenuSearch,
|
|
43452
|
+
/* @__PURE__ */ jsxs(PortalSubContent$1, { className: cn("max-h-80"), children: [
|
|
43453
|
+
fieldsWithValues.length >= SUBMENU_SEARCH_THRESHOLD$1 && /* @__PURE__ */ jsx(
|
|
43454
|
+
SubMenuSearch$1,
|
|
43452
43455
|
{
|
|
43453
43456
|
value: contextFieldSearch,
|
|
43454
43457
|
onChange: setContextFieldSearch,
|
|
@@ -43465,9 +43468,9 @@ function TracesTools({
|
|
|
43465
43468
|
/* @__PURE__ */ jsx("span", { className: cn("truncate"), children: field.label }),
|
|
43466
43469
|
selectedValue && /* @__PURE__ */ jsx("span", { className: cn("ml-auto text-ui-sm text-accent1"), children: "1" })
|
|
43467
43470
|
] }),
|
|
43468
|
-
/* @__PURE__ */ jsxs(PortalSubContent, { className: cn("max-h-80"), children: [
|
|
43469
|
-
values.length >= SUBMENU_SEARCH_THRESHOLD && /* @__PURE__ */ jsx(
|
|
43470
|
-
SubMenuSearch,
|
|
43471
|
+
/* @__PURE__ */ jsxs(PortalSubContent$1, { className: cn("max-h-80"), children: [
|
|
43472
|
+
values.length >= SUBMENU_SEARCH_THRESHOLD$1 && /* @__PURE__ */ jsx(
|
|
43473
|
+
SubMenuSearch$1,
|
|
43471
43474
|
{
|
|
43472
43475
|
value: subValueSearch,
|
|
43473
43476
|
onChange: setSubValueSearch,
|
|
@@ -43523,7 +43526,7 @@ function TracesTools({
|
|
|
43523
43526
|
] })
|
|
43524
43527
|
] })
|
|
43525
43528
|
] }),
|
|
43526
|
-
onReset && /* @__PURE__ */ jsxs(Button, {
|
|
43529
|
+
onReset && /* @__PURE__ */ jsxs(Button, { disabled: isLoading, size: "md", onClick: () => onReset(), children: [
|
|
43527
43530
|
/* @__PURE__ */ jsx(XIcon, {}),
|
|
43528
43531
|
"Reset"
|
|
43529
43532
|
] }),
|
|
@@ -46216,11 +46219,11 @@ const ItemList = Object.assign(ItemListRoot, {
|
|
|
46216
46219
|
LabelCell: ItemListLabelCell
|
|
46217
46220
|
});
|
|
46218
46221
|
|
|
46219
|
-
const widths = ["75%", "50%", "65%", "90%", "60%", "80%"];
|
|
46222
|
+
const widths$1 = ["75%", "50%", "65%", "90%", "60%", "80%"];
|
|
46220
46223
|
function ItemListItemsSkeleton({ columns, numberOfRows = 3 }) {
|
|
46221
46224
|
const getPseudoRandomWidth = (rowIdx, colIdx) => {
|
|
46222
|
-
const index = (rowIdx + colIdx + (columns?.length || 0) + (numberOfRows || 0)) % widths.length;
|
|
46223
|
-
return widths[index];
|
|
46225
|
+
const index = (rowIdx + colIdx + (columns?.length || 0) + (numberOfRows || 0)) % widths$1.length;
|
|
46226
|
+
return widths$1[index];
|
|
46224
46227
|
};
|
|
46225
46228
|
return /* @__PURE__ */ jsx(ItemListItems, { children: Array.from({ length: numberOfRows }).map((_, rowIdx) => /* @__PURE__ */ jsx(ItemListRow, { children: /* @__PURE__ */ jsx(ItemListRowButton, { columns, children: (columns || []).map((col, colIdx) => {
|
|
46226
46229
|
const key = `${col.name}-${colIdx}`;
|
|
@@ -49643,14 +49646,14 @@ const formatTraceSpans = (spans) => {
|
|
|
49643
49646
|
return sortedRootSpans;
|
|
49644
49647
|
};
|
|
49645
49648
|
|
|
49646
|
-
function getSpanDescendantIds(span) {
|
|
49649
|
+
function getSpanDescendantIds$1(span) {
|
|
49647
49650
|
if (!span.spans || span.spans.length === 0) {
|
|
49648
49651
|
return [];
|
|
49649
49652
|
}
|
|
49650
49653
|
const descendantIds = [];
|
|
49651
49654
|
span.spans.forEach((childSpan) => {
|
|
49652
49655
|
descendantIds.push(childSpan.id);
|
|
49653
|
-
descendantIds.push(...getSpanDescendantIds(childSpan));
|
|
49656
|
+
descendantIds.push(...getSpanDescendantIds$1(childSpan));
|
|
49654
49657
|
});
|
|
49655
49658
|
return descendantIds;
|
|
49656
49659
|
}
|
|
@@ -49721,12 +49724,12 @@ function ExperimentTraceTimelineExpandCol({
|
|
|
49721
49724
|
"bg-surface4": isSelected
|
|
49722
49725
|
}),
|
|
49723
49726
|
children: numOfChildren && numOfChildren > 0 ? /* @__PURE__ */ jsxs("div", { className: "flex gap-1", children: [
|
|
49724
|
-
/* @__PURE__ */ jsxs(ExpandButton, { onClick: () => toggleChildren?.(), children: [
|
|
49727
|
+
/* @__PURE__ */ jsxs(ExpandButton$1, { onClick: () => toggleChildren?.(), children: [
|
|
49725
49728
|
allDescendantsExpanded ? totalDescendants : numOfChildren,
|
|
49726
49729
|
" ",
|
|
49727
49730
|
isExpanded ? allDescendantsExpanded ? /* @__PURE__ */ jsx(ChevronsUpIcon, {}) : /* @__PURE__ */ jsx(ChevronUpIcon, {}) : /* @__PURE__ */ jsx(ChevronDownIcon, {})
|
|
49728
49731
|
] }),
|
|
49729
|
-
totalDescendants > (numOfChildren ?? 0) && !allDescendantsExpanded && /* @__PURE__ */ jsxs(ExpandButton, { onClick: () => expandAllDescendants?.(), children: [
|
|
49732
|
+
totalDescendants > (numOfChildren ?? 0) && !allDescendantsExpanded && /* @__PURE__ */ jsxs(ExpandButton$1, { onClick: () => expandAllDescendants?.(), children: [
|
|
49730
49733
|
totalDescendants,
|
|
49731
49734
|
" ",
|
|
49732
49735
|
/* @__PURE__ */ jsx(ChevronsDownIcon, {})
|
|
@@ -49735,7 +49738,7 @@ function ExperimentTraceTimelineExpandCol({
|
|
|
49735
49738
|
}
|
|
49736
49739
|
);
|
|
49737
49740
|
}
|
|
49738
|
-
function ExpandButton({ onClick, children, className }) {
|
|
49741
|
+
function ExpandButton$1({ onClick, children, className }) {
|
|
49739
49742
|
return /* @__PURE__ */ jsx("button", { onClick, className: cn("h-full", className), children: /* @__PURE__ */ jsx(
|
|
49740
49743
|
"div",
|
|
49741
49744
|
{
|
|
@@ -49845,7 +49848,7 @@ function ExperimentTraceTimelineSpan({
|
|
|
49845
49848
|
}) {
|
|
49846
49849
|
const hasChildren = span.spans && span.spans.length > 0;
|
|
49847
49850
|
const numOfChildren = span.spans ? span.spans.length : 0;
|
|
49848
|
-
const allDescendantIds = getSpanDescendantIds(span);
|
|
49851
|
+
const allDescendantIds = getSpanDescendantIds$1(span);
|
|
49849
49852
|
const totalDescendants = allDescendantIds.length;
|
|
49850
49853
|
const isRootSpan = depth === 0;
|
|
49851
49854
|
const spanUI = getExperimentSpanTypeUi(span?.type);
|
|
@@ -51377,6 +51380,1803 @@ function DatasetCompareVersionsList({
|
|
|
51377
51380
|
}) }) }) });
|
|
51378
51381
|
}
|
|
51379
51382
|
|
|
51383
|
+
function DataDetailsPanel$1({ collapsed, children }) {
|
|
51384
|
+
return /* @__PURE__ */ jsx(
|
|
51385
|
+
"section",
|
|
51386
|
+
{
|
|
51387
|
+
className: cn(
|
|
51388
|
+
"flex flex-col bg-surface2 border border-border1 rounded-xl overflow-hidden",
|
|
51389
|
+
collapsed ? "h-auto" : "h-full"
|
|
51390
|
+
),
|
|
51391
|
+
children
|
|
51392
|
+
}
|
|
51393
|
+
);
|
|
51394
|
+
}
|
|
51395
|
+
|
|
51396
|
+
function DataDetailsPanelCloseButton({
|
|
51397
|
+
onClick,
|
|
51398
|
+
tooltip = "Close panel",
|
|
51399
|
+
className
|
|
51400
|
+
}) {
|
|
51401
|
+
return /* @__PURE__ */ jsx(
|
|
51402
|
+
ButtonWithTooltip,
|
|
51403
|
+
{
|
|
51404
|
+
size: "md",
|
|
51405
|
+
onClick,
|
|
51406
|
+
"aria-label": "Close Panel",
|
|
51407
|
+
tooltipContent: tooltip,
|
|
51408
|
+
className,
|
|
51409
|
+
children: /* @__PURE__ */ jsx(XIcon, {})
|
|
51410
|
+
}
|
|
51411
|
+
);
|
|
51412
|
+
}
|
|
51413
|
+
|
|
51414
|
+
const useCodemirrorTheme = () => {
|
|
51415
|
+
return useMemo(
|
|
51416
|
+
() => draculaInit({
|
|
51417
|
+
settings: {
|
|
51418
|
+
fontFamily: "var(--geist-mono)",
|
|
51419
|
+
fontSize: "0.75rem",
|
|
51420
|
+
lineHighlight: "transparent",
|
|
51421
|
+
gutterBackground: "transparent",
|
|
51422
|
+
gutterForeground: "#939393",
|
|
51423
|
+
background: "transparent"
|
|
51424
|
+
},
|
|
51425
|
+
styles: [{ tag: [tags.className, tags.propertyName] }]
|
|
51426
|
+
}),
|
|
51427
|
+
[]
|
|
51428
|
+
);
|
|
51429
|
+
};
|
|
51430
|
+
function DataDetailsPanelCodeSection({
|
|
51431
|
+
codeStr = "",
|
|
51432
|
+
title,
|
|
51433
|
+
icon,
|
|
51434
|
+
simplified = false,
|
|
51435
|
+
className
|
|
51436
|
+
}) {
|
|
51437
|
+
const theme = useCodemirrorTheme();
|
|
51438
|
+
const [showAsMultilineText, setShowAsMultilineText] = useState(false);
|
|
51439
|
+
const hasMultilineText = useMemo(() => {
|
|
51440
|
+
try {
|
|
51441
|
+
const parsed = JSON.parse(codeStr);
|
|
51442
|
+
return containsInnerNewline(parsed || "");
|
|
51443
|
+
} catch {
|
|
51444
|
+
return false;
|
|
51445
|
+
}
|
|
51446
|
+
}, [codeStr]);
|
|
51447
|
+
const finalCodeStr = showAsMultilineText ? codeStr?.replace(/\\n/g, "\n") : codeStr;
|
|
51448
|
+
const usePlainTextView = simplified || showAsMultilineText;
|
|
51449
|
+
if (!codeStr || codeStr === "null") return null;
|
|
51450
|
+
return /* @__PURE__ */ jsxs("div", { className: cn("flex flex-col gap-2", className), children: [
|
|
51451
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between", children: [
|
|
51452
|
+
/* @__PURE__ */ jsxs(
|
|
51453
|
+
"div",
|
|
51454
|
+
{
|
|
51455
|
+
className: cn(
|
|
51456
|
+
"flex items-center gap-1.5 text-ui-xs uppercase tracking-widest text-neutral2",
|
|
51457
|
+
"[&>svg]:size-3.5"
|
|
51458
|
+
),
|
|
51459
|
+
children: [
|
|
51460
|
+
icon,
|
|
51461
|
+
title
|
|
51462
|
+
]
|
|
51463
|
+
}
|
|
51464
|
+
),
|
|
51465
|
+
/* @__PURE__ */ jsxs(ButtonsGroup, { children: [
|
|
51466
|
+
/* @__PURE__ */ jsx(CopyButton, { content: codeStr || "No content", size: "sm" }),
|
|
51467
|
+
hasMultilineText && /* @__PURE__ */ jsx(
|
|
51468
|
+
Button,
|
|
51469
|
+
{
|
|
51470
|
+
size: "sm",
|
|
51471
|
+
"aria-label": showAsMultilineText ? "Show escaped newlines" : "Show multiline text",
|
|
51472
|
+
onClick: () => setShowAsMultilineText((v) => !v),
|
|
51473
|
+
children: showAsMultilineText ? /* @__PURE__ */ jsx(AlignLeftIcon, {}) : /* @__PURE__ */ jsx(AlignJustifyIcon, {})
|
|
51474
|
+
}
|
|
51475
|
+
)
|
|
51476
|
+
] })
|
|
51477
|
+
] }),
|
|
51478
|
+
/* @__PURE__ */ jsx("div", { className: "bg-black/20 p-3 overflow-hidden rounded-lg border border-white/10 text-neutral4 text-ui-sm break-all max-h-[30vh] overflow-y-auto", children: usePlainTextView ? /* @__PURE__ */ jsx("div", { className: "text-neutral4 font-mono break-all", children: /* @__PURE__ */ jsx("pre", { className: "text-wrap", children: finalCodeStr }) }) : /* @__PURE__ */ jsx(
|
|
51479
|
+
CodeMirror,
|
|
51480
|
+
{
|
|
51481
|
+
extensions: [json(), EditorView$1.lineWrapping],
|
|
51482
|
+
theme,
|
|
51483
|
+
value: codeStr,
|
|
51484
|
+
editable: false
|
|
51485
|
+
}
|
|
51486
|
+
) })
|
|
51487
|
+
] });
|
|
51488
|
+
}
|
|
51489
|
+
function containsInnerNewline(obj) {
|
|
51490
|
+
if (typeof obj === "string") {
|
|
51491
|
+
const idx = obj.indexOf("\n");
|
|
51492
|
+
return idx !== -1 && idx !== obj.length - 1;
|
|
51493
|
+
} else if (Array.isArray(obj)) {
|
|
51494
|
+
return obj.some((item) => containsInnerNewline(item));
|
|
51495
|
+
} else if (obj && typeof obj === "object") {
|
|
51496
|
+
return Object.values(obj).some((value) => containsInnerNewline(value));
|
|
51497
|
+
}
|
|
51498
|
+
return false;
|
|
51499
|
+
}
|
|
51500
|
+
|
|
51501
|
+
function DataDetailsPanelContent({ children }) {
|
|
51502
|
+
return /* @__PURE__ */ jsx("div", { className: "flex-1 p-4 overflow-y-auto", children });
|
|
51503
|
+
}
|
|
51504
|
+
|
|
51505
|
+
function DataDetailsPanelHeader({ className, children }) {
|
|
51506
|
+
return /* @__PURE__ */ jsx("div", { className: cn("flex items-center justify-between gap-2 border-b border-border1 mx-4 py-3", className), children });
|
|
51507
|
+
}
|
|
51508
|
+
|
|
51509
|
+
function DataDetailsPanelHeading({ className, children }) {
|
|
51510
|
+
return /* @__PURE__ */ jsx("h3", { className: cn("flex gap-2 text-ui-md text-neutral3 [&>b]:text-neutral2 [&>b]:font-normal", className), children });
|
|
51511
|
+
}
|
|
51512
|
+
|
|
51513
|
+
function Root({ className, children }) {
|
|
51514
|
+
return /* @__PURE__ */ jsx("dl", { className: cn("grid grid-cols-[auto_1fr] gap-x-4 gap-y-1.5", className), children });
|
|
51515
|
+
}
|
|
51516
|
+
function Key({ className, children }) {
|
|
51517
|
+
return /* @__PURE__ */ jsx("dt", { className: cn("text-ui-smd text-neutral2 shrink-0 py-0.5", className), children });
|
|
51518
|
+
}
|
|
51519
|
+
function Value({ className, children }) {
|
|
51520
|
+
return /* @__PURE__ */ jsx("dd", { className: cn("text-ui-smd text-neutral3 truncate min-w-0 py-0.5", className), children });
|
|
51521
|
+
}
|
|
51522
|
+
function Header$1({ className, children }) {
|
|
51523
|
+
return /* @__PURE__ */ jsx("dt", { className: cn("col-span-2 text-ui-sm uppercase tracking-widest text-neutral2 py-3", className), children });
|
|
51524
|
+
}
|
|
51525
|
+
const DataDetailsPanelKeyValueList = Object.assign(Root, {
|
|
51526
|
+
Key,
|
|
51527
|
+
Value,
|
|
51528
|
+
Header: Header$1
|
|
51529
|
+
});
|
|
51530
|
+
|
|
51531
|
+
function DataDetailsPanelLoadingData({ children }) {
|
|
51532
|
+
return /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-center gap-2 px-4 py-6 text-ui-sm text-neutral3", children: [
|
|
51533
|
+
/* @__PURE__ */ jsx(Spinner, {}),
|
|
51534
|
+
" ",
|
|
51535
|
+
children ?? "Loading..."
|
|
51536
|
+
] });
|
|
51537
|
+
}
|
|
51538
|
+
|
|
51539
|
+
function DataDetailsPanelNoData({ children }) {
|
|
51540
|
+
return /* @__PURE__ */ jsx("p", { className: "px-4 py-6 text-ui-sm text-neutral2", children: children ?? "No data found." });
|
|
51541
|
+
}
|
|
51542
|
+
|
|
51543
|
+
const DataDetailsPanel = Object.assign(DataDetailsPanel$1, {
|
|
51544
|
+
Header: DataDetailsPanelHeader,
|
|
51545
|
+
Heading: DataDetailsPanelHeading,
|
|
51546
|
+
CloseButton: DataDetailsPanelCloseButton,
|
|
51547
|
+
LoadingData: DataDetailsPanelLoadingData,
|
|
51548
|
+
NoData: DataDetailsPanelNoData,
|
|
51549
|
+
Content: DataDetailsPanelContent,
|
|
51550
|
+
KeyValueList: DataDetailsPanelKeyValueList,
|
|
51551
|
+
CodeSection: DataDetailsPanelCodeSection
|
|
51552
|
+
});
|
|
51553
|
+
|
|
51554
|
+
const KV$1 = DataDetailsPanel.KeyValueList;
|
|
51555
|
+
function toDate$1(value) {
|
|
51556
|
+
return value instanceof Date ? value : new Date(value);
|
|
51557
|
+
}
|
|
51558
|
+
function LogDetails({
|
|
51559
|
+
log,
|
|
51560
|
+
onClose,
|
|
51561
|
+
onTraceClick,
|
|
51562
|
+
onSpanClick,
|
|
51563
|
+
onPrevious,
|
|
51564
|
+
onNext,
|
|
51565
|
+
collapsed: controlledCollapsed,
|
|
51566
|
+
onCollapsedChange
|
|
51567
|
+
}) {
|
|
51568
|
+
const [internalCollapsed, setInternalCollapsed] = useState(false);
|
|
51569
|
+
const collapsed = controlledCollapsed ?? internalCollapsed;
|
|
51570
|
+
const setCollapsed = onCollapsedChange ?? setInternalCollapsed;
|
|
51571
|
+
const date = toDate$1(log.timestamp);
|
|
51572
|
+
return /* @__PURE__ */ jsxs(DataDetailsPanel, { collapsed, children: [
|
|
51573
|
+
/* @__PURE__ */ jsxs(DataDetailsPanel.Header, { children: [
|
|
51574
|
+
/* @__PURE__ */ jsxs(DataDetailsPanel.Heading, { children: [
|
|
51575
|
+
"Log ",
|
|
51576
|
+
/* @__PURE__ */ jsx("b", { children: format(date, "MMM dd, HH:mm:ss.SSS") })
|
|
51577
|
+
] }),
|
|
51578
|
+
/* @__PURE__ */ jsxs(ButtonsGroup, { className: "ml-auto shrink-0", children: [
|
|
51579
|
+
onCollapsedChange && /* @__PURE__ */ jsx(
|
|
51580
|
+
ButtonWithTooltip,
|
|
51581
|
+
{
|
|
51582
|
+
size: "md",
|
|
51583
|
+
tooltipContent: collapsed ? "Expand panel" : "Collapse panel",
|
|
51584
|
+
onClick: () => setCollapsed(!collapsed),
|
|
51585
|
+
children: collapsed ? /* @__PURE__ */ jsx(ChevronsUpDownIcon, {}) : /* @__PURE__ */ jsx(ChevronsDownUpIcon, {})
|
|
51586
|
+
}
|
|
51587
|
+
),
|
|
51588
|
+
/* @__PURE__ */ jsxs(ButtonsGroup, { spacing: "close", children: [
|
|
51589
|
+
/* @__PURE__ */ jsx(ButtonWithTooltip, { size: "md", tooltipContent: "Previous log", onClick: onPrevious, disabled: !onPrevious, children: /* @__PURE__ */ jsx(ArrowUpIcon, {}) }),
|
|
51590
|
+
/* @__PURE__ */ jsx(ButtonWithTooltip, { size: "md", tooltipContent: "Next log", onClick: onNext, disabled: !onNext, children: /* @__PURE__ */ jsx(ArrowDownIcon, {}) })
|
|
51591
|
+
] }),
|
|
51592
|
+
/* @__PURE__ */ jsx(DataDetailsPanel.CloseButton, { onClick: onClose })
|
|
51593
|
+
] })
|
|
51594
|
+
] }),
|
|
51595
|
+
!collapsed && /* @__PURE__ */ jsxs(DataDetailsPanel.Content, { children: [
|
|
51596
|
+
/* @__PURE__ */ jsx("p", { className: "text-ui-md text-neutral4 font-mono wrap-break-word whitespace-pre-wrap", children: log.message }),
|
|
51597
|
+
(log.traceId || log.spanId) && /* @__PURE__ */ jsxs("div", { className: cn("grid gap-2 my-8", "[&>button]:justify-between [&>button]:overflow-hidden"), children: [
|
|
51598
|
+
log.traceId && /* @__PURE__ */ jsxs(ButtonsGroup, { spacing: "close", className: "min-w-0 w-full", children: [
|
|
51599
|
+
/* @__PURE__ */ jsxs(
|
|
51600
|
+
Button,
|
|
51601
|
+
{
|
|
51602
|
+
size: "md",
|
|
51603
|
+
className: "min-w-0 flex-1 overflow-hidden",
|
|
51604
|
+
onClick: () => onTraceClick?.(log.traceId),
|
|
51605
|
+
children: [
|
|
51606
|
+
/* @__PURE__ */ jsx(ArrowRightIcon, {}),
|
|
51607
|
+
/* @__PURE__ */ jsx("span", { children: "Trace" }),
|
|
51608
|
+
/* @__PURE__ */ jsxs("span", { className: " ml-auto text-ui-sm text-neutral2 min-w-0 truncate", children: [
|
|
51609
|
+
"# ",
|
|
51610
|
+
log.traceId
|
|
51611
|
+
] })
|
|
51612
|
+
]
|
|
51613
|
+
}
|
|
51614
|
+
),
|
|
51615
|
+
/* @__PURE__ */ jsx(CopyButton, { content: log.traceId, size: "md", tooltip: "Copy Trace ID to clipboard" })
|
|
51616
|
+
] }),
|
|
51617
|
+
log.spanId && /* @__PURE__ */ jsxs(ButtonsGroup, { spacing: "close", className: "min-w-0 w-full", children: [
|
|
51618
|
+
/* @__PURE__ */ jsxs(
|
|
51619
|
+
Button,
|
|
51620
|
+
{
|
|
51621
|
+
size: "md",
|
|
51622
|
+
className: "min-w-0 flex-1 overflow-hidden",
|
|
51623
|
+
disabled: !log.traceId || !onSpanClick,
|
|
51624
|
+
onClick: () => log.traceId && onSpanClick?.(log.traceId, log.spanId),
|
|
51625
|
+
children: [
|
|
51626
|
+
/* @__PURE__ */ jsx(ArrowRightIcon, {}),
|
|
51627
|
+
/* @__PURE__ */ jsx("span", { children: "Span" }),
|
|
51628
|
+
/* @__PURE__ */ jsxs("span", { className: " ml-auto text-ui-sm text-neutral2 min-w-0 truncate", children: [
|
|
51629
|
+
"# ",
|
|
51630
|
+
log.spanId
|
|
51631
|
+
] })
|
|
51632
|
+
]
|
|
51633
|
+
}
|
|
51634
|
+
),
|
|
51635
|
+
/* @__PURE__ */ jsx(CopyButton, { content: log.spanId, size: "md", tooltip: "Copy Span ID to clipboard" })
|
|
51636
|
+
] })
|
|
51637
|
+
] }),
|
|
51638
|
+
/* @__PURE__ */ jsxs(KV$1, { className: "mb-6", children: [
|
|
51639
|
+
log.entityType && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
51640
|
+
/* @__PURE__ */ jsx(KV$1.Key, { children: "Entity Type" }),
|
|
51641
|
+
/* @__PURE__ */ jsx(KV$1.Value, { children: log.entityType })
|
|
51642
|
+
] }),
|
|
51643
|
+
log.entityName && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
51644
|
+
/* @__PURE__ */ jsx(KV$1.Key, { children: "Entity Name" }),
|
|
51645
|
+
/* @__PURE__ */ jsx(KV$1.Value, { children: log.entityName })
|
|
51646
|
+
] }),
|
|
51647
|
+
log.serviceName && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
51648
|
+
/* @__PURE__ */ jsx(KV$1.Key, { children: "Service" }),
|
|
51649
|
+
/* @__PURE__ */ jsx(KV$1.Value, { children: log.serviceName })
|
|
51650
|
+
] }),
|
|
51651
|
+
log.environment && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
51652
|
+
/* @__PURE__ */ jsx(KV$1.Key, { children: "Environment" }),
|
|
51653
|
+
/* @__PURE__ */ jsx(KV$1.Value, { children: log.environment })
|
|
51654
|
+
] }),
|
|
51655
|
+
log.source && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
51656
|
+
/* @__PURE__ */ jsx(KV$1.Key, { children: "Source" }),
|
|
51657
|
+
/* @__PURE__ */ jsx(KV$1.Value, { children: log.source })
|
|
51658
|
+
] }),
|
|
51659
|
+
log.metadata && Object.keys(log.metadata).length > 0 && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
51660
|
+
/* @__PURE__ */ jsx(KV$1.Header, { children: "Metadata" }),
|
|
51661
|
+
Object.entries(log.metadata).map(([key, value]) => /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
51662
|
+
/* @__PURE__ */ jsx(KV$1.Key, { children: key }),
|
|
51663
|
+
/* @__PURE__ */ jsx(KV$1.Value, { children: String(value) })
|
|
51664
|
+
] }, key))
|
|
51665
|
+
] })
|
|
51666
|
+
] }),
|
|
51667
|
+
log.data && Object.keys(log.data).length > 0 && /* @__PURE__ */ jsx(DataDetailsPanel.CodeSection, { title: "Data", codeStr: JSON.stringify(log.data, null, 2), className: "mt-6" })
|
|
51668
|
+
] })
|
|
51669
|
+
] });
|
|
51670
|
+
}
|
|
51671
|
+
|
|
51672
|
+
function useTraceSpans(traceId) {
|
|
51673
|
+
const client = useMastraClient();
|
|
51674
|
+
return useQuery({
|
|
51675
|
+
queryKey: ["trace-spans", traceId],
|
|
51676
|
+
queryFn: async () => {
|
|
51677
|
+
if (!traceId) {
|
|
51678
|
+
throw new Error("Trace ID is required");
|
|
51679
|
+
}
|
|
51680
|
+
const res = await client.getTrace(traceId);
|
|
51681
|
+
return res;
|
|
51682
|
+
},
|
|
51683
|
+
enabled: !!traceId
|
|
51684
|
+
});
|
|
51685
|
+
}
|
|
51686
|
+
|
|
51687
|
+
const formatHierarchicalSpans = (spans) => {
|
|
51688
|
+
if (!spans || spans.length === 0) {
|
|
51689
|
+
return [];
|
|
51690
|
+
}
|
|
51691
|
+
const overallEndDate = spans.reduce(
|
|
51692
|
+
(latest, span) => {
|
|
51693
|
+
const endDate = span?.endedAt ? new Date(span.endedAt) : void 0;
|
|
51694
|
+
return endDate && (!latest || endDate > latest) ? endDate : latest;
|
|
51695
|
+
},
|
|
51696
|
+
null
|
|
51697
|
+
);
|
|
51698
|
+
const spanMap = /* @__PURE__ */ new Map();
|
|
51699
|
+
const rootSpans = [];
|
|
51700
|
+
spans.forEach((spanRecord) => {
|
|
51701
|
+
const startDate = new Date(spanRecord.startedAt);
|
|
51702
|
+
const endDate = spanRecord.endedAt ? new Date(spanRecord.endedAt) : void 0;
|
|
51703
|
+
const uiSpan = {
|
|
51704
|
+
id: spanRecord.spanId,
|
|
51705
|
+
name: spanRecord.name,
|
|
51706
|
+
type: spanRecord.spanType,
|
|
51707
|
+
latency: endDate ? endDate.getTime() - startDate.getTime() : 0,
|
|
51708
|
+
startTime: startDate.toISOString(),
|
|
51709
|
+
endTime: endDate ? endDate.toISOString() : void 0,
|
|
51710
|
+
spans: [],
|
|
51711
|
+
parentSpanId: spanRecord.parentSpanId
|
|
51712
|
+
};
|
|
51713
|
+
spanMap.set(spanRecord.spanId, uiSpan);
|
|
51714
|
+
});
|
|
51715
|
+
spans.forEach((spanRecord) => {
|
|
51716
|
+
const uiSpan = spanMap.get(spanRecord.spanId);
|
|
51717
|
+
if (spanRecord?.parentSpanId == null) {
|
|
51718
|
+
if (overallEndDate && uiSpan.endTime && overallEndDate > new Date(uiSpan.endTime)) {
|
|
51719
|
+
uiSpan.endTime = overallEndDate.toISOString();
|
|
51720
|
+
const overallEndTime = new Date(overallEndDate).getTime();
|
|
51721
|
+
const spanStartTime = new Date(uiSpan.startTime).getTime();
|
|
51722
|
+
uiSpan.latency = overallEndTime - spanStartTime;
|
|
51723
|
+
}
|
|
51724
|
+
rootSpans.push(uiSpan);
|
|
51725
|
+
} else {
|
|
51726
|
+
const parent = spanMap.get(spanRecord.parentSpanId);
|
|
51727
|
+
if (parent) {
|
|
51728
|
+
parent.spans.push(uiSpan);
|
|
51729
|
+
} else {
|
|
51730
|
+
rootSpans.push(uiSpan);
|
|
51731
|
+
}
|
|
51732
|
+
}
|
|
51733
|
+
});
|
|
51734
|
+
const sortSpansByStartTime = (spans2) => {
|
|
51735
|
+
return spans2.sort((a, b) => new Date(a.startTime).getTime() - new Date(b.startTime).getTime());
|
|
51736
|
+
};
|
|
51737
|
+
const sortedRootSpans = sortSpansByStartTime(rootSpans);
|
|
51738
|
+
const sortNestedSpans = (spans2) => {
|
|
51739
|
+
spans2.forEach((span) => {
|
|
51740
|
+
if (span.spans && span.spans.length > 0) {
|
|
51741
|
+
span.spans = sortSpansByStartTime(span.spans);
|
|
51742
|
+
sortNestedSpans(span.spans);
|
|
51743
|
+
}
|
|
51744
|
+
});
|
|
51745
|
+
};
|
|
51746
|
+
sortNestedSpans(sortedRootSpans);
|
|
51747
|
+
return sortedRootSpans;
|
|
51748
|
+
};
|
|
51749
|
+
|
|
51750
|
+
function getSpanDescendantIds(span) {
|
|
51751
|
+
if (!span.spans || span.spans.length === 0) {
|
|
51752
|
+
return [];
|
|
51753
|
+
}
|
|
51754
|
+
const descendantIds = [];
|
|
51755
|
+
span.spans.forEach((childSpan) => {
|
|
51756
|
+
descendantIds.push(childSpan.id);
|
|
51757
|
+
descendantIds.push(...getSpanDescendantIds(childSpan));
|
|
51758
|
+
});
|
|
51759
|
+
return descendantIds;
|
|
51760
|
+
}
|
|
51761
|
+
function getAllSpanIds(spans) {
|
|
51762
|
+
const ids = [];
|
|
51763
|
+
for (const span of spans) {
|
|
51764
|
+
ids.push(span.id);
|
|
51765
|
+
ids.push(...getSpanDescendantIds(span));
|
|
51766
|
+
}
|
|
51767
|
+
return ids;
|
|
51768
|
+
}
|
|
51769
|
+
|
|
51770
|
+
function getSpanTypeUi(type) {
|
|
51771
|
+
const typePrefix = type?.toLowerCase().split("_")[0];
|
|
51772
|
+
const spanTypeToUiElements = {
|
|
51773
|
+
agent: {
|
|
51774
|
+
icon: /* @__PURE__ */ jsx(AgentIcon, {}),
|
|
51775
|
+
color: "oklch(0.75 0.15 250)",
|
|
51776
|
+
label: "Agent",
|
|
51777
|
+
bgColor: "oklch(0.75 0.15 250 / 0.1)",
|
|
51778
|
+
typePrefix: "agent"
|
|
51779
|
+
},
|
|
51780
|
+
workflow: {
|
|
51781
|
+
icon: /* @__PURE__ */ jsx(WorkflowIcon, {}),
|
|
51782
|
+
color: "oklch(0.75 0.15 200)",
|
|
51783
|
+
label: "Workflow",
|
|
51784
|
+
bgColor: "oklch(0.75 0.15 200 / 0.1)",
|
|
51785
|
+
typePrefix: "workflow"
|
|
51786
|
+
},
|
|
51787
|
+
model: {
|
|
51788
|
+
icon: /* @__PURE__ */ jsx(BrainIcon, {}),
|
|
51789
|
+
color: "oklch(0.75 0.15 320)",
|
|
51790
|
+
label: "Model",
|
|
51791
|
+
bgColor: "oklch(0.75 0.15 320 / 0.1)",
|
|
51792
|
+
typePrefix: "model"
|
|
51793
|
+
},
|
|
51794
|
+
mcp: {
|
|
51795
|
+
icon: /* @__PURE__ */ jsx(McpServerIcon, {}),
|
|
51796
|
+
color: "oklch(0.75 0.15 160)",
|
|
51797
|
+
label: "MCP",
|
|
51798
|
+
bgColor: "oklch(0.75 0.15 160 / 0.1)",
|
|
51799
|
+
typePrefix: "mcp"
|
|
51800
|
+
},
|
|
51801
|
+
tool: {
|
|
51802
|
+
icon: /* @__PURE__ */ jsx(ToolsIcon, {}),
|
|
51803
|
+
color: "oklch(0.75 0.15 100)",
|
|
51804
|
+
label: "Tool",
|
|
51805
|
+
bgColor: "oklch(0.75 0.15 100 / 0.1)",
|
|
51806
|
+
typePrefix: "tool"
|
|
51807
|
+
}
|
|
51808
|
+
};
|
|
51809
|
+
if (typePrefix in spanTypeToUiElements) {
|
|
51810
|
+
return spanTypeToUiElements[typePrefix];
|
|
51811
|
+
}
|
|
51812
|
+
return {
|
|
51813
|
+
typePrefix: "other"
|
|
51814
|
+
};
|
|
51815
|
+
}
|
|
51816
|
+
|
|
51817
|
+
function TimelineExpandCol({
|
|
51818
|
+
isSelected,
|
|
51819
|
+
isFaded,
|
|
51820
|
+
isExpanded,
|
|
51821
|
+
toggleChildren,
|
|
51822
|
+
expandAllDescendants,
|
|
51823
|
+
totalDescendants = 0,
|
|
51824
|
+
allDescendantsExpanded,
|
|
51825
|
+
numOfChildren
|
|
51826
|
+
}) {
|
|
51827
|
+
return /* @__PURE__ */ jsx(
|
|
51828
|
+
"div",
|
|
51829
|
+
{
|
|
51830
|
+
className: cn("flex items-center justify-end h-full px-1.5", {
|
|
51831
|
+
"opacity-30 [&:hover]:opacity-60": isFaded,
|
|
51832
|
+
"bg-surface4": isSelected
|
|
51833
|
+
}),
|
|
51834
|
+
children: numOfChildren && numOfChildren > 0 ? /* @__PURE__ */ jsxs("div", { className: "flex gap-1", children: [
|
|
51835
|
+
/* @__PURE__ */ jsxs(ExpandButton, { onClick: () => toggleChildren?.(), children: [
|
|
51836
|
+
allDescendantsExpanded ? totalDescendants : numOfChildren,
|
|
51837
|
+
" ",
|
|
51838
|
+
isExpanded ? allDescendantsExpanded ? /* @__PURE__ */ jsx(ChevronsUpIcon, {}) : /* @__PURE__ */ jsx(ChevronUpIcon, {}) : /* @__PURE__ */ jsx(ChevronDownIcon, {})
|
|
51839
|
+
] }),
|
|
51840
|
+
totalDescendants > numOfChildren && !allDescendantsExpanded && /* @__PURE__ */ jsxs(ExpandButton, { onClick: () => expandAllDescendants?.(), children: [
|
|
51841
|
+
totalDescendants,
|
|
51842
|
+
" ",
|
|
51843
|
+
/* @__PURE__ */ jsx(ChevronsDownIcon, {})
|
|
51844
|
+
] })
|
|
51845
|
+
] }) : null
|
|
51846
|
+
}
|
|
51847
|
+
);
|
|
51848
|
+
}
|
|
51849
|
+
function ExpandButton({ onClick, children, className }) {
|
|
51850
|
+
return /* @__PURE__ */ jsx("button", { onClick, className: cn("h-full", className), children: /* @__PURE__ */ jsx(
|
|
51851
|
+
"div",
|
|
51852
|
+
{
|
|
51853
|
+
className: cn(
|
|
51854
|
+
"flex items-center gap-[0.1rem] text-ui-xs text-neutral5 border border-border1 pl-1.5 pr-0.5 rounded-md transition-all",
|
|
51855
|
+
"hover:text-yellow-500",
|
|
51856
|
+
"[&>svg]:shrink-0 [&>svg]:opacity-80 [&>svg]:w-[0.85rem] [&>svg]:h-[0.85rem] [&>svg]:transition-all"
|
|
51857
|
+
),
|
|
51858
|
+
children
|
|
51859
|
+
}
|
|
51860
|
+
) });
|
|
51861
|
+
}
|
|
51862
|
+
|
|
51863
|
+
function TimelineStructureSign({ isLastChild }) {
|
|
51864
|
+
return /* @__PURE__ */ jsx(
|
|
51865
|
+
"div",
|
|
51866
|
+
{
|
|
51867
|
+
className: cn(
|
|
51868
|
+
"w-[0.5rem] h-[1.8rem] relative opacity-100 shrink-0",
|
|
51869
|
+
'after:content-[""] after:absolute after:left-[-1px] after:top-0 after:bottom-0 after:w-[0px] after:border-l-[1px] after:border-neutral3 after:border-dashed ',
|
|
51870
|
+
'before:content-[""] before:absolute before:left-0 before:top-[50%] before:w-full before:h-[0px] before:border-b-[1px] before:border-neutral3 before:border-dashed',
|
|
51871
|
+
{
|
|
51872
|
+
"after:bottom-[50%]": isLastChild
|
|
51873
|
+
}
|
|
51874
|
+
)
|
|
51875
|
+
}
|
|
51876
|
+
);
|
|
51877
|
+
}
|
|
51878
|
+
|
|
51879
|
+
function TimelineNameCol({
|
|
51880
|
+
span,
|
|
51881
|
+
spanUI: _spanUI,
|
|
51882
|
+
isFaded,
|
|
51883
|
+
depth = 0,
|
|
51884
|
+
onSpanClick,
|
|
51885
|
+
selectedSpanId,
|
|
51886
|
+
isLastChild,
|
|
51887
|
+
hasChildren: _hasChildren,
|
|
51888
|
+
isRootSpan,
|
|
51889
|
+
isExpanded: _isExpanded
|
|
51890
|
+
}) {
|
|
51891
|
+
return /* @__PURE__ */ jsxs(
|
|
51892
|
+
"div",
|
|
51893
|
+
{
|
|
51894
|
+
"aria-label": `View details for span ${span.name}`,
|
|
51895
|
+
className: cn("rounded-md transition-colors flex opacity-80 min-h-8 items-center rounded-l-lg", {
|
|
51896
|
+
"opacity-30 [&:hover]:opacity-60": isFaded,
|
|
51897
|
+
"bg-surface4": selectedSpanId === span.id
|
|
51898
|
+
}),
|
|
51899
|
+
style: { paddingLeft: `${depth * 1}rem` },
|
|
51900
|
+
children: [
|
|
51901
|
+
!isRootSpan && /* @__PURE__ */ jsx(TimelineStructureSign, { isLastChild }),
|
|
51902
|
+
/* @__PURE__ */ jsx(
|
|
51903
|
+
"button",
|
|
51904
|
+
{
|
|
51905
|
+
onClick: () => onSpanClick?.(span.id),
|
|
51906
|
+
className: cn(
|
|
51907
|
+
"text-ui-sm flex items-center text-left gap-1.5 text-neutral6 w-full min-w-0 rounded-md h-full px-2 py-1 transition-colors",
|
|
51908
|
+
"[&>svg]:transition-all [&>svg]:shrink-0 [&>svg]:opacity-0 [&>svg]:w-[1em] [&>svg]:h-[1em] [&>svg]:ml-auto",
|
|
51909
|
+
"hover:bg-surface4 [&:hover>svg]:opacity-60"
|
|
51910
|
+
),
|
|
51911
|
+
children: /* @__PURE__ */ jsx("span", { className: "min-w-0 truncate", children: span.name })
|
|
51912
|
+
}
|
|
51913
|
+
)
|
|
51914
|
+
]
|
|
51915
|
+
}
|
|
51916
|
+
);
|
|
51917
|
+
}
|
|
51918
|
+
|
|
51919
|
+
function TimelineTimingCol({
|
|
51920
|
+
span,
|
|
51921
|
+
selectedSpanId,
|
|
51922
|
+
isFaded,
|
|
51923
|
+
overallLatency,
|
|
51924
|
+
overallStartTime,
|
|
51925
|
+
color
|
|
51926
|
+
}) {
|
|
51927
|
+
const percentageSpanLatency = overallLatency ? Math.ceil(span.latency / overallLatency * 100) : 0;
|
|
51928
|
+
const overallStartTimeDate = overallStartTime ? new Date(overallStartTime) : null;
|
|
51929
|
+
const spanStartTimeDate = span.startTime ? new Date(span.startTime) : null;
|
|
51930
|
+
const spanStartTimeShift = spanStartTimeDate && overallStartTimeDate ? spanStartTimeDate.getTime() - overallStartTimeDate.getTime() : 0;
|
|
51931
|
+
const percentageSpanStartTime = overallLatency && Math.floor(spanStartTimeShift / overallLatency * 100);
|
|
51932
|
+
return /* @__PURE__ */ jsxs(HoverCard.Root, { openDelay: 250, children: [
|
|
51933
|
+
/* @__PURE__ */ jsxs(
|
|
51934
|
+
HoverCard.Trigger,
|
|
51935
|
+
{
|
|
51936
|
+
className: cn(
|
|
51937
|
+
"h-8 min-w-[8rem] p-1 grid grid-cols-[1fr_auto] gap-2 items-center cursor-help pr-2 rounded-r-md",
|
|
51938
|
+
"[&:hover>div]:bg-surface5",
|
|
51939
|
+
{
|
|
51940
|
+
"opacity-30 [&:hover]:opacity-60": isFaded,
|
|
51941
|
+
"bg-surface4": selectedSpanId === span.id
|
|
51942
|
+
}
|
|
51943
|
+
),
|
|
51944
|
+
children: [
|
|
51945
|
+
/* @__PURE__ */ jsx("div", { className: cn("w-full p-1.5 rounded-md bg-surface4 transition-colors duration-1000"), children: /* @__PURE__ */ jsx("div", { className: "relative w-full h-1.5 rounded-sm", children: /* @__PURE__ */ jsx(
|
|
51946
|
+
"div",
|
|
51947
|
+
{
|
|
51948
|
+
className: cn("bg-neutral1 absolute rounded-sm h-1.5 top-0"),
|
|
51949
|
+
style: {
|
|
51950
|
+
width: percentageSpanLatency ? `${percentageSpanLatency}%` : "2px",
|
|
51951
|
+
left: `${percentageSpanStartTime || 0}%`,
|
|
51952
|
+
backgroundColor: color
|
|
51953
|
+
}
|
|
51954
|
+
}
|
|
51955
|
+
) }) }),
|
|
51956
|
+
/* @__PURE__ */ jsxs("div", { className: cn("flex justify-end text-neutral3 text-ui-xs"), children: [
|
|
51957
|
+
(span.latency / 1e3).toFixed(3),
|
|
51958
|
+
" s"
|
|
51959
|
+
] })
|
|
51960
|
+
]
|
|
51961
|
+
}
|
|
51962
|
+
),
|
|
51963
|
+
/* @__PURE__ */ jsx(HoverCard.Portal, { children: /* @__PURE__ */ jsxs(
|
|
51964
|
+
HoverCard.Content,
|
|
51965
|
+
{
|
|
51966
|
+
className: "z-50 w-auto max-w-[25rem] rounded-md bg-surface4 p-2 px-4 pr-6 text-ui-sm text-neutral5 text-center border border-border1",
|
|
51967
|
+
sideOffset: 5,
|
|
51968
|
+
side: "top",
|
|
51969
|
+
children: [
|
|
51970
|
+
/* @__PURE__ */ jsxs(
|
|
51971
|
+
"div",
|
|
51972
|
+
{
|
|
51973
|
+
className: cn(
|
|
51974
|
+
"text-ui-md flex items-center gap-2 mb-4",
|
|
51975
|
+
"[&>svg]:w-[1.25em] [&>svg]:h-[1.25em] [&>svg]:shrink-0 [&>svg]:opacity-50"
|
|
51976
|
+
),
|
|
51977
|
+
children: [
|
|
51978
|
+
/* @__PURE__ */ jsx(TimerIcon, {}),
|
|
51979
|
+
" Span Timing"
|
|
51980
|
+
]
|
|
51981
|
+
}
|
|
51982
|
+
),
|
|
51983
|
+
/* @__PURE__ */ jsx(
|
|
51984
|
+
KeyValueList,
|
|
51985
|
+
{
|
|
51986
|
+
className: " [&>dd]:text-ui-md [&>dt]:text-ui-md [&>dt]:min-h-0 [&>dd]:min-h-0",
|
|
51987
|
+
data: [
|
|
51988
|
+
{
|
|
51989
|
+
key: "Latency",
|
|
51990
|
+
label: "Latency",
|
|
51991
|
+
value: `${span.latency} ms`,
|
|
51992
|
+
icon: /* @__PURE__ */ jsx(ChevronsLeftRightIcon, {})
|
|
51993
|
+
},
|
|
51994
|
+
{
|
|
51995
|
+
key: "startTime",
|
|
51996
|
+
label: "Started at",
|
|
51997
|
+
value: span.startTime ? format$1(new Date(span.startTime), "hh:mm:ss:SSS a") : "-",
|
|
51998
|
+
icon: /* @__PURE__ */ jsx(ChevronFirstIcon, {})
|
|
51999
|
+
},
|
|
52000
|
+
{
|
|
52001
|
+
key: "endTime",
|
|
52002
|
+
label: "Ended at",
|
|
52003
|
+
value: span.endTime ? format$1(new Date(span.endTime), "hh:mm:ss:SSS a") : "-",
|
|
52004
|
+
icon: /* @__PURE__ */ jsx(ChevronLastIcon, {})
|
|
52005
|
+
},
|
|
52006
|
+
{
|
|
52007
|
+
key: "startShift",
|
|
52008
|
+
label: "Start Shift",
|
|
52009
|
+
value: `${spanStartTimeShift}ms`,
|
|
52010
|
+
icon: /* @__PURE__ */ jsx(ChevronsRightIcon, {})
|
|
52011
|
+
}
|
|
52012
|
+
]
|
|
52013
|
+
}
|
|
52014
|
+
),
|
|
52015
|
+
/* @__PURE__ */ jsx(HoverCard.Arrow, { className: "fill-surface5" })
|
|
52016
|
+
]
|
|
52017
|
+
}
|
|
52018
|
+
) })
|
|
52019
|
+
] });
|
|
52020
|
+
}
|
|
52021
|
+
|
|
52022
|
+
function TraceTimelineSpan({
|
|
52023
|
+
span,
|
|
52024
|
+
depth = 0,
|
|
52025
|
+
onSpanClick,
|
|
52026
|
+
selectedSpanId,
|
|
52027
|
+
isLastChild,
|
|
52028
|
+
overallLatency,
|
|
52029
|
+
overallStartTime,
|
|
52030
|
+
fadedTypes,
|
|
52031
|
+
searchPhrase,
|
|
52032
|
+
featuredSpanIds,
|
|
52033
|
+
expandedSpanIds,
|
|
52034
|
+
setExpandedSpanIds
|
|
52035
|
+
}) {
|
|
52036
|
+
const hasChildren = span.spans && span.spans.length > 0;
|
|
52037
|
+
const numOfChildren = span.spans ? span.spans.length : 0;
|
|
52038
|
+
const allDescendantIds = getSpanDescendantIds(span);
|
|
52039
|
+
const totalDescendants = allDescendantIds.length;
|
|
52040
|
+
const isRootSpan = depth === 0;
|
|
52041
|
+
const spanUI = getSpanTypeUi(span?.type);
|
|
52042
|
+
const isExpanded = expandedSpanIds ? expandedSpanIds.includes(span.id) : false;
|
|
52043
|
+
const isFadedBySearch = featuredSpanIds && featuredSpanIds.length > 0 ? !featuredSpanIds.includes(span.id) : false;
|
|
52044
|
+
const isFadedByType = fadedTypes && fadedTypes.length > 0 ? fadedTypes.includes(spanUI?.typePrefix || "") : false;
|
|
52045
|
+
const isFaded = isFadedByType || isFadedBySearch;
|
|
52046
|
+
useEffect(() => {
|
|
52047
|
+
if (!featuredSpanIds || allDescendantIds.length === 0) return;
|
|
52048
|
+
if (isExpanded) return;
|
|
52049
|
+
const hasFeaturedDescendant = allDescendantIds.some((id) => featuredSpanIds.includes(id));
|
|
52050
|
+
if (hasFeaturedDescendant && setExpandedSpanIds) {
|
|
52051
|
+
setExpandedSpanIds((prev) => prev ? [...prev, span.id] : [span.id]);
|
|
52052
|
+
}
|
|
52053
|
+
}, [featuredSpanIds, allDescendantIds]);
|
|
52054
|
+
const toggleChildren = () => {
|
|
52055
|
+
if (!setExpandedSpanIds) return;
|
|
52056
|
+
setExpandedSpanIds((prev) => {
|
|
52057
|
+
if (!prev) return prev;
|
|
52058
|
+
const idsToRemove = /* @__PURE__ */ new Set([span.id, ...allDescendantIds]);
|
|
52059
|
+
return isExpanded ? prev.filter((id) => !idsToRemove.has(id)) : [...prev, span.id];
|
|
52060
|
+
});
|
|
52061
|
+
};
|
|
52062
|
+
const expandAllDescendants = () => {
|
|
52063
|
+
if (!setExpandedSpanIds) return;
|
|
52064
|
+
setExpandedSpanIds((prev) => {
|
|
52065
|
+
if (!prev) return prev;
|
|
52066
|
+
return Array.from(/* @__PURE__ */ new Set([...prev, span.id, ...allDescendantIds]));
|
|
52067
|
+
});
|
|
52068
|
+
};
|
|
52069
|
+
const allDescendantsExpanded = allDescendantIds.every((id) => expandedSpanIds?.includes(id));
|
|
52070
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
52071
|
+
/* @__PURE__ */ jsx(
|
|
52072
|
+
TimelineNameCol,
|
|
52073
|
+
{
|
|
52074
|
+
span,
|
|
52075
|
+
spanUI,
|
|
52076
|
+
isFaded,
|
|
52077
|
+
depth,
|
|
52078
|
+
onSpanClick,
|
|
52079
|
+
selectedSpanId,
|
|
52080
|
+
isLastChild,
|
|
52081
|
+
hasChildren,
|
|
52082
|
+
isRootSpan,
|
|
52083
|
+
isExpanded
|
|
52084
|
+
}
|
|
52085
|
+
),
|
|
52086
|
+
/* @__PURE__ */ jsx(
|
|
52087
|
+
TimelineExpandCol,
|
|
52088
|
+
{
|
|
52089
|
+
isSelected: selectedSpanId === span.id,
|
|
52090
|
+
isFaded,
|
|
52091
|
+
isExpanded,
|
|
52092
|
+
toggleChildren,
|
|
52093
|
+
expandAllDescendants,
|
|
52094
|
+
expandedSpanIds,
|
|
52095
|
+
totalDescendants,
|
|
52096
|
+
allDescendantsExpanded,
|
|
52097
|
+
numOfChildren
|
|
52098
|
+
}
|
|
52099
|
+
),
|
|
52100
|
+
/* @__PURE__ */ jsx(
|
|
52101
|
+
TimelineTimingCol,
|
|
52102
|
+
{
|
|
52103
|
+
span,
|
|
52104
|
+
selectedSpanId,
|
|
52105
|
+
isFaded,
|
|
52106
|
+
overallLatency,
|
|
52107
|
+
overallStartTime,
|
|
52108
|
+
color: spanUI?.color
|
|
52109
|
+
}
|
|
52110
|
+
),
|
|
52111
|
+
hasChildren && isExpanded && span.spans?.map((childSpan, idx, array) => {
|
|
52112
|
+
const isLast = idx === array.length - 1;
|
|
52113
|
+
return /* @__PURE__ */ jsx(
|
|
52114
|
+
TraceTimelineSpan,
|
|
52115
|
+
{
|
|
52116
|
+
span: childSpan,
|
|
52117
|
+
depth: depth + 1,
|
|
52118
|
+
onSpanClick,
|
|
52119
|
+
selectedSpanId,
|
|
52120
|
+
isLastChild: isLast,
|
|
52121
|
+
overallLatency,
|
|
52122
|
+
overallStartTime,
|
|
52123
|
+
fadedTypes,
|
|
52124
|
+
searchPhrase,
|
|
52125
|
+
expandedSpanIds,
|
|
52126
|
+
setExpandedSpanIds,
|
|
52127
|
+
featuredSpanIds
|
|
52128
|
+
},
|
|
52129
|
+
childSpan.id
|
|
52130
|
+
);
|
|
52131
|
+
})
|
|
52132
|
+
] });
|
|
52133
|
+
}
|
|
52134
|
+
|
|
52135
|
+
function TraceTimeline({
|
|
52136
|
+
hierarchicalSpans = [],
|
|
52137
|
+
onSpanClick,
|
|
52138
|
+
selectedSpanId,
|
|
52139
|
+
isLoading,
|
|
52140
|
+
fadedTypes,
|
|
52141
|
+
expandedSpanIds,
|
|
52142
|
+
setExpandedSpanIds,
|
|
52143
|
+
featuredSpanIds
|
|
52144
|
+
}) {
|
|
52145
|
+
const overallLatency = hierarchicalSpans?.[0]?.latency || 0;
|
|
52146
|
+
const overallStartTime = hierarchicalSpans?.[0]?.startTime || "";
|
|
52147
|
+
return /* @__PURE__ */ jsx(Fragment, { children: isLoading ? /* @__PURE__ */ jsxs(
|
|
52148
|
+
"div",
|
|
52149
|
+
{
|
|
52150
|
+
className: cn(
|
|
52151
|
+
"flex items-center text-ui-sm gap-3 bg-surface3/50 rounded-md p-3 justify-center text-neutral3",
|
|
52152
|
+
"[&_svg]:w-[1.25em] [&_svg]:h-[1.25em] [&_svg]:opacity-50"
|
|
52153
|
+
),
|
|
52154
|
+
children: [
|
|
52155
|
+
/* @__PURE__ */ jsx(Spinner, {}),
|
|
52156
|
+
" Loading Trace Timeline ..."
|
|
52157
|
+
]
|
|
52158
|
+
}
|
|
52159
|
+
) : /* @__PURE__ */ jsx("div", { className: "grid grid-cols-[minmax(0,1fr)_auto_auto] items-start content-start gap-y-px overflow-hidden py-1", children: hierarchicalSpans?.map((span) => /* @__PURE__ */ jsx(
|
|
52160
|
+
TraceTimelineSpan,
|
|
52161
|
+
{
|
|
52162
|
+
span,
|
|
52163
|
+
onSpanClick,
|
|
52164
|
+
selectedSpanId,
|
|
52165
|
+
overallLatency,
|
|
52166
|
+
overallStartTime,
|
|
52167
|
+
fadedTypes,
|
|
52168
|
+
featuredSpanIds,
|
|
52169
|
+
expandedSpanIds,
|
|
52170
|
+
setExpandedSpanIds
|
|
52171
|
+
},
|
|
52172
|
+
span.id
|
|
52173
|
+
)) }) });
|
|
52174
|
+
}
|
|
52175
|
+
|
|
52176
|
+
function TraceDetails({ traceId, onClose, onSpanSelect, initialSpanId }) {
|
|
52177
|
+
const { data: traceData, isLoading } = useTraceSpans(traceId);
|
|
52178
|
+
const [selectedSpanId, setSelectedSpanId] = useState(initialSpanId ?? void 0);
|
|
52179
|
+
useEffect(() => {
|
|
52180
|
+
if (initialSpanId && traceData?.spans) {
|
|
52181
|
+
const span = traceData.spans.find((s) => s.spanId === initialSpanId);
|
|
52182
|
+
if (span) {
|
|
52183
|
+
setSelectedSpanId(initialSpanId);
|
|
52184
|
+
onSpanSelect?.(span);
|
|
52185
|
+
return;
|
|
52186
|
+
}
|
|
52187
|
+
}
|
|
52188
|
+
setSelectedSpanId(void 0);
|
|
52189
|
+
onSpanSelect?.(void 0);
|
|
52190
|
+
}, [initialSpanId, traceData?.spans]);
|
|
52191
|
+
const hierarchicalSpans = useMemo(() => formatHierarchicalSpans(traceData?.spans ?? []), [traceData?.spans]);
|
|
52192
|
+
const [expandedSpanIds, setExpandedSpanIds] = useState([]);
|
|
52193
|
+
useEffect(() => {
|
|
52194
|
+
if (hierarchicalSpans.length > 0) {
|
|
52195
|
+
setExpandedSpanIds(getAllSpanIds(hierarchicalSpans));
|
|
52196
|
+
}
|
|
52197
|
+
}, [hierarchicalSpans]);
|
|
52198
|
+
const handleSpanClick = (id) => {
|
|
52199
|
+
const newId = selectedSpanId === id ? void 0 : id;
|
|
52200
|
+
setSelectedSpanId(newId);
|
|
52201
|
+
const span = newId ? traceData?.spans?.find((s) => s.spanId === newId) : void 0;
|
|
52202
|
+
onSpanSelect?.(span);
|
|
52203
|
+
};
|
|
52204
|
+
return /* @__PURE__ */ jsxs(DataDetailsPanel, { children: [
|
|
52205
|
+
/* @__PURE__ */ jsxs(DataDetailsPanel.Header, { children: [
|
|
52206
|
+
/* @__PURE__ */ jsxs(DataDetailsPanel.Heading, { children: [
|
|
52207
|
+
"Trace ",
|
|
52208
|
+
/* @__PURE__ */ jsxs("b", { children: [
|
|
52209
|
+
"# ",
|
|
52210
|
+
traceId
|
|
52211
|
+
] })
|
|
52212
|
+
] }),
|
|
52213
|
+
/* @__PURE__ */ jsx(DataDetailsPanel.CloseButton, { onClick: onClose })
|
|
52214
|
+
] }),
|
|
52215
|
+
isLoading ? /* @__PURE__ */ jsx(DataDetailsPanel.LoadingData, { children: "Loading trace..." }) : hierarchicalSpans.length === 0 ? /* @__PURE__ */ jsx(DataDetailsPanel.NoData, { children: "No spans found for this trace." }) : /* @__PURE__ */ jsx(DataDetailsPanel.Content, { children: /* @__PURE__ */ jsx(
|
|
52216
|
+
TraceTimeline,
|
|
52217
|
+
{
|
|
52218
|
+
hierarchicalSpans,
|
|
52219
|
+
onSpanClick: handleSpanClick,
|
|
52220
|
+
selectedSpanId,
|
|
52221
|
+
expandedSpanIds,
|
|
52222
|
+
setExpandedSpanIds
|
|
52223
|
+
}
|
|
52224
|
+
) })
|
|
52225
|
+
] });
|
|
52226
|
+
}
|
|
52227
|
+
|
|
52228
|
+
const NoLogsInfo = () => /* @__PURE__ */ jsx("div", { className: "flex h-full items-center justify-center", children: /* @__PURE__ */ jsx(
|
|
52229
|
+
EmptyState$1,
|
|
52230
|
+
{
|
|
52231
|
+
iconSlot: /* @__PURE__ */ jsx(CircleSlashIcon, {}),
|
|
52232
|
+
titleSlot: "No logs yet",
|
|
52233
|
+
descriptionSlot: "Logs will appear here once agents, workflows, or tools are executed."
|
|
52234
|
+
}
|
|
52235
|
+
) });
|
|
52236
|
+
|
|
52237
|
+
const KV = DataDetailsPanel.KeyValueList;
|
|
52238
|
+
function SpanDetails({ span, onClose }) {
|
|
52239
|
+
const durationMs = span.startedAt && span.endedAt ? new Date(span.endedAt).getTime() - new Date(span.startedAt).getTime() : null;
|
|
52240
|
+
return /* @__PURE__ */ jsxs(DataDetailsPanel, { children: [
|
|
52241
|
+
/* @__PURE__ */ jsxs(DataDetailsPanel.Header, { children: [
|
|
52242
|
+
/* @__PURE__ */ jsxs(DataDetailsPanel.Heading, { children: [
|
|
52243
|
+
"Span ",
|
|
52244
|
+
/* @__PURE__ */ jsxs("b", { children: [
|
|
52245
|
+
"# ",
|
|
52246
|
+
span.spanId
|
|
52247
|
+
] })
|
|
52248
|
+
] }),
|
|
52249
|
+
/* @__PURE__ */ jsx(DataDetailsPanel.CloseButton, { onClick: onClose })
|
|
52250
|
+
] }),
|
|
52251
|
+
/* @__PURE__ */ jsxs(DataDetailsPanel.Content, { children: [
|
|
52252
|
+
/* @__PURE__ */ jsxs(KV, { children: [
|
|
52253
|
+
span.spanType && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
52254
|
+
/* @__PURE__ */ jsx(KV.Key, { children: "Type" }),
|
|
52255
|
+
/* @__PURE__ */ jsx(KV.Value, { children: span.spanType })
|
|
52256
|
+
] }),
|
|
52257
|
+
span.startedAt && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
52258
|
+
/* @__PURE__ */ jsx(KV.Key, { children: "Started" }),
|
|
52259
|
+
/* @__PURE__ */ jsx(KV.Value, { children: format(new Date(span.startedAt), "MMM dd, HH:mm:ss.SSS") })
|
|
52260
|
+
] }),
|
|
52261
|
+
span.endedAt && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
52262
|
+
/* @__PURE__ */ jsx(KV.Key, { children: "Ended" }),
|
|
52263
|
+
/* @__PURE__ */ jsx(KV.Value, { children: format(new Date(span.endedAt), "MMM dd, HH:mm:ss.SSS") })
|
|
52264
|
+
] }),
|
|
52265
|
+
durationMs != null && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
52266
|
+
/* @__PURE__ */ jsx(KV.Key, { children: "Duration" }),
|
|
52267
|
+
/* @__PURE__ */ jsx(KV.Value, { children: durationMs < 1e3 ? `${durationMs}ms` : `${(durationMs / 1e3).toFixed(2)}s` })
|
|
52268
|
+
] })
|
|
52269
|
+
] }),
|
|
52270
|
+
/* @__PURE__ */ jsx("br", {}),
|
|
52271
|
+
/* @__PURE__ */ jsx(
|
|
52272
|
+
DataDetailsPanel.CodeSection,
|
|
52273
|
+
{
|
|
52274
|
+
title: "Input",
|
|
52275
|
+
icon: /* @__PURE__ */ jsx(FileInputIcon, {}),
|
|
52276
|
+
codeStr: JSON.stringify(span.input ?? null, null, 2)
|
|
52277
|
+
}
|
|
52278
|
+
),
|
|
52279
|
+
/* @__PURE__ */ jsx(
|
|
52280
|
+
DataDetailsPanel.CodeSection,
|
|
52281
|
+
{
|
|
52282
|
+
title: "Output",
|
|
52283
|
+
icon: /* @__PURE__ */ jsx(FileOutputIcon, {}),
|
|
52284
|
+
codeStr: JSON.stringify(span.output ?? null, null, 2)
|
|
52285
|
+
}
|
|
52286
|
+
),
|
|
52287
|
+
/* @__PURE__ */ jsx(
|
|
52288
|
+
DataDetailsPanel.CodeSection,
|
|
52289
|
+
{
|
|
52290
|
+
title: "Metadata",
|
|
52291
|
+
icon: /* @__PURE__ */ jsx(BracesIcon, {}),
|
|
52292
|
+
codeStr: JSON.stringify(span.metadata ?? null, null, 2)
|
|
52293
|
+
}
|
|
52294
|
+
),
|
|
52295
|
+
/* @__PURE__ */ jsx(
|
|
52296
|
+
DataDetailsPanel.CodeSection,
|
|
52297
|
+
{
|
|
52298
|
+
title: "Attributes",
|
|
52299
|
+
icon: /* @__PURE__ */ jsx(BracesIcon, {}),
|
|
52300
|
+
codeStr: JSON.stringify(span.attributes ?? null, null, 2)
|
|
52301
|
+
}
|
|
52302
|
+
)
|
|
52303
|
+
] })
|
|
52304
|
+
] });
|
|
52305
|
+
}
|
|
52306
|
+
|
|
52307
|
+
function DataListNextPageLoading({
|
|
52308
|
+
isLoading,
|
|
52309
|
+
hasMore,
|
|
52310
|
+
setEndOfListElement,
|
|
52311
|
+
loadingText = "Loading more data...",
|
|
52312
|
+
noMoreDataText = "No more data to load"
|
|
52313
|
+
}) {
|
|
52314
|
+
if (!setEndOfListElement) {
|
|
52315
|
+
return null;
|
|
52316
|
+
}
|
|
52317
|
+
return /* @__PURE__ */ jsxs(
|
|
52318
|
+
"div",
|
|
52319
|
+
{
|
|
52320
|
+
ref: setEndOfListElement,
|
|
52321
|
+
className: "col-span-full text-ui-md text-neutral3 opacity-50 flex py-4 justify-center",
|
|
52322
|
+
children: [
|
|
52323
|
+
isLoading && loadingText,
|
|
52324
|
+
!hasMore && !isLoading && noMoreDataText
|
|
52325
|
+
]
|
|
52326
|
+
}
|
|
52327
|
+
);
|
|
52328
|
+
}
|
|
52329
|
+
|
|
52330
|
+
function DataListNoMatch({ message = "Nothing matches your search", className }) {
|
|
52331
|
+
return /* @__PURE__ */ jsx("div", { className: cn("col-span-full flex flex-col items-center justify-center gap-2 py-12 text-neutral3", className), children: /* @__PURE__ */ jsx("p", { className: "text-ui-md", children: message }) });
|
|
52332
|
+
}
|
|
52333
|
+
|
|
52334
|
+
function DataListRoot({ children, columns, className }) {
|
|
52335
|
+
return /* @__PURE__ */ jsx(
|
|
52336
|
+
"div",
|
|
52337
|
+
{
|
|
52338
|
+
className: cn(
|
|
52339
|
+
"grid bg-surface2 border h-full border-border1 rounded-xl overflow-y-auto content-start",
|
|
52340
|
+
className
|
|
52341
|
+
),
|
|
52342
|
+
style: { gridTemplateColumns: columns },
|
|
52343
|
+
children
|
|
52344
|
+
}
|
|
52345
|
+
);
|
|
52346
|
+
}
|
|
52347
|
+
|
|
52348
|
+
const dataListRowStyles = [
|
|
52349
|
+
"data-list-row grid grid-cols-subgrid gap-10 col-span-full px-5 outline-none cursor-pointer border-y border-b-border1 border-t-transparent",
|
|
52350
|
+
"hover:bg-surface4 hover:border-transparent focus-visible:bg-surface4 focus-visible:border-transparent focus-visible:ring-1 focus-visible:ring-inset focus-visible:ring-accent1",
|
|
52351
|
+
"[.data-list-row:hover+&]:border-t-transparent [.data-list-row:focus-visible+&]:border-t-transparent",
|
|
52352
|
+
"transition-colors duration-200 rounded-lg"
|
|
52353
|
+
];
|
|
52354
|
+
|
|
52355
|
+
function DataListRow({ children, className }) {
|
|
52356
|
+
return /* @__PURE__ */ jsx("div", { className: cn(...dataListRowStyles, className), children });
|
|
52357
|
+
}
|
|
52358
|
+
|
|
52359
|
+
function DataListRowButton({ children, onClick, className }) {
|
|
52360
|
+
return /* @__PURE__ */ jsx("button", { type: "button", onClick, className: cn(...dataListRowStyles, "text-left", className), children });
|
|
52361
|
+
}
|
|
52362
|
+
|
|
52363
|
+
function DataListRowLink({ children, to, className }) {
|
|
52364
|
+
const { Link } = useLinkComponent();
|
|
52365
|
+
return /* @__PURE__ */ jsx(Link, { href: to, className: cn(...dataListRowStyles, className), children });
|
|
52366
|
+
}
|
|
52367
|
+
|
|
52368
|
+
function DataListTop({ children, className }) {
|
|
52369
|
+
return /* @__PURE__ */ jsx(
|
|
52370
|
+
"div",
|
|
52371
|
+
{
|
|
52372
|
+
className: cn(
|
|
52373
|
+
"grid grid-cols-subgrid gap-6 lg:gap-8 xl:gap-10 2xl:gap-12 3xl:gap-14 col-span-full border-b border-border1 px-4 bg-surface2 sticky top-0 z-10",
|
|
52374
|
+
className
|
|
52375
|
+
),
|
|
52376
|
+
children
|
|
52377
|
+
}
|
|
52378
|
+
);
|
|
52379
|
+
}
|
|
52380
|
+
|
|
52381
|
+
const DataListTopCell = forwardRef(({ children, className }, ref) => {
|
|
52382
|
+
return /* @__PURE__ */ jsx(
|
|
52383
|
+
"span",
|
|
52384
|
+
{
|
|
52385
|
+
ref,
|
|
52386
|
+
className: cn(
|
|
52387
|
+
"h-8 py-1 flex items-center uppercase whitespace-nowrap text-neutral2 tracking-widest text-ui-xs",
|
|
52388
|
+
className
|
|
52389
|
+
),
|
|
52390
|
+
children
|
|
52391
|
+
}
|
|
52392
|
+
);
|
|
52393
|
+
});
|
|
52394
|
+
function DataListTopCellWithTooltip({ children, tooltip, className }) {
|
|
52395
|
+
return /* @__PURE__ */ jsxs(Tooltip, { children: [
|
|
52396
|
+
/* @__PURE__ */ jsx(TooltipTrigger, { children: /* @__PURE__ */ jsx(DataListTopCell, { className, children }) }),
|
|
52397
|
+
/* @__PURE__ */ jsx(TooltipContent, { children: tooltip })
|
|
52398
|
+
] });
|
|
52399
|
+
}
|
|
52400
|
+
const breakpointClasses = {
|
|
52401
|
+
sm: { show: "hidden sm:inline-flex", hide: "inline-flex sm:hidden" },
|
|
52402
|
+
md: { show: "hidden md:inline-flex", hide: "inline-flex md:hidden" },
|
|
52403
|
+
lg: { show: "hidden lg:inline-flex", hide: "inline-flex lg:hidden" },
|
|
52404
|
+
xl: { show: "hidden xl:inline-flex", hide: "inline-flex xl:hidden" },
|
|
52405
|
+
"2xl": { show: "hidden 2xl:inline-flex", hide: "inline-flex 2xl:hidden" }
|
|
52406
|
+
};
|
|
52407
|
+
function DataListTopCellSmart({
|
|
52408
|
+
long,
|
|
52409
|
+
short,
|
|
52410
|
+
tooltip,
|
|
52411
|
+
breakpoint = "2xl",
|
|
52412
|
+
className
|
|
52413
|
+
}) {
|
|
52414
|
+
const tooltipText = tooltip ?? (typeof long === "string" ? long : void 0);
|
|
52415
|
+
const bp = breakpointClasses[breakpoint];
|
|
52416
|
+
const content = /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
52417
|
+
/* @__PURE__ */ jsx("span", { className: cn("items-center gap-1", bp.show), children: long }),
|
|
52418
|
+
/* @__PURE__ */ jsx("span", { className: cn("items-center gap-1", bp.hide), children: short })
|
|
52419
|
+
] });
|
|
52420
|
+
if (tooltipText) {
|
|
52421
|
+
return /* @__PURE__ */ jsx(
|
|
52422
|
+
DataListTopCellWithTooltip,
|
|
52423
|
+
{
|
|
52424
|
+
tooltip: tooltipText,
|
|
52425
|
+
className: cn("flex [&_svg]:w-[1.3em] [&_svg]:h-[1.3em]", className),
|
|
52426
|
+
children: content
|
|
52427
|
+
}
|
|
52428
|
+
);
|
|
52429
|
+
}
|
|
52430
|
+
return /* @__PURE__ */ jsx(DataListTopCell, { className: cn("flex [&_svg]:w-[1.3em] [&_svg]:h-[1.3em]", className), children: content });
|
|
52431
|
+
}
|
|
52432
|
+
|
|
52433
|
+
function DataListCell({ children, className, height = "default" }) {
|
|
52434
|
+
return /* @__PURE__ */ jsx(
|
|
52435
|
+
"span",
|
|
52436
|
+
{
|
|
52437
|
+
className: cn(
|
|
52438
|
+
"relative grid items-center text-ui-md whitespace-nowrap text-neutral3",
|
|
52439
|
+
height === "compact" ? "py-2" : "py-4",
|
|
52440
|
+
className
|
|
52441
|
+
),
|
|
52442
|
+
children
|
|
52443
|
+
}
|
|
52444
|
+
);
|
|
52445
|
+
}
|
|
52446
|
+
function DataListTextCell({ children, className }) {
|
|
52447
|
+
return /* @__PURE__ */ jsx(DataListCell, { className, children });
|
|
52448
|
+
}
|
|
52449
|
+
function DataListNameCell({ children, className }) {
|
|
52450
|
+
return /* @__PURE__ */ jsx(DataListCell, { className: cn("text-left text-neutral4", className), children: /* @__PURE__ */ jsx("span", { className: "truncate", children }) });
|
|
52451
|
+
}
|
|
52452
|
+
function DataListDescriptionCell({ children, className }) {
|
|
52453
|
+
return /* @__PURE__ */ jsx(DataListCell, { className: cn("text-neutral2", className), children: /* @__PURE__ */ jsx("span", { className: "truncate", children }) });
|
|
52454
|
+
}
|
|
52455
|
+
|
|
52456
|
+
function toDate(value) {
|
|
52457
|
+
const date = value instanceof Date ? value : new Date(value);
|
|
52458
|
+
return isNaN(date.getTime()) ? null : date;
|
|
52459
|
+
}
|
|
52460
|
+
const LEVEL_CONFIG = {
|
|
52461
|
+
debug: { label: "DEBUG", color: "#71717a" },
|
|
52462
|
+
info: { label: "INFO", color: "#60a5fa" },
|
|
52463
|
+
warn: { label: "WARN", color: "#facc15" },
|
|
52464
|
+
error: { label: "ERROR", color: "#f87171" },
|
|
52465
|
+
fatal: { label: "FATAL", color: "#dc2626" }
|
|
52466
|
+
};
|
|
52467
|
+
function LogsDataListLevelCell({ level }) {
|
|
52468
|
+
const config = LEVEL_CONFIG[level];
|
|
52469
|
+
return /* @__PURE__ */ jsx(DataListCell, { height: "compact", children: /* @__PURE__ */ jsx("span", { className: "uppercase text-ui-sm font-semibold", style: { color: config.color }, children: config.label }) });
|
|
52470
|
+
}
|
|
52471
|
+
function LogsDataListDateCell({ timestamp }) {
|
|
52472
|
+
const date = toDate(timestamp);
|
|
52473
|
+
return /* @__PURE__ */ jsx(DataListCell, { height: "compact", className: "text-ui-smd text-neutral2", children: date ? isToday(date) ? "Today" : format(date, "MMM dd") : "-" });
|
|
52474
|
+
}
|
|
52475
|
+
function LogsDataListTimeCell({ timestamp }) {
|
|
52476
|
+
const date = toDate(timestamp);
|
|
52477
|
+
return /* @__PURE__ */ jsx(DataListCell, { height: "compact", className: "text-ui-smd font-mono text-neutral3 flex", children: date ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
52478
|
+
format(date, "HH:mm:ss"),
|
|
52479
|
+
/* @__PURE__ */ jsxs("span", { className: "text-neutral2", children: [
|
|
52480
|
+
".",
|
|
52481
|
+
String(date.getMilliseconds()).padStart(3, "0")
|
|
52482
|
+
] })
|
|
52483
|
+
] }) : "-" });
|
|
52484
|
+
}
|
|
52485
|
+
function EntityTypeIcon({ entityType, className }) {
|
|
52486
|
+
const iconClass = cn("size-3.5 shrink-0 text-neutral2", className);
|
|
52487
|
+
switch (entityType) {
|
|
52488
|
+
case "AGENT":
|
|
52489
|
+
return /* @__PURE__ */ jsx(AgentIcon, { className: iconClass, "aria-hidden": true });
|
|
52490
|
+
case "WORKFLOW":
|
|
52491
|
+
return /* @__PURE__ */ jsx(WorkflowIcon, { className: iconClass, "aria-hidden": true });
|
|
52492
|
+
case "TOOL":
|
|
52493
|
+
return /* @__PURE__ */ jsx(ToolsIcon, { className: iconClass, "aria-hidden": true });
|
|
52494
|
+
default:
|
|
52495
|
+
return null;
|
|
52496
|
+
}
|
|
52497
|
+
}
|
|
52498
|
+
function LogsDataListEntityCell({ entityType, entityName }) {
|
|
52499
|
+
const type = entityType ?? "";
|
|
52500
|
+
return /* @__PURE__ */ jsxs(DataListCell, { height: "compact", className: "flex min-w-0 items-center gap-2", children: [
|
|
52501
|
+
/* @__PURE__ */ jsx(EntityTypeIcon, { entityType: type }),
|
|
52502
|
+
entityName ? /* @__PURE__ */ jsx("span", { className: "min-w-0 text-ui-smd truncate", children: entityName }) : "-"
|
|
52503
|
+
] });
|
|
52504
|
+
}
|
|
52505
|
+
function LogsDataListMessageCell({ message }) {
|
|
52506
|
+
return /* @__PURE__ */ jsx(DataListCell, { height: "compact", className: "text-neutral4 text-ui-smd min-w-0 truncate font-mono", children: message });
|
|
52507
|
+
}
|
|
52508
|
+
function LogsDataListDataCell({ data }) {
|
|
52509
|
+
if (!data || Object.keys(data).length === 0) {
|
|
52510
|
+
return /* @__PURE__ */ jsx(DataListCell, { height: "compact", children: null });
|
|
52511
|
+
}
|
|
52512
|
+
const summary = Object.entries(data).map(([k, v]) => {
|
|
52513
|
+
if (typeof v === "string") return `${k}: ${v}`;
|
|
52514
|
+
try {
|
|
52515
|
+
return `${k}: ${JSON.stringify(v)}`;
|
|
52516
|
+
} catch {
|
|
52517
|
+
return `${k}: <unserializable>`;
|
|
52518
|
+
}
|
|
52519
|
+
}).join(", ");
|
|
52520
|
+
return /* @__PURE__ */ jsx(DataListCell, { height: "compact", className: "min-w-0", children: /* @__PURE__ */ jsx("span", { className: "block text-neutral3 text-ui-smd font-mono truncate", children: summary }) });
|
|
52521
|
+
}
|
|
52522
|
+
|
|
52523
|
+
const LogsDataList = Object.assign(DataListRoot, {
|
|
52524
|
+
Top: DataListTop,
|
|
52525
|
+
TopCell: DataListTopCell,
|
|
52526
|
+
TopCellWithTooltip: DataListTopCellWithTooltip,
|
|
52527
|
+
TopCellSmart: DataListTopCellSmart,
|
|
52528
|
+
Row: DataListRow,
|
|
52529
|
+
RowButton: DataListRowButton,
|
|
52530
|
+
RowLink: DataListRowLink,
|
|
52531
|
+
NoMatch: DataListNoMatch,
|
|
52532
|
+
DateCell: LogsDataListDateCell,
|
|
52533
|
+
TimeCell: LogsDataListTimeCell,
|
|
52534
|
+
LevelCell: LogsDataListLevelCell,
|
|
52535
|
+
EntityCell: LogsDataListEntityCell,
|
|
52536
|
+
MessageCell: LogsDataListMessageCell,
|
|
52537
|
+
DataCell: LogsDataListDataCell,
|
|
52538
|
+
NextPageLoading: DataListNextPageLoading
|
|
52539
|
+
});
|
|
52540
|
+
|
|
52541
|
+
const DataList = Object.assign(DataListRoot, {
|
|
52542
|
+
Top: DataListTop,
|
|
52543
|
+
TopCell: DataListTopCell,
|
|
52544
|
+
TopCellWithTooltip: DataListTopCellWithTooltip,
|
|
52545
|
+
TopCellSmart: DataListTopCellSmart,
|
|
52546
|
+
Row: DataListRow,
|
|
52547
|
+
RowButton: DataListRowButton,
|
|
52548
|
+
RowLink: DataListRowLink,
|
|
52549
|
+
Cell: DataListCell,
|
|
52550
|
+
TextCell: DataListTextCell,
|
|
52551
|
+
NameCell: DataListNameCell,
|
|
52552
|
+
DescriptionCell: DataListDescriptionCell,
|
|
52553
|
+
NoMatch: DataListNoMatch,
|
|
52554
|
+
NextPageLoading: DataListNextPageLoading
|
|
52555
|
+
});
|
|
52556
|
+
|
|
52557
|
+
const widths = ["75%", "50%", "65%", "90%", "60%", "80%"];
|
|
52558
|
+
function DataListSkeleton({ columns = "auto 1fr auto auto", numberOfRows = 3 }) {
|
|
52559
|
+
const columnParts = columns.trim().split(/\s+/);
|
|
52560
|
+
const columnCount = columnParts.length;
|
|
52561
|
+
const skeletonColumns = columnParts.map((col) => col === "auto" ? "minmax(6rem, auto)" : col).join(" ");
|
|
52562
|
+
const getPseudoRandomWidth = (rowIdx, colIdx) => {
|
|
52563
|
+
const index = (rowIdx + colIdx + columnCount + numberOfRows) % widths.length;
|
|
52564
|
+
return widths[index];
|
|
52565
|
+
};
|
|
52566
|
+
return /* @__PURE__ */ jsx(DataListRoot, { columns: skeletonColumns, children: Array.from({ length: numberOfRows }).map((_, rowIdx) => /* @__PURE__ */ jsx(
|
|
52567
|
+
"div",
|
|
52568
|
+
{
|
|
52569
|
+
className: "data-list-row grid grid-cols-subgrid gap-6 lg:gap-8 xl:gap-10 2xl:gap-12 3xl:gap-14 col-span-full px-5 border-y border-b-border1 border-t-transparent transition-colors duration-200 rounded-lg",
|
|
52570
|
+
children: Array.from({ length: columnCount }).map((_2, colIdx) => /* @__PURE__ */ jsx(DataListCell, { children: /* @__PURE__ */ jsx(
|
|
52571
|
+
"div",
|
|
52572
|
+
{
|
|
52573
|
+
className: "bg-surface4 rounded-md animate-pulse text-transparent h-[1rem] select-none",
|
|
52574
|
+
style: { width: getPseudoRandomWidth(rowIdx, colIdx) }
|
|
52575
|
+
}
|
|
52576
|
+
) }, colIdx))
|
|
52577
|
+
},
|
|
52578
|
+
rowIdx
|
|
52579
|
+
)) });
|
|
52580
|
+
}
|
|
52581
|
+
|
|
52582
|
+
function hashCode(str) {
|
|
52583
|
+
let hash = 0;
|
|
52584
|
+
for (let i = 0; i < str.length; i++) {
|
|
52585
|
+
hash = (hash << 5) - hash + str.charCodeAt(i) | 0;
|
|
52586
|
+
}
|
|
52587
|
+
return (hash >>> 0).toString(36);
|
|
52588
|
+
}
|
|
52589
|
+
function getLogIds(logs) {
|
|
52590
|
+
const ids = /* @__PURE__ */ new Map();
|
|
52591
|
+
const seen = /* @__PURE__ */ new Map();
|
|
52592
|
+
for (const log of logs) {
|
|
52593
|
+
const ts = log.timestamp instanceof Date ? log.timestamp.toISOString() : log.timestamp;
|
|
52594
|
+
const base = hashCode(`${ts}${log.message ?? ""}${log.data ? JSON.stringify(log.data) : ""}`);
|
|
52595
|
+
const count = seen.get(base) ?? 0;
|
|
52596
|
+
seen.set(base, count + 1);
|
|
52597
|
+
ids.set(log, count > 0 ? `${base}-${count}` : base);
|
|
52598
|
+
}
|
|
52599
|
+
return ids;
|
|
52600
|
+
}
|
|
52601
|
+
const COLUMNS$3 = "auto auto auto auto minmax(5rem,1fr) minmax(5rem,1fr)";
|
|
52602
|
+
function LogsList({
|
|
52603
|
+
logs,
|
|
52604
|
+
isLoading,
|
|
52605
|
+
isFetchingNextPage,
|
|
52606
|
+
hasNextPage,
|
|
52607
|
+
setEndOfListElement,
|
|
52608
|
+
error,
|
|
52609
|
+
hasActiveFilters,
|
|
52610
|
+
featuredLogId: controlledLogId,
|
|
52611
|
+
featuredTraceId: controlledTraceId,
|
|
52612
|
+
featuredSpanId: controlledSpanId,
|
|
52613
|
+
onFeaturedChange
|
|
52614
|
+
}) {
|
|
52615
|
+
const [internalIds, setInternalIds] = useState({});
|
|
52616
|
+
const featuredLogId = controlledLogId ?? internalIds.logId ?? null;
|
|
52617
|
+
const featuredTraceId = controlledTraceId ?? internalIds.traceId ?? null;
|
|
52618
|
+
const featuredSpanId = controlledSpanId ?? internalIds.spanId ?? null;
|
|
52619
|
+
const updateFeatured = useCallback(
|
|
52620
|
+
(ids) => {
|
|
52621
|
+
const merged = {
|
|
52622
|
+
logId: ids.logId !== void 0 ? ids.logId : featuredLogId,
|
|
52623
|
+
traceId: ids.traceId !== void 0 ? ids.traceId : featuredTraceId,
|
|
52624
|
+
spanId: ids.spanId !== void 0 ? ids.spanId : featuredSpanId
|
|
52625
|
+
};
|
|
52626
|
+
if (onFeaturedChange) {
|
|
52627
|
+
onFeaturedChange(merged);
|
|
52628
|
+
} else {
|
|
52629
|
+
setInternalIds(merged);
|
|
52630
|
+
}
|
|
52631
|
+
},
|
|
52632
|
+
[onFeaturedChange, featuredLogId, featuredTraceId, featuredSpanId]
|
|
52633
|
+
);
|
|
52634
|
+
const [featuredSpanRecord, setFeaturedSpanRecord] = useState();
|
|
52635
|
+
const [logDetailsCollapsed, setLogDetailsCollapsed] = useState(false);
|
|
52636
|
+
useEffect(() => {
|
|
52637
|
+
if (!featuredSpanId || featuredSpanRecord && featuredSpanRecord.spanId !== featuredSpanId) {
|
|
52638
|
+
setFeaturedSpanRecord(void 0);
|
|
52639
|
+
}
|
|
52640
|
+
}, [featuredSpanId, featuredSpanRecord]);
|
|
52641
|
+
const logIdMap = useMemo(() => getLogIds(logs), [logs]);
|
|
52642
|
+
const idToLog = useMemo(() => {
|
|
52643
|
+
const m = /* @__PURE__ */ new Map();
|
|
52644
|
+
for (let i = 0; i < logs.length; i++) {
|
|
52645
|
+
const id = logIdMap.get(logs[i]);
|
|
52646
|
+
if (id) m.set(id, { log: logs[i], idx: i });
|
|
52647
|
+
}
|
|
52648
|
+
return m;
|
|
52649
|
+
}, [logs, logIdMap]);
|
|
52650
|
+
const entry = featuredLogId ? idToLog.get(featuredLogId) : void 0;
|
|
52651
|
+
const featuredLogIdx = entry?.idx ?? -1;
|
|
52652
|
+
const featuredLog = featuredLogIdx >= 0 ? logs[featuredLogIdx] : null;
|
|
52653
|
+
const handlePreviousLog = featuredLogIdx > 0 ? () => {
|
|
52654
|
+
const prevLog = logs[featuredLogIdx - 1];
|
|
52655
|
+
const id = logIdMap.get(prevLog);
|
|
52656
|
+
if (featuredTraceId) {
|
|
52657
|
+
updateFeatured({ logId: id, traceId: prevLog.traceId ?? null, spanId: null });
|
|
52658
|
+
setFeaturedSpanRecord(void 0);
|
|
52659
|
+
} else {
|
|
52660
|
+
updateFeatured({ logId: id });
|
|
52661
|
+
}
|
|
52662
|
+
} : void 0;
|
|
52663
|
+
const handleNextLog = featuredLogIdx >= 0 && featuredLogIdx < logs.length - 1 ? () => {
|
|
52664
|
+
const nextLog = logs[featuredLogIdx + 1];
|
|
52665
|
+
const id = logIdMap.get(nextLog);
|
|
52666
|
+
if (featuredTraceId) {
|
|
52667
|
+
updateFeatured({ logId: id, traceId: nextLog.traceId ?? null, spanId: null });
|
|
52668
|
+
setFeaturedSpanRecord(void 0);
|
|
52669
|
+
} else {
|
|
52670
|
+
updateFeatured({ logId: id });
|
|
52671
|
+
}
|
|
52672
|
+
} : void 0;
|
|
52673
|
+
const handleLogClick = useCallback(
|
|
52674
|
+
(log) => {
|
|
52675
|
+
const id = logIdMap.get(log);
|
|
52676
|
+
if (featuredLogId === id) {
|
|
52677
|
+
updateFeatured({ logId: null });
|
|
52678
|
+
return;
|
|
52679
|
+
}
|
|
52680
|
+
if (featuredTraceId) {
|
|
52681
|
+
updateFeatured({ logId: id, traceId: log.traceId ?? null, spanId: null });
|
|
52682
|
+
setFeaturedSpanRecord(void 0);
|
|
52683
|
+
} else {
|
|
52684
|
+
updateFeatured({ logId: id });
|
|
52685
|
+
}
|
|
52686
|
+
},
|
|
52687
|
+
[featuredLogId, featuredTraceId, updateFeatured, logIdMap]
|
|
52688
|
+
);
|
|
52689
|
+
const handleTraceClick = useCallback(
|
|
52690
|
+
(traceId) => {
|
|
52691
|
+
updateFeatured({ traceId, spanId: null });
|
|
52692
|
+
setFeaturedSpanRecord(void 0);
|
|
52693
|
+
},
|
|
52694
|
+
[updateFeatured]
|
|
52695
|
+
);
|
|
52696
|
+
const handleSpanClick = useCallback(
|
|
52697
|
+
(traceId, spanId) => {
|
|
52698
|
+
updateFeatured({ traceId, spanId });
|
|
52699
|
+
},
|
|
52700
|
+
[updateFeatured]
|
|
52701
|
+
);
|
|
52702
|
+
const handleTraceClose = useCallback(() => {
|
|
52703
|
+
updateFeatured({ traceId: null, spanId: null });
|
|
52704
|
+
setLogDetailsCollapsed(false);
|
|
52705
|
+
setFeaturedSpanRecord(void 0);
|
|
52706
|
+
}, [updateFeatured]);
|
|
52707
|
+
const handleSpanSelect = useCallback(
|
|
52708
|
+
(span) => {
|
|
52709
|
+
updateFeatured({ spanId: span?.spanId ?? null });
|
|
52710
|
+
setFeaturedSpanRecord(span);
|
|
52711
|
+
},
|
|
52712
|
+
[updateFeatured]
|
|
52713
|
+
);
|
|
52714
|
+
const handleSpanClose = useCallback(() => {
|
|
52715
|
+
updateFeatured({ spanId: null });
|
|
52716
|
+
setFeaturedSpanRecord(void 0);
|
|
52717
|
+
}, [updateFeatured]);
|
|
52718
|
+
const handleLogClose = useCallback(() => {
|
|
52719
|
+
updateFeatured({ logId: null });
|
|
52720
|
+
}, [updateFeatured]);
|
|
52721
|
+
if (error) {
|
|
52722
|
+
return /* @__PURE__ */ jsx(ErrorState, { title: "Failed to load logs", message: error.message });
|
|
52723
|
+
}
|
|
52724
|
+
if (logs.length === 0 && !isLoading && !hasActiveFilters) {
|
|
52725
|
+
return /* @__PURE__ */ jsx(NoLogsInfo, {});
|
|
52726
|
+
}
|
|
52727
|
+
if (isLoading) {
|
|
52728
|
+
return /* @__PURE__ */ jsx(DataListSkeleton, { columns: COLUMNS$3 });
|
|
52729
|
+
}
|
|
52730
|
+
const hasSidePanel = !!featuredLog;
|
|
52731
|
+
return /* @__PURE__ */ jsxs(
|
|
52732
|
+
"div",
|
|
52733
|
+
{
|
|
52734
|
+
className: cn("grid h-full min-h-0 gap-4 items-start ", hasSidePanel ? "grid-cols-[1fr_1fr]" : "grid-cols-[1fr]"),
|
|
52735
|
+
children: [
|
|
52736
|
+
/* @__PURE__ */ jsx("div", { className: "h-full overflow-auto", children: /* @__PURE__ */ jsxs(LogsDataList, { columns: COLUMNS$3, className: "min-w-0", children: [
|
|
52737
|
+
/* @__PURE__ */ jsxs(LogsDataList.Top, { children: [
|
|
52738
|
+
/* @__PURE__ */ jsx(LogsDataList.TopCell, { children: "Date" }),
|
|
52739
|
+
/* @__PURE__ */ jsx(LogsDataList.TopCell, { children: "Time" }),
|
|
52740
|
+
/* @__PURE__ */ jsx(LogsDataList.TopCell, { children: "Level" }),
|
|
52741
|
+
/* @__PURE__ */ jsx(LogsDataList.TopCell, { children: "Entity" }),
|
|
52742
|
+
/* @__PURE__ */ jsx(LogsDataList.TopCell, { children: "Message" }),
|
|
52743
|
+
/* @__PURE__ */ jsx(LogsDataList.TopCell, { children: "Data" })
|
|
52744
|
+
] }),
|
|
52745
|
+
logs.length === 0 ? /* @__PURE__ */ jsx(LogsDataList.NoMatch, { message: "No logs match your search" }) : logs.map((log) => {
|
|
52746
|
+
const id = logIdMap.get(log);
|
|
52747
|
+
const isFeatured = id === featuredLogId;
|
|
52748
|
+
return /* @__PURE__ */ jsxs(
|
|
52749
|
+
LogsDataList.RowButton,
|
|
52750
|
+
{
|
|
52751
|
+
onClick: () => handleLogClick(log),
|
|
52752
|
+
className: cn(isFeatured && "bg-surface4"),
|
|
52753
|
+
children: [
|
|
52754
|
+
/* @__PURE__ */ jsx(LogsDataList.DateCell, { timestamp: log.timestamp }),
|
|
52755
|
+
/* @__PURE__ */ jsx(LogsDataList.TimeCell, { timestamp: log.timestamp }),
|
|
52756
|
+
/* @__PURE__ */ jsx(LogsDataList.LevelCell, { level: log.level }),
|
|
52757
|
+
/* @__PURE__ */ jsx(LogsDataList.EntityCell, { entityType: log.entityType, entityName: log.entityName }),
|
|
52758
|
+
/* @__PURE__ */ jsx(LogsDataList.MessageCell, { message: log.message }),
|
|
52759
|
+
/* @__PURE__ */ jsx(LogsDataList.DataCell, { data: log.data })
|
|
52760
|
+
]
|
|
52761
|
+
},
|
|
52762
|
+
id
|
|
52763
|
+
);
|
|
52764
|
+
}),
|
|
52765
|
+
/* @__PURE__ */ jsx(
|
|
52766
|
+
LogsDataList.NextPageLoading,
|
|
52767
|
+
{
|
|
52768
|
+
isLoading: isFetchingNextPage,
|
|
52769
|
+
hasMore: hasNextPage,
|
|
52770
|
+
setEndOfListElement
|
|
52771
|
+
}
|
|
52772
|
+
)
|
|
52773
|
+
] }) }),
|
|
52774
|
+
featuredLog && /* @__PURE__ */ jsxs(
|
|
52775
|
+
"div",
|
|
52776
|
+
{
|
|
52777
|
+
className: cn(
|
|
52778
|
+
"grid gap-4 h-full overflow-auto ",
|
|
52779
|
+
logDetailsCollapsed && featuredTraceId && featuredSpanRecord ? "grid-rows-[auto_1fr_1fr]" : logDetailsCollapsed && featuredTraceId ? "grid-rows-[auto_1fr]" : featuredTraceId && featuredSpanRecord ? "grid-rows-[1fr_1fr_1fr]" : featuredTraceId ? "grid-rows-[1fr_1fr]" : logDetailsCollapsed ? "grid-rows-[auto]" : "grid-rows-[1fr]"
|
|
52780
|
+
),
|
|
52781
|
+
children: [
|
|
52782
|
+
/* @__PURE__ */ jsx(
|
|
52783
|
+
LogDetails,
|
|
52784
|
+
{
|
|
52785
|
+
log: featuredLog,
|
|
52786
|
+
onClose: handleLogClose,
|
|
52787
|
+
onTraceClick: handleTraceClick,
|
|
52788
|
+
onSpanClick: handleSpanClick,
|
|
52789
|
+
onPrevious: handlePreviousLog,
|
|
52790
|
+
onNext: handleNextLog,
|
|
52791
|
+
collapsed: logDetailsCollapsed,
|
|
52792
|
+
onCollapsedChange: setLogDetailsCollapsed
|
|
52793
|
+
}
|
|
52794
|
+
),
|
|
52795
|
+
featuredTraceId && /* @__PURE__ */ jsx(
|
|
52796
|
+
TraceDetails,
|
|
52797
|
+
{
|
|
52798
|
+
traceId: featuredTraceId,
|
|
52799
|
+
onClose: handleTraceClose,
|
|
52800
|
+
onSpanSelect: handleSpanSelect,
|
|
52801
|
+
initialSpanId: featuredSpanId
|
|
52802
|
+
}
|
|
52803
|
+
),
|
|
52804
|
+
featuredSpanRecord && /* @__PURE__ */ jsx(SpanDetails, { span: featuredSpanRecord, onClose: handleSpanClose })
|
|
52805
|
+
]
|
|
52806
|
+
}
|
|
52807
|
+
)
|
|
52808
|
+
]
|
|
52809
|
+
}
|
|
52810
|
+
);
|
|
52811
|
+
}
|
|
52812
|
+
|
|
52813
|
+
const SUBMENU_SEARCH_THRESHOLD = 6;
|
|
52814
|
+
const subContentClass = cn(
|
|
52815
|
+
"bg-surface5 backdrop-blur-xl z-50 min-w-[8rem] overflow-auto rounded-lg p-2 shadow-md",
|
|
52816
|
+
"data-[state=open]:animate-in data-[state=closed]:animate-out",
|
|
52817
|
+
"data-[state=open]:fade-in-0 data-[state=closed]:fade-out-0",
|
|
52818
|
+
"data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95"
|
|
52819
|
+
);
|
|
52820
|
+
function PortalSubContent({ className, children, ...props }) {
|
|
52821
|
+
return /* @__PURE__ */ jsx(Portal, { children: /* @__PURE__ */ jsx(SubContent, { className: cn(subContentClass, className), ...props, children }) });
|
|
52822
|
+
}
|
|
52823
|
+
function SubMenuSearch({
|
|
52824
|
+
value,
|
|
52825
|
+
onChange,
|
|
52826
|
+
label = "Search"
|
|
52827
|
+
}) {
|
|
52828
|
+
return /* @__PURE__ */ jsx("div", { className: cn("px-2 pb-2"), children: /* @__PURE__ */ jsxs(
|
|
52829
|
+
"div",
|
|
52830
|
+
{
|
|
52831
|
+
className: cn(
|
|
52832
|
+
"flex items-center gap-2 border border-border1 rounded-md px-2 py-1",
|
|
52833
|
+
"focus-within:border-neutral2"
|
|
52834
|
+
),
|
|
52835
|
+
children: [
|
|
52836
|
+
/* @__PURE__ */ jsx(SearchIcon, { className: cn("text-neutral3 h-3.5 w-3.5 shrink-0") }),
|
|
52837
|
+
/* @__PURE__ */ jsx(
|
|
52838
|
+
"input",
|
|
52839
|
+
{
|
|
52840
|
+
type: "text",
|
|
52841
|
+
placeholder: "Search...",
|
|
52842
|
+
"aria-label": label,
|
|
52843
|
+
value,
|
|
52844
|
+
onChange: (e) => onChange(e.target.value),
|
|
52845
|
+
onKeyDown: (e) => e.stopPropagation(),
|
|
52846
|
+
className: cn("bg-transparent text-ui-sm text-neutral4 placeholder:text-neutral3 outline-none w-full")
|
|
52847
|
+
}
|
|
52848
|
+
)
|
|
52849
|
+
]
|
|
52850
|
+
}
|
|
52851
|
+
) });
|
|
52852
|
+
}
|
|
52853
|
+
function SelectDataFilter({
|
|
52854
|
+
categories,
|
|
52855
|
+
value,
|
|
52856
|
+
onChange,
|
|
52857
|
+
disabled,
|
|
52858
|
+
label = "Filter",
|
|
52859
|
+
align = "end",
|
|
52860
|
+
searchThreshold = SUBMENU_SEARCH_THRESHOLD
|
|
52861
|
+
}) {
|
|
52862
|
+
const [filterSearch, setFilterSearch] = useState("");
|
|
52863
|
+
const [subSearch, setSubSearch] = useState("");
|
|
52864
|
+
const resetSubSearch = useCallback((open) => {
|
|
52865
|
+
if (!open) setSubSearch("");
|
|
52866
|
+
}, []);
|
|
52867
|
+
const activeFilterCount = useMemo(() => {
|
|
52868
|
+
let count = 0;
|
|
52869
|
+
for (const selections of Object.values(value)) {
|
|
52870
|
+
if (selections.length > 0) count++;
|
|
52871
|
+
}
|
|
52872
|
+
return count;
|
|
52873
|
+
}, [value]);
|
|
52874
|
+
const grouped = useMemo(() => {
|
|
52875
|
+
const q = filterSearch.toLowerCase();
|
|
52876
|
+
const groups = [];
|
|
52877
|
+
const groupMap = /* @__PURE__ */ new Map();
|
|
52878
|
+
const ungrouped = [];
|
|
52879
|
+
for (const cat of categories) {
|
|
52880
|
+
if (cat.values.length === 0) continue;
|
|
52881
|
+
if (q) {
|
|
52882
|
+
const matchesLabel = cat.label.toLowerCase().includes(q);
|
|
52883
|
+
const matchesValues = cat.values.some((v) => v.label.toLowerCase().includes(q));
|
|
52884
|
+
if (!matchesLabel && !matchesValues) continue;
|
|
52885
|
+
}
|
|
52886
|
+
if (cat.group) {
|
|
52887
|
+
let items = groupMap.get(cat.group);
|
|
52888
|
+
if (!items) {
|
|
52889
|
+
items = [];
|
|
52890
|
+
groupMap.set(cat.group, items);
|
|
52891
|
+
}
|
|
52892
|
+
items.push(cat);
|
|
52893
|
+
} else {
|
|
52894
|
+
ungrouped.push(cat);
|
|
52895
|
+
}
|
|
52896
|
+
}
|
|
52897
|
+
for (const cat of ungrouped) {
|
|
52898
|
+
groups.push({ key: cat.id, items: [cat] });
|
|
52899
|
+
}
|
|
52900
|
+
for (const [groupLabel, items] of groupMap) {
|
|
52901
|
+
groups.push({ key: `group-${groupLabel}`, label: groupLabel, items });
|
|
52902
|
+
}
|
|
52903
|
+
return groups;
|
|
52904
|
+
}, [categories, filterSearch]);
|
|
52905
|
+
const handleSelect = (categoryId, selectedValue, mode) => {
|
|
52906
|
+
const current = value[categoryId] ?? [];
|
|
52907
|
+
let next;
|
|
52908
|
+
if (mode === "single") {
|
|
52909
|
+
next = current.includes(selectedValue) ? [] : [selectedValue];
|
|
52910
|
+
} else {
|
|
52911
|
+
next = current.includes(selectedValue) ? current.filter((v) => v !== selectedValue) : [...current, selectedValue];
|
|
52912
|
+
}
|
|
52913
|
+
onChange({ ...value, [categoryId]: next });
|
|
52914
|
+
};
|
|
52915
|
+
const handleClearAll = () => {
|
|
52916
|
+
onChange({});
|
|
52917
|
+
};
|
|
52918
|
+
const renderCategory = (cat) => {
|
|
52919
|
+
const mode = cat.mode ?? "multi";
|
|
52920
|
+
const selected = value[cat.id] ?? [];
|
|
52921
|
+
const selectedCount = selected.length;
|
|
52922
|
+
return /* @__PURE__ */ jsxs(DropdownMenu.Sub, { onOpenChange: resetSubSearch, children: [
|
|
52923
|
+
/* @__PURE__ */ jsxs(DropdownMenu.SubTrigger, { children: [
|
|
52924
|
+
/* @__PURE__ */ jsx("span", { className: cn("truncate"), children: cat.label }),
|
|
52925
|
+
selectedCount > 0 && /* @__PURE__ */ jsx("span", { className: cn("ml-auto text-ui-sm text-accent1"), children: selectedCount })
|
|
52926
|
+
] }),
|
|
52927
|
+
/* @__PURE__ */ jsxs(PortalSubContent, { className: cn("max-h-[20rem]"), children: [
|
|
52928
|
+
cat.values.length >= searchThreshold && /* @__PURE__ */ jsx(SubMenuSearch, { value: subSearch, onChange: setSubSearch, label: `Search ${cat.label.toLowerCase()}` }),
|
|
52929
|
+
mode === "single" ? /* @__PURE__ */ jsx(DropdownMenu.RadioGroup, { value: selected[0] ?? "", onValueChange: (val) => handleSelect(cat.id, val, mode), children: cat.values.filter((v) => !subSearch || v.label.toLowerCase().includes(subSearch.toLowerCase())).map((v) => /* @__PURE__ */ jsx(DropdownMenu.RadioItem, { value: v.value, children: /* @__PURE__ */ jsx("span", { className: cn("truncate"), children: v.label }) }, v.value)) }) : cat.values.filter((v) => !subSearch || v.label.toLowerCase().includes(subSearch.toLowerCase())).map((v) => /* @__PURE__ */ jsx(
|
|
52930
|
+
DropdownMenu.CheckboxItem,
|
|
52931
|
+
{
|
|
52932
|
+
checked: selected.includes(v.value),
|
|
52933
|
+
onCheckedChange: () => handleSelect(cat.id, v.value, mode),
|
|
52934
|
+
onSelect: (e) => e.preventDefault(),
|
|
52935
|
+
children: /* @__PURE__ */ jsx("span", { className: cn("truncate"), children: v.label })
|
|
52936
|
+
},
|
|
52937
|
+
v.value
|
|
52938
|
+
))
|
|
52939
|
+
] })
|
|
52940
|
+
] }, cat.id);
|
|
52941
|
+
};
|
|
52942
|
+
return /* @__PURE__ */ jsxs(DropdownMenu, { modal: false, children: [
|
|
52943
|
+
/* @__PURE__ */ jsx(DropdownMenu.Trigger, { asChild: true, children: /* @__PURE__ */ jsxs(Button, { variant: "outline", disabled, size: "md", children: [
|
|
52944
|
+
/* @__PURE__ */ jsx(FilterIcon, {}),
|
|
52945
|
+
label,
|
|
52946
|
+
activeFilterCount > 0 && /* @__PURE__ */ jsx(
|
|
52947
|
+
"span",
|
|
52948
|
+
{
|
|
52949
|
+
className: cn(
|
|
52950
|
+
"ml-0.5 inline-flex items-center justify-center rounded-full bg-accent1/50 text-neutral5 text-ui-sm w-5 h-5"
|
|
52951
|
+
),
|
|
52952
|
+
children: activeFilterCount
|
|
52953
|
+
}
|
|
52954
|
+
)
|
|
52955
|
+
] }) }),
|
|
52956
|
+
/* @__PURE__ */ jsxs(DropdownMenu.Content, { align, className: cn("min-w-[12rem]"), children: [
|
|
52957
|
+
/* @__PURE__ */ jsx("div", { className: cn("px-2 pb-2"), children: /* @__PURE__ */ jsxs(
|
|
52958
|
+
"div",
|
|
52959
|
+
{
|
|
52960
|
+
className: cn(
|
|
52961
|
+
"flex items-center gap-2 border border-border1 rounded-md px-2 py-1",
|
|
52962
|
+
"focus-within:border-neutral2"
|
|
52963
|
+
),
|
|
52964
|
+
children: [
|
|
52965
|
+
/* @__PURE__ */ jsx(SearchIcon, { className: cn("text-neutral3 h-3.5 w-3.5 shrink-0") }),
|
|
52966
|
+
/* @__PURE__ */ jsx(
|
|
52967
|
+
"input",
|
|
52968
|
+
{
|
|
52969
|
+
type: "text",
|
|
52970
|
+
placeholder: "Search filters...",
|
|
52971
|
+
"aria-label": "Search filters",
|
|
52972
|
+
value: filterSearch,
|
|
52973
|
+
onChange: (e) => setFilterSearch(e.target.value),
|
|
52974
|
+
onKeyDown: (e) => e.stopPropagation(),
|
|
52975
|
+
className: cn("bg-transparent text-ui-sm text-neutral4 placeholder:text-neutral3 outline-none w-full")
|
|
52976
|
+
}
|
|
52977
|
+
)
|
|
52978
|
+
]
|
|
52979
|
+
}
|
|
52980
|
+
) }),
|
|
52981
|
+
/* @__PURE__ */ jsx(DropdownMenu.Separator, {}),
|
|
52982
|
+
grouped.map((group) => {
|
|
52983
|
+
if (group.items.length === 1 && !group.label) {
|
|
52984
|
+
return renderCategory(group.items[0]);
|
|
52985
|
+
}
|
|
52986
|
+
if (group.label && group.items.length === 1) {
|
|
52987
|
+
return renderCategory(group.items[0]);
|
|
52988
|
+
}
|
|
52989
|
+
return /* @__PURE__ */ jsxs(DropdownMenu.Sub, { children: [
|
|
52990
|
+
/* @__PURE__ */ jsx(DropdownMenu.SubTrigger, { children: group.label }),
|
|
52991
|
+
/* @__PURE__ */ jsx(PortalSubContent, { className: cn("max-h-[20rem]"), children: group.items.map((cat) => renderCategory(cat)) })
|
|
52992
|
+
] }, group.key);
|
|
52993
|
+
}),
|
|
52994
|
+
activeFilterCount > 0 && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
52995
|
+
/* @__PURE__ */ jsx(DropdownMenu.Separator, {}),
|
|
52996
|
+
/* @__PURE__ */ jsxs(DropdownMenu.Item, { onSelect: handleClearAll, children: [
|
|
52997
|
+
/* @__PURE__ */ jsx(XIcon, {}),
|
|
52998
|
+
"Clear all filters"
|
|
52999
|
+
] })
|
|
53000
|
+
] })
|
|
53001
|
+
] })
|
|
53002
|
+
] });
|
|
53003
|
+
}
|
|
53004
|
+
|
|
53005
|
+
const DATE_PRESET_LABELS = {
|
|
53006
|
+
"24h": "Last 24 hours",
|
|
53007
|
+
"3d": "Last 3 days",
|
|
53008
|
+
"7d": "Last 7 days",
|
|
53009
|
+
"14d": "Last 14 days",
|
|
53010
|
+
"30d": "Last 30 days"
|
|
53011
|
+
};
|
|
53012
|
+
function LogsToolbar({
|
|
53013
|
+
onSearchChange,
|
|
53014
|
+
datePreset,
|
|
53015
|
+
onDatePresetChange,
|
|
53016
|
+
filterGroups,
|
|
53017
|
+
filterColumns,
|
|
53018
|
+
onToggleComparator: _onToggleComparator,
|
|
53019
|
+
onRemoveFilterGroup: _onRemoveFilterGroup,
|
|
53020
|
+
onClearAllFilters: _onClearAllFilters,
|
|
53021
|
+
onFilterGroupsChange,
|
|
53022
|
+
onReset,
|
|
53023
|
+
isLoading,
|
|
53024
|
+
hasActiveFilters
|
|
53025
|
+
}) {
|
|
53026
|
+
const categories = useMemo(
|
|
53027
|
+
() => filterColumns.map((col) => ({
|
|
53028
|
+
id: col.field,
|
|
53029
|
+
label: col.field,
|
|
53030
|
+
values: col.values.map((v) => ({ value: v, label: v })),
|
|
53031
|
+
mode: "multi"
|
|
53032
|
+
})),
|
|
53033
|
+
[filterColumns]
|
|
53034
|
+
);
|
|
53035
|
+
const filterState = useMemo(() => {
|
|
53036
|
+
const state = {};
|
|
53037
|
+
for (const group of filterGroups) {
|
|
53038
|
+
state[group.field] = group.values;
|
|
53039
|
+
}
|
|
53040
|
+
return state;
|
|
53041
|
+
}, [filterGroups]);
|
|
53042
|
+
return /* @__PURE__ */ jsx("div", { className: "flex flex-col gap-3", children: /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
|
|
53043
|
+
/* @__PURE__ */ jsx(ListSearch, { onSearch: onSearchChange, size: "md", label: "Search logs", placeholder: "Search name, ID, content..." }),
|
|
53044
|
+
/* @__PURE__ */ jsxs(DropdownMenu, { children: [
|
|
53045
|
+
/* @__PURE__ */ jsx(DropdownMenu.Trigger, { asChild: true, children: /* @__PURE__ */ jsxs(Button, { variant: "inputLike", size: "md", children: [
|
|
53046
|
+
/* @__PURE__ */ jsx(CalendarIcon, {}),
|
|
53047
|
+
" ",
|
|
53048
|
+
DATE_PRESET_LABELS[datePreset],
|
|
53049
|
+
" ",
|
|
53050
|
+
/* @__PURE__ */ jsx(ChevronDownIcon, {})
|
|
53051
|
+
] }) }),
|
|
53052
|
+
/* @__PURE__ */ jsx(DropdownMenu.Content, { children: Object.keys(DATE_PRESET_LABELS).map((value) => /* @__PURE__ */ jsx(DropdownMenu.Item, { onSelect: () => onDatePresetChange(value), children: DATE_PRESET_LABELS[value] }, value)) })
|
|
53053
|
+
] }),
|
|
53054
|
+
/* @__PURE__ */ jsx(
|
|
53055
|
+
SelectDataFilter,
|
|
53056
|
+
{
|
|
53057
|
+
categories,
|
|
53058
|
+
value: filterState,
|
|
53059
|
+
onChange: onFilterGroupsChange,
|
|
53060
|
+
align: "end",
|
|
53061
|
+
disabled: isLoading
|
|
53062
|
+
}
|
|
53063
|
+
),
|
|
53064
|
+
onReset && hasActiveFilters && /* @__PURE__ */ jsxs(Button, { variant: "outline", size: "md", disabled: isLoading, onClick: onReset, className: "ml-auto", children: [
|
|
53065
|
+
/* @__PURE__ */ jsx(XIcon, {}),
|
|
53066
|
+
"Reset"
|
|
53067
|
+
] })
|
|
53068
|
+
] }) });
|
|
53069
|
+
}
|
|
53070
|
+
|
|
53071
|
+
const LEVEL_LABELS = {
|
|
53072
|
+
debug: "DEBUG",
|
|
53073
|
+
info: "INFO",
|
|
53074
|
+
warn: "WARN",
|
|
53075
|
+
error: "ERROR",
|
|
53076
|
+
fatal: "FATAL"
|
|
53077
|
+
};
|
|
53078
|
+
const ENTITY_TYPE_LABELS = {
|
|
53079
|
+
AGENT: "Agent",
|
|
53080
|
+
WORKFLOW: "Workflow",
|
|
53081
|
+
TOOL: "Tool",
|
|
53082
|
+
SYSTEM: "System"
|
|
53083
|
+
};
|
|
53084
|
+
function getLogFilterValue(log, field) {
|
|
53085
|
+
switch (field) {
|
|
53086
|
+
case "Level":
|
|
53087
|
+
return LEVEL_LABELS[log.level];
|
|
53088
|
+
case "Entity type":
|
|
53089
|
+
return ENTITY_TYPE_LABELS[log.entityType ?? ""] ?? log.entityType ?? "";
|
|
53090
|
+
case "Entity name":
|
|
53091
|
+
return log.entityName ?? "";
|
|
53092
|
+
default:
|
|
53093
|
+
return "";
|
|
53094
|
+
}
|
|
53095
|
+
}
|
|
53096
|
+
function useLogsFilters(logs) {
|
|
53097
|
+
const [searchQuery, setSearchQuery] = useState("");
|
|
53098
|
+
const [filterGroups, setFilterGroups] = useState([]);
|
|
53099
|
+
const filterColumns = useMemo(() => {
|
|
53100
|
+
const unique = (values) => Array.from(new Set(values.filter(Boolean))).sort();
|
|
53101
|
+
return [
|
|
53102
|
+
{ field: "Level", plural: "levels", values: unique(logs.map((l) => LEVEL_LABELS[l.level])) },
|
|
53103
|
+
{
|
|
53104
|
+
field: "Entity type",
|
|
53105
|
+
plural: "types",
|
|
53106
|
+
values: unique(logs.map((l) => ENTITY_TYPE_LABELS[l.entityType ?? ""] ?? l.entityType ?? ""))
|
|
53107
|
+
},
|
|
53108
|
+
{ field: "Entity name", plural: "names", values: unique(logs.map((l) => l.entityName ?? "")) }
|
|
53109
|
+
];
|
|
53110
|
+
}, [logs]);
|
|
53111
|
+
const toggleComparator = useCallback((id) => {
|
|
53112
|
+
setFilterGroups(
|
|
53113
|
+
(prev) => prev.map((g) => g.id === id ? { ...g, comparator: g.comparator === "is" ? "is not" : "is" } : g)
|
|
53114
|
+
);
|
|
53115
|
+
}, []);
|
|
53116
|
+
const removeFilterGroup = useCallback((id) => {
|
|
53117
|
+
setFilterGroups((prev) => prev.filter((g) => g.id !== id));
|
|
53118
|
+
}, []);
|
|
53119
|
+
const clearAllFilters = useCallback(() => {
|
|
53120
|
+
setFilterGroups([]);
|
|
53121
|
+
}, []);
|
|
53122
|
+
const updateFilterGroups = useCallback((nextState) => {
|
|
53123
|
+
setFilterGroups((prev) => {
|
|
53124
|
+
const result = [];
|
|
53125
|
+
const seen = /* @__PURE__ */ new Set();
|
|
53126
|
+
for (const group of prev) {
|
|
53127
|
+
const nextValues = nextState[group.field];
|
|
53128
|
+
if (nextValues && nextValues.length > 0) {
|
|
53129
|
+
result.push({ ...group, values: nextValues });
|
|
53130
|
+
seen.add(group.field);
|
|
53131
|
+
}
|
|
53132
|
+
}
|
|
53133
|
+
for (const [field, values] of Object.entries(nextState)) {
|
|
53134
|
+
if (seen.has(field) || values.length === 0) continue;
|
|
53135
|
+
result.push({ id: `${field}-${Date.now()}`, field, comparator: "is", values });
|
|
53136
|
+
}
|
|
53137
|
+
return result;
|
|
53138
|
+
});
|
|
53139
|
+
}, []);
|
|
53140
|
+
const filteredLogs = useMemo(() => {
|
|
53141
|
+
return logs.filter((log) => {
|
|
53142
|
+
if (searchQuery) {
|
|
53143
|
+
const q = searchQuery.toLowerCase();
|
|
53144
|
+
const match = log.message.toLowerCase().includes(q) || (log.entityName ?? "").toLowerCase().includes(q) || (log.traceId ?? "").toLowerCase().includes(q);
|
|
53145
|
+
if (!match) return false;
|
|
53146
|
+
}
|
|
53147
|
+
for (const group of filterGroups) {
|
|
53148
|
+
const logVal = getLogFilterValue(log, group.field);
|
|
53149
|
+
const matches = group.values.includes(logVal);
|
|
53150
|
+
if (group.comparator === "is" && !matches) return false;
|
|
53151
|
+
if (group.comparator === "is not" && matches) return false;
|
|
53152
|
+
}
|
|
53153
|
+
return true;
|
|
53154
|
+
});
|
|
53155
|
+
}, [logs, searchQuery, filterGroups]);
|
|
53156
|
+
return {
|
|
53157
|
+
searchQuery,
|
|
53158
|
+
setSearchQuery,
|
|
53159
|
+
filterGroups,
|
|
53160
|
+
filterColumns,
|
|
53161
|
+
toggleComparator,
|
|
53162
|
+
removeFilterGroup,
|
|
53163
|
+
clearAllFilters,
|
|
53164
|
+
updateFilterGroups,
|
|
53165
|
+
filteredLogs
|
|
53166
|
+
};
|
|
53167
|
+
}
|
|
53168
|
+
|
|
53169
|
+
const DATE_PRESETS = [
|
|
53170
|
+
{ label: "Last 24 hours", value: "24h" },
|
|
53171
|
+
{ label: "Last 3 days", value: "3d" },
|
|
53172
|
+
{ label: "Last 7 days", value: "7d" },
|
|
53173
|
+
{ label: "Last 14 days", value: "14d" },
|
|
53174
|
+
{ label: "Last 30 days", value: "30d" }
|
|
53175
|
+
];
|
|
53176
|
+
function isValidLogsDatePreset(value) {
|
|
53177
|
+
return DATE_PRESETS.some((p) => p.value === value);
|
|
53178
|
+
}
|
|
53179
|
+
|
|
51380
53180
|
function useEvaluationScorers() {
|
|
51381
53181
|
const client = useMastraClient();
|
|
51382
53182
|
const requestContext = useMergedRequestContext();
|
|
@@ -52883,7 +54683,7 @@ function MainSidebarNavHeader({
|
|
|
52883
54683
|
{
|
|
52884
54684
|
className: cn("text-ui-xs uppercase tracking-widest", {
|
|
52885
54685
|
"pl-3": isDefaultState,
|
|
52886
|
-
"text-
|
|
54686
|
+
"text-black dark:text-white font-semibold": isActive,
|
|
52887
54687
|
"text-neutral3/75": !isActive
|
|
52888
54688
|
}),
|
|
52889
54689
|
children: href && isDefaultState ? /* @__PURE__ */ jsx(
|
|
@@ -52892,7 +54692,7 @@ function MainSidebarNavHeader({
|
|
|
52892
54692
|
href,
|
|
52893
54693
|
className: cn("transition-colors duration-normal", {
|
|
52894
54694
|
"hover:text-neutral5": !isActive,
|
|
52895
|
-
"text-
|
|
54695
|
+
"text-black dark:text-white": isActive
|
|
52896
54696
|
}),
|
|
52897
54697
|
children: labelContent
|
|
52898
54698
|
}
|
|
@@ -52932,7 +54732,7 @@ function MainSidebarNavLink({
|
|
|
52932
54732
|
"[&>a]:text-neutral5 [&>a]:bg-surface3": isActive,
|
|
52933
54733
|
"[&_svg]:text-neutral5": isActive,
|
|
52934
54734
|
// Active indicator bar
|
|
52935
|
-
"before:absolute before:left-0 before:top-1/2 before:-translate-y-1/2 before:w-0.5 before:h-5 before:bg-
|
|
54735
|
+
"before:absolute before:left-0 before:top-1/2 before:-translate-y-1/2 before:w-0.5 before:h-5 before:bg-black dark:before:bg-white before:rounded-r-full before:transition-all before:duration-normal": isActive && !isCollapsed,
|
|
52936
54736
|
"[&>a]:justify-start": !isCollapsed,
|
|
52937
54737
|
"[&_svg]:text-neutral3": isCollapsed,
|
|
52938
54738
|
// Featured variant
|
|
@@ -55762,5 +57562,5 @@ const NavigationCommand = () => {
|
|
|
55762
57562
|
);
|
|
55763
57563
|
};
|
|
55764
57564
|
|
|
55765
|
-
export { AGENT_CMS_SECTIONS, ActionsMenu, ActivatedSkillsProvider, AddField, AddItemDialog, AddItemsToDatasetDialog, AddSkillDialog, AgentCMSBlock, AgentCMSBlocks, AgentCMSRefBlock, AgentChat, AgentCmsBottomBar, AgentCmsFormShell, AgentCmsSidebar, AgentCoinIcon, AgentCombobox, AgentEditFormProvider, AgentEditLayout, AgentEntityHeader, AgentIcon, AgentInformation, AgentInformationLayout, AgentInformationTabLayout, AgentLayout, AgentMemory, AgentMetadata, AgentMetadataCombinedProcessorList, AgentMetadataList, AgentMetadataListEmpty, AgentMetadataListItem, AgentMetadataNetworkList, AgentMetadataScorerList, AgentMetadataSection, AgentMetadataSkillList, AgentMetadataToolList, AgentMetadataWorkflowList, AgentMetadataWorkspaceToolsList, AgentMetadataWrapper, AgentNetworkCoinIcon, AgentPageTabs, AgentPlaygroundConfig, AgentPlaygroundEvaluate, AgentPlaygroundRequestContext, AgentPlaygroundReview, AgentPlaygroundTestChat, AgentPlaygroundVersionBar, AgentPlaygroundView, AgentSettings, AgentSettingsContext, AgentSettingsProvider, AgentToolPanel, AgentTopBarControls, AgentTracesPanel, AgentVersionCombobox, AgentVersionPanel, AgentsCmsLayout, AgentsList, AgentsPage, AgentsSection, AgentsTable, AiIcon, Alert, AlertDescription, AlertDialog, AlertTitle, ApiIcon, AuthRequired, AuthStatus, AutoForm, Avatar, Badge, BranchIcon, Breadcrumb$1 as Breadcrumb, Button, ButtonWithTooltip, ButtonsGroup, CHART_COLORS, CODE_AGENT_OVERRIDE_SECTIONS, CONTEXT_FIELD_IDS, CSVImportDialog, Cell, ChatThreads, CheckIcon, Checkbox, ChevronIcon, Chip, ChipsGroup, CodeDiff, CodeEditor, Collapsible, CollapsibleContent, CollapsibleTrigger, Column, Columns, CombinedButtons, Combobox, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, CommitIcon, ComposerModelSwitcher, ContentBlock, ContentBlocks, CopyButton, CreateDatasetDialog, CreateDatasetFromItemsDialog, CrossIcon, Crumb, DashboardCard, DatasetCombobox, DatasetCompareVersionToolbar, DatasetCompareVersionsList, DatasetExperiments, DatasetExperimentsComparison, DatasetHealthCard, DatasetItemContent, DatasetItemHeader, DatasetItemVersionsPanel, DatasetItemsList, DatasetPageContent, DatasetVersionsPanel, DatasetsList, DatasetsTable, DatePicker, DateRangeSelector, DateTimeCell, DateTimePicker, DateTimePickerContent, DbIcon, DebugIcon, DefaultTrigger, DeleteDatasetDialog, DeploymentIcon, Dialog, DialogBody, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DisplayConditionsDialog, DividerIcon, DocsIcon, DropdownMenu, DuplicateDatasetDialog, DynamicForm, EditDatasetDialog, EditModeContent, ElementSelect, EmptyDatasetsTable, EmptyState$1 as EmptyState, Entity, EntityAccordionItem, EntityContent, EntityDescription, EntityHeader, EntityIcon, EntityList, EntityListPageLayout, EntityListSkeleton, EntityName, Entry, EntryCell, EntryList, EntryListSkeleton, EnvIcon, ErrorState, EvaluationDashboard, EvaluationDatasetsList, EvaluationExperimentsList, EvaluationKpiCards, EvaluationScorersList, ExperimentPageContent, ExperimentPageHeader, ExperimentResultSpanPane, ExperimentResultTracePanel, ExperimentResultsPanel, ExperimentStats, ExperimentStatusCard, ExperimentTriggerDialog, Field, FieldBlock, FieldBlocksLayout, FieldDescription, FieldList, FieldName, FieldNullable, FieldOptional, FieldRemove, FieldType, FileBrowser, FileViewer, FiltersIcon, FolderIcon, GenerationProvider, GithubCoinIcon, GithubIcon, GoogleIcon, Header, HeaderAction, HeaderGroup, HeaderTitle, HomeIcon, HorizontalBars, HoverPopover, Icon, IconButton, InfoIcon, InformationPage, Input, InstructionBlocksPage, IntegrationToolsSection, ItemList, ItemListSkeleton, ItemPageToolbar, JSONImportDialog, JSONSchemaForm, JudgeIcon, Kbd, KeyValueList, LLMModels, LLMProviders, Label, LatencyCard, LatencyIcon, LinkComponentProvider, ListSearch, LoginButton, LoginPage, LogoWithoutText, LogsIcon, MCPClientCreateContent, MCPClientEditLayout, MCPClientFormSidebar, MCPClientList, MCPClientToolPreview, MCPDetail, MCPServerCombobox, MCPTable, MCPToolPanel, MainContentContent, MainContentLayout, MainHeader, MainSidebar, MainSidebarProvider, MarkdownRenderer, MastraPackagesInfo, MastraVersionFooter, McpCoinIcon, McpServerIcon, McpServersList, MemoryIcon, MemoryPage, MemorySearch, MemorySection, MetricsCard, MetricsDashboard, MetricsDataTable, MetricsKpiCard, MetricsLineChart, MetricsLineChartTooltip, MetricsProvider, ModelUsageCostCard, MultiColumn, MultiCombobox, NavigationCommand, NestedFields, Notice, Notification, OPERATORS, OPERATOR_LABELS, ObservationalMemoryProvider, OpenAIIcon, PER_PAGE$2 as PER_PAGE, PageHeader, PermissionDenied, PlaygroundConfigGuard, PlaygroundModelProvider, PlaygroundQueryClient, Popover, PopoverContent, PopoverTrigger, ProcessStepList, ProcessStepListItem, ProcessStepProgressBar, ProcessorCombobox, ProcessorIcon, ProcessorPanel, ProcessorTable, ProcessorsList, PromptBlockCreateContent, PromptBlockEditMain, PromptBlockEditSidebar, PromptBlockPickerDialog, PromptBlockVersionCombobox, PromptBlocksTable, PromptIcon, PromptsList, ProviderLogo, RadioGroup, RadioGroupItem, ReferenceViewerDialog, RepoIcon, RequestContext, RequestContextSchemaForm, RequestContextWrapper, ReviewPipelineCard, ReviewQueueProvider, Root, Row, RuleBuilder, RuleFieldSelect, RuleOperatorSelect, RuleRow, RuleValueInput, STORED_SCORER_TYPES, SchemaRequestContext, SchemaRequestContextProvider, ScoreAsItemDialog, ScoreDelta, ScoreDialog, ScorerCombobox, ScorerCreateContent, ScorerEditMain, ScorerEditSidebar, ScorerSelector, ScorerVersionCombobox, ScorersList, ScorersPage, ScorersSection, ScorersTable, ScoresCard, ScoresList, ScoresOverTimeCard, ScoresTools, ScrollArea, ScrollBar, SearchFieldBlock, SearchSkillsPanel, SearchWorkspacePanel, Searchbar, SearchbarWrapper, Section, SectionHeader, Sections, Select, SelectContent, SelectField, SelectFieldBlock, SelectGroup, SelectItem, SelectTrigger, SelectValue, SettingsIcon, ShadcnAutoFormFieldComponents, SideDialog, Skeleton, SkillDetail, SkillIcon, SkillRemoveButton, SkillUpdateButton, SkillsNotConfigured, SkillsPage, SkillsTable, SlashIcon, Slider, SpanScoreList, SpanScoring, SpanTabs, Spinner, StudioConfigContext, StudioConfigForm, StudioConfigProvider, SubSectionHeader, Switch, Tab, TabContent, TabList, Table, Tabs, TargetSelector, Tbody, TemplateFailure, TemplateForm, TemplateInfo, TemplateInstallation, TemplateSuccess, TemplatesList, TemplatesTools, TextAndIcon, TextFieldBlock, Th, Thead, ThreadDeleteButton, ThreadInputProvider, ThreadItem, ThreadLink, ThreadList, Threads, TimePicker, TokenUsageByAgentCard, ToolCoinIcon, ToolCombobox, ToolFallback, ToolIconMap, ToolInformation, ToolList, ToolPanel, ToolProviderDialog, ToolTable, ToolkitList, ToolsIcon, ToolsList, ToolsPage, ToolsSection, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, TraceAsItemDialog, TraceDialog, TraceIcon, TraceTimeline, TraceTimelineSpan, TraceTimelineTools, TracesList, TracesTools, TracesVolumeCard, TracingSettingsContext, TracingSettingsProvider, Tree, Truncate, TsIcon, Txt, TxtCell, UserAvatar, UserMenu, VARIABLE_PATTERN, VariablesIcon, VariablesPage, WorkflowCoinIcon, WorkflowCombobox, WorkflowGraph, WorkflowIcon, WorkflowInformation, WorkflowLayout, WorkflowRunContext, WorkflowRunDetail, WorkflowRunList, WorkflowRunProvider, WorkflowStepDetailContext, WorkflowStepDetailProvider, WorkflowTable, WorkflowTrigger, WorkflowsList, WorkflowsPage, WorkflowsSection, WorkingMemoryContext, WorkingMemoryProvider, WorkspaceNotConfigured, agentFormSchema, arrayToRecord, buildObservationalMemoryForApi, buttonVariants, cleanProviderId, cn, collectMCPClientIds, columns$6 as columns, comboboxStyles, computeAgentInitialValues, convertWorkflowRunStateToStreamResult, countLeafRules, createDefaultRule, createDefaultRuleGroup, createField, createInstructionBlock, createRefInstructionBlock, createVariableAutocomplete, exportItemsToCSV, exportItemsToJSON, extractPrompt, fieldConfig, fieldsToJSONSchema, findProviderById, flattenSchemaToVariables, formatCompact, formatHierarchicalSpans, getChildFieldOptions, getColumnTemplate, getFieldOptionAtPath, getFieldOptionsFromSchema, getItemListColumnTemplate, getMainContentContentClassName, getShortId, getSpanTypeUi, getStatusIcon, getToNextEntryFn, getToNextItemFn, getToPreviousEntryFn, getToPreviousItemFn, getWorkflowRunsNextPageParam, groupTracesByThread, highlight, inputVariants, is403ForbiddenError, isActive, isAuthenticated, isRule, isRuleGroup, isValidPreset, isWorkspaceV1Supported, joinModelId, jsonSchemaToFields, makeAuthCapabilitiesRequest, makeLogoutRequest, makeSSOLoginRequest, mapAgentResponseToDataSource, mapInstructionBlocksFromApi, mapInstructionBlocksToApi, mapScorersToApi, normalizeIntegrationToolsToRecord, normalizeScorersFromApi, normalizeSkillsFromApi, normalizeToolsToRecord, normalizeWorkspaceFromApi, parseError, parseFieldPath, parseJSONCell, parseObservationalMemoryFromApi, parseRow, parseSkillSource, promptBlockFormSchema, providerMapToIcon, removeEmptyValues, resolveSerializedZodOutput, scorerFormSchema, scoresListColumns, selectUniqueRuns, shouldRetryQuery, spanTypePrefixes$1 as spanTypePrefixes, splitModelId, toast, traceScoresListColumns, tracesListColumns, transformIntegrationToolsForApi, useActivateAgentVersion, useActivatePromptBlockVersion, useActivateScorerVersion, useActivatedSkills, useAgent, useAgentCmsForm, useAgentCmsNavigation, useAgentEditForm, useAgentEditFormContext, useAgentExperiments, useAgentInformationTab, useAgentRunsKpiMetrics, useAgentSettings, useAgentSkill, useAgentVersion, useAgentVersions, useAgents, useAllIntegrationTools, useAllModels, useAuthCapabilities, useAvgScoreKpiMetrics, useCSVParser, useCanCreateAgent, useCloneThread, useCodemirrorTheme$1 as useCodemirrorTheme, useCompareAgentVersions, useCompareExperiments, useCompareScorerVersions, useCreateAgentVersion, useCreatePromptBlockVersion, useCreateScorerVersion, useCreateSkill, useCreateWorkspaceDirectory, useCredentialsLogin, useCredentialsSignUp, useCurrentRun, useCurrentUser, useDataset, useDatasetExperiment, useDatasetExperimentResults, useDatasetExperiments, useDatasetItem, useDatasetItemVersion, useDatasetItemVersions, useDatasetItems, useDatasetMutations, useDatasetVersions, useDatasets, useDeleteAgentVersion, useDeletePromptBlockVersion, useDeleteScorerVersion, useDeleteThread, useDeleteWorkflowRun, useDeleteWorkspaceFile, useEnvironments, useEvaluationDatasets, useEvaluationExperiments, useEvaluationScoreMetrics, useEvaluationScorers, useExecuteAgentTool, useExecuteMCPTool, useExecuteProcessor, useExecuteTool, useExperimentalFeatures, useFilteredModels, useFilteredProviders, useGenerationTasks, useHasObservability, useInView, useIndexWorkspaceContent, useInstallSkill, useIsCmsAvailable, useIsDarkMode, useItemSelection, useJSONParser, useJSONSchemaForm, useJSONSchemaFormField, useJSONSchemaFormNestedContext, useLLMProviders, useLatencyMetrics, useLinkComponent, useLogout, useMCPServerTool, useMCPServerTools, useMCPServerToolsById, useMCPServers, useMainSidebar, useMastraPackages, useMastraPlatform, useMaybeSidebar, useMemory, useMemoryConfig, useMemorySearch, useMemoryWithOMStatus, useMergedRequestContext, useMetrics, useMetricsFilters, useModelUsageCostMetrics, useNavigationCommand, useObservationalMemory, useObservationalMemoryContext, useOptionalAgentEditFormContext, usePackageUpdates, usePermissions, usePlaygroundModel, usePlaygroundStore, usePopularSkillsSh, useProcessor, useProcessors, usePromptBlockEditForm, usePromptBlockVersion, usePromptBlockVersions, useProviderTools, useRemoveSkill, useReorderModelList, useRequestContextPresets, useResetAgentModel, useRestoreAgentVersion, useRestorePromptBlockVersion, useRestoreScorerVersion, useReviewQueue, useReviewSummary, useSSOLogin, useSchemaRequestContext, useScorer, useScorerEditForm, useScorerVersion, useScorerVersions, useScorers, useScoresByExperimentId, useScoresByScorerId, useScoresMetrics, useSearchSkillsSh, useSearchWorkspace, useSearchWorkspaceSkills, useServiceNames, useSkillPreview, useSpeechRecognition, useStoredAgent, useStoredAgentMutations, useStoredAgents, useStoredPromptBlock, useStoredPromptBlockMutations, useStoredPromptBlocks, useStoredScorer, useStoredScorerMutations, useStoredSkills, useStudioConfig, useTableKeyboardNavigation, useTags, useThread, useThreadInput, useThreads, useTokenUsageByAgentMetrics, useTool, useToolProviders, useToolkits, useTools, useTotalTokensKpiMetrics, useTraceSpanScores, useTraceVolumeMetrics, useTracingSettings, useTryConnectMcp, useUpdateAgentModel, useUpdateModelInModelList, useUpdateSkills, useWorkflow, useWorkflowRun, useWorkflowRuns, useWorkflowStepDetail, useWorkflows, useWorkingMemory, useWorkspaceFile, useWorkspaceFileStat, useWorkspaceFiles, useWorkspaceInfo, useWorkspaceSkill, useWorkspaceSkillReference, useWorkspaceSkillReferences, useWorkspaceSkills, useWorkspaces, useWriteWorkspaceFile, useWriteWorkspaceFileFromFile, validateCsvRows, validateJSONData, validateMappedData, variableHighlight };
|
|
57565
|
+
export { AGENT_CMS_SECTIONS, ActionsMenu, ActivatedSkillsProvider, AddField, AddItemDialog, AddItemsToDatasetDialog, AddSkillDialog, AgentCMSBlock, AgentCMSBlocks, AgentCMSRefBlock, AgentChat, AgentCmsBottomBar, AgentCmsFormShell, AgentCmsSidebar, AgentCoinIcon, AgentCombobox, AgentEditFormProvider, AgentEditLayout, AgentEntityHeader, AgentIcon, AgentInformation, AgentInformationLayout, AgentInformationTabLayout, AgentLayout, AgentMemory, AgentMetadata, AgentMetadataCombinedProcessorList, AgentMetadataList, AgentMetadataListEmpty, AgentMetadataListItem, AgentMetadataNetworkList, AgentMetadataScorerList, AgentMetadataSection, AgentMetadataSkillList, AgentMetadataToolList, AgentMetadataWorkflowList, AgentMetadataWorkspaceToolsList, AgentMetadataWrapper, AgentNetworkCoinIcon, AgentPageTabs, AgentPlaygroundConfig, AgentPlaygroundEvaluate, AgentPlaygroundRequestContext, AgentPlaygroundReview, AgentPlaygroundTestChat, AgentPlaygroundVersionBar, AgentPlaygroundView, AgentSettings, AgentSettingsContext, AgentSettingsProvider, AgentToolPanel, AgentTopBarControls, AgentTracesPanel, AgentVersionCombobox, AgentVersionPanel, AgentsCmsLayout, AgentsList, AgentsPage, AgentsSection, AgentsTable, AiIcon, Alert, AlertDescription, AlertDialog, AlertTitle, ApiIcon, AuthRequired, AuthStatus, AutoForm, Avatar, Badge, BranchIcon, Breadcrumb$1 as Breadcrumb, Button, ButtonWithTooltip, ButtonsGroup, CHART_COLORS, CODE_AGENT_OVERRIDE_SECTIONS, CONTEXT_FIELD_IDS, CSVImportDialog, Cell, ChatThreads, CheckIcon, Checkbox, ChevronIcon, Chip, ChipsGroup, CodeDiff, CodeEditor, Collapsible, CollapsibleContent, CollapsibleTrigger, Column, Columns, CombinedButtons, Combobox, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, CommitIcon, ComposerModelSwitcher, ContentBlock, ContentBlocks, CopyButton, CreateDatasetDialog, CreateDatasetFromItemsDialog, CrossIcon, Crumb, DashboardCard, DataList, DataListSkeleton, DatasetCombobox, DatasetCompareVersionToolbar, DatasetCompareVersionsList, DatasetExperiments, DatasetExperimentsComparison, DatasetHealthCard, DatasetItemContent, DatasetItemHeader, DatasetItemVersionsPanel, DatasetItemsList, DatasetPageContent, DatasetVersionsPanel, DatasetsList, DatasetsTable, DatePicker, DateRangeSelector, DateTimeCell, DateTimePicker, DateTimePickerContent, DbIcon, DebugIcon, DefaultTrigger, DeleteDatasetDialog, DeploymentIcon, Dialog, DialogBody, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DisplayConditionsDialog, DividerIcon, DocsIcon, DropdownMenu, DuplicateDatasetDialog, DynamicForm, EditDatasetDialog, EditModeContent, ElementSelect, EmptyDatasetsTable, EmptyState$1 as EmptyState, Entity, EntityAccordionItem, EntityContent, EntityDescription, EntityHeader, EntityIcon, EntityList, EntityListPageLayout, EntityListSkeleton, EntityName, Entry, EntryCell, EntryList, EntryListSkeleton, EnvIcon, ErrorState, EvaluationDashboard, EvaluationDatasetsList, EvaluationExperimentsList, EvaluationKpiCards, EvaluationScorersList, ExperimentPageContent, ExperimentPageHeader, ExperimentResultSpanPane, ExperimentResultTracePanel, ExperimentResultsPanel, ExperimentStats, ExperimentStatusCard, ExperimentTriggerDialog, Field, FieldBlock, FieldBlocksLayout, FieldDescription, FieldList, FieldName, FieldNullable, FieldOptional, FieldRemove, FieldType, FileBrowser, FileViewer, FiltersIcon, FolderIcon, GenerationProvider, GithubCoinIcon, GithubIcon, GoogleIcon, Header, HeaderAction, HeaderGroup, HeaderTitle, HomeIcon, HorizontalBars, HoverPopover, Icon, IconButton, InfoIcon, InformationPage, Input, InstructionBlocksPage, IntegrationToolsSection, ItemList, ItemListSkeleton, ItemPageToolbar, JSONImportDialog, JSONSchemaForm, JudgeIcon, Kbd, KeyValueList, LLMModels, LLMProviders, Label, LatencyCard, LatencyIcon, LinkComponentProvider, ListSearch, LogDetails, LoginButton, LoginPage, LogoWithoutText, LogsDataList, DataListSkeleton as LogsDataListSkeleton, LogsIcon, LogsList, LogsToolbar, MCPClientCreateContent, MCPClientEditLayout, MCPClientFormSidebar, MCPClientList, MCPClientToolPreview, MCPDetail, MCPServerCombobox, MCPTable, MCPToolPanel, MainContentContent, MainContentLayout, MainHeader, MainSidebar, MainSidebarProvider, MarkdownRenderer, MastraPackagesInfo, MastraVersionFooter, McpCoinIcon, McpServerIcon, McpServersList, MemoryIcon, MemoryPage, MemorySearch, MemorySection, MetricsCard, MetricsDashboard, MetricsDataTable, MetricsKpiCard, MetricsLineChart, MetricsLineChartTooltip, MetricsProvider, ModelUsageCostCard, MultiColumn, MultiCombobox, NavigationCommand, NestedFields, Notice, Notification, OPERATORS, OPERATOR_LABELS, ObservationalMemoryProvider, OpenAIIcon, PER_PAGE$2 as PER_PAGE, PageHeader, PermissionDenied, PlaygroundConfigGuard, PlaygroundModelProvider, PlaygroundQueryClient, Popover, PopoverContent, PopoverTrigger, ProcessStepList, ProcessStepListItem, ProcessStepProgressBar, ProcessorCombobox, ProcessorIcon, ProcessorPanel, ProcessorTable, ProcessorsList, PromptBlockCreateContent, PromptBlockEditMain, PromptBlockEditSidebar, PromptBlockPickerDialog, PromptBlockVersionCombobox, PromptBlocksTable, PromptIcon, PromptsList, ProviderLogo, RadioGroup, RadioGroupItem, ReferenceViewerDialog, RepoIcon, RequestContext, RequestContextSchemaForm, RequestContextWrapper, ReviewPipelineCard, ReviewQueueProvider, Root$1 as Root, Row, RuleBuilder, RuleFieldSelect, RuleOperatorSelect, RuleRow, RuleValueInput, STORED_SCORER_TYPES, SchemaRequestContext, SchemaRequestContextProvider, ScoreAsItemDialog, ScoreDelta, ScoreDialog, ScorerCombobox, ScorerCreateContent, ScorerEditMain, ScorerEditSidebar, ScorerSelector, ScorerVersionCombobox, ScorersList, ScorersPage, ScorersSection, ScorersTable, ScoresCard, ScoresList, ScoresOverTimeCard, ScoresTools, ScrollArea, ScrollBar, SearchFieldBlock, SearchSkillsPanel, SearchWorkspacePanel, Searchbar, SearchbarWrapper, Section, SectionHeader, Sections, Select, SelectContent, SelectDataFilter, SelectField, SelectFieldBlock, SelectGroup, SelectItem, SelectTrigger, SelectValue, SettingsIcon, ShadcnAutoFormFieldComponents, SideDialog, Skeleton, SkillDetail, SkillIcon, SkillRemoveButton, SkillUpdateButton, SkillsNotConfigured, SkillsPage, SkillsTable, SlashIcon, Slider, SpanScoreList, SpanScoring, SpanTabs, Spinner, StudioConfigContext, StudioConfigForm, StudioConfigProvider, SubSectionHeader, Switch, Tab, TabContent, TabList, Table, Tabs, TargetSelector, Tbody, TemplateFailure, TemplateForm, TemplateInfo, TemplateInstallation, TemplateSuccess, TemplatesList, TemplatesTools, TextAndIcon, TextFieldBlock, Th, Thead, ThreadDeleteButton, ThreadInputProvider, ThreadItem, ThreadLink, ThreadList, Threads, TimePicker, TokenUsageByAgentCard, ToolCoinIcon, ToolCombobox, ToolFallback, ToolIconMap, ToolInformation, ToolList, ToolPanel, ToolProviderDialog, ToolTable, ToolkitList, ToolsIcon, ToolsList, ToolsPage, ToolsSection, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, TraceAsItemDialog, TraceDetails, TraceDialog, TraceIcon, TraceTimeline$1 as TraceTimeline, TraceTimelineSpan$1 as TraceTimelineSpan, TraceTimelineTools, TracesList, TracesTools, TracesVolumeCard, TracingSettingsContext, TracingSettingsProvider, Tree, Truncate, TsIcon, Txt, TxtCell, UserAvatar, UserMenu, VARIABLE_PATTERN, VariablesIcon, VariablesPage, WorkflowCoinIcon, WorkflowCombobox, WorkflowGraph, WorkflowIcon, WorkflowInformation, WorkflowLayout, WorkflowRunContext, WorkflowRunDetail, WorkflowRunList, WorkflowRunProvider, WorkflowStepDetailContext, WorkflowStepDetailProvider, WorkflowTable, WorkflowTrigger, WorkflowsList, WorkflowsPage, WorkflowsSection, WorkingMemoryContext, WorkingMemoryProvider, WorkspaceNotConfigured, agentFormSchema, arrayToRecord, buildObservationalMemoryForApi, buttonVariants, cleanProviderId, cn, collectMCPClientIds, columns$6 as columns, comboboxStyles, computeAgentInitialValues, convertWorkflowRunStateToStreamResult, countLeafRules, createDefaultRule, createDefaultRuleGroup, createField, createInstructionBlock, createRefInstructionBlock, createVariableAutocomplete, exportItemsToCSV, exportItemsToJSON, extractPrompt, fieldConfig, fieldsToJSONSchema, findProviderById, flattenSchemaToVariables, formatCompact, formatHierarchicalSpans$1 as formatHierarchicalSpans, getChildFieldOptions, getColumnTemplate, getFieldOptionAtPath, getFieldOptionsFromSchema, getItemListColumnTemplate, getMainContentContentClassName, getShortId, getSpanTypeUi$1 as getSpanTypeUi, getStatusIcon, getToNextEntryFn, getToNextItemFn, getToPreviousEntryFn, getToPreviousItemFn, getWorkflowRunsNextPageParam, groupTracesByThread, highlight, inputVariants, is403ForbiddenError, isActive, isAuthenticated, isRule, isRuleGroup, isValidLogsDatePreset, isValidPreset, isWorkspaceV1Supported, joinModelId, jsonSchemaToFields, makeAuthCapabilitiesRequest, makeLogoutRequest, makeSSOLoginRequest, mapAgentResponseToDataSource, mapInstructionBlocksFromApi, mapInstructionBlocksToApi, mapScorersToApi, normalizeIntegrationToolsToRecord, normalizeScorersFromApi, normalizeSkillsFromApi, normalizeToolsToRecord, normalizeWorkspaceFromApi, parseError, parseFieldPath, parseJSONCell, parseObservationalMemoryFromApi, parseRow, parseSkillSource, promptBlockFormSchema, providerMapToIcon, removeEmptyValues, resolveSerializedZodOutput, scorerFormSchema, scoresListColumns, selectUniqueRuns, shouldRetryQuery, spanTypePrefixes$1 as spanTypePrefixes, splitModelId, toast, traceScoresListColumns, tracesListColumns, transformIntegrationToolsForApi, useActivateAgentVersion, useActivatePromptBlockVersion, useActivateScorerVersion, useActivatedSkills, useAgent, useAgentCmsForm, useAgentCmsNavigation, useAgentEditForm, useAgentEditFormContext, useAgentExperiments, useAgentInformationTab, useAgentRunsKpiMetrics, useAgentSettings, useAgentSkill, useAgentVersion, useAgentVersions, useAgents, useAllIntegrationTools, useAllModels, useAuthCapabilities, useAvgScoreKpiMetrics, useCSVParser, useCanCreateAgent, useCloneThread, useCodemirrorTheme$2 as useCodemirrorTheme, useCompareAgentVersions, useCompareExperiments, useCompareScorerVersions, useCreateAgentVersion, useCreatePromptBlockVersion, useCreateScorerVersion, useCreateSkill, useCreateWorkspaceDirectory, useCredentialsLogin, useCredentialsSignUp, useCurrentRun, useCurrentUser, useDataset, useDatasetExperiment, useDatasetExperimentResults, useDatasetExperiments, useDatasetItem, useDatasetItemVersion, useDatasetItemVersions, useDatasetItems, useDatasetMutations, useDatasetVersions, useDatasets, useDeleteAgentVersion, useDeletePromptBlockVersion, useDeleteScorerVersion, useDeleteThread, useDeleteWorkflowRun, useDeleteWorkspaceFile, useEnvironments, useEvaluationDatasets, useEvaluationExperiments, useEvaluationScoreMetrics, useEvaluationScorers, useExecuteAgentTool, useExecuteMCPTool, useExecuteProcessor, useExecuteTool, useExperimentalFeatures, useFilteredModels, useFilteredProviders, useGenerationTasks, useHasObservability, useInView, useIndexWorkspaceContent, useInstallSkill, useIsCmsAvailable, useIsDarkMode, useItemSelection, useJSONParser, useJSONSchemaForm, useJSONSchemaFormField, useJSONSchemaFormNestedContext, useLLMProviders, useLatencyMetrics, useLinkComponent, useLogout, useLogsFilters, useMCPServerTool, useMCPServerTools, useMCPServerToolsById, useMCPServers, useMainSidebar, useMastraPackages, useMastraPlatform, useMaybeSidebar, useMemory, useMemoryConfig, useMemorySearch, useMemoryWithOMStatus, useMergedRequestContext, useMetrics, useMetricsFilters, useModelUsageCostMetrics, useNavigationCommand, useObservationalMemory, useObservationalMemoryContext, useOptionalAgentEditFormContext, usePackageUpdates, usePermissions, usePlaygroundModel, usePlaygroundStore, usePopularSkillsSh, useProcessor, useProcessors, usePromptBlockEditForm, usePromptBlockVersion, usePromptBlockVersions, useProviderTools, useRemoveSkill, useReorderModelList, useRequestContextPresets, useResetAgentModel, useRestoreAgentVersion, useRestorePromptBlockVersion, useRestoreScorerVersion, useReviewQueue, useReviewSummary, useSSOLogin, useSchemaRequestContext, useScorer, useScorerEditForm, useScorerVersion, useScorerVersions, useScorers, useScoresByExperimentId, useScoresByScorerId, useScoresMetrics, useSearchSkillsSh, useSearchWorkspace, useSearchWorkspaceSkills, useServiceNames, useSkillPreview, useSpeechRecognition, useStoredAgent, useStoredAgentMutations, useStoredAgents, useStoredPromptBlock, useStoredPromptBlockMutations, useStoredPromptBlocks, useStoredScorer, useStoredScorerMutations, useStoredSkills, useStudioConfig, useTableKeyboardNavigation, useTags, useThread, useThreadInput, useThreads, useTokenUsageByAgentMetrics, useTool, useToolProviders, useToolkits, useTools, useTotalTokensKpiMetrics, useTraceSpanScores, useTraceVolumeMetrics, useTracingSettings, useTryConnectMcp, useUpdateAgentModel, useUpdateModelInModelList, useUpdateSkills, useWorkflow, useWorkflowRun, useWorkflowRuns, useWorkflowStepDetail, useWorkflows, useWorkingMemory, useWorkspaceFile, useWorkspaceFileStat, useWorkspaceFiles, useWorkspaceInfo, useWorkspaceSkill, useWorkspaceSkillReference, useWorkspaceSkillReferences, useWorkspaceSkills, useWorkspaces, useWriteWorkspaceFile, useWriteWorkspaceFileFromFile, validateCsvRows, validateJSONData, validateMappedData, variableHighlight };
|
|
55766
57566
|
//# sourceMappingURL=index.es.js.map
|