@truefoundry/trueforge-ui 0.3.0 → 0.3.1

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 (83) hide show
  1. package/CHANGELOG.md +9 -0
  2. package/dist/{AgentCodeSnippets-EK7KMIY2.js → AgentCodeSnippets-DAZWEBJS.js} +7 -7
  3. package/dist/AgentMetricChart-VDIE3S2P.js +15 -0
  4. package/dist/{AgentOverview-5UPMYHT2.js → AgentOverview-5JIVYXPX.js} +7 -7
  5. package/dist/{AgentSessionEventTimeline-V6NPCYMW.js → AgentSessionEventTimeline-WELJSS6O.js} +7 -7
  6. package/dist/{AgentSessionEventTimelineChart-YQWZBQCG.js → AgentSessionEventTimelineChart-ADB3KICM.js} +7 -7
  7. package/dist/{AgentSessions-WNYVVB6Q.js → AgentSessions-NSN4LIGJ.js} +8 -8
  8. package/dist/{ConnectorSettings-O4I24244.js → ConnectorSettings-C6MFCKYX.js} +7 -7
  9. package/dist/{DockLayout-JMBZVMGB.js → DockLayout-VY7OZ55R.js} +10 -10
  10. package/dist/{DrawerLayout-E6G3IF6R.js → DrawerLayout-B2UA3CZO.js} +11 -11
  11. package/dist/{ModelSettings-ZVXMXIU4.js → ModelSettings-3YAHICJ3.js} +9 -9
  12. package/dist/ModelSettings-3YAHICJ3.js.map +1 -0
  13. package/dist/OpenUiFenceBlock-BZPFNXWZ.js +9 -0
  14. package/dist/{SandboxSettings-H6BA2DJQ.js → SandboxSettings-ALR6F5KU.js} +7 -7
  15. package/dist/SchedulesPage-TIS3BH67.js +15 -0
  16. package/dist/{SettingsBuilder-VA3VGWZC.js → SettingsBuilder-G5CP5X6Q.js} +8 -8
  17. package/dist/{ShellRouteSync-ZT4PBE6T.js → ShellRouteSync-G7IJ5VIW.js} +4 -4
  18. package/dist/{SidebarLayout-ICXEN7ZL.js → SidebarLayout-FKRLGEDB.js} +12 -12
  19. package/dist/{SkillSettings-F5JGGFXR.js → SkillSettings-E5SJ4U3T.js} +7 -7
  20. package/dist/{TrueForgeUIWithRouter-MKJ7IEWG.js → TrueForgeUIWithRouter-WD7O3TWR.js} +9 -9
  21. package/dist/{WidgetLayout-J7ZRW3V3.js → WidgetLayout-KQZTQNE7.js} +10 -10
  22. package/dist/{chunk-MEW7WZ7Q.js → chunk-2XFOONKH.js} +251 -97
  23. package/dist/chunk-2XFOONKH.js.map +1 -0
  24. package/dist/{chunk-U7WONUMR.js → chunk-2XT2VUT4.js} +4 -2
  25. package/dist/chunk-2XT2VUT4.js.map +1 -0
  26. package/dist/{chunk-KDCVFHPZ.js → chunk-4OZFQVSR.js} +3 -3
  27. package/dist/chunk-6UACSIIY.js +587 -0
  28. package/dist/chunk-6UACSIIY.js.map +1 -0
  29. package/dist/{chunk-BREN6OSX.js → chunk-7UE7LZS2.js} +17 -11
  30. package/dist/{chunk-BREN6OSX.js.map → chunk-7UE7LZS2.js.map} +1 -1
  31. package/dist/{chunk-UN7WPTTK.js → chunk-AO23SZBG.js} +2 -2
  32. package/dist/{chunk-VTOW2UIX.js → chunk-AU4BJQMK.js} +60 -25
  33. package/dist/chunk-AU4BJQMK.js.map +1 -0
  34. package/dist/{chunk-JEAULQNF.js → chunk-B76JC5B2.js} +3 -3
  35. package/dist/{chunk-7VWUB5OV.js → chunk-G7BT4OKG.js} +5 -5
  36. package/dist/{chunk-MB7Z5FPI.js → chunk-IGYCJIU7.js} +9 -9
  37. package/dist/{chunk-WFIA627Q.js → chunk-QKFMAQ7O.js} +2 -2
  38. package/dist/{chunk-QI4HGU5E.js → chunk-SAYUMANU.js} +8 -14
  39. package/dist/{chunk-QI4HGU5E.js.map → chunk-SAYUMANU.js.map} +1 -1
  40. package/dist/{chunk-SCIEO6CF.js → chunk-XHPIJ77Q.js} +2 -2
  41. package/dist/{chunk-KZK2PQ4A.js → chunk-XR4S7B2K.js} +206 -117
  42. package/dist/chunk-XR4S7B2K.js.map +1 -0
  43. package/dist/index.d.ts +16 -3
  44. package/dist/index.js +12 -12
  45. package/dist/plugins/trueforge-agent-server-adapter/index.js +6 -2
  46. package/dist/plugins/trueforge-agent-server-adapter/index.js.map +1 -1
  47. package/dist/styles.css +1 -1
  48. package/package.json +1 -1
  49. package/dist/AgentMetricChart-UZCYOC4M.js +0 -15
  50. package/dist/ModelSettings-ZVXMXIU4.js.map +0 -1
  51. package/dist/OpenUiFenceBlock-F3YVDKAG.js +0 -9
  52. package/dist/SchedulesPage-FS2QZ5KB.js +0 -15
  53. package/dist/chunk-KZK2PQ4A.js.map +0 -1
  54. package/dist/chunk-MEW7WZ7Q.js.map +0 -1
  55. package/dist/chunk-NXK4XW4U.js +0 -587
  56. package/dist/chunk-NXK4XW4U.js.map +0 -1
  57. package/dist/chunk-U7WONUMR.js.map +0 -1
  58. package/dist/chunk-VTOW2UIX.js.map +0 -1
  59. /package/dist/{AgentCodeSnippets-EK7KMIY2.js.map → AgentCodeSnippets-DAZWEBJS.js.map} +0 -0
  60. /package/dist/{AgentMetricChart-UZCYOC4M.js.map → AgentMetricChart-VDIE3S2P.js.map} +0 -0
  61. /package/dist/{AgentOverview-5UPMYHT2.js.map → AgentOverview-5JIVYXPX.js.map} +0 -0
  62. /package/dist/{AgentSessionEventTimeline-V6NPCYMW.js.map → AgentSessionEventTimeline-WELJSS6O.js.map} +0 -0
  63. /package/dist/{AgentSessionEventTimelineChart-YQWZBQCG.js.map → AgentSessionEventTimelineChart-ADB3KICM.js.map} +0 -0
  64. /package/dist/{AgentSessions-WNYVVB6Q.js.map → AgentSessions-NSN4LIGJ.js.map} +0 -0
  65. /package/dist/{ConnectorSettings-O4I24244.js.map → ConnectorSettings-C6MFCKYX.js.map} +0 -0
  66. /package/dist/{DockLayout-JMBZVMGB.js.map → DockLayout-VY7OZ55R.js.map} +0 -0
  67. /package/dist/{DrawerLayout-E6G3IF6R.js.map → DrawerLayout-B2UA3CZO.js.map} +0 -0
  68. /package/dist/{OpenUiFenceBlock-F3YVDKAG.js.map → OpenUiFenceBlock-BZPFNXWZ.js.map} +0 -0
  69. /package/dist/{SandboxSettings-H6BA2DJQ.js.map → SandboxSettings-ALR6F5KU.js.map} +0 -0
  70. /package/dist/{SchedulesPage-FS2QZ5KB.js.map → SchedulesPage-TIS3BH67.js.map} +0 -0
  71. /package/dist/{SettingsBuilder-VA3VGWZC.js.map → SettingsBuilder-G5CP5X6Q.js.map} +0 -0
  72. /package/dist/{ShellRouteSync-ZT4PBE6T.js.map → ShellRouteSync-G7IJ5VIW.js.map} +0 -0
  73. /package/dist/{SidebarLayout-ICXEN7ZL.js.map → SidebarLayout-FKRLGEDB.js.map} +0 -0
  74. /package/dist/{SkillSettings-F5JGGFXR.js.map → SkillSettings-E5SJ4U3T.js.map} +0 -0
  75. /package/dist/{TrueForgeUIWithRouter-MKJ7IEWG.js.map → TrueForgeUIWithRouter-WD7O3TWR.js.map} +0 -0
  76. /package/dist/{WidgetLayout-J7ZRW3V3.js.map → WidgetLayout-KQZTQNE7.js.map} +0 -0
  77. /package/dist/{chunk-KDCVFHPZ.js.map → chunk-4OZFQVSR.js.map} +0 -0
  78. /package/dist/{chunk-UN7WPTTK.js.map → chunk-AO23SZBG.js.map} +0 -0
  79. /package/dist/{chunk-JEAULQNF.js.map → chunk-B76JC5B2.js.map} +0 -0
  80. /package/dist/{chunk-7VWUB5OV.js.map → chunk-G7BT4OKG.js.map} +0 -0
  81. /package/dist/{chunk-MB7Z5FPI.js.map → chunk-IGYCJIU7.js.map} +0 -0
  82. /package/dist/{chunk-WFIA627Q.js.map → chunk-QKFMAQ7O.js.map} +0 -0
  83. /package/dist/{chunk-SCIEO6CF.js.map → chunk-XHPIJ77Q.js.map} +0 -0
