9 lines · 338 B · TypeScript
RawDownload
import type { ModelDownload } from "@/lib/types";import { formatBytes } from "@/lib/formatters"; export { formatBytes }; export const progressPercent = (download: ModelDownload | null): number => {  if (!download?.total_bytes) return 0;  return Math.min(100, Math.round((download.downloaded_bytes / download.total_bytes) * 100));};

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t