agentic-ui-libs 1.1.0-beta.2 → 1.1.0-beta.5

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.
@@ -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: "Today",
34551
- value: "today",
34544
+ label: "Last 24 hours",
34545
+ value: "24h",
34552
34546
  dateRange: {
34553
- from: startOfDay(/* @__PURE__ */ new Date()),
34547
+ from: subDays(/* @__PURE__ */ new Date(), 1),
34554
34548
  to: /* @__PURE__ */ new Date()
34555
34549
  }
34556
34550
  },
34557
34551
  {
34558
- label: "Yesterday",
34559
- value: "yesterday",
34552
+ label: "Last 48 hours",
34553
+ value: "48h",
34560
34554
  dateRange: {
34561
- from: startOfDay(subDays(/* @__PURE__ */ new Date(), 1)),
34562
- to: endOfDay(subDays(/* @__PURE__ */ new Date(), 1))
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: this.config.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: this.config.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" ? "today" : timeRange === "1 hour" ? "today" : "7d" : "7d",
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-[172px]"
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.jsxs("div", { className: "flex gap-[8px] items-center", children: [
106571
- /* @__PURE__ */ jsxRuntimeExports.jsx(
106572
- "button",
106573
- {
106574
- onClick: handleCopyTraceId,
106575
- className: "p-0 opacity-60 hover:opacity-100 transition-opacity",
106576
- title: "Copy trace ID",
106577
- "data-test-id": `trace-tree-copy-id-btn-${trace.id}`,
106578
- children: /* @__PURE__ */ jsxRuntimeExports.jsx(Copy, { className: `w-[12px] h-[12px] ${copied ? "text-[#17B26A]" : "text-[#98A2B3]"}` })
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
- iconStyle: { width: "12px", height: "12px" },
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
- iconStyle: { width: "20px", height: "20px" },
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
- iconStyle: { width: "16px", height: "16px" },
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: `text-gray-400 ${iconClassName}`, style: { ...sizeClasses2.iconStyle, ...iconStyle } })
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, { style: { width: "20px", height: "20px", stroke: "#9CA3AF" } }),
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, { style: { width: "16px", height: "16px", stroke: "#9CA3AF" } })
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, { style: { width: "16px", height: "16px", stroke: "#9CA3AF" } })
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, { style: { width: "16px", height: "16px", stroke: "#9CA3AF" } })
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, { style: { width: "12px", height: "12px", stroke: darkMode ? "#6B7280" : "#9CA3AF" } }) : /* @__PURE__ */ jsxRuntimeExports.jsx(ChevronRight, { style: { width: "12px", height: "12px", stroke: darkMode ? "#6B7280" : "#9CA3AF" } }),
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, { style: { width: "12px", height: "12px", stroke: darkMode ? "#6B7280" : "#9CA3AF" } }) : /* @__PURE__ */ jsxRuntimeExports.jsx(ChevronRight, { style: { width: "12px", height: "12px", stroke: darkMode ? "#6B7280" : "#9CA3AF" } }),
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, { style: { width: "16px", height: "16px", stroke: "#98A2B3" } })
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, { style: { width: "16px", height: "16px", stroke: "#98A2B3" } })
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, { style: { width: "16px", height: "16px", stroke: "#98A2B3" } })
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.jsx("div", { className: "w-[480px] min-w-[400px] max-w-[600px] border-r border-[#E4E7EC] flex flex-col bg-[#F9FAFB] overflow-auto", children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex-1 p-[16px]", children: [
109215
- 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" }),
109216
- traces.map((trace, index) => {
109217
- var _a, _b, _c, _d;
109218
- 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) || [] : [];
109219
- 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;
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
- traceCount: 1,
109244
- observationsPerTrace: 4,
109245
- isExpanded: isFirstPending,
109246
- showTraceId: true,
109247
- className: "!p-0"
109248
- },
109249
- `skeleton-${pendingTraceId}`
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
  ] });
@@ -109882,14 +109905,18 @@ For more info see: https://www.ag-grid.com/javascript-grid/modules/`;
109882
109905
  }
109883
109906
  },
109884
109907
  // === ADDITIONAL COLUMNS (HIDDEN BY DEFAULT) ===
109885
- {
109886
- field: "bookmarked",
109887
- headerName: "⭐️",
109888
- width: 50,
109889
- hide: true,
109890
- disabled: true,
109891
- cellRenderer: (params) => /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: `cursor-pointer ${params.value ? "text-yellow-500" : "text-gray-300"}`, children: params.value ? "★" : "☆" })
109892
- },
109908
+ // {
109909
+ // field: 'bookmarked',
109910
+ // headerName: '⭐️',
109911
+ // width: 50,
109912
+ // hide: true,
109913
+ // disabled: true,
109914
+ // cellRenderer: (params: any) => (
109915
+ // <span className={`cursor-pointer ${params.value ? 'text-yellow-500' : 'text-gray-300'}`}>
109916
+ // {params.value ? '★' : '☆'}
109917
+ // </span>
109918
+ // ),
109919
+ // },
109893
109920
  {
109894
109921
  field: "appvId",
109895
109922
  headerName: "App Version ID",
@@ -109933,21 +109960,24 @@ For more info see: https://www.ag-grid.com/javascript-grid/modules/`;
109933
109960
  disabled: true,
109934
109961
  valueFormatter: (params) => TracingUtils.formatTokens(params.value),
109935
109962
  cellRenderer: (params) => /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-xs text-gray-700", children: TracingUtils.formatTokens(params.value) })
109936
- },
109937
- {
109938
- field: "traceTags",
109939
- headerName: "Trace Tags",
109940
- width: 180,
109941
- hide: true,
109942
- disabled: true,
109943
- cellRenderer: (params) => /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex flex-wrap gap-1", children: [
109944
- (params.value || []).slice(0, 3).map((tag, i2) => /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "px-1.5 py-0.5 text-xs bg-gray-100 rounded", children: tag }, i2)),
109945
- (params.value || []).length > 3 && /* @__PURE__ */ jsxRuntimeExports.jsxs("span", { className: "text-xs text-gray-500", children: [
109946
- "+",
109947
- params.value.length - 3
109948
- ] })
109949
- ] })
109950
109963
  }
109964
+ // {
109965
+ // field: 'traceTags',
109966
+ // headerName: 'Trace Tags',
109967
+ // width: 180,
109968
+ // hide: true,
109969
+ // disabled: true,
109970
+ // cellRenderer: (params: any) => (
109971
+ // <div className="flex flex-wrap gap-1">
109972
+ // {(params.value || []).slice(0, 3).map((tag: string, i: number) => (
109973
+ // <span key={i} className="px-1.5 py-0.5 text-xs bg-gray-100 rounded">{tag}</span>
109974
+ // ))}
109975
+ // {(params.value || []).length > 3 && (
109976
+ // <span className="text-xs text-gray-500">+{params.value.length - 3}</span>
109977
+ // )}
109978
+ // </div>
109979
+ // ),
109980
+ // },
109951
109981
  ],
109952
109982
  []
109953
109983
  );
@@ -110403,7 +110433,8 @@ For more info see: https://www.ag-grid.com/javascript-grid/modules/`;
110403
110433
  newMap.set(traceId, {
110404
110434
  input: detail["input"],
110405
110435
  output: detail["output"],
110406
- totalCost: detail["totalCost"]
110436
+ totalCost: detail["totalCost"],
110437
+ envId: detail["envId"]
110407
110438
  });
110408
110439
  return newMap;
110409
110440
  });
@@ -110514,28 +110545,39 @@ For more info see: https://www.ag-grid.com/javascript-grid/modules/`;
110514
110545
  headerName: "Environment",
