@agents24/chat-react 0.5.27 → 0.5.29
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/runtime/index.cjs +9 -13
- package/dist/runtime/index.cjs.map +1 -1
- package/dist/runtime/index.js +7 -13
- package/dist/runtime/index.js.map +1 -1
- package/dist/runtime/input-contract.d.ts +4 -3
- package/dist/scaffold/index.cjs +3 -7
- package/dist/scaffold/index.cjs.map +1 -1
- package/dist/scaffold/index.js +4 -8
- package/dist/scaffold/index.js.map +1 -1
- package/dist/ui/composer-attachments.d.ts +1 -1
- package/dist/ui/index.cjs +2 -1
- package/dist/ui/index.cjs.map +1 -1
- package/dist/ui/index.js +2 -1
- package/dist/ui/index.js.map +1 -1
- package/package.json +3 -3
- package/scaffold/src/components/chat/chat-composer.tsx +4 -12
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agents24/chat-react",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.29",
|
|
4
4
|
"description": "Accessible web UI and complete default layout for Agents24 chat applications.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -59,8 +59,8 @@
|
|
|
59
59
|
},
|
|
60
60
|
"dependencies": {
|
|
61
61
|
"@untitledui/file-icons": "0.0.9",
|
|
62
|
-
"@agents24/client": "0.2.
|
|
63
|
-
"@agents24/react": "0.2.
|
|
62
|
+
"@agents24/client": "0.2.14",
|
|
63
|
+
"@agents24/react": "0.2.18",
|
|
64
64
|
"@fontsource-variable/inter": "^5.3.0",
|
|
65
65
|
"@fontsource-variable/jetbrains-mono": "^5.3.0",
|
|
66
66
|
"@fontsource-variable/merriweather": "^5.3.0",
|
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
useChatComposerFocus,
|
|
11
11
|
type AgentChatComposerFile,
|
|
12
12
|
} from "@agents24/chat-react/ui"
|
|
13
|
-
import {
|
|
13
|
+
import { attachmentFileAccept, inputMimeTypes, validateAgentChatSubmission, type AgentChatInputContract } from "@agents24/chat-react/runtime"
|
|
14
14
|
import type { ContextWindow } from "@agents24/client/protocol"
|
|
15
15
|
|
|
16
16
|
import { Button } from "../ui/button"
|
|
@@ -225,19 +225,11 @@ export function ChatComposer({
|
|
|
225
225
|
className="sr-only"
|
|
226
226
|
type="file"
|
|
227
227
|
multiple
|
|
228
|
-
accept={attachmentMimeTypes
|
|
228
|
+
accept={attachmentFileAccept(attachmentMimeTypes)}
|
|
229
229
|
onChange={(event) => {
|
|
230
230
|
const selected = Array.from(event.target.files ?? [])
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
))
|
|
234
|
-
draftRevisionRef.current += 1
|
|
235
|
-
setFiles((current) => [...current, ...accepted.map(createAgentChatComposerFile)])
|
|
236
|
-
setAttachmentError(
|
|
237
|
-
accepted.length === selected.length
|
|
238
|
-
? null
|
|
239
|
-
: "One or more selected file types are not supported by this Agent.",
|
|
240
|
-
)
|
|
231
|
+
setFiles((current) => [...current, ...selected.map(createAgentChatComposerFile)])
|
|
232
|
+
setAttachmentError(null)
|
|
241
233
|
event.currentTarget.value = ""
|
|
242
234
|
}}
|
|
243
235
|
/>
|