MCPcopy Create free account
hub / github.com/continuedev/continue / formatBytes

Function formatBytes

extensions/cli/src/ui/components/ResourceDebugBar.tsx:11–14  ·  view source on GitHub ↗
(bytes: number)

Source from the content-addressed store, hash-verified

9}
10
11function formatBytes(bytes: number): string {
12 const mb = bytes / 1024 / 1024;
13 return mb >= 1 ? `${mb.toFixed(1)}MB` : `${(bytes / 1024).toFixed(1)}KB`;
14}
15
16function formatPercent(percent: number): string {
17 return `${Math.round(percent)}%`;

Callers 2

ResourceDebugBarFunction · 0.85
ResourceDebugDetailsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected