agentic-ui-libs 1.1.0-beta.2 → 1.1.0-beta.4
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/assets/agentic-ui-libs.css +11 -3
- package/dist/features/dashboard/Dashboard.d.ts.map +1 -1
- package/dist/features/tracing/components/TracesList.d.ts.map +1 -1
- package/dist/features/tracing/components/detail/DetailPage.d.ts.map +1 -1
- package/dist/features/tracing/components/detail/ObservationNode.d.ts.map +1 -1
- package/dist/features/tracing/components/detail/TraceTree.d.ts.map +1 -1
- package/dist/features/tracing/index.d.ts +1 -1
- package/dist/features/tracing/index.d.ts.map +1 -1
- package/dist/features/tracing/services/TracingApiService.d.ts +4 -0
- package/dist/features/tracing/services/TracingApiService.d.ts.map +1 -1
- package/dist/features/tracing/types.d.ts +14 -0
- package/dist/features/tracing/types.d.ts.map +1 -1
- package/dist/index.js +401 -369
- package/dist/shared/ui/daterangepicker.d.ts.map +1 -1
- package/dist/ui-libs.umd.js +401 -369
- package/package.json +1 -1
package/dist/ui-libs.umd.js
CHANGED
|
@@ -4349,10 +4349,10 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
4349
4349
|
className
|
|
4350
4350
|
),
|
|
4351
4351
|
onClick: handleClick2,
|
|
4352
|
-
"data-id": `dashboard_metric_card_${data.metricType || data.title.toLowerCase().replace(/\s+/g, "_")}`,
|
|
4352
|
+
"data-test-id": `dashboard_metric_card_${data.metricType || data.title.toLowerCase().replace(/\s+/g, "_")}`,
|
|
4353
4353
|
children: [
|
|
4354
|
-
/* @__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: [
|
|
4355
|
-
/* @__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 }),
|
|
4354
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-2 mb-[6px]", "data-test-id": `dashboard_metric_card_header_${data.metricType || data.title.toLowerCase().replace(/\s+/g, "_")}`, children: [
|
|
4355
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-sm font-medium text-gray-700", "data-test-id": `dashboard_metric_card_title_${data.metricType || data.title.toLowerCase().replace(/\s+/g, "_")}`, children: title }),
|
|
4356
4356
|
info && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "relative group", children: [
|
|
4357
4357
|
/* @__PURE__ */ jsxRuntimeExports.jsx(Info, { className: "h-[16px] w-[16px] text-gray-400 cursor-help" }),
|
|
4358
4358
|
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: cn(
|
|
@@ -4370,8 +4370,8 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
4370
4370
|
] })
|
|
4371
4371
|
] })
|
|
4372
4372
|
] }),
|
|
4373
|
-
/* @__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: [
|
|
4374
|
-
/* @__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) }),
|
|
4373
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-baseline gap-3", "data-test-id": `dashboard_metric_card_value_container_${data.metricType || data.title.toLowerCase().replace(/\s+/g, "_")}`, children: [
|
|
4374
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-2xl font-semibold text-gray-900", "data-test-id": `dashboard_metric_card_value_${data.metricType || data.title.toLowerCase().replace(/\s+/g, "_")}`, children: formatValue2(value) }),
|
|
4375
4375
|
change && /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
4376
4376
|
"div",
|
|
4377
4377
|
{
|
|
@@ -28984,8 +28984,8 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
28984
28984
|
console.log("Chart lines configuration:", chartLines);
|
|
28985
28985
|
console.log("Sample filled data points:", sortedData.slice(0, 3));
|
|
28986
28986
|
console.log("=== END ANALYTICS CHART DEBUG ===");
|
|
28987
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: cn("w-full", className), "data-id": "dashboard_analytics_chart_root", children: [
|
|
28988
|
-
/* @__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(
|
|
28987
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: cn("w-full", className), "data-test-id": "dashboard_analytics_chart_root", children: [
|
|
28988
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "relative bg-gray-50/30", "data-test-id": "dashboard_analytics_chart_container", children: /* @__PURE__ */ jsxRuntimeExports.jsx(ResponsiveContainer, { width: "100%", height, "data-test-id": "dashboard_analytics_chart_responsive_container", children: /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
28989
28989
|
ComposedChart,
|
|
28990
28990
|
{
|
|
28991
28991
|
data: sortedData,
|
|
@@ -29084,10 +29084,10 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
29084
29084
|
]
|
|
29085
29085
|
}
|
|
29086
29086
|
) }) }),
|
|
29087
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "mt-4 flex items-center justify-between", "data-id": "dashboard_analytics_chart_footer", children: [
|
|
29088
|
-
/* @__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: [
|
|
29087
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "mt-4 flex items-center justify-between", "data-test-id": "dashboard_analytics_chart_footer", children: [
|
|
29088
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { "data-test-id": "dashboard_analytics_chart_date_range", children: dateRange && /* @__PURE__ */ jsxRuntimeExports.jsxs("p", { className: "text-xs text-gray-500 flex items-center gap-[4px]", "data-test-id": "dashboard_analytics_chart_date_range_text", children: [
|
|
29089
29089
|
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-gray-500", children: "Showing data from" }),
|
|
29090
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs("span", { className: "font-medium text-gray-700", "data-id": "dashboard_analytics_chart_date_range_value", children: [
|
|
29090
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("span", { className: "font-medium text-gray-700", "data-test-id": "dashboard_analytics_chart_date_range_value", children: [
|
|
29091
29091
|
new Date(dateRange.start).toLocaleDateString("en-US", {
|
|
29092
29092
|
day: "numeric",
|
|
29093
29093
|
month: "short",
|
|
@@ -29101,16 +29101,16 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
29101
29101
|
})
|
|
29102
29102
|
] })
|
|
29103
29103
|
] }) }),
|
|
29104
|
-
/* @__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: [
|
|
29104
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex items-center gap-4", "data-test-id": "dashboard_analytics_chart_legend", children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex items-center gap-4 text-sm text-muted-foreground", "data-test-id": "dashboard_analytics_chart_legend_items", children: chartLines.map((lineConfig) => /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-2", "data-test-id": `dashboard_analytics_chart_legend_item_${lineConfig.dataKey}`, children: [
|
|
29105
29105
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
29106
29106
|
"div",
|
|
29107
29107
|
{
|
|
29108
29108
|
className: "w-[8px] h-[8px] rounded-full",
|
|
29109
29109
|
style: { backgroundColor: lineConfig.color },
|
|
29110
|
-
"data-id": `dashboard_analytics_chart_legend_color_${lineConfig.dataKey}`
|
|
29110
|
+
"data-test-id": `dashboard_analytics_chart_legend_color_${lineConfig.dataKey}`
|
|
29111
29111
|
}
|
|
29112
29112
|
),
|
|
29113
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-xs text-gray-600", "data-id": `dashboard_analytics_chart_legend_label_${lineConfig.dataKey}`, children: lineConfig.label })
|
|
29113
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-xs text-gray-600", "data-test-id": `dashboard_analytics_chart_legend_label_${lineConfig.dataKey}`, children: lineConfig.label })
|
|
29114
29114
|
] }, lineConfig.dataKey)) }) })
|
|
29115
29115
|
] })
|
|
29116
29116
|
] });
|
|
@@ -29197,10 +29197,10 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
29197
29197
|
/* @__PURE__ */ jsxRuntimeExports.jsx(ChevronDown, { className: "w-[12px] h-[12px] opacity-30 -mt-1" })
|
|
29198
29198
|
] });
|
|
29199
29199
|
};
|
|
29200
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: cn("w-full", className), "data-id": "dashboard_analytics_table_root", children: [
|
|
29201
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center justify-between mb-4", "data-id": "dashboard_analytics_table_header", children: [
|
|
29202
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("h3", { className: "text-md font-medium text-gray-700", "data-id": "dashboard_analytics_table_title", children: title }),
|
|
29203
|
-
filtering.enabled && filtering.searchable && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "relative", "data-id": "dashboard_analytics_table_search", children: [
|
|
29200
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: cn("w-full", className), "data-test-id": "dashboard_analytics_table_root", children: [
|
|
29201
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center justify-between mb-4", "data-test-id": "dashboard_analytics_table_header", children: [
|
|
29202
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("h3", { className: "text-md font-medium text-gray-700", "data-test-id": "dashboard_analytics_table_title", children: title }),
|
|
29203
|
+
filtering.enabled && filtering.searchable && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "relative", "data-test-id": "dashboard_analytics_table_search", children: [
|
|
29204
29204
|
/* @__PURE__ */ jsxRuntimeExports.jsx(Search, { className: "absolute left-[12px] top-1/2 transform -translate-y-1/2 w-[16px] h-[16px] text-gray-400" }),
|
|
29205
29205
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
29206
29206
|
"input",
|
|
@@ -29210,13 +29210,13 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
29210
29210
|
value: searchTerm,
|
|
29211
29211
|
onChange: (e) => handleSearch(e.target.value),
|
|
29212
29212
|
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",
|
|
29213
|
-
"data-id": "dashboard_analytics_table_search_input"
|
|
29213
|
+
"data-test-id": "dashboard_analytics_table_search_input"
|
|
29214
29214
|
}
|
|
29215
29215
|
)
|
|
29216
29216
|
] })
|
|
29217
29217
|
] }),
|
|
29218
|
-
/* @__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: [
|
|
29219
|
-
/* @__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(
|
|
29218
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "overflow-x-auto border border-gray-200 rounded-lg", "data-test-id": "dashboard_analytics_table_wrapper", children: /* @__PURE__ */ jsxRuntimeExports.jsxs("table", { className: "w-full", "data-test-id": "dashboard_analytics_table", children: [
|
|
29219
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("thead", { className: "bg-gray-50", "data-test-id": "dashboard_analytics_table_head", children: /* @__PURE__ */ jsxRuntimeExports.jsx("tr", { "data-test-id": "dashboard_analytics_table_head_row", children: columns.map((column) => /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
29220
29220
|
"th",
|
|
29221
29221
|
{
|
|
29222
29222
|
className: cn(
|
|
@@ -29227,19 +29227,19 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
29227
29227
|
),
|
|
29228
29228
|
style: { width: column.width },
|
|
29229
29229
|
onClick: () => handleSort(column),
|
|
29230
|
-
"data-id": `dashboard_analytics_table_header_${column.key}`,
|
|
29231
|
-
children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-2", "data-id": `dashboard_analytics_table_header_content_${column.key}`, children: [
|
|
29230
|
+
"data-test-id": `dashboard_analytics_table_header_${column.key}`,
|
|
29231
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-2", "data-test-id": `dashboard_analytics_table_header_content_${column.key}`, children: [
|
|
29232
29232
|
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { children: column.title }),
|
|
29233
29233
|
getSortIcon(column)
|
|
29234
29234
|
] })
|
|
29235
29235
|
},
|
|
29236
29236
|
column.key
|
|
29237
29237
|
)) }) }),
|
|
29238
|
-
/* @__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(
|
|
29238
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("tbody", { className: "bg-white divide-y divide-gray-200", "data-test-id": "dashboard_analytics_table_body", children: paginatedData.map((row, rowIndex) => /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
29239
29239
|
"tr",
|
|
29240
29240
|
{
|
|
29241
29241
|
className: "hover:bg-gray-50 transition-colors",
|
|
29242
|
-
"data-id": `dashboard_analytics_table_row_${rowIndex}`,
|
|
29242
|
+
"data-test-id": `dashboard_analytics_table_row_${rowIndex}`,
|
|
29243
29243
|
children: columns.map((column) => /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
29244
29244
|
"td",
|
|
29245
29245
|
{
|
|
@@ -29248,7 +29248,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
29248
29248
|
column.align === "center" && "text-center",
|
|
29249
29249
|
column.align === "right" && "text-right"
|
|
29250
29250
|
),
|
|
29251
|
-
"data-id": `dashboard_analytics_table_cell_${rowIndex}_${column.key}`,
|
|
29251
|
+
"data-test-id": `dashboard_analytics_table_cell_${rowIndex}_${column.key}`,
|
|
29252
29252
|
children: formatCellValue(row[column.key], column, row)
|
|
29253
29253
|
},
|
|
29254
29254
|
column.key
|
|
@@ -29257,8 +29257,8 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
29257
29257
|
rowIndex
|
|
29258
29258
|
)) })
|
|
29259
29259
|
] }) }),
|
|
29260
|
-
pagination.enabled && totalPages > 1 && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center justify-between mt-4", "data-id": "dashboard_analytics_table_pagination", children: [
|
|
29261
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "text-xs text-gray-500", "data-id": "dashboard_analytics_table_pagination_info", children: [
|
|
29260
|
+
pagination.enabled && totalPages > 1 && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center justify-between mt-4", "data-test-id": "dashboard_analytics_table_pagination", children: [
|
|
29261
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "text-xs text-gray-500", "data-test-id": "dashboard_analytics_table_pagination_info", children: [
|
|
29262
29262
|
"Showing ",
|
|
29263
29263
|
(currentPage - 1) * pagination.pageSize + 1,
|
|
29264
29264
|
" to",
|
|
@@ -29269,14 +29269,14 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
29269
29269
|
processedData.length,
|
|
29270
29270
|
" results"
|
|
29271
29271
|
] }),
|
|
29272
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-2", "data-id": "dashboard_analytics_table_pagination_controls", children: [
|
|
29272
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-2", "data-test-id": "dashboard_analytics_table_pagination_controls", children: [
|
|
29273
29273
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
29274
29274
|
"button",
|
|
29275
29275
|
{
|
|
29276
29276
|
onClick: () => setCurrentPage((prev) => Math.max(1, prev - 1)),
|
|
29277
29277
|
disabled: currentPage === 1,
|
|
29278
29278
|
className: "px-[12px] py-[4px] text-xs border border-gray-200 rounded hover:bg-gray-50 disabled:opacity-50 disabled:cursor-not-allowed",
|
|
29279
|
-
"data-id": "dashboard_analytics_table_pagination_btn_previous",
|
|
29279
|
+
"data-test-id": "dashboard_analytics_table_pagination_btn_previous",
|
|
29280
29280
|
children: "Previous"
|
|
29281
29281
|
}
|
|
29282
29282
|
),
|
|
@@ -29294,7 +29294,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
29294
29294
|
"px-[12px] py-[4px] text-xs border rounded",
|
|
29295
29295
|
currentPage === pageNum ? "bg-blue-500 text-white border-blue-500" : "border-gray-200 hover:bg-gray-50"
|
|
29296
29296
|
),
|
|
29297
|
-
"data-id": `dashboard_analytics_table_pagination_btn_page_${pageNum}`,
|
|
29297
|
+
"data-test-id": `dashboard_analytics_table_pagination_btn_page_${pageNum}`,
|
|
29298
29298
|
children: pageNum
|
|
29299
29299
|
},
|
|
29300
29300
|
pageNum
|
|
@@ -29306,13 +29306,13 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
29306
29306
|
onClick: () => setCurrentPage((prev) => Math.min(totalPages, prev + 1)),
|
|
29307
29307
|
disabled: currentPage === totalPages,
|
|
29308
29308
|
className: "px-[12px] py-[4px] text-xs border border-gray-200 rounded hover:bg-gray-50 disabled:opacity-50 disabled:cursor-not-allowed",
|
|
29309
|
-
"data-id": "dashboard_analytics_table_pagination_btn_next",
|
|
29309
|
+
"data-test-id": "dashboard_analytics_table_pagination_btn_next",
|
|
29310
29310
|
children: "Next"
|
|
29311
29311
|
}
|
|
29312
29312
|
)
|
|
29313
29313
|
] })
|
|
29314
29314
|
] }),
|
|
29315
|
-
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." })
|
|
29315
|
+
paginatedData.length === 0 && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-center py-[32px] text-gray-500", "data-test-id": "dashboard_analytics_table_empty_state", children: searchTerm ? "No results found for your search." : "No data available." })
|
|
29316
29316
|
] });
|
|
29317
29317
|
};
|
|
29318
29318
|
const ASSETS_DOMAIN = "https://staging-agent-platform.kore.ai";
|
|
@@ -29606,21 +29606,21 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
29606
29606
|
}
|
|
29607
29607
|
return value.toString();
|
|
29608
29608
|
};
|
|
29609
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: cn("w-full", className), "data-id": "dashboard_agent_list_view_root", children: [
|
|
29610
|
-
/* @__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: [
|
|
29611
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-left", "data-id": "dashboard_agent_list_view_header_name", children: "Name" }),
|
|
29612
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-center", "data-id": "dashboard_agent_list_view_header_runs", children: "Runs" }),
|
|
29613
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-center", "data-id": "dashboard_agent_list_view_header_response_time", children: "Response Time" }),
|
|
29614
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-center", "data-id": "dashboard_agent_list_view_header_tokens", children: "Tokens" })
|
|
29609
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: cn("w-full", className), "data-test-id": "dashboard_agent_list_view_root", children: [
|
|
29610
|
+
/* @__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-test-id": "dashboard_agent_list_view_header", children: [
|
|
29611
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-left", "data-test-id": "dashboard_agent_list_view_header_name", children: "Name" }),
|
|
29612
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-center", "data-test-id": "dashboard_agent_list_view_header_runs", children: "Runs" }),
|
|
29613
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-center", "data-test-id": "dashboard_agent_list_view_header_response_time", children: "Response Time" }),
|
|
29614
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-center", "data-test-id": "dashboard_agent_list_view_header_tokens", children: "Tokens" })
|
|
29615
29615
|
] }),
|
|
29616
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "divide-y divide-gray-100", "data-id": "dashboard_agent_list_view_body", children: data.slice(0, visibleCount).map((agent2, index) => /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
29616
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "divide-y divide-gray-100", "data-test-id": "dashboard_agent_list_view_body", children: data.slice(0, visibleCount).map((agent2, index) => /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
29617
29617
|
"div",
|
|
29618
29618
|
{
|
|
29619
29619
|
className: "grid grid-cols-4 items-center gap-4 px-[16px] py-[12px] cursor-pointer transition-colors duration-150 border-b border-gray-200",
|
|
29620
|
-
"data-id": `dashboard_agent_list_view_row_${index}`,
|
|
29620
|
+
"data-test-id": `dashboard_agent_list_view_row_${index}`,
|
|
29621
29621
|
children: [
|
|
29622
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-[8px]", "data-id": `dashboard_agent_list_view_row_name_${index}`, children: [
|
|
29623
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex-shrink-0", "data-id": `dashboard_agent_list_view_row_avatar_${index}`, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
29622
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-[8px]", "data-test-id": `dashboard_agent_list_view_row_name_${index}`, children: [
|
|
29623
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex-shrink-0", "data-test-id": `dashboard_agent_list_view_row_avatar_${index}`, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
29624
29624
|
IconPreview,
|
|
29625
29625
|
{
|
|
29626
29626
|
icon: agent2.icon,
|
|
@@ -29629,21 +29629,21 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
29629
29629
|
name: agent2.name || "Unknown Agent"
|
|
29630
29630
|
}
|
|
29631
29631
|
) }),
|
|
29632
|
-
/* @__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: agent2.name || "Unknown Agent" }) })
|
|
29632
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "min-w-0 flex-1 w-full", "data-test-id": `dashboard_agent_list_view_row_name_text_${index}`, children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-xs font-medium text-gray-700 truncate", children: agent2.name || "Unknown Agent" }) })
|
|
29633
29633
|
] }),
|
|
29634
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-center font-medium text-xs text-gray-700", "data-id": `dashboard_agent_list_view_row_runs_${index}`, children: agent2.runs ? formatValue2(agent2.runs) : "-" }),
|
|
29635
|
-
/* @__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: agent2.responseTime || "-" }),
|
|
29636
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-center font-medium text-xs text-gray-700", "data-id": `dashboard_agent_list_view_row_tokens_${index}`, children: agent2.tokens ? formatValue2(agent2.tokens) : "-" })
|
|
29634
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-center font-medium text-xs text-gray-700", "data-test-id": `dashboard_agent_list_view_row_runs_${index}`, children: agent2.runs ? formatValue2(agent2.runs) : "-" }),
|
|
29635
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-center font-medium text-xs text-gray-700", "data-test-id": `dashboard_agent_list_view_row_response_time_${index}`, children: agent2.responseTime || "-" }),
|
|
29636
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-center font-medium text-xs text-gray-700", "data-test-id": `dashboard_agent_list_view_row_tokens_${index}`, children: agent2.tokens ? formatValue2(agent2.tokens) : "-" })
|
|
29637
29637
|
]
|
|
29638
29638
|
},
|
|
29639
29639
|
agent2.id || index
|
|
29640
29640
|
)) }),
|
|
29641
|
-
visibleCount < data.length && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex justify-center", "data-id": "dashboard_agent_list_view_load_more_container", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
29641
|
+
visibleCount < data.length && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex justify-center", "data-test-id": "dashboard_agent_list_view_load_more_container", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
29642
29642
|
"button",
|
|
29643
29643
|
{
|
|
29644
29644
|
onClick: loadMore,
|
|
29645
29645
|
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",
|
|
29646
|
-
"data-id": "dashboard_agent_list_view_load_more_btn",
|
|
29646
|
+
"data-test-id": "dashboard_agent_list_view_load_more_btn",
|
|
29647
29647
|
children: "Load 10 more"
|
|
29648
29648
|
}
|
|
29649
29649
|
) })
|
|
@@ -29687,21 +29687,21 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
29687
29687
|
}
|
|
29688
29688
|
return value.toString();
|
|
29689
29689
|
};
|
|
29690
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: cn("w-full", className), "data-id": "dashboard_tool_list_view_root", children: [
|
|
29691
|
-
/* @__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: [
|
|
29692
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-left", "data-id": "dashboard_tool_list_view_header_name", children: "Name" }),
|
|
29693
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-center", "data-id": "dashboard_tool_list_view_header_type", children: "Type" }),
|
|
29694
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-center", "data-id": "dashboard_tool_list_view_header_runs", children: "Runs" }),
|
|
29695
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-center", "data-id": "dashboard_tool_list_view_header_response_time", children: "Response Time" })
|
|
29690
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: cn("w-full", className), "data-test-id": "dashboard_tool_list_view_root", children: [
|
|
29691
|
+
/* @__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-test-id": "dashboard_tool_list_view_header", children: [
|
|
29692
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-left", "data-test-id": "dashboard_tool_list_view_header_name", children: "Name" }),
|
|
29693
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-center", "data-test-id": "dashboard_tool_list_view_header_type", children: "Type" }),
|
|
29694
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-center", "data-test-id": "dashboard_tool_list_view_header_runs", children: "Runs" }),
|
|
29695
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-center", "data-test-id": "dashboard_tool_list_view_header_response_time", children: "Response Time" })
|
|
29696
29696
|
] }),
|
|
29697
|
-
/* @__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(
|
|
29697
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "divide-y divide-gray-100", "data-test-id": "dashboard_tool_list_view_body", children: data.slice(0, visibleCount).map((tool, index) => /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
29698
29698
|
"div",
|
|
29699
29699
|
{
|
|
29700
29700
|
className: "grid grid-cols-4 items-center gap-4 px-[16px] py-[12px] cursor-pointer transition-colors duration-150 border-b border-gray-200",
|
|
29701
|
-
"data-id": `dashboard_tool_list_view_row_${index}`,
|
|
29701
|
+
"data-test-id": `dashboard_tool_list_view_row_${index}`,
|
|
29702
29702
|
children: [
|
|
29703
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-[8px]", "data-id": `dashboard_tool_list_view_row_name_${index}`, children: [
|
|
29704
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex-shrink-0", "data-id": `dashboard_tool_list_view_row_icon_${index}`, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
29703
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-[8px]", "data-test-id": `dashboard_tool_list_view_row_name_${index}`, children: [
|
|
29704
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex-shrink-0", "data-test-id": `dashboard_tool_list_view_row_icon_${index}`, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
29705
29705
|
IconPreview,
|
|
29706
29706
|
{
|
|
29707
29707
|
icon: tool.icon,
|
|
@@ -29711,24 +29711,24 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
29711
29711
|
toolType: tool["toolType"] || tool["type"]
|
|
29712
29712
|
}
|
|
29713
29713
|
) }),
|
|
29714
|
-
/* @__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" }) })
|
|
29714
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "min-w-0 flex-1 w-full", "data-test-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" }) })
|
|
29715
29715
|
] }),
|
|
29716
|
-
/* @__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(
|
|
29716
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex items-center justify-center", "data-test-id": `dashboard_tool_list_view_row_type_${index}`, children: /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: cn(
|
|
29717
29717
|
"inline-flex items-center px-[10px] py-[4px] rounded-full text-xs font-medium border",
|
|
29718
29718
|
getToolTypeStyle(tool["toolType"] || tool["type"] || "Default")
|
|
29719
|
-
), "data-id": `dashboard_tool_list_view_row_type_badge_${index}`, children: getToolTypeName(tool["toolType"] || tool["type"] || "Default") }) }),
|
|
29720
|
-
/* @__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) : "-" }),
|
|
29721
|
-
/* @__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 || "-" })
|
|
29719
|
+
), "data-test-id": `dashboard_tool_list_view_row_type_badge_${index}`, children: getToolTypeName(tool["toolType"] || tool["type"] || "Default") }) }),
|
|
29720
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-center font-medium text-xs text-gray-700", "data-test-id": `dashboard_tool_list_view_row_runs_${index}`, children: tool.runs ? formatValue2(tool.runs) : "-" }),
|
|
29721
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-center font-medium text-xs text-gray-700", "data-test-id": `dashboard_tool_list_view_row_response_time_${index}`, children: tool.responseTime || "-" })
|
|
29722
29722
|
]
|
|
29723
29723
|
},
|
|
29724
29724
|
tool.id || index
|
|
29725
29725
|
)) }),
|
|
29726
|
-
visibleCount < data.length && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex justify-center", "data-id": "dashboard_tool_list_view_load_more_container", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
29726
|
+
visibleCount < data.length && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex justify-center", "data-test-id": "dashboard_tool_list_view_load_more_container", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
29727
29727
|
"button",
|
|
29728
29728
|
{
|
|
29729
29729
|
onClick: loadMore,
|
|
29730
29730
|
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",
|
|
29731
|
-
"data-id": "dashboard_tool_list_view_load_more_btn",
|
|
29731
|
+
"data-test-id": "dashboard_tool_list_view_load_more_btn",
|
|
29732
29732
|
children: "Load 10 more"
|
|
29733
29733
|
}
|
|
29734
29734
|
) })
|
|
@@ -29868,44 +29868,44 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
29868
29868
|
}
|
|
29869
29869
|
return value.toString();
|
|
29870
29870
|
};
|
|
29871
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: cn("w-full", className), "data-id": "dashboard_model_list_view_root", children: [
|
|
29872
|
-
/* @__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: [
|
|
29873
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-left", "data-id": "dashboard_model_list_view_header_name", children: "Model Name" }),
|
|
29874
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-center", "data-id": "dashboard_model_list_view_header_runs", children: "Runs" }),
|
|
29875
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-center", "data-id": "dashboard_model_list_view_header_tokens", children: "Tokens" }),
|
|
29876
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-center", "data-id": "dashboard_model_list_view_header_response_time", children: "Response Time" })
|
|
29871
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: cn("w-full", className), "data-test-id": "dashboard_model_list_view_root", children: [
|
|
29872
|
+
/* @__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-test-id": "dashboard_model_list_view_header", children: [
|
|
29873
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-left", "data-test-id": "dashboard_model_list_view_header_name", children: "Model Name" }),
|
|
29874
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-center", "data-test-id": "dashboard_model_list_view_header_runs", children: "Runs" }),
|
|
29875
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-center", "data-test-id": "dashboard_model_list_view_header_tokens", children: "Tokens" }),
|
|
29876
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-center", "data-test-id": "dashboard_model_list_view_header_response_time", children: "Response Time" })
|
|
29877
29877
|
] }),
|
|
29878
|
-
/* @__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(
|
|
29878
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "divide-y divide-gray-100", "data-test-id": "dashboard_model_list_view_body", children: data.slice(0, visibleCount).map((model, index) => /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
29879
29879
|
"div",
|
|
29880
29880
|
{
|
|
29881
29881
|
className: "grid grid-cols-4 items-center gap-4 px-[16px] py-[12px] cursor-pointer transition-colors duration-150 border-b border-gray-200",
|
|
29882
|
-
"data-id": `dashboard_model_list_view_row_${index}`,
|
|
29882
|
+
"data-test-id": `dashboard_model_list_view_row_${index}`,
|
|
29883
29883
|
children: [
|
|
29884
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-[8px]", "data-id": `dashboard_model_list_view_row_name_${index}`, children: [
|
|
29885
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex-shrink-0", "data-id": `dashboard_model_list_view_row_icon_${index}`, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
29884
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-[8px]", "data-test-id": `dashboard_model_list_view_row_name_${index}`, children: [
|
|
29885
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex-shrink-0", "data-test-id": `dashboard_model_list_view_row_icon_${index}`, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
29886
29886
|
ModelIcon,
|
|
29887
29887
|
{
|
|
29888
29888
|
provider: model.provider
|
|
29889
29889
|
}
|
|
29890
29890
|
) }),
|
|
29891
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "min-w-0 flex-1 w-full", "data-id": `dashboard_model_list_view_row_name_text_${index}`, children: [
|
|
29892
|
-
/* @__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" }),
|
|
29893
|
-
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) })
|
|
29891
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "min-w-0 flex-1 w-full", "data-test-id": `dashboard_model_list_view_row_name_text_${index}`, children: [
|
|
29892
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-xs font-medium text-gray-700 truncate", "data-test-id": `dashboard_model_list_view_row_name_value_${index}`, children: model.name || model.modelName || "Unknown Model" }),
|
|
29893
|
+
model.provider && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-xs text-gray-500 truncate", "data-test-id": `dashboard_model_list_view_row_provider_${index}`, children: getProviderDisplayName(model.provider) })
|
|
29894
29894
|
] })
|
|
29895
29895
|
] }),
|
|
29896
|
-
/* @__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) }),
|
|
29897
|
-
/* @__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) }),
|
|
29898
|
-
/* @__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") })
|
|
29896
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-center font-medium text-xs text-gray-700", "data-test-id": `dashboard_model_list_view_row_runs_${index}`, children: formatValue2(model.runs || 0) }),
|
|
29897
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-center font-medium text-xs text-gray-700", "data-test-id": `dashboard_model_list_view_row_tokens_${index}`, children: formatValue2(model.tokens || model.totalTokens || 0) }),
|
|
29898
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-center font-medium text-xs text-gray-700", "data-test-id": `dashboard_model_list_view_row_response_time_${index}`, children: model.responseTime || (model.avgResponseTime ? `${model.avgResponseTime}ms` : "N/A") })
|
|
29899
29899
|
]
|
|
29900
29900
|
},
|
|
29901
29901
|
model.id || index
|
|
29902
29902
|
)) }),
|
|
29903
|
-
visibleCount < data.length && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex justify-center", "data-id": "dashboard_model_list_view_load_more_container", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
29903
|
+
visibleCount < data.length && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex justify-center", "data-test-id": "dashboard_model_list_view_load_more_container", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
29904
29904
|
"button",
|
|
29905
29905
|
{
|
|
29906
29906
|
onClick: loadMore,
|
|
29907
29907
|
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",
|
|
29908
|
-
"data-id": "dashboard_model_list_view_load_more_btn",
|
|
29908
|
+
"data-test-id": "dashboard_model_list_view_load_more_btn",
|
|
29909
29909
|
children: "Load 10 more"
|
|
29910
29910
|
}
|
|
29911
29911
|
) })
|
|
@@ -30027,7 +30027,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
30027
30027
|
{
|
|
30028
30028
|
className: "fixed inset-0 bg-black bg-opacity-50 z-40 transition-opacity duration-300",
|
|
30029
30029
|
onClick: handleClose,
|
|
30030
|
-
"data-id": "dashboard_runs_slider_overlay"
|
|
30030
|
+
"data-test-id": "dashboard_runs_slider_overlay"
|
|
30031
30031
|
}
|
|
30032
30032
|
),
|
|
30033
30033
|
/* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
@@ -30038,42 +30038,42 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
30038
30038
|
isOpen ? "translate-x-0" : "translate-x-full",
|
|
30039
30039
|
className
|
|
30040
30040
|
),
|
|
30041
|
-
"data-id": "dashboard_runs_slider_panel",
|
|
30041
|
+
"data-test-id": "dashboard_runs_slider_panel",
|
|
30042
30042
|
children: [
|
|
30043
|
-
/* @__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: [
|
|
30044
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("h2", { className: "text-lg font-semibold text-[#101828]", "data-id": "dashboard_runs_slider_title", children: config2.title }),
|
|
30043
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center justify-between px-6 py-3 border-b border-[#d0d5dd]", "data-test-id": "dashboard_runs_slider_header", children: [
|
|
30044
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("h2", { className: "text-lg font-semibold text-[#101828]", "data-test-id": "dashboard_runs_slider_title", children: config2.title }),
|
|
30045
30045
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
30046
30046
|
"button",
|
|
30047
30047
|
{
|
|
30048
30048
|
onClick: handleClose,
|
|
30049
30049
|
className: "p-2 hover:bg-gray-100 rounded-lg transition-colors",
|
|
30050
|
-
"data-id": "dashboard_runs_slider_close_btn",
|
|
30050
|
+
"data-test-id": "dashboard_runs_slider_close_btn",
|
|
30051
30051
|
children: /* @__PURE__ */ jsxRuntimeExports.jsx(X, { className: "h-5 w-5 text-[#101828]" })
|
|
30052
30052
|
}
|
|
30053
30053
|
)
|
|
30054
30054
|
] }),
|
|
30055
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex flex-col h-[calc(100%-64px)] p-6 gap-6", "data-id": "dashboard_runs_slider_content", children: [
|
|
30056
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center justify-between", "data-id": "dashboard_runs_slider_subheader", children: [
|
|
30057
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "text-sm font-medium text-[#344054]", "data-id": "dashboard_runs_slider_date_label", children: [
|
|
30055
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex flex-col h-[calc(100%-64px)] p-6 gap-6", "data-test-id": "dashboard_runs_slider_content", children: [
|
|
30056
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center justify-between", "data-test-id": "dashboard_runs_slider_subheader", children: [
|
|
30057
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "text-sm font-medium text-[#344054]", "data-test-id": "dashboard_runs_slider_date_label", children: [
|
|
30058
30058
|
config2.title,
|
|
30059
30059
|
" (",
|
|
30060
30060
|
formatDate(date2),
|
|
30061
30061
|
")"
|
|
30062
30062
|
] }),
|
|
30063
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "w-[210px] relative filter-dropdown", "data-id": "dashboard_runs_slider_filter_dropdown", children: [
|
|
30063
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "w-[210px] relative filter-dropdown", "data-test-id": "dashboard_runs_slider_filter_dropdown", children: [
|
|
30064
30064
|
/* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
30065
30065
|
"button",
|
|
30066
30066
|
{
|
|
30067
30067
|
onClick: () => setShowFilterDropdown(!showFilterDropdown),
|
|
30068
30068
|
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",
|
|
30069
|
-
"data-id": "dashboard_runs_slider_filter_btn",
|
|
30069
|
+
"data-test-id": "dashboard_runs_slider_filter_btn",
|
|
30070
30070
|
children: [
|
|
30071
30071
|
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { children: selectedFilterLabel }),
|
|
30072
30072
|
/* @__PURE__ */ jsxRuntimeExports.jsx(ChevronDown, { className: "h-4 w-4 text-[#101828]" })
|
|
30073
30073
|
]
|
|
30074
30074
|
}
|
|
30075
30075
|
),
|
|
30076
|
-
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(
|
|
30076
|
+
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-test-id": "dashboard_runs_slider_filter_menu", children: filterOptions.map((option) => /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
30077
30077
|
"button",
|
|
30078
30078
|
{
|
|
30079
30079
|
onClick: () => handleFilterSelect(option.value),
|
|
@@ -30081,26 +30081,26 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
30081
30081
|
"w-full px-3.5 py-2.5 text-left text-sm hover:bg-gray-50 transition-colors",
|
|
30082
30082
|
selectedFilter === option.value ? "bg-blue-50 text-blue-700" : "text-[#101828]"
|
|
30083
30083
|
),
|
|
30084
|
-
"data-id": `dashboard_runs_slider_filter_option_${option.value}`,
|
|
30084
|
+
"data-test-id": `dashboard_runs_slider_filter_option_${option.value}`,
|
|
30085
30085
|
children: option.label
|
|
30086
30086
|
},
|
|
30087
30087
|
option.value
|
|
30088
30088
|
)) })
|
|
30089
30089
|
] })
|
|
30090
30090
|
] }),
|
|
30091
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex-1 overflow-hidden", "data-id": "dashboard_runs_slider_table_container", children: [
|
|
30092
|
-
/* @__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: [
|
|
30093
|
-
/* @__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" }) }),
|
|
30094
|
-
/* @__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" }) }),
|
|
30095
|
-
/* @__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" }) })
|
|
30091
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex-1 overflow-hidden", "data-test-id": "dashboard_runs_slider_table_container", children: [
|
|
30092
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "bg-[#f9fafb] border-b border-[#eaecf0] px-2 py-2", "data-test-id": "dashboard_runs_slider_table_header", children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "grid grid-cols-4 gap-3 items-center", "data-test-id": "dashboard_runs_slider_table_header_row", children: [
|
|
30093
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "col-span-2 px-0 py-2", "data-test-id": "dashboard_runs_slider_table_header_name", children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-xs font-medium text-[#475467]", children: "Name" }) }),
|
|
30094
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex justify-center px-0 py-2", "data-test-id": "dashboard_runs_slider_table_header_runs", children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-xs font-medium text-[#475467]", children: "Runs" }) }),
|
|
30095
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex justify-center px-0 py-2", "data-test-id": "dashboard_runs_slider_table_header_response_time", children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-xs font-medium text-[#475467]", children: "Response Time" }) })
|
|
30096
30096
|
] }) }),
|
|
30097
|
-
/* @__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: [
|
|
30098
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs("h3", { className: "text-md font-medium text-gray-900 mb-[8px]", "data-id": "dashboard_runs_slider_empty_state_title", children: [
|
|
30097
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "overflow-y-auto max-h-[calc(100%-40px)]", "data-test-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-test-id": "dashboard_runs_slider_empty_state", children: [
|
|
30098
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("h3", { className: "text-md font-medium text-gray-900 mb-[8px]", "data-test-id": "dashboard_runs_slider_empty_state_title", children: [
|
|
30099
30099
|
"No ",
|
|
30100
30100
|
config2.title.toLowerCase(),
|
|
30101
30101
|
" for this date"
|
|
30102
30102
|
] }),
|
|
30103
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs("p", { className: "text-xs text-gray-500", "data-id": "dashboard_runs_slider_empty_state_message", children: [
|
|
30103
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("p", { className: "text-xs text-gray-500", "data-test-id": "dashboard_runs_slider_empty_state_message", children: [
|
|
30104
30104
|
"There were no ",
|
|
30105
30105
|
config2.title.toLowerCase(),
|
|
30106
30106
|
" recorded on ",
|
|
@@ -30112,10 +30112,10 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
30112
30112
|
"div",
|
|
30113
30113
|
{
|
|
30114
30114
|
className: "grid grid-cols-4 gap-3 items-center px-2 py-3 border-b border-[#eaecf0] hover:bg-gray-50 transition-colors",
|
|
30115
|
-
"data-id": `dashboard_runs_slider_table_row_${index}`,
|
|
30115
|
+
"data-test-id": `dashboard_runs_slider_table_row_${index}`,
|
|
30116
30116
|
children: [
|
|
30117
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "col-span-2 flex items-center gap-2", "data-id": `dashboard_runs_slider_table_row_name_${index}`, children: [
|
|
30118
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex-shrink-0", "data-id": `dashboard_runs_slider_table_row_avatar_${index}`, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
30117
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "col-span-2 flex items-center gap-2", "data-test-id": `dashboard_runs_slider_table_row_name_${index}`, children: [
|
|
30118
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex-shrink-0", "data-test-id": `dashboard_runs_slider_table_row_avatar_${index}`, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
30119
30119
|
IconPreview,
|
|
30120
30120
|
{
|
|
30121
30121
|
icon: item.icon,
|
|
@@ -30127,23 +30127,23 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
30127
30127
|
modelName: item.modelName
|
|
30128
30128
|
}
|
|
30129
30129
|
) }),
|
|
30130
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "min-w-0 flex-1", "data-id": `dashboard_runs_slider_table_row_name_text_${index}`, children: [
|
|
30130
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "min-w-0 flex-1", "data-test-id": `dashboard_runs_slider_table_row_name_text_${index}`, children: [
|
|
30131
30131
|
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-sm font-medium text-[#101828] truncate", children: item.name }),
|
|
30132
|
-
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 })
|
|
30132
|
+
metricType === "modelRuns" && item.provider && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-xs text-[#475467] truncate", "data-test-id": `dashboard_runs_slider_table_row_provider_${index}`, children: item.provider })
|
|
30133
30133
|
] })
|
|
30134
30134
|
] }),
|
|
30135
|
-
/* @__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) }) }),
|
|
30136
|
-
/* @__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 }) })
|
|
30135
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex justify-center", "data-test-id": `dashboard_runs_slider_table_row_runs_${index}`, children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-xs font-medium text-[#475467]", children: formatValue(item.runs) }) }),
|
|
30136
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex justify-center", "data-test-id": `dashboard_runs_slider_table_row_response_time_${index}`, children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-xs font-medium text-[#475467]", children: item.responseTime }) })
|
|
30137
30137
|
]
|
|
30138
30138
|
},
|
|
30139
30139
|
item.id || index
|
|
30140
30140
|
)),
|
|
30141
|
-
visibleCount < filteredData.length && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex justify-center", "data-id": "dashboard_runs_slider_load_more_container", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
30141
|
+
visibleCount < filteredData.length && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex justify-center", "data-test-id": "dashboard_runs_slider_load_more_container", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
30142
30142
|
"button",
|
|
30143
30143
|
{
|
|
30144
30144
|
onClick: loadMore,
|
|
30145
30145
|
className: "bg-white border border-[#d0d5dd] rounded px-3 py-1 text-xs font-medium text-[#344054] hover:bg-gray-50 transition-colors",
|
|
30146
|
-
"data-id": "dashboard_runs_slider_load_more_btn",
|
|
30146
|
+
"data-test-id": "dashboard_runs_slider_load_more_btn",
|
|
30147
30147
|
children: "Load 10 more"
|
|
30148
30148
|
}
|
|
30149
30149
|
) })
|
|
@@ -31761,7 +31761,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
31761
31761
|
}
|
|
31762
31762
|
};
|
|
31763
31763
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
31764
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: cn("w-full", className), "data-id": "dashboard_view_renderer_root", children: renderView() }),
|
|
31764
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: cn("w-full", className), "data-test-id": "dashboard_view_renderer_root", children: renderView() }),
|
|
31765
31765
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
31766
31766
|
RunsSlider,
|
|
31767
31767
|
{
|
|
@@ -32174,7 +32174,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
32174
32174
|
}
|
|
32175
32175
|
return { maxItems: 40, maxLabelLength: 25 };
|
|
32176
32176
|
};
|
|
32177
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: cn("flex items-center gap-3", className), "data-id": "dashboard_section_controls", children: [
|
|
32177
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: cn("flex items-center gap-3", className), "data-test-id": "dashboard_section_controls", children: [
|
|
32178
32178
|
dropdown && /* @__PURE__ */ jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, { children: dropdown.multiSelect ? /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
32179
32179
|
MultiSelect,
|
|
32180
32180
|
{
|
|
@@ -32202,7 +32202,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
32202
32202
|
className: "w-48"
|
|
32203
32203
|
}
|
|
32204
32204
|
) }),
|
|
32205
|
-
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(
|
|
32205
|
+
buttons && buttons.length > 0 && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex items-center border border-gray-200 rounded-lg overflow-hidden", "data-test-id": "dashboard_section_controls_button_group", children: buttons.map((button, index) => /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
32206
32206
|
"button",
|
|
32207
32207
|
{
|
|
32208
32208
|
onClick: () => {
|
|
@@ -32215,12 +32215,12 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
32215
32215
|
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",
|
|
32216
32216
|
index > 0 && "border-l border-gray-200"
|
|
32217
32217
|
),
|
|
32218
|
-
"data-id": `dashboard_section_controls_btn_${button.value}`,
|
|
32218
|
+
"data-test-id": `dashboard_section_controls_btn_${button.value}`,
|
|
32219
32219
|
children: button.icon && /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "mr-[8px]", children: button.icon })
|
|
32220
32220
|
},
|
|
32221
32221
|
button.value
|
|
32222
32222
|
)) }),
|
|
32223
|
-
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: [
|
|
32223
|
+
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-test-id": "dashboard_section_controls_view_toggle", children: [
|
|
32224
32224
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
32225
32225
|
"button",
|
|
32226
32226
|
{
|
|
@@ -32233,7 +32233,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
32233
32233
|
"hover:bg-white ",
|
|
32234
32234
|
toggle.chartView ? "bg-white text-gray-900 shadow-md" : "text-gray-500 bg-white"
|
|
32235
32235
|
),
|
|
32236
|
-
"data-id": "dashboard_section_controls_view_toggle_btn_chart",
|
|
32236
|
+
"data-test-id": "dashboard_section_controls_view_toggle_btn_chart",
|
|
32237
32237
|
children: /* @__PURE__ */ jsxRuntimeExports.jsx(BarChart3, { className: "w-[16px] h-[16px]" })
|
|
32238
32238
|
}
|
|
32239
32239
|
),
|
|
@@ -32249,7 +32249,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
32249
32249
|
"hover:bg-white ",
|
|
32250
32250
|
toggle.tableView ? "bg-white text-gray-900 shadow-md" : "text-gray-500 bg-white"
|
|
32251
32251
|
),
|
|
32252
|
-
"data-id": "dashboard_section_controls_view_toggle_btn_table",
|
|
32252
|
+
"data-test-id": "dashboard_section_controls_view_toggle_btn_table",
|
|
32253
32253
|
children: /* @__PURE__ */ jsxRuntimeExports.jsx(Table$1, { className: "w-[16px] h-[16px]" })
|
|
32254
32254
|
}
|
|
32255
32255
|
)
|
|
@@ -32863,18 +32863,18 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
32863
32863
|
gridColumn: (layout == null ? void 0 : layout.span) ? `span ${layout.span}` : void 0,
|
|
32864
32864
|
order: layout == null ? void 0 : layout.order
|
|
32865
32865
|
},
|
|
32866
|
-
"data-id": `dashboard_section_${id}`,
|
|
32866
|
+
"data-test-id": `dashboard_section_${id}`,
|
|
32867
32867
|
children: [
|
|
32868
|
-
title && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "w-full", "data-id": `dashboard_section_header_${id}`, children: [
|
|
32869
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("h1", { className: "text-md font-medium text-gray-700", "data-id": `dashboard_section_title_${id}`, children: title }),
|
|
32870
|
-
description && /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-xs text-gray-500", "data-id": `dashboard_section_description_${id}`, children: description })
|
|
32868
|
+
title && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "w-full", "data-test-id": `dashboard_section_header_${id}`, children: [
|
|
32869
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("h1", { className: "text-md font-medium text-gray-700", "data-test-id": `dashboard_section_title_${id}`, children: title }),
|
|
32870
|
+
description && /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-xs text-gray-500", "data-test-id": `dashboard_section_description_${id}`, children: description })
|
|
32871
32871
|
] }),
|
|
32872
|
-
/* @__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: [
|
|
32873
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex-1", "data-id": `dashboard_section_metric_skeleton_${id}_0`, children: /* @__PURE__ */ jsxRuntimeExports.jsx(MetricCardSkeleton, {}) }),
|
|
32874
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex-1", "data-id": `dashboard_section_metric_skeleton_${id}_1`, children: /* @__PURE__ */ jsxRuntimeExports.jsx(MetricCardSkeleton, {}) }),
|
|
32875
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex-1", "data-id": `dashboard_section_metric_skeleton_${id}_2`, children: /* @__PURE__ */ jsxRuntimeExports.jsx(MetricCardSkeleton, {}) }),
|
|
32876
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex-1", "data-id": `dashboard_section_metric_skeleton_${id}_3`, children: /* @__PURE__ */ jsxRuntimeExports.jsx(MetricCardSkeleton, {}) })
|
|
32877
|
-
] }) : getUpdatedMetrics().map((metric, index) => /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex-1", "data-id": `dashboard_section_metric_${id}_${index}`, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
32872
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex flex-col sm:flex-row gap-[16px]", "data-test-id": `dashboard_section_metrics_${id}`, children: isLoading ? /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
32873
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex-1", "data-test-id": `dashboard_section_metric_skeleton_${id}_0`, children: /* @__PURE__ */ jsxRuntimeExports.jsx(MetricCardSkeleton, {}) }),
|
|
32874
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex-1", "data-test-id": `dashboard_section_metric_skeleton_${id}_1`, children: /* @__PURE__ */ jsxRuntimeExports.jsx(MetricCardSkeleton, {}) }),
|
|
32875
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex-1", "data-test-id": `dashboard_section_metric_skeleton_${id}_2`, children: /* @__PURE__ */ jsxRuntimeExports.jsx(MetricCardSkeleton, {}) }),
|
|
32876
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex-1", "data-test-id": `dashboard_section_metric_skeleton_${id}_3`, children: /* @__PURE__ */ jsxRuntimeExports.jsx(MetricCardSkeleton, {}) })
|
|
32877
|
+
] }) : getUpdatedMetrics().map((metric, index) => /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex-1", "data-test-id": `dashboard_section_metric_${id}_${index}`, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
32878
32878
|
MetricCard,
|
|
32879
32879
|
{
|
|
32880
32880
|
data: metric,
|
|
@@ -32882,8 +32882,8 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
32882
32882
|
isFirst: index === 0
|
|
32883
32883
|
}
|
|
32884
32884
|
) }, `${id}-metric-${index}`)) }),
|
|
32885
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center justify-between", "data-id": `dashboard_section_subtitle_${id}`, children: [
|
|
32886
|
-
/* @__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 }) }),
|
|
32885
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center justify-between", "data-test-id": `dashboard_section_subtitle_${id}`, children: [
|
|
32886
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { "data-test-id": `dashboard_section_current_metric_${id}`, children: getCurrentMetric() && /* @__PURE__ */ jsxRuntimeExports.jsx("h3", { className: "text-md font-medium text-gray-700", "data-test-id": `dashboard_section_current_metric_title_${id}`, children: (_a = getCurrentMetric()) == null ? void 0 : _a.title }) }),
|
|
32887
32887
|
enhancedControls && /* @__PURE__ */ jsxRuntimeExports.jsx(SectionControls, { config: enhancedControls })
|
|
32888
32888
|
] }),
|
|
32889
32889
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
@@ -33052,12 +33052,6 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
33052
33052
|
var date2 = toDate(dirtyDate);
|
|
33053
33053
|
return !isNaN(Number(date2));
|
|
33054
33054
|
}
|
|
33055
|
-
function endOfDay(dirtyDate) {
|
|
33056
|
-
requiredArgs(1, arguments);
|
|
33057
|
-
var date2 = toDate(dirtyDate);
|
|
33058
|
-
date2.setHours(23, 59, 59, 999);
|
|
33059
|
-
return date2;
|
|
33060
|
-
}
|
|
33061
33055
|
function startOfMonth(dirtyDate) {
|
|
33062
33056
|
requiredArgs(1, arguments);
|
|
33063
33057
|
var date2 = toDate(dirtyDate);
|
|
@@ -34547,19 +34541,19 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
34547
34541
|
});
|
|
34548
34542
|
const presets = [
|
|
34549
34543
|
{
|
|
34550
|
-
label: "
|
|
34551
|
-
value: "
|
|
34544
|
+
label: "Last 24 hours",
|
|
34545
|
+
value: "24h",
|
|
34552
34546
|
dateRange: {
|
|
34553
|
-
from:
|
|
34547
|
+
from: subDays(/* @__PURE__ */ new Date(), 1),
|
|
34554
34548
|
to: /* @__PURE__ */ new Date()
|
|
34555
34549
|
}
|
|
34556
34550
|
},
|
|
34557
34551
|
{
|
|
34558
|
-
label: "
|
|
34559
|
-
value: "
|
|
34552
|
+
label: "Last 48 hours",
|
|
34553
|
+
value: "48h",
|
|
34560
34554
|
dateRange: {
|
|
34561
|
-
from:
|
|
34562
|
-
to:
|
|
34555
|
+
from: subDays(/* @__PURE__ */ new Date(), 2),
|
|
34556
|
+
to: /* @__PURE__ */ new Date()
|
|
34563
34557
|
}
|
|
34564
34558
|
},
|
|
34565
34559
|
{
|
|
@@ -35236,6 +35230,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
35236
35230
|
} else if (typeof value === "string") {
|
|
35237
35231
|
const daysMap = {
|
|
35238
35232
|
"24h": 1,
|
|
35233
|
+
"48h": 2,
|
|
35239
35234
|
"7d": 7,
|
|
35240
35235
|
"30d": 30,
|
|
35241
35236
|
"90d": 90
|
|
@@ -35269,13 +35264,13 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
35269
35264
|
onExport == null ? void 0 : onExport();
|
|
35270
35265
|
};
|
|
35271
35266
|
const isAnyChartLoading = Object.values(sectionChartLoading).some((loading) => loading);
|
|
35272
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: cn("w-full h-full flex flex-col overflow-hidden", className), "data-id": "dashboard_root", children: [
|
|
35273
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex flex-col gap-2 w-full p-[24px] pb-[12px]", "data-id": "dashboard_header", children: [
|
|
35274
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("h1", { className: "text-lg font-bold text-gray-900 w-full", "data-id": "dashboard_title", children: title }),
|
|
35275
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-2 w-full", "data-id": "dashboard_header_content", children: [
|
|
35276
|
-
subtitle && /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-gray-500 text-xs w-full", "data-id": "dashboard_subtitle", children: subtitle }),
|
|
35277
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-2 justify-end flex-shrink-0", "data-id": "dashboard_global_controls", children: [
|
|
35278
|
-
(isInitialLoading || isAnyChartLoading) && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-2 text-sm medium text-gray-500", "data-id": "dashboard_loading_indicator", children: [
|
|
35267
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: cn("w-full h-full flex flex-col overflow-hidden", className), "data-test-id": "dashboard_root", children: [
|
|
35268
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex flex-col gap-2 w-full p-[24px] pb-[12px]", "data-test-id": "dashboard_header", children: [
|
|
35269
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("h1", { className: "text-lg font-bold text-gray-900 w-full", "data-test-id": "dashboard_title", children: title }),
|
|
35270
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-2 w-full", "data-test-id": "dashboard_header_content", children: [
|
|
35271
|
+
subtitle && /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-gray-500 text-xs w-full", "data-test-id": "dashboard_subtitle", children: subtitle }),
|
|
35272
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-2 justify-end flex-shrink-0", "data-test-id": "dashboard_global_controls", children: [
|
|
35273
|
+
(isInitialLoading || isAnyChartLoading) && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-2 text-sm medium text-gray-500", "data-test-id": "dashboard_loading_indicator", children: [
|
|
35279
35274
|
/* @__PURE__ */ jsxRuntimeExports.jsx(RefreshCw, { className: "h-[16px] w-[16px] animate-spin" }),
|
|
35280
35275
|
"Loading..."
|
|
35281
35276
|
] }),
|
|
@@ -35354,7 +35349,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
35354
35349
|
gridTemplateColumns: layout.responsive ? void 0 : `repeat(${layout.columns}, minmax(0, 1fr))`,
|
|
35355
35350
|
gap: layout.gap ? `${layout.gap}px` : void 0
|
|
35356
35351
|
},
|
|
35357
|
-
"data-id": "dashboard_sections_grid",
|
|
35352
|
+
"data-test-id": "dashboard_sections_grid",
|
|
35358
35353
|
children: dynamicSections.map((section) => {
|
|
35359
35354
|
var _a2, _b, _c, _d;
|
|
35360
35355
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
@@ -35386,7 +35381,8 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
35386
35381
|
console.log("🔧 TracingApiService initialized:", {
|
|
35387
35382
|
tracingUrl: config2.tracingUrl,
|
|
35388
35383
|
projectId: config2.projectId,
|
|
35389
|
-
hasAuth: !!config2.headers.authorization
|
|
35384
|
+
hasAuth: !!config2.headers.authorization,
|
|
35385
|
+
hasDynamicAuth: !!config2.getAuthHeaders
|
|
35390
35386
|
});
|
|
35391
35387
|
}
|
|
35392
35388
|
/**
|
|
@@ -35396,15 +35392,36 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
35396
35392
|
const encodedInput = encodeURIComponent(JSON.stringify(input));
|
|
35397
35393
|
return `${this.config.tracingUrl}/tracing/api/trpc/${endpoint}?input=${encodedInput}`;
|
|
35398
35394
|
}
|
|
35395
|
+
/**
|
|
35396
|
+
* Get current headers, refreshing auth token if callback is provided
|
|
35397
|
+
*/
|
|
35398
|
+
async getHeaders() {
|
|
35399
|
+
if (this.config.getAuthHeaders) {
|
|
35400
|
+
try {
|
|
35401
|
+
const authHeaders = await this.config.getAuthHeaders();
|
|
35402
|
+
return {
|
|
35403
|
+
...this.config.headers,
|
|
35404
|
+
authorization: authHeaders.authorization,
|
|
35405
|
+
accountid: authHeaders.accountid,
|
|
35406
|
+
userId: authHeaders.userId || this.config.headers.userId || ""
|
|
35407
|
+
};
|
|
35408
|
+
} catch (error) {
|
|
35409
|
+
console.warn("⚠️ Failed to get fresh auth headers, using static headers:", error);
|
|
35410
|
+
return this.config.headers;
|
|
35411
|
+
}
|
|
35412
|
+
}
|
|
35413
|
+
return this.config.headers;
|
|
35414
|
+
}
|
|
35399
35415
|
/**
|
|
35400
35416
|
* Helper to make GET request with proper headers
|
|
35401
35417
|
*/
|
|
35402
35418
|
async makeRequest(url) {
|
|
35403
35419
|
var _a, _b, _c;
|
|
35404
35420
|
console.log("📤 API Request:", url);
|
|
35421
|
+
const headers = await this.getHeaders();
|
|
35405
35422
|
const response = await fetch(url, {
|
|
35406
35423
|
method: "GET",
|
|
35407
|
-
headers
|
|
35424
|
+
headers
|
|
35408
35425
|
});
|
|
35409
35426
|
console.log("📥 API Response status:", response.status);
|
|
35410
35427
|
if (!response.ok) {
|
|
@@ -35791,9 +35808,10 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
35791
35808
|
try {
|
|
35792
35809
|
const url = `${this.config.tracingUrl}/aaa/api/v1/apps/${this.config.projectId}/environments?rnd=${Math.random().toString(36).substring(2, 8)}`;
|
|
35793
35810
|
console.log("🌍 Fetching environments for project:", this.config.projectId);
|
|
35811
|
+
const headers = await this.getHeaders();
|
|
35794
35812
|
const response = await fetch(url, {
|
|
35795
35813
|
method: "GET",
|
|
35796
|
-
headers
|
|
35814
|
+
headers
|
|
35797
35815
|
});
|
|
35798
35816
|
if (!response.ok) {
|
|
35799
35817
|
const errorText = await response.text();
|
|
@@ -104881,11 +104899,11 @@ For more info see: https://www.ag-grid.com/javascript-grid/modules/`;
|
|
|
104881
104899
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
104882
104900
|
TailwindDateRangePicker,
|
|
104883
104901
|
{
|
|
104884
|
-
defaultValue: typeof timeRange === "string" ? timeRange === "7 days" ? "7d" : timeRange === "30 days" ? "30d" : timeRange === "90 days" ? "30d" : timeRange === "24 hours" ? "
|
|
104902
|
+
defaultValue: typeof timeRange === "string" ? timeRange === "7 days" ? "7d" : timeRange === "30 days" ? "30d" : timeRange === "90 days" ? "30d" : timeRange === "24 hours" ? "24h" : timeRange === "1 hour" ? "24h" : "7d" : "7d",
|
|
104885
104903
|
value: typeof timeRange === "object" ? timeRange : void 0,
|
|
104886
104904
|
presetLabel: timeRangePresetLabel,
|
|
104887
104905
|
onDateRangeChange: handleDateRangeChange,
|
|
104888
|
-
className: "w-[
|
|
104906
|
+
className: "w-[190px]"
|
|
104889
104907
|
}
|
|
104890
104908
|
),
|
|
104891
104909
|
/* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
@@ -106567,27 +106585,16 @@ For more info see: https://www.ag-grid.com/javascript-grid/modules/`;
|
|
|
106567
106585
|
showTraceId && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex gap-[8px] items-center justify-end px-0 py-[4px] w-full", children: [
|
|
106568
106586
|
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-[10px] leading-[12px] text-[#98A2B3]", children: "Trace ID" }),
|
|
106569
106587
|
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "font-medium text-[10px] leading-[12px] text-[#667085]", children: trace.id }),
|
|
106570
|
-
/* @__PURE__ */ jsxRuntimeExports.
|
|
106571
|
-
|
|
106572
|
-
|
|
106573
|
-
|
|
106574
|
-
|
|
106575
|
-
|
|
106576
|
-
|
|
106577
|
-
|
|
106578
|
-
|
|
106579
|
-
|
|
106580
|
-
),
|
|
106581
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
106582
|
-
"button",
|
|
106583
|
-
{
|
|
106584
|
-
className: "p-0 opacity-60 hover:opacity-100 transition-opacity",
|
|
106585
|
-
title: "Open trace details",
|
|
106586
|
-
"data-test-id": `trace-tree-external-link-btn-${trace.id}`,
|
|
106587
|
-
children: /* @__PURE__ */ jsxRuntimeExports.jsx(ExternalLink, { className: "w-[12px] h-[12px] text-[#98A2B3]" })
|
|
106588
|
-
}
|
|
106589
|
-
)
|
|
106590
|
-
] })
|
|
106588
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
106589
|
+
"button",
|
|
106590
|
+
{
|
|
106591
|
+
onClick: handleCopyTraceId,
|
|
106592
|
+
className: "p-0 opacity-60 hover:opacity-100 transition-opacity",
|
|
106593
|
+
title: "Copy trace ID",
|
|
106594
|
+
"data-test-id": `trace-tree-copy-id-btn-${trace.id}`,
|
|
106595
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsx(Copy, { className: `w-[12px] h-[12px] ${copied ? "text-[#17B26A]" : "text-[#98A2B3]"}` })
|
|
106596
|
+
}
|
|
106597
|
+
)
|
|
106591
106598
|
] })
|
|
106592
106599
|
] });
|
|
106593
106600
|
}
|
|
@@ -106609,19 +106616,19 @@ For more info see: https://www.ag-grid.com/javascript-grid/modules/`;
|
|
|
106609
106616
|
case "sm":
|
|
106610
106617
|
return {
|
|
106611
106618
|
button: "p-1",
|
|
106612
|
-
|
|
106619
|
+
icon: "w-[12px] h-[12px]",
|
|
106613
106620
|
tooltip: "text-xs py-1 px-2"
|
|
106614
106621
|
};
|
|
106615
106622
|
case "lg":
|
|
106616
106623
|
return {
|
|
106617
106624
|
button: "p-2",
|
|
106618
|
-
|
|
106625
|
+
icon: "w-[20px] h-[20px]",
|
|
106619
106626
|
tooltip: "text-sm py-2 px-3"
|
|
106620
106627
|
};
|
|
106621
106628
|
default:
|
|
106622
106629
|
return {
|
|
106623
106630
|
button: "p-1.5",
|
|
106624
|
-
|
|
106631
|
+
icon: "w-[16px] h-[16px]",
|
|
106625
106632
|
tooltip: "text-xs py-1 px-2"
|
|
106626
106633
|
};
|
|
106627
106634
|
}
|
|
@@ -106684,7 +106691,7 @@ For more info see: https://www.ag-grid.com/javascript-grid/modules/`;
|
|
|
106684
106691
|
onClick: copyToClipboard2,
|
|
106685
106692
|
className: `${sizeClasses2.button} hover:bg-gray-100 rounded transition-colors ${className}`,
|
|
106686
106693
|
title,
|
|
106687
|
-
children: /* @__PURE__ */ jsxRuntimeExports.jsx(Copy, { className:
|
|
106694
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsx(Copy, { className: `${sizeClasses2.icon} text-gray-400 ${iconClassName}`, style: iconStyle })
|
|
106688
106695
|
}
|
|
106689
106696
|
),
|
|
106690
106697
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
@@ -107818,7 +107825,7 @@ For more info see: https://www.ag-grid.com/javascript-grid/modules/`;
|
|
|
107818
107825
|
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center justify-between p-4 border-b border-gray-700", children: [
|
|
107819
107826
|
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-4", children: [
|
|
107820
107827
|
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
107821
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(FileCode, {
|
|
107828
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(FileCode, { className: "w-[20px] h-[20px] text-[#9CA3AF]" }),
|
|
107822
107829
|
/* @__PURE__ */ jsxRuntimeExports.jsx("h3", { className: "text-lg font-semibold text-gray-100", children: title })
|
|
107823
107830
|
] }),
|
|
107824
107831
|
isValidJson && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-1 ml-4 pl-4 border-l border-gray-700", children: [
|
|
@@ -107828,7 +107835,7 @@ For more info see: https://www.ag-grid.com/javascript-grid/modules/`;
|
|
|
107828
107835
|
onClick: () => setViewMode("interactive"),
|
|
107829
107836
|
className: `p-1.5 hover:bg-gray-700 rounded transition-colors ${viewMode === "interactive" ? "bg-gray-700" : ""}`,
|
|
107830
107837
|
title: "Collapsed JSON view (fold/unfold)",
|
|
107831
|
-
children: /* @__PURE__ */ jsxRuntimeExports.jsx(ListTree, {
|
|
107838
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsx(ListTree, { className: "w-[16px] h-[16px] text-[#9CA3AF]" })
|
|
107832
107839
|
}
|
|
107833
107840
|
),
|
|
107834
107841
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
@@ -107837,7 +107844,7 @@ For more info see: https://www.ag-grid.com/javascript-grid/modules/`;
|
|
|
107837
107844
|
onClick: () => setViewMode("plain"),
|
|
107838
107845
|
className: `p-1.5 hover:bg-gray-700 rounded transition-colors ${viewMode === "plain" ? "bg-gray-700" : ""}`,
|
|
107839
107846
|
title: "Plain JSON view",
|
|
107840
|
-
children: /* @__PURE__ */ jsxRuntimeExports.jsx(AlignLeft, {
|
|
107847
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsx(AlignLeft, { className: "w-[16px] h-[16px] text-[#9CA3AF]" })
|
|
107841
107848
|
}
|
|
107842
107849
|
)
|
|
107843
107850
|
] })
|
|
@@ -107858,7 +107865,7 @@ For more info see: https://www.ag-grid.com/javascript-grid/modules/`;
|
|
|
107858
107865
|
onClick: onClose,
|
|
107859
107866
|
className: "p-2 hover:bg-gray-700 rounded-lg transition-colors",
|
|
107860
107867
|
title: "Close",
|
|
107861
|
-
children: /* @__PURE__ */ jsxRuntimeExports.jsx(X, {
|
|
107868
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsx(X, { className: "w-[16px] h-[16px] text-[#9CA3AF]" })
|
|
107862
107869
|
}
|
|
107863
107870
|
)
|
|
107864
107871
|
] })
|
|
@@ -107936,7 +107943,7 @@ For more info see: https://www.ag-grid.com/javascript-grid/modules/`;
|
|
|
107936
107943
|
onClick: () => onToggleKey == null ? void 0 : onToggleKey(fullPath),
|
|
107937
107944
|
className: `flex items-center gap-1 p-1 rounded transition-colors ${darkMode ? "hover:bg-gray-700" : "hover:bg-gray-100"}`,
|
|
107938
107945
|
children: [
|
|
107939
|
-
isExpanded ? /* @__PURE__ */ jsxRuntimeExports.jsx(ChevronDown, {
|
|
107946
|
+
isExpanded ? /* @__PURE__ */ jsxRuntimeExports.jsx(ChevronDown, { className: `w-[12px] h-[12px] ${darkMode ? "text-[#6B7280]" : "text-[#9CA3AF]"}` }) : /* @__PURE__ */ jsxRuntimeExports.jsx(ChevronRight, { className: `w-[12px] h-[12px] ${darkMode ? "text-[#6B7280]" : "text-[#9CA3AF]"}` }),
|
|
107940
107947
|
/* @__PURE__ */ jsxRuntimeExports.jsxs("span", { className: `text-xs ${darkMode ? "text-gray-300" : "text-gray-600"}`, children: [
|
|
107941
107948
|
"Array[",
|
|
107942
107949
|
value.length,
|
|
@@ -107971,7 +107978,7 @@ For more info see: https://www.ag-grid.com/javascript-grid/modules/`;
|
|
|
107971
107978
|
onClick: () => onToggleKey == null ? void 0 : onToggleKey(fullPath),
|
|
107972
107979
|
className: `flex items-center gap-1 p-1 rounded transition-colors ${darkMode ? "hover:bg-gray-700" : "hover:bg-gray-100"}`,
|
|
107973
107980
|
children: [
|
|
107974
|
-
isExpanded ? /* @__PURE__ */ jsxRuntimeExports.jsx(ChevronDown, {
|
|
107981
|
+
isExpanded ? /* @__PURE__ */ jsxRuntimeExports.jsx(ChevronDown, { className: `w-[12px] h-[12px] ${darkMode ? "text-[#6B7280]" : "text-[#9CA3AF]"}` }) : /* @__PURE__ */ jsxRuntimeExports.jsx(ChevronRight, { className: `w-[12px] h-[12px] ${darkMode ? "text-[#6B7280]" : "text-[#9CA3AF]"}` }),
|
|
107975
107982
|
/* @__PURE__ */ jsxRuntimeExports.jsxs("span", { className: `text-xs ${darkMode ? "text-gray-300" : "text-gray-600"}`, children: [
|
|
107976
107983
|
"Object ",
|
|
107977
107984
|
"{",
|
|
@@ -108138,17 +108145,17 @@ For more info see: https://www.ag-grid.com/javascript-grid/modules/`;
|
|
|
108138
108145
|
] });
|
|
108139
108146
|
}
|
|
108140
108147
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
108141
|
-
/* @__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: [
|
|
108142
|
-
showHeader && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "bg-[#F9FAFB] border_secondary_bottom px-4 py-2 flex items-center justify-between", "data-id": "data_viewer_header", children: [
|
|
108143
|
-
isValidJson && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-2", "data-id": "data_viewer_header_view_toggles", children: [
|
|
108148
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: `${darkMode ? "bg-gray-800 border-gray-700" : "bg-white border-gray-200"} border rounded-md overflow-hidden ${className}`, "data-test-id": "data_viewer_root", children: [
|
|
108149
|
+
showHeader && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "bg-[#F9FAFB] border_secondary_bottom px-4 py-2 flex items-center justify-between", "data-test-id": "data_viewer_header", children: [
|
|
108150
|
+
isValidJson && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-2", "data-test-id": "data_viewer_header_view_toggles", children: [
|
|
108144
108151
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
108145
108152
|
"button",
|
|
108146
108153
|
{
|
|
108147
108154
|
onClick: () => handleViewModeChange("interactive"),
|
|
108148
108155
|
className: `p-1 hover:bg-gray-200 rounded transition-colors ${currentViewMode === "interactive" ? "bg-gray-200" : ""}`,
|
|
108149
108156
|
title: "Collapsed JSON view (fold/unfold)",
|
|
108150
|
-
"data-id": "data_viewer_header_btn_interactive",
|
|
108151
|
-
children: /* @__PURE__ */ jsxRuntimeExports.jsx(ListTree, {
|
|
108157
|
+
"data-test-id": "data_viewer_header_btn_interactive",
|
|
108158
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsx(ListTree, { className: "w-[16px] h-[16px] text-[#98A2B3]" })
|
|
108152
108159
|
}
|
|
108153
108160
|
),
|
|
108154
108161
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
@@ -108157,21 +108164,21 @@ For more info see: https://www.ag-grid.com/javascript-grid/modules/`;
|
|
|
108157
108164
|
onClick: () => handleViewModeChange("plain"),
|
|
108158
108165
|
className: `p-1 hover:bg-gray-200 rounded transition-colors ${currentViewMode === "plain" ? "bg-gray-200" : ""}`,
|
|
108159
108166
|
title: "Plain JSON view",
|
|
108160
|
-
"data-id": "data_viewer_header_btn_plain",
|
|
108161
|
-
children: /* @__PURE__ */ jsxRuntimeExports.jsx(AlignLeft, {
|
|
108167
|
+
"data-test-id": "data_viewer_header_btn_plain",
|
|
108168
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsx(AlignLeft, { className: "w-[16px] h-[16px] text-[#98A2B3]" })
|
|
108162
108169
|
}
|
|
108163
108170
|
)
|
|
108164
108171
|
] }),
|
|
108165
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex-1", "data-id": "data_viewer_header_spacer" }),
|
|
108166
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-2", "data-id": "data_viewer_header_actions", children: [
|
|
108172
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex-1", "data-test-id": "data_viewer_header_spacer" }),
|
|
108173
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-2", "data-test-id": "data_viewer_header_actions", children: [
|
|
108167
108174
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
108168
108175
|
"button",
|
|
108169
108176
|
{
|
|
108170
108177
|
onClick: handleExpand,
|
|
108171
108178
|
className: "p-1 hover:bg-gray-200 rounded transition-colors",
|
|
108172
108179
|
title: "Expand to full screen",
|
|
108173
|
-
"data-id": "data_viewer_header_btn_expand",
|
|
108174
|
-
children: /* @__PURE__ */ jsxRuntimeExports.jsx(Maximize2, {
|
|
108180
|
+
"data-test-id": "data_viewer_header_btn_expand",
|
|
108181
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsx(Maximize2, { className: "w-[16px] h-[16px] text-[#98A2B3]" })
|
|
108175
108182
|
}
|
|
108176
108183
|
),
|
|
108177
108184
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
@@ -108190,7 +108197,7 @@ For more info see: https://www.ag-grid.com/javascript-grid/modules/`;
|
|
|
108190
108197
|
{
|
|
108191
108198
|
className: `${padding ? padding : "p-3"} overflow-auto ${darkMode ? "bg-gray-800" : "bg-white"}`,
|
|
108192
108199
|
style: { maxHeight },
|
|
108193
|
-
"data-id": "data_viewer_content",
|
|
108200
|
+
"data-test-id": "data_viewer_content",
|
|
108194
108201
|
children: [
|
|
108195
108202
|
isValidJson ? currentViewMode === "interactive" ? useEnhancedJsonView ? /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
108196
108203
|
JsonView,
|
|
@@ -108218,7 +108225,7 @@ For more info see: https://www.ag-grid.com/javascript-grid/modules/`;
|
|
|
108218
108225
|
darkMode
|
|
108219
108226
|
}
|
|
108220
108227
|
) : /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: `text-xs whitespace-pre font-mono ${darkMode ? "text-gray-300" : "text-[#344054]"}`, children: stringifyJsonNode(parsedData) }) : /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: `text-xs whitespace-pre-wrap font-mono ${darkMode ? "text-gray-300" : "text-[#344054]"}`, children: displayContent }),
|
|
108221
|
-
!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" })
|
|
108228
|
+
!displayContent && displayContent !== 0 && displayContent !== false && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: `text-center text-sm py-8 ${darkMode ? "text-gray-500" : "text-gray-400"}`, "data-test-id": "data_viewer_empty_state", children: "No data available" })
|
|
108222
108229
|
]
|
|
108223
108230
|
}
|
|
108224
108231
|
)
|
|
@@ -109211,45 +109218,61 @@ For more info see: https://www.ag-grid.com/javascript-grid/modules/`;
|
|
|
109211
109218
|
] })
|
|
109212
109219
|
] }),
|
|
109213
109220
|
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex-1 flex overflow-hidden", children: [
|
|
109214
|
-
/* @__PURE__ */ jsxRuntimeExports.
|
|
109215
|
-
|
|
109216
|
-
|
|
109217
|
-
|
|
109218
|
-
|
|
109219
|
-
|
|
109220
|
-
const filteredObservations = getFilteredObservations(trace.id, observations);
|
|
109221
|
-
const autoExpandIds = index === 0 ? getAutoExpandIds(trace.id, filteredObservations) : void 0;
|
|
109222
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
109223
|
-
TraceTree,
|
|
109224
|
-
{
|
|
109225
|
-
trace,
|
|
109226
|
-
observations: filteredObservations,
|
|
109227
|
-
isExpanded: mode === "trace" || index === 0,
|
|
109228
|
-
selectedNodeId: selectedNode && "traceId" in selectedNode ? selectedNode.id : null,
|
|
109229
|
-
onNodeSelect: handleNodeSelect,
|
|
109230
|
-
onExpandToggle: () => handleTraceExpand(trace.id, trace.timestamp),
|
|
109231
|
-
showTraceId: mode === "session",
|
|
109232
|
-
isLoading: isLoadingObservations,
|
|
109233
|
-
defaultExpandedNodeIds: autoExpandIds
|
|
109234
|
-
},
|
|
109235
|
-
trace.id
|
|
109236
|
-
);
|
|
109237
|
-
}),
|
|
109238
|
-
mode === "session" && progressiveState.pendingTraceIds.length > 0 && /* @__PURE__ */ jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, { children: progressiveState.pendingTraceIds.map((pendingTraceId, index) => {
|
|
109239
|
-
const isFirstPending = index === 0 && !progressiveState.firstTraceLoaded;
|
|
109240
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
109241
|
-
TreeSkeleton,
|
|
109221
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "w-[480px] min-w-[400px] max-w-[600px] border-r border-[#E4E7EC] flex flex-col bg-[#F9FAFB] overflow-auto", children: [
|
|
109222
|
+
mode === "session" && sessionId && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-[8px] px-[24px] py-[4px] bg-white border-b border-[#EAECF0]", children: [
|
|
109223
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-[12px] text-[#667085]", children: "Session ID" }),
|
|
109224
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "font-mono text-[12px] text-[#344054]", children: sessionId }),
|
|
109225
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
109226
|
+
"button",
|
|
109242
109227
|
{
|
|
109243
|
-
|
|
109244
|
-
|
|
109245
|
-
|
|
109246
|
-
|
|
109247
|
-
className: "
|
|
109248
|
-
}
|
|
109249
|
-
|
|
109250
|
-
|
|
109251
|
-
|
|
109252
|
-
|
|
109228
|
+
onClick: handleCopyId,
|
|
109229
|
+
className: "p-[2px] rounded-[4px] hover:bg-[#F2F4F7] transition-opacity opacity-60 hover:opacity-100",
|
|
109230
|
+
title: "Copy Session ID",
|
|
109231
|
+
"data-test-id": "session-id-copy-btn",
|
|
109232
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsx(Copy, { className: `w-[12px] h-[12px] ${copiedId ? "text-[#17B26A]" : "text-[#98A2B3]"}` })
|
|
109233
|
+
}
|
|
109234
|
+
)
|
|
109235
|
+
] }),
|
|
109236
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex-1 p-[16px]", children: [
|
|
109237
|
+
traces.length === 0 && loadingState === "success" && progressiveState.traceCount === 0 && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "py-[32px] text-center text-[13px] text-[#667085]", children: "No traces available" }),
|
|
109238
|
+
traces.map((trace, index) => {
|
|
109239
|
+
var _a, _b, _c, _d;
|
|
109240
|
+
const observations = ((_b = (_a = traceObservations[trace.id]) == null ? void 0 : _a.observations) == null ? void 0 : _b.length) > 0 ? traceObservations[trace.id].observations : mode === "trace" ? (traceData == null ? void 0 : traceData.observations) || [] : [];
|
|
109241
|
+
const isLoadingObservations = ((_c = traceObservations[trace.id]) == null ? void 0 : _c.loading) || mode === "trace" && (((_d = traceData == null ? void 0 : traceData.observations) == null ? void 0 : _d.length) || 0) === 0;
|
|
109242
|
+
const filteredObservations = getFilteredObservations(trace.id, observations);
|
|
109243
|
+
const autoExpandIds = index === 0 ? getAutoExpandIds(trace.id, filteredObservations) : void 0;
|
|
109244
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
109245
|
+
TraceTree,
|
|
109246
|
+
{
|
|
109247
|
+
trace,
|
|
109248
|
+
observations: filteredObservations,
|
|
109249
|
+
isExpanded: mode === "trace" || index === 0,
|
|
109250
|
+
selectedNodeId: selectedNode && "traceId" in selectedNode ? selectedNode.id : null,
|
|
109251
|
+
onNodeSelect: handleNodeSelect,
|
|
109252
|
+
onExpandToggle: () => handleTraceExpand(trace.id, trace.timestamp),
|
|
109253
|
+
showTraceId: mode === "session",
|
|
109254
|
+
isLoading: isLoadingObservations,
|
|
109255
|
+
defaultExpandedNodeIds: autoExpandIds
|
|
109256
|
+
},
|
|
109257
|
+
trace.id
|
|
109258
|
+
);
|
|
109259
|
+
}),
|
|
109260
|
+
mode === "session" && progressiveState.pendingTraceIds.length > 0 && /* @__PURE__ */ jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, { children: progressiveState.pendingTraceIds.map((pendingTraceId, index) => {
|
|
109261
|
+
const isFirstPending = index === 0 && !progressiveState.firstTraceLoaded;
|
|
109262
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
109263
|
+
TreeSkeleton,
|
|
109264
|
+
{
|
|
109265
|
+
traceCount: 1,
|
|
109266
|
+
observationsPerTrace: 4,
|
|
109267
|
+
isExpanded: isFirstPending,
|
|
109268
|
+
showTraceId: true,
|
|
109269
|
+
className: "!p-0"
|
|
109270
|
+
},
|
|
109271
|
+
`skeleton-${pendingTraceId}`
|
|
109272
|
+
);
|
|
109273
|
+
}) })
|
|
109274
|
+
] })
|
|
109275
|
+
] }),
|
|
109253
109276
|
!selectedNode && !hasAutoSelected ? /* @__PURE__ */ jsxRuntimeExports.jsx(NodeDetailSkeleton, { showFullSummary: true }) : /* @__PURE__ */ jsxRuntimeExports.jsx(NodeDetailPanel, { node: selectedNode, nodeType, apiConfig })
|
|
109254
109277
|
] })
|
|
109255
109278
|
] });
|
|
@@ -110403,7 +110426,8 @@ For more info see: https://www.ag-grid.com/javascript-grid/modules/`;
|
|
|
110403
110426
|
newMap.set(traceId, {
|
|
110404
110427
|
input: detail["input"],
|
|
110405
110428
|
output: detail["output"],
|
|
110406
|
-
totalCost: detail["totalCost"]
|
|
110429
|
+
totalCost: detail["totalCost"],
|
|
110430
|
+
envId: detail["envId"]
|
|
110407
110431
|
});
|
|
110408
110432
|
return newMap;
|
|
110409
110433
|
});
|
|
@@ -110514,7 +110538,14 @@ For more info see: https://www.ag-grid.com/javascript-grid/modules/`;
|
|
|
110514
110538
|
headerName: "Environment",
|
|
110515
110539
|
width: 150,
|
|
110516
110540
|
hide: false,
|
|
110517
|
-
cellRenderer: (params) =>
|
|
110541
|
+
cellRenderer: (params) => {
|
|
110542
|
+
const detailData = detailedTraceData.get(params.data.id);
|
|
110543
|
+
const envId = detailData == null ? void 0 : detailData.envId;
|
|
110544
|
+
if (envId === void 0) {
|
|
110545
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-xs text-gray-400 italic", children: "Loading..." });
|
|
110546
|
+
}
|
|
110547
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(EnvironmentNameCell, { envId });
|
|
110548
|
+
}
|
|
110518
110549
|
}
|
|
110519
110550
|
);
|
|
110520
110551
|
baseColumns.push(
|
|
@@ -110874,6 +110905,7 @@ For more info see: https://www.ag-grid.com/javascript-grid/modules/`;
|
|
|
110874
110905
|
title: "Traces",
|
|
110875
110906
|
description: "Inspect execution traces to analyze model reasoning, tool usage, and performance insights.",
|
|
110876
110907
|
searchPlaceholder: "Search...",
|
|
110908
|
+
showSearch: totalCount > 0 || searchTerm.length > 0,
|
|
110877
110909
|
searchConfig: {
|
|
110878
110910
|
metadataSearchFields: ["ID", "Input", "User ID"],
|
|
110879
110911
|
updateQuery: handleSearch,
|
|
@@ -113445,15 +113477,15 @@ For more info see: https://www.ag-grid.com/javascript-grid/modules/`;
|
|
|
113445
113477
|
};
|
|
113446
113478
|
return (
|
|
113447
113479
|
// bg-white w-full border-t border-gray-200
|
|
113448
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "bg-white w-full", "data-id": `debug_card_${node.id}`, children: [
|
|
113480
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "bg-white w-full", "data-test-id": `debug_card_${node.id}`, children: [
|
|
113449
113481
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
113450
113482
|
"div",
|
|
113451
113483
|
{
|
|
113452
113484
|
className: `flex items-center pl-[8px] pr-[8px] relative transition-colors cursor-pointer w-full
|
|
113453
113485
|
${isSelected ? "" : ""}`,
|
|
113454
113486
|
onClick: handleNodeClick,
|
|
113455
|
-
"data-id": `debug_card_header_${node.id}`,
|
|
113456
|
-
children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-[10px] w-full", "data-id": `debug_card_header_content_${node.id}`, children: [
|
|
113487
|
+
"data-test-id": `debug_card_header_${node.id}`,
|
|
113488
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-[10px] w-full", "data-test-id": `debug_card_header_content_${node.id}`, children: [
|
|
113457
113489
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
113458
113490
|
"div",
|
|
113459
113491
|
{
|
|
@@ -113467,7 +113499,7 @@ For more info see: https://www.ag-grid.com/javascript-grid/modules/`;
|
|
|
113467
113499
|
}
|
|
113468
113500
|
},
|
|
113469
113501
|
title: hasChildren ? isExpanded ? "Collapse" : "Expand" : "Show details",
|
|
113470
|
-
"data-id": `debug_card_toggle_${node.id}`,
|
|
113502
|
+
"data-test-id": `debug_card_toggle_${node.id}`,
|
|
113471
113503
|
children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
113472
113504
|
ChevronRight,
|
|
113473
113505
|
{
|
|
@@ -113476,18 +113508,18 @@ For more info see: https://www.ag-grid.com/javascript-grid/modules/`;
|
|
|
113476
113508
|
)
|
|
113477
113509
|
}
|
|
113478
113510
|
),
|
|
113479
|
-
/* @__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: [
|
|
113480
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex-shrink-0 rounded-[8px] bg-[#B2DDFF]", "data-id": `debug_card_node_icon_${node.id}`, children: getNodeIcon() }),
|
|
113511
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-[8px] w-full py-[8px] border-b border-gray-200", "data-test-id": `debug_card_node_info_${node.id}`, children: [
|
|
113512
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex-shrink-0 rounded-[8px] bg-[#B2DDFF]", "data-test-id": `debug_card_node_icon_${node.id}`, children: getNodeIcon() }),
|
|
113481
113513
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
113482
113514
|
"span",
|
|
113483
113515
|
{
|
|
113484
113516
|
className: "font-semibold text-gray-900 text-xs truncate w-full",
|
|
113485
113517
|
title: node.type === "llm" ? node.name : void 0,
|
|
113486
|
-
"data-id": `debug_card_node_name_${node.id}`,
|
|
113518
|
+
"data-test-id": `debug_card_node_name_${node.id}`,
|
|
113487
113519
|
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
|
|
113488
113520
|
}
|
|
113489
113521
|
),
|
|
113490
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-[12px] text-[10px] text-gray-500", "data-id": `debug_card_node_metadata_${node.id}`, children: [
|
|
113522
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-[12px] text-[10px] text-gray-500", "data-test-id": `debug_card_node_metadata_${node.id}`, children: [
|
|
113491
113523
|
node.type === "Agent" && (() => {
|
|
113492
113524
|
var _a;
|
|
113493
113525
|
const llmChild = (_a = node.children) == null ? void 0 : _a.find((child) => child.type === "llm");
|
|
@@ -113497,7 +113529,7 @@ For more info see: https://www.ag-grid.com/javascript-grid/modules/`;
|
|
|
113497
113529
|
{
|
|
113498
113530
|
className: "text-[10px] text-gray-500 truncate max-w-[100px]",
|
|
113499
113531
|
title: llmChild.name,
|
|
113500
|
-
"data-id": `debug_card_node_model_name_${node.id}`,
|
|
113532
|
+
"data-test-id": `debug_card_node_model_name_${node.id}`,
|
|
113501
113533
|
children: llmChild.name
|
|
113502
113534
|
}
|
|
113503
113535
|
);
|
|
@@ -113530,7 +113562,7 @@ For more info see: https://www.ag-grid.com/javascript-grid/modules/`;
|
|
|
113530
113562
|
title: `Input: ${((_a = llmUsage.input_tokens) == null ? void 0 : _a.toLocaleString()) || 0} tokens
|
|
113531
113563
|
Output: ${((_b = llmUsage.output_tokens) == null ? void 0 : _b.toLocaleString()) || 0} tokens
|
|
113532
113564
|
Total: ${((_c = llmUsage.total_tokens) == null ? void 0 : _c.toLocaleString()) || 0} tokens`,
|
|
113533
|
-
"data-id": `debug_card_node_tokens_${node.id}`,
|
|
113565
|
+
"data-test-id": `debug_card_node_tokens_${node.id}`,
|
|
113534
113566
|
children: [
|
|
113535
113567
|
llmUsage.total_tokens.toLocaleString(),
|
|
113536
113568
|
" Tokens"
|
|
@@ -113540,34 +113572,34 @@ Total: ${((_c = llmUsage.total_tokens) == null ? void 0 : _c.toLocaleString()) |
|
|
|
113540
113572
|
}
|
|
113541
113573
|
return null;
|
|
113542
113574
|
})(),
|
|
113543
|
-
node.duration && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-[4px]", "data-id": `debug_card_node_duration_${node.id}`, children: [
|
|
113575
|
+
node.duration && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-[4px]", "data-test-id": `debug_card_node_duration_${node.id}`, children: [
|
|
113544
113576
|
/* @__PURE__ */ jsxRuntimeExports.jsx(Clock, { className: "w-[12px] h-[12px]" }),
|
|
113545
113577
|
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-[10px] text-gray-500 whitespace-nowrap", children: formatDuration(node.duration) })
|
|
113546
113578
|
] })
|
|
113547
113579
|
] }),
|
|
113548
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex-shrink-0", "data-id": `debug_card_node_status_${node.id}`, children: getStatusIcon() })
|
|
113580
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex-shrink-0", "data-test-id": `debug_card_node_status_${node.id}`, children: getStatusIcon() })
|
|
113549
113581
|
] })
|
|
113550
113582
|
] })
|
|
113551
113583
|
}
|
|
113552
113584
|
),
|
|
113553
|
-
isSelected && availableTabs.length > 0 && showDetailView && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "w-full pl-[32px] relative", "data-id": `debug_card_detail_panel_${node.id}`, children: [
|
|
113554
|
-
/* @__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}` }),
|
|
113555
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "px-[4px] py-[8px] w-full", "data-id": `debug_card_detail_panel_content_${node.id}`, children: [
|
|
113556
|
-
/* @__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(
|
|
113585
|
+
isSelected && availableTabs.length > 0 && showDetailView && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "w-full pl-[32px] relative", "data-test-id": `debug_card_detail_panel_${node.id}`, children: [
|
|
113586
|
+
/* @__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-test-id": `debug_card_detail_panel_connector_${node.id}` }),
|
|
113587
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "px-[4px] py-[8px] w-full", "data-test-id": `debug_card_detail_panel_content_${node.id}`, children: [
|
|
113588
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "bg-gray-50 rounded-[4px] p-[4px] inline-flex gap-[4px] mb-[8px] border border-gray-200", "data-test-id": `debug_card_detail_panel_tabs_${node.id}`, children: getTabsForNodeType().map((tab) => /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
113557
113589
|
"button",
|
|
113558
113590
|
{
|
|
113559
113591
|
onClick: () => handleTabClick(tab),
|
|
113560
113592
|
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"}`,
|
|
113561
|
-
"data-id": `debug_card_detail_panel_tab_${node.id}_${tab}`,
|
|
113593
|
+
"data-test-id": `debug_card_detail_panel_tab_${node.id}_${tab}`,
|
|
113562
113594
|
children: tab.charAt(0).toUpperCase() + tab.slice(1)
|
|
113563
113595
|
},
|
|
113564
113596
|
tab
|
|
113565
113597
|
)) }),
|
|
113566
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "px-[4px]", "data-id": `debug_card_detail_panel_tab_content_${node.id}`, children: renderTabContent() })
|
|
113598
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "px-[4px]", "data-test-id": `debug_card_detail_panel_tab_content_${node.id}`, children: renderTabContent() })
|
|
113567
113599
|
] })
|
|
113568
113600
|
] }),
|
|
113569
|
-
isExpanded && hasChildren && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "w-full pl-[32px] relative", "data-id": `debug_card_children_${node.id}`, children: [
|
|
113570
|
-
/* @__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}` }),
|
|
113601
|
+
isExpanded && hasChildren && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "w-full pl-[32px] relative", "data-test-id": `debug_card_children_${node.id}`, children: [
|
|
113602
|
+
/* @__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-test-id": `debug_card_children_connector_${node.id}` }),
|
|
113571
113603
|
node.children.map((child, index) => /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
113572
113604
|
DebugCard,
|
|
113573
113605
|
{
|
|
@@ -113871,14 +113903,14 @@ Total: ${((_c = llmUsage.total_tokens) == null ? void 0 : _c.toLocaleString()) |
|
|
|
113871
113903
|
return `${tokens} tokens`;
|
|
113872
113904
|
};
|
|
113873
113905
|
if (!sessionTree.runs.length) {
|
|
113874
|
-
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" }) }) });
|
|
113875
|
-
}
|
|
113876
|
-
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: [
|
|
113877
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center w-full gap-[16px]", "data-id": "debug_panel_session_header", children: [
|
|
113878
|
-
/* @__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" }),
|
|
113879
|
-
/* @__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" }),
|
|
113880
|
-
/* @__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: [
|
|
113881
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { "data-id": "debug_panel_session_id", children: sessionTree.sessionId }),
|
|
113906
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: `flex flex-col h-full ${className}`, "data-test-id": "debug_panel_empty_state", children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex items-center justify-center h-full", "data-test-id": "debug_panel_empty_state_content", children: /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-gray-500 text-sm", "data-test-id": "debug_panel_empty_state_message", children: "No execution events to display" }) }) });
|
|
113907
|
+
}
|
|
113908
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: `flex flex-col h-full bg-white ${className}`, "data-test-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-test-id": "debug_panel_content", children: [
|
|
113909
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center w-full gap-[16px]", "data-test-id": "debug_panel_session_header", children: [
|
|
113910
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-xs text-gray-400 whitespace-nowrap flex-shrink-0", "data-test-id": "debug_panel_session_header_label", children: "Session initiated" }),
|
|
113911
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex-1 h-[1px] border-t border-dashed border-gray-300 w-full", "data-test-id": "debug_panel_session_header_divider" }),
|
|
113912
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-2 text-xs text-gray-400 flex-shrink-0", "data-test-id": "debug_panel_session_header_actions", children: [
|
|
113913
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { "data-test-id": "debug_panel_session_id", children: sessionTree.sessionId }),
|
|
113882
113914
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
113883
113915
|
CopyButton$1,
|
|
113884
113916
|
{
|
|
@@ -113904,22 +113936,22 @@ Total: ${((_c = llmUsage.total_tokens) == null ? void 0 : _c.toLocaleString()) |
|
|
|
113904
113936
|
}
|
|
113905
113937
|
}
|
|
113906
113938
|
},
|
|
113907
|
-
"data-id": "debug_panel_session_external_link_btn",
|
|
113939
|
+
"data-test-id": "debug_panel_session_external_link_btn",
|
|
113908
113940
|
children: /* @__PURE__ */ jsxRuntimeExports.jsx(ExternalLink, { className: "w-[12px] h-[12px]" })
|
|
113909
113941
|
}
|
|
113910
113942
|
)
|
|
113911
113943
|
] })
|
|
113912
113944
|
] }),
|
|
113913
|
-
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: [
|
|
113914
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-2", "data-id": "debug_panel_expansion_controls_buttons", children: [
|
|
113915
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-xs font-medium text-gray-700", "data-id": "debug_panel_expansion_controls_label", children: "Expansion:" }),
|
|
113945
|
+
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-test-id": "debug_panel_expansion_controls", children: [
|
|
113946
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-2", "data-test-id": "debug_panel_expansion_controls_buttons", children: [
|
|
113947
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-xs font-medium text-gray-700", "data-test-id": "debug_panel_expansion_controls_label", children: "Expansion:" }),
|
|
113916
113948
|
/* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
113917
113949
|
"button",
|
|
113918
113950
|
{
|
|
113919
113951
|
onClick: handleExpandAll,
|
|
113920
113952
|
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",
|
|
113921
113953
|
title: "Expand all nodes",
|
|
113922
|
-
"data-id": "debug_panel_expansion_controls_btn_expand_all",
|
|
113954
|
+
"data-test-id": "debug_panel_expansion_controls_btn_expand_all",
|
|
113923
113955
|
children: [
|
|
113924
113956
|
/* @__PURE__ */ jsxRuntimeExports.jsx(Plus, { className: "w-3 h-3" }),
|
|
113925
113957
|
"Expand All"
|
|
@@ -113932,7 +113964,7 @@ Total: ${((_c = llmUsage.total_tokens) == null ? void 0 : _c.toLocaleString()) |
|
|
|
113932
113964
|
onClick: handleExpandLast,
|
|
113933
113965
|
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",
|
|
113934
113966
|
title: "Expand only the last execution path",
|
|
113935
|
-
"data-id": "debug_panel_expansion_controls_btn_expand_last",
|
|
113967
|
+
"data-test-id": "debug_panel_expansion_controls_btn_expand_last",
|
|
113936
113968
|
children: [
|
|
113937
113969
|
/* @__PURE__ */ jsxRuntimeExports.jsx(Expand, { className: "w-3 h-3" }),
|
|
113938
113970
|
"Expand Last"
|
|
@@ -113945,7 +113977,7 @@ Total: ${((_c = llmUsage.total_tokens) == null ? void 0 : _c.toLocaleString()) |
|
|
|
113945
113977
|
onClick: handleCollapseAll,
|
|
113946
113978
|
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",
|
|
113947
113979
|
title: "Collapse all nodes",
|
|
113948
|
-
"data-id": "debug_panel_expansion_controls_btn_collapse_all",
|
|
113980
|
+
"data-test-id": "debug_panel_expansion_controls_btn_collapse_all",
|
|
113949
113981
|
children: [
|
|
113950
113982
|
/* @__PURE__ */ jsxRuntimeExports.jsx(Minus, { className: "w-3 h-3" }),
|
|
113951
113983
|
"Collapse All"
|
|
@@ -113953,8 +113985,8 @@ Total: ${((_c = llmUsage.total_tokens) == null ? void 0 : _c.toLocaleString()) |
|
|
|
113953
113985
|
}
|
|
113954
113986
|
)
|
|
113955
113987
|
] }),
|
|
113956
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-2", "data-id": "debug_panel_expansion_controls_live_mode", children: [
|
|
113957
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-xs font-medium text-gray-700", "data-id": "debug_panel_expansion_controls_live_mode_label", children: "Live Mode:" }),
|
|
113988
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-2", "data-test-id": "debug_panel_expansion_controls_live_mode", children: [
|
|
113989
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-xs font-medium text-gray-700", "data-test-id": "debug_panel_expansion_controls_live_mode_label", children: "Live Mode:" }),
|
|
113958
113990
|
/* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
113959
113991
|
"select",
|
|
113960
113992
|
{
|
|
@@ -113962,7 +113994,7 @@ Total: ${((_c = llmUsage.total_tokens) == null ? void 0 : _c.toLocaleString()) |
|
|
|
113962
113994
|
onChange: (e) => setLiveExpansionMode(e.target.value),
|
|
113963
113995
|
className: "text-xs px-2 py-1 bg-white border border-gray-300 rounded focus:outline-none focus:ring-1 focus:ring-blue-500",
|
|
113964
113996
|
title: "Control auto-expansion behavior during live updates",
|
|
113965
|
-
"data-id": "debug_panel_expansion_controls_live_mode_select",
|
|
113997
|
+
"data-test-id": "debug_panel_expansion_controls_live_mode_select",
|
|
113966
113998
|
children: [
|
|
113967
113999
|
/* @__PURE__ */ jsxRuntimeExports.jsx("option", { value: "all", children: "Expand All" }),
|
|
113968
114000
|
/* @__PURE__ */ jsxRuntimeExports.jsx("option", { value: "last", children: "Expand Last" }),
|
|
@@ -113972,18 +114004,18 @@ Total: ${((_c = llmUsage.total_tokens) == null ? void 0 : _c.toLocaleString()) |
|
|
|
113972
114004
|
)
|
|
113973
114005
|
] })
|
|
113974
114006
|
] }),
|
|
113975
|
-
sessionTree.runs.map((run2) => /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex flex-col gap-1", "data-id": `debug_panel_run_${run2.runId}`, children: [
|
|
113976
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "rounded-[8px] border border-gray-300 bg-white overflow-hidden", "data-id": `debug_panel_run_container_${run2.runId}`, children: [
|
|
113977
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex flex-col w-full", "data-id": `debug_panel_run_header_${run2.runId}`, children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-2 p-[8px] bg-gray-50", "data-id": `debug_panel_run_header_content_${run2.runId}`, children: [
|
|
113978
|
-
/* @__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_${run2.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" }) }),
|
|
114007
|
+
sessionTree.runs.map((run2) => /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex flex-col gap-1", "data-test-id": `debug_panel_run_${run2.runId}`, children: [
|
|
114008
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "rounded-[8px] border border-gray-300 bg-white overflow-hidden", "data-test-id": `debug_panel_run_container_${run2.runId}`, children: [
|
|
114009
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex flex-col w-full", "data-test-id": `debug_panel_run_header_${run2.runId}`, children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-2 p-[8px] bg-gray-50", "data-test-id": `debug_panel_run_header_content_${run2.runId}`, children: [
|
|
114010
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", className: "flex-shrink-0", "data-test-id": `debug_panel_run_header_icon_${run2.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" }) }),
|
|
113979
114011
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
113980
114012
|
"div",
|
|
113981
114013
|
{
|
|
113982
114014
|
className: "flex-1 cursor-pointer select-none truncate",
|
|
113983
114015
|
onClick: () => handleRunToggle(run2.runId),
|
|
113984
114016
|
title: run2.userInput,
|
|
113985
|
-
"data-id": `debug_panel_run_title_${run2.runId}`,
|
|
113986
|
-
children: /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-xs text-gray-900 truncate", "data-id": `debug_panel_run_title_text_${run2.runId}`, children: run2.userInput || `Run ${run2.runId}` })
|
|
114017
|
+
"data-test-id": `debug_panel_run_title_${run2.runId}`,
|
|
114018
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-xs text-gray-900 truncate", "data-test-id": `debug_panel_run_title_text_${run2.runId}`, children: run2.userInput || `Run ${run2.runId}` })
|
|
113987
114019
|
}
|
|
113988
114020
|
),
|
|
113989
114021
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
@@ -114004,7 +114036,7 @@ Total: ${((_c = llmUsage.total_tokens) == null ? void 0 : _c.toLocaleString()) |
|
|
|
114004
114036
|
const anyDetailsVisible = Array.from(runNodeIds).some((nodeId) => selectedNodeIds.has(nodeId));
|
|
114005
114037
|
return anyDetailsVisible ? "Hide all node details in this run" : "Show all node details in this run";
|
|
114006
114038
|
})(),
|
|
114007
|
-
"data-id": `debug_panel_run_details_toggle_${run2.runId}`,
|
|
114039
|
+
"data-test-id": `debug_panel_run_details_toggle_${run2.runId}`,
|
|
114008
114040
|
children: (() => {
|
|
114009
114041
|
const runNodeIds = /* @__PURE__ */ new Set();
|
|
114010
114042
|
const collectNodeIds = (node) => {
|
|
@@ -114032,14 +114064,14 @@ Total: ${((_c = llmUsage.total_tokens) == null ? void 0 : _c.toLocaleString()) |
|
|
|
114032
114064
|
},
|
|
114033
114065
|
className: "p-1 hover:bg-gray-200 rounded transition-colors flex-shrink-0",
|
|
114034
114066
|
title: expandedRuns.has(run2.runId) ? "Collapse run" : "Expand run",
|
|
114035
|
-
"data-id": `debug_panel_run_toggle_${run2.runId}`,
|
|
114067
|
+
"data-test-id": `debug_panel_run_toggle_${run2.runId}`,
|
|
114036
114068
|
children: /* @__PURE__ */ jsxRuntimeExports.jsx(ChevronDown, { className: `w-[16px] h-[16px] text-gray-400 transition-transform ${expandedRuns.has(run2.runId) ? "rotate-180" : ""}` })
|
|
114037
114069
|
}
|
|
114038
114070
|
)
|
|
114039
114071
|
] }) }),
|
|
114040
|
-
expandedRuns.has(run2.runId) && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "bg-white w-full flex flex-col", "data-id": `debug_panel_run_execution_trees_${run2.runId}`, children: run2.rootNodes && run2.rootNodes.map((rootNode, index) => {
|
|
114072
|
+
expandedRuns.has(run2.runId) && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "bg-white w-full flex flex-col", "data-test-id": `debug_panel_run_execution_trees_${run2.runId}`, children: run2.rootNodes && run2.rootNodes.map((rootNode, index) => {
|
|
114041
114073
|
var _a;
|
|
114042
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "w-full", "data-id": `debug_panel_run_root_node_${run2.runId}_${index}`, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
114074
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "w-full", "data-test-id": `debug_panel_run_root_node_${run2.runId}_${index}`, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
114043
114075
|
DebugCard,
|
|
114044
114076
|
{
|
|
114045
114077
|
node: updateTreeExpansion(rootNode),
|
|
@@ -114125,22 +114157,22 @@ Total: ${((_c = llmUsage.total_tokens) == null ? void 0 : _c.toLocaleString()) |
|
|
|
114125
114157
|
};
|
|
114126
114158
|
const outputFromNodes = run2.rootNodes ? findFinalOutput(run2.rootNodes) : void 0;
|
|
114127
114159
|
const finalOutput = outputFromNodes || run2.finalOutput;
|
|
114128
|
-
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_${run2.runId}`, children: [
|
|
114129
|
-
/* @__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_${run2.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" }) }),
|
|
114130
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "flex-1 text-xs text-gray-900 truncate", title: convertToString(finalOutput), "data-id": `debug_panel_run_final_output_text_${run2.runId}`, children: convertToString(finalOutput) }),
|
|
114131
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-[8px] flex-shrink-0", "data-id": `debug_panel_run_final_output_metadata_${run2.runId}`, children: [
|
|
114132
|
-
run2.duration && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-[4px]", "data-id": `debug_panel_run_final_output_duration_${run2.runId}`, children: [
|
|
114160
|
+
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-test-id": `debug_panel_run_final_output_${run2.runId}`, children: [
|
|
114161
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", className: "flex-shrink-0", "data-test-id": `debug_panel_run_final_output_icon_${run2.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" }) }),
|
|
114162
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "flex-1 text-xs text-gray-900 truncate", title: convertToString(finalOutput), "data-test-id": `debug_panel_run_final_output_text_${run2.runId}`, children: convertToString(finalOutput) }),
|
|
114163
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-[8px] flex-shrink-0", "data-test-id": `debug_panel_run_final_output_metadata_${run2.runId}`, children: [
|
|
114164
|
+
run2.duration && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-[4px]", "data-test-id": `debug_panel_run_final_output_duration_${run2.runId}`, children: [
|
|
114133
114165
|
/* @__PURE__ */ jsxRuntimeExports.jsx(Clock, { className: "w-[12px] h-[12px] text-gray-400" }),
|
|
114134
114166
|
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-[10px] text-gray-500 whitespace-nowrap", children: formatDuration(run2.duration) })
|
|
114135
114167
|
] }),
|
|
114136
|
-
run2.totalTokens && /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-[10px] text-gray-500 whitespace-nowrap", "data-id": `debug_panel_run_final_output_tokens_${run2.runId}`, children: formatTokens(run2.totalTokens) })
|
|
114168
|
+
run2.totalTokens && /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-[10px] text-gray-500 whitespace-nowrap", "data-test-id": `debug_panel_run_final_output_tokens_${run2.runId}`, children: formatTokens(run2.totalTokens) })
|
|
114137
114169
|
] })
|
|
114138
114170
|
] }) : null;
|
|
114139
114171
|
})()
|
|
114140
114172
|
] }),
|
|
114141
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center justify-end gap-2 py-1", "data-id": `debug_panel_run_footer_${run2.runId}`, children: [
|
|
114142
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-xs text-gray-400", "data-id": `debug_panel_run_footer_id_${run2.runId}`, children: run2.runId }),
|
|
114143
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-2", "data-id": `debug_panel_run_footer_actions_${run2.runId}`, children: [
|
|
114173
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center justify-end gap-2 py-1", "data-test-id": `debug_panel_run_footer_${run2.runId}`, children: [
|
|
114174
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-xs text-gray-400", "data-test-id": `debug_panel_run_footer_id_${run2.runId}`, children: run2.runId }),
|
|
114175
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-2", "data-test-id": `debug_panel_run_footer_actions_${run2.runId}`, children: [
|
|
114144
114176
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
114145
114177
|
CopyButton$1,
|
|
114146
114178
|
{
|
|
@@ -114166,7 +114198,7 @@ Total: ${((_c = llmUsage.total_tokens) == null ? void 0 : _c.toLocaleString()) |
|
|
|
114166
114198
|
}
|
|
114167
114199
|
}
|
|
114168
114200
|
},
|
|
114169
|
-
"data-id": `debug_panel_run_footer_external_link_${run2.runId}`,
|
|
114201
|
+
"data-test-id": `debug_panel_run_footer_external_link_${run2.runId}`,
|
|
114170
114202
|
children: /* @__PURE__ */ jsxRuntimeExports.jsx(ExternalLink, { className: "w-3 h-3 text-gray-400" })
|
|
114171
114203
|
}
|
|
114172
114204
|
)
|
|
@@ -141019,7 +141051,7 @@ ${code2}
|
|
|
141019
141051
|
backgroundColor: config2.bgColor,
|
|
141020
141052
|
borderColor: config2.borderColor
|
|
141021
141053
|
},
|
|
141022
|
-
"data-id": `md-editor-variable-${variableType}-${path}`,
|
|
141054
|
+
"data-test-id": `md-editor-variable-${variableType}-${path}`,
|
|
141023
141055
|
"data-variable-type": variableType,
|
|
141024
141056
|
"data-path": path,
|
|
141025
141057
|
title: displayName || fullSyntax,
|
|
@@ -141244,7 +141276,7 @@ ${code2}
|
|
|
141244
141276
|
backgroundColor: config2.bgColor,
|
|
141245
141277
|
color: config2.color
|
|
141246
141278
|
},
|
|
141247
|
-
"data-id": `md-editor-mention-${mentionType}-${name.toLowerCase().replace(/\s+/g, "-")}`,
|
|
141279
|
+
"data-test-id": `md-editor-mention-${mentionType}-${name.toLowerCase().replace(/\s+/g, "-")}`,
|
|
141248
141280
|
"data-mention-type": mentionType,
|
|
141249
141281
|
"data-name": name,
|
|
141250
141282
|
title: name,
|
|
@@ -141315,9 +141347,9 @@ ${code2}
|
|
|
141315
141347
|
},
|
|
141316
141348
|
id: {
|
|
141317
141349
|
default: "",
|
|
141318
|
-
parseHTML: (element) => element.getAttribute("data-id"),
|
|
141350
|
+
parseHTML: (element) => element.getAttribute("data-test-id"),
|
|
141319
141351
|
renderHTML: (attributes) => ({
|
|
141320
|
-
"data-id": attributes["id"]
|
|
141352
|
+
"data-test-id": attributes["id"]
|
|
141321
141353
|
})
|
|
141322
141354
|
},
|
|
141323
141355
|
name: {
|
|
@@ -142127,7 +142159,7 @@ ${code2}
|
|
|
142127
142159
|
{
|
|
142128
142160
|
ref: menuRef,
|
|
142129
142161
|
className: "k-md-editor-slash-menu w-[300px] max-h-[360px] bg-white rounded-lg shadow-lg overflow-hidden flex flex-col",
|
|
142130
|
-
"data-id": "md-editor-slash-menu",
|
|
142162
|
+
"data-test-id": "md-editor-slash-menu",
|
|
142131
142163
|
children: [
|
|
142132
142164
|
hasBlockItems && /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
142133
142165
|
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "px-2 pt-2 pb-1", children: /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-[11px] font-semibold text-gray-400 uppercase tracking-wide pl-1", children: "Blocks" }) }),
|
|
@@ -142149,7 +142181,7 @@ ${code2}
|
|
|
142149
142181
|
title: `${item.label}${item.shortcut ? ` (${item.shortcut})` : ""}`,
|
|
142150
142182
|
className: `flex items-center justify-center w-9 h-9 p-0 border-0 rounded-lg cursor-pointer transition-all duration-150 shrink-0 ${isSelected ? "bg-gray-200 text-gray-800" : "bg-gray-50 text-gray-500 hover:bg-gray-200 hover:text-gray-800"}`,
|
|
142151
142183
|
onMouseEnter: () => setSelectedIndex(index),
|
|
142152
|
-
"data-id": `md-editor-slash-block-${item.id}`,
|
|
142184
|
+
"data-test-id": `md-editor-slash-block-${item.id}`,
|
|
142153
142185
|
children: item.icon
|
|
142154
142186
|
},
|
|
142155
142187
|
item.id
|
|
@@ -142168,7 +142200,7 @@ ${code2}
|
|
|
142168
142200
|
onClick: handleBack,
|
|
142169
142201
|
className: "flex items-center justify-center w-6 h-6 p-0 border-0 bg-gray-100 rounded cursor-pointer text-gray-500 hover:bg-gray-200",
|
|
142170
142202
|
"aria-label": "Go back",
|
|
142171
|
-
"data-id": "md-editor-slash-back-btn",
|
|
142203
|
+
"data-test-id": "md-editor-slash-back-btn",
|
|
142172
142204
|
children: /* @__PURE__ */ jsxRuntimeExports.jsx(ChevronLeft, { size: 16 })
|
|
142173
142205
|
}
|
|
142174
142206
|
),
|
|
@@ -142188,7 +142220,7 @@ ${code2}
|
|
|
142188
142220
|
},
|
|
142189
142221
|
placeholder: "Search...",
|
|
142190
142222
|
className: "flex-1 bg-transparent text-sm border-0 outline-none text-gray-700 placeholder:text-gray-400",
|
|
142191
|
-
"data-id": "md-editor-slash-search"
|
|
142223
|
+
"data-test-id": "md-editor-slash-search"
|
|
142192
142224
|
}
|
|
142193
142225
|
)
|
|
142194
142226
|
] }) })
|
|
@@ -142223,7 +142255,7 @@ ${code2}
|
|
|
142223
142255
|
title: isDisabled ? disabledReason : void 0,
|
|
142224
142256
|
className: `flex items-center gap-2.5 w-full py-2 px-2.5 border-0 rounded-md text-left transition-colors duration-100 ${isDisabled ? "cursor-not-allowed opacity-50" : "cursor-pointer"} ${isSelected && !isDisabled ? "bg-gray-100" : "bg-transparent hover:bg-gray-100"}`,
|
|
142225
142257
|
onMouseEnter: () => !isDisabled && setSelectedIndex(adjustedIndex),
|
|
142226
|
-
"data-id": `md-editor-slash-item-${"id" in item ? item.id : label.toLowerCase().replace(/\s+/g, "-")}`,
|
|
142258
|
+
"data-test-id": `md-editor-slash-item-${"id" in item ? item.id : label.toLowerCase().replace(/\s+/g, "-")}`,
|
|
142227
142259
|
children: [
|
|
142228
142260
|
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: `flex items-center justify-center w-7 h-7 rounded-md bg-gray-100 shrink-0 ${isDisabled ? "text-gray-300" : "text-gray-500"}`, children: getIcon(item) }),
|
|
142229
142261
|
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex-1 min-w-0", children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: `text-[13px] font-medium truncate ${isDisabled ? "text-gray-400" : "text-gray-800"}`, children: label }) }),
|
|
@@ -142867,7 +142899,7 @@ ${code2}
|
|
|
142867
142899
|
ref: menuRef,
|
|
142868
142900
|
className: "k-md-editor-variable-menu fixed w-[280px] max-h-[320px] bg-white rounded-lg shadow-lg z-[9999] overflow-hidden flex flex-col",
|
|
142869
142901
|
style: { top: adjustedPosition.top, left: adjustedPosition.left },
|
|
142870
|
-
"data-id": "md-editor-variable-menu",
|
|
142902
|
+
"data-test-id": "md-editor-variable-menu",
|
|
142871
142903
|
children: [
|
|
142872
142904
|
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "px-3 py-2 border-b border-gray-200 flex items-center gap-2", children: [
|
|
142873
142905
|
activeCategory && /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
@@ -142877,7 +142909,7 @@ ${code2}
|
|
|
142877
142909
|
onClick: handleBack,
|
|
142878
142910
|
className: "flex items-center justify-center w-6 h-6 p-0 border-0 bg-gray-100 rounded cursor-pointer text-gray-500 hover:bg-gray-200",
|
|
142879
142911
|
"aria-label": "Go back",
|
|
142880
|
-
"data-id": "md-editor-variable-back-btn",
|
|
142912
|
+
"data-test-id": "md-editor-variable-back-btn",
|
|
142881
142913
|
children: /* @__PURE__ */ jsxRuntimeExports.jsx(ChevronLeft, { size: 16 })
|
|
142882
142914
|
}
|
|
142883
142915
|
),
|
|
@@ -142905,7 +142937,7 @@ ${code2}
|
|
|
142905
142937
|
},
|
|
142906
142938
|
placeholder: "memory.store.field",
|
|
142907
142939
|
className: "flex-1 border border-blue-300 bg-white rounded px-2 py-1.5 outline-none text-[13px] text-gray-700 font-mono focus:border-blue-500 focus:ring-1 focus:ring-blue-500",
|
|
142908
|
-
"data-id": "md-editor-custom-variable-input"
|
|
142940
|
+
"data-test-id": "md-editor-custom-variable-input"
|
|
142909
142941
|
}
|
|
142910
142942
|
),
|
|
142911
142943
|
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-[14px] font-mono text-gray-500", children: "}}" })
|
|
@@ -142943,7 +142975,7 @@ ${code2}
|
|
|
142943
142975
|
onChange: (e) => onQueryChange(e.target.value),
|
|
142944
142976
|
placeholder: "Search...",
|
|
142945
142977
|
className: "flex-1 border-0 bg-transparent outline-none text-[13px] text-gray-700",
|
|
142946
|
-
"data-id": "md-editor-variable-search"
|
|
142978
|
+
"data-test-id": "md-editor-variable-search"
|
|
142947
142979
|
}
|
|
142948
142980
|
)
|
|
142949
142981
|
] }) }),
|
|
@@ -142965,7 +142997,7 @@ ${code2}
|
|
|
142965
142997
|
onClick: () => handleItemClick(item),
|
|
142966
142998
|
className: `flex items-center gap-2.5 w-full py-2 px-2.5 border-0 rounded-md text-left cursor-pointer transition-colors duration-100 ${index === selectedIndex ? "bg-gray-100" : "bg-transparent hover:bg-gray-100"}`,
|
|
142967
142999
|
onMouseEnter: () => setSelectedIndex(index),
|
|
142968
|
-
"data-id": `md-editor-variable-item-${isCategory ? item.id : item.id}`,
|
|
143000
|
+
"data-test-id": `md-editor-variable-item-${isCategory ? item.id : item.id}`,
|
|
142969
143001
|
children: [
|
|
142970
143002
|
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "flex items-center justify-center w-7 h-7 rounded-md bg-gray-100 text-gray-500 shrink-0", children: /* @__PURE__ */ jsxRuntimeExports.jsx(Icon, { size: 16 }) }),
|
|
142971
143003
|
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex-1 min-w-0", children: [
|
|
@@ -142985,7 +143017,7 @@ ${code2}
|
|
|
142985
143017
|
onClick: () => handleItemClick("custom"),
|
|
142986
143018
|
className: `flex items-center gap-2.5 w-full py-2 px-2.5 border-0 rounded-md text-left cursor-pointer transition-colors duration-100 border-t border-gray-100 mt-1 pt-2 ${selectedIndex === items.length ? "bg-blue-50" : "bg-transparent hover:bg-blue-50"}`,
|
|
142987
143019
|
onMouseEnter: () => setSelectedIndex(items.length),
|
|
142988
|
-
"data-id": "md-editor-variable-custom",
|
|
143020
|
+
"data-test-id": "md-editor-variable-custom",
|
|
142989
143021
|
children: [
|
|
142990
143022
|
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "flex items-center justify-center w-7 h-7 rounded-md bg-blue-100 text-blue-600 shrink-0", children: /* @__PURE__ */ jsxRuntimeExports.jsx(Plus, { size: 16 }) }),
|
|
142991
143023
|
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex-1 min-w-0", children: [
|
|
@@ -143069,7 +143101,7 @@ ${code2}
|
|
|
143069
143101
|
"div",
|
|
143070
143102
|
{
|
|
143071
143103
|
className: "k-md-editor-link-editor flex items-center gap-1.5 p-1 bg-gray-800 rounded-lg shadow-lg min-w-[280px]",
|
|
143072
|
-
"data-id": "md-editor-link-editor",
|
|
143104
|
+
"data-test-id": "md-editor-link-editor",
|
|
143073
143105
|
onMouseDown: (e) => e.stopPropagation(),
|
|
143074
143106
|
children: [
|
|
143075
143107
|
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center flex-1 bg-gray-700 rounded-md px-2 gap-1.5", children: [
|
|
@@ -143084,7 +143116,7 @@ ${code2}
|
|
|
143084
143116
|
onKeyDown: handleKeyDown2,
|
|
143085
143117
|
placeholder: "Enter URL...",
|
|
143086
143118
|
className: "flex-1 h-8 bg-transparent border-none outline-none text-gray-100 text-[13px] font-inherit min-w-[150px]",
|
|
143087
|
-
"data-id": "md-editor-link-input"
|
|
143119
|
+
"data-test-id": "md-editor-link-input"
|
|
143088
143120
|
}
|
|
143089
143121
|
)
|
|
143090
143122
|
] }),
|
|
@@ -143095,7 +143127,7 @@ ${code2}
|
|
|
143095
143127
|
onClick: handleOpenLink,
|
|
143096
143128
|
title: "Open link",
|
|
143097
143129
|
className: "flex items-center justify-center w-7 h-7 p-0 border-0 rounded-md cursor-pointer bg-transparent text-gray-400 transition-all duration-150 hover:bg-gray-700 hover:text-blue-400",
|
|
143098
|
-
"data-id": "md-editor-link-open",
|
|
143130
|
+
"data-test-id": "md-editor-link-open",
|
|
143099
143131
|
children: /* @__PURE__ */ jsxRuntimeExports.jsx(ExternalLink, { size: 14 })
|
|
143100
143132
|
}
|
|
143101
143133
|
),
|
|
@@ -143106,7 +143138,7 @@ ${code2}
|
|
|
143106
143138
|
onClick: handleRemoveLink,
|
|
143107
143139
|
title: "Remove link",
|
|
143108
143140
|
className: "flex items-center justify-center w-7 h-7 p-0 border-0 rounded-md cursor-pointer bg-transparent text-gray-400 transition-all duration-150 hover:bg-gray-700 hover:text-red-500",
|
|
143109
|
-
"data-id": "md-editor-link-remove",
|
|
143141
|
+
"data-test-id": "md-editor-link-remove",
|
|
143110
143142
|
children: /* @__PURE__ */ jsxRuntimeExports.jsx(Link2Off, { size: 14 })
|
|
143111
143143
|
}
|
|
143112
143144
|
),
|
|
@@ -143117,7 +143149,7 @@ ${code2}
|
|
|
143117
143149
|
onClick: handleSubmit,
|
|
143118
143150
|
title: "Apply link",
|
|
143119
143151
|
className: "flex items-center justify-center w-7 h-7 p-0 border-0 rounded-md cursor-pointer bg-blue-500 text-white transition-all duration-150 hover:bg-blue-600",
|
|
143120
|
-
"data-id": "md-editor-link-apply",
|
|
143152
|
+
"data-test-id": "md-editor-link-apply",
|
|
143121
143153
|
children: /* @__PURE__ */ jsxRuntimeExports.jsx(Check, { size: 14 })
|
|
143122
143154
|
}
|
|
143123
143155
|
),
|
|
@@ -143128,7 +143160,7 @@ ${code2}
|
|
|
143128
143160
|
onClick: onClose,
|
|
143129
143161
|
title: "Cancel",
|
|
143130
143162
|
className: "flex items-center justify-center w-7 h-7 p-0 border-0 rounded-md cursor-pointer bg-transparent text-gray-400 transition-all duration-150 hover:bg-gray-700 hover:text-white",
|
|
143131
|
-
"data-id": "md-editor-link-cancel",
|
|
143163
|
+
"data-test-id": "md-editor-link-cancel",
|
|
143132
143164
|
children: /* @__PURE__ */ jsxRuntimeExports.jsx(X, { size: 14 })
|
|
143133
143165
|
}
|
|
143134
143166
|
)
|
|
@@ -143255,7 +143287,7 @@ ${code2}
|
|
|
143255
143287
|
"div",
|
|
143256
143288
|
{
|
|
143257
143289
|
className: "k-md-editor-inline-toolbar flex items-center gap-0.5 p-1 bg-gray-800 rounded-lg shadow-lg pointer-events-auto",
|
|
143258
|
-
"data-id": "md-editor-inline-toolbar",
|
|
143290
|
+
"data-test-id": "md-editor-inline-toolbar",
|
|
143259
143291
|
onMouseDown: (e) => {
|
|
143260
143292
|
e.stopPropagation();
|
|
143261
143293
|
},
|
|
@@ -143279,7 +143311,7 @@ ${code2}
|
|
|
143279
143311
|
title: `${item.label}${item.shortcut ? ` (${item.shortcut})` : ""}`,
|
|
143280
143312
|
"aria-label": item.label,
|
|
143281
143313
|
"aria-pressed": isActive2,
|
|
143282
|
-
"data-id": `md-editor-toolbar-${item.id}`,
|
|
143314
|
+
"data-test-id": `md-editor-toolbar-${item.id}`,
|
|
143283
143315
|
children: item.icon
|
|
143284
143316
|
}
|
|
143285
143317
|
),
|
|
@@ -143299,7 +143331,7 @@ ${code2}
|
|
|
143299
143331
|
className: `flex items-center justify-center w-8 h-8 p-0 border-0 rounded-md cursor-pointer transition-colors duration-150 pointer-events-auto ${isLinkActive ? "bg-gray-700 text-blue-400" : "bg-transparent text-gray-400 hover:bg-gray-700 hover:text-blue-400"}`,
|
|
143300
143332
|
"aria-label": "Link",
|
|
143301
143333
|
"aria-pressed": isLinkActive,
|
|
143302
|
-
"data-id": "md-editor-toolbar-link",
|
|
143334
|
+
"data-test-id": "md-editor-toolbar-link",
|
|
143303
143335
|
children: /* @__PURE__ */ jsxRuntimeExports.jsx(Link$1, { size: 16 })
|
|
143304
143336
|
}
|
|
143305
143337
|
),
|
|
@@ -143317,7 +143349,7 @@ ${code2}
|
|
|
143317
143349
|
title: "Refine with AI (⌘⇧R)",
|
|
143318
143350
|
className: "k-md-editor-inline-toolbar__ai-btn flex items-center justify-center gap-1 h-8 px-2.5 border-0 rounded-md cursor-pointer transition-colors duration-150 bg-transparent text-violet-400 text-xs font-medium pointer-events-auto hover:bg-violet-900 hover:text-white",
|
|
143319
143351
|
"aria-label": "Refine with AI",
|
|
143320
|
-
"data-id": "md-editor-toolbar-ai-refine",
|
|
143352
|
+
"data-test-id": "md-editor-toolbar-ai-refine",
|
|
143321
143353
|
children: [
|
|
143322
143354
|
/* @__PURE__ */ jsxRuntimeExports.jsx(Sparkles, { size: 14 }),
|
|
143323
143355
|
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { children: "AI" })
|
|
@@ -143338,7 +143370,7 @@ ${code2}
|
|
|
143338
143370
|
title: "Delete selection",
|
|
143339
143371
|
className: "flex items-center justify-center w-8 h-8 p-0 border-0 rounded-md cursor-pointer transition-colors duration-150 bg-transparent text-gray-400 pointer-events-auto hover:bg-red-500/20 hover:text-red-400",
|
|
143340
143372
|
"aria-label": "Delete",
|
|
143341
|
-
"data-id": "md-editor-toolbar-delete",
|
|
143373
|
+
"data-test-id": "md-editor-toolbar-delete",
|
|
143342
143374
|
children: /* @__PURE__ */ jsxRuntimeExports.jsx(Trash2, { size: 16 })
|
|
143343
143375
|
}
|
|
143344
143376
|
)
|
|
@@ -143635,7 +143667,7 @@ ${code2}
|
|
|
143635
143667
|
{
|
|
143636
143668
|
className: "k-md-editor-drag-handle-container absolute left-1 flex items-center gap-0.5 z-10 opacity-100 pointer-events-auto h-6 px-1.5 py-1 -ml-1 mt-0.5 rounded-md hover:bg-black/[0.03]",
|
|
143637
143669
|
style: { top: handleTop },
|
|
143638
|
-
"data-id": "md-editor-drag-handle",
|
|
143670
|
+
"data-test-id": "md-editor-drag-handle",
|
|
143639
143671
|
onMouseEnter: () => {
|
|
143640
143672
|
},
|
|
143641
143673
|
onMouseLeave: () => {
|
|
@@ -143655,7 +143687,7 @@ ${code2}
|
|
|
143655
143687
|
className: "flex items-center justify-center w-[22px] h-[22px] p-0 border-0 rounded bg-transparent text-gray-400 cursor-pointer transition-all duration-150 hover:bg-black/[0.08] hover:text-gray-700",
|
|
143656
143688
|
onClick: handleAddClick,
|
|
143657
143689
|
title: "Add block below",
|
|
143658
|
-
"data-id": "md-editor-add-block-btn",
|
|
143690
|
+
"data-test-id": "md-editor-add-block-btn",
|
|
143659
143691
|
children: /* @__PURE__ */ jsxRuntimeExports.jsx(Plus, { size: 14 })
|
|
143660
143692
|
}
|
|
143661
143693
|
),
|
|
@@ -143666,7 +143698,7 @@ ${code2}
|
|
|
143666
143698
|
draggable: "true",
|
|
143667
143699
|
onDragStart: handleDragStart,
|
|
143668
143700
|
title: "Drag to reorder",
|
|
143669
|
-
"data-id": "md-editor-drag-grip",
|
|
143701
|
+
"data-test-id": "md-editor-drag-grip",
|
|
143670
143702
|
children: /* @__PURE__ */ jsxRuntimeExports.jsx(GripVertical, { size: 14 })
|
|
143671
143703
|
}
|
|
143672
143704
|
)
|
|
@@ -143712,7 +143744,7 @@ ${code2}
|
|
|
143712
143744
|
"div",
|
|
143713
143745
|
{
|
|
143714
143746
|
className: `inline-flex items-center gap-1.5 px-2 py-1.5 rounded-lg shadow-lg z-50 ${isDark ? "bg-gray-800 border border-gray-700" : "bg-white border border-gray-200"}`,
|
|
143715
|
-
"data-id": "md-editor-table-toolbar",
|
|
143747
|
+
"data-test-id": "md-editor-table-toolbar",
|
|
143716
143748
|
children: [
|
|
143717
143749
|
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-0.5 shrink-0", children: [
|
|
143718
143750
|
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: `text-[10px] font-medium uppercase tracking-wide mr-1 ${isDark ? "text-gray-500" : "text-gray-400"}`, children: "Row" }),
|
|
@@ -143723,7 +143755,7 @@ ${code2}
|
|
|
143723
143755
|
onClick: addRowBefore2,
|
|
143724
143756
|
className: btnBase,
|
|
143725
143757
|
title: "Add row above",
|
|
143726
|
-
"data-id": "md-editor-table-add-row-above",
|
|
143758
|
+
"data-test-id": "md-editor-table-add-row-above",
|
|
143727
143759
|
children: [
|
|
143728
143760
|
/* @__PURE__ */ jsxRuntimeExports.jsx(ArrowUp, { size: 14 }),
|
|
143729
143761
|
/* @__PURE__ */ jsxRuntimeExports.jsx(Plus, { size: 10 })
|
|
@@ -143737,7 +143769,7 @@ ${code2}
|
|
|
143737
143769
|
onClick: addRowAfter2,
|
|
143738
143770
|
className: btnBase,
|
|
143739
143771
|
title: "Add row below",
|
|
143740
|
-
"data-id": "md-editor-table-add-row-below",
|
|
143772
|
+
"data-test-id": "md-editor-table-add-row-below",
|
|
143741
143773
|
children: [
|
|
143742
143774
|
/* @__PURE__ */ jsxRuntimeExports.jsx(ArrowDown, { size: 14 }),
|
|
143743
143775
|
/* @__PURE__ */ jsxRuntimeExports.jsx(Plus, { size: 10 })
|
|
@@ -143751,7 +143783,7 @@ ${code2}
|
|
|
143751
143783
|
onClick: deleteRow2,
|
|
143752
143784
|
className: btnDanger,
|
|
143753
143785
|
title: "Delete row",
|
|
143754
|
-
"data-id": "md-editor-table-delete-row",
|
|
143786
|
+
"data-test-id": "md-editor-table-delete-row",
|
|
143755
143787
|
children: /* @__PURE__ */ jsxRuntimeExports.jsx(Minus, { size: 14 })
|
|
143756
143788
|
}
|
|
143757
143789
|
)
|
|
@@ -143766,7 +143798,7 @@ ${code2}
|
|
|
143766
143798
|
onClick: addColumnBefore2,
|
|
143767
143799
|
className: btnBase,
|
|
143768
143800
|
title: "Add column left",
|
|
143769
|
-
"data-id": "md-editor-table-add-col-left",
|
|
143801
|
+
"data-test-id": "md-editor-table-add-col-left",
|
|
143770
143802
|
children: [
|
|
143771
143803
|
/* @__PURE__ */ jsxRuntimeExports.jsx(ArrowLeft, { size: 14 }),
|
|
143772
143804
|
/* @__PURE__ */ jsxRuntimeExports.jsx(Plus, { size: 10 })
|
|
@@ -143780,7 +143812,7 @@ ${code2}
|
|
|
143780
143812
|
onClick: addColumnAfter2,
|
|
143781
143813
|
className: btnBase,
|
|
143782
143814
|
title: "Add column right",
|
|
143783
|
-
"data-id": "md-editor-table-add-col-right",
|
|
143815
|
+
"data-test-id": "md-editor-table-add-col-right",
|
|
143784
143816
|
children: [
|
|
143785
143817
|
/* @__PURE__ */ jsxRuntimeExports.jsx(ArrowRight, { size: 14 }),
|
|
143786
143818
|
/* @__PURE__ */ jsxRuntimeExports.jsx(Plus, { size: 10 })
|
|
@@ -143794,7 +143826,7 @@ ${code2}
|
|
|
143794
143826
|
onClick: deleteColumn2,
|
|
143795
143827
|
className: btnDanger,
|
|
143796
143828
|
title: "Delete column",
|
|
143797
|
-
"data-id": "md-editor-table-delete-col",
|
|
143829
|
+
"data-test-id": "md-editor-table-delete-col",
|
|
143798
143830
|
children: /* @__PURE__ */ jsxRuntimeExports.jsx(Minus, { size: 14 })
|
|
143799
143831
|
}
|
|
143800
143832
|
)
|
|
@@ -143807,7 +143839,7 @@ ${code2}
|
|
|
143807
143839
|
onClick: deleteTable2,
|
|
143808
143840
|
className: `${btnDanger} shrink-0`,
|
|
143809
143841
|
title: "Delete table",
|
|
143810
|
-
"data-id": "md-editor-table-delete",
|
|
143842
|
+
"data-test-id": "md-editor-table-delete",
|
|
143811
143843
|
children: /* @__PURE__ */ jsxRuntimeExports.jsx(Trash2, { size: 14 })
|
|
143812
143844
|
}
|
|
143813
143845
|
)
|
|
@@ -144284,7 +144316,7 @@ ${code2}
|
|
|
144284
144316
|
"div",
|
|
144285
144317
|
{
|
|
144286
144318
|
className: `shrink-0 rounded-xl mb-2 border overflow-hidden transition-all duration-300 ${isDark ? "bg-gray-800/80 border-white/10 backdrop-blur-sm" : "bg-white/90 border-black/[0.08] backdrop-blur-sm shadow-sm"}`,
|
|
144287
|
-
"data-id": "md-editor-ai-tips-section",
|
|
144319
|
+
"data-test-id": "md-editor-ai-tips-section",
|
|
144288
144320
|
children: [
|
|
144289
144321
|
/* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
144290
144322
|
"button",
|
|
@@ -144292,7 +144324,7 @@ ${code2}
|
|
|
144292
144324
|
type: "button",
|
|
144293
144325
|
onClick: () => setIsTipsExpanded(!isTipsExpanded),
|
|
144294
144326
|
className: `w-full flex items-center justify-between px-3.5 py-2 transition-colors ${isDark ? "hover:bg-white/5" : "hover:bg-black/[0.02]"}`,
|
|
144295
|
-
"data-id": "md-editor-ai-tips-toggle",
|
|
144327
|
+
"data-test-id": "md-editor-ai-tips-toggle",
|
|
144296
144328
|
children: [
|
|
144297
144329
|
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
144298
144330
|
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: `flex items-center justify-center w-5 h-5 rounded-md ${isDark ? "bg-amber-500/20 text-amber-400" : "bg-amber-500/15 text-amber-600"}`, children: /* @__PURE__ */ jsxRuntimeExports.jsx(Zap, { size: 12 }) }),
|
|
@@ -144412,7 +144444,7 @@ ${code2}
|
|
|
144412
144444
|
className: "flex items-center justify-center w-8 h-8 rounded-lg bg-white/15 text-white cursor-pointer transition-all hover:bg-white/25 hover:scale-105",
|
|
144413
144445
|
onClick: handleReset,
|
|
144414
144446
|
title: "Start over",
|
|
144415
|
-
"data-id": "md-editor-ai-reset-btn",
|
|
144447
|
+
"data-test-id": "md-editor-ai-reset-btn",
|
|
144416
144448
|
children: /* @__PURE__ */ jsxRuntimeExports.jsx(RefreshCw, { size: 16 })
|
|
144417
144449
|
}
|
|
144418
144450
|
),
|
|
@@ -144422,7 +144454,7 @@ ${code2}
|
|
|
144422
144454
|
className: "flex items-center justify-center w-8 h-8 rounded-lg bg-white/15 text-white cursor-pointer transition-all hover:bg-red-500/80",
|
|
144423
144455
|
onClick: onClose,
|
|
144424
144456
|
title: "Close",
|
|
144425
|
-
"data-id": "md-editor-ai-close-btn",
|
|
144457
|
+
"data-test-id": "md-editor-ai-close-btn",
|
|
144426
144458
|
children: /* @__PURE__ */ jsxRuntimeExports.jsx(X, { size: 18 })
|
|
144427
144459
|
}
|
|
144428
144460
|
)
|
|
@@ -144436,7 +144468,7 @@ ${code2}
|
|
|
144436
144468
|
"div",
|
|
144437
144469
|
{
|
|
144438
144470
|
className: `relative flex items-start gap-2 w-full px-3 py-2.5 rounded-lg text-left mt-2 transition-all duration-300 border ${isDark ? "bg-white/5 border-white/10" : "bg-black/[0.03] border-black/5"} ${showSelectionHighlight ? "k-md-editor-snake-border" : ""}`,
|
|
144439
|
-
"data-id": "md-editor-ai-selection-box",
|
|
144471
|
+
"data-test-id": "md-editor-ai-selection-box",
|
|
144440
144472
|
children: [
|
|
144441
144473
|
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: `shrink-0 px-2 py-0.5 text-[10px] font-semibold uppercase tracking-wide rounded-md transition-all duration-300 ${showSelectionHighlight ? "text-white bg-gradient-to-r from-violet-500 to-indigo-500 scale-105 shadow-md" : isDark ? "text-violet-400 bg-violet-500/20" : "text-violet-600 bg-violet-500/10"}`, children: context.type === "selection" ? "Selection" : "Full" }),
|
|
144442
144474
|
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex-1 min-w-0", children: /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: `text-xs leading-snug break-words ${isDark ? "text-gray-300" : "text-gray-600"} ${isContentExpanded ? "" : "line-clamp-4"}`, children: context.originalText || "(No content selected)" }) }),
|
|
@@ -144447,7 +144479,7 @@ ${code2}
|
|
|
144447
144479
|
onClick: () => setIsContentExpanded(!isContentExpanded),
|
|
144448
144480
|
className: `shrink-0 p-1 rounded transition-all duration-200 ${isDark ? "text-gray-500 hover:text-gray-300 hover:bg-white/10" : "text-gray-400 hover:text-gray-600 hover:bg-black/5"}`,
|
|
144449
144481
|
title: isContentExpanded ? "Show less" : "Show more",
|
|
144450
|
-
"data-id": "md-editor-ai-expand-btn",
|
|
144482
|
+
"data-test-id": "md-editor-ai-expand-btn",
|
|
144451
144483
|
children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
144452
144484
|
ChevronDown,
|
|
144453
144485
|
{
|
|
@@ -144472,13 +144504,13 @@ ${code2}
|
|
|
144472
144504
|
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { ref: messagesEndRef })
|
|
144473
144505
|
] }),
|
|
144474
144506
|
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: `flex flex-col gap-2.5 px-3.5 py-3 border-t shrink-0 rounded-b-xl ${isDark ? "bg-gradient-to-b from-transparent to-black/20 border-white/5" : "bg-gradient-to-b from-transparent to-black/[0.02] border-black/5"}`, children: [
|
|
144475
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex flex-wrap gap-1.5", "data-id": "md-editor-ai-quick-actions", children: QUICK_ACTIONS.map((action) => /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
144507
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex flex-wrap gap-1.5", "data-test-id": "md-editor-ai-quick-actions", children: QUICK_ACTIONS.map((action) => /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
144476
144508
|
"button",
|
|
144477
144509
|
{
|
|
144478
144510
|
className: `flex items-center gap-1 px-2.5 py-1.5 text-xs font-medium rounded-full cursor-pointer transition-all disabled:opacity-50 disabled:cursor-not-allowed ${isDark ? "bg-gray-700 text-gray-300 hover:bg-violet-500 hover:text-white" : "bg-gray-100 text-gray-600 hover:bg-violet-500 hover:text-white"} active:scale-95`,
|
|
144479
144511
|
onClick: () => handleQuickAction(action),
|
|
144480
144512
|
disabled: isLoading,
|
|
144481
|
-
"data-id": `md-editor-ai-action-${action.id}`,
|
|
144513
|
+
"data-test-id": `md-editor-ai-action-${action.id}`,
|
|
144482
144514
|
children: [
|
|
144483
144515
|
action.icon,
|
|
144484
144516
|
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { children: action.label })
|
|
@@ -144491,7 +144523,7 @@ ${code2}
|
|
|
144491
144523
|
{
|
|
144492
144524
|
ref: mentionMenuRef,
|
|
144493
144525
|
className: `rounded-lg border shadow-lg overflow-hidden max-h-[280px] flex flex-col ${isDark ? "bg-gray-800 border-gray-600" : "bg-white border-gray-200"}`,
|
|
144494
|
-
"data-id": "md-editor-ai-mention-menu",
|
|
144526
|
+
"data-test-id": "md-editor-ai-mention-menu",
|
|
144495
144527
|
children: [
|
|
144496
144528
|
mentionQuery && !selectedCategory && searchResults.length > 0 && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "py-1 overflow-y-auto", children: [
|
|
144497
144529
|
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: `px-3 py-1.5 text-[10px] font-medium uppercase tracking-wide ${isDark ? "text-gray-500" : "text-gray-400"}`, children: "Results" }),
|
|
@@ -144502,7 +144534,7 @@ ${code2}
|
|
|
144502
144534
|
{
|
|
144503
144535
|
className: `w-full flex items-center gap-2 px-3 py-2 text-left transition-colors ${index === selectedMentionIndex ? isDark ? "bg-violet-500/20 text-violet-300" : "bg-violet-50 text-violet-700" : isDark ? "text-gray-300 hover:bg-white/5" : "text-gray-700 hover:bg-gray-50"}`,
|
|
144504
144536
|
onClick: () => insertMentionItem(item, item.category),
|
|
144505
|
-
"data-id": `md-editor-ai-mention-${isVariable ? item.path : item.id}`,
|
|
144537
|
+
"data-test-id": `md-editor-ai-mention-${isVariable ? item.path : item.id}`,
|
|
144506
144538
|
children: [
|
|
144507
144539
|
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: `text-xs px-1.5 py-0.5 rounded ${isDark ? "bg-gray-700 text-gray-400" : "bg-gray-100 text-gray-500"}`, children: item.category }),
|
|
144508
144540
|
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-sm font-medium truncate", children: item.name }),
|
|
@@ -144528,7 +144560,7 @@ ${code2}
|
|
|
144528
144560
|
{
|
|
144529
144561
|
className: `w-full flex items-center justify-between gap-2 px-3 py-2 text-left transition-colors ${index === selectedMentionIndex ? isDark ? "bg-violet-500/20 text-violet-300" : "bg-violet-50 text-violet-700" : isDark ? "text-gray-300 hover:bg-white/5" : "text-gray-700 hover:bg-gray-50"}`,
|
|
144530
144562
|
onClick: () => handleCategorySelect(category.type),
|
|
144531
|
-
"data-id": `md-editor-ai-mention-category-${category.type}`,
|
|
144563
|
+
"data-test-id": `md-editor-ai-mention-category-${category.type}`,
|
|
144532
144564
|
children: [
|
|
144533
144565
|
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
144534
144566
|
category.icon,
|
|
@@ -144553,7 +144585,7 @@ ${code2}
|
|
|
144553
144585
|
{
|
|
144554
144586
|
className: `flex items-center gap-1 text-xs transition-colors ${isDark ? "text-gray-400 hover:text-gray-200" : "text-gray-500 hover:text-gray-700"}`,
|
|
144555
144587
|
onClick: handleBackToCategories,
|
|
144556
|
-
"data-id": "md-editor-ai-mention-back",
|
|
144588
|
+
"data-test-id": "md-editor-ai-mention-back",
|
|
144557
144589
|
children: [
|
|
144558
144590
|
/* @__PURE__ */ jsxRuntimeExports.jsx(ChevronRight, { size: 14, className: "rotate-180" }),
|
|
144559
144591
|
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { children: "Back" })
|
|
@@ -144586,7 +144618,7 @@ ${code2}
|
|
|
144586
144618
|
(_a2 = inputRef.current) == null ? void 0 : _a2.dispatchEvent(new KeyboardEvent("keydown", { key: e.key, bubbles: true }));
|
|
144587
144619
|
}
|
|
144588
144620
|
},
|
|
144589
|
-
"data-id": "md-editor-ai-mention-search"
|
|
144621
|
+
"data-test-id": "md-editor-ai-mention-search"
|
|
144590
144622
|
}
|
|
144591
144623
|
)
|
|
144592
144624
|
] }) }),
|
|
@@ -144597,7 +144629,7 @@ ${code2}
|
|
|
144597
144629
|
{
|
|
144598
144630
|
className: `w-full flex flex-col gap-0.5 px-3 py-2 text-left transition-colors ${index === selectedMentionIndex ? isDark ? "bg-violet-500/20 text-violet-300" : "bg-violet-50 text-violet-700" : isDark ? "text-gray-300 hover:bg-white/5" : "text-gray-700 hover:bg-gray-50"}`,
|
|
144599
144631
|
onClick: () => insertMentionItem(item, selectedCategory || void 0),
|
|
144600
|
-
"data-id": `md-editor-ai-mention-item-${isVariable ? item.path : item.id}`,
|
|
144632
|
+
"data-test-id": `md-editor-ai-mention-item-${isVariable ? item.path : item.id}`,
|
|
144601
144633
|
children: [
|
|
144602
144634
|
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-sm font-medium", children: item.name }),
|
|
144603
144635
|
isVariable ? /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: `text-xs truncate ${isDark ? "text-gray-500" : "text-gray-400"}`, children: `{{${selectedCategory}.${item.path}}}` }) : item.description ? /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: `text-xs truncate ${isDark ? "text-gray-500" : "text-gray-400"}`, children: item.description }) : null
|
|
@@ -144610,7 +144642,7 @@ ${code2}
|
|
|
144610
144642
|
]
|
|
144611
144643
|
}
|
|
144612
144644
|
),
|
|
144613
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: `flex items-end gap-2 p-1 rounded-xl border-[1.5px] transition-all ${isDark ? "bg-gray-800 border-gray-600 focus-within:border-violet-500 focus-within:shadow-[0_0_0_4px_rgba(139,92,246,0.2)]" : "bg-white border-gray-200 focus-within:border-violet-500 focus-within:shadow-[0_0_0_4px_rgba(139,92,246,0.1)]"}`, "data-id": "md-editor-ai-input-container", children: [
|
|
144645
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: `flex items-end gap-2 p-1 rounded-xl border-[1.5px] transition-all ${isDark ? "bg-gray-800 border-gray-600 focus-within:border-violet-500 focus-within:shadow-[0_0_0_4px_rgba(139,92,246,0.2)]" : "bg-white border-gray-200 focus-within:border-violet-500 focus-within:shadow-[0_0_0_4px_rgba(139,92,246,0.1)]"}`, "data-test-id": "md-editor-ai-input-container", children: [
|
|
144614
144646
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
144615
144647
|
"textarea",
|
|
144616
144648
|
{
|
|
@@ -144622,7 +144654,7 @@ ${code2}
|
|
|
144622
144654
|
onKeyDown: handleKeyDown2,
|
|
144623
144655
|
rows: 1,
|
|
144624
144656
|
disabled: isLoading,
|
|
144625
|
-
"data-id": "md-editor-ai-input"
|
|
144657
|
+
"data-test-id": "md-editor-ai-input"
|
|
144626
144658
|
}
|
|
144627
144659
|
),
|
|
144628
144660
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
@@ -144636,7 +144668,7 @@ ${code2}
|
|
|
144636
144668
|
},
|
|
144637
144669
|
disabled: !inputValue.trim() || isLoading,
|
|
144638
144670
|
title: "Send",
|
|
144639
|
-
"data-id": "md-editor-ai-send-btn",
|
|
144671
|
+
"data-test-id": "md-editor-ai-send-btn",
|
|
144640
144672
|
children: /* @__PURE__ */ jsxRuntimeExports.jsx(Send, { size: 18 })
|
|
144641
144673
|
}
|
|
144642
144674
|
)
|
|
@@ -144649,7 +144681,7 @@ ${code2}
|
|
|
144649
144681
|
"div",
|
|
144650
144682
|
{
|
|
144651
144683
|
className: "flex flex-col w-[400px] min-w-[340px] max-w-[500px] h-[calc(100%-24px)] m-3 mr-3 ml-0 shrink-0 animate-[ai-panel-slide-in_0.3s_cubic-bezier(0.4,0,0.2,1)]",
|
|
144652
|
-
"data-id": "md-editor-ai-panel-side",
|
|
144684
|
+
"data-test-id": "md-editor-ai-panel-side",
|
|
144653
144685
|
children: [
|
|
144654
144686
|
tipsContent,
|
|
144655
144687
|
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: `flex-1 min-h-0 border rounded-2xl overflow-hidden ${isDark ? "border-white/10 shadow-[-4px_0_32px_rgba(0,0,0,0.4)]" : "border-black/[0.08] shadow-[-4px_0_32px_rgba(0,0,0,0.12)]"}`, children: panelContent })
|
|
@@ -144657,13 +144689,13 @@ ${code2}
|
|
|
144657
144689
|
}
|
|
144658
144690
|
);
|
|
144659
144691
|
case "inline-popup":
|
|
144660
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "fixed inset-0 z-[9999] flex items-center justify-center", "data-id": "md-editor-ai-panel-popup", children: [
|
|
144692
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "fixed inset-0 z-[9999] flex items-center justify-center", "data-test-id": "md-editor-ai-panel-popup", children: [
|
|
144661
144693
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
144662
144694
|
"div",
|
|
144663
144695
|
{
|
|
144664
144696
|
className: "absolute inset-0 bg-black/60 backdrop-blur-sm animate-[ai-backdrop-in_0.2s_ease-out]",
|
|
144665
144697
|
onClick: onClose,
|
|
144666
|
-
"data-id": "md-editor-ai-panel-backdrop"
|
|
144698
|
+
"data-test-id": "md-editor-ai-panel-backdrop"
|
|
144667
144699
|
}
|
|
144668
144700
|
),
|
|
144669
144701
|
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "relative w-[90%] max-w-[600px] max-h-[80vh] flex flex-col gap-2 animate-[ai-popup-scale-in_0.3s_cubic-bezier(0.4,0,0.2,1)]", children: [
|
|
@@ -144672,19 +144704,19 @@ ${code2}
|
|
|
144672
144704
|
] })
|
|
144673
144705
|
] });
|
|
144674
144706
|
case "bottom-drawer":
|
|
144675
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "fixed inset-0 z-[9999] flex flex-col justify-end", "data-id": "md-editor-ai-panel-drawer", children: [
|
|
144707
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "fixed inset-0 z-[9999] flex flex-col justify-end", "data-test-id": "md-editor-ai-panel-drawer", children: [
|
|
144676
144708
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
144677
144709
|
"div",
|
|
144678
144710
|
{
|
|
144679
144711
|
className: "absolute inset-0 bg-black/60 backdrop-blur-sm",
|
|
144680
144712
|
onClick: onClose,
|
|
144681
|
-
"data-id": "md-editor-ai-panel-backdrop"
|
|
144713
|
+
"data-test-id": "md-editor-ai-panel-backdrop"
|
|
144682
144714
|
}
|
|
144683
144715
|
),
|
|
144684
144716
|
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "relative w-full max-h-[70vh] flex flex-col gap-2 px-4 pb-4 animate-[ai-drawer-slide-up_0.4s_cubic-bezier(0.4,0,0.2,1)]", children: [
|
|
144685
144717
|
tipsContent,
|
|
144686
144718
|
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex-1 min-h-0 rounded-t-[24px] overflow-hidden shadow-[0_-10px_40px_rgba(0,0,0,0.2)]", children: [
|
|
144687
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: `w-10 h-1 rounded-full mx-auto mt-3 mb-2 ${isDark ? "bg-white/20" : "bg-black/20"}`, "data-id": "md-editor-ai-panel-drawer-handle" }),
|
|
144719
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: `w-10 h-1 rounded-full mx-auto mt-3 mb-2 ${isDark ? "bg-white/20" : "bg-black/20"}`, "data-test-id": "md-editor-ai-panel-drawer-handle" }),
|
|
144688
144720
|
panelContent
|
|
144689
144721
|
] })
|
|
144690
144722
|
] })
|
|
@@ -144694,7 +144726,7 @@ ${code2}
|
|
|
144694
144726
|
"div",
|
|
144695
144727
|
{
|
|
144696
144728
|
className: "flex flex-col w-[400px] min-w-[340px] max-w-[500px] h-[calc(100%-24px)] m-3 mr-3 ml-0 shrink-0 animate-[ai-panel-slide-in_0.3s_cubic-bezier(0.4,0,0.2,1)]",
|
|
144697
|
-
"data-id": "md-editor-ai-panel",
|
|
144729
|
+
"data-test-id": "md-editor-ai-panel",
|
|
144698
144730
|
children: [
|
|
144699
144731
|
tipsContent,
|
|
144700
144732
|
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: `flex-1 min-h-0 border rounded-2xl overflow-hidden ${isDark ? "border-white/10 shadow-[-4px_0_32px_rgba(0,0,0,0.4)]" : "border-black/[0.08] shadow-[-4px_0_32px_rgba(0,0,0,0.12)]"}`, children: panelContent })
|
|
@@ -144775,14 +144807,14 @@ ${code2}
|
|
|
144775
144807
|
ref: menuRef,
|
|
144776
144808
|
className: "ai-context-menu fixed z-[9999] min-w-[180px] bg-gray-800 rounded-lg shadow-xl p-1 overflow-hidden",
|
|
144777
144809
|
style: { top: adjustedPosition.y, left: adjustedPosition.x },
|
|
144778
|
-
"data-id": "md-editor-context-menu",
|
|
144810
|
+
"data-test-id": "md-editor-context-menu",
|
|
144779
144811
|
children: [
|
|
144780
144812
|
/* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
144781
144813
|
"button",
|
|
144782
144814
|
{
|
|
144783
144815
|
className: "ai-context-menu__item ai-context-menu__item--ai flex items-center gap-2.5 w-full py-2.5 px-3 border-0 rounded-md cursor-pointer bg-violet-500/10 text-violet-400 text-sm font-medium text-left transition-colors duration-150 hover:bg-violet-500/20",
|
|
144784
144816
|
onClick: handleAIRefine,
|
|
144785
|
-
"data-id": "md-editor-context-ai-refine",
|
|
144817
|
+
"data-test-id": "md-editor-context-ai-refine",
|
|
144786
144818
|
children: [
|
|
144787
144819
|
/* @__PURE__ */ jsxRuntimeExports.jsx(Sparkles, { size: 16 }),
|
|
144788
144820
|
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { children: hasSelection2 ? "Refine Selection with AI" : "Refine with AI" }),
|
|
@@ -144797,7 +144829,7 @@ ${code2}
|
|
|
144797
144829
|
{
|
|
144798
144830
|
className: "ai-context-menu__item flex items-center gap-2.5 w-full py-2 px-3 border-0 rounded-md cursor-pointer bg-transparent text-gray-400 text-sm text-left transition-colors duration-150 hover:bg-gray-700 hover:text-white",
|
|
144799
144831
|
onClick: handleCut,
|
|
144800
|
-
"data-id": "md-editor-context-cut",
|
|
144832
|
+
"data-test-id": "md-editor-context-cut",
|
|
144801
144833
|
children: [
|
|
144802
144834
|
/* @__PURE__ */ jsxRuntimeExports.jsx(Scissors, { size: 16 }),
|
|
144803
144835
|
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { children: "Cut" }),
|
|
@@ -144810,7 +144842,7 @@ ${code2}
|
|
|
144810
144842
|
{
|
|
144811
144843
|
className: "ai-context-menu__item flex items-center gap-2.5 w-full py-2 px-3 border-0 rounded-md cursor-pointer bg-transparent text-gray-400 text-sm text-left transition-colors duration-150 hover:bg-gray-700 hover:text-white",
|
|
144812
144844
|
onClick: handleCopy,
|
|
144813
|
-
"data-id": "md-editor-context-copy",
|
|
144845
|
+
"data-test-id": "md-editor-context-copy",
|
|
144814
144846
|
children: [
|
|
144815
144847
|
/* @__PURE__ */ jsxRuntimeExports.jsx(Copy, { size: 16 }),
|
|
144816
144848
|
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { children: "Copy" }),
|
|
@@ -144824,7 +144856,7 @@ ${code2}
|
|
|
144824
144856
|
{
|
|
144825
144857
|
className: "ai-context-menu__item flex items-center gap-2.5 w-full py-2 px-3 border-0 rounded-md cursor-pointer bg-transparent text-gray-400 text-sm text-left transition-colors duration-150 hover:bg-gray-700 hover:text-white",
|
|
144826
144858
|
onClick: handlePaste2,
|
|
144827
|
-
"data-id": "md-editor-context-paste",
|
|
144859
|
+
"data-test-id": "md-editor-context-paste",
|
|
144828
144860
|
children: [
|
|
144829
144861
|
/* @__PURE__ */ jsxRuntimeExports.jsx(Clipboard, { size: 16 }),
|
|
144830
144862
|
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { children: "Paste" }),
|
|
@@ -145556,7 +145588,7 @@ ${code2}
|
|
|
145556
145588
|
[editor, insertVariable, insertMention, openAIRefine, closeAIRefine, toggleRawMode, isRawMode]
|
|
145557
145589
|
);
|
|
145558
145590
|
if (!editor) {
|
|
145559
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: `k-md-editor k-md-editor--${theme} flex items-center justify-center min-h-[200px] ${className}`, "data-id": "md-editor-loading", children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "w-full h-full min-h-[200px] rounded bg-gradient-to-r from-gray-200 via-gray-100 to-gray-200 dark:from-gray-700 dark:via-gray-600 dark:to-gray-700 bg-[length:200%_100%] animate-pulse" }) });
|
|
145591
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: `k-md-editor k-md-editor--${theme} flex items-center justify-center min-h-[200px] ${className}`, "data-test-id": "md-editor-loading", children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "w-full h-full min-h-[200px] rounded bg-gradient-to-r from-gray-200 via-gray-100 to-gray-200 dark:from-gray-700 dark:via-gray-600 dark:to-gray-700 bg-[length:200%_100%] animate-pulse" }) });
|
|
145560
145592
|
}
|
|
145561
145593
|
const isAIEnabled = mergedAIConfig.enabled && onAIRefine && !readOnly;
|
|
145562
145594
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
@@ -145564,7 +145596,7 @@ ${code2}
|
|
|
145564
145596
|
{
|
|
145565
145597
|
ref: editorContainerRef,
|
|
145566
145598
|
className: `k-md-editor k-md-editor--${theme} ${readOnly ? "pointer-events-none opacity-80" : ""} ${mergedFeatures.dragDrop ? "k-md-editor--drag-enabled" : ""} ${aiPanelOpen && mergedAIConfig.panelPosition === "side-panel" ? "k-md-editor--ai-panel-open" : ""} ${className}`,
|
|
145567
|
-
"data-id": "md-editor",
|
|
145599
|
+
"data-test-id": "md-editor",
|
|
145568
145600
|
"data-theme": theme,
|
|
145569
145601
|
children: [
|
|
145570
145602
|
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "k-md-editor__main flex flex-col flex-1 min-w-0 h-full relative transition-[flex] duration-[250ms] ease-[cubic-bezier(0.4,0,0.2,1)]", children: [
|
|
@@ -145667,7 +145699,7 @@ ${code2}
|
|
|
145667
145699
|
onClick: toggleRawMode,
|
|
145668
145700
|
className: "absolute top-2 right-2 p-1.5 rounded-md z-10 transition-all duration-200\n bg-white/80 dark:bg-gray-800/80 backdrop-blur-sm\n border border-gray-200 dark:border-gray-700\n hover:bg-gray-100 dark:hover:bg-gray-700\n hover:border-gray-300 dark:hover:border-gray-600\n text-gray-600 dark:text-gray-400\n hover:text-gray-900 dark:hover:text-gray-100\n shadow-sm hover:shadow",
|
|
145669
145701
|
title: isRawMode ? "Switch to rich editor" : "Switch to raw markdown",
|
|
145670
|
-
"data-id": "md-editor-raw-toggle",
|
|
145702
|
+
"data-test-id": "md-editor-raw-toggle",
|
|
145671
145703
|
children: isRawMode ? (
|
|
145672
145704
|
// Eye icon (switch to rich/preview mode)
|
|
145673
145705
|
/* @__PURE__ */ jsxRuntimeExports.jsxs("svg", { className: "w-4 h-4", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 2, children: [
|
|
@@ -145689,7 +145721,7 @@ ${code2}
|
|
|
145689
145721
|
onChange: (e) => handleRawMarkdownChange(e.target.value),
|
|
145690
145722
|
className: "k-md-editor__raw-textarea w-full h-full min-h-[200px] p-4 pr-12\n font-mono text-sm leading-relaxed resize-none\n bg-gray-50 dark:bg-gray-900\n text-gray-900 dark:text-gray-100\n border-0 focus:outline-none focus:ring-0\n placeholder:text-gray-400 dark:placeholder:text-gray-600",
|
|
145691
145723
|
placeholder: "Write your markdown here...\n\n# Heading\n## Subheading\n- Bullet point\n1. Numbered list\n**bold** _italic_ `code`",
|
|
145692
|
-
"data-id": "md-editor-raw-textarea",
|
|
145724
|
+
"data-test-id": "md-editor-raw-textarea",
|
|
145693
145725
|
spellCheck: false
|
|
145694
145726
|
}
|
|
145695
145727
|
)
|