@@ -3,7 +3,7 @@ import {
3
3
  replaceScheduleShareSearch,
4
4
  searchAllAgents,
5
5
  useSearchAgentsList
6
- } from "./chunk-UN7WPTTK.js";
6
+ } from "./chunk-AO23SZBG.js";
7
7
  import {
8
8
  Icon,
9
9
  PageHeader,
@@ -14,7 +14,7 @@ import {
14
14
  sidebarRailButtonClassName,
15
15
  useCompactLayout,
16
16
  useDraftCatalog
17
- } from "./chunk-KDCVFHPZ.js";
17
+ } from "./chunk-4OZFQVSR.js";
18
18
  import {
19
19
  SESSION_CUSTOM_RANGE_MAX_DAYS,
20
20
  SESSION_SHARE_CHANGE_EVENT,
@@ -43,13 +43,13 @@ import {
43
43
  useServer,
44
44
  useServerCapabilities,
45
45
  useShellMode
46
- } from "./chunk-U7WONUMR.js";
46
+ } from "./chunk-2XT2VUT4.js";
47
47
  import {
48
48
  useAuiState
49
49
  } from "./chunk-M6MHLVSO.js";
50
50
  import {
51
51
  OpenUiFenceBlock
52
- } from "./chunk-WFIA627Q.js";
52
+ } from "./chunk-QKFMAQ7O.js";
53
53
  import {
54
54
  ThemeContext,
55
55
  ThemeProvider,
@@ -57,7 +57,7 @@ import {
57
57
  useOptionalContentClassNames,
58
58
  useOptionalThemeMode,
59
59
  useOptionalThemePreset
60
- } from "./chunk-NXK4XW4U.js";
60
+ } from "./chunk-6UACSIIY.js";
61
61
 
62
62
  // src/theme/brand.tsx
63
63
  import { useContext } from "react";
@@ -471,7 +471,7 @@ function LightTooltip({
471
471
  }
472
472
 
473
473
  // src/theme/SlotsProvider.tsx
474
- import { createContext as createContext8, useContext as useContext9, useMemo as useMemo19 } from "react";
474
+ import { createContext as createContext8, useContext as useContext9, useMemo as useMemo18 } from "react";
475
475
 
476
476
  // src/theme/defaultSlots.ts
477
477
  import { lazy } from "react";
@@ -704,6 +704,8 @@ import { jsx as jsx10, jsxs as jsxs6 } from "react/jsx-runtime";
704
704
  var DEFAULT_TITLE = "MCP Authentication Required";
705
705
  function McpAuthPrompt({
706
706
  servers,
707
+ connectedServerIds,
708
+ continueLoading = false,
707
709
  onConnect,
708
710
  onContinue,
709
711
  readOnly = false,
@@ -726,12 +728,27 @@ function McpAuthPrompt({
726
728
  /* @__PURE__ */ jsx10("span", { className: "shrink-0 text-xs font-semibold text-text-secondary", children: ":" }),
727
729
  /* @__PURE__ */ jsx10("span", { className: "truncate font-sans font-medium text-text-primary", children: server.name })
728
730
  ] }),
729
- /* @__PURE__ */ jsxs6(Button.Primary, { size: "small", disabled: readOnly, onClick: () => onConnect(server.id), className: "shrink-0", children: [
730
- "Connect",
731
- /* @__PURE__ */ jsx10(Icon, { name: "external-link", size: "0.75em", className: "ml-1" })
732
- ] })
731
+ connectedServerIds?.has(server.id) ? /* @__PURE__ */ jsxs6("span", { className: "inline-flex shrink-0 items-center gap-1 text-xs text-success-bg", children: [
732
+ /* @__PURE__ */ jsx10(Icon, { name: "check", size: "0.875rem" }),
733
+ "Connected"
734
+ ] }) : /* @__PURE__ */ jsxs6(
735
+ Button.Primary,
736
+ {
737
+ size: "small",
738
+ disabled: readOnly,
739
+ onClick: () => onConnect(server.id),
740
+ className: "shrink-0",
741
+ children: [
742
+ "Connect",
743
+ /* @__PURE__ */ jsx10(Icon, { name: "external-link", size: "0.75em", className: "ml-1" })
744
+ ]
745
+ }
746
+ )
733
747
  ] }, server.id)),
734
- onContinue && /* @__PURE__ */ jsx10("div", { className: "flex justify-end border-t border-border pt-2", children: /* @__PURE__ */ jsx10(Button.Primary, { size: "small", disabled: readOnly, onClick: onContinue, children: "Continue" }) })
748
+ onContinue && /* @__PURE__ */ jsx10("div", { className: "flex justify-end border-t border-border pt-2", children: /* @__PURE__ */ jsxs6(Button.Primary, { size: "small", disabled: readOnly || continueLoading, onClick: onContinue, children: [
749
+ continueLoading ? /* @__PURE__ */ jsx10(Icon, { name: "loader", className: "animate-spin" }) : null,
750
+ "Continue"
751
+ ] }) })
735
752
  ] })
736
753
  ]
737
754
  }
@@ -2532,7 +2549,20 @@ function AgentSessionDetailHeader({
2532
2549
  ] });
2533
2550
  }
2534
2551
 
2552
+ // src/atoms/lib/dateFormat.ts
2553
+ function formatAbsoluteDateTime(date) {
2554
+ return new Intl.DateTimeFormat(void 0, {
2555
+ month: "short",
2556
+ day: "numeric",
2557
+ year: "numeric",
2558
+ hour: "numeric",
2559
+ minute: "2-digit",
2560
+ hour12: true
2561
+ }).format(date);
2562
+ }
2563
+
2535
2564
  // src/atoms/lib/threadListMeta.ts
2565
+ var MAX_SESSION_TITLE_LENGTH = 50;
2536
2566
  function formatRelativeShort(date, now = /* @__PURE__ */ new Date()) {
2537
2567
  const diffMs = Math.max(0, now.getTime() - date.getTime());
2538
2568
  const minutes = Math.floor(diffMs / 6e4);
@@ -2602,7 +2632,9 @@ function AgentSessionListRow({
2602
2632
  canDelete = true
2603
2633
  }) {
2604
2634
  const PermissionGuard2 = useSlot("PermissionGuard");
2605
- const relative = formatRelativeShort(new Date(lastActivityAt));
2635
+ const activityAt = new Date(lastActivityAt);
2636
+ const relative = formatRelativeShort(activityAt);
2637
+ const absolute = formatAbsoluteDateTime(activityAt);
2606
2638
  return /* @__PURE__ */ jsxs22(
2607
2639
  "div",
2608
2640
  {
@@ -2673,7 +2705,7 @@ function AgentSessionListRow({
2673
2705
  /* @__PURE__ */ jsx32("span", { className: "truncate", children: agentName }),
2674
2706
  /* @__PURE__ */ jsx32("span", { "aria-hidden": "true", children: "\xB7" })
2675
2707
  ] }) : null,
2676
- /* @__PURE__ */ jsx32("span", { children: relative })
2708
+ /* @__PURE__ */ jsx32(Tooltip, { content: absolute, side: "bottom", children: /* @__PURE__ */ jsx32("span", { children: relative }) })
2677
2709
  ] }),
2678
2710
  /* @__PURE__ */ jsx32("span", { className: "shrink-0 tabular-nums", children: formatSessionListMetrics(metrics) })
2679
2711
  ]
