(bytes: number)
| 30 | }; |
| 31 | |
| 32 | function formatFileSize(bytes: number): string { |
| 33 | if (bytes < 1024) return `${bytes} B`; |
| 34 | if (bytes < 1024 * 1024) return `${(bytes / 1024).toFixed(1)} KB`; |
| 35 | return `${(bytes / (1024 * 1024)).toFixed(1)} MB`; |
| 36 | } |
| 37 | |
| 38 | /** |
| 39 | * Create a web_fetch tool configured with the given model. The model is used |