@truefoundry/trueforge-ui 0.3.0-rc.1 → 0.3.0-rc.2

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 (92) hide show
  1. package/CHANGELOG.md +20 -0
  2. package/README.md +7 -0
  3. package/dist/{AgentCodeSnippets-NZOFJE57.js → AgentCodeSnippets-637HQUXD.js} +7 -7
  4. package/dist/AgentMetricChart-4FYECRIN.js +15 -0
  5. package/dist/{AgentOverview-EEBHJC32.js → AgentOverview-3FJ5EE6N.js} +7 -7
  6. package/dist/{AgentSessionEventTimeline-26Z6IB3B.js → AgentSessionEventTimeline-VELWUYPR.js} +18 -9
  7. package/dist/AgentSessionEventTimeline-VELWUYPR.js.map +1 -0
  8. package/dist/{AgentSessionEventTimelineChart-CGCU7WBK.js → AgentSessionEventTimelineChart-CUKETHWM.js} +140 -53
  9. package/dist/AgentSessionEventTimelineChart-CUKETHWM.js.map +1 -0
  10. package/dist/{AgentSessions-3MPDZASK.js → AgentSessions-T7MOGOTZ.js} +8 -8
  11. package/dist/{ConnectorSettings-MXFRWWR6.js → ConnectorSettings-ESZ2RSRG.js} +18 -22
  12. package/dist/ConnectorSettings-ESZ2RSRG.js.map +1 -0
  13. package/dist/{DockLayout-LM4AFMFY.js → DockLayout-NLFNU6F2.js} +10 -10
  14. package/dist/{DrawerLayout-JR3O6RRB.js → DrawerLayout-PR3SMKA6.js} +12 -12
  15. package/dist/DrawerLayout-PR3SMKA6.js.map +1 -0
  16. package/dist/{ModelSettings-G7IFNC2Y.js → ModelSettings-LYW64IRR.js} +19 -25
  17. package/dist/ModelSettings-LYW64IRR.js.map +1 -0
  18. package/dist/OpenUiFenceBlock-JEPNPJ7U.js +9 -0
  19. package/dist/{SandboxSettings-NXAANMAX.js → SandboxSettings-DF64LHYI.js} +15 -19
  20. package/dist/SandboxSettings-DF64LHYI.js.map +1 -0
  21. package/dist/SchedulesPage-WQU4H25F.js +15 -0
  22. package/dist/{SettingsBuilder-L34IQ56S.js → SettingsBuilder-LSXK2VN4.js} +8 -8
  23. package/dist/{ShellRouteSync-CEBETGEJ.js → ShellRouteSync-B22IAV2W.js} +19 -9
  24. package/dist/ShellRouteSync-B22IAV2W.js.map +1 -0
  25. package/dist/{SidebarLayout-A2HJPPHS.js → SidebarLayout-XW6LXB7R.js} +17 -16
  26. package/dist/SidebarLayout-XW6LXB7R.js.map +1 -0
  27. package/dist/{SkillSettings-FGGMSUNO.js → SkillSettings-64VXUO6J.js} +13 -16
  28. package/dist/SkillSettings-64VXUO6J.js.map +1 -0
  29. package/dist/{TrueForgeUIWithRouter-MZVJWJMB.js → TrueForgeUIWithRouter-3TSLV22Q.js} +9 -9
  30. package/dist/{WidgetLayout-6QM45OQQ.js → WidgetLayout-Q5P7PYSJ.js} +10 -10
  31. package/dist/{chunk-ZKNUMH2M.js → chunk-5I2COQNL.js} +2 -2
  32. package/dist/chunk-BWHOZFIV.js +587 -0
  33. package/dist/chunk-BWHOZFIV.js.map +1 -0
  34. package/dist/{chunk-U7KURWW3.js → chunk-FQK2XVVE.js} +66 -26
  35. package/dist/chunk-FQK2XVVE.js.map +1 -0
  36. package/dist/{chunk-M62XY4NC.js → chunk-G2TUAD65.js} +6 -6
  37. package/dist/{chunk-M62XY4NC.js.map → chunk-G2TUAD65.js.map} +1 -1
  38. package/dist/{chunk-6O6FWUDW.js → chunk-GXYAOAK5.js} +23 -42
  39. package/dist/chunk-GXYAOAK5.js.map +1 -0
  40. package/dist/{chunk-XAU7QFG3.js → chunk-H6WTY5PM.js} +60 -38
  41. package/dist/chunk-H6WTY5PM.js.map +1 -0
  42. package/dist/{chunk-FJW36PD7.js → chunk-I3AL54MA.js} +10 -10
  43. package/dist/{chunk-FJW36PD7.js.map → chunk-I3AL54MA.js.map} +1 -1
  44. package/dist/{chunk-CYHJDKFB.js → chunk-LGRHHFHN.js} +16 -11
  45. package/dist/{chunk-CYHJDKFB.js.map → chunk-LGRHHFHN.js.map} +1 -1
  46. package/dist/{chunk-2XPPBEYF.js → chunk-NHHSZB5N.js} +2 -2
  47. package/dist/{chunk-WVE3F724.js → chunk-SQGT43Z3.js} +3 -3
  48. package/dist/{chunk-MPNSO7E6.js → chunk-VJ7BZGAF.js} +2 -2
  49. package/dist/{chunk-DMMZSZTN.js → chunk-VUMGMGKZ.js} +13 -13
  50. package/dist/chunk-VUMGMGKZ.js.map +1 -0
  51. package/dist/{chunk-ZTMKFZQ3.js → chunk-YQO2NMJ3.js} +447 -320
  52. package/dist/chunk-YQO2NMJ3.js.map +1 -0
  53. package/dist/index.d.ts +27 -7
  54. package/dist/index.js +13 -11
  55. package/dist/index.js.map +1 -1
  56. package/dist/plugins/trueforge-agent-server-adapter/index.js +2 -1
  57. package/dist/plugins/trueforge-agent-server-adapter/index.js.map +1 -1
  58. package/dist/styles.css +1 -1
  59. package/package.json +3 -3
  60. package/dist/AgentMetricChart-JPU3MFQ2.js +0 -15
  61. package/dist/AgentSessionEventTimeline-26Z6IB3B.js.map +0 -1
  62. package/dist/AgentSessionEventTimelineChart-CGCU7WBK.js.map +0 -1
  63. package/dist/ConnectorSettings-MXFRWWR6.js.map +0 -1
  64. package/dist/DrawerLayout-JR3O6RRB.js.map +0 -1
  65. package/dist/ModelSettings-G7IFNC2Y.js.map +0 -1
  66. package/dist/OpenUiFenceBlock-2TV5TQ6P.js +0 -9
  67. package/dist/SandboxSettings-NXAANMAX.js.map +0 -1
  68. package/dist/SchedulesPage-KKLUDO6B.js +0 -15
  69. package/dist/ShellRouteSync-CEBETGEJ.js.map +0 -1
  70. package/dist/SidebarLayout-A2HJPPHS.js.map +0 -1
  71. package/dist/SkillSettings-FGGMSUNO.js.map +0 -1
  72. package/dist/chunk-6O6FWUDW.js.map +0 -1
  73. package/dist/chunk-7Z2C2K7F.js +0 -578
  74. package/dist/chunk-7Z2C2K7F.js.map +0 -1
  75. package/dist/chunk-DMMZSZTN.js.map +0 -1
  76. package/dist/chunk-U7KURWW3.js.map +0 -1
  77. package/dist/chunk-XAU7QFG3.js.map +0 -1
  78. package/dist/chunk-ZTMKFZQ3.js.map +0 -1
  79. /package/dist/{AgentCodeSnippets-NZOFJE57.js.map → AgentCodeSnippets-637HQUXD.js.map} +0 -0
  80. /package/dist/{AgentMetricChart-JPU3MFQ2.js.map → AgentMetricChart-4FYECRIN.js.map} +0 -0
  81. /package/dist/{AgentOverview-EEBHJC32.js.map → AgentOverview-3FJ5EE6N.js.map} +0 -0
  82. /package/dist/{AgentSessions-3MPDZASK.js.map → AgentSessions-T7MOGOTZ.js.map} +0 -0
  83. /package/dist/{DockLayout-LM4AFMFY.js.map → DockLayout-NLFNU6F2.js.map} +0 -0
  84. /package/dist/{OpenUiFenceBlock-2TV5TQ6P.js.map → OpenUiFenceBlock-JEPNPJ7U.js.map} +0 -0
  85. /package/dist/{SchedulesPage-KKLUDO6B.js.map → SchedulesPage-WQU4H25F.js.map} +0 -0
  86. /package/dist/{SettingsBuilder-L34IQ56S.js.map → SettingsBuilder-LSXK2VN4.js.map} +0 -0
  87. /package/dist/{TrueForgeUIWithRouter-MZVJWJMB.js.map → TrueForgeUIWithRouter-3TSLV22Q.js.map} +0 -0
  88. /package/dist/{WidgetLayout-6QM45OQQ.js.map → WidgetLayout-Q5P7PYSJ.js.map} +0 -0
  89. /package/dist/{chunk-ZKNUMH2M.js.map → chunk-5I2COQNL.js.map} +0 -0
  90. /package/dist/{chunk-2XPPBEYF.js.map → chunk-NHHSZB5N.js.map} +0 -0
  91. /package/dist/{chunk-WVE3F724.js.map → chunk-SQGT43Z3.js.map} +0 -0
  92. /package/dist/{chunk-MPNSO7E6.js.map → chunk-VJ7BZGAF.js.map} +0 -0
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  writeOpenSchedulesForAgentSearch
3
- } from "./chunk-2XPPBEYF.js";
3
+ } from "./chunk-NHHSZB5N.js";
4
4
  import {
5
5
  DraftCatalogProvider,
6
6
  Icon,
@@ -9,14 +9,19 @@ import {
9
9
  auiButtonClass,
10
10
  getErrorMessage,
11
11
  pageHeaderTitleClassName,
12
+ sidebarButtonRadiusClassName,
13
+ sidebarRailButtonClassName,
12
14
  useCompactLayout,
13
15
  useDraftCatalog
14
- } from "./chunk-XAU7QFG3.js";
16
+ } from "./chunk-H6WTY5PM.js";
15
17
  import {
16
18
  SESSION_CUSTOM_RANGE_MAX_DAYS,
17
19
  SESSION_SHARE_CHANGE_EVENT,
18
20
  buildAgentSessionShareUrl,
19
21
  defaultSessionTimeRange,
22
+ isMetricsChromeEnabled,
23
+ isSchedulesChromeEnabled,
24
+ isSessionsChromeEnabled,
20
25
  libraryAgentId,
21
26
  libraryAgentTabFromSearch,
22
27
  readSessionShareSearch,
@@ -34,13 +39,13 @@ import {
34
39
  useServer,
35
40
  useServerCapabilities,
36
41
  useShellMode
37
- } from "./chunk-U7KURWW3.js";
42
+ } from "./chunk-FQK2XVVE.js";
38
43
  import {
39
44
  useAuiState
40
45
  } from "./chunk-M6MHLVSO.js";
41
46
  import {
42
47
  OpenUiFenceBlock
43
- } from "./chunk-MPNSO7E6.js";
48
+ } from "./chunk-VJ7BZGAF.js";
44
49
  import {
45
50
  ThemeContext,
46
51
  ThemeProvider,
@@ -48,7 +53,7 @@ import {
48
53
  useOptionalContentClassNames,
49
54
  useOptionalThemeMode,
50
55
  useOptionalThemePreset
51
- } from "./chunk-7Z2C2K7F.js";
56
+ } from "./chunk-BWHOZFIV.js";
52
57
 
53
58
  // src/theme/brand.tsx
54
59
  import { useContext } from "react";
@@ -247,12 +252,23 @@ function AgentStepsCard({
247
252
  // src/atoms/primitives/Button.tsx
248
253
  import React4 from "react";
249
254
  import { jsx as jsx6 } from "react/jsx-runtime";
250
- var Button = React4.forwardRef(
251
- ({ className, variant = "default", size = "default", ...props }, ref) => {
255
+ var ButtonRoot = React4.forwardRef(
256
+ ({ className, variant = "primary", size = "large", ...props }, ref) => {
252
257
  return /* @__PURE__ */ jsx6("button", { ref, className: auiButtonClass({ variant, size, className }), ...props });
253
258
  }
254
259
  );
255
- Button.displayName = "Button";
260
+ ButtonRoot.displayName = "Button";
261
+ function fixedVariant(variant, displayName) {
262
+ const Fixed = React4.forwardRef((props, ref) => /* @__PURE__ */ jsx6(ButtonRoot, { ref, variant, ...props }));
263
+ Fixed.displayName = displayName;
264
+ return Fixed;
265
+ }
266
+ var Button = Object.assign(ButtonRoot, {
267
+ Primary: fixedVariant("primary", "Button.Primary"),
268
+ Secondary: fixedVariant("secondary", "Button.Secondary"),
269
+ Ghost: fixedVariant("ghost", "Button.Ghost"),
270
+ Destructive: fixedVariant("destructive", "Button.Destructive")
271
+ });
256
272
 
257
273
  // src/theme/SlotsProvider.tsx
258
274
  import { createContext as createContext5, useContext as useContext6, useMemo as useMemo15 } from "react";
@@ -473,7 +489,7 @@ function AskUserPrompt({
473
489
  }),
474
490
  children: [
475
491
  isMultiQuestion && isLastQuestion && !allQuestionsAnswered ? /* @__PURE__ */ jsx8("span", { className: "text-xs font-medium text-failure-bg", children: "Answer all questions to submit" }) : /* @__PURE__ */ jsx8("span", {}),
476
- isNextStep ? /* @__PURE__ */ jsx8(Button, { type: "button", size: "sm", onClick: goToNextQuestion, disabled: isSubmitDisabled, children: "Next" }) : /* @__PURE__ */ jsx8(Button, { type: "button", size: "sm", onClick: onSubmit, disabled: isSubmitAllDisabled, children: "Submit" })
492
+ isNextStep ? /* @__PURE__ */ jsx8(Button.Primary, { type: "button", size: "small", onClick: goToNextQuestion, disabled: isSubmitDisabled, children: "Next" }) : /* @__PURE__ */ jsx8(Button.Primary, { type: "button", size: "small", onClick: onSubmit, disabled: isSubmitAllDisabled, children: "Submit" })
477
493
  ]
478
494
  }
479
495
  )
@@ -510,12 +526,12 @@ function McpAuthPrompt({
510
526
  /* @__PURE__ */ jsx9("span", { className: "shrink-0 text-xs font-semibold text-text-secondary", children: ":" }),
511
527
  /* @__PURE__ */ jsx9("span", { className: "truncate font-sans font-medium text-text-primary", children: server.name })
512
528
  ] }),
513
- /* @__PURE__ */ jsxs5(Button, { size: "sm", disabled: readOnly, onClick: () => onConnect(server.id), className: "shrink-0", children: [
529
+ /* @__PURE__ */ jsxs5(Button.Primary, { size: "small", disabled: readOnly, onClick: () => onConnect(server.id), className: "shrink-0", children: [
514
530
  "Connect",
515
531
  /* @__PURE__ */ jsx9(Icon, { name: "external-link", size: "0.75em", className: "ml-1" })
516
532
  ] })
517
533
  ] }, server.id)),
