@agents24/chat-react 0.5.3 → 0.5.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/ui/index.js CHANGED
@@ -1559,6 +1559,7 @@ function toolRowLabel(part) {
1559
1559
  function ToolDisclosure({
1560
1560
  children,
1561
1561
  error,
1562
+ grouped,
1562
1563
  label,
1563
1564
  loading,
1564
1565
  onExpandedChange,
@@ -1572,9 +1573,10 @@ function ToolDisclosure({
1572
1573
  const [open, setOpen] = React6.useState(false);
1573
1574
  const contentId = React6.useId();
1574
1575
  const expandable = React6.Children.toArray(children).length > 0;
1576
+ const textOnlyRoot = Boolean(root && !grouped && !showOrb);
1575
1577
  if (!expandable) {
1576
1578
  const triggerClassName = cn("a24-tool-trigger", root && "a24-tool-trigger--root", root && !showOrb && "a24-tool-trigger--without-orb", error && "a24-tool-trigger--error", loading && "a24-tool-trigger--active");
1577
- return /* @__PURE__ */ jsxs4("div", { className: "a24-tool-trigger-row", children: [
1579
+ return /* @__PURE__ */ jsxs4("div", { className: cn("a24-tool-trigger-row", textOnlyRoot && "a24-tool-trigger-row--text"), children: [
1578
1580
  onSelect && part ? /* @__PURE__ */ jsxs4("button", { className: triggerClassName, onClick: () => onSelect(part), type: "button", children: [
1579
1581
  showOrb ? /* @__PURE__ */ jsx8(ToolActivityOrb, { label: statusLabel }) : null,
1580
1582
  /* @__PURE__ */ jsx8("span", { className: "a24-tool-trigger__label", children: label })
@@ -1586,7 +1588,7 @@ function ToolDisclosure({
1586
1588
  ] });
1587
1589
  }
1588
1590
  return /* @__PURE__ */ jsxs4("div", { className: "a24-tool-disclosure", children: [
1589
- /* @__PURE__ */ jsxs4("div", { className: "a24-tool-trigger-row", children: [
1591
+ /* @__PURE__ */ jsxs4("div", { className: cn("a24-tool-trigger-row", textOnlyRoot && "a24-tool-trigger-row--text"), children: [
1590
1592
  /* @__PURE__ */ jsxs4(
1591
1593
  "button",
1592
1594
  {
@@ -1711,6 +1713,7 @@ function AgentChatToolSession({
1711
1713
  {
1712
1714
  accessory: slots?.renderToolAccessory?.(context),
1713
1715
  error: failed,
1716
+ grouped: true,
1714
1717
  label: labelContent,
1715
1718
  loading: presentingActivity,
1716
1719
  onExpandedChange: slots?.onExpandedChange,
@@ -1755,6 +1758,7 @@ function AgentChatSubagentGroup({ isLatestActivity = true, isLive = false, part,
1755
1758
  {
1756
1759
  accessory: slots?.renderToolAccessory?.(context),
1757
1760
  error: failed,
1761
+ grouped: true,
1758
1762
  label: labelContent,
1759
1763
  loading: presentingActivity,
1760
1764
  onExpandedChange: slots?.onExpandedChange,