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

Function truncateText

apps/visualize-trace/static/js/script.js:96–100  ·  view source on GitHub ↗
(text, maxLength = 100)

Source from the content-addressed store, hash-verified

94}
95
96function truncateText(text, maxLength = 100) {
97 if (!text) return '';
98 if (text.length <= maxLength) return text;
99 return text.substring(0, maxLength) + '...';
100}
101
102function formatFileSize(bytes) {
103 if (bytes === 0) return '0 B';

Callers 1

updateNavigationListFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected