MCPcopy Create free account
hub / github.com/Zoo-Code-Org/Zoo-Code / formatBytes

Function formatBytes

webview-ui/src/components/chat/ChatRow.tsx:1495–1499  ·  view source on GitHub ↗
(bytes: number)

Source from the content-addressed store, hash-verified

1493 }
1494 case "readCommandOutput": {
1495 const formatBytes = (bytes: number) => {
1496 if (bytes < 1024) return `${bytes} B`
1497 if (bytes < 1024 * 1024) return `${(bytes / 1024).toFixed(1)} KB`
1498 return `${(bytes / (1024 * 1024)).toFixed(1)} MB`
1499 }
1500
1501 // Determine if this is a search operation
1502 const isSearch = sayTool.searchPattern !== undefined

Callers 1

ChatRowContentFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected