@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/styles.css CHANGED
@@ -155,6 +155,7 @@
155
155
  .a24-context-status__sr-only { border: 0; clip: rect(0, 0, 0, 0); height: 1px; margin: -1px; overflow: hidden; padding: 0; position: absolute; white-space: nowrap; width: 1px; }
156
156
  .a24-tool-disclosure { min-width: 0; width: 100%; }
157
157
  .a24-tool-trigger-row { align-items: center; display: flex; gap: .35rem; min-width: 0; }
158
+ .a24-tool-trigger-row--text { padding-inline: 6px; }
158
159
  .a24-tool-trigger { align-items: center; appearance: none; background: transparent; border: 0; color: var(--a24-muted); display: flex; font: inherit; font-size: .875rem; gap: .35rem; line-height: 1.35; min-width: 0; padding: .125rem 0; text-align: start; }
159
160
  button.a24-tool-trigger { border-radius: .5rem; cursor: pointer; transition: background-color 140ms ease, color 140ms ease; }
160
161
  button.a24-tool-trigger:hover { color: var(--a24-text); }
@@ -204,8 +205,9 @@ button.a24-tool-trigger:focus-visible { outline: 2px solid var(--a24-focus); out
204
205
  to { opacity: 0; transform: translateY(-75%); }
205
206
  }
206
207
 
207
- .a24-message-response { box-sizing: border-box; max-width: 100%; min-width: 0; padding-inline: 3px; width: 100%; }
208
- .a24-timeline-error { padding-inline: 3px; }
208
+ .a24-message-response { box-sizing: border-box; max-width: 100%; min-width: 0; padding-inline: 6px; width: 100%; }
209
+ .a24-timeline-error { padding-inline: 6px; }
210
+ .a24-ask-user--resolved { padding-inline: 6px; }
209
211
  .a24-chat-message { display: flex; flex-direction: column; gap: .5rem; min-width: 0; width: 100%; }
210
212
  .a24-chat-message--user { margin-inline-start: auto; max-width: 80%; }
211
213
  .a24-chat-message--assistant { max-width: 100%; }
package/dist/ui/index.cjs CHANGED
@@ -1835,6 +1835,7 @@ function toolRowLabel(part) {
1835
1835
  function ToolDisclosure({
1836
1836
  children,
1837
1837
  error,
1838
+ grouped,
1838
1839
  label,
1839
1840
  loading,
1840
1841
  onExpandedChange,
@@ -1848,9 +1849,10 @@ function ToolDisclosure({
1848
1849
  const [open, setOpen] = React6.useState(false);
1849
1850
  const contentId = React6.useId();
1850
1851
  const expandable = React6.Children.toArray(children).length > 0;
1852
+ const textOnlyRoot = Boolean(root && !grouped && !showOrb);
1851
1853
  if (!expandable) {
1852
1854
  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");
1853
- return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "a24-tool-trigger-row", children: [
1855
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: cn("a24-tool-trigger-row", textOnlyRoot && "a24-tool-trigger-row--text"), children: [
1854
1856
  onSelect && part ? /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("button", { className: triggerClassName, onClick: () => onSelect(part), type: "button", children: [
1855
1857
  showOrb ? /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(ToolActivityOrb, { label: statusLabel }) : null,
1856
1858
  /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { className: "a24-tool-trigger__label", children: label })
@@ -1862,7 +1864,7 @@ function ToolDisclosure({
1862
1864
  ] });
1863
1865
  }
1864
1866
  return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "a24-tool-disclosure", children: [
1865
- /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "a24-tool-trigger-row", children: [
1867
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: cn("a24-tool-trigger-row", textOnlyRoot && "a24-tool-trigger-row--text"), children: [
1866
1868
  /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
1867
1869
  "button",
1868
1870
  {
@@ -1987,6 +1989,7 @@ function AgentChatToolSession({
1987
1989
  {
1988
1990
  accessory: slots?.renderToolAccessory?.(context),
1989
1991
  error: failed,
1992
+ grouped: true,
1990
1993
  label: labelContent,
1991
1994
  loading: presentingActivity,
1992
1995
  onExpandedChange: slots?.onExpandedChange,
@@ -2031,6 +2034,7 @@ function AgentChatSubagentGroup({ isLatestActivity = true, isLive = false, part,
2031
2034
  {
2032
2035
  accessory: slots?.renderToolAccessory?.(context),
2033
2036
  error: failed,
2037
+ grouped: true,
2034
2038
  label: labelContent,
2035
2039
  loading: presentingActivity,
2036
2040
  onExpandedChange: slots?.onExpandedChange,