@railtownai/railtracks-visualizer 0.0.60 → 0.0.62
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/cjs/index.js +1185 -1639
- package/dist/esm/index.js +1185 -1640
- package/dist/types/components/nodes/AgentNode.d.ts +4 -0
- package/dist/types/components/nodes/InputsOutputsCollapse.d.ts +35 -0
- package/dist/types/components/nodes/NodeDetailsDrawer.d.ts +7 -0
- package/dist/types/components/nodes/index.d.ts +0 -1
- package/dist/types/lib/utils.d.ts +6 -0
- package/package.json +1 -1
- package/dist/types/components/nodes/CodeBlock.d.ts +0 -8
- package/dist/types/components/nodes/ExpandableTextarea.d.ts +0 -9
- package/dist/types/components/nodes/OutputRenderer.d.ts +0 -9
package/dist/cjs/index.js
CHANGED
|
@@ -4,37 +4,35 @@ var React = require('react');
|
|
|
4
4
|
var jsxRuntime = require('react/jsx-runtime');
|
|
5
5
|
var ReactDOM = require('react-dom');
|
|
6
6
|
var CountUp = require('react-countup');
|
|
7
|
-
var
|
|
8
|
-
var
|
|
9
|
-
var
|
|
10
|
-
require('@rc-component/form');
|
|
7
|
+
var render = require('@rc-component/util/es/React/render');
|
|
8
|
+
var cssinjs = require('@ant-design/cssinjs');
|
|
9
|
+
var IconContext = require('@ant-design/icons/es/components/Context');
|
|
11
10
|
var util = require('@rc-component/util');
|
|
12
|
-
var
|
|
13
|
-
var pickAttrs = require('@rc-component/util/es/pickAttrs');
|
|
11
|
+
var useMemo = require('@rc-component/util/es/hooks/useMemo');
|
|
14
12
|
var Pagination$1 = require('@rc-component/pagination/es/locale/en_US');
|
|
15
|
-
var cssinjs = require('@ant-design/cssinjs');
|
|
16
13
|
var colors = require('@ant-design/colors');
|
|
17
14
|
var fastColor = require('@ant-design/fast-color');
|
|
18
|
-
var IconContext = require('@ant-design/icons/es/components/Context');
|
|
19
|
-
var useMemo = require('@rc-component/util/es/hooks/useMemo');
|
|
20
15
|
var Trigger$1 = require('@rc-component/trigger');
|
|
21
16
|
var CSSMotion = require('@rc-component/motion');
|
|
22
17
|
var isEqual = require('@rc-component/util/es/isEqual');
|
|
23
18
|
var cssinjsUtils = require('@ant-design/cssinjs-utils');
|
|
24
|
-
var useLayoutEffect = require('@rc-component/util/es/hooks/useLayoutEffect');
|
|
25
|
-
var isVisible = require('@rc-component/util/es/Dom/isVisible');
|
|
26
|
-
var raf = require('@rc-component/util/es/raf');
|
|
27
|
-
var render = require('@rc-component/util/es/React/render');
|
|
28
|
-
var LoadingOutlined = require('@ant-design/icons/es/icons/LoadingOutlined');
|
|
29
|
-
var RcColorPicker = require('@rc-component/color-picker');
|
|
30
|
-
var RightOutlined = require('@ant-design/icons/es/icons/RightOutlined');
|
|
31
|
-
var RcCollapse = require('@rc-component/collapse');
|
|
32
19
|
var CheckCircleFilled = require('@ant-design/icons/es/icons/CheckCircleFilled');
|
|
33
20
|
var CloseCircleFilled = require('@ant-design/icons/es/icons/CloseCircleFilled');
|
|
34
21
|
var ExclamationCircleFilled = require('@ant-design/icons/es/icons/ExclamationCircleFilled');
|
|
35
22
|
var InfoCircleFilled = require('@ant-design/icons/es/icons/InfoCircleFilled');
|
|
23
|
+
var LoadingOutlined = require('@ant-design/icons/es/icons/LoadingOutlined');
|
|
36
24
|
var notification = require('@rc-component/notification');
|
|
25
|
+
var CloseOutlined = require('@ant-design/icons/es/icons/CloseOutlined');
|
|
26
|
+
var pickAttrs = require('@rc-component/util/es/pickAttrs');
|
|
37
27
|
var RcTooltip = require('@rc-component/tooltip');
|
|
28
|
+
require('@rc-component/form');
|
|
29
|
+
var RcColorPicker = require('@rc-component/color-picker');
|
|
30
|
+
var useLayoutEffect = require('@rc-component/util/es/hooks/useLayoutEffect');
|
|
31
|
+
var isVisible = require('@rc-component/util/es/Dom/isVisible');
|
|
32
|
+
var ref = require('@rc-component/util/es/ref');
|
|
33
|
+
var raf = require('@rc-component/util/es/raf');
|
|
34
|
+
var RightOutlined = require('@ant-design/icons/es/icons/RightOutlined');
|
|
35
|
+
var RcCollapse = require('@rc-component/collapse');
|
|
38
36
|
var RcTree = require('@rc-component/tree');
|
|
39
37
|
var FileOutlined = require('@ant-design/icons/es/icons/FileOutlined');
|
|
40
38
|
var FolderOpenOutlined = require('@ant-design/icons/es/icons/FolderOpenOutlined');
|
|
@@ -56,6 +54,8 @@ var RcInput = require('@rc-component/input');
|
|
|
56
54
|
var focus$1 = require('@rc-component/util/es/Dom/focus');
|
|
57
55
|
var CheckOutlined = require('@ant-design/icons/es/icons/CheckOutlined');
|
|
58
56
|
var CopyOutlined = require('@ant-design/icons/es/icons/CopyOutlined');
|
|
57
|
+
var RcDrawer = require('@rc-component/drawer');
|
|
58
|
+
var useId$1 = require('@rc-component/util/es/hooks/useId');
|
|
59
59
|
var RcSwitch = require('@rc-component/switch');
|
|
60
60
|
var RcSelect = require('@rc-component/select');
|
|
61
61
|
var DownOutlined = require('@ant-design/icons/es/icons/DownOutlined');
|
|
@@ -116,7 +116,7 @@ function cc(names) {
|
|
|
116
116
|
return out;
|
|
117
117
|
}
|
|
118
118
|
|
|
119
|
-
var noop$
|
|
119
|
+
var noop$2 = {
|
|
120
120
|
value: ()=>{}
|
|
121
121
|
};
|
|
122
122
|
function dispatch() {
|
|
@@ -183,7 +183,7 @@ function get$1(type, name) {
|
|
|
183
183
|
function set$2(type, name, callback) {
|
|
184
184
|
for(var i = 0, n = type.length; i < n; ++i){
|
|
185
185
|
if (type[i].name === name) {
|
|
186
|
-
type[i] = noop$
|
|
186
|
+
type[i] = noop$2, type = type.slice(0, i).concat(type.slice(i + 1));
|
|
187
187
|
break;
|
|
188
188
|
}
|
|
189
189
|
}
|
|
@@ -11899,7 +11899,7 @@ function ReactFlow({ nodes, edges, defaultNodes, defaultEdges, className, nodeTy
|
|
|
11899
11899
|
* />);
|
|
11900
11900
|
*}
|
|
11901
11901
|
*```
|
|
11902
|
-
*/ var index
|
|
11902
|
+
*/ var index = fixedForwardRef(ReactFlow);
|
|
11903
11903
|
/**
|
|
11904
11904
|
* This hook makes it easy to prototype a controlled flow where you manage the
|
|
11905
11905
|
* state of nodes and edges outside the `ReactFlowInstance`. You can think of it
|
|
@@ -13261,24 +13261,6 @@ const __iconNode$l = [
|
|
|
13261
13261
|
const Clock = createLucideIcon("clock", __iconNode$l);
|
|
13262
13262
|
|
|
13263
13263
|
const __iconNode$k = [
|
|
13264
|
-
[
|
|
13265
|
-
"path",
|
|
13266
|
-
{
|
|
13267
|
-
d: "M6 16.326A7 7 0 1 1 15.71 8h1.79a4.5 4.5 0 0 1 .5 8.973",
|
|
13268
|
-
key: "1cez44"
|
|
13269
|
-
}
|
|
13270
|
-
],
|
|
13271
|
-
[
|
|
13272
|
-
"path",
|
|
13273
|
-
{
|
|
13274
|
-
d: "m13 12-3 5h4l-3 5",
|
|
13275
|
-
key: "1t22er"
|
|
13276
|
-
}
|
|
13277
|
-
]
|
|
13278
|
-
];
|
|
13279
|
-
const CloudLightning = createLucideIcon("cloud-lightning", __iconNode$k);
|
|
13280
|
-
|
|
13281
|
-
const __iconNode$j = [
|
|
13282
13264
|
[
|
|
13283
13265
|
"rect",
|
|
13284
13266
|
{
|
|
@@ -13299,9 +13281,9 @@ const __iconNode$j = [
|
|
|
13299
13281
|
}
|
|
13300
13282
|
]
|
|
13301
13283
|
];
|
|
13302
|
-
const Copy = createLucideIcon("copy", __iconNode$
|
|
13284
|
+
const Copy = createLucideIcon("copy", __iconNode$k);
|
|
13303
13285
|
|
|
13304
|
-
const __iconNode$
|
|
13286
|
+
const __iconNode$j = [
|
|
13305
13287
|
[
|
|
13306
13288
|
"path",
|
|
13307
13289
|
{
|
|
@@ -13409,9 +13391,9 @@ const __iconNode$i = [
|
|
|
13409
13391
|
}
|
|
13410
13392
|
]
|
|
13411
13393
|
];
|
|
13412
|
-
const Cpu = createLucideIcon("cpu", __iconNode$
|
|
13394
|
+
const Cpu = createLucideIcon("cpu", __iconNode$j);
|
|
13413
13395
|
|
|
13414
|
-
const __iconNode$
|
|
13396
|
+
const __iconNode$i = [
|
|
13415
13397
|
[
|
|
13416
13398
|
"line",
|
|
13417
13399
|
{
|
|
@@ -13430,9 +13412,9 @@ const __iconNode$h = [
|
|
|
13430
13412
|
}
|
|
13431
13413
|
]
|
|
13432
13414
|
];
|
|
13433
|
-
const DollarSign = createLucideIcon("dollar-sign", __iconNode$
|
|
13415
|
+
const DollarSign = createLucideIcon("dollar-sign", __iconNode$i);
|
|
13434
13416
|
|
|
13435
|
-
const __iconNode$
|
|
13417
|
+
const __iconNode$h = [
|
|
13436
13418
|
[
|
|
13437
13419
|
"path",
|
|
13438
13420
|
{
|
|
@@ -13462,9 +13444,9 @@ const __iconNode$g = [
|
|
|
13462
13444
|
}
|
|
13463
13445
|
]
|
|
13464
13446
|
];
|
|
13465
|
-
const FileInput = createLucideIcon("file-input", __iconNode$
|
|
13447
|
+
const FileInput = createLucideIcon("file-input", __iconNode$h);
|
|
13466
13448
|
|
|
13467
|
-
const __iconNode$
|
|
13449
|
+
const __iconNode$g = [
|
|
13468
13450
|
[
|
|
13469
13451
|
"path",
|
|
13470
13452
|
{
|
|
@@ -13494,9 +13476,415 @@ const __iconNode$f = [
|
|
|
13494
13476
|
}
|
|
13495
13477
|
]
|
|
13496
13478
|
];
|
|
13497
|
-
const FileOutput = createLucideIcon("file-output", __iconNode$
|
|
13479
|
+
const FileOutput = createLucideIcon("file-output", __iconNode$g);
|
|
13480
|
+
|
|
13481
|
+
const __iconNode$f = [
|
|
13482
|
+
[
|
|
13483
|
+
"path",
|
|
13484
|
+
{
|
|
13485
|
+
d: "M12 22v-6",
|
|
13486
|
+
key: "6o8u61"
|
|
13487
|
+
}
|
|
13488
|
+
],
|
|
13489
|
+
[
|
|
13490
|
+
"path",
|
|
13491
|
+
{
|
|
13492
|
+
d: "M12 8V2",
|
|
13493
|
+
key: "1wkif3"
|
|
13494
|
+
}
|
|
13495
|
+
],
|
|
13496
|
+
[
|
|
13497
|
+
"path",
|
|
13498
|
+
{
|
|
13499
|
+
d: "M4 12H2",
|
|
13500
|
+
key: "rhcxmi"
|
|
13501
|
+
}
|
|
13502
|
+
],
|
|
13503
|
+
[
|
|
13504
|
+
"path",
|
|
13505
|
+
{
|
|
13506
|
+
d: "M10 12H8",
|
|
13507
|
+
key: "s88cx1"
|
|
13508
|
+
}
|
|
13509
|
+
],
|
|
13510
|
+
[
|
|
13511
|
+
"path",
|
|
13512
|
+
{
|
|
13513
|
+
d: "M16 12h-2",
|
|
13514
|
+
key: "10asgb"
|
|
13515
|
+
}
|
|
13516
|
+
],
|
|
13517
|
+
[
|
|
13518
|
+
"path",
|
|
13519
|
+
{
|
|
13520
|
+
d: "M22 12h-2",
|
|
13521
|
+
key: "14jgyd"
|
|
13522
|
+
}
|
|
13523
|
+
],
|
|
13524
|
+
[
|
|
13525
|
+
"path",
|
|
13526
|
+
{
|
|
13527
|
+
d: "m15 19-3-3-3 3",
|
|
13528
|
+
key: "e37ymu"
|
|
13529
|
+
}
|
|
13530
|
+
],
|
|
13531
|
+
[
|
|
13532
|
+
"path",
|
|
13533
|
+
{
|
|
13534
|
+
d: "m15 5-3 3-3-3",
|
|
13535
|
+
key: "19d6lf"
|
|
13536
|
+
}
|
|
13537
|
+
]
|
|
13538
|
+
];
|
|
13539
|
+
const FoldVertical = createLucideIcon("fold-vertical", __iconNode$f);
|
|
13498
13540
|
|
|
13499
13541
|
const __iconNode$e = [
|
|
13542
|
+
[
|
|
13543
|
+
"line",
|
|
13544
|
+
{
|
|
13545
|
+
x1: "4",
|
|
13546
|
+
x2: "20",
|
|
13547
|
+
y1: "9",
|
|
13548
|
+
y2: "9",
|
|
13549
|
+
key: "4lhtct"
|
|
13550
|
+
}
|
|
13551
|
+
],
|
|
13552
|
+
[
|
|
13553
|
+
"line",
|
|
13554
|
+
{
|
|
13555
|
+
x1: "4",
|
|
13556
|
+
x2: "20",
|
|
13557
|
+
y1: "15",
|
|
13558
|
+
y2: "15",
|
|
13559
|
+
key: "vyu0kd"
|
|
13560
|
+
}
|
|
13561
|
+
],
|
|
13562
|
+
[
|
|
13563
|
+
"line",
|
|
13564
|
+
{
|
|
13565
|
+
x1: "10",
|
|
13566
|
+
x2: "8",
|
|
13567
|
+
y1: "3",
|
|
13568
|
+
y2: "21",
|
|
13569
|
+
key: "1ggp8o"
|
|
13570
|
+
}
|
|
13571
|
+
],
|
|
13572
|
+
[
|
|
13573
|
+
"line",
|
|
13574
|
+
{
|
|
13575
|
+
x1: "16",
|
|
13576
|
+
x2: "14",
|
|
13577
|
+
y1: "3",
|
|
13578
|
+
y2: "21",
|
|
13579
|
+
key: "weycgp"
|
|
13580
|
+
}
|
|
13581
|
+
]
|
|
13582
|
+
];
|
|
13583
|
+
const Hash = createLucideIcon("hash", __iconNode$e);
|
|
13584
|
+
|
|
13585
|
+
const __iconNode$d = [
|
|
13586
|
+
[
|
|
13587
|
+
"circle",
|
|
13588
|
+
{
|
|
13589
|
+
cx: "12",
|
|
13590
|
+
cy: "12",
|
|
13591
|
+
r: "10",
|
|
13592
|
+
key: "1mglay"
|
|
13593
|
+
}
|
|
13594
|
+
],
|
|
13595
|
+
[
|
|
13596
|
+
"path",
|
|
13597
|
+
{
|
|
13598
|
+
d: "M12 16v-4",
|
|
13599
|
+
key: "1dtifu"
|
|
13600
|
+
}
|
|
13601
|
+
],
|
|
13602
|
+
[
|
|
13603
|
+
"path",
|
|
13604
|
+
{
|
|
13605
|
+
d: "M12 8h.01",
|
|
13606
|
+
key: "e9boi3"
|
|
13607
|
+
}
|
|
13608
|
+
]
|
|
13609
|
+
];
|
|
13610
|
+
const Info = createLucideIcon("info", __iconNode$d);
|
|
13611
|
+
|
|
13612
|
+
const __iconNode$c = [
|
|
13613
|
+
[
|
|
13614
|
+
"path",
|
|
13615
|
+
{
|
|
13616
|
+
d: "M13 5h8",
|
|
13617
|
+
key: "a7qcls"
|
|
13618
|
+
}
|
|
13619
|
+
],
|
|
13620
|
+
[
|
|
13621
|
+
"path",
|
|
13622
|
+
{
|
|
13623
|
+
d: "M13 12h8",
|
|
13624
|
+
key: "h98zly"
|
|
13625
|
+
}
|
|
13626
|
+
],
|
|
13627
|
+
[
|
|
13628
|
+
"path",
|
|
13629
|
+
{
|
|
13630
|
+
d: "M13 19h8",
|
|
13631
|
+
key: "c3s6r1"
|
|
13632
|
+
}
|
|
13633
|
+
],
|
|
13634
|
+
[
|
|
13635
|
+
"path",
|
|
13636
|
+
{
|
|
13637
|
+
d: "m3 17 2 2 4-4",
|
|
13638
|
+
key: "1jhpwq"
|
|
13639
|
+
}
|
|
13640
|
+
],
|
|
13641
|
+
[
|
|
13642
|
+
"path",
|
|
13643
|
+
{
|
|
13644
|
+
d: "m3 7 2 2 4-4",
|
|
13645
|
+
key: "1obspn"
|
|
13646
|
+
}
|
|
13647
|
+
]
|
|
13648
|
+
];
|
|
13649
|
+
const ListChecks = createLucideIcon("list-checks", __iconNode$c);
|
|
13650
|
+
|
|
13651
|
+
const __iconNode$b = [
|
|
13652
|
+
[
|
|
13653
|
+
"path",
|
|
13654
|
+
{
|
|
13655
|
+
d: "M16 10a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 14.286V4a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2z",
|
|
13656
|
+
key: "1n2ejm"
|
|
13657
|
+
}
|
|
13658
|
+
],
|
|
13659
|
+
[
|
|
13660
|
+
"path",
|
|
13661
|
+
{
|
|
13662
|
+
d: "M20 9a2 2 0 0 1 2 2v10.286a.71.71 0 0 1-1.212.502l-2.202-2.202A2 2 0 0 0 17.172 19H10a2 2 0 0 1-2-2v-1",
|
|
13663
|
+
key: "1qfcsi"
|
|
13664
|
+
}
|
|
13665
|
+
]
|
|
13666
|
+
];
|
|
13667
|
+
const MessagesSquare = createLucideIcon("messages-square", __iconNode$b);
|
|
13668
|
+
|
|
13669
|
+
const __iconNode$a = [
|
|
13670
|
+
[
|
|
13671
|
+
"rect",
|
|
13672
|
+
{
|
|
13673
|
+
width: "18",
|
|
13674
|
+
height: "18",
|
|
13675
|
+
x: "3",
|
|
13676
|
+
y: "3",
|
|
13677
|
+
rx: "2",
|
|
13678
|
+
key: "afitv7"
|
|
13679
|
+
}
|
|
13680
|
+
],
|
|
13681
|
+
[
|
|
13682
|
+
"path",
|
|
13683
|
+
{
|
|
13684
|
+
d: "M9 3v18",
|
|
13685
|
+
key: "fh3hqa"
|
|
13686
|
+
}
|
|
13687
|
+
]
|
|
13688
|
+
];
|
|
13689
|
+
const PanelLeft = createLucideIcon("panel-left", __iconNode$a);
|
|
13690
|
+
|
|
13691
|
+
const __iconNode$9 = [
|
|
13692
|
+
[
|
|
13693
|
+
"path",
|
|
13694
|
+
{
|
|
13695
|
+
d: "M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",
|
|
13696
|
+
key: "v9h5vc"
|
|
13697
|
+
}
|
|
13698
|
+
],
|
|
13699
|
+
[
|
|
13700
|
+
"path",
|
|
13701
|
+
{
|
|
13702
|
+
d: "M21 3v5h-5",
|
|
13703
|
+
key: "1q7to0"
|
|
13704
|
+
}
|
|
13705
|
+
],
|
|
13706
|
+
[
|
|
13707
|
+
"path",
|
|
13708
|
+
{
|
|
13709
|
+
d: "M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",
|
|
13710
|
+
key: "3uifl3"
|
|
13711
|
+
}
|
|
13712
|
+
],
|
|
13713
|
+
[
|
|
13714
|
+
"path",
|
|
13715
|
+
{
|
|
13716
|
+
d: "M8 16H3v5",
|
|
13717
|
+
key: "1cv678"
|
|
13718
|
+
}
|
|
13719
|
+
]
|
|
13720
|
+
];
|
|
13721
|
+
const RefreshCw = createLucideIcon("refresh-cw", __iconNode$9);
|
|
13722
|
+
|
|
13723
|
+
const __iconNode$8 = [
|
|
13724
|
+
[
|
|
13725
|
+
"path",
|
|
13726
|
+
{
|
|
13727
|
+
d: "M12 3v18",
|
|
13728
|
+
key: "108xh3"
|
|
13729
|
+
}
|
|
13730
|
+
],
|
|
13731
|
+
[
|
|
13732
|
+
"path",
|
|
13733
|
+
{
|
|
13734
|
+
d: "m19 8 3 8a5 5 0 0 1-6 0zV7",
|
|
13735
|
+
key: "zcdpyk"
|
|
13736
|
+
}
|
|
13737
|
+
],
|
|
13738
|
+
[
|
|
13739
|
+
"path",
|
|
13740
|
+
{
|
|
13741
|
+
d: "M3 7h1a17 17 0 0 0 8-2 17 17 0 0 0 8 2h1",
|
|
13742
|
+
key: "1yorad"
|
|
13743
|
+
}
|
|
13744
|
+
],
|
|
13745
|
+
[
|
|
13746
|
+
"path",
|
|
13747
|
+
{
|
|
13748
|
+
d: "m5 8 3 8a5 5 0 0 1-6 0zV7",
|
|
13749
|
+
key: "eua70x"
|
|
13750
|
+
}
|
|
13751
|
+
],
|
|
13752
|
+
[
|
|
13753
|
+
"path",
|
|
13754
|
+
{
|
|
13755
|
+
d: "M7 21h10",
|
|
13756
|
+
key: "1b0cd5"
|
|
13757
|
+
}
|
|
13758
|
+
]
|
|
13759
|
+
];
|
|
13760
|
+
const Scale = createLucideIcon("scale", __iconNode$8);
|
|
13761
|
+
|
|
13762
|
+
const __iconNode$7 = [
|
|
13763
|
+
[
|
|
13764
|
+
"path",
|
|
13765
|
+
{
|
|
13766
|
+
d: "M14 17H5",
|
|
13767
|
+
key: "gfn3mx"
|
|
13768
|
+
}
|
|
13769
|
+
],
|
|
13770
|
+
[
|
|
13771
|
+
"path",
|
|
13772
|
+
{
|
|
13773
|
+
d: "M19 7h-9",
|
|
13774
|
+
key: "6i9tg"
|
|
13775
|
+
}
|
|
13776
|
+
],
|
|
13777
|
+
[
|
|
13778
|
+
"circle",
|
|
13779
|
+
{
|
|
13780
|
+
cx: "17",
|
|
13781
|
+
cy: "17",
|
|
13782
|
+
r: "3",
|
|
13783
|
+
key: "18b49y"
|
|
13784
|
+
}
|
|
13785
|
+
],
|
|
13786
|
+
[
|
|
13787
|
+
"circle",
|
|
13788
|
+
{
|
|
13789
|
+
cx: "7",
|
|
13790
|
+
cy: "7",
|
|
13791
|
+
r: "3",
|
|
13792
|
+
key: "dfmy0x"
|
|
13793
|
+
}
|
|
13794
|
+
]
|
|
13795
|
+
];
|
|
13796
|
+
const Settings2 = createLucideIcon("settings-2", __iconNode$7);
|
|
13797
|
+
|
|
13798
|
+
const __iconNode$6 = [
|
|
13799
|
+
[
|
|
13800
|
+
"path",
|
|
13801
|
+
{
|
|
13802
|
+
d: "M12 2v13",
|
|
13803
|
+
key: "1km8f5"
|
|
13804
|
+
}
|
|
13805
|
+
],
|
|
13806
|
+
[
|
|
13807
|
+
"path",
|
|
13808
|
+
{
|
|
13809
|
+
d: "m16 6-4-4-4 4",
|
|
13810
|
+
key: "13yo43"
|
|
13811
|
+
}
|
|
13812
|
+
],
|
|
13813
|
+
[
|
|
13814
|
+
"path",
|
|
13815
|
+
{
|
|
13816
|
+
d: "M4 12v8a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-8",
|
|
13817
|
+
key: "1b2hhj"
|
|
13818
|
+
}
|
|
13819
|
+
]
|
|
13820
|
+
];
|
|
13821
|
+
const Share = createLucideIcon("share", __iconNode$6);
|
|
13822
|
+
|
|
13823
|
+
const __iconNode$5 = [
|
|
13824
|
+
[
|
|
13825
|
+
"circle",
|
|
13826
|
+
{
|
|
13827
|
+
cx: "12",
|
|
13828
|
+
cy: "12",
|
|
13829
|
+
r: "10",
|
|
13830
|
+
key: "1mglay"
|
|
13831
|
+
}
|
|
13832
|
+
],
|
|
13833
|
+
[
|
|
13834
|
+
"circle",
|
|
13835
|
+
{
|
|
13836
|
+
cx: "12",
|
|
13837
|
+
cy: "12",
|
|
13838
|
+
r: "6",
|
|
13839
|
+
key: "1vlfrh"
|
|
13840
|
+
}
|
|
13841
|
+
],
|
|
13842
|
+
[
|
|
13843
|
+
"circle",
|
|
13844
|
+
{
|
|
13845
|
+
cx: "12",
|
|
13846
|
+
cy: "12",
|
|
13847
|
+
r: "2",
|
|
13848
|
+
key: "1c9p78"
|
|
13849
|
+
}
|
|
13850
|
+
]
|
|
13851
|
+
];
|
|
13852
|
+
const Target = createLucideIcon("target", __iconNode$5);
|
|
13853
|
+
|
|
13854
|
+
const __iconNode$4 = [
|
|
13855
|
+
[
|
|
13856
|
+
"line",
|
|
13857
|
+
{
|
|
13858
|
+
x1: "10",
|
|
13859
|
+
x2: "14",
|
|
13860
|
+
y1: "2",
|
|
13861
|
+
y2: "2",
|
|
13862
|
+
key: "14vaq8"
|
|
13863
|
+
}
|
|
13864
|
+
],
|
|
13865
|
+
[
|
|
13866
|
+
"line",
|
|
13867
|
+
{
|
|
13868
|
+
x1: "12",
|
|
13869
|
+
x2: "15",
|
|
13870
|
+
y1: "14",
|
|
13871
|
+
y2: "11",
|
|
13872
|
+
key: "17fdiu"
|
|
13873
|
+
}
|
|
13874
|
+
],
|
|
13875
|
+
[
|
|
13876
|
+
"circle",
|
|
13877
|
+
{
|
|
13878
|
+
cx: "12",
|
|
13879
|
+
cy: "14",
|
|
13880
|
+
r: "8",
|
|
13881
|
+
key: "1e1u0o"
|
|
13882
|
+
}
|
|
13883
|
+
]
|
|
13884
|
+
];
|
|
13885
|
+
const Timer = createLucideIcon("timer", __iconNode$4);
|
|
13886
|
+
|
|
13887
|
+
const __iconNode$3 = [
|
|
13500
13888
|
[
|
|
13501
13889
|
"path",
|
|
13502
13890
|
{
|
|
@@ -13542,400 +13930,39 @@ const __iconNode$e = [
|
|
|
13542
13930
|
[
|
|
13543
13931
|
"path",
|
|
13544
13932
|
{
|
|
13545
|
-
d: "m15 19-3-3-3
|
|
13546
|
-
key: "
|
|
13547
|
-
}
|
|
13548
|
-
],
|
|
13549
|
-
[
|
|
13550
|
-
"path",
|
|
13551
|
-
{
|
|
13552
|
-
d: "m15 5-3 3-3-3",
|
|
13553
|
-
key: "19d6lf"
|
|
13554
|
-
}
|
|
13555
|
-
]
|
|
13556
|
-
];
|
|
13557
|
-
const FoldVertical = createLucideIcon("fold-vertical", __iconNode$e);
|
|
13558
|
-
|
|
13559
|
-
const __iconNode$d = [
|
|
13560
|
-
[
|
|
13561
|
-
"line",
|
|
13562
|
-
{
|
|
13563
|
-
x1: "4",
|
|
13564
|
-
x2: "20",
|
|
13565
|
-
y1: "9",
|
|
13566
|
-
y2: "9",
|
|
13567
|
-
key: "4lhtct"
|
|
13568
|
-
}
|
|
13569
|
-
],
|
|
13570
|
-
[
|
|
13571
|
-
"line",
|
|
13572
|
-
{
|
|
13573
|
-
x1: "4",
|
|
13574
|
-
x2: "20",
|
|
13575
|
-
y1: "15",
|
|
13576
|
-
y2: "15",
|
|
13577
|
-
key: "vyu0kd"
|
|
13578
|
-
}
|
|
13579
|
-
],
|
|
13580
|
-
[
|
|
13581
|
-
"line",
|
|
13582
|
-
{
|
|
13583
|
-
x1: "10",
|
|
13584
|
-
x2: "8",
|
|
13585
|
-
y1: "3",
|
|
13586
|
-
y2: "21",
|
|
13587
|
-
key: "1ggp8o"
|
|
13588
|
-
}
|
|
13589
|
-
],
|
|
13590
|
-
[
|
|
13591
|
-
"line",
|
|
13592
|
-
{
|
|
13593
|
-
x1: "16",
|
|
13594
|
-
x2: "14",
|
|
13595
|
-
y1: "3",
|
|
13596
|
-
y2: "21",
|
|
13597
|
-
key: "weycgp"
|
|
13598
|
-
}
|
|
13599
|
-
]
|
|
13600
|
-
];
|
|
13601
|
-
const Hash = createLucideIcon("hash", __iconNode$d);
|
|
13602
|
-
|
|
13603
|
-
const __iconNode$c = [
|
|
13604
|
-
[
|
|
13605
|
-
"circle",
|
|
13606
|
-
{
|
|
13607
|
-
cx: "12",
|
|
13608
|
-
cy: "12",
|
|
13609
|
-
r: "10",
|
|
13610
|
-
key: "1mglay"
|
|
13611
|
-
}
|
|
13612
|
-
],
|
|
13613
|
-
[
|
|
13614
|
-
"path",
|
|
13615
|
-
{
|
|
13616
|
-
d: "M12 16v-4",
|
|
13617
|
-
key: "1dtifu"
|
|
13618
|
-
}
|
|
13619
|
-
],
|
|
13620
|
-
[
|
|
13621
|
-
"path",
|
|
13622
|
-
{
|
|
13623
|
-
d: "M12 8h.01",
|
|
13624
|
-
key: "e9boi3"
|
|
13625
|
-
}
|
|
13626
|
-
]
|
|
13627
|
-
];
|
|
13628
|
-
const Info = createLucideIcon("info", __iconNode$c);
|
|
13629
|
-
|
|
13630
|
-
const __iconNode$b = [
|
|
13631
|
-
[
|
|
13632
|
-
"path",
|
|
13633
|
-
{
|
|
13634
|
-
d: "M13 5h8",
|
|
13635
|
-
key: "a7qcls"
|
|
13636
|
-
}
|
|
13637
|
-
],
|
|
13638
|
-
[
|
|
13639
|
-
"path",
|
|
13640
|
-
{
|
|
13641
|
-
d: "M13 12h8",
|
|
13642
|
-
key: "h98zly"
|
|
13643
|
-
}
|
|
13644
|
-
],
|
|
13645
|
-
[
|
|
13646
|
-
"path",
|
|
13647
|
-
{
|
|
13648
|
-
d: "M13 19h8",
|
|
13649
|
-
key: "c3s6r1"
|
|
13650
|
-
}
|
|
13651
|
-
],
|
|
13652
|
-
[
|
|
13653
|
-
"path",
|
|
13654
|
-
{
|
|
13655
|
-
d: "m3 17 2 2 4-4",
|
|
13656
|
-
key: "1jhpwq"
|
|
13657
|
-
}
|
|
13658
|
-
],
|
|
13659
|
-
[
|
|
13660
|
-
"path",
|
|
13661
|
-
{
|
|
13662
|
-
d: "m3 7 2 2 4-4",
|
|
13663
|
-
key: "1obspn"
|
|
13664
|
-
}
|
|
13665
|
-
]
|
|
13666
|
-
];
|
|
13667
|
-
const ListChecks = createLucideIcon("list-checks", __iconNode$b);
|
|
13668
|
-
|
|
13669
|
-
const __iconNode$a = [
|
|
13670
|
-
[
|
|
13671
|
-
"path",
|
|
13672
|
-
{
|
|
13673
|
-
d: "M16 10a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 14.286V4a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2z",
|
|
13674
|
-
key: "1n2ejm"
|
|
13675
|
-
}
|
|
13676
|
-
],
|
|
13677
|
-
[
|
|
13678
|
-
"path",
|
|
13679
|
-
{
|
|
13680
|
-
d: "M20 9a2 2 0 0 1 2 2v10.286a.71.71 0 0 1-1.212.502l-2.202-2.202A2 2 0 0 0 17.172 19H10a2 2 0 0 1-2-2v-1",
|
|
13681
|
-
key: "1qfcsi"
|
|
13682
|
-
}
|
|
13683
|
-
]
|
|
13684
|
-
];
|
|
13685
|
-
const MessagesSquare = createLucideIcon("messages-square", __iconNode$a);
|
|
13686
|
-
|
|
13687
|
-
const __iconNode$9 = [
|
|
13688
|
-
[
|
|
13689
|
-
"path",
|
|
13690
|
-
{
|
|
13691
|
-
d: "M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",
|
|
13692
|
-
key: "18887p"
|
|
13693
|
-
}
|
|
13694
|
-
]
|
|
13695
|
-
];
|
|
13696
|
-
const MessageSquare = createLucideIcon("message-square", __iconNode$9);
|
|
13697
|
-
|
|
13698
|
-
const __iconNode$8 = [
|
|
13699
|
-
[
|
|
13700
|
-
"rect",
|
|
13701
|
-
{
|
|
13702
|
-
width: "18",
|
|
13703
|
-
height: "18",
|
|
13704
|
-
x: "3",
|
|
13705
|
-
y: "3",
|
|
13706
|
-
rx: "2",
|
|
13707
|
-
key: "afitv7"
|
|
13708
|
-
}
|
|
13709
|
-
],
|
|
13710
|
-
[
|
|
13711
|
-
"path",
|
|
13712
|
-
{
|
|
13713
|
-
d: "M9 3v18",
|
|
13714
|
-
key: "fh3hqa"
|
|
13715
|
-
}
|
|
13716
|
-
]
|
|
13717
|
-
];
|
|
13718
|
-
const PanelLeft = createLucideIcon("panel-left", __iconNode$8);
|
|
13719
|
-
|
|
13720
|
-
const __iconNode$7 = [
|
|
13721
|
-
[
|
|
13722
|
-
"path",
|
|
13723
|
-
{
|
|
13724
|
-
d: "M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",
|
|
13725
|
-
key: "v9h5vc"
|
|
13726
|
-
}
|
|
13727
|
-
],
|
|
13728
|
-
[
|
|
13729
|
-
"path",
|
|
13730
|
-
{
|
|
13731
|
-
d: "M21 3v5h-5",
|
|
13732
|
-
key: "1q7to0"
|
|
13733
|
-
}
|
|
13734
|
-
],
|
|
13735
|
-
[
|
|
13736
|
-
"path",
|
|
13737
|
-
{
|
|
13738
|
-
d: "M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",
|
|
13739
|
-
key: "3uifl3"
|
|
13740
|
-
}
|
|
13741
|
-
],
|
|
13742
|
-
[
|
|
13743
|
-
"path",
|
|
13744
|
-
{
|
|
13745
|
-
d: "M8 16H3v5",
|
|
13746
|
-
key: "1cv678"
|
|
13747
|
-
}
|
|
13748
|
-
]
|
|
13749
|
-
];
|
|
13750
|
-
const RefreshCw = createLucideIcon("refresh-cw", __iconNode$7);
|
|
13751
|
-
|
|
13752
|
-
const __iconNode$6 = [
|
|
13753
|
-
[
|
|
13754
|
-
"path",
|
|
13755
|
-
{
|
|
13756
|
-
d: "M12 3v18",
|
|
13757
|
-
key: "108xh3"
|
|
13758
|
-
}
|
|
13759
|
-
],
|
|
13760
|
-
[
|
|
13761
|
-
"path",
|
|
13762
|
-
{
|
|
13763
|
-
d: "m19 8 3 8a5 5 0 0 1-6 0zV7",
|
|
13764
|
-
key: "zcdpyk"
|
|
13765
|
-
}
|
|
13766
|
-
],
|
|
13767
|
-
[
|
|
13768
|
-
"path",
|
|
13769
|
-
{
|
|
13770
|
-
d: "M3 7h1a17 17 0 0 0 8-2 17 17 0 0 0 8 2h1",
|
|
13771
|
-
key: "1yorad"
|
|
13772
|
-
}
|
|
13773
|
-
],
|
|
13774
|
-
[
|
|
13775
|
-
"path",
|
|
13776
|
-
{
|
|
13777
|
-
d: "m5 8 3 8a5 5 0 0 1-6 0zV7",
|
|
13778
|
-
key: "eua70x"
|
|
13933
|
+
d: "m15 19-3 3-3-3",
|
|
13934
|
+
key: "11eu04"
|
|
13779
13935
|
}
|
|
13780
13936
|
],
|
|
13781
13937
|
[
|
|
13782
13938
|
"path",
|
|
13783
13939
|
{
|
|
13784
|
-
d: "
|
|
13785
|
-
key: "
|
|
13940
|
+
d: "m15 5-3-3-3 3",
|
|
13941
|
+
key: "itvq4r"
|
|
13786
13942
|
}
|
|
13787
13943
|
]
|
|
13788
13944
|
];
|
|
13789
|
-
const
|
|
13945
|
+
const UnfoldVertical = createLucideIcon("unfold-vertical", __iconNode$3);
|
|
13790
13946
|
|
|
13791
|
-
const __iconNode$
|
|
13792
|
-
[
|
|
13793
|
-
"path",
|
|
13794
|
-
{
|
|
13795
|
-
d: "M12 2v13",
|
|
13796
|
-
key: "1km8f5"
|
|
13797
|
-
}
|
|
13798
|
-
],
|
|
13799
|
-
[
|
|
13800
|
-
"path",
|
|
13801
|
-
{
|
|
13802
|
-
d: "m16 6-4-4-4 4",
|
|
13803
|
-
key: "13yo43"
|
|
13804
|
-
}
|
|
13805
|
-
],
|
|
13947
|
+
const __iconNode$2 = [
|
|
13806
13948
|
[
|
|
13807
13949
|
"path",
|
|
13808
13950
|
{
|
|
13809
|
-
d: "
|
|
13810
|
-
key: "
|
|
13811
|
-
}
|
|
13812
|
-
]
|
|
13813
|
-
];
|
|
13814
|
-
const Share = createLucideIcon("share", __iconNode$5);
|
|
13815
|
-
|
|
13816
|
-
const __iconNode$4 = [
|
|
13817
|
-
[
|
|
13818
|
-
"circle",
|
|
13819
|
-
{
|
|
13820
|
-
cx: "12",
|
|
13821
|
-
cy: "12",
|
|
13822
|
-
r: "10",
|
|
13823
|
-
key: "1mglay"
|
|
13824
|
-
}
|
|
13825
|
-
],
|
|
13826
|
-
[
|
|
13827
|
-
"circle",
|
|
13828
|
-
{
|
|
13829
|
-
cx: "12",
|
|
13830
|
-
cy: "12",
|
|
13831
|
-
r: "6",
|
|
13832
|
-
key: "1vlfrh"
|
|
13833
|
-
}
|
|
13834
|
-
],
|
|
13835
|
-
[
|
|
13836
|
-
"circle",
|
|
13837
|
-
{
|
|
13838
|
-
cx: "12",
|
|
13839
|
-
cy: "12",
|
|
13840
|
-
r: "2",
|
|
13841
|
-
key: "1c9p78"
|
|
13842
|
-
}
|
|
13843
|
-
]
|
|
13844
|
-
];
|
|
13845
|
-
const Target = createLucideIcon("target", __iconNode$4);
|
|
13846
|
-
|
|
13847
|
-
const __iconNode$3 = [
|
|
13848
|
-
[
|
|
13849
|
-
"line",
|
|
13850
|
-
{
|
|
13851
|
-
x1: "10",
|
|
13852
|
-
x2: "14",
|
|
13853
|
-
y1: "2",
|
|
13854
|
-
y2: "2",
|
|
13855
|
-
key: "14vaq8"
|
|
13856
|
-
}
|
|
13857
|
-
],
|
|
13858
|
-
[
|
|
13859
|
-
"line",
|
|
13860
|
-
{
|
|
13861
|
-
x1: "12",
|
|
13862
|
-
x2: "15",
|
|
13863
|
-
y1: "14",
|
|
13864
|
-
y2: "11",
|
|
13865
|
-
key: "17fdiu"
|
|
13951
|
+
d: "M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",
|
|
13952
|
+
key: "975kel"
|
|
13866
13953
|
}
|
|
13867
13954
|
],
|
|
13868
13955
|
[
|
|
13869
13956
|
"circle",
|
|
13870
13957
|
{
|
|
13871
13958
|
cx: "12",
|
|
13872
|
-
cy: "
|
|
13873
|
-
r: "
|
|
13874
|
-
key: "
|
|
13875
|
-
}
|
|
13876
|
-
]
|
|
13877
|
-
];
|
|
13878
|
-
const Timer = createLucideIcon("timer", __iconNode$3);
|
|
13879
|
-
|
|
13880
|
-
const __iconNode$2 = [
|
|
13881
|
-
[
|
|
13882
|
-
"path",
|
|
13883
|
-
{
|
|
13884
|
-
d: "M12 22v-6",
|
|
13885
|
-
key: "6o8u61"
|
|
13886
|
-
}
|
|
13887
|
-
],
|
|
13888
|
-
[
|
|
13889
|
-
"path",
|
|
13890
|
-
{
|
|
13891
|
-
d: "M12 8V2",
|
|
13892
|
-
key: "1wkif3"
|
|
13893
|
-
}
|
|
13894
|
-
],
|
|
13895
|
-
[
|
|
13896
|
-
"path",
|
|
13897
|
-
{
|
|
13898
|
-
d: "M4 12H2",
|
|
13899
|
-
key: "rhcxmi"
|
|
13900
|
-
}
|
|
13901
|
-
],
|
|
13902
|
-
[
|
|
13903
|
-
"path",
|
|
13904
|
-
{
|
|
13905
|
-
d: "M10 12H8",
|
|
13906
|
-
key: "s88cx1"
|
|
13907
|
-
}
|
|
13908
|
-
],
|
|
13909
|
-
[
|
|
13910
|
-
"path",
|
|
13911
|
-
{
|
|
13912
|
-
d: "M16 12h-2",
|
|
13913
|
-
key: "10asgb"
|
|
13914
|
-
}
|
|
13915
|
-
],
|
|
13916
|
-
[
|
|
13917
|
-
"path",
|
|
13918
|
-
{
|
|
13919
|
-
d: "M22 12h-2",
|
|
13920
|
-
key: "14jgyd"
|
|
13921
|
-
}
|
|
13922
|
-
],
|
|
13923
|
-
[
|
|
13924
|
-
"path",
|
|
13925
|
-
{
|
|
13926
|
-
d: "m15 19-3 3-3-3",
|
|
13927
|
-
key: "11eu04"
|
|
13928
|
-
}
|
|
13929
|
-
],
|
|
13930
|
-
[
|
|
13931
|
-
"path",
|
|
13932
|
-
{
|
|
13933
|
-
d: "m15 5-3-3-3 3",
|
|
13934
|
-
key: "itvq4r"
|
|
13959
|
+
cy: "7",
|
|
13960
|
+
r: "4",
|
|
13961
|
+
key: "17ys0d"
|
|
13935
13962
|
}
|
|
13936
13963
|
]
|
|
13937
13964
|
];
|
|
13938
|
-
const
|
|
13965
|
+
const User = createLucideIcon("user", __iconNode$2);
|
|
13939
13966
|
|
|
13940
13967
|
const __iconNode$1 = [
|
|
13941
13968
|
[
|
|
@@ -21216,6 +21243,23 @@ function cn(...inputs) {
|
|
|
21216
21243
|
return "default";
|
|
21217
21244
|
}
|
|
21218
21245
|
}
|
|
21246
|
+
/**
|
|
21247
|
+
* Last timeline step for a run: max of stamp track (`stamps` / `steps`) and all node/edge stamp steps.
|
|
21248
|
+
* Used so the visualizer defaults past step 0 when the graph only appears at later steps.
|
|
21249
|
+
*/ function getDefaultTimelineStepForRun(run) {
|
|
21250
|
+
let graphMax = 0;
|
|
21251
|
+
for (const node of run.nodes || []){
|
|
21252
|
+
const s = node.stamp?.step;
|
|
21253
|
+
if (typeof s === "number" && !Number.isNaN(s) && s > graphMax) graphMax = s;
|
|
21254
|
+
}
|
|
21255
|
+
for (const edge of run.edges || []){
|
|
21256
|
+
const s = edge.stamp?.step;
|
|
21257
|
+
if (typeof s === "number" && !Number.isNaN(s) && s > graphMax) graphMax = s;
|
|
21258
|
+
}
|
|
21259
|
+
const stamps = run.stamps || run.steps || [];
|
|
21260
|
+
const stampMax = stamps.length > 0 ? Math.max(0, ...stamps.map((s)=>s.step)) : 0;
|
|
21261
|
+
return Math.max(stampMax, graphMax);
|
|
21262
|
+
}
|
|
21219
21263
|
/**
|
|
21220
21264
|
* Formats tool calls for display in a code block
|
|
21221
21265
|
*/ const formatToolCalls = (toolCalls)=>{
|
|
@@ -21309,18 +21353,20 @@ const AppleIcon = ({ width = "1.5rem", height = "1.5rem" })=>/*#__PURE__*/ React
|
|
|
21309
21353
|
viewBox: "0 0 24 24",
|
|
21310
21354
|
role: "img",
|
|
21311
21355
|
xmlns: "http://www.w3.org/2000/svg"
|
|
21312
|
-
}, /*#__PURE__*/ React.createElement("title", null, "Apple"), /*#__PURE__*/ React.createElement("
|
|
21356
|
+
}, /*#__PURE__*/ React.createElement("title", null, "Apple"), /*#__PURE__*/ React.createElement("g", {
|
|
21357
|
+
transform: "translate(12 12) scale(1.12) translate(-12 -12)"
|
|
21358
|
+
}, /*#__PURE__*/ React.createElement("path", {
|
|
21313
21359
|
d: "M18.71 19.5C17.88 20.74 17 21.95 15.66 21.97C14.32 22 13.89 21.18 12.37 21.18C10.84 21.18 10.37 21.95 9.09997 22C7.78997 22.05 6.79997 20.68 5.95997 19.47C4.24997 17 2.93997 12.45 4.69997 9.39C5.56997 7.87 7.12997 6.91 8.81997 6.88C10.1 6.86 11.32 7.75 12.11 7.75C12.89 7.75 14.37 6.68 15.92 6.84C16.57 6.87 18.39 7.1 19.56 8.82C19.47 8.88 17.39 10.1 17.41 12.63C17.44 15.65 20.06 16.66 20.09 16.67C20.06 16.74 19.67 18.11 18.71 19.5ZM13 3.5C13.73 2.67 14.94 2.04 15.94 2C16.07 3.17 15.6 4.35 14.9 5.19C14.21 6.04 13.07 6.7 11.95 6.61C11.8 5.46 12.36 4.26 13 3.5Z"
|
|
21314
|
-
}));
|
|
21360
|
+
})));
|
|
21315
21361
|
|
|
21316
|
-
function noop$
|
|
21362
|
+
function noop$1() {}
|
|
21317
21363
|
const { resetWarned: rcResetWarned } = util.warning;
|
|
21318
21364
|
let deprecatedWarnList = null;
|
|
21319
21365
|
function resetWarned() {
|
|
21320
21366
|
deprecatedWarnList = null;
|
|
21321
21367
|
rcResetWarned();
|
|
21322
21368
|
}
|
|
21323
|
-
let _warning = noop$
|
|
21369
|
+
let _warning = noop$1;
|
|
21324
21370
|
if (process.env.NODE_ENV !== 'production') {
|
|
21325
21371
|
_warning = (valid, component, message)=>{
|
|
21326
21372
|
util.warning(valid, `[antd: ${component}] ${message}`);
|
|
@@ -21364,7 +21410,7 @@ const WarningContext = /*#__PURE__*/ React__namespace.createContext({});
|
|
|
21364
21410
|
return typeWarning;
|
|
21365
21411
|
} : ()=>{
|
|
21366
21412
|
const noopWarning = ()=>{};
|
|
21367
|
-
noopWarning.deprecated = noop$
|
|
21413
|
+
noopWarning.deprecated = noop$1;
|
|
21368
21414
|
return noopWarning;
|
|
21369
21415
|
};
|
|
21370
21416
|
|
|
@@ -47191,7 +47237,7 @@ const Paragraph = /*#__PURE__*/ React__namespace.forwardRef((props, ref)=>{
|
|
|
47191
47237
|
}, children);
|
|
47192
47238
|
});
|
|
47193
47239
|
|
|
47194
|
-
const Text$
|
|
47240
|
+
const Text$2 = /*#__PURE__*/ React__namespace.forwardRef((props, ref)=>{
|
|
47195
47241
|
const { ellipsis, children, ...restProps } = props;
|
|
47196
47242
|
const mergedEllipsis = React__namespace.useMemo(()=>{
|
|
47197
47243
|
if (ellipsis && typeof ellipsis === 'object') {
|
|
@@ -47238,162 +47284,631 @@ const Title$1 = /*#__PURE__*/ React__namespace.forwardRef((props, ref)=>{
|
|
|
47238
47284
|
});
|
|
47239
47285
|
|
|
47240
47286
|
const Typography = Typography$1;
|
|
47241
|
-
Typography.Text = Text$
|
|
47287
|
+
Typography.Text = Text$2;
|
|
47242
47288
|
Typography.Link = Link$1;
|
|
47243
47289
|
Typography.Title = Title$1;
|
|
47244
47290
|
Typography.Paragraph = Paragraph;
|
|
47245
47291
|
|
|
47246
|
-
const
|
|
47292
|
+
const MAX_TITLE_LEN = 200;
|
|
47293
|
+
const TOOLBAR_ICON_SIZE = 15;
|
|
47294
|
+
const JsonValueTree = ({ data, className, maxHeight = "auto" })=>{
|
|
47247
47295
|
const { theme } = useTheme$1();
|
|
47248
|
-
const
|
|
47249
|
-
|
|
47250
|
-
|
|
47251
|
-
|
|
47252
|
-
|
|
47253
|
-
|
|
47254
|
-
|
|
47255
|
-
|
|
47256
|
-
|
|
47257
|
-
|
|
47258
|
-
|
|
47259
|
-
|
|
47260
|
-
|
|
47261
|
-
|
|
47262
|
-
|
|
47263
|
-
|
|
47264
|
-
|
|
47296
|
+
const { mutedForeground } = theme.colors;
|
|
47297
|
+
const treeData = React.useMemo(()=>buildTreeData(data), [
|
|
47298
|
+
data
|
|
47299
|
+
]);
|
|
47300
|
+
const defaultExpandedKeys = React.useMemo(()=>collectKeysToDepth(treeData, 2), [
|
|
47301
|
+
treeData
|
|
47302
|
+
]);
|
|
47303
|
+
const allExpandableKeys = React.useMemo(()=>collectAllExpandableKeys(treeData), [
|
|
47304
|
+
treeData
|
|
47305
|
+
]);
|
|
47306
|
+
const [expandedKeys, setExpandedKeys] = React.useState(()=>defaultExpandedKeys);
|
|
47307
|
+
const hasBranches = allExpandableKeys.length > 0;
|
|
47308
|
+
const isAllExpanded = hasBranches && allExpandableKeys.every((k)=>expandedKeys.includes(k));
|
|
47309
|
+
React.useEffect(()=>{
|
|
47310
|
+
setExpandedKeys(defaultExpandedKeys);
|
|
47311
|
+
}, [
|
|
47312
|
+
defaultExpandedKeys
|
|
47313
|
+
]);
|
|
47314
|
+
const handleCopyJson = React.useCallback(async ()=>{
|
|
47315
|
+
try {
|
|
47316
|
+
const text = JSON.stringify(data, null, 2);
|
|
47317
|
+
await navigator.clipboard.writeText(text);
|
|
47318
|
+
staticMethods.success("JSON copied to clipboard");
|
|
47319
|
+
} catch {
|
|
47320
|
+
staticMethods.error("Could not copy to clipboard");
|
|
47265
47321
|
}
|
|
47266
|
-
},
|
|
47322
|
+
}, [
|
|
47323
|
+
data
|
|
47324
|
+
]);
|
|
47325
|
+
const handleToggleExpandCollapse = React.useCallback(()=>{
|
|
47326
|
+
if (isAllExpanded) {
|
|
47327
|
+
setExpandedKeys([]);
|
|
47328
|
+
} else {
|
|
47329
|
+
setExpandedKeys(allExpandableKeys);
|
|
47330
|
+
}
|
|
47331
|
+
}, [
|
|
47332
|
+
isAllExpanded,
|
|
47333
|
+
allExpandableKeys
|
|
47334
|
+
]);
|
|
47335
|
+
return /*#__PURE__*/ React.createElement("div", {
|
|
47336
|
+
className: className,
|
|
47267
47337
|
style: {
|
|
47268
|
-
|
|
47269
|
-
|
|
47270
|
-
|
|
47338
|
+
maxHeight,
|
|
47339
|
+
display: "flex",
|
|
47340
|
+
flexDirection: "column",
|
|
47341
|
+
borderRadius: 4,
|
|
47342
|
+
overflow: "hidden"
|
|
47271
47343
|
}
|
|
47272
|
-
}
|
|
47344
|
+
}, /*#__PURE__*/ React.createElement("div", {
|
|
47273
47345
|
style: {
|
|
47274
|
-
|
|
47275
|
-
|
|
47276
|
-
|
|
47346
|
+
display: "flex",
|
|
47347
|
+
justifyContent: "flex-end",
|
|
47348
|
+
alignItems: "center",
|
|
47349
|
+
gap: 2,
|
|
47350
|
+
padding: "4px 6px 2px",
|
|
47351
|
+
flexShrink: 0,
|
|
47352
|
+
background: "transparent"
|
|
47277
47353
|
}
|
|
47278
|
-
}
|
|
47279
|
-
|
|
47280
|
-
|
|
47281
|
-
|
|
47282
|
-
|
|
47283
|
-
|
|
47284
|
-
|
|
47354
|
+
}, /*#__PURE__*/ React.createElement(Tooltip$1, {
|
|
47355
|
+
title: "Copy JSON"
|
|
47356
|
+
}, /*#__PURE__*/ React.createElement(Button$1, {
|
|
47357
|
+
type: "text",
|
|
47358
|
+
size: "small",
|
|
47359
|
+
"aria-label": "Copy JSON to clipboard",
|
|
47360
|
+
icon: /*#__PURE__*/ React.createElement(Copy, {
|
|
47361
|
+
size: TOOLBAR_ICON_SIZE,
|
|
47362
|
+
color: mutedForeground
|
|
47363
|
+
}),
|
|
47364
|
+
onClick: handleCopyJson
|
|
47365
|
+
})), /*#__PURE__*/ React.createElement(Tooltip$1, {
|
|
47366
|
+
title: isAllExpanded ? "Collapse all" : "Expand all"
|
|
47367
|
+
}, /*#__PURE__*/ React.createElement(Button$1, {
|
|
47368
|
+
type: "text",
|
|
47369
|
+
size: "small",
|
|
47370
|
+
"aria-label": isAllExpanded ? "Collapse all tree nodes" : "Expand all tree nodes",
|
|
47371
|
+
disabled: !hasBranches,
|
|
47372
|
+
icon: isAllExpanded ? /*#__PURE__*/ React.createElement(FoldVertical, {
|
|
47373
|
+
size: TOOLBAR_ICON_SIZE,
|
|
47374
|
+
color: mutedForeground
|
|
47375
|
+
}) : /*#__PURE__*/ React.createElement(UnfoldVertical, {
|
|
47376
|
+
size: TOOLBAR_ICON_SIZE,
|
|
47377
|
+
color: mutedForeground
|
|
47378
|
+
}),
|
|
47379
|
+
onClick: handleToggleExpandCollapse
|
|
47380
|
+
}))), /*#__PURE__*/ React.createElement("div", {
|
|
47285
47381
|
style: {
|
|
47286
|
-
|
|
47287
|
-
|
|
47288
|
-
|
|
47382
|
+
flex: 1,
|
|
47383
|
+
minHeight: 0,
|
|
47384
|
+
overflow: "auto",
|
|
47385
|
+
padding: "4px 0"
|
|
47289
47386
|
}
|
|
47290
|
-
}
|
|
47387
|
+
}, /*#__PURE__*/ React.createElement(Tree, {
|
|
47388
|
+
// No showLine — connector lines look like a floating spine for many top-level fields.
|
|
47389
|
+
showLine: true,
|
|
47390
|
+
blockNode: true,
|
|
47391
|
+
expandAction: "click",
|
|
47392
|
+
selectable: false,
|
|
47393
|
+
showIcon: false,
|
|
47394
|
+
treeData: treeData,
|
|
47395
|
+
expandedKeys: expandedKeys,
|
|
47396
|
+
onExpand: (keys)=>setExpandedKeys(keys),
|
|
47397
|
+
rootStyle: {
|
|
47398
|
+
backgroundColor: "transparent",
|
|
47399
|
+
padding: "0 4px"
|
|
47400
|
+
}
|
|
47401
|
+
})));
|
|
47291
47402
|
};
|
|
47292
|
-
|
|
47293
|
-
|
|
47294
|
-
|
|
47295
|
-
|
|
47296
|
-
|
|
47297
|
-
|
|
47298
|
-
|
|
47299
|
-
|
|
47300
|
-
|
|
47301
|
-
|
|
47302
|
-
|
|
47303
|
-
|
|
47304
|
-
|
|
47305
|
-
|
|
47306
|
-
|
|
47307
|
-
|
|
47308
|
-
|
|
47309
|
-
|
|
47310
|
-
|
|
47311
|
-
|
|
47312
|
-
|
|
47313
|
-
|
|
47314
|
-
|
|
47315
|
-
|
|
47316
|
-
|
|
47317
|
-
|
|
47318
|
-
|
|
47319
|
-
|
|
47320
|
-
|
|
47321
|
-
|
|
47322
|
-
|
|
47323
|
-
|
|
47324
|
-
|
|
47325
|
-
|
|
47326
|
-
|
|
47327
|
-
|
|
47328
|
-
|
|
47329
|
-
|
|
47330
|
-
|
|
47331
|
-
|
|
47332
|
-
|
|
47333
|
-
|
|
47334
|
-
|
|
47335
|
-
|
|
47403
|
+
function collectKeysToDepth(nodes, maxDepth, depth = 0) {
|
|
47404
|
+
if (depth >= maxDepth) return [];
|
|
47405
|
+
const keys = [];
|
|
47406
|
+
for (const n of nodes){
|
|
47407
|
+
if (n.children && n.children.length > 0) {
|
|
47408
|
+
keys.push(n.key);
|
|
47409
|
+
keys.push(...collectKeysToDepth(n.children, maxDepth, depth + 1));
|
|
47410
|
+
}
|
|
47411
|
+
}
|
|
47412
|
+
return keys;
|
|
47413
|
+
}
|
|
47414
|
+
function collectAllExpandableKeys(nodes) {
|
|
47415
|
+
const keys = [];
|
|
47416
|
+
for (const n of nodes){
|
|
47417
|
+
if (n.children && n.children.length > 0) {
|
|
47418
|
+
keys.push(n.key);
|
|
47419
|
+
keys.push(...collectAllExpandableKeys(n.children));
|
|
47420
|
+
}
|
|
47421
|
+
}
|
|
47422
|
+
return keys;
|
|
47423
|
+
}
|
|
47424
|
+
/**
|
|
47425
|
+
* Object keys A→Z, but any property whose value is an array is listed after all non-array properties
|
|
47426
|
+
* (each block still A→Z). Tree has no built-in sort — this defines `treeData` order.
|
|
47427
|
+
*/ function sortObjectEntriesForTree(entries) {
|
|
47428
|
+
return [
|
|
47429
|
+
...entries
|
|
47430
|
+
].sort((a, b)=>{
|
|
47431
|
+
const aArr = Array.isArray(a[1]);
|
|
47432
|
+
const bArr = Array.isArray(b[1]);
|
|
47433
|
+
if (aArr !== bArr) {
|
|
47434
|
+
return aArr ? 1 : -1;
|
|
47435
|
+
}
|
|
47436
|
+
return a[0].localeCompare(b[0], undefined, {
|
|
47437
|
+
sensitivity: "base",
|
|
47438
|
+
numeric: true
|
|
47439
|
+
});
|
|
47440
|
+
});
|
|
47441
|
+
}
|
|
47442
|
+
function valueToTreeNodes(value, path) {
|
|
47443
|
+
if (value === null || value === undefined) {
|
|
47444
|
+
return [
|
|
47445
|
+
{
|
|
47446
|
+
key: path,
|
|
47447
|
+
title: formatJsonTreePrimitive(value),
|
|
47448
|
+
isLeaf: true
|
|
47449
|
+
}
|
|
47450
|
+
];
|
|
47451
|
+
}
|
|
47452
|
+
if (Array.isArray(value)) {
|
|
47453
|
+
if (value.length === 0) {
|
|
47454
|
+
return [
|
|
47455
|
+
{
|
|
47456
|
+
key: `${path}.__empty_arr__`,
|
|
47457
|
+
title: "[] (0 items)",
|
|
47458
|
+
isLeaf: true
|
|
47459
|
+
}
|
|
47460
|
+
];
|
|
47461
|
+
}
|
|
47462
|
+
return value.map((item, i)=>{
|
|
47463
|
+
const seg = `[${i}]`;
|
|
47464
|
+
const childPath = `${path}.${escapeDotPathSegment(seg)}`;
|
|
47465
|
+
if (item === null || item === undefined || typeof item !== "object") {
|
|
47466
|
+
return {
|
|
47467
|
+
key: childPath,
|
|
47468
|
+
title: `${seg}: ${formatJsonTreePrimitive(item)}`,
|
|
47469
|
+
isLeaf: true
|
|
47470
|
+
};
|
|
47471
|
+
}
|
|
47472
|
+
if (Array.isArray(item) || isPlainObject(item)) {
|
|
47473
|
+
const children = valueToTreeNodes(item, childPath);
|
|
47474
|
+
return {
|
|
47475
|
+
key: childPath,
|
|
47476
|
+
title: `${seg} (${Array.isArray(item) ? `Array(${item.length})` : `Object(${Object.keys(item).length})`})`,
|
|
47477
|
+
children
|
|
47478
|
+
};
|
|
47479
|
+
}
|
|
47480
|
+
return {
|
|
47481
|
+
key: childPath,
|
|
47482
|
+
title: `${seg}: ${formatJsonTreePrimitive(item)}`,
|
|
47483
|
+
isLeaf: true
|
|
47484
|
+
};
|
|
47485
|
+
});
|
|
47486
|
+
}
|
|
47487
|
+
if (isPlainObject(value)) {
|
|
47488
|
+
const entries = sortObjectEntriesForTree(Object.entries(value));
|
|
47489
|
+
if (entries.length === 0) {
|
|
47490
|
+
return [
|
|
47491
|
+
{
|
|
47492
|
+
key: `${path}.__empty_obj__`,
|
|
47493
|
+
title: "{} (0 keys)",
|
|
47494
|
+
isLeaf: true
|
|
47495
|
+
}
|
|
47496
|
+
];
|
|
47497
|
+
}
|
|
47498
|
+
return entries.map(([k, v])=>{
|
|
47499
|
+
const childPath = `${path}.${escapeDotPathSegment(k)}`;
|
|
47500
|
+
if (v === null || v === undefined || typeof v !== "object") {
|
|
47501
|
+
const text = `${k}: ${formatJsonTreePrimitive(v)}`;
|
|
47502
|
+
const title = text.length > MAX_TITLE_LEN ? /*#__PURE__*/ React.createElement(Tooltip$1, {
|
|
47503
|
+
title: text
|
|
47504
|
+
}, /*#__PURE__*/ React.createElement("span", null, text.slice(0, MAX_TITLE_LEN), "…")) : text;
|
|
47505
|
+
return {
|
|
47506
|
+
key: childPath,
|
|
47507
|
+
title,
|
|
47508
|
+
isLeaf: true
|
|
47509
|
+
};
|
|
47510
|
+
}
|
|
47511
|
+
if (Array.isArray(v) || isPlainObject(v)) {
|
|
47512
|
+
const children = valueToTreeNodes(v, childPath);
|
|
47513
|
+
const summary = Array.isArray(v) ? `Array(${v.length})` : `Object(${Object.keys(v).length})`;
|
|
47514
|
+
return {
|
|
47515
|
+
key: childPath,
|
|
47516
|
+
title: `${k}: ${summary}`,
|
|
47517
|
+
children
|
|
47518
|
+
};
|
|
47519
|
+
}
|
|
47520
|
+
const text = `${k}: ${formatJsonTreePrimitive(v)}`;
|
|
47521
|
+
return {
|
|
47522
|
+
key: childPath,
|
|
47523
|
+
title: text.length > MAX_TITLE_LEN ? /*#__PURE__*/ React.createElement(Tooltip$1, {
|
|
47524
|
+
title: text
|
|
47525
|
+
}, /*#__PURE__*/ React.createElement("span", null, text.slice(0, MAX_TITLE_LEN), "…")) : text,
|
|
47526
|
+
isLeaf: true
|
|
47527
|
+
};
|
|
47528
|
+
});
|
|
47529
|
+
}
|
|
47530
|
+
const text = formatJsonTreePrimitive(value);
|
|
47531
|
+
return [
|
|
47532
|
+
{
|
|
47533
|
+
key: path,
|
|
47534
|
+
title: text.length > MAX_TITLE_LEN ? /*#__PURE__*/ React.createElement(Tooltip$1, {
|
|
47535
|
+
title: text
|
|
47536
|
+
}, /*#__PURE__*/ React.createElement("span", null, text.slice(0, MAX_TITLE_LEN), "…")) : text,
|
|
47537
|
+
isLeaf: true
|
|
47538
|
+
}
|
|
47539
|
+
];
|
|
47540
|
+
}
|
|
47541
|
+
/** Top-level tree for tabular session output: plain object or array of plain objects. */ function buildTreeData(data) {
|
|
47542
|
+
if (data === null || data === undefined) {
|
|
47543
|
+
return [
|
|
47544
|
+
{
|
|
47545
|
+
key: "root",
|
|
47546
|
+
title: String(data),
|
|
47547
|
+
isLeaf: true
|
|
47548
|
+
}
|
|
47549
|
+
];
|
|
47550
|
+
}
|
|
47551
|
+
if (Array.isArray(data)) {
|
|
47552
|
+
if (data.length === 0) {
|
|
47553
|
+
return [
|
|
47554
|
+
{
|
|
47555
|
+
key: "$top",
|
|
47556
|
+
title: "Array (0 items)",
|
|
47557
|
+
isLeaf: true
|
|
47558
|
+
}
|
|
47559
|
+
];
|
|
47560
|
+
}
|
|
47561
|
+
const children = data.map((item, index)=>{
|
|
47562
|
+
const path = `$root[${index}]`;
|
|
47563
|
+
if (!isPlainObject(item)) {
|
|
47564
|
+
return {
|
|
47565
|
+
key: path,
|
|
47566
|
+
title: `[${index}]: ${formatJsonTreePrimitive(item)}`,
|
|
47567
|
+
isLeaf: true
|
|
47568
|
+
};
|
|
47569
|
+
}
|
|
47570
|
+
const itemChildren = valueToTreeNodes(item, path);
|
|
47571
|
+
return {
|
|
47572
|
+
key: path,
|
|
47573
|
+
title: `[${index}] (${Object.keys(item).length} keys)`,
|
|
47574
|
+
children: itemChildren
|
|
47575
|
+
};
|
|
47576
|
+
});
|
|
47577
|
+
return [
|
|
47578
|
+
{
|
|
47579
|
+
key: "$top",
|
|
47580
|
+
title: `Array (${data.length} items)`,
|
|
47581
|
+
children
|
|
47582
|
+
}
|
|
47583
|
+
];
|
|
47584
|
+
}
|
|
47585
|
+
if (isPlainObject(data)) {
|
|
47586
|
+
const objectKeys = Object.keys(data);
|
|
47587
|
+
if (objectKeys.length === 0) {
|
|
47588
|
+
return [
|
|
47589
|
+
{
|
|
47590
|
+
key: "$top",
|
|
47591
|
+
title: "Object (0 keys)",
|
|
47592
|
+
isLeaf: true
|
|
47593
|
+
}
|
|
47594
|
+
];
|
|
47595
|
+
}
|
|
47596
|
+
const children = valueToTreeNodes(data, "$root");
|
|
47597
|
+
return [
|
|
47598
|
+
{
|
|
47599
|
+
key: "$top",
|
|
47600
|
+
title: `Object (${objectKeys.length} keys)`,
|
|
47601
|
+
children
|
|
47602
|
+
}
|
|
47603
|
+
];
|
|
47604
|
+
}
|
|
47605
|
+
return valueToTreeNodes(data, "$root");
|
|
47606
|
+
}
|
|
47336
47607
|
|
|
47337
|
-
const
|
|
47338
|
-
|
|
47339
|
-
|
|
47340
|
-
|
|
47341
|
-
|
|
47342
|
-
|
|
47343
|
-
|
|
47344
|
-
|
|
47608
|
+
const { Text: Text$1 } = Typography;
|
|
47609
|
+
function themedCodeSurface(theme) {
|
|
47610
|
+
return {
|
|
47611
|
+
background: theme.colors.muted,
|
|
47612
|
+
border: `1px solid ${theme.colors.border}`,
|
|
47613
|
+
borderRadius: theme.borderRadius.sm,
|
|
47614
|
+
color: theme.colors.foreground,
|
|
47615
|
+
padding: `calc(${theme.spacing.sm} + ${theme.spacing.xs})`
|
|
47345
47616
|
};
|
|
47346
|
-
|
|
47617
|
+
}
|
|
47618
|
+
function formatContentAsText(content) {
|
|
47619
|
+
if (typeof content === "string") {
|
|
47620
|
+
return content;
|
|
47621
|
+
}
|
|
47622
|
+
if (Array.isArray(content)) {
|
|
47623
|
+
return content.map((item)=>formatContentAsText(item)).join("\n\n");
|
|
47624
|
+
}
|
|
47625
|
+
return JSON.stringify(content, null, 2);
|
|
47626
|
+
}
|
|
47627
|
+
function isTabularData(data) {
|
|
47628
|
+
if (data === null || data === undefined) {
|
|
47629
|
+
return false;
|
|
47630
|
+
}
|
|
47631
|
+
if (typeof data === "object" && !Array.isArray(data) && data.constructor === Object) {
|
|
47632
|
+
return true;
|
|
47633
|
+
}
|
|
47634
|
+
if (Array.isArray(data) && data.length > 0) {
|
|
47635
|
+
return data.every((item)=>item !== null && item !== undefined && typeof item === "object" && !Array.isArray(item) && item.constructor === Object);
|
|
47636
|
+
}
|
|
47637
|
+
return false;
|
|
47638
|
+
}
|
|
47639
|
+
function getRoleDisplayName(role) {
|
|
47640
|
+
return role.charAt(0).toUpperCase() + role.slice(1);
|
|
47641
|
+
}
|
|
47642
|
+
function formatOutputAsText(output, toolOutput) {
|
|
47643
|
+
if (toolOutput !== null && toolOutput !== undefined) {
|
|
47644
|
+
return formatContentAsText(toolOutput);
|
|
47645
|
+
}
|
|
47646
|
+
if (output) {
|
|
47647
|
+
const role = getRoleDisplayName(output.role);
|
|
47648
|
+
const content = formatContentAsText(output.content);
|
|
47649
|
+
return `${role}:\n${content}`;
|
|
47650
|
+
}
|
|
47651
|
+
return "";
|
|
47652
|
+
}
|
|
47653
|
+
const ROLE_ICON_SIZE = 14;
|
|
47654
|
+
function getRoleIcon(role) {
|
|
47655
|
+
const iconProps = {
|
|
47656
|
+
size: ROLE_ICON_SIZE,
|
|
47657
|
+
strokeWidth: 2,
|
|
47658
|
+
"aria-hidden": true
|
|
47659
|
+
};
|
|
47660
|
+
switch(role.toLowerCase()){
|
|
47661
|
+
case "system":
|
|
47662
|
+
return /*#__PURE__*/ React.createElement(Settings2, iconProps);
|
|
47663
|
+
case "user":
|
|
47664
|
+
return /*#__PURE__*/ React.createElement(User, iconProps);
|
|
47665
|
+
case "assistant":
|
|
47666
|
+
return /*#__PURE__*/ React.createElement(Bot, iconProps);
|
|
47667
|
+
case "tool":
|
|
47668
|
+
return /*#__PURE__*/ React.createElement(Wrench, iconProps);
|
|
47669
|
+
default:
|
|
47670
|
+
return /*#__PURE__*/ React.createElement(Wrench, iconProps);
|
|
47671
|
+
}
|
|
47672
|
+
}
|
|
47673
|
+
function renderContentForDisplay(content) {
|
|
47674
|
+
if (typeof content === "string") {
|
|
47675
|
+
return content;
|
|
47676
|
+
}
|
|
47677
|
+
return JSON.stringify(content, null, 2);
|
|
47678
|
+
}
|
|
47679
|
+
function filterKeysWithName(obj) {
|
|
47680
|
+
if (obj === null || obj === undefined) return obj;
|
|
47681
|
+
if (typeof obj !== "object") return obj;
|
|
47682
|
+
if (Array.isArray(obj)) return obj.map(filterKeysWithName);
|
|
47683
|
+
return Object.fromEntries(Object.entries(obj).filter(([key])=>!key.toLowerCase().includes("name")).map(([key, value])=>[
|
|
47684
|
+
key,
|
|
47685
|
+
filterKeysWithName(value)
|
|
47686
|
+
]));
|
|
47687
|
+
}
|
|
47688
|
+
const LLMInputsRenderer = ({ input, modelProvider, modelName, toolStatusMap })=>{
|
|
47689
|
+
const { theme } = useTheme$1();
|
|
47690
|
+
if (!input || input.length === 0) return null;
|
|
47691
|
+
const collapseItems = input.map((item, index)=>{
|
|
47692
|
+
const modelIcon = modelProvider || modelName ? getNodeIcon({
|
|
47693
|
+
modelProvider,
|
|
47694
|
+
modelName
|
|
47695
|
+
}) : null;
|
|
47696
|
+
const isSystemInput = item.role.toLowerCase() === "system";
|
|
47697
|
+
const showModelInfo = isSystemInput && (modelProvider || modelName);
|
|
47698
|
+
const isToolInput = item.role.toLowerCase() === "tool";
|
|
47699
|
+
const isAssistantInput = item.role.toLowerCase() === "assistant";
|
|
47700
|
+
const isUserInput = item.role.toLowerCase() === "user";
|
|
47701
|
+
const toolName = isToolInput && item.content?.name ? item.content.name : null;
|
|
47702
|
+
const toolStatus = toolName && toolStatusMap ? toolStatusMap.get(toolName) : undefined;
|
|
47703
|
+
let assistantToolName = null;
|
|
47704
|
+
if (isAssistantInput && Array.isArray(item.content) && item.content.length > 0) {
|
|
47705
|
+
const firstToolCall = item.content[0];
|
|
47706
|
+
if (firstToolCall?.name) {
|
|
47707
|
+
assistantToolName = firstToolCall.name;
|
|
47708
|
+
}
|
|
47709
|
+
}
|
|
47710
|
+
const roleLabel = toolName ? `Tool` : assistantToolName ? `Assistant` : getRoleDisplayName(item.role);
|
|
47711
|
+
return {
|
|
47712
|
+
key: `input-${index}`,
|
|
47713
|
+
label: /*#__PURE__*/ React.createElement(Text$1, {
|
|
47714
|
+
strong: true,
|
|
47715
|
+
style: {
|
|
47716
|
+
display: "inline-flex",
|
|
47717
|
+
alignItems: "center",
|
|
47718
|
+
lineHeight: 1.35,
|
|
47719
|
+
color: theme.colors.foreground
|
|
47720
|
+
}
|
|
47721
|
+
}, /*#__PURE__*/ React.createElement("span", {
|
|
47722
|
+
style: {
|
|
47723
|
+
display: "inline-flex",
|
|
47724
|
+
alignItems: "center",
|
|
47725
|
+
justifyContent: "center",
|
|
47726
|
+
flexShrink: 0,
|
|
47727
|
+
lineHeight: 0,
|
|
47728
|
+
color: theme.colors.foreground
|
|
47729
|
+
}
|
|
47730
|
+
}, getRoleIcon(item.role)), /*#__PURE__*/ React.createElement("span", {
|
|
47731
|
+
style: {
|
|
47732
|
+
display: "inline-flex",
|
|
47733
|
+
alignItems: "center",
|
|
47734
|
+
marginLeft: theme.spacing.sm
|
|
47735
|
+
}
|
|
47736
|
+
}, roleLabel)),
|
|
47737
|
+
extra: showModelInfo ? /*#__PURE__*/ React.createElement(Space, {
|
|
47738
|
+
size: "small"
|
|
47739
|
+
}, modelIcon && /*#__PURE__*/ React.createElement("span", null, modelIcon), modelName && /*#__PURE__*/ React.createElement("span", {
|
|
47740
|
+
style: {
|
|
47741
|
+
fontSize: theme.fontSize.xs,
|
|
47742
|
+
color: theme.colors.mutedForeground
|
|
47743
|
+
}
|
|
47744
|
+
}, getModelLabel(modelName))) : isToolInput ? /*#__PURE__*/ React.createElement(Tag, {
|
|
47745
|
+
color: toolStatus === "Failed" ? "red" : "blue"
|
|
47746
|
+
}, toolName || "Tool Response") : isUserInput ? /*#__PURE__*/ React.createElement(Tag, {
|
|
47747
|
+
color: "purple"
|
|
47748
|
+
}, "Text") : undefined,
|
|
47749
|
+
children: /*#__PURE__*/ React.createElement("pre", {
|
|
47750
|
+
style: {
|
|
47751
|
+
margin: 0,
|
|
47752
|
+
...themedCodeSurface(theme),
|
|
47753
|
+
whiteSpace: "pre-wrap",
|
|
47754
|
+
wordWrap: "break-word",
|
|
47755
|
+
fontFamily: "monospace",
|
|
47756
|
+
fontSize: theme.fontSize.xs,
|
|
47757
|
+
lineHeight: 1.5,
|
|
47758
|
+
maxHeight: "300px",
|
|
47759
|
+
overflow: "auto"
|
|
47760
|
+
}
|
|
47761
|
+
}, renderContentForDisplay(typeof item.content === "object" && item.content !== null && !Array.isArray(item.content) ? filterKeysWithName(item.content) : item.content))
|
|
47762
|
+
};
|
|
47763
|
+
});
|
|
47764
|
+
return /*#__PURE__*/ React.createElement(Collapse, {
|
|
47765
|
+
items: collapseItems,
|
|
47766
|
+
expandIcon: ()=>null,
|
|
47767
|
+
defaultActiveKey: collapseItems.length > 0 ? [
|
|
47768
|
+
collapseItems[0].key
|
|
47769
|
+
] : [],
|
|
47347
47770
|
style: {
|
|
47348
|
-
|
|
47349
|
-
|
|
47350
|
-
|
|
47351
|
-
color: themeColors.foreground
|
|
47771
|
+
background: "transparent",
|
|
47772
|
+
padding: 0,
|
|
47773
|
+
margin: 0
|
|
47352
47774
|
}
|
|
47353
|
-
}
|
|
47775
|
+
});
|
|
47776
|
+
};
|
|
47777
|
+
function getToolInputText(inputs) {
|
|
47778
|
+
if (inputs.length === 0) return "";
|
|
47779
|
+
const first = inputs[0].content;
|
|
47780
|
+
return renderContentForDisplay(typeof first === "object" && first !== null && !Array.isArray(first) ? filterKeysWithName(first) : first);
|
|
47781
|
+
}
|
|
47782
|
+
const InputsOutputsCollapse = ({ inputs, output, toolOutput, modelProvider, modelName, toolStatusMap, toolInputAsTextarea = false, largeInputsTitle = false, hasInputs: hasInputsProp })=>{
|
|
47783
|
+
const { theme } = useTheme$1();
|
|
47784
|
+
const hasInputs = hasInputsProp ?? inputs.length > 0;
|
|
47785
|
+
const hasOutputs = output !== null || toolOutput !== null;
|
|
47786
|
+
const outputsText = hasOutputs ? formatOutputAsText(output, toolOutput) : "";
|
|
47787
|
+
const isToolOutputTabular = toolOutput !== null && toolOutput !== undefined && isTabularData(toolOutput);
|
|
47788
|
+
const toolInputText = getToolInputText(inputs);
|
|
47789
|
+
const inputsLabel = largeInputsTitle ? /*#__PURE__*/ React.createElement("div", {
|
|
47354
47790
|
style: {
|
|
47355
|
-
|
|
47356
|
-
|
|
47791
|
+
display: "flex",
|
|
47792
|
+
alignItems: "center",
|
|
47793
|
+
gap: theme.spacing.sm
|
|
47357
47794
|
}
|
|
47358
|
-
}, /*#__PURE__*/ React.createElement(
|
|
47795
|
+
}, /*#__PURE__*/ React.createElement(Typography.Title, {
|
|
47796
|
+
level: 2,
|
|
47359
47797
|
style: {
|
|
47360
|
-
|
|
47798
|
+
margin: 0,
|
|
47799
|
+
color: theme.colors.foreground
|
|
47361
47800
|
}
|
|
47362
|
-
},
|
|
47801
|
+
}, "Inputs"), hasInputs && /*#__PURE__*/ React.createElement("span", {
|
|
47363
47802
|
style: {
|
|
47364
|
-
|
|
47803
|
+
display: "inline-flex",
|
|
47804
|
+
alignItems: "center",
|
|
47805
|
+
gap: theme.spacing.xs,
|
|
47806
|
+
color: theme.colors.mutedForeground
|
|
47365
47807
|
}
|
|
47366
|
-
},
|
|
47808
|
+
}, /*#__PURE__*/ React.createElement(MessagesSquare, {
|
|
47809
|
+
size: 12,
|
|
47810
|
+
color: theme.colors.mutedForeground,
|
|
47811
|
+
strokeWidth: 2
|
|
47812
|
+
}), inputs.length)) : /*#__PURE__*/ React.createElement("div", {
|
|
47813
|
+
style: {
|
|
47814
|
+
display: "flex",
|
|
47815
|
+
alignItems: "center",
|
|
47816
|
+
gap: theme.spacing.sm
|
|
47817
|
+
}
|
|
47818
|
+
}, /*#__PURE__*/ React.createElement(Text$1, {
|
|
47819
|
+
strong: true,
|
|
47820
|
+
style: {
|
|
47821
|
+
color: theme.colors.foreground
|
|
47822
|
+
}
|
|
47823
|
+
}, "Inputs"), hasInputs && /*#__PURE__*/ React.createElement("span", {
|
|
47824
|
+
style: {
|
|
47825
|
+
display: "inline-flex",
|
|
47826
|
+
alignItems: "center",
|
|
47827
|
+
gap: theme.spacing.xs,
|
|
47828
|
+
color: theme.colors.mutedForeground
|
|
47829
|
+
}
|
|
47830
|
+
}, /*#__PURE__*/ React.createElement(MessagesSquare, {
|
|
47831
|
+
size: 12,
|
|
47832
|
+
color: theme.colors.mutedForeground,
|
|
47833
|
+
strokeWidth: 2
|
|
47834
|
+
}), inputs.length));
|
|
47835
|
+
const textareaStyle = {
|
|
47836
|
+
width: "100%",
|
|
47837
|
+
minHeight: "200px",
|
|
47838
|
+
resize: "vertical",
|
|
47839
|
+
fontFamily: "monospace",
|
|
47840
|
+
fontSize: theme.fontSize.xs,
|
|
47841
|
+
lineHeight: 1.5,
|
|
47842
|
+
...themedCodeSurface(theme)
|
|
47843
|
+
};
|
|
47844
|
+
const outputPreStyle = {
|
|
47845
|
+
margin: 0,
|
|
47846
|
+
...themedCodeSurface(theme),
|
|
47847
|
+
whiteSpace: "pre-wrap",
|
|
47848
|
+
wordWrap: "break-word",
|
|
47849
|
+
fontFamily: "inherit",
|
|
47850
|
+
fontSize: theme.fontSize.sm,
|
|
47851
|
+
lineHeight: 1.5
|
|
47852
|
+
};
|
|
47853
|
+
const collapseItems = [
|
|
47854
|
+
{
|
|
47855
|
+
key: "inputs",
|
|
47856
|
+
label: inputsLabel,
|
|
47857
|
+
children: hasInputs ? toolInputAsTextarea ? /*#__PURE__*/ React.createElement("textarea", {
|
|
47858
|
+
readOnly: true,
|
|
47859
|
+
value: toolInputText,
|
|
47860
|
+
style: textareaStyle
|
|
47861
|
+
}) : /*#__PURE__*/ React.createElement(LLMInputsRenderer, {
|
|
47862
|
+
input: inputs,
|
|
47863
|
+
modelProvider: modelProvider,
|
|
47864
|
+
modelName: modelName,
|
|
47865
|
+
toolStatusMap: toolStatusMap
|
|
47866
|
+
}) : /*#__PURE__*/ React.createElement(Empty, {
|
|
47867
|
+
description: "No inputs available"
|
|
47868
|
+
})
|
|
47869
|
+
},
|
|
47870
|
+
{
|
|
47871
|
+
key: "outputs",
|
|
47872
|
+
label: /*#__PURE__*/ React.createElement(Text$1, {
|
|
47873
|
+
strong: true,
|
|
47874
|
+
style: {
|
|
47875
|
+
color: theme.colors.foreground
|
|
47876
|
+
}
|
|
47877
|
+
}, "Outputs"),
|
|
47878
|
+
children: hasOutputs ? isToolOutputTabular ? /*#__PURE__*/ React.createElement(JsonValueTree, {
|
|
47879
|
+
data: toolOutput
|
|
47880
|
+
}) : /*#__PURE__*/ React.createElement("pre", {
|
|
47881
|
+
style: outputPreStyle
|
|
47882
|
+
}, outputsText) : /*#__PURE__*/ React.createElement("div", {
|
|
47883
|
+
style: {
|
|
47884
|
+
padding: theme.spacing.md
|
|
47885
|
+
}
|
|
47886
|
+
}, /*#__PURE__*/ React.createElement(Empty, {
|
|
47887
|
+
description: "No outputs available"
|
|
47888
|
+
}))
|
|
47889
|
+
}
|
|
47890
|
+
];
|
|
47891
|
+
return /*#__PURE__*/ React.createElement(Collapse, {
|
|
47892
|
+
ghost: true,
|
|
47893
|
+
bordered: false,
|
|
47894
|
+
items: collapseItems,
|
|
47895
|
+
defaultActiveKey: [
|
|
47896
|
+
"inputs",
|
|
47897
|
+
"outputs"
|
|
47898
|
+
],
|
|
47899
|
+
style: {
|
|
47900
|
+
background: "transparent",
|
|
47901
|
+
padding: 0,
|
|
47902
|
+
margin: 0
|
|
47903
|
+
},
|
|
47904
|
+
styles: {
|
|
47905
|
+
header: {
|
|
47906
|
+
paddingLeft: 0,
|
|
47907
|
+
color: theme.colors.foreground
|
|
47908
|
+
}
|
|
47909
|
+
}
|
|
47910
|
+
});
|
|
47367
47911
|
};
|
|
47368
|
-
const CodeBlockContainer = styled.div`
|
|
47369
|
-
box-sizing: border-box;
|
|
47370
|
-
border-radius: 0.375rem;
|
|
47371
|
-
overflow: hidden;
|
|
47372
|
-
font-family: monospace;
|
|
47373
|
-
font-size: 0.75rem;
|
|
47374
|
-
line-height: 1.4;
|
|
47375
|
-
max-height: 150px;
|
|
47376
|
-
overflow-y: auto;
|
|
47377
|
-
`;
|
|
47378
|
-
const CodeBlockHeader = styled.div`
|
|
47379
|
-
padding: 0.5rem 0.75rem;
|
|
47380
|
-
display: flex;
|
|
47381
|
-
justify-content: space-between;
|
|
47382
|
-
align-items: center;
|
|
47383
|
-
`;
|
|
47384
|
-
const CodeBlockLanguage = styled.span`
|
|
47385
|
-
font-size: 0.625rem;
|
|
47386
|
-
font-weight: 500;
|
|
47387
|
-
text-transform: uppercase;
|
|
47388
|
-
letter-spacing: 0.05em;
|
|
47389
|
-
`;
|
|
47390
|
-
const CodeBlockContent = styled.pre`
|
|
47391
|
-
margin: 0;
|
|
47392
|
-
padding: 0.75rem;
|
|
47393
|
-
white-space: pre-wrap;
|
|
47394
|
-
word-break: break-word;
|
|
47395
|
-
overflow-x: auto;
|
|
47396
|
-
`;
|
|
47397
47912
|
|
|
47398
47913
|
// Styled Components
|
|
47399
47914
|
const TreeNodeContainer = styled.div``;
|
|
@@ -47661,485 +48176,6 @@ const JsonTreeViewer = ({ data, maxDepth = 4, initialExpanded = false, expanded
|
|
|
47661
48176
|
})()));
|
|
47662
48177
|
};
|
|
47663
48178
|
|
|
47664
|
-
/** Max width for rich content (drawer output blocks, etc.) */ const NODE_MAX_WIDTH = 500;
|
|
47665
|
-
/** Compact xyflow node card width range */ const FLOW_NODE_MIN_WIDTH = 176;
|
|
47666
|
-
const FLOW_NODE_MAX_WIDTH = 250;
|
|
47667
|
-
/** Used by auto-layout horizontal spacing (~typical card width between min and max) */ const LAYOUT_NODE_WIDTH = Math.round((FLOW_NODE_MIN_WIDTH + FLOW_NODE_MAX_WIDTH) / 2);
|
|
47668
|
-
|
|
47669
|
-
const OutputRenderer = ({ data })=>{
|
|
47670
|
-
const [isExpanded, setIsExpanded] = React.useState(false);
|
|
47671
|
-
const contentType = detectContentType(data);
|
|
47672
|
-
const handleToggle = ()=>{
|
|
47673
|
-
setIsExpanded(!isExpanded);
|
|
47674
|
-
};
|
|
47675
|
-
switch(contentType){
|
|
47676
|
-
case "string":
|
|
47677
|
-
return /*#__PURE__*/ React.createElement(OutputScrollableContent, {
|
|
47678
|
-
className: "agent-node-scrollable"
|
|
47679
|
-
}, /*#__PURE__*/ React.createElement(ExpandableTextarea, {
|
|
47680
|
-
label: "Output",
|
|
47681
|
-
content: data.content,
|
|
47682
|
-
isExpanded: isExpanded,
|
|
47683
|
-
onToggle: handleToggle
|
|
47684
|
-
}));
|
|
47685
|
-
case "toolResponse":
|
|
47686
|
-
return /*#__PURE__*/ React.createElement(OutputScrollableContent, {
|
|
47687
|
-
className: "agent-node-scrollable"
|
|
47688
|
-
}, /*#__PURE__*/ React.createElement(NodeSubHeader, null, "Output - Tool Response"), /*#__PURE__*/ React.createElement(JsonTreeViewer, {
|
|
47689
|
-
data: data,
|
|
47690
|
-
expanded: true
|
|
47691
|
-
}));
|
|
47692
|
-
case "toolCallList":
|
|
47693
|
-
const formattedCode = formatToolCalls(data.content);
|
|
47694
|
-
return /*#__PURE__*/ React.createElement(React.Fragment, null, /*#__PURE__*/ React.createElement(OutputScrollableContent, {
|
|
47695
|
-
className: "agent-node-scrollable"
|
|
47696
|
-
}, /*#__PURE__*/ React.createElement(NodeSubHeader, null, /*#__PURE__*/ React.createElement("span", null, "Output - Tool Calls"), /*#__PURE__*/ React.createElement("span", {
|
|
47697
|
-
style: {
|
|
47698
|
-
display: "flex",
|
|
47699
|
-
alignItems: "center",
|
|
47700
|
-
gap: "0.25rem"
|
|
47701
|
-
}
|
|
47702
|
-
}, /*#__PURE__*/ React.createElement(CloudLightning, {
|
|
47703
|
-
size: 14
|
|
47704
|
-
}), data.content.length)), /*#__PURE__*/ React.createElement(CodeBlock, {
|
|
47705
|
-
content: formattedCode,
|
|
47706
|
-
language: "tool-calls",
|
|
47707
|
-
showHeader: false
|
|
47708
|
-
})));
|
|
47709
|
-
case "other":
|
|
47710
|
-
default:
|
|
47711
|
-
return /*#__PURE__*/ React.createElement(React.Fragment, null, /*#__PURE__*/ React.createElement(OutputScrollableContent, null, /*#__PURE__*/ React.createElement(NodeSubHeader, null, "Output - JSON"), /*#__PURE__*/ React.createElement(JsonTreeViewer, {
|
|
47712
|
-
data: data,
|
|
47713
|
-
expanded: true
|
|
47714
|
-
})));
|
|
47715
|
-
}
|
|
47716
|
-
};
|
|
47717
|
-
// Styled component for the sub-header
|
|
47718
|
-
const NodeSubHeader = styled.span`
|
|
47719
|
-
margin: 0;
|
|
47720
|
-
padding: 0;
|
|
47721
|
-
font-size: 0.75rem;
|
|
47722
|
-
font-weight: 500;
|
|
47723
|
-
display: flex;
|
|
47724
|
-
justify-content: space-between;
|
|
47725
|
-
align-items: center;
|
|
47726
|
-
color: ${(props)=>props.theme?.colors?.foreground || "hsl(222.2 84% 4.9%)"};
|
|
47727
|
-
|
|
47728
|
-
& span {
|
|
47729
|
-
color: ${(props)=>props.theme?.colors?.mutedForeground || "hsl(215.4 16.3% 46.9%)"};
|
|
47730
|
-
}
|
|
47731
|
-
`;
|
|
47732
|
-
const OutputScrollableContent = styled.div`
|
|
47733
|
-
width: 100%;
|
|
47734
|
-
max-width: ${NODE_MAX_WIDTH}px;
|
|
47735
|
-
display: flex;
|
|
47736
|
-
flex-direction: column;
|
|
47737
|
-
align-items: stretch;
|
|
47738
|
-
padding-bottom: 0.5rem;
|
|
47739
|
-
padding-right: 2px;
|
|
47740
|
-
gap: 0.5rem;
|
|
47741
|
-
`;
|
|
47742
|
-
|
|
47743
|
-
function _objectWithoutPropertiesLoose(r, e) {
|
|
47744
|
-
if (null == r) return {};
|
|
47745
|
-
var t = {};
|
|
47746
|
-
for(var n in r)if (({}).hasOwnProperty.call(r, n)) {
|
|
47747
|
-
if (-1 !== e.indexOf(n)) continue;
|
|
47748
|
-
t[n] = r[n];
|
|
47749
|
-
}
|
|
47750
|
-
return t;
|
|
47751
|
-
}
|
|
47752
|
-
|
|
47753
|
-
var index$1 = React.useLayoutEffect;
|
|
47754
|
-
|
|
47755
|
-
var useLatest = function useLatest(value) {
|
|
47756
|
-
var ref = React.useRef(value);
|
|
47757
|
-
index$1(function() {
|
|
47758
|
-
ref.current = value;
|
|
47759
|
-
});
|
|
47760
|
-
return ref;
|
|
47761
|
-
};
|
|
47762
|
-
|
|
47763
|
-
// basically Exclude<React.ClassAttributes<T>["ref"], string>
|
|
47764
|
-
var updateRef = function updateRef(ref, value) {
|
|
47765
|
-
if (typeof ref === 'function') {
|
|
47766
|
-
ref(value);
|
|
47767
|
-
return;
|
|
47768
|
-
}
|
|
47769
|
-
ref.current = value;
|
|
47770
|
-
};
|
|
47771
|
-
var useComposedRef = function useComposedRef(libRef, userRef) {
|
|
47772
|
-
var prevUserRef = React.useRef();
|
|
47773
|
-
return React.useCallback(function(instance) {
|
|
47774
|
-
libRef.current = instance;
|
|
47775
|
-
if (prevUserRef.current) {
|
|
47776
|
-
updateRef(prevUserRef.current, null);
|
|
47777
|
-
}
|
|
47778
|
-
prevUserRef.current = userRef;
|
|
47779
|
-
if (!userRef) {
|
|
47780
|
-
return;
|
|
47781
|
-
}
|
|
47782
|
-
updateRef(userRef, instance);
|
|
47783
|
-
}, [
|
|
47784
|
-
userRef
|
|
47785
|
-
]);
|
|
47786
|
-
};
|
|
47787
|
-
|
|
47788
|
-
var HIDDEN_TEXTAREA_STYLE = {
|
|
47789
|
-
'min-height': '0',
|
|
47790
|
-
'max-height': 'none',
|
|
47791
|
-
height: '0',
|
|
47792
|
-
visibility: 'hidden',
|
|
47793
|
-
overflow: 'hidden',
|
|
47794
|
-
position: 'absolute',
|
|
47795
|
-
'z-index': '-1000',
|
|
47796
|
-
top: '0',
|
|
47797
|
-
right: '0',
|
|
47798
|
-
display: 'block'
|
|
47799
|
-
};
|
|
47800
|
-
var forceHiddenStyles = function forceHiddenStyles(node) {
|
|
47801
|
-
Object.keys(HIDDEN_TEXTAREA_STYLE).forEach(function(key) {
|
|
47802
|
-
node.style.setProperty(key, HIDDEN_TEXTAREA_STYLE[key], 'important');
|
|
47803
|
-
});
|
|
47804
|
-
};
|
|
47805
|
-
var forceHiddenStyles$1 = forceHiddenStyles;
|
|
47806
|
-
var hiddenTextarea = null;
|
|
47807
|
-
var getHeight = function getHeight(node, sizingData) {
|
|
47808
|
-
var height = node.scrollHeight;
|
|
47809
|
-
if (sizingData.sizingStyle.boxSizing === 'border-box') {
|
|
47810
|
-
// border-box: add border, since height = content + padding + border
|
|
47811
|
-
return height + sizingData.borderSize;
|
|
47812
|
-
}
|
|
47813
|
-
// remove padding, since height = content
|
|
47814
|
-
return height - sizingData.paddingSize;
|
|
47815
|
-
};
|
|
47816
|
-
function calculateNodeHeight(sizingData, value, minRows, maxRows) {
|
|
47817
|
-
if (minRows === void 0) {
|
|
47818
|
-
minRows = 1;
|
|
47819
|
-
}
|
|
47820
|
-
if (maxRows === void 0) {
|
|
47821
|
-
maxRows = Infinity;
|
|
47822
|
-
}
|
|
47823
|
-
if (!hiddenTextarea) {
|
|
47824
|
-
hiddenTextarea = document.createElement('textarea');
|
|
47825
|
-
hiddenTextarea.setAttribute('tabindex', '-1');
|
|
47826
|
-
hiddenTextarea.setAttribute('aria-hidden', 'true');
|
|
47827
|
-
forceHiddenStyles$1(hiddenTextarea);
|
|
47828
|
-
}
|
|
47829
|
-
if (hiddenTextarea.parentNode === null) {
|
|
47830
|
-
document.body.appendChild(hiddenTextarea);
|
|
47831
|
-
}
|
|
47832
|
-
var paddingSize = sizingData.paddingSize, borderSize = sizingData.borderSize, sizingStyle = sizingData.sizingStyle;
|
|
47833
|
-
var boxSizing = sizingStyle.boxSizing;
|
|
47834
|
-
Object.keys(sizingStyle).forEach(function(_key) {
|
|
47835
|
-
var key = _key;
|
|
47836
|
-
hiddenTextarea.style[key] = sizingStyle[key];
|
|
47837
|
-
});
|
|
47838
|
-
forceHiddenStyles$1(hiddenTextarea);
|
|
47839
|
-
hiddenTextarea.value = value;
|
|
47840
|
-
var height = getHeight(hiddenTextarea, sizingData);
|
|
47841
|
-
// Double set and calc due to Firefox bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1795904
|
|
47842
|
-
hiddenTextarea.value = value;
|
|
47843
|
-
height = getHeight(hiddenTextarea, sizingData);
|
|
47844
|
-
// measure height of a textarea with a single row
|
|
47845
|
-
hiddenTextarea.value = 'x';
|
|
47846
|
-
var rowHeight = hiddenTextarea.scrollHeight - paddingSize;
|
|
47847
|
-
var minHeight = rowHeight * minRows;
|
|
47848
|
-
if (boxSizing === 'border-box') {
|
|
47849
|
-
minHeight = minHeight + paddingSize + borderSize;
|
|
47850
|
-
}
|
|
47851
|
-
height = Math.max(minHeight, height);
|
|
47852
|
-
var maxHeight = rowHeight * maxRows;
|
|
47853
|
-
if (boxSizing === 'border-box') {
|
|
47854
|
-
maxHeight = maxHeight + paddingSize + borderSize;
|
|
47855
|
-
}
|
|
47856
|
-
height = Math.min(maxHeight, height);
|
|
47857
|
-
return [
|
|
47858
|
-
height,
|
|
47859
|
-
rowHeight
|
|
47860
|
-
];
|
|
47861
|
-
}
|
|
47862
|
-
var noop$1 = function noop() {};
|
|
47863
|
-
var pick = function pick(props, obj) {
|
|
47864
|
-
return props.reduce(function(acc, prop) {
|
|
47865
|
-
acc[prop] = obj[prop];
|
|
47866
|
-
return acc;
|
|
47867
|
-
}, {});
|
|
47868
|
-
};
|
|
47869
|
-
var SIZING_STYLE = [
|
|
47870
|
-
'borderBottomWidth',
|
|
47871
|
-
'borderLeftWidth',
|
|
47872
|
-
'borderRightWidth',
|
|
47873
|
-
'borderTopWidth',
|
|
47874
|
-
'boxSizing',
|
|
47875
|
-
'fontFamily',
|
|
47876
|
-
'fontSize',
|
|
47877
|
-
'fontStyle',
|
|
47878
|
-
'fontWeight',
|
|
47879
|
-
'letterSpacing',
|
|
47880
|
-
'lineHeight',
|
|
47881
|
-
'paddingBottom',
|
|
47882
|
-
'paddingLeft',
|
|
47883
|
-
'paddingRight',
|
|
47884
|
-
'paddingTop',
|
|
47885
|
-
// non-standard
|
|
47886
|
-
'tabSize',
|
|
47887
|
-
'textIndent',
|
|
47888
|
-
// non-standard
|
|
47889
|
-
'textRendering',
|
|
47890
|
-
'textTransform',
|
|
47891
|
-
'width',
|
|
47892
|
-
'wordBreak',
|
|
47893
|
-
'wordSpacing',
|
|
47894
|
-
'scrollbarGutter'
|
|
47895
|
-
];
|
|
47896
|
-
var isIE = !!document.documentElement.currentStyle;
|
|
47897
|
-
var getSizingData = function getSizingData(node) {
|
|
47898
|
-
var style = window.getComputedStyle(node);
|
|
47899
|
-
if (style === null) {
|
|
47900
|
-
return null;
|
|
47901
|
-
}
|
|
47902
|
-
var sizingStyle = pick(SIZING_STYLE, style);
|
|
47903
|
-
var boxSizing = sizingStyle.boxSizing;
|
|
47904
|
-
// probably node is detached from DOM, can't read computed dimensions
|
|
47905
|
-
if (boxSizing === '') {
|
|
47906
|
-
return null;
|
|
47907
|
-
}
|
|
47908
|
-
// IE (Edge has already correct behaviour) returns content width as computed width
|
|
47909
|
-
// so we need to add manually padding and border widths
|
|
47910
|
-
if (isIE && boxSizing === 'border-box') {
|
|
47911
|
-
sizingStyle.width = parseFloat(sizingStyle.width) + parseFloat(sizingStyle.borderRightWidth) + parseFloat(sizingStyle.borderLeftWidth) + parseFloat(sizingStyle.paddingRight) + parseFloat(sizingStyle.paddingLeft) + 'px';
|
|
47912
|
-
}
|
|
47913
|
-
var paddingSize = parseFloat(sizingStyle.paddingBottom) + parseFloat(sizingStyle.paddingTop);
|
|
47914
|
-
var borderSize = parseFloat(sizingStyle.borderBottomWidth) + parseFloat(sizingStyle.borderTopWidth);
|
|
47915
|
-
return {
|
|
47916
|
-
sizingStyle: sizingStyle,
|
|
47917
|
-
paddingSize: paddingSize,
|
|
47918
|
-
borderSize: borderSize
|
|
47919
|
-
};
|
|
47920
|
-
};
|
|
47921
|
-
var getSizingData$1 = getSizingData;
|
|
47922
|
-
function useListener(target, type, listener) {
|
|
47923
|
-
var latestListener = useLatest(listener);
|
|
47924
|
-
React__namespace.useLayoutEffect(function() {
|
|
47925
|
-
var handler = function handler(ev) {
|
|
47926
|
-
return latestListener.current(ev);
|
|
47927
|
-
};
|
|
47928
|
-
// might happen if document.fonts is not defined, for instance
|
|
47929
|
-
if (!target) {
|
|
47930
|
-
return;
|
|
47931
|
-
}
|
|
47932
|
-
target.addEventListener(type, handler);
|
|
47933
|
-
return function() {
|
|
47934
|
-
return target.removeEventListener(type, handler);
|
|
47935
|
-
};
|
|
47936
|
-
}, []);
|
|
47937
|
-
}
|
|
47938
|
-
var useFormResetListener = function useFormResetListener(libRef, listener) {
|
|
47939
|
-
useListener(document.body, 'reset', function(ev) {
|
|
47940
|
-
if (libRef.current.form === ev.target) {
|
|
47941
|
-
listener(ev);
|
|
47942
|
-
}
|
|
47943
|
-
});
|
|
47944
|
-
};
|
|
47945
|
-
var useWindowResizeListener = function useWindowResizeListener(listener) {
|
|
47946
|
-
useListener(window, 'resize', listener);
|
|
47947
|
-
};
|
|
47948
|
-
var useFontsLoadedListener = function useFontsLoadedListener(listener) {
|
|
47949
|
-
useListener(document.fonts, 'loadingdone', listener);
|
|
47950
|
-
};
|
|
47951
|
-
var _excluded = [
|
|
47952
|
-
"cacheMeasurements",
|
|
47953
|
-
"maxRows",
|
|
47954
|
-
"minRows",
|
|
47955
|
-
"onChange",
|
|
47956
|
-
"onHeightChange"
|
|
47957
|
-
];
|
|
47958
|
-
var TextareaAutosize = function TextareaAutosize(_ref, userRef) {
|
|
47959
|
-
var cacheMeasurements = _ref.cacheMeasurements, maxRows = _ref.maxRows, minRows = _ref.minRows, _ref$onChange = _ref.onChange, onChange = _ref$onChange === void 0 ? noop$1 : _ref$onChange, _ref$onHeightChange = _ref.onHeightChange, onHeightChange = _ref$onHeightChange === void 0 ? noop$1 : _ref$onHeightChange, props = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
47960
|
-
var isControlled = props.value !== undefined;
|
|
47961
|
-
var libRef = React__namespace.useRef(null);
|
|
47962
|
-
var ref = useComposedRef(libRef, userRef);
|
|
47963
|
-
var heightRef = React__namespace.useRef(0);
|
|
47964
|
-
var measurementsCacheRef = React__namespace.useRef();
|
|
47965
|
-
var resizeTextarea = function resizeTextarea() {
|
|
47966
|
-
var node = libRef.current;
|
|
47967
|
-
var nodeSizingData = cacheMeasurements && measurementsCacheRef.current ? measurementsCacheRef.current : getSizingData$1(node);
|
|
47968
|
-
if (!nodeSizingData) {
|
|
47969
|
-
return;
|
|
47970
|
-
}
|
|
47971
|
-
measurementsCacheRef.current = nodeSizingData;
|
|
47972
|
-
var _calculateNodeHeight = calculateNodeHeight(nodeSizingData, node.value || node.placeholder || 'x', minRows, maxRows), height = _calculateNodeHeight[0], rowHeight = _calculateNodeHeight[1];
|
|
47973
|
-
if (heightRef.current !== height) {
|
|
47974
|
-
heightRef.current = height;
|
|
47975
|
-
node.style.setProperty('height', height + "px", 'important');
|
|
47976
|
-
onHeightChange(height, {
|
|
47977
|
-
rowHeight: rowHeight
|
|
47978
|
-
});
|
|
47979
|
-
}
|
|
47980
|
-
};
|
|
47981
|
-
var handleChange = function handleChange(event) {
|
|
47982
|
-
if (!isControlled) {
|
|
47983
|
-
resizeTextarea();
|
|
47984
|
-
}
|
|
47985
|
-
onChange(event);
|
|
47986
|
-
};
|
|
47987
|
-
{
|
|
47988
|
-
React__namespace.useLayoutEffect(resizeTextarea);
|
|
47989
|
-
useFormResetListener(libRef, function() {
|
|
47990
|
-
if (!isControlled) {
|
|
47991
|
-
var currentValue = libRef.current.value;
|
|
47992
|
-
requestAnimationFrame(function() {
|
|
47993
|
-
var node = libRef.current;
|
|
47994
|
-
if (node && currentValue !== node.value) {
|
|
47995
|
-
resizeTextarea();
|
|
47996
|
-
}
|
|
47997
|
-
});
|
|
47998
|
-
}
|
|
47999
|
-
});
|
|
48000
|
-
useWindowResizeListener(resizeTextarea);
|
|
48001
|
-
useFontsLoadedListener(resizeTextarea);
|
|
48002
|
-
return /*#__PURE__*/ React__namespace.createElement("textarea", _extends$1({}, props, {
|
|
48003
|
-
onChange: handleChange,
|
|
48004
|
-
ref: ref
|
|
48005
|
-
}));
|
|
48006
|
-
}
|
|
48007
|
-
};
|
|
48008
|
-
var index = /* #__PURE__ */ React__namespace.forwardRef(TextareaAutosize);
|
|
48009
|
-
|
|
48010
|
-
// Helper function to get emoji for role
|
|
48011
|
-
const getRoleEmoji$1 = (role)=>{
|
|
48012
|
-
switch(role.toLowerCase()){
|
|
48013
|
-
case "system":
|
|
48014
|
-
return "⚙️";
|
|
48015
|
-
case "user":
|
|
48016
|
-
return "👤";
|
|
48017
|
-
case "assistant":
|
|
48018
|
-
return "🤖";
|
|
48019
|
-
case "tool":
|
|
48020
|
-
return "🔧";
|
|
48021
|
-
default:
|
|
48022
|
-
return "🔧"; // fallback
|
|
48023
|
-
}
|
|
48024
|
-
};
|
|
48025
|
-
// Helper function to get display name for role
|
|
48026
|
-
const getRoleDisplayName$1 = (role)=>{
|
|
48027
|
-
return role.charAt(0).toUpperCase() + role.slice(1);
|
|
48028
|
-
};
|
|
48029
|
-
// Component to render input array
|
|
48030
|
-
const InputArrayRenderer = ({ input })=>{
|
|
48031
|
-
const { theme } = useTheme$1();
|
|
48032
|
-
const themeColors = theme?.colors || {
|
|
48033
|
-
muted: "hsl(210 40% 96%)",
|
|
48034
|
-
border: "hsl(214.3 31.8% 91.4%)",
|
|
48035
|
-
foreground: "hsl(222.2 84% 4.9%)"
|
|
48036
|
-
};
|
|
48037
|
-
if (!input || input.length === 0) return null;
|
|
48038
|
-
const renderContent = (content)=>{
|
|
48039
|
-
if (typeof content === "string") {
|
|
48040
|
-
return content;
|
|
48041
|
-
}
|
|
48042
|
-
return JSON.stringify(content);
|
|
48043
|
-
};
|
|
48044
|
-
return /*#__PURE__*/ React.createElement(InputArrayContainer, null, /*#__PURE__*/ React.createElement(InputArrayHeader, null, /*#__PURE__*/ React.createElement("h3", null, "Input"), /*#__PURE__*/ React.createElement("span", {
|
|
48045
|
-
style: {
|
|
48046
|
-
display: "flex",
|
|
48047
|
-
alignItems: "center",
|
|
48048
|
-
gap: "0.25rem"
|
|
48049
|
-
}
|
|
48050
|
-
}, /*#__PURE__*/ React.createElement(MessageSquare, {
|
|
48051
|
-
size: 12
|
|
48052
|
-
}), input.length)), /*#__PURE__*/ React.createElement(InputArrayScrollableContent, {
|
|
48053
|
-
className: "agent-node-scrollable"
|
|
48054
|
-
}, input.map((item, index)=>/*#__PURE__*/ React.createElement(InputItem, {
|
|
48055
|
-
key: index
|
|
48056
|
-
}, /*#__PURE__*/ React.createElement(InputItemHeader, null, /*#__PURE__*/ React.createElement(InputItemLabel, null, getRoleEmoji$1(item.role), " ", getRoleDisplayName$1(item.role))), /*#__PURE__*/ React.createElement(InputItemTextarea, {
|
|
48057
|
-
onClick: (e)=>{
|
|
48058
|
-
e.stopPropagation();
|
|
48059
|
-
},
|
|
48060
|
-
value: renderContent(item.content) || "",
|
|
48061
|
-
readOnly: true,
|
|
48062
|
-
style: {
|
|
48063
|
-
border: `1px solid ${themeColors.border}`,
|
|
48064
|
-
backgroundColor: themeColors.muted,
|
|
48065
|
-
color: themeColors.foreground
|
|
48066
|
-
},
|
|
48067
|
-
className: "agent-node-scrollable"
|
|
48068
|
-
})))));
|
|
48069
|
-
};
|
|
48070
|
-
// Styled components
|
|
48071
|
-
const InputArrayContainer = styled.div`
|
|
48072
|
-
width: 100%;
|
|
48073
|
-
display: flex;
|
|
48074
|
-
flex-direction: column;
|
|
48075
|
-
gap: 0.5rem;
|
|
48076
|
-
`;
|
|
48077
|
-
const InputArrayScrollableContent = styled.div`
|
|
48078
|
-
width: 100%;
|
|
48079
|
-
display: flex;
|
|
48080
|
-
flex-direction: column;
|
|
48081
|
-
padding-bottom: 0.5rem;
|
|
48082
|
-
padding-right: 2px;
|
|
48083
|
-
gap: 0.5rem;
|
|
48084
|
-
max-height: 200px;
|
|
48085
|
-
overflow-y: auto;
|
|
48086
|
-
`;
|
|
48087
|
-
const InputArrayHeader = styled.div`
|
|
48088
|
-
display: flex;
|
|
48089
|
-
align-items: center;
|
|
48090
|
-
justify-content: space-between;
|
|
48091
|
-
font-weight: 500;
|
|
48092
|
-
font-size: 0.75rem;
|
|
48093
|
-
color: ${(props)=>props.theme?.colors?.foreground || "hsl(222.2 84% 4.9%)"};
|
|
48094
|
-
|
|
48095
|
-
& h3 {
|
|
48096
|
-
margin: 0;
|
|
48097
|
-
padding: 0;
|
|
48098
|
-
font-size: 0.75rem;
|
|
48099
|
-
font-weight: 500;
|
|
48100
|
-
color: ${(props)=>props.theme?.colors?.foreground || "hsl(222.2 84% 4.9%)"};
|
|
48101
|
-
}
|
|
48102
|
-
|
|
48103
|
-
& span {
|
|
48104
|
-
font-size: 0.75rem;
|
|
48105
|
-
font-weight: 500;
|
|
48106
|
-
opacity: 0.5;
|
|
48107
|
-
color: ${(props)=>props.theme?.colors?.foreground || "hsl(222.2 84% 4.9%)"};
|
|
48108
|
-
}
|
|
48109
|
-
`;
|
|
48110
|
-
const InputItem = styled.div`
|
|
48111
|
-
width: 100%;
|
|
48112
|
-
display: flex;
|
|
48113
|
-
flex-direction: column;
|
|
48114
|
-
gap: 0.25rem;
|
|
48115
|
-
`;
|
|
48116
|
-
const InputItemHeader = styled.div`
|
|
48117
|
-
display: flex;
|
|
48118
|
-
align-items: center;
|
|
48119
|
-
gap: 0.25rem;
|
|
48120
|
-
`;
|
|
48121
|
-
const InputItemLabel = styled.span`
|
|
48122
|
-
font-weight: 600;
|
|
48123
|
-
font-size: 0.75rem;
|
|
48124
|
-
color: ${(props)=>props.theme?.colors?.mutedForeground || "hsl(215.4 16.3% 46.9%)"};
|
|
48125
|
-
`;
|
|
48126
|
-
const InputItemTextarea = styled(index)`
|
|
48127
|
-
box-sizing: border-box;
|
|
48128
|
-
width: 100%;
|
|
48129
|
-
border-radius: 0.25rem;
|
|
48130
|
-
padding: 0.5rem;
|
|
48131
|
-
resize: none;
|
|
48132
|
-
font-family: inherit;
|
|
48133
|
-
font-size: 0.75rem;
|
|
48134
|
-
&:focus {
|
|
48135
|
-
outline: none;
|
|
48136
|
-
border-color: ${(props)=>props.theme?.colors?.primary || "hsl(221.2 83.2% 53.3%)"};
|
|
48137
|
-
box-shadow: 0 0 0 1px ${(props)=>props.theme?.colors?.primary || "hsl(221.2 83.2% 53.3%)"};
|
|
48138
|
-
}
|
|
48139
|
-
|
|
48140
|
-
transition: all 0.2s ease-in-out;
|
|
48141
|
-
`;
|
|
48142
|
-
|
|
48143
48179
|
const DEFAULT_COUNTUP_DURATION = 0.6;
|
|
48144
48180
|
// Helper component for animating currency values
|
|
48145
48181
|
const CountUpCurrency = ({ value, prefix = "", suffix = "" })=>{
|
|
@@ -48204,6 +48240,36 @@ const CountUpLatency = ({ value })=>{
|
|
|
48204
48240
|
}
|
|
48205
48241
|
return Object.keys(base).length > 0 ? base : null;
|
|
48206
48242
|
}
|
|
48243
|
+
/** Tool drawer I/O from first edge detail (aligned with session-details getNodeInputsOutputs for Tool). */ function buildToolDrawerIo(nodeData) {
|
|
48244
|
+
const toolName = nodeData.label || "Tool";
|
|
48245
|
+
const d0 = nodeData.edgeDetails?.[0];
|
|
48246
|
+
const toolInputs = {};
|
|
48247
|
+
if (d0?.input_args && d0.input_args.length > 0) {
|
|
48248
|
+
toolInputs.args = d0.input_args;
|
|
48249
|
+
}
|
|
48250
|
+
if (d0?.input_kwargs && Object.keys(d0.input_kwargs).length > 0) {
|
|
48251
|
+
Object.assign(toolInputs, d0.input_kwargs);
|
|
48252
|
+
}
|
|
48253
|
+
const inputs = Object.keys(toolInputs).length > 0 ? [
|
|
48254
|
+
{
|
|
48255
|
+
role: "tool",
|
|
48256
|
+
content: {
|
|
48257
|
+
name: toolName,
|
|
48258
|
+
...toolInputs
|
|
48259
|
+
}
|
|
48260
|
+
}
|
|
48261
|
+
] : [];
|
|
48262
|
+
const toolOutput = d0?.output !== undefined ? d0.output : null;
|
|
48263
|
+
const toolStatusMap = new Map();
|
|
48264
|
+
if (d0?.status) {
|
|
48265
|
+
toolStatusMap.set(toolName, d0.status);
|
|
48266
|
+
}
|
|
48267
|
+
return {
|
|
48268
|
+
inputs,
|
|
48269
|
+
toolOutput,
|
|
48270
|
+
toolStatusMap
|
|
48271
|
+
};
|
|
48272
|
+
}
|
|
48207
48273
|
const NodeDetailsDrawer = ({ isVisible, onClose, nodeData })=>{
|
|
48208
48274
|
const { theme } = useTheme$1();
|
|
48209
48275
|
const [selectedRowIndex, setSelectedRowIndex] = React.useState(null);
|
|
@@ -48245,12 +48311,15 @@ const NodeDetailsDrawer = ({ isVisible, onClose, nodeData })=>{
|
|
|
48245
48311
|
const totalOutputTokens = sumTotalOutputTokens(llmDetailsList);
|
|
48246
48312
|
const totalLatency = sumTotalLatency(llmDetailsList);
|
|
48247
48313
|
const toolDrawerPayload = nodeType === "Tool" ? buildToolDrawerPayload(nodeData) : null;
|
|
48314
|
+
const toolDrawerIo = nodeType === "Tool" ? buildToolDrawerIo(nodeData) : null;
|
|
48315
|
+
const hasToolEdgeIo = toolDrawerIo != null && (toolDrawerIo.inputs.length > 0 || toolDrawerIo.toolOutput != null);
|
|
48316
|
+
const showToolLegacyJson = nodeType === "Tool" && !hasToolEdgeIo && toolDrawerPayload != null;
|
|
48248
48317
|
const nodeLatencySeconds = nodeData.details?.internals?.latency?.total_time;
|
|
48249
48318
|
const drawerTitle = /*#__PURE__*/ React.createElement(DrawerTitleContent, null, /*#__PURE__*/ React.createElement(NodeIcon$2, null, getNodeIcon({
|
|
48250
48319
|
nodeType: (nodeData.nodeType || "Agent").toLowerCase(),
|
|
48251
48320
|
modelProvider: llOverviewDetails?.model_provider,
|
|
48252
48321
|
modelName: llOverviewDetails?.model_name
|
|
48253
|
-
})), /*#__PURE__*/ React.createElement("span", null, nodeData.label
|
|
48322
|
+
})), /*#__PURE__*/ React.createElement("span", null, nodeData.label));
|
|
48254
48323
|
return /*#__PURE__*/ React.createElement(Drawer$2, {
|
|
48255
48324
|
title: drawerTitle,
|
|
48256
48325
|
placement: "right",
|
|
@@ -48270,7 +48339,7 @@ const NodeDetailsDrawer = ({ isVisible, onClose, nodeData })=>{
|
|
|
48270
48339
|
"aria-label": "Close drawer"
|
|
48271
48340
|
})
|
|
48272
48341
|
},
|
|
48273
|
-
size: "
|
|
48342
|
+
size: "600px",
|
|
48274
48343
|
getContainer: ()=>document.body,
|
|
48275
48344
|
zIndex: 1100,
|
|
48276
48345
|
"data-testid": "node-details-drawer",
|
|
@@ -48286,7 +48355,16 @@ const NodeDetailsDrawer = ({ isVisible, onClose, nodeData })=>{
|
|
|
48286
48355
|
}
|
|
48287
48356
|
}, /*#__PURE__*/ React.createElement(DrawerBodyContent, {
|
|
48288
48357
|
"data-testid": "node-details-drawer-content"
|
|
48289
|
-
}, nodeType === "Tool" && /*#__PURE__*/ React.createElement(React.Fragment, null, nodeLatencySeconds != null && /*#__PURE__*/ React.createElement(Section, null, /*#__PURE__*/ React.createElement(InfoItem, null, /*#__PURE__*/ React.createElement(InfoLabel, null, "Latency"), /*#__PURE__*/ React.createElement(InfoValue, null, formatLatency(nodeLatencySeconds)))),
|
|
48358
|
+
}, nodeType === "Tool" && /*#__PURE__*/ React.createElement(React.Fragment, null, nodeLatencySeconds != null && /*#__PURE__*/ React.createElement(Section, null, /*#__PURE__*/ React.createElement(InfoItem, null, /*#__PURE__*/ React.createElement(InfoLabel, null, "Latency"), /*#__PURE__*/ React.createElement(InfoValue, null, formatLatency(nodeLatencySeconds)))), hasToolEdgeIo && toolDrawerIo ? /*#__PURE__*/ React.createElement(Section, {
|
|
48359
|
+
"data-testid": "tool-drawer-json"
|
|
48360
|
+
}, /*#__PURE__*/ React.createElement(InputsOutputsCollapse, {
|
|
48361
|
+
inputs: toolDrawerIo.inputs,
|
|
48362
|
+
output: null,
|
|
48363
|
+
toolOutput: toolDrawerIo.toolOutput,
|
|
48364
|
+
toolStatusMap: toolDrawerIo.toolStatusMap,
|
|
48365
|
+
toolInputAsTextarea: true,
|
|
48366
|
+
hasInputs: toolDrawerIo.inputs.length > 0
|
|
48367
|
+
})) : showToolLegacyJson ? /*#__PURE__*/ React.createElement(Section, {
|
|
48290
48368
|
"data-testid": "tool-drawer-json"
|
|
48291
48369
|
}, /*#__PURE__*/ React.createElement(JsonTreeViewer, {
|
|
48292
48370
|
excludeKeys: [
|
|
@@ -48298,7 +48376,7 @@ const NodeDetailsDrawer = ({ isVisible, onClose, nodeData })=>{
|
|
|
48298
48376
|
const isAggregateSelected = selectedRowIndex === llmDetails.length;
|
|
48299
48377
|
const selectedDetails = isAggregateSelected ? null // Use aggregate values
|
|
48300
48378
|
: llmDetails[selectedRowIndex || 0];
|
|
48301
|
-
return /*#__PURE__*/ React.createElement(React.Fragment, null, /*#__PURE__*/ React.createElement(InfoItem, null, /*#__PURE__*/ React.createElement(InfoLabel, null, "Model"), /*#__PURE__*/ React.createElement(InfoValue, null, isAggregateSelected ? llOverviewDetails.model_name : selectedDetails?.model_name || "N/A")), /*#__PURE__*/ React.createElement(InfoItem, null, /*#__PURE__*/ React.createElement(InfoLabel, null, "Provider"), /*#__PURE__*/ React.createElement(InfoValue, null, isAggregateSelected ? getProviderLabel(llOverviewDetails.model_name, llOverviewDetails.model_provider) : selectedDetails ? getProviderLabel(selectedDetails.model_name, selectedDetails.model_provider) : "N/A")), /*#__PURE__*/ React.createElement(InfoItem, null, /*#__PURE__*/ React.createElement(InfoLabel, null, isAggregateSelected ? "Total" : "", " Latency"), /*#__PURE__*/ React.createElement(InfoValue, null, isAggregateSelected ? totalLatency ? /*#__PURE__*/ React.createElement(CountUpLatency, {
|
|
48379
|
+
return /*#__PURE__*/ React.createElement(React.Fragment, null, /*#__PURE__*/ React.createElement(InfoItem, null, /*#__PURE__*/ React.createElement(InfoLabel, null, "Model"), /*#__PURE__*/ React.createElement(InfoValue, null, isAggregateSelected ? getModelLabel(llOverviewDetails.model_name) || "N/A" : getModelLabel(selectedDetails?.model_name) || "N/A")), /*#__PURE__*/ React.createElement(InfoItem, null, /*#__PURE__*/ React.createElement(InfoLabel, null, "Provider"), /*#__PURE__*/ React.createElement(InfoValue, null, isAggregateSelected ? getProviderLabel(llOverviewDetails.model_name, llOverviewDetails.model_provider) : selectedDetails ? getProviderLabel(selectedDetails.model_name, selectedDetails.model_provider) : "N/A")), /*#__PURE__*/ React.createElement(InfoItem, null, /*#__PURE__*/ React.createElement(InfoLabel, null, isAggregateSelected ? "Total" : "", " Latency"), /*#__PURE__*/ React.createElement(InfoValue, null, isAggregateSelected ? totalLatency ? /*#__PURE__*/ React.createElement(CountUpLatency, {
|
|
48302
48380
|
value: totalLatency
|
|
48303
48381
|
}) : "N/A" : selectedDetails?.latency ? /*#__PURE__*/ React.createElement(CountUpLatency, {
|
|
48304
48382
|
value: selectedDetails.latency
|
|
@@ -48333,11 +48411,13 @@ const NodeDetailsDrawer = ({ isVisible, onClose, nodeData })=>{
|
|
|
48333
48411
|
}) : "N/A")));
|
|
48334
48412
|
})())), nodeType === "Agent" && llOverviewDetails && llmDetailsList.length === 1 && /*#__PURE__*/ React.createElement(Section, {
|
|
48335
48413
|
"data-testid": "agent-single-llm-messages"
|
|
48336
|
-
}, /*#__PURE__*/ React.createElement(
|
|
48337
|
-
|
|
48338
|
-
|
|
48339
|
-
|
|
48340
|
-
|
|
48414
|
+
}, /*#__PURE__*/ React.createElement(InputsOutputsCollapse, {
|
|
48415
|
+
inputs: llOverviewDetails.input || [],
|
|
48416
|
+
output: llOverviewDetails.output ?? null,
|
|
48417
|
+
toolOutput: null,
|
|
48418
|
+
modelProvider: llOverviewDetails.model_provider,
|
|
48419
|
+
modelName: llOverviewDetails.model_name
|
|
48420
|
+
})), nodeType === "Agent" && llmDetailsList.length > 1 && /*#__PURE__*/ React.createElement(Section, null, /*#__PURE__*/ React.createElement(TableWrapper, null, /*#__PURE__*/ React.createElement("table", null, /*#__PURE__*/ React.createElement("thead", null, /*#__PURE__*/ React.createElement("tr", null, /*#__PURE__*/ React.createElement("th", {
|
|
48341
48421
|
style: {
|
|
48342
48422
|
textAlign: "center"
|
|
48343
48423
|
}
|
|
@@ -48435,10 +48515,12 @@ const NodeDetailsDrawer = ({ isVisible, onClose, nodeData })=>{
|
|
|
48435
48515
|
}
|
|
48436
48516
|
}, totalLatency ? /*#__PURE__*/ React.createElement(CountUpLatency, {
|
|
48437
48517
|
value: totalLatency
|
|
48438
|
-
}) : "N/A"))))), selectedLlmDetails ? /*#__PURE__*/ React.createElement(FadingSection, null, /*#__PURE__*/ React.createElement(
|
|
48439
|
-
|
|
48440
|
-
|
|
48441
|
-
|
|
48518
|
+
}) : "N/A"))))), selectedLlmDetails ? /*#__PURE__*/ React.createElement(FadingSection, null, /*#__PURE__*/ React.createElement(InputsOutputsCollapse, {
|
|
48519
|
+
inputs: selectedLlmDetails.input || [],
|
|
48520
|
+
output: selectedLlmDetails.output ?? null,
|
|
48521
|
+
toolOutput: null,
|
|
48522
|
+
modelProvider: selectedLlmDetails.model_provider,
|
|
48523
|
+
modelName: selectedLlmDetails.model_name
|
|
48442
48524
|
})) : null)));
|
|
48443
48525
|
};
|
|
48444
48526
|
// Styled components
|
|
@@ -48566,6 +48648,10 @@ const NodeIcon$2 = styled.div`
|
|
|
48566
48648
|
color: ${(p)=>p.theme?.colors?.foreground ?? "inherit"};
|
|
48567
48649
|
`;
|
|
48568
48650
|
|
|
48651
|
+
/** Compact xyflow node card width range */ const FLOW_NODE_MIN_WIDTH = 176;
|
|
48652
|
+
const FLOW_NODE_MAX_WIDTH = 250;
|
|
48653
|
+
/** Used by auto-layout horizontal spacing (~typical card width between min and max) */ const LAYOUT_NODE_WIDTH = Math.round((FLOW_NODE_MIN_WIDTH + FLOW_NODE_MAX_WIDTH) / 2);
|
|
48654
|
+
|
|
48569
48655
|
// Helper to resolve icon when provider is Unknown - use model_name as fallback (e.g. "apple-on-device" -> Apple)
|
|
48570
48656
|
const resolveProviderFromModelName = (modelName)=>{
|
|
48571
48657
|
const normalized = modelName?.toLowerCase();
|
|
@@ -48577,7 +48663,11 @@ const resolveProviderFromModelName = (modelName)=>{
|
|
|
48577
48663
|
*/ const getNodeIcon = (options = {})=>{
|
|
48578
48664
|
const { nodeType, modelProvider, modelName, size = 16 } = options ?? {};
|
|
48579
48665
|
const normalizedNodeType = nodeType?.toLowerCase();
|
|
48580
|
-
if (normalizedNodeType === "tool") return
|
|
48666
|
+
if (normalizedNodeType === "tool") return /*#__PURE__*/ React.createElement(Wrench, {
|
|
48667
|
+
size: size,
|
|
48668
|
+
strokeWidth: 2,
|
|
48669
|
+
"aria-hidden": true
|
|
48670
|
+
});
|
|
48581
48671
|
const normalizedProvider = modelProvider?.toLowerCase();
|
|
48582
48672
|
const resolvedProvider = !normalizedProvider || normalizedProvider === "unknown" ? resolveProviderFromModelName(modelName) : normalizedProvider;
|
|
48583
48673
|
if (resolvedProvider === "openai") return /*#__PURE__*/ React.createElement(OpenAIIcon, {
|
|
@@ -48627,6 +48717,17 @@ const PROVIDER_LABELS = {
|
|
|
48627
48717
|
}
|
|
48628
48718
|
return PROVIDER_LABELS[normalizedProvider] ?? toTitleCase(modelProvider);
|
|
48629
48719
|
};
|
|
48720
|
+
const MODEL_DISPLAY_NAMES = {
|
|
48721
|
+
"apple-on-device": "Apple on Device"
|
|
48722
|
+
};
|
|
48723
|
+
/**
|
|
48724
|
+
* Display label for a Railtracks model_name slug (frontend copy only; does not alter data).
|
|
48725
|
+
*/ const getModelLabel = (modelName)=>{
|
|
48726
|
+
const trimmed = modelName?.trim() ?? "";
|
|
48727
|
+
if (!trimmed) return "";
|
|
48728
|
+
const key = trimmed.toLowerCase();
|
|
48729
|
+
return MODEL_DISPLAY_NAMES[key] ?? trimmed;
|
|
48730
|
+
};
|
|
48630
48731
|
const getOverviewLlmDetails = (llmDetails)=>{
|
|
48631
48732
|
if (!llmDetails) return null;
|
|
48632
48733
|
return llmDetails[llmDetails.length - 1];
|
|
@@ -48698,7 +48799,7 @@ const AgentNode = ({ data, id, onInspect, defaultDrawerOpen })=>{
|
|
|
48698
48799
|
}, /*#__PURE__*/ React.createElement(Cpu, {
|
|
48699
48800
|
size: 12,
|
|
48700
48801
|
strokeWidth: 2
|
|
48701
|
-
})), /*#__PURE__*/ React.createElement(MetaLineText, null,
|
|
48802
|
+
})), /*#__PURE__*/ React.createElement(MetaLineText, null, getModelLabel(modelName) || "—")), /*#__PURE__*/ React.createElement(CostLine, null, /*#__PURE__*/ React.createElement(CostLineIcon, {
|
|
48702
48803
|
"aria-hidden": true
|
|
48703
48804
|
}, /*#__PURE__*/ React.createElement(CircleDollarSign, {
|
|
48704
48805
|
size: 13,
|
|
@@ -52329,19 +52430,18 @@ const AgenticFlowVisualizer = ({ flowData: propFlowData, width = "100dvw", heigh
|
|
|
52329
52430
|
width: typeof width === "number" ? width : 1200,
|
|
52330
52431
|
height: typeof height === "number" ? height : 600
|
|
52331
52432
|
});
|
|
52332
|
-
// Timeline state
|
|
52333
|
-
const [currentStep, setCurrentStep] = React.useState(
|
|
52433
|
+
// Timeline state — start at final step so first paint isn't empty when the graph begins after step 0
|
|
52434
|
+
const [currentStep, setCurrentStep] = React.useState(()=>getDefaultTimelineStepForRun(flowData));
|
|
52334
52435
|
const [isPlaying, setIsPlaying] = React.useState(false);
|
|
52335
52436
|
const playIntervalRef = React.useRef(null);
|
|
52336
52437
|
// Timeline visibility state
|
|
52337
52438
|
const [showTimelines, setShowTimelines] = React.useState(false);
|
|
52338
|
-
|
|
52339
|
-
|
|
52340
|
-
|
|
52341
|
-
return stamps.length > 0 ? Math.max(...stamps.map((s)=>s.step)) : 0;
|
|
52342
|
-
}, [
|
|
52439
|
+
const maxStep = React.useMemo(()=>getDefaultTimelineStepForRun(flowData), [
|
|
52440
|
+
flowData.nodes,
|
|
52441
|
+
flowData.edges,
|
|
52343
52442
|
flowData.stamps,
|
|
52344
|
-
flowData.steps
|
|
52443
|
+
flowData.steps,
|
|
52444
|
+
flowData.run_id
|
|
52345
52445
|
]);
|
|
52346
52446
|
// Auto-play functionality
|
|
52347
52447
|
React.useEffect(()=>{
|
|
@@ -52370,15 +52470,13 @@ const AgenticFlowVisualizer = ({ flowData: propFlowData, width = "100dvw", heigh
|
|
|
52370
52470
|
isPlaying,
|
|
52371
52471
|
maxStep
|
|
52372
52472
|
]);
|
|
52373
|
-
//
|
|
52374
|
-
|
|
52375
|
-
|
|
52376
|
-
|
|
52377
|
-
setCurrentStep(Math.max(...stamps.map((s)=>s.step)));
|
|
52378
|
-
}
|
|
52473
|
+
// Default to the final step for this run so the full graph is visible (stamps may be missing).
|
|
52474
|
+
// useLayoutEffect: align step before paint so getNodesForStep(currentStep) never briefly filters out the whole graph.
|
|
52475
|
+
React.useLayoutEffect(()=>{
|
|
52476
|
+
setCurrentStep(maxStep);
|
|
52379
52477
|
}, [
|
|
52380
|
-
|
|
52381
|
-
flowData.
|
|
52478
|
+
maxStep,
|
|
52479
|
+
flowData.run_id
|
|
52382
52480
|
]);
|
|
52383
52481
|
// Update dimensions when width/height props change
|
|
52384
52482
|
React.useEffect(()=>{
|
|
@@ -52427,12 +52525,12 @@ const AgenticFlowVisualizer = ({ flowData: propFlowData, width = "100dvw", heigh
|
|
|
52427
52525
|
if (!flowData.nodes) {
|
|
52428
52526
|
return [];
|
|
52429
52527
|
}
|
|
52430
|
-
return flowData.nodes.filter((node)=>node.stamp
|
|
52528
|
+
return flowData.nodes.filter((node)=>(node.stamp?.step ?? 0) <= step);
|
|
52431
52529
|
}, [
|
|
52432
52530
|
flowData.nodes
|
|
52433
52531
|
]);
|
|
52434
52532
|
const getEdgesForStep = React.useCallback((step)=>{
|
|
52435
|
-
return (flowData.edges || []).filter((edge)=>edge.stamp
|
|
52533
|
+
return (flowData.edges || []).filter((edge)=>(edge.stamp?.step ?? 0) <= step);
|
|
52436
52534
|
}, [
|
|
52437
52535
|
flowData.edges
|
|
52438
52536
|
]);
|
|
@@ -52461,7 +52559,7 @@ const AgenticFlowVisualizer = ({ flowData: propFlowData, width = "100dvw", heigh
|
|
|
52461
52559
|
x: 0,
|
|
52462
52560
|
y: 0
|
|
52463
52561
|
};
|
|
52464
|
-
const isActive = node.stamp
|
|
52562
|
+
const isActive = node.stamp?.step === currentStep;
|
|
52465
52563
|
const rawType = node.node_type || "Agent";
|
|
52466
52564
|
const resolvedType = rawType === "Coordinator" ? "Agent" : rawType;
|
|
52467
52565
|
// Extract edge details for Tool nodes
|
|
@@ -52495,7 +52593,7 @@ const AgenticFlowVisualizer = ({ flowData: propFlowData, width = "100dvw", heigh
|
|
|
52495
52593
|
const edges = React.useMemo(()=>{
|
|
52496
52594
|
const stepEdges = getEdgesForStep(currentStep);
|
|
52497
52595
|
return stepEdges.filter((edge)=>edge.source && edge.target).map((edge)=>{
|
|
52498
|
-
const isActive = edge.stamp
|
|
52596
|
+
const isActive = edge.stamp?.step === currentStep;
|
|
52499
52597
|
return {
|
|
52500
52598
|
id: edge.identifier,
|
|
52501
52599
|
type: "smoothstep",
|
|
@@ -52523,14 +52621,14 @@ const AgenticFlowVisualizer = ({ flowData: propFlowData, width = "100dvw", heigh
|
|
|
52523
52621
|
]);
|
|
52524
52622
|
const [nodesState, setNodes, onNodesChange] = useNodesState(nodes);
|
|
52525
52623
|
const [edgesState, setEdges, onEdgesChange] = useEdgesState(edges);
|
|
52526
|
-
//
|
|
52527
|
-
React.
|
|
52624
|
+
// Keep React Flow store in sync with derived nodes/edges before paint to avoid transient empty graphs.
|
|
52625
|
+
React.useLayoutEffect(()=>{
|
|
52528
52626
|
setNodes(nodes);
|
|
52529
52627
|
}, [
|
|
52530
52628
|
nodes,
|
|
52531
52629
|
setNodes
|
|
52532
52630
|
]);
|
|
52533
|
-
React.
|
|
52631
|
+
React.useLayoutEffect(()=>{
|
|
52534
52632
|
setEdges(edges);
|
|
52535
52633
|
}, [
|
|
52536
52634
|
edges,
|
|
@@ -52771,7 +52869,7 @@ const AgenticFlowVisualizer = ({ flowData: propFlowData, width = "100dvw", heigh
|
|
|
52771
52869
|
whiteSpace: "nowrap",
|
|
52772
52870
|
border: 0
|
|
52773
52871
|
}
|
|
52774
|
-
}, "Close"))))), /*#__PURE__*/ React.createElement(index
|
|
52872
|
+
}, "Close"))))), /*#__PURE__*/ React.createElement(index, {
|
|
52775
52873
|
colorMode: isDarkMode ? "dark" : "light",
|
|
52776
52874
|
nodes: nodesState,
|
|
52777
52875
|
edges: edgesState,
|
|
@@ -112247,322 +112345,6 @@ class ErrorBoundary extends React.Component {
|
|
|
112247
112345
|
}
|
|
112248
112346
|
}
|
|
112249
112347
|
|
|
112250
|
-
const MAX_TITLE_LEN = 200;
|
|
112251
|
-
const TOOLBAR_ICON_SIZE = 15;
|
|
112252
|
-
const JsonValueTree = ({ data, className, maxHeight = "auto" })=>{
|
|
112253
|
-
const { theme } = useTheme$1();
|
|
112254
|
-
const { mutedForeground } = theme.colors;
|
|
112255
|
-
const treeData = React.useMemo(()=>buildTreeData(data), [
|
|
112256
|
-
data
|
|
112257
|
-
]);
|
|
112258
|
-
const defaultExpandedKeys = React.useMemo(()=>collectKeysToDepth(treeData, 2), [
|
|
112259
|
-
treeData
|
|
112260
|
-
]);
|
|
112261
|
-
const allExpandableKeys = React.useMemo(()=>collectAllExpandableKeys(treeData), [
|
|
112262
|
-
treeData
|
|
112263
|
-
]);
|
|
112264
|
-
const [expandedKeys, setExpandedKeys] = React.useState(()=>defaultExpandedKeys);
|
|
112265
|
-
const hasBranches = allExpandableKeys.length > 0;
|
|
112266
|
-
const isAllExpanded = hasBranches && allExpandableKeys.every((k)=>expandedKeys.includes(k));
|
|
112267
|
-
React.useEffect(()=>{
|
|
112268
|
-
setExpandedKeys(defaultExpandedKeys);
|
|
112269
|
-
}, [
|
|
112270
|
-
defaultExpandedKeys
|
|
112271
|
-
]);
|
|
112272
|
-
const handleCopyJson = React.useCallback(async ()=>{
|
|
112273
|
-
try {
|
|
112274
|
-
const text = JSON.stringify(data, null, 2);
|
|
112275
|
-
await navigator.clipboard.writeText(text);
|
|
112276
|
-
staticMethods.success("JSON copied to clipboard");
|
|
112277
|
-
} catch {
|
|
112278
|
-
staticMethods.error("Could not copy to clipboard");
|
|
112279
|
-
}
|
|
112280
|
-
}, [
|
|
112281
|
-
data
|
|
112282
|
-
]);
|
|
112283
|
-
const handleToggleExpandCollapse = React.useCallback(()=>{
|
|
112284
|
-
if (isAllExpanded) {
|
|
112285
|
-
setExpandedKeys([]);
|
|
112286
|
-
} else {
|
|
112287
|
-
setExpandedKeys(allExpandableKeys);
|
|
112288
|
-
}
|
|
112289
|
-
}, [
|
|
112290
|
-
isAllExpanded,
|
|
112291
|
-
allExpandableKeys
|
|
112292
|
-
]);
|
|
112293
|
-
return /*#__PURE__*/ React.createElement("div", {
|
|
112294
|
-
className: className,
|
|
112295
|
-
style: {
|
|
112296
|
-
maxHeight,
|
|
112297
|
-
display: "flex",
|
|
112298
|
-
flexDirection: "column",
|
|
112299
|
-
borderRadius: 4,
|
|
112300
|
-
overflow: "hidden"
|
|
112301
|
-
}
|
|
112302
|
-
}, /*#__PURE__*/ React.createElement("div", {
|
|
112303
|
-
style: {
|
|
112304
|
-
display: "flex",
|
|
112305
|
-
justifyContent: "flex-end",
|
|
112306
|
-
alignItems: "center",
|
|
112307
|
-
gap: 2,
|
|
112308
|
-
padding: "4px 6px 2px",
|
|
112309
|
-
flexShrink: 0,
|
|
112310
|
-
background: "transparent"
|
|
112311
|
-
}
|
|
112312
|
-
}, /*#__PURE__*/ React.createElement(Tooltip$1, {
|
|
112313
|
-
title: "Copy JSON"
|
|
112314
|
-
}, /*#__PURE__*/ React.createElement(Button$1, {
|
|
112315
|
-
type: "text",
|
|
112316
|
-
size: "small",
|
|
112317
|
-
"aria-label": "Copy JSON to clipboard",
|
|
112318
|
-
icon: /*#__PURE__*/ React.createElement(Copy, {
|
|
112319
|
-
size: TOOLBAR_ICON_SIZE,
|
|
112320
|
-
color: mutedForeground
|
|
112321
|
-
}),
|
|
112322
|
-
onClick: handleCopyJson
|
|
112323
|
-
})), /*#__PURE__*/ React.createElement(Tooltip$1, {
|
|
112324
|
-
title: isAllExpanded ? "Collapse all" : "Expand all"
|
|
112325
|
-
}, /*#__PURE__*/ React.createElement(Button$1, {
|
|
112326
|
-
type: "text",
|
|
112327
|
-
size: "small",
|
|
112328
|
-
"aria-label": isAllExpanded ? "Collapse all tree nodes" : "Expand all tree nodes",
|
|
112329
|
-
disabled: !hasBranches,
|
|
112330
|
-
icon: isAllExpanded ? /*#__PURE__*/ React.createElement(FoldVertical, {
|
|
112331
|
-
size: TOOLBAR_ICON_SIZE,
|
|
112332
|
-
color: mutedForeground
|
|
112333
|
-
}) : /*#__PURE__*/ React.createElement(UnfoldVertical, {
|
|
112334
|
-
size: TOOLBAR_ICON_SIZE,
|
|
112335
|
-
color: mutedForeground
|
|
112336
|
-
}),
|
|
112337
|
-
onClick: handleToggleExpandCollapse
|
|
112338
|
-
}))), /*#__PURE__*/ React.createElement("div", {
|
|
112339
|
-
style: {
|
|
112340
|
-
flex: 1,
|
|
112341
|
-
minHeight: 0,
|
|
112342
|
-
overflow: "auto",
|
|
112343
|
-
padding: "4px 0"
|
|
112344
|
-
}
|
|
112345
|
-
}, /*#__PURE__*/ React.createElement(Tree, {
|
|
112346
|
-
// No showLine — connector lines look like a floating spine for many top-level fields.
|
|
112347
|
-
showLine: true,
|
|
112348
|
-
blockNode: true,
|
|
112349
|
-
expandAction: "click",
|
|
112350
|
-
selectable: false,
|
|
112351
|
-
showIcon: false,
|
|
112352
|
-
treeData: treeData,
|
|
112353
|
-
expandedKeys: expandedKeys,
|
|
112354
|
-
onExpand: (keys)=>setExpandedKeys(keys),
|
|
112355
|
-
rootStyle: {
|
|
112356
|
-
backgroundColor: "transparent",
|
|
112357
|
-
padding: "0 4px"
|
|
112358
|
-
}
|
|
112359
|
-
})));
|
|
112360
|
-
};
|
|
112361
|
-
function collectKeysToDepth(nodes, maxDepth, depth = 0) {
|
|
112362
|
-
if (depth >= maxDepth) return [];
|
|
112363
|
-
const keys = [];
|
|
112364
|
-
for (const n of nodes){
|
|
112365
|
-
if (n.children && n.children.length > 0) {
|
|
112366
|
-
keys.push(n.key);
|
|
112367
|
-
keys.push(...collectKeysToDepth(n.children, maxDepth, depth + 1));
|
|
112368
|
-
}
|
|
112369
|
-
}
|
|
112370
|
-
return keys;
|
|
112371
|
-
}
|
|
112372
|
-
function collectAllExpandableKeys(nodes) {
|
|
112373
|
-
const keys = [];
|
|
112374
|
-
for (const n of nodes){
|
|
112375
|
-
if (n.children && n.children.length > 0) {
|
|
112376
|
-
keys.push(n.key);
|
|
112377
|
-
keys.push(...collectAllExpandableKeys(n.children));
|
|
112378
|
-
}
|
|
112379
|
-
}
|
|
112380
|
-
return keys;
|
|
112381
|
-
}
|
|
112382
|
-
/**
|
|
112383
|
-
* Object keys A→Z, but any property whose value is an array is listed after all non-array properties
|
|
112384
|
-
* (each block still A→Z). Tree has no built-in sort — this defines `treeData` order.
|
|
112385
|
-
*/ function sortObjectEntriesForTree(entries) {
|
|
112386
|
-
return [
|
|
112387
|
-
...entries
|
|
112388
|
-
].sort((a, b)=>{
|
|
112389
|
-
const aArr = Array.isArray(a[1]);
|
|
112390
|
-
const bArr = Array.isArray(b[1]);
|
|
112391
|
-
if (aArr !== bArr) {
|
|
112392
|
-
return aArr ? 1 : -1;
|
|
112393
|
-
}
|
|
112394
|
-
return a[0].localeCompare(b[0], undefined, {
|
|
112395
|
-
sensitivity: "base",
|
|
112396
|
-
numeric: true
|
|
112397
|
-
});
|
|
112398
|
-
});
|
|
112399
|
-
}
|
|
112400
|
-
function valueToTreeNodes(value, path) {
|
|
112401
|
-
if (value === null || value === undefined) {
|
|
112402
|
-
return [
|
|
112403
|
-
{
|
|
112404
|
-
key: path,
|
|
112405
|
-
title: formatJsonTreePrimitive(value),
|
|
112406
|
-
isLeaf: true
|
|
112407
|
-
}
|
|
112408
|
-
];
|
|
112409
|
-
}
|
|
112410
|
-
if (Array.isArray(value)) {
|
|
112411
|
-
if (value.length === 0) {
|
|
112412
|
-
return [
|
|
112413
|
-
{
|
|
112414
|
-
key: `${path}.__empty_arr__`,
|
|
112415
|
-
title: "[] (0 items)",
|
|
112416
|
-
isLeaf: true
|
|
112417
|
-
}
|
|
112418
|
-
];
|
|
112419
|
-
}
|
|
112420
|
-
return value.map((item, i)=>{
|
|
112421
|
-
const seg = `[${i}]`;
|
|
112422
|
-
const childPath = `${path}.${escapeDotPathSegment(seg)}`;
|
|
112423
|
-
if (item === null || item === undefined || typeof item !== "object") {
|
|
112424
|
-
return {
|
|
112425
|
-
key: childPath,
|
|
112426
|
-
title: `${seg}: ${formatJsonTreePrimitive(item)}`,
|
|
112427
|
-
isLeaf: true
|
|
112428
|
-
};
|
|
112429
|
-
}
|
|
112430
|
-
if (Array.isArray(item) || isPlainObject(item)) {
|
|
112431
|
-
const children = valueToTreeNodes(item, childPath);
|
|
112432
|
-
return {
|
|
112433
|
-
key: childPath,
|
|
112434
|
-
title: `${seg} (${Array.isArray(item) ? `Array(${item.length})` : `Object(${Object.keys(item).length})`})`,
|
|
112435
|
-
children
|
|
112436
|
-
};
|
|
112437
|
-
}
|
|
112438
|
-
return {
|
|
112439
|
-
key: childPath,
|
|
112440
|
-
title: `${seg}: ${formatJsonTreePrimitive(item)}`,
|
|
112441
|
-
isLeaf: true
|
|
112442
|
-
};
|
|
112443
|
-
});
|
|
112444
|
-
}
|
|
112445
|
-
if (isPlainObject(value)) {
|
|
112446
|
-
const entries = sortObjectEntriesForTree(Object.entries(value));
|
|
112447
|
-
if (entries.length === 0) {
|
|
112448
|
-
return [
|
|
112449
|
-
{
|
|
112450
|
-
key: `${path}.__empty_obj__`,
|
|
112451
|
-
title: "{} (0 keys)",
|
|
112452
|
-
isLeaf: true
|
|
112453
|
-
}
|
|
112454
|
-
];
|
|
112455
|
-
}
|
|
112456
|
-
return entries.map(([k, v])=>{
|
|
112457
|
-
const childPath = `${path}.${escapeDotPathSegment(k)}`;
|
|
112458
|
-
if (v === null || v === undefined || typeof v !== "object") {
|
|
112459
|
-
const text = `${k}: ${formatJsonTreePrimitive(v)}`;
|
|
112460
|
-
const title = text.length > MAX_TITLE_LEN ? /*#__PURE__*/ React.createElement(Tooltip$1, {
|
|
112461
|
-
title: text
|
|
112462
|
-
}, /*#__PURE__*/ React.createElement("span", null, text.slice(0, MAX_TITLE_LEN), "…")) : text;
|
|
112463
|
-
return {
|
|
112464
|
-
key: childPath,
|
|
112465
|
-
title,
|
|
112466
|
-
isLeaf: true
|
|
112467
|
-
};
|
|
112468
|
-
}
|
|
112469
|
-
if (Array.isArray(v) || isPlainObject(v)) {
|
|
112470
|
-
const children = valueToTreeNodes(v, childPath);
|
|
112471
|
-
const summary = Array.isArray(v) ? `Array(${v.length})` : `Object(${Object.keys(v).length})`;
|
|
112472
|
-
return {
|
|
112473
|
-
key: childPath,
|
|
112474
|
-
title: `${k}: ${summary}`,
|
|
112475
|
-
children
|
|
112476
|
-
};
|
|
112477
|
-
}
|
|
112478
|
-
const text = `${k}: ${formatJsonTreePrimitive(v)}`;
|
|
112479
|
-
return {
|
|
112480
|
-
key: childPath,
|
|
112481
|
-
title: text.length > MAX_TITLE_LEN ? /*#__PURE__*/ React.createElement(Tooltip$1, {
|
|
112482
|
-
title: text
|
|
112483
|
-
}, /*#__PURE__*/ React.createElement("span", null, text.slice(0, MAX_TITLE_LEN), "…")) : text,
|
|
112484
|
-
isLeaf: true
|
|
112485
|
-
};
|
|
112486
|
-
});
|
|
112487
|
-
}
|
|
112488
|
-
const text = formatJsonTreePrimitive(value);
|
|
112489
|
-
return [
|
|
112490
|
-
{
|
|
112491
|
-
key: path,
|
|
112492
|
-
title: text.length > MAX_TITLE_LEN ? /*#__PURE__*/ React.createElement(Tooltip$1, {
|
|
112493
|
-
title: text
|
|
112494
|
-
}, /*#__PURE__*/ React.createElement("span", null, text.slice(0, MAX_TITLE_LEN), "…")) : text,
|
|
112495
|
-
isLeaf: true
|
|
112496
|
-
}
|
|
112497
|
-
];
|
|
112498
|
-
}
|
|
112499
|
-
/** Top-level tree for tabular session output: plain object or array of plain objects. */ function buildTreeData(data) {
|
|
112500
|
-
if (data === null || data === undefined) {
|
|
112501
|
-
return [
|
|
112502
|
-
{
|
|
112503
|
-
key: "root",
|
|
112504
|
-
title: String(data),
|
|
112505
|
-
isLeaf: true
|
|
112506
|
-
}
|
|
112507
|
-
];
|
|
112508
|
-
}
|
|
112509
|
-
if (Array.isArray(data)) {
|
|
112510
|
-
if (data.length === 0) {
|
|
112511
|
-
return [
|
|
112512
|
-
{
|
|
112513
|
-
key: "$top",
|
|
112514
|
-
title: "Array (0 items)",
|
|
112515
|
-
isLeaf: true
|
|
112516
|
-
}
|
|
112517
|
-
];
|
|
112518
|
-
}
|
|
112519
|
-
const children = data.map((item, index)=>{
|
|
112520
|
-
const path = `$root[${index}]`;
|
|
112521
|
-
if (!isPlainObject(item)) {
|
|
112522
|
-
return {
|
|
112523
|
-
key: path,
|
|
112524
|
-
title: `[${index}]: ${formatJsonTreePrimitive(item)}`,
|
|
112525
|
-
isLeaf: true
|
|
112526
|
-
};
|
|
112527
|
-
}
|
|
112528
|
-
const itemChildren = valueToTreeNodes(item, path);
|
|
112529
|
-
return {
|
|
112530
|
-
key: path,
|
|
112531
|
-
title: `[${index}] (${Object.keys(item).length} keys)`,
|
|
112532
|
-
children: itemChildren
|
|
112533
|
-
};
|
|
112534
|
-
});
|
|
112535
|
-
return [
|
|
112536
|
-
{
|
|
112537
|
-
key: "$top",
|
|
112538
|
-
title: `Array (${data.length} items)`,
|
|
112539
|
-
children
|
|
112540
|
-
}
|
|
112541
|
-
];
|
|
112542
|
-
}
|
|
112543
|
-
if (isPlainObject(data)) {
|
|
112544
|
-
const objectKeys = Object.keys(data);
|
|
112545
|
-
if (objectKeys.length === 0) {
|
|
112546
|
-
return [
|
|
112547
|
-
{
|
|
112548
|
-
key: "$top",
|
|
112549
|
-
title: "Object (0 keys)",
|
|
112550
|
-
isLeaf: true
|
|
112551
|
-
}
|
|
112552
|
-
];
|
|
112553
|
-
}
|
|
112554
|
-
const children = valueToTreeNodes(data, "$root");
|
|
112555
|
-
return [
|
|
112556
|
-
{
|
|
112557
|
-
key: "$top",
|
|
112558
|
-
title: `Object (${objectKeys.length} keys)`,
|
|
112559
|
-
children
|
|
112560
|
-
}
|
|
112561
|
-
];
|
|
112562
|
-
}
|
|
112563
|
-
return valueToTreeNodes(data, "$root");
|
|
112564
|
-
}
|
|
112565
|
-
|
|
112566
112348
|
const getNodeLatency = (node)=>node.details?.internals?.latency?.total_time ?? 0;
|
|
112567
112349
|
/** Tool/agent failure is carried on the incoming edge's details.status (e.g. Failed), same as flow edges and session I/O. */ function isNodeFailureFromIncomingEdge(run, nodeId) {
|
|
112568
112350
|
const incoming = run.edges?.filter((e)=>e.target === nodeId) ?? [];
|
|
@@ -112816,158 +112598,6 @@ const useShareAgentSession = (session)=>{
|
|
|
112816
112598
|
};
|
|
112817
112599
|
|
|
112818
112600
|
const { Text } = Typography;
|
|
112819
|
-
// Shared theme color fallbacks
|
|
112820
|
-
const DEFAULT_THEME_COLORS = {
|
|
112821
|
-
border: "hsl(214.3 31.8% 91.4%)",
|
|
112822
|
-
foreground: "hsl(222.2 84% 4.9%)"
|
|
112823
|
-
};
|
|
112824
|
-
// Helper function to format content as text
|
|
112825
|
-
const formatContentAsText = (content)=>{
|
|
112826
|
-
if (typeof content === "string") {
|
|
112827
|
-
return content;
|
|
112828
|
-
}
|
|
112829
|
-
if (Array.isArray(content)) {
|
|
112830
|
-
return content.map((item)=>formatContentAsText(item)).join("\n\n");
|
|
112831
|
-
}
|
|
112832
|
-
return JSON.stringify(content, null, 2);
|
|
112833
|
-
};
|
|
112834
|
-
// Helper function to check if data is tabular (object or array of objects)
|
|
112835
|
-
const isTabularData = (data)=>{
|
|
112836
|
-
if (data === null || data === undefined) {
|
|
112837
|
-
return false;
|
|
112838
|
-
}
|
|
112839
|
-
// Check if it's a plain object (not array, Date, etc.)
|
|
112840
|
-
if (typeof data === "object" && !Array.isArray(data) && data.constructor === Object) {
|
|
112841
|
-
return true;
|
|
112842
|
-
}
|
|
112843
|
-
// Check if it's an array of plain objects
|
|
112844
|
-
if (Array.isArray(data) && data.length > 0) {
|
|
112845
|
-
return data.every((item)=>item !== null && item !== undefined && typeof item === "object" && !Array.isArray(item) && item.constructor === Object);
|
|
112846
|
-
}
|
|
112847
|
-
return false;
|
|
112848
|
-
};
|
|
112849
|
-
// Helper function to format output as text
|
|
112850
|
-
const formatOutputAsText = (output, toolOutput)=>{
|
|
112851
|
-
if (toolOutput !== null && toolOutput !== undefined) {
|
|
112852
|
-
return formatContentAsText(toolOutput);
|
|
112853
|
-
}
|
|
112854
|
-
if (output) {
|
|
112855
|
-
const role = getRoleDisplayName(output.role);
|
|
112856
|
-
const content = formatContentAsText(output.content);
|
|
112857
|
-
return `${role}:\n${content}`;
|
|
112858
|
-
}
|
|
112859
|
-
return "";
|
|
112860
|
-
};
|
|
112861
|
-
// Helper function to get emoji for role
|
|
112862
|
-
const getRoleEmoji = (role)=>{
|
|
112863
|
-
switch(role.toLowerCase()){
|
|
112864
|
-
case "system":
|
|
112865
|
-
return "⚙️";
|
|
112866
|
-
case "user":
|
|
112867
|
-
return "👤";
|
|
112868
|
-
case "assistant":
|
|
112869
|
-
return "🤖";
|
|
112870
|
-
case "tool":
|
|
112871
|
-
return "🔧";
|
|
112872
|
-
default:
|
|
112873
|
-
return "🔧"; // fallback
|
|
112874
|
-
}
|
|
112875
|
-
};
|
|
112876
|
-
// Helper function to get display name for role
|
|
112877
|
-
const getRoleDisplayName = (role)=>{
|
|
112878
|
-
return role.charAt(0).toUpperCase() + role.slice(1);
|
|
112879
|
-
};
|
|
112880
|
-
// Helper function to render content
|
|
112881
|
-
const renderContent = (content)=>{
|
|
112882
|
-
if (typeof content === "string") {
|
|
112883
|
-
return content;
|
|
112884
|
-
}
|
|
112885
|
-
return JSON.stringify(content, null, 2);
|
|
112886
|
-
};
|
|
112887
|
-
// Helper to filter out keys containing "name" from objects (recursive)
|
|
112888
|
-
const filterKeysWithName = (obj)=>{
|
|
112889
|
-
if (obj === null || obj === undefined) return obj;
|
|
112890
|
-
if (typeof obj !== "object") return obj;
|
|
112891
|
-
if (Array.isArray(obj)) return obj.map(filterKeysWithName);
|
|
112892
|
-
return Object.fromEntries(Object.entries(obj).filter(([key])=>!key.toLowerCase().includes("name")).map(([key, value])=>[
|
|
112893
|
-
key,
|
|
112894
|
-
filterKeysWithName(value)
|
|
112895
|
-
]));
|
|
112896
|
-
};
|
|
112897
|
-
const LLMInputsRenderer = ({ input, isDarkMode, modelProvider, modelName, toolStatusMap })=>{
|
|
112898
|
-
const { theme } = useTheme$1();
|
|
112899
|
-
const themeColors = theme?.colors || DEFAULT_THEME_COLORS;
|
|
112900
|
-
if (!input || input.length === 0) return null;
|
|
112901
|
-
const collapseItems = input.map((item, index)=>{
|
|
112902
|
-
const modelIcon = modelProvider || modelName ? getNodeIcon({
|
|
112903
|
-
modelProvider,
|
|
112904
|
-
modelName
|
|
112905
|
-
}) : null;
|
|
112906
|
-
const isSystemInput = item.role.toLowerCase() === "system";
|
|
112907
|
-
const showModelInfo = isSystemInput && (modelProvider || modelName);
|
|
112908
|
-
const isToolInput = item.role.toLowerCase() === "tool";
|
|
112909
|
-
const isAssistantInput = item.role.toLowerCase() === "assistant";
|
|
112910
|
-
const isUserInput = item.role.toLowerCase() === "user";
|
|
112911
|
-
// Extract tool name for tool inputs
|
|
112912
|
-
const toolName = isToolInput && item.content?.name ? item.content.name : null;
|
|
112913
|
-
// Look up status for this specific tool
|
|
112914
|
-
const toolStatus = toolName && toolStatusMap ? toolStatusMap.get(toolName) : undefined;
|
|
112915
|
-
// Extract tool call name(s) for assistant inputs
|
|
112916
|
-
let assistantToolName = null;
|
|
112917
|
-
if (isAssistantInput && Array.isArray(item.content) && item.content.length > 0) {
|
|
112918
|
-
const firstToolCall = item.content[0];
|
|
112919
|
-
if (firstToolCall?.name) {
|
|
112920
|
-
assistantToolName = firstToolCall.name;
|
|
112921
|
-
}
|
|
112922
|
-
}
|
|
112923
|
-
return {
|
|
112924
|
-
key: `input-${index}`,
|
|
112925
|
-
label: /*#__PURE__*/ React.createElement(Text, {
|
|
112926
|
-
strong: true
|
|
112927
|
-
}, getRoleEmoji(item.role), " ", toolName ? `Tool` : assistantToolName ? `Assistant` : getRoleDisplayName(item.role)),
|
|
112928
|
-
extra: showModelInfo ? /*#__PURE__*/ React.createElement(Space, {
|
|
112929
|
-
size: "small"
|
|
112930
|
-
}, modelIcon && /*#__PURE__*/ React.createElement("span", null, modelIcon), modelName && /*#__PURE__*/ React.createElement("span", {
|
|
112931
|
-
style: {
|
|
112932
|
-
fontSize: "12px",
|
|
112933
|
-
opacity: 0.7
|
|
112934
|
-
}
|
|
112935
|
-
}, modelName)) : isToolInput ? /*#__PURE__*/ React.createElement(Tag, {
|
|
112936
|
-
color: toolStatus === "Failed" ? "red" : "blue"
|
|
112937
|
-
}, toolName || "Tool Response") : isUserInput ? /*#__PURE__*/ React.createElement(Tag, {
|
|
112938
|
-
color: "purple"
|
|
112939
|
-
}, "Text") : undefined,
|
|
112940
|
-
children: /*#__PURE__*/ React.createElement("pre", {
|
|
112941
|
-
style: {
|
|
112942
|
-
margin: 0,
|
|
112943
|
-
padding: "12px",
|
|
112944
|
-
background: isDarkMode ? "#1f1f1f" : "#fafafa",
|
|
112945
|
-
border: `1px solid ${themeColors.border}`,
|
|
112946
|
-
borderRadius: "4px",
|
|
112947
|
-
color: themeColors.foreground,
|
|
112948
|
-
whiteSpace: "pre-wrap",
|
|
112949
|
-
wordWrap: "break-word",
|
|
112950
|
-
fontFamily: "monospace",
|
|
112951
|
-
fontSize: "12px",
|
|
112952
|
-
lineHeight: "1.5",
|
|
112953
|
-
maxHeight: "300px",
|
|
112954
|
-
overflow: "auto"
|
|
112955
|
-
}
|
|
112956
|
-
}, renderContent(typeof item.content === "object" && item.content !== null && !Array.isArray(item.content) ? filterKeysWithName(item.content) : item.content))
|
|
112957
|
-
};
|
|
112958
|
-
});
|
|
112959
|
-
return /*#__PURE__*/ React.createElement(Collapse, {
|
|
112960
|
-
items: collapseItems,
|
|
112961
|
-
defaultActiveKey: collapseItems.length > 0 ? [
|
|
112962
|
-
collapseItems[0].key
|
|
112963
|
-
] : [],
|
|
112964
|
-
style: {
|
|
112965
|
-
background: "transparent",
|
|
112966
|
-
padding: 0,
|
|
112967
|
-
margin: 0
|
|
112968
|
-
}
|
|
112969
|
-
});
|
|
112970
|
-
};
|
|
112971
112601
|
// Extract inputs/outputs for a specific node
|
|
112972
112602
|
const getNodeInputsOutputs = (node, run)=>{
|
|
112973
112603
|
if (node.node_type === "Tool") {
|
|
@@ -113083,89 +112713,7 @@ const NodeDetailsPanel = ({ selectedNode, session, isDarkMode })=>{
|
|
|
113083
112713
|
}
|
|
113084
112714
|
const { inputs, output, toolOutput, modelProvider, modelName, toolStatusMap } = nodeIO;
|
|
113085
112715
|
const hasInputs = (node.node_type === "Agent" || node.node_type === "Tool") && inputs.length > 0;
|
|
113086
|
-
const hasOutputs = output !== null || toolOutput !== null;
|
|
113087
|
-
const outputsText = hasOutputs ? formatOutputAsText(output, toolOutput) : "";
|
|
113088
|
-
const isToolOutputTabular = toolOutput !== null && toolOutput !== undefined && isTabularData(toolOutput);
|
|
113089
|
-
// For Tool nodes: render input as JSON in a textarea (no nested collapsibles)
|
|
113090
112716
|
const isToolNode = node.node_type === "Tool";
|
|
113091
|
-
const toolInputText = isToolNode && inputs.length > 0 ? renderContent(typeof inputs[0].content === "object" && inputs[0].content !== null && !Array.isArray(inputs[0].content) ? filterKeysWithName(inputs[0].content) : inputs[0].content) : "";
|
|
113092
|
-
const collapseItems = [
|
|
113093
|
-
{
|
|
113094
|
-
key: "inputs",
|
|
113095
|
-
label: /*#__PURE__*/ React.createElement("div", {
|
|
113096
|
-
style: {
|
|
113097
|
-
display: "flex",
|
|
113098
|
-
alignItems: "center",
|
|
113099
|
-
gap: "0.5rem"
|
|
113100
|
-
}
|
|
113101
|
-
}, /*#__PURE__*/ React.createElement(Text, {
|
|
113102
|
-
strong: true
|
|
113103
|
-
}, "Inputs"), hasInputs && /*#__PURE__*/ React.createElement("span", {
|
|
113104
|
-
style: {
|
|
113105
|
-
display: "inline-flex",
|
|
113106
|
-
alignItems: "center",
|
|
113107
|
-
gap: "0.25rem",
|
|
113108
|
-
color: theme?.colors?.mutedForeground
|
|
113109
|
-
}
|
|
113110
|
-
}, /*#__PURE__*/ React.createElement(MessagesSquare, {
|
|
113111
|
-
size: 12
|
|
113112
|
-
}), inputs.length)),
|
|
113113
|
-
children: hasInputs ? isToolNode ? /*#__PURE__*/ React.createElement("textarea", {
|
|
113114
|
-
readOnly: true,
|
|
113115
|
-
value: toolInputText,
|
|
113116
|
-
style: {
|
|
113117
|
-
width: "100%",
|
|
113118
|
-
minHeight: "200px",
|
|
113119
|
-
padding: "12px",
|
|
113120
|
-
background: isDarkMode ? "#1f1f1f" : "#fafafa",
|
|
113121
|
-
border: `1px solid ${theme?.colors?.border || "#d9d9d9"}`,
|
|
113122
|
-
borderRadius: "4px",
|
|
113123
|
-
color: theme?.colors?.foreground || "inherit",
|
|
113124
|
-
fontFamily: "monospace",
|
|
113125
|
-
fontSize: "12px",
|
|
113126
|
-
lineHeight: "1.5",
|
|
113127
|
-
resize: "vertical"
|
|
113128
|
-
}
|
|
113129
|
-
}) : /*#__PURE__*/ React.createElement(LLMInputsRenderer, {
|
|
113130
|
-
input: inputs,
|
|
113131
|
-
isDarkMode: isDarkMode,
|
|
113132
|
-
modelProvider: modelProvider,
|
|
113133
|
-
modelName: modelName,
|
|
113134
|
-
toolStatusMap: toolStatusMap
|
|
113135
|
-
}) : /*#__PURE__*/ React.createElement(Empty, {
|
|
113136
|
-
description: "No inputs available"
|
|
113137
|
-
})
|
|
113138
|
-
},
|
|
113139
|
-
{
|
|
113140
|
-
key: "outputs",
|
|
113141
|
-
label: /*#__PURE__*/ React.createElement(Text, {
|
|
113142
|
-
strong: true
|
|
113143
|
-
}, "Outputs"),
|
|
113144
|
-
children: hasOutputs ? isToolOutputTabular ? /*#__PURE__*/ React.createElement(JsonValueTree, {
|
|
113145
|
-
data: toolOutput
|
|
113146
|
-
}) : /*#__PURE__*/ React.createElement("pre", {
|
|
113147
|
-
style: {
|
|
113148
|
-
margin: 0,
|
|
113149
|
-
padding: "12px",
|
|
113150
|
-
background: isDarkMode ? "#1f1f1f" : "#fafafa",
|
|
113151
|
-
border: `1px solid ${theme?.colors?.border || "#d9d9d9"}`,
|
|
113152
|
-
borderRadius: "4px",
|
|
113153
|
-
color: theme?.colors?.foreground || "inherit",
|
|
113154
|
-
whiteSpace: "pre-wrap",
|
|
113155
|
-
wordWrap: "break-word",
|
|
113156
|
-
fontFamily: "inherit",
|
|
113157
|
-
fontSize: "13px",
|
|
113158
|
-
lineHeight: "1.5"
|
|
113159
|
-
}
|
|
113160
|
-
}, outputsText) : /*#__PURE__*/ React.createElement("div", {
|
|
113161
|
-
style: {
|
|
113162
|
-
padding: "12px"
|
|
113163
|
-
}
|
|
113164
|
-
}, /*#__PURE__*/ React.createElement(Empty, {
|
|
113165
|
-
description: "No outputs available"
|
|
113166
|
-
}))
|
|
113167
|
-
}
|
|
113168
|
-
];
|
|
113169
112717
|
const llmDetails = node.details?.internals?.llm_details || [];
|
|
113170
112718
|
const totalCost = node.node_type === "Agent" ? sumTotalCost(llmDetails) : 0;
|
|
113171
112719
|
const totalInputTokens = node.node_type === "Agent" ? sumTotalInputTokens(llmDetails) : 0;
|
|
@@ -113222,19 +112770,15 @@ const NodeDetailsPanel = ({ selectedNode, session, isDarkMode })=>{
|
|
|
113222
112770
|
}
|
|
113223
112771
|
}, formatNumberWithCommas(totalInputTokens), " ", /*#__PURE__*/ React.createElement(ArrowRight, {
|
|
113224
112772
|
size: 12
|
|
113225
|
-
}), " ", formatNumberWithCommas(totalOutputTokens)))), /*#__PURE__*/ React.createElement(
|
|
113226
|
-
|
|
113227
|
-
|
|
113228
|
-
|
|
113229
|
-
|
|
113230
|
-
|
|
113231
|
-
|
|
113232
|
-
|
|
113233
|
-
|
|
113234
|
-
background: "transparent",
|
|
113235
|
-
padding: 0,
|
|
113236
|
-
margin: 0
|
|
113237
|
-
}
|
|
112773
|
+
}), " ", formatNumberWithCommas(totalOutputTokens)))), /*#__PURE__*/ React.createElement(InputsOutputsCollapse, {
|
|
112774
|
+
inputs: inputs,
|
|
112775
|
+
output: output,
|
|
112776
|
+
toolOutput: toolOutput,
|
|
112777
|
+
modelProvider: modelProvider,
|
|
112778
|
+
modelName: modelName,
|
|
112779
|
+
toolStatusMap: toolStatusMap,
|
|
112780
|
+
hasInputs: hasInputs,
|
|
112781
|
+
toolInputAsTextarea: isToolNode
|
|
113238
112782
|
}));
|
|
113239
112783
|
};
|
|
113240
112784
|
// Component for rendering a single run's content
|
|
@@ -114684,6 +114228,7 @@ const EvaluationsTable = ({ evaluations, loading = false, error = null, onRefres
|
|
|
114684
114228
|
dataIndex: "completed_at",
|
|
114685
114229
|
key: "completed_at",
|
|
114686
114230
|
width: 180,
|
|
114231
|
+
defaultSortOrder: "descend",
|
|
114687
114232
|
sorter: (a, b)=>{
|
|
114688
114233
|
const aVal = a.completed_at ? moment(a.completed_at).unix() : 0;
|
|
114689
114234
|
const bVal = b.completed_at ? moment(b.completed_at).unix() : 0;
|
|
@@ -120288,6 +119833,7 @@ exports.formatMetricValue = formatMetricValue$1;
|
|
|
120288
119833
|
exports.formatNumberWithCommas = formatNumberWithCommas;
|
|
120289
119834
|
exports.formatToolCalls = formatToolCalls;
|
|
120290
119835
|
exports.getColor = getColor;
|
|
119836
|
+
exports.getDefaultTimelineStepForRun = getDefaultTimelineStepForRun;
|
|
120291
119837
|
exports.getSafeColor = getSafeColor;
|
|
120292
119838
|
exports.getSafeSpacing = getSafeSpacing;
|
|
120293
119839
|
exports.getSafeThemeValue = getSafeThemeValue;
|