@agentmark-ai/ui-components 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +673 -0
- package/dist/index.d.ts +673 -0
- package/dist/index.js +22507 -0
- package/dist/index.mjs +22504 -0
- package/package.json +90 -0
package/dist/index.d.mts
ADDED
|
@@ -0,0 +1,673 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import { GridFilterModel, GridSortModel, DataGridProps } from '@mui/x-data-grid';
|
|
3
|
+
import * as React$1 from 'react';
|
|
4
|
+
import React__default, { ReactNode, ComponentProps } from 'react';
|
|
5
|
+
import { SxProps, Theme } from '@mui/material/styles';
|
|
6
|
+
import { Node, Edge } from '@xyflow/react';
|
|
7
|
+
import { UseTreeItemParameters } from '@mui/x-tree-view/useTreeItem';
|
|
8
|
+
import { IconifyIcon } from '@iconify/react';
|
|
9
|
+
import { BoxProps } from '@mui/material/Box';
|
|
10
|
+
import { StackProps } from '@mui/material/Stack';
|
|
11
|
+
import { TableRowProps } from '@mui/material/TableRow';
|
|
12
|
+
import { TablePaginationProps } from '@mui/material/TablePagination';
|
|
13
|
+
import { SxProps as SxProps$1, Theme as Theme$1 } from '@mui/system';
|
|
14
|
+
import { UseFormReturn } from 'react-hook-form';
|
|
15
|
+
import { TextFieldProps } from '@mui/material/TextField';
|
|
16
|
+
import { FormControlProps } from '@mui/material/FormControl';
|
|
17
|
+
import { SliderProps } from '@mui/material';
|
|
18
|
+
import { FormControlLabelProps } from '@mui/material/FormControlLabel';
|
|
19
|
+
|
|
20
|
+
type Request = {
|
|
21
|
+
id: string;
|
|
22
|
+
tenant_id: string;
|
|
23
|
+
app_id: string;
|
|
24
|
+
cost: number;
|
|
25
|
+
prompt_tokens: number;
|
|
26
|
+
completion_tokens: number;
|
|
27
|
+
latency_ms: number;
|
|
28
|
+
model_used: string;
|
|
29
|
+
status: string;
|
|
30
|
+
input: string;
|
|
31
|
+
output: string | null;
|
|
32
|
+
ts: Date;
|
|
33
|
+
user_id: string;
|
|
34
|
+
prompt_name: string;
|
|
35
|
+
trace_id: string;
|
|
36
|
+
status_message: string;
|
|
37
|
+
props: string;
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
type RequestTableProps = {
|
|
41
|
+
loading: boolean;
|
|
42
|
+
onFilterChange?: (model: GridFilterModel) => void;
|
|
43
|
+
onSortChange?: (model: GridSortModel) => void;
|
|
44
|
+
requests: Request[];
|
|
45
|
+
onPaginationChange?: (page: number, pageSize: number) => void;
|
|
46
|
+
rowsPerPage?: number;
|
|
47
|
+
page?: number;
|
|
48
|
+
totalRows?: number;
|
|
49
|
+
onRowClick?: (row: Request) => void;
|
|
50
|
+
filterModel?: GridFilterModel;
|
|
51
|
+
filterMode?: "server" | "client";
|
|
52
|
+
paginationMode?: "server" | "client";
|
|
53
|
+
sortingMode?: "server" | "client";
|
|
54
|
+
t: any;
|
|
55
|
+
emptyContentImgUrl?: string;
|
|
56
|
+
};
|
|
57
|
+
|
|
58
|
+
declare const Requests: (props: RequestTableProps) => react_jsx_runtime.JSX.Element;
|
|
59
|
+
|
|
60
|
+
type TableProps = {
|
|
61
|
+
dense: boolean;
|
|
62
|
+
page: number;
|
|
63
|
+
rowsPerPage: number;
|
|
64
|
+
order: "asc" | "desc";
|
|
65
|
+
orderBy: string;
|
|
66
|
+
selected: string[];
|
|
67
|
+
onSelectRow: (id: string) => void;
|
|
68
|
+
onSelectAllRows: (checked: boolean, newSelecteds: string[]) => void;
|
|
69
|
+
onResetPage: VoidFunction;
|
|
70
|
+
onSort: (id: string) => void;
|
|
71
|
+
onChangePage: (event: unknown, newPage: number) => void;
|
|
72
|
+
onChangeRowsPerPage: (event: React.ChangeEvent<HTMLInputElement>) => void;
|
|
73
|
+
onChangeDense: (event: React.ChangeEvent<HTMLInputElement>) => void;
|
|
74
|
+
onUpdatePageDeleteRow: (totalRowsInPage: number) => void;
|
|
75
|
+
onUpdatePageDeleteRows: ({ totalRows, totalRowsInPage, totalRowsFiltered, }: {
|
|
76
|
+
totalRows: number;
|
|
77
|
+
totalRowsInPage: number;
|
|
78
|
+
totalRowsFiltered: number;
|
|
79
|
+
}) => void;
|
|
80
|
+
setPage: React.Dispatch<React.SetStateAction<number>>;
|
|
81
|
+
setDense: React.Dispatch<React.SetStateAction<boolean>>;
|
|
82
|
+
setOrder: React.Dispatch<React.SetStateAction<"desc" | "asc">>;
|
|
83
|
+
setOrderBy: React.Dispatch<React.SetStateAction<string>>;
|
|
84
|
+
setSelected: React.Dispatch<React.SetStateAction<string[]>>;
|
|
85
|
+
setRowsPerPage: React.Dispatch<React.SetStateAction<number>>;
|
|
86
|
+
};
|
|
87
|
+
|
|
88
|
+
type ReturnType = TableProps;
|
|
89
|
+
type UseTableProps = {
|
|
90
|
+
defaultDense?: boolean;
|
|
91
|
+
defaultOrder?: "asc" | "desc";
|
|
92
|
+
defaultOrderBy?: string;
|
|
93
|
+
defaultSelected?: string[];
|
|
94
|
+
defaultRowsPerPage?: number;
|
|
95
|
+
defaultCurrentPage?: number;
|
|
96
|
+
};
|
|
97
|
+
declare function useTable(props?: UseTableProps): ReturnType;
|
|
98
|
+
|
|
99
|
+
declare function TableSkeleton({ ...other }: TableRowProps): react_jsx_runtime.JSX.Element;
|
|
100
|
+
|
|
101
|
+
type Props$a = {
|
|
102
|
+
order?: "asc" | "desc";
|
|
103
|
+
orderBy?: string;
|
|
104
|
+
headLabel: any[];
|
|
105
|
+
rowCount?: number;
|
|
106
|
+
numSelected?: number;
|
|
107
|
+
onSort?: (id: string) => void;
|
|
108
|
+
onSelectAllRows?: (checked: boolean) => void;
|
|
109
|
+
sx?: SxProps<Theme>;
|
|
110
|
+
};
|
|
111
|
+
declare function TableHeadCustom({ order, orderBy, rowCount, headLabel, numSelected, onSort, onSelectAllRows, sx, }: Props$a): react_jsx_runtime.JSX.Element;
|
|
112
|
+
|
|
113
|
+
interface Props$9 extends StackProps {
|
|
114
|
+
dense?: boolean;
|
|
115
|
+
action?: React.ReactNode;
|
|
116
|
+
rowCount: number;
|
|
117
|
+
numSelected: number;
|
|
118
|
+
onSelectAllRows: (checked: boolean) => void;
|
|
119
|
+
}
|
|
120
|
+
declare function TableSelectedAction({ dense, action, rowCount, numSelected, onSelectAllRows, sx, ...other }: Props$9): react_jsx_runtime.JSX.Element | null;
|
|
121
|
+
|
|
122
|
+
type Props$8 = {
|
|
123
|
+
dense?: boolean;
|
|
124
|
+
onChangeDense?: (event: React.ChangeEvent<HTMLInputElement>) => void;
|
|
125
|
+
sx?: SxProps<Theme>;
|
|
126
|
+
};
|
|
127
|
+
declare function TablePaginationCustom({ dense, onChangeDense, rowsPerPageOptions, sx, ...other }: Props$8 & TablePaginationProps): react_jsx_runtime.JSX.Element;
|
|
128
|
+
|
|
129
|
+
type Props$7 = {
|
|
130
|
+
height?: number;
|
|
131
|
+
emptyRows: number;
|
|
132
|
+
};
|
|
133
|
+
declare function TableEmptyRows({ emptyRows, height }: Props$7): react_jsx_runtime.JSX.Element | null;
|
|
134
|
+
|
|
135
|
+
interface SessionData {
|
|
136
|
+
id: string;
|
|
137
|
+
name: string | null;
|
|
138
|
+
start: number;
|
|
139
|
+
end: number | null;
|
|
140
|
+
}
|
|
141
|
+
interface SessionsListProps {
|
|
142
|
+
sessions: SessionData[];
|
|
143
|
+
isLoading: boolean;
|
|
144
|
+
sessionCount: number;
|
|
145
|
+
table: TableProps;
|
|
146
|
+
onSessionClick: (session: SessionData) => void;
|
|
147
|
+
t: (key: string) => string;
|
|
148
|
+
emptyContentImgUrl?: string;
|
|
149
|
+
}
|
|
150
|
+
declare const SessionsList: ({ sessions, isLoading, sessionCount, table, onSessionClick, t, emptyContentImgUrl, }: SessionsListProps) => react_jsx_runtime.JSX.Element;
|
|
151
|
+
|
|
152
|
+
interface LLMText {
|
|
153
|
+
type: "text";
|
|
154
|
+
text: string;
|
|
155
|
+
}
|
|
156
|
+
interface LLMPrompt {
|
|
157
|
+
role: "system" | "user" | "assistant" | "tool";
|
|
158
|
+
content: LLMText[] | string;
|
|
159
|
+
}
|
|
160
|
+
interface ScoreData {
|
|
161
|
+
score: number;
|
|
162
|
+
label: string;
|
|
163
|
+
reason: string;
|
|
164
|
+
name: string;
|
|
165
|
+
id: string;
|
|
166
|
+
source?: "eval" | "annotation";
|
|
167
|
+
created_at?: string;
|
|
168
|
+
}
|
|
169
|
+
interface SpanData {
|
|
170
|
+
id: string;
|
|
171
|
+
name: string;
|
|
172
|
+
duration: number;
|
|
173
|
+
parentId?: string;
|
|
174
|
+
timestamp: number;
|
|
175
|
+
traceId?: string;
|
|
176
|
+
data: {
|
|
177
|
+
type?: string;
|
|
178
|
+
model?: string;
|
|
179
|
+
inputTokens?: number;
|
|
180
|
+
outputTokens?: number;
|
|
181
|
+
totalTokens?: number;
|
|
182
|
+
reasoningTokens?: number;
|
|
183
|
+
cost?: number;
|
|
184
|
+
input?: string;
|
|
185
|
+
output?: string;
|
|
186
|
+
outputObject?: string;
|
|
187
|
+
toolCalls?: string;
|
|
188
|
+
finishReason?: string;
|
|
189
|
+
settings?: string;
|
|
190
|
+
sessionId?: string;
|
|
191
|
+
sessionName?: string;
|
|
192
|
+
userId?: string;
|
|
193
|
+
traceName?: string;
|
|
194
|
+
promptName?: string;
|
|
195
|
+
props?: string;
|
|
196
|
+
attributes?: string;
|
|
197
|
+
statusMessage?: string;
|
|
198
|
+
status?: string;
|
|
199
|
+
spanKind?: string;
|
|
200
|
+
serviceName?: string;
|
|
201
|
+
tenantId?: string;
|
|
202
|
+
appId?: string;
|
|
203
|
+
duration?: number;
|
|
204
|
+
[key: string]: any;
|
|
205
|
+
};
|
|
206
|
+
}
|
|
207
|
+
interface TraceData {
|
|
208
|
+
id: string;
|
|
209
|
+
name: string;
|
|
210
|
+
spans: SpanData[];
|
|
211
|
+
data: {
|
|
212
|
+
[key: string]: any;
|
|
213
|
+
};
|
|
214
|
+
}
|
|
215
|
+
interface Session {
|
|
216
|
+
id: string;
|
|
217
|
+
name: string;
|
|
218
|
+
created_at: string;
|
|
219
|
+
updated_at: string;
|
|
220
|
+
}
|
|
221
|
+
interface Trace {
|
|
222
|
+
id: string;
|
|
223
|
+
name: string;
|
|
224
|
+
status: string;
|
|
225
|
+
latency: string;
|
|
226
|
+
cost: string;
|
|
227
|
+
tokens: string;
|
|
228
|
+
start: string;
|
|
229
|
+
end: string;
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
interface TraceListItemProps {
|
|
233
|
+
trace: Trace;
|
|
234
|
+
onClick: (trace: Trace) => void;
|
|
235
|
+
}
|
|
236
|
+
declare const TraceListItem: ({ trace, onClick }: TraceListItemProps) => react_jsx_runtime.JSX.Element;
|
|
237
|
+
|
|
238
|
+
interface TraceListContextValue {
|
|
239
|
+
traces: Trace[];
|
|
240
|
+
isLoading: boolean;
|
|
241
|
+
error: string | null;
|
|
242
|
+
onRowClick?: (trace: Trace) => void;
|
|
243
|
+
}
|
|
244
|
+
declare const TraceListProvider: ({ children, traces, isLoading, error, }: {
|
|
245
|
+
children: ReactNode;
|
|
246
|
+
} & TraceListContextValue) => react_jsx_runtime.JSX.Element;
|
|
247
|
+
declare const useTraceListContext: () => TraceListContextValue;
|
|
248
|
+
|
|
249
|
+
interface TracesListProps {
|
|
250
|
+
traces: Trace[];
|
|
251
|
+
isLoading: boolean;
|
|
252
|
+
traceCount: number;
|
|
253
|
+
table: TableProps;
|
|
254
|
+
onTraceClick: (trace: Trace) => void;
|
|
255
|
+
t: (key: string) => string;
|
|
256
|
+
emptyContentImgUrl?: string;
|
|
257
|
+
emptyContentText?: string;
|
|
258
|
+
}
|
|
259
|
+
declare const TracesList: ({ traces, isLoading, traceCount, table, onTraceClick, t, emptyContentImgUrl, emptyContentText, }: TracesListProps) => react_jsx_runtime.JSX.Element;
|
|
260
|
+
|
|
261
|
+
interface TraceDrawerContextValue {
|
|
262
|
+
traces: TraceData[];
|
|
263
|
+
selectedSpan: SpanData | null;
|
|
264
|
+
onSelectSpan: (spanId: string) => void;
|
|
265
|
+
spanTree: any[];
|
|
266
|
+
findCostAndTokens: (item: any) => {
|
|
267
|
+
cost: number;
|
|
268
|
+
tokens: number;
|
|
269
|
+
};
|
|
270
|
+
fetchSpanEvaluations?: (spanId: string) => Promise<ScoreData[]>;
|
|
271
|
+
navigateToFile?: (filePath: string) => void;
|
|
272
|
+
traceId?: string;
|
|
273
|
+
setSelectedSpanId: (spanId: string) => void;
|
|
274
|
+
treeHeight: number;
|
|
275
|
+
onMouseDown: (e: React.MouseEvent) => void;
|
|
276
|
+
isDragging: boolean;
|
|
277
|
+
t: (key: string) => string;
|
|
278
|
+
onSpanChange?: (span: SpanData | null) => void;
|
|
279
|
+
}
|
|
280
|
+
interface TraceDrawerProviderProps {
|
|
281
|
+
traces: TraceData[];
|
|
282
|
+
traceId?: string;
|
|
283
|
+
sessionId?: string;
|
|
284
|
+
fetchSpanEvaluations?: (spanId: string) => Promise<ScoreData[]>;
|
|
285
|
+
navigateToFile?: (filePath: string) => void;
|
|
286
|
+
t: (key: string) => string;
|
|
287
|
+
onSpanChange?: (span: SpanData | null) => void;
|
|
288
|
+
}
|
|
289
|
+
declare const TraceDrawerProvider: ({ children, traces, traceId, fetchSpanEvaluations, t, onSpanChange, }: TraceDrawerProviderProps & {
|
|
290
|
+
children: ReactNode;
|
|
291
|
+
}) => react_jsx_runtime.JSX.Element;
|
|
292
|
+
declare const useTraceDrawerContext: () => TraceDrawerContextValue;
|
|
293
|
+
|
|
294
|
+
interface NodeTypeStyle {
|
|
295
|
+
color: string;
|
|
296
|
+
icon: string;
|
|
297
|
+
}
|
|
298
|
+
declare function getNodeTypeStyle(nodeType: string | undefined, theme: Theme): NodeTypeStyle;
|
|
299
|
+
declare function getBranchColor(branchFamily: string, theme: Theme): string;
|
|
300
|
+
|
|
301
|
+
declare function calculateBranchFamilies(nodes: Node[], edges: Edge[]): Map<string, string>;
|
|
302
|
+
|
|
303
|
+
declare const NODE_DIMENSIONS: {
|
|
304
|
+
readonly width: 160;
|
|
305
|
+
readonly height: 60;
|
|
306
|
+
};
|
|
307
|
+
interface LayoutResult {
|
|
308
|
+
nodes: Node[];
|
|
309
|
+
edges: Edge[];
|
|
310
|
+
}
|
|
311
|
+
declare function applyDagreLayout(nodes: Node[], edges: Edge[]): LayoutResult;
|
|
312
|
+
|
|
313
|
+
/**
|
|
314
|
+
* Span Grouping Utilities for Agentic Workflow Graph
|
|
315
|
+
*
|
|
316
|
+
* Groups spans by {parentSpanId, spanName} to create workflow nodes,
|
|
317
|
+
* and provides type inference for automatic node styling.
|
|
318
|
+
*/
|
|
319
|
+
/**
|
|
320
|
+
* Minimal span data required for grouping
|
|
321
|
+
*/
|
|
322
|
+
interface SpanForGrouping {
|
|
323
|
+
spanId: string;
|
|
324
|
+
parentSpanId?: string;
|
|
325
|
+
name: string;
|
|
326
|
+
startTime: number;
|
|
327
|
+
type?: string;
|
|
328
|
+
data?: {
|
|
329
|
+
type?: string;
|
|
330
|
+
toolCalls?: string;
|
|
331
|
+
};
|
|
332
|
+
}
|
|
333
|
+
/**
|
|
334
|
+
* Valid node types for workflow graph nodes.
|
|
335
|
+
* Maps to icon/color styling in node-styling.ts.
|
|
336
|
+
*/
|
|
337
|
+
type WorkflowNodeType = "llm" | "tool" | "agent" | "retrieval" | "router" | "memory" | "default" | "start" | "end";
|
|
338
|
+
/**
|
|
339
|
+
* Intermediate grouping structure used during auto-generation.
|
|
340
|
+
* Groups spans by their composite key (parentSpanId:spanName).
|
|
341
|
+
*/
|
|
342
|
+
interface NodeGroup {
|
|
343
|
+
/** Composite key: `${parentSpanId || 'root'}:${spanName}` */
|
|
344
|
+
key: string;
|
|
345
|
+
/** Parent span ID, undefined for root-level spans */
|
|
346
|
+
parentSpanId?: string;
|
|
347
|
+
/** Span operation name (e.g., "generateText", "search_web") */
|
|
348
|
+
spanName: string;
|
|
349
|
+
/** All span IDs belonging to this group */
|
|
350
|
+
spanIds: string[];
|
|
351
|
+
/** First span's start time for ordering */
|
|
352
|
+
firstStartTime: number;
|
|
353
|
+
}
|
|
354
|
+
/**
|
|
355
|
+
* Creates a unique group key for a span based on parent and name.
|
|
356
|
+
*
|
|
357
|
+
* @param parentSpanId - Parent span ID (undefined for root-level spans)
|
|
358
|
+
* @param spanName - The span's operation name
|
|
359
|
+
* @returns Composite key in format `{parentSpanId|root}:{spanName}`
|
|
360
|
+
*/
|
|
361
|
+
declare function makeGroupKey(parentSpanId: string | undefined, spanName: string): string;
|
|
362
|
+
/**
|
|
363
|
+
* Groups spans by their composite key (parentSpanId:spanName).
|
|
364
|
+
*
|
|
365
|
+
* @param spans - Array of spans to group
|
|
366
|
+
* @returns Map of group key to NodeGroup
|
|
367
|
+
*/
|
|
368
|
+
declare function groupSpansByKey(spans: SpanForGrouping[]): Map<string, NodeGroup>;
|
|
369
|
+
/**
|
|
370
|
+
* Infers the node type from span data for automatic styling.
|
|
371
|
+
*
|
|
372
|
+
* Priority:
|
|
373
|
+
* 1. GENERATION type → "llm"
|
|
374
|
+
* 2. Has tool calls → "tool"
|
|
375
|
+
* 3. Has children with LLM/tool activity → "agent"
|
|
376
|
+
* 4. Name-based fallbacks (retrieval, router, memory)
|
|
377
|
+
* 5. Default
|
|
378
|
+
*
|
|
379
|
+
* @param span - The span to analyze
|
|
380
|
+
* @param hasChildren - Whether this span has child spans
|
|
381
|
+
* @returns The inferred node type
|
|
382
|
+
*/
|
|
383
|
+
declare function inferNodeType(span: SpanForGrouping, hasChildren?: boolean): WorkflowNodeType;
|
|
384
|
+
/**
|
|
385
|
+
* Gets the display name for a span group.
|
|
386
|
+
* Falls back to "Operation" if no name is available.
|
|
387
|
+
*
|
|
388
|
+
* @param spanName - The span's operation name
|
|
389
|
+
* @returns Human-readable display name
|
|
390
|
+
*/
|
|
391
|
+
declare function getDisplayName(spanName: string): string;
|
|
392
|
+
/**
|
|
393
|
+
* Checks if a set of spans has children (for agent detection).
|
|
394
|
+
*
|
|
395
|
+
* @param spans - All spans in the trace
|
|
396
|
+
* @param parentSpanIds - Set of span IDs to check for children
|
|
397
|
+
* @returns true if any of the spans has children
|
|
398
|
+
*/
|
|
399
|
+
declare function hasChildSpans(spans: SpanForGrouping[], parentSpanIds: Set<string>): boolean;
|
|
400
|
+
|
|
401
|
+
interface TraceDrawerProps {
|
|
402
|
+
open: boolean;
|
|
403
|
+
onClose: () => void;
|
|
404
|
+
children: React.ReactNode;
|
|
405
|
+
}
|
|
406
|
+
declare const TraceDrawer: ({ open, onClose, children }: TraceDrawerProps) => react_jsx_runtime.JSX.Element;
|
|
407
|
+
|
|
408
|
+
interface TraceDrawerContentProps {
|
|
409
|
+
children: React.ReactNode;
|
|
410
|
+
}
|
|
411
|
+
declare const TraceDrawerContent: ({ children }: TraceDrawerContentProps) => react_jsx_runtime.JSX.Element;
|
|
412
|
+
|
|
413
|
+
declare const TraceDrawerTitle: ({ children, }: {
|
|
414
|
+
children: React.ReactNode;
|
|
415
|
+
}) => react_jsx_runtime.JSX.Element;
|
|
416
|
+
declare const TraceDrawerSubtitle: () => react_jsx_runtime.JSX.Element;
|
|
417
|
+
declare const TraceDrawerCloseButton: ({ onClose, }: {
|
|
418
|
+
onClose: () => void;
|
|
419
|
+
}) => react_jsx_runtime.JSX.Element;
|
|
420
|
+
declare const TraceDrawerHeader: ({ children }: {
|
|
421
|
+
children: ReactNode;
|
|
422
|
+
}) => react_jsx_runtime.JSX.Element;
|
|
423
|
+
|
|
424
|
+
interface TraceDrawerMainProps {
|
|
425
|
+
children: React.ReactNode;
|
|
426
|
+
}
|
|
427
|
+
declare const TraceDrawerMain: ({ children }: TraceDrawerMainProps) => react_jsx_runtime.JSX.Element;
|
|
428
|
+
|
|
429
|
+
interface TraceDrawerSidebarProps {
|
|
430
|
+
children: React.ReactNode;
|
|
431
|
+
}
|
|
432
|
+
declare const TraceDrawerSidebar: ({ children }: TraceDrawerSidebarProps) => react_jsx_runtime.JSX.Element;
|
|
433
|
+
declare const TraceDrawerSidebarSectionResizer: () => react_jsx_runtime.JSX.Element;
|
|
434
|
+
|
|
435
|
+
declare const TraceInfoSkeleton: () => react_jsx_runtime.JSX.Element;
|
|
436
|
+
|
|
437
|
+
declare const useTraceDrawer: (initialHeight?: number) => {
|
|
438
|
+
treeHeight: number;
|
|
439
|
+
isDragging: boolean;
|
|
440
|
+
handleMouseDown: (e: React.MouseEvent) => void;
|
|
441
|
+
handleMouseMove: (e: MouseEvent) => void;
|
|
442
|
+
handleMouseUp: () => void;
|
|
443
|
+
};
|
|
444
|
+
|
|
445
|
+
declare const TraceDrawerContainer: ({ children, }: {
|
|
446
|
+
children: React.ReactNode;
|
|
447
|
+
}) => react_jsx_runtime.JSX.Element;
|
|
448
|
+
|
|
449
|
+
declare const TraceTree: () => react_jsx_runtime.JSX.Element;
|
|
450
|
+
|
|
451
|
+
declare module "react" {
|
|
452
|
+
interface CSSProperties {
|
|
453
|
+
"--tree-view-color"?: string;
|
|
454
|
+
"--tree-view-bg-color"?: string;
|
|
455
|
+
}
|
|
456
|
+
}
|
|
457
|
+
interface StyledTreeItemProps extends Omit<UseTreeItemParameters, "rootRef">, React$1.HTMLAttributes<HTMLLIElement> {
|
|
458
|
+
bgColor?: string;
|
|
459
|
+
bgColorForDarkMode?: string;
|
|
460
|
+
color?: string;
|
|
461
|
+
colorForDarkMode?: string;
|
|
462
|
+
labelIcon: React$1.ElementType;
|
|
463
|
+
labelInfo?: string;
|
|
464
|
+
loading?: boolean;
|
|
465
|
+
hasChildren?: boolean;
|
|
466
|
+
}
|
|
467
|
+
declare const TraceTreeItem: React$1.ForwardRefExoticComponent<StyledTreeItemProps & React$1.RefAttributes<HTMLLIElement>>;
|
|
468
|
+
|
|
469
|
+
interface TraceLabelProps {
|
|
470
|
+
label: string;
|
|
471
|
+
status: string;
|
|
472
|
+
tokens: string;
|
|
473
|
+
latency: string;
|
|
474
|
+
cost: string;
|
|
475
|
+
}
|
|
476
|
+
declare const TraceLabel: ({ label, status, tokens, latency, cost, }: TraceLabelProps) => react_jsx_runtime.JSX.Element;
|
|
477
|
+
|
|
478
|
+
interface GraphData {
|
|
479
|
+
parentNodeId?: string;
|
|
480
|
+
nodeId: string;
|
|
481
|
+
spanId: string;
|
|
482
|
+
nodeType: string;
|
|
483
|
+
displayName: string;
|
|
484
|
+
spanName: string;
|
|
485
|
+
}
|
|
486
|
+
|
|
487
|
+
interface TraceGraphCanvasProps {
|
|
488
|
+
graphData: GraphData[];
|
|
489
|
+
isLoading: boolean;
|
|
490
|
+
}
|
|
491
|
+
declare function TraceGraphCanvas({ graphData, isLoading, }: TraceGraphCanvasProps): react_jsx_runtime.JSX.Element;
|
|
492
|
+
|
|
493
|
+
interface SpanInfoContentProps {
|
|
494
|
+
children: React.ReactNode;
|
|
495
|
+
}
|
|
496
|
+
declare const SpanInfoTitle: ({ children }: {
|
|
497
|
+
children: React.ReactNode;
|
|
498
|
+
}) => react_jsx_runtime.JSX.Element;
|
|
499
|
+
declare const SpanInfoContent: ({ children }: SpanInfoContentProps) => react_jsx_runtime.JSX.Element;
|
|
500
|
+
|
|
501
|
+
declare const SpanInfoHeader: () => react_jsx_runtime.JSX.Element;
|
|
502
|
+
|
|
503
|
+
interface SpanInfoTabsProps {
|
|
504
|
+
children: React.ReactNode;
|
|
505
|
+
}
|
|
506
|
+
declare const SpanInfoTabs: ({ children }: SpanInfoTabsProps) => react_jsx_runtime.JSX.Element;
|
|
507
|
+
|
|
508
|
+
interface SpanInfoContextValue {
|
|
509
|
+
activeTab: string;
|
|
510
|
+
setActiveTab: (tab: string) => void;
|
|
511
|
+
tabs: {
|
|
512
|
+
value: string;
|
|
513
|
+
label: string;
|
|
514
|
+
}[];
|
|
515
|
+
span: SpanData;
|
|
516
|
+
}
|
|
517
|
+
declare const SpanInfoProvider: ({ children, }: {
|
|
518
|
+
children: React.ReactNode;
|
|
519
|
+
}) => react_jsx_runtime.JSX.Element | null;
|
|
520
|
+
declare const useSpanInfoContext: () => SpanInfoContextValue;
|
|
521
|
+
|
|
522
|
+
declare const AttributesTab: () => react_jsx_runtime.JSX.Element;
|
|
523
|
+
|
|
524
|
+
interface AttributesViewerProps {
|
|
525
|
+
attributes: Record<string, any>;
|
|
526
|
+
}
|
|
527
|
+
declare const AttributesViewer: ({ attributes }: AttributesViewerProps) => react_jsx_runtime.JSX.Element;
|
|
528
|
+
|
|
529
|
+
declare const InputOutputTab: () => react_jsx_runtime.JSX.Element;
|
|
530
|
+
|
|
531
|
+
interface PromptListProps {
|
|
532
|
+
prompts: LLMPrompt[];
|
|
533
|
+
}
|
|
534
|
+
declare const PromptList: ({ prompts }: PromptListProps) => react_jsx_runtime.JSX.Element;
|
|
535
|
+
|
|
536
|
+
interface OutputDisplayProps {
|
|
537
|
+
outputData: {
|
|
538
|
+
text?: string;
|
|
539
|
+
toolCalls?: string;
|
|
540
|
+
toolCall?: any;
|
|
541
|
+
objectResponse?: any;
|
|
542
|
+
} | null;
|
|
543
|
+
}
|
|
544
|
+
declare const OutputDisplay: ({ outputData }: OutputDisplayProps) => react_jsx_runtime.JSX.Element | null;
|
|
545
|
+
|
|
546
|
+
interface EvaluationTabProps {
|
|
547
|
+
children?: React.ReactNode;
|
|
548
|
+
}
|
|
549
|
+
declare const EvaluationTab: ({ children }: EvaluationTabProps) => react_jsx_runtime.JSX.Element;
|
|
550
|
+
|
|
551
|
+
declare const EvaluationList: ({ emptyContentImgUrl, }: {
|
|
552
|
+
emptyContentImgUrl?: string;
|
|
553
|
+
}) => react_jsx_runtime.JSX.Element;
|
|
554
|
+
|
|
555
|
+
interface EvaluationContextValue {
|
|
556
|
+
scores: ScoreData[];
|
|
557
|
+
isLoading: boolean;
|
|
558
|
+
openAddAnnotationDialog: boolean;
|
|
559
|
+
setOpenAddAnnotationDialog: (open: boolean) => void;
|
|
560
|
+
canAddAnnotation: boolean;
|
|
561
|
+
}
|
|
562
|
+
declare const useEvaluationContext: () => EvaluationContextValue;
|
|
563
|
+
declare const EvaluationProvider: ({ children, canAddAnnotation, scores, isLoading, }: {
|
|
564
|
+
children: React.ReactNode;
|
|
565
|
+
canAddAnnotation: boolean;
|
|
566
|
+
scores: ScoreData[];
|
|
567
|
+
isLoading: boolean;
|
|
568
|
+
}) => react_jsx_runtime.JSX.Element;
|
|
569
|
+
|
|
570
|
+
declare const AddAnnotations: () => react_jsx_runtime.JSX.Element | null;
|
|
571
|
+
|
|
572
|
+
type Props$6 = {
|
|
573
|
+
saveAnnotation: (data: {
|
|
574
|
+
name: string;
|
|
575
|
+
label: string;
|
|
576
|
+
score: number;
|
|
577
|
+
reason: string;
|
|
578
|
+
resourceId: string;
|
|
579
|
+
}) => Promise<{
|
|
580
|
+
hasError: boolean;
|
|
581
|
+
}>;
|
|
582
|
+
};
|
|
583
|
+
declare function AddAnnotationDialog({ saveAnnotation }: Props$6): react_jsx_runtime.JSX.Element;
|
|
584
|
+
|
|
585
|
+
interface Props$5 extends BoxProps {
|
|
586
|
+
icon: IconifyIcon | string;
|
|
587
|
+
}
|
|
588
|
+
declare const Iconify: React$1.ForwardRefExoticComponent<Omit<Props$5, "ref"> & React$1.RefAttributes<SVGElement>>;
|
|
589
|
+
|
|
590
|
+
type EmptyContentProps = StackProps & {
|
|
591
|
+
title?: string;
|
|
592
|
+
imgUrl?: string;
|
|
593
|
+
filled?: boolean;
|
|
594
|
+
description?: string;
|
|
595
|
+
action?: React.ReactNode;
|
|
596
|
+
};
|
|
597
|
+
declare function EmptyContent({ title, imgUrl, action, filled, description, sx, ...other }: EmptyContentProps): react_jsx_runtime.JSX.Element;
|
|
598
|
+
|
|
599
|
+
type CustomDataGridProps = DataGridProps & {
|
|
600
|
+
t: any;
|
|
601
|
+
emptyContentImgUrl?: string;
|
|
602
|
+
};
|
|
603
|
+
declare const DataGrid: ({ t, emptyContentImgUrl, ...props }: CustomDataGridProps) => react_jsx_runtime.JSX.Element;
|
|
604
|
+
|
|
605
|
+
type LabelColor = "default" | "primary" | "secondary" | "info" | "success" | "warning" | "error";
|
|
606
|
+
type LabelVariant = "filled" | "outlined" | "soft";
|
|
607
|
+
interface LabelProps extends BoxProps {
|
|
608
|
+
startIcon?: React.ReactElement | null;
|
|
609
|
+
endIcon?: React.ReactElement | null;
|
|
610
|
+
color?: LabelColor;
|
|
611
|
+
variant?: LabelVariant;
|
|
612
|
+
}
|
|
613
|
+
|
|
614
|
+
declare const Label: React$1.ForwardRefExoticComponent<Omit<LabelProps, "ref"> & React$1.RefAttributes<HTMLSpanElement>>;
|
|
615
|
+
|
|
616
|
+
type Props$4 = {
|
|
617
|
+
children: React__default.ReactNode;
|
|
618
|
+
methods: UseFormReturn<any>;
|
|
619
|
+
onSubmit?: VoidFunction;
|
|
620
|
+
sx?: SxProps$1<Theme$1>;
|
|
621
|
+
};
|
|
622
|
+
declare function FormProvider({ children, onSubmit, methods, sx, }: Props$4): react_jsx_runtime.JSX.Element;
|
|
623
|
+
|
|
624
|
+
type Props$3 = TextFieldProps & {
|
|
625
|
+
name: string;
|
|
626
|
+
};
|
|
627
|
+
declare function RHFTextField({ name, helperText, type, ...other }: Props$3): react_jsx_runtime.JSX.Element;
|
|
628
|
+
|
|
629
|
+
type RHFSelectProps = TextFieldProps & {
|
|
630
|
+
name: string;
|
|
631
|
+
native?: boolean;
|
|
632
|
+
maxHeight?: boolean | number;
|
|
633
|
+
children: React__default.ReactNode;
|
|
634
|
+
PaperPropsSx?: SxProps<Theme>;
|
|
635
|
+
};
|
|
636
|
+
declare function RHFSelect({ name, native, maxHeight, helperText, children, PaperPropsSx, onChange, ...other }: RHFSelectProps): react_jsx_runtime.JSX.Element;
|
|
637
|
+
type RHFMultiSelectProps = FormControlProps & {
|
|
638
|
+
name: string;
|
|
639
|
+
label?: string;
|
|
640
|
+
chip?: boolean;
|
|
641
|
+
checkbox?: boolean;
|
|
642
|
+
placeholder?: string;
|
|
643
|
+
helperText?: React__default.ReactNode;
|
|
644
|
+
options: {
|
|
645
|
+
label: string;
|
|
646
|
+
value: string;
|
|
647
|
+
}[];
|
|
648
|
+
};
|
|
649
|
+
declare function RHFMultiSelect({ name, chip, label, options, checkbox, placeholder, helperText, ...other }: RHFMultiSelectProps): react_jsx_runtime.JSX.Element;
|
|
650
|
+
|
|
651
|
+
type Props$2 = SliderProps & {
|
|
652
|
+
name: string;
|
|
653
|
+
};
|
|
654
|
+
declare function RHFSlider({ name, ...other }: Props$2): react_jsx_runtime.JSX.Element;
|
|
655
|
+
|
|
656
|
+
type Props$1 = ComponentProps<typeof JsonEditor> & {
|
|
657
|
+
name: string;
|
|
658
|
+
};
|
|
659
|
+
declare function RHFJsonEditor({ name, ...other }: Props$1): react_jsx_runtime.JSX.Element;
|
|
660
|
+
|
|
661
|
+
interface Props extends Omit<FormControlLabelProps, "control"> {
|
|
662
|
+
name: string;
|
|
663
|
+
helperText?: React__default.ReactNode;
|
|
664
|
+
}
|
|
665
|
+
declare function RHFSwitch({ name, helperText, ...other }: Props): react_jsx_runtime.JSX.Element;
|
|
666
|
+
|
|
667
|
+
declare function JsonEditor({ defaultValue, onChange, value, }: {
|
|
668
|
+
defaultValue?: string;
|
|
669
|
+
onChange?: (value: string) => void;
|
|
670
|
+
value?: string;
|
|
671
|
+
}): react_jsx_runtime.JSX.Element;
|
|
672
|
+
|
|
673
|
+
export { AddAnnotationDialog, AddAnnotations, AttributesTab, AttributesViewer, DataGrid, EmptyContent, EvaluationList, EvaluationProvider, EvaluationTab, FormProvider, Iconify, InputOutputTab, JsonEditor, type LLMPrompt, type LLMText, Label, type LabelColor, type LabelProps, type LabelVariant, type LayoutResult, NODE_DIMENSIONS, type NodeGroup, type NodeTypeStyle, OutputDisplay, PromptList, RHFJsonEditor, RHFMultiSelect, RHFSelect, RHFSlider, RHFSwitch, RHFTextField, type Request, Requests, type ScoreData, type Session, type SessionData, SessionsList, type SessionsListProps, type SpanData, type SpanForGrouping, SpanInfoContent, SpanInfoHeader, SpanInfoProvider, SpanInfoTabs, SpanInfoTitle, TableEmptyRows, TableHeadCustom, TablePaginationCustom, type TableProps, TableSelectedAction, TableSkeleton, type Trace, type TraceData, TraceDrawer, TraceDrawerCloseButton, TraceDrawerContainer, TraceDrawerContent, type TraceDrawerContextValue, TraceDrawerHeader, TraceDrawerMain, TraceDrawerProvider, type TraceDrawerProviderProps, TraceDrawerSidebar, TraceDrawerSidebarSectionResizer, TraceDrawerSubtitle, TraceDrawerTitle, TraceGraphCanvas, type TraceGraphCanvasProps, TraceInfoSkeleton, TraceLabel, type TraceListContextValue, TraceListItem, TraceListProvider, TraceTree, TraceTreeItem, TracesList, type TracesListProps, type WorkflowNodeType, applyDagreLayout, calculateBranchFamilies, getBranchColor, getDisplayName, getNodeTypeStyle, groupSpansByKey, hasChildSpans, inferNodeType, makeGroupKey, useEvaluationContext, useSpanInfoContext, useTable, useTraceDrawer, useTraceDrawerContext, useTraceListContext };
|