518
- onContinue && /* @__PURE__ */ jsx9("div", { className: "flex justify-end border-t border-border pt-2", children: /* @__PURE__ */ jsx9(Button, { size: "sm", disabled: readOnly, onClick: onContinue, children: "Continue" }) })
534
+ onContinue && /* @__PURE__ */ jsx9("div", { className: "flex justify-end border-t border-border pt-2", children: /* @__PURE__ */ jsx9(Button.Primary, { size: "small", disabled: readOnly, onClick: onContinue, children: "Continue" }) })
519
535
  ] })
520
536
  ]
521
537
  }
@@ -1183,7 +1199,7 @@ function AgentOverflowMenu({
1183
1199
  type: "button",
1184
1200
  className: auiButtonClass({ variant: "ghost", size: "icon" }),
1185
1201
  "aria-label": `Actions for ${agentName}`,
1186
- children: /* @__PURE__ */ jsx19(Icon, { name: "ellipsis-vertical", className: "size-4" })
1202
+ children: /* @__PURE__ */ jsx19(Icon, { name: "ellipsis-vertical" })
1187
1203
  }
1188
1204
  ),
1189
1205
  children: [
@@ -1228,8 +1244,8 @@ function AgentOverflowMenu({
1228
1244
  ] })
1229
1245
  ] }) }),
1230
1246
  /* @__PURE__ */ jsxs11(DialogFooter, { children: [
1231
- /* @__PURE__ */ jsx19(Button, { type: "button", variant: "secondary", disabled: busy, onClick: closePending, children: "Cancel" }),
1232
- /* @__PURE__ */ jsx19(Button, { type: "button", disabled: busy || builder == null, onClick: () => void handleClone(), children: "Clone" })
1247
+ /* @__PURE__ */ jsx19(Button.Secondary, { type: "button", disabled: busy, onClick: closePending, children: "Cancel" }),
1248
+ /* @__PURE__ */ jsx19(Button.Primary, { type: "button", disabled: busy || builder == null, onClick: () => void handleClone(), children: "Clone" })
1233
1249
  ] })
1234
1250
  ] }) : null,
1235
1251
  pending === "delete" ? /* @__PURE__ */ jsxs11(Dialog, { open: true, onOpenChange: (open) => !open && closePending(), "aria-label": "Delete agent", className: "max-w-md", children: [
@@ -1242,12 +1258,11 @@ function AgentOverflowMenu({
1242
1258
  ] })
1243
1259
  ] }) }),
