format
This commit is contained in:
@@ -13,5 +13,3 @@ export function getContentString(content: Message["content"]): string {
|
||||
.map((c) => c.text);
|
||||
return texts.join(" ");
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -9,14 +9,20 @@ export const SUPPORTED_IMAGE_TYPES = [
|
||||
"image/gif",
|
||||
"image/webp",
|
||||
];
|
||||
export const SUPPORTED_FILE_TYPES = [...SUPPORTED_IMAGE_TYPES, "application/pdf"];
|
||||
export const SUPPORTED_FILE_TYPES = [
|
||||
...SUPPORTED_IMAGE_TYPES,
|
||||
"application/pdf",
|
||||
];
|
||||
|
||||
interface UseFileUploadOptions {
|
||||
initialBlocks?: Base64ContentBlock[];
|
||||
}
|
||||
|
||||
export function useFileUpload({ initialBlocks = [] }: UseFileUploadOptions = {}) {
|
||||
const [contentBlocks, setContentBlocks] = useState<Base64ContentBlock[]>(initialBlocks);
|
||||
export function useFileUpload({
|
||||
initialBlocks = [],
|
||||
}: UseFileUploadOptions = {}) {
|
||||
const [contentBlocks, setContentBlocks] =
|
||||
useState<Base64ContentBlock[]>(initialBlocks);
|
||||
const dropRef = useRef<HTMLDivElement>(null);
|
||||
|
||||
const isDuplicate = (file: File, blocks: Base64ContentBlock[]) => {
|
||||
|
||||
Reference in New Issue
Block a user