@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.
- package/README.md +31 -1
- package/compatibility.json +5 -5
- package/dist/{chunk-INO5DSSJ.js → chunk-DWDHK4FZ.js} +3 -4
- package/dist/chunk-DWDHK4FZ.js.map +1 -0
- package/dist/generated/delegation-types.d.ts +3 -2
- package/dist/generated/run-usage.d.ts +11 -0
- package/dist/registry/agents24-chat.json +13 -13
- package/dist/runtime/index.cjs +25 -9
- package/dist/runtime/index.cjs.map +1 -1
- package/dist/runtime/index.js +24 -7
- package/dist/runtime/index.js.map +1 -1
- package/dist/runtime/input-contract.d.ts +1 -1
- package/dist/runtime/use-agent-chat-hitl.d.ts +2 -2
- package/dist/runtime/use-agent-chat-runtime.d.ts +4 -6
- package/dist/scaffold/app.d.ts +2 -2
- package/dist/scaffold/components/chat/chat-composer.d.ts +2 -1
- package/dist/scaffold/components/chat/chat-message.d.ts +2 -2
- package/dist/scaffold/components/chat/message-parts.d.ts +2 -2
- package/dist/scaffold/index.cjs +17 -13
- package/dist/scaffold/index.cjs.map +1 -1
- package/dist/scaffold/index.js +11 -7
- package/dist/scaffold/index.js.map +1 -1
- package/dist/styles.css +7 -0
- package/dist/ui/agent-chat-composer.d.ts +9 -1
- package/dist/ui/agent-chat-message.d.ts +6 -2
- package/dist/ui/agent-response-timeline.d.ts +11 -3
- package/dist/ui/ask-user-interaction.d.ts +5 -1
- package/dist/ui/hitl-submission-status.d.ts +22 -0
- package/dist/ui/index.cjs +540 -340
- package/dist/ui/index.cjs.map +1 -1
- package/dist/ui/index.d.ts +1 -0
- package/dist/ui/index.js +536 -338
- package/dist/ui/index.js.map +1 -1
- package/dist/ui/use-agent-chat-composer.d.ts +28 -3
- package/dist/ui/use-audio-recorder.d.ts +15 -2
- package/package.json +3 -3
- package/scaffold/src/app.tsx +2 -1
- package/scaffold/src/components/chat/chat-composer.tsx +5 -3
- package/scaffold/src/components/chat/chat-message.tsx +3 -3
- package/scaffold/src/components/chat/chat-shell.tsx +2 -1
- package/scaffold/src/components/chat/message-parts.tsx +6 -6
- package/dist/chunk-INO5DSSJ.js.map +0 -1
package/dist/scaffold/index.js
CHANGED
|
@@ -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
|
|
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: "
|
|
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.
|
|
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,
|