@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.
@@ -1,5 +1,5 @@
1
1
  import type { ChatAttachment } from "../types";
2
- import type { ThreadMessage } from "@agents24/client";
2
+ import { type ThreadMessage } from "@agents24/client";
3
3
  export type AgentChatComposerFile = ChatAttachment & {
4
4
  id: string;
5
5
  type: "file";
package/dist/ui/index.cjs CHANGED
@@ -825,6 +825,7 @@ function ChatAttachmentRows({
825
825
  }
826
826
 
827
827
  // src/ui/composer-attachments.ts
828
+ var import_client = require("@agents24/client");
828
829
  var createId = () => typeof crypto !== "undefined" && "randomUUID" in crypto ? crypto.randomUUID() : `file-${Date.now()}-${Math.random().toString(36).slice(2)}`;
829
830
  function createAgentChatComposerFile(file) {
830
831
  return {
@@ -832,7 +833,7 @@ function createAgentChatComposerFile(file) {
832
833
  type: "file",
833
834
  url: URL.createObjectURL(file),
834
835
  filename: file.name || "attachment",
835
- mediaType: file.type || "application/octet-stream",
836
+ mediaType: (0, import_client.normalizeAttachmentMimeType)(file.type, file.name),
836
837
  source: file
837
838
  };
838
839
  }