110515
110546
  width: 150,
110516
110547
  hide: false,
110517
- cellRenderer: (params) => /* @__PURE__ */ jsxRuntimeExports.jsx(EnvironmentNameCell, { envId: params.value })
110548
+ cellRenderer: (params) => {
110549
+ const detailData = detailedTraceData.get(params.data.id);
110550
+ const envId = detailData == null ? void 0 : detailData.envId;
110551
+ if (envId === void 0) {
110552
+ return /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-xs text-gray-400 italic", children: "Loading..." });
110553
+ }
110554
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(EnvironmentNameCell, { envId });
110555
+ }
110518
110556
  }
110519
110557
  );
110520
110558
  baseColumns.push(
110521
- {
110522
- field: "bookmarked",
110523
- headerName: "⭐️",
110524
- width: 50,
110525
- hide: true,
110526
- // DISABLED - Enable when ready
110527
- disabled: true,
110528
- cellRenderer: (params) => /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: `cursor-pointer ${params.value ? "text-yellow-500" : "text-gray-300"}`, children: params.value ? "★" : "☆" })
110529
- },
110530
- {
110531
- field: "name",
110532
- headerName: "Name",
110533
- width: 180,
110534
- hide: true,
110535
- // DISABLED - Enable when ready
110536
- disabled: true,
110537
- cellRenderer: (params) => /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-sm text-gray-900", children: TracingUtils.truncate(params.value || "-", 25) })
110538
- },
110559
+ // {
110560
+ // field: 'bookmarked',
110561
+ // headerName: '⭐️',
110562
+ // width: 50,
110563
+ // hide: true, // DISABLED - Enable when ready
110564
+ // disabled: true,
110565
+ // cellRenderer: (params: any) => (
110566
+ // <span className={`cursor-pointer ${params.value ? 'text-yellow-500' : 'text-gray-300'}`}>
110567
+ // {params.value ? '★' : '☆'}
110568
+ // </span>
110569
+ // ),
110570
+ // },
110571
+ // {
110572
+ // field: 'name',
110573
+ // headerName: 'Name',
110574
+ // width: 180,
110575
+ // hide: true, // DISABLED - Enable when ready
110576
+ // disabled: true,
110577
+ // cellRenderer: (params: any) => (
110578
+ // <span className="text-sm text-gray-900">{TracingUtils.truncate(params.value || '-', 25)}</span>
110579
+ // ),
110580
+ // },
110539
110581
  {
110540
110582
  field: "timestamp",
110541
110583
  headerName: "Timestamp",
@@ -110571,15 +110613,20 @@ For more info see: https://www.ag-grid.com/javascript-grid/modules/`;
110571
110613
  return /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: `px-2 py-0.5 text-xs rounded ${levelColors[params.value] || levelColors["DEFAULT"]}`, children: params.value || "DEFAULT" });
110572
110614
  }
110573
110615
  },
110574
- {
110575
- field: "tags",
110576
- headerName: "Tags",
110577
- width: 180,
110578
- hide: true,
110579
- // DISABLED - Enable when ready
110580
- disabled: true,
110581
- cellRenderer: (params) => /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex flex-wrap gap-1", children: (params.value || []).slice(0, 3).map((tag, i2) => /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "px-1.5 py-0.5 text-xs bg-gray-100 rounded", children: tag }, i2)) })
110582
- },
110616
+ // {
110617
+ // field: 'tags',
110618
+ // headerName: 'Tags',
110619
+ // width: 180,
110620
+ // hide: true, // DISABLED - Enable when ready
110621
+ // disabled: true,
110622
+ // cellRenderer: (params: any) => (
110623
+ // <div className="flex flex-wrap gap-1">
110624
+ // {(params.value || []).slice(0, 3).map((tag: string, i: number) => (
110625
+ // <span key={i} className="px-1.5 py-0.5 text-xs bg-gray-100 rounded">{tag}</span>
110626
+ // ))}
110627
+ // </div>
110628
+ // ),
110629
+ // },
110583
110630
  {
110584
110631
  field: "appvId",
110585
110632
  headerName: "App Version ID",
@@ -110633,34 +110680,39 @@ For more info see: https://www.ag-grid.com/javascript-grid/modules/`;
110633
110680
  // DISABLED - Enable when ready
110634
110681
  disabled: true,
110635
110682
  cellRenderer: (params) => /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: `text-xs font-medium ${TracingUtils.getCostColor(params.value || 0)}`, children: TracingUtils.formatCost(params.value) })
110636
- },
110637
- {
110638
- field: "version",
110639
- headerName: "Version",
110640
- width: 100,
110641
- hide: true,
110642
- // DISABLED - Enable when ready
110643
- disabled: true,
110644
- cellRenderer: (params) => /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-xs text-gray-600", children: params.value || "-" })
110645
- },
110646
- {
110647
- field: "release",
110648
- headerName: "Release",
110649
- width: 100,
110650
- hide: true,
110651
- // DISABLED - Enable when ready
110652
- disabled: true,
110653
- cellRenderer: (params) => /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-xs text-gray-600", children: params.value || "-" })
110654
- },
110655
- {
110656
- field: "metadata",
110657
- headerName: "Metadata",
110658
- width: 200,
110659
- hide: true,
110660
- // DISABLED - Enable when ready
110661
- disabled: true,
110662
- cellRenderer: (params) => /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-xs text-gray-600 font-mono", children: params.value ? TracingUtils.truncate(JSON.stringify(params.value), 30) : "-" })
110663
110683
  }
110684
+ // {
110685
+ // field: 'version',
110686
+ // headerName: 'Version',
110687
+ // width: 100,
110688
+ // hide: true, // DISABLED - Enable when ready
110689
+ // disabled: true,
110690
+ // cellRenderer: (params: any) => (
110691
+ // <span className="text-xs text-gray-600">{params.value || '-'}</span>
110692
+ // ),
110693
+ // },
110694
+ // {
110695
+ // field: 'release',
110696
+ // headerName: 'Release',
110697
+ // width: 100,
110698
+ // hide: true, // DISABLED - Enable when ready
110699
+ // disabled: true,
110700
+ // cellRenderer: (params: any) => (
110701
+ // <span className="text-xs text-gray-600">{params.value || '-'}</span>
110702
+ // ),
110703
+ // },
110704
+ // {
110705
+ // field: 'metadata',
110706
+ // headerName: 'Metadata',
110707
+ // width: 200,
110708
+ // hide: true, // DISABLED - Enable when ready
110709
+ // disabled: true,
110710
+ // cellRenderer: (params: any) => (
110711
+ // <span className="text-xs text-gray-600 font-mono">
110712
+ // {params.value ? TracingUtils.truncate(JSON.stringify(params.value), 30) : '-'}
110713
+ // </span>
110714
+ // ),
110715
+ // },
110664
110716
  );
110665
110717
  return baseColumns;
110666
110718
  },
@@ -110874,6 +110926,7 @@ For more info see: https://www.ag-grid.com/javascript-grid/modules/`;
110874
110926
  title: "Traces",
110875
110927
  description: "Inspect execution traces to analyze model reasoning, tool usage, and performance insights.",
110876
110928
  searchPlaceholder: "Search...",
110929
+ showSearch: totalCount > 0 || searchTerm.length > 0,
110877
110930
  searchConfig: {
110878
110931
  metadataSearchFields: ["ID", "Input", "User ID"],
110879
110932
  updateQuery: handleSearch,
@@ -113445,15 +113498,15 @@ For more info see: https://www.ag-grid.com/javascript-grid/modules/`;
113445
113498
  };