1244
1260
  /* @__PURE__ */ jsxs11(DialogFooter, { children: [
1245
- /* @__PURE__ */ jsx19(Button, { type: "button", variant: "secondary", disabled: busy, onClick: closePending, children: "Cancel" }),
1261
+ /* @__PURE__ */ jsx19(Button.Secondary, { type: "button", disabled: busy, onClick: closePending, children: "Cancel" }),
1246
1262
  /* @__PURE__ */ jsx19(
1247
- Button,
1263
+ Button.Destructive,
1248
1264
  {
1249
1265
  type: "button",
1250
- variant: "destructive",
1251
1266
  disabled: busy || builder == null || typeof builder.deleteAgent !== "function",
1252
1267
  onClick: () => void handleDelete(),
1253
1268
  children: "Delete"
@@ -1265,7 +1280,7 @@ function AgentDetailsHeader({ agentId, detail, onBack }) {
1265
1280
  const scheduleServer = useOptionalScheduleServer();
1266
1281
  const builder = useOptionalServer();
1267
1282
  const canMutate = shell.isComposerEnabled && detail != null && builder != null;
1268
- const canManageSchedules = scheduleServer != null && detail != null;
1283
+ const canManageSchedules = isSchedulesChromeEnabled({ schedules: scheduleServer }) && detail != null;
1269
1284
  const handleTry = () => {
1270
1285
  if (detail == null) return;
1271
1286
  shell.selectLibraryAgent({
@@ -1310,12 +1325,12 @@ function AgentDetailsHeader({ agentId, detail, onBack }) {
1310
1325
  ] }),
1311
1326
  end: /* @__PURE__ */ jsxs12(Fragment3, { children: [
1312
1327
  /* @__PURE__ */ jsxs12(
1313
- "button",
1328
+ Button.Primary,
1314
1329
  {
1315
1330
  type: "button",
1316
1331
  "aria-label": "Try agent",
1332
+ size: "large",
1317
1333
  disabled: detail == null,
1318
- className: auiButtonClass({ variant: "default", size: "sm" }),
1319
1334
  onClick: handleTry,
1320
1335
  children: [
1321
1336
  /* @__PURE__ */ jsx20(Icon, { name: "play", className: "size-3.5" }),
@@ -1383,7 +1398,8 @@ function AgentDetailsPage({ agentId }) {
1383
1398
  const share = useSessionShareSearch();
1384
1399
  const { updateShareSearch } = share;
1385
1400
  const requestedTab = libraryAgentTabFromSearch(share, agentId);
1386
- const activeTab = requestedTab === "metrics" && metricsServer == null ? "overview" : requestedTab;
1401
+ const showMetrics = isMetricsChromeEnabled({ metrics: metricsServer });
1402
+ const activeTab = requestedTab === "metrics" && !showMetrics ? "overview" : requestedTab;
1387
1403
  const AgentDetailsHeader2 = useSlot("AgentDetailsHeader");
1388
1404
  const AgentDetailsTabs2 = useSlot("AgentDetailsTabs");
1389
1405
  const AgentDetailsUnavailable2 = useSlot("AgentDetailsUnavailable");
@@ -1490,7 +1506,7 @@ function AgentDetailsPage({ agentId }) {
1490
1506
  AgentDetailsTabs2,
1491
1507
  {
1492
1508
  activeTab,
1493
- showMetrics: metricsServer != null,
1509
+ showMetrics,
1494
1510
  onTabChange: (tab) => updateShareSearch({
1495
1511
  agentId,
1496
1512
  tab,
@@ -1558,7 +1574,7 @@ function AgentDetailsUnavailable({ onBack, reason }) {
1558
1574
  /* @__PURE__ */ jsx24("h2", { className: "text-base font-semibold text-text-primary", children: "Agent details unavailable" }),
1559
1575
  /* @__PURE__ */ jsx24("p", { className: "mt-1 max-w-md text-sm text-text-secondary", children: reason ?? "The agent details could not be loaded. Please try again later." })
1560
1576
  ] }),
1561
- /* @__PURE__ */ jsxs15("button", { type: "button", className: auiButtonClass({ variant: "outline", size: "sm" }), onClick: onBack, children: [
1577
+ /* @__PURE__ */ jsxs15(Button.Secondary, { type: "button", size: "small", onClick: onBack, children: [
1562
1578
  /* @__PURE__ */ jsx24(Icon, { name: "arrow-left", className: "size-3.5" }),
1563
1579
  "Back to Agents"
1564
1580
  ] })
@@ -1587,11 +1603,25 @@ function formatDurationMs(durationMs) {
1587
1603
  }
1588
1604
  return `${(durationMs / 36e5).toFixed(2)}h`;
1589
1605
  }
1606
+ function roundDurationMsToSecond(durationMs) {
1607
+ return Math.max(0, Math.round(durationMs / 1e3) * 1e3);
1608
+ }
1609
+ function formatReadableDurationMs(durationMs) {
1610
+ const totalSeconds = roundDurationMsToSecond(durationMs) / 1e3;
1611
+ const hours = Math.floor(totalSeconds / 3600);
1612
+ const minutes = Math.floor(totalSeconds % 3600 / 60);
1613
+ const seconds = totalSeconds % 60;
1614
+ return [
1615
+ ...hours > 0 ? [`${hours}h`] : [],
1616
+ ...minutes > 0 ? [`${minutes}m`] : [],
1617
+ ...seconds > 0 || totalSeconds === 0 ? [`${seconds}s`] : []
1618
+ ].join(" ");
1619
+ }
1590
1620
  function formatSessionListMetrics(metrics) {
1591
1621
  return [
1592
1622
  `${metrics.totalTurns} turns`,
1593
1623
  ...metrics.totalCostInUsd == null ? [] : [formatCostUsd(metrics.totalCostInUsd)],
1594
- formatDurationMs(metrics.totalDurationMs)
1624
+ formatReadableDurationMs(metrics.totalDurationMs)
1595
1625
  ].join(" | ");
1596
1626
  }
1597
1627
 
@@ -1915,13 +1945,13 @@ function AgentSessionDetailHeader({
1915
1945
  href: resumeHref,
1916
1946
  target: "_blank",
1917
1947
  rel: "noopener noreferrer",
1918
- className: auiButtonClass({ variant: "outline", size: "sm" }),
1948
+ className: auiButtonClass({ variant: "secondary", size: "large" }),
1919
1949
  children: [
1920
1950
  resumeLabel,
1921
- /* @__PURE__ */ jsx30(Icon, { name: "square-arrow-out-up-right", size: "0.875em", className: "shrink-0" })
1951
+ /* @__PURE__ */ jsx30(Icon, { name: "square-arrow-out-up-right", className: "shrink-0" })
1922
1952
  ]
1923
1953
  }
1924
- ) : resumeLabel != null && onResume != null ? /* @__PURE__ */ jsx30("button", { type: "button", className: auiButtonClass({ variant: "outline", size: "sm" }), onClick: onResume, children: resumeLabel }) : null,
1954
+ ) : resumeLabel != null && onResume != null ? /* @__PURE__ */ jsx30(Button.Secondary, { type: "button", size: "large", onClick: onResume, children: resumeLabel }) : null,
1925
1955
  /* @__PURE__ */ jsx30(
1926
1956
  "button",
1927
1957
  {
@@ -2038,10 +2068,10 @@ var MAIN_THREAD_ID = "main";
2038
2068
  var SESSION_EVENT_TYPES = [
2039
2069
  { id: "system", label: "System", color: "#94a3b8" },
2040
2070
  { id: "user", label: "User", color: "#34d399" },
2041
- { id: "model", label: "Model", color: "#3b82f6" },
2071
+ { id: "model", label: "Model", color: "#3b82f6", darkColor: "#6366f1" },
2042
2072
  { id: "tool_call", label: "Tool call", color: "#f59e0b" },
2043
2073
  { id: "approval", label: "Approval / HITL", color: "#f472b6" },
2044
- { id: "sub_agent", label: "Sub-agent", color: "#c084fc" },
2074
+ { id: "sub_agent", label: "Sub-agent", color: "#e2e8f0", darkColor: "#3f3f46" },
2045
2075
  { id: "waiting_on_human", label: "Waiting on human", color: "#22d3ee" },
2046
2076
  { id: "error", label: "Error", color: "#f87171" }
2047
2077
  ];
@@ -2057,13 +2087,15 @@ function formatTimelineDuration(durationMs) {
2057
2087
  if (durationMs < 36e5) return `${Number((durationMs / 6e4).toPrecision(3))}m`;
2058
2088
  return `${Number((durationMs / 36e5).toPrecision(3))}h`;
2059
2089
  }
2060
- function getSessionEventColor(type) {
2061
- return SESSION_EVENT_TYPES.find((eventType) => eventType.id === type)?.color ?? "#94a3b8";
2090
+ function getSessionEventColor(type, isDarkMode = false) {
2091
+ const eventType = SESSION_EVENT_TYPES.find((eventType2) => eventType2.id === type);
2092
+ return (isDarkMode ? eventType?.darkColor : void 0) ?? eventType?.color ?? "#94a3b8";
2062
2093
  }
2063
- function getSessionEventHoverColor(type) {
2064
- const hex = getSessionEventColor(type).replace("#", "");
2094
+ function getSessionEventHoverColor(type, isDarkMode = false) {
2095
+ const color = getSessionEventColor(type, isDarkMode);
2096
+ const hex = color.replace("#", "");
2065
2097
  const normalized = hex.length === 3 ? hex.split("").map((char) => `${char}${char}`).join("") : hex;
2066
- if (normalized.length !== 6) return getSessionEventColor(type);
2098
+ if (normalized.length !== 6) return color;
2067
2099
  const value = Number.parseInt(normalized, 16);
2068
2100
  const channel = (shift) => Math.max(0, Math.round((value >> shift & 255) * 0.9)).toString(16).padStart(2, "0");
2069
2101
  return `#${channel(16)}${channel(8)}${channel(0)}`;
@@ -2187,7 +2219,7 @@ function AgentSessionMetricsStrip({ metrics }) {
2187
2219
  {
2188
2220
  id: "wall-time",
2189
2221
  label: "Duration",
2190
- value: formatTimelineDuration(metrics.wallTimeMs),
2222
+ value: formatReadableDurationMs(metrics.wallTimeMs),
2191
2223
  tooltip: /* @__PURE__ */ jsx33(SessionMetricTooltipContent, { title: "Where the time went", children: /* @__PURE__ */ jsx33(StackedProportionBar, { data: metrics.timeBreakdown, formatValue: formatTimelineDuration }) })
2192
2224
  }
2193
2225
  ),
@@ -2276,11 +2308,11 @@ function auiInputClass(className) {
2276
2308
 
2277
2309
  // src/atoms/lib/selectClasses.ts
2278
2310
  function auiSelectTriggerClass(className) {
2279
- return auiInputClass(cn("flex h-9 cursor-pointer items-center justify-between gap-2 pr-2 text-left", className));
2311
+ return auiInputClass(cn("flex h-8 cursor-pointer items-center justify-between gap-2 pr-2 text-left", className));
2280
2312
  }
2281
2313
  function auiSelectPrefixTriggerClass(className) {
2282
2314
  return cn(
2283
- "inline-flex h-9 w-full cursor-pointer items-center rounded-md border border-border bg-input-box-bg text-left text-sm text-text-primary outline-none",
2315
+ "inline-flex h-8 w-full cursor-pointer items-center rounded-md border border-border bg-input-box-bg text-left text-sm text-text-primary outline-none",
2284
2316
  "focus-visible:ring-2 focus-visible:ring-focus-ring/40 disabled:cursor-not-allowed disabled:opacity-50",
2285
2317
  className
2286
2318
  );
@@ -2665,7 +2697,7 @@ function AgentSessionsFilters({
2665
2697
  {
2666
2698
  type: "datetime-local",
2667
2699
  step: "1",
2668
- className: auiInputClass("h-9"),
2700
+ className: auiInputClass("h-8"),
2669
2701
  value: fromValue,
2670
2702
  onChange: (event) => setFromValue(event.target.value)
2671
2703
  }
@@ -2678,7 +2710,7 @@ function AgentSessionsFilters({
2678
2710
  {
2679
2711
  type: "datetime-local",
2680
2712
  step: "1",
2681
- className: auiInputClass("h-9"),
2713
+ className: auiInputClass("h-8"),
2682
2714
  value: toValue,
2683
2715
  onChange: (event) => setToValue(event.target.value)
2684
2716
  }
@@ -2688,7 +2720,7 @@ function AgentSessionsFilters({
2688
2720
  "Timezone: ",
2689
2721
  /* @__PURE__ */ jsx35("span", { className: "font-medium text-text-primary", children: formatTimezoneOffsetLabel() })
2690
2722
  ] }),
2691
- /* @__PURE__ */ jsx35("button", { type: "button", className: auiButtonClass({ className: "mt-auto" }), onClick: applyCustom, children: "Apply" })
2723
+ /* @__PURE__ */ jsx35(Button.Primary, { type: "button", className: "mt-auto", onClick: applyCustom, children: "Apply" })
2692
2724
  ] }) : null,
2693
2725
  /* @__PURE__ */ jsxs25("div", { className: "flex max-h-80 w-44 shrink-0 flex-col overflow-y-auto p-1", role: "listbox", children: [
2694
2726
  showCustomTimeRange ? /* @__PURE__ */ jsxs25(
@@ -2946,7 +2978,7 @@ var SearchInput = ({ query, setQuery, placeholder = "Search" }) => {
2946
2978
  value: query,
2947
2979
  onChange: (e) => setQuery(e.target.value),
2948
2980
  placeholder,
2949
- className: "border-input-border bg-input-box-bg text-text-primary placeholder:text-text-secondary/70 h-9 w-full rounded-md border py-1 pr-3 pl-8 text-sm outline-none",
2981
+ className: "border-input-border bg-input-box-bg text-text-primary placeholder:text-text-secondary/70 h-8 w-full rounded-md border py-1 pr-3 pl-8 text-sm outline-none",
2950
2982
  autoFocus: true
2951
2983
  }
2952
2984
  )
@@ -2963,29 +2995,50 @@ function Table({ className, containerClassName, ...props }) {
2963
2995
  return /* @__PURE__ */ jsx40("div", { className: cn("w-full overflow-x-auto", containerClassName), children: /* @__PURE__ */ jsx40("table", { className: cn("w-full min-w-full border-collapse bg-primary-bg text-sm", className), ...props }) });
2964
2996
  }
2965
2997
  function TableHeader({ className, ...props }) {
2966
- return /* @__PURE__ */ jsx40("thead", { className: cn("bg-secondary-bg/60", className), ...props });
2998
+ return /* @__PURE__ */ jsx40("thead", { className: cn("bg-primary-bg", className), ...props });
2967
2999
  }
2968
3000
  function TableBody({ className, ...props }) {
2969
- return /* @__PURE__ */ jsx40("tbody", { className: cn(className), ...props });
3001
+ return /* @__PURE__ */ jsx40("tbody", { className: cn("[&>tr:not(:last-child)>td]:after:block", className), ...props });
2970
3002
  }
2971
3003
  function TableRow({ className, ...props }) {
2972
- return /* @__PURE__ */ jsx40("tr", { className: cn("border-b border-border last:border-b-0 hover:bg-ghost-button-hover/40", className), ...props });
3004
+ return /* @__PURE__ */ jsx40(
3005
+ "tr",
3006
+ {
3007
+ className: cn(
3008
+ "group/table-row hover:bg-ghost-button-hover/40",
3009
+ "[&_td:first-child_a]:text-text-primary [&_td:first-child_button]:text-text-primary",
3010
+ // `:hover` on the row (not group-hover) so the rule lives on the same element as the target descendants.
3011
+ "hover:[&_td:first-child_a]:underline hover:[&_td:first-child_button]:underline",
3012
+ className
3013
+ ),
3014
+ ...props
3015
+ }
3016
+ );
2973
3017
  }
2974
3018
  function TableHead({ className, ...props }) {
2975
3019
  return /* @__PURE__ */ jsx40(
2976
3020
  "th",
3021
+ {
3022
+ className: cn("text-text-secondary p-3 text-left text-xs font-normal tracking-wide uppercase", className),
3023
+ ...props
3024
+ }
3025
+ );
3026
+ }
3027
+ function TableCell({ className, ...props }) {
3028
+ return /* @__PURE__ */ jsx40(
3029
+ "td",
2977
3030
  {
2978
3031
  className: cn(
2979
- "text-text-secondary border-b border-border px-3 py-2.5 text-left text-xs font-semibold tracking-wide uppercase",
3032
+ "text-text-secondary relative px-3 py-3",
3033
+ // Inset row divider (aligns with cell padding); shown for non-last body rows via TableBody.
3034
+ "after:bg-border after:pointer-events-none after:absolute after:right-0 after:bottom-0 after:left-0 after:hidden after:h-px",
3035
+ "first:after:left-3 last:after:right-3",
2980
3036
  className
2981
3037
  ),
2982
3038
  ...props
2983
3039
  }
2984
3040
  );
2985
3041
  }
2986
- function TableCell({ className, ...props }) {
2987
- return /* @__PURE__ */ jsx40("td", { className: cn("text-text-secondary px-3 py-3", className), ...props });
2988
- }
2989
3042
  function TablePagination({
2990
3043
  page,
2991
3044
  pageSize,
@@ -3009,7 +3062,7 @@ function TablePagination({
3009
3062
  "div",
3010
3063
  {
3011
3064
  className: cn(
3012
- "text-text-secondary flex flex-wrap items-center justify-between gap-3 border-t border-border px-3 py-2 text-sm",
3065
+ "text-text-secondary flex flex-wrap items-center justify-between gap-3 px-3 py-2 text-sm",
3013
3066
  className
3014
3067
  ),
3015
3068
  children: [
@@ -3039,7 +3092,7 @@ function TablePagination({
3039
3092
  disabled: !canPrev,
3040
3093
  className: auiButtonClass({ variant: "ghost", size: "icon" }),
3041
3094
  onClick: () => onPageChange(safePage - 1),
3042
- children: /* @__PURE__ */ jsx40(Icon, { name: "chevron-left", className: "size-4" })
3095
+ children: /* @__PURE__ */ jsx40(Icon, { name: "chevron-left" })
3043
3096
  }
3044
3097
  ),
3045
3098
  /* @__PURE__ */ jsxs30("span", { className: "min-w-[4.5rem] text-center tabular-nums", children: [
@@ -3055,7 +3108,7 @@ function TablePagination({
3055
3108
  disabled: !canNext,
3056
3109
  className: auiButtonClass({ variant: "ghost", size: "icon" }),
3057
3110
  onClick: () => onPageChange(safePage + 1),
3058
- children: /* @__PURE__ */ jsx40(Icon, { name: "chevron-right", className: "size-4" })
3111
+ children: /* @__PURE__ */ jsx40(Icon, { name: "chevron-right" })
3059
3112
  }
3060
3113
  )
3061
3114
  ] })
@@ -3083,7 +3136,7 @@ function TableTokenPagination({
3083
3136
  "div",
3084
3137
  {
3085
3138
  className: cn(
3086
- "text-text-secondary flex flex-wrap items-center justify-between gap-3 border-t border-border px-3 py-2 text-sm",
3139
+ "text-text-secondary flex flex-wrap items-center justify-between gap-3 px-3 py-2 text-sm",
3087
3140
  className
3088
3141
  ),
3089
3142
  children: [
@@ -3113,7 +3166,7 @@ function TableTokenPagination({
3113
3166
  disabled: !canPrev,
3114
3167
  className: auiButtonClass({ variant: "ghost", size: "icon" }),
3115
3168
  onClick: onPrev,
3116
- children: /* @__PURE__ */ jsx40(Icon, { name: "chevron-left", className: "size-4" })
3169
+ children: /* @__PURE__ */ jsx40(Icon, { name: "chevron-left" })
3117
3170
  }
3118
3171
  ),
3119
3172
  /* @__PURE__ */ jsx40(
@@ -3124,7 +3177,7 @@ function TableTokenPagination({
3124
3177
  disabled: !canNext,
3125
3178
  className: auiButtonClass({ variant: "ghost", size: "icon" }),
3126
3179
  onClick: onNext,
3127
- children: /* @__PURE__ */ jsx40(Icon, { name: "chevron-right", className: "size-4" })
3180
+ children: /* @__PURE__ */ jsx40(Icon, { name: "chevron-right" })
3128
3181
  }
3129
3182
  )
3130
3183
  ] })
@@ -3213,10 +3266,10 @@ function AgentLibraryRow({
3213
3266
  "button",
3214
3267
  {
3215
3268
  type: "button",
3216
- className: "hover:text-primary-button-bg block max-w-full cursor-pointer truncate text-left hover:underline",
3269
+ className: "block max-w-full cursor-pointer text-left",
3217
3270
  "aria-label": `Open ${agent.name}`,
3218
3271
  onClick: onOpen,
3219
- children: agent.name
3272
+ children: /* @__PURE__ */ jsx41("span", { className: "block truncate", children: agent.name })
3220
3273
  }
3221
3274
  ) })
3222
3275
  ] }) }),
@@ -3224,7 +3277,7 @@ function AgentLibraryRow({
3224
3277
  modelLabel != null ? /* @__PURE__ */ jsx41(Tooltip, { content: modelTitle, children: /* @__PURE__ */ jsxs31(
3225
3278
  "span",
3226
3279
  {
3227
- className: "bg-primary-button-bg/10 text-primary-button-bg inline-flex max-w-[10rem] items-center gap-1 truncate rounded-full px-2 py-0.5 text-xs font-medium",
3280
+ className: "bg-secondary-bg text-text-secondary inline-flex max-w-[10rem] items-center gap-1 truncate rounded-full px-2 py-0.5 text-xs font-medium",
3228
3281
  "aria-label": modelTitle,
3229
3282
  children: [
3230
3283
  /* @__PURE__ */ jsx41(Icon, { name: "cpu", className: "size-3.5 shrink-0" }),
@@ -3243,22 +3296,10 @@ function AgentLibraryRow({
3243
3296
  ] }) : /* @__PURE__ */ jsx41("span", { className: "text-text-secondary text-sm", "aria-label": `Configuration unavailable for ${agent.name}`, children: "\u2014" }) }),
3244
3297
  scheduleSummary !== void 0 ? /* @__PURE__ */ jsx41(TableCell, { children: scheduleSummary != null && scheduleSummary.count > 0 ? /* @__PURE__ */ jsx41(AgentSchedulesBadge, { summary: scheduleSummary, agentName: agent.name, onOpen: onOpenSchedules }) : scheduleSummary != null ? /* @__PURE__ */ jsx41(AgentSchedulesEmptyState, { agentName: agent.name, onOpen: onCreateSchedule }) : /* @__PURE__ */ jsx41("span", { className: "text-text-secondary text-sm", "aria-label": `Schedule count unavailable for ${agent.name}`, children: "\u2014" }) }) : null,
3245
3298
  /* @__PURE__ */ jsx41(TableCell, { className: "w-px", children: /* @__PURE__ */ jsxs31("div", { className: "flex items-center justify-end gap-1.5", children: [
3246
- /* @__PURE__ */ jsxs31(
3247
- "button",
3248
- {
3249
- type: "button",
3250
- "aria-label": `Try agent ${agent.name}`,
3251
- className: auiButtonClass({
3252
- variant: "outline",
3253
- size: "sm"
3254
- }),
3255
- onClick: onTry,
3256
- children: [
3257
- /* @__PURE__ */ jsx41(Icon, { name: "play", className: "size-3.5" }),
3258
- "Try"
3259
- ]
3260
- }
3261
- ),
3299
+ /* @__PURE__ */ jsxs31(Button.Secondary, { type: "button", "aria-label": `Try agent ${agent.name}`, size: "large", onClick: onTry, children: [
3300
+ /* @__PURE__ */ jsx41(Icon, { name: "play", className: "size-3.5" }),
3301
+ "Try"
3302
+ ] }),
3262
3303
  /* @__PURE__ */ jsx41(
3263
3304
  AgentOverflowMenu,
3264
3305
  {
@@ -3318,8 +3359,9 @@ function AgentsLibrary({ onSelectAgent }) {
3318
3359
  const open = shell.libraryOpen;
3319
3360
  const canMutate = shell.isComposerEnabled === true;
3320
3361
  const agentsListEpoch = shell.agentsListEpoch;
3321
- const showSchedulesColumn = scheduleServer != null;
3322
- const canManageSchedules = scheduleServer != null;
3362
+ const showSchedulesColumn = isSchedulesChromeEnabled({ schedules: scheduleServer });
3363
+ const canManageSchedules = showSchedulesColumn;
3364
+ const canOpenAgentDetails = isSessionsChromeEnabled({ sessions: sessionsServer });
3323
3365
  useEffect9(() => {
3324
3366
  if (!open) setQuery("");
3325
3367
  }, [open]);
@@ -3429,7 +3471,7 @@ function AgentsLibrary({ onSelectAgent }) {
3429
3471
  onCreateSchedule: () => openSchedulesForAgent({ agentId: id, isNew: true }),
3430
3472
  onManageSchedules: () => openSchedulesForAgent({ agentId: id })
3431
3473
  } : {},
3432
- ...sessionsServer != null && agentId != null ? {
3474
+ ...canOpenAgentDetails && agentId != null ? {
3433
3475
  onOpen: () => {
3434
3476
  updateShareSearch({
3435
3477
  agentId,
@@ -3477,7 +3519,7 @@ function AgentsLibraryButton({ className, compact = false }) {
3477
3519
  };
3478
3520
  }, [enabled, server, agentsListEpoch, compact]);
3479
3521
  if (!enabled) return null;
3480
- return /* @__PURE__ */ jsx42("div", { className: cn("relative min-w-0 w-full", className), children: /* @__PURE__ */ jsxs32(
3522
+ return /* @__PURE__ */ jsx42("div", { className: cn("relative min-w-0", compact ? "flex justify-center" : "w-full", className), children: /* @__PURE__ */ jsxs32(
3481
3523
  "button",
3482
3524
  {
3483
3525
  type: "button",
@@ -3487,14 +3529,15 @@ function AgentsLibraryButton({ className, compact = false }) {
3487
3529
  className: auiButtonClass({
3488
3530
  variant: "ghost",
3489
3531
  className: cn(
3490
- "rounded-md text-sm font-medium text-text-primary shadow-none hover:bg-secondary-button-hover hover:text-ghost-button-text",
3491
- compact ? "h-auto w-full flex-col gap-1.5 whitespace-normal px-1 py-3 text-[0.625rem] leading-tight !justify-center" : "h-8 w-full !justify-start px-2.5",
3492
- libraryOpen && "bg-primary-button-bg text-primary-button-text hover:bg-primary-button-hover hover:text-primary-button-text"
3532
+ sidebarButtonRadiusClassName,
3533
+ "font-normal text-sidebar-text shadow-none hover:bg-secondary-button-hover hover:text-ghost-button-text",
3534
+ compact ? sidebarRailButtonClassName : "h-8 w-full !justify-start px-2.5 text-sm",
3535
+ libraryOpen && "bg-primary-button-bg font-medium text-primary-button-text hover:bg-primary-button-hover hover:text-primary-button-text"
3493
3536
  )
3494
3537
  }),
3495
3538
  onClick: () => shell?.setLibraryOpen(true),
3496
3539
  children: [
3497
- /* @__PURE__ */ jsx42(Icon, { name: "library-big", size: compact ? 16 : void 0 }),
3540
+ /* @__PURE__ */ jsx42(Icon, { name: "library-big", size: compact ? 14 : void 0 }),
3498
3541
  compact ? /* @__PURE__ */ jsx42("span", { className: "text-center", children: "Agents" }) : /* @__PURE__ */ jsxs32(Fragment7, { children: [
3499
3542
  /* @__PURE__ */ jsxs32("span", { className: "truncate", children: [
3500
3543
  "Agents",
@@ -3606,7 +3649,7 @@ function AttachmentCard({
3606
3649
  "data-slot": "aui_attachment-preview",
3607
3650
  style: previewSize,
3608
3651
  className: cn(
3609
- "aui-attachment-preview relative shrink-0 cursor-pointer overflow-hidden rounded-lg border",
3652
+ "aui-attachment-preview relative shrink-0 cursor-pointer overflow-hidden rounded-lg border border-primary-button-bg/20",
3610
3653
  previewRem == null && "size-24",
3611
3654
  className
3612
3655
  ),
@@ -3619,16 +3662,13 @@ function AttachmentCard({
3619
3662
  {
3620
3663
  "data-slot": "aui_attachment-chip",
3621
3664
  style: previewRem != null ? { maxWidth: `${previewRem}rem` } : void 0,
3622
- className: cn(
3623
- "aui-attachment-chip bg-secondary-bg flex max-w-full shrink-0 items-center gap-2 rounded-lg border px-2 py-1.5",
3624
- className
3625
- ),
3665
+ className: cn("aui-attachment-chip relative size-14 shrink-0", className),
3626
3666
  children: [
3627
- /* @__PURE__ */ jsx45("div", { className: "bg-primary-bg flex size-7 shrink-0 items-center justify-center overflow-hidden rounded-md border", children: isImage && previewSrc ? /* @__PURE__ */ jsxs34(Avatar, { className: "size-7 rounded-none", children: [
3628
- /* @__PURE__ */ jsx45(AvatarImage, { src: previewSrc, alt: name, className: "object-cover" }),
3629
- /* @__PURE__ */ jsx45(AvatarFallback, { children: /* @__PURE__ */ jsx45(Icon, { name: "file", size: "1rem", className: "text-text-secondary" }) })
3630
- ] }) : /* @__PURE__ */ jsx45(Icon, { name: "file", size: "1rem", className: "text-text-secondary" }) }),
3631
- /* @__PURE__ */ jsx45("span", { className: "text-text-primary min-w-0 truncate text-sm", children: name }),
3667
+ /* @__PURE__ */ jsx45(Tooltip, { content: name, side: "top", triggerClassName: "size-full", children: /* @__PURE__ */ jsx45("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__ */ jsxs34(Avatar, { className: "size-full rounded-none", children: [
3668
+ /* @__PURE__ */ jsx45(AvatarImage, { src: isImage ? previewSrc : void 0, alt: name, className: "object-cover" }),
3669
+ /* @__PURE__ */ jsx45(AvatarFallback, { className: "rounded-none", children: /* @__PURE__ */ jsx45(Icon, { name: "file", size: "1.5rem", className: "text-text-secondary" }) })
3670
+ ] }) }) }),
3671
+ /* @__PURE__ */ jsx45("span", { className: "sr-only", children: name }),
3632
3672
  onRemove && /* @__PURE__ */ jsx45(
3633
3673
  "button",
3634
3674
  {
@@ -3638,10 +3678,13 @@ function AttachmentCard({
3638
3678
  className: auiButtonClass({
3639
3679
  variant: "ghost",
3640
3680
  size: "icon",
3641
- className: "size-6 shrink-0 rounded-full"
3681
+ className: "aui-attachment-tile-remove absolute inset-e-1 top-1 z-10 size-5 rounded-full bg-black/50 text-white hover:bg-black/70 hover:text-white"
3642
3682
  }),
3643
- onClick: onRemove,
3644
- children: /* @__PURE__ */ jsx45(Icon, { name: "xmark" })
3683
+ onClick: (e) => {
3684
+ e.stopPropagation();
3685
+ onRemove();
3686
+ },
3687
+ children: /* @__PURE__ */ jsx45(Icon, { name: "xmark", size: "0.75rem" })
3645
3688
  }
3646
3689
  )
3647
3690
  ]
@@ -3857,7 +3900,7 @@ function ClearChatButton() {
3857
3900
  {
3858
3901
  type: "button",
3859
3902
  title: "Clear chat",
3860
- className: auiButtonClass({ variant: "ghost", size: "sm" }),
3903
+ className: auiButtonClass({ variant: "ghost", size: "large" }),
3861
3904
  onClick: () => shell.clearChat(),
3862
3905
  children: [
3863
3906
  /* @__PURE__ */ jsx49(Icon, { name: "broom", size: "0.875rem" }),
@@ -4017,26 +4060,18 @@ function ComposerRightSection(_) {
4017
4060
  }
4018
4061
  function ComposerSendButton({ canSubmit, isRunning, onSubmit, onCancel }) {
4019
4062
  if (isRunning) {
4020
- return /* @__PURE__ */ jsxs39(
4021
- "button",
4022
- {
4023
- type: "button",
4024
- className: auiButtonClass({ size: "sm" }),
4025
- disabled: !onCancel,
4026
- onClick: onCancel,
4027
- "aria-label": "Cancel",
4028
- children: [
4029
- /* @__PURE__ */ jsx51(Spinner, { size: 14 }),
4030
- "Cancel"
4031
- ]
4032
- }
4033
- );
4063
+ return /* @__PURE__ */ jsxs39(Button.Primary, { type: "button", size: "small", disabled: !onCancel, onClick: onCancel, "aria-label": "Cancel", children: [
4064
+ /* @__PURE__ */ jsx51(Spinner, { size: 14 }),
4065
+ "Cancel"
4066
+ ] });
4034
4067
  }
4035
4068
  return /* @__PURE__ */ jsx51(
4036
- "button",
4069
+ Button.Primary,
4037
4070
  {
4038
4071
  type: "button",
4039
- className: auiButtonClass({ size: "icon" }),
4072
+ size: "icon",
4073
+ "data-slot": "aui_composer-send",
4074
+ className: "shadow-none",
4040
4075
  disabled: !canSubmit,
4041
4076
  onClick: onSubmit,
4042
4077
  title: "Send message",
@@ -4589,6 +4624,9 @@ function modelParamSummary(params) {
4589
4624
  function enabledLabel(value, defaultValue) {
4590
4625
  return value ?? defaultValue ? "on" : "off";
4591
4626
  }
4627
+ function runtimeConfigValueClassName(value) {
4628
+ return value === "off" ? "text-failure-bg font-medium" : "text-primary-button-bg font-medium";
4629
+ }
4592
4630
  function runtimeConfigSummary(config) {
4593
4631
  return [
4594
4632
  { label: "iteration limit", value: String(config?.iterationLimit ?? 100) },
@@ -4642,7 +4680,10 @@ function McpServerChip({
4642
4680
  "flex h-full items-center justify-center border-r border-border px-1.5 transition-colors",
4643
4681
  preload ? "bg-primary-button-bg text-primary-button-text" : "text-text-secondary hover:bg-ghost-button-hover"
4644
4682
  ),
4645
- onClick: onTogglePreload,
4683
+ onClick: (event) => {
4684
+ event.stopPropagation();
4685
+ onTogglePreload();
4686
+ },
4646
4687
  children: /* @__PURE__ */ jsx56(Icon, { name: "book-open", className: "size-3.5" })
4647
4688
  }
4648
4689
  )
@@ -4660,7 +4701,10 @@ function McpServerChip({
4660
4701
  size: "icon",
4661
4702
  className: "mx-1 size-5"
4662
4703
  }),
4663
- onClick: onRemove,
4704
+ onClick: (event) => {
4705
+ event.stopPropagation();
4706
+ onRemove();
4707
+ },
4664
4708
  children: /* @__PURE__ */ jsx56(Icon, { name: "xmark", className: "size-3" })
4665
4709
  }
4666
4710
  ) : /* @__PURE__ */ jsx56("span", { className: "pr-2" })
@@ -4669,28 +4713,58 @@ function McpServerChip({
4669
4713
  function AgentConfigSection({
4670
4714
  title,
4671
4715
  description,
4716
+ icon,
4717
+ actionIcon = "pencil",
4718
+ actionLabel,
4672
4719
  onEdit,
4673
4720
  children
4674
4721
  }) {
4675
- return /* @__PURE__ */ jsxs44("section", { className: "border-b border-border px-4 py-4", children: [
4676
- /* @__PURE__ */ jsxs44("div", { className: "mb-3 flex items-start justify-between gap-3", children: [
4677
- /* @__PURE__ */ jsxs44("div", { children: [
4678
- /* @__PURE__ */ jsx56("h3", { className: "text-text-primary text-sm font-semibold", children: title }),
4679
- description ? /* @__PURE__ */ jsx56("p", { className: "text-text-secondary mt-0.5 text-xs", children: description }) : null
4680
- ] }),
4681
- onEdit ? /* @__PURE__ */ jsx56(
4682
- "button",
4683
- {
4684
- type: "button",
4685
- "aria-label": `Edit ${title}`,
4686
- className: auiButtonClass({ variant: "ghost", size: "icon", className: "size-7" }),
4687
- onClick: onEdit,
4688
- children: /* @__PURE__ */ jsx56(Icon, { name: "pencil", className: "size-3.5" })
4689
- }
4690
- ) : null
4691
- ] }),
4692
- children
4693
- ] });
4722
+ const action = actionLabel ?? `Edit ${title}`;
4723
+ return /* @__PURE__ */ jsxs44(
4724
+ "section",
4725
+ {
4726
+ className: cn("group border-b border-border px-4 py-4", onEdit ? "cursor-pointer" : null),
4727
+ role: onEdit ? "button" : void 0,
4728
+ tabIndex: onEdit ? 0 : void 0,
4729
+ onClick: onEdit,
4730
+ onKeyDown: onEdit ? (event) => {
4731
+ if (event.target !== event.currentTarget) return;
4732
+ if (event.key !== "Enter" && event.key !== " ") return;
4733
+ event.preventDefault();
4734
+ onEdit();
4735
+ } : void 0,
4736
+ children: [
4737
+ title && /* @__PURE__ */ jsxs44("div", { className: cn("flex items-start justify-between gap-3", children ? "mb-3" : null), children: [
4738
+ /* @__PURE__ */ jsxs44("div", { className: "flex min-w-0 items-start gap-2", children: [
4739
+ icon ? /* @__PURE__ */ jsx56(Icon, { name: icon, className: "text-text-secondary mt-0.5 size-4 shrink-0" }) : null,
4740
+ /* @__PURE__ */ jsxs44("div", { className: "min-w-0", children: [
4741
+ /* @__PURE__ */ jsx56("h3", { className: "text-text-primary text-sm font-semibold", children: title }),
4742
+ description ? /* @__PURE__ */ jsx56("p", { className: "text-text-secondary mt-0.5 text-xs", children: description }) : null
4743
+ ] })
4744
+ ] }),
4745
+ onEdit ? /* @__PURE__ */ jsx56(
4746
+ "button",
4747
+ {
4748
+ type: "button",
4749
+ "aria-label": action,
4750
+ title: action,
4751
+ className: auiButtonClass({
4752
+ variant: "ghost",
4753
+ size: "icon",
4754
+ className: "size-7 opacity-0 transition-opacity group-hover:opacity-100 focus-visible:opacity-100"
4755
+ }),
4756
+ onClick: (event) => {
4757
+ event.stopPropagation();
4758
+ onEdit();
4759
+ },
4760
+ children: /* @__PURE__ */ jsx56(Icon, { name: actionIcon, className: "size-3.5" })
4761
+ }
4762
+ ) : null
4763
+ ] }),
4764
+ children
4765
+ ]
4766
+ }
4767
+ );
4694
4768
  }
4695
4769
  function AgentConfigPanel({
4696
4770
  spec,
@@ -4732,7 +4806,7 @@ function AgentConfigPanel({
4732
4806
  ) : null
4733
4807
  ] }),
4734
4808
  /* @__PURE__ */ jsxs44("div", { className: "min-h-0 flex-1 overflow-y-auto", children: [
4735
- /* @__PURE__ */ jsxs44(Section, { title: "Model", children: [
4809
+ /* @__PURE__ */ jsxs44(Section, { children: [
4736
4810
  /* @__PURE__ */ jsxs44("div", { className: "flex items-center gap-2", children: [
4737
4811
  /* @__PURE__ */ jsx56(
4738
4812
  ProviderMark,
@@ -4815,56 +4889,45 @@ function AgentConfigPanel({
4815
4889
  {
4816
4890
  title: "Runtime Config",
4817
4891
  description: "Control execution and context behavior.",
4892
+ actionIcon: "sliders",
4818
4893
  onEdit: () => onOpenEditor("runtime"),
4819
4894
  children: /* @__PURE__ */ jsx56("dl", { className: "text-text-secondary flex flex-wrap gap-x-3 gap-y-1 text-xs leading-relaxed", children: runtimeConfig.map((entry) => /* @__PURE__ */ jsxs44("div", { className: "flex gap-1", children: [
4820
4895
  /* @__PURE__ */ jsxs44("dt", { children: [
4821
4896
  entry.label,
4822
4897
  ":"
4823
4898
  ] }),
4824
- /* @__PURE__ */ jsx56("dd", { className: "text-text-primary font-medium", children: entry.value })
4899
+ /* @__PURE__ */ jsx56("dd", { className: runtimeConfigValueClassName(entry.value), children: entry.value })
4825
4900
  ] }, entry.label)) })
4826
4901
  }
4827
4902
  ),
4828
- /* @__PURE__ */ jsxs44("section", { className: "group border-b border-border px-4 py-4", children: [
4829
- /* @__PURE__ */ jsxs44("div", { className: cn("flex items-center justify-between gap-3", mcp.length ? "mb-3" : null), children: [
4830
- /* @__PURE__ */ jsxs44("div", { className: "flex min-w-0 items-center gap-2", children: [
4831
- /* @__PURE__ */ jsx56(Icon, { name: "mcp-server", className: "text-text-secondary size-4 shrink-0" }),
4832
- /* @__PURE__ */ jsx56("h3", { className: "text-text-primary text-sm font-semibold", children: "MCP Servers" })
4833
- ] }),
4834
- /* @__PURE__ */ jsx56(
4835
- "button",
4903
+ /* @__PURE__ */ jsx56(
4904
+ Section,
4905
+ {
4906
+ title: "MCP Servers",
4907
+ icon: "mcp-server",
4908
+ actionIcon: "plus",
4909
+ actionLabel: "Add MCP server",
4910
+ onEdit: () => onOpenEditor("mcp"),
4911
+ children: mcp.length ? /* @__PURE__ */ jsx56("div", { className: "flex flex-wrap gap-1.5", children: mcp.map((item) => /* @__PURE__ */ jsx56(
4912
+ McpServerChip,
4836
4913
  {
4837
- type: "button",
4838
- "aria-label": "Add MCP server",
4839
- className: auiButtonClass({
4840
- variant: "ghost",
4841
- size: "icon",
4842
- className: "size-7 opacity-0 transition-opacity group-hover:opacity-100 focus-visible:opacity-100"
4843
- }),
4844
- onClick: () => onOpenEditor("mcp"),
4845
- children: /* @__PURE__ */ jsx56(Icon, { name: "plus", className: "size-3.5" })
4846
- }
4847
- )
4848
- ] }),
4849
- mcp.length ? /* @__PURE__ */ jsx56("div", { className: "flex flex-wrap gap-1.5", children: mcp.map((item) => /* @__PURE__ */ jsx56(
4850
- McpServerChip,
4851
- {
4852
- item,
4853
- onRemove: onChange ? () => onChange({
4854
- ...spec,
4855
- mcpServers: mcp.filter((mount) => mount.id !== item.id).map((mount) => mount.value)
4856
- }) : void 0,
4857
- onTogglePreload: onChange ? () => onChange({
4858
- ...spec,
4859
- mcpServers: mcp.map(
4860
- (mount) => mount.id === item.id ? withPreload(mount.value, !preloadFromMount(mount.value)) : mount.value
4861
- )
4862
- }) : void 0
4863
- },
4864
- item.id
4865
- )) }) : null
4866
- ] }),
4867
- /* @__PURE__ */ jsx56(Section, { title: "Skills", onEdit: () => onOpenEditor("skills"), children: !skillsAvailable ? /* @__PURE__ */ jsx56("p", { className: "text-text-secondary text-xs", children: "Skills require an available sandbox." }) : skills.length ? /* @__PURE__ */ jsx56("div", { className: "flex flex-wrap gap-1.5", children: skills.map((item) => /* @__PURE__ */ jsx56("span", { className: "rounded-md border border-border px-2 py-1 text-xs", children: item.name }, item.id)) }) : /* @__PURE__ */ jsx56("p", { className: "text-text-secondary text-xs", children: "No skills selected." }) })
4914
+ item,
4915
+ onRemove: onChange ? () => onChange({
4916
+ ...spec,
4917
+ mcpServers: mcp.filter((mount) => mount.id !== item.id).map((mount) => mount.value)
4918
+ }) : void 0,
4919
+ onTogglePreload: onChange ? () => onChange({
4920
+ ...spec,
4921
+ mcpServers: mcp.map(
4922
+ (mount) => mount.id === item.id ? withPreload(mount.value, !preloadFromMount(mount.value)) : mount.value
4923
+ )
4924
+ }) : void 0
4925
+ },
4926
+ item.id
4927
+ )) }) : null
4928
+ }
4929
+ ),
4930
+ /* @__PURE__ */ jsx56(Section, { title: "Skills", actionIcon: "plus", actionLabel: "Add skill", onEdit: () => onOpenEditor("skills"), children: !skillsAvailable ? /* @__PURE__ */ jsx56("p", { className: "text-text-secondary text-xs", children: "Skills require an available sandbox." }) : skills.length ? /* @__PURE__ */ jsx56("div", { className: "flex flex-wrap gap-1.5", children: skills.map((item) => /* @__PURE__ */ jsx56("span", { className: "rounded-md border border-border px-2 py-1 text-xs", children: item.name }, item.id)) }) : /* @__PURE__ */ jsx56("p", { className: "text-text-secondary text-xs", children: "No skills selected." }) })
4868
4931
  ] })
4869
4932
  ] });
4870
4933
  }
@@ -5047,7 +5110,7 @@ function AgentInstructionsDrawer({
5047
5110
  anchor: "right",
5048
5111
  size: "lg",
5049
5112
  "aria-label": "Edit Instructions",
5050
- footer: /* @__PURE__ */ jsx58("div", { className: "flex justify-end", children: /* @__PURE__ */ jsx58("button", { type: "button", className: auiButtonClass({ variant: "default" }), onClick: save, children: "Save" }) }),
5113
+ footer: /* @__PURE__ */ jsx58("div", { className: "flex justify-end", children: /* @__PURE__ */ jsx58(Button.Primary, { type: "button", onClick: save, children: "Save" }) }),
5051
5114
  children: /* @__PURE__ */ jsxs46("div", { className: "flex min-h-0 flex-1 flex-col gap-6 p-5", children: [
5052
5115
  /* @__PURE__ */ jsxs46("section", { children: [
5053
5116
  /* @__PURE__ */ jsx58("label", { htmlFor: `${fieldId}-instructions`, className: "text-text-primary text-sm font-semibold", children: "Agent instructions" }),
@@ -5070,18 +5133,10 @@ function AgentInstructionsDrawer({
5070
5133
  /* @__PURE__ */ jsx58("h3", { className: "text-text-primary text-sm font-semibold", children: "User Messages" }),
5071
5134
  /* @__PURE__ */ jsx58("p", { className: "text-text-secondary mt-1 text-xs", children: "Add initial messages to every new agent session." })
5072
5135
  ] }),
5073
- /* @__PURE__ */ jsxs46(
5074
- "button",
5075
- {
5076
- type: "button",
5077
- className: auiButtonClass({ variant: "outline", size: "sm" }),
5078
- onClick: addUserMessage,
5079
- children: [
5080
- /* @__PURE__ */ jsx58(Icon, { name: "plus", className: "size-3.5" }),
5081
- "Add User Message"
5082
- ]
5083
- }
5084
- )
5136
+ /* @__PURE__ */ jsxs46(Button.Secondary, { type: "button", size: "small", onClick: addUserMessage, children: [
5137
+ /* @__PURE__ */ jsx58(Icon, { name: "plus", className: "size-3.5" }),
5138
+ "Add User Message"
5139
+ ] })
5085
5140
  ] }),
5086
5141
  messageDrafts.length > 0 ? /* @__PURE__ */ jsx58("div", { className: "mt-4 flex flex-col gap-4", children: messageDrafts.map((message, index) => {
5087
5142
  const messageId = `${fieldId}-user-message-${message.id}`;
@@ -5211,7 +5266,7 @@ var useMCPAuth = ({ callbackPath } = {}) => {
5211
5266
 
5212
5267
  // src/atoms/lib/useInfiniteScrollSentinel.ts
5213
5268
  import { useCallback as useCallback8, useEffect as useEffect15, useRef as useRef9, useState as useState24 } from "react";
5214
- var DEFAULT_ROOT_MARGIN = "3rem";
5269
+ var DEFAULT_ROOT_MARGIN = "48px";
5215
5270
  function useInfiniteScrollSentinel({
5216
5271
  enabled,
5217
5272
  hasMore,
@@ -5329,10 +5384,10 @@ function selectedToolsHeaderLabel(mcpMounts) {
5329
5384
  function ConnectNowButton({ connectorId, onConnected }) {
5330
5385
  const { handleAuthorize, isOAuthLoading } = useMCPAuth();
5331
5386
  return /* @__PURE__ */ jsx60(
5332
- "button",
5387
+ Button.Primary,
5333
5388
  {
5334
5389
  type: "button",
5335
- className: auiButtonClass({ className: "min-w-44" }),
5390
+ className: "min-w-44",
5336
5391
  disabled: isOAuthLoading,
5337
5392
  onClick: () => {
5338
5393
  void handleAuthorize(connectorId, (isSuccess) => {
@@ -5437,7 +5492,7 @@ function AgentMcpEditorContent({
5437
5492
  value: query,
5438
5493
  onChange: (event) => onQueryChange(event.target.value),
5439
5494
  placeholder: "Search MCP",
5440
- className: auiInputClass("h-9 w-full pl-7")
5495
+ className: auiInputClass("h-8 w-full pl-7")
5441
5496
  }
5442
5497
  )
5443
5498
  ] }),
@@ -5481,7 +5536,7 @@ function AgentMcpEditorContent({
5481
5536
  "button",
5482
5537
  {
5483
5538
  type: "button",
5484
- className: auiButtonClass({ variant: "ghost", size: "sm" }),
5539
+ className: auiButtonClass({ variant: "ghost", size: "small" }),
5485
5540
  onClick: loadMoreConnectors,
5486
5541
  children: "Retry loading connectors"
5487
5542
  }
@@ -5500,10 +5555,10 @@ function AgentMcpEditorContent({
5500
5555
  /* @__PURE__ */ jsx60("span", { className: "bg-border h-px flex-1" })
5501
5556
  ] }),
5502
5557
  /* @__PURE__ */ jsx60(
5503
- "button",
5558
+ Button.Secondary,
5504
5559
  {
5505
5560
  type: "button",
5506
- className: auiButtonClass({ variant: "outline", className: "min-w-44" }),
5561
+ className: "min-w-44",
5507
5562
  disabled: activeMount !== void 0,
5508
5563
  onClick: connectDuringChat,
5509
5564
  children: "Connect During Chat"
@@ -5554,7 +5609,7 @@ function AgentMcpEditorContent({
5554
5609
  value: toolQuery,
5555
5610
  onChange: (event) => setToolQuery(event.target.value),
5556
5611
  placeholder: "Search Tools",
5557
- className: auiInputClass("h-9 w-full pl-7")
5612
+ className: auiInputClass("h-8 w-full pl-7")
5558
5613
  }
5559
5614
  )
5560
5615
  ] }),
@@ -5562,15 +5617,7 @@ function AgentMcpEditorContent({
5562
5617
  toolsLoading ? /* @__PURE__ */ jsx60("div", { className: "flex h-full min-h-24 items-center justify-center p-3", "aria-label": "Loading tools", children: /* @__PURE__ */ jsx60(Spinner, { size: 20, className: "text-text-secondary" }) }) : null,
5563
5618
  toolsError ? /* @__PURE__ */ jsxs47("div", { className: "p-3", children: [
5564
5619
  /* @__PURE__ */ jsx60("p", { className: "text-failure-bg text-sm", children: toolsError }),
5565
- /* @__PURE__ */ jsx60(
5566
- "button",
5567
- {
5568
- type: "button",
5569
- className: auiButtonClass({ variant: "secondary", size: "sm", className: "mt-2" }),
5570
- onClick: onRetryTools,
5571
- children: "Retry"
5572
- }
5573
- )
5620
+ /* @__PURE__ */ jsx60(Button.Secondary, { type: "button", size: "small", className: "mt-2", onClick: onRetryTools, children: "Retry" })
5574
5621
  ] }) : null,
5575
5622
  !toolsLoading ? filteredTools.map((tool) => {
5576
5623
  const checked = enabledTools === "all" || enabledTools.includes(tool.name);
@@ -5989,7 +6036,7 @@ function AgentModelSettingsContent({ spec, model, onChange }) {
5989
6036
  value: params.reasoningEffort ?? "",
5990
6037
  disabled: params.reasoningEffort === void 0,
5991
6038
  "aria-label": "Reasoning effort value",
5992
- className: auiInputClass("mt-2 h-9 cursor-pointer py-1.5"),
6039
+ className: auiInputClass("mt-2 h-8 cursor-pointer py-1.5"),
5993
6040
  onChange: (event) => setParam("reasoningEffort", event.target.value),
5994
6041
  children: reasoningEfforts.map((effort) => /* @__PURE__ */ jsx64("option", { value: effort, children: effort }, effort))
5995
6042
  }
@@ -6019,7 +6066,7 @@ function AgentResourceConfigModal({ editor, onClose, ...contentProps }) {
6019
6066
  className: selectingMcp ? "md:w-[min(64rem,calc(100%-3rem))] md:max-w-5xl" : "md:w-[min(40rem,calc(100%-3rem))] md:max-w-2xl",
6020
6067
  contentSized: true,
6021
6068
  "aria-label": selectingMcp ? "Select MCP Tools" : "Edit skills",
6022
- footer: selectingMcp ? /* @__PURE__ */ jsx65("div", { className: "flex justify-end", children: /* @__PURE__ */ jsx65("button", { type: "button", className: auiButtonClass(), onClick: onClose, children: "Save" }) }) : void 0,
6069
+ footer: selectingMcp ? /* @__PURE__ */ jsx65("div", { className: "flex justify-end", children: /* @__PURE__ */ jsx65(Button.Primary, { type: "button", onClick: onClose, children: "Save" }) }) : void 0,
6023
6070
  children: editor ? /* @__PURE__ */ jsx65(AgentResourceEditorContent2, { editor, ...contentProps }) : null
6024
6071
  }
6025
6072
  );
@@ -6074,6 +6121,7 @@ function parsePositiveInteger(raw) {
6074
6121
  const parsed = Number(raw);
6075
6122
  return Number.isInteger(parsed) && parsed > 0 ? parsed : null;
6076
6123
  }
6124
+ var NO_SANDBOX_PROVIDER_HINT = "No sandbox provider yet, add one in Settings \u2192 Sandbox";
6077
6125
  function AgentRuntimeConfigFields({
6078
6126
  value,
6079
6127
  sandboxAvailable,
@@ -6110,6 +6158,7 @@ function AgentRuntimeConfigFields({
6110
6158
  description: "Provide an isolated environment for code, files, and skills.",
6111
6159
  checked: sandboxEnabled,
6112
6160
  disabled: !sandboxAvailable || hasSkills,
6161
+ disabledTooltip: !sandboxAvailable ? NO_SANDBOX_PROVIDER_HINT : hasSkills ? "Always on while skills are attached \u2014 remove them to turn it off" : void 0,
6113
6162
  update: (enabled) => ({ ...value, sandbox: { ...value.sandbox, enabled } })
6114
6163
  };
6115
6164
  const fileDownloadsField = {
@@ -6140,6 +6189,7 @@ function AgentRuntimeConfigFields({
6140
6189
  description: "Move large tool output to the sandbox and retain a preview.",
6141
6190
  checked: value.contextManagement?.largeToolResponse?.enabled ?? true,
6142
6191
  disabled: !sandboxAvailable,
6192
+ disabledTooltip: !sandboxAvailable ? `Offloading needs a sandbox. ${NO_SANDBOX_PROVIDER_HINT}` : void 0,
6143
6193
  update: (enabled) => ({
6144
6194
  ...value,
6145
6195
  contextManagement: {
@@ -6151,26 +6201,48 @@ function AgentRuntimeConfigFields({
6151
6201
  };
6152
6202
  const runtimeFields = [sandboxField, fileDownloadsField, compactionField, largeToolResponseField];
6153
6203
  const compactionThreshold = value.contextManagement?.compaction?.trigger?.value ?? 5e4;
6154
- const switchField = (field, className = "") => /* @__PURE__ */ jsxs51("label", { className: className || "flex items-center justify-between gap-3 py-1.5", children: [
6155
- /* @__PURE__ */ jsxs51("span", { className: "min-w-0", children: [
6156
- /* @__PURE__ */ jsx67("span", { className: "text-text-primary block text-xs font-medium", children: field.label }),
6157
- layout === "detailed" ? /* @__PURE__ */ jsx67("span", { className: "text-text-secondary mt-0.5 block text-xs leading-snug", children: field.description }) : null
6158
- ] }),
6159
- /* @__PURE__ */ jsx67(
6160
- Switch,
6161
- {
6162
- checked: field.checked,
6163
- disabled: disabled || field.disabled,
6164
- onCheckedChange: (enabled) => onChange(field.update(enabled)),
6165
- "aria-label": field.label
6166
- }
6167
- )
6168
- ] }, field.label);
6204
+ const switchField = ({
6205
+ field,
6206
+ className,
6207
+ wrapperClassName
6208
+ }) => /* @__PURE__ */ jsx67(
6209
+ Tooltip,
6210
+ {
6211
+ content: field.disabledTooltip ?? "",
6212
+ triggerClassName: cn("flex w-full min-w-0", wrapperClassName),
6213
+ children: /* @__PURE__ */ jsxs51("label", { className: cn("flex w-full", className ?? "items-center justify-between gap-3 py-1.5"), children: [
6214
+ /* @__PURE__ */ jsxs51("span", { className: "min-w-0", children: [
6215
+ /* @__PURE__ */ jsx67("span", { className: cn("text-text-primary text-xs", layout === "detailed" && "block font-medium"), children: field.label }),
6216
+ layout === "detailed" ? /* @__PURE__ */ jsx67("span", { className: "text-text-secondary mt-0.5 block text-xs leading-snug", children: field.description }) : null
6217
+ ] }),
6218
+ /* @__PURE__ */ jsx67(
6219
+ Switch,
6220
+ {
6221
+ checked: field.checked,
6222
+ disabled: disabled || field.disabled,
6223
+ onCheckedChange: (enabled) => onChange(field.update(enabled)),
6224
+ "aria-label": field.label
6225
+ }
6226
+ )
6227
+ ] })
6228
+ },
6229
+ field.label
6230
+ );
6169
6231
  if (layout === "detailed") {
6170
6232
  return /* @__PURE__ */ jsxs51("div", { className: "space-y-5", children: [
6171
- showCapabilities ? /* @__PURE__ */ jsx67("div", { className: "grid gap-3 md:grid-cols-3", children: capabilityFields.map(
6172
- (field) => switchField(field, "flex min-h-24 items-start justify-between gap-3 rounded-lg border border-border p-3")
6173
- ) }) : null,
6233
+ showCapabilities ? (
6234
+ // Stacked below `md` so the bottom-sheet modal does not cram three labeled switches into one row.
6235
+ /* @__PURE__ */ jsx67("div", { className: "flex flex-col gap-3 md:flex-row", children: capabilityFields.map(
6236
+ (field, index) => switchField({
6237
+ field,
6238
+ className: "items-start justify-between gap-3",
6239
+ wrapperClassName: cn(
6240
+ "flex-1",
6241
+ index < capabilityFields.length - 1 && "border-b border-border pb-3 md:border-b-0 md:border-r md:pb-0 md:pr-3"
6242
+ )
6243
+ })
6244
+ ) })
6245
+ ) : null,
6174
6246
  /* @__PURE__ */ jsxs51("label", { className: "flex items-center justify-between gap-4 border-b border-border py-3", children: [
6175
6247
  /* @__PURE__ */ jsxs51("span", { children: [
6176
6248
  /* @__PURE__ */ jsx67("span", { className: "text-text-primary block text-sm font-medium", children: "Iteration limit" }),
@@ -6194,11 +6266,11 @@ function AgentRuntimeConfigFields({
6194
6266
  ] }),
6195
6267
  /* @__PURE__ */ jsxs51("div", { className: "divide-y divide-border", children: [
6196
6268
  /* @__PURE__ */ jsxs51("section", { className: "py-3", children: [
6197
- switchField(sandboxField, "flex items-center justify-between gap-4"),
6198
- /* @__PURE__ */ jsx67("div", { className: `mt-3 border-l-2 border-primary-button-bg/50 pl-3 ${sandboxEnabled ? "" : "opacity-50"}`, children: switchField(fileDownloadsField, "flex items-center justify-between gap-4") })
6269
+ switchField({ field: sandboxField, className: "items-center justify-between gap-4" }),
6270
+ /* @__PURE__ */ jsx67("div", { className: `mt-3 border-l-2 border-primary-button-bg/50 pl-3 ${sandboxEnabled ? "" : "opacity-50"}`, children: switchField({ field: fileDownloadsField, className: "items-center justify-between gap-4" }) })
6199
6271
  ] }),
6200
6272
  /* @__PURE__ */ jsxs51("section", { className: "py-3", children: [
6201
- switchField(compactionField, "flex items-center justify-between gap-4"),
6273
+ switchField({ field: compactionField, className: "items-center justify-between gap-4" }),
6202
6274
  /* @__PURE__ */ jsxs51(
6203
6275
  "label",
6204
6276
  {
@@ -6238,7 +6310,7 @@ function AgentRuntimeConfigFields({
6238
6310
  }
6239
6311
  )
6240
6312
  ] }),
6241
- switchField(largeToolResponseField, "flex items-center justify-between gap-4 py-3")
6313
+ switchField({ field: largeToolResponseField, className: "items-center justify-between gap-4 py-3" })
6242
6314
  ] })
6243
6315
  ] });
6244
6316
  }
@@ -6261,18 +6333,7 @@ function AgentRuntimeConfigFields({
6261
6333
  }
6262
6334
  )
6263
6335
  ] }),
6264
- [...runtimeFields, ...showCapabilities ? capabilityFields : []].map((field) => /* @__PURE__ */ jsxs51("label", { className: "flex items-center justify-between gap-3 py-1.5", children: [
6265
- /* @__PURE__ */ jsx67("span", { className: "text-text-primary text-xs", children: field.label }),
6266
- /* @__PURE__ */ jsx67(
6267
- Switch,
6268
- {
6269
- checked: field.checked,
6270
- disabled: disabled || field.disabled,
6271
- onCheckedChange: (enabled) => onChange(field.update(enabled)),
6272
- "aria-label": field.label
6273
- }
6274
- )
6275
- ] }, field.label))
6336
+ [...runtimeFields, ...showCapabilities ? capabilityFields : []].map((field) => switchField({ field }))
6276
6337
  ] });
6277
6338
  }
6278
6339
 
@@ -6343,7 +6404,7 @@ function AgentSkillsEditorContent({
6343
6404
  value: query,
6344
6405
  onChange: (event) => onQueryChange(event.target.value),
6345
6406
  placeholder: "Search skills",
6346
- className: auiInputClass("h-9 w-full pl-7")
6407
+ className: auiInputClass("h-8 w-full pl-7")
6347
6408
  }
6348
6409
  )
6349
6410
  ] }),
@@ -6654,7 +6715,7 @@ function DraftReasoningEffortSelector({ disabled, isRunning }) {
6654
6715
  title: "Select reasoning effort",
6655
6716
  className: auiButtonClass({
6656
6717
  variant: "ghost",
6657
- size: "sm",
6718
+ size: "small",
6658
6719
  className: cn(
6659
6720
  "h-8 max-w-[10rem] gap-1.5 rounded-full px-2 text-xs font-medium",
6660
6721
  "hover:bg-ghost-button-hover"
@@ -6741,6 +6802,8 @@ function Checkbox({ checked }) {
6741
6802
  function CatalogRow({
6742
6803
  title,
6743
6804
  description,
6805
+ logo,
6806
+ fallbackIcon,
6744
6807
  checked,
6745
6808
  disabled = false,
6746
6809
  onToggle,
@@ -6748,7 +6811,14 @@ function CatalogRow({
6748
6811
  action
6749
6812
  }) {
6750
6813
  const content = /* @__PURE__ */ jsxs57(Fragment13, { children: [
6751
- /* @__PURE__ */ jsx76("span", { className: "bg-secondary-bg text-text-secondary mt-0.5 flex size-7 shrink-0 items-center justify-center rounded text-xs font-semibold", children: title.charAt(0).toUpperCase() }),
6814
+ /* @__PURE__ */ jsx76(
6815
+ "span",
6816
+ {
6817
+ className: "bg-secondary-bg text-text-secondary mt-0.5 flex size-7 shrink-0 items-center justify-center overflow-hidden rounded border border-border text-xs font-semibold",
6818
+ "aria-hidden": true,
6819
+ children: logo ? /* @__PURE__ */ jsx76(CatalogLogo, { src: logo, alt: title, className: "size-4" }) : fallbackIcon ? /* @__PURE__ */ jsx76(Icon, { name: fallbackIcon, className: "text-text-primary size-4" }) : title.charAt(0).toUpperCase()
6820
+ }
6821
+ ),
6752
6822
  /* @__PURE__ */ jsxs57("span", { className: "min-w-0 flex-1", children: [
6753
6823
  /* @__PURE__ */ jsx76("span", { className: "text-text-primary block truncate text-sm font-medium", children: title }),
6754
6824
  description ? /* @__PURE__ */ jsx76("span", { className: "text-text-secondary line-clamp-1 text-xs", children: description }) : null
@@ -6817,12 +6887,12 @@ function ConnectorConnectButton({
6817
6887
  }) {
6818
6888
  const { handleAuthorize, isOAuthLoading } = useMCPAuth();
6819
6889
  return /* @__PURE__ */ jsx76(
6820
- "button",
6890
+ Button.Secondary,
6821
6891
  {
6822
6892
  type: "button",
6823
6893
  "aria-label": `Connect ${connector.name}`,
6824
6894
  disabled: isOAuthLoading,
6825
- className: auiButtonClass({ variant: "secondary", size: "sm" }),
6895
+ size: "small",
6826
6896
  onKeyDown: (event) => {
6827
6897
  event.stopPropagation();
6828
6898
  },
@@ -6873,6 +6943,7 @@ function DraftCompositeSelector({ disabled, isRunning, onAttach }) {
6873
6943
  const {
6874
6944
  skills,
6875
6945
  connectors,
6946
+ connectorLogos,
6876
6947
  connectorsHasMore,
6877
6948
  connectorsLoadMoreFailed,
6878
6949
  connectorsLoadingMore,
@@ -7126,7 +7197,8 @@ function DraftCompositeSelector({ disabled, isRunning, onAttach }) {
7126
7197
  CatalogRow,
7127
7198
  {
7128
7199
  title: c.name,
7129
- description: c.description,
7200
+ logo: connectorLogos[c.name],
7201
+ fallbackIcon: "mcp-server",
7130
7202
  checked: selectedMcpIds.has(c.id),
7131
7203
  action: isUnauthenticatedDcrConnector(c) ? /* @__PURE__ */ jsx76(ConnectorConnectButton, { connector: c, onConnected: refreshConnectors }) : void 0,
7132
7204
  onToggle: () => toggleConnector(c)
@@ -7140,7 +7212,8 @@ function DraftCompositeSelector({ disabled, isRunning, onAttach }) {
7140
7212
  CatalogRow,
7141
7213
  {
7142
7214
  title: c.name,
7143
- description: c.description,
7215
+ logo: connectorLogos[c.name],
7216
+ fallbackIcon: "mcp-server",
7144
7217
  checked: selectedMcpIds.has(c.id),
7145
7218
  action: isUnauthenticatedDcrConnector(c) ? /* @__PURE__ */ jsx76(ConnectorConnectButton, { connector: c, onConnected: refreshConnectors }) : void 0,
7146
7219
  onToggle: () => toggleConnector(c)
@@ -7167,7 +7240,7 @@ function DraftCompositeSelector({ disabled, isRunning, onAttach }) {
7167
7240
  "button",
7168
7241
  {
7169
7242
  type: "button",
7170
- className: auiButtonClass({ variant: "ghost", size: "sm" }),
7243
+ className: auiButtonClass({ variant: "ghost", size: "small" }),
7171
7244
  onClick: loadMoreConnectors,
7172
7245
  children: "Retry loading connectors"
7173
7246
  }
@@ -7227,11 +7300,7 @@ function DraftCompositeSelector({ disabled, isRunning, onAttach }) {
7227
7300
  "aria-haspopup": "dialog",
7228
7301
  "aria-expanded": open,
7229
7302
  "aria-controls": open ? menuId : void 0,
7230
- className: auiButtonClass({
7231
- variant: "ghost",
7232
- size: "sm",
7233
- className: "h-8 rounded-md px-2 text-xs"
7234
- }),
7303
+ className: auiButtonClass({ variant: "ghost", size: "icon" }),
7235
7304
  onClick: () => {
7236
7305
  if (open) {
7237
7306
  setOpenAndFlush(false);
@@ -7239,7 +7308,7 @@ function DraftCompositeSelector({ disabled, isRunning, onAttach }) {
7239
7308
  }
7240
7309
  openPicker();
7241
7310
  },
7242
- children: /* @__PURE__ */ jsx76(Icon, { name: "wrench", className: "size-3.5" })
7311
+ children: /* @__PURE__ */ jsx76(Icon, { name: "wrench" })
7243
7312
  }
7244
7313
  ) }) : null,
7245
7314
  onAttach ? /* @__PURE__ */ jsx76(Tooltip, { content: "Attach a file", children: /* @__PURE__ */ jsx76(
@@ -7355,7 +7424,7 @@ function DraftModelSelector({ disabled, isRunning }) {
7355
7424
  title: "Select model",
7356
7425
  className: auiButtonClass({
7357
7426
  variant: "ghost",
7358
- size: "sm",
7427
+ size: "small",
7359
7428
  className: cn("h-8 max-w-48 gap-1.5 rounded-full px-2 text-xs font-medium", "hover:bg-ghost-button-hover")
7360
7429
  }),
7361
7430
  onClick: () => setOpen((v) => !v),
@@ -7396,7 +7465,7 @@ import ReactMarkdown from "react-markdown";
7396
7465
  import remarkGfm from "remark-gfm";
7397
7466
  import { Fragment as Fragment14, jsx as jsx79 } from "react/jsx-runtime";
7398
7467
  function preloadMarkdownOpenUI() {
7399
- return import("./OpenUiFenceBlock-2TV5TQ6P.js");
7468
+ return import("./OpenUiFenceBlock-JEPNPJ7U.js");
7400
7469
  }
7401
7470
  var LARGE_STREAMING_FENCE_CHARS = 8 * 1024;
7402
7471
  function getActiveStreamingFenceCode(content) {
@@ -8276,15 +8345,12 @@ function SaveAgentButtonContent({
8276
8345
  if (!visible) return null;
8277
8346
  return /* @__PURE__ */ jsxs61(Fragment16, { children: [
8278
8347
  /* @__PURE__ */ jsxs61(
8279
- "button",
8348
+ Button.Primary,
8280
8349
  {
8281
8350
  type: "button",
8351
+ size: "large",
8282
8352
  disabled: disabled || builder === null || agentSpec === null,
8283
- className: auiButtonClass({
8284
- variant: "default",
8285
- size: "sm",
8286
- className
8287
- }),
8353
+ className,
8288
8354
  onClick: () => void show(),
8289
8355
  children: [
8290
8356
  /* @__PURE__ */ jsx88(Icon, { name: "save", className: "size-3.5" }),
@@ -8380,7 +8446,7 @@ function SaveAgentForm({
8380
8446
  disabled: saving || intent === "update",
8381
8447
  onChange: (event) => onNameChange(event.target.value),
8382
8448
  placeholder: "release-notes",
8383
- className: auiInputClass("h-9 disabled:opacity-60")
8449
+ className: auiInputClass("h-8 disabled:opacity-60")
8384
8450
  }
8385
8451
  )
8386
8452
  ] }),
@@ -8422,17 +8488,8 @@ function SaveAgentForm({
8422
8488
  ) : null
8423
8489
  ] }),
8424
8490
  /* @__PURE__ */ jsxs62("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: [
8425
- /* @__PURE__ */ jsx89("button", { type: "button", disabled: saving, className: auiButtonClass({ variant: "secondary" }), onClick: onCancel, children: "Cancel" }),
8426
- /* @__PURE__ */ jsx89(
8427
- "button",
8428
- {
8429
- type: "button",
8430
- disabled: saving || !name.trim() || !spec.model.name.trim(),
8431
- className: auiButtonClass({ variant: "default" }),
8432
- onClick: onSave,
8433
- children: saving ? "Saving\u2026" : "Save changes"
8434
- }
8435
- )
8491
+ /* @__PURE__ */ jsx89(Button.Secondary, { type: "button", disabled: saving, onClick: onCancel, children: "Cancel" }),
8492
+ /* @__PURE__ */ jsx89(Button.Primary, { type: "button", disabled: saving || !name.trim() || !spec.model.name.trim(), onClick: onSave, children: saving ? "Saving\u2026" : "Save changes" })
8436
8493
  ] })
8437
8494
  ] });
8438
8495
  }
@@ -8540,7 +8597,7 @@ function SaveAgentFormFields({
8540
8597
  entry.label,
8541
8598
  ":"
8542
8599
  ] }),
8543
- /* @__PURE__ */ jsx90("dd", { className: "text-text-primary font-medium", children: entry.value })
8600
+ /* @__PURE__ */ jsx90("dd", { className: runtimeConfigValueClassName(entry.value), children: entry.value })
8544
8601
  ] }, entry.label)) })
8545
8602
  ] }),
8546
8603
  /* @__PURE__ */ jsxs63("div", { className: "mb-3", children: [
@@ -8646,10 +8703,10 @@ import { Fragment as Fragment18, jsx as jsx91, jsxs as jsxs64 } from "react/jsx-
8646
8703
  function SchedulesButton({ className, compact = false }) {
8647
8704
  const shell = useOptionalShellMode();
8648
8705
  const scheduleServer = useOptionalScheduleServer();
8649
- const enabled = scheduleServer != null && shell != null;
8706
+ const enabled = isSchedulesChromeEnabled({ schedules: scheduleServer }) && shell != null;
8650
8707
  const open = shell?.schedulesOpen === true;
8651
8708
  if (!enabled) return null;
8652
- return /* @__PURE__ */ jsx91("div", { className: cn("relative min-w-0 w-full", className), children: /* @__PURE__ */ jsxs64(
8709
+ return /* @__PURE__ */ jsx91("div", { className: cn("relative min-w-0", compact ? "flex justify-center" : "w-full", className), children: /* @__PURE__ */ jsxs64(
8653
8710
  "button",
8654
8711
  {
8655
8712
  type: "button",
@@ -8659,14 +8716,15 @@ function SchedulesButton({ className, compact = false }) {
8659
8716
  className: auiButtonClass({
8660
8717
  variant: "ghost",
8661
8718
  className: cn(
8662
- "rounded-md text-sm font-medium text-text-primary shadow-none hover:bg-secondary-button-hover hover:text-ghost-button-text",
8663
- compact ? "h-auto w-full flex-col gap-1.5 whitespace-normal px-1 py-3 text-[0.625rem] leading-tight !justify-center" : "h-8 w-full !justify-start px-2.5",
8664
- open && "bg-primary-button-bg text-primary-button-text hover:bg-primary-button-hover hover:text-primary-button-text"
8719
+ sidebarButtonRadiusClassName,
8720
+ "font-normal text-sidebar-text shadow-none hover:bg-secondary-button-hover hover:text-ghost-button-text",
8721
+ compact ? sidebarRailButtonClassName : "h-8 w-full !justify-start px-2.5 text-sm",
8722
+ open && "bg-primary-button-bg font-medium text-primary-button-text hover:bg-primary-button-hover hover:text-primary-button-text"
8665
8723
  )
8666
8724
  }),
8667
8725
  onClick: () => shell.setSchedulesOpen(!open),
8668
8726
  children: [
8669
- /* @__PURE__ */ jsx91(Icon, { name: "calendar-clock", size: compact ? 16 : void 0 }),
8727
+ /* @__PURE__ */ jsx91(Icon, { name: "calendar-clock", size: compact ? 14 : void 0 }),
8670
8728
  compact ? /* @__PURE__ */ jsx91("span", { className: "text-center", children: "Schedules" }) : /* @__PURE__ */ jsxs64(Fragment18, { children: [
8671
8729
  /* @__PURE__ */ jsx91("span", { className: "truncate", children: "Schedules" }),
8672
8730
  /* @__PURE__ */ jsx91(Icon, { name: "chevron-right", className: "ml-auto size-3.5 shrink-0 opacity-60" })
@@ -8731,8 +8789,9 @@ function SessionsBrowserButton({ className, compact = false }) {
8731
8789
  const shell = useOptionalShellMode();
8732
8790
  const { updateShareSearch } = useSessionShareSearch();
8733
8791
  const sessionsOpen = shell?.sessionsOpen === true;
8734
- if (sessionsServer == null || shell == null) return null;
8735
- return /* @__PURE__ */ jsx94("div", { className: cn("relative min-w-0 w-full", className), children: /* @__PURE__ */ jsxs66(
8792
+ const enabled = isSessionsChromeEnabled({ sessions: sessionsServer }) && shell != null;
8793
+ if (!enabled) return null;
8794
+ return /* @__PURE__ */ jsx94("div", { className: cn("relative min-w-0", compact ? "flex justify-center" : "w-full", className), children: /* @__PURE__ */ jsxs66(
8736
8795
  "button",
8737
8796
  {
8738
8797
  type: "button",
@@ -8742,9 +8801,10 @@ function SessionsBrowserButton({ className, compact = false }) {
8742
8801
  className: auiButtonClass({
8743
8802
  variant: "ghost",
8744
8803
  className: cn(
8745
- "rounded-md text-sm font-medium text-text-primary shadow-none hover:bg-secondary-button-hover hover:text-ghost-button-text",
8746
- compact ? "h-auto w-full flex-col gap-1.5 whitespace-normal px-1 py-3 text-[0.625rem] leading-tight !justify-center" : "h-8 w-full !justify-start px-2.5",
8747
- sessionsOpen && "bg-primary-button-bg text-primary-button-text hover:bg-primary-button-hover hover:text-primary-button-text"
8804
+ sidebarButtonRadiusClassName,
8805
+ "font-normal text-sidebar-text shadow-none hover:bg-secondary-button-hover hover:text-ghost-button-text",
8806
+ compact ? sidebarRailButtonClassName : "h-8 w-full !justify-start px-2.5 text-sm",
8807
+ sessionsOpen && "bg-primary-button-bg font-medium text-primary-button-text hover:bg-primary-button-hover hover:text-primary-button-text"
8748
8808
  )
8749
8809
  }),
8750
8810
  onClick: () => {
@@ -8760,7 +8820,7 @@ function SessionsBrowserButton({ className, compact = false }) {
8760
8820
  shell.setSessionsOpen(true);
8761
8821
  },
8762
8822
  children: [
8763
- /* @__PURE__ */ jsx94(Icon, { name: "message-square-text", size: compact ? 16 : void 0 }),
8823
+ /* @__PURE__ */ jsx94(Icon, { name: "message-square-text", size: compact ? 14 : void 0 }),
8764
8824
  compact ? /* @__PURE__ */ jsx94("span", { className: "text-center", children: "Sessions" }) : /* @__PURE__ */ jsxs66(Fragment19, { children: [
8765
8825
  /* @__PURE__ */ jsx94("span", { className: "truncate", children: "Sessions" }),
8766
8826
  /* @__PURE__ */ jsx94(Icon, { name: "chevron-right", className: "ml-auto size-3.5 shrink-0 opacity-60" })
@@ -9959,11 +10019,11 @@ function ThreadListNewButton({ className, children, style, ...rest }) {
9959
10019
  {
9960
10020
  type: "button",
9961
10021
  "aria-label": "Start new chat",
9962
- style: { borderRadius: "var(--thread-list-item-radius, 0.5rem)", ...style },
10022
+ style: { borderRadius: "var(--thread-list-item-radius, 0.75rem)", ...style },
9963
10023
  className: auiButtonClass({
9964
10024
  variant: "ghost",
9965
10025
  className: cn(
9966
- "!justify-start h-8 px-2.5 text-sm font-medium text-text-primary shadow-none hover:bg-secondary-button-hover hover:text-ghost-button-text",
10026
+ "!justify-start h-8 px-2.5 text-sm font-normal text-sidebar-text shadow-none hover:bg-secondary-button-hover hover:text-ghost-button-text",
9967
10027
  className
9968
10028
  )
9969
10029
  }),
@@ -10013,7 +10073,7 @@ function ThreadListRow({
10013
10073
  "data-slot": "aui_thread-list-item",
10014
10074
  "data-active": active || void 0,
10015
10075
  className: cn(
10016
- "group flex min-w-0 items-center gap-0.5 rounded-md transition-colors",
10076
+ "group flex min-w-0 items-center gap-0.5 rounded-[0.75rem] transition-colors",
10017
10077
  active ? "bg-dropdown-selected-item-bg text-dropdown-selected-item-text" : "text-text-secondary hover:bg-ghost-button-hover hover:text-text-primary",
10018
10078
  className
10019
10079
  ),
@@ -10023,11 +10083,11 @@ function ThreadListRow({
10023
10083
  {
10024
10084
  type: "button",
10025
10085
  onClick: onSelect,
10026
- style: { borderRadius: "var(--thread-list-item-radius, 0.5rem)" },
10086
+ style: { borderRadius: "var(--thread-list-item-radius, 0.75rem)" },
10027
10087
  className: auiButtonClass({
10028
10088
  variant: "ghost",
10029
10089
  className: cn(
10030
- "!justify-start h-auto min-h-8 min-w-0 flex-1 overflow-hidden rounded-md px-2.5 py-1.5 text-left font-normal shadow-none",
10090
+ "!justify-start h-auto min-h-8 min-w-0 flex-1 overflow-hidden rounded-[0.75rem] px-2.5 py-1.5 text-left font-normal shadow-none",
10031
10091
  "bg-transparent hover:bg-transparent hover:text-inherit",
10032
10092
  active ? "text-dropdown-selected-item-text" : "text-inherit"
10033
10093
  )
@@ -10258,7 +10318,7 @@ var DEFAULT_DENY_OPTIONS = [
10258
10318
  function optionVariant(option) {
10259
10319
  if (option.variant === "destructive") return "destructive";
10260
10320
  if (option.variant === "secondary") return "secondary";
10261
- return "default";
10321
+ return "primary";
10262
10322
  }
10263
10323
  function ToolApprovalBar({
10264
10324
  toolName,
@@ -10311,22 +10371,13 @@ function ToolApprovalBar({
10311
10371
  }
10312
10372
  )
10313
10373
  ] }),
10314
- !isDecided && !readOnly && selectedDenyOption && /* @__PURE__ */ jsx102(
10315
- Button,
10316
- {
10317
- size: "sm",
10318
- variant: "secondary",
10319
- disabled: interactionsLocked,
10320
- onClick: () => onDenyOptionChange?.(null),
10321
- children: "Back"
10322
- }
10323
- )
10374
+ !isDecided && !readOnly && selectedDenyOption && /* @__PURE__ */ jsx102(Button.Secondary, { size: "small", disabled: interactionsLocked, onClick: () => onDenyOptionChange?.(null), children: "Back" })
10324
10375
  ] }),
10325
10376
  !isDecided && !readOnly && !selectedDenyOption && /* @__PURE__ */ jsxs73("div", { className: "flex gap-2", children: [
10326
10377
  approveOptions.map((option) => /* @__PURE__ */ jsxs73(
10327
10378
  Button,
10328
10379
  {
10329
- size: "sm",
10380
+ size: "small",
10330
10381
  variant: optionVariant(option),
10331
10382
  disabled: interactionsLocked,
10332
10383
  onClick: () => onSelect(option.id),
@@ -10340,7 +10391,7 @@ function ToolApprovalBar({
10340
10391
  denyOptions.map((option) => /* @__PURE__ */ jsx102(
10341
10392
  Button,
10342
10393
  {
10343
- size: "sm",
10394
+ size: "small",
10344
10395
  variant: optionVariant(option),
10345
10396
  disabled: interactionsLocked,
10346
10397
  onClick: () => {
@@ -10383,7 +10434,7 @@ function ToolApprovalBar({
10383
10434
  )
10384
10435
  }
10385
10436
  ),
10386
- /* @__PURE__ */ jsx102(Button, { size: "sm", disabled: interactionsLocked, onClick: onReasonSubmit, children: "Submit" })
10437
+ /* @__PURE__ */ jsx102(Button.Primary, { size: "small", disabled: interactionsLocked, onClick: onReasonSubmit, children: "Submit" })
10387
10438
  ] }),
10388
10439
  showReasonError && /* @__PURE__ */ jsx102("span", { id: "aui-denial-reason-error", className: "text-xs text-failure-bg", role: "alert", children: "Reason is required" })
10389
10440
  ] }),
@@ -11016,6 +11067,7 @@ function buildSessionMetrics({
11016
11067
  var TIMELINE_TYPE = {
11017
11068
  turn: "turn",
11018
11069
  event: "event",
11070
+ markerGroup: "markerGroup",
11019
11071
  toolCallGroup: "toolCallGroup",
11020
11072
  subAgentGroup: "subAgentGroup"
11021
11073
  };
@@ -11028,6 +11080,58 @@ function getTimelineHoverTargetId(target) {
11028
11080
  function getTimelineRange({ startMs, endMs }) {
11029
11081
  return [startMs, endMs];
11030
11082
  }
11083
+ function groupCoincidentTimelineMarkers(segments) {
11084
+ const groupsByTimestamp = /* @__PURE__ */ new Map();
11085
+ for (const segment of segments) {
11086
+ if (!segment.isMarker) continue;
11087
+ const group = groupsByTimestamp.get(segment.startMs);
11088
+ if (group) group.push(segment);
11089
+ else groupsByTimestamp.set(segment.startMs, [segment]);
11090
+ }
11091
+ return Array.from(groupsByTimestamp, ([startMs, group]) => ({
11092
+ id: `marker-group-${group.map((segment) => segment.id).join("-")}`,
11093
+ startMs,
11094
+ endMs: startMs,
11095
+ segments: group
11096
+ })).sort((left, right) => left.startMs - right.startMs);
11097
+ }
11098
+ function timelineAxisUnit(totalMs) {
11099
+ if (totalMs < 1e3) return { divisorMs: 1, suffix: "ms" };
11100
+ if (totalMs < 6e4) return { divisorMs: 1e3, suffix: "s" };
11101
+ if (totalMs < 36e5) return { divisorMs: 6e4, suffix: "m" };
11102
+ return { divisorMs: 36e5, suffix: "h" };
11103
+ }
11104
+ function formatTimelineAxisDuration(durationMs) {
11105
+ const unit = timelineAxisUnit(durationMs);
11106
+ return `${Number((durationMs / unit.divisorMs).toFixed(2))}${unit.suffix}`;
11107
+ }
11108
+ function getCleanAxisStepMs(totalMs) {
11109
+ const { divisorMs } = timelineAxisUnit(totalMs);
11110
+ const target = totalMs / divisorMs / 8;
11111
+ if (divisorMs >= 6e4 && target < 1) return Math.max(0.25, Math.ceil(target * 4) / 4) * divisorMs;
11112
+ const integerTarget = Math.max(1, target);
11113
+ const magnitude = 10 ** Math.floor(Math.log10(integerTarget));
11114
+ const normalized = integerTarget / magnitude;
11115
+ const multiplier = normalized <= 1 ? 1 : normalized <= 2 ? 2 : normalized <= 5 ? 5 : 10;
11116
+ return multiplier * magnitude * divisorMs;
11117
+ }
11118
+ function buildTimelineAxisTicks({
11119
+ activeTotalMs,
11120
+ turnStartsMs,
11121
+ turnGapMs
11122
+ }) {
11123
+ const stepMs = getCleanAxisStepMs(activeTotalMs);
11124
+ const activeTicks = [];
11125
+ for (let activeMs = 0; activeMs < activeTotalMs; activeMs += stepMs) activeTicks.push(activeMs);
11126
+ const lastRegularTick = activeTicks.at(-1);
11127
+ if (lastRegularTick != null && lastRegularTick > 0 && activeTotalMs - lastRegularTick < stepMs / 4) {
11128
+ activeTicks.pop();
11129
+ }
11130
+ if (activeTicks.at(-1) !== activeTotalMs) activeTicks.push(activeTotalMs);
11131
+ return activeTicks.map((activeMs) => ({
11132
+ value: activeMs + turnStartsMs.slice(1).filter((turnStartMs) => turnStartMs <= activeMs).length * turnGapMs
11133
+ }));
11134
+ }
11031
11135
  function getTimelineLayout(segments) {
11032
11136
  const rangesByTurnIndex = /* @__PURE__ */ new Map();
11033
11137
  for (const segment of segments) {
@@ -11159,13 +11263,6 @@ function getActiveTimelineMs(valueMs, gaps) {
11159
11263
  }
11160
11264
  return Math.max(0, activeMs);
11161
11265
  }
11162
- function buildTimelineAxisTicks({
11163
- ticks,
11164
- totalMs,
11165
- timelineMaxMs
11166
- }) {
11167
- return [...ticks.filter((tick) => tick.value < totalMs), { value: totalMs }, { value: timelineMaxMs }];
11168
- }
11169
11266
 
11170
11267
  // src/utils/toolCallParsing.ts
11171
11268
  import { parse as parsePartialJson } from "partial-json";
@@ -11459,6 +11556,7 @@ function buildSessionTimelineSegments(turns) {
11459
11556
  const approvalRequiredIdsByTurnId = /* @__PURE__ */ new Map();
11460
11557
  const threadDoneEvents = /* @__PURE__ */ new Map();
11461
11558
  const subAgentToolCallIds = /* @__PURE__ */ new Set();
11559
+ const toolCallRequestsByTurnId = /* @__PURE__ */ new Map();
11462
11560
  let latestMs = originMs;
11463
11561
  for (const turn of turns) {
11464
11562
  latestMs = Math.max(latestMs, parseTimestamp(turn.created.createdAt) ?? latestMs);
@@ -11484,6 +11582,16 @@ function buildSessionTimelineSegments(turns) {
11484
11582
  if (toolCallId != null) subAgentToolCallIds.add(toolCallId);
11485
11583
  } else if (event.type === "thread.done") {
11486
11584
  threadDoneEvents.set(eventThreadId(event), event);
11585
+ } else if (event.type === "model.message") {
11586
+ const startedAtMs = parseTimestamp(eventCreatedAt(event));
11587
+ if (startedAtMs == null) continue;
11588
+ const requests = toolCallRequestsByTurnId.get(turn.turnId) ?? /* @__PURE__ */ new Map();
11589
+ for (const toolCall of toolCallsOf(event)) {
11590
+ if (typeof toolCall.id === "string") {
11591
+ requests.set(toolCall.id, { startedAtMs, threadId: eventThreadId(event) });
11592
+ }
11593
+ }
11594
+ toolCallRequestsByTurnId.set(turn.turnId, requests);
11487
11595
  }
11488
11596
  }
11489
11597
  }
@@ -11523,6 +11631,7 @@ function buildSessionTimelineSegments(turns) {
11523
11631
  toolResponsesByTurnId,
11524
11632
  approvalRequiredIdsByTurnId,
11525
11633
  subAgentToolCallIds,
11634
+ toolCallRequestsByTurnId,
11526
11635
  threadDoneEvents,
11527
11636
  segments
11528
11637
  });
@@ -11550,6 +11659,7 @@ function appendEventSegments({
11550
11659
  toolResponsesByTurnId,
11551
11660
  approvalRequiredIdsByTurnId,
11552
11661
  subAgentToolCallIds,
11662
+ toolCallRequestsByTurnId,
11553
11663
  threadDoneEvents,
11554
11664
  segments
11555
11665
  }) {
@@ -11592,6 +11702,20 @@ function appendEventSegments({
11592
11702
  return;
11593
11703
  }
11594
11704
  case "thread.created": {
11705
+ const parentCallId = parentToolCallId(event);
11706
+ const request = parentCallId == null ? void 0 : toolCallRequestsByTurnId.get(turn.turnId)?.get(parentCallId);
11707
+ if (request != null && request.startedAtMs < eventMs) {
11708
+ segments.push({
11709
+ id: `${eventId(event)}-waiting`,
11710
+ type: "system",
11711
+ title: "system.waiting_for_sub_agent",
11712
+ description: "System waiting for sub-agent to start executing",
11713
+ startMs: request.startedAtMs - originMs,
11714
+ endMs: eventMs - originMs,
11715
+ turnIndex,
11716
+ threadId: request.threadId
11717
+ });
11718
+ }
11595
11719
  const doneEvent = threadDoneEvents.get(threadId);
11596
11720
  const doneMs = doneEvent == null ? null : parseTimestamp(eventCreatedAt(doneEvent));
11597
11721
  segments.push({
@@ -12847,24 +12971,24 @@ function SessionTurnSection({
12847
12971
  }
12848
12972
 
12849
12973
  // src/theme/defaultSlots.ts
12850
- var AgentOverview = lazy(() => import("./AgentOverview-EEBHJC32.js"));
12974
+ var AgentOverview = lazy(() => import("./AgentOverview-3FJ5EE6N.js"));
12851
12975
  var AgentSessions = lazy(async () => {
12852
- const mod = await import("./AgentSessions-3MPDZASK.js");
12976
+ const mod = await import("./AgentSessions-T7MOGOTZ.js");
12853
12977
  return { default: mod.AgentSessions };
12854
12978
  });
12855
12979
  var AgentCodeSnippets = lazy(
12856
- () => import("./AgentCodeSnippets-NZOFJE57.js")
12980
+ () => import("./AgentCodeSnippets-637HQUXD.js")
12857
12981
  );
12858
12982
  var AgentSessionEventTimeline = lazy(async () => {
12859
- const mod = await import("./AgentSessionEventTimeline-26Z6IB3B.js");
12983
+ const mod = await import("./AgentSessionEventTimeline-VELWUYPR.js");
12860
12984
  return { default: mod.AgentSessionEventTimeline };
12861
12985
  });
12862
12986
  var AgentSessionEventTimelineChart = lazy(async () => {
12863
- const mod = await import("./AgentSessionEventTimelineChart-CGCU7WBK.js");
12987
+ const mod = await import("./AgentSessionEventTimelineChart-CUKETHWM.js");
12864
12988
  return { default: mod.AgentSessionEventTimelineChart };
12865
12989
  });
12866
12990
  var AgentMetricChart = lazy(async () => {
12867
- const mod = await import("./AgentMetricChart-JPU3MFQ2.js");
12991
+ const mod = await import("./AgentMetricChart-4FYECRIN.js");
12868
12992
  return { default: mod.AgentMetricChart };
12869
12993
  });
12870
12994
  var defaultSlots = {
@@ -13056,6 +13180,7 @@ export {
13056
13180
  formatTokenCount,
13057
13181
  formatCostUsd,
13058
13182
  formatDurationMs,
13183
+ roundDurationMsToSecond,
13059
13184
  AgentMetricCard,
13060
13185
  AgentMetricsTimeRangeFilter,
13061
13186
  AgentMetricsView,
@@ -13190,13 +13315,15 @@ export {
13190
13315
  TIMELINE_TYPE,
13191
13316
  getTimelineHoverTargetId,
13192
13317
  getTimelineRange,
13318
+ groupCoincidentTimelineMarkers,
13319
+ formatTimelineAxisDuration,
13320
+ buildTimelineAxisTicks,
13193
13321
  getTimelineLayout,
13194
13322
  pickLongestNonOverlappingSegments,
13195
13323
  groupOverlappingToolCalls,
13196
13324
  getSubAgentHoverGroups,
13197
13325
  getSubAgentLanes,
13198
13326
  getActiveTimelineMs,
13199
- buildTimelineAxisTicks,
13200
13327
  computeAgentStepsSplit,
13201
13328
  AgentStepsContainer,
13202
13329
  AssistantTextContainer,
@@ -13211,4 +13338,4 @@ export {
13211
13338
  UserMessageContainer,
13212
13339
  defaultSlots
13213
13340
  };
13214
- //# sourceMappingURL=chunk-ZTMKFZQ3.js.map
13341
+ //# sourceMappingURL=chunk-YQO2NMJ3.js.map