@agents24/chat-react 0.5.36 → 0.5.38

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 (42) hide show
  1. package/README.md +31 -1
  2. package/compatibility.json +5 -5
  3. package/dist/{chunk-INO5DSSJ.js → chunk-DWDHK4FZ.js} +3 -4
  4. package/dist/chunk-DWDHK4FZ.js.map +1 -0
  5. package/dist/generated/delegation-types.d.ts +3 -2
  6. package/dist/generated/run-usage.d.ts +11 -0
  7. package/dist/registry/agents24-chat.json +13 -13
  8. package/dist/runtime/index.cjs +25 -9
  9. package/dist/runtime/index.cjs.map +1 -1
  10. package/dist/runtime/index.js +24 -7
  11. package/dist/runtime/index.js.map +1 -1
  12. package/dist/runtime/input-contract.d.ts +1 -1
  13. package/dist/runtime/use-agent-chat-hitl.d.ts +2 -2
  14. package/dist/runtime/use-agent-chat-runtime.d.ts +4 -6
  15. package/dist/scaffold/app.d.ts +2 -2
  16. package/dist/scaffold/components/chat/chat-composer.d.ts +2 -1
  17. package/dist/scaffold/components/chat/chat-message.d.ts +2 -2
  18. package/dist/scaffold/components/chat/message-parts.d.ts +2 -2
  19. package/dist/scaffold/index.cjs +17 -13
  20. package/dist/scaffold/index.cjs.map +1 -1
  21. package/dist/scaffold/index.js +11 -7
  22. package/dist/scaffold/index.js.map +1 -1
  23. package/dist/styles.css +7 -0
  24. package/dist/ui/agent-chat-composer.d.ts +9 -1
  25. package/dist/ui/agent-chat-message.d.ts +6 -2
  26. package/dist/ui/agent-response-timeline.d.ts +11 -3
  27. package/dist/ui/ask-user-interaction.d.ts +5 -1
  28. package/dist/ui/hitl-submission-status.d.ts +22 -0
  29. package/dist/ui/index.cjs +540 -340
  30. package/dist/ui/index.cjs.map +1 -1
  31. package/dist/ui/index.d.ts +1 -0
  32. package/dist/ui/index.js +536 -338
  33. package/dist/ui/index.js.map +1 -1
  34. package/dist/ui/use-agent-chat-composer.d.ts +28 -3
  35. package/dist/ui/use-audio-recorder.d.ts +15 -2
  36. package/package.json +3 -3
  37. package/scaffold/src/app.tsx +2 -1
  38. package/scaffold/src/components/chat/chat-composer.tsx +5 -3
  39. package/scaffold/src/components/chat/chat-message.tsx +3 -3
  40. package/scaffold/src/components/chat/chat-shell.tsx +2 -1
  41. package/scaffold/src/components/chat/message-parts.tsx +6 -6
  42. package/dist/chunk-INO5DSSJ.js.map +0 -1
@@ -25,6 +25,7 @@ import {
25
25
  ChatAttachmentRows,
26
26
  useAgentChatComposer
27
27
  } from "@agents24/chat-react/ui";
28
+ import { attachmentFileAccept } from "@agents24/chat-react/runtime";
28
29
 
29
30
  // scaffold/src/components/ui/button.tsx
30
31
  import { cva } from "class-variance-authority";
@@ -491,6 +492,7 @@ function ChatComposer({
491
492
  disabled,
492
493
  contextWindow,
493
494
  focusKey,
495
+ scopeKey,
494
496
  forceExpanded = false,
495
497
  isCancelling = false,
496
498
  isRunning,
@@ -526,6 +528,7 @@ function ChatComposer({
526
528
  } = useAgentChatComposer({
527
529
  inputContract,
528
530
  disabled,
531
+ scopeKey,
529
532
  focusKey,
530
533
  forceExpanded,
531
534
  isCancelling,
@@ -610,7 +613,7 @@ function ChatComposer({
610
613
  className: "sr-only",
611
614
  type: "file",
612
615
  multiple: true,
613
- accept: attachmentMimeTypes.join(","),
616
+ accept: attachmentFileAccept(attachmentMimeTypes),
614
617
  onChange: (event) => {
615
618
  addFiles(Array.from(event.target.files ?? []));
616
619
  event.currentTarget.value = "";
@@ -943,8 +946,8 @@ function MessageParts({
943
946
  getHitlActionState,
944
947
  isLoading,
945
948
  message,
946
- onHitlAction: (part, response) => {
947
- void onHitlAction(part, response).catch(() => void 0);
949
+ onHitlAction: (part, response, options2) => {
950
+ void onHitlAction(part, response, options2).catch(() => void 0);
948
951
  },
949
952
  parts: message.parts
950
953
  }
@@ -958,8 +961,8 @@ function MessageParts({
958
961
  {
959
962
  getHitlActionState,
960
963
  message,
961
- onHitlAction: (hitlPart, response) => {
962
- void onHitlAction(hitlPart, response).catch(() => void 0);
964
+ onHitlAction: (hitlPart, response, options2) => {
965
+ void onHitlAction(hitlPart, response, options2).catch(() => void 0);
963
966
  },
964
967
  part
965
968
  },
@@ -1141,7 +1144,7 @@ function ChatMessage({
1141
1144
  message
1142
1145
  }
1143
1146
  ) }),
1144
- showCompletionActions && /* @__PURE__ */ jsx14(MessageFooter, { className: "gap-1 opacity-70 transition-opacity group-hover/message:opacity-100", children: /* @__PURE__ */ jsx14(
1147
+ showCompletionActions && /* @__PURE__ */ jsx14(MessageFooter, { className: "a24-chat-message-action-row--assistant gap-1", children: /* @__PURE__ */ jsx14(
1145
1148
  AgentChatDefaultActions,
1146
1149
  {
1147
1150
  animateCompletion: animateCompletionActions,
@@ -2117,7 +2120,7 @@ import {
2117
2120
  } from "@agents24/chat-react";
2118
2121
  import { Fragment as Fragment3, jsx as jsx25, jsxs as jsxs15 } from "react/jsx-runtime";
2119
2122
  var LOADING_INPUT_CONTRACT = {
2120
- version: "agents24.runtime-inputs.v2",
2123
+ version: "agents24.runtime-inputs.v3",
2121
2124
  modalities: {
2122
2125
  text: { enabled: false, required: false },
2123
2126
  files: { enabled: false, required: false, allowed_mime_types: [] },
@@ -2325,6 +2328,7 @@ function ChatShell({
2325
2328
  inputContract: runtime.inputContract || LOADING_INPUT_CONTRACT,
2326
2329
  contextWindow: runtime.contextWindow,
2327
2330
  disabled: runtime.isBootstrapping || runtime.isChangingAgent || isUploading || hasBlockingError,
2331
+ scopeKey: controller.activeThreadId,
2328
2332
  focusKey: controller.activeThreadId,
2329
2333
  forceExpanded: isEmptyState,
2330
2334
  isCancelling,