create-agents24-app 0.2.36 → 0.2.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/dist/scaffold/src/app.tsx +2 -1
- package/dist/scaffold/src/components/chat/chat-composer.tsx +5 -3
- package/dist/scaffold/src/components/chat/chat-message.tsx +3 -3
- package/dist/scaffold/src/components/chat/chat-shell.tsx +2 -1
- package/dist/scaffold/src/components/chat/message-parts.tsx +6 -6
- package/dist/scaffold-manifest.json +1 -1
- package/package.json +2 -2
- package/versions.json +4 -4
|
@@ -10,6 +10,7 @@ import type { HitlActionState } from "@agents24/chat-react/ui"
|
|
|
10
10
|
import {
|
|
11
11
|
Agents24Provider,
|
|
12
12
|
type ChatHitlPart,
|
|
13
|
+
type HitlSubmissionOptions,
|
|
13
14
|
type ChatMessage,
|
|
14
15
|
type ChatPart,
|
|
15
16
|
} from "@agents24/react"
|
|
@@ -51,7 +52,7 @@ export type Agents24ChatTimelineSlotProps = {
|
|
|
51
52
|
parts: readonly ChatPart[]
|
|
52
53
|
isLoading: boolean
|
|
53
54
|
getHitlActionState: (part: ChatHitlPart) => HitlActionState | undefined
|
|
54
|
-
onHitlAction: (part: ChatHitlPart, response: ChatHitlResponse) => void
|
|
55
|
+
onHitlAction: (part: ChatHitlPart, response: ChatHitlResponse, options?: HitlSubmissionOptions) => void
|
|
55
56
|
}
|
|
56
57
|
|
|
57
58
|
function RuntimeChat({
|
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
useAgentChatComposer,
|
|
7
7
|
type AgentChatComposerFile,
|
|
8
8
|
} from "@agents24/chat-react/ui"
|
|
9
|
-
import { type AgentChatInputContract } from "@agents24/chat-react/runtime"
|
|
9
|
+
import { attachmentFileAccept, type AgentChatInputContract } from "@agents24/chat-react/runtime"
|
|
10
10
|
import type { ContextWindow } from "@agents24/client/protocol"
|
|
11
11
|
|
|
12
12
|
import { Button } from "../ui/button"
|
|
@@ -25,6 +25,7 @@ export type Agents24ChatComposerProps = {
|
|
|
25
25
|
inputContract: AgentChatInputContract
|
|
26
26
|
disabled?: boolean
|
|
27
27
|
contextWindow?: ContextWindow | null
|
|
28
|
+
scopeKey?: string | null
|
|
28
29
|
focusKey?: string | null
|
|
29
30
|
forceExpanded?: boolean
|
|
30
31
|
isCancelling?: boolean
|
|
@@ -48,6 +49,7 @@ export function ChatComposer({
|
|
|
48
49
|
disabled,
|
|
49
50
|
contextWindow,
|
|
50
51
|
focusKey,
|
|
52
|
+
scopeKey,
|
|
51
53
|
forceExpanded = false,
|
|
52
54
|
isCancelling = false,
|
|
53
55
|
isRunning,
|
|
@@ -66,7 +68,7 @@ export function ChatComposer({
|
|
|
66
68
|
const { text, setText, files, removeFile, addFiles, textareaRef, submit,
|
|
67
69
|
attachmentError, attachmentMimeTypes, allowAttachments, recordingAllowed,
|
|
68
70
|
recorder, isExpanded, validationError, action, canSubmit } = useAgentChatComposer({
|
|
69
|
-
inputContract, disabled, focusKey, forceExpanded, isCancelling, isRunning,
|
|
71
|
+
inputContract, disabled, scopeKey, focusKey, forceExpanded, isCancelling, isRunning,
|
|
70
72
|
onSubmit, restoredDraft, onRecordingStreamChange,
|
|
71
73
|
})
|
|
72
74
|
|
|
@@ -162,7 +164,7 @@ export function ChatComposer({
|
|
|
162
164
|
className="sr-only"
|
|
163
165
|
type="file"
|
|
164
166
|
multiple
|
|
165
|
-
accept={attachmentMimeTypes
|
|
167
|
+
accept={attachmentFileAccept(attachmentMimeTypes)}
|
|
166
168
|
onChange={(event) => {
|
|
167
169
|
addFiles(Array.from(event.target.files ?? []))
|
|
168
170
|
event.currentTarget.value = ""
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ChatHitlPart, ChatMessage as ChatMessageModel } from "@agents24/react"
|
|
1
|
+
import type { ChatHitlPart, HitlSubmissionOptions, ChatMessage as ChatMessageModel } from "@agents24/react"
|
|
2
2
|
import type { FeedbackReason, HitlResponse } from "@agents24/client"
|
|
3
3
|
import type { AgentChatRuntimeHitlActionState } from "@agents24/chat-react/runtime"
|
|
4
4
|
import { AgentChatDefaultActions, AgentChatUserMessageActionRow, ChatAttachmentRows, useCompletionActionEntrance, type ChatAttachmentContentResolver } from "@agents24/chat-react/ui"
|
|
@@ -14,7 +14,7 @@ type Props = {
|
|
|
14
14
|
message: ChatMessageModel
|
|
15
15
|
getHitlActionState: (part: ChatHitlPart) => AgentChatRuntimeHitlActionState | undefined
|
|
16
16
|
isLoading: boolean
|
|
17
|
-
onHitlAction: (part: ChatHitlPart, response: HitlResponse) => Promise<void>
|
|
17
|
+
onHitlAction: (part: ChatHitlPart, response: HitlResponse, options?: HitlSubmissionOptions) => Promise<void>
|
|
18
18
|
onRegenerate: () => Promise<void>
|
|
19
19
|
allowFeedback: boolean
|
|
20
20
|
onSetFeedback: (
|
|
@@ -71,7 +71,7 @@ export function ChatMessage({
|
|
|
71
71
|
</AgentChatUserMessageActionRow>
|
|
72
72
|
)}
|
|
73
73
|
{showCompletionActions && (
|
|
74
|
-
<MessageFooter className="
|
|
74
|
+
<MessageFooter className="a24-chat-message-action-row--assistant gap-1">
|
|
75
75
|
<AgentChatDefaultActions
|
|
76
76
|
animateCompletion={animateCompletionActions}
|
|
77
77
|
handlers={{
|
|
@@ -24,7 +24,7 @@ import {
|
|
|
24
24
|
import { SidebarInset, SidebarProvider, SidebarTrigger, useSidebar } from "../ui/sidebar"
|
|
25
25
|
|
|
26
26
|
const LOADING_INPUT_CONTRACT = {
|
|
27
|
-
version: "agents24.runtime-inputs.
|
|
27
|
+
version: "agents24.runtime-inputs.v3" as const,
|
|
28
28
|
modalities: {
|
|
29
29
|
text: { enabled: false, required: false },
|
|
30
30
|
files: { enabled: false, required: false, allowed_mime_types: [] },
|
|
@@ -250,6 +250,7 @@ export function ChatShell({
|
|
|
250
250
|
inputContract={runtime.inputContract || LOADING_INPUT_CONTRACT}
|
|
251
251
|
contextWindow={runtime.contextWindow}
|
|
252
252
|
disabled={runtime.isBootstrapping || runtime.isChangingAgent || isUploading || hasBlockingError}
|
|
253
|
+
scopeKey={controller.activeThreadId}
|
|
253
254
|
focusKey={controller.activeThreadId}
|
|
254
255
|
forceExpanded={isEmptyState}
|
|
255
256
|
isCancelling={isCancelling}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ChatHitlPart, ChatMessage } from "@agents24/react"
|
|
1
|
+
import type { ChatHitlPart, HitlSubmissionOptions, ChatMessage } from "@agents24/react"
|
|
2
2
|
import type { HitlResponse } from "@agents24/client"
|
|
3
3
|
import {
|
|
4
4
|
AgentChatPart,
|
|
@@ -39,7 +39,7 @@ export function MessageParts({
|
|
|
39
39
|
message: ChatMessage
|
|
40
40
|
getHitlActionState: (part: ChatHitlPart) => AgentChatRuntimeHitlActionState | undefined
|
|
41
41
|
isLoading: boolean
|
|
42
|
-
onHitlAction: (part: ChatHitlPart, response: HitlResponse) => Promise<void>
|
|
42
|
+
onHitlAction: (part: ChatHitlPart, response: HitlResponse, options?: HitlSubmissionOptions) => Promise<void>
|
|
43
43
|
Timeline?: React.ComponentType<Agents24ChatTimelineSlotProps>
|
|
44
44
|
}) {
|
|
45
45
|
if (message.role === "assistant") {
|
|
@@ -48,8 +48,8 @@ export function MessageParts({
|
|
|
48
48
|
getHitlActionState={getHitlActionState}
|
|
49
49
|
isLoading={isLoading}
|
|
50
50
|
message={message}
|
|
51
|
-
onHitlAction={(part, response) => {
|
|
52
|
-
void onHitlAction(part, response).catch(() => undefined)
|
|
51
|
+
onHitlAction={(part, response, options) => {
|
|
52
|
+
void onHitlAction(part, response, options).catch(() => undefined)
|
|
53
53
|
}}
|
|
54
54
|
parts={message.parts}
|
|
55
55
|
/>
|
|
@@ -71,8 +71,8 @@ export function MessageParts({
|
|
|
71
71
|
getHitlActionState={getHitlActionState}
|
|
72
72
|
key={part.id}
|
|
73
73
|
message={message}
|
|
74
|
-
onHitlAction={(hitlPart, response) => {
|
|
75
|
-
void onHitlAction(hitlPart, response).catch(() => undefined)
|
|
74
|
+
onHitlAction={(hitlPart, response, options) => {
|
|
75
|
+
void onHitlAction(hitlPart, response, options).catch(() => undefined)
|
|
76
76
|
}}
|
|
77
77
|
part={part}
|
|
78
78
|
/>
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"tailwindcss": "^4.1.16"
|
|
21
21
|
},
|
|
22
22
|
"source": "packages/agents24-chat-react/scaffold",
|
|
23
|
-
"sha256": "
|
|
23
|
+
"sha256": "1d23d762bf9c9c53cfd2d5e81604558aae8f54bb210a7b72a3d1214daabeb45f",
|
|
24
24
|
"files": [
|
|
25
25
|
"components.json",
|
|
26
26
|
"host-styles.css",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-agents24-app",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.38",
|
|
4
4
|
"description": "Create a production-ready Agents24 React application.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
"provenance": false
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@agents24/cli": "0.3.
|
|
36
|
+
"@agents24/cli": "0.3.32",
|
|
37
37
|
"@clack/prompts": "1.7.0",
|
|
38
38
|
"shadcn": "4.13.1"
|
|
39
39
|
},
|
package/versions.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"agents24": {
|
|
3
|
-
"@agents24/client": "^0.2.
|
|
4
|
-
"@agents24/react": "^0.2.
|
|
5
|
-
"@agents24/chat-react": "^0.5.
|
|
6
|
-
"@agents24/node": "^0.5.
|
|
3
|
+
"@agents24/client": "^0.2.20",
|
|
4
|
+
"@agents24/react": "^0.2.25",
|
|
5
|
+
"@agents24/chat-react": "^0.5.38",
|
|
6
|
+
"@agents24/node": "^0.5.29"
|
|
7
7
|
},
|
|
8
8
|
"runtime": {
|
|
9
9
|
"next": "^16.3.4",
|