MCPcopy Create free account
hub / github.com/ResearAI/AutoFigure / formatFileSize

Function formatFileSize

frontend/components/chat-input.tsx:32–36  ·  view source on GitHub ↗
(bytes: number)

Source from the content-addressed store, hash-verified

30}
31
32function formatFileSize(bytes: number): string {
33 const mb = bytes / 1024 / 1024
34 if (mb < 0.01) return `${(bytes / 1024).toFixed(0)}KB`
35 return `${mb.toFixed(2)}MB`
36}
37
38function showErrorToast(message: React.ReactNode) {
39 toast.custom(

Callers 1

validateFilesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected