MCPcopy Create free account
hub / github.com/MiroMindAI/MiroThinker / formatFileSize

Function formatFileSize

apps/visualize-trace/static/js/script.js:102–108  ·  view source on GitHub ↗
(bytes)

Source from the content-addressed store, hash-verified

100}
101
102function formatFileSize(bytes) {
103 if (bytes === 0) return '0 B';
104 const k = 1024;
105 const sizes = ['B', 'KB', 'MB', 'GB'];
106 const i = Math.floor(Math.log(bytes) / Math.log(k));
107 return parseFloat((bytes / Math.pow(k, i)).toFixed(2)) + ' ' + sizes[i];
108}
109
110// Handle MCP tool call display
111function formatMcpToolCallWithPlaceholders(text, placeholders) {

Callers 1

refreshFileListFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected