Skip to content

Shared task board where people and AI coding agents work as teammates. Source-available, self-hostable.

Go
279 B
Raw Blame
/** Compact file size for UI metadata: `412 KB`, `3.2 MB`. */
export function formatBytes(bytes: number): string {
  if (bytes < 1024) return `${bytes} B`;
  if (bytes < 1024 * 1024) return `${Math.round(bytes / 1024)} KB`;
  return `${(bytes / (1024 * 1024)).toFixed(1)} MB`;
}