agentic-ui-libs 1.0.0-beta.1 → 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/PromptEditor.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/features/prompt-editor/services/EditorUtils.d.ts.map +1 -1
- package/dist/index.js +292 -207
- package/dist/ui-libs.umd.js +292 -207
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -3887,9 +3887,10 @@ const MetricCard = ({
|
|
|
3887
3887
|
className
|
|
3888
3888
|
),
|
|
3889
3889
|
onClick: handleClick,
|
|
3890
|
+
"data-id": `dashboard_metric_card_${data.metricType || data.title.toLowerCase().replace(/\s+/g, "_")}`,
|
|
3890
3891
|
children: [
|
|
3891
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-2 mb-[6px]", children: [
|
|
3892
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-sm font-medium text-gray-700", children: title }),
|
|
3892
|
+
/* @__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: [
|
|
3893
|
+
/* @__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 }),
|
|
3893
3894
|
info && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "relative group", children: [
|
|
3894
3895
|
/* @__PURE__ */ jsxRuntimeExports.jsx(Info, { className: "h-[16px] w-[16px] text-gray-400 cursor-help" }),
|
|
3895
3896
|
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: cn(
|
|
@@ -3907,8 +3908,8 @@ const MetricCard = ({
|
|
|
3907
3908
|
] })
|
|
3908
3909
|
] })
|
|
3909
3910
|
] }),
|
|
3910
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-baseline gap-3", children: [
|
|
3911
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-2xl font-semibold text-gray-900", children: formatValue2(value) }),
|
|
3911
|
+
/* @__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: [
|
|
3912
|
+
/* @__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) }),
|
|
3912
3913
|
change && /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
3913
3914
|
"div",
|
|
3914
3915
|
{
|
|
@@ -4746,9 +4747,9 @@ var isNullish = function isNullish2(value) {
|
|
|
4746
4747
|
var isNumOrStr = function isNumOrStr2(value) {
|
|
4747
4748
|
return isNumber(value) || isString$1(value);
|
|
4748
4749
|
};
|
|
4749
|
-
var idCounter = 0;
|
|
4750
|
+
var idCounter$1 = 0;
|
|
4750
4751
|
var uniqueId = function uniqueId2(prefix2) {
|
|
4751
|
-
var id = ++idCounter;
|
|
4752
|
+
var id = ++idCounter$1;
|
|
4752
4753
|
return "".concat(prefix2 || "").concat(id);
|
|
4753
4754
|
};
|
|
4754
4755
|
var getPercentValue = function getPercentValue2(percent, totalValue) {
|
|
@@ -28491,8 +28492,8 @@ const AnalyticsChart = ({
|
|
|
28491
28492
|
console.log("Chart lines configuration:", chartLines);
|
|
28492
28493
|
console.log("Sample filled data points:", sortedData.slice(0, 3));
|
|
28493
28494
|
console.log("=== END ANALYTICS CHART DEBUG ===");
|
|
28494
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: cn("w-full", className), children: [
|
|
28495
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "relative bg-gray-50/30", children: /* @__PURE__ */ jsxRuntimeExports.jsx(ResponsiveContainer, { width: "100%", height, children: /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
28495
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: cn("w-full", className), "data-id": "dashboard_analytics_chart_root", children: [
|
|
28496
|
+
/* @__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(
|
|
28496
28497
|
ComposedChart,
|
|
28497
28498
|
{
|
|
28498
28499
|
data: sortedData,
|
|
@@ -28591,10 +28592,10 @@ const AnalyticsChart = ({
|
|
|
28591
28592
|
]
|
|
28592
28593
|
}
|
|
28593
28594
|
) }) }),
|
|
28594
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "mt-4 flex items-center justify-between", children: [
|
|
28595
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: dateRange && /* @__PURE__ */ jsxRuntimeExports.jsxs("p", { className: "text-xs text-gray-500 flex items-center gap-[4px]", children: [
|
|
28595
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "mt-4 flex items-center justify-between", "data-id": "dashboard_analytics_chart_footer", children: [
|
|
28596
|
+
/* @__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: [
|
|
28596
28597
|
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-gray-500", children: "Showing data from" }),
|
|
28597
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs("span", { className: "font-medium text-gray-700", children: [
|
|
28598
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("span", { className: "font-medium text-gray-700", "data-id": "dashboard_analytics_chart_date_range_value", children: [
|
|
28598
28599
|
new Date(dateRange.start).toLocaleDateString("en-US", {
|
|
28599
28600
|
day: "numeric",
|
|
28600
28601
|
month: "short",
|
|
@@ -28608,15 +28609,16 @@ const AnalyticsChart = ({
|
|
|
28608
28609
|
})
|
|
28609
28610
|
] })
|
|
28610
28611
|
] }) }),
|
|
28611
|
-
/* @__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: [
|
|
28612
|
+
/* @__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: [
|
|
28612
28613
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
28613
28614
|
"div",
|
|
28614
28615
|
{
|
|
28615
28616
|
className: "w-[8px] h-[8px] rounded-full",
|
|
28616
|
-
style: { backgroundColor: lineConfig.color }
|
|
28617
|
+
style: { backgroundColor: lineConfig.color },
|
|
28618
|
+
"data-id": `dashboard_analytics_chart_legend_color_${lineConfig.dataKey}`
|
|
28617
28619
|
}
|
|
28618
28620
|
),
|
|
28619
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-xs text-gray-600", children: lineConfig.label })
|
|
28621
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-xs text-gray-600", "data-id": `dashboard_analytics_chart_legend_label_${lineConfig.dataKey}`, children: lineConfig.label })
|
|
28620
28622
|
] }, lineConfig.dataKey)) }) })
|
|
28621
28623
|
] })
|
|
28622
28624
|
] });
|
|
@@ -28703,10 +28705,10 @@ const AnalyticsTable = ({
|
|
|
28703
28705
|
/* @__PURE__ */ jsxRuntimeExports.jsx(ChevronDown, { className: "w-[12px] h-[12px] opacity-30 -mt-1" })
|
|
28704
28706
|
] });
|
|
28705
28707
|
};
|
|
28706
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: cn("w-full", className), children: [
|
|
28707
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center justify-between mb-4", children: [
|
|
28708
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("h3", { className: "text-md font-medium text-gray-700", children: title }),
|
|
28709
|
-
filtering.enabled && filtering.searchable && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "relative", children: [
|
|
28708
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: cn("w-full", className), "data-id": "dashboard_analytics_table_root", children: [
|
|
28709
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center justify-between mb-4", "data-id": "dashboard_analytics_table_header", children: [
|
|
28710
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("h3", { className: "text-md font-medium text-gray-700", "data-id": "dashboard_analytics_table_title", children: title }),
|
|
28711
|
+
filtering.enabled && filtering.searchable && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "relative", "data-id": "dashboard_analytics_table_search", children: [
|
|
28710
28712
|
/* @__PURE__ */ jsxRuntimeExports.jsx(Search, { className: "absolute left-[12px] top-1/2 transform -translate-y-1/2 w-[16px] h-[16px] text-gray-400" }),
|
|
28711
28713
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
28712
28714
|
"input",
|
|
@@ -28715,13 +28717,14 @@ const AnalyticsTable = ({
|
|
|
28715
28717
|
placeholder: "Search...",
|
|
28716
28718
|
value: searchTerm,
|
|
28717
28719
|
onChange: (e3) => handleSearch(e3.target.value),
|
|
28718
|
-
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"
|
|
28720
|
+
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",
|
|
28721
|
+
"data-id": "dashboard_analytics_table_search_input"
|
|
28719
28722
|
}
|
|
28720
28723
|
)
|
|
28721
28724
|
] })
|
|
28722
28725
|
] }),
|
|
28723
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "overflow-x-auto border border-gray-200 rounded-lg", children: /* @__PURE__ */ jsxRuntimeExports.jsxs("table", { className: "w-full", children: [
|
|
28724
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("thead", { className: "bg-gray-50", children: /* @__PURE__ */ jsxRuntimeExports.jsx("tr", { children: columns.map((column) => /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
28726
|
+
/* @__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: [
|
|
28727
|
+
/* @__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(
|
|
28725
28728
|
"th",
|
|
28726
28729
|
{
|
|
28727
28730
|
className: cn(
|
|
@@ -28732,17 +28735,19 @@ const AnalyticsTable = ({
|
|
|
28732
28735
|
),
|
|
28733
28736
|
style: { width: column.width },
|
|
28734
28737
|
onClick: () => handleSort(column),
|
|
28735
|
-
|
|
28738
|
+
"data-id": `dashboard_analytics_table_header_${column.key}`,
|
|
28739
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-2", "data-id": `dashboard_analytics_table_header_content_${column.key}`, children: [
|
|
28736
28740
|
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { children: column.title }),
|
|
28737
28741
|
getSortIcon(column)
|
|
28738
28742
|
] })
|
|
28739
28743
|
},
|
|
28740
28744
|
column.key
|
|
28741
28745
|
)) }) }),
|
|
28742
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("tbody", { className: "bg-white divide-y divide-gray-200", children: paginatedData.map((row, rowIndex) => /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
28746
|
+
/* @__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(
|
|
28743
28747
|
"tr",
|
|
28744
28748
|
{
|
|
28745
28749
|
className: "hover:bg-gray-50 transition-colors",
|
|
28750
|
+
"data-id": `dashboard_analytics_table_row_${rowIndex}`,
|
|
28746
28751
|
children: columns.map((column) => /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
28747
28752
|
"td",
|
|
28748
28753
|
{
|
|
@@ -28751,6 +28756,7 @@ const AnalyticsTable = ({
|
|
|
28751
28756
|
column.align === "center" && "text-center",
|
|
28752
28757
|
column.align === "right" && "text-right"
|
|
28753
28758
|
),
|
|
28759
|
+
"data-id": `dashboard_analytics_table_cell_${rowIndex}_${column.key}`,
|
|
28754
28760
|
children: formatCellValue(row[column.key], column, row)
|
|
28755
28761
|
},
|
|
28756
28762
|
column.key
|
|
@@ -28759,8 +28765,8 @@ const AnalyticsTable = ({
|
|
|
28759
28765
|
rowIndex
|
|
28760
28766
|
)) })
|
|
28761
28767
|
] }) }),
|
|
28762
|
-
pagination.enabled && totalPages > 1 && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center justify-between mt-4", children: [
|
|
28763
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "text-xs text-gray-500", children: [
|
|
28768
|
+
pagination.enabled && totalPages > 1 && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center justify-between mt-4", "data-id": "dashboard_analytics_table_pagination", children: [
|
|
28769
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "text-xs text-gray-500", "data-id": "dashboard_analytics_table_pagination_info", children: [
|
|
28764
28770
|
"Showing ",
|
|
28765
28771
|
(currentPage - 1) * pagination.pageSize + 1,
|
|
28766
28772
|
" to",
|
|
@@ -28771,13 +28777,14 @@ const AnalyticsTable = ({
|
|
|
28771
28777
|
processedData.length,
|
|
28772
28778
|
" results"
|
|
28773
28779
|
] }),
|
|
28774
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
28780
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-2", "data-id": "dashboard_analytics_table_pagination_controls", children: [
|
|
28775
28781
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
28776
28782
|
"button",
|
|
28777
28783
|
{
|
|
28778
28784
|
onClick: () => setCurrentPage((prev) => Math.max(1, prev - 1)),
|
|
28779
28785
|
disabled: currentPage === 1,
|
|
28780
28786
|
className: "px-[12px] py-[4px] text-xs border border-gray-200 rounded hover:bg-gray-50 disabled:opacity-50 disabled:cursor-not-allowed",
|
|
28787
|
+
"data-id": "dashboard_analytics_table_pagination_btn_previous",
|
|
28781
28788
|
children: "Previous"
|
|
28782
28789
|
}
|
|
28783
28790
|
),
|
|
@@ -28795,6 +28802,7 @@ const AnalyticsTable = ({
|
|
|
28795
28802
|
"px-[12px] py-[4px] text-xs border rounded",
|
|
28796
28803
|
currentPage === pageNum ? "bg-blue-500 text-white border-blue-500" : "border-gray-200 hover:bg-gray-50"
|
|
28797
28804
|
),
|
|
28805
|
+
"data-id": `dashboard_analytics_table_pagination_btn_page_${pageNum}`,
|
|
28798
28806
|
children: pageNum
|
|
28799
28807
|
},
|
|
28800
28808
|
pageNum
|
|
@@ -28806,12 +28814,13 @@ const AnalyticsTable = ({
|
|
|
28806
28814
|
onClick: () => setCurrentPage((prev) => Math.min(totalPages, prev + 1)),
|
|
28807
28815
|
disabled: currentPage === totalPages,
|
|
28808
28816
|
className: "px-[12px] py-[4px] text-xs border border-gray-200 rounded hover:bg-gray-50 disabled:opacity-50 disabled:cursor-not-allowed",
|
|
28817
|
+
"data-id": "dashboard_analytics_table_pagination_btn_next",
|
|
28809
28818
|
children: "Next"
|
|
28810
28819
|
}
|
|
28811
28820
|
)
|
|
28812
28821
|
] })
|
|
28813
28822
|
] }),
|
|
28814
|
-
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." })
|
|
28823
|
+
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." })
|
|
28815
28824
|
] });
|
|
28816
28825
|
};
|
|
28817
28826
|
const DOMAIN = window.location.protocol + "//" + window.location.host;
|
|
@@ -29105,20 +29114,21 @@ const AgentListView = ({
|
|
|
29105
29114
|
}
|
|
29106
29115
|
return value.toString();
|
|
29107
29116
|
};
|
|
29108
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: cn("w-full", className), children: [
|
|
29109
|
-
/* @__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: [
|
|
29110
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-left", children: "Name" }),
|
|
29111
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-center", children: "Runs" }),
|
|
29112
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-center", children: "Response Time" }),
|
|
29113
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-center", children: "Tokens" })
|
|
29117
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: cn("w-full", className), "data-id": "dashboard_agent_list_view_root", children: [
|
|
29118
|
+
/* @__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: [
|
|
29119
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-left", "data-id": "dashboard_agent_list_view_header_name", children: "Name" }),
|
|
29120
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-center", "data-id": "dashboard_agent_list_view_header_runs", children: "Runs" }),
|
|
29121
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-center", "data-id": "dashboard_agent_list_view_header_response_time", children: "Response Time" }),
|
|
29122
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-center", "data-id": "dashboard_agent_list_view_header_tokens", children: "Tokens" })
|
|
29114
29123
|
] }),
|
|
29115
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "divide-y divide-gray-100", children: data.slice(0, visibleCount).map((agent, index) => /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
29124
|
+
/* @__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(
|
|
29116
29125
|
"div",
|
|
29117
29126
|
{
|
|
29118
29127
|
className: "grid grid-cols-4 items-center gap-4 px-[16px] py-[12px] cursor-pointer transition-colors duration-150 border-b border-gray-200",
|
|
29128
|
+
"data-id": `dashboard_agent_list_view_row_${index}`,
|
|
29119
29129
|
children: [
|
|
29120
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-[8px]", children: [
|
|
29121
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex-shrink-0", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
29130
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-[8px]", "data-id": `dashboard_agent_list_view_row_name_${index}`, children: [
|
|
29131
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex-shrink-0", "data-id": `dashboard_agent_list_view_row_avatar_${index}`, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
29122
29132
|
IconPreview,
|
|
29123
29133
|
{
|
|
29124
29134
|
icon: agent.icon,
|
|
@@ -29127,20 +29137,21 @@ const AgentListView = ({
|
|
|
29127
29137
|
name: agent.name || "Unknown Agent"
|
|
29128
29138
|
}
|
|
29129
29139
|
) }),
|
|
29130
|
-
/* @__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" }) })
|
|
29140
|
+
/* @__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" }) })
|
|
29131
29141
|
] }),
|
|
29132
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-center font-medium text-xs text-gray-700", children: agent.runs ? formatValue2(agent.runs) : "-" }),
|
|
29133
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-center font-medium text-xs text-gray-700", children: agent.responseTime || "-" }),
|
|
29134
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-center font-medium text-xs text-gray-700", children: agent.tokens ? formatValue2(agent.tokens) : "-" })
|
|
29142
|
+
/* @__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) : "-" }),
|
|
29143
|
+
/* @__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 || "-" }),
|
|
29144
|
+
/* @__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) : "-" })
|
|
29135
29145
|
]
|
|
29136
29146
|
},
|
|
29137
29147
|
agent.id || index
|
|
29138
29148
|
)) }),
|
|
29139
|
-
visibleCount < data.length && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex justify-center", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
29149
|
+
visibleCount < data.length && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex justify-center", "data-id": "dashboard_agent_list_view_load_more_container", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
29140
29150
|
"button",
|
|
29141
29151
|
{
|
|
29142
29152
|
onClick: loadMore,
|
|
29143
29153
|
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",
|
|
29154
|
+
"data-id": "dashboard_agent_list_view_load_more_btn",
|
|
29144
29155
|
children: "Load 10 more"
|
|
29145
29156
|
}
|
|
29146
29157
|
) })
|
|
@@ -29184,20 +29195,21 @@ const ToolListView = ({
|
|
|
29184
29195
|
}
|
|
29185
29196
|
return value.toString();
|
|
29186
29197
|
};
|
|
29187
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: cn("w-full", className), children: [
|
|
29188
|
-
/* @__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: [
|
|
29189
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-left", children: "Name" }),
|
|
29190
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-center", children: "Type" }),
|
|
29191
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-center", children: "Runs" }),
|
|
29192
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-center", children: "Response Time" })
|
|
29198
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: cn("w-full", className), "data-id": "dashboard_tool_list_view_root", children: [
|
|
29199
|
+
/* @__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: [
|
|
29200
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-left", "data-id": "dashboard_tool_list_view_header_name", children: "Name" }),
|
|
29201
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-center", "data-id": "dashboard_tool_list_view_header_type", children: "Type" }),
|
|
29202
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-center", "data-id": "dashboard_tool_list_view_header_runs", children: "Runs" }),
|
|
29203
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-center", "data-id": "dashboard_tool_list_view_header_response_time", children: "Response Time" })
|
|
29193
29204
|
] }),
|
|
29194
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "divide-y divide-gray-100", children: data.slice(0, visibleCount).map((tool, index) => /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
29205
|
+
/* @__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(
|
|
29195
29206
|
"div",
|
|
29196
29207
|
{
|
|
29197
29208
|
className: "grid grid-cols-4 items-center gap-4 px-[16px] py-[12px] cursor-pointer transition-colors duration-150 border-b border-gray-200",
|
|
29209
|
+
"data-id": `dashboard_tool_list_view_row_${index}`,
|
|
29198
29210
|
children: [
|
|
29199
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-[8px]", children: [
|
|
29200
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex-shrink-0", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
29211
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-[8px]", "data-id": `dashboard_tool_list_view_row_name_${index}`, children: [
|
|
29212
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex-shrink-0", "data-id": `dashboard_tool_list_view_row_icon_${index}`, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
29201
29213
|
IconPreview,
|
|
29202
29214
|
{
|
|
29203
29215
|
icon: tool.icon,
|
|
@@ -29207,23 +29219,24 @@ const ToolListView = ({
|
|
|
29207
29219
|
toolType: tool["toolType"] || tool["type"]
|
|
29208
29220
|
}
|
|
29209
29221
|
) }),
|
|
29210
|
-
/* @__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" }) })
|
|
29222
|
+
/* @__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" }) })
|
|
29211
29223
|
] }),
|
|
29212
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex items-center justify-center", children: /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: cn(
|
|
29224
|
+
/* @__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(
|
|
29213
29225
|
"inline-flex items-center px-[10px] py-[4px] rounded-full text-xs font-medium border",
|
|
29214
29226
|
getToolTypeStyle(tool["toolType"] || tool["type"] || "Default")
|
|
29215
|
-
), children: getToolTypeName(tool["toolType"] || tool["type"] || "Default") }) }),
|
|
29216
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-center font-medium text-xs text-gray-700", children: tool.runs ? formatValue2(tool.runs) : "-" }),
|
|
29217
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-center font-medium text-xs text-gray-700", children: tool.responseTime || "-" })
|
|
29227
|
+
), "data-id": `dashboard_tool_list_view_row_type_badge_${index}`, children: getToolTypeName(tool["toolType"] || tool["type"] || "Default") }) }),
|
|
29228
|
+
/* @__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) : "-" }),
|
|
29229
|
+
/* @__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 || "-" })
|
|
29218
29230
|
]
|
|
29219
29231
|
},
|
|
29220
29232
|
tool.id || index
|
|
29221
29233
|
)) }),
|
|
29222
|
-
visibleCount < data.length && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex justify-center", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
29234
|
+
visibleCount < data.length && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex justify-center", "data-id": "dashboard_tool_list_view_load_more_container", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
29223
29235
|
"button",
|
|
29224
29236
|
{
|
|
29225
29237
|
onClick: loadMore,
|
|
29226
29238
|
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",
|
|
29239
|
+
"data-id": "dashboard_tool_list_view_load_more_btn",
|
|
29227
29240
|
children: "Load 10 more"
|
|
29228
29241
|
}
|
|
29229
29242
|
) })
|
|
@@ -29363,42 +29376,44 @@ const ModelListView = ({
|
|
|
29363
29376
|
}
|
|
29364
29377
|
return value.toString();
|
|
29365
29378
|
};
|
|
29366
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: cn("w-full", className), children: [
|
|
29367
|
-
/* @__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: [
|
|
29368
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-left", children: "Model Name" }),
|
|
29369
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-center", children: "Runs" }),
|
|
29370
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-center", children: "Tokens" }),
|
|
29371
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-center", children: "Response Time" })
|
|
29379
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: cn("w-full", className), "data-id": "dashboard_model_list_view_root", children: [
|
|
29380
|
+
/* @__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: [
|
|
29381
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-left", "data-id": "dashboard_model_list_view_header_name", children: "Model Name" }),
|
|
29382
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-center", "data-id": "dashboard_model_list_view_header_runs", children: "Runs" }),
|
|
29383
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-center", "data-id": "dashboard_model_list_view_header_tokens", children: "Tokens" }),
|
|
29384
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-center", "data-id": "dashboard_model_list_view_header_response_time", children: "Response Time" })
|
|
29372
29385
|
] }),
|
|
29373
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "divide-y divide-gray-100", children: data.slice(0, visibleCount).map((model, index) => /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
29386
|
+
/* @__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(
|
|
29374
29387
|
"div",
|
|
29375
29388
|
{
|
|
29376
29389
|
className: "grid grid-cols-4 items-center gap-4 px-[16px] py-[12px] cursor-pointer transition-colors duration-150 border-b border-gray-200",
|
|
29390
|
+
"data-id": `dashboard_model_list_view_row_${index}`,
|
|
29377
29391
|
children: [
|
|
29378
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-[8px]", children: [
|
|
29379
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex-shrink-0", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
29392
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-[8px]", "data-id": `dashboard_model_list_view_row_name_${index}`, children: [
|
|
29393
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex-shrink-0", "data-id": `dashboard_model_list_view_row_icon_${index}`, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
29380
29394
|
ModelIcon,
|
|
29381
29395
|
{
|
|
29382
29396
|
provider: model.provider
|
|
29383
29397
|
}
|
|
29384
29398
|
) }),
|
|
29385
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "min-w-0 flex-1 w-full", children: [
|
|
29386
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-xs font-medium text-gray-700 truncate", children: model.name || model.modelName || "Unknown Model" }),
|
|
29387
|
-
model.provider && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-xs text-gray-500 truncate", children: getProviderDisplayName(model.provider) })
|
|
29399
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "min-w-0 flex-1 w-full", "data-id": `dashboard_model_list_view_row_name_text_${index}`, children: [
|
|
29400
|
+
/* @__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" }),
|
|
29401
|
+
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) })
|
|
29388
29402
|
] })
|
|
29389
29403
|
] }),
|
|
29390
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-center font-medium text-xs text-gray-700", children: formatValue2(model.runs || 0) }),
|
|
29391
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-center font-medium text-xs text-gray-700", children: formatValue2(model.tokens || model.totalTokens || 0) }),
|
|
29392
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-center font-medium text-xs text-gray-700", children: model.responseTime || (model.avgResponseTime ? `${model.avgResponseTime}ms` : "N/A") })
|
|
29404
|
+
/* @__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) }),
|
|
29405
|
+
/* @__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) }),
|
|
29406
|
+
/* @__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") })
|
|
29393
29407
|
]
|
|
29394
29408
|
},
|
|
29395
29409
|
model.id || index
|
|
29396
29410
|
)) }),
|
|
29397
|
-
visibleCount < data.length && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex justify-center", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
29411
|
+
visibleCount < data.length && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex justify-center", "data-id": "dashboard_model_list_view_load_more_container", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
29398
29412
|
"button",
|
|
29399
29413
|
{
|
|
29400
29414
|
onClick: loadMore,
|
|
29401
29415
|
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",
|
|
29416
|
+
"data-id": "dashboard_model_list_view_load_more_btn",
|
|
29402
29417
|
children: "Load 10 more"
|
|
29403
29418
|
}
|
|
29404
29419
|
) })
|
|
@@ -29519,7 +29534,8 @@ const RunsSlider = ({
|
|
|
29519
29534
|
"div",
|
|
29520
29535
|
{
|
|
29521
29536
|
className: "fixed inset-0 bg-black bg-opacity-50 z-40 transition-opacity duration-300",
|
|
29522
|
-
onClick: handleClose
|
|
29537
|
+
onClick: handleClose,
|
|
29538
|
+
"data-id": "dashboard_runs_slider_overlay"
|
|
29523
29539
|
}
|
|
29524
29540
|
),
|
|
29525
29541
|
/* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
@@ -29530,39 +29546,42 @@ const RunsSlider = ({
|
|
|
29530
29546
|
isOpen ? "translate-x-0" : "translate-x-full",
|
|
29531
29547
|
className
|
|
29532
29548
|
),
|
|
29549
|
+
"data-id": "dashboard_runs_slider_panel",
|
|
29533
29550
|
children: [
|
|
29534
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center justify-between px-6 py-3 border-b border-[#d0d5dd]", children: [
|
|
29535
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("h2", { className: "text-lg font-semibold text-[#101828]", children: config2.title }),
|
|
29551
|
+
/* @__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: [
|
|
29552
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("h2", { className: "text-lg font-semibold text-[#101828]", "data-id": "dashboard_runs_slider_title", children: config2.title }),
|
|
29536
29553
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
29537
29554
|
"button",
|
|
29538
29555
|
{
|
|
29539
29556
|
onClick: handleClose,
|
|
29540
29557
|
className: "p-2 hover:bg-gray-100 rounded-lg transition-colors",
|
|
29558
|
+
"data-id": "dashboard_runs_slider_close_btn",
|
|
29541
29559
|
children: /* @__PURE__ */ jsxRuntimeExports.jsx(X, { className: "h-5 w-5 text-[#101828]" })
|
|
29542
29560
|
}
|
|
29543
29561
|
)
|
|
29544
29562
|
] }),
|
|
29545
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex flex-col h-[calc(100%-64px)] p-6 gap-6", children: [
|
|
29546
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center justify-between", children: [
|
|
29547
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "text-sm font-medium text-[#344054]", children: [
|
|
29563
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex flex-col h-[calc(100%-64px)] p-6 gap-6", "data-id": "dashboard_runs_slider_content", children: [
|
|
29564
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center justify-between", "data-id": "dashboard_runs_slider_subheader", children: [
|
|
29565
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "text-sm font-medium text-[#344054]", "data-id": "dashboard_runs_slider_date_label", children: [
|
|
29548
29566
|
config2.title,
|
|
29549
29567
|
" (",
|
|
29550
29568
|
formatDate(date2),
|
|
29551
29569
|
")"
|
|
29552
29570
|
] }),
|
|
29553
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "w-[210px] relative filter-dropdown", children: [
|
|
29571
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "w-[210px] relative filter-dropdown", "data-id": "dashboard_runs_slider_filter_dropdown", children: [
|
|
29554
29572
|
/* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
29555
29573
|
"button",
|
|
29556
29574
|
{
|
|
29557
29575
|
onClick: () => setShowFilterDropdown(!showFilterDropdown),
|
|
29558
29576
|
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",
|
|
29577
|
+
"data-id": "dashboard_runs_slider_filter_btn",
|
|
29559
29578
|
children: [
|
|
29560
29579
|
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { children: selectedFilterLabel }),
|
|
29561
29580
|
/* @__PURE__ */ jsxRuntimeExports.jsx(ChevronDown, { className: "h-4 w-4 text-[#101828]" })
|
|
29562
29581
|
]
|
|
29563
29582
|
}
|
|
29564
29583
|
),
|
|
29565
|
-
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(
|
|
29584
|
+
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(
|
|
29566
29585
|
"button",
|
|
29567
29586
|
{
|
|
29568
29587
|
onClick: () => handleFilterSelect(option.value),
|
|
@@ -29570,25 +29589,26 @@ const RunsSlider = ({
|
|
|
29570
29589
|
"w-full px-3.5 py-2.5 text-left text-sm hover:bg-gray-50 transition-colors",
|
|
29571
29590
|
selectedFilter === option.value ? "bg-blue-50 text-blue-700" : "text-[#101828]"
|
|
29572
29591
|
),
|
|
29592
|
+
"data-id": `dashboard_runs_slider_filter_option_${option.value}`,
|
|
29573
29593
|
children: option.label
|
|
29574
29594
|
},
|
|
29575
29595
|
option.value
|
|
29576
29596
|
)) })
|
|
29577
29597
|
] })
|
|
29578
29598
|
] }),
|
|
29579
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex-1 overflow-hidden", children: [
|
|
29580
|
-
/* @__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: [
|
|
29581
|
-
/* @__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" }) }),
|
|
29582
|
-
/* @__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" }) }),
|
|
29583
|
-
/* @__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" }) })
|
|
29599
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex-1 overflow-hidden", "data-id": "dashboard_runs_slider_table_container", children: [
|
|
29600
|
+
/* @__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: [
|
|
29601
|
+
/* @__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" }) }),
|
|
29602
|
+
/* @__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" }) }),
|
|
29603
|
+
/* @__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" }) })
|
|
29584
29604
|
] }) }),
|
|
29585
|
-
/* @__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: [
|
|
29586
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs("h3", { className: "text-md font-medium text-gray-900 mb-[8px]", children: [
|
|
29605
|
+
/* @__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: [
|
|
29606
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("h3", { className: "text-md font-medium text-gray-900 mb-[8px]", "data-id": "dashboard_runs_slider_empty_state_title", children: [
|
|
29587
29607
|
"No ",
|
|
29588
29608
|
config2.title.toLowerCase(),
|
|
29589
29609
|
" for this date"
|
|
29590
29610
|
] }),
|
|
29591
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs("p", { className: "text-xs text-gray-500", children: [
|
|
29611
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("p", { className: "text-xs text-gray-500", "data-id": "dashboard_runs_slider_empty_state_message", children: [
|
|
29592
29612
|
"There were no ",
|
|
29593
29613
|
config2.title.toLowerCase(),
|
|
29594
29614
|
" recorded on ",
|
|
@@ -29600,9 +29620,10 @@ const RunsSlider = ({
|
|
|
29600
29620
|
"div",
|
|
29601
29621
|
{
|
|
29602
29622
|
className: "grid grid-cols-4 gap-3 items-center px-2 py-3 border-b border-[#eaecf0] hover:bg-gray-50 transition-colors",
|
|
29623
|
+
"data-id": `dashboard_runs_slider_table_row_${index}`,
|
|
29603
29624
|
children: [
|
|
29604
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "col-span-2 flex items-center gap-2", children: [
|
|
29605
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex-shrink-0", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
29625
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "col-span-2 flex items-center gap-2", "data-id": `dashboard_runs_slider_table_row_name_${index}`, children: [
|
|
29626
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex-shrink-0", "data-id": `dashboard_runs_slider_table_row_avatar_${index}`, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
29606
29627
|
IconPreview,
|
|
29607
29628
|
{
|
|
29608
29629
|
icon: item.icon,
|
|
@@ -29614,22 +29635,23 @@ const RunsSlider = ({
|
|
|
29614
29635
|
modelName: item.modelName
|
|
29615
29636
|
}
|
|
29616
29637
|
) }),
|
|
29617
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "min-w-0 flex-1", children: [
|
|
29638
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "min-w-0 flex-1", "data-id": `dashboard_runs_slider_table_row_name_text_${index}`, children: [
|
|
29618
29639
|
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-sm font-medium text-[#101828] truncate", children: item.name }),
|
|
29619
|
-
metricType === "modelRuns" && item.provider && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-xs text-[#475467] truncate", children: item.provider })
|
|
29640
|
+
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 })
|
|
29620
29641
|
] })
|
|
29621
29642
|
] }),
|
|
29622
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex justify-center", children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-xs font-medium text-[#475467]", children: formatValue(item.runs) }) }),
|
|
29623
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex justify-center", children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-xs font-medium text-[#475467]", children: item.responseTime }) })
|
|
29643
|
+
/* @__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) }) }),
|
|
29644
|
+
/* @__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 }) })
|
|
29624
29645
|
]
|
|
29625
29646
|
},
|
|
29626
29647
|
item.id || index
|
|
29627
29648
|
)),
|
|
29628
|
-
visibleCount < filteredData.length && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex justify-center", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
29649
|
+
visibleCount < filteredData.length && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex justify-center", "data-id": "dashboard_runs_slider_load_more_container", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
29629
29650
|
"button",
|
|
29630
29651
|
{
|
|
29631
29652
|
onClick: loadMore,
|
|
29632
29653
|
className: "bg-white border border-[#d0d5dd] rounded px-3 py-1 text-xs font-medium text-[#344054] hover:bg-gray-50 transition-colors",
|
|
29654
|
+
"data-id": "dashboard_runs_slider_load_more_btn",
|
|
29633
29655
|
children: "Load 10 more"
|
|
29634
29656
|
}
|
|
29635
29657
|
) })
|
|
@@ -31247,7 +31269,7 @@ const ViewRenderer = ({
|
|
|
31247
31269
|
}
|
|
31248
31270
|
};
|
|
31249
31271
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
31250
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: cn("w-full", className), children: renderView() }),
|
|
31272
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: cn("w-full", className), "data-id": "dashboard_view_renderer_root", children: renderView() }),
|
|
31251
31273
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
31252
31274
|
RunsSlider,
|
|
31253
31275
|
{
|
|
@@ -31658,7 +31680,7 @@ const SectionControls = ({
|
|
|
31658
31680
|
}
|
|
31659
31681
|
return { maxItems: 40, maxLabelLength: 25 };
|
|
31660
31682
|
};
|
|
31661
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: cn("flex items-center gap-3", className), children: [
|
|
31683
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: cn("flex items-center gap-3", className), "data-id": "dashboard_section_controls", children: [
|
|
31662
31684
|
dropdown && /* @__PURE__ */ jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, { children: dropdown.multiSelect ? /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
31663
31685
|
MultiSelect,
|
|
31664
31686
|
{
|
|
@@ -31686,7 +31708,7 @@ const SectionControls = ({
|
|
|
31686
31708
|
className: "w-48"
|
|
31687
31709
|
}
|
|
31688
31710
|
) }),
|
|
31689
|
-
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(
|
|
31711
|
+
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(
|
|
31690
31712
|
"button",
|
|
31691
31713
|
{
|
|
31692
31714
|
onClick: () => {
|
|
@@ -31699,11 +31721,12 @@ const SectionControls = ({
|
|
|
31699
31721
|
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",
|
|
31700
31722
|
index > 0 && "border-l border-gray-200"
|
|
31701
31723
|
),
|
|
31724
|
+
"data-id": `dashboard_section_controls_btn_${button.value}`,
|
|
31702
31725
|
children: button.icon && /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "mr-[8px]", children: button.icon })
|
|
31703
31726
|
},
|
|
31704
31727
|
button.value
|
|
31705
31728
|
)) }),
|
|
31706
|
-
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: [
|
|
31729
|
+
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: [
|
|
31707
31730
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
31708
31731
|
"button",
|
|
31709
31732
|
{
|
|
@@ -31716,6 +31739,7 @@ const SectionControls = ({
|
|
|
31716
31739
|
"hover:bg-white ",
|
|
31717
31740
|
toggle.chartView ? "bg-white text-gray-900 shadow-md" : "text-gray-500 bg-white"
|
|
31718
31741
|
),
|
|
31742
|
+
"data-id": "dashboard_section_controls_view_toggle_btn_chart",
|
|
31719
31743
|
children: /* @__PURE__ */ jsxRuntimeExports.jsx(BarChart3, { className: "w-[16px] h-[16px]" })
|
|
31720
31744
|
}
|
|
31721
31745
|
),
|
|
@@ -31731,6 +31755,7 @@ const SectionControls = ({
|
|
|
31731
31755
|
"hover:bg-white ",
|
|
31732
31756
|
toggle.tableView ? "bg-white text-gray-900 shadow-md" : "text-gray-500 bg-white"
|
|
31733
31757
|
),
|
|
31758
|
+
"data-id": "dashboard_section_controls_view_toggle_btn_table",
|
|
31734
31759
|
children: /* @__PURE__ */ jsxRuntimeExports.jsx(Table, { className: "w-[16px] h-[16px]" })
|
|
31735
31760
|
}
|
|
31736
31761
|
)
|
|
@@ -32344,17 +32369,18 @@ const DashboardSection = ({
|
|
|
32344
32369
|
gridColumn: (layout == null ? void 0 : layout.span) ? `span ${layout.span}` : void 0,
|
|
32345
32370
|
order: layout == null ? void 0 : layout.order
|
|
32346
32371
|
},
|
|
32372
|
+
"data-id": `dashboard_section_${id}`,
|
|
32347
32373
|
children: [
|
|
32348
|
-
title && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "w-full", children: [
|
|
32349
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("h1", { className: "text-md font-medium text-gray-700", children: title }),
|
|
32350
|
-
description && /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-xs text-gray-500", children: description })
|
|
32374
|
+
title && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "w-full", "data-id": `dashboard_section_header_${id}`, children: [
|
|
32375
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("h1", { className: "text-md font-medium text-gray-700", "data-id": `dashboard_section_title_${id}`, children: title }),
|
|
32376
|
+
description && /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-xs text-gray-500", "data-id": `dashboard_section_description_${id}`, children: description })
|
|
32351
32377
|
] }),
|
|
32352
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex flex-col sm:flex-row gap-[16px]", children: isLoading ? /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
32353
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex-1", children: /* @__PURE__ */ jsxRuntimeExports.jsx(MetricCardSkeleton, {}) }),
|
|
32354
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex-1", children: /* @__PURE__ */ jsxRuntimeExports.jsx(MetricCardSkeleton, {}) }),
|
|
32355
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex-1", children: /* @__PURE__ */ jsxRuntimeExports.jsx(MetricCardSkeleton, {}) }),
|
|
32356
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex-1", children: /* @__PURE__ */ jsxRuntimeExports.jsx(MetricCardSkeleton, {}) })
|
|
32357
|
-
] }) : getUpdatedMetrics().map((metric, index) => /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex-1", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
32378
|
+
/* @__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: [
|
|
32379
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex-1", "data-id": `dashboard_section_metric_skeleton_${id}_0`, children: /* @__PURE__ */ jsxRuntimeExports.jsx(MetricCardSkeleton, {}) }),
|
|
32380
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex-1", "data-id": `dashboard_section_metric_skeleton_${id}_1`, children: /* @__PURE__ */ jsxRuntimeExports.jsx(MetricCardSkeleton, {}) }),
|
|
32381
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex-1", "data-id": `dashboard_section_metric_skeleton_${id}_2`, children: /* @__PURE__ */ jsxRuntimeExports.jsx(MetricCardSkeleton, {}) }),
|
|
32382
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex-1", "data-id": `dashboard_section_metric_skeleton_${id}_3`, children: /* @__PURE__ */ jsxRuntimeExports.jsx(MetricCardSkeleton, {}) })
|
|
32383
|
+
] }) : getUpdatedMetrics().map((metric, index) => /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex-1", "data-id": `dashboard_section_metric_${id}_${index}`, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
32358
32384
|
MetricCard,
|
|
32359
32385
|
{
|
|
32360
32386
|
data: metric,
|
|
@@ -32362,8 +32388,8 @@ const DashboardSection = ({
|
|
|
32362
32388
|
isFirst: index === 0
|
|
32363
32389
|
}
|
|
32364
32390
|
) }, `${id}-metric-${index}`)) }),
|
|
32365
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center justify-between", children: [
|
|
32366
|
-
/* @__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 }) }),
|
|
32391
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center justify-between", "data-id": `dashboard_section_subtitle_${id}`, children: [
|
|
32392
|
+
/* @__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 }) }),
|
|
32367
32393
|
enhancedControls && /* @__PURE__ */ jsxRuntimeExports.jsx(SectionControls, { config: enhancedControls })
|
|
32368
32394
|
] }),
|
|
32369
32395
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
@@ -34752,13 +34778,13 @@ const Dashboard = ({
|
|
|
34752
34778
|
onExport == null ? void 0 : onExport();
|
|
34753
34779
|
};
|
|
34754
34780
|
const isAnyChartLoading = Object.values(sectionChartLoading).some((loading) => loading);
|
|
34755
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: cn("w-full h-full flex flex-col overflow-hidden", className), children: [
|
|
34756
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex flex-col gap-2 w-full p-[24px] pb-[12px]", children: [
|
|
34757
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("h1", { className: "text-lg font-bold text-gray-900 w-full", children: title }),
|
|
34758
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-2 w-full", children: [
|
|
34759
|
-
subtitle && /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-gray-500 text-xs w-full", children: subtitle }),
|
|
34760
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-2 justify-end flex-shrink-0", children: [
|
|
34761
|
-
(isInitialLoading || isAnyChartLoading) && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-2 text-sm medium text-gray-500", children: [
|
|
34781
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: cn("w-full h-full flex flex-col overflow-hidden", className), "data-id": "dashboard_root", children: [
|
|
34782
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex flex-col gap-2 w-full p-[24px] pb-[12px]", "data-id": "dashboard_header", children: [
|
|
34783
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("h1", { className: "text-lg font-bold text-gray-900 w-full", "data-id": "dashboard_title", children: title }),
|
|
34784
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-2 w-full", "data-id": "dashboard_header_content", children: [
|
|
34785
|
+
subtitle && /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-gray-500 text-xs w-full", "data-id": "dashboard_subtitle", children: subtitle }),
|
|
34786
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-2 justify-end flex-shrink-0", "data-id": "dashboard_global_controls", children: [
|
|
34787
|
+
(isInitialLoading || isAnyChartLoading) && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-2 text-sm medium text-gray-500", "data-id": "dashboard_loading_indicator", children: [
|
|
34762
34788
|
/* @__PURE__ */ jsxRuntimeExports.jsx(RefreshCw, { className: "h-[16px] w-[16px] animate-spin" }),
|
|
34763
34789
|
"Loading..."
|
|
34764
34790
|
] }),
|
|
@@ -34837,6 +34863,7 @@ const Dashboard = ({
|
|
|
34837
34863
|
gridTemplateColumns: layout.responsive ? void 0 : `repeat(${layout.columns}, minmax(0, 1fr))`,
|
|
34838
34864
|
gap: layout.gap ? `${layout.gap}px` : void 0
|
|
34839
34865
|
},
|
|
34866
|
+
"data-id": "dashboard_sections_grid",
|
|
34840
34867
|
children: dynamicSections.map((section) => {
|
|
34841
34868
|
var _a2, _b, _c, _d;
|
|
34842
34869
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
@@ -35938,15 +35965,16 @@ const DataViewer = ({
|
|
|
35938
35965
|
setIsModalOpen(false);
|
|
35939
35966
|
}, []);
|
|
35940
35967
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
35941
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: `${darkMode ? "bg-gray-800 border-gray-700" : "bg-white border-gray-200"} border rounded-md overflow-hidden ${className}`, children: [
|
|
35942
|
-
showHeader && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "bg-gray-50 border-b border-gray-200 px-4 py-2 flex items-center justify-between", children: [
|
|
35943
|
-
isValidJson && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
35968
|
+
/* @__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: [
|
|
35969
|
+
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: [
|
|
35970
|
+
isValidJson && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-2", "data-id": "data_viewer_header_view_toggles", children: [
|
|
35944
35971
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
35945
35972
|
"button",
|
|
35946
35973
|
{
|
|
35947
35974
|
onClick: () => handleViewModeChange("plain"),
|
|
35948
35975
|
className: `p-1 hover:bg-gray-200 rounded transition-colors ${currentViewMode === "plain" ? "bg-gray-200" : ""}`,
|
|
35949
35976
|
title: "Plain JSON view",
|
|
35977
|
+
"data-id": "data_viewer_header_btn_plain",
|
|
35950
35978
|
children: /* @__PURE__ */ jsxRuntimeExports.jsx(AlignLeft, { className: "w-4 h-4 text-gray-400" })
|
|
35951
35979
|
}
|
|
35952
35980
|
),
|
|
@@ -35956,18 +35984,20 @@ const DataViewer = ({
|
|
|
35956
35984
|
onClick: () => handleViewModeChange("interactive"),
|
|
35957
35985
|
className: `p-1 hover:bg-gray-200 rounded transition-colors ${currentViewMode === "interactive" ? "bg-gray-200" : ""}`,
|
|
35958
35986
|
title: "Interactive JSON view (fold/unfold)",
|
|
35987
|
+
"data-id": "data_viewer_header_btn_interactive",
|
|
35959
35988
|
children: /* @__PURE__ */ jsxRuntimeExports.jsx(List, { className: "w-4 h-4 text-gray-400" })
|
|
35960
35989
|
}
|
|
35961
35990
|
)
|
|
35962
35991
|
] }),
|
|
35963
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex-1" }),
|
|
35964
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
35992
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex-1", "data-id": "data_viewer_header_spacer" }),
|
|
35993
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-2", "data-id": "data_viewer_header_actions", children: [
|
|
35965
35994
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
35966
35995
|
"button",
|
|
35967
35996
|
{
|
|
35968
35997
|
onClick: handleExpand,
|
|
35969
35998
|
className: "p-1 hover:bg-gray-200 rounded transition-colors",
|
|
35970
35999
|
title: "Expand to full screen",
|
|
36000
|
+
"data-id": "data_viewer_header_btn_expand",
|
|
35971
36001
|
children: /* @__PURE__ */ jsxRuntimeExports.jsx(Maximize2, { className: "w-4 h-4 text-gray-400" })
|
|
35972
36002
|
}
|
|
35973
36003
|
),
|
|
@@ -35987,6 +36017,7 @@ const DataViewer = ({
|
|
|
35987
36017
|
{
|
|
35988
36018
|
className: `${padding ? padding : "p-3"} overflow-auto ${darkMode ? "bg-gray-800" : "bg-white"}`,
|
|
35989
36019
|
style: { maxHeight },
|
|
36020
|
+
"data-id": "data_viewer_content",
|
|
35990
36021
|
children: [
|
|
35991
36022
|
isValidJson ? currentViewMode === "interactive" ? /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
35992
36023
|
JsonViewer,
|
|
@@ -35998,7 +36029,7 @@ const DataViewer = ({
|
|
|
35998
36029
|
darkMode
|
|
35999
36030
|
}
|
|
36000
36031
|
) : /* @__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 }),
|
|
36001
|
-
!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" })
|
|
36032
|
+
!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" })
|
|
36002
36033
|
]
|
|
36003
36034
|
}
|
|
36004
36035
|
)
|
|
@@ -36888,14 +36919,15 @@ function DebugCard({
|
|
|
36888
36919
|
};
|
|
36889
36920
|
return (
|
|
36890
36921
|
// bg-white w-full border-t border-gray-200
|
|
36891
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "bg-white w-full", children: [
|
|
36922
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "bg-white w-full", "data-id": `debug_card_${node.id}`, children: [
|
|
36892
36923
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
36893
36924
|
"div",
|
|
36894
36925
|
{
|
|
36895
36926
|
className: `flex items-center pl-[8px] pr-[8px] relative transition-colors cursor-pointer w-full
|
|
36896
36927
|
${isSelected ? "" : ""}`,
|
|
36897
36928
|
onClick: handleNodeClick,
|
|
36898
|
-
|
|
36929
|
+
"data-id": `debug_card_header_${node.id}`,
|
|
36930
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-[10px] w-full", "data-id": `debug_card_header_content_${node.id}`, children: [
|
|
36899
36931
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
36900
36932
|
"div",
|
|
36901
36933
|
{
|
|
@@ -36909,6 +36941,7 @@ function DebugCard({
|
|
|
36909
36941
|
}
|
|
36910
36942
|
},
|
|
36911
36943
|
title: hasChildren ? isExpanded ? "Collapse" : "Expand" : "Show details",
|
|
36944
|
+
"data-id": `debug_card_toggle_${node.id}`,
|
|
36912
36945
|
children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
36913
36946
|
ChevronRight,
|
|
36914
36947
|
{
|
|
@@ -36917,17 +36950,18 @@ function DebugCard({
|
|
|
36917
36950
|
)
|
|
36918
36951
|
}
|
|
36919
36952
|
),
|
|
36920
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-[8px] w-full py-[8px] border-b border-gray-200", children: [
|
|
36921
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex-shrink-0 rounded-[8px] bg-[#B2DDFF]", children: getNodeIcon() }),
|
|
36953
|
+
/* @__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: [
|
|
36954
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex-shrink-0 rounded-[8px] bg-[#B2DDFF]", "data-id": `debug_card_node_icon_${node.id}`, children: getNodeIcon() }),
|
|
36922
36955
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
36923
36956
|
"span",
|
|
36924
36957
|
{
|
|
36925
36958
|
className: "font-semibold text-gray-900 text-xs truncate w-full",
|
|
36926
36959
|
title: node.type === "llm" ? node.name : void 0,
|
|
36960
|
+
"data-id": `debug_card_node_name_${node.id}`,
|
|
36927
36961
|
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
|
|
36928
36962
|
}
|
|
36929
36963
|
),
|
|
36930
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-[12px] text-[10px] text-gray-500", children: [
|
|
36964
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-[12px] text-[10px] text-gray-500", "data-id": `debug_card_node_metadata_${node.id}`, children: [
|
|
36931
36965
|
node.type === "Agent" && (() => {
|
|
36932
36966
|
var _a;
|
|
36933
36967
|
const llmChild = (_a = node.children) == null ? void 0 : _a.find((child) => child.type === "llm");
|
|
@@ -36937,6 +36971,7 @@ function DebugCard({
|
|
|
36937
36971
|
{
|
|
36938
36972
|
className: "text-[10px] text-gray-500 truncate max-w-[100px]",
|
|
36939
36973
|
title: llmChild.name,
|
|
36974
|
+
"data-id": `debug_card_node_model_name_${node.id}`,
|
|
36940
36975
|
children: llmChild.name
|
|
36941
36976
|
}
|
|
36942
36977
|
);
|
|
@@ -36969,6 +37004,7 @@ function DebugCard({
|
|
|
36969
37004
|
title: `Input: ${((_a = llmUsage.input_tokens) == null ? void 0 : _a.toLocaleString()) || 0} tokens
|
|
36970
37005
|
Output: ${((_b = llmUsage.output_tokens) == null ? void 0 : _b.toLocaleString()) || 0} tokens
|
|
36971
37006
|
Total: ${((_c = llmUsage.total_tokens) == null ? void 0 : _c.toLocaleString()) || 0} tokens`,
|
|
37007
|
+
"data-id": `debug_card_node_tokens_${node.id}`,
|
|
36972
37008
|
children: [
|
|
36973
37009
|
llmUsage.total_tokens.toLocaleString(),
|
|
36974
37010
|
" Tokens"
|
|
@@ -36978,33 +37014,34 @@ Total: ${((_c = llmUsage.total_tokens) == null ? void 0 : _c.toLocaleString()) |
|
|
|
36978
37014
|
}
|
|
36979
37015
|
return null;
|
|
36980
37016
|
})(),
|
|
36981
|
-
node.duration && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-[4px]", children: [
|
|
37017
|
+
node.duration && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-[4px]", "data-id": `debug_card_node_duration_${node.id}`, children: [
|
|
36982
37018
|
/* @__PURE__ */ jsxRuntimeExports.jsx(Clock, { className: "w-[12px] h-[12px]" }),
|
|
36983
37019
|
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-[10px] text-gray-500 whitespace-nowrap", children: formatDuration(node.duration) })
|
|
36984
37020
|
] })
|
|
36985
37021
|
] }),
|
|
36986
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex-shrink-0", children: getStatusIcon() })
|
|
37022
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex-shrink-0", "data-id": `debug_card_node_status_${node.id}`, children: getStatusIcon() })
|
|
36987
37023
|
] })
|
|
36988
37024
|
] })
|
|
36989
37025
|
}
|
|
36990
37026
|
),
|
|
36991
|
-
isSelected && availableTabs.length > 0 && showDetailView && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "w-full pl-[32px] relative", children: [
|
|
36992
|
-
/* @__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]" }),
|
|
36993
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "px-[4px] py-[8px] w-full", children: [
|
|
36994
|
-
/* @__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(
|
|
37027
|
+
isSelected && availableTabs.length > 0 && showDetailView && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "w-full pl-[32px] relative", "data-id": `debug_card_detail_panel_${node.id}`, children: [
|
|
37028
|
+
/* @__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}` }),
|
|
37029
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "px-[4px] py-[8px] w-full", "data-id": `debug_card_detail_panel_content_${node.id}`, children: [
|
|
37030
|
+
/* @__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(
|
|
36995
37031
|
"button",
|
|
36996
37032
|
{
|
|
36997
37033
|
onClick: () => handleTabClick(tab),
|
|
36998
37034
|
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"}`,
|
|
37035
|
+
"data-id": `debug_card_detail_panel_tab_${node.id}_${tab}`,
|
|
36999
37036
|
children: tab.charAt(0).toUpperCase() + tab.slice(1)
|
|
37000
37037
|
},
|
|
37001
37038
|
tab
|
|
37002
37039
|
)) }),
|
|
37003
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "px-[4px]", children: renderTabContent() })
|
|
37040
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "px-[4px]", "data-id": `debug_card_detail_panel_tab_content_${node.id}`, children: renderTabContent() })
|
|
37004
37041
|
] })
|
|
37005
37042
|
] }),
|
|
37006
|
-
isExpanded && hasChildren && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "w-full pl-[32px] relative", children: [
|
|
37007
|
-
/* @__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]" }),
|
|
37043
|
+
isExpanded && hasChildren && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "w-full pl-[32px] relative", "data-id": `debug_card_children_${node.id}`, children: [
|
|
37044
|
+
/* @__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}` }),
|
|
37008
37045
|
node.children.map((child, index) => /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
37009
37046
|
DebugCard,
|
|
37010
37047
|
{
|
|
@@ -37308,14 +37345,14 @@ const DebugPanel = forwardRef(({
|
|
|
37308
37345
|
return `${tokens} tokens`;
|
|
37309
37346
|
};
|
|
37310
37347
|
if (!sessionTree.runs.length) {
|
|
37311
|
-
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" }) }) });
|
|
37312
|
-
}
|
|
37313
|
-
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: [
|
|
37314
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center w-full gap-[16px]", children: [
|
|
37315
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-xs text-gray-400 whitespace-nowrap flex-shrink-0", children: "Session initiated" }),
|
|
37316
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex-1 h-[1px] border-t border-dashed border-gray-300 w-full" }),
|
|
37317
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-2 text-xs text-gray-400 flex-shrink-0", children: [
|
|
37318
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { children: sessionTree.sessionId }),
|
|
37348
|
+
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" }) }) });
|
|
37349
|
+
}
|
|
37350
|
+
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: [
|
|
37351
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center w-full gap-[16px]", "data-id": "debug_panel_session_header", children: [
|
|
37352
|
+
/* @__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" }),
|
|
37353
|
+
/* @__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" }),
|
|
37354
|
+
/* @__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: [
|
|
37355
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { "data-id": "debug_panel_session_id", children: sessionTree.sessionId }),
|
|
37319
37356
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
37320
37357
|
CopyButton,
|
|
37321
37358
|
{
|
|
@@ -37341,20 +37378,22 @@ const DebugPanel = forwardRef(({
|
|
|
37341
37378
|
}
|
|
37342
37379
|
}
|
|
37343
37380
|
},
|
|
37381
|
+
"data-id": "debug_panel_session_external_link_btn",
|
|
37344
37382
|
children: /* @__PURE__ */ jsxRuntimeExports.jsx(ExternalLink, { className: "w-[12px] h-[12px]" })
|
|
37345
37383
|
}
|
|
37346
37384
|
)
|
|
37347
37385
|
] })
|
|
37348
37386
|
] }),
|
|
37349
|
-
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: [
|
|
37350
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
37351
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-xs font-medium text-gray-700", children: "Expansion:" }),
|
|
37387
|
+
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: [
|
|
37388
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-2", "data-id": "debug_panel_expansion_controls_buttons", children: [
|
|
37389
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-xs font-medium text-gray-700", "data-id": "debug_panel_expansion_controls_label", children: "Expansion:" }),
|
|
37352
37390
|
/* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
37353
37391
|
"button",
|
|
37354
37392
|
{
|
|
37355
37393
|
onClick: handleExpandAll,
|
|
37356
37394
|
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",
|
|
37357
37395
|
title: "Expand all nodes",
|
|
37396
|
+
"data-id": "debug_panel_expansion_controls_btn_expand_all",
|
|
37358
37397
|
children: [
|
|
37359
37398
|
/* @__PURE__ */ jsxRuntimeExports.jsx(Plus, { className: "w-3 h-3" }),
|
|
37360
37399
|
"Expand All"
|
|
@@ -37367,6 +37406,7 @@ const DebugPanel = forwardRef(({
|
|
|
37367
37406
|
onClick: handleExpandLast,
|
|
37368
37407
|
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",
|
|
37369
37408
|
title: "Expand only the last execution path",
|
|
37409
|
+
"data-id": "debug_panel_expansion_controls_btn_expand_last",
|
|
37370
37410
|
children: [
|
|
37371
37411
|
/* @__PURE__ */ jsxRuntimeExports.jsx(Expand, { className: "w-3 h-3" }),
|
|
37372
37412
|
"Expand Last"
|
|
@@ -37379,6 +37419,7 @@ const DebugPanel = forwardRef(({
|
|
|
37379
37419
|
onClick: handleCollapseAll,
|
|
37380
37420
|
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",
|
|
37381
37421
|
title: "Collapse all nodes",
|
|
37422
|
+
"data-id": "debug_panel_expansion_controls_btn_collapse_all",
|
|
37382
37423
|
children: [
|
|
37383
37424
|
/* @__PURE__ */ jsxRuntimeExports.jsx(Minus, { className: "w-3 h-3" }),
|
|
37384
37425
|
"Collapse All"
|
|
@@ -37386,8 +37427,8 @@ const DebugPanel = forwardRef(({
|
|
|
37386
37427
|
}
|
|
37387
37428
|
)
|
|
37388
37429
|
] }),
|
|
37389
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
37390
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-xs font-medium text-gray-700", children: "Live Mode:" }),
|
|
37430
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-2", "data-id": "debug_panel_expansion_controls_live_mode", children: [
|
|
37431
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-xs font-medium text-gray-700", "data-id": "debug_panel_expansion_controls_live_mode_label", children: "Live Mode:" }),
|
|
37391
37432
|
/* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
37392
37433
|
"select",
|
|
37393
37434
|
{
|
|
@@ -37395,6 +37436,7 @@ const DebugPanel = forwardRef(({
|
|
|
37395
37436
|
onChange: (e3) => setLiveExpansionMode(e3.target.value),
|
|
37396
37437
|
className: "text-xs px-2 py-1 bg-white border border-gray-300 rounded focus:outline-none focus:ring-1 focus:ring-blue-500",
|
|
37397
37438
|
title: "Control auto-expansion behavior during live updates",
|
|
37439
|
+
"data-id": "debug_panel_expansion_controls_live_mode_select",
|
|
37398
37440
|
children: [
|
|
37399
37441
|
/* @__PURE__ */ jsxRuntimeExports.jsx("option", { value: "all", children: "Expand All" }),
|
|
37400
37442
|
/* @__PURE__ */ jsxRuntimeExports.jsx("option", { value: "last", children: "Expand Last" }),
|
|
@@ -37404,17 +37446,18 @@ const DebugPanel = forwardRef(({
|
|
|
37404
37446
|
)
|
|
37405
37447
|
] })
|
|
37406
37448
|
] }),
|
|
37407
|
-
sessionTree.runs.map((run) => /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex flex-col gap-1", children: [
|
|
37408
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "rounded-[8px] border border-gray-300 bg-white overflow-hidden", children: [
|
|
37409
|
-
/* @__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: [
|
|
37410
|
-
/* @__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" }) }),
|
|
37449
|
+
sessionTree.runs.map((run) => /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex flex-col gap-1", "data-id": `debug_panel_run_${run.runId}`, children: [
|
|
37450
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "rounded-[8px] border border-gray-300 bg-white overflow-hidden", "data-id": `debug_panel_run_container_${run.runId}`, children: [
|
|
37451
|
+
/* @__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: [
|
|
37452
|
+
/* @__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" }) }),
|
|
37411
37453
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
37412
37454
|
"div",
|
|
37413
37455
|
{
|
|
37414
37456
|
className: "flex-1 cursor-pointer select-none truncate",
|
|
37415
37457
|
onClick: () => handleRunToggle(run.runId),
|
|
37416
37458
|
title: run.userInput,
|
|
37417
|
-
|
|
37459
|
+
"data-id": `debug_panel_run_title_${run.runId}`,
|
|
37460
|
+
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}` })
|
|
37418
37461
|
}
|
|
37419
37462
|
),
|
|
37420
37463
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
@@ -37435,6 +37478,7 @@ const DebugPanel = forwardRef(({
|
|
|
37435
37478
|
const anyDetailsVisible = Array.from(runNodeIds).some((nodeId) => selectedNodeIds.has(nodeId));
|
|
37436
37479
|
return anyDetailsVisible ? "Hide all node details in this run" : "Show all node details in this run";
|
|
37437
37480
|
})(),
|
|
37481
|
+
"data-id": `debug_panel_run_details_toggle_${run.runId}`,
|
|
37438
37482
|
children: (() => {
|
|
37439
37483
|
const runNodeIds = /* @__PURE__ */ new Set();
|
|
37440
37484
|
const collectNodeIds = (node) => {
|
|
@@ -37462,13 +37506,14 @@ const DebugPanel = forwardRef(({
|
|
|
37462
37506
|
},
|
|
37463
37507
|
className: "p-1 hover:bg-gray-200 rounded transition-colors flex-shrink-0",
|
|
37464
37508
|
title: expandedRuns.has(run.runId) ? "Collapse run" : "Expand run",
|
|
37509
|
+
"data-id": `debug_panel_run_toggle_${run.runId}`,
|
|
37465
37510
|
children: /* @__PURE__ */ jsxRuntimeExports.jsx(ChevronDown, { className: `w-[16px] h-[16px] text-gray-400 transition-transform ${expandedRuns.has(run.runId) ? "rotate-180" : ""}` })
|
|
37466
37511
|
}
|
|
37467
37512
|
)
|
|
37468
37513
|
] }) }),
|
|
37469
|
-
expandedRuns.has(run.runId) && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "bg-white w-full flex flex-col", children: run.rootNodes && run.rootNodes.map((rootNode, index) => {
|
|
37514
|
+
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) => {
|
|
37470
37515
|
var _a;
|
|
37471
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "w-full", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
37516
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "w-full", "data-id": `debug_panel_run_root_node_${run.runId}_${index}`, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
37472
37517
|
DebugCard,
|
|
37473
37518
|
{
|
|
37474
37519
|
node: updateTreeExpansion(rootNode),
|
|
@@ -37554,22 +37599,22 @@ const DebugPanel = forwardRef(({
|
|
|
37554
37599
|
};
|
|
37555
37600
|
const outputFromNodes = run.rootNodes ? findFinalOutput(run.rootNodes) : void 0;
|
|
37556
37601
|
const finalOutput = outputFromNodes || run.finalOutput;
|
|
37557
|
-
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: [
|
|
37558
|
-
/* @__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" }) }),
|
|
37559
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "flex-1 text-xs text-gray-900 truncate", title: convertToString(finalOutput), children: convertToString(finalOutput) }),
|
|
37560
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-[8px] flex-shrink-0", children: [
|
|
37561
|
-
run.duration && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-[4px]", children: [
|
|
37602
|
+
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: [
|
|
37603
|
+
/* @__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" }) }),
|
|
37604
|
+
/* @__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) }),
|
|
37605
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-[8px] flex-shrink-0", "data-id": `debug_panel_run_final_output_metadata_${run.runId}`, children: [
|
|
37606
|
+
run.duration && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-[4px]", "data-id": `debug_panel_run_final_output_duration_${run.runId}`, children: [
|
|
37562
37607
|
/* @__PURE__ */ jsxRuntimeExports.jsx(Clock, { className: "w-[12px] h-[12px] text-gray-400" }),
|
|
37563
37608
|
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-[10px] text-gray-500 whitespace-nowrap", children: formatDuration(run.duration) })
|
|
37564
37609
|
] }),
|
|
37565
|
-
run.totalTokens && /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-[10px] text-gray-500 whitespace-nowrap", children: formatTokens(run.totalTokens) })
|
|
37610
|
+
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) })
|
|
37566
37611
|
] })
|
|
37567
37612
|
] }) : null;
|
|
37568
37613
|
})()
|
|
37569
37614
|
] }),
|
|
37570
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center justify-end gap-2 py-1", children: [
|
|
37571
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-xs text-gray-400", children: run.runId }),
|
|
37572
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
37615
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center justify-end gap-2 py-1", "data-id": `debug_panel_run_footer_${run.runId}`, children: [
|
|
37616
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-xs text-gray-400", "data-id": `debug_panel_run_footer_id_${run.runId}`, children: run.runId }),
|
|
37617
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-2", "data-id": `debug_panel_run_footer_actions_${run.runId}`, children: [
|
|
37573
37618
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
37574
37619
|
CopyButton,
|
|
37575
37620
|
{
|
|
@@ -37595,6 +37640,7 @@ const DebugPanel = forwardRef(({
|
|
|
37595
37640
|
}
|
|
37596
37641
|
}
|
|
37597
37642
|
},
|
|
37643
|
+
"data-id": `debug_panel_run_footer_external_link_${run.runId}`,
|
|
37598
37644
|
children: /* @__PURE__ */ jsxRuntimeExports.jsx(ExternalLink, { className: "w-3 h-3 text-gray-400" })
|
|
37599
37645
|
}
|
|
37600
37646
|
)
|
|
@@ -37605,7 +37651,7 @@ const DebugPanel = forwardRef(({
|
|
|
37605
37651
|
});
|
|
37606
37652
|
DebugPanel.displayName = "DebugPanel";
|
|
37607
37653
|
function Header() {
|
|
37608
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "bg-white h-[56px] relative shrink-0 w-full", children: [
|
|
37654
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "bg-white h-[56px] relative shrink-0 w-full", "data-id": "prompt-editor_header", children: [
|
|
37609
37655
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
37610
37656
|
"div",
|
|
37611
37657
|
{
|
|
@@ -37613,13 +37659,14 @@ function Header() {
|
|
|
37613
37659
|
className: "absolute border-[#d0d5dd] border-[0px_0px_1px] border-solid inset-0 pointer-events-none"
|
|
37614
37660
|
}
|
|
37615
37661
|
),
|
|
37616
|
-
/* @__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: [
|
|
37662
|
+
/* @__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: [
|
|
37617
37663
|
/* @__PURE__ */ jsxRuntimeExports.jsx("h1", { className: " font-medium text-[16px] leading-[24px] text-[#101828]", children: "Orchestration Prompt" }),
|
|
37618
37664
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
37619
37665
|
"button",
|
|
37620
37666
|
{
|
|
37621
37667
|
className: "relative shrink-0 size-[20px] hover:opacity-70 transition-opacity cursor-pointer",
|
|
37622
37668
|
"aria-label": "Close",
|
|
37669
|
+
"data-id": "prompt-editor_header_close_btn",
|
|
37623
37670
|
children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
37624
37671
|
"svg",
|
|
37625
37672
|
{
|
|
@@ -37833,8 +37880,9 @@ function RefineDropdown({
|
|
|
37833
37880
|
},
|
|
37834
37881
|
onClick: (e3) => e3.stopPropagation(),
|
|
37835
37882
|
onMouseDown: (e3) => e3.stopPropagation(),
|
|
37883
|
+
"data-id": "prompt-editor_refine_dropdown",
|
|
37836
37884
|
children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "box-border content-stretch flex flex-col gap-[8px] items-start p-[12px] relative w-full", children: [
|
|
37837
|
-
/* @__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(
|
|
37885
|
+
/* @__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(
|
|
37838
37886
|
"button",
|
|
37839
37887
|
{
|
|
37840
37888
|
onClick: (e3) => {
|
|
@@ -37848,6 +37896,7 @@ function RefineDropdown({
|
|
|
37848
37896
|
},
|
|
37849
37897
|
className: "content-stretch flex items-center relative shrink-0 w-full hover:bg-gray-50 transition-colors rounded-[4px] cursor-pointer",
|
|
37850
37898
|
style: { pointerEvents: "auto", zIndex: 1e3 },
|
|
37899
|
+
"data-id": `prompt-editor_refine_dropdown_btn_${item.id}`,
|
|
37851
37900
|
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: [
|
|
37852
37901
|
/* @__PURE__ */ jsxRuntimeExports.jsx(item.icon, {}),
|
|
37853
37902
|
/* @__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 })
|
|
@@ -37856,7 +37905,7 @@ function RefineDropdown({
|
|
|
37856
37905
|
item.id
|
|
37857
37906
|
)) }) }),
|
|
37858
37907
|
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "w-full h-px bg-[#eaecf0] shrink-0" }),
|
|
37859
|
-
/* @__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: [
|
|
37908
|
+
/* @__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: [
|
|
37860
37909
|
/* @__PURE__ */ jsxRuntimeExports.jsx(GenerateIcon, {}),
|
|
37861
37910
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
37862
37911
|
"input",
|
|
@@ -37867,7 +37916,8 @@ function RefineDropdown({
|
|
|
37867
37916
|
onChange: (e3) => setCustomInput(e3.target.value),
|
|
37868
37917
|
onKeyDown: handleKeyDown,
|
|
37869
37918
|
placeholder: "Modify with a prompt",
|
|
37870
|
-
className: "basis-0 grow leading-[20px] not-italic text-[14px] text-[#101828] placeholder:text-[#98a2b3] outline-none bg-transparent border-none"
|
|
37919
|
+
className: "basis-0 grow leading-[20px] not-italic text-[14px] text-[#101828] placeholder:text-[#98a2b3] outline-none bg-transparent border-none",
|
|
37920
|
+
"data-id": "prompt-editor_refine_dropdown_input"
|
|
37871
37921
|
}
|
|
37872
37922
|
),
|
|
37873
37923
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
@@ -37876,6 +37926,7 @@ function RefineDropdown({
|
|
|
37876
37926
|
onClick: handleSubmit,
|
|
37877
37927
|
disabled: !customInput.trim(),
|
|
37878
37928
|
className: "shrink-0",
|
|
37929
|
+
"data-id": "prompt-editor_refine_dropdown_submit_btn",
|
|
37879
37930
|
children: /* @__PURE__ */ jsxRuntimeExports.jsx(ArrowCircleUpIcon, { isActive: !!customInput.trim() })
|
|
37880
37931
|
}
|
|
37881
37932
|
)
|
|
@@ -37908,7 +37959,7 @@ function SectionHeader({
|
|
|
37908
37959
|
onOpenRefineModal("whole", sectionContent, instruction);
|
|
37909
37960
|
setIsRefineDropdownOpen(false);
|
|
37910
37961
|
};
|
|
37911
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "relative shrink-0 w-full", children: [
|
|
37962
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "relative shrink-0 w-full", "data-id": "prompt-editor_section_header", children: [
|
|
37912
37963
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
37913
37964
|
"div",
|
|
37914
37965
|
{
|
|
@@ -37916,8 +37967,8 @@ function SectionHeader({
|
|
|
37916
37967
|
className: "absolute border-[#eaecf0] border-[0px_0px_1px] border-solid inset-0 pointer-events-none"
|
|
37917
37968
|
}
|
|
37918
37969
|
),
|
|
37919
|
-
/* @__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: [
|
|
37920
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "content-stretch flex gap-[4px] items-center relative shrink-0", children: [
|
|
37970
|
+
/* @__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: [
|
|
37971
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "content-stretch flex gap-[4px] items-center relative shrink-0", "data-id": "prompt-editor_section_header_tabs", children: [
|
|
37921
37972
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
37922
37973
|
"button",
|
|
37923
37974
|
{
|
|
@@ -37928,6 +37979,7 @@ function SectionHeader({
|
|
|
37928
37979
|
},
|
|
37929
37980
|
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"}`,
|
|
37930
37981
|
style: { pointerEvents: "auto", zIndex: 10 },
|
|
37982
|
+
"data-id": "prompt-editor_section_header_tab_editor",
|
|
37931
37983
|
children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
37932
37984
|
"p",
|
|
37933
37985
|
{
|
|
@@ -37947,6 +37999,7 @@ function SectionHeader({
|
|
|
37947
37999
|
},
|
|
37948
38000
|
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"}`,
|
|
37949
38001
|
style: { pointerEvents: "auto", zIndex: 10 },
|
|
38002
|
+
"data-id": "prompt-editor_section_header_tab_preview",
|
|
37950
38003
|
children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
37951
38004
|
"p",
|
|
37952
38005
|
{
|
|
@@ -37957,7 +38010,7 @@ function SectionHeader({
|
|
|
37957
38010
|
}
|
|
37958
38011
|
)
|
|
37959
38012
|
] }),
|
|
37960
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "shrink-0", children: activeFormat === "editor" ? /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
38013
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "shrink-0", "data-id": "prompt-editor_section_header_refine_btn_container", children: activeFormat === "editor" ? /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
37961
38014
|
"button",
|
|
37962
38015
|
{
|
|
37963
38016
|
ref: refineButtonRef,
|
|
@@ -37972,6 +38025,7 @@ function SectionHeader({
|
|
|
37972
38025
|
e3.stopPropagation();
|
|
37973
38026
|
},
|
|
37974
38027
|
style: { pointerEvents: "auto", zIndex: 10 },
|
|
38028
|
+
"data-id": "prompt-editor_section_header_btn_refine_ai",
|
|
37975
38029
|
children: [
|
|
37976
38030
|
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "relative size-[16px] shrink-0", children: /* @__PURE__ */ jsxRuntimeExports.jsx(PencilAi, {}) }),
|
|
37977
38031
|
/* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: " leading-[16px] not-italic relative shrink-0 text-[12px] text-nowrap whitespace-pre text-[#344054]", children: "Refine with AI" })
|
|
@@ -37993,11 +38047,12 @@ function SectionHeader({
|
|
|
37993
38047
|
}
|
|
37994
38048
|
function AddToolbar({ onAdd, isNested = false, isRootLevel = false }) {
|
|
37995
38049
|
const buttonText = isRootLevel ? "Add Section" : "Add Subsection";
|
|
37996
|
-
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(
|
|
38050
|
+
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(
|
|
37997
38051
|
"button",
|
|
37998
38052
|
{
|
|
37999
38053
|
onClick: () => onAdd("subsection"),
|
|
38000
38054
|
className: "bg-white relative rounded-[4px] shrink-0 hover:bg-gray-50 transition-colors",
|
|
38055
|
+
"data-id": `prompt-editor_add_toolbar_btn_${isRootLevel ? "section" : "subsection"}`,
|
|
38001
38056
|
children: [
|
|
38002
38057
|
/* @__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: [
|
|
38003
38058
|
/* @__PURE__ */ jsxRuntimeExports.jsx(AlignLeft, { className: "size-[12px] text-[#344054]", strokeWidth: 2 }),
|
|
@@ -38203,8 +38258,8 @@ function InsertMenu({
|
|
|
38203
38258
|
];
|
|
38204
38259
|
const hasDynamicData = suggestions && suggestions.length > 0;
|
|
38205
38260
|
const hasAnyData = hasDynamicData || systemVariables.length > 0;
|
|
38206
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "py-[4px]", children: [
|
|
38207
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "px-[12px] py-[8px]", children: /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: " text-[12px] text-[#667085]", children: "Insert from:" }) }),
|
|
38261
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "py-[4px]", "data-id": "prompt-editor_insert_menu_categories", children: [
|
|
38262
|
+
/* @__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:" }) }),
|
|
38208
38263
|
!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) => {
|
|
38209
38264
|
const categoryItems = getItemsByTypeDynamic(category.type);
|
|
38210
38265
|
const hasItems = categoryItems.length > 0;
|
|
@@ -38215,6 +38270,7 @@ function InsertMenu({
|
|
|
38215
38270
|
onClick: () => hasItems && handleCategoryClick(category.type),
|
|
38216
38271
|
disabled: !hasItems,
|
|
38217
38272
|
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]"}`,
|
|
38273
|
+
"data-id": `prompt-editor_insert_menu_category_${category.type}`,
|
|
38218
38274
|
children: [
|
|
38219
38275
|
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-[8px]", children: [
|
|
38220
38276
|
getCategoryIcon(category.type),
|
|
@@ -38230,12 +38286,13 @@ function InsertMenu({
|
|
|
38230
38286
|
};
|
|
38231
38287
|
const renderItems = () => {
|
|
38232
38288
|
const hasNoResults = filteredItems.length === 0;
|
|
38233
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "py-[4px]", children: [
|
|
38234
|
-
!searchQuery && selectedCategory && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "h-[41px] border-b border-[#eaecf0]", children: /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
38289
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "py-[4px]", "data-id": "prompt-editor_insert_menu_items", children: [
|
|
38290
|
+
!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(
|
|
38235
38291
|
"button",
|
|
38236
38292
|
{
|
|
38237
38293
|
onClick: handleBackToCategories,
|
|
38238
38294
|
className: "box-border flex items-center gap-[4px] h-full px-[12px] py-[13px] hover:bg-[#f9fafb] transition-colors w-full",
|
|
38295
|
+
"data-id": "prompt-editor_insert_menu_back_btn",
|
|
38239
38296
|
children: [
|
|
38240
38297
|
/* @__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(
|
|
38241
38298
|
"path",
|
|
@@ -38262,6 +38319,7 @@ function InsertMenu({
|
|
|
38262
38319
|
ref: (el) => itemRefs.current[index] = el,
|
|
38263
38320
|
onClick: () => onSelect(item),
|
|
38264
38321
|
className: `w-full flex items-center px-[12px] py-[8px] transition-colors group ${selectedIndex === index ? "bg-[#f2f4f7]" : "hover:bg-[#f9fafb]"}`,
|
|
38322
|
+
"data-id": `prompt-editor_insert_menu_item_${item.type}_${item.id}`,
|
|
38265
38323
|
children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-[8px]", children: [
|
|
38266
38324
|
getCategoryIcon(item.type),
|
|
38267
38325
|
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: " text-[14px] text-[#344054]", children: item.displayName })
|
|
@@ -38280,6 +38338,7 @@ function InsertMenu({
|
|
|
38280
38338
|
top: `${position.top}px`,
|
|
38281
38339
|
left: `${position.left}px`
|
|
38282
38340
|
},
|
|
38341
|
+
"data-id": "prompt-editor_insert_menu",
|
|
38283
38342
|
children: menuMode === "categories" ? renderCategories() : renderItems()
|
|
38284
38343
|
}
|
|
38285
38344
|
);
|
|
@@ -38549,7 +38608,7 @@ function EditableContent({
|
|
|
38549
38608
|
}
|
|
38550
38609
|
};
|
|
38551
38610
|
const shouldShowPlaceholder = showPlaceholder && (!content || content === "" || content === "<br>");
|
|
38552
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "relative", children: [
|
|
38611
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "relative", "data-id": "prompt-editor_editable_content", children: [
|
|
38553
38612
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
38554
38613
|
"div",
|
|
38555
38614
|
{
|
|
@@ -38568,7 +38627,8 @@ function EditableContent({
|
|
|
38568
38627
|
},
|
|
38569
38628
|
className: `outline-none cursor-text ${className} ${shouldShowPlaceholder ? "empty:before:content-[attr(data-placeholder)] empty:before:text-gray-400" : ""}`,
|
|
38570
38629
|
"data-placeholder": placeholder,
|
|
38571
|
-
suppressContentEditableWarning: true
|
|
38630
|
+
suppressContentEditableWarning: true,
|
|
38631
|
+
"data-id": "prompt-editor_editable_content_editor"
|
|
38572
38632
|
}
|
|
38573
38633
|
),
|
|
38574
38634
|
showVariableDropdown && /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
@@ -38850,6 +38910,11 @@ function findOriginalPosition(originalText, normalizedText, normalizedIndex) {
|
|
|
38850
38910
|
}
|
|
38851
38911
|
return originalPos;
|
|
38852
38912
|
}
|
|
38913
|
+
let idCounter = 0;
|
|
38914
|
+
function generateUniqueId(prefix2 = "content") {
|
|
38915
|
+
idCounter++;
|
|
38916
|
+
return `${prefix2}-${Date.now()}-${idCounter}-${Math.random().toString(36).substr(2, 9)}`;
|
|
38917
|
+
}
|
|
38853
38918
|
function parseMarkdownToBlocks(markdown, depth = 0) {
|
|
38854
38919
|
const blocks = [];
|
|
38855
38920
|
const lines = markdown.split("\n");
|
|
@@ -38883,7 +38948,7 @@ function parseMarkdownToBlocks(markdown, depth = 0) {
|
|
|
38883
38948
|
}
|
|
38884
38949
|
if (headingLevel !== null) {
|
|
38885
38950
|
const subsectionBlock = {
|
|
38886
|
-
id:
|
|
38951
|
+
id: generateUniqueId("subsection"),
|
|
38887
38952
|
type: "subsection",
|
|
38888
38953
|
content: markdownToHtml(subsectionTitle),
|
|
38889
38954
|
headingLevel,
|
|
@@ -38904,7 +38969,7 @@ function parseMarkdownToBlocks(markdown, depth = 0) {
|
|
|
38904
38969
|
}
|
|
38905
38970
|
if (!subsectionBlock.children || subsectionBlock.children.length === 0) {
|
|
38906
38971
|
subsectionBlock.children = [{
|
|
38907
|
-
id:
|
|
38972
|
+
id: generateUniqueId("child"),
|
|
38908
38973
|
type: "text",
|
|
38909
38974
|
content: ""
|
|
38910
38975
|
}];
|
|
@@ -38926,7 +38991,7 @@ function parseMarkdownToBlocks(markdown, depth = 0) {
|
|
|
38926
38991
|
}
|
|
38927
38992
|
const listHtml = "<ul>" + listItems.map((item) => `<li>${markdownToHtml(item)}</li>`).join("") + "</ul>";
|
|
38928
38993
|
blocks.push({
|
|
38929
|
-
id:
|
|
38994
|
+
id: generateUniqueId("list"),
|
|
38930
38995
|
type: "text",
|
|
38931
38996
|
content: listHtml,
|
|
38932
38997
|
listType: "bulleted"
|
|
@@ -38952,7 +39017,7 @@ function parseMarkdownToBlocks(markdown, depth = 0) {
|
|
|
38952
39017
|
}
|
|
38953
39018
|
const listHtml = "<ol>" + listItems.map((item) => `<li>${markdownToHtml(item)}</li>`).join("") + "</ol>";
|
|
38954
39019
|
blocks.push({
|
|
38955
|
-
id:
|
|
39020
|
+
id: generateUniqueId("list"),
|
|
38956
39021
|
type: "text",
|
|
38957
39022
|
content: listHtml,
|
|
38958
39023
|
listType: "numbered"
|
|
@@ -38971,7 +39036,7 @@ function parseMarkdownToBlocks(markdown, depth = 0) {
|
|
|
38971
39036
|
}
|
|
38972
39037
|
if (textLines.length > 0) {
|
|
38973
39038
|
blocks.push({
|
|
38974
|
-
id:
|
|
39039
|
+
id: generateUniqueId("text"),
|
|
38975
39040
|
type: "text",
|
|
38976
39041
|
content: markdownToHtml(textLines.join("\n"))
|
|
38977
39042
|
});
|
|
@@ -38979,7 +39044,7 @@ function parseMarkdownToBlocks(markdown, depth = 0) {
|
|
|
38979
39044
|
}
|
|
38980
39045
|
if (blocks.length === 0) {
|
|
38981
39046
|
blocks.push({
|
|
38982
|
-
id:
|
|
39047
|
+
id: generateUniqueId("text"),
|
|
38983
39048
|
type: "text",
|
|
38984
39049
|
content: ""
|
|
38985
39050
|
});
|
|
@@ -39213,6 +39278,7 @@ function FormattingToolbar({ onFormat, onOpenRefineModal }) {
|
|
|
39213
39278
|
left: `${position.left}px`,
|
|
39214
39279
|
transform: "translateX(-50%)"
|
|
39215
39280
|
},
|
|
39281
|
+
"data-id": "prompt-editor_formatting_toolbar",
|
|
39216
39282
|
children: [
|
|
39217
39283
|
buttons.map((btn) => /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
39218
39284
|
"button",
|
|
@@ -39224,6 +39290,7 @@ function FormattingToolbar({ onFormat, onOpenRefineModal }) {
|
|
|
39224
39290
|
className: "p-2 hover:bg-gray-100 rounded transition-colors",
|
|
39225
39291
|
title: btn.label,
|
|
39226
39292
|
onMouseDown: (e3) => e3.preventDefault(),
|
|
39293
|
+
"data-id": `prompt-editor_formatting_toolbar_btn_${btn.command}`,
|
|
39227
39294
|
children: /* @__PURE__ */ jsxRuntimeExports.jsx(btn.icon, { className: "size-4 text-[#344054]" })
|
|
39228
39295
|
},
|
|
39229
39296
|
btn.command
|
|
@@ -39244,6 +39311,7 @@ function FormattingToolbar({ onFormat, onOpenRefineModal }) {
|
|
|
39244
39311
|
className: "flex items-center gap-1.5 px-2 py-2 hover:bg-gray-100 rounded transition-colors cursor-pointer",
|
|
39245
39312
|
title: "Refine with AI",
|
|
39246
39313
|
style: { pointerEvents: "auto", zIndex: 100 },
|
|
39314
|
+
"data-id": "prompt-editor_formatting_toolbar_btn_refine_ai",
|
|
39247
39315
|
children: [
|
|
39248
39316
|
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "size-4", children: /* @__PURE__ */ jsxRuntimeExports.jsx(PencilAi, {}) }),
|
|
39249
39317
|
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: " text-[14px] text-[#344054] leading-[20px] whitespace-nowrap", children: "Refine with AI" })
|
|
@@ -39314,6 +39382,7 @@ function ContentBlock({
|
|
|
39314
39382
|
e3.stopPropagation();
|
|
39315
39383
|
onSetActive(block.id);
|
|
39316
39384
|
},
|
|
39385
|
+
"data-id": `prompt-editor_subsection_${block.id}`,
|
|
39317
39386
|
children: [
|
|
39318
39387
|
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center justify-between gap-2 mb-3 group", children: [
|
|
39319
39388
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
@@ -39333,11 +39402,12 @@ function ContentBlock({
|
|
|
39333
39402
|
onClick: onDelete,
|
|
39334
39403
|
className: "opacity-0 group-hover:opacity-100 transition-opacity p-1 hover:bg-gray-100 rounded",
|
|
39335
39404
|
title: "Delete subsection",
|
|
39405
|
+
"data-id": `prompt-editor_subsection_delete_btn_${block.id}`,
|
|
39336
39406
|
children: /* @__PURE__ */ jsxRuntimeExports.jsx(Trash2, { className: "size-4 text-gray-500" })
|
|
39337
39407
|
}
|
|
39338
39408
|
)
|
|
39339
39409
|
] }),
|
|
39340
|
-
/* @__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(
|
|
39410
|
+
/* @__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(
|
|
39341
39411
|
ContentBlock,
|
|
39342
39412
|
{
|
|
39343
39413
|
block: child,
|
|
@@ -39379,13 +39449,15 @@ function ContentBlock({
|
|
|
39379
39449
|
e3.stopPropagation();
|
|
39380
39450
|
onSetActive(parentId);
|
|
39381
39451
|
},
|
|
39452
|
+
"data-id": `prompt-editor_text_block_${block.id}`,
|
|
39382
39453
|
children: [
|
|
39383
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex gap-2 items-start", children: [
|
|
39454
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex gap-2 items-start", "data-id": `prompt-editor_text_block_container_${block.id}`, children: [
|
|
39384
39455
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
39385
39456
|
"div",
|
|
39386
39457
|
{
|
|
39387
39458
|
className: "flex-1 min-h-[40px]",
|
|
39388
39459
|
"data-block-id": block.id,
|
|
39460
|
+
"data-id": `prompt-editor_text_block_content_${block.id}`,
|
|
39389
39461
|
children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
39390
39462
|
EditableContent,
|
|
39391
39463
|
{
|
|
@@ -39406,6 +39478,7 @@ function ContentBlock({
|
|
|
39406
39478
|
onClick: onDelete,
|
|
39407
39479
|
className: "opacity-0 group-hover:opacity-100 transition-opacity p-1 hover:bg-gray-100 rounded",
|
|
39408
39480
|
title: "Delete text block",
|
|
39481
|
+
"data-id": `prompt-editor_text_block_delete_btn_${block.id}`,
|
|
39409
39482
|
children: /* @__PURE__ */ jsxRuntimeExports.jsx(Trash2, { className: "size-4 text-gray-500" })
|
|
39410
39483
|
}
|
|
39411
39484
|
)
|
|
@@ -39755,6 +39828,7 @@ function Section({
|
|
|
39755
39828
|
{
|
|
39756
39829
|
ref,
|
|
39757
39830
|
className: "bg-white flex flex-col h-full relative rounded-[12px] shrink-0 w-full",
|
|
39831
|
+
"data-id": `prompt-editor_section_${safeSection.id}`,
|
|
39758
39832
|
children: [
|
|
39759
39833
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
39760
39834
|
SectionHeader,
|
|
@@ -39780,11 +39854,12 @@ function Section({
|
|
|
39780
39854
|
onSetActive(section.id);
|
|
39781
39855
|
}
|
|
39782
39856
|
},
|
|
39783
|
-
|
|
39857
|
+
"data-id": `prompt-editor_section_content_${safeSection.id}`,
|
|
39858
|
+
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() })
|
|
39784
39859
|
}
|
|
39785
39860
|
) : (
|
|
39786
39861
|
// Code editor takes full width without padding
|
|
39787
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex-1 overflow-hidden relative shrink-0 w-full", children: renderContent2() })
|
|
39862
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex-1 overflow-hidden relative shrink-0 w-full", "data-id": `prompt-editor_section_preview_${safeSection.id}`, children: renderContent2() })
|
|
39788
39863
|
)
|
|
39789
39864
|
]
|
|
39790
39865
|
}
|
|
@@ -39792,19 +39867,20 @@ function Section({
|
|
|
39792
39867
|
}
|
|
39793
39868
|
function ChatMessage({ role, content, quotedText, onInsert, onReplace, showActions = false, isUsed = false }) {
|
|
39794
39869
|
if (role === "user") {
|
|
39795
|
-
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: [
|
|
39870
|
+
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: [
|
|
39796
39871
|
/* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: " text-[14px] leading-[20px] whitespace-pre-wrap", children: content }),
|
|
39797
39872
|
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 }) })
|
|
39798
39873
|
] }) });
|
|
39799
39874
|
}
|
|
39800
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex justify-start mb-4", children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex flex-col gap-[8px]", children: [
|
|
39801
|
-
/* @__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 }) }),
|
|
39802
|
-
showActions && !isUsed && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-[8px]", children: [
|
|
39875
|
+
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: [
|
|
39876
|
+
/* @__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 }) }),
|
|
39877
|
+
showActions && !isUsed && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-[8px]", "data-id": "prompt-editor_chat_message_actions", children: [
|
|
39803
39878
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
39804
39879
|
"button",
|
|
39805
39880
|
{
|
|
39806
39881
|
onClick: () => onReplace == null ? void 0 : onReplace(content),
|
|
39807
39882
|
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",
|
|
39883
|
+
"data-id": "prompt-editor_chat_message_btn_replace",
|
|
39808
39884
|
children: "Replace"
|
|
39809
39885
|
}
|
|
39810
39886
|
),
|
|
@@ -39813,6 +39889,7 @@ function ChatMessage({ role, content, quotedText, onInsert, onReplace, showActio
|
|
|
39813
39889
|
{
|
|
39814
39890
|
onClick: () => onInsert == null ? void 0 : onInsert(content),
|
|
39815
39891
|
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",
|
|
39892
|
+
"data-id": "prompt-editor_chat_message_btn_insert",
|
|
39816
39893
|
children: "Insert"
|
|
39817
39894
|
}
|
|
39818
39895
|
)
|
|
@@ -40052,19 +40129,20 @@ ${actualTextToRefine}` : instruction,
|
|
|
40052
40129
|
}
|
|
40053
40130
|
};
|
|
40054
40131
|
if (!isOpen) return null;
|
|
40055
|
-
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: [
|
|
40056
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "h-[60px] border-b border-[#eaecf0] flex items-center justify-between px-[16px] shrink-0", children: [
|
|
40132
|
+
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: [
|
|
40133
|
+
/* @__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: [
|
|
40057
40134
|
/* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "font-medium text-[16px] leading-[24px] text-[#101828]", children: "Refine with AI" }),
|
|
40058
40135
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
40059
40136
|
"button",
|
|
40060
40137
|
{
|
|
40061
40138
|
onClick: onClose,
|
|
40062
40139
|
className: "p-1 hover:bg-gray-100 rounded transition-colors",
|
|
40140
|
+
"data-id": "prompt-editor_refine_panel_close_btn",
|
|
40063
40141
|
children: /* @__PURE__ */ jsxRuntimeExports.jsx(X, { className: "size-5 text-[#101828]" })
|
|
40064
40142
|
}
|
|
40065
40143
|
)
|
|
40066
40144
|
] }),
|
|
40067
|
-
/* @__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: [
|
|
40145
|
+
/* @__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: [
|
|
40068
40146
|
messages.map((msg, idx) => {
|
|
40069
40147
|
const lastAssistantIndex = getLastAssistantMessageIndex();
|
|
40070
40148
|
const isLastAssistant = msg.role === "assistant" && idx === lastAssistantIndex;
|
|
@@ -40086,7 +40164,7 @@ ${actualTextToRefine}` : instruction,
|
|
|
40086
40164
|
isLoading && /* @__PURE__ */ jsxRuntimeExports.jsx(SkeletonMessage, {}),
|
|
40087
40165
|
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { ref: chatEndRef })
|
|
40088
40166
|
] }) }),
|
|
40089
|
-
/* @__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: [
|
|
40167
|
+
/* @__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: [
|
|
40090
40168
|
/* @__PURE__ */ jsxRuntimeExports.jsx(GenerateIcon, {}),
|
|
40091
40169
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
40092
40170
|
"input",
|
|
@@ -40098,7 +40176,8 @@ ${actualTextToRefine}` : instruction,
|
|
|
40098
40176
|
onKeyDown: handleKeyDown,
|
|
40099
40177
|
placeholder: "Iterate further",
|
|
40100
40178
|
disabled: isLoading,
|
|
40101
|
-
className: "flex-1 min-w-0 text-[14px] leading-[20px] text-[#101828] placeholder:text-[#98a2b3] outline-none bg-transparent"
|
|
40179
|
+
className: "flex-1 min-w-0 text-[14px] leading-[20px] text-[#101828] placeholder:text-[#98a2b3] outline-none bg-transparent",
|
|
40180
|
+
"data-id": "prompt-editor_refine_panel_input"
|
|
40102
40181
|
}
|
|
40103
40182
|
),
|
|
40104
40183
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
@@ -40106,6 +40185,7 @@ ${actualTextToRefine}` : instruction,
|
|
|
40106
40185
|
{
|
|
40107
40186
|
onClick: handleIterate,
|
|
40108
40187
|
disabled: !iterateInput.trim() || isLoading,
|
|
40188
|
+
"data-id": "prompt-editor_refine_panel_submit_btn",
|
|
40109
40189
|
children: /* @__PURE__ */ jsxRuntimeExports.jsx(ArrowCircleUpIcon, { isActive: !!iterateInput.trim() && !isLoading })
|
|
40110
40190
|
}
|
|
40111
40191
|
)
|
|
@@ -40240,15 +40320,20 @@ function PromptEditor({
|
|
|
40240
40320
|
if (type === "subsection" && parentId) {
|
|
40241
40321
|
headingLevel = findParentAndGetHeadingLevel(internalValue, parentId) ?? 1;
|
|
40242
40322
|
}
|
|
40323
|
+
const generateUniqueId2 = (prefix2 = "content") => {
|
|
40324
|
+
const counter = Date.now();
|
|
40325
|
+
const random = Math.random().toString(36).substr(2, 9);
|
|
40326
|
+
return `${prefix2}-${counter}-${random}`;
|
|
40327
|
+
};
|
|
40243
40328
|
const newBlock = {
|
|
40244
|
-
id:
|
|
40329
|
+
id: generateUniqueId2("block"),
|
|
40245
40330
|
type,
|
|
40246
40331
|
content: initialContent !== void 0 ? initialContent : "",
|
|
40247
40332
|
listType,
|
|
40248
40333
|
headingLevel: type === "subsection" ? headingLevel : void 0,
|
|
40249
40334
|
children: type === "subsection" ? [
|
|
40250
40335
|
{
|
|
40251
|
-
id:
|
|
40336
|
+
id: generateUniqueId2("child"),
|
|
40252
40337
|
type: "text",
|
|
40253
40338
|
content: ""
|
|
40254
40339
|
}
|
|
@@ -40599,10 +40684,10 @@ function PromptEditor({
|
|
|
40599
40684
|
}
|
|
40600
40685
|
return await onRefine(context);
|
|
40601
40686
|
};
|
|
40602
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: `bg-white content-stretch flex flex-col items-start relative size-full ${className}`, children: [
|
|
40687
|
+
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: [
|
|
40603
40688
|
showHeader && /* @__PURE__ */ jsxRuntimeExports.jsx(Header, {}),
|
|
40604
|
-
/* @__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: [
|
|
40605
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "bg-white flex-1 h-full relative rounded-[12px] shrink-0 flex flex-col overflow-hidden", children: [
|
|
40689
|
+
/* @__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: [
|
|
40690
|
+
/* @__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: [
|
|
40606
40691
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
40607
40692
|
Section,
|
|
40608
40693
|
{
|
|
@@ -40633,7 +40718,7 @@ function PromptEditor({
|
|
|
40633
40718
|
),
|
|
40634
40719
|
/* @__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)]" })
|
|
40635
40720
|
] }),
|
|
40636
|
-
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(
|
|
40721
|
+
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(
|
|
40637
40722
|
RefinePanel,
|
|
40638
40723
|
{
|
|
40639
40724
|
isOpen: refinePanelOpen,
|