@truefoundry/trueforge-ui 0.3.0-rc.4 → 0.3.0-rc.6

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.
Files changed (85) hide show
  1. package/CHANGELOG.md +28 -0
  2. package/dist/{AgentCodeSnippets-U6KQWVBJ.js → AgentCodeSnippets-UWKIJI6U.js} +7 -7
  3. package/dist/AgentMetricChart-4ZJJED5Q.js +15 -0
  4. package/dist/{AgentOverview-RLJ6HZCN.js → AgentOverview-UZBCVNMP.js} +11 -9
  5. package/dist/AgentOverview-UZBCVNMP.js.map +1 -0
  6. package/dist/{AgentSessionEventTimeline-CDXRRUZQ.js → AgentSessionEventTimeline-N4RXG2NU.js} +7 -7
  7. package/dist/{AgentSessionEventTimelineChart-S2WX6ZEA.js → AgentSessionEventTimelineChart-EMWNJMMK.js} +7 -7
  8. package/dist/{AgentSessions-UI3L7XY2.js → AgentSessions-CD7JAQTC.js} +8 -8
  9. package/dist/{ConnectorSettings-OIGAC2HU.js → ConnectorSettings-GEI4S6SD.js} +7 -7
  10. package/dist/{DockLayout-J5BRKMJZ.js → DockLayout-JZ4DKDOR.js} +10 -10
  11. package/dist/{DrawerLayout-65YHGHIF.js → DrawerLayout-AV4FJTGV.js} +11 -11
  12. package/dist/{ModelSettings-VP6WCMGT.js → ModelSettings-4TNETPJJ.js} +7 -7
  13. package/dist/OpenUiFenceBlock-KPZFLUSC.js +9 -0
  14. package/dist/{SandboxSettings-GTZT7LD6.js → SandboxSettings-IEIWFKQW.js} +7 -7
  15. package/dist/SchedulesPage-ZG5IMQI3.js +15 -0
  16. package/dist/{SettingsBuilder-A4BPYIFZ.js → SettingsBuilder-B2ULQPIT.js} +9 -9
  17. package/dist/{SettingsBuilder-A4BPYIFZ.js.map → SettingsBuilder-B2ULQPIT.js.map} +1 -1
  18. package/dist/{ShellRouteSync-SSLGM35F.js → ShellRouteSync-SJXFKUAJ.js} +4 -4
  19. package/dist/{SidebarLayout-MFDOGAVJ.js → SidebarLayout-XUM2Y6PA.js} +12 -12
  20. package/dist/{SkillSettings-WQPUQ5TE.js → SkillSettings-NHBL5ZXU.js} +7 -7
  21. package/dist/{TrueForgeUIWithRouter-5CDICMCE.js → TrueForgeUIWithRouter-NVV7IXXP.js} +9 -9
  22. package/dist/{WidgetLayout-HE7E4UL5.js → WidgetLayout-T7DBLKV3.js} +10 -10
  23. package/dist/{chunk-F7ZAQIRE.js → chunk-22A4HHBQ.js} +27 -16
  24. package/dist/{chunk-F7ZAQIRE.js.map → chunk-22A4HHBQ.js.map} +1 -1
  25. package/dist/{chunk-6CFZHEYH.js → chunk-2GIZY3JJ.js} +32 -3
  26. package/dist/chunk-2GIZY3JJ.js.map +1 -0
  27. package/dist/{chunk-2BDTG544.js → chunk-2QTH6JHX.js} +3 -3
  28. package/dist/{chunk-TGKQRK3S.js → chunk-3R62ISBR.js} +5 -5
  29. package/dist/{chunk-KCYBMKQL.js → chunk-3TV6SKGW.js} +4 -4
  30. package/dist/{chunk-MAA7U4RF.js → chunk-3ZW74FHC.js} +3 -3
  31. package/dist/{chunk-GTTMLDCI.js → chunk-CG75X77Q.js} +2 -2
  32. package/dist/{chunk-2OKGEU6X.js → chunk-DNOQ4WYH.js} +360 -217
  33. package/dist/chunk-DNOQ4WYH.js.map +1 -0
  34. package/dist/{chunk-IOPHQEUY.js → chunk-GA4AC4XL.js} +2 -2
  35. package/dist/chunk-JCL3Q7RW.js +587 -0
  36. package/dist/chunk-JCL3Q7RW.js.map +1 -0
  37. package/dist/{chunk-VXKNS7FH.js → chunk-NFUX2ESW.js} +9 -9
  38. package/dist/{chunk-XO3FYN2W.js → chunk-NYMNCYWL.js} +8 -8
  39. package/dist/chunk-NYMNCYWL.js.map +1 -0
  40. package/dist/{chunk-E4GVP6PM.js → chunk-T6QQV5LK.js} +55 -12
  41. package/dist/chunk-T6QQV5LK.js.map +1 -0
  42. package/dist/{chunk-MJULWIPI.js → chunk-TDG7GHXE.js} +478 -268
  43. package/dist/chunk-TDG7GHXE.js.map +1 -0
  44. package/dist/index.d.ts +27 -15
  45. package/dist/index.js +12 -12
  46. package/dist/plugins/trueforge-agent-server-adapter/index.d.ts +2 -1
  47. package/dist/plugins/trueforge-agent-server-adapter/index.js +65 -14
  48. package/dist/plugins/trueforge-agent-server-adapter/index.js.map +1 -1
  49. package/dist/styles.css +1 -1
  50. package/package.json +4 -3
  51. package/dist/AgentMetricChart-3D6FUFO6.js +0 -15
  52. package/dist/AgentOverview-RLJ6HZCN.js.map +0 -1
  53. package/dist/OpenUiFenceBlock-UTDCTNTM.js +0 -9
  54. package/dist/SchedulesPage-ARWU7BZF.js +0 -15
  55. package/dist/chunk-2OKGEU6X.js.map +0 -1
  56. package/dist/chunk-6CFZHEYH.js.map +0 -1
  57. package/dist/chunk-E4GVP6PM.js.map +0 -1
  58. package/dist/chunk-MJULWIPI.js.map +0 -1
  59. package/dist/chunk-P7J2ABEP.js +0 -587
  60. package/dist/chunk-P7J2ABEP.js.map +0 -1
  61. package/dist/chunk-XO3FYN2W.js.map +0 -1
  62. /package/dist/{AgentCodeSnippets-U6KQWVBJ.js.map → AgentCodeSnippets-UWKIJI6U.js.map} +0 -0
  63. /package/dist/{AgentMetricChart-3D6FUFO6.js.map → AgentMetricChart-4ZJJED5Q.js.map} +0 -0
  64. /package/dist/{AgentSessionEventTimeline-CDXRRUZQ.js.map → AgentSessionEventTimeline-N4RXG2NU.js.map} +0 -0
  65. /package/dist/{AgentSessionEventTimelineChart-S2WX6ZEA.js.map → AgentSessionEventTimelineChart-EMWNJMMK.js.map} +0 -0
  66. /package/dist/{AgentSessions-UI3L7XY2.js.map → AgentSessions-CD7JAQTC.js.map} +0 -0
  67. /package/dist/{ConnectorSettings-OIGAC2HU.js.map → ConnectorSettings-GEI4S6SD.js.map} +0 -0
  68. /package/dist/{DockLayout-J5BRKMJZ.js.map → DockLayout-JZ4DKDOR.js.map} +0 -0
  69. /package/dist/{DrawerLayout-65YHGHIF.js.map → DrawerLayout-AV4FJTGV.js.map} +0 -0
  70. /package/dist/{ModelSettings-VP6WCMGT.js.map → ModelSettings-4TNETPJJ.js.map} +0 -0
  71. /package/dist/{OpenUiFenceBlock-UTDCTNTM.js.map → OpenUiFenceBlock-KPZFLUSC.js.map} +0 -0
  72. /package/dist/{SandboxSettings-GTZT7LD6.js.map → SandboxSettings-IEIWFKQW.js.map} +0 -0
  73. /package/dist/{SchedulesPage-ARWU7BZF.js.map → SchedulesPage-ZG5IMQI3.js.map} +0 -0
  74. /package/dist/{ShellRouteSync-SSLGM35F.js.map → ShellRouteSync-SJXFKUAJ.js.map} +0 -0
  75. /package/dist/{SidebarLayout-MFDOGAVJ.js.map → SidebarLayout-XUM2Y6PA.js.map} +0 -0
  76. /package/dist/{SkillSettings-WQPUQ5TE.js.map → SkillSettings-NHBL5ZXU.js.map} +0 -0
  77. /package/dist/{TrueForgeUIWithRouter-5CDICMCE.js.map → TrueForgeUIWithRouter-NVV7IXXP.js.map} +0 -0
  78. /package/dist/{WidgetLayout-HE7E4UL5.js.map → WidgetLayout-T7DBLKV3.js.map} +0 -0
  79. /package/dist/{chunk-2BDTG544.js.map → chunk-2QTH6JHX.js.map} +0 -0
  80. /package/dist/{chunk-TGKQRK3S.js.map → chunk-3R62ISBR.js.map} +0 -0
  81. /package/dist/{chunk-KCYBMKQL.js.map → chunk-3TV6SKGW.js.map} +0 -0
  82. /package/dist/{chunk-MAA7U4RF.js.map → chunk-3ZW74FHC.js.map} +0 -0
  83. /package/dist/{chunk-GTTMLDCI.js.map → chunk-CG75X77Q.js.map} +0 -0
  84. /package/dist/{chunk-IOPHQEUY.js.map → chunk-GA4AC4XL.js.map} +0 -0
  85. /package/dist/{chunk-VXKNS7FH.js.map → chunk-NFUX2ESW.js.map} +0 -0
@@ -3,7 +3,7 @@ import {
3
3
  replaceScheduleShareSearch,
4
4
  searchAllAgents,
5
5
  useSearchAgentsList
6
- } from "./chunk-E4GVP6PM.js";
6
+ } from "./chunk-T6QQV5LK.js";
7
7
  import {
8
8
  Icon,
9
9
  PageHeader,
@@ -14,11 +14,12 @@ import {
14
14
  sidebarRailButtonClassName,
15
15
  useCompactLayout,
16
16
  useDraftCatalog
17
- } from "./chunk-MAA7U4RF.js";
17
+ } from "./chunk-3ZW74FHC.js";
18
18
  import {
19
19
  SESSION_CUSTOM_RANGE_MAX_DAYS,
20
20
  SESSION_SHARE_CHANGE_EVENT,
21
21
  buildAgentSessionShareUrl,
22
+ defaultMetricsTimeRange,
22
23
  defaultSessionTimeRange,
23
24
  getErrorMessage,
24
25
  isMetricsChromeEnabled,
@@ -42,13 +43,13 @@ import {
42
43
  useServer,
43
44
  useServerCapabilities,
44
45
  useShellMode
45
- } from "./chunk-6CFZHEYH.js";
46
+ } from "./chunk-2GIZY3JJ.js";
46
47
  import {
47
48
  useAuiState
48
49
  } from "./chunk-M6MHLVSO.js";
49
50
  import {
50
51
  OpenUiFenceBlock
51
- } from "./chunk-GTTMLDCI.js";
52
+ } from "./chunk-CG75X77Q.js";
52
53
  import {
53
54
  ThemeContext,
54
55
  ThemeProvider,
@@ -56,7 +57,7 @@ import {
56
57
  useOptionalContentClassNames,
57
58
  useOptionalThemeMode,
58
59
  useOptionalThemePreset
59
- } from "./chunk-P7J2ABEP.js";
60
+ } from "./chunk-JCL3Q7RW.js";
60
61
 
61
62
  // src/theme/brand.tsx
62
63
  import { useContext } from "react";
@@ -1008,7 +1009,7 @@ function AgentCodeBlock({ code, language }) {
1008
1009
  language,
1009
1010
  showLineNumbers: true,
1010
1011
  darkTheme: mode === "dark",
1011
- className: "m-0 flex min-h-full flex-col rounded-none [&>pre]:flex-1"
1012
+ className: "m-0 flex min-h-full flex-col rounded-none text-xs [&>pre]:flex-1"
1012
1013
  }
1013
1014
  );
1014
1015
  }
