agentic-ui-libs 1.0.0-beta.2 → 1.0.0-beta.3
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/features/dashboard/AgentListView.d.ts.map +1 -1
- package/dist/features/dashboard/AnalyticsChart.d.ts.map +1 -1
- package/dist/features/dashboard/AnalyticsTable.d.ts.map +1 -1
- package/dist/features/dashboard/Dashboard.d.ts.map +1 -1
- package/dist/features/dashboard/DashboardSection.d.ts.map +1 -1
- package/dist/features/dashboard/MetricCard.d.ts.map +1 -1
- package/dist/features/dashboard/ModelListView.d.ts.map +1 -1
- package/dist/features/dashboard/RunsSlider.d.ts.map +1 -1
- package/dist/features/dashboard/SectionControls.d.ts.map +1 -1
- package/dist/features/dashboard/ToolListView.d.ts.map +1 -1
- package/dist/features/debug-logs/DebugPanel.d.ts.map +1 -1
- package/dist/features/debug-logs/components/DataViewer.d.ts.map +1 -1
- package/dist/features/debug-logs/components/DebugCard.d.ts.map +1 -1
- package/dist/features/prompt-editor/RefinePanel.d.ts.map +1 -1
- package/dist/features/prompt-editor/components/AddToolbar.d.ts.map +1 -1
- package/dist/features/prompt-editor/components/ChatMessage.d.ts.map +1 -1
- package/dist/features/prompt-editor/components/ContentBlock.d.ts.map +1 -1
- package/dist/features/prompt-editor/components/EditableContent.d.ts.map +1 -1
- package/dist/features/prompt-editor/components/FormattingToolbar.d.ts.map +1 -1
- package/dist/features/prompt-editor/components/Header.d.ts.map +1 -1
- package/dist/features/prompt-editor/components/InsertMenu.d.ts.map +1 -1
- package/dist/features/prompt-editor/components/RefineDropdown.d.ts.map +1 -1
- package/dist/features/prompt-editor/components/Section.d.ts.map +1 -1
- package/dist/features/prompt-editor/components/SectionHeader.d.ts.map +1 -1
- package/dist/index.js +272 -197
- package/dist/ui-libs.umd.js +272 -197
- package/package.json +1 -1
package/dist/ui-libs.umd.js
CHANGED
|
@@ -3905,9 +3905,10 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
3905
3905
|
className
|
|
3906
3906
|
),
|
|
3907
3907
|
onClick: handleClick,
|
|
3908
|
+
"data-id": `dashboard_metric_card_${data.metricType || data.title.toLowerCase().replace(/\s+/g, "_")}`,
|
|
3908
3909
|
children: [
|
|
3909
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-2 mb-[6px]", children: [
|
|
3910
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-sm font-medium text-gray-700", children: title }),
|
|
3910
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-2 mb-[6px]", "data-id": `dashboard_metric_card_header_${data.metricType || data.title.toLowerCase().replace(/\s+/g, "_")}`, children: [
|
|
3911
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-sm font-medium text-gray-700", "data-id": `dashboard_metric_card_title_${data.metricType || data.title.toLowerCase().replace(/\s+/g, "_")}`, children: title }),
|
|
3911
3912
|
info && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "relative group", children: [
|
|
3912
3913
|
/* @__PURE__ */ jsxRuntimeExports.jsx(Info, { className: "h-[16px] w-[16px] text-gray-400 cursor-help" }),
|
|
3913
3914
|
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: cn(
|
|
@@ -3925,8 +3926,8 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
3925
3926
|
] })
|
|
3926
3927
|
] })
|
|
3927
3928
|
] }),
|
|
3928
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-baseline gap-3", children: [
|
|
3929
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-2xl font-semibold text-gray-900", children: formatValue2(value) }),
|
|
3929
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-baseline gap-3", "data-id": `dashboard_metric_card_value_container_${data.metricType || data.title.toLowerCase().replace(/\s+/g, "_")}`, children: [
|
|
3930
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-2xl font-semibold text-gray-900", "data-id": `dashboard_metric_card_value_${data.metricType || data.title.toLowerCase().replace(/\s+/g, "_")}`, children: formatValue2(value) }),
|
|
3930
3931
|
change && /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
3931
3932
|
"div",
|
|
3932
3933
|
{
|
|
@@ -28509,8 +28510,8 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
28509
28510
|
console.log("Chart lines configuration:", chartLines);
|
|
28510
28511
|
console.log("Sample filled data points:", sortedData.slice(0, 3));
|
|
28511
28512
|
console.log("=== END ANALYTICS CHART DEBUG ===");
|
|
28512
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: cn("w-full", className), children: [
|
|
28513
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "relative bg-gray-50/30", children: /* @__PURE__ */ jsxRuntimeExports.jsx(ResponsiveContainer, { width: "100%", height, children: /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
28513
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: cn("w-full", className), "data-id": "dashboard_analytics_chart_root", children: [
|
|
28514
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "relative bg-gray-50/30", "data-id": "dashboard_analytics_chart_container", children: /* @__PURE__ */ jsxRuntimeExports.jsx(ResponsiveContainer, { width: "100%", height, "data-id": "dashboard_analytics_chart_responsive_container", children: /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
28514
28515
|
ComposedChart,
|
|
28515
28516
|
{
|
|
28516
28517
|
data: sortedData,
|
|
@@ -28609,10 +28610,10 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
28609
28610
|
]
|
|
28610
28611
|
}
|
|
28611
28612
|
) }) }),
|
|
28612
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "mt-4 flex items-center justify-between", children: [
|
|
28613
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: dateRange && /* @__PURE__ */ jsxRuntimeExports.jsxs("p", { className: "text-xs text-gray-500 flex items-center gap-[4px]", children: [
|
|
28613
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "mt-4 flex items-center justify-between", "data-id": "dashboard_analytics_chart_footer", children: [
|
|
28614
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { "data-id": "dashboard_analytics_chart_date_range", children: dateRange && /* @__PURE__ */ jsxRuntimeExports.jsxs("p", { className: "text-xs text-gray-500 flex items-center gap-[4px]", "data-id": "dashboard_analytics_chart_date_range_text", children: [
|
|
28614
28615
|
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-gray-500", children: "Showing data from" }),
|
|
28615
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs("span", { className: "font-medium text-gray-700", children: [
|
|
28616
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("span", { className: "font-medium text-gray-700", "data-id": "dashboard_analytics_chart_date_range_value", children: [
|
|
28616
28617
|
new Date(dateRange.start).toLocaleDateString("en-US", {
|
|
28617
28618
|
day: "numeric",
|
|
28618
28619
|
month: "short",
|
|
@@ -28626,15 +28627,16 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
28626
28627
|
})
|
|
28627
28628
|
] })
|
|
28628
28629
|
] }) }),
|
|
28629
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex items-center gap-4", children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex items-center gap-4 text-sm text-muted-foreground", children: chartLines.map((lineConfig) => /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
28630
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex items-center gap-4", "data-id": "dashboard_analytics_chart_legend", children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex items-center gap-4 text-sm text-muted-foreground", "data-id": "dashboard_analytics_chart_legend_items", children: chartLines.map((lineConfig) => /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-2", "data-id": `dashboard_analytics_chart_legend_item_${lineConfig.dataKey}`, children: [
|
|
28630
28631
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
28631
28632
|
"div",
|
|
28632
28633
|
{
|
|
28633
28634
|
className: "w-[8px] h-[8px] rounded-full",
|
|
28634
|
-
style: { backgroundColor: lineConfig.color }
|
|
28635
|
+
style: { backgroundColor: lineConfig.color },
|
|
28636
|
+
"data-id": `dashboard_analytics_chart_legend_color_${lineConfig.dataKey}`
|
|
28635
28637
|
}
|
|
28636
28638
|
),
|
|
28637
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-xs text-gray-600", children: lineConfig.label })
|
|
28639
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-xs text-gray-600", "data-id": `dashboard_analytics_chart_legend_label_${lineConfig.dataKey}`, children: lineConfig.label })
|
|
28638
28640
|
] }, lineConfig.dataKey)) }) })
|
|
28639
28641
|
] })
|
|
28640
28642
|
] });
|
|
@@ -28721,10 +28723,10 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
28721
28723
|
/* @__PURE__ */ jsxRuntimeExports.jsx(ChevronDown, { className: "w-[12px] h-[12px] opacity-30 -mt-1" })
|
|
28722
28724
|
] });
|
|
28723
28725
|
};
|
|
28724
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: cn("w-full", className), children: [
|
|
28725
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center justify-between mb-4", children: [
|
|
28726
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("h3", { className: "text-md font-medium text-gray-700", children: title }),
|
|
28727
|
-
filtering.enabled && filtering.searchable && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "relative", children: [
|
|
28726
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: cn("w-full", className), "data-id": "dashboard_analytics_table_root", children: [
|
|
28727
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center justify-between mb-4", "data-id": "dashboard_analytics_table_header", children: [
|
|
28728
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("h3", { className: "text-md font-medium text-gray-700", "data-id": "dashboard_analytics_table_title", children: title }),
|
|
28729
|
+
filtering.enabled && filtering.searchable && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "relative", "data-id": "dashboard_analytics_table_search", children: [
|
|
28728
28730
|
/* @__PURE__ */ jsxRuntimeExports.jsx(Search, { className: "absolute left-[12px] top-1/2 transform -translate-y-1/2 w-[16px] h-[16px] text-gray-400" }),
|
|
28729
28731
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
28730
28732
|
"input",
|
|
@@ -28733,13 +28735,14 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
28733
28735
|
placeholder: "Search...",
|
|
28734
28736
|
value: searchTerm,
|
|
28735
28737
|
onChange: (e) => handleSearch(e.target.value),
|
|
28736
|
-
className: "pl-[36px] pr-[12px] py-[8px] border border-gray-200 rounded-lg text-xs focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent"
|
|
28738
|
+
className: "pl-[36px] pr-[12px] py-[8px] border border-gray-200 rounded-lg text-xs focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent",
|
|
28739
|
+
"data-id": "dashboard_analytics_table_search_input"
|
|
28737
28740
|
}
|
|
28738
28741
|
)
|
|
28739
28742
|
] })
|
|
28740
28743
|
] }),
|
|
28741
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "overflow-x-auto border border-gray-200 rounded-lg", children: /* @__PURE__ */ jsxRuntimeExports.jsxs("table", { className: "w-full", children: [
|
|
28742
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("thead", { className: "bg-gray-50", children: /* @__PURE__ */ jsxRuntimeExports.jsx("tr", { children: columns.map((column) => /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
28744
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "overflow-x-auto border border-gray-200 rounded-lg", "data-id": "dashboard_analytics_table_wrapper", children: /* @__PURE__ */ jsxRuntimeExports.jsxs("table", { className: "w-full", "data-id": "dashboard_analytics_table", children: [
|
|
28745
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("thead", { className: "bg-gray-50", "data-id": "dashboard_analytics_table_head", children: /* @__PURE__ */ jsxRuntimeExports.jsx("tr", { "data-id": "dashboard_analytics_table_head_row", children: columns.map((column) => /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
28743
28746
|
"th",
|
|
28744
28747
|
{
|
|
28745
28748
|
className: cn(
|
|
@@ -28750,17 +28753,19 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
28750
28753
|
),
|
|
28751
28754
|
style: { width: column.width },
|
|
28752
28755
|
onClick: () => handleSort(column),
|
|
28753
|
-
|
|
28756
|
+
"data-id": `dashboard_analytics_table_header_${column.key}`,
|
|
28757
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-2", "data-id": `dashboard_analytics_table_header_content_${column.key}`, children: [
|
|
28754
28758
|
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { children: column.title }),
|
|
28755
28759
|
getSortIcon(column)
|
|
28756
28760
|
] })
|
|
28757
28761
|
},
|
|
28758
28762
|
column.key
|
|
28759
28763
|
)) }) }),
|
|
28760
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("tbody", { className: "bg-white divide-y divide-gray-200", children: paginatedData.map((row, rowIndex) => /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
28764
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("tbody", { className: "bg-white divide-y divide-gray-200", "data-id": "dashboard_analytics_table_body", children: paginatedData.map((row, rowIndex) => /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
28761
28765
|
"tr",
|
|
28762
28766
|
{
|
|
28763
28767
|
className: "hover:bg-gray-50 transition-colors",
|
|
28768
|
+
"data-id": `dashboard_analytics_table_row_${rowIndex}`,
|
|
28764
28769
|
children: columns.map((column) => /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
28765
28770
|
"td",
|
|
28766
28771
|
{
|
|
@@ -28769,6 +28774,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
28769
28774
|
column.align === "center" && "text-center",
|
|
28770
28775
|
column.align === "right" && "text-right"
|
|
28771
28776
|
),
|
|
28777
|
+
"data-id": `dashboard_analytics_table_cell_${rowIndex}_${column.key}`,
|
|
28772
28778
|
children: formatCellValue(row[column.key], column, row)
|
|
28773
28779
|
},
|
|
28774
28780
|
column.key
|
|
@@ -28777,8 +28783,8 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
28777
28783
|
rowIndex
|
|
28778
28784
|
)) })
|
|
28779
28785
|
] }) }),
|
|
28780
|
-
pagination.enabled && totalPages > 1 && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center justify-between mt-4", children: [
|
|
28781
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "text-xs text-gray-500", children: [
|
|
28786
|
+
pagination.enabled && totalPages > 1 && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center justify-between mt-4", "data-id": "dashboard_analytics_table_pagination", children: [
|
|
28787
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "text-xs text-gray-500", "data-id": "dashboard_analytics_table_pagination_info", children: [
|
|
28782
28788
|
"Showing ",
|
|
28783
28789
|
(currentPage - 1) * pagination.pageSize + 1,
|
|
28784
28790
|
" to",
|
|
@@ -28789,13 +28795,14 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
28789
28795
|
processedData.length,
|
|
28790
28796
|
" results"
|
|
28791
28797
|
] }),
|
|
28792
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
28798
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-2", "data-id": "dashboard_analytics_table_pagination_controls", children: [
|
|
28793
28799
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
28794
28800
|
"button",
|
|
28795
28801
|
{
|
|
28796
28802
|
onClick: () => setCurrentPage((prev) => Math.max(1, prev - 1)),
|
|
28797
28803
|
disabled: currentPage === 1,
|
|
28798
28804
|
className: "px-[12px] py-[4px] text-xs border border-gray-200 rounded hover:bg-gray-50 disabled:opacity-50 disabled:cursor-not-allowed",
|
|
28805
|
+
"data-id": "dashboard_analytics_table_pagination_btn_previous",
|
|
28799
28806
|
children: "Previous"
|
|
28800
28807
|
}
|
|
28801
28808
|
),
|
|
@@ -28813,6 +28820,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
28813
28820
|
"px-[12px] py-[4px] text-xs border rounded",
|
|
28814
28821
|
currentPage === pageNum ? "bg-blue-500 text-white border-blue-500" : "border-gray-200 hover:bg-gray-50"
|
|
28815
28822
|
),
|
|
28823
|
+
"data-id": `dashboard_analytics_table_pagination_btn_page_${pageNum}`,
|
|
28816
28824
|
children: pageNum
|
|
28817
28825
|
},
|
|
28818
28826
|
pageNum
|
|
@@ -28824,12 +28832,13 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
28824
28832
|
onClick: () => setCurrentPage((prev) => Math.min(totalPages, prev + 1)),
|
|
28825
28833
|
disabled: currentPage === totalPages,
|
|
28826
28834
|
className: "px-[12px] py-[4px] text-xs border border-gray-200 rounded hover:bg-gray-50 disabled:opacity-50 disabled:cursor-not-allowed",
|
|
28835
|
+
"data-id": "dashboard_analytics_table_pagination_btn_next",
|
|
28827
28836
|
children: "Next"
|
|
28828
28837
|
}
|
|
28829
28838
|
)
|
|
28830
28839
|
] })
|
|
28831
28840
|
] }),
|
|
28832
|
-
paginatedData.length === 0 && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-center py-[32px] text-gray-500", children: searchTerm ? "No results found for your search." : "No data available." })
|
|
28841
|
+
paginatedData.length === 0 && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-center py-[32px] text-gray-500", "data-id": "dashboard_analytics_table_empty_state", children: searchTerm ? "No results found for your search." : "No data available." })
|
|
28833
28842
|
] });
|
|
28834
28843
|
};
|
|
28835
28844
|
const DOMAIN = window.location.protocol + "//" + window.location.host;
|
|
@@ -29123,20 +29132,21 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
29123
29132
|
}
|
|
29124
29133
|
return value.toString();
|
|
29125
29134
|
};
|
|
29126
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: cn("w-full", className), children: [
|
|
29127
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "grid grid-cols-4 items-center gap-4 px-[16px] py-[12px] bg-gray-50 border-b border-gray-200 text-xs font-medium text-gray-600", children: [
|
|
29128
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-left", children: "Name" }),
|
|
29129
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-center", children: "Runs" }),
|
|
29130
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-center", children: "Response Time" }),
|
|
29131
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-center", children: "Tokens" })
|
|
29135
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: cn("w-full", className), "data-id": "dashboard_agent_list_view_root", children: [
|
|
29136
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "grid grid-cols-4 items-center gap-4 px-[16px] py-[12px] bg-gray-50 border-b border-gray-200 text-xs font-medium text-gray-600", "data-id": "dashboard_agent_list_view_header", children: [
|
|
29137
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-left", "data-id": "dashboard_agent_list_view_header_name", children: "Name" }),
|
|
29138
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-center", "data-id": "dashboard_agent_list_view_header_runs", children: "Runs" }),
|
|
29139
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-center", "data-id": "dashboard_agent_list_view_header_response_time", children: "Response Time" }),
|
|
29140
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-center", "data-id": "dashboard_agent_list_view_header_tokens", children: "Tokens" })
|
|
29132
29141
|
] }),
|
|
29133
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "divide-y divide-gray-100", children: data.slice(0, visibleCount).map((agent, index) => /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
29142
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "divide-y divide-gray-100", "data-id": "dashboard_agent_list_view_body", children: data.slice(0, visibleCount).map((agent, index) => /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
29134
29143
|
"div",
|
|
29135
29144
|
{
|
|
29136
29145
|
className: "grid grid-cols-4 items-center gap-4 px-[16px] py-[12px] cursor-pointer transition-colors duration-150 border-b border-gray-200",
|
|
29146
|
+
"data-id": `dashboard_agent_list_view_row_${index}`,
|
|
29137
29147
|
children: [
|
|
29138
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-[8px]", children: [
|
|
29139
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex-shrink-0", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
29148
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-[8px]", "data-id": `dashboard_agent_list_view_row_name_${index}`, children: [
|
|
29149
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex-shrink-0", "data-id": `dashboard_agent_list_view_row_avatar_${index}`, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
29140
29150
|
IconPreview,
|
|
29141
29151
|
{
|
|
29142
29152
|
icon: agent.icon,
|
|
@@ -29145,20 +29155,21 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
29145
29155
|
name: agent.name || "Unknown Agent"
|
|
29146
29156
|
}
|
|
29147
29157
|
) }),
|
|
29148
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "min-w-0 flex-1 w-full", children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-xs font-medium text-gray-700 truncate", children: agent.name || "Unknown Agent" }) })
|
|
29158
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "min-w-0 flex-1 w-full", "data-id": `dashboard_agent_list_view_row_name_text_${index}`, children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-xs font-medium text-gray-700 truncate", children: agent.name || "Unknown Agent" }) })
|
|
29149
29159
|
] }),
|
|
29150
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-center font-medium text-xs text-gray-700", children: agent.runs ? formatValue2(agent.runs) : "-" }),
|
|
29151
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-center font-medium text-xs text-gray-700", children: agent.responseTime || "-" }),
|
|
29152
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-center font-medium text-xs text-gray-700", children: agent.tokens ? formatValue2(agent.tokens) : "-" })
|
|
29160
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-center font-medium text-xs text-gray-700", "data-id": `dashboard_agent_list_view_row_runs_${index}`, children: agent.runs ? formatValue2(agent.runs) : "-" }),
|
|
29161
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-center font-medium text-xs text-gray-700", "data-id": `dashboard_agent_list_view_row_response_time_${index}`, children: agent.responseTime || "-" }),
|
|
29162
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-center font-medium text-xs text-gray-700", "data-id": `dashboard_agent_list_view_row_tokens_${index}`, children: agent.tokens ? formatValue2(agent.tokens) : "-" })
|
|
29153
29163
|
]
|
|
29154
29164
|
},
|
|
29155
29165
|
agent.id || index
|
|
29156
29166
|
)) }),
|
|
29157
|
-
visibleCount < data.length && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex justify-center", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
29167
|
+
visibleCount < data.length && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex justify-center", "data-id": "dashboard_agent_list_view_load_more_container", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
29158
29168
|
"button",
|
|
29159
29169
|
{
|
|
29160
29170
|
onClick: loadMore,
|
|
29161
29171
|
className: "px-[16px] py-[8px] text-xs font-medium text-gray-700 bg-white border border-gray-300 rounded-md hover:bg-gray-50 transition-colors duration-150",
|
|
29172
|
+
"data-id": "dashboard_agent_list_view_load_more_btn",
|
|
29162
29173
|
children: "Load 10 more"
|
|
29163
29174
|
}
|
|
29164
29175
|
) })
|
|
@@ -29202,20 +29213,21 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
29202
29213
|
}
|
|
29203
29214
|
return value.toString();
|
|
29204
29215
|
};
|
|
29205
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: cn("w-full", className), children: [
|
|
29206
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "grid grid-cols-4 items-center gap-4 px-[16px] py-[12px] bg-gray-50 border-b border-gray-200 text-xs font-medium text-gray-600", children: [
|
|
29207
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-left", children: "Name" }),
|
|
29208
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-center", children: "Type" }),
|
|
29209
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-center", children: "Runs" }),
|
|
29210
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-center", children: "Response Time" })
|
|
29216
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: cn("w-full", className), "data-id": "dashboard_tool_list_view_root", children: [
|
|
29217
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "grid grid-cols-4 items-center gap-4 px-[16px] py-[12px] bg-gray-50 border-b border-gray-200 text-xs font-medium text-gray-600", "data-id": "dashboard_tool_list_view_header", children: [
|
|
29218
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-left", "data-id": "dashboard_tool_list_view_header_name", children: "Name" }),
|
|
29219
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-center", "data-id": "dashboard_tool_list_view_header_type", children: "Type" }),
|
|
29220
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-center", "data-id": "dashboard_tool_list_view_header_runs", children: "Runs" }),
|
|
29221
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-center", "data-id": "dashboard_tool_list_view_header_response_time", children: "Response Time" })
|
|
29211
29222
|
] }),
|
|
29212
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "divide-y divide-gray-100", children: data.slice(0, visibleCount).map((tool, index) => /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
29223
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "divide-y divide-gray-100", "data-id": "dashboard_tool_list_view_body", children: data.slice(0, visibleCount).map((tool, index) => /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
29213
29224
|
"div",
|
|
29214
29225
|
{
|
|
29215
29226
|
className: "grid grid-cols-4 items-center gap-4 px-[16px] py-[12px] cursor-pointer transition-colors duration-150 border-b border-gray-200",
|
|
29227
|
+
"data-id": `dashboard_tool_list_view_row_${index}`,
|
|
29216
29228
|
children: [
|
|
29217
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-[8px]", children: [
|
|
29218
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex-shrink-0", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
29229
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-[8px]", "data-id": `dashboard_tool_list_view_row_name_${index}`, children: [
|
|
29230
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex-shrink-0", "data-id": `dashboard_tool_list_view_row_icon_${index}`, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
29219
29231
|
IconPreview,
|
|
29220
29232
|
{
|
|
29221
29233
|
icon: tool.icon,
|
|
@@ -29225,23 +29237,24 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
29225
29237
|
toolType: tool["toolType"] || tool["type"]
|
|
29226
29238
|
}
|
|
29227
29239
|
) }),
|
|
29228
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "min-w-0 flex-1 w-full", children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-xs font-medium text-gray-700 truncate", children: tool.name || "Unknown Tool" }) })
|
|
29240
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "min-w-0 flex-1 w-full", "data-id": `dashboard_tool_list_view_row_name_text_${index}`, children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-xs font-medium text-gray-700 truncate", children: tool.name || "Unknown Tool" }) })
|
|
29229
29241
|
] }),
|
|
29230
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex items-center justify-center", children: /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: cn(
|
|
29242
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex items-center justify-center", "data-id": `dashboard_tool_list_view_row_type_${index}`, children: /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: cn(
|
|
29231
29243
|
"inline-flex items-center px-[10px] py-[4px] rounded-full text-xs font-medium border",
|
|
29232
29244
|
getToolTypeStyle(tool["toolType"] || tool["type"] || "Default")
|
|
29233
|
-
), children: getToolTypeName(tool["toolType"] || tool["type"] || "Default") }) }),
|
|
29234
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-center font-medium text-xs text-gray-700", children: tool.runs ? formatValue2(tool.runs) : "-" }),
|
|
29235
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-center font-medium text-xs text-gray-700", children: tool.responseTime || "-" })
|
|
29245
|
+
), "data-id": `dashboard_tool_list_view_row_type_badge_${index}`, children: getToolTypeName(tool["toolType"] || tool["type"] || "Default") }) }),
|
|
29246
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-center font-medium text-xs text-gray-700", "data-id": `dashboard_tool_list_view_row_runs_${index}`, children: tool.runs ? formatValue2(tool.runs) : "-" }),
|
|
29247
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-center font-medium text-xs text-gray-700", "data-id": `dashboard_tool_list_view_row_response_time_${index}`, children: tool.responseTime || "-" })
|
|
29236
29248
|
]
|
|
29237
29249
|
},
|
|
29238
29250
|
tool.id || index
|
|
29239
29251
|
)) }),
|
|
29240
|
-
visibleCount < data.length && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex justify-center", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
29252
|
+
visibleCount < data.length && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex justify-center", "data-id": "dashboard_tool_list_view_load_more_container", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
29241
29253
|
"button",
|
|
29242
29254
|
{
|
|
29243
29255
|
onClick: loadMore,
|
|
29244
29256
|
className: "px-[16px] py-[8px] text-xs font-medium text-gray-700 bg-white border border-gray-300 rounded-md hover:bg-gray-50 transition-colors duration-150",
|
|
29257
|
+
"data-id": "dashboard_tool_list_view_load_more_btn",
|
|
29245
29258
|
children: "Load 10 more"
|
|
29246
29259
|
}
|
|
29247
29260
|
) })
|
|
@@ -29381,42 +29394,44 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
29381
29394
|
}
|
|
29382
29395
|
return value.toString();
|
|
29383
29396
|
};
|
|
29384
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: cn("w-full", className), children: [
|
|
29385
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "grid grid-cols-4 items-center gap-4 px-[16px] py-[12px] bg-gray-50 border-b border-gray-200 text-xs font-medium text-gray-600", children: [
|
|
29386
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-left", children: "Model Name" }),
|
|
29387
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-center", children: "Runs" }),
|
|
29388
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-center", children: "Tokens" }),
|
|
29389
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-center", children: "Response Time" })
|
|
29397
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: cn("w-full", className), "data-id": "dashboard_model_list_view_root", children: [
|
|
29398
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "grid grid-cols-4 items-center gap-4 px-[16px] py-[12px] bg-gray-50 border-b border-gray-200 text-xs font-medium text-gray-600", "data-id": "dashboard_model_list_view_header", children: [
|
|
29399
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-left", "data-id": "dashboard_model_list_view_header_name", children: "Model Name" }),
|
|
29400
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-center", "data-id": "dashboard_model_list_view_header_runs", children: "Runs" }),
|
|
29401
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-center", "data-id": "dashboard_model_list_view_header_tokens", children: "Tokens" }),
|
|
29402
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-center", "data-id": "dashboard_model_list_view_header_response_time", children: "Response Time" })
|
|
29390
29403
|
] }),
|
|
29391
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "divide-y divide-gray-100", children: data.slice(0, visibleCount).map((model, index) => /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
29404
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "divide-y divide-gray-100", "data-id": "dashboard_model_list_view_body", children: data.slice(0, visibleCount).map((model, index) => /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
29392
29405
|
"div",
|
|
29393
29406
|
{
|
|
29394
29407
|
className: "grid grid-cols-4 items-center gap-4 px-[16px] py-[12px] cursor-pointer transition-colors duration-150 border-b border-gray-200",
|
|
29408
|
+
"data-id": `dashboard_model_list_view_row_${index}`,
|
|
29395
29409
|
children: [
|
|
29396
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-[8px]", children: [
|
|
29397
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex-shrink-0", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
29410
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-[8px]", "data-id": `dashboard_model_list_view_row_name_${index}`, children: [
|
|
29411
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex-shrink-0", "data-id": `dashboard_model_list_view_row_icon_${index}`, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
29398
29412
|
ModelIcon,
|
|
29399
29413
|
{
|
|
29400
29414
|
provider: model.provider
|
|
29401
29415
|
}
|
|
29402
29416
|
) }),
|
|
29403
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "min-w-0 flex-1 w-full", children: [
|
|
29404
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-xs font-medium text-gray-700 truncate", children: model.name || model.modelName || "Unknown Model" }),
|
|
29405
|
-
model.provider && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-xs text-gray-500 truncate", children: getProviderDisplayName(model.provider) })
|
|
29417
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "min-w-0 flex-1 w-full", "data-id": `dashboard_model_list_view_row_name_text_${index}`, children: [
|
|
29418
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-xs font-medium text-gray-700 truncate", "data-id": `dashboard_model_list_view_row_name_value_${index}`, children: model.name || model.modelName || "Unknown Model" }),
|
|
29419
|
+
model.provider && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-xs text-gray-500 truncate", "data-id": `dashboard_model_list_view_row_provider_${index}`, children: getProviderDisplayName(model.provider) })
|
|
29406
29420
|
] })
|
|
29407
29421
|
] }),
|
|
29408
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-center font-medium text-xs text-gray-700", children: formatValue2(model.runs || 0) }),
|
|
29409
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-center font-medium text-xs text-gray-700", children: formatValue2(model.tokens || model.totalTokens || 0) }),
|
|
29410
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-center font-medium text-xs text-gray-700", children: model.responseTime || (model.avgResponseTime ? `${model.avgResponseTime}ms` : "N/A") })
|
|
29422
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-center font-medium text-xs text-gray-700", "data-id": `dashboard_model_list_view_row_runs_${index}`, children: formatValue2(model.runs || 0) }),
|
|
29423
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-center font-medium text-xs text-gray-700", "data-id": `dashboard_model_list_view_row_tokens_${index}`, children: formatValue2(model.tokens || model.totalTokens || 0) }),
|
|
29424
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-center font-medium text-xs text-gray-700", "data-id": `dashboard_model_list_view_row_response_time_${index}`, children: model.responseTime || (model.avgResponseTime ? `${model.avgResponseTime}ms` : "N/A") })
|
|
29411
29425
|
]
|
|
29412
29426
|
},
|
|
29413
29427
|
model.id || index
|
|
29414
29428
|
)) }),
|
|
29415
|
-
visibleCount < data.length && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex justify-center", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
29429
|
+
visibleCount < data.length && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex justify-center", "data-id": "dashboard_model_list_view_load_more_container", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
29416
29430
|
"button",
|
|
29417
29431
|
{
|
|
29418
29432
|
onClick: loadMore,
|
|
29419
29433
|
className: "px-[16px] py-[8px] text-xs font-medium text-gray-700 bg-white border border-gray-300 rounded-md hover:bg-gray-50 transition-colors duration-150",
|
|
29434
|
+
"data-id": "dashboard_model_list_view_load_more_btn",
|
|
29420
29435
|
children: "Load 10 more"
|
|
29421
29436
|
}
|
|
29422
29437
|
) })
|
|
@@ -29537,7 +29552,8 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
29537
29552
|
"div",
|
|
29538
29553
|
{
|
|
29539
29554
|
className: "fixed inset-0 bg-black bg-opacity-50 z-40 transition-opacity duration-300",
|
|
29540
|
-
onClick: handleClose
|
|
29555
|
+
onClick: handleClose,
|
|
29556
|
+
"data-id": "dashboard_runs_slider_overlay"
|
|
29541
29557
|
}
|
|
29542
29558
|
),
|
|
29543
29559
|
/* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
@@ -29548,39 +29564,42 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
29548
29564
|
isOpen ? "translate-x-0" : "translate-x-full",
|
|
29549
29565
|
className
|
|
29550
29566
|
),
|
|
29567
|
+
"data-id": "dashboard_runs_slider_panel",
|
|
29551
29568
|
children: [
|
|
29552
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center justify-between px-6 py-3 border-b border-[#d0d5dd]", children: [
|
|
29553
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("h2", { className: "text-lg font-semibold text-[#101828]", children: config2.title }),
|
|
29569
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center justify-between px-6 py-3 border-b border-[#d0d5dd]", "data-id": "dashboard_runs_slider_header", children: [
|
|
29570
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("h2", { className: "text-lg font-semibold text-[#101828]", "data-id": "dashboard_runs_slider_title", children: config2.title }),
|
|
29554
29571
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
29555
29572
|
"button",
|
|
29556
29573
|
{
|
|
29557
29574
|
onClick: handleClose,
|
|
29558
29575
|
className: "p-2 hover:bg-gray-100 rounded-lg transition-colors",
|
|
29576
|
+
"data-id": "dashboard_runs_slider_close_btn",
|
|
29559
29577
|
children: /* @__PURE__ */ jsxRuntimeExports.jsx(X, { className: "h-5 w-5 text-[#101828]" })
|
|
29560
29578
|
}
|
|
29561
29579
|
)
|
|
29562
29580
|
] }),
|
|
29563
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex flex-col h-[calc(100%-64px)] p-6 gap-6", children: [
|
|
29564
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center justify-between", children: [
|
|
29565
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "text-sm font-medium text-[#344054]", children: [
|
|
29581
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex flex-col h-[calc(100%-64px)] p-6 gap-6", "data-id": "dashboard_runs_slider_content", children: [
|
|
29582
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center justify-between", "data-id": "dashboard_runs_slider_subheader", children: [
|
|
29583
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "text-sm font-medium text-[#344054]", "data-id": "dashboard_runs_slider_date_label", children: [
|
|
29566
29584
|
config2.title,
|
|
29567
29585
|
" (",
|
|
29568
29586
|
formatDate(date2),
|
|
29569
29587
|
")"
|
|
29570
29588
|
] }),
|
|
29571
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "w-[210px] relative filter-dropdown", children: [
|
|
29589
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "w-[210px] relative filter-dropdown", "data-id": "dashboard_runs_slider_filter_dropdown", children: [
|
|
29572
29590
|
/* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
29573
29591
|
"button",
|
|
29574
29592
|
{
|
|
29575
29593
|
onClick: () => setShowFilterDropdown(!showFilterDropdown),
|
|
29576
29594
|
className: "w-full bg-white border border-[#d0d5dd] rounded-lg px-3.5 py-2.5 flex items-center justify-between text-sm text-[#101828] hover:bg-gray-50 transition-colors",
|
|
29595
|
+
"data-id": "dashboard_runs_slider_filter_btn",
|
|
29577
29596
|
children: [
|
|
29578
29597
|
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { children: selectedFilterLabel }),
|
|
29579
29598
|
/* @__PURE__ */ jsxRuntimeExports.jsx(ChevronDown, { className: "h-4 w-4 text-[#101828]" })
|
|
29580
29599
|
]
|
|
29581
29600
|
}
|
|
29582
29601
|
),
|
|
29583
|
-
showFilterDropdown && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "absolute top-full left-0 right-0 mt-1 bg-white border border-[#d0d5dd] rounded-lg shadow-lg z-10 max-h-60 overflow-y-auto", children: filterOptions.map((option) => /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
29602
|
+
showFilterDropdown && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "absolute top-full left-0 right-0 mt-1 bg-white border border-[#d0d5dd] rounded-lg shadow-lg z-10 max-h-60 overflow-y-auto", "data-id": "dashboard_runs_slider_filter_menu", children: filterOptions.map((option) => /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
29584
29603
|
"button",
|
|
29585
29604
|
{
|
|
29586
29605
|
onClick: () => handleFilterSelect(option.value),
|
|
@@ -29588,25 +29607,26 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
29588
29607
|
"w-full px-3.5 py-2.5 text-left text-sm hover:bg-gray-50 transition-colors",
|
|
29589
29608
|
selectedFilter === option.value ? "bg-blue-50 text-blue-700" : "text-[#101828]"
|
|
29590
29609
|
),
|
|
29610
|
+
"data-id": `dashboard_runs_slider_filter_option_${option.value}`,
|
|
29591
29611
|
children: option.label
|
|
29592
29612
|
},
|
|
29593
29613
|
option.value
|
|
29594
29614
|
)) })
|
|
29595
29615
|
] })
|
|
29596
29616
|
] }),
|
|
29597
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex-1 overflow-hidden", children: [
|
|
29598
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "bg-[#f9fafb] border-b border-[#eaecf0] px-2 py-2", children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "grid grid-cols-4 gap-3 items-center", children: [
|
|
29599
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "col-span-2 px-0 py-2", children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-xs font-medium text-[#475467]", children: "Name" }) }),
|
|
29600
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex justify-center px-0 py-2", children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-xs font-medium text-[#475467]", children: "Runs" }) }),
|
|
29601
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex justify-center px-0 py-2", children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-xs font-medium text-[#475467]", children: "Response Time" }) })
|
|
29617
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex-1 overflow-hidden", "data-id": "dashboard_runs_slider_table_container", children: [
|
|
29618
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "bg-[#f9fafb] border-b border-[#eaecf0] px-2 py-2", "data-id": "dashboard_runs_slider_table_header", children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "grid grid-cols-4 gap-3 items-center", "data-id": "dashboard_runs_slider_table_header_row", children: [
|
|
29619
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "col-span-2 px-0 py-2", "data-id": "dashboard_runs_slider_table_header_name", children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-xs font-medium text-[#475467]", children: "Name" }) }),
|
|
29620
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex justify-center px-0 py-2", "data-id": "dashboard_runs_slider_table_header_runs", children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-xs font-medium text-[#475467]", children: "Runs" }) }),
|
|
29621
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex justify-center px-0 py-2", "data-id": "dashboard_runs_slider_table_header_response_time", children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-xs font-medium text-[#475467]", children: "Response Time" }) })
|
|
29602
29622
|
] }) }),
|
|
29603
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "overflow-y-auto max-h-[calc(100%-40px)]", children: visibleData.length === 0 ? /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex flex-col items-center justify-center h-64 text-center", children: [
|
|
29604
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs("h3", { className: "text-md font-medium text-gray-900 mb-[8px]", children: [
|
|
29623
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "overflow-y-auto max-h-[calc(100%-40px)]", "data-id": "dashboard_runs_slider_table_body", children: visibleData.length === 0 ? /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex flex-col items-center justify-center h-64 text-center", "data-id": "dashboard_runs_slider_empty_state", children: [
|
|
29624
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("h3", { className: "text-md font-medium text-gray-900 mb-[8px]", "data-id": "dashboard_runs_slider_empty_state_title", children: [
|
|
29605
29625
|
"No ",
|
|
29606
29626
|
config2.title.toLowerCase(),
|
|
29607
29627
|
" for this date"
|
|
29608
29628
|
] }),
|
|
29609
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs("p", { className: "text-xs text-gray-500", children: [
|
|
29629
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("p", { className: "text-xs text-gray-500", "data-id": "dashboard_runs_slider_empty_state_message", children: [
|
|
29610
29630
|
"There were no ",
|
|
29611
29631
|
config2.title.toLowerCase(),
|
|
29612
29632
|
" recorded on ",
|
|
@@ -29618,9 +29638,10 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
29618
29638
|
"div",
|
|
29619
29639
|
{
|
|
29620
29640
|
className: "grid grid-cols-4 gap-3 items-center px-2 py-3 border-b border-[#eaecf0] hover:bg-gray-50 transition-colors",
|
|
29641
|
+
"data-id": `dashboard_runs_slider_table_row_${index}`,
|
|
29621
29642
|
children: [
|
|
29622
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "col-span-2 flex items-center gap-2", children: [
|
|
29623
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex-shrink-0", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
29643
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "col-span-2 flex items-center gap-2", "data-id": `dashboard_runs_slider_table_row_name_${index}`, children: [
|
|
29644
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex-shrink-0", "data-id": `dashboard_runs_slider_table_row_avatar_${index}`, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
29624
29645
|
IconPreview,
|
|
29625
29646
|
{
|
|
29626
29647
|
icon: item.icon,
|
|
@@ -29632,22 +29653,23 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
29632
29653
|
modelName: item.modelName
|
|
29633
29654
|
}
|
|
29634
29655
|
) }),
|
|
29635
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "min-w-0 flex-1", children: [
|
|
29656
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "min-w-0 flex-1", "data-id": `dashboard_runs_slider_table_row_name_text_${index}`, children: [
|
|
29636
29657
|
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-sm font-medium text-[#101828] truncate", children: item.name }),
|
|
29637
|
-
metricType === "modelRuns" && item.provider && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-xs text-[#475467] truncate", children: item.provider })
|
|
29658
|
+
metricType === "modelRuns" && item.provider && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-xs text-[#475467] truncate", "data-id": `dashboard_runs_slider_table_row_provider_${index}`, children: item.provider })
|
|
29638
29659
|
] })
|
|
29639
29660
|
] }),
|
|
29640
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex justify-center", children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-xs font-medium text-[#475467]", children: formatValue(item.runs) }) }),
|
|
29641
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex justify-center", children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-xs font-medium text-[#475467]", children: item.responseTime }) })
|
|
29661
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex justify-center", "data-id": `dashboard_runs_slider_table_row_runs_${index}`, children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-xs font-medium text-[#475467]", children: formatValue(item.runs) }) }),
|
|
29662
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex justify-center", "data-id": `dashboard_runs_slider_table_row_response_time_${index}`, children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-xs font-medium text-[#475467]", children: item.responseTime }) })
|
|
29642
29663
|
]
|
|
29643
29664
|
},
|
|
29644
29665
|
item.id || index
|
|
29645
29666
|
)),
|
|
29646
|
-
visibleCount < filteredData.length && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex justify-center", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
29667
|
+
visibleCount < filteredData.length && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex justify-center", "data-id": "dashboard_runs_slider_load_more_container", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
29647
29668
|
"button",
|
|
29648
29669
|
{
|
|
29649
29670
|
onClick: loadMore,
|
|
29650
29671
|
className: "bg-white border border-[#d0d5dd] rounded px-3 py-1 text-xs font-medium text-[#344054] hover:bg-gray-50 transition-colors",
|
|
29672
|
+
"data-id": "dashboard_runs_slider_load_more_btn",
|
|
29651
29673
|
children: "Load 10 more"
|
|
29652
29674
|
}
|
|
29653
29675
|
) })
|
|
@@ -31265,7 +31287,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
31265
31287
|
}
|
|
31266
31288
|
};
|
|
31267
31289
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
31268
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: cn("w-full", className), children: renderView() }),
|
|
31290
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: cn("w-full", className), "data-id": "dashboard_view_renderer_root", children: renderView() }),
|
|
31269
31291
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
31270
31292
|
RunsSlider,
|
|
31271
31293
|
{
|
|
@@ -31676,7 +31698,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
31676
31698
|
}
|
|
31677
31699
|
return { maxItems: 40, maxLabelLength: 25 };
|
|
31678
31700
|
};
|
|
31679
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: cn("flex items-center gap-3", className), children: [
|
|
31701
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: cn("flex items-center gap-3", className), "data-id": "dashboard_section_controls", children: [
|
|
31680
31702
|
dropdown && /* @__PURE__ */ jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, { children: dropdown.multiSelect ? /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
31681
31703
|
MultiSelect,
|
|
31682
31704
|
{
|
|
@@ -31704,7 +31726,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
31704
31726
|
className: "w-48"
|
|
31705
31727
|
}
|
|
31706
31728
|
) }),
|
|
31707
|
-
buttons && buttons.length > 0 && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex items-center border border-gray-200 rounded-lg overflow-hidden", children: buttons.map((button, index) => /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
31729
|
+
buttons && buttons.length > 0 && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex items-center border border-gray-200 rounded-lg overflow-hidden", "data-id": "dashboard_section_controls_button_group", children: buttons.map((button, index) => /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
31708
31730
|
"button",
|
|
31709
31731
|
{
|
|
31710
31732
|
onClick: () => {
|
|
@@ -31717,11 +31739,12 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
31717
31739
|
button.active ? "bg-white text-gray-900 shadow-[0 1px 3px 0 rgba(16, 24, 40, 0.08), 0 1px 2px 0 rgba(16, 24, 40, 0.08)]" : "text-gray-500 bg-white",
|
|
31718
31740
|
index > 0 && "border-l border-gray-200"
|
|
31719
31741
|
),
|
|
31742
|
+
"data-id": `dashboard_section_controls_btn_${button.value}`,
|
|
31720
31743
|
children: button.icon && /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "mr-[8px]", children: button.icon })
|
|
31721
31744
|
},
|
|
31722
31745
|
button.value
|
|
31723
31746
|
)) }),
|
|
31724
|
-
toggle && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-[4px] border border-gray-200 bg-gray-50 overflow-hidden p-[2px] rounded-[6px]", children: [
|
|
31747
|
+
toggle && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-[4px] border border-gray-200 bg-gray-50 overflow-hidden p-[2px] rounded-[6px]", "data-id": "dashboard_section_controls_view_toggle", children: [
|
|
31725
31748
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
31726
31749
|
"button",
|
|
31727
31750
|
{
|
|
@@ -31734,6 +31757,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
31734
31757
|
"hover:bg-white ",
|
|
31735
31758
|
toggle.chartView ? "bg-white text-gray-900 shadow-md" : "text-gray-500 bg-white"
|
|
31736
31759
|
),
|
|
31760
|
+
"data-id": "dashboard_section_controls_view_toggle_btn_chart",
|
|
31737
31761
|
children: /* @__PURE__ */ jsxRuntimeExports.jsx(BarChart3, { className: "w-[16px] h-[16px]" })
|
|
31738
31762
|
}
|
|
31739
31763
|
),
|
|
@@ -31749,6 +31773,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
31749
31773
|
"hover:bg-white ",
|
|
31750
31774
|
toggle.tableView ? "bg-white text-gray-900 shadow-md" : "text-gray-500 bg-white"
|
|
31751
31775
|
),
|
|
31776
|
+
"data-id": "dashboard_section_controls_view_toggle_btn_table",
|
|
31752
31777
|
children: /* @__PURE__ */ jsxRuntimeExports.jsx(Table, { className: "w-[16px] h-[16px]" })
|
|
31753
31778
|
}
|
|
31754
31779
|
)
|
|
@@ -32362,17 +32387,18 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
32362
32387
|
gridColumn: (layout == null ? void 0 : layout.span) ? `span ${layout.span}` : void 0,
|
|
32363
32388
|
order: layout == null ? void 0 : layout.order
|
|
32364
32389
|
},
|
|
32390
|
+
"data-id": `dashboard_section_${id}`,
|
|
32365
32391
|
children: [
|
|
32366
|
-
title && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "w-full", children: [
|
|
32367
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("h1", { className: "text-md font-medium text-gray-700", children: title }),
|
|
32368
|
-
description && /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-xs text-gray-500", children: description })
|
|
32392
|
+
title && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "w-full", "data-id": `dashboard_section_header_${id}`, children: [
|
|
32393
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("h1", { className: "text-md font-medium text-gray-700", "data-id": `dashboard_section_title_${id}`, children: title }),
|
|
32394
|
+
description && /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-xs text-gray-500", "data-id": `dashboard_section_description_${id}`, children: description })
|
|
32369
32395
|
] }),
|
|
32370
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex flex-col sm:flex-row gap-[16px]", children: isLoading ? /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
32371
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex-1", children: /* @__PURE__ */ jsxRuntimeExports.jsx(MetricCardSkeleton, {}) }),
|
|
32372
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex-1", children: /* @__PURE__ */ jsxRuntimeExports.jsx(MetricCardSkeleton, {}) }),
|
|
32373
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex-1", children: /* @__PURE__ */ jsxRuntimeExports.jsx(MetricCardSkeleton, {}) }),
|
|
32374
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex-1", children: /* @__PURE__ */ jsxRuntimeExports.jsx(MetricCardSkeleton, {}) })
|
|
32375
|
-
] }) : getUpdatedMetrics().map((metric, index) => /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex-1", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
32396
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex flex-col sm:flex-row gap-[16px]", "data-id": `dashboard_section_metrics_${id}`, children: isLoading ? /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
32397
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex-1", "data-id": `dashboard_section_metric_skeleton_${id}_0`, children: /* @__PURE__ */ jsxRuntimeExports.jsx(MetricCardSkeleton, {}) }),
|
|
32398
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex-1", "data-id": `dashboard_section_metric_skeleton_${id}_1`, children: /* @__PURE__ */ jsxRuntimeExports.jsx(MetricCardSkeleton, {}) }),
|
|
32399
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex-1", "data-id": `dashboard_section_metric_skeleton_${id}_2`, children: /* @__PURE__ */ jsxRuntimeExports.jsx(MetricCardSkeleton, {}) }),
|
|
32400
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex-1", "data-id": `dashboard_section_metric_skeleton_${id}_3`, children: /* @__PURE__ */ jsxRuntimeExports.jsx(MetricCardSkeleton, {}) })
|
|
32401
|
+
] }) : getUpdatedMetrics().map((metric, index) => /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex-1", "data-id": `dashboard_section_metric_${id}_${index}`, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
32376
32402
|
MetricCard,
|
|
32377
32403
|
{
|
|
32378
32404
|
data: metric,
|
|
@@ -32380,8 +32406,8 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
32380
32406
|
isFirst: index === 0
|
|
32381
32407
|
}
|
|
32382
32408
|
) }, `${id}-metric-${index}`)) }),
|
|
32383
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center justify-between", children: [
|
|
32384
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: getCurrentMetric() && /* @__PURE__ */ jsxRuntimeExports.jsx("h3", { className: "text-md font-medium text-gray-700", children: (_a = getCurrentMetric()) == null ? void 0 : _a.title }) }),
|
|
32409
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center justify-between", "data-id": `dashboard_section_subtitle_${id}`, children: [
|
|
32410
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { "data-id": `dashboard_section_current_metric_${id}`, children: getCurrentMetric() && /* @__PURE__ */ jsxRuntimeExports.jsx("h3", { className: "text-md font-medium text-gray-700", "data-id": `dashboard_section_current_metric_title_${id}`, children: (_a = getCurrentMetric()) == null ? void 0 : _a.title }) }),
|
|
32385
32411
|
enhancedControls && /* @__PURE__ */ jsxRuntimeExports.jsx(SectionControls, { config: enhancedControls })
|
|
32386
32412
|
] }),
|
|
32387
32413
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
@@ -34770,13 +34796,13 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
34770
34796
|
onExport == null ? void 0 : onExport();
|
|
34771
34797
|
};
|
|
34772
34798
|
const isAnyChartLoading = Object.values(sectionChartLoading).some((loading) => loading);
|
|
34773
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: cn("w-full h-full flex flex-col overflow-hidden", className), children: [
|
|
34774
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex flex-col gap-2 w-full p-[24px] pb-[12px]", children: [
|
|
34775
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("h1", { className: "text-lg font-bold text-gray-900 w-full", children: title }),
|
|
34776
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-2 w-full", children: [
|
|
34777
|
-
subtitle && /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-gray-500 text-xs w-full", children: subtitle }),
|
|
34778
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-2 justify-end flex-shrink-0", children: [
|
|
34779
|
-
(isInitialLoading || isAnyChartLoading) && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-2 text-sm medium text-gray-500", children: [
|
|
34799
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: cn("w-full h-full flex flex-col overflow-hidden", className), "data-id": "dashboard_root", children: [
|
|
34800
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex flex-col gap-2 w-full p-[24px] pb-[12px]", "data-id": "dashboard_header", children: [
|
|
34801
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("h1", { className: "text-lg font-bold text-gray-900 w-full", "data-id": "dashboard_title", children: title }),
|
|
34802
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-2 w-full", "data-id": "dashboard_header_content", children: [
|
|
34803
|
+
subtitle && /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-gray-500 text-xs w-full", "data-id": "dashboard_subtitle", children: subtitle }),
|
|
34804
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-2 justify-end flex-shrink-0", "data-id": "dashboard_global_controls", children: [
|
|
34805
|
+
(isInitialLoading || isAnyChartLoading) && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-2 text-sm medium text-gray-500", "data-id": "dashboard_loading_indicator", children: [
|
|
34780
34806
|
/* @__PURE__ */ jsxRuntimeExports.jsx(RefreshCw, { className: "h-[16px] w-[16px] animate-spin" }),
|
|
34781
34807
|
"Loading..."
|
|
34782
34808
|
] }),
|
|
@@ -34855,6 +34881,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
34855
34881
|
gridTemplateColumns: layout.responsive ? void 0 : `repeat(${layout.columns}, minmax(0, 1fr))`,
|
|
34856
34882
|
gap: layout.gap ? `${layout.gap}px` : void 0
|
|
34857
34883
|
},
|
|
34884
|
+
"data-id": "dashboard_sections_grid",
|
|
34858
34885
|
children: dynamicSections.map((section) => {
|
|
34859
34886
|
var _a2, _b, _c, _d;
|
|
34860
34887
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
@@ -35956,15 +35983,16 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
35956
35983
|
setIsModalOpen(false);
|
|
35957
35984
|
}, []);
|
|
35958
35985
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
35959
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: `${darkMode ? "bg-gray-800 border-gray-700" : "bg-white border-gray-200"} border rounded-md overflow-hidden ${className}`, children: [
|
|
35960
|
-
showHeader && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "bg-gray-50 border-b border-gray-200 px-4 py-2 flex items-center justify-between", children: [
|
|
35961
|
-
isValidJson && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
35986
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: `${darkMode ? "bg-gray-800 border-gray-700" : "bg-white border-gray-200"} border rounded-md overflow-hidden ${className}`, "data-id": "data_viewer_root", children: [
|
|
35987
|
+
showHeader && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "bg-gray-50 border-b border-gray-200 px-4 py-2 flex items-center justify-between", "data-id": "data_viewer_header", children: [
|
|
35988
|
+
isValidJson && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-2", "data-id": "data_viewer_header_view_toggles", children: [
|
|
35962
35989
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
35963
35990
|
"button",
|
|
35964
35991
|
{
|
|
35965
35992
|
onClick: () => handleViewModeChange("plain"),
|
|
35966
35993
|
className: `p-1 hover:bg-gray-200 rounded transition-colors ${currentViewMode === "plain" ? "bg-gray-200" : ""}`,
|
|
35967
35994
|
title: "Plain JSON view",
|
|
35995
|
+
"data-id": "data_viewer_header_btn_plain",
|
|
35968
35996
|
children: /* @__PURE__ */ jsxRuntimeExports.jsx(AlignLeft, { className: "w-4 h-4 text-gray-400" })
|
|
35969
35997
|
}
|
|
35970
35998
|
),
|
|
@@ -35974,18 +36002,20 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
35974
36002
|
onClick: () => handleViewModeChange("interactive"),
|
|
35975
36003
|
className: `p-1 hover:bg-gray-200 rounded transition-colors ${currentViewMode === "interactive" ? "bg-gray-200" : ""}`,
|
|
35976
36004
|
title: "Interactive JSON view (fold/unfold)",
|
|
36005
|
+
"data-id": "data_viewer_header_btn_interactive",
|
|
35977
36006
|
children: /* @__PURE__ */ jsxRuntimeExports.jsx(List, { className: "w-4 h-4 text-gray-400" })
|
|
35978
36007
|
}
|
|
35979
36008
|
)
|
|
35980
36009
|
] }),
|
|
35981
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex-1" }),
|
|
35982
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
36010
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex-1", "data-id": "data_viewer_header_spacer" }),
|
|
36011
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-2", "data-id": "data_viewer_header_actions", children: [
|
|
35983
36012
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
35984
36013
|
"button",
|
|
35985
36014
|
{
|
|
35986
36015
|
onClick: handleExpand,
|
|
35987
36016
|
className: "p-1 hover:bg-gray-200 rounded transition-colors",
|
|
35988
36017
|
title: "Expand to full screen",
|
|
36018
|
+
"data-id": "data_viewer_header_btn_expand",
|
|
35989
36019
|
children: /* @__PURE__ */ jsxRuntimeExports.jsx(Maximize2, { className: "w-4 h-4 text-gray-400" })
|
|
35990
36020
|
}
|
|
35991
36021
|
),
|
|
@@ -36005,6 +36035,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
36005
36035
|
{
|
|
36006
36036
|
className: `${padding ? padding : "p-3"} overflow-auto ${darkMode ? "bg-gray-800" : "bg-white"}`,
|
|
36007
36037
|
style: { maxHeight },
|
|
36038
|
+
"data-id": "data_viewer_content",
|
|
36008
36039
|
children: [
|
|
36009
36040
|
isValidJson ? currentViewMode === "interactive" ? /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
36010
36041
|
JsonViewer,
|
|
@@ -36016,7 +36047,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
36016
36047
|
darkMode
|
|
36017
36048
|
}
|
|
36018
36049
|
) : /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: `text-xs whitespace-pre ${darkMode ? "text-gray-300" : "text-gray-700"}`, children: JSON.stringify(displayContent, null, 2) }) : /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: `text-xs whitespace-pre-wrap ${darkMode ? "text-gray-300" : "text-gray-700"}`, children: displayContent }),
|
|
36019
|
-
!displayContent && displayContent !== 0 && displayContent !== false && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: `text-center text-sm py-8 ${darkMode ? "text-gray-500" : "text-gray-400"}`, children: "No data available" })
|
|
36050
|
+
!displayContent && displayContent !== 0 && displayContent !== false && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: `text-center text-sm py-8 ${darkMode ? "text-gray-500" : "text-gray-400"}`, "data-id": "data_viewer_empty_state", children: "No data available" })
|
|
36020
36051
|
]
|
|
36021
36052
|
}
|
|
36022
36053
|
)
|
|
@@ -36906,14 +36937,15 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
36906
36937
|
};
|
|
36907
36938
|
return (
|
|
36908
36939
|
// bg-white w-full border-t border-gray-200
|
|
36909
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "bg-white w-full", children: [
|
|
36940
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "bg-white w-full", "data-id": `debug_card_${node.id}`, children: [
|
|
36910
36941
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
36911
36942
|
"div",
|
|
36912
36943
|
{
|
|
36913
36944
|
className: `flex items-center pl-[8px] pr-[8px] relative transition-colors cursor-pointer w-full
|
|
36914
36945
|
${isSelected ? "" : ""}`,
|
|
36915
36946
|
onClick: handleNodeClick,
|
|
36916
|
-
|
|
36947
|
+
"data-id": `debug_card_header_${node.id}`,
|
|
36948
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-[10px] w-full", "data-id": `debug_card_header_content_${node.id}`, children: [
|
|
36917
36949
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
36918
36950
|
"div",
|
|
36919
36951
|
{
|
|
@@ -36927,6 +36959,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
36927
36959
|
}
|
|
36928
36960
|
},
|
|
36929
36961
|
title: hasChildren ? isExpanded ? "Collapse" : "Expand" : "Show details",
|
|
36962
|
+
"data-id": `debug_card_toggle_${node.id}`,
|
|
36930
36963
|
children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
36931
36964
|
ChevronRight,
|
|
36932
36965
|
{
|
|
@@ -36935,17 +36968,18 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
36935
36968
|
)
|
|
36936
36969
|
}
|
|
36937
36970
|
),
|
|
36938
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-[8px] w-full py-[8px] border-b border-gray-200", children: [
|
|
36939
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex-shrink-0 rounded-[8px] bg-[#B2DDFF]", children: getNodeIcon() }),
|
|
36971
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-[8px] w-full py-[8px] border-b border-gray-200", "data-id": `debug_card_node_info_${node.id}`, children: [
|
|
36972
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex-shrink-0 rounded-[8px] bg-[#B2DDFF]", "data-id": `debug_card_node_icon_${node.id}`, children: getNodeIcon() }),
|
|
36940
36973
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
36941
36974
|
"span",
|
|
36942
36975
|
{
|
|
36943
36976
|
className: "font-semibold text-gray-900 text-xs truncate w-full",
|
|
36944
36977
|
title: node.type === "llm" ? node.name : void 0,
|
|
36978
|
+
"data-id": `debug_card_node_name_${node.id}`,
|
|
36945
36979
|
children: isGuardrailsNode ? node.type === "GuardrailsInputScan" ? "Input Guardrails Scanner" : "Output Guardrails Scanner" : node.type === "llm" ? "AI Model Call" : node.type === "tool" ? formatToolName(node.name) : node.name
|
|
36946
36980
|
}
|
|
36947
36981
|
),
|
|
36948
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-[12px] text-[10px] text-gray-500", children: [
|
|
36982
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-[12px] text-[10px] text-gray-500", "data-id": `debug_card_node_metadata_${node.id}`, children: [
|
|
36949
36983
|
node.type === "Agent" && (() => {
|
|
36950
36984
|
var _a;
|
|
36951
36985
|
const llmChild = (_a = node.children) == null ? void 0 : _a.find((child) => child.type === "llm");
|
|
@@ -36955,6 +36989,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
36955
36989
|
{
|
|
36956
36990
|
className: "text-[10px] text-gray-500 truncate max-w-[100px]",
|
|
36957
36991
|
title: llmChild.name,
|
|
36992
|
+
"data-id": `debug_card_node_model_name_${node.id}`,
|
|
36958
36993
|
children: llmChild.name
|
|
36959
36994
|
}
|
|
36960
36995
|
);
|
|
@@ -36987,6 +37022,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
36987
37022
|
title: `Input: ${((_a = llmUsage.input_tokens) == null ? void 0 : _a.toLocaleString()) || 0} tokens
|
|
36988
37023
|
Output: ${((_b = llmUsage.output_tokens) == null ? void 0 : _b.toLocaleString()) || 0} tokens
|
|
36989
37024
|
Total: ${((_c = llmUsage.total_tokens) == null ? void 0 : _c.toLocaleString()) || 0} tokens`,
|
|
37025
|
+
"data-id": `debug_card_node_tokens_${node.id}`,
|
|
36990
37026
|
children: [
|
|
36991
37027
|
llmUsage.total_tokens.toLocaleString(),
|
|
36992
37028
|
" Tokens"
|
|
@@ -36996,33 +37032,34 @@ Total: ${((_c = llmUsage.total_tokens) == null ? void 0 : _c.toLocaleString()) |
|
|
|
36996
37032
|
}
|
|
36997
37033
|
return null;
|
|
36998
37034
|
})(),
|
|
36999
|
-
node.duration && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-[4px]", children: [
|
|
37035
|
+
node.duration && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-[4px]", "data-id": `debug_card_node_duration_${node.id}`, children: [
|
|
37000
37036
|
/* @__PURE__ */ jsxRuntimeExports.jsx(Clock, { className: "w-[12px] h-[12px]" }),
|
|
37001
37037
|
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-[10px] text-gray-500 whitespace-nowrap", children: formatDuration(node.duration) })
|
|
37002
37038
|
] })
|
|
37003
37039
|
] }),
|
|
37004
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex-shrink-0", children: getStatusIcon() })
|
|
37040
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex-shrink-0", "data-id": `debug_card_node_status_${node.id}`, children: getStatusIcon() })
|
|
37005
37041
|
] })
|
|
37006
37042
|
] })
|
|
37007
37043
|
}
|
|
37008
37044
|
),
|
|
37009
|
-
isSelected && availableTabs.length > 0 && showDetailView && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "w-full pl-[32px] relative", children: [
|
|
37010
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "absolute top-[-40px] left-[16px] w-[1px] border-l border-dashed border-gray-200 h-[calc(100%+40px)] z-[1]" }),
|
|
37011
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "px-[4px] py-[8px] w-full", children: [
|
|
37012
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "bg-gray-50 rounded-[4px] p-[4px] inline-flex gap-[4px] mb-[8px] border border-gray-200", children: getTabsForNodeType().map((tab) => /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
37045
|
+
isSelected && availableTabs.length > 0 && showDetailView && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "w-full pl-[32px] relative", "data-id": `debug_card_detail_panel_${node.id}`, children: [
|
|
37046
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "absolute top-[-40px] left-[16px] w-[1px] border-l border-dashed border-gray-200 h-[calc(100%+40px)] z-[1]", "data-id": `debug_card_detail_panel_connector_${node.id}` }),
|
|
37047
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "px-[4px] py-[8px] w-full", "data-id": `debug_card_detail_panel_content_${node.id}`, children: [
|
|
37048
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "bg-gray-50 rounded-[4px] p-[4px] inline-flex gap-[4px] mb-[8px] border border-gray-200", "data-id": `debug_card_detail_panel_tabs_${node.id}`, children: getTabsForNodeType().map((tab) => /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
37013
37049
|
"button",
|
|
37014
37050
|
{
|
|
37015
37051
|
onClick: () => handleTabClick(tab),
|
|
37016
37052
|
className: `px-[8px] py-[4px] text-xs font-medium rounded-[4px] text-gray-500 hover:text-gray-700 hover:shadow-tab hover:bg-white transition-colors ${activeTab === tab ? "bg-white text-gray-900 shadow-tab" : "text-gray-500 hover:text-gray-700 hover:bg-white"}`,
|
|
37053
|
+
"data-id": `debug_card_detail_panel_tab_${node.id}_${tab}`,
|
|
37017
37054
|
children: tab.charAt(0).toUpperCase() + tab.slice(1)
|
|
37018
37055
|
},
|
|
37019
37056
|
tab
|
|
37020
37057
|
)) }),
|
|
37021
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "px-[4px]", children: renderTabContent() })
|
|
37058
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "px-[4px]", "data-id": `debug_card_detail_panel_tab_content_${node.id}`, children: renderTabContent() })
|
|
37022
37059
|
] })
|
|
37023
37060
|
] }),
|
|
37024
|
-
isExpanded && hasChildren && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "w-full pl-[32px] relative", children: [
|
|
37025
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "absolute top-[-40px] left-[16px] w-[1px] border-l border-dashed border-gray-200 h-[calc(100%+40px)] z-[1]" }),
|
|
37061
|
+
isExpanded && hasChildren && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "w-full pl-[32px] relative", "data-id": `debug_card_children_${node.id}`, children: [
|
|
37062
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "absolute top-[-40px] left-[16px] w-[1px] border-l border-dashed border-gray-200 h-[calc(100%+40px)] z-[1]", "data-id": `debug_card_children_connector_${node.id}` }),
|
|
37026
37063
|
node.children.map((child, index) => /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
37027
37064
|
DebugCard,
|
|
37028
37065
|
{
|
|
@@ -37326,14 +37363,14 @@ Total: ${((_c = llmUsage.total_tokens) == null ? void 0 : _c.toLocaleString()) |
|
|
|
37326
37363
|
return `${tokens} tokens`;
|
|
37327
37364
|
};
|
|
37328
37365
|
if (!sessionTree.runs.length) {
|
|
37329
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: `flex flex-col h-full ${className}`, children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex items-center justify-center h-full", children: /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-gray-500 text-sm", children: "No execution events to display" }) }) });
|
|
37330
|
-
}
|
|
37331
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: `flex flex-col h-full bg-white ${className}`, children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex flex-col gap-[16px] p-[24px] overflow-y-auto overflow-x-hidden", ref: scrollContainerRef, children: [
|
|
37332
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center w-full gap-[16px]", children: [
|
|
37333
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-xs text-gray-400 whitespace-nowrap flex-shrink-0", children: "Session initiated" }),
|
|
37334
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex-1 h-[1px] border-t border-dashed border-gray-300 w-full" }),
|
|
37335
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-2 text-xs text-gray-400 flex-shrink-0", children: [
|
|
37336
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { children: sessionTree.sessionId }),
|
|
37366
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: `flex flex-col h-full ${className}`, "data-id": "debug_panel_empty_state", children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex items-center justify-center h-full", "data-id": "debug_panel_empty_state_content", children: /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-gray-500 text-sm", "data-id": "debug_panel_empty_state_message", children: "No execution events to display" }) }) });
|
|
37367
|
+
}
|
|
37368
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: `flex flex-col h-full bg-white ${className}`, "data-id": "debug_panel_root", children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex flex-col gap-[16px] p-[24px] overflow-y-auto overflow-x-hidden", ref: scrollContainerRef, "data-id": "debug_panel_content", children: [
|
|
37369
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center w-full gap-[16px]", "data-id": "debug_panel_session_header", children: [
|
|
37370
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-xs text-gray-400 whitespace-nowrap flex-shrink-0", "data-id": "debug_panel_session_header_label", children: "Session initiated" }),
|
|
37371
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex-1 h-[1px] border-t border-dashed border-gray-300 w-full", "data-id": "debug_panel_session_header_divider" }),
|
|
37372
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-2 text-xs text-gray-400 flex-shrink-0", "data-id": "debug_panel_session_header_actions", children: [
|
|
37373
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { "data-id": "debug_panel_session_id", children: sessionTree.sessionId }),
|
|
37337
37374
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
37338
37375
|
CopyButton,
|
|
37339
37376
|
{
|
|
@@ -37359,20 +37396,22 @@ Total: ${((_c = llmUsage.total_tokens) == null ? void 0 : _c.toLocaleString()) |
|
|
|
37359
37396
|
}
|
|
37360
37397
|
}
|
|
37361
37398
|
},
|
|
37399
|
+
"data-id": "debug_panel_session_external_link_btn",
|
|
37362
37400
|
children: /* @__PURE__ */ jsxRuntimeExports.jsx(ExternalLink, { className: "w-[12px] h-[12px]" })
|
|
37363
37401
|
}
|
|
37364
37402
|
)
|
|
37365
37403
|
] })
|
|
37366
37404
|
] }),
|
|
37367
|
-
showExpansionControls && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center justify-between gap-4 p-3 bg-gray-50 rounded-lg border border-gray-200", children: [
|
|
37368
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
37369
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-xs font-medium text-gray-700", children: "Expansion:" }),
|
|
37405
|
+
showExpansionControls && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center justify-between gap-4 p-3 bg-gray-50 rounded-lg border border-gray-200", "data-id": "debug_panel_expansion_controls", children: [
|
|
37406
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-2", "data-id": "debug_panel_expansion_controls_buttons", children: [
|
|
37407
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-xs font-medium text-gray-700", "data-id": "debug_panel_expansion_controls_label", children: "Expansion:" }),
|
|
37370
37408
|
/* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
37371
37409
|
"button",
|
|
37372
37410
|
{
|
|
37373
37411
|
onClick: handleExpandAll,
|
|
37374
37412
|
className: "flex items-center gap-1 px-2 py-1 text-xs bg-white hover:bg-gray-50 border border-gray-300 rounded transition-colors",
|
|
37375
37413
|
title: "Expand all nodes",
|
|
37414
|
+
"data-id": "debug_panel_expansion_controls_btn_expand_all",
|
|
37376
37415
|
children: [
|
|
37377
37416
|
/* @__PURE__ */ jsxRuntimeExports.jsx(Plus, { className: "w-3 h-3" }),
|
|
37378
37417
|
"Expand All"
|
|
@@ -37385,6 +37424,7 @@ Total: ${((_c = llmUsage.total_tokens) == null ? void 0 : _c.toLocaleString()) |
|
|
|
37385
37424
|
onClick: handleExpandLast,
|
|
37386
37425
|
className: "flex items-center gap-1 px-2 py-1 text-xs bg-white hover:bg-gray-50 border border-gray-300 rounded transition-colors",
|
|
37387
37426
|
title: "Expand only the last execution path",
|
|
37427
|
+
"data-id": "debug_panel_expansion_controls_btn_expand_last",
|
|
37388
37428
|
children: [
|
|
37389
37429
|
/* @__PURE__ */ jsxRuntimeExports.jsx(Expand, { className: "w-3 h-3" }),
|
|
37390
37430
|
"Expand Last"
|
|
@@ -37397,6 +37437,7 @@ Total: ${((_c = llmUsage.total_tokens) == null ? void 0 : _c.toLocaleString()) |
|
|
|
37397
37437
|
onClick: handleCollapseAll,
|
|
37398
37438
|
className: "flex items-center gap-1 px-2 py-1 text-xs bg-white hover:bg-gray-50 border border-gray-300 rounded transition-colors",
|
|
37399
37439
|
title: "Collapse all nodes",
|
|
37440
|
+
"data-id": "debug_panel_expansion_controls_btn_collapse_all",
|
|
37400
37441
|
children: [
|
|
37401
37442
|
/* @__PURE__ */ jsxRuntimeExports.jsx(Minus, { className: "w-3 h-3" }),
|
|
37402
37443
|
"Collapse All"
|
|
@@ -37404,8 +37445,8 @@ Total: ${((_c = llmUsage.total_tokens) == null ? void 0 : _c.toLocaleString()) |
|
|
|
37404
37445
|
}
|
|
37405
37446
|
)
|
|
37406
37447
|
] }),
|
|
37407
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
37408
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-xs font-medium text-gray-700", children: "Live Mode:" }),
|
|
37448
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-2", "data-id": "debug_panel_expansion_controls_live_mode", children: [
|
|
37449
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-xs font-medium text-gray-700", "data-id": "debug_panel_expansion_controls_live_mode_label", children: "Live Mode:" }),
|
|
37409
37450
|
/* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
37410
37451
|
"select",
|
|
37411
37452
|
{
|
|
@@ -37413,6 +37454,7 @@ Total: ${((_c = llmUsage.total_tokens) == null ? void 0 : _c.toLocaleString()) |
|
|
|
37413
37454
|
onChange: (e) => setLiveExpansionMode(e.target.value),
|
|
37414
37455
|
className: "text-xs px-2 py-1 bg-white border border-gray-300 rounded focus:outline-none focus:ring-1 focus:ring-blue-500",
|
|
37415
37456
|
title: "Control auto-expansion behavior during live updates",
|
|
37457
|
+
"data-id": "debug_panel_expansion_controls_live_mode_select",
|
|
37416
37458
|
children: [
|
|
37417
37459
|
/* @__PURE__ */ jsxRuntimeExports.jsx("option", { value: "all", children: "Expand All" }),
|
|
37418
37460
|
/* @__PURE__ */ jsxRuntimeExports.jsx("option", { value: "last", children: "Expand Last" }),
|
|
@@ -37422,17 +37464,18 @@ Total: ${((_c = llmUsage.total_tokens) == null ? void 0 : _c.toLocaleString()) |
|
|
|
37422
37464
|
)
|
|
37423
37465
|
] })
|
|
37424
37466
|
] }),
|
|
37425
|
-
sessionTree.runs.map((run) => /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex flex-col gap-1", children: [
|
|
37426
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "rounded-[8px] border border-gray-300 bg-white overflow-hidden", children: [
|
|
37427
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex flex-col w-full", children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-2 p-[8px] bg-gray-50", children: [
|
|
37428
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", className: "flex-shrink-0", children: /* @__PURE__ */ jsxRuntimeExports.jsx("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M10.8277 1.33398C11.3643 1.33398 11.8072 1.33396 12.168 1.36343C12.5428 1.39405 12.8872 1.45978 13.2108 1.62463C13.7125 1.8803 14.1205 2.28825 14.3762 2.79001C14.541 3.11356 14.6067 3.45803 14.6374 3.83276C14.6668 4.19356 14.6668 4.63646 14.6668 5.1731V9.0235C14.6668 9.47003 14.6668 9.83861 14.6462 10.1404C14.6249 10.4532 14.5792 10.7426 14.4638 11.0211C14.1932 11.6746 13.674 12.1937 13.0206 12.4643C12.7421 12.5797 12.4527 12.6254 12.1399 12.6467C11.8381 12.6673 11.4695 12.6673 11.023 12.6673H11.0002C10.6424 12.6673 10.5714 12.6715 10.5136 12.6852C10.4129 12.7089 10.3191 12.7558 10.2397 12.8221C10.1941 12.8602 10.1481 12.9145 9.9335 13.2007L8.94888 14.5135C8.88665 14.5965 8.81628 14.6904 8.74857 14.7657C8.6739 14.8487 8.54979 14.971 8.36264 15.0438C8.1295 15.1344 7.87083 15.1344 7.6377 15.0438C7.45054 14.971 7.32641 14.8487 7.25174 14.7657C7.18403 14.6904 7.11368 14.5965 7.05145 14.5135L6.06683 13.2007C5.85221 12.9145 5.80624 12.8602 5.76065 12.8221C5.68119 12.7558 5.58739 12.7089 5.48666 12.6852C5.42887 12.6715 5.35786 12.6673 5.00015 12.6673H4.9773C4.53078 12.6673 4.16221 12.6673 3.86047 12.6467C3.54762 12.6254 3.25822 12.5797 2.97968 12.4643C2.32627 12.1937 1.80712 11.6746 1.53647 11.0211C1.42109 10.7426 1.37541 10.4532 1.35407 10.1404C1.33348 9.83861 1.33349 9.47003 1.3335 9.0235V5.17313C1.33349 4.63648 1.33347 4.19356 1.36295 3.83276C1.39356 3.45803 1.45929 3.11356 1.62415 2.79001C1.87981 2.28825 2.28776 1.8803 2.78952 1.62463C3.11308 1.45978 3.45755 1.39405 3.83228 1.36343C4.19307 1.33396 4.63599 1.33398 5.17264 1.33398H10.8277ZM10.4715 4.52924C10.2112 4.2689 9.78906 4.26889 9.52872 4.52924L6.66681 7.39114V5.6673C6.6668 5.29912 6.36834 5.00064 6.00015 5.00064C5.63197 5.00064 5.33351 5.29912 5.3335 5.6673V9.00064C5.3335 9.17745 5.40373 9.34702 5.52875 9.47205C5.65377 9.59707 5.82334 9.6673 6.00015 9.6673H9.3335L9.35068 9.66708C9.71092 9.65796 10.0002 9.36308 10.0002 9.00064C10.0001 8.63821 9.71092 8.34332 9.35068 8.3342L9.3335 8.33398H7.60962L10.4715 5.47205C10.7319 5.2117 10.7319 4.78958 10.4715 4.52924Z", fill: "#079455" }) }),
|
|
37467
|
+
sessionTree.runs.map((run) => /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex flex-col gap-1", "data-id": `debug_panel_run_${run.runId}`, children: [
|
|
37468
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "rounded-[8px] border border-gray-300 bg-white overflow-hidden", "data-id": `debug_panel_run_container_${run.runId}`, children: [
|
|
37469
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex flex-col w-full", "data-id": `debug_panel_run_header_${run.runId}`, children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-2 p-[8px] bg-gray-50", "data-id": `debug_panel_run_header_content_${run.runId}`, children: [
|
|
37470
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", className: "flex-shrink-0", "data-id": `debug_panel_run_header_icon_${run.runId}`, children: /* @__PURE__ */ jsxRuntimeExports.jsx("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M10.8277 1.33398C11.3643 1.33398 11.8072 1.33396 12.168 1.36343C12.5428 1.39405 12.8872 1.45978 13.2108 1.62463C13.7125 1.8803 14.1205 2.28825 14.3762 2.79001C14.541 3.11356 14.6067 3.45803 14.6374 3.83276C14.6668 4.19356 14.6668 4.63646 14.6668 5.1731V9.0235C14.6668 9.47003 14.6668 9.83861 14.6462 10.1404C14.6249 10.4532 14.5792 10.7426 14.4638 11.0211C14.1932 11.6746 13.674 12.1937 13.0206 12.4643C12.7421 12.5797 12.4527 12.6254 12.1399 12.6467C11.8381 12.6673 11.4695 12.6673 11.023 12.6673H11.0002C10.6424 12.6673 10.5714 12.6715 10.5136 12.6852C10.4129 12.7089 10.3191 12.7558 10.2397 12.8221C10.1941 12.8602 10.1481 12.9145 9.9335 13.2007L8.94888 14.5135C8.88665 14.5965 8.81628 14.6904 8.74857 14.7657C8.6739 14.8487 8.54979 14.971 8.36264 15.0438C8.1295 15.1344 7.87083 15.1344 7.6377 15.0438C7.45054 14.971 7.32641 14.8487 7.25174 14.7657C7.18403 14.6904 7.11368 14.5965 7.05145 14.5135L6.06683 13.2007C5.85221 12.9145 5.80624 12.8602 5.76065 12.8221C5.68119 12.7558 5.58739 12.7089 5.48666 12.6852C5.42887 12.6715 5.35786 12.6673 5.00015 12.6673H4.9773C4.53078 12.6673 4.16221 12.6673 3.86047 12.6467C3.54762 12.6254 3.25822 12.5797 2.97968 12.4643C2.32627 12.1937 1.80712 11.6746 1.53647 11.0211C1.42109 10.7426 1.37541 10.4532 1.35407 10.1404C1.33348 9.83861 1.33349 9.47003 1.3335 9.0235V5.17313C1.33349 4.63648 1.33347 4.19356 1.36295 3.83276C1.39356 3.45803 1.45929 3.11356 1.62415 2.79001C1.87981 2.28825 2.28776 1.8803 2.78952 1.62463C3.11308 1.45978 3.45755 1.39405 3.83228 1.36343C4.19307 1.33396 4.63599 1.33398 5.17264 1.33398H10.8277ZM10.4715 4.52924C10.2112 4.2689 9.78906 4.26889 9.52872 4.52924L6.66681 7.39114V5.6673C6.6668 5.29912 6.36834 5.00064 6.00015 5.00064C5.63197 5.00064 5.33351 5.29912 5.3335 5.6673V9.00064C5.3335 9.17745 5.40373 9.34702 5.52875 9.47205C5.65377 9.59707 5.82334 9.6673 6.00015 9.6673H9.3335L9.35068 9.66708C9.71092 9.65796 10.0002 9.36308 10.0002 9.00064C10.0001 8.63821 9.71092 8.34332 9.35068 8.3342L9.3335 8.33398H7.60962L10.4715 5.47205C10.7319 5.2117 10.7319 4.78958 10.4715 4.52924Z", fill: "#079455" }) }),
|
|
37429
37471
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
37430
37472
|
"div",
|
|
37431
37473
|
{
|
|
37432
37474
|
className: "flex-1 cursor-pointer select-none truncate",
|
|
37433
37475
|
onClick: () => handleRunToggle(run.runId),
|
|
37434
37476
|
title: run.userInput,
|
|
37435
|
-
|
|
37477
|
+
"data-id": `debug_panel_run_title_${run.runId}`,
|
|
37478
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-xs text-gray-900 truncate", "data-id": `debug_panel_run_title_text_${run.runId}`, children: run.userInput || `Run ${run.runId}` })
|
|
37436
37479
|
}
|
|
37437
37480
|
),
|
|
37438
37481
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
@@ -37453,6 +37496,7 @@ Total: ${((_c = llmUsage.total_tokens) == null ? void 0 : _c.toLocaleString()) |
|
|
|
37453
37496
|
const anyDetailsVisible = Array.from(runNodeIds).some((nodeId) => selectedNodeIds.has(nodeId));
|
|
37454
37497
|
return anyDetailsVisible ? "Hide all node details in this run" : "Show all node details in this run";
|
|
37455
37498
|
})(),
|
|
37499
|
+
"data-id": `debug_panel_run_details_toggle_${run.runId}`,
|
|
37456
37500
|
children: (() => {
|
|
37457
37501
|
const runNodeIds = /* @__PURE__ */ new Set();
|
|
37458
37502
|
const collectNodeIds = (node) => {
|
|
@@ -37480,13 +37524,14 @@ Total: ${((_c = llmUsage.total_tokens) == null ? void 0 : _c.toLocaleString()) |
|
|
|
37480
37524
|
},
|
|
37481
37525
|
className: "p-1 hover:bg-gray-200 rounded transition-colors flex-shrink-0",
|
|
37482
37526
|
title: expandedRuns.has(run.runId) ? "Collapse run" : "Expand run",
|
|
37527
|
+
"data-id": `debug_panel_run_toggle_${run.runId}`,
|
|
37483
37528
|
children: /* @__PURE__ */ jsxRuntimeExports.jsx(ChevronDown, { className: `w-[16px] h-[16px] text-gray-400 transition-transform ${expandedRuns.has(run.runId) ? "rotate-180" : ""}` })
|
|
37484
37529
|
}
|
|
37485
37530
|
)
|
|
37486
37531
|
] }) }),
|
|
37487
|
-
expandedRuns.has(run.runId) && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "bg-white w-full flex flex-col", children: run.rootNodes && run.rootNodes.map((rootNode, index) => {
|
|
37532
|
+
expandedRuns.has(run.runId) && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "bg-white w-full flex flex-col", "data-id": `debug_panel_run_execution_trees_${run.runId}`, children: run.rootNodes && run.rootNodes.map((rootNode, index) => {
|
|
37488
37533
|
var _a;
|
|
37489
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "w-full", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
37534
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "w-full", "data-id": `debug_panel_run_root_node_${run.runId}_${index}`, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
37490
37535
|
DebugCard,
|
|
37491
37536
|
{
|
|
37492
37537
|
node: updateTreeExpansion(rootNode),
|
|
@@ -37572,22 +37617,22 @@ Total: ${((_c = llmUsage.total_tokens) == null ? void 0 : _c.toLocaleString()) |
|
|
|
37572
37617
|
};
|
|
37573
37618
|
const outputFromNodes = run.rootNodes ? findFinalOutput(run.rootNodes) : void 0;
|
|
37574
37619
|
const finalOutput = outputFromNodes || run.finalOutput;
|
|
37575
|
-
return finalOutput ? /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "p-[8px] bg-gray-50 flex items-center gap-[8px] w-full border-t border-gray-200", children: [
|
|
37576
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", className: "flex-shrink-0", children: /* @__PURE__ */ jsxRuntimeExports.jsx("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M10.8277 1.33398C11.3643 1.33398 11.8072 1.33396 12.168 1.36343C12.5428 1.39405 12.8872 1.45978 13.2108 1.62463C13.7125 1.8803 14.1205 2.28825 14.3762 2.79001C14.541 3.11356 14.6067 3.45803 14.6374 3.83276C14.6668 4.19356 14.6668 4.63646 14.6668 5.1731V9.0235C14.6668 9.47003 14.6668 9.83861 14.6462 10.1404C14.6249 10.4532 14.5792 10.7426 14.4638 11.0211C14.1932 11.6746 13.674 12.1937 13.0206 12.4643C12.7421 12.5797 12.4527 12.6254 12.1399 12.6467C11.8381 12.6673 11.4695 12.6673 11.023 12.6673H11.0002C10.6424 12.6673 10.5714 12.6715 10.5136 12.6852C10.4129 12.7089 10.3191 12.7558 10.2397 12.8221C10.1941 12.8602 10.1481 12.9145 9.9335 13.2007L8.94888 14.5135C8.88665 14.5965 8.81628 14.6904 8.74857 14.7657C8.6739 14.8487 8.54979 14.971 8.36264 15.0438C8.1295 15.1344 7.87083 15.1344 7.6377 15.0438C7.45054 14.971 7.32641 14.8487 7.25174 14.7657C7.18403 14.6904 7.11368 14.5965 7.05145 14.5135L6.06683 13.2007C5.85221 12.9145 5.80624 12.8602 5.76065 12.8221C5.68119 12.7558 5.58739 12.7089 5.48666 12.6852C5.42887 12.6715 5.35786 12.6673 5.00015 12.6673H4.9773C4.53078 12.6673 4.16221 12.6673 3.86047 12.6467C3.54762 12.6254 3.25822 12.5797 2.97968 12.4643C2.32627 12.1937 1.80712 11.6746 1.53647 11.0211C1.42109 10.7426 1.37541 10.4532 1.35407 10.1404C1.33348 9.83861 1.33349 9.47003 1.3335 9.0235V5.17313C1.33349 4.63648 1.33347 4.19356 1.36295 3.83276C1.39356 3.45803 1.45929 3.11356 1.62415 2.79001C1.87981 2.28825 2.28776 1.8803 2.78952 1.62463C3.11308 1.45978 3.45755 1.39405 3.83228 1.36343C4.19307 1.33396 4.63599 1.33398 5.17264 1.33398H10.8277ZM6.66653 4.33398C6.29835 4.334 5.99988 4.63246 5.99988 5.00064C5.99988 5.36882 6.29835 5.66729 6.66653 5.6673H8.39041L5.52847 8.52924C5.26813 8.78958 5.26813 9.2117 5.52847 9.47205C5.78882 9.73239 6.21093 9.73239 6.47128 9.47205L9.33322 6.61011V8.33398C9.33323 8.70217 9.6317 9.00064 9.99988 9.00064C10.3681 9.00064 10.6665 8.70217 10.6665 8.33398V5.00064C10.6665 4.63821 10.3773 4.34333 10.0171 4.3342L9.99988 4.33398H6.66653Z", fill: "#155EEF" }) }),
|
|
37577
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "flex-1 text-xs text-gray-900 truncate", title: convertToString(finalOutput), children: convertToString(finalOutput) }),
|
|
37578
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-[8px] flex-shrink-0", children: [
|
|
37579
|
-
run.duration && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-[4px]", children: [
|
|
37620
|
+
return finalOutput ? /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "p-[8px] bg-gray-50 flex items-center gap-[8px] w-full border-t border-gray-200", "data-id": `debug_panel_run_final_output_${run.runId}`, children: [
|
|
37621
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", className: "flex-shrink-0", "data-id": `debug_panel_run_final_output_icon_${run.runId}`, children: /* @__PURE__ */ jsxRuntimeExports.jsx("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M10.8277 1.33398C11.3643 1.33398 11.8072 1.33396 12.168 1.36343C12.5428 1.39405 12.8872 1.45978 13.2108 1.62463C13.7125 1.8803 14.1205 2.28825 14.3762 2.79001C14.541 3.11356 14.6067 3.45803 14.6374 3.83276C14.6668 4.19356 14.6668 4.63646 14.6668 5.1731V9.0235C14.6668 9.47003 14.6668 9.83861 14.6462 10.1404C14.6249 10.4532 14.5792 10.7426 14.4638 11.0211C14.1932 11.6746 13.674 12.1937 13.0206 12.4643C12.7421 12.5797 12.4527 12.6254 12.1399 12.6467C11.8381 12.6673 11.4695 12.6673 11.023 12.6673H11.0002C10.6424 12.6673 10.5714 12.6715 10.5136 12.6852C10.4129 12.7089 10.3191 12.7558 10.2397 12.8221C10.1941 12.8602 10.1481 12.9145 9.9335 13.2007L8.94888 14.5135C8.88665 14.5965 8.81628 14.6904 8.74857 14.7657C8.6739 14.8487 8.54979 14.971 8.36264 15.0438C8.1295 15.1344 7.87083 15.1344 7.6377 15.0438C7.45054 14.971 7.32641 14.8487 7.25174 14.7657C7.18403 14.6904 7.11368 14.5965 7.05145 14.5135L6.06683 13.2007C5.85221 12.9145 5.80624 12.8602 5.76065 12.8221C5.68119 12.7558 5.58739 12.7089 5.48666 12.6852C5.42887 12.6715 5.35786 12.6673 5.00015 12.6673H4.9773C4.53078 12.6673 4.16221 12.6673 3.86047 12.6467C3.54762 12.6254 3.25822 12.5797 2.97968 12.4643C2.32627 12.1937 1.80712 11.6746 1.53647 11.0211C1.42109 10.7426 1.37541 10.4532 1.35407 10.1404C1.33348 9.83861 1.33349 9.47003 1.3335 9.0235V5.17313C1.33349 4.63648 1.33347 4.19356 1.36295 3.83276C1.39356 3.45803 1.45929 3.11356 1.62415 2.79001C1.87981 2.28825 2.28776 1.8803 2.78952 1.62463C3.11308 1.45978 3.45755 1.39405 3.83228 1.36343C4.19307 1.33396 4.63599 1.33398 5.17264 1.33398H10.8277ZM6.66653 4.33398C6.29835 4.334 5.99988 4.63246 5.99988 5.00064C5.99988 5.36882 6.29835 5.66729 6.66653 5.6673H8.39041L5.52847 8.52924C5.26813 8.78958 5.26813 9.2117 5.52847 9.47205C5.78882 9.73239 6.21093 9.73239 6.47128 9.47205L9.33322 6.61011V8.33398C9.33323 8.70217 9.6317 9.00064 9.99988 9.00064C10.3681 9.00064 10.6665 8.70217 10.6665 8.33398V5.00064C10.6665 4.63821 10.3773 4.34333 10.0171 4.3342L9.99988 4.33398H6.66653Z", fill: "#155EEF" }) }),
|
|
37622
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "flex-1 text-xs text-gray-900 truncate", title: convertToString(finalOutput), "data-id": `debug_panel_run_final_output_text_${run.runId}`, children: convertToString(finalOutput) }),
|
|
37623
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-[8px] flex-shrink-0", "data-id": `debug_panel_run_final_output_metadata_${run.runId}`, children: [
|
|
37624
|
+
run.duration && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-[4px]", "data-id": `debug_panel_run_final_output_duration_${run.runId}`, children: [
|
|
37580
37625
|
/* @__PURE__ */ jsxRuntimeExports.jsx(Clock, { className: "w-[12px] h-[12px] text-gray-400" }),
|
|
37581
37626
|
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-[10px] text-gray-500 whitespace-nowrap", children: formatDuration(run.duration) })
|
|
37582
37627
|
] }),
|
|
37583
|
-
run.totalTokens && /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-[10px] text-gray-500 whitespace-nowrap", children: formatTokens(run.totalTokens) })
|
|
37628
|
+
run.totalTokens && /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-[10px] text-gray-500 whitespace-nowrap", "data-id": `debug_panel_run_final_output_tokens_${run.runId}`, children: formatTokens(run.totalTokens) })
|
|
37584
37629
|
] })
|
|
37585
37630
|
] }) : null;
|
|
37586
37631
|
})()
|
|
37587
37632
|
] }),
|
|
37588
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center justify-end gap-2 py-1", children: [
|
|
37589
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-xs text-gray-400", children: run.runId }),
|
|
37590
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
37633
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center justify-end gap-2 py-1", "data-id": `debug_panel_run_footer_${run.runId}`, children: [
|
|
37634
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-xs text-gray-400", "data-id": `debug_panel_run_footer_id_${run.runId}`, children: run.runId }),
|
|
37635
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-2", "data-id": `debug_panel_run_footer_actions_${run.runId}`, children: [
|
|
37591
37636
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
37592
37637
|
CopyButton,
|
|
37593
37638
|
{
|
|
@@ -37613,6 +37658,7 @@ Total: ${((_c = llmUsage.total_tokens) == null ? void 0 : _c.toLocaleString()) |
|
|
|
37613
37658
|
}
|
|
37614
37659
|
}
|
|
37615
37660
|
},
|
|
37661
|
+
"data-id": `debug_panel_run_footer_external_link_${run.runId}`,
|
|
37616
37662
|
children: /* @__PURE__ */ jsxRuntimeExports.jsx(ExternalLink, { className: "w-3 h-3 text-gray-400" })
|
|
37617
37663
|
}
|
|
37618
37664
|
)
|
|
@@ -37623,7 +37669,7 @@ Total: ${((_c = llmUsage.total_tokens) == null ? void 0 : _c.toLocaleString()) |
|
|
|
37623
37669
|
});
|
|
37624
37670
|
DebugPanel.displayName = "DebugPanel";
|
|
37625
37671
|
function Header() {
|
|
37626
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "bg-white h-[56px] relative shrink-0 w-full", children: [
|
|
37672
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "bg-white h-[56px] relative shrink-0 w-full", "data-id": "prompt-editor_header", children: [
|
|
37627
37673
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
37628
37674
|
"div",
|
|
37629
37675
|
{
|
|
@@ -37631,13 +37677,14 @@ Total: ${((_c = llmUsage.total_tokens) == null ? void 0 : _c.toLocaleString()) |
|
|
|
37631
37677
|
className: "absolute border-[#d0d5dd] border-[0px_0px_1px] border-solid inset-0 pointer-events-none"
|
|
37632
37678
|
}
|
|
37633
37679
|
),
|
|
37634
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex flex-row items-center size-full", children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "box-border content-stretch flex gap-[16px] h-[56px] items-center px-[16px] py-[8px] relative w-full justify-between", children: [
|
|
37680
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex flex-row items-center size-full", "data-id": "prompt-editor_header_inner", children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "box-border content-stretch flex gap-[16px] h-[56px] items-center px-[16px] py-[8px] relative w-full justify-between", "data-id": "prompt-editor_header_content", children: [
|
|
37635
37681
|
/* @__PURE__ */ jsxRuntimeExports.jsx("h1", { className: " font-medium text-[16px] leading-[24px] text-[#101828]", children: "Orchestration Prompt" }),
|
|
37636
37682
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
37637
37683
|
"button",
|
|
37638
37684
|
{
|
|
37639
37685
|
className: "relative shrink-0 size-[20px] hover:opacity-70 transition-opacity cursor-pointer",
|
|
37640
37686
|
"aria-label": "Close",
|
|
37687
|
+
"data-id": "prompt-editor_header_close_btn",
|
|
37641
37688
|
children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
37642
37689
|
"svg",
|
|
37643
37690
|
{
|
|
@@ -37851,8 +37898,9 @@ Total: ${((_c = llmUsage.total_tokens) == null ? void 0 : _c.toLocaleString()) |
|
|
|
37851
37898
|
},
|
|
37852
37899
|
onClick: (e) => e.stopPropagation(),
|
|
37853
37900
|
onMouseDown: (e) => e.stopPropagation(),
|
|
37901
|
+
"data-id": "prompt-editor_refine_dropdown",
|
|
37854
37902
|
children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "box-border content-stretch flex flex-col gap-[8px] items-start p-[12px] relative w-full", children: [
|
|
37855
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "content-stretch flex flex-col gap-[4px] items-start relative shrink-0 w-full", children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "content-stretch flex flex-col items-start relative shrink-0 w-full", children: MENU_ITEMS.map((item) => /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
37903
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "content-stretch flex flex-col gap-[4px] items-start relative shrink-0 w-full", "data-id": "prompt-editor_refine_dropdown_menu_items", children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "content-stretch flex flex-col items-start relative shrink-0 w-full", "data-id": "prompt-editor_refine_dropdown_menu_items_list", children: MENU_ITEMS.map((item) => /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
37856
37904
|
"button",
|
|
37857
37905
|
{
|
|
37858
37906
|
onClick: (e) => {
|
|
@@ -37866,6 +37914,7 @@ Total: ${((_c = llmUsage.total_tokens) == null ? void 0 : _c.toLocaleString()) |
|
|
|
37866
37914
|
},
|
|
37867
37915
|
className: "content-stretch flex items-center relative shrink-0 w-full hover:bg-gray-50 transition-colors rounded-[4px] cursor-pointer",
|
|
37868
37916
|
style: { pointerEvents: "auto", zIndex: 1e3 },
|
|
37917
|
+
"data-id": `prompt-editor_refine_dropdown_btn_${item.id}`,
|
|
37869
37918
|
children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "basis-0 grow h-[40px] min-h-px min-w-px relative rounded-[4px] shrink-0", children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex flex-col justify-center size-full", children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "box-border content-stretch flex flex-col gap-[8px] h-[40px] items-start justify-center px-[12px] py-[8px] relative w-full", children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "content-stretch flex gap-[8px] items-center relative shrink-0 w-full", children: [
|
|
37870
37919
|
/* @__PURE__ */ jsxRuntimeExports.jsx(item.icon, {}),
|
|
37871
37920
|
/* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "basis-0 grow leading-[20px] min-h-px min-w-px not-italic relative shrink-0 text-[#101828] text-[14px] text-left", children: item.label })
|
|
@@ -37874,7 +37923,7 @@ Total: ${((_c = llmUsage.total_tokens) == null ? void 0 : _c.toLocaleString()) |
|
|
|
37874
37923
|
item.id
|
|
37875
37924
|
)) }) }),
|
|
37876
37925
|
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "w-full h-px bg-[#eaecf0] shrink-0" }),
|
|
37877
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "bg-white h-[40px] relative rounded-[8px] shrink-0 w-full border border-[#d0d5dd]", children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex flex-col items-center overflow-clip rounded-[inherit] size-full", children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "box-border content-stretch flex flex-col gap-[24px] h-[40px] items-center pl-[16px] pr-[8px] py-[8px] relative w-full", children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "content-stretch flex gap-[8px] items-center relative shrink-0 w-full", children: [
|
|
37926
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "bg-white h-[40px] relative rounded-[8px] shrink-0 w-full border border-[#d0d5dd]", "data-id": "prompt-editor_refine_dropdown_input_section", children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex flex-col items-center overflow-clip rounded-[inherit] size-full", "data-id": "prompt-editor_refine_dropdown_input_wrapper", children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "box-border content-stretch flex flex-col gap-[24px] h-[40px] items-center pl-[16px] pr-[8px] py-[8px] relative w-full", "data-id": "prompt-editor_refine_dropdown_input_inner", children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "content-stretch flex gap-[8px] items-center relative shrink-0 w-full", "data-id": "prompt-editor_refine_dropdown_input_container", children: [
|
|
37878
37927
|
/* @__PURE__ */ jsxRuntimeExports.jsx(GenerateIcon, {}),
|
|
37879
37928
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
37880
37929
|
"input",
|
|
@@ -37885,7 +37934,8 @@ Total: ${((_c = llmUsage.total_tokens) == null ? void 0 : _c.toLocaleString()) |
|
|
|
37885
37934
|
onChange: (e) => setCustomInput(e.target.value),
|
|
37886
37935
|
onKeyDown: handleKeyDown,
|
|
37887
37936
|
placeholder: "Modify with a prompt",
|
|
37888
|
-
className: "basis-0 grow leading-[20px] not-italic text-[14px] text-[#101828] placeholder:text-[#98a2b3] outline-none bg-transparent border-none"
|
|
37937
|
+
className: "basis-0 grow leading-[20px] not-italic text-[14px] text-[#101828] placeholder:text-[#98a2b3] outline-none bg-transparent border-none",
|
|
37938
|
+
"data-id": "prompt-editor_refine_dropdown_input"
|
|
37889
37939
|
}
|
|
37890
37940
|
),
|
|
37891
37941
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
@@ -37894,6 +37944,7 @@ Total: ${((_c = llmUsage.total_tokens) == null ? void 0 : _c.toLocaleString()) |
|
|
|
37894
37944
|
onClick: handleSubmit,
|
|
37895
37945
|
disabled: !customInput.trim(),
|
|
37896
37946
|
className: "shrink-0",
|
|
37947
|
+
"data-id": "prompt-editor_refine_dropdown_submit_btn",
|
|
37897
37948
|
children: /* @__PURE__ */ jsxRuntimeExports.jsx(ArrowCircleUpIcon, { isActive: !!customInput.trim() })
|
|
37898
37949
|
}
|
|
37899
37950
|
)
|
|
@@ -37926,7 +37977,7 @@ Total: ${((_c = llmUsage.total_tokens) == null ? void 0 : _c.toLocaleString()) |
|
|
|
37926
37977
|
onOpenRefineModal("whole", sectionContent, instruction);
|
|
37927
37978
|
setIsRefineDropdownOpen(false);
|
|
37928
37979
|
};
|
|
37929
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "relative shrink-0 w-full", children: [
|
|
37980
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "relative shrink-0 w-full", "data-id": "prompt-editor_section_header", children: [
|
|
37930
37981
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
37931
37982
|
"div",
|
|
37932
37983
|
{
|
|
@@ -37934,8 +37985,8 @@ Total: ${((_c = llmUsage.total_tokens) == null ? void 0 : _c.toLocaleString()) |
|
|
|
37934
37985
|
className: "absolute border-[#eaecf0] border-[0px_0px_1px] border-solid inset-0 pointer-events-none"
|
|
37935
37986
|
}
|
|
37936
37987
|
),
|
|
37937
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex flex-row items-center justify-center size-full h-[64px]", children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "box-border content-stretch flex gap-[12px] items-center px-[24px] py-[16px] relative w-full justify-between", children: [
|
|
37938
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "content-stretch flex gap-[4px] items-center relative shrink-0", children: [
|
|
37988
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex flex-row items-center justify-center size-full h-[64px]", "data-id": "prompt-editor_section_header_inner", children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "box-border content-stretch flex gap-[12px] items-center px-[24px] py-[16px] relative w-full justify-between", "data-id": "prompt-editor_section_header_content", children: [
|
|
37989
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "content-stretch flex gap-[4px] items-center relative shrink-0", "data-id": "prompt-editor_section_header_tabs", children: [
|
|
37939
37990
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
37940
37991
|
"button",
|
|
37941
37992
|
{
|
|
@@ -37946,6 +37997,7 @@ Total: ${((_c = llmUsage.total_tokens) == null ? void 0 : _c.toLocaleString()) |
|
|
|
37946
37997
|
},
|
|
37947
37998
|
className: `box-border content-stretch flex gap-[8px] items-center justify-center overflow-clip px-[8px] py-[4px] relative rounded-[4px] shrink-0 transition-colors cursor-pointer ${activeFormat === "editor" ? "bg-[#eff4ff]" : "hover:bg-gray-100"}`,
|
|
37948
37999
|
style: { pointerEvents: "auto", zIndex: 10 },
|
|
38000
|
+
"data-id": "prompt-editor_section_header_tab_editor",
|
|
37949
38001
|
children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
37950
38002
|
"p",
|
|
37951
38003
|
{
|
|
@@ -37965,6 +38017,7 @@ Total: ${((_c = llmUsage.total_tokens) == null ? void 0 : _c.toLocaleString()) |
|
|
|
37965
38017
|
},
|
|
37966
38018
|
className: `box-border content-stretch flex gap-[8px] items-center justify-center overflow-clip px-[8px] py-[4px] relative rounded-[4px] shrink-0 transition-colors cursor-pointer ${activeFormat === "preview" ? "bg-[#eff4ff]" : "hover:bg-gray-100"}`,
|
|
37967
38019
|
style: { pointerEvents: "auto", zIndex: 10 },
|
|
38020
|
+
"data-id": "prompt-editor_section_header_tab_preview",
|
|
37968
38021
|
children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
37969
38022
|
"p",
|
|
37970
38023
|
{
|
|
@@ -37975,7 +38028,7 @@ Total: ${((_c = llmUsage.total_tokens) == null ? void 0 : _c.toLocaleString()) |
|
|
|
37975
38028
|
}
|
|
37976
38029
|
)
|
|
37977
38030
|
] }),
|
|
37978
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "shrink-0", children: activeFormat === "editor" ? /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
38031
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "shrink-0", "data-id": "prompt-editor_section_header_refine_btn_container", children: activeFormat === "editor" ? /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
37979
38032
|
"button",
|
|
37980
38033
|
{
|
|
37981
38034
|
ref: refineButtonRef,
|
|
@@ -37990,6 +38043,7 @@ Total: ${((_c = llmUsage.total_tokens) == null ? void 0 : _c.toLocaleString()) |
|
|
|
37990
38043
|
e.stopPropagation();
|
|
37991
38044
|
},
|
|
37992
38045
|
style: { pointerEvents: "auto", zIndex: 10 },
|
|
38046
|
+
"data-id": "prompt-editor_section_header_btn_refine_ai",
|
|
37993
38047
|
children: [
|
|
37994
38048
|
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "relative size-[16px] shrink-0", children: /* @__PURE__ */ jsxRuntimeExports.jsx(PencilAi, {}) }),
|
|
37995
38049
|
/* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: " leading-[16px] not-italic relative shrink-0 text-[12px] text-nowrap whitespace-pre text-[#344054]", children: "Refine with AI" })
|
|
@@ -38011,11 +38065,12 @@ Total: ${((_c = llmUsage.total_tokens) == null ? void 0 : _c.toLocaleString()) |
|
|
|
38011
38065
|
}
|
|
38012
38066
|
function AddToolbar({ onAdd, isNested = false, isRootLevel = false }) {
|
|
38013
38067
|
const buttonText = isRootLevel ? "Add Section" : "Add Subsection";
|
|
38014
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "content-stretch flex flex-col gap-[4px] items-start relative", children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "content-stretch flex gap-[8px] items-start relative shrink-0", children: !isNested && /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
38068
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "content-stretch flex flex-col gap-[4px] items-start relative", "data-id": "prompt-editor_add_toolbar", children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "content-stretch flex gap-[8px] items-start relative shrink-0", "data-id": "prompt-editor_add_toolbar_buttons", children: !isNested && /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
38015
38069
|
"button",
|
|
38016
38070
|
{
|
|
38017
38071
|
onClick: () => onAdd("subsection"),
|
|
38018
38072
|
className: "bg-white relative rounded-[4px] shrink-0 hover:bg-gray-50 transition-colors",
|
|
38073
|
+
"data-id": `prompt-editor_add_toolbar_btn_${isRootLevel ? "section" : "subsection"}`,
|
|
38019
38074
|
children: [
|
|
38020
38075
|
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "box-border content-stretch flex flex-col gap-[10px] items-center justify-center overflow-clip px-[12px] py-[4px] relative rounded-[inherit]", children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "box-border content-stretch flex gap-[4px] items-center justify-center px-0 py-[2px] relative shrink-0", children: [
|
|
38021
38076
|
/* @__PURE__ */ jsxRuntimeExports.jsx(AlignLeft, { className: "size-[12px] text-[#344054]", strokeWidth: 2 }),
|
|
@@ -38221,8 +38276,8 @@ Total: ${((_c = llmUsage.total_tokens) == null ? void 0 : _c.toLocaleString()) |
|
|
|
38221
38276
|
];
|
|
38222
38277
|
const hasDynamicData = suggestions && suggestions.length > 0;
|
|
38223
38278
|
const hasAnyData = hasDynamicData || systemVariables.length > 0;
|
|
38224
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "py-[4px]", children: [
|
|
38225
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "px-[12px] py-[8px]", children: /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: " text-[12px] text-[#667085]", children: "Insert from:" }) }),
|
|
38279
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "py-[4px]", "data-id": "prompt-editor_insert_menu_categories", children: [
|
|
38280
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "px-[12px] py-[8px]", "data-id": "prompt-editor_insert_menu_categories_header", children: /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: " text-[12px] text-[#667085]", children: "Insert from:" }) }),
|
|
38226
38281
|
!hasAnyData ? /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "px-[12px] py-[16px] text-center", children: /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: " text-[14px] text-[#667085]", children: "No data available" }) }) : categories.map((category, index) => {
|
|
38227
38282
|
const categoryItems = getItemsByTypeDynamic(category.type);
|
|
38228
38283
|
const hasItems = categoryItems.length > 0;
|
|
@@ -38233,6 +38288,7 @@ Total: ${((_c = llmUsage.total_tokens) == null ? void 0 : _c.toLocaleString()) |
|
|
|
38233
38288
|
onClick: () => hasItems && handleCategoryClick(category.type),
|
|
38234
38289
|
disabled: !hasItems,
|
|
38235
38290
|
className: `w-full flex items-center justify-between px-[12px] py-[8px] transition-colors ${!hasItems ? "opacity-50 cursor-not-allowed" : selectedIndex === index ? "bg-[#f2f4f7]" : "hover:bg-[#f9fafb]"}`,
|
|
38291
|
+
"data-id": `prompt-editor_insert_menu_category_${category.type}`,
|
|
38236
38292
|
children: [
|
|
38237
38293
|
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-[8px]", children: [
|
|
38238
38294
|
getCategoryIcon(category.type),
|
|
@@ -38248,12 +38304,13 @@ Total: ${((_c = llmUsage.total_tokens) == null ? void 0 : _c.toLocaleString()) |
|
|
|
38248
38304
|
};
|
|
38249
38305
|
const renderItems = () => {
|
|
38250
38306
|
const hasNoResults = filteredItems.length === 0;
|
|
38251
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "py-[4px]", children: [
|
|
38252
|
-
!searchQuery && selectedCategory && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "h-[41px] border-b border-[#eaecf0]", children: /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
38307
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "py-[4px]", "data-id": "prompt-editor_insert_menu_items", children: [
|
|
38308
|
+
!searchQuery && selectedCategory && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "h-[41px] border-b border-[#eaecf0]", "data-id": "prompt-editor_insert_menu_back_button_container", children: /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
38253
38309
|
"button",
|
|
38254
38310
|
{
|
|
38255
38311
|
onClick: handleBackToCategories,
|
|
38256
38312
|
className: "box-border flex items-center gap-[4px] h-full px-[12px] py-[13px] hover:bg-[#f9fafb] transition-colors w-full",
|
|
38313
|
+
"data-id": "prompt-editor_insert_menu_back_btn",
|
|
38257
38314
|
children: [
|
|
38258
38315
|
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "relative shrink-0 size-[16px]", children: /* @__PURE__ */ jsxRuntimeExports.jsx("svg", { className: "block size-full", fill: "none", preserveAspectRatio: "none", viewBox: "0 0 16 16", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
38259
38316
|
"path",
|
|
@@ -38280,6 +38337,7 @@ Total: ${((_c = llmUsage.total_tokens) == null ? void 0 : _c.toLocaleString()) |
|
|
|
38280
38337
|
ref: (el) => itemRefs.current[index] = el,
|
|
38281
38338
|
onClick: () => onSelect(item),
|
|
38282
38339
|
className: `w-full flex items-center px-[12px] py-[8px] transition-colors group ${selectedIndex === index ? "bg-[#f2f4f7]" : "hover:bg-[#f9fafb]"}`,
|
|
38340
|
+
"data-id": `prompt-editor_insert_menu_item_${item.type}_${item.id}`,
|
|
38283
38341
|
children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-[8px]", children: [
|
|
38284
38342
|
getCategoryIcon(item.type),
|
|
38285
38343
|
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: " text-[14px] text-[#344054]", children: item.displayName })
|
|
@@ -38298,6 +38356,7 @@ Total: ${((_c = llmUsage.total_tokens) == null ? void 0 : _c.toLocaleString()) |
|
|
|
38298
38356
|
top: `${position.top}px`,
|
|
38299
38357
|
left: `${position.left}px`
|
|
38300
38358
|
},
|
|
38359
|
+
"data-id": "prompt-editor_insert_menu",
|
|
38301
38360
|
children: menuMode === "categories" ? renderCategories() : renderItems()
|
|
38302
38361
|
}
|
|
38303
38362
|
);
|
|
@@ -38567,7 +38626,7 @@ Total: ${((_c = llmUsage.total_tokens) == null ? void 0 : _c.toLocaleString()) |
|
|
|
38567
38626
|
}
|
|
38568
38627
|
};
|
|
38569
38628
|
const shouldShowPlaceholder = showPlaceholder && (!content || content === "" || content === "<br>");
|
|
38570
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "relative", children: [
|
|
38629
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "relative", "data-id": "prompt-editor_editable_content", children: [
|
|
38571
38630
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
38572
38631
|
"div",
|
|
38573
38632
|
{
|
|
@@ -38586,7 +38645,8 @@ Total: ${((_c = llmUsage.total_tokens) == null ? void 0 : _c.toLocaleString()) |
|
|
|
38586
38645
|
},
|
|
38587
38646
|
className: `outline-none cursor-text ${className} ${shouldShowPlaceholder ? "empty:before:content-[attr(data-placeholder)] empty:before:text-gray-400" : ""}`,
|
|
38588
38647
|
"data-placeholder": placeholder,
|
|
38589
|
-
suppressContentEditableWarning: true
|
|
38648
|
+
suppressContentEditableWarning: true,
|
|
38649
|
+
"data-id": "prompt-editor_editable_content_editor"
|
|
38590
38650
|
}
|
|
38591
38651
|
),
|
|
38592
38652
|
showVariableDropdown && /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
@@ -39236,6 +39296,7 @@ Total: ${((_c = llmUsage.total_tokens) == null ? void 0 : _c.toLocaleString()) |
|
|
|
39236
39296
|
left: `${position.left}px`,
|
|
39237
39297
|
transform: "translateX(-50%)"
|
|
39238
39298
|
},
|
|
39299
|
+
"data-id": "prompt-editor_formatting_toolbar",
|
|
39239
39300
|
children: [
|
|
39240
39301
|
buttons.map((btn) => /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
39241
39302
|
"button",
|
|
@@ -39247,6 +39308,7 @@ Total: ${((_c = llmUsage.total_tokens) == null ? void 0 : _c.toLocaleString()) |
|
|
|
39247
39308
|
className: "p-2 hover:bg-gray-100 rounded transition-colors",
|
|
39248
39309
|
title: btn.label,
|
|
39249
39310
|
onMouseDown: (e) => e.preventDefault(),
|
|
39311
|
+
"data-id": `prompt-editor_formatting_toolbar_btn_${btn.command}`,
|
|
39250
39312
|
children: /* @__PURE__ */ jsxRuntimeExports.jsx(btn.icon, { className: "size-4 text-[#344054]" })
|
|
39251
39313
|
},
|
|
39252
39314
|
btn.command
|
|
@@ -39267,6 +39329,7 @@ Total: ${((_c = llmUsage.total_tokens) == null ? void 0 : _c.toLocaleString()) |
|
|
|
39267
39329
|
className: "flex items-center gap-1.5 px-2 py-2 hover:bg-gray-100 rounded transition-colors cursor-pointer",
|
|
39268
39330
|
title: "Refine with AI",
|
|
39269
39331
|
style: { pointerEvents: "auto", zIndex: 100 },
|
|
39332
|
+
"data-id": "prompt-editor_formatting_toolbar_btn_refine_ai",
|
|
39270
39333
|
children: [
|
|
39271
39334
|
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "size-4", children: /* @__PURE__ */ jsxRuntimeExports.jsx(PencilAi, {}) }),
|
|
39272
39335
|
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: " text-[14px] text-[#344054] leading-[20px] whitespace-nowrap", children: "Refine with AI" })
|
|
@@ -39337,6 +39400,7 @@ Total: ${((_c = llmUsage.total_tokens) == null ? void 0 : _c.toLocaleString()) |
|
|
|
39337
39400
|
e.stopPropagation();
|
|
39338
39401
|
onSetActive(block.id);
|
|
39339
39402
|
},
|
|
39403
|
+
"data-id": `prompt-editor_subsection_${block.id}`,
|
|
39340
39404
|
children: [
|
|
39341
39405
|
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center justify-between gap-2 mb-3 group", children: [
|
|
39342
39406
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
@@ -39356,11 +39420,12 @@ Total: ${((_c = llmUsage.total_tokens) == null ? void 0 : _c.toLocaleString()) |
|
|
|
39356
39420
|
onClick: onDelete,
|
|
39357
39421
|
className: "opacity-0 group-hover:opacity-100 transition-opacity p-1 hover:bg-gray-100 rounded",
|
|
39358
39422
|
title: "Delete subsection",
|
|
39423
|
+
"data-id": `prompt-editor_subsection_delete_btn_${block.id}`,
|
|
39359
39424
|
children: /* @__PURE__ */ jsxRuntimeExports.jsx(Trash2, { className: "size-4 text-gray-500" })
|
|
39360
39425
|
}
|
|
39361
39426
|
)
|
|
39362
39427
|
] }),
|
|
39363
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex flex-col gap-3 mb-3", children: (_a = block.children) == null ? void 0 : _a.map((child) => /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
39428
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex flex-col gap-3 mb-3", "data-id": `prompt-editor_subsection_children_${block.id}`, children: (_a = block.children) == null ? void 0 : _a.map((child) => /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
39364
39429
|
ContentBlock,
|
|
39365
39430
|
{
|
|
39366
39431
|
block: child,
|
|
@@ -39402,13 +39467,15 @@ Total: ${((_c = llmUsage.total_tokens) == null ? void 0 : _c.toLocaleString()) |
|
|
|
39402
39467
|
e.stopPropagation();
|
|
39403
39468
|
onSetActive(parentId);
|
|
39404
39469
|
},
|
|
39470
|
+
"data-id": `prompt-editor_text_block_${block.id}`,
|
|
39405
39471
|
children: [
|
|
39406
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex gap-2 items-start", children: [
|
|
39472
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex gap-2 items-start", "data-id": `prompt-editor_text_block_container_${block.id}`, children: [
|
|
39407
39473
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
39408
39474
|
"div",
|
|
39409
39475
|
{
|
|
39410
39476
|
className: "flex-1 min-h-[40px]",
|
|
39411
39477
|
"data-block-id": block.id,
|
|
39478
|
+
"data-id": `prompt-editor_text_block_content_${block.id}`,
|
|
39412
39479
|
children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
39413
39480
|
EditableContent,
|
|
39414
39481
|
{
|
|
@@ -39429,6 +39496,7 @@ Total: ${((_c = llmUsage.total_tokens) == null ? void 0 : _c.toLocaleString()) |
|
|
|
39429
39496
|
onClick: onDelete,
|
|
39430
39497
|
className: "opacity-0 group-hover:opacity-100 transition-opacity p-1 hover:bg-gray-100 rounded",
|
|
39431
39498
|
title: "Delete text block",
|
|
39499
|
+
"data-id": `prompt-editor_text_block_delete_btn_${block.id}`,
|
|
39432
39500
|
children: /* @__PURE__ */ jsxRuntimeExports.jsx(Trash2, { className: "size-4 text-gray-500" })
|
|
39433
39501
|
}
|
|
39434
39502
|
)
|
|
@@ -39778,6 +39846,7 @@ Total: ${((_c = llmUsage.total_tokens) == null ? void 0 : _c.toLocaleString()) |
|
|
|
39778
39846
|
{
|
|
39779
39847
|
ref,
|
|
39780
39848
|
className: "bg-white flex flex-col h-full relative rounded-[12px] shrink-0 w-full",
|
|
39849
|
+
"data-id": `prompt-editor_section_${safeSection.id}`,
|
|
39781
39850
|
children: [
|
|
39782
39851
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
39783
39852
|
SectionHeader,
|
|
@@ -39803,11 +39872,12 @@ Total: ${((_c = llmUsage.total_tokens) == null ? void 0 : _c.toLocaleString()) |
|
|
|
39803
39872
|
onSetActive(section.id);
|
|
39804
39873
|
}
|
|
39805
39874
|
},
|
|
39806
|
-
|
|
39875
|
+
"data-id": `prompt-editor_section_content_${safeSection.id}`,
|
|
39876
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "box-border content-stretch flex flex-col gap-[16px] items-start px-[24px] py-[16px] relative w-full", "data-id": `prompt-editor_section_content_inner_${safeSection.id}`, children: renderContent2() })
|
|
39807
39877
|
}
|
|
39808
39878
|
) : (
|
|
39809
39879
|
// Code editor takes full width without padding
|
|
39810
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex-1 overflow-hidden relative shrink-0 w-full", children: renderContent2() })
|
|
39880
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex-1 overflow-hidden relative shrink-0 w-full", "data-id": `prompt-editor_section_preview_${safeSection.id}`, children: renderContent2() })
|
|
39811
39881
|
)
|
|
39812
39882
|
]
|
|
39813
39883
|
}
|
|
@@ -39815,19 +39885,20 @@ Total: ${((_c = llmUsage.total_tokens) == null ? void 0 : _c.toLocaleString()) |
|
|
|
39815
39885
|
}
|
|
39816
39886
|
function ChatMessage({ role, content, quotedText, onInsert, onReplace, showActions = false, isUsed = false }) {
|
|
39817
39887
|
if (role === "user") {
|
|
39818
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex justify-end mb-4", children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "bg-[#f2f4f7] text-[#101828] rounded-[12px] px-[16px] py-[12px] max-w-[80%]", children: [
|
|
39888
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex justify-end mb-4", "data-id": "prompt-editor_chat_message_user", children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "bg-[#f2f4f7] text-[#101828] rounded-[12px] px-[16px] py-[12px] max-w-[80%]", "data-id": "prompt-editor_chat_message_user_content", children: [
|
|
39819
39889
|
/* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: " text-[14px] leading-[20px] whitespace-pre-wrap", children: content }),
|
|
39820
39890
|
quotedText && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "mt-[12px] pl-[12px] border-l-2 border-[#d0d5dd]", children: /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: " text-[13px] leading-[18px] text-[#667085] whitespace-pre-wrap", children: quotedText }) })
|
|
39821
39891
|
] }) });
|
|
39822
39892
|
}
|
|
39823
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex justify-start mb-4", children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex flex-col gap-[8px]", children: [
|
|
39824
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "bg-[#f2f4f7] text-[#101828] rounded-[12px] px-[16px] py-[12px] max-w-[80%]", children: /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: " text-[14px] leading-[20px] whitespace-pre-wrap", children: content }) }),
|
|
39825
|
-
showActions && !isUsed && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-[8px]", children: [
|
|
39893
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex justify-start mb-4", "data-id": "prompt-editor_chat_message_assistant", children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex flex-col gap-[8px]", "data-id": "prompt-editor_chat_message_assistant_container", children: [
|
|
39894
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "bg-[#f2f4f7] text-[#101828] rounded-[12px] px-[16px] py-[12px] max-w-[80%]", "data-id": "prompt-editor_chat_message_assistant_content", children: /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: " text-[14px] leading-[20px] whitespace-pre-wrap", children: content }) }),
|
|
39895
|
+
showActions && !isUsed && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-[8px]", "data-id": "prompt-editor_chat_message_actions", children: [
|
|
39826
39896
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
39827
39897
|
"button",
|
|
39828
39898
|
{
|
|
39829
39899
|
onClick: () => onReplace == null ? void 0 : onReplace(content),
|
|
39830
39900
|
className: "bg-white border border-[#eaecf0] rounded-[9999px] px-[8px] py-[2px] font-medium text-[14px] leading-[20px] text-[#344054] hover:bg-gray-50 transition-colors cursor-pointer",
|
|
39901
|
+
"data-id": "prompt-editor_chat_message_btn_replace",
|
|
39831
39902
|
children: "Replace"
|
|
39832
39903
|
}
|
|
39833
39904
|
),
|
|
@@ -39836,6 +39907,7 @@ Total: ${((_c = llmUsage.total_tokens) == null ? void 0 : _c.toLocaleString()) |
|
|
|
39836
39907
|
{
|
|
39837
39908
|
onClick: () => onInsert == null ? void 0 : onInsert(content),
|
|
39838
39909
|
className: "bg-white border border-[#eaecf0] rounded-[9999px] px-[8px] py-[2px] font-medium text-[14px] leading-[20px] text-[#344054] hover:bg-gray-50 transition-colors cursor-pointer",
|
|
39910
|
+
"data-id": "prompt-editor_chat_message_btn_insert",
|
|
39839
39911
|
children: "Insert"
|
|
39840
39912
|
}
|
|
39841
39913
|
)
|
|
@@ -40075,19 +40147,20 @@ ${actualTextToRefine}` : instruction,
|
|
|
40075
40147
|
}
|
|
40076
40148
|
};
|
|
40077
40149
|
if (!isOpen) return null;
|
|
40078
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "bg-white border border-[#d0d5dd] h-full flex flex-col shrink-0 rounded-[12px] shadow-[0px_1px_2px_0px_rgba(16,24,40,0.04)]", children: [
|
|
40079
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "h-[60px] border-b border-[#eaecf0] flex items-center justify-between px-[16px] shrink-0", children: [
|
|
40150
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "bg-white border border-[#d0d5dd] h-full flex flex-col shrink-0 rounded-[12px] shadow-[0px_1px_2px_0px_rgba(16,24,40,0.04)]", "data-id": "prompt-editor_refine_panel_root", children: [
|
|
40151
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "h-[60px] border-b border-[#eaecf0] flex items-center justify-between px-[16px] shrink-0", "data-id": "prompt-editor_refine_panel_header", children: [
|
|
40080
40152
|
/* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "font-medium text-[16px] leading-[24px] text-[#101828]", children: "Refine with AI" }),
|
|
40081
40153
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
40082
40154
|
"button",
|
|
40083
40155
|
{
|
|
40084
40156
|
onClick: onClose,
|
|
40085
40157
|
className: "p-1 hover:bg-gray-100 rounded transition-colors",
|
|
40158
|
+
"data-id": "prompt-editor_refine_panel_close_btn",
|
|
40086
40159
|
children: /* @__PURE__ */ jsxRuntimeExports.jsx(X, { className: "size-5 text-[#101828]" })
|
|
40087
40160
|
}
|
|
40088
40161
|
)
|
|
40089
40162
|
] }),
|
|
40090
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex-1 overflow-y-auto px-[16px] py-[16px] min-h-0", children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex flex-col gap-[16px] justify-end min-h-full", children: [
|
|
40163
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex-1 overflow-y-auto px-[16px] py-[16px] min-h-0", "data-id": "prompt-editor_refine_panel_chat_area", children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex flex-col gap-[16px] justify-end min-h-full", "data-id": "prompt-editor_refine_panel_messages_container", children: [
|
|
40091
40164
|
messages.map((msg, idx) => {
|
|
40092
40165
|
const lastAssistantIndex = getLastAssistantMessageIndex();
|
|
40093
40166
|
const isLastAssistant = msg.role === "assistant" && idx === lastAssistantIndex;
|
|
@@ -40109,7 +40182,7 @@ ${actualTextToRefine}` : instruction,
|
|
|
40109
40182
|
isLoading && /* @__PURE__ */ jsxRuntimeExports.jsx(SkeletonMessage, {}),
|
|
40110
40183
|
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { ref: chatEndRef })
|
|
40111
40184
|
] }) }),
|
|
40112
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "px-[16px] py-[16px] border-t border-[#eaecf0] shrink-0", children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex items-center gap-[8px]", children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex-1 min-w-0 bg-white h-[44px] relative rounded-[8px] border border-[#d0d5dd]", children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center h-full px-[16px] gap-[8px]", children: [
|
|
40185
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "px-[16px] py-[16px] border-t border-[#eaecf0] shrink-0", "data-id": "prompt-editor_refine_panel_input_area", children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex items-center gap-[8px]", "data-id": "prompt-editor_refine_panel_input_container", children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex-1 min-w-0 bg-white h-[44px] relative rounded-[8px] border border-[#d0d5dd]", "data-id": "prompt-editor_refine_panel_input_wrapper", children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center h-full px-[16px] gap-[8px]", "data-id": "prompt-editor_refine_panel_input_inner", children: [
|
|
40113
40186
|
/* @__PURE__ */ jsxRuntimeExports.jsx(GenerateIcon, {}),
|
|
40114
40187
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
40115
40188
|
"input",
|
|
@@ -40121,7 +40194,8 @@ ${actualTextToRefine}` : instruction,
|
|
|
40121
40194
|
onKeyDown: handleKeyDown,
|
|
40122
40195
|
placeholder: "Iterate further",
|
|
40123
40196
|
disabled: isLoading,
|
|
40124
|
-
className: "flex-1 min-w-0 text-[14px] leading-[20px] text-[#101828] placeholder:text-[#98a2b3] outline-none bg-transparent"
|
|
40197
|
+
className: "flex-1 min-w-0 text-[14px] leading-[20px] text-[#101828] placeholder:text-[#98a2b3] outline-none bg-transparent",
|
|
40198
|
+
"data-id": "prompt-editor_refine_panel_input"
|
|
40125
40199
|
}
|
|
40126
40200
|
),
|
|
40127
40201
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
@@ -40129,6 +40203,7 @@ ${actualTextToRefine}` : instruction,
|
|
|
40129
40203
|
{
|
|
40130
40204
|
onClick: handleIterate,
|
|
40131
40205
|
disabled: !iterateInput.trim() || isLoading,
|
|
40206
|
+
"data-id": "prompt-editor_refine_panel_submit_btn",
|
|
40132
40207
|
children: /* @__PURE__ */ jsxRuntimeExports.jsx(ArrowCircleUpIcon, { isActive: !!iterateInput.trim() && !isLoading })
|
|
40133
40208
|
}
|
|
40134
40209
|
)
|
|
@@ -40627,10 +40702,10 @@ ${actualTextToRefine}` : instruction,
|
|
|
40627
40702
|
}
|
|
40628
40703
|
return await onRefine(context);
|
|
40629
40704
|
};
|
|
40630
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: `bg-white content-stretch flex flex-col items-start relative size-full ${className}`, children: [
|
|
40705
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: `bg-white content-stretch flex flex-col items-start relative size-full ${className}`, "data-id": "prompt-editor_root", children: [
|
|
40631
40706
|
showHeader && /* @__PURE__ */ jsxRuntimeExports.jsx(Header, {}),
|
|
40632
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "basis-0 bg-gray-50 grow min-h-px min-w-px relative shrink-0 w-full", children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "box-border content-stretch flex gap-[24px] items-stretch px-[32px] py-[24px] relative h-full", children: [
|
|
40633
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "bg-white flex-1 h-full relative rounded-[12px] shrink-0 flex flex-col overflow-hidden", children: [
|
|
40707
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "basis-0 bg-gray-50 grow min-h-px min-w-px relative shrink-0 w-full", "data-id": "prompt-editor_main_container", children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "box-border content-stretch flex gap-[24px] items-stretch px-[32px] py-[24px] relative h-full", "data-id": "prompt-editor_panels_container", children: [
|
|
40708
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "bg-white flex-1 h-full relative rounded-[12px] shrink-0 flex flex-col overflow-hidden", "data-id": "prompt-editor_editor_container", children: [
|
|
40634
40709
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
40635
40710
|
Section,
|
|
40636
40711
|
{
|
|
@@ -40661,7 +40736,7 @@ ${actualTextToRefine}` : instruction,
|
|
|
40661
40736
|
),
|
|
40662
40737
|
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { "aria-hidden": "true", className: "absolute border border-[#d0d5dd] border-solid inset-0 pointer-events-none rounded-[12px] shadow-[0px_1px_2px_0px_rgba(16,24,40,0.04)]" })
|
|
40663
40738
|
] }),
|
|
40664
|
-
refineContext && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: `transition-all duration-300 h-full ${refinePanelOpen ? "w-[400px] opacity-100" : "w-0 opacity-0 overflow-hidden"}`, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
40739
|
+
refineContext && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: `transition-all duration-300 h-full ${refinePanelOpen ? "w-[400px] opacity-100" : "w-0 opacity-0 overflow-hidden"}`, "data-id": "prompt-editor_refine_panel_container", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
40665
40740
|
RefinePanel,
|
|
40666
40741
|
{
|
|
40667
40742
|
isOpen: refinePanelOpen,
|