113446
113499
  return (
113447
113500
  // 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: [
113501
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "bg-white w-full", "data-test-id": `debug_card_${node.id}`, children: [
113449
113502
  /* @__PURE__ */ jsxRuntimeExports.jsx(
113450
113503
  "div",
113451
113504
  {
113452
113505
  className: `flex items-center pl-[8px] pr-[8px] relative transition-colors cursor-pointer w-full
113453
113506
  ${isSelected ? "" : ""}`,
113454
113507
  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: [
113508
+ "data-test-id": `debug_card_header_${node.id}`,
113509
+ children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-[10px] w-full", "data-test-id": `debug_card_header_content_${node.id}`, children: [
113457
113510
  /* @__PURE__ */ jsxRuntimeExports.jsx(
113458
113511
  "div",
113459
113512
  {
@@ -113467,7 +113520,7 @@ For more info see: https://www.ag-grid.com/javascript-grid/modules/`;
113467
113520
  }
113468
113521
  },
113469
113522
  title: hasChildren ? isExpanded ? "Collapse" : "Expand" : "Show details",
113470
- "data-id": `debug_card_toggle_${node.id}`,
113523
+ "data-test-id": `debug_card_toggle_${node.id}`,
113471
113524
  children: /* @__PURE__ */ jsxRuntimeExports.jsx(
113472
113525
  ChevronRight,
113473
113526
  {
@@ -113476,18 +113529,18 @@ For more info see: https://www.ag-grid.com/javascript-grid/modules/`;
113476
113529
  )
113477
113530
  }
113478
113531
  ),
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() }),
113532
+ /* @__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: [
113533
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex-shrink-0 rounded-[8px] bg-[#B2DDFF]", "data-test-id": `debug_card_node_icon_${node.id}`, children: getNodeIcon() }),
113481
113534
  /* @__PURE__ */ jsxRuntimeExports.jsx(
113482
113535
  "span",
113483
113536
  {
113484
113537
  className: "font-semibold text-gray-900 text-xs truncate w-full",
113485
113538
  title: node.type === "llm" ? node.name : void 0,
113486
- "data-id": `debug_card_node_name_${node.id}`,
113539
+ "data-test-id": `debug_card_node_name_${node.id}`,
113487
113540
  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
113541
  }
113489
113542
  ),
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: [
113543
+ /* @__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
113544
  node.type === "Agent" && (() => {
113492
113545
  var _a;
113493
113546
  const llmChild = (_a = node.children) == null ? void 0 : _a.find((child) => child.type === "llm");
@@ -113497,7 +113550,7 @@ For more info see: https://www.ag-grid.com/javascript-grid/modules/`;
113497
113550
  {
113498
113551
  className: "text-[10px] text-gray-500 truncate max-w-[100px]",
113499
113552
  title: llmChild.name,
113500
- "data-id": `debug_card_node_model_name_${node.id}`,
113553
+ "data-test-id": `debug_card_node_model_name_${node.id}`,
113501
113554
  children: llmChild.name
113502
113555
  }
113503
113556
  );
@@ -113530,7 +113583,7 @@ For more info see: https://www.ag-grid.com/javascript-grid/modules/`;
113530
113583
  title: `Input: ${((_a = llmUsage.input_tokens) == null ? void 0 : _a.toLocaleString()) || 0} tokens
113531
113584
  Output: ${((_b = llmUsage.output_tokens) == null ? void 0 : _b.toLocaleString()) || 0} tokens
113532
113585
  Total: ${((_c = llmUsage.total_tokens) == null ? void 0 : _c.toLocaleString()) || 0} tokens`,
113533
- "data-id": `debug_card_node_tokens_${node.id}`,
113586
+ "data-test-id": `debug_card_node_tokens_${node.id}`,
113534
113587
  children: [
113535
113588
  llmUsage.total_tokens.toLocaleString(),
113536
113589
  " Tokens"
@@ -113540,34 +113593,34 @@ Total: ${((_c = llmUsage.total_tokens) == null ? void 0 : _c.toLocaleString()) |
113540
113593
  }
113541
113594
  return null;
113542
113595
  })(),
113543
- node.duration && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-[4px]", "data-id": `debug_card_node_duration_${node.id}`, children: [
113596
+ node.duration && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-[4px]", "data-test-id": `debug_card_node_duration_${node.id}`, children: [
113544
113597
  /* @__PURE__ */ jsxRuntimeExports.jsx(Clock, { className: "w-[12px] h-[12px]" }),
113545
113598
  /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-[10px] text-gray-500 whitespace-nowrap", children: formatDuration(node.duration) })
113546
113599
  ] })
113547
113600
  ] }),
113548
- /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex-shrink-0", "data-id": `debug_card_node_status_${node.id}`, children: getStatusIcon() })
113601
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex-shrink-0", "data-test-id": `debug_card_node_status_${node.id}`, children: getStatusIcon() })
113549
113602
  ] })
113550
113603
  ] })
113551
113604
  }
113552
113605
  ),
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(
113606
+ 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: [
113607
+ /* @__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}` }),
113608
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "px-[4px] py-[8px] w-full", "data-test-id": `debug_card_detail_panel_content_${node.id}`, children: [
113609
+ /* @__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
113610
  "button",
113558
113611
  {
113559
113612
  onClick: () => handleTabClick(tab),
113560
113613
  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}`,
113614
+ "data-test-id": `debug_card_detail_panel_tab_${node.id}_${tab}`,
113562
113615
  children: tab.charAt(0).toUpperCase() + tab.slice(1)
113563
113616
  },
113564
113617
  tab
113565
113618
  )) }),
113566
- /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "px-[4px]", "data-id": `debug_card_detail_panel_tab_content_${node.id}`, children: renderTabContent() })
113619
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "px-[4px]", "data-test-id": `debug_card_detail_panel_tab_content_${node.id}`, children: renderTabContent() })
113567
113620
  ] })
113568
113621
  ] }),
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}` }),
113622
+ isExpanded && hasChildren && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "w-full pl-[32px] relative", "data-test-id": `debug_card_children_${node.id}`, children: [
113623
+ /* @__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
113624
  node.children.map((child, index) => /* @__PURE__ */ jsxRuntimeExports.jsx(
113572
113625
  DebugCard,
113573
113626
  {
@@ -113871,14 +113924,14 @@ Total: ${((_c = llmUsage.total_tokens) == null ? void 0 : _c.toLocaleString()) |
113871
113924
  return `${tokens} tokens`;
113872
113925
  };
113873
113926
  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 }),
113927
+ 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" }) }) });
113928
+ }
113929
+ 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: [
113930
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center w-full gap-[16px]", "data-test-id": "debug_panel_session_header", children: [
113931
+ /* @__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" }),
113932
+ /* @__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" }),
113933
+ /* @__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: [
113934
+ /* @__PURE__ */ jsxRuntimeExports.jsx("span", { "data-test-id": "debug_panel_session_id", children: sessionTree.sessionId }),
113882
113935
  /* @__PURE__ */ jsxRuntimeExports.jsx(
113883
113936
  CopyButton$1,
113884
113937
  {
@@ -113904,22 +113957,22 @@ Total: ${((_c = llmUsage.total_tokens) == null ? void 0 : _c.toLocaleString()) |
113904
113957
  }
113905
113958
  }
113906
113959
  },
113907
- "data-id": "debug_panel_session_external_link_btn",
113960
+ "data-test-id": "debug_panel_session_external_link_btn",
113908
113961
  children: /* @__PURE__ */ jsxRuntimeExports.jsx(ExternalLink, { className: "w-[12px] h-[12px]" })
113909
113962
  }
113910
113963
  )
113911
113964
  ] })