@@ -5826,7 +5858,7 @@ function DraftModelCatalogPanel({
5826
5858
  id: listboxId,
5827
5859
  role: "listbox",
5828
5860
  "aria-label": "Select model",
5829
- className: "flex min-h-0 flex-1 flex-col overflow-y-auto p-1",
5861
+ className: "flex min-h-0 flex-auto flex-col overflow-y-auto p-1",
5830
5862
  children: filtered.length === 0 ? /* @__PURE__ */ jsx62(
5831
5863
  DraftCatalogEmptyState,
5832
5864
  {
@@ -6828,7 +6860,7 @@ function AgentInstructionsDrawer({
6828
6860
  import { useEffect as useEffect16, useRef as useRef11, useState as useState28 } from "react";
6829
6861
 
6830
6862
  // src/hooks/useMcpAuth.ts
6831
- import { useCallback as useCallback9, useEffect as useEffect15, useMemo as useMemo6, useRef as useRef10, useState as useState27 } from "react";
6863
+ import { useCallback as useCallback9, useEffect as useEffect15, useRef as useRef10, useState as useState27 } from "react";
6832
6864
  var MCP_AUTH_POPUP_CHANNEL = "truefoundry-mcp-auth-popup";
6833
6865
  var generatePopupUid = () => `mcp-oauth-${Date.now().toString(36)}-${Math.random().toString(36).slice(2)}`;
6834
6866
  var isPopupMessage = (value) => {
@@ -6838,47 +6870,96 @@ var isPopupMessage = (value) => {
6838
6870
  };
6839
6871
  var useMCPAuth = ({ callbackPath } = {}) => {
6840
6872
  const { connectorCatalog } = useCatalogServer();
6873
+ const server = useOptionalServer();
6841
6874
  const toaster = useToasterOptional();
6842
- const [isOAuthLoading, setIsOAuthLoading] = useState27(false);
6843
- const popupUid = useMemo6(() => generatePopupUid(), []);
6844
- const listenerCleanupRef = useRef10(null);
6845
- const clearPopupListener = useCallback9(() => {
6846
- listenerCleanupRef.current?.();
6847
- listenerCleanupRef.current = null;
6875
+ const [loadingCount, setLoadingCount] = useState27(0);
6876
+ const activeAttemptsRef = useRef10(/* @__PURE__ */ new Set());
6877
+ const popupCleanupRef = useRef10(/* @__PURE__ */ new Set());
6878
+ useEffect15(() => {
6879
+ const activeAttempts = activeAttemptsRef.current;
6880
+ const popupCleanups = popupCleanupRef.current;
6881
+ return () => {
6882
+ activeAttempts.clear();
6883
+ for (const cleanup of popupCleanups) cleanup();
6884
+ popupCleanups.clear();
6885
+ };
6848
6886
  }, []);
6849
- useEffect15(() => clearPopupListener, [clearPopupListener]);
6887
+ const loadConnector = useCallback9(
6888
+ async (integrationId) => {
6889
+ if (server?.getMcpConnector !== void 0) {
6890
+ return server.getMcpConnector({ connectorId: integrationId });
6891
+ }
6892
+ return connectorCatalog.getConnector({ id: integrationId });
6893
+ },
6894
+ [connectorCatalog, server]
6895
+ );
6896
+ const reportVerifiedSuccess = useCallback9(
6897
+ async ({
6898
+ integrationId,
6899
+ callback,
6900
+ attempt
6901
+ }) => {
6902
+ try {
6903
+ const connector = await loadConnector(integrationId);
6904
+ if (!activeAttemptsRef.current.has(attempt)) return;
6905
+ if (!connector.authenticated) {
6906
+ throw new Error("The MCP server is not authenticated yet. Please try again.");
6907
+ }
6908
+ callback(true);
6909
+ } catch (error) {
6910
+ if (!activeAttemptsRef.current.has(attempt)) return;
6911
+ toaster?.showError(error);
6912
+ callback(false);
6913
+ }
6914
+ },
6915
+ [loadConnector, toaster]
6916
+ );
6850
6917
  const openAuthPopup = useCallback9(
6851
- (authorizationEndpoint, callback) => {
6852
- clearPopupListener();
6918
+ ({
6919
+ authorizationEndpoint,
6920
+ integrationId,
6921
+ callback,
6922
+ attempt,
6923
+ popupUid
6924
+ }) => {
6853
6925
  const channel = new BroadcastChannel(MCP_AUTH_POPUP_CHANNEL);
6854
6926
  let popup = null;
6855
6927
  const cleanup = () => {
6856
6928
  channel.close();
6857
6929
  popup?.close();
6930
+ popupCleanupRef.current.delete(cleanup);
6858
6931
  };
6859
6932
  channel.onmessage = (event) => {
6860
6933
  if (!isPopupMessage(event.data) || event.data.popupUid !== popupUid) return;
6861
- try {
6862
- callback(event.data.isSuccess);
6863
- } finally {
6864
- clearPopupListener();
6934
+ const { isSuccess } = event.data;
6935
+ cleanup();
6936
+ if (!isSuccess) {
6937
+ if (activeAttemptsRef.current.delete(attempt)) callback(false);
6938
+ return;
6865
6939
  }
6940
+ void reportVerifiedSuccess({ integrationId, callback, attempt }).finally(() => {
6941
+ activeAttemptsRef.current.delete(attempt);
6942
+ });
6866
6943
  };
6867
- listenerCleanupRef.current = cleanup;
6944
+ popupCleanupRef.current.add(cleanup);
6868
6945
  popup = window.open(authorizationEndpoint, "_blank", "popup=true");
6869
6946
  if (!popup) {
6870
- clearPopupListener();
6947
+ cleanup();
6871
6948
  throw new Error("Popup blocked. Please allow pop-ups to authorize the MCP server.");
6872
6949
  }
6873
6950
  popup.focus();
6874
6951
  },
6875
- [clearPopupListener, popupUid]
6952
+ [reportVerifiedSuccess]
6876
6953
  );
6877
6954
  const handleAuthorize = useCallback9(
6878
6955
  async (integrationId, callback) => {
6879
6956
  if (!integrationId) return;
6957
+ const attempt = {};
6958
+ const popupUid = generatePopupUid();
6959
+ activeAttemptsRef.current.add(attempt);
6960
+ setLoadingCount((count) => count + 1);
6961
+ let popupOpened = false;
6880
6962
  try {
6881
- setIsOAuthLoading(true);
6882
6963
  const callbackUrl = callbackPath ? new URL(callbackPath, window.location.origin) : new URL(window.location.href);
6883
6964
  callbackUrl.searchParams.set("screenType", "mcp-auth");
6884
6965
  callbackUrl.searchParams.set("integrationId", integrationId);
@@ -6887,27 +6968,31 @@ var useMCPAuth = ({ callbackPath } = {}) => {
6887
6968
  id: integrationId,
6888
6969
  returnTo: `${callbackUrl.pathname}${callbackUrl.search}`
6889
6970
  });
6971
+ if (!activeAttemptsRef.current.has(attempt)) return;
6890
6972
  if ("status" in result && result.status?.toUpperCase() === "AUTHENTICATED" || "authenticated" in result && result.authenticated) {
6891
- callback(true);
6973
+ await reportVerifiedSuccess({ integrationId, callback, attempt });
6892
6974
  return;
6893
6975
  }
6894
6976
  const authorizationEndpoint = "authorization_endpoint" in result ? result.authorization_endpoint : void 0;
6895
6977
  if (!authorizationEndpoint) {
6896
6978
  throw new Error("The MCP server did not return an authorization URL.");
6897
6979
  }
6898
- openAuthPopup(authorizationEndpoint, callback);
6980
+ openAuthPopup({ authorizationEndpoint, integrationId, callback, attempt, popupUid });
6981
+ popupOpened = true;
6899
6982
  } catch (error) {
6983
+ if (!activeAttemptsRef.current.has(attempt)) return;
6900
6984
  toaster?.showError(error);
6901
6985
  callback(false);
6902
6986
  } finally {
6903
- setIsOAuthLoading(false);
6987
+ if (activeAttemptsRef.current.has(attempt)) setLoadingCount((count) => count - 1);
6988
+ if (!popupOpened) activeAttemptsRef.current.delete(attempt);
6904
6989
  }
6905
6990
  },
6906
- [callbackPath, connectorCatalog, openAuthPopup, popupUid, toaster]
6991
+ [callbackPath, connectorCatalog, openAuthPopup, reportVerifiedSuccess, toaster]
6907
6992
  );
6908
6993
  return {
6909
6994
  handleAuthorize,
6910
- isOAuthLoading
6995
+ isOAuthLoading: loadingCount > 0
6911
6996
  };
6912
6997
  };
6913
6998
 
@@ -7583,7 +7668,7 @@ function AgentMcpEditorContent({
7583
7668
  }
7584
7669
 
7585
7670
  // src/atoms/draft/AgentModelConfigModal.tsx
7586
- import { useMemo as useMemo7 } from "react";
7671
+ import { useMemo as useMemo6 } from "react";
7587
7672
 
7588
7673
  // src/atoms/primitives/CenteredModal.tsx
7589
7674
  import { useEffect as useEffect17, useId as useId7, useRef as useRef12 } from "react";
@@ -7664,7 +7749,7 @@ function CenteredModal({
7664
7749
  }
7665
7750
  )
7666
7751
  ] }),
7667
- /* @__PURE__ */ jsx70("div", { className: "flex min-h-0 flex-1 flex-col overflow-x-hidden overflow-y-auto", children }),
7752
+ /* @__PURE__ */ jsx70("div", { className: "flex min-h-0 flex-auto flex-col overflow-x-hidden overflow-y-auto", children }),
7668
7753
  footer ? /* @__PURE__ */ jsx70("div", { className: "shrink-0 border-t border-border px-5 py-3", children: footer }) : null
7669
7754
  ]
7670
7755
  }
@@ -7686,7 +7771,7 @@ function AgentModelConfigModal({
7686
7771
  }) {
7687
7772
  const AgentModelEditorContent2 = useSlot("AgentModelEditorContent");
7688
7773
  const AgentModelSettingsContent2 = useSlot("AgentModelSettingsContent");
7689
- const model = useMemo7(() => models.find((item) => item.name === spec.model.name), [models, spec.model.name]);
7774
+ const model = useMemo6(() => models.find((item) => item.name === spec.model.name), [models, spec.model.name]);
7690
7775
  const selectingModel = editor === "model";
7691
7776
  return /* @__PURE__ */ jsx71(
7692
7777
  CenteredModal,
@@ -7714,7 +7799,7 @@ function AgentModelConfigModal({
7714
7799
  }
7715
7800
 
7716
7801
  // src/atoms/draft/AgentModelEditorContent.tsx
7717
- import { useCallback as useCallback10, useId as useId8, useMemo as useMemo8, useState as useState29 } from "react";
7802
+ import { useCallback as useCallback10, useId as useId8, useMemo as useMemo7, useState as useState29 } from "react";
7718
7803
 
7719
7804
  // src/atoms/draft/reasoningEffort.ts
7720
7805
  function hasReasoningEfforts(efforts) {
@@ -7759,12 +7844,12 @@ function AgentModelEditorContent({
7759
7844
  }) {
7760
7845
  const listboxId = useId8();
7761
7846
  const compact = useCompactLayout();
7762
- const selectedModel = useMemo8(() => models.find((model) => model.name === spec.model.name), [models, spec.model.name]);
7763
- const providers = useMemo8(() => Array.from(new Set(models.map((model) => model.provider.name))), [models]);
7847
+ const selectedModel = useMemo7(() => models.find((model) => model.name === spec.model.name), [models, spec.model.name]);
7848
+ const providers = useMemo7(() => Array.from(new Set(models.map((model) => model.provider.name))), [models]);
7764
7849
  const [provider, setProvider] = useState29(selectedModel?.provider.name ?? providers[0] ?? "");
7765
7850
  const [compactProvider, setCompactProvider] = useState29(null);
7766
7851
  const needle = normalizeModelSearchText(query);
7767
- const matchingProviders = useMemo8(
7852
+ const matchingProviders = useMemo7(
7768
7853
  () => providers.map((name) => {
7769
7854
  const providerModels = models.filter((model) => model.provider.name === name);
7770
7855
  return {
@@ -7774,16 +7859,16 @@ function AgentModelEditorContent({
7774
7859
  }).filter((item) => item.models.length > 0),
7775
7860
  [models, needle, providers]
7776
7861
  );
7777
- const visibleProviders = useMemo8(() => matchingProviders.map((item) => item.name), [matchingProviders]);
7778
- const effectiveProvider = useMemo8(
7862
+ const visibleProviders = useMemo7(() => matchingProviders.map((item) => item.name), [matchingProviders]);
7863
+ const effectiveProvider = useMemo7(
7779
7864
  () => visibleProviders.includes(provider) ? provider : selectedModel && visibleProviders.includes(selectedModel.provider.name) ? selectedModel.provider.name : visibleProviders[0] ?? "",
7780
7865
  [provider, selectedModel, visibleProviders]
7781
7866
  );
7782
- const visibleModels = useMemo8(
7867
+ const visibleModels = useMemo7(
7783
7868
  () => matchingProviders.find((item) => item.name === effectiveProvider)?.models ?? [],
7784
7869
  [effectiveProvider, matchingProviders]
7785
7870
  );
7786
- const compactModels = useMemo8(() => {
7871
+ const compactModels = useMemo7(() => {
7787
7872
  if (compactProvider === null) return [];
7788
7873
  const providerModels = models.filter((model) => model.provider.name === compactProvider);
7789
7874
  return needle ? providerModels.filter((model) => modelMatchesQuery({ model, needle })) : providerModels;
@@ -7814,13 +7899,13 @@ function AgentModelEditorContent({
7814
7899
  ] });
7815
7900
  if (compact) {
7816
7901
  if (compactProvider === null) {
7817
- return /* @__PURE__ */ jsxs56("div", { className: "flex min-h-0 flex-1 flex-col", children: [
7902
+ return /* @__PURE__ */ jsxs56("div", { className: "flex min-h-0 flex-auto flex-col", children: [
7818
7903
  /* @__PURE__ */ jsxs56("div", { className: "shrink-0 border-b border-border px-3 py-2", children: [
7819
7904
  /* @__PURE__ */ jsx72("p", { className: "text-text-primary mb-2 text-base font-medium", children: "Select provider" }),
7820
7905
  search
7821
7906
  ] }),
7822
7907
  error ? /* @__PURE__ */ jsx72("p", { className: "text-failure-bg px-3 pt-3 text-sm", children: error }) : null,
7823
- /* @__PURE__ */ jsx72("div", { className: "min-h-0 flex-1 overflow-y-auto p-2", children: visibleProviders.length === 0 ? /* @__PURE__ */ jsx72("p", { className: "text-text-secondary px-2 py-6 text-center text-sm", role: "status", children: loading ? "Loading\u2026" : "No providers" }) : visibleProviders.map((name) => {
7908
+ /* @__PURE__ */ jsx72("div", { className: "min-h-0 flex-auto overflow-y-auto p-2", children: visibleProviders.length === 0 ? /* @__PURE__ */ jsx72("p", { className: "text-text-secondary px-2 py-6 text-center text-sm", role: "status", children: loading ? "Loading\u2026" : "No providers" }) : visibleProviders.map((name) => {
7824
7909
  const providerModel = models.find((model) => model.provider.name === name);
7825
7910
  return /* @__PURE__ */ jsxs56(
7826
7911
  "button",
@@ -7839,7 +7924,7 @@ function AgentModelEditorContent({
7839
7924
  }) })
7840
7925
  ] });
7841
7926
  }
7842
- return /* @__PURE__ */ jsxs56("div", { className: "flex min-h-0 flex-1 flex-col", children: [
7927
+ return /* @__PURE__ */ jsxs56("div", { className: "flex min-h-0 flex-auto flex-col", children: [
7843
7928
  /* @__PURE__ */ jsxs56("div", { className: "shrink-0 border-b border-border px-3 py-2", children: [
7844
7929
  /* @__PURE__ */ jsxs56("div", { className: "mb-2 flex items-center gap-1", children: [
7845
7930
  /* @__PURE__ */ jsx72(
@@ -8908,7 +8993,7 @@ function DraftComposerRightSection({ disabled, isRunning }) {
8908
8993
 
8909
8994
  // src/atoms/draft/DraftCompositeSelector.tsx
8910
8995
  import { useTrueFoundryAgentSpec as useTrueFoundryAgentSpec3, useTrueFoundryUpdateAgentSpec as useTrueFoundryUpdateAgentSpec2 } from "@truefoundry/assistant-ui-runtime";
8911
- import { useCallback as useCallback11, useEffect as useEffect19, useId as useId10, useMemo as useMemo9, useRef as useRef15, useState as useState33 } from "react";
8996
+ import { useCallback as useCallback11, useEffect as useEffect19, useId as useId10, useMemo as useMemo8, useRef as useRef15, useState as useState33 } from "react";
8912
8997
  import { Fragment as Fragment14, jsx as jsx85, jsxs as jsxs65 } from "react/jsx-runtime";
8913
8998
  function draftMountsFromSpec(value) {
8914
8999
  if (!Array.isArray(value)) return [];
@@ -9117,14 +9202,14 @@ function DraftCompositeSelector({ disabled, isRunning, onAttach }) {
9117
9202
  const canConfigureConnectors = settingsEnabled && settingsCatalog?.connectorCatalog != null;
9118
9203
  const canConfigureSkills = settingsEnabled && settingsCatalog?.skillCatalog != null;
9119
9204
  const canConfigureSandbox = settingsEnabled && settingsCatalog?.sandboxCatalog != null;
9120
- const specMcp = useMemo9(() => draftMountsFromSpec(agentSpec?.mcpServers), [agentSpec?.mcpServers]);
9121
- const specSkills = useMemo9(() => draftMountsFromSpec(agentSpec?.skills), [agentSpec?.skills]);
9205
+ const specMcp = useMemo8(() => draftMountsFromSpec(agentSpec?.mcpServers), [agentSpec?.mcpServers]);
9206
+ const specSkills = useMemo8(() => draftMountsFromSpec(agentSpec?.skills), [agentSpec?.skills]);
9122
9207
  const selectedMcp = open ? localMcp : specMcp;
9123
9208
  const selectedSkills = open ? localSkills : specSkills;
9124
- const selectedMcpIds = useMemo9(() => new Set(selectedMcp.map((m) => m.id)), [selectedMcp]);
9209
+ const selectedMcpIds = useMemo8(() => new Set(selectedMcp.map((m) => m.id)), [selectedMcp]);
9125
9210
  const hasValidModel = Boolean(agentSpec?.model?.name.trim());
9126
9211
  const toolsCount = selectedMcp.length + selectedSkills.length;
9127
- const toolsTooltip = useMemo9(() => {
9212
+ const toolsTooltip = useMemo8(() => {
9128
9213
  const formatNames = (items) => {
9129
9214
  const names = items.map((item) => item.name);
9130
9215
  if (names.length <= 4) return names.join(", ");
@@ -9191,11 +9276,11 @@ function DraftCompositeSelector({ disabled, isRunning, onAttach }) {
9191
9276
  };
9192
9277
  }, [open, setOpenAndFlush]);
9193
9278
  useEffect19(() => () => clearFlushTimer(), [clearFlushTimer]);
9194
- const catalogConnectors = useMemo9(
9279
+ const catalogConnectors = useMemo8(
9195
9280
  () => connectorsWithSelectedStubs({ connectors, selected: selectedMcp }),
9196
9281
  [connectors, selectedMcp]
9197
9282
  );
9198
- const filteredConnectors = useMemo9(() => {
9283
+ const filteredConnectors = useMemo8(() => {
9199
9284
  const needle = query.trim().toLowerCase();
9200
9285
  const matches = needle ? catalogConnectors.filter(
9201
9286
  (c) => c.name.toLowerCase().includes(needle) || (c.description?.toLowerCase().includes(needle) ?? false)
@@ -9204,26 +9289,26 @@ function DraftCompositeSelector({ disabled, isRunning, onAttach }) {
9204
9289
  (left, right) => Number(isUnauthenticatedDcrConnector(left)) - Number(isUnauthenticatedDcrConnector(right))
9205
9290
  );
9206
9291
  }, [catalogConnectors, query]);
9207
- const filteredSkills = useMemo9(() => {
9292
+ const filteredSkills = useMemo8(() => {
9208
9293
  const needle = query.trim().toLowerCase();
9209
9294
  if (!needle) return skills;
9210
9295
  return skills.filter(
9211
9296
  (skill) => skill.name.toLowerCase().includes(needle) || (skillRepoName(skill)?.toLowerCase().includes(needle) ?? false) || (skill.description?.toLowerCase().includes(needle) ?? false)
9212
9297
  );
9213
9298
  }, [skills, query]);
9214
- const pinnedSelectedConnectors = useMemo9(
9299
+ const pinnedSelectedConnectors = useMemo8(
9215
9300
  () => filteredConnectors.filter((c) => pinnedMcpIds.has(c.id)),
9216
9301
  [filteredConnectors, pinnedMcpIds]
9217
9302
  );
9218
- const pinnedAvailableConnectors = useMemo9(
9303
+ const pinnedAvailableConnectors = useMemo8(
9219
9304
  () => filteredConnectors.filter((c) => !pinnedMcpIds.has(c.id)),
9220
9305
  [filteredConnectors, pinnedMcpIds]
9221
9306
  );
9222
- const pinnedSelectedSkills = useMemo9(
9307
+ const pinnedSelectedSkills = useMemo8(
9223
9308
  () => filteredSkills.filter((s) => pinnedSkillIds.has(skillFamilyId(s.id))),
9224
9309
  [filteredSkills, pinnedSkillIds]
9225
9310
  );
9226
- const pinnedAvailableSkills = useMemo9(
9311
+ const pinnedAvailableSkills = useMemo8(
9227
9312
  () => filteredSkills.filter((s) => !pinnedSkillIds.has(skillFamilyId(s.id))),
9228
9313
  [filteredSkills, pinnedSkillIds]
9229
9314
  );
@@ -9585,12 +9670,12 @@ var HistoryLoader = forwardRef(
9585
9670
  HistoryLoader.displayName = "HistoryLoader";
9586
9671
 
9587
9672
  // src/atoms/Markdown.tsx
9588
- import { useMemo as useMemo10, useRef as useRef17 } from "react";
9673
+ import { useMemo as useMemo9, useRef as useRef17 } from "react";
9589
9674
  import ReactMarkdown from "react-markdown";
9590
9675
  import remarkGfm from "remark-gfm";
9591
9676
  import { Fragment as Fragment15, jsx as jsx88 } from "react/jsx-runtime";
9592
9677
  function preloadMarkdownOpenUI() {
9593
- return import("./OpenUiFenceBlock-F3YVDKAG.js");
9678
+ return import("./OpenUiFenceBlock-BZPFNXWZ.js");
9594
9679
  }
9595
9680
  var LARGE_STREAMING_FENCE_CHARS = 8 * 1024;
9596
9681
  function getActiveStreamingFenceCode(content) {
@@ -9691,7 +9776,7 @@ function Markdown({
9691
9776
  const SyntaxHighlighter2 = useSlot("SyntaxHighlighter");
9692
9777
  const activeFenceCodeRef = useRef17(null);
9693
9778
  activeFenceCodeRef.current = isStreaming === true ? getActiveStreamingFenceCode(content) : null;
9694
- const components = useMemo10(
9779
+ const components = useMemo9(
9695
9780
  () => makeComponents({
9696
9781
  isStreaming,
9697
9782
  getActiveFenceCode: () => activeFenceCodeRef.current,
@@ -9795,22 +9880,12 @@ function formatTime(date) {
9795
9880
  hour12: true
9796
9881
  }).format(date);
9797
9882
  }
9798
- function formatFullDate(date) {
9799
- return new Intl.DateTimeFormat(void 0, {
9800
- month: "short",
9801
- day: "numeric",
9802
- year: "numeric",
9803
- hour: "numeric",
9804
- minute: "2-digit",
9805
- hour12: true
9806
- }).format(date);
9807
- }
9808
9883
  function MessageTimestamp({ createdAt, className }) {
9809
9884
  const date = toDate(createdAt);
9810
9885
  if (date == null) {
9811
9886
  return null;
9812
9887
  }
9813
- return /* @__PURE__ */ jsx92(LightTooltip, { title: formatFullDate(date), size: "fit", side: "bottom", children: /* @__PURE__ */ jsx92("span", { className: cn("text-xs font-medium cursor-pointer leading-normal shrink-0 text-text-secondary", className), children: formatTime(date) }) });
9888
+ return /* @__PURE__ */ jsx92(LightTooltip, { title: formatAbsoluteDateTime(date), size: "fit", side: "bottom", children: /* @__PURE__ */ jsx92("span", { className: cn("text-xs font-medium cursor-pointer leading-normal shrink-0 text-text-secondary", className), children: formatTime(date) }) });
9814
9889
  }
9815
9890
 
9816
9891
  // src/atoms/MonacoEditorCore.tsx
@@ -10038,7 +10113,7 @@ function PermissionGuard({
10038
10113
  }
10039
10114
 
10040
10115
  // src/atoms/SandboxArtifactDownload.tsx
10041
- import { useMemo as useMemo11 } from "react";
10116
+ import { useMemo as useMemo10 } from "react";
10042
10117
  import { jsx as jsx95 } from "react/jsx-runtime";
10043
10118
  var PREFIX = "sandbox_artifacts";
10044
10119
  var PAIR_RE = /\[([^\]]*)\]\(([^)]*)\)/g;
@@ -10073,7 +10148,7 @@ function SandboxArtifactDownload({
10073
10148
  sandboxDownloadReadOnlyTooltip
10074
10149
  }) {
10075
10150
  const ChatFileDownload2 = useSlot("ChatFileDownload");
10076
- const artifacts = useMemo11(() => parseSandboxArtifacts(code), [code]);
10151
+ const artifacts = useMemo10(() => parseSandboxArtifacts(code), [code]);
10077
10152
  if (artifacts.length === 0) return null;
10078
10153
  return /* @__PURE__ */ jsx95(
10079
10154
  ChatFileDownload2,
@@ -10299,7 +10374,7 @@ import { useRef as useRef20, useState as useState37 } from "react";
10299
10374
 
10300
10375
  // src/atoms/draft/AgentConfigInstructionsContext.tsx
10301
10376
  import { useTrueFoundryAgentSpec as useTrueFoundryAgentSpec5, useTrueFoundryUpdateAgentSpec as useTrueFoundryUpdateAgentSpec4 } from "@truefoundry/assistant-ui-runtime";
10302
- import { createContext as createContext5, useCallback as useCallback13, useContext as useContext6, useMemo as useMemo12 } from "react";
10377
+ import { createContext as createContext5, useCallback as useCallback13, useContext as useContext6, useMemo as useMemo11 } from "react";
10303
10378
 
10304
10379
  // src/hooks/useDebouncedAgentInstructions.ts
10305
10380
  import { useCallback as useCallback12, useEffect as useEffect22, useRef as useRef19, useState as useState36 } from "react";
@@ -10366,7 +10441,7 @@ function AgentConfigInstructionsProvider({ children }) {
10366
10441
  value: agentSpec?.instructions ?? "",
10367
10442
  onCommit: commit
10368
10443
  });
10369
- const value = useMemo12(() => ({ draft, onChange, flush }), [draft, flush, onChange]);
10444
+ const value = useMemo11(() => ({ draft, onChange, flush }), [draft, flush, onChange]);
10370
10445
  return /* @__PURE__ */ jsx97(AgentConfigInstructionsContext.Provider, { value, children });
10371
10446
  }
10372
10447
  function useAgentConfigInstructions() {
@@ -10832,7 +10907,7 @@ import {
10832
10907
  isValidElement as isValidElement2,
10833
10908
  memo,
10834
10909
  useCallback as useCallback14,
10835
- useMemo as useMemo13,
10910
+ useMemo as useMemo12,
10836
10911
  useState as useState38
10837
10912
  } from "react";
10838
10913
  import { Prism as PrismHighlighter } from "react-syntax-highlighter";
@@ -11849,7 +11924,7 @@ function SyntaxHighlighterImpl({ code, language, darkTheme, className, showLineN
11849
11924
  const classNames = useOptionalContentClassNames();
11850
11925
  const style = darkTheme ? one_dark_default : one_light_default;
11851
11926
  const [copied, setCopied] = useState38(false);
11852
- const displayCode = useMemo13(() => stripTrailingNewline(code), [code]);
11927
+ const displayCode = useMemo12(() => stripTrailingNewline(code), [code]);
11853
11928
  const handleCopy = useCallback14(() => {
11854
11929
  void navigator.clipboard.writeText(code).then(() => {
11855
11930
  setCopied(true);
@@ -11962,6 +12037,12 @@ function ThreadListShell({ header, children, className }) {
11962
12037
 
11963
12038
  // src/atoms/ThreadListRow.tsx
11964
12039
  import { jsx as jsx108, jsxs as jsxs79 } from "react/jsx-runtime";
12040
+ function ThreadListAgentName({ agentName }) {
12041
+ return /* @__PURE__ */ jsxs79("span", { className: "mt-0.5 flex min-w-0 items-center gap-1 text-[0.75rem] text-text-secondary", children: [
12042
+ /* @__PURE__ */ jsx108(Icon, { name: "bot", className: "shrink-0" }),
12043
+ /* @__PURE__ */ jsx108("span", { className: "truncate", children: agentName })
12044
+ ] });
12045
+ }
11965
12046
  function ThreadListRow({
11966
12047
  title,
11967
12048
  active,
@@ -12000,10 +12081,7 @@ function ThreadListRow({
12000
12081
  }),
12001
12082
  children: /* @__PURE__ */ jsxs79("span", { className: "min-w-0 flex-1", children: [
12002
12083
  /* @__PURE__ */ jsx108("span", { className: "block truncate text-sm font-normal text-text-primary", children: title }),
12003
- agentName != null ? /* @__PURE__ */ jsxs79("span", { className: "mt-0.5 flex min-w-0 items-center gap-1 text-[0.75rem] text-text-secondary", children: [
12004
- /* @__PURE__ */ jsx108(Icon, { name: "bot", className: "shrink-0" }),
12005
- /* @__PURE__ */ jsx108("span", { className: "truncate", children: agentName })
12006
- ] }) : null
12084
+ agentName != null ? /* @__PURE__ */ jsx108(ThreadListAgentName, { agentName }) : null
12007
12085
  ] })
12008
12086
  }
12009
12087
  ),
@@ -12363,7 +12441,7 @@ import {
12363
12441
  useCallback as useCallback16,
12364
12442
  useContext as useContext7,
12365
12443
  useEffect as useEffect24,
12366
- useMemo as useMemo14,
12444
+ useMemo as useMemo13,
12367
12445
  useRef as useRef22,
12368
12446
  useState as useState40
12369
12447
  } from "react";
@@ -12373,7 +12451,7 @@ import { parse as parsePartialJson } from "partial-json";
12373
12451
  var SUB_AGENT_TOOL_NAME = "create_sub_agent";
12374
12452
  var ASK_USER_TOOL_NAME = "ask_user_question";
12375
12453
  var SANDBOX_TOOL_NAMES = /* @__PURE__ */ new Set(["exec", "sandbox_exec"]);
12376
- var MCP_META_TOOLS = /* @__PURE__ */ new Set(["call_tool", "list_tools", "get_tool_info"]);
12454
+ var MCP_META_TOOLS = /* @__PURE__ */ new Set(["call_tool", "list_tools", "get_tool_info", "get_tool_output_schema"]);
12377
12455
  var APPROVAL_OPTION_DEFAULT_LABELS = {
12378
12456
  "allow-once": "Allow",
12379
12457
  "allow-always": "Always allow",
@@ -12541,11 +12619,14 @@ function resolveSubAgentMeta(part) {
12541
12619
  };
12542
12620
  }
12543
12621
  function mcpDisplayName(toolName, mcpServer, innerToolName) {
12622
+ if (toolName === "list_tools" && mcpServer) {
12623
+ return `list_tools (${mcpServer})`;
12624
+ }
12544
12625
  if (toolName === "call_tool" && innerToolName) {
12545
12626
  return mcpServer ? `call_tool: ${innerToolName} (${mcpServer})` : `call_tool: ${innerToolName}`;
12546
12627
  }
12547
- if (toolName === "get_tool_info" && innerToolName && mcpServer) {
12548
- return `get_tool_info: ${innerToolName} (${mcpServer})`;
12628
+ if ((toolName === "get_tool_info" || toolName === "get_tool_output_schema") && innerToolName && mcpServer) {
12629
+ return `${toolName}: ${innerToolName} (${mcpServer})`;
12549
12630
  }
12550
12631
  return toolName;
12551
12632
  }
@@ -12654,7 +12735,7 @@ function ApprovalFocusProvider({ children }) {
12654
12735
  },
12655
12736
  [messages, startFlash]
12656
12737
  );
12657
- const api = useMemo14(
12738
+ const api = useMemo13(
12658
12739
  () => ({
12659
12740
  registerTarget,
12660
12741
  registerExpand,
@@ -13215,7 +13296,7 @@ function AgentMetricsContainer({
13215
13296
  // src/containers/AgentSessionTimelineContainer.tsx
13216
13297
  import { ThreadPrimitive } from "@assistant-ui/react";
13217
13298
  import { convertTurnsToThreadMessages } from "@truefoundry/assistant-ui-runtime";
13218
- import { Suspense as Suspense3, useCallback as useCallback22, useEffect as useEffect30, useMemo as useMemo18, useRef as useRef29, useState as useState51 } from "react";
13299
+ import { Suspense as Suspense3, useCallback as useCallback22, useEffect as useEffect30, useMemo as useMemo17, useRef as useRef29, useState as useState51 } from "react";
13219
13300
 
13220
13301
  // src/utils/buildSessionMetrics.ts
13221
13302
  function segmentDurationMs(segment) {
@@ -13607,11 +13688,15 @@ function getSubAgentDescription(event) {
13607
13688
  function toolCallDescription(toolCall) {
13608
13689
  const fn = isRecord2(toolCall.function) ? toolCall.function : void 0;
13609
13690
  const name = typeof fn?.name === "string" ? fn.name : "";
13691
+ const argumentsJson = typeof fn?.arguments === "string" ? fn.arguments : void 0;
13610
13692
  if (SANDBOX_TOOL_NAMES.has(name) || name === "code_sandbox") {
13611
- const argumentsJson = typeof fn?.arguments === "string" ? fn.arguments : void 0;
13612
13693
  const intent = parseSandboxArgs(argumentsJson).intent?.trim();
13613
13694
  return intent != null && intent.length > 0 ? intent : name;
13614
13695
  }
13696
+ if (MCP_META_TOOLS.has(name)) {
13697
+ const { mcpServer, innerToolName } = parseMcpToolArgs(argumentsJson);
13698
+ return mcpDisplayName(name, mcpServer, innerToolName);
13699
+ }
13615
13700
  return name;
13616
13701
  }
13617
13702
 
@@ -14058,7 +14143,7 @@ import {
14058
14143
  useSmooth
14059
14144
  } from "@assistant-ui/react";
14060
14145
  import { useTrueFoundryDownloadSandboxFile } from "@truefoundry/assistant-ui-runtime";
14061
- import { useCallback as useCallback17, useMemo as useMemo15, useRef as useRef26 } from "react";
14146
+ import { useCallback as useCallback17, useMemo as useMemo14, useRef as useRef26 } from "react";
14062
14147
 
14063
14148
  // src/hooks/useThrottledMarkdownText.ts
14064
14149
  import { useEffect as useEffect27, useRef as useRef25, useState as useState44 } from "react";
@@ -14169,7 +14254,7 @@ function AssistantTextContainer() {
14169
14254
  }
14170
14255
  }
14171
14256
  }, []);
14172
- return useMemo15(
14257
+ return useMemo14(
14173
14258
  () => /* @__PURE__ */ jsx122(Markdown2, { content: text, isStreaming, onDownloadArtifact: handleDownloadArtifact }),
14174
14259
  [Markdown2, text, isStreaming, handleDownloadArtifact]
14175
14260
  );
@@ -14276,12 +14361,12 @@ function useNestedApprovalBridge() {
14276
14361
  }
14277
14362
 
14278
14363
  // src/containers/SandboxToolCallContainer.tsx
14279
- import { useMemo as useMemo16, useState as useState46 } from "react";
14364
+ import { useMemo as useMemo15, useState as useState46 } from "react";
14280
14365
  import { jsx as jsx125 } from "react/jsx-runtime";
14281
14366
  function SandboxToolCallContainer(props) {
14282
14367
  const SandboxToolCallCard2 = useSlot("SandboxToolCallCard");
14283
14368
  const [viewMode, setViewMode] = useState46("terminal");
14284
- const hasContent = useMemo16(() => {
14369
+ const hasContent = useMemo15(() => {
14285
14370
  if (viewMode === "code") return Boolean(props.argsJson || props.resultJson);
14286
14371
  return Boolean(props.command || props.resultText || props.resultJson);
14287
14372
  }, [props.argsJson, props.command, props.resultJson, props.resultText, viewMode]);
@@ -14289,7 +14374,7 @@ function SandboxToolCallContainer(props) {
14289
14374
  }
14290
14375
 
14291
14376
  // src/containers/ToolApprovalContainer.tsx
14292
- import { useCallback as useCallback19, useMemo as useMemo17, useState as useState47 } from "react";
14377
+ import { useCallback as useCallback19, useMemo as useMemo16, useState as useState47 } from "react";
14293
14378
  import { jsx as jsx126 } from "react/jsx-runtime";
14294
14379
  function ToolApprovalContainer({
14295
14380
  toolName = "",
@@ -14304,7 +14389,7 @@ function ToolApprovalContainer({
14304
14389
  const [selectedDenyOptionId, setSelectedDenyOptionId] = useState47(null);
14305
14390
  const [denialReason, setDenialReason] = useState47("");
14306
14391
  const [showReasonError, setShowReasonError] = useState47(false);
14307
- const approveOptions = useMemo17(
14392
+ const approveOptions = useMemo16(
14308
14393
  () => options.filter((option) => option.isAllow).map((option, index) => ({
14309
14394
  ...option,
14310
14395
  variant: index === 0 ? "primary" : "secondary",
@@ -14312,7 +14397,7 @@ function ToolApprovalContainer({
14312
14397
  })),
14313
14398
  [options]
14314
14399
  );
14315
- const denyOptions = useMemo17(
14400
+ const denyOptions = useMemo16(
14316
14401
  () => options.filter((option) => !option.isAllow).map((option) => ({
14317
14402
  ...option,
14318
14403
  variant: "secondary",
@@ -14911,7 +14996,7 @@ function UserMessageContainer() {
14911
14996
  }
14912
14997
 
14913
14998
  // src/containers/AgentSessionTimelineContainer.tsx
14914
- import { Fragment as Fragment22, jsx as jsx133, jsxs as jsxs89 } from "react/jsx-runtime";
14999
+ import { jsx as jsx133, jsxs as jsxs89 } from "react/jsx-runtime";
14915
15000
  function ReadOnlyMarkdown(props) {
14916
15001
  return /* @__PURE__ */ jsx133(
14917
15002
  Markdown,
@@ -14923,9 +15008,11 @@ function ReadOnlyMarkdown(props) {
14923
15008
  }
14924
15009
  );
14925
15010
  }
15011
+ function ReadOnlyUserMessageActionBar({ isCopied, onCopy, createdAt, className }) {
15012
+ return /* @__PURE__ */ jsx133(MessageActionBar, { isCopied, onCopy, createdAt, className });
15013
+ }
14926
15014
  var READ_ONLY_SLOT_OVERRIDES = {
14927
- UserMessageActionBar: () => /* @__PURE__ */ jsx133(Fragment22, {}),
14928
- MessageActionBar: () => /* @__PURE__ */ jsx133(Fragment22, {}),
15015
+ UserMessageActionBar: ReadOnlyUserMessageActionBar,
14929
15016
  Markdown: ReadOnlyMarkdown
14930
15017
  };
14931
15018
  function turnIdFromMessage(message) {
@@ -15000,10 +15087,10 @@ function AgentSessionTimelineContainer({ sessionId, events, listMetrics }) {
15000
15087
  const [messages, setMessages] = useState51();
15001
15088
  const [loadFailed, setLoadFailed] = useState51(false);
15002
15089
  const sectionRefs = useRef29(/* @__PURE__ */ new Map());
15003
- const turnViews = useMemo18(() => buildSessionTurnViews(events), [events]);
15004
- const projectionEvents = useMemo18(() => buildProjectionEvents(events, turnViews), [events, turnViews]);
15005
- const timelineSegments = useMemo18(() => buildSessionTimelineSegments(turnViews), [turnViews]);
15006
- const sessionMetrics = useMemo18(
15090
+ const turnViews = useMemo17(() => buildSessionTurnViews(events), [events]);
15091
+ const projectionEvents = useMemo17(() => buildProjectionEvents(events, turnViews), [events, turnViews]);
15092
+ const timelineSegments = useMemo17(() => buildSessionTimelineSegments(turnViews), [turnViews]);
15093
+ const sessionMetrics = useMemo17(
15007
15094
  () => buildSessionMetrics({ turns: turnViews, segments: timelineSegments, listMetrics }),
15008
15095
  [listMetrics, timelineSegments, turnViews]
15009
15096
  );
@@ -15085,28 +15172,28 @@ function SessionTurnSection({
15085
15172
  }
15086
15173
 
15087
15174
  // src/theme/defaultSlots.ts
15088
- var AgentOverview = lazy(() => import("./AgentOverview-5UPMYHT2.js"));
15175
+ var AgentOverview = lazy(() => import("./AgentOverview-5JIVYXPX.js"));
15089
15176
  var AgentSessions = lazy(async () => {
15090
- const mod = await import("./AgentSessions-WNYVVB6Q.js");
15177
+ const mod = await import("./AgentSessions-NSN4LIGJ.js");
15091
15178
  return { default: mod.AgentSessions };
15092
15179
  });
15093
15180
  var AgentCodeSnippets = lazy(
15094
- () => import("./AgentCodeSnippets-EK7KMIY2.js")
15181
+ () => import("./AgentCodeSnippets-DAZWEBJS.js")
15095
15182
  );
15096
15183
  var SchedulesPage = lazy(async () => {
15097
- const mod = await import("./SchedulesPage-FS2QZ5KB.js");
15184
+ const mod = await import("./SchedulesPage-TIS3BH67.js");
15098
15185
  return { default: mod.SchedulesPage };
15099
15186
  });
15100
15187
  var AgentSessionEventTimeline = lazy(async () => {
15101
- const mod = await import("./AgentSessionEventTimeline-V6NPCYMW.js");
15188
+ const mod = await import("./AgentSessionEventTimeline-WELJSS6O.js");
15102
15189
  return { default: mod.AgentSessionEventTimeline };
15103
15190
  });
15104
15191
  var AgentSessionEventTimelineChart = lazy(async () => {
15105
- const mod = await import("./AgentSessionEventTimelineChart-YQWZBQCG.js");
15192
+ const mod = await import("./AgentSessionEventTimelineChart-ADB3KICM.js");
15106
15193
  return { default: mod.AgentSessionEventTimelineChart };
15107
15194
  });
15108
15195
  var AgentMetricChart = lazy(async () => {
15109
- const mod = await import("./AgentMetricChart-UZCYOC4M.js");
15196
+ const mod = await import("./AgentMetricChart-VDIE3S2P.js");
15110
15197
  return { default: mod.AgentMetricChart };
15111
15198
  });
15112
15199
  var defaultSlots = {
@@ -15237,7 +15324,7 @@ function SlotsProvider({
15237
15324
  }) {
15238
15325
  const parentSlots = useContext9(SlotsContext);
15239
15326
  const inheritedTheme = useContext9(ThemeModeContext);
15240
- const resolved = useMemo19(() => ({ ...parentSlots, ...overrides }), [parentSlots, overrides]);
15327
+ const resolved = useMemo18(() => ({ ...parentSlots, ...overrides }), [parentSlots, overrides]);
15241
15328
  const slotsTree = /* @__PURE__ */ jsx134(SlotsProviderContents, { slots: resolved, inheritedTheme, theme, children });
15242
15329
  const hasParentTheme = inheritedTheme !== void 0;
15243
15330
  if (theme !== void 0 || !hasParentTheme) {
@@ -15317,6 +15404,8 @@ export {
15317
15404
  AgentMetricStatistics,
15318
15405
  AgentMetricsView,
15319
15406
  AgentOverviewCard,
15407
+ formatAbsoluteDateTime,
15408
+ MAX_SESSION_TITLE_LENGTH,
15320
15409
  threadListIndicesByRecency,
15321
15410
  readThreadAgentName,
15322
15411
  threadListItemIsMutable,
@@ -15489,4 +15578,4 @@ export {
15489
15578
  UserMessageContainer,
15490
15579
  defaultSlots
15491
15580
  };
15492
- //# sourceMappingURL=chunk-KZK2PQ4A.js.map
15581
+ //# sourceMappingURL=chunk-XR4S7B2K.js.map