@truefoundry/agent-ui-sdk 0.0.2 → 0.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -300,6 +300,7 @@ type ToolCallCardProps = Omit<ToolCallCardProps$1, "className"> & {
300
300
  requestSlot?: ReactNode;
301
301
  responseSlot?: ReactNode;
302
302
  className?: string;
303
+ mcpServerName?: string;
303
304
  };
304
305
  declare function ToolCallCard(props: ToolCallCardProps): react.JSX.Element;
305
306
  declare module "../theme/SlotsProvider.js" {
package/dist/index.js CHANGED
@@ -203,10 +203,11 @@ import {
203
203
  } from "tfy-web-components/components/molecules/agent-chat";
204
204
  import { jsx as jsx13 } from "react/jsx-runtime";
205
205
  function ToolCallCard(props) {
206
+ const { mcpServerName, ...tfyProps } = props;
206
207
  return /* @__PURE__ */ jsx13(
207
208
  TfyToolCallCard,
208
209
  {
209
- ...props,
210
+ ...tfyProps,
210
211
  className: cn("aui-tool-call-card", props.className)
211
212
  }
212
213
  );
@@ -1056,7 +1057,7 @@ function WelcomeScreen({ heading = "How can I help you today?", className }) {
1056
1057
 
1057
1058
  // src/atoms/Toast.tsx
1058
1059
  import { XIcon } from "lucide-react";
1059
- import { Fragment as Fragment3, jsx as jsx37, jsxs as jsxs14 } from "react/jsx-runtime";
1060
+ import { jsx as jsx37, jsxs as jsxs14 } from "react/jsx-runtime";
1060
1061
  function Toast({ title, description, open, onOpenChange, className }) {
1061
1062
  if (!open) return null;
1062
1063
  return /* @__PURE__ */ jsxs14(
@@ -1088,10 +1089,7 @@ function Toast({ title, description, open, onOpenChange, className }) {
1088
1089
  );
1089
1090
  }
1090
1091
  function ToastStack({ children, duration = Number.POSITIVE_INFINITY }) {
1091
- return /* @__PURE__ */ jsxs14(Fragment3, { children: [
1092
- children,
1093
- /* @__PURE__ */ jsx37("div", { className: "fixed inset-x-0 bottom-0 z-50 flex max-h-screen flex-col-reverse gap-2 p-4 sm:bottom-4 sm:left-1/2 sm:w-full sm:max-w-2xl sm:-translate-x-1/2" })
1094
- ] });
1092
+ return /* @__PURE__ */ jsx37("div", { className: "pointer-events-none fixed bottom-4 left-1/2 z-50 flex h-full max-h-screen w-full max-w-2xl -translate-x-1/2 flex-col-reverse gap-2 px-4", children });
1095
1093
  }
1096
1094
 
1097
1095
  // src/theme/defaultSlots.ts
@@ -1353,10 +1351,10 @@ function ErrorToasterProvider({ children }) {
1353
1351
  setOpen(true);
1354
1352
  }, []);
1355
1353
  const value = useMemo2(() => ({ showError }), [showError]);
1356
- return /* @__PURE__ */ jsx39(ErrorToasterContext.Provider, { value, children: /* @__PURE__ */ jsxs15(ToastStack2, { children: [
1354
+ return /* @__PURE__ */ jsxs15(ErrorToasterContext.Provider, { value, children: [
1357
1355
  children,
1358
- toast != null && /* @__PURE__ */ jsx39(Toast2, { title: toast.title, description: toast.description, open, onOpenChange: setOpen })
1359
- ] }) });
1356
+ /* @__PURE__ */ jsx39(ToastStack2, { children: toast != null && /* @__PURE__ */ jsx39(Toast2, { title: toast.title, description: toast.description, open, onOpenChange: setOpen }) })
1357
+ ] });
1360
1358
  }
1361
1359
  function useErrorToaster() {
1362
1360
  const context = useContext4(ErrorToasterContext);
@@ -1969,6 +1967,7 @@ var ToolCallContainer = (part) => {
1969
1967
  awaiting: status === "running",
1970
1968
  awaitingText: durationText ?? "Awaiting Response\u2026",
1971
1969
  showResponseLine: status !== "running" && !!resultDisplay2.data,
1970
+ mcpServerName: mcpServer,
1972
1971
  requestSlot: argsDisplay2.value ? /* @__PURE__ */ jsx46(
1973
1972
  ToolCallContentBlockContainer,
1974
1973
  {
@@ -2009,11 +2008,13 @@ var ToolCallContainer = (part) => {
2009
2008
  ToolCallCard2,
2010
2009
  {
2011
2010
  toolName: displayName,
2011
+ icon: "mcp-server",
2012
2012
  expanded,
2013
2013
  onToggle: () => setExpanded((prev) => !prev),
2014
2014
  awaiting: status === "running",
2015
2015
  awaitingText: durationText ?? "Awaiting Response\u2026",
2016
2016
  showResponseLine: status !== "running" && resultDisplay2.data !== void 0,
2017
+ mcpServerName: mcpServer,
2017
2018
  requestSlot: inputDisplay.value ? /* @__PURE__ */ jsx46(
2018
2019
  ToolCallContentBlockContainer,
2019
2020
  {
@@ -2561,7 +2562,7 @@ function McpAuthContainer() {
2561
2562
  }
2562
2563
 
2563
2564
  // src/containers/ComposerContainer.tsx
2564
- import { Fragment as Fragment4, jsx as jsx55, jsxs as jsxs18 } from "react/jsx-runtime";
2565
+ import { Fragment as Fragment3, jsx as jsx55, jsxs as jsxs18 } from "react/jsx-runtime";
2565
2566
  function ComposerContainer({
2566
2567
  placeholder = "Ask anything... (Shift+Enter for new line)"
2567
2568
  }) {
@@ -2578,7 +2579,7 @@ function ComposerContainer({
2578
2579
  if (pauseView.kind === "ask-user") {
2579
2580
  return /* @__PURE__ */ jsx55(AskUserContainer, {});
2580
2581
  }
2581
- return /* @__PURE__ */ jsxs18(Fragment4, { children: [
2582
+ return /* @__PURE__ */ jsxs18(Fragment3, { children: [
2582
2583
  /* @__PURE__ */ jsx55(
2583
2584
  "input",
2584
2585
  {
@@ -2620,7 +2621,7 @@ function ComposerContainer({
2620
2621
  // src/containers/ThreadListContainer.tsx
2621
2622
  import { useAui as useAui3, useAuiState as useAuiState14 } from "@assistant-ui/react";
2622
2623
  import { useEffect as useEffect6, useRef as useRef4 } from "react";
2623
- import { Fragment as Fragment5, jsx as jsx56, jsxs as jsxs19 } from "react/jsx-runtime";
2624
+ import { Fragment as Fragment4, jsx as jsx56, jsxs as jsxs19 } from "react/jsx-runtime";
2624
2625
  function ThreadListContainer() {
2625
2626
  const ThreadListShell2 = useSlot("ThreadListShell");
2626
2627
  const ThreadListNewButton2 = useSlot("ThreadListNewButton");
@@ -2662,7 +2663,7 @@ function ThreadListContainer() {
2662
2663
  id
2663
2664
  );
2664
2665
  }),
2665
- !isLoading && hasMore && /* @__PURE__ */ jsxs19(Fragment5, { children: [
2666
+ !isLoading && hasMore && /* @__PURE__ */ jsxs19(Fragment4, { children: [
2666
2667
  isLoadingMore && /* @__PURE__ */ jsx56(ThreadListRowSkeleton2, { count: 1 }),
2667
2668
  /* @__PURE__ */ jsx56("div", { ref: sentinelRef, "aria-hidden": true })
2668
2669
  ] })