@agents24/chat-react 0.5.28 → 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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agents24/chat-react",
3
- "version": "0.5.28",
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.13",
63
- "@agents24/react": "0.2.17",
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 { canonicalInputMimeType, inputMimeTypes, validateAgentChatSubmission, type AgentChatInputContract } from "@agents24/chat-react/runtime"
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.join(",")}
228
+ accept={attachmentFileAccept(attachmentMimeTypes)}
229
229
  onChange={(event) => {
230
230
  const selected = Array.from(event.target.files ?? [])
231
- const accepted = selected.filter((file) => (
232
- attachmentMimeTypes.includes(canonicalInputMimeType(file.type))
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
  />