@@ -1401,7 +1402,7 @@ function DropdownMenu({
1401
1402
  transform: [align === "end" ? "translateX(-100%)" : null, side === "top" ? "translateY(-100%)" : null].filter((value) => value !== null).join(" ") || void 0
1402
1403
  },
1403
1404
  className: cn(
1404
- "fixed z-[200] flex min-w-[8rem] flex-col rounded-md border border-border bg-card-bg p-1",
1405
+ "aui-popup-enter fixed z-[200] flex min-w-[8rem] flex-col rounded-md border border-border bg-card-bg p-1",
1405
1406
  "text-text-primary shadow-md",
1406
1407
  className
1407
1408
  ),
@@ -1447,6 +1448,7 @@ function cloneAgentName(agentName) {
1447
1448
  }
1448
1449
  function AgentOverflowMenu({
1449
1450
  agentName,
1451
+ description,
1450
1452
  agentSpec,
1451
1453
  canMutate,
1452
1454
  canUse = true,
@@ -1478,6 +1480,7 @@ function AgentOverflowMenu({
1478
1480
  try {
1479
1481
  await builder.saveAgent({
1480
1482
  agentName: clonedName,
1483
+ ...description === void 0 ? {} : { description },
1481
1484
  agentSpec,
1482
1485
  intent: "create"
1483
1486
  });
@@ -1660,6 +1663,7 @@ function AgentDetailsHeader({ agentId, detail, onBack }) {
1660
1663
  isCreateAgent: true,
1661
1664
  agentId: detail.agentId,
1662
1665
  agentName: detail.name,
1666
+ ...detail.description === void 0 ? {} : { description: detail.description },
1663
1667
  agentSpec: detail.agentSpec
1664
1668
  });
1665
1669
  };
@@ -1702,6 +1706,7 @@ function AgentDetailsHeader({ agentId, detail, onBack }) {
1702
1706
  AgentOverflowMenu,
1703
1707
  {
1704
1708
  agentName: detail.name,
1709
+ ...detail.description === void 0 ? {} : { description: detail.description },
1705
1710
  agentSpec: detail.agentSpec,
1706
1711
  canMutate,
1707
1712
  canUse,
@@ -1771,11 +1776,13 @@ function AgentDetailsPage({ agentId }) {
1771
1776
  const AgentSessions2 = useSlot("AgentSessions");
1772
1777
  const SchedulesPage2 = useSlot("SchedulesPage");
1773
1778
  const AgentMetrics = useSlot("AgentMetrics");
1779
+ const AgentMetricsTimeRangeFilter2 = useSlot("AgentMetricsTimeRangeFilter");
1774
1780
  const AgentCodeSnippets2 = useSlot("AgentCodeSnippets");
1775
1781
  const [detail, setDetail] = useState7();
1776
1782
  const [detailFailed, setDetailFailed] = useState7(false);
1777
1783
  const [snippets, setSnippets] = useState7();
1778
1784
  const [snippetsFailed, setSnippetsFailed] = useState7(false);
1785
+ const [metricsTimeRange, setMetricsTimeRange] = useState7(defaultMetricsTimeRange);
1779
1786
  const goBack = useCallback5(() => {
1780
1787
  updateShareSearch({
1781
1788
  sessionId: null,
@@ -1856,7 +1863,15 @@ function AgentDetailsPage({ agentId }) {
1856
1863
  } else if (activeTab === "schedules") {
1857
1864
  content = /* @__PURE__ */ jsx23(SchedulesPage2, { agentId });
1858
1865
  } else if (activeTab === "metrics") {
1859
- content = /* @__PURE__ */ jsx23(AgentMetrics, { agentId });
1866
+ content = /* @__PURE__ */ jsx23(
1867
+ AgentMetrics,
1868
+ {
1869
+ agentId,
1870
+ timeRange: metricsTimeRange,
1871
+ onTimeRangeChange: setMetricsTimeRange,
1872
+ showTimeRangeFilter: false
1873
+ }
1874
+ );
1860
1875
  } else if (snippetsFailed) {
1861
1876
  content = /* @__PURE__ */ jsx23(AgentDetailsUnavailable2, { onBack: goBack, reason: "Code samples for this agent could not be loaded." });
1862
1877
  } else if (snippets === void 0) {
@@ -1875,6 +1890,7 @@ function AgentDetailsPage({ agentId }) {
1875
1890
  activeTab,
1876
1891
  showMetrics,
1877
1892
  showSchedules,
1893
+ end: activeTab === "metrics" ? /* @__PURE__ */ jsx23(AgentMetricsTimeRangeFilter2, { timeRange: metricsTimeRange, onTimeRangeChange: setMetricsTimeRange }) : null,
1878
1894
  onTabChange: (tab) => updateShareSearch({
1879
1895
  agentId,
1880
1896
  tab,
@@ -1907,36 +1923,32 @@ function AgentDetailsTabs({
1907
1923
  activeTab,
1908
1924
  onTabChange,
1909
1925
  showMetrics = false,
1910
- showSchedules = false
1926
+ showSchedules = false,
1927
+ end
1911
1928
  }) {
1912
- return /* @__PURE__ */ jsx24(
1913
- "div",
1914
- {
1915
- role: "tablist",
1916
- "aria-label": "Agent details",
1917
- className: "flex shrink-0 gap-1 overflow-x-auto border-b border-border bg-primary-bg px-3",
1918
- children: tabs.filter((tab) => (tab.id !== "metrics" || showMetrics) && (tab.id !== "schedules" || showSchedules)).map((tab) => /* @__PURE__ */ jsxs15(
1919
- "button",
1920
- {
1921
- type: "button",
1922
- role: "tab",
1923
- "aria-selected": activeTab === tab.id,
1924
- "aria-current": activeTab === tab.id ? "page" : void 0,
1925
- className: cn(
1926
- "relative flex h-10 shrink-0 cursor-pointer items-center gap-1.5 px-2 text-xs font-medium text-text-secondary",
1927
- "focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-focus-ring",
1928
- activeTab === tab.id && "text-primary-button-bg after:absolute after:inset-x-0 after:bottom-0 after:h-0.5 after:bg-primary-button-bg"
1929
- ),
1930
- onClick: () => onTabChange(tab.id),
1931
- children: [
1932
- /* @__PURE__ */ jsx24(Icon, { name: tab.icon, className: "size-3.5" }),
1933
- tab.label
1934
- ]
1935
- },
1936
- tab.id
1937
- ))
1938
- }
1939
- );
1929
+ return /* @__PURE__ */ jsxs15("div", { className: "flex shrink-0 items-center border-b border-border bg-primary-bg px-3", children: [
1930
+ /* @__PURE__ */ jsx24("div", { role: "tablist", "aria-label": "Agent details", className: "flex min-w-0 flex-1 gap-1 overflow-x-auto", children: tabs.filter((tab) => (tab.id !== "metrics" || showMetrics) && (tab.id !== "schedules" || showSchedules)).map((tab) => /* @__PURE__ */ jsxs15(
1931
+ "button",
1932
+ {
1933
+ type: "button",
1934
+ role: "tab",
1935
+ "aria-selected": activeTab === tab.id,
1936
+ "aria-current": activeTab === tab.id ? "page" : void 0,
1937
+ className: cn(
1938
+ "relative flex h-10 shrink-0 cursor-pointer items-center gap-1.5 px-2 text-xs font-medium text-text-secondary",
1939
+ "focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-focus-ring",
1940
+ activeTab === tab.id && "text-primary-button-bg after:absolute after:inset-x-0 after:bottom-0 after:h-0.5 after:bg-primary-button-bg"
1941
+ ),
1942
+ onClick: () => onTabChange(tab.id),
1943
+ children: [
1944
+ /* @__PURE__ */ jsx24(Icon, { name: tab.icon, className: "size-3.5" }),
1945
+ tab.label
1946
+ ]
1947
+ },
1948
+ tab.id
1949
+ )) }),
1950
+ end != null ? /* @__PURE__ */ jsx24("div", { className: "ml-auto shrink-0 pl-2", children: end }) : null
1951
+ ] });
1940
1952
  }
1941
1953
 
1942
1954
  // src/atoms/agent-details/AgentDetailsUnavailable.tsx
@@ -2123,17 +2135,24 @@ function AgentMetricStatistics({ meters }) {
2123
2135
  meter: item.meter,
2124
2136
  durationInSeconds: section.durationInSeconds
2125
2137
  });
2126
- return /* @__PURE__ */ jsxs18("div", { className: "min-w-0 px-3 first:pl-0 last:pr-0", children: [
2127
- /* @__PURE__ */ jsx28("dt", { className: "truncate text-xs font-medium text-text-secondary", children: item.label }),
2128
- /* @__PURE__ */ jsx28(
2129
- "dd",
2130
- {
2131
- className: `mt-1 truncate font-semibold tabular-nums ${item.prominent ? "text-xl" : "text-base"} ${item.highlighted ? "text-primary-button-bg" : "text-text-primary"}`,
2132
- title: value,
2133
- children: value
2134
- }
2135
- )
2136
- ] }, item.label);
2138
+ return /* @__PURE__ */ jsxs18(
2139
+ "div",
2140
+ {
2141
+ className: `min-w-0 px-3 first:pl-0 last:pr-0 ${item.prominent ? "" : "text-center"}`,
2142
+ children: [
2143
+ /* @__PURE__ */ jsx28("dt", { className: "truncate text-sm font-medium text-text-secondary", children: item.label }),
2144
+ /* @__PURE__ */ jsx28(
2145
+ "dd",
2146
+ {
2147
+ className: `truncate font-bold tabular-nums ${item.prominent ? "text-3xl" : "text-base mt-1.5"} ${item.highlighted ? "text-primary-button-bg" : "text-text-primary"}`,
2148
+ title: value,
2149
+ children: value
2150
+ }
2151
+ )
2152
+ ]
2153
+ },
2154
+ item.label
2155
+ );
2137
2156
  }) })
2138
2157
  },
2139
2158
  section.ariaLabel
@@ -2146,7 +2165,8 @@ function AgentMetricsView({
2146
2165
  chartsLoading,
2147
2166
  chartsError,
2148
2167
  timeRange,
2149
- onTimeRangeChange
2168
+ onTimeRangeChange,
2169
+ showTimeRangeFilter = true
2150
2170
  }) {
2151
2171
  const AgentMetricCard2 = useSlot("AgentMetricCard");
2152
2172
  const AgentMetricChart2 = useSlot("AgentMetricChart");
@@ -2158,11 +2178,11 @@ function AgentMetricsView({
2158
2178
  });
2159
2179
  const hasStatistics = meters?.some((meter) => statisticMetricNames.has(meter.name)) ?? false;
2160
2180
  return /* @__PURE__ */ jsxs18("div", { className: "min-h-0 flex-1 overflow-auto bg-secondary-bg/40 p-4", "data-slot": "agent-metrics-view", children: [
2161
- /* @__PURE__ */ jsx28("div", { className: "mb-4 flex justify-end", children: /* @__PURE__ */ jsx28(AgentMetricsTimeRangeFilter2, { timeRange, onTimeRangeChange }) }),
2181
+ showTimeRangeFilter ? /* @__PURE__ */ jsx28("div", { className: "mb-4 flex justify-end", children: /* @__PURE__ */ jsx28(AgentMetricsTimeRangeFilter2, { timeRange, onTimeRangeChange }) }) : null,
2162
2182
  meterError != null ? /* @__PURE__ */ jsx28("div", { className: "mb-4 rounded-lg border border-failure-bg/30 bg-failure-bg/10 p-3 text-sm text-failure-bg", children: meterError }) : meters == null ? /* @__PURE__ */ jsxs18("div", { className: "mb-4 grid gap-4", "aria-label": "Loading metrics", children: [
2163
2183
  /* @__PURE__ */ jsx28("div", { className: "grid grid-cols-2 gap-3 md:grid-cols-4", children: Array.from({ length: 4 }, (_, index) => /* @__PURE__ */ jsx28(Skeleton, { className: "h-20 rounded-lg" }, index)) }),
2164
2184
  /* @__PURE__ */ jsx28("div", { className: "grid gap-4 lg:grid-cols-2", children: Array.from({ length: 2 }, (_, index) => /* @__PURE__ */ jsx28(Skeleton, { className: "h-20 rounded-lg" }, index)) })
2165
- ] }) : featuredMeters?.length === 0 && !hasStatistics ? /* @__PURE__ */ jsx28("div", { className: "mb-4 rounded-lg border border-border bg-card-bg p-6 text-center text-sm text-text-secondary", children: "No aggregate metrics" }) : /* @__PURE__ */ jsxs18("div", { className: "mb-4 grid gap-4", children: [
2185
+ ] }) : featuredMeters?.length === 0 && !hasStatistics ? /* @__PURE__ */ jsx28("div", { className: "mb-4 rounded-lg border border-border bg-card-bg p-6 text-center text-sm text-text-secondary", children: "No aggregate metrics" }) : /* @__PURE__ */ jsxs18("div", { className: "mb-3 grid gap-3", children: [
2166
2186
  featuredMeters != null && featuredMeters.length > 0 ? /* @__PURE__ */ jsx28("div", { className: "grid grid-cols-2 gap-3 md:grid-cols-4", children: featuredMeters.map((meter) => /* @__PURE__ */ jsx28(AgentMetricCard2, { meter }, meter.name)) }) : null,
2167
2187
  hasStatistics ? /* @__PURE__ */ jsx28(AgentMetricStatistics2, { meters }) : null
2168
2188
  ] }),
@@ -2186,7 +2206,7 @@ import { jsx as jsx29, jsxs as jsxs19 } from "react/jsx-runtime";
2186
2206
  function AgentOverviewCard({ title, icon, count, children }) {
2187
2207
  return /* @__PURE__ */ jsxs19("section", { className: "rounded-lg border border-border bg-card-bg p-3 text-text-primary", children: [
2188
2208
  /* @__PURE__ */ jsxs19("h2", { className: "mb-2 flex items-center gap-1.5 text-xs font-semibold", children: [
2189
- /* @__PURE__ */ jsx29(Icon, { name: icon, className: "size-3.5 text-text-secondary" }),
2209
+ icon ? /* @__PURE__ */ jsx29(Icon, { name: icon, className: "size-3.5 text-text-secondary" }) : null,
2190
2210
  title,
2191
2211
  count !== void 0 ? /* @__PURE__ */ jsxs19("span", { className: "text-text-secondary", children: [
2192
2212
  "(",
@@ -2651,7 +2671,7 @@ function auiSelectPrefixTriggerClass(className) {
2651
2671
  }
2652
2672
  function auiSelectMenuClass(className) {
2653
2673
  return cn(
2654
- "bg-card-bg text-text-primary z-50 max-h-64 overflow-y-auto rounded-md border border-border p-1 shadow-md",
2674
+ "aui-popup-enter bg-card-bg text-text-primary z-50 max-h-64 overflow-y-auto rounded-md border border-border p-1 shadow-md",
2655
2675
  className
2656
2676
  );
2657
2677
  }
@@ -2668,6 +2688,28 @@ function auiSelectOptionClass(className) {
2668
2688
  import { useEffect as useEffect5, useId as useId3, useLayoutEffect as useLayoutEffect3, useRef as useRef3, useState as useState9 } from "react";
2669
2689
  import { createPortal as createPortal3 } from "react-dom";
2670
2690
  import { Fragment as Fragment5, jsx as jsx34, jsxs as jsxs24 } from "react/jsx-runtime";
2691
+ var MENU_GAP_PX = 4;
2692
+ var MENU_MAX_HEIGHT_PX = 256;
2693
+ function estimateMenuHeight({ optionCount, hasFooter }) {
2694
+ const rows = Math.max(optionCount, 1) * 32;
2695
+ const footer = hasFooter ? 40 : 0;
2696
+ return Math.min(8 + rows + footer, MENU_MAX_HEIGHT_PX);
2697
+ }
2698
+ function resolveMenuPlacement({
2699
+ preferred,
2700
+ spaceAbove,
2701
+ spaceBelow,
2702
+ menuHeight
2703
+ }) {
2704
+ if (preferred === "bottom") {
2705
+ if (spaceBelow >= menuHeight) return "bottom";
2706
+ if (spaceAbove >= menuHeight) return "top";
2707
+ return spaceAbove > spaceBelow ? "top" : "bottom";
2708
+ }
2709
+ if (spaceAbove >= menuHeight) return "top";
2710
+ if (spaceBelow >= menuHeight) return "bottom";
2711
+ return spaceBelow > spaceAbove ? "bottom" : "top";
2712
+ }
2671
2713
  function PopoverSelect(props) {
2672
2714
  const [open, setOpen] = useState9(false);
2673
2715
  const [pos, setPos] = useState9(null);
@@ -2677,7 +2719,9 @@ function PopoverSelect(props) {
2677
2719
  const listboxRef = useRef3(null);
2678
2720
  const focusedOpenRef = useRef3(false);
2679
2721
  const listboxId = useId3();
2680
- const menuPlacement = props.menuPlacement ?? "bottom";
2722
+ const preferredPlacement = props.menuPlacement ?? "bottom";
2723
+ const hasFooter = props.footer != null;
2724
+ const optionCount = props.options.length;
2681
2725
  useLayoutEffect3(() => {
2682
2726
  if (!open) {
2683
2727
  setPos(null);
@@ -2687,20 +2731,33 @@ function PopoverSelect(props) {
2687
2731
  const el = triggerRef.current;
2688
2732
  if (!el) return;
2689
2733
  const rect = el.getBoundingClientRect();
2734
+ const spaceBelow = window.innerHeight - rect.bottom - MENU_GAP_PX;
2735
+ const spaceAbove = rect.top - MENU_GAP_PX;
2736
+ const measuredHeight = menuRef.current?.offsetHeight;
2737
+ const menuHeight = measuredHeight != null && measuredHeight > 0 ? measuredHeight : estimateMenuHeight({ optionCount, hasFooter });
2738
+ const placement = resolveMenuPlacement({
2739
+ preferred: preferredPlacement,
2740
+ spaceAbove,
2741
+ spaceBelow,
2742
+ menuHeight
2743
+ });
2690
2744
  setPos({
2691
- top: menuPlacement === "top" ? rect.top - 4 : rect.bottom + 4,
2745
+ top: placement === "top" ? rect.top - MENU_GAP_PX : rect.bottom + MENU_GAP_PX,
2692
2746
  left: rect.left,
2693
- width: rect.width
2747
+ width: rect.width,
2748
+ placement
2694
2749
  });
2695
2750
  };
2696
2751
  update();
2752
+ const rafId = requestAnimationFrame(update);
2697
2753
  window.addEventListener("scroll", update, true);
2698
2754
  window.addEventListener("resize", update);
2699
2755
  return () => {
2756
+ cancelAnimationFrame(rafId);
2700
2757
  window.removeEventListener("scroll", update, true);
2701
2758
  window.removeEventListener("resize", update);
2702
2759
  };
2703
- }, [open, menuPlacement]);
2760
+ }, [open, preferredPlacement, optionCount, hasFooter]);
2704
2761
  useEffect5(() => {
2705
2762
  if (!open) return;
2706
2763
  const handlePointerDown = (event) => {
@@ -2770,7 +2827,7 @@ function PopoverSelect(props) {
2770
2827
  top: pos.top,
2771
2828
  left: pos.left,
2772
2829
  width: pos.width,
2773
- transform: menuPlacement === "top" ? "translateY(-100%)" : void 0
2830
+ transform: pos.placement === "top" ? "translateY(-100%)" : void 0
2774
2831
  },
2775
2832
  onMouseDown: (event) => event.stopPropagation(),
2776
2833
  children: [
@@ -3223,9 +3280,9 @@ function useOptionalCurrentUser() {
3223
3280
  import { useState as useState12 } from "react";
3224
3281
  import { jsx as jsx39 } from "react/jsx-runtime";
3225
3282
  var sizeClasses = {
3226
- sm: "h-6 w-6 text-xs",
3227
- default: "h-8 w-8 text-sm",
3228
- lg: "h-10 w-10 text-base"
3283
+ sm: "h-5 w-5 text-[0.625rem] leading-none",
3284
+ default: "h-8 w-8 text-sm leading-none",
3285
+ lg: "h-10 w-10 text-base leading-none"
3229
3286
  };
3230
3287
  function Avatar({ className, size = "default", ...props }) {
3231
3288
  return /* @__PURE__ */ jsx39(
@@ -3262,7 +3319,7 @@ function AvatarFallback({ className, ...props }) {
3262
3319
  {
3263
3320
  "data-slot": "avatar-fallback",
3264
3321
  className: cn(
3265
- "flex h-full w-full items-center justify-center rounded-full bg-secondary-bg font-medium text-text-secondary",
3322
+ "flex h-full w-full items-center justify-center rounded-full bg-gradient-to-br from-primary-button-bg/20 to-primary-button-bg/10 font-medium text-primary-button-bg dark:from-primary-button-bg dark:to-primary-button-hover dark:text-primary-button-text",
3266
3323
  className
3267
3324
  ),
3268
3325
  ...props
@@ -3273,14 +3330,8 @@ function AvatarFallback({ className, ...props }) {
3273
3330
  // src/atoms/UserAvatar.tsx
3274
3331
  import { jsx as jsx40, jsxs as jsxs28 } from "react/jsx-runtime";
3275
3332
  function getUserInitials(displayName) {
3276
- const parts = displayName.trim().split(/\s+/).filter(Boolean);
3277
- const first = parts[0];
3278
- if (first === void 0) {
3279
- return "";
3280
- }
3281
- const last = parts.at(-1);
3282
- const characters = parts.length === 1 ? Array.from(first).slice(0, 2) : [Array.from(first)[0], Array.from(last ?? "")[0]];
3283
- return characters.filter((character) => character !== void 0).join("").toLocaleUpperCase();
3333
+ const first = Array.from(displayName.trim())[0];
3334
+ return first === void 0 ? "" : first.toLocaleUpperCase();
3284
3335
  }
3285
3336
  function UserAvatar({ labeled = false, className }) {
3286
3337
  const currentUser = useOptionalCurrentUser();
@@ -3300,7 +3351,7 @@ function UserAvatar({ labeled = false, className }) {
3300
3351
  className
3301
3352
  ),
3302
3353
  children: [
3303
- /* @__PURE__ */ jsx40(Avatar, { size: "sm", children: /* @__PURE__ */ jsx40(AvatarFallback, { className: "bg-primary-button-bg text-primary-button-text", children: getUserInitials(displayName) }) }),
3354
+ /* @__PURE__ */ jsx40(Avatar, { size: "sm", children: /* @__PURE__ */ jsx40(AvatarFallback, { children: getUserInitials(displayName) }) }),
3304
3355
  /* @__PURE__ */ jsx40("span", { className: "w-full truncate text-center text-[0.625rem] leading-tight", children: displayName })
3305
3356
  ]
3306
3357
  }
@@ -3580,6 +3631,7 @@ function TableTokenPagination({
3580
3631
 
3581
3632
  // src/atoms/AgentsLibrary.tsx
3582
3633
  import { Fragment as Fragment6, jsx as jsx45, jsxs as jsxs33 } from "react/jsx-runtime";
3634
+ var AGENTS_PAGE_SIZE_OPTIONS = [10, 25];
3583
3635
  function displayModelLabel(modelName) {
3584
3636
  const slash = modelName.lastIndexOf("/");
3585
3637
  return slash >= 0 ? modelName.slice(slash + 1) : modelName;
@@ -3683,17 +3735,30 @@ function AgentLibraryRow({
3683
3735
  const skillsTitle = skillNames.length ? skillNames.join(", ") : `${skillsCount} skills`;
3684
3736
  const hasConfiguration = modelLabel != null || skillsCount > 0 || mcpCount > 0;
3685
3737
  const hasNoSchedules = scheduleSummary != null && scheduleSummary.count === 0;
3738
+ const storedDescription = agent.description?.trim() || null;
3739
+ const description = storedDescription != null && storedDescription !== agent.name ? storedDescription : null;
3686
3740
  return /* @__PURE__ */ jsxs33(TableRow, { className: hasNoSchedules ? "group" : void 0, children: [
3687
- /* @__PURE__ */ jsx45(TableCell, { className: "text-text-primary font-medium", children: onOpen == null ? /* @__PURE__ */ jsx45("span", { className: "block truncate", children: agent.name }) : /* @__PURE__ */ jsx45(
3688
- "button",
3689
- {
3690
- type: "button",
3691
- className: "block max-w-full cursor-pointer text-left",
3692
- "aria-label": `Open ${agent.name}`,
3693
- onClick: onOpen,
3694
- children: /* @__PURE__ */ jsx45("span", { className: "block truncate", children: agent.name })
3695
- }
3696
- ) }),
3741
+ /* @__PURE__ */ jsxs33(TableCell, { className: "text-text-primary w-96 max-w-96 font-medium", children: [
3742
+ onOpen == null ? /* @__PURE__ */ jsx45("span", { className: "block truncate", children: agent.name }) : /* @__PURE__ */ jsx45(
3743
+ "button",
3744
+ {
3745
+ type: "button",
3746
+ className: "block max-w-full cursor-pointer text-left",
3747
+ "aria-label": `Open ${agent.name}`,
3748
+ onClick: onOpen,
3749
+ children: /* @__PURE__ */ jsx45("span", { className: "block truncate", children: agent.name })
3750
+ }
3751
+ ),
3752
+ description ? /* @__PURE__ */ jsx45(
3753
+ Tooltip,
3754
+ {
3755
+ content: description,
3756
+ className: "max-w-sm whitespace-normal text-left",
3757
+ triggerClassName: "block min-w-0 w-full max-w-full",
3758
+ children: /* @__PURE__ */ jsx45("span", { className: "text-text-secondary block truncate text-xs font-normal", children: description })
3759
+ }
3760
+ ) : null
3761
+ ] }),
3697
3762
  /* @__PURE__ */ jsx45(TableCell, { children: hasConfiguration ? /* @__PURE__ */ jsxs33("div", { className: "text-text-secondary flex min-w-0 items-center gap-2", children: [
3698
3763
  modelLabel != null ? /* @__PURE__ */ jsx45(Tooltip, { content: modelTitle, children: /* @__PURE__ */ jsxs33(
3699
3764
  "span",
@@ -3734,6 +3799,7 @@ function AgentLibraryRow({
3734
3799
  AgentOverflowMenu,
3735
3800
  {
3736
3801
  agentName: agent.name,
3802
+ ...storedDescription != null ? { description: storedDescription } : {},
3737
3803
  ...spec != null ? { agentSpec: spec } : {},
3738
3804
  canMutate,
3739
3805
  canUse: canUseAgent,
@@ -3815,11 +3881,14 @@ function AgentsLibrary({ onSelectAgent }) {
3815
3881
  window.addEventListener("keydown", onKeyDown, true);
3816
3882
  return () => window.removeEventListener("keydown", onKeyDown, true);
3817
3883
  }, [closeLibrary, open]);
3818
- const { agents, isInitialLoading, isSearching, loadingMore, error, hasMore, listRef, sentinelRef } = useSearchAgentsList({
3884
+ const { agents, isInitialLoading, isSearching, error, pageSize, setPageSize, canPrev, canNext, goPrev, goNext } = useSearchAgentsList({
3819
3885
  enabled: open,
3820
3886
  query,
3821
- refreshKey: agentsListEpoch
3887
+ refreshKey: agentsListEpoch,
3888
+ mode: "paged",
3889
+ limit: DEFAULT_TABLE_PAGE_SIZE
3822
3890
  });
3891
+ const hasPageNav = canPrev || canNext;
3823
3892
  const showCreatedByColumn = hasCreatedBySubject(agents);
3824
3893
  const permissionAgentIds = open ? agents.map(libraryAgentId) : [];
3825
3894
  const { allows } = useResourcePermissions({
@@ -3876,6 +3945,7 @@ function AgentsLibrary({ onSelectAgent }) {
3876
3945
  isCreateAgent: true,
3877
3946
  agentId: libraryAgentId(agent),
3878
3947
  agentName: agent.name,
3948
+ ...agent.description === void 0 ? {} : { description: agent.description },
3879
3949
  agentSpec
3880
3950
  });
3881
3951
  };
@@ -3891,7 +3961,7 @@ function AgentsLibrary({ onSelectAgent }) {
3891
3961
  ] })
3892
3962
  }
3893
3963
  ),
3894
- /* @__PURE__ */ jsx45("div", { className: "bg-secondary-bg/40 flex min-h-0 flex-1 flex-col", children: /* @__PURE__ */ jsx45("div", { ref: listRef, className: "min-h-0 flex-1 overflow-y-auto p-4", "aria-label": "Agents", children: isInitialLoading ? /* @__PURE__ */ jsx45("div", { className: "flex flex-col gap-2 p-1", role: "status", "aria-label": "Loading agents", children: Array.from({ length: 6 }, (_, i) => /* @__PURE__ */ jsx45(Skeleton, { className: "h-11 w-full rounded-md" }, i)) }) : error ? /* @__PURE__ */ jsx45("p", { className: "text-failure-bg px-3 py-8 text-center text-sm", children: error }) : agents.length === 0 ? /* @__PURE__ */ jsx45(
3964
+ /* @__PURE__ */ jsx45("div", { className: "bg-secondary-bg/40 flex min-h-0 flex-1 flex-col", children: /* @__PURE__ */ jsx45("div", { className: "min-h-0 flex-1 overflow-y-auto p-4", "aria-label": "Agents", children: isInitialLoading ? /* @__PURE__ */ jsx45("div", { className: "flex flex-col gap-2 p-1", role: "status", "aria-label": "Loading agents", children: Array.from({ length: 6 }, (_, i) => /* @__PURE__ */ jsx45(Skeleton, { className: "h-11 w-full rounded-md" }, i)) }) : error ? /* @__PURE__ */ jsx45("p", { className: "text-failure-bg px-3 py-8 text-center text-sm", children: error }) : agents.length === 0 && !hasPageNav ? /* @__PURE__ */ jsx45(
3895
3965
  EmptyScreen,
3896
3966
  {
3897
3967
  title: "No Agents Found",
@@ -3900,10 +3970,35 @@ function AgentsLibrary({ onSelectAgent }) {
3900
3970
  /* @__PURE__ */ jsx45(EmptyScreenQueryHighlight, { children: query.trim() })
3901
3971
  ] }) : "Build one in a chat, then save it as an agent."
3902
3972
  }
3903
- ) : /* @__PURE__ */ jsxs33(Fragment6, { children: [
3904
- /* @__PURE__ */ jsx45("div", { className: "overflow-hidden rounded-lg border border-border", children: /* @__PURE__ */ jsxs33(Table, { children: [
3973
+ ) : agents.length === 0 ? /* @__PURE__ */ jsxs33("div", { className: "flex min-h-full flex-col", children: [
3974
+ /* @__PURE__ */ jsx45(
3975
+ EmptyScreen,
3976
+ {
3977
+ title: "No Agents Found",
3978
+ description: query.trim() ? /* @__PURE__ */ jsxs33(Fragment6, { children: [
3979
+ "No search results found for ",
3980
+ /* @__PURE__ */ jsx45(EmptyScreenQueryHighlight, { children: query.trim() })
3981
+ ] }) : "Build one in a chat, then save it as an agent.",
3982
+ className: "flex-1"
3983
+ }
3984
+ ),
3985
+ /* @__PURE__ */ jsx45("div", { className: "overflow-hidden rounded-lg border border-border", children: /* @__PURE__ */ jsx45(
3986
+ TableTokenPagination,
3987
+ {
3988
+ pageSize,
3989
+ rowCount: 0,
3990
+ canPrev,
3991
+ canNext,
3992
+ onPrev: goPrev,
3993
+ onNext: goNext,
3994
+ pageSizeOptions: AGENTS_PAGE_SIZE_OPTIONS,
3995
+ onPageSizeChange: setPageSize
3996
+ }
3997
+ ) })
3998
+ ] }) : /* @__PURE__ */ jsxs33("div", { className: "overflow-hidden rounded-lg border border-border", children: [
3999
+ /* @__PURE__ */ jsxs33(Table, { children: [
3905
4000
  /* @__PURE__ */ jsx45(TableHeader, { children: /* @__PURE__ */ jsxs33(TableRow, { className: "hover:bg-transparent", children: [
3906
- /* @__PURE__ */ jsx45(TableHead, { children: "Agent name" }),
4001
+ /* @__PURE__ */ jsx45(TableHead, { className: "w-96 min-w-96", children: "Agent name" }),
3907
4002
  /* @__PURE__ */ jsx45(TableHead, { children: "Configuration" }),
3908
4003
  showCreatedByColumn ? /* @__PURE__ */ jsx45(TableHead, { children: "Created by" }) : null,
3909
4004
  showSchedulesColumn ? /* @__PURE__ */ jsx45(TableHead, { className: "w-[14rem]", children: "Schedules" }) : null,
@@ -3952,8 +4047,20 @@ function AgentsLibrary({ onSelectAgent }) {
3952
4047
  id
3953
4048
  );
3954
4049
  }) })
3955
- ] }) }),
3956
- hasMore ? /* @__PURE__ */ jsx45("div", { ref: sentinelRef, className: "flex h-8 shrink-0 items-center justify-center", "aria-hidden": true, children: loadingMore ? /* @__PURE__ */ jsx45("span", { className: "text-text-secondary text-xs", role: "status", children: "Loading more\u2026" }) : null }) : null
4050
+ ] }),
4051
+ /* @__PURE__ */ jsx45(
4052
+ TableTokenPagination,
4053
+ {
4054
+ pageSize,
4055
+ rowCount: agents.length,
4056
+ canPrev,
4057
+ canNext,
4058
+ onPrev: goPrev,
4059
+ onNext: goNext,
4060
+ pageSizeOptions: AGENTS_PAGE_SIZE_OPTIONS,
4061
+ onPageSizeChange: setPageSize
4062
+ }
4063
+ )
3957
4064
  ] }) }) })
3958
4065
  ] });
3959
4066
  }
@@ -4149,7 +4256,7 @@ function AttachmentCard({
4149
4256
  children: [
4150
4257
  /* @__PURE__ */ jsx49(Tooltip, { content: name, side: "top", triggerClassName: "size-full", children: /* @__PURE__ */ jsx49("div", { className: "bg-secondary-bg relative size-full overflow-hidden rounded-[calc(var(--composer-radius,1.5rem)-var(--composer-padding,8px))] border border-primary-button-bg/20", children: /* @__PURE__ */ jsxs37(Avatar, { className: "size-full rounded-none", children: [
4151
4258
  /* @__PURE__ */ jsx49(AvatarImage, { src: isImage ? previewSrc : void 0, alt: name, className: "object-cover" }),
4152
- /* @__PURE__ */ jsx49(AvatarFallback, { className: "rounded-none", children: /* @__PURE__ */ jsx49(Icon, { name: "file", size: "1.5rem", className: "text-text-secondary" }) })
4259
+ /* @__PURE__ */ jsx49(AvatarFallback, { className: "rounded-none bg-secondary-bg bg-none text-text-secondary", children: /* @__PURE__ */ jsx49(Icon, { name: "file", size: "1.5rem", className: "text-text-secondary" }) })
4153
4260
  ] }) }) }),
4154
4261
  /* @__PURE__ */ jsx49("span", { className: "sr-only", children: name }),
4155
4262
  onRemove && /* @__PURE__ */ jsx49(
@@ -6193,8 +6300,10 @@ function SideDrawer({
6193
6300
  onOpenChange(false);
6194
6301
  },
6195
6302
  style: compactStyle,
6303
+ "data-anchor": anchor,
6304
+ "data-compact": compact ? "" : void 0,
6196
6305
  className: cn(
6197
- "bg-card-bg text-text-primary border-border open:flex open:flex-col overflow-hidden rounded-none p-0 shadow-xl",
6306
+ "aui-side-drawer bg-card-bg text-text-primary border-border open:flex open:flex-col overflow-hidden rounded-none p-0 shadow-xl",
6198
6307
  "backdrop:bg-black/50 backdrop:backdrop-blur-[2px] dark:backdrop:bg-black/70",
6199
6308
  compact ? "m-0 mt-auto h-[min(85dvh,40rem)] w-full max-w-none border-t pb-[env(safe-area-inset-bottom)]" : cn(
6200
6309
  // Mobile / narrow: bottom sheet
@@ -6274,7 +6383,7 @@ function AgentInstructionsDrawer({
6274
6383
  open,
6275
6384
  onOpenChange: (nextOpen) => !nextOpen && onClose(),
6276
6385
  title: "Instructions",
6277
- description: "Define the agent behavior and messages added at the start of every session.",
6386
+ description: "System prompt that defines the agent's role, goals, and how it should behave. Written once, applied to every run.",
6278
6387
  anchor: "right",
6279
6388
  size: "lg",
6280
6389
  "aria-label": "Edit Instructions",
@@ -8200,7 +8309,7 @@ function DraftReasoningEffortSelector({ disabled, isRunning }) {
8200
8309
  ]
8201
8310
  }
8202
8311
  ),
8203
- open ? isMobile || compactLayout ? /* @__PURE__ */ jsx82(BottomSheet, { open: true, onOpenChange: setOpen, "aria-label": "Select reasoning effort", children: content }) : /* @__PURE__ */ jsx82("div", { className: "bg-card-bg text-text-primary absolute right-0 bottom-full z-50 mb-2 flex max-h-[22rem] w-[12rem] flex-col overflow-hidden rounded-lg border border-border shadow-lg", children: content }) : null
8312
+ open ? isMobile || compactLayout ? /* @__PURE__ */ jsx82(BottomSheet, { open: true, onOpenChange: setOpen, "aria-label": "Select reasoning effort", children: content }) : /* @__PURE__ */ jsx82("div", { className: "aui-popup-enter bg-card-bg text-text-primary absolute right-0 bottom-full z-50 mb-2 flex max-h-[22rem] w-[12rem] flex-col overflow-hidden rounded-lg border border-border shadow-lg", children: content }) : null
8204
8313
  ] });
8205
8314
  }
8206
8315
 
@@ -8817,7 +8926,7 @@ function DraftCompositeSelector({ disabled, isRunning, onAttach }) {
8817
8926
  id: menuId,
8818
8927
  role: "dialog",
8819
8928
  "aria-label": "Add to composer",
8820
- className: "bg-card-bg text-text-primary absolute bottom-full left-0 z-50 mb-2 flex h-[22rem] w-[28rem] max-w-[min(28rem,calc(100vw-2rem))] flex-col overflow-hidden rounded-lg border border-border shadow-lg",
8929
+ className: "aui-popup-enter bg-card-bg text-text-primary absolute bottom-full left-0 z-50 mb-2 flex h-[22rem] w-[28rem] max-w-[min(28rem,calc(100vw-2rem))] flex-col overflow-hidden rounded-lg border border-border shadow-lg",
8821
8930
  children: content
8822
8931
  }
8823
8932
  ) : null
@@ -8924,7 +9033,7 @@ function DraftModelSelector({ disabled, isRunning }) {
8924
9033
  ]
8925
9034
  }
8926
9035
  ),
8927
- open ? isMobile || compactLayout ? /* @__PURE__ */ jsx85(BottomSheet, { open: true, onOpenChange: setOpen, "aria-label": "Select model", children: content }) : /* @__PURE__ */ jsx85("div", { className: "bg-card-bg text-text-primary absolute right-0 bottom-full z-50 mb-2 flex max-h-[22rem] w-[18rem] flex-col overflow-hidden rounded-lg border border-border shadow-lg", children: content }) : null
9036
+ open ? isMobile || compactLayout ? /* @__PURE__ */ jsx85(BottomSheet, { open: true, onOpenChange: setOpen, "aria-label": "Select model", children: content }) : /* @__PURE__ */ jsx85("div", { className: "aui-popup-enter bg-card-bg text-text-primary absolute right-0 bottom-full z-50 mb-2 flex max-h-[22rem] w-[18rem] flex-col overflow-hidden rounded-lg border border-border shadow-lg", children: content }) : null
8928
9037
  ] });
8929
9038
  }
8930
9039
 
@@ -8954,7 +9063,7 @@ import ReactMarkdown from "react-markdown";
8954
9063
  import remarkGfm from "remark-gfm";
8955
9064
  import { Fragment as Fragment14, jsx as jsx87 } from "react/jsx-runtime";
8956
9065
  function preloadMarkdownOpenUI() {
8957
- return import("./OpenUiFenceBlock-UTDCTNTM.js");
9066
+ return import("./OpenUiFenceBlock-KPZFLUSC.js");
8958
9067
  }
8959
9068
  var LARGE_STREAMING_FENCE_CHARS = 8 * 1024;
8960
9069
  function getActiveStreamingFenceCode(content) {
@@ -9120,15 +9229,19 @@ function MessageErrorBanner({ message, className }) {
9120
9229
  }
9121
9230
 
9122
9231
  // src/atoms/MessageIndicator.tsx
9123
- import { jsx as jsx90 } from "react/jsx-runtime";
9232
+ import { ThinkingOrb } from "thinking-orbs";
9233
+ import { jsx as jsx90, jsxs as jsxs67 } from "react/jsx-runtime";
9124
9234
  function MessageIndicator({ className }) {
9125
- return /* @__PURE__ */ jsx90(
9235
+ return /* @__PURE__ */ jsxs67(
9126
9236
  "span",
9127
9237
  {
9128
9238
  "data-slot": "aui_assistant-message-indicator",
9129
- className: cn("animate-pulse font-sans", className),
9130
- "aria-label": "Assistant is working",
9131
- children: "\u25CF"
9239
+ role: "status",
9240
+ className: cn("inline-flex items-center gap-1.5 font-sans text-sm text-text-secondary", className),
9241
+ children: [
9242
+ /* @__PURE__ */ jsx90(ThinkingOrb, { state: "listening", size: 20, "aria-hidden": true }),
9243
+ /* @__PURE__ */ jsx90("span", { className: "aui-message-indicator-shimmer", children: "Working..." })
9244
+ ]
9132
9245
  }
9133
9246
  );
9134
9247
  }
@@ -9432,7 +9545,7 @@ function SandboxArtifactDownload({
9432
9545
  }
9433
9546
 
9434
9547
  // src/atoms/SandboxToolCallCard.tsx
9435
- import { Fragment as Fragment15, jsx as jsx95, jsxs as jsxs67 } from "react/jsx-runtime";
9548
+ import { Fragment as Fragment15, jsx as jsx95, jsxs as jsxs68 } from "react/jsx-runtime";
9436
9549
  function JsonPane({ value, className }) {
9437
9550
  const MonacoEditorCore2 = useSlot("MonacoEditorCore");
9438
9551
  return /* @__PURE__ */ jsx95(
@@ -9466,22 +9579,22 @@ function SandboxBody({
9466
9579
  onViewModeChange,
9467
9580
  dataTestPrefix
9468
9581
  }) {
9469
- return /* @__PURE__ */ jsxs67(
9582
+ return /* @__PURE__ */ jsxs68(
9470
9583
  "div",
9471
9584
  {
9472
9585
  className: "rounded-lg border border-border bg-primary-bg",
9473
9586
  "data-testid": dataTestPrefix ? `${dataTestPrefix}-sandbox` : void 0,
9474
9587
  children: [
9475
- /* @__PURE__ */ jsx95("div", { className: "rounded-t-md border-b border-primary-button-bg/30 bg-primary-button-bg/10", children: /* @__PURE__ */ jsxs67("div", { className: "flex w-full min-w-0 items-center gap-2 px-3 py-1.5", children: [
9588
+ /* @__PURE__ */ jsx95("div", { className: "rounded-t-md border-b border-primary-button-bg/30 bg-primary-button-bg/10", children: /* @__PURE__ */ jsxs68("div", { className: "flex w-full min-w-0 items-center gap-2 px-3 py-1.5", children: [
9476
9589
  /* @__PURE__ */ jsx95("p", { className: "min-w-0 font-sans text-xs font-medium text-primary-button-bg", children: "sandbox" }),
9477
- /* @__PURE__ */ jsxs67(
9590
+ /* @__PURE__ */ jsxs68(
9478
9591
  "div",
9479
9592
  {
9480
9593
  className: "ml-auto flex shrink-0 items-center gap-1.5",
9481
9594
  onClick: (e) => e.stopPropagation(),
9482
9595
  onKeyDown: (e) => e.stopPropagation(),
9483
9596
  children: [
9484
- exitCode != null && /* @__PURE__ */ jsxs67(
9597
+ exitCode != null && /* @__PURE__ */ jsxs68(
9485
9598
  "span",
9486
9599
  {
9487
9600
  className: cn(
@@ -9496,7 +9609,7 @@ function SandboxBody({
9496
9609
  ]
9497
9610
  }
9498
9611
  ),
9499
- /* @__PURE__ */ jsxs67(
9612
+ /* @__PURE__ */ jsxs68(
9500
9613
  "div",
9501
9614
  {
9502
9615
  className: "inline-flex h-6 items-center rounded-md border border-border bg-primary-bg p-0.5",
@@ -9540,33 +9653,33 @@ function SandboxBody({
9540
9653
  }
9541
9654
  )
9542
9655
  ] }) }),
9543
- /* @__PURE__ */ jsx95("div", { className: "rounded-b-lg border border-t-0 border-border p-3", children: hasContent && /* @__PURE__ */ jsx95("div", { className: "max-h-80 overflow-x-hidden overflow-y-auto whitespace-pre-wrap break-words font-mono text-xs text-text-primary", children: viewMode === "code" ? /* @__PURE__ */ jsxs67(Fragment15, { children: [
9544
- argsJson && /* @__PURE__ */ jsxs67("div", { className: "my-1 border-l-4 border-primary-button-bg px-3", children: [
9656
+ /* @__PURE__ */ jsx95("div", { className: "rounded-b-lg border border-t-0 border-border p-3", children: hasContent && /* @__PURE__ */ jsx95("div", { className: "max-h-80 overflow-x-hidden overflow-y-auto whitespace-pre-wrap break-words font-mono text-xs text-text-primary", children: viewMode === "code" ? /* @__PURE__ */ jsxs68(Fragment15, { children: [
9657
+ argsJson && /* @__PURE__ */ jsxs68("div", { className: "my-1 border-l-4 border-primary-button-bg px-3", children: [
9545
9658
  /* @__PURE__ */ jsx95("div", { className: "mb-1 font-sans text-xs font-medium leading-4", children: "Arguments" }),
9546
9659
  /* @__PURE__ */ jsx95(JsonPane, { value: argsJson, className: "pl-2" })
9547
9660
  ] }),
9548
- resultJson && /* @__PURE__ */ jsxs67("div", { className: "my-1 border-l-4 border-primary-button-bg/60 px-3", children: [
9661
+ resultJson && /* @__PURE__ */ jsxs68("div", { className: "my-1 border-l-4 border-primary-button-bg/60 px-3", children: [
9549
9662
  /* @__PURE__ */ jsx95("div", { className: "mb-1 mt-2 font-sans text-xs font-medium leading-4", children: "Result" }),
9550
9663
  /* @__PURE__ */ jsx95(JsonPane, { value: resultJson, className: "pl-2" })
9551
9664
  ] })
9552
- ] }) : /* @__PURE__ */ jsxs67(Fragment15, { children: [
9553
- command && /* @__PURE__ */ jsxs67("div", { className: "my-1 break-all border-l-4 border-primary-button-bg px-3", children: [
9665
+ ] }) : /* @__PURE__ */ jsxs68(Fragment15, { children: [
9666
+ command && /* @__PURE__ */ jsxs68("div", { className: "my-1 break-all border-l-4 border-primary-button-bg px-3", children: [
9554
9667
  /* @__PURE__ */ jsx95("div", { className: "mb-1 text-[12px] font-medium leading-4 text-text-secondary", children: "COMMAND" }),
9555
- /* @__PURE__ */ jsxs67("div", { children: [
9668
+ /* @__PURE__ */ jsxs68("div", { children: [
9556
9669
  /* @__PURE__ */ jsx95("span", { className: "text-primary-button-bg", children: "$" }),
9557
9670
  " ",
9558
9671
  command
9559
9672
  ] })
9560
9673
  ] }),
9561
- resultText ? /* @__PURE__ */ jsxs67(Fragment15, { children: [
9674
+ resultText ? /* @__PURE__ */ jsxs68(Fragment15, { children: [
9562
9675
  /* @__PURE__ */ jsx95("div", { className: "mx-3 my-1 border-t border-border" }),
9563
- /* @__PURE__ */ jsxs67("div", { className: "my-1 break-all border-l-4 border-primary-button-bg/60 px-3", children: [
9676
+ /* @__PURE__ */ jsxs68("div", { className: "my-1 break-all border-l-4 border-primary-button-bg/60 px-3", children: [
9564
9677
  /* @__PURE__ */ jsx95("div", { className: "mb-1 text-[12px] font-medium leading-4 text-text-secondary", children: "OUTPUT" }),
9565
9678
  /* @__PURE__ */ jsx95("div", { children: resultText })
9566
9679
  ] })
9567
- ] }) : resultJson && /* @__PURE__ */ jsxs67(Fragment15, { children: [
9680
+ ] }) : resultJson && /* @__PURE__ */ jsxs68(Fragment15, { children: [
9568
9681
  /* @__PURE__ */ jsx95("div", { className: "mx-3 my-1 border-t border-border" }),
9569
- /* @__PURE__ */ jsxs67("div", { className: "my-1 border-l-4 border-primary-button-bg/60 px-3", children: [
9682
+ /* @__PURE__ */ jsxs68("div", { className: "my-1 border-l-4 border-primary-button-bg/60 px-3", children: [
9570
9683
  /* @__PURE__ */ jsx95("div", { className: "mb-1 text-[12px] font-medium leading-4 text-text-secondary", children: "OUTPUT" }),
9571
9684
  /* @__PURE__ */ jsx95(JsonPane, { value: resultJson, className: "pl-2" })
9572
9685
  ] })
@@ -9725,7 +9838,7 @@ function useOptionalAgentConfigInstructions() {
9725
9838
  }
9726
9839
 
9727
9840
  // src/atoms/SaveAgentButton.tsx
9728
- import { Fragment as Fragment16, jsx as jsx97, jsxs as jsxs68 } from "react/jsx-runtime";
9841
+ import { Fragment as Fragment16, jsx as jsx97, jsxs as jsxs69 } from "react/jsx-runtime";
9729
9842
  function cloneAgentSpec(spec) {
9730
9843
  return {
9731
9844
  ...spec,
@@ -9772,12 +9885,14 @@ function SaveAgentButtonContent({
9772
9885
  const [open, setOpen] = useState36(false);
9773
9886
  const [intent, setIntent] = useState36("create");
9774
9887
  const [name, setName] = useState36("");
9888
+ const [description, setDescription] = useState36("");
9775
9889
  const [draftSpec, setDraftSpec] = useState36(null);
9776
9890
  const [saving, setSaving] = useState36(false);
9777
9891
  const [error, setError] = useState36(null);
9778
9892
  const close = () => {
9779
9893
  if (saving) return;
9780
9894
  setOpen(false);
9895
+ setDescription("");
9781
9896
  setDraftSpec(null);
9782
9897
  setError(null);
9783
9898
  };
@@ -9794,6 +9909,7 @@ function SaveAgentButtonContent({
9794
9909
  const currentName = shell?.mode.status === "active" ? shell.mode.agentName ?? shell.mode.agentId ?? "" : "";
9795
9910
  setIntent(currentName ? "update" : "create");
9796
9911
  setName(currentName);
9912
+ setDescription(currentName && shell?.mode.status === "active" ? shell.mode.description ?? "" : "");
9797
9913
  setDraftSpec(cloneAgentSpec(latestAgentSpec));
9798
9914
  setOpen(true);
9799
9915
  };
@@ -9802,11 +9918,14 @@ function SaveAgentButtonContent({
9802
9918
  if (intent === "update" && !canManageAgent) return;
9803
9919
  const normalizedName = name.trim();
9804
9920
  if (!normalizedName || !draftSpec.model.name.trim()) return;
9921
+ const normalizedDescription = description.trim();
9922
+ if (!normalizedDescription) return;
9805
9923
  setSaving(true);
9806
9924
  setError(null);
9807
9925
  try {
9808
9926
  const result = await builder.saveAgent({
9809
9927
  agentName: normalizedName,
9928
+ ...normalizedDescription ? { description: normalizedDescription } : {},
9810
9929
  agentSpec: draftSpec,
9811
9930
  intent,
9812
9931
  sessionId: draftSessionId
@@ -9815,10 +9934,12 @@ function SaveAgentButtonContent({
9815
9934
  shell?.bindMutableAgent({
9816
9935
  agentId: result.agentId ?? normalizedName,
9817
9936
  agentName: normalizedName,
9937
+ ...normalizedDescription ? { description: normalizedDescription } : {},
9818
9938
  agentSpec: draftSpec
9819
9939
  });
9820
9940
  shell?.invalidateAgentsList();
9821
9941
  setOpen(false);
9942
+ setDescription("");
9822
9943
  setDraftSpec(null);
9823
9944
  } catch (caught) {
9824
9945
  setError(getErrorMessage(caught, "Could not save agent"));
@@ -9829,8 +9950,8 @@ function SaveAgentButtonContent({
9829
9950
  const isUpdateMode = shell?.mode.status === "active" && shell.mode.isMutable && (shell.mode.agentName !== void 0 || shell.mode.agentId !== void 0);
9830
9951
  const triggerLabel = isUpdateMode && children === "Save Agent" ? "Update Agent" : children;
9831
9952
  if (!visible) return null;
9832
- return /* @__PURE__ */ jsxs68(Fragment16, { children: [
9833
- /* @__PURE__ */ jsx97(PermissionGuard2, { allowed: canManageAgent, children: /* @__PURE__ */ jsxs68(
9953
+ return /* @__PURE__ */ jsxs69(Fragment16, { children: [
9954
+ /* @__PURE__ */ jsx97(PermissionGuard2, { allowed: canManageAgent, children: /* @__PURE__ */ jsxs69(
9834
9955
  Button.Primary,
9835
9956
  {
9836
9957
  type: "button",
@@ -9858,11 +9979,12 @@ function SaveAgentButtonContent({
9858
9979
  {
9859
9980
  intent,
9860
9981
  name,
9982
+ description,
9861
9983
  spec: draftSpec,
9862
9984
  saving,
9863
9985
  error,
9864
9986
  onNameChange: setName,
9865
- onChange: setDraftSpec,
9987
+ onDescriptionChange: setDescription,
9866
9988
  onCancel: close,
9867
9989
  onSave: () => void save()
9868
9990
  }
@@ -9874,14 +9996,16 @@ function SaveAgentButtonContent({
9874
9996
 
9875
9997
  // src/atoms/SaveAgentForm.tsx
9876
9998
  import { useEffect as useEffect21, useRef as useRef20 } from "react";
9877
- import { jsx as jsx98, jsxs as jsxs69 } from "react/jsx-runtime";
9999
+ import { jsx as jsx98, jsxs as jsxs70 } from "react/jsx-runtime";
9878
10000
  function SaveAgentForm({
9879
10001
  intent,
9880
10002
  name,
10003
+ description,
9881
10004
  spec,
9882
10005
  saving,
9883
10006
  error,
9884
10007
  onNameChange,
10008
+ onDescriptionChange,
9885
10009
  onCancel,
9886
10010
  onSave
9887
10011
  }) {
@@ -9890,9 +10014,10 @@ function SaveAgentForm({
9890
10014
  if (error === null) return;
9891
10015
  errorRef.current?.scrollIntoView?.({ block: "nearest", behavior: "smooth" });
9892
10016
  }, [error]);
9893
- return /* @__PURE__ */ jsxs69("div", { className: "flex min-h-0 w-full flex-1 flex-col", children: [
9894
- /* @__PURE__ */ jsxs69("div", { className: "min-h-0 flex-1 overflow-y-auto px-5 py-3", children: [
9895
- /* @__PURE__ */ jsxs69("label", { className: "mb-3 block", children: [
10017
+ const canSave = name.trim() !== "" && spec.model.name.trim() !== "" && description.trim() !== "";
10018
+ return /* @__PURE__ */ jsxs70("div", { className: "flex min-h-0 w-full flex-1 flex-col", children: [
10019
+ /* @__PURE__ */ jsxs70("div", { className: "min-h-0 flex-1 overflow-y-auto px-5 py-3", children: [
10020
+ /* @__PURE__ */ jsxs70("label", { className: "mb-3 block", children: [
9896
10021
  /* @__PURE__ */ jsx98("span", { className: "mb-1.5 block text-sm font-medium", children: "Agent name" }),
9897
10022
  /* @__PURE__ */ jsx98(
9898
10023
  "input",
@@ -9905,6 +10030,21 @@ function SaveAgentForm({
9905
10030
  }
9906
10031
  )
9907
10032
  ] }),
10033
+ /* @__PURE__ */ jsxs70("label", { className: "mb-3 block", children: [
10034
+ /* @__PURE__ */ jsx98("span", { className: "mb-1.5 block text-sm font-medium", children: "Description" }),
10035
+ /* @__PURE__ */ jsx98(
10036
+ "textarea",
10037
+ {
10038
+ value: description,
10039
+ disabled: saving,
10040
+ onChange: (event) => onDescriptionChange(event.target.value),
10041
+ rows: 4,
10042
+ maxLength: 1024,
10043
+ placeholder: "Describe what this agent does.",
10044
+ className: auiInputClass("resize-y py-2 disabled:opacity-60")
10045
+ }
10046
+ )
10047
+ ] }),
9908
10048
  error ? /* @__PURE__ */ jsx98(
9909
10049
  "p",
9910
10050
  {
@@ -9915,22 +10055,22 @@ function SaveAgentForm({
9915
10055
  }
9916
10056
  ) : null
9917
10057
  ] }),
9918
- /* @__PURE__ */ jsxs69("div", { className: "bg-card-bg sticky bottom-0 z-10 flex shrink-0 justify-end gap-2 border-t border-border px-5 py-4", children: [
10058
+ /* @__PURE__ */ jsxs70("div", { className: "bg-card-bg sticky bottom-0 z-10 flex shrink-0 justify-end gap-2 border-t border-border px-5 py-4", children: [
9919
10059
  /* @__PURE__ */ jsx98(Button.Secondary, { type: "button", disabled: saving, onClick: onCancel, children: "Cancel" }),
9920
- /* @__PURE__ */ jsx98(Button.Primary, { type: "button", disabled: saving || !name.trim() || !spec.model.name.trim(), onClick: onSave, children: saving ? "Saving\u2026" : "Save changes" })
10060
+ /* @__PURE__ */ jsx98(Button.Primary, { type: "button", disabled: saving || !canSave, onClick: onSave, children: saving ? "Saving\u2026" : "Save changes" })
9921
10061
  ] })
9922
10062
  ] });
9923
10063
  }
9924
10064
 
9925
10065
  // src/atoms/SchedulesButton.tsx
9926
- import { Fragment as Fragment17, jsx as jsx99, jsxs as jsxs70 } from "react/jsx-runtime";
10066
+ import { Fragment as Fragment17, jsx as jsx99, jsxs as jsxs71 } from "react/jsx-runtime";
9927
10067
  function SchedulesButton({ className, compact = false }) {
9928
10068
  const shell = useOptionalShellMode();
9929
10069
  const scheduleServer = useOptionalScheduleServer();
9930
10070
  const enabled = isSchedulesChromeEnabled({ schedules: scheduleServer }) && shell != null;
9931
10071
  const open = shell?.schedulesOpen === true;
9932
10072
  if (!enabled) return null;
9933
- return /* @__PURE__ */ jsx99("div", { className: cn("relative min-w-0", compact ? "flex justify-center" : "w-full", className), children: /* @__PURE__ */ jsxs70(
10073
+ return /* @__PURE__ */ jsx99("div", { className: cn("relative min-w-0", compact ? "flex justify-center" : "w-full", className), children: /* @__PURE__ */ jsxs71(
9934
10074
  "button",
9935
10075
  {
9936
10076
  type: "button",
@@ -9949,7 +10089,7 @@ function SchedulesButton({ className, compact = false }) {
9949
10089
  onClick: () => shell.setSchedulesOpen(!open),
9950
10090
  children: [
9951
10091
  /* @__PURE__ */ jsx99(Icon, { name: "calendar-clock", size: compact ? 14 : void 0 }),
9952
- compact ? /* @__PURE__ */ jsx99("span", { className: "text-center", children: "Schedules" }) : /* @__PURE__ */ jsxs70(Fragment17, { children: [
10092
+ compact ? /* @__PURE__ */ jsx99("span", { className: "text-center", children: "Schedules" }) : /* @__PURE__ */ jsxs71(Fragment17, { children: [
9953
10093
  /* @__PURE__ */ jsx99("span", { className: "truncate", children: "Schedules" }),
9954
10094
  /* @__PURE__ */ jsx99(Icon, { name: "chevron-right", className: "ml-auto size-3.5 shrink-0 opacity-60" })
9955
10095
  ] })
@@ -9988,12 +10128,12 @@ var ScrollToBottomButton = forwardRef2(
9988
10128
  ScrollToBottomButton.displayName = "ScrollToBottomButton";
9989
10129
 
9990
10130
  // src/atoms/SelectAgentEmptyState.tsx
9991
- import { jsx as jsx101, jsxs as jsxs71 } from "react/jsx-runtime";
10131
+ import { jsx as jsx101, jsxs as jsxs72 } from "react/jsx-runtime";
9992
10132
  function SelectAgentEmptyState() {
9993
10133
  const shell = useOptionalShellMode();
9994
10134
  const AgentsLibraryButton2 = useSlot("AgentsLibraryButton");
9995
10135
  if (shell?.mode.status !== "idle") return null;
9996
- return /* @__PURE__ */ jsxs71(
10136
+ return /* @__PURE__ */ jsxs72(
9997
10137
  "div",
9998
10138
  {
9999
10139
  className: "flex h-full min-h-0 w-full flex-col items-center justify-center gap-4 px-6",
@@ -10007,7 +10147,7 @@ function SelectAgentEmptyState() {
10007
10147
  }
10008
10148
 
10009
10149
  // src/atoms/SessionsBrowserButton.tsx
10010
- import { Fragment as Fragment18, jsx as jsx102, jsxs as jsxs72 } from "react/jsx-runtime";
10150
+ import { Fragment as Fragment18, jsx as jsx102, jsxs as jsxs73 } from "react/jsx-runtime";
10011
10151
  function SessionsBrowserButton({ className, compact = false }) {
10012
10152
  const sessionsServer = useOptionalAgentSessionsServer();
10013
10153
  const shell = useOptionalShellMode();
@@ -10015,7 +10155,7 @@ function SessionsBrowserButton({ className, compact = false }) {
10015
10155
  const sessionsOpen = shell?.sessionsOpen === true;
10016
10156
  const enabled = isSessionsChromeEnabled({ sessions: sessionsServer }) && shell != null;
10017
10157
  if (!enabled) return null;
10018
- return /* @__PURE__ */ jsx102("div", { className: cn("relative min-w-0", compact ? "flex justify-center" : "w-full", className), children: /* @__PURE__ */ jsxs72(
10158
+ return /* @__PURE__ */ jsx102("div", { className: cn("relative min-w-0", compact ? "flex justify-center" : "w-full", className), children: /* @__PURE__ */ jsxs73(
10019
10159
  "button",
10020
10160
  {
10021
10161
  type: "button",
@@ -10045,7 +10185,7 @@ function SessionsBrowserButton({ className, compact = false }) {
10045
10185
  },
10046
10186
  children: [
10047
10187
  /* @__PURE__ */ jsx102(Icon, { name: "message-square-text", size: compact ? 14 : void 0 }),
10048
- compact ? /* @__PURE__ */ jsx102("span", { className: "text-center", children: "Sessions" }) : /* @__PURE__ */ jsxs72(Fragment18, { children: [
10188
+ compact ? /* @__PURE__ */ jsx102("span", { className: "text-center", children: "Sessions" }) : /* @__PURE__ */ jsxs73(Fragment18, { children: [
10049
10189
  /* @__PURE__ */ jsx102("span", { className: "truncate", children: "Sessions" }),
10050
10190
  /* @__PURE__ */ jsx102(Icon, { name: "chevron-right", className: "ml-auto size-3.5 shrink-0 opacity-60" })
10051
10191
  ] })
@@ -10060,9 +10200,9 @@ function ShellActionsActionSlot() {
10060
10200
  }
10061
10201
 
10062
10202
  // src/atoms/Skeletons.tsx
10063
- import { jsx as jsx103, jsxs as jsxs73 } from "react/jsx-runtime";
10203
+ import { jsx as jsx103, jsxs as jsxs74 } from "react/jsx-runtime";
10064
10204
  function MessageListSkeleton({ className }) {
10065
- return /* @__PURE__ */ jsxs73(
10205
+ return /* @__PURE__ */ jsxs74(
10066
10206
  "div",
10067
10207
  {
10068
10208
  role: "status",
@@ -10071,7 +10211,7 @@ function MessageListSkeleton({ className }) {
10071
10211
  className: cn("mb-14 flex flex-col gap-y-6", className),
10072
10212
  children: [
10073
10213
  /* @__PURE__ */ jsx103("div", { className: "flex justify-end", children: /* @__PURE__ */ jsx103(Skeleton, { className: "h-10 w-[min(85%,20rem)] rounded-xl" }) }),
10074
- /* @__PURE__ */ jsxs73("div", { className: "flex flex-col gap-2 px-2", children: [
10214
+ /* @__PURE__ */ jsxs74("div", { className: "flex flex-col gap-2 px-2", children: [
10075
10215
  /* @__PURE__ */ jsx103(Skeleton, { className: "h-4 w-full max-w-md" }),
10076
10216
  /* @__PURE__ */ jsx103(Skeleton, { className: "h-4 w-full max-w-sm" }),
10077
10217
  /* @__PURE__ */ jsx103(Skeleton, { className: "h-4 w-2/3 max-w-xs" })
@@ -10082,7 +10222,7 @@ function MessageListSkeleton({ className }) {
10082
10222
  }
10083
10223
 
10084
10224
  // src/atoms/SubAgentCard.tsx
10085
- import { jsx as jsx104, jsxs as jsxs74 } from "react/jsx-runtime";
10225
+ import { jsx as jsx104, jsxs as jsxs75 } from "react/jsx-runtime";
10086
10226
  function SubAgentCard({
10087
10227
  agentName,
10088
10228
  instruction,
@@ -10104,7 +10244,7 @@ function SubAgentCard({
10104
10244
  {
10105
10245
  className: cn("aui-sub-agent-card min-w-0", className),
10106
10246
  "data-testid": dataTestPrefix ? `${dataTestPrefix}-sub-agent-card` : void 0,
10107
- children: /* @__PURE__ */ jsxs74(
10247
+ children: /* @__PURE__ */ jsxs75(
10108
10248
  AgentStepRow,
10109
10249
  {
10110
10250
  icon: "agent-2",
@@ -10117,7 +10257,7 @@ function SubAgentCard({
10117
10257
  statusText: durationText,
10118
10258
  dataTestPrefix,
10119
10259
  children: [
10120
- instructionContent != null && /* @__PURE__ */ jsxs74("div", { className: "mb-3 flex flex-col gap-2 rounded-md border border-border p-2", children: [
10260
+ instructionContent != null && /* @__PURE__ */ jsxs75("div", { className: "mb-3 flex flex-col gap-2 rounded-md border border-border p-2", children: [
10121
10261
  /* @__PURE__ */ jsx104("h4", { className: "text-sm font-semibold text-text-primary", children: "Instructions" }),
10122
10262
  /* @__PURE__ */ jsx104(
10123
10263
  "div",
@@ -11150,7 +11290,7 @@ var one_light_default = {
11150
11290
  };
11151
11291
 
11152
11292
  // src/atoms/SyntaxHighlighter.tsx
11153
- import { jsx as jsx105, jsxs as jsxs75 } from "react/jsx-runtime";
11293
+ import { jsx as jsx105, jsxs as jsxs76 } from "react/jsx-runtime";
11154
11294
  function stripTrailingNewline(code) {
11155
11295
  return code.endsWith("\n") ? code.slice(0, -1) : code;
11156
11296
  }
@@ -11174,7 +11314,7 @@ function SyntaxHighlighterImpl({ code, language, darkTheme, className, showLineN
11174
11314
  setTimeout(() => setCopied(false), 2e3);
11175
11315
  });
11176
11316
  }, [code]);
11177
- return /* @__PURE__ */ jsxs75(
11317
+ return /* @__PURE__ */ jsxs76(
11178
11318
  "div",
11179
11319
  {
11180
11320
  className: cn(
@@ -11236,7 +11376,7 @@ function SyntaxHighlighterImpl({ code, language, darkTheme, className, showLineN
11236
11376
  var SyntaxHighlighter = memo(SyntaxHighlighterImpl);
11237
11377
 
11238
11378
  // src/atoms/ThreadListMisc.tsx
11239
- import { Fragment as Fragment19, jsx as jsx106, jsxs as jsxs76 } from "react/jsx-runtime";
11379
+ import { Fragment as Fragment19, jsx as jsx106, jsxs as jsxs77 } from "react/jsx-runtime";
11240
11380
  function ThreadListNewButton({ className, children, style, ...rest }) {
11241
11381
  return /* @__PURE__ */ jsx106(
11242
11382
  "button",
@@ -11252,7 +11392,7 @@ function ThreadListNewButton({ className, children, style, ...rest }) {
11252
11392
  )
11253
11393
  }),
11254
11394
  ...rest,
11255
- children: children ?? /* @__PURE__ */ jsxs76(Fragment19, { children: [
11395
+ children: children ?? /* @__PURE__ */ jsxs77(Fragment19, { children: [
11256
11396
  /* @__PURE__ */ jsx106(Icon, { name: "square-pen" }),
11257
11397
  "New Chat"
11258
11398
  ] })
@@ -11272,14 +11412,14 @@ function ThreadListEmptyState({ message = "No threads yet", className }) {
11272
11412
  );
11273
11413
  }
11274
11414
  function ThreadListShell({ header, children, className }) {
11275
- return /* @__PURE__ */ jsxs76("div", { className: cn("font-sans-flex flex h-full min-h-0 flex-1 flex-col overflow-hidden", className), children: [
11415
+ return /* @__PURE__ */ jsxs77("div", { className: cn("font-sans-flex flex h-full min-h-0 flex-1 flex-col overflow-hidden", className), children: [
11276
11416
  header != null ? /* @__PURE__ */ jsx106("div", { className: "shrink-0 border-b border-border px-2 py-2", children: header }) : null,
11277
11417
  /* @__PURE__ */ jsx106("div", { className: "flex min-h-0 flex-1 flex-col overflow-hidden p-2", children })
11278
11418
  ] });
11279
11419
  }
11280
11420
 
11281
11421
  // src/atoms/ThreadListRow.tsx
11282
- import { jsx as jsx107, jsxs as jsxs77 } from "react/jsx-runtime";
11422
+ import { jsx as jsx107, jsxs as jsxs78 } from "react/jsx-runtime";
11283
11423
  function ThreadListRow({
11284
11424
  title,
11285
11425
  active,
@@ -11291,13 +11431,13 @@ function ThreadListRow({
11291
11431
  }) {
11292
11432
  const relative = lastMessageAt != null ? formatRelativeShort(lastMessageAt) : void 0;
11293
11433
  const hasTrailing = relative != null || actions != null;
11294
- return /* @__PURE__ */ jsxs77(
11434
+ return /* @__PURE__ */ jsxs78(
11295
11435
  "div",
11296
11436
  {
11297
11437
  "data-slot": "aui_thread-list-item",
11298
11438
  "data-active": active || void 0,
11299
11439
  className: cn(
11300
- "group flex min-w-0 items-center gap-0.5 rounded-[0.75rem] transition-colors",
11440
+ "group flex min-w-0 items-center gap-0.5 rounded-[0.5rem] transition-colors",
11301
11441
  active ? "bg-dropdown-selected-item-bg text-dropdown-selected-item-text" : "text-text-secondary hover:bg-ghost-button-hover hover:text-text-primary",
11302
11442
  className
11303
11443
  ),
@@ -11316,16 +11456,16 @@ function ThreadListRow({
11316
11456
  active ? "text-dropdown-selected-item-text" : "text-inherit"
11317
11457
  )
11318
11458
  }),
11319
- children: /* @__PURE__ */ jsxs77("span", { className: "min-w-0 flex-1", children: [
11320
- /* @__PURE__ */ jsx107("span", { className: "block truncate text-sm font-medium text-text-primary", children: title }),
11321
- agentName != null ? /* @__PURE__ */ jsxs77("span", { className: "mt-0.5 flex min-w-0 items-center gap-1 text-xs text-text-secondary", children: [
11322
- /* @__PURE__ */ jsx107(Icon, { name: "agent-2", className: "size-3 shrink-0" }),
11459
+ children: /* @__PURE__ */ jsxs78("span", { className: "min-w-0 flex-1", children: [
11460
+ /* @__PURE__ */ jsx107("span", { className: "block truncate text-sm font-normal text-text-primary", children: title }),
11461
+ agentName != null ? /* @__PURE__ */ jsxs78("span", { className: "mt-0.5 flex min-w-0 items-center gap-1 text-[0.75rem] text-text-secondary", children: [
11462
+ /* @__PURE__ */ jsx107(Icon, { name: "bot", className: "shrink-0" }),
11323
11463
  /* @__PURE__ */ jsx107("span", { className: "truncate", children: agentName })
11324
11464
  ] }) : null
11325
11465
  ] })
11326
11466
  }
11327
11467
  ),
11328
- hasTrailing ? /* @__PURE__ */ jsxs77("div", { className: "relative mr-1 flex size-7 shrink-0 items-center justify-center", children: [
11468
+ hasTrailing ? /* @__PURE__ */ jsxs78("div", { className: "relative mr-1 flex size-7 shrink-0 items-center justify-center", children: [
11329
11469
  relative != null ? /* @__PURE__ */ jsx107(
11330
11470
  "span",
11331
11471
  {
@@ -11433,7 +11573,7 @@ MessageGroup.displayName = "MessageGroup";
11433
11573
  // src/atoms/Toast.tsx
11434
11574
  import { useCallback as useCallback15, useState as useState38 } from "react";
11435
11575
  import { createPortal as createPortal4 } from "react-dom";
11436
- import { jsx as jsx109, jsxs as jsxs78 } from "react/jsx-runtime";
11576
+ import { jsx as jsx109, jsxs as jsxs79 } from "react/jsx-runtime";
11437
11577
  function Toast({ title, description, open, onOpenChange, variant = "error", className }) {
11438
11578
  const [copied, setCopied] = useState38(false);
11439
11579
  const handleCopy = useCallback15(async () => {
@@ -11447,7 +11587,7 @@ ${description}`;
11447
11587
  }
11448
11588
  }, [title, description]);
11449
11589
  if (!open) return null;
11450
- return /* @__PURE__ */ jsxs78(
11590
+ return /* @__PURE__ */ jsxs79(
11451
11591
  "div",
11452
11592
  {
11453
11593
  role: "alert",
@@ -11465,8 +11605,8 @@ ${description}`;
11465
11605
  className: cn("shrink-0", variant === "success" ? "text-success-bg" : "text-failure-bg")
11466
11606
  }
11467
11607
  ),
11468
- /* @__PURE__ */ jsxs78("div", { className: "min-w-0 flex-1", children: [
11469
- /* @__PURE__ */ jsxs78("div", { className: "flex items-start justify-between gap-2", children: [
11608
+ /* @__PURE__ */ jsxs79("div", { className: "min-w-0 flex-1", children: [
11609
+ /* @__PURE__ */ jsxs79("div", { className: "flex items-start justify-between gap-2", children: [
11470
11610
  /* @__PURE__ */ jsx109(
11471
11611
  "div",
11472
11612
  {
@@ -11477,7 +11617,7 @@ ${description}`;
11477
11617
  children: title
11478
11618
  }
11479
11619
  ),
11480
- /* @__PURE__ */ jsxs78("div", { className: "flex shrink-0 items-center gap-1", children: [
11620
+ /* @__PURE__ */ jsxs79("div", { className: "flex shrink-0 items-center gap-1", children: [
11481
11621
  variant === "error" ? /* @__PURE__ */ jsx109(
11482
11622
  "button",
11483
11623
  {
@@ -11534,7 +11674,7 @@ function ToastStack({ children, duration: _duration = Number.POSITIVE_INFINITY }
11534
11674
  }
11535
11675
 
11536
11676
  // src/atoms/ToolApprovalBar.tsx
11537
- import { jsx as jsx110, jsxs as jsxs79 } from "react/jsx-runtime";
11677
+ import { jsx as jsx110, jsxs as jsxs80 } from "react/jsx-runtime";
11538
11678
  var DEFAULT_APPROVE_OPTIONS = [{ id: "approve", label: "Approve", variant: "primary" }];
11539
11679
  var DEFAULT_DENY_OPTIONS = [
11540
11680
  { id: "deny", label: "Deny", variant: "secondary", requiresReason: true }
@@ -11567,22 +11707,22 @@ function ToolApprovalBar({
11567
11707
  const isDenied = status?.type === "denied";
11568
11708
  const interactionsLocked = disabled && !isDecided;
11569
11709
  const headingText = isApproved ? "Tool Approved" : isDenied ? "Tool Approval Denied" : "Tool Approval Required for";
11570
- return /* @__PURE__ */ jsxs79(
11710
+ return /* @__PURE__ */ jsxs80(
11571
11711
  "div",
11572
11712
  {
11573
11713
  className: cn("aui-tool-approval-bar", className),
11574
11714
  "data-testid": dataTestPrefix ? `${dataTestPrefix}-approval` : void 0,
11575
11715
  children: [
11576
- /* @__PURE__ */ jsxs79("div", { className: "flex gap-2", children: [
11577
- /* @__PURE__ */ jsxs79("div", { className: cn("flex shrink-0 flex-col items-center", !showLineBelow && "pb-1"), children: [
11716
+ /* @__PURE__ */ jsxs80("div", { className: "flex gap-2", children: [
11717
+ /* @__PURE__ */ jsxs80("div", { className: cn("flex shrink-0 flex-col items-center", !showLineBelow && "pb-1"), children: [
11578
11718
  /* @__PURE__ */ jsx110("div", { className: "min-h-[0.75rem] w-px flex-1 bg-border" }),
11579
11719
  /* @__PURE__ */ jsx110(StepIconBox, { icon: "wrench", variant: "muted", iconSize: "0.875em", className: "my-1" }),
11580
11720
  showLineBelow && /* @__PURE__ */ jsx110("div", { className: "min-h-[0.75rem] w-px flex-1 bg-border" })
11581
11721
  ] }),
11582
- /* @__PURE__ */ jsxs79("div", { className: "mt-2 flex flex-1 items-center justify-between", children: [
11583
- /* @__PURE__ */ jsxs79("div", { className: "flex w-full items-center justify-between gap-2", children: [
11584
- /* @__PURE__ */ jsxs79("div", { className: "flex items-center gap-2", children: [
11585
- /* @__PURE__ */ jsxs79("span", { className: "inline-flex flex-wrap items-center gap-1 font-sans text-xs font-medium leading-4 text-text-primary", children: [
11722
+ /* @__PURE__ */ jsxs80("div", { className: "mt-2 flex flex-1 items-center justify-between", children: [
11723
+ /* @__PURE__ */ jsxs80("div", { className: "flex w-full items-center justify-between gap-2", children: [
11724
+ /* @__PURE__ */ jsxs80("div", { className: "flex items-center gap-2", children: [
11725
+ /* @__PURE__ */ jsxs80("span", { className: "inline-flex flex-wrap items-center gap-1 font-sans text-xs font-medium leading-4 text-text-primary", children: [
11586
11726
  headingText,
11587
11727
  /* @__PURE__ */ jsx110("span", { className: "rounded bg-secondary-bg px-1.5 py-0.5 text-xs text-text-secondary", children: toolName })
11588
11728
  ] }),
@@ -11597,8 +11737,8 @@ function ToolApprovalBar({
11597
11737
  ] }),
11598
11738
  !isDecided && !readOnly && selectedDenyOption && /* @__PURE__ */ jsx110(Button.Secondary, { size: "small", disabled: interactionsLocked, onClick: () => onDenyOptionChange?.(null), children: "Back" })
11599
11739
  ] }),
11600
- !isDecided && !readOnly && !selectedDenyOption && /* @__PURE__ */ jsxs79("div", { className: "flex gap-2", children: [
11601
- approveOptions.map((option) => /* @__PURE__ */ jsxs79(
11740
+ !isDecided && !readOnly && !selectedDenyOption && /* @__PURE__ */ jsxs80("div", { className: "flex gap-2", children: [
11741
+ approveOptions.map((option) => /* @__PURE__ */ jsxs80(
11602
11742
  Button,
11603
11743
  {
11604
11744
  size: "small",
@@ -11632,16 +11772,16 @@ function ToolApprovalBar({
11632
11772
  ] })
11633
11773
  ] })
11634
11774
  ] }),
11635
- !isDecided && !readOnly && selectedDenyOption && /* @__PURE__ */ jsxs79("div", { className: "flex flex-col gap-1 pl-8 pt-3", children: [
11636
- (selectedDenyOption.confirm?.title || selectedDenyOption.confirm?.description) && /* @__PURE__ */ jsxs79("div", { className: "flex flex-col gap-0.5", children: [
11775
+ !isDecided && !readOnly && selectedDenyOption && /* @__PURE__ */ jsxs80("div", { className: "flex flex-col gap-1 pl-8 pt-3", children: [
11776
+ (selectedDenyOption.confirm?.title || selectedDenyOption.confirm?.description) && /* @__PURE__ */ jsxs80("div", { className: "flex flex-col gap-0.5", children: [
11637
11777
  selectedDenyOption.confirm.title && /* @__PURE__ */ jsx110("span", { className: "text-xs font-medium text-text-primary", children: selectedDenyOption.confirm.title }),
11638
11778
  selectedDenyOption.confirm.description && /* @__PURE__ */ jsx110("span", { className: "text-xs text-text-secondary", children: selectedDenyOption.confirm.description })
11639
11779
  ] }),
11640
- selectedDenyOption.grants && selectedDenyOption.grants.length > 0 && /* @__PURE__ */ jsxs79("div", { className: "flex flex-wrap items-center gap-1", children: [
11780
+ selectedDenyOption.grants && selectedDenyOption.grants.length > 0 && /* @__PURE__ */ jsxs80("div", { className: "flex flex-wrap items-center gap-1", children: [
11641
11781
  /* @__PURE__ */ jsx110("span", { className: "text-xs text-text-secondary", children: "Grants:" }),
11642
11782
  selectedDenyOption.grants.map((grant) => /* @__PURE__ */ jsx110("span", { className: "rounded bg-secondary-bg px-1.5 py-0.5 text-xs text-text-secondary", children: grant }, grant))
11643
11783
  ] }),
11644
- /* @__PURE__ */ jsxs79("div", { className: "flex items-center gap-2", children: [
11784
+ /* @__PURE__ */ jsxs80("div", { className: "flex items-center gap-2", children: [
11645
11785
  /* @__PURE__ */ jsx110(
11646
11786
  "input",
11647
11787
  {
@@ -11662,7 +11802,7 @@ function ToolApprovalBar({
11662
11802
  ] }),
11663
11803
  showReasonError && /* @__PURE__ */ jsx110("span", { id: "aui-denial-reason-error", className: "text-xs text-failure-bg", role: "alert", children: "Reason is required" })
11664
11804
  ] }),
11665
- isDecided && status?.reason && /* @__PURE__ */ jsx110("div", { className: "pl-8 pt-2", children: /* @__PURE__ */ jsxs79("span", { className: "text-xs text-text-secondary", children: [
11805
+ isDecided && status?.reason && /* @__PURE__ */ jsx110("div", { className: "pl-8 pt-2", children: /* @__PURE__ */ jsxs80("span", { className: "text-xs text-text-secondary", children: [
11666
11806
  "Reason: ",
11667
11807
  status.reason
11668
11808
  ] }) })
@@ -12002,7 +12142,7 @@ function useRegisterApprovalExpand(toolCallId, expand) {
12002
12142
  }
12003
12143
 
12004
12144
  // src/atoms/ToolCallCard.tsx
12005
- import { Fragment as Fragment20, jsx as jsx112, jsxs as jsxs80 } from "react/jsx-runtime";
12145
+ import { Fragment as Fragment20, jsx as jsx112, jsxs as jsxs81 } from "react/jsx-runtime";
12006
12146
  var DEFAULT_AWAITING_TEXT = "Awaiting Response...";
12007
12147
  function ToolCallCard({
12008
12148
  icon = "mcp-server",
@@ -12074,7 +12214,7 @@ function ToolCallCard({
12074
12214
  showContentConnector: true,
12075
12215
  showPersistentContentConnector: !hasApproval,
12076
12216
  dataTestPrefix: dataTestPrefix ? `${dataTestPrefix}-header` : void 0,
12077
- persistentChildren: /* @__PURE__ */ jsxs80(Fragment20, { children: [
12217
+ persistentChildren: /* @__PURE__ */ jsxs81(Fragment20, { children: [
12078
12218
  approvalSlot,
12079
12219
  expanded && showResponseLine && responseSlot && /* @__PURE__ */ jsx112("div", { "data-testid": dataTestPrefix ? `${dataTestPrefix}-response` : void 0, children: responseSlot })
12080
12220
  ] }),
@@ -12087,7 +12227,7 @@ function ToolCallCard({
12087
12227
 
12088
12228
  // src/atoms/ToolCallContentBlock.tsx
12089
12229
  import { useState as useState40 } from "react";
12090
- import { jsx as jsx113, jsxs as jsxs81 } from "react/jsx-runtime";
12230
+ import { jsx as jsx113, jsxs as jsxs82 } from "react/jsx-runtime";
12091
12231
  function JsonEditor({
12092
12232
  content,
12093
12233
  height,
@@ -12150,7 +12290,7 @@ function ToolCallContentBlock({
12150
12290
  } : {
12151
12291
  padding: "0.25rem"
12152
12292
  };
12153
- return /* @__PURE__ */ jsxs81(
12293
+ return /* @__PURE__ */ jsxs82(
12154
12294
  "div",
12155
12295
  {
12156
12296
  className: cn(
@@ -12160,9 +12300,9 @@ function ToolCallContentBlock({
12160
12300
  "data-testid": dataTestPrefix ? `${dataTestPrefix}-content-block` : "tfy-tool-call-content-block",
12161
12301
  "data-content": content,
12162
12302
  children: [
12163
- /* @__PURE__ */ jsxs81("div", { className: "flex items-center justify-between rounded-t-lg border border-primary-button-bg/30 bg-primary-button-bg/10 px-3 py-1", children: [
12303
+ /* @__PURE__ */ jsxs82("div", { className: "flex items-center justify-between rounded-t-lg border border-primary-button-bg/30 bg-primary-button-bg/10 px-3 py-1", children: [
12164
12304
  /* @__PURE__ */ jsx113("div", { className: "font-sans text-xs font-medium text-primary-button-bg", children: title }),
12165
- /* @__PURE__ */ jsxs81("div", { className: "flex items-center gap-1", children: [
12305
+ /* @__PURE__ */ jsxs82("div", { className: "flex items-center gap-1", children: [
12166
12306
  /* @__PURE__ */ jsx113(
12167
12307
  "button",
12168
12308
  {
@@ -12214,8 +12354,8 @@ function ToolCallContentBlock({
12214
12354
  )
12215
12355
  }
12216
12356
  ),
12217
- fullscreen && /* @__PURE__ */ jsx113(Dialog, { open: true, onOpenChange: (open) => onFullscreenChange?.(open), children: /* @__PURE__ */ jsxs81(DialogContent, { className: "flex h-[80vh] max-w-4xl flex-col", children: [
12218
- /* @__PURE__ */ jsxs81(DialogHeader, { className: "flex flex-row items-center justify-between gap-2", children: [
12357
+ fullscreen && /* @__PURE__ */ jsx113(Dialog, { open: true, onOpenChange: (open) => onFullscreenChange?.(open), children: /* @__PURE__ */ jsxs82(DialogContent, { className: "flex h-[80vh] max-w-4xl flex-col", children: [
12358
+ /* @__PURE__ */ jsxs82(DialogHeader, { className: "flex flex-row items-center justify-between gap-2", children: [
12219
12359
  /* @__PURE__ */ jsx113(DialogTitle, { children: title }),
12220
12360
  /* @__PURE__ */ jsx113(IconButton, { variant: "ghost", onClick: () => onFullscreenChange?.(false), "aria-label": "Minimize", children: /* @__PURE__ */ jsx113(Icon, { name: "compress", size: "0.875em" }) })
12221
12361
  ] }),
@@ -12227,7 +12367,7 @@ function ToolCallContentBlock({
12227
12367
  }
12228
12368
 
12229
12369
  // src/atoms/ToolGroupCard.tsx
12230
- import { jsx as jsx114, jsxs as jsxs82 } from "react/jsx-runtime";
12370
+ import { jsx as jsx114, jsxs as jsxs83 } from "react/jsx-runtime";
12231
12371
  function ToolGroupCard({
12232
12372
  toolCallCount,
12233
12373
  expanded,
@@ -12240,7 +12380,7 @@ function ToolGroupCard({
12240
12380
  const AccordionSummary2 = useSlot("AccordionSummary");
12241
12381
  const AccordionDetails2 = useSlot("AccordionDetails");
12242
12382
  const label = `${toolCallCount} tool ${toolCallCount === 1 ? "call" : "calls"}`;
12243
- return /* @__PURE__ */ jsxs82(
12383
+ return /* @__PURE__ */ jsxs83(
12244
12384
  Accordion2,
12245
12385
  {
12246
12386
  "data-slot": "tool-group-card",
@@ -12262,7 +12402,7 @@ function ToolGroupCard({
12262
12402
  "&:hover": { backgroundColor: "transparent" },
12263
12403
  "& .MuiAccordionSummary-content": { margin: 0, width: "100%" }
12264
12404
  },
12265
- children: /* @__PURE__ */ jsxs82("div", { className: "text-text-secondary hover:text-text-primary flex origin-left items-center gap-2 py-1.5 text-sm transition-[color,scale] active:scale-[0.98]", children: [
12405
+ children: /* @__PURE__ */ jsxs83("div", { className: "text-text-secondary hover:text-text-primary flex origin-left items-center gap-2 py-1.5 text-sm transition-[color,scale] active:scale-[0.98]", children: [
12266
12406
  active && /* @__PURE__ */ jsx114(Icon, { name: "loader", className: "size-3 shrink-0 animate-spin [animation-duration:0.6s]" }),
12267
12407
  /* @__PURE__ */ jsx114("span", { className: "text-xs font-medium", children: label }),
12268
12408
  /* @__PURE__ */ jsx114(
@@ -12285,7 +12425,7 @@ function ToolGroupCard({
12285
12425
  }
12286
12426
 
12287
12427
  // src/atoms/UserMessageActionBar.tsx
12288
- import { jsx as jsx115, jsxs as jsxs83 } from "react/jsx-runtime";
12428
+ import { jsx as jsx115, jsxs as jsxs84 } from "react/jsx-runtime";
12289
12429
  var actionBtnClass2 = "h-6 w-6 text-text-secondary hover:text-text-primary [&_svg]:size-3.5";
12290
12430
  function UserMessageActionBar({
12291
12431
  isCopied,
@@ -12298,7 +12438,7 @@ function UserMessageActionBar({
12298
12438
  className
12299
12439
  }) {
12300
12440
  const MessageTimestamp2 = useSlot("MessageTimestamp");
12301
- return /* @__PURE__ */ jsxs83("div", { className: cn("aui-user-action-bar-root animate-in fade-in flex items-center gap-1 duration-200", className), children: [
12441
+ return /* @__PURE__ */ jsxs84("div", { className: cn("aui-user-action-bar-root animate-in fade-in flex items-center gap-1 duration-200", className), children: [
12302
12442
  /* @__PURE__ */ jsx115(MessageTimestamp2, { createdAt, className: "mr-1" }),
12303
12443
  /* @__PURE__ */ jsx115(
12304
12444
  IconButton,
@@ -12329,9 +12469,9 @@ function UserMessageActionBar({
12329
12469
  }
12330
12470
 
12331
12471
  // src/atoms/UserMessageBubble.tsx
12332
- import { jsx as jsx116, jsxs as jsxs84 } from "react/jsx-runtime";
12472
+ import { jsx as jsx116, jsxs as jsxs85 } from "react/jsx-runtime";
12333
12473
  function UserMessageBubble({ text, attachments, editAction, className }) {
12334
- return /* @__PURE__ */ jsxs84(
12474
+ return /* @__PURE__ */ jsxs85(
12335
12475
  "div",
12336
12476
  {
12337
12477
  "data-slot": "aui_user-message-root",
@@ -12355,10 +12495,10 @@ function UserMessageBubble({ text, attachments, editAction, className }) {
12355
12495
 
12356
12496
  // src/atoms/UserMessageEdit.tsx
12357
12497
  import { forwardRef as forwardRef4 } from "react";
12358
- import { jsx as jsx117, jsxs as jsxs85 } from "react/jsx-runtime";
12498
+ import { jsx as jsx117, jsxs as jsxs86 } from "react/jsx-runtime";
12359
12499
  var UserMessageEdit = forwardRef4(
12360
12500
  function UserMessageEdit2({ timestamp, attachments, input, footer, className, ...rest }, ref) {
12361
- return /* @__PURE__ */ jsxs85(
12501
+ return /* @__PURE__ */ jsxs86(
12362
12502
  "div",
12363
12503
  {
12364
12504
  ref,
@@ -12366,7 +12506,7 @@ var UserMessageEdit = forwardRef4(
12366
12506
  className: cn("flex flex-col gap-2 w-full", className),
12367
12507
  ...rest,
12368
12508
  children: [
12369
- (timestamp || attachments) && /* @__PURE__ */ jsxs85("div", { className: "flex items-center gap-2 text-sm text-text-secondary", children: [
12509
+ (timestamp || attachments) && /* @__PURE__ */ jsxs86("div", { className: "flex items-center gap-2 text-sm text-text-secondary", children: [
12370
12510
  /* @__PURE__ */ jsx117("span", { className: "font-medium text-text-primary", children: "User" }),
12371
12511
  timestamp
12372
12512
  ] }),
@@ -12380,12 +12520,12 @@ var UserMessageEdit = forwardRef4(
12380
12520
  );
12381
12521
 
12382
12522
  // src/atoms/WelcomeScreen.tsx
12383
- import { jsx as jsx118, jsxs as jsxs86 } from "react/jsx-runtime";
12523
+ import { jsx as jsx118, jsxs as jsxs87 } from "react/jsx-runtime";
12384
12524
  function WelcomeScreen({ heading = "How can I help you today?", icon, className }) {
12385
12525
  const preset = useOptionalThemePreset();
12386
12526
  const BrandLogo2 = useSlot("BrandLogo");
12387
12527
  const resolvedIcon = icon !== void 0 ? icon : preset === "chatgpt" ? null : preset === "claude" ? /* @__PURE__ */ jsx118(Icon, { name: "welcome-sparkle", className: "size-5 fill-current text-primary-button-bg" }) : /* @__PURE__ */ jsx118(BrandLogo2, { variant: "icon", className: "size-10" });
12388
- return /* @__PURE__ */ jsxs86(
12528
+ return /* @__PURE__ */ jsxs87(
12389
12529
  "div",
12390
12530
  {
12391
12531
  "data-preset": preset,
@@ -12432,18 +12572,17 @@ function WelcomeScreen({ heading = "How can I help you today?", icon, className
12432
12572
  // src/containers/AgentMetricsContainer.tsx
12433
12573
  import { useEffect as useEffect23, useState as useState41 } from "react";
12434
12574
  import { jsx as jsx119 } from "react/jsx-runtime";
12435
- var DEFAULT_METRICS_WINDOW_MS = 24 * 60 * 60 * 1e3;
12436
- function AgentMetricsContainer({ agentId }) {
12575
+ function AgentMetricsContainer({
12576
+ agentId,
12577
+ timeRange: controlledTimeRange,
12578
+ onTimeRangeChange,
12579
+ showTimeRangeFilter = true
12580
+ }) {
12437
12581
  const metricsServer = useAgentMetricsServer();
12438
12582
  const AgentMetricsView2 = useSlot("AgentMetricsView");
12439
- const [timeRange, setTimeRange] = useState41(() => {
12440
- const endTs = Date.now();
12441
- return {
12442
- startTs: endTs - DEFAULT_METRICS_WINDOW_MS,
12443
- endTs,
12444
- timeWindowMs: DEFAULT_METRICS_WINDOW_MS
12445
- };
12446
- });
12583
+ const [internalTimeRange, setInternalTimeRange] = useState41(defaultMetricsTimeRange);
12584
+ const timeRange = controlledTimeRange ?? internalTimeRange;
12585
+ const setTimeRange = onTimeRangeChange ?? setInternalTimeRange;
12447
12586
  const [definitions, setDefinitions] = useState41();
12448
12587
  const [chartsError, setChartsError] = useState41();
12449
12588
  const [meters, setMeters] = useState41();
@@ -12525,7 +12664,8 @@ function AgentMetricsContainer({ agentId }) {
12525
12664
  chartsLoading,
12526
12665
  chartsError,
12527
12666
  timeRange,
12528
- onTimeRangeChange: setTimeRange
12667
+ onTimeRangeChange: setTimeRange,
12668
+ showTimeRangeFilter
12529
12669
  }
12530
12670
  );
12531
12671
  }
@@ -14229,7 +14369,7 @@ function UserMessageContainer() {
14229
14369
  }
14230
14370
 
14231
14371
  // src/containers/AgentSessionTimelineContainer.tsx
14232
- import { Fragment as Fragment21, jsx as jsx132, jsxs as jsxs87 } from "react/jsx-runtime";
14372
+ import { Fragment as Fragment21, jsx as jsx132, jsxs as jsxs88 } from "react/jsx-runtime";
14233
14373
  var READ_ONLY_SLOT_OVERRIDES = {
14234
14374
  UserMessageActionBar: () => /* @__PURE__ */ jsx132(Fragment21, {}),
14235
14375
  MessageActionBar: () => /* @__PURE__ */ jsx132(Fragment21, {})
@@ -14343,8 +14483,8 @@ function AgentSessionTimelineContainer({ sessionId, events, listMetrics }) {
14343
14483
  if (messages.length === 0 && turnViews.length === 0) {
14344
14484
  return /* @__PURE__ */ jsx132("div", { className: "flex flex-1 items-center justify-center px-6 text-sm text-text-secondary", children: "This session has no messages yet." });
14345
14485
  }
14346
- return /* @__PURE__ */ jsxs87("div", { className: "flex min-h-0 flex-1 flex-col overflow-hidden", children: [
14347
- /* @__PURE__ */ jsxs87("div", { className: "shrink-0 border-b border-border", children: [
14486
+ return /* @__PURE__ */ jsxs88("div", { className: "flex min-h-0 flex-1 flex-col overflow-hidden", children: [
14487
+ /* @__PURE__ */ jsxs88("div", { className: "shrink-0 border-b border-border", children: [
14348
14488
  /* @__PURE__ */ jsx132(AgentSessionMetricsStrip2, { metrics: sessionMetrics }),
14349
14489
  /* @__PURE__ */ jsx132(Suspense3, { fallback: null, children: /* @__PURE__ */ jsx132(AgentSessionEventTimeline2, { turns: turnViews, segments: timelineSegments, onSelectTurn: handleSelectTurn }) })
14350
14490
  ] }),
@@ -14372,7 +14512,7 @@ function SessionTurnSection({
14372
14512
  if (!turn.showHeader && messages.length === 0) {
14373
14513
  return null;
14374
14514
  }
14375
- return /* @__PURE__ */ jsxs87("section", { ref: onMount, id: `session-turn-${turn.turnNumber}`, className: "flex flex-col gap-2", children: [
14515
+ return /* @__PURE__ */ jsxs88("section", { ref: onMount, id: `session-turn-${turn.turnNumber}`, className: "flex flex-col gap-2", children: [
14376
14516
  turn.showHeader ? /* @__PURE__ */ jsx132(
14377
14517
  AgentSessionTurnHeader2,
14378
14518
  {
@@ -14390,28 +14530,28 @@ function SessionTurnSection({
14390
14530
  }
14391
14531
 
14392
14532
  // src/theme/defaultSlots.ts
14393
- var AgentOverview = lazy(() => import("./AgentOverview-RLJ6HZCN.js"));
14533
+ var AgentOverview = lazy(() => import("./AgentOverview-UZBCVNMP.js"));
14394
14534
  var AgentSessions = lazy(async () => {
14395
- const mod = await import("./AgentSessions-UI3L7XY2.js");
14535
+ const mod = await import("./AgentSessions-CD7JAQTC.js");
14396
14536
  return { default: mod.AgentSessions };
14397
14537
  });
14398
14538
  var AgentCodeSnippets = lazy(
14399
- () => import("./AgentCodeSnippets-U6KQWVBJ.js")
14539
+ () => import("./AgentCodeSnippets-UWKIJI6U.js")
14400
14540
  );
14401
14541
  var SchedulesPage = lazy(async () => {
14402
- const mod = await import("./SchedulesPage-ARWU7BZF.js");
14542
+ const mod = await import("./SchedulesPage-ZG5IMQI3.js");
14403
14543
  return { default: mod.SchedulesPage };
14404
14544
  });
14405
14545
  var AgentSessionEventTimeline = lazy(async () => {
14406
- const mod = await import("./AgentSessionEventTimeline-CDXRRUZQ.js");
14546
+ const mod = await import("./AgentSessionEventTimeline-N4RXG2NU.js");
14407
14547
  return { default: mod.AgentSessionEventTimeline };
14408
14548
  });
14409
14549
  var AgentSessionEventTimelineChart = lazy(async () => {
14410
- const mod = await import("./AgentSessionEventTimelineChart-S2WX6ZEA.js");
14550
+ const mod = await import("./AgentSessionEventTimelineChart-EMWNJMMK.js");
14411
14551
  return { default: mod.AgentSessionEventTimelineChart };
14412
14552
  });
14413
14553
  var AgentMetricChart = lazy(async () => {
14414
- const mod = await import("./AgentMetricChart-3D6FUFO6.js");
14554
+ const mod = await import("./AgentMetricChart-4ZJJED5Q.js");
14415
14555
  return { default: mod.AgentMetricChart };
14416
14556
  });
14417
14557
  var defaultSlots = {
@@ -14633,6 +14773,9 @@ export {
14633
14773
  getSessionEventLabel,
14634
14774
  getSessionEventTooltipHeading,
14635
14775
  auiInputClass,
14776
+ auiSelectTriggerClass,
14777
+ auiSelectMenuClass,
14778
+ auiSelectOptionClass,
14636
14779
  PopoverSelect,
14637
14780
  AgentSessionsFilters,
14638
14781
  SessionsPage,
@@ -14781,4 +14924,4 @@ export {
14781
14924
  UserMessageContainer,
14782
14925
  defaultSlots
14783
14926
  };
14784
- //# sourceMappingURL=chunk-2OKGEU6X.js.map
14927
+ //# sourceMappingURL=chunk-DNOQ4WYH.js.map