113912
113965
  ] }),
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:" }),
113966
+ 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: [
113967
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-2", "data-test-id": "debug_panel_expansion_controls_buttons", children: [
113968
+ /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-xs font-medium text-gray-700", "data-test-id": "debug_panel_expansion_controls_label", children: "Expansion:" }),
113916
113969
  /* @__PURE__ */ jsxRuntimeExports.jsxs(
113917
113970
  "button",
113918
113971
  {
113919
113972
  onClick: handleExpandAll,
113920
113973
  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
113974
  title: "Expand all nodes",
113922
- "data-id": "debug_panel_expansion_controls_btn_expand_all",
113975
+ "data-test-id": "debug_panel_expansion_controls_btn_expand_all",
113923
113976
  children: [
113924
113977
  /* @__PURE__ */ jsxRuntimeExports.jsx(Plus, { className: "w-3 h-3" }),
113925
113978
  "Expand All"
@@ -113932,7 +113985,7 @@ Total: ${((_c = llmUsage.total_tokens) == null ? void 0 : _c.toLocaleString()) |
113932
113985
  onClick: handleExpandLast,
113933
113986
  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
113987
  title: "Expand only the last execution path",
113935
- "data-id": "debug_panel_expansion_controls_btn_expand_last",
113988
+ "data-test-id": "debug_panel_expansion_controls_btn_expand_last",
113936
113989
  children: [
113937
113990
  /* @__PURE__ */ jsxRuntimeExports.jsx(Expand, { className: "w-3 h-3" }),
113938
113991
  "Expand Last"
@@ -113945,7 +113998,7 @@ Total: ${((_c = llmUsage.total_tokens) == null ? void 0 : _c.toLocaleString()) |
113945
113998
  onClick: handleCollapseAll,
113946
113999
  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
114000
  title: "Collapse all nodes",
113948
- "data-id": "debug_panel_expansion_controls_btn_collapse_all",
114001
+ "data-test-id": "debug_panel_expansion_controls_btn_collapse_all",
113949
114002
  children: [
113950
114003
  /* @__PURE__ */ jsxRuntimeExports.jsx(Minus, { className: "w-3 h-3" }),
113951
114004
  "Collapse All"
@@ -113953,8 +114006,8 @@ Total: ${((_c = llmUsage.total_tokens) == null ? void 0 : _c.toLocaleString()) |
113953
114006
  }
113954
114007
  )
113955
114008
  ] }),
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:" }),
114009
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-2", "data-test-id": "debug_panel_expansion_controls_live_mode", children: [
114010
+ /* @__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
114011
  /* @__PURE__ */ jsxRuntimeExports.jsxs(
113959
114012
  "select",
113960
114013
  {
@@ -113962,7 +114015,7 @@ Total: ${((_c = llmUsage.total_tokens) == null ? void 0 : _c.toLocaleString()) |
113962
114015
  onChange: (e) => setLiveExpansionMode(e.target.value),
113963
114016
  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
114017
  title: "Control auto-expansion behavior during live updates",
113965
- "data-id": "debug_panel_expansion_controls_live_mode_select",
114018
+ "data-test-id": "debug_panel_expansion_controls_live_mode_select",
113966
114019
  children: [
113967
114020
  /* @__PURE__ */ jsxRuntimeExports.jsx("option", { value: "all", children: "Expand All" }),
113968
114021
  /* @__PURE__ */ jsxRuntimeExports.jsx("option", { value: "last", children: "Expand Last" }),
@@ -113972,18 +114025,18 @@ Total: ${((_c = llmUsage.total_tokens) == null ? void 0 : _c.toLocaleString()) |
113972
114025
  )
113973
114026
  ] })
113974
114027
  ] }),
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" }) }),
114028
+ sessionTree.runs.map((run2) => /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex flex-col gap-1", "data-test-id": `debug_panel_run_${run2.runId}`, children: [
114029
+ /* @__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: [
114030
+ /* @__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: [
114031
+ /* @__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
114032
  /* @__PURE__ */ jsxRuntimeExports.jsx(
113980
114033
  "div",
113981
114034
  {
113982
114035
  className: "flex-1 cursor-pointer select-none truncate",
113983
114036
  onClick: () => handleRunToggle(run2.runId),
113984
114037
  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}` })
114038
+ "data-test-id": `debug_panel_run_title_${run2.runId}`,
114039
+ 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
114040
  }
113988
114041
  ),
113989
114042
  /* @__PURE__ */ jsxRuntimeExports.jsx(
@@ -114004,7 +114057,7 @@ Total: ${((_c = llmUsage.total_tokens) == null ? void 0 : _c.toLocaleString()) |
114004
114057
  const anyDetailsVisible = Array.from(runNodeIds).some((nodeId) => selectedNodeIds.has(nodeId));
114005
114058
  return anyDetailsVisible ? "Hide all node details in this run" : "Show all node details in this run";
114006
114059
  })(),
114007
- "data-id": `debug_panel_run_details_toggle_${run2.runId}`,
114060
+ "data-test-id": `debug_panel_run_details_toggle_${run2.runId}`,
114008
114061
  children: (() => {
114009
114062
  const runNodeIds = /* @__PURE__ */ new Set();
114010
114063
  const collectNodeIds = (node) => {
@@ -114032,14 +114085,14 @@ Total: ${((_c = llmUsage.total_tokens) == null ? void 0 : _c.toLocaleString()) |
114032
114085
  },
114033
114086
  className: "p-1 hover:bg-gray-200 rounded transition-colors flex-shrink-0",
114034
114087
  title: expandedRuns.has(run2.runId) ? "Collapse run" : "Expand run",
114035
- "data-id": `debug_panel_run_toggle_${run2.runId}`,
114088
+ "data-test-id": `debug_panel_run_toggle_${run2.runId}`,
114036
114089
  children: /* @__PURE__ */ jsxRuntimeExports.jsx(ChevronDown, { className: `w-[16px] h-[16px] text-gray-400 transition-transform ${expandedRuns.has(run2.runId) ? "rotate-180" : ""}` })
114037
114090
  }
114038
114091
  )
114039
114092
  ] }) }),
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) => {
114093
+ 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
114094
  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(
114095
+ return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "w-full", "data-test-id": `debug_panel_run_root_node_${run2.runId}_${index}`, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
114043
114096
  DebugCard,
114044
114097
  {
114045
114098
  node: updateTreeExpansion(rootNode),
@@ -114125,22 +114178,22 @@ Total: ${((_c = llmUsage.total_tokens) == null ? void 0 : _c.toLocaleString()) |
114125
114178
  };
114126
114179
  const outputFromNodes = run2.rootNodes ? findFinalOutput(run2.rootNodes) : void 0;
114127
114180
  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: [
114181
+ 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: [
114182
+ /* @__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" }) }),
114183
+ /* @__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) }),
114184
+ /* @__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: [
114185
+ 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
114186
  /* @__PURE__ */ jsxRuntimeExports.jsx(Clock, { className: "w-[12px] h-[12px] text-gray-400" }),
114134
114187
  /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-[10px] text-gray-500 whitespace-nowrap", children: formatDuration(run2.duration) })
114135
114188
  ] }),
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) })
114189
+ 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
114190
  ] })
114138
114191
  ] }) : null;
114139
114192
  })()
114140
114193
  ] }),
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: [
114194
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center justify-end gap-2 py-1", "data-test-id": `debug_panel_run_footer_${run2.runId}`, children: [
114195
+ /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-xs text-gray-400", "data-test-id": `debug_panel_run_footer_id_${run2.runId}`, children: run2.runId }),
114196
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-2", "data-test-id": `debug_panel_run_footer_actions_${run2.runId}`, children: [
114144
114197
  /* @__PURE__ */ jsxRuntimeExports.jsx(
114145
114198
  CopyButton$1,
114146
114199
  {
@@ -114166,7 +114219,7 @@ Total: ${((_c = llmUsage.total_tokens) == null ? void 0 : _c.toLocaleString()) |
114166
114219
  }
114167
114220
  }
114168
114221
  },
114169
- "data-id": `debug_panel_run_footer_external_link_${run2.runId}`,
114222
+ "data-test-id": `debug_panel_run_footer_external_link_${run2.runId}`,
114170
114223
  children: /* @__PURE__ */ jsxRuntimeExports.jsx(ExternalLink, { className: "w-3 h-3 text-gray-400" })
114171
114224
  }
114172
114225
  )
@@ -141019,7 +141072,7 @@ ${code2}
141019
141072
  backgroundColor: config2.bgColor,
141020
141073
  borderColor: config2.borderColor
141021
141074
  },
141022
- "data-id": `md-editor-variable-${variableType}-${path}`,
141075
+ "data-test-id": `md-editor-variable-${variableType}-${path}`,
141023
141076
  "data-variable-type": variableType,
141024
141077
  "data-path": path,
141025
141078
  title: displayName || fullSyntax,
@@ -141244,7 +141297,7 @@ ${code2}
141244
141297
  backgroundColor: config2.bgColor,
141245
141298
  color: config2.color
141246
141299
  },
141247
- "data-id": `md-editor-mention-${mentionType}-${name.toLowerCase().replace(/\s+/g, "-")}`,
141300
+ "data-test-id": `md-editor-mention-${mentionType}-${name.toLowerCase().replace(/\s+/g, "-")}`,
141248
141301
  "data-mention-type": mentionType,
141249
141302
  "data-name": name,
141250
141303
  title: name,
@@ -141315,9 +141368,9 @@ ${code2}
141315
141368
  },
141316
141369
  id: {
141317
141370
  default: "",
141318
- parseHTML: (element) => element.getAttribute("data-id"),
141371
+ parseHTML: (element) => element.getAttribute("data-test-id"),
141319
141372
  renderHTML: (attributes) => ({
141320
- "data-id": attributes["id"]
141373
+ "data-test-id": attributes["id"]
141321
141374
  })
141322
141375
  },
141323
141376
  name: {
@@ -142127,7 +142180,7 @@ ${code2}
142127
142180
  {
142128
142181
  ref: menuRef,
142129
142182
  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",
142183
+ "data-test-id": "md-editor-slash-menu",
142131
142184
  children: [
142132
142185
  hasBlockItems && /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
142133
142186
  /* @__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 +142202,7 @@ ${code2}
142149
142202
  title: `${item.label}${item.shortcut ? ` (${item.shortcut})` : ""}`,
142150
142203
  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
142204
  onMouseEnter: () => setSelectedIndex(index),
142152
- "data-id": `md-editor-slash-block-${item.id}`,
142205
+ "data-test-id": `md-editor-slash-block-${item.id}`,
142153
142206
  children: item.icon
142154
142207
  },
142155
142208
  item.id
@@ -142168,7 +142221,7 @@ ${code2}
142168
142221
  onClick: handleBack,
142169
142222
  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
142223
  "aria-label": "Go back",
142171
- "data-id": "md-editor-slash-back-btn",
142224
+ "data-test-id": "md-editor-slash-back-btn",
142172
142225
  children: /* @__PURE__ */ jsxRuntimeExports.jsx(ChevronLeft, { size: 16 })
142173
142226
  }
142174
142227
  ),
@@ -142188,7 +142241,7 @@ ${code2}
142188
142241
  },
142189
142242
  placeholder: "Search...",
142190
142243
  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"
142244
+ "data-test-id": "md-editor-slash-search"
142192
142245
  }
142193
142246
  )
142194
142247
  ] }) })
@@ -142223,7 +142276,7 @@ ${code2}
142223
142276
  title: isDisabled ? disabledReason : void 0,
142224
142277
  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
142278
  onMouseEnter: () => !isDisabled && setSelectedIndex(adjustedIndex),
142226
- "data-id": `md-editor-slash-item-${"id" in item ? item.id : label.toLowerCase().replace(/\s+/g, "-")}`,
142279
+ "data-test-id": `md-editor-slash-item-${"id" in item ? item.id : label.toLowerCase().replace(/\s+/g, "-")}`,
142227
142280
  children: [
142228
142281
  /* @__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
142282
  /* @__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 +142920,7 @@ ${code2}
142867
142920
  ref: menuRef,
142868
142921
  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
142922
  style: { top: adjustedPosition.top, left: adjustedPosition.left },
142870
- "data-id": "md-editor-variable-menu",
142923
+ "data-test-id": "md-editor-variable-menu",
142871
142924
  children: [
142872
142925
  /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "px-3 py-2 border-b border-gray-200 flex items-center gap-2", children: [
142873
142926
  activeCategory && /* @__PURE__ */ jsxRuntimeExports.jsx(
@@ -142877,7 +142930,7 @@ ${code2}
142877
142930
  onClick: handleBack,
142878
142931
  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
142932
  "aria-label": "Go back",
142880
- "data-id": "md-editor-variable-back-btn",
142933
+ "data-test-id": "md-editor-variable-back-btn",
142881
142934
  children: /* @__PURE__ */ jsxRuntimeExports.jsx(ChevronLeft, { size: 16 })
142882
142935
  }
142883
142936
  ),
@@ -142905,7 +142958,7 @@ ${code2}
142905
142958
  },
142906
142959
  placeholder: "memory.store.field",
142907
142960
  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"
142961
+ "data-test-id": "md-editor-custom-variable-input"
142909
142962
  }
142910
142963
  ),
142911
142964
  /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-[14px] font-mono text-gray-500", children: "}}" })
@@ -142943,7 +142996,7 @@ ${code2}
142943
142996
  onChange: (e) => onQueryChange(e.target.value),
142944
142997
  placeholder: "Search...",
142945
142998
  className: "flex-1 border-0 bg-transparent outline-none text-[13px] text-gray-700",
142946
- "data-id": "md-editor-variable-search"
142999
+ "data-test-id": "md-editor-variable-search"
142947
143000
  }
142948
143001
  )
142949
143002
  ] }) }),
@@ -142965,7 +143018,7 @@ ${code2}
142965
143018
  onClick: () => handleItemClick(item),
142966
143019
  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
143020
  onMouseEnter: () => setSelectedIndex(index),
142968
- "data-id": `md-editor-variable-item-${isCategory ? item.id : item.id}`,
143021
+ "data-test-id": `md-editor-variable-item-${isCategory ? item.id : item.id}`,
142969
143022
  children: [
142970
143023
  /* @__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
143024
  /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex-1 min-w-0", children: [
@@ -142985,7 +143038,7 @@ ${code2}
142985
143038
  onClick: () => handleItemClick("custom"),
142986
143039
  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
143040
  onMouseEnter: () => setSelectedIndex(items.length),
142988
- "data-id": "md-editor-variable-custom",
143041
+ "data-test-id": "md-editor-variable-custom",
142989
143042
  children: [
142990
143043
  /* @__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
143044
  /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex-1 min-w-0", children: [
@@ -143069,7 +143122,7 @@ ${code2}
143069
143122
  "div",
143070
143123
  {
143071
143124
  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",
143125
+ "data-test-id": "md-editor-link-editor",
143073
143126
  onMouseDown: (e) => e.stopPropagation(),
143074
143127
  children: [
143075
143128
  /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center flex-1 bg-gray-700 rounded-md px-2 gap-1.5", children: [
@@ -143084,7 +143137,7 @@ ${code2}
143084
143137
  onKeyDown: handleKeyDown2,
143085
143138
  placeholder: "Enter URL...",
143086
143139
  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"
143140
+ "data-test-id": "md-editor-link-input"
143088
143141
  }
143089
143142
  )
143090
143143
  ] }),
@@ -143095,7 +143148,7 @@ ${code2}
143095
143148
  onClick: handleOpenLink,
143096
143149
  title: "Open link",
143097
143150
  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",
143151
+ "data-test-id": "md-editor-link-open",
143099
143152
  children: /* @__PURE__ */ jsxRuntimeExports.jsx(ExternalLink, { size: 14 })
143100
143153
  }
143101
143154
  ),
@@ -143106,7 +143159,7 @@ ${code2}
143106
143159
  onClick: handleRemoveLink,
143107
143160
  title: "Remove link",
143108
143161
  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",
143162
+ "data-test-id": "md-editor-link-remove",
143110
143163
  children: /* @__PURE__ */ jsxRuntimeExports.jsx(Link2Off, { size: 14 })
143111
143164
  }
143112
143165
  ),
@@ -143117,7 +143170,7 @@ ${code2}
143117
143170
  onClick: handleSubmit,
143118
143171
  title: "Apply link",
143119
143172
  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",
143173
+ "data-test-id": "md-editor-link-apply",
143121
143174
  children: /* @__PURE__ */ jsxRuntimeExports.jsx(Check, { size: 14 })
143122
143175
  }
143123
143176
  ),
@@ -143128,7 +143181,7 @@ ${code2}
143128
143181
  onClick: onClose,
143129
143182
  title: "Cancel",
143130
143183
  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",
143184
+ "data-test-id": "md-editor-link-cancel",
143132
143185
  children: /* @__PURE__ */ jsxRuntimeExports.jsx(X, { size: 14 })
143133
143186
  }
143134
143187
  )
@@ -143255,7 +143308,7 @@ ${code2}
143255
143308
  "div",
143256
143309
  {
143257
143310
  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",
143311
+ "data-test-id": "md-editor-inline-toolbar",
143259
143312
  onMouseDown: (e) => {
143260
143313
  e.stopPropagation();
143261
143314
  },
@@ -143279,7 +143332,7 @@ ${code2}
143279
143332
  title: `${item.label}${item.shortcut ? ` (${item.shortcut})` : ""}`,
143280
143333
  "aria-label": item.label,
143281
143334
  "aria-pressed": isActive2,
143282
- "data-id": `md-editor-toolbar-${item.id}`,
143335
+ "data-test-id": `md-editor-toolbar-${item.id}`,
143283
143336
  children: item.icon
143284
143337
  }
143285
143338
  ),
@@ -143299,7 +143352,7 @@ ${code2}
143299
143352
  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
143353
  "aria-label": "Link",
143301
143354
  "aria-pressed": isLinkActive,
143302
- "data-id": "md-editor-toolbar-link",
143355
+ "data-test-id": "md-editor-toolbar-link",
143303
143356
  children: /* @__PURE__ */ jsxRuntimeExports.jsx(Link$1, { size: 16 })
143304
143357
  }
143305
143358
  ),
@@ -143317,7 +143370,7 @@ ${code2}
143317
143370
  title: "Refine with AI (⌘⇧R)",
143318
143371
  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
143372
  "aria-label": "Refine with AI",
143320
- "data-id": "md-editor-toolbar-ai-refine",
143373
+ "data-test-id": "md-editor-toolbar-ai-refine",
143321
143374
  children: [
143322
143375
  /* @__PURE__ */ jsxRuntimeExports.jsx(Sparkles, { size: 14 }),
143323
143376
  /* @__PURE__ */ jsxRuntimeExports.jsx("span", { children: "AI" })
@@ -143338,7 +143391,7 @@ ${code2}
143338
143391
  title: "Delete selection",
143339
143392
  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
143393
  "aria-label": "Delete",
143341
- "data-id": "md-editor-toolbar-delete",
143394
+ "data-test-id": "md-editor-toolbar-delete",
143342
143395
  children: /* @__PURE__ */ jsxRuntimeExports.jsx(Trash2, { size: 16 })
143343
143396
  }
143344
143397
  )
@@ -143635,7 +143688,7 @@ ${code2}
143635
143688
  {
143636
143689
  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
143690
  style: { top: handleTop },
143638
- "data-id": "md-editor-drag-handle",
143691
+ "data-test-id": "md-editor-drag-handle",
143639
143692
  onMouseEnter: () => {
143640
143693
  },
143641
143694
  onMouseLeave: () => {
@@ -143655,7 +143708,7 @@ ${code2}
143655
143708
  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
143709
  onClick: handleAddClick,
143657
143710
  title: "Add block below",
143658
- "data-id": "md-editor-add-block-btn",
143711
+ "data-test-id": "md-editor-add-block-btn",
143659
143712
  children: /* @__PURE__ */ jsxRuntimeExports.jsx(Plus, { size: 14 })
143660
143713
  }
143661
143714
  ),
@@ -143666,7 +143719,7 @@ ${code2}
143666
143719
  draggable: "true",
143667
143720
  onDragStart: handleDragStart,
143668
143721
  title: "Drag to reorder",
143669
- "data-id": "md-editor-drag-grip",
143722
+ "data-test-id": "md-editor-drag-grip",
143670
143723
  children: /* @__PURE__ */ jsxRuntimeExports.jsx(GripVertical, { size: 14 })
143671
143724
  }
143672
143725
  )
@@ -143712,7 +143765,7 @@ ${code2}
143712
143765
  "div",
143713
143766
  {
143714
143767
  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",
143768
+ "data-test-id": "md-editor-table-toolbar",
143716
143769
  children: [
143717
143770
  /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-0.5 shrink-0", children: [
143718
143771
  /* @__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 +143776,7 @@ ${code2}
143723
143776
  onClick: addRowBefore2,
143724
143777
  className: btnBase,
143725
143778
  title: "Add row above",
143726
- "data-id": "md-editor-table-add-row-above",
143779
+ "data-test-id": "md-editor-table-add-row-above",
143727
143780
  children: [
143728
143781
  /* @__PURE__ */ jsxRuntimeExports.jsx(ArrowUp, { size: 14 }),
143729
143782
  /* @__PURE__ */ jsxRuntimeExports.jsx(Plus, { size: 10 })
@@ -143737,7 +143790,7 @@ ${code2}
143737
143790
  onClick: addRowAfter2,
143738
143791
  className: btnBase,
143739
143792
  title: "Add row below",
143740
- "data-id": "md-editor-table-add-row-below",
143793
+ "data-test-id": "md-editor-table-add-row-below",
143741
143794
  children: [
143742
143795
  /* @__PURE__ */ jsxRuntimeExports.jsx(ArrowDown, { size: 14 }),
143743
143796
  /* @__PURE__ */ jsxRuntimeExports.jsx(Plus, { size: 10 })
@@ -143751,7 +143804,7 @@ ${code2}
143751
143804
  onClick: deleteRow2,
143752
143805
  className: btnDanger,
143753
143806
  title: "Delete row",
143754
- "data-id": "md-editor-table-delete-row",
143807
+ "data-test-id": "md-editor-table-delete-row",
143755
143808
  children: /* @__PURE__ */ jsxRuntimeExports.jsx(Minus, { size: 14 })
143756
143809
  }
143757
143810
  )
@@ -143766,7 +143819,7 @@ ${code2}
143766
143819
  onClick: addColumnBefore2,
143767
143820
  className: btnBase,
143768
143821
  title: "Add column left",
143769
- "data-id": "md-editor-table-add-col-left",
143822
+ "data-test-id": "md-editor-table-add-col-left",
143770
143823
  children: [
143771
143824
  /* @__PURE__ */ jsxRuntimeExports.jsx(ArrowLeft, { size: 14 }),
143772
143825
  /* @__PURE__ */ jsxRuntimeExports.jsx(Plus, { size: 10 })
@@ -143780,7 +143833,7 @@ ${code2}
143780
143833
  onClick: addColumnAfter2,
143781
143834
  className: btnBase,
143782
143835
  title: "Add column right",
143783
- "data-id": "md-editor-table-add-col-right",
143836
+ "data-test-id": "md-editor-table-add-col-right",
143784
143837
  children: [
143785
143838
  /* @__PURE__ */ jsxRuntimeExports.jsx(ArrowRight, { size: 14 }),
143786
143839
  /* @__PURE__ */ jsxRuntimeExports.jsx(Plus, { size: 10 })
@@ -143794,7 +143847,7 @@ ${code2}
143794
143847
  onClick: deleteColumn2,
143795
143848
  className: btnDanger,
143796
143849
  title: "Delete column",
143797
- "data-id": "md-editor-table-delete-col",
143850
+ "data-test-id": "md-editor-table-delete-col",
143798
143851
  children: /* @__PURE__ */ jsxRuntimeExports.jsx(Minus, { size: 14 })
143799
143852
  }
143800
143853
  )
@@ -143807,7 +143860,7 @@ ${code2}
143807
143860
  onClick: deleteTable2,
143808
143861
  className: `${btnDanger} shrink-0`,
143809
143862
  title: "Delete table",
143810
- "data-id": "md-editor-table-delete",
143863
+ "data-test-id": "md-editor-table-delete",
143811
143864
  children: /* @__PURE__ */ jsxRuntimeExports.jsx(Trash2, { size: 14 })
143812
143865
  }
143813
143866
  )
@@ -144284,7 +144337,7 @@ ${code2}
144284
144337
  "div",
144285
144338
  {
144286
144339
  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",
144340
+ "data-test-id": "md-editor-ai-tips-section",
144288
144341
  children: [
144289
144342
  /* @__PURE__ */ jsxRuntimeExports.jsxs(
144290
144343
  "button",
@@ -144292,7 +144345,7 @@ ${code2}
144292
144345
  type: "button",
144293
144346
  onClick: () => setIsTipsExpanded(!isTipsExpanded),
144294
144347
  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",
144348
+ "data-test-id": "md-editor-ai-tips-toggle",
144296
144349
  children: [
144297
144350
  /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-2", children: [
144298
144351
  /* @__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 +144465,7 @@ ${code2}
144412
144465
  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
144466
  onClick: handleReset,
144414
144467
  title: "Start over",
144415
- "data-id": "md-editor-ai-reset-btn",
144468
+ "data-test-id": "md-editor-ai-reset-btn",
144416
144469
  children: /* @__PURE__ */ jsxRuntimeExports.jsx(RefreshCw, { size: 16 })
144417
144470
  }
144418
144471
  ),
@@ -144422,7 +144475,7 @@ ${code2}
144422
144475
  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
144476
  onClick: onClose,
144424
144477
  title: "Close",
144425
- "data-id": "md-editor-ai-close-btn",
144478
+ "data-test-id": "md-editor-ai-close-btn",
144426
144479
  children: /* @__PURE__ */ jsxRuntimeExports.jsx(X, { size: 18 })
144427
144480
  }
144428
144481
  )
@@ -144436,7 +144489,7 @@ ${code2}
144436
144489
  "div",
144437
144490
  {
144438
144491
  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",
144492
+ "data-test-id": "md-editor-ai-selection-box",
144440
144493
  children: [
144441
144494
  /* @__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
144495
  /* @__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 +144500,7 @@ ${code2}
144447
144500
  onClick: () => setIsContentExpanded(!isContentExpanded),
144448
144501
  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
144502
  title: isContentExpanded ? "Show less" : "Show more",
144450
- "data-id": "md-editor-ai-expand-btn",
144503
+ "data-test-id": "md-editor-ai-expand-btn",
144451
144504
  children: /* @__PURE__ */ jsxRuntimeExports.jsx(
144452
144505
  ChevronDown,
144453
144506
  {
@@ -144472,13 +144525,13 @@ ${code2}
144472
144525
  /* @__PURE__ */ jsxRuntimeExports.jsx("div", { ref: messagesEndRef })
144473
144526
  ] }),
144474
144527
  /* @__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(
144528
+ /* @__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
144529
  "button",
144477
144530
  {
144478
144531
  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
144532
  onClick: () => handleQuickAction(action),
144480
144533
  disabled: isLoading,
144481
- "data-id": `md-editor-ai-action-${action.id}`,
144534
+ "data-test-id": `md-editor-ai-action-${action.id}`,
144482
144535
  children: [
144483
144536
  action.icon,
144484
144537
  /* @__PURE__ */ jsxRuntimeExports.jsx("span", { children: action.label })
@@ -144491,7 +144544,7 @@ ${code2}
144491
144544
  {
144492
144545
  ref: mentionMenuRef,
144493
144546
  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",
144547
+ "data-test-id": "md-editor-ai-mention-menu",
144495
144548
  children: [
144496
144549
  mentionQuery && !selectedCategory && searchResults.length > 0 && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "py-1 overflow-y-auto", children: [
144497
144550
  /* @__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 +144555,7 @@ ${code2}
144502
144555
  {
144503
144556
  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
144557
  onClick: () => insertMentionItem(item, item.category),
144505
- "data-id": `md-editor-ai-mention-${isVariable ? item.path : item.id}`,
144558
+ "data-test-id": `md-editor-ai-mention-${isVariable ? item.path : item.id}`,
144506
144559
  children: [
144507
144560
  /* @__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
144561
  /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-sm font-medium truncate", children: item.name }),
@@ -144528,7 +144581,7 @@ ${code2}
144528
144581
  {
144529
144582
  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
144583
  onClick: () => handleCategorySelect(category.type),
144531
- "data-id": `md-editor-ai-mention-category-${category.type}`,
144584
+ "data-test-id": `md-editor-ai-mention-category-${category.type}`,
144532
144585
  children: [
144533
144586
  /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-2", children: [
144534
144587
  category.icon,
@@ -144553,7 +144606,7 @@ ${code2}
144553
144606
  {
144554
144607
  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
144608
  onClick: handleBackToCategories,
144556
- "data-id": "md-editor-ai-mention-back",
144609
+ "data-test-id": "md-editor-ai-mention-back",
144557
144610
  children: [
144558
144611
  /* @__PURE__ */ jsxRuntimeExports.jsx(ChevronRight, { size: 14, className: "rotate-180" }),
144559
144612
  /* @__PURE__ */ jsxRuntimeExports.jsx("span", { children: "Back" })
@@ -144586,7 +144639,7 @@ ${code2}
144586
144639
  (_a2 = inputRef.current) == null ? void 0 : _a2.dispatchEvent(new KeyboardEvent("keydown", { key: e.key, bubbles: true }));
144587
144640
  }
144588
144641
  },
144589
- "data-id": "md-editor-ai-mention-search"
144642
+ "data-test-id": "md-editor-ai-mention-search"
144590
144643
  }
144591
144644
  )
144592
144645
  ] }) }),
@@ -144597,7 +144650,7 @@ ${code2}
144597
144650
  {
144598
144651
  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
144652
  onClick: () => insertMentionItem(item, selectedCategory || void 0),
144600
- "data-id": `md-editor-ai-mention-item-${isVariable ? item.path : item.id}`,
144653
+ "data-test-id": `md-editor-ai-mention-item-${isVariable ? item.path : item.id}`,
144601
144654
  children: [
144602
144655
  /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-sm font-medium", children: item.name }),
144603
144656
  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 +144663,7 @@ ${code2}
144610
144663
  ]
144611
144664
  }
144612
144665
  ),
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: [
144666
+ /* @__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
144667
  /* @__PURE__ */ jsxRuntimeExports.jsx(
144615
144668
  "textarea",
144616
144669
  {
@@ -144622,7 +144675,7 @@ ${code2}
144622
144675
  onKeyDown: handleKeyDown2,
144623
144676
  rows: 1,
144624
144677
  disabled: isLoading,
144625
- "data-id": "md-editor-ai-input"
144678
+ "data-test-id": "md-editor-ai-input"
144626
144679
  }
144627
144680
  ),
144628
144681
  /* @__PURE__ */ jsxRuntimeExports.jsx(
@@ -144636,7 +144689,7 @@ ${code2}
144636
144689
  },
144637
144690
  disabled: !inputValue.trim() || isLoading,
144638
144691
  title: "Send",
144639
- "data-id": "md-editor-ai-send-btn",
144692
+ "data-test-id": "md-editor-ai-send-btn",
144640
144693
  children: /* @__PURE__ */ jsxRuntimeExports.jsx(Send, { size: 18 })
144641
144694
  }
144642
144695
  )
@@ -144649,7 +144702,7 @@ ${code2}
144649
144702
  "div",
144650
144703
  {
144651
144704
  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",
144705
+ "data-test-id": "md-editor-ai-panel-side",
144653
144706
  children: [
144654
144707
  tipsContent,
144655
144708
  /* @__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 +144710,13 @@ ${code2}
144657
144710
  }
144658
144711
  );
144659
144712
  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: [
144713
+ 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
144714
  /* @__PURE__ */ jsxRuntimeExports.jsx(
144662
144715
  "div",
144663
144716
  {
144664
144717
  className: "absolute inset-0 bg-black/60 backdrop-blur-sm animate-[ai-backdrop-in_0.2s_ease-out]",
144665
144718
  onClick: onClose,
144666
- "data-id": "md-editor-ai-panel-backdrop"
144719
+ "data-test-id": "md-editor-ai-panel-backdrop"
144667
144720
  }
144668
144721
  ),
144669
144722
  /* @__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 +144725,19 @@ ${code2}
144672
144725
  ] })
144673
144726
  ] });
144674
144727
  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: [
144728
+ 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
144729
  /* @__PURE__ */ jsxRuntimeExports.jsx(
144677
144730
  "div",
144678
144731
  {
144679
144732
  className: "absolute inset-0 bg-black/60 backdrop-blur-sm",
144680
144733
  onClick: onClose,
144681
- "data-id": "md-editor-ai-panel-backdrop"
144734
+ "data-test-id": "md-editor-ai-panel-backdrop"
144682
144735
  }
144683
144736
  ),
144684
144737
  /* @__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
144738
  tipsContent,
144686
144739
  /* @__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" }),
144740
+ /* @__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
144741
  panelContent
144689
144742
  ] })
144690
144743
  ] })
@@ -144694,7 +144747,7 @@ ${code2}
144694
144747
  "div",
144695
144748
  {
144696
144749
  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",
144750
+ "data-test-id": "md-editor-ai-panel",
144698
144751
  children: [
144699
144752
  tipsContent,
144700
144753
  /* @__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 +144828,14 @@ ${code2}
144775
144828
  ref: menuRef,
144776
144829
  className: "ai-context-menu fixed z-[9999] min-w-[180px] bg-gray-800 rounded-lg shadow-xl p-1 overflow-hidden",
144777
144830
  style: { top: adjustedPosition.y, left: adjustedPosition.x },
144778
- "data-id": "md-editor-context-menu",
144831
+ "data-test-id": "md-editor-context-menu",
144779
144832
  children: [
144780
144833
  /* @__PURE__ */ jsxRuntimeExports.jsxs(
144781
144834
  "button",
144782
144835
  {
144783
144836
  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
144837
  onClick: handleAIRefine,
144785
- "data-id": "md-editor-context-ai-refine",
144838
+ "data-test-id": "md-editor-context-ai-refine",
144786
144839
  children: [
144787
144840
  /* @__PURE__ */ jsxRuntimeExports.jsx(Sparkles, { size: 16 }),
144788
144841
  /* @__PURE__ */ jsxRuntimeExports.jsx("span", { children: hasSelection2 ? "Refine Selection with AI" : "Refine with AI" }),
@@ -144797,7 +144850,7 @@ ${code2}
144797
144850
  {
144798
144851
  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
144852
  onClick: handleCut,
144800
- "data-id": "md-editor-context-cut",
144853
+ "data-test-id": "md-editor-context-cut",
144801
144854
  children: [
144802
144855
  /* @__PURE__ */ jsxRuntimeExports.jsx(Scissors, { size: 16 }),
144803
144856
  /* @__PURE__ */ jsxRuntimeExports.jsx("span", { children: "Cut" }),
@@ -144810,7 +144863,7 @@ ${code2}
144810
144863
  {
144811
144864
  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
144865
  onClick: handleCopy,
144813
- "data-id": "md-editor-context-copy",
144866
+ "data-test-id": "md-editor-context-copy",
144814
144867
  children: [
144815
144868
  /* @__PURE__ */ jsxRuntimeExports.jsx(Copy, { size: 16 }),
144816
144869
  /* @__PURE__ */ jsxRuntimeExports.jsx("span", { children: "Copy" }),
@@ -144824,7 +144877,7 @@ ${code2}
144824
144877
  {
144825
144878
  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
144879
  onClick: handlePaste2,
144827
- "data-id": "md-editor-context-paste",
144880
+ "data-test-id": "md-editor-context-paste",
144828
144881
  children: [
144829
144882
  /* @__PURE__ */ jsxRuntimeExports.jsx(Clipboard, { size: 16 }),
144830
144883
  /* @__PURE__ */ jsxRuntimeExports.jsx("span", { children: "Paste" }),
@@ -145556,7 +145609,7 @@ ${code2}
145556
145609
  [editor, insertVariable, insertMention, openAIRefine, closeAIRefine, toggleRawMode, isRawMode]
145557
145610
  );
145558
145611
  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" }) });
145612
+ 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
145613
  }
145561
145614
  const isAIEnabled = mergedAIConfig.enabled && onAIRefine && !readOnly;
145562
145615
  return /* @__PURE__ */ jsxRuntimeExports.jsxs(
@@ -145564,7 +145617,7 @@ ${code2}
145564
145617
  {
145565
145618
  ref: editorContainerRef,
145566
145619
  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",
145620
+ "data-test-id": "md-editor",
145568
145621
  "data-theme": theme,
145569
145622
  children: [
145570
145623
  /* @__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 +145720,7 @@ ${code2}
145667
145720
  onClick: toggleRawMode,
145668
145721
  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
145722
  title: isRawMode ? "Switch to rich editor" : "Switch to raw markdown",
145670
- "data-id": "md-editor-raw-toggle",
145723
+ "data-test-id": "md-editor-raw-toggle",
145671
145724
  children: isRawMode ? (
145672
145725
  // Eye icon (switch to rich/preview mode)
145673
145726
  /* @__PURE__ */ jsxRuntimeExports.jsxs("svg", { className: "w-4 h-4", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 2, children: [
@@ -145689,7 +145742,7 @@ ${code2}
145689
145742
  onChange: (e) => handleRawMarkdownChange(e.target.value),
145690
145743
  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
145744
  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",
145745
+ "data-test-id": "md-editor-raw-textarea",
145693
145746
  spellCheck: false
145694
145747
  }
145695